ezux 1.0.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 (293) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/dist/EzEventModal-DtpvYwGr.js +684 -0
  4. package/dist/EzGroupingPanel-CFwKUrF_.js +59 -0
  5. package/dist/EzTableEditDialog-BIk_mNpI.js +60 -0
  6. package/dist/components/EzKanban/EzKanban.types.d.ts +789 -0
  7. package/dist/components/EzKanban/components/CardEditorModal.d.ts +23 -0
  8. package/dist/components/EzKanban/components/EzKanbanErrorFallback.d.ts +1 -0
  9. package/dist/components/EzKanban/components/FilterPopover.d.ts +10 -0
  10. package/dist/components/EzKanban/components/KanbanBoard.d.ts +62 -0
  11. package/dist/components/EzKanban/components/KanbanCard.d.ts +38 -0
  12. package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
  13. package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +46 -0
  14. package/dist/components/EzKanban/components/KanbanToolbar.d.ts +41 -0
  15. package/dist/components/EzKanban/exports.d.ts +4 -0
  16. package/dist/components/EzKanban/hooks/useKanbanCards.d.ts +36 -0
  17. package/dist/components/EzKanban/hooks/useKanbanColumns.d.ts +27 -0
  18. package/dist/components/EzKanban/hooks/useKanbanDragDrop.d.ts +31 -0
  19. package/dist/components/EzKanban/hooks/useKanbanFilters.d.ts +23 -0
  20. package/dist/components/EzKanban/hooks/useKanbanState.d.ts +79 -0
  21. package/dist/components/EzKanban/hooks/useKanbanSwimlanes.d.ts +27 -0
  22. package/dist/components/EzKanban/hooks/useKanbanVirtualization.d.ts +16 -0
  23. package/dist/components/EzKanban/index.d.ts +45 -0
  24. package/dist/components/EzKanban/services/KanbanService.d.ts +30 -0
  25. package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
  26. package/dist/components/EzKanban/useEzKanban.d.ts +162 -0
  27. package/dist/components/EzKanban/views/KanbanTimelineView.d.ts +15 -0
  28. package/dist/components/EzLayout/Authentication/AuthSlider.d.ts +13 -0
  29. package/dist/components/EzLayout/Authentication/InputPassword.d.ts +7 -0
  30. package/dist/components/EzLayout/Authentication/SignInForm.d.ts +21 -0
  31. package/dist/components/EzLayout/Authentication/SignUpForm.d.ts +20 -0
  32. package/dist/components/EzLayout/EzHeader.d.ts +33 -0
  33. package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
  34. package/dist/components/EzLayout/EzLayout.types.d.ts +223 -0
  35. package/dist/components/EzLayout/EzSidebar.d.ts +14 -0
  36. package/dist/components/EzLayout/EzThemeColorChanger.d.ts +9 -0
  37. package/dist/components/EzLayout/EzThemeSwitcher.d.ts +8 -0
  38. package/dist/components/EzLayout/EzUserProfile.d.ts +23 -0
  39. package/dist/components/EzLayout/components/MainContent.d.ts +13 -0
  40. package/dist/components/EzLayout/hooks/useLayoutImperative.d.ts +17 -0
  41. package/dist/components/EzLayout/hooks/useLayoutState.d.ts +25 -0
  42. package/dist/components/EzLayout/index.d.ts +19 -0
  43. package/dist/components/EzLayout/useEzLayout.d.ts +26 -0
  44. package/dist/components/EzScheduler/EzScheduler.types.d.ts +1658 -0
  45. package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
  46. package/dist/components/EzScheduler/components/EzEventModal.d.ts +17 -0
  47. package/dist/components/EzScheduler/components/EzOverlapAlert.d.ts +12 -0
  48. package/dist/components/EzScheduler/components/EzQuickInfoPopup.d.ts +22 -0
  49. package/dist/components/EzScheduler/components/EzResourceSidebar.d.ts +33 -0
  50. package/dist/components/EzScheduler/components/EzSchedulerContent.d.ts +123 -0
  51. package/dist/components/EzScheduler/components/EzSchedulerQuickAdd.d.ts +17 -0
  52. package/dist/components/EzScheduler/components/RecurrenceEditor.d.ts +7 -0
  53. package/dist/components/EzScheduler/components/SchedulerLoadingSpinner.d.ts +2 -0
  54. package/dist/components/EzScheduler/components/dnd/DraggableEvent.d.ts +21 -0
  55. package/dist/components/EzScheduler/components/dnd/DroppableSlot.d.ts +19 -0
  56. package/dist/components/EzScheduler/hooks/useRecurrence.d.ts +2 -0
  57. package/dist/components/EzScheduler/hooks/useSchedulerEventHandlers.d.ts +11 -0
  58. package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +26 -0
  59. package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +15 -0
  60. package/dist/components/EzScheduler/hooks/useSchedulerNavigation.d.ts +9 -0
  61. package/dist/components/EzScheduler/hooks/useSchedulerResources.d.ts +10 -0
  62. package/dist/components/EzScheduler/hooks/useSchedulerState.d.ts +14 -0
  63. package/dist/components/EzScheduler/hooks/useSchedulerVirtualization.d.ts +9 -0
  64. package/dist/components/EzScheduler/index.d.ts +41 -0
  65. package/dist/components/EzScheduler/models/EventSettings.d.ts +11 -0
  66. package/dist/components/EzScheduler/models/View.d.ts +49 -0
  67. package/dist/components/EzScheduler/models/index.d.ts +2 -0
  68. package/dist/components/EzScheduler/services/AttendeeService.d.ts +15 -0
  69. package/dist/components/EzScheduler/services/AuditService.d.ts +15 -0
  70. package/dist/components/EzScheduler/services/CollisionDetectionService.d.ts +19 -0
  71. package/dist/components/EzScheduler/services/DragAndDropService.d.ts +16 -0
  72. package/dist/components/EzScheduler/services/HistoryService.d.ts +31 -0
  73. package/dist/components/EzScheduler/services/ICalendarImportService.d.ts +16 -0
  74. package/dist/components/EzScheduler/services/PrintService.d.ts +7 -0
  75. package/dist/components/EzScheduler/services/RecurrenceEngine.d.ts +7 -0
  76. package/dist/components/EzScheduler/services/ReminderService.d.ts +17 -0
  77. package/dist/components/EzScheduler/services/SchedulerService.d.ts +69 -0
  78. package/dist/components/EzScheduler/services/SearchService.d.ts +11 -0
  79. package/dist/components/EzScheduler/services/SecurityService.d.ts +25 -0
  80. package/dist/components/EzScheduler/services/TimezoneService.d.ts +20 -0
  81. package/dist/components/EzScheduler/services/VirtualScrollingService.d.ts +34 -0
  82. package/dist/components/EzScheduler/state/scheduler.store.d.ts +27 -0
  83. package/dist/components/EzScheduler/templates/CellTemplate.d.ts +42 -0
  84. package/dist/components/EzScheduler/templates/EditorTemplate.d.ts +32 -0
  85. package/dist/components/EzScheduler/templates/HeaderTemplate.d.ts +36 -0
  86. package/dist/components/EzScheduler/tests/phase1_rendering.spec.d.ts +1 -0
  87. package/dist/components/EzScheduler/tests/phase2_events.spec.d.ts +1 -0
  88. package/dist/components/EzScheduler/tests/phase3_templates.spec.d.ts +1 -0
  89. package/dist/components/EzScheduler/tests/phase4_export.spec.d.ts +1 -0
  90. package/dist/components/EzScheduler/tests/phase5_advanced.spec.d.ts +1 -0
  91. package/dist/components/EzScheduler/tests/phase6_security.spec.d.ts +1 -0
  92. package/dist/components/EzScheduler/tests/phase7_regression.spec.d.ts +1 -0
  93. package/dist/components/EzScheduler/useEzScheduler.d.ts +152 -0
  94. package/dist/components/EzScheduler/utils/createDragConstraint.d.ts +7 -0
  95. package/dist/components/EzScheduler/utils/getWeekNumber.d.ts +8 -0
  96. package/dist/components/EzScheduler/utils/sanitizeHtml.d.ts +17 -0
  97. package/dist/components/EzScheduler/views/AgendaView.d.ts +33 -0
  98. package/dist/components/EzScheduler/views/DayWeekView.d.ts +182 -0
  99. package/dist/components/EzScheduler/views/MonthView.d.ts +65 -0
  100. package/dist/components/EzScheduler/views/TimelineView.d.ts +121 -0
  101. package/dist/components/EzSignature/EzSignature.d.ts +42 -0
  102. package/dist/components/EzSignature/EzSignature.test.d.ts +1 -0
  103. package/dist/components/EzSignature/EzSignature.types.d.ts +132 -0
  104. package/dist/components/EzSignature/index.d.ts +2 -0
  105. package/dist/components/EzTable/EzColumnMenu.d.ts +7 -0
  106. package/dist/components/EzTable/EzDateFilterTree.d.ts +7 -0
  107. package/dist/components/EzTable/EzExcelFilter.d.ts +6 -0
  108. package/dist/components/EzTable/EzFilterBuilder.d.ts +12 -0
  109. package/dist/components/EzTable/EzGroupingPanel.d.ts +9 -0
  110. package/dist/components/EzTable/EzHeaderContextMenu.d.ts +8 -0
  111. package/dist/components/EzTable/EzPagination.d.ts +19 -0
  112. package/dist/components/EzTable/EzTable.types.d.ts +1481 -0
  113. package/dist/components/EzTable/EzTableEditDialog.d.ts +15 -0
  114. package/dist/components/EzTable/EzTableFooter.d.ts +10 -0
  115. package/dist/components/EzTable/EzTableOverlays.d.ts +11 -0
  116. package/dist/components/EzTable/EzTableStatusBar.d.ts +6 -0
  117. package/dist/components/EzTable/EzTableToolbar.d.ts +58 -0
  118. package/dist/components/EzTable/SmartCell.d.ts +7 -0
  119. package/dist/components/EzTable/__tests__/EzTableDX.test.d.ts +0 -0
  120. package/dist/components/EzTable/__tests__/EzTableEnterprise.test.d.ts +1 -0
  121. package/dist/components/EzTable/__tests__/useEzTable.test.d.ts +1 -0
  122. package/dist/components/EzTable/components/AdvancedColumnFilter.d.ts +16 -0
  123. package/dist/components/EzTable/components/BooleanFilterSection.d.ts +7 -0
  124. package/dist/components/EzTable/components/DraggableHeader.d.ts +10 -0
  125. package/dist/components/EzTable/components/EzTableBodySection.d.ts +70 -0
  126. package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
  127. package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +22 -0
  128. package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
  129. package/dist/components/EzTable/components/EzTableRow.d.ts +56 -0
  130. package/dist/components/EzTable/components/FilterActionButtons.d.ts +16 -0
  131. package/dist/components/EzTable/components/FilterRuleSelect.d.ts +26 -0
  132. package/dist/components/EzTable/components/SelectAllCheckbox.d.ts +21 -0
  133. package/dist/components/EzTable/components/SelectFilterSection.d.ts +18 -0
  134. package/dist/components/EzTable/components/VirtualizedFilterList.d.ts +21 -0
  135. package/dist/components/EzTable/constants/filterOptions.d.ts +47 -0
  136. package/dist/components/EzTable/context/EzTableContext.d.ts +10 -0
  137. package/dist/components/EzTable/context/TableConfigContext.d.ts +13 -0
  138. package/dist/components/EzTable/context/TableStore.d.ts +17 -0
  139. package/dist/components/EzTable/filterUtils.d.ts +5 -0
  140. package/dist/components/EzTable/hooks/useAutoFit.d.ts +4 -0
  141. package/dist/components/EzTable/hooks/useCellEventHandlers.d.ts +16 -0
  142. package/dist/components/EzTable/hooks/useColumnSizeVars.d.ts +6 -0
  143. package/dist/components/EzTable/hooks/useContainerResize.d.ts +11 -0
  144. package/dist/components/EzTable/hooks/useDialogStateInitialization.d.ts +8 -0
  145. package/dist/components/EzTable/hooks/useFilterSelection.d.ts +12 -0
  146. package/dist/components/EzTable/hooks/useTableFiltering.d.ts +23 -0
  147. package/dist/components/EzTable/hooks/useTableHistory.d.ts +87 -0
  148. package/dist/components/EzTable/hooks/useTableImperative.d.ts +42 -0
  149. package/dist/components/EzTable/hooks/useTableSelection.d.ts +32 -0
  150. package/dist/components/EzTable/hooks/useTableState.d.ts +31 -0
  151. package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +33 -0
  152. package/dist/components/EzTable/index.d.ts +50 -0
  153. package/dist/components/EzTable/renderers/index.d.ts +6 -0
  154. package/dist/components/EzTable/services/TableService.d.ts +26 -0
  155. package/dist/components/EzTable/useEzTable.d.ts +17 -0
  156. package/dist/components/EzTable/utils/TextMeasurer.d.ts +1 -0
  157. package/dist/components/EzTable/utils/TruncatedTooltip.d.ts +7 -0
  158. package/dist/components/EzTable/utils/columnTypeDetector.d.ts +5 -0
  159. package/dist/components/EzTable/utils/filterTypeGuards.d.ts +3 -0
  160. package/dist/components/EzTable/utils/index.d.ts +1 -0
  161. package/dist/components/EzTreeView/EzTreeView.types.d.ts +395 -0
  162. package/dist/components/EzTreeView/EzTreeViewItem.d.ts +77 -0
  163. package/dist/components/EzTreeView/EzVirtualTree.d.ts +72 -0
  164. package/dist/components/EzTreeView/components/EzTreeViewLoadingSpinner.d.ts +2 -0
  165. package/dist/components/EzTreeView/hooks/useTreeDragDrop.d.ts +31 -0
  166. package/dist/components/EzTreeView/hooks/useTreeExpansion.d.ts +21 -0
  167. package/dist/components/EzTreeView/hooks/useTreeImperative.d.ts +28 -0
  168. package/dist/components/EzTreeView/hooks/useTreeSelection.d.ts +31 -0
  169. package/dist/components/EzTreeView/hooks/useTreeState.d.ts +21 -0
  170. package/dist/components/EzTreeView/hooks/useTreeVirtualization.d.ts +18 -0
  171. package/dist/components/EzTreeView/index.d.ts +40 -0
  172. package/dist/components/EzTreeView/services/TreeService.d.ts +11 -0
  173. package/dist/components/EzTreeView/useEzTreeView.d.ts +62 -0
  174. package/dist/components/EzTreeView/utils/treeUtils.d.ts +17 -0
  175. package/dist/components/shared/components/EzErrorBoundary.d.ts +18 -0
  176. package/dist/components/shared/components/EzLayoutErrorFallback.d.ts +2 -0
  177. package/dist/components/shared/components/EzLoadingSpinner.d.ts +8 -0
  178. package/dist/components/shared/components/EzSchedulerErrorFallback.d.ts +2 -0
  179. package/dist/components/shared/components/EzTableErrorFallback.d.ts +2 -0
  180. package/dist/components/shared/components/EzTreeViewErrorFallback.d.ts +2 -0
  181. package/dist/components/ui/avatar.d.ts +5 -0
  182. package/dist/components/ui/badge.d.ts +9 -0
  183. package/dist/components/ui/breadcrumb.d.ts +19 -0
  184. package/dist/components/ui/button.d.ts +12 -0
  185. package/dist/components/ui/calendar.d.ts +15 -0
  186. package/dist/components/ui/card.d.ts +8 -0
  187. package/dist/components/ui/checkbox.d.ts +7 -0
  188. package/dist/components/ui/command.d.ts +78 -0
  189. package/dist/components/ui/context-menu.d.ts +27 -0
  190. package/dist/components/ui/date-time-picker.d.ts +13 -0
  191. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  192. package/dist/components/ui/index.d.ts +26 -0
  193. package/dist/components/ui/input.d.ts +5 -0
  194. package/dist/components/ui/label.d.ts +5 -0
  195. package/dist/components/ui/modal.d.ts +9 -0
  196. package/dist/components/ui/password-input.d.ts +5 -0
  197. package/dist/components/ui/popover.d.ts +4 -0
  198. package/dist/components/ui/progress.d.ts +7 -0
  199. package/dist/components/ui/radio-group.d.ts +5 -0
  200. package/dist/components/ui/scroll-area.d.ts +5 -0
  201. package/dist/components/ui/select.d.ts +24 -0
  202. package/dist/components/ui/skeleton.d.ts +2 -0
  203. package/dist/components/ui/switch.d.ts +4 -0
  204. package/dist/components/ui/table.d.ts +10 -0
  205. package/dist/components/ui/tabs.d.ts +14 -0
  206. package/dist/components/ui/textarea.d.ts +5 -0
  207. package/dist/components/ui/tooltip.d.ts +7 -0
  208. package/dist/ezux.es.js +149 -0
  209. package/dist/ezux.umd.js +68 -0
  210. package/dist/index-DBwoXp4n.js +30656 -0
  211. package/dist/index.d.ts +70 -0
  212. package/dist/lib/perfect-freehand.d.ts +221 -0
  213. package/dist/lib/utils.d.ts +2 -0
  214. package/dist/shared/components/AnimatedText.d.ts +44 -0
  215. package/dist/shared/components/BaseCell.d.ts +14 -0
  216. package/dist/shared/components/BooleanRenderer.d.ts +34 -0
  217. package/dist/shared/components/ChartRenderer.d.ts +19 -0
  218. package/dist/shared/components/DeleteConfirmationModal.d.ts +11 -0
  219. package/dist/shared/components/EzContextMenu.d.ts +12 -0
  220. package/dist/shared/components/EzNotificationDropdown.d.ts +1 -0
  221. package/dist/shared/components/HighlightText.d.ts +4 -0
  222. package/dist/shared/components/Modal.d.ts +13 -0
  223. package/dist/shared/components/NotificationPanel.d.ts +2 -0
  224. package/dist/shared/components/PrimitiveRenderer.d.ts +39 -0
  225. package/dist/shared/components/SearchableSelect.d.ts +13 -0
  226. package/dist/shared/components/SelectRenderer.d.ts +33 -0
  227. package/dist/shared/components/StatusBadge.d.ts +12 -0
  228. package/dist/shared/components/TooltipWrapper.d.ts +12 -0
  229. package/dist/shared/components/index.d.ts +9 -0
  230. package/dist/shared/hooks/index.d.ts +56 -0
  231. package/dist/shared/hooks/useBaseComponent.d.ts +60 -0
  232. package/dist/shared/hooks/useComponentImperativeAPI.d.ts +11 -0
  233. package/dist/shared/hooks/useComponentState.d.ts +39 -0
  234. package/dist/shared/hooks/useCurrentTime.d.ts +6 -0
  235. package/dist/shared/hooks/useDataChangeEvents.d.ts +53 -0
  236. package/dist/shared/hooks/useDebounce.d.ts +10 -0
  237. package/dist/shared/hooks/useDeleteConfirmation.d.ts +9 -0
  238. package/dist/shared/hooks/useDialogState.d.ts +21 -0
  239. package/dist/shared/hooks/useDndHandlers.d.ts +17 -0
  240. package/dist/shared/hooks/useEditing.d.ts +107 -0
  241. package/dist/shared/hooks/useEventHandlers.d.ts +61 -0
  242. package/dist/shared/hooks/useEzTheme.d.ts +22 -0
  243. package/dist/shared/hooks/useFieldValidation.d.ts +24 -0
  244. package/dist/shared/hooks/useHistory.d.ts +13 -0
  245. package/dist/shared/hooks/useI18n.d.ts +9 -0
  246. package/dist/shared/hooks/useImperativeAPI.d.ts +8 -0
  247. package/dist/shared/hooks/useInitCoreServices.d.ts +5 -0
  248. package/dist/shared/hooks/useKeyboardNavigation.d.ts +36 -0
  249. package/dist/shared/hooks/useKeyboardShortcuts.d.ts +14 -0
  250. package/dist/shared/hooks/useLifecycleEvents.d.ts +22 -0
  251. package/dist/shared/hooks/useLoadingState.d.ts +17 -0
  252. package/dist/shared/hooks/useMediaQuery.d.ts +6 -0
  253. package/dist/shared/hooks/useNotificationService.d.ts +8 -0
  254. package/dist/shared/hooks/usePerformanceMonitor.d.ts +15 -0
  255. package/dist/shared/hooks/useRowSelectionEvents.d.ts +44 -0
  256. package/dist/shared/hooks/useSelection.d.ts +73 -0
  257. package/dist/shared/hooks/useService.d.ts +12 -0
  258. package/dist/shared/hooks/useServiceState.d.ts +12 -0
  259. package/dist/shared/hooks/useStateChangeEvents.d.ts +61 -0
  260. package/dist/shared/hooks/useTheme.d.ts +13 -0
  261. package/dist/shared/hooks/useVirtualization.d.ts +85 -0
  262. package/dist/shared/services/BaseService.d.ts +56 -0
  263. package/dist/shared/services/ContextMenuService.d.ts +58 -0
  264. package/dist/shared/services/ExportService.d.ts +35 -0
  265. package/dist/shared/services/FocusManagerService.d.ts +33 -0
  266. package/dist/shared/services/HierarchyService.d.ts +43 -0
  267. package/dist/shared/services/I18nService.d.ts +65 -0
  268. package/dist/shared/services/LayoutService.d.ts +80 -0
  269. package/dist/shared/services/NotificationService.d.ts +44 -0
  270. package/dist/shared/services/PersistenceService.d.ts +69 -0
  271. package/dist/shared/services/ServiceRegistry.d.ts +51 -0
  272. package/dist/shared/services/ThemeService.d.ts +49 -0
  273. package/dist/shared/services/VirtualizationService.d.ts +51 -0
  274. package/dist/shared/state/store.d.ts +10 -0
  275. package/dist/shared/themes.d.ts +25 -0
  276. package/dist/shared/types/BaseProps.d.ts +18 -0
  277. package/dist/shared/types/common.d.ts +292 -0
  278. package/dist/shared/types/commonTypes.d.ts +101 -0
  279. package/dist/shared/types/index.d.ts +2 -0
  280. package/dist/shared/utils/canvasUtils.d.ts +16 -0
  281. package/dist/shared/utils/commonUtils.d.ts +28 -0
  282. package/dist/shared/utils/csvUtils.d.ts +7 -0
  283. package/dist/shared/utils/dateUtils.d.ts +5 -0
  284. package/dist/shared/utils/dndUtils.d.ts +16 -0
  285. package/dist/shared/utils/ezStyleUtils.d.ts +64 -0
  286. package/dist/shared/utils/formatUtils.d.ts +20 -0
  287. package/dist/shared/utils/imperativeApiUtils.d.ts +36 -0
  288. package/dist/shared/utils/index.d.ts +11 -0
  289. package/dist/shared/utils/renderUtils.d.ts +6 -0
  290. package/dist/shared/utils/serviceUtils.d.ts +10 -0
  291. package/dist/shared/utils/styleUtils.d.ts +66 -0
  292. package/dist/shared/utils/validationUtils.d.ts +16 -0
  293. package/package.json +101 -0
@@ -0,0 +1,68 @@
1
+ (function(B,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react"),require("@tanstack/react-form"),require("lucide-react"),require("@tanstack/react-table"),require("@tanstack/react-virtual"),require("clsx"),require("tailwind-merge"),require("@dnd-kit/core"),require("date-fns"),require("rrule"),require("@dnd-kit/utilities"),require("dompurify"),require("react-dom"),require("class-variance-authority")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-form","lucide-react","@tanstack/react-table","@tanstack/react-virtual","clsx","tailwind-merge","@dnd-kit/core","date-fns","rrule","@dnd-kit/utilities","dompurify","react-dom","class-variance-authority"],s):(B=typeof globalThis<"u"?globalThis:B||self,s(B.Ezux={},B.React,B.ReactForm,B.lucide,B.ReactTable,B.ReactVirtual,B.clsx,B.tailwindMerge,B.DndKitCore,B.dateFns,B.rrule,B.DndKitUtilities,B.DOMPurify,B.ReactDOM,B.cva))})(this,(function(B,s,hr,O,Ge,Zt,q3,Q3,De,K,Di,Ai,Y3,mr,zs){"use strict";function Hi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=Hi(s),Ti=Hi(mr);var fr={exports:{}},Vn={};var Pi;function X3(){if(Pi)return Vn;Pi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return Vn.Fragment=t,Vn.jsx=n,Vn.jsxs=n,Vn}var Bn={};var Ii;function Z3(){return Ii||(Ii=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===_?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case g:return"Fragment";case y:return"Profiler";case b:return"StrictMode";case E:return"Suspense";case C:return"SuspenseList";case A:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case x:return"Portal";case z:return T.displayName||"Context";case S:return(T._context.displayName||"Context")+".Consumer";case N:var j=T.render;return T=T.displayName,T||(T=j.displayName||j.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case M:return j=T.displayName||null,j!==null?j:e(T.type)||"Memo";case D:j=T._payload,T=T._init;try{return e(T(j))}catch{}}return null}function t(T){return""+T}function n(T){try{t(T);var j=!1}catch{j=!0}if(j){j=console;var V=j.error,L=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return V.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",L),t(T)}}function r(T){if(T===g)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===D)return"<...>";try{var j=e(T);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function i(){var T=U.A;return T===null?null:T.getOwner()}function o(){return Error("react-stack-top-frame")}function a(T){if(G.call(T,"key")){var j=Object.getOwnPropertyDescriptor(T,"key").get;if(j&&j.isReactWarning)return!1}return T.key!==void 0}function c(T,j){function V(){Z||(Z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}V.isReactWarning=!0,Object.defineProperty(T,"key",{get:V,configurable:!0})}function d(){var T=e(this.type);return P[T]||(P[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function u(T,j,V,L,$,se){var ne=V.ref;return T={$$typeof:p,type:T,key:j,props:V,_owner:L},(ne!==void 0?ne:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:d}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function h(T,j,V,L,$,se){var ne=j.children;if(ne!==void 0)if(L)if(Y(ne)){for(L=0;L<ne.length;L++)m(ne[L]);Object.freeze&&Object.freeze(ne)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(ne);if(G.call(j,"key")){ne=e(T);var de=Object.keys(j).filter(function(we){return we!=="key"});L=0<de.length?"{key: someKey, "+de.join(": ..., ")+": ...}":"{key: someKey}",X[ne+L]||(de=0<de.length?"{"+de.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,L,ne,de,ne),X[ne+L]=!0)}if(ne=null,V!==void 0&&(n(V),ne=""+V),a(j)&&(n(j.key),ne=""+j.key),"key"in j){V={};for(var pe in j)pe!=="key"&&(V[pe]=j[pe])}else V=j;return ne&&c(V,typeof T=="function"?T.displayName||T.name||"Unknown":T),u(T,ne,V,i(),$,se)}function m(T){v(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===D&&(T._payload.status==="fulfilled"?v(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function v(T){return typeof T=="object"&&T!==null&&T.$$typeof===p}var f=s,p=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),z=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),U=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,Y=Array.isArray,te=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(T){return T()}};var Z,P={},W=f.react_stack_bottom_frame.bind(f,o)(),I=te(r(o)),X={};Bn.Fragment=g,Bn.jsx=function(T,j,V){var L=1e4>U.recentlyCreatedOwnerStacks++;return h(T,j,V,!1,L?Error("react-stack-top-frame"):W,L?te(r(T)):I)},Bn.jsxs=function(T,j,V){var L=1e4>U.recentlyCreatedOwnerStacks++;return h(T,j,V,!0,L?Error("react-stack-top-frame"):W,L?te(r(T)):I)}})()),Bn}var Oi;function J3(){return Oi||(Oi=1,process.env.NODE_ENV==="production"?fr.exports=X3():fr.exports=Z3()),fr.exports}var l=J3();function H(...e){return Q3.twMerge(q3.clsx(e))}function Li(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ye(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Li(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Li(e[i],null)}}}}function Ne(...e){return w.useCallback(Ye(...e),e)}var R3=Symbol.for("react.lazy"),pr=w[" use ".trim().toString()];function e4(e){return typeof e=="object"&&e!==null&&"then"in e}function _i(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===R3&&"_payload"in e&&e4(e._payload)}function Vi(e){const t=t4(e),n=w.forwardRef((r,i)=>{let{children:o,...a}=r;_i(o)&&typeof pr=="function"&&(o=pr(o._payload));const c=w.Children.toArray(o),d=c.find(r4);if(d){const u=d.props.children,h=c.map(m=>m===d?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return l.jsx(t,{...a,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,h):null})}return l.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var Bi=Vi("Slot");function t4(e){const t=w.forwardRef((n,r)=>{let{children:i,...o}=n;if(_i(i)&&typeof pr=="function"&&(i=pr(i._payload)),w.isValidElement(i)){const a=l4(i),c=s4(o,i.props);return i.type!==w.Fragment&&(c.ref=r?Ye(r,a):a),w.cloneElement(i,c)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var n4=Symbol("radix.slottable");function r4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n4}function s4(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function l4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $i=zs.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),J=s.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:i=!1,children:o,disabled:a,...c},d)=>{const u=r?Bi:"button";return l.jsxs(u,{className:H($i({variant:t,size:n,className:e})),ref:d,disabled:i||a,...c,children:[i&&l.jsx(O.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),o]})});J.displayName="Button";const je=w.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:H("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",e),ref:r,...n}));je.displayName="Input";const ct=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ct.displayName="Avatar";const Nt=w.forwardRef(({className:e,...t},n)=>l.jsx("img",{ref:n,className:H("aspect-square h-full w-full",e),...t}));Nt.displayName="AvatarImage";const dt=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("flex h-full w-full items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",e),...t}));dt.displayName="AvatarFallback";var i4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o4=i4.reduce((e,t)=>{const n=Vi(`Primitive.${t}`),r=w.forwardRef((i,o)=>{const{asChild:a,...c}=i,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(d,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),a4="Label",Wi=w.forwardRef((e,t)=>l.jsx(o4.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Wi.displayName=a4;var Ui=Wi;const c4=zs.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ze=w.forwardRef(({className:e,...t},n)=>l.jsx(Ui,{ref:n,className:H(c4(),e),...t}));ze.displayName=Ui.displayName;const Ms=w.forwardRef(({className:e,label:t,error:n,...r},i)=>{const[o,a]=w.useState(!1),c=w.useId(),d=r.id??c;return l.jsxs("div",{className:"w-full space-y-2 text-left",children:[t&&l.jsx(ze,{htmlFor:d,className:H(n&&"text-destructive"),children:t}),l.jsxs("div",{className:"relative",children:[l.jsx(je,{id:d,type:o?"text":"password",className:H("pr-10",n&&"border-destructive focus-visible:ring-destructive",e),ref:i,...r}),l.jsxs(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>a(u=>!u),className:"absolute inset-y-0 right-0 h-full px-3 py-2 hover:bg-transparent text-muted-foreground focus-visible:ring-ring/50",children:[o?l.jsx(O.EyeOffIcon,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(O.EyeIcon,{className:"h-4 w-4","aria-hidden":"true"}),l.jsx("span",{className:"sr-only",children:o?"Hide password":"Show password"})]})]}),n&&l.jsx("p",{className:"text-xs font-medium text-destructive animate-in fade-in slide-in-from-top-1",children:n})]})});Ms.displayName="PasswordInput";const Gi=({onSubmit:e})=>{const t=s.useId(),n=s.useId(),r=s.useId(),[i,o]=s.useState(null),a=s.useRef(null),c=hr.useForm({defaultValues:{name:"",email:"",password:""},validators:{onChange:()=>{}},onSubmit:async({value:u})=>{e?await e(u):process.env.NODE_ENV}}),d=u=>{const h=u.target.files?.[0];if(h){const m=URL.createObjectURL(h);o(m)}};return l.jsxs("form",{onSubmit:u=>{u.preventDefault(),u.stopPropagation(),c.handleSubmit()},className:"w-full max-w-sm mx-auto space-y-6",children:[l.jsxs("div",{className:"text-center mb-6",children:[l.jsx("h1",{className:"text-3xl font-bold mb-3 tracking-tight text-zinc-900 dark:text-white",children:"Create Account"}),l.jsxs("div",{className:"flex justify-center gap-4 my-4",children:[l.jsx(J,{type:"button",variant:"outline",size:"icon",className:"rounded-full w-10 h-10 border-zinc-200 hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-900",children:l.jsx(O.Facebook,{className:"w-4 h-4 text-blue-600"})}),l.jsx(J,{type:"button",variant:"outline",size:"icon",className:"rounded-full w-10 h-10 border-zinc-200 hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-900",children:l.jsx(O.Github,{className:"w-4 h-4 text-zinc-900 dark:text-white"})}),l.jsx(J,{type:"button",variant:"outline",size:"icon",className:"rounded-full w-10 h-10 border-zinc-200 hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-900",children:l.jsx("span",{className:"font-bold text-xs",children:"G"})})]}),l.jsxs("div",{className:"relative mb-6",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("span",{className:"w-full border-t border-zinc-200 dark:border-zinc-800"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-white dark:bg-zinc-950 px-2 text-zinc-400",children:"Or use email for registration"})})]})]}),l.jsxs("div",{className:"flex justify-center mb-6",children:[l.jsxs("div",{className:"relative group cursor-pointer",onClick:()=>a.current?.click(),role:"button","aria-label":"Upload Profile Picture",children:[l.jsxs(ct,{className:"w-20 h-20 border-2 border-dashed border-zinc-300 dark:border-zinc-700 hover:border-indigo-500 transition-colors",children:[l.jsx(Nt,{src:i||void 0,className:"object-cover"}),l.jsx(dt,{className:"bg-zinc-50 dark:bg-zinc-900",children:l.jsx(O.Upload,{className:"w-6 h-6 text-zinc-400 group-hover:text-indigo-500 transition-colors"})})]}),l.jsx("div",{className:"absolute inset-0 bg-black/40 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx("span",{className:"text-white text-[10px] font-medium",children:"Edit"})})]}),l.jsx("input",{ref:a,type:"file",accept:"image/*",className:"hidden",onChange:d})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx(c.Field,{name:"name",validators:{onChange:({value:u})=>u?u.length<2?"Name must be at least 2 characters":void 0:"Name is required"},children:u=>l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:l.jsx(O.User,{className:"h-4 w-4 text-zinc-400"})}),l.jsx(je,{id:t,name:u.name,value:u.state.value,onBlur:u.handleBlur,onChange:h=>u.handleChange(h.target.value),className:H("pl-10 bg-zinc-50 dark:bg-zinc-900/50 border-zinc-200 dark:border-zinc-800 h-11 focus-visible:ring-indigo-500",u.state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500"),placeholder:"Full Name"})]}),u.state.meta.errors.length>0&&l.jsx("p",{className:"text-xs text-red-500 px-1",children:u.state.meta.errors.join(", ")})]})}),l.jsx(c.Field,{name:"email",validators:{onChange:({value:u})=>u?/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(u)?void 0:"Invalid email address":"Email is required"},children:u=>l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:l.jsx(O.Mail,{className:"h-4 w-4 text-zinc-400"})}),l.jsx(je,{id:n,name:u.name,value:u.state.value,onBlur:u.handleBlur,onChange:h=>u.handleChange(h.target.value),className:H("pl-10 bg-zinc-50 dark:bg-zinc-900/50 border-zinc-200 dark:border-zinc-800 h-11 focus-visible:ring-indigo-500",u.state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500"),placeholder:"Email Address"})]}),u.state.meta.errors.length>0&&l.jsx("p",{className:"text-xs text-red-500 px-1",children:u.state.meta.errors.join(", ")})]})}),l.jsx(c.Field,{name:"password",validators:{onChange:({value:u})=>u?u.length<8?"Password must be at least 8 characters":void 0:"Password is required"},children:u=>l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ms,{id:r,name:u.name,value:u.state.value,onBlur:u.handleBlur,onChange:h=>u.handleChange(h.target.value),className:H("bg-zinc-50 dark:bg-zinc-900/50 border-zinc-200 dark:border-zinc-800 h-11 focus-visible:ring-indigo-500",u.state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500"),placeholder:"Password"}),u.state.meta.errors.length>0&&l.jsx("p",{className:"text-xs text-red-500 px-1",children:u.state.meta.errors.join(", ")})]})})]}),l.jsx(J,{type:"submit",disabled:c.state.isSubmitting,className:"w-full mt-6 rounded-lg h-11 bg-indigo-600 hover:bg-indigo-700 text-white font-semibold uppercase tracking-wide text-xs shadow-lg shadow-indigo-500/20 transition-all",children:c.state.isSubmitting?"Creating Account...":"Sign Up"})]})},Ki=({onSubmit:e,defaultValues:t})=>{const n=s.useId(),r=s.useId(),i=hr.useForm({defaultValues:{email:t?.email||"",password:t?.password||""},validators:{onChange:()=>{}},onSubmit:async({value:o})=>{e&&await e(o)}});return l.jsxs("form",{onSubmit:o=>{o.preventDefault(),o.stopPropagation(),i.handleSubmit()},className:"w-full max-w-sm mx-auto space-y-6",children:[l.jsxs("div",{className:"text-center mb-8",children:[l.jsx("h1",{className:"text-3xl font-bold mb-3 tracking-tight text-zinc-900 dark:text-white",children:"Sign In"}),l.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Use your social account or email to login"}),l.jsxs("div",{className:"flex justify-center gap-4 mt-6",children:[l.jsx(J,{type:"button",variant:"outline",size:"icon",className:"rounded-full w-10 h-10 border-zinc-200 hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-900",children:l.jsx(O.Facebook,{className:"w-4 h-4 text-blue-600"})}),l.jsx(J,{type:"button",variant:"outline",size:"icon",className:"rounded-full w-10 h-10 border-zinc-200 hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-900",children:l.jsx(O.Github,{className:"w-4 h-4 text-zinc-900 dark:text-white"})}),l.jsx(J,{type:"button",variant:"outline",size:"icon",className:"rounded-full w-10 h-10 border-zinc-200 hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-900",children:l.jsx("span",{className:"font-bold text-xs",children:"G"})})]}),l.jsxs("div",{className:"relative my-6",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("span",{className:"w-full border-t border-zinc-200 dark:border-zinc-800"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-white dark:bg-zinc-950 px-2 text-zinc-400",children:"Or use your email"})})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"space-y-2 text-left",children:l.jsx(i.Field,{name:"email",validators:{onChange:({value:o})=>o?/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(o)?void 0:"Invalid email address":"Email is required"},children:o=>l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:l.jsx(O.Mail,{className:"h-4 w-4 text-zinc-400"})}),l.jsx(je,{id:n,name:o.name,value:o.state.value,onBlur:o.handleBlur,onChange:a=>o.handleChange(a.target.value),className:H("pl-10 bg-zinc-50 dark:bg-zinc-900/50 border-zinc-200 dark:border-zinc-800 h-11 focus-visible:ring-indigo-500",o.state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500"),placeholder:"Email Address"})]}),o.state.meta.errors.length>0&&l.jsx("p",{className:"text-xs text-red-500 px-1",children:o.state.meta.errors.join(", ")})]})})}),l.jsxs("div",{className:"space-y-2 text-left",children:[l.jsx(i.Field,{name:"password",validators:{onChange:({value:o})=>o?o.length<8?"Password must be at least 8 characters":void 0:"Password is required"},children:o=>l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ms,{id:r,name:o.name,value:o.state.value,onBlur:o.handleBlur,onChange:a=>o.handleChange(a.target.value),className:H("bg-zinc-50 dark:bg-zinc-900/50 border-zinc-200 dark:border-zinc-800 h-11 focus-visible:ring-indigo-500",o.state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500"),placeholder:"Password"}),o.state.meta.errors.length>0&&l.jsx("p",{className:"text-xs text-red-500 px-1",children:o.state.meta.errors.join(", ")})]})}),l.jsx("div",{className:"flex justify-end pt-1",children:l.jsx("a",{href:"#",className:"text-xs font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"Forgot your password?"})})]})]}),l.jsx(J,{type:"submit",disabled:i.state.isSubmitting,className:"w-full mt-6 rounded-lg h-11 bg-indigo-600 hover:bg-indigo-700 text-white font-semibold uppercase tracking-wide text-xs shadow-lg shadow-indigo-500/20 transition-all",children:i.state.isSubmitting?"Signing In...":"Sign In"})]})};class gr{state;subscribers=new Set;isUpdating=!1;updateQueue=[];cleanupTasks=[];constructor(t){this.state=t}getState(){return this.state}registerCleanup(t){this.cleanupTasks.push(t)}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}setState(t){const n=typeof t=="function"?t(this.state):t,r={...this.state,...n};this.state=r,this.notifySubscribers()}debounceTimer=null;debounceMs=0;setDebounce(t){this.debounceMs=t}notifySubscribers(){this.debounceMs>0?(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.broadcast(),this.debounceMs)):this.broadcast()}broadcast(){if(this.isUpdating){this.updateQueue.push(this.state);return}this.isUpdating=!0;const t=this.state;try{this.subscribers.forEach(n=>{n(t)})}finally{this.isUpdating=!1}this.updateQueue.length>0&&(this.updateQueue=[],this.broadcast())}cleanup(){this.subscribers.clear(),this.cleanupTasks.forEach(t=>{try{t()}catch(n){console.error(`Error during service cleanup for ${this.name}:`,n)}}),this.cleanupTasks=[]}}class qi extends gr{name="ServiceRegistry";services=new Map;constructor(){super({serviceNames:[]}),this.registerCleanup(()=>this.cleanupAll())}register(t,n){this.services.has(t)&&(console.warn(`Service ${t} is already registered. Overwriting.`),this.unregister(t)),this.services.set(t,n),this.updateState()}get(t){return this.services.get(t)}getOrThrow(t){const n=this.get(t);if(!n)throw new Error(`Service ${t} not found in registry.`);return n}unregister(t){const n=this.services.get(t);n?.cleanup&&n.cleanup(),this.services.delete(t)&&this.updateState()}cleanupAll(){for(const t of this.services.values())t.cleanup&&t.cleanup();this.services.clear(),this.updateState()}updateState(){this.setState({serviceNames:Array.from(this.services.keys())})}}const oe=new qi,jt=(e,t,n)=>{let r=e.get(t);return r||(r=n(),e.register(t,r)),r},d4=(e,t)=>{Object.entries(t).forEach(([n,r])=>{e.get(n)||e.register(n,r())})},Qi=(e,t,n)=>{const r=n||oe,[i]=s.useState(()=>jt(r,e,t));return i};class vr{name="NotificationService";subscribers=new Set;notifications=[];add(t){const n=crypto.randomUUID(),r={...t,id:n};this.notifications.push(r),this.notify(),t.duration!==0&&setTimeout(()=>this.remove(n),t.duration||5e3)}show(t){this.add(t)}remove(t){this.notifications=this.notifications.filter(n=>n.id!==t),this.notify()}clearAll(){this.notifications=[],this.notify()}subscribe(t){return this.subscribers.add(t),t(this.notifications),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t(this.notifications))}}const u4=({signInSlot:e,signUpSlot:t,initialMode:n="signin"})=>{const[r,i]=s.useState(n==="signup"),o=Qi("NotificationService",()=>new vr),a=()=>i(!r),c=async u=>{if(await new Promise(h=>setTimeout(h,1500)),u.email.includes("error"))throw o?.add({type:"error",message:"Invalid credentials. Please try again.",duration:5e3}),new Error("Invalid credentials");o?.add({type:"success",message:`Welcome back! Successfully signed in as ${u.email}`,duration:3e3})},d=async u=>{await new Promise(h=>setTimeout(h,1500)),o?.add({type:"success",message:`Account created! Welcome, ${u.name}.`,duration:3e3}),setTimeout(()=>i(!1),1e3)};return l.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-zinc-100 p-4 dark:bg-zinc-900",children:l.jsxs("div",{className:"relative w-full max-w-[900px] min-h-[600px] overflow-hidden rounded-2xl bg-white shadow-2xl dark:bg-zinc-950 flex transition-all duration-300",children:[l.jsx("div",{className:H("absolute top-0 left-0 h-full w-full md:w-1/2 flex flex-col items-center justify-center p-8 bg-white dark:bg-zinc-950 transition-all duration-700 ease-in-out z-10",r?"opacity-0 pointer-events-none":"opacity-100 pointer-events-auto"),children:e||l.jsx(Ki,{onSubmit:c})}),l.jsx("div",{className:H("absolute top-0 left-0 md:left-1/2 h-full w-full md:w-1/2 flex flex-col items-center justify-center p-8 bg-white dark:bg-zinc-950 transition-all duration-700 ease-in-out z-10",r?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),children:t||l.jsx(Gi,{onSubmit:d})}),l.jsx("div",{className:H("hidden md:block absolute top-0 left-1/2 w-1/2 h-full overflow-hidden transition-transform duration-700 ease-in-out z-50 rounded-l-2xl shadow-xl",r?"-translate-x-full rounded-r-2xl rounded-l-none":"translate-x-0"),children:l.jsx("div",{className:H("relative -left-full h-full w-[200%] bg-gradient-to-br from-indigo-600 to-blue-700 text-white transition-transform duration-700 ease-in-out",r?"translate-x-1/2":"translate-x-0"),children:l.jsxs("div",{className:"flex h-full w-full",children:[l.jsxs("div",{className:"flex flex-col items-center justify-center w-1/2 px-12 text-center h-full",children:[l.jsx("h2",{className:"text-3xl font-bold mb-4 tracking-tight",children:"Welcome Back!"}),l.jsx("p",{className:"mb-8 text-sm opacity-90 leading-relaxed text-indigo-100",children:"To keep connected with us please login with your personal info"}),l.jsx(J,{variant:"outline",className:"rounded-full border-white/40 bg-white/10 text-white hover:bg-white hover:text-indigo-600 px-10 py-6 font-semibold tracking-wide transition-all backdrop-blur-sm shadow-md",onClick:a,children:"Sign In"})]}),l.jsxs("div",{className:"flex flex-col items-center justify-center w-1/2 px-12 text-center h-full",children:[l.jsx("h2",{className:"text-3xl font-bold mb-4 tracking-tight",children:"Hello, Friend!"}),l.jsx("p",{className:"mb-8 text-sm opacity-90 leading-relaxed text-indigo-100",children:"Enter your personal details and start your journey with us"}),l.jsx(J,{variant:"outline",className:"rounded-full border-white/40 bg-white/10 text-white hover:bg-white hover:text-indigo-600 px-10 py-6 font-semibold tracking-wide transition-all backdrop-blur-sm shadow-md",onClick:a,children:"Sign Up"})]})]})})}),l.jsx("div",{className:"md:hidden absolute bottom-6 w-full text-center z-50",children:l.jsx("button",{onClick:a,type:"button",className:"text-sm font-semibold text-indigo-600 dark:text-indigo-400 hover:underline transition-colors animate-pulse",children:r?"Already have an account? Sign In":"Don't have an account? Sign Up"})})]})})},$n={Orange:{light:{background:"98% 0.01 70deg",foreground:"20% 0.02 70deg",card:"100% 0 0deg","card-foreground":"20% 0.02 70deg",popover:"100% 0 0deg","popover-foreground":"20% 0.02 70deg",primary:"65% 0.18 70deg","primary-foreground":"100% 0 0deg",secondary:"93% 0.03 70deg","secondary-foreground":"20% 0.02 70deg",muted:"93% 0.03 70deg","muted-foreground":"40% 0.15 70deg",accent:"93% 0.03 70deg","accent-foreground":"20% 0.02 70deg",destructive:"69% 0.23 26deg","destructive-foreground":"100% 0 0deg",border:"92% 0.05 70deg",input:"92% 0.05 70deg",ring:"65% 0.18 70deg",radius:"0.5rem"},dark:{background:"15% 0.02 70deg",foreground:"95% 0.01 70deg",card:"20% 0.02 70deg","card-foreground":"95% 0.01 70deg",popover:"20% 0.02 70deg","popover-foreground":"95% 0.01 70deg",primary:"75% 0.18 70deg","primary-foreground":"15% 0.02 70deg",secondary:"27% 0.06 70deg","secondary-foreground":"95% 0.01 70deg",muted:"27% 0.06 70deg","muted-foreground":"75% 0.15 70deg",accent:"27% 0.06 70deg","accent-foreground":"95% 0.01 70deg",destructive:"55% 0.22 26deg","destructive-foreground":"95% 0.01 70deg",border:"27% 0.06 70deg",input:"27% 0.06 70deg",ring:"75% 0.18 70deg"}},Blue:{light:{background:"98% 0.01 240deg",foreground:"20% 0.02 240deg",card:"100% 0 0deg","card-foreground":"20% 0.02 240deg",popover:"100% 0 0deg","popover-foreground":"20% 0.02 240deg",primary:"55% 0.18 260deg","primary-foreground":"100% 0 0deg",secondary:"93% 0.03 270deg","secondary-foreground":"20% 0.02 240deg",muted:"93% 0.03 270deg","muted-foreground":"40% 0.15 260deg",accent:"93% 0.03 270deg","accent-foreground":"20% 0.02 240deg",destructive:"69% 0.23 26deg","destructive-foreground":"100% 0 0deg",border:"92% 0.05 259deg",input:"92% 0.05 259deg",ring:"55% 0.18 260deg",radius:"0.5rem"},dark:{background:"15% 0.02 260deg",foreground:"90% 0.01 240deg",card:"20% 0.02 260deg","card-foreground":"90% 0.01 240deg",popover:"20% 0.02 260deg","popover-foreground":"90% 0.01 240deg",primary:"65% 0.18 260deg","primary-foreground":"15% 0.02 260deg",secondary:"27% 0.06 261deg","secondary-foreground":"90% 0.01 240deg",muted:"27% 0.06 261deg","muted-foreground":"75% 0.15 260deg",accent:"27% 0.06 261deg","accent-foreground":"90% 0.01 240deg",destructive:"55% 0.22 26deg","destructive-foreground":"90% 0.01 240deg",border:"27% 0.06 261deg",input:"27% 0.06 261deg",ring:"65% 0.18 260deg"}},Green:{light:{background:"98% 0.01 150deg",foreground:"20% 0.02 150deg",card:"100% 0 0deg","card-foreground":"20% 0.02 150deg",popover:"100% 0 0deg","popover-foreground":"20% 0.02 150deg",primary:"60% 0.18 150deg","primary-foreground":"100% 0 0deg",secondary:"93% 0.03 150deg","secondary-foreground":"20% 0.02 150deg",muted:"93% 0.03 150deg","muted-foreground":"40% 0.15 150deg",accent:"93% 0.03 150deg","accent-foreground":"20% 0.02 150deg",destructive:"69% 0.23 26deg","destructive-foreground":"100% 0 0deg",border:"92% 0.05 150deg",input:"92% 0.05 150deg",ring:"60% 0.18 150deg",radius:"0.5rem"},dark:{background:"15% 0.02 150deg",foreground:"95% 0.01 150deg",card:"20% 0.02 150deg","card-foreground":"95% 0.01 150deg",popover:"20% 0.02 150deg","popover-foreground":"95% 0.01 150deg",primary:"70% 0.18 150deg","primary-foreground":"15% 0.02 150deg",secondary:"27% 0.06 150deg","secondary-foreground":"95% 0.01 150deg",muted:"27% 0.06 150deg","muted-foreground":"75% 0.15 150deg",accent:"27% 0.06 150deg","accent-foreground":"95% 0.01 150deg",destructive:"55% 0.22 26deg","destructive-foreground":"95% 0.01 150deg",border:"27% 0.06 150deg",input:"27% 0.06 150deg",ring:"70% 0.18 150deg"}},Rose:{light:{background:"98% 0.01 350deg",foreground:"20% 0.02 350deg",card:"100% 0 0deg","card-foreground":"20% 0.02 350deg",popover:"100% 0 0deg","popover-foreground":"20% 0.02 350deg",primary:"60% 0.18 350deg","primary-foreground":"100% 0 0deg",secondary:"93% 0.03 350deg","secondary-foreground":"20% 0.02 350deg",muted:"93% 0.03 350deg","muted-foreground":"40% 0.15 350deg",accent:"93% 0.03 350deg","accent-foreground":"20% 0.02 350deg",destructive:"69% 0.23 26deg","destructive-foreground":"100% 0 0deg",border:"92% 0.05 350deg",input:"92% 0.05 350deg",ring:"60% 0.18 350deg",radius:"0.5rem"},dark:{background:"15% 0.02 350deg",foreground:"95% 0.01 350deg",card:"20% 0.02 350deg","card-foreground":"95% 0.01 350deg",popover:"20% 0.02 350deg","popover-foreground":"95% 0.01 350deg",primary:"70% 0.18 350deg","primary-foreground":"15% 0.02 350deg",secondary:"27% 0.06 350deg","secondary-foreground":"95% 0.01 350deg",muted:"27% 0.06 350deg","muted-foreground":"75% 0.15 350deg",accent:"27% 0.06 350deg","accent-foreground":"95% 0.01 350deg",destructive:"55% 0.22 26deg","destructive-foreground":"95% 0.01 350deg",border:"27% 0.06 350deg",input:"27% 0.06 350deg",ring:"70% 0.18 350deg"}},Zinc:{light:{background:"98% 0 0deg",foreground:"20% 0 0deg",card:"100% 0 0deg","card-foreground":"20% 0 0deg",popover:"100% 0 0deg","popover-foreground":"20% 0 0deg",primary:"25% 0 0deg","primary-foreground":"100% 0 0deg",secondary:"93% 0 0deg","secondary-foreground":"20% 0 0deg",muted:"93% 0 0deg","muted-foreground":"45% 0 0deg",accent:"93% 0 0deg","accent-foreground":"20% 0 0deg",destructive:"69% 0.23 26deg","destructive-foreground":"100% 0 0deg",border:"92% 0 0deg",input:"92% 0 0deg",ring:"25% 0 0deg",radius:"0.5rem"},dark:{background:"12% 0 0deg",foreground:"95% 0 0deg",card:"18% 0 0deg","card-foreground":"95% 0 0deg",popover:"18% 0 0deg","popover-foreground":"95% 0 0deg",primary:"90% 0 0deg","primary-foreground":"12% 0 0deg",secondary:"25% 0 0deg","secondary-foreground":"95% 0 0deg",muted:"25% 0 0deg","muted-foreground":"65% 0 0deg",accent:"25% 0 0deg","accent-foreground":"95% 0 0deg",destructive:"55% 0.22 26deg","destructive-foreground":"95% 0 0deg",border:"25% 0 0deg",input:"25% 0 0deg",ring:"90% 0 0deg"}}};class xr{name="ThemeService";listeners=new Set;state={mode:"light",themeColor:"Zinc",radius:.5};static setGlobalColorTheme(t,n){const r=$n[n][t],i=document.documentElement;if(t==="dark"?i.classList.add("dark"):i.classList.remove("dark"),n!=="Zinc"){const o=$n.Zinc[t];for(const a in o)i.style.setProperty(`--${a}`,o[a])}for(const o in r)i.style.setProperty(`--${o}`,r[o])}constructor(){if(typeof window<"u"){const t=localStorage.getItem("ezux-theme-mode");t&&(t==="light"||t==="dark")?this.state.mode=t:this.state.mode=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";const n=localStorage.getItem("ezux-theme-color");n&&$n[n]&&(this.state.themeColor=n);const r=localStorage.getItem("ezux-theme-radius");r&&(this.state.radius=parseFloat(r)),this.applyTheme()}}toggleMode(){const t=this.state.mode==="light"?"dark":"light";this.setMode(t)}setMode(t){this.state.mode=t,typeof window<"u"&&localStorage.setItem("ezux-theme-mode",t),this.applyTheme(),this.notify()}setThemeColor(t){this.state.themeColor=t,typeof window<"u"&&localStorage.setItem("ezux-theme-color",t),this.applyTheme(),this.notify()}setRadius(t){this.state.radius=t,typeof window<"u"&&localStorage.setItem("ezux-theme-radius",t.toString()),this.applyTheme(),this.notify()}getState(){return this.state}applyTheme(){if(typeof document>"u")return;const t=document.documentElement;this.state.mode==="dark"?t.classList.add("dark"):t.classList.remove("dark"),t.style.setProperty("--radius",`${this.state.radius}rem`);const n=$n[this.state.themeColor];if(n){const r=n[this.state.mode];if(this.state.themeColor!=="Zinc"){const i=$n.Zinc[this.state.mode];for(const o in i)t.style.setProperty(`--${o}`,i[o])}for(const i in r)t.style.setProperty(`--${i}`,r[i])}t.setAttribute("data-theme",this.state.themeColor)}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.state))}}const Yi=({className:e})=>{oe.get("ThemeService")||oe.register("ThemeService",new xr);const t=oe.getOrThrow("ThemeService"),[n,r]=s.useState(t.getState().mode);s.useEffect(()=>t.subscribe(o=>{r(o.mode)}),[t]);const i=()=>{t.toggleMode()};return l.jsxs(J,{variant:"ghost",size:"icon",className:H("h-9 w-9",e),onClick:i,title:`Switch to ${n==="dark"?"light":"dark"} mode`,children:[n==="light"?l.jsx(O.Moon,{className:"h-[1.2rem] w-[1.2rem] transition-all"}):l.jsx(O.Sun,{className:"h-[1.2rem] w-[1.2rem] transition-all"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})};function ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function h4(e,t){const n=w.createContext(t),r=o=>{const{children:a,...c}=o,d=w.useMemo(()=>c,Object.values(c));return l.jsx(n.Provider,{value:d,children:a})};r.displayName=e+"Provider";function i(o){const a=w.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function et(e,t=[]){let n=[];function r(o,a){const c=w.createContext(a),d=n.length;n=[...n,a];const u=m=>{const{scope:v,children:f,...p}=m,x=v?.[e]?.[d]||c,g=w.useMemo(()=>p,Object.values(p));return l.jsx(x.Provider,{value:g,children:f})};u.displayName=o+"Provider";function h(m,v){const f=v?.[e]?.[d]||c,p=w.useContext(f);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[u,h]}const i=()=>{const o=n.map(a=>w.createContext(a));return function(c){const d=c?.[e]||o;return w.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,m4(i,...t)]}function m4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((c,{useScope:d,scopeName:u})=>{const m=d(o)[`__scope${u}`];return{...c,...m}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var kt=globalThis?.document?w.useLayoutEffect:()=>{},f4=w[" useInsertionEffect ".trim().toString()]||kt;function Ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=p4({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const h=w.useRef(e!==void 0);w.useEffect(()=>{const m=h.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=c},[c,r])}const u=w.useCallback(h=>{if(c){const m=g4(h)?h(e):h;m!==e&&a.current?.(m)}else o(h)},[c,e,o,a]);return[d,u]}function p4({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),o=w.useRef(t);return f4(()=>{o.current=t},[t]),w.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function g4(e){return typeof e=="function"}function v4(e){const t=x4(e),n=w.forwardRef((r,i)=>{const{children:o,...a}=r,c=w.Children.toArray(o),d=c.find(b4);if(d){const u=d.props.children,h=c.map(m=>m===d?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return l.jsx(t,{...a,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,h):null})}return l.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function x4(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const a=y4(i),c=E4(o,i.props);return i.type!==w.Fragment&&(c.ref=r?Ye(r,a):a),w.cloneElement(i,c)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var w4=Symbol("radix.slottable");function b4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===w4}function E4(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function y4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var C4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=C4.reduce((e,t)=>{const n=v4(`Primitive.${t}`),r=w.forwardRef((i,o)=>{const{asChild:a,...c}=i,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(d,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xi(e,t){e&&Ti.flushSync(()=>e.dispatchEvent(t))}function Zi(e){const t=S4(e),n=w.forwardRef((r,i)=>{const{children:o,...a}=r,c=w.Children.toArray(o),d=c.find(M4);if(d){const u=d.props.children,h=c.map(m=>m===d?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return l.jsx(t,{...a,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,h):null})}return l.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function S4(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const a=j4(i),c=N4(o,i.props);return i.type!==w.Fragment&&(c.ref=r?Ye(r,a):a),w.cloneElement(i,c)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var z4=Symbol("radix.slottable");function M4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z4}function N4(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function j4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ji(e){const t=e+"CollectionProvider",[n,r]=et(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:g,children:b}=x,y=s.useRef(null),S=s.useRef(new Map).current;return l.jsx(i,{scope:g,itemMap:S,collectionRef:y,children:b})};a.displayName=t;const c=e+"CollectionSlot",d=Zi(c),u=s.forwardRef((x,g)=>{const{scope:b,children:y}=x,S=o(c,b),z=Ne(g,S.collectionRef);return l.jsx(d,{ref:z,children:y})});u.displayName=c;const h=e+"CollectionItemSlot",m="data-radix-collection-item",v=Zi(h),f=s.forwardRef((x,g)=>{const{scope:b,children:y,...S}=x,z=s.useRef(null),N=Ne(g,z),E=o(h,b);return s.useEffect(()=>(E.itemMap.set(z,{ref:z,...S}),()=>{E.itemMap.delete(z)})),l.jsx(v,{[m]:"",ref:N,children:y})});f.displayName=h;function p(x){const g=o(e+"CollectionConsumer",x);return s.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const S=Array.from(y.querySelectorAll(`[${m}]`));return Array.from(g.itemMap.values()).sort((E,C)=>S.indexOf(E.ref.current)-S.indexOf(C.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},p,r]}var k4=w.createContext(void 0);function wr(e){const t=w.useContext(k4);return e||t||"ltr"}function Oe(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current?.(...n),[])}function F4(e,t=globalThis?.document){const n=Oe(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var D4="DismissableLayer",Ns="dismissableLayer.update",A4="dismissableLayer.pointerDownOutside",H4="dismissableLayer.focusOutside",Ri,eo=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),br=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...d}=e,u=w.useContext(eo),[h,m]=w.useState(null),v=h?.ownerDocument??globalThis?.document,[,f]=w.useState({}),p=Ne(t,C=>m(C)),x=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(g),y=h?x.indexOf(h):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,z=y>=b,N=I4(C=>{const M=C.target,D=[...u.branches].some(A=>A.contains(M));!z||D||(i?.(C),a?.(C),C.defaultPrevented||c?.())},v),E=O4(C=>{const M=C.target;[...u.branches].some(A=>A.contains(M))||(o?.(C),a?.(C),C.defaultPrevented||c?.())},v);return F4(C=>{y===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&c&&(C.preventDefault(),c()))},v),w.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ri=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),to(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ri)}},[h,v,n,u]),w.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),to())},[h,u]),w.useEffect(()=>{const C=()=>f({});return document.addEventListener(Ns,C),()=>document.removeEventListener(Ns,C)},[]),l.jsx(Ee.div,{...d,ref:p,style:{pointerEvents:S?z?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,N.onPointerDownCapture)})});br.displayName=D4;var T4="DismissableLayerBranch",P4=w.forwardRef((e,t)=>{const n=w.useContext(eo),r=w.useRef(null),i=Ne(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),l.jsx(Ee.div,{...e,ref:i})});P4.displayName=T4;function I4(e,t=globalThis?.document){const n=Oe(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let d=function(){no(A4,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function O4(e,t=globalThis?.document){const n=Oe(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&no(H4,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function to(){const e=new CustomEvent(Ns);document.dispatchEvent(e)}function no(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Xi(i,o):i.dispatchEvent(o)}var js=0;function ro(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??so()),document.body.insertAdjacentElement("beforeend",e[1]??so()),js++,()=>{js===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),js--}},[])}function so(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ks="focusScope.autoFocusOnMount",Fs="focusScope.autoFocusOnUnmount",lo={bubbles:!1,cancelable:!0},L4="FocusScope",Ds=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[c,d]=w.useState(null),u=Oe(i),h=Oe(o),m=w.useRef(null),v=Ne(t,x=>d(x)),f=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let x=function(S){if(f.paused||!c)return;const z=S.target;c.contains(z)?m.current=z:Lt(m.current,{select:!0})},g=function(S){if(f.paused||!c)return;const z=S.relatedTarget;z!==null&&(c.contains(z)||Lt(m.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const N of S)N.removedNodes.length>0&&Lt(c)};document.addEventListener("focusin",x),document.addEventListener("focusout",g);const y=new MutationObserver(b);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",g),y.disconnect()}}},[r,c,f.paused]),w.useEffect(()=>{if(c){ao.add(f);const x=document.activeElement;if(!c.contains(x)){const b=new CustomEvent(ks,lo);c.addEventListener(ks,u),c.dispatchEvent(b),b.defaultPrevented||(_4(U4(io(c)),{select:!0}),document.activeElement===x&&Lt(c))}return()=>{c.removeEventListener(ks,u),setTimeout(()=>{const b=new CustomEvent(Fs,lo);c.addEventListener(Fs,h),c.dispatchEvent(b),b.defaultPrevented||Lt(x??document.body,{select:!0}),c.removeEventListener(Fs,h),ao.remove(f)},0)}}},[c,u,h,f]);const p=w.useCallback(x=>{if(!n&&!r||f.paused)return;const g=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,b=document.activeElement;if(g&&b){const y=x.currentTarget,[S,z]=V4(y);S&&z?!x.shiftKey&&b===z?(x.preventDefault(),n&&Lt(S,{select:!0})):x.shiftKey&&b===S&&(x.preventDefault(),n&&Lt(z,{select:!0})):b===y&&x.preventDefault()}},[n,r,f.paused]);return l.jsx(Ee.div,{tabIndex:-1,...a,ref:v,onKeyDown:p})});Ds.displayName=L4;function _4(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function V4(e){const t=io(e),n=oo(t,e),r=oo(t.reverse(),e);return[n,r]}function io(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oo(e,t){for(const n of e)if(!B4(n,{upTo:t}))return n}function B4(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $4(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$4(e)&&t&&e.select()}}var ao=W4();function W4(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=co(e,t),e.unshift(t)},remove(t){e=co(e,t),e[0]?.resume()}}}function co(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function U4(e){return e.filter(t=>t.tagName!=="A")}var G4=w[" useId ".trim().toString()]||(()=>{}),K4=0;function $e(e){const[t,n]=w.useState(G4());return kt(()=>{n(r=>r??String(K4++))},[e]),e||(t?`radix-${t}`:"")}const q4=["top","right","bottom","left"],_t=Math.min,Xe=Math.max,Er=Math.round,yr=Math.floor,wt=e=>({x:e,y:e}),Q4={left:"right",right:"left",bottom:"top",top:"bottom"},Y4={start:"end",end:"start"};function As(e,t,n){return Xe(e,_t(t,n))}function Ft(e,t){return typeof e=="function"?e(t):e}function Dt(e){return e.split("-")[0]}function fn(e){return e.split("-")[1]}function Hs(e){return e==="x"?"y":"x"}function Ts(e){return e==="y"?"height":"width"}const X4=new Set(["top","bottom"]);function bt(e){return X4.has(Dt(e))?"y":"x"}function Ps(e){return Hs(bt(e))}function Z4(e,t,n){n===void 0&&(n=!1);const r=fn(e),i=Ps(e),o=Ts(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Cr(a)),[a,Cr(a)]}function J4(e){const t=Cr(e);return[Is(e),t,Is(t)]}function Is(e){return e.replace(/start|end/g,t=>Y4[t])}const uo=["left","right"],ho=["right","left"],R4=["top","bottom"],e5=["bottom","top"];function t5(e,t,n){switch(e){case"top":case"bottom":return n?t?ho:uo:t?uo:ho;case"left":case"right":return t?R4:e5;default:return[]}}function n5(e,t,n,r){const i=fn(e);let o=t5(Dt(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Is)))),o}function Cr(e){return e.replace(/left|right|bottom|top/g,t=>Q4[t])}function r5(e){return{top:0,right:0,bottom:0,left:0,...e}}function mo(e){return typeof e!="number"?r5(e):{top:e,right:e,bottom:e,left:e}}function Sr(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function fo(e,t,n){let{reference:r,floating:i}=e;const o=bt(t),a=Ps(t),c=Ts(a),d=Dt(t),u=o==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,v=r[c]/2-i[c]/2;let f;switch(d){case"top":f={x:h,y:r.y-i.height};break;case"bottom":f={x:h,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:m};break;case"left":f={x:r.x-i.width,y:m};break;default:f={x:r.x,y:r.y}}switch(fn(t)){case"start":f[a]-=v*(n&&u?-1:1);break;case"end":f[a]+=v*(n&&u?-1:1);break}return f}async function s5(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:c,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:v=!1,padding:f=0}=Ft(t,e),p=mo(f),g=c[v?m==="floating"?"reference":"floating":m],b=Sr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:h,strategy:d})),y=m==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),z=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},N=Sr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:S,strategy:d}):y);return{top:(b.top-N.top+p.top)/z.y,bottom:(N.bottom-b.bottom+p.bottom)/z.y,left:(b.left-N.left+p.left)/z.x,right:(N.right-b.right+p.right)/z.x}}const l5=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,c=o.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:m}=fo(u,r,d),v=r,f={},p=0;for(let g=0;g<c.length;g++){var x;const{name:b,fn:y}=c[g],{x:S,y:z,data:N,reset:E}=await y({x:h,y:m,initialPlacement:r,placement:v,strategy:i,middlewareData:f,rects:u,platform:{...a,detectOverflow:(x=a.detectOverflow)!=null?x:s5},elements:{reference:e,floating:t}});h=S??h,m=z??m,f={...f,[b]:{...f[b],...N}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:h,y:m}=fo(u,v,d)),g=-1)}return{x:h,y:m,placement:v,strategy:i,middlewareData:f}},i5=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:c,middlewareData:d}=t,{element:u,padding:h=0}=Ft(e,t)||{};if(u==null)return{};const m=mo(h),v={x:n,y:r},f=Ps(i),p=Ts(f),x=await a.getDimensions(u),g=f==="y",b=g?"top":"left",y=g?"bottom":"right",S=g?"clientHeight":"clientWidth",z=o.reference[p]+o.reference[f]-v[f]-o.floating[p],N=v[f]-o.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let C=E?E[S]:0;(!C||!await(a.isElement==null?void 0:a.isElement(E)))&&(C=c.floating[S]||o.floating[p]);const M=z/2-N/2,D=C/2-x[p]/2-1,A=_t(m[b],D),_=_t(m[y],D),U=A,G=C-x[p]-_,Y=C/2-x[p]/2+M,te=As(U,Y,G),Z=!d.arrow&&fn(i)!=null&&Y!==te&&o.reference[p]/2-(Y<U?A:_)-x[p]/2<0,P=Z?Y<U?Y-U:Y-G:0;return{[f]:v[f]+P,data:{[f]:te,centerOffset:Y-te-P,...Z&&{alignmentOffset:P}},reset:Z}}}),o5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:c,platform:d,elements:u}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...g}=Ft(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=Dt(i),y=bt(c),S=Dt(c)===c,z=await(d.isRTL==null?void 0:d.isRTL(u.floating)),N=v||(S||!x?[Cr(c)]:J4(c)),E=p!=="none";!v&&E&&N.push(...n5(c,x,p,z));const C=[c,...N],M=await d.detectOverflow(t,g),D=[];let A=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&D.push(M[b]),m){const Y=Z4(i,a,z);D.push(M[Y[0]],M[Y[1]])}if(A=[...A,{placement:i,overflows:D}],!D.every(Y=>Y<=0)){var _,U;const Y=(((_=o.flip)==null?void 0:_.index)||0)+1,te=C[Y];if(te&&(!(m==="alignment"?y!==bt(te):!1)||A.every(W=>bt(W.placement)===y?W.overflows[0]>0:!0)))return{data:{index:Y,overflows:A},reset:{placement:te}};let Z=(U=A.filter(P=>P.overflows[0]<=0).sort((P,W)=>P.overflows[1]-W.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(f){case"bestFit":{var G;const P=(G=A.filter(W=>{if(E){const I=bt(W.placement);return I===y||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,X)=>I+X,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:G[0];P&&(Z=P);break}case"initialPlacement":Z=c;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function po(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function go(e){return q4.some(t=>e[t]>=0)}const a5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=Ft(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=po(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:go(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),c=po(a,n.floating);return{data:{escapedOffsets:c,escaped:go(c)}}}default:return{}}}}},vo=new Set(["left","top"]);async function c5(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Dt(n),c=fn(n),d=bt(n)==="y",u=vo.has(a)?-1:1,h=o&&d?-1:1,m=Ft(t,e);let{mainAxis:v,crossAxis:f,alignmentAxis:p}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof p=="number"&&(f=c==="end"?p*-1:p),d?{x:f*h,y:v*u}:{x:v*u,y:f*h}}const d5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:c}=t,d=await c5(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:o+d.y,data:{...d,placement:a}}}}},u5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:d={fn:b=>{let{x:y,y:S}=b;return{x:y,y:S}}},...u}=Ft(e,t),h={x:n,y:r},m=await o.detectOverflow(t,u),v=bt(Dt(i)),f=Hs(v);let p=h[f],x=h[v];if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",S=p+m[b],z=p-m[y];p=As(S,p,z)}if(c){const b=v==="y"?"top":"left",y=v==="y"?"bottom":"right",S=x+m[b],z=x-m[y];x=As(S,x,z)}const g=d.fn({...t,[f]:p,[v]:x});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:a,[v]:c}}}}}},h5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=Ft(e,t),h={x:n,y:r},m=bt(i),v=Hs(m);let f=h[v],p=h[m];const x=Ft(c,t),g=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const S=v==="y"?"height":"width",z=o.reference[v]-o.floating[S]+g.mainAxis,N=o.reference[v]+o.reference[S]-g.mainAxis;f<z?f=z:f>N&&(f=N)}if(u){var b,y;const S=v==="y"?"width":"height",z=vo.has(Dt(i)),N=o.reference[m]-o.floating[S]+(z&&((b=a.offset)==null?void 0:b[m])||0)+(z?0:g.crossAxis),E=o.reference[m]+o.reference[S]+(z?0:((y=a.offset)==null?void 0:y[m])||0)-(z?g.crossAxis:0);p<N?p=N:p>E&&(p=E)}return{[v]:f,[m]:p}}}},m5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:c}=t,{apply:d=()=>{},...u}=Ft(e,t),h=await a.detectOverflow(t,u),m=Dt(i),v=fn(i),f=bt(i)==="y",{width:p,height:x}=o.floating;let g,b;m==="top"||m==="bottom"?(g=m,b=v===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(b=m,g=v==="end"?"top":"bottom");const y=x-h.top-h.bottom,S=p-h.left-h.right,z=_t(x-h[g],y),N=_t(p-h[b],S),E=!t.middlewareData.shift;let C=z,M=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),E&&!v){const A=Xe(h.left,0),_=Xe(h.right,0),U=Xe(h.top,0),G=Xe(h.bottom,0);f?M=p-2*(A!==0||_!==0?A+_:Xe(h.left,h.right)):C=x-2*(U!==0||G!==0?U+G:Xe(h.top,h.bottom))}await d({...t,availableWidth:M,availableHeight:C});const D=await a.getDimensions(c.floating);return p!==D.width||x!==D.height?{reset:{rects:!0}}:{}}}};function zr(){return typeof window<"u"}function pn(e){return xo(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Et(e){var t;return(t=(xo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xo(e){return zr()?e instanceof Node||e instanceof Ze(e).Node:!1}function ut(e){return zr()?e instanceof Element||e instanceof Ze(e).Element:!1}function yt(e){return zr()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function wo(e){return!zr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}const f5=new Set(["inline","contents"]);function Wn(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!f5.has(i)}const p5=new Set(["table","td","th"]);function g5(e){return p5.has(pn(e))}const v5=[":popover-open",":modal"];function Mr(e){return v5.some(t=>{try{return e.matches(t)}catch{return!1}})}const x5=["transform","translate","scale","rotate","perspective"],w5=["transform","translate","scale","rotate","perspective","filter"],b5=["paint","layout","strict","content"];function Os(e){const t=Ls(),n=ut(e)?ht(e):e;return x5.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||w5.some(r=>(n.willChange||"").includes(r))||b5.some(r=>(n.contain||"").includes(r))}function E5(e){let t=Vt(e);for(;yt(t)&&!gn(t);){if(Os(t))return t;if(Mr(t))return null;t=Vt(t)}return null}function Ls(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const y5=new Set(["html","body","#document"]);function gn(e){return y5.has(pn(e))}function ht(e){return Ze(e).getComputedStyle(e)}function Nr(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vt(e){if(pn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wo(e)&&e.host||Et(e);return wo(t)?t.host:t}function bo(e){const t=Vt(e);return gn(t)?e.ownerDocument?e.ownerDocument.body:e.body:yt(t)&&Wn(t)?t:bo(t)}function Un(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=bo(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ze(i);if(o){const c=_s(a);return t.concat(a,a.visualViewport||[],Wn(i)?i:[],c&&n?Un(c):[])}return t.concat(i,Un(i,[],n))}function _s(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Eo(e){const t=ht(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=yt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,c=Er(n)!==o||Er(r)!==a;return c&&(n=o,r=a),{width:n,height:r,$:c}}function Vs(e){return ut(e)?e:e.contextElement}function vn(e){const t=Vs(e);if(!yt(t))return wt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Eo(t);let a=(o?Er(n.width):n.width)/r,c=(o?Er(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const C5=wt(0);function yo(e){const t=Ze(e);return!Ls()||!t.visualViewport?C5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function S5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function Jt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Vs(e);let a=wt(1);t&&(r?ut(r)&&(a=vn(r)):a=vn(e));const c=S5(o,n,r)?yo(o):wt(0);let d=(i.left+c.x)/a.x,u=(i.top+c.y)/a.y,h=i.width/a.x,m=i.height/a.y;if(o){const v=Ze(o),f=r&&ut(r)?Ze(r):r;let p=v,x=_s(p);for(;x&&r&&f!==p;){const g=vn(x),b=x.getBoundingClientRect(),y=ht(x),S=b.left+(x.clientLeft+parseFloat(y.paddingLeft))*g.x,z=b.top+(x.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,u*=g.y,h*=g.x,m*=g.y,d+=S,u+=z,p=Ze(x),x=_s(p)}}return Sr({width:h,height:m,x:d,y:u})}function jr(e,t){const n=Nr(e).scrollLeft;return t?t.left+n:Jt(Et(e)).left+n}function Co(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jr(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function z5(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Et(r),c=t?Mr(t.floating):!1;if(r===a||c&&o)return n;let d={scrollLeft:0,scrollTop:0},u=wt(1);const h=wt(0),m=yt(r);if((m||!m&&!o)&&((pn(r)!=="body"||Wn(a))&&(d=Nr(r)),yt(r))){const f=Jt(r);u=vn(r),h.x=f.x+r.clientLeft,h.y=f.y+r.clientTop}const v=a&&!m&&!o?Co(a,d):wt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-d.scrollLeft*u.x+h.x+v.x,y:n.y*u.y-d.scrollTop*u.y+h.y+v.y}}function M5(e){return Array.from(e.getClientRects())}function N5(e){const t=Et(e),n=Nr(e),r=e.ownerDocument.body,i=Xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+jr(e);const c=-n.scrollTop;return ht(r).direction==="rtl"&&(a+=Xe(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:c}}const So=25;function j5(e,t){const n=Ze(e),r=Et(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,c=0,d=0;if(i){o=i.width,a=i.height;const h=Ls();(!h||h&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const u=jr(r);if(u<=0){const h=r.ownerDocument,m=h.body,v=getComputedStyle(m),f=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,p=Math.abs(r.clientWidth-m.clientWidth-f);p<=So&&(o-=p)}else u<=So&&(o+=u);return{width:o,height:a,x:c,y:d}}const k5=new Set(["absolute","fixed"]);function F5(e,t){const n=Jt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=yt(e)?vn(e):wt(1),a=e.clientWidth*o.x,c=e.clientHeight*o.y,d=i*o.x,u=r*o.y;return{width:a,height:c,x:d,y:u}}function zo(e,t,n){let r;if(t==="viewport")r=j5(e,n);else if(t==="document")r=N5(Et(e));else if(ut(t))r=F5(t,n);else{const i=yo(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Sr(r)}function Mo(e,t){const n=Vt(e);return n===t||!ut(n)||gn(n)?!1:ht(n).position==="fixed"||Mo(n,t)}function D5(e,t){const n=t.get(e);if(n)return n;let r=Un(e,[],!1).filter(c=>ut(c)&&pn(c)!=="body"),i=null;const o=ht(e).position==="fixed";let a=o?Vt(e):e;for(;ut(a)&&!gn(a);){const c=ht(a),d=Os(a);!d&&c.position==="fixed"&&(i=null),(o?!d&&!i:!d&&c.position==="static"&&!!i&&k5.has(i.position)||Wn(a)&&!d&&Mo(e,a))?r=r.filter(h=>h!==a):i=c,a=Vt(a)}return t.set(e,r),r}function A5(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Mr(t)?[]:D5(t,this._c):[].concat(n),r],c=a[0],d=a.reduce((u,h)=>{const m=zo(t,h,i);return u.top=Xe(m.top,u.top),u.right=_t(m.right,u.right),u.bottom=_t(m.bottom,u.bottom),u.left=Xe(m.left,u.left),u},zo(t,c,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function H5(e){const{width:t,height:n}=Eo(e);return{width:t,height:n}}function T5(e,t,n){const r=yt(t),i=Et(t),o=n==="fixed",a=Jt(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=wt(0);function u(){d.x=jr(i)}if(r||!r&&!o)if((pn(t)!=="body"||Wn(i))&&(c=Nr(t)),r){const f=Jt(t,!0,o,t);d.x=f.x+t.clientLeft,d.y=f.y+t.clientTop}else i&&u();o&&!r&&i&&u();const h=i&&!r&&!o?Co(i,c):wt(0),m=a.left+c.scrollLeft-d.x-h.x,v=a.top+c.scrollTop-d.y-h.y;return{x:m,y:v,width:a.width,height:a.height}}function Bs(e){return ht(e).position==="static"}function No(e,t){if(!yt(e)||ht(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Et(e)===n&&(n=n.ownerDocument.body),n}function jo(e,t){const n=Ze(e);if(Mr(e))return n;if(!yt(e)){let i=Vt(e);for(;i&&!gn(i);){if(ut(i)&&!Bs(i))return i;i=Vt(i)}return n}let r=No(e,t);for(;r&&g5(r)&&Bs(r);)r=No(r,t);return r&&gn(r)&&Bs(r)&&!Os(r)?n:r||E5(e)||n}const P5=async function(e){const t=this.getOffsetParent||jo,n=this.getDimensions,r=await n(e.floating);return{reference:T5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function I5(e){return ht(e).direction==="rtl"}const O5={convertOffsetParentRelativeRectToViewportRelativeRect:z5,getDocumentElement:Et,getClippingRect:A5,getOffsetParent:jo,getElementRects:P5,getClientRects:M5,getDimensions:H5,getScale:vn,isElement:ut,isRTL:I5};function ko(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function L5(e,t){let n=null,r;const i=Et(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const u=e.getBoundingClientRect(),{left:h,top:m,width:v,height:f}=u;if(c||t(),!v||!f)return;const p=yr(m),x=yr(i.clientWidth-(h+v)),g=yr(i.clientHeight-(m+f)),b=yr(h),S={rootMargin:-p+"px "+-x+"px "+-g+"px "+-b+"px",threshold:Xe(0,_t(1,d))||1};let z=!0;function N(E){const C=E[0].intersectionRatio;if(C!==d){if(!z)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!ko(u,e.getBoundingClientRect())&&a(),z=!1}try{n=new IntersectionObserver(N,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,S)}n.observe(e)}return a(!0),o}function _5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=Vs(e),h=i||o?[...u?Un(u):[],...Un(t)]:[];h.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const m=u&&c?L5(u,n):null;let v=-1,f=null;a&&(f=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var S;(S=f)==null||S.observe(t)})),n()}),u&&!d&&f.observe(u),f.observe(t));let p,x=d?Jt(e):null;d&&g();function g(){const b=Jt(e);x&&!ko(x,b)&&n(),x=b,p=requestAnimationFrame(g)}return n(),()=>{var b;h.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),m?.(),(b=f)==null||b.disconnect(),f=null,d&&cancelAnimationFrame(p)}}const V5=d5,B5=u5,$5=o5,W5=m5,U5=a5,Fo=i5,G5=h5,K5=(e,t,n)=>{const r=new Map,i={platform:O5,...n},o={...i.platform,_c:r};return l5(e,t,{...i,platform:o})};var q5=typeof document<"u",Q5=function(){},kr=q5?s.useLayoutEffect:Q5;function Fr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Fr(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Do(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ao(e,t){const n=Do(e);return Math.round(t*n)/n}function $s(e){const t=w.useRef(e);return kr(()=>{t.current=e}),t}function Y5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[h,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,f]=w.useState(r);Fr(v,r)||f(r);const[p,x]=w.useState(null),[g,b]=w.useState(null),y=w.useCallback(W=>{W!==E.current&&(E.current=W,x(W))},[]),S=w.useCallback(W=>{W!==C.current&&(C.current=W,b(W))},[]),z=o||p,N=a||g,E=w.useRef(null),C=w.useRef(null),M=w.useRef(h),D=d!=null,A=$s(d),_=$s(i),U=$s(u),G=w.useCallback(()=>{if(!E.current||!C.current)return;const W={placement:t,strategy:n,middleware:v};_.current&&(W.platform=_.current),K5(E.current,C.current,W).then(I=>{const X={...I,isPositioned:U.current!==!1};Y.current&&!Fr(M.current,X)&&(M.current=X,Ti.flushSync(()=>{m(X)}))})},[v,t,n,_,U]);kr(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,m(W=>({...W,isPositioned:!1})))},[u]);const Y=w.useRef(!1);kr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),kr(()=>{if(z&&(E.current=z),N&&(C.current=N),z&&N){if(A.current)return A.current(z,N,G);G()}},[z,N,G,A,D]);const te=w.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:S}),[y,S]),Z=w.useMemo(()=>({reference:z,floating:N}),[z,N]),P=w.useMemo(()=>{const W={position:n,left:0,top:0};if(!Z.floating)return W;const I=Ao(Z.floating,h.x),X=Ao(Z.floating,h.y);return c?{...W,transform:"translate("+I+"px, "+X+"px)",...Do(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:X}},[n,c,Z.floating,h.x,h.y]);return w.useMemo(()=>({...h,update:G,refs:te,elements:Z,floatingStyles:P}),[h,G,te,Z,P])}const X5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Fo({element:r.current,padding:i}).fn(n):{}:r?Fo({element:r,padding:i}).fn(n):{}}}},Z5=(e,t)=>({...V5(e),options:[e,t]}),J5=(e,t)=>({...B5(e),options:[e,t]}),R5=(e,t)=>({...G5(e),options:[e,t]}),ep=(e,t)=>({...$5(e),options:[e,t]}),tp=(e,t)=>({...W5(e),options:[e,t]}),np=(e,t)=>({...U5(e),options:[e,t]}),rp=(e,t)=>({...X5(e),options:[e,t]});var sp="Arrow",Ho=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return l.jsx(Ee.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ho.displayName=sp;var lp=Ho;function Ws(e){const[t,n]=w.useState(void 0);return kt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,c;if("borderBoxSize"in o){const d=o.borderBoxSize,u=Array.isArray(d)?d[0]:d;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Us="Popper",[To,Dr]=et(Us),[ip,Po]=To(Us),Io=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return l.jsx(ip,{scope:t,anchor:r,onAnchorChange:i,children:n})};Io.displayName=Us;var Oo="PopperAnchor",Lo=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Po(Oo,n),a=w.useRef(null),c=Ne(t,a),d=w.useRef(null);return w.useEffect(()=>{const u=d.current;d.current=r?.current||a.current,u!==d.current&&o.onAnchorChange(d.current)}),r?null:l.jsx(Ee.div,{...i,ref:c})});Lo.displayName=Oo;var Gs="PopperContent",[op,ap]=To(Gs),_o=w.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:f="optimized",onPlaced:p,...x}=e,g=Po(Gs,n),[b,y]=w.useState(null),S=Ne(t,ne=>y(ne)),[z,N]=w.useState(null),E=Ws(z),C=E?.width??0,M=E?.height??0,D=r+(o!=="center"?"-"+o:""),A=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},_=Array.isArray(u)?u:[u],U=_.length>0,G={padding:A,boundary:_.filter(dp),altBoundary:U},{refs:Y,floatingStyles:te,placement:Z,isPositioned:P,middlewareData:W}=Y5({strategy:"fixed",placement:D,whileElementsMounted:(...ne)=>_5(...ne,{animationFrame:f==="always"}),elements:{reference:g.anchor},middleware:[Z5({mainAxis:i+M,alignmentAxis:a}),d&&J5({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?R5():void 0,...G}),d&&ep({...G}),tp({...G,apply:({elements:ne,rects:de,availableWidth:pe,availableHeight:we})=>{const{width:Me,height:ve}=de.reference,Q=ne.floating.style;Q.setProperty("--radix-popper-available-width",`${pe}px`),Q.setProperty("--radix-popper-available-height",`${we}px`),Q.setProperty("--radix-popper-anchor-width",`${Me}px`),Q.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),z&&rp({element:z,padding:c}),up({arrowWidth:C,arrowHeight:M}),v&&np({strategy:"referenceHidden",...G})]}),[I,X]=$o(Z),T=Oe(p);kt(()=>{P&&T?.()},[P,T]);const j=W.arrow?.x,V=W.arrow?.y,L=W.arrow?.centerOffset!==0,[$,se]=w.useState();return kt(()=>{b&&se(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:P?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(op,{scope:n,placedSide:I,onArrowChange:N,arrowX:j,arrowY:V,shouldHideArrow:L,children:l.jsx(Ee.div,{"data-side":I,"data-align":X,...x,ref:S,style:{...x.style,animation:P?void 0:"none"}})})})});_o.displayName=Gs;var Vo="PopperArrow",cp={top:"bottom",right:"left",bottom:"top",left:"right"},Bo=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=ap(Vo,r),a=cp[o.placedSide];return l.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:l.jsx(lp,{...i,ref:n,style:{...i.style,display:"block"}})})});Bo.displayName=Vo;function dp(e){return e!==null}var up=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[u,h]=$o(n),m={start:"0%",center:"50%",end:"100%"}[h],v=(i.arrow?.x??0)+c/2,f=(i.arrow?.y??0)+d/2;let p="",x="";return u==="bottom"?(p=a?m:`${v}px`,x=`${-d}px`):u==="top"?(p=a?m:`${v}px`,x=`${r.floating.height+d}px`):u==="right"?(p=`${-d}px`,x=a?m:`${f}px`):u==="left"&&(p=`${r.floating.width+d}px`,x=a?m:`${f}px`),{data:{x:p,y:x}}}});function $o(e){const[t,n="center"]=e.split("-");return[t,n]}var Ks=Io,Wo=Lo,Uo=_o,Go=Bo,hp="Portal",qs=w.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=w.useState(!1);kt(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?mr.createPortal(l.jsx(Ee.div,{...r,ref:t}),a):null});qs.displayName=hp;function mp(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Ke=e=>{const{present:t,children:n}=e,r=fp(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=Ne(r.ref,pp(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};Ke.displayName="Presence";function fp(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),o=w.useRef("none"),a=e?"mounted":"unmounted",[c,d]=mp(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Ar(r.current);o.current=c==="mounted"?u:"none"},[c]),kt(()=>{const u=r.current,h=i.current;if(h!==e){const v=o.current,f=Ar(u);e?d("MOUNT"):f==="none"||u?.display==="none"?d("UNMOUNT"):d(h&&v!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),kt(()=>{if(t){let u;const h=t.ownerDocument.defaultView??window,m=f=>{const x=Ar(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&x&&(d("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=f=>{f.target===t&&(o.current=Ar(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{h.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:w.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ar(e){return e?.animationName||"none"}function pp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qs="rovingFocusGroup.onEntryFocus",gp={bubbles:!1,cancelable:!0},Gn="RovingFocusGroup",[Ys,Ko,vp]=Ji(Gn),[xp,Hr]=et(Gn,[vp]),[wp,bp]=xp(Gn),qo=w.forwardRef((e,t)=>l.jsx(Ys.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ys.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ep,{...e,ref:t})})}));qo.displayName=Gn;var Ep=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...m}=e,v=w.useRef(null),f=Ne(t,v),p=wr(o),[x,g]=Ot({prop:a,defaultProp:c??null,onChange:d,caller:Gn}),[b,y]=w.useState(!1),S=Oe(u),z=Ko(n),N=w.useRef(!1),[E,C]=w.useState(0);return w.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(Qs,S),()=>M.removeEventListener(Qs,S)},[S]),l.jsx(wp,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:x,onItemFocus:w.useCallback(M=>g(M),[g]),onItemShiftTab:w.useCallback(()=>y(!0),[]),onFocusableItemAdd:w.useCallback(()=>C(M=>M+1),[]),onFocusableItemRemove:w.useCallback(()=>C(M=>M-1),[]),children:l.jsx(Ee.div,{tabIndex:b||E===0?-1:0,"data-orientation":r,...m,ref:f,style:{outline:"none",...e.style},onMouseDown:ce(e.onMouseDown,()=>{N.current=!0}),onFocus:ce(e.onFocus,M=>{const D=!N.current;if(M.target===M.currentTarget&&D&&!b){const A=new CustomEvent(Qs,gp);if(M.currentTarget.dispatchEvent(A),!A.defaultPrevented){const _=z().filter(Z=>Z.focusable),U=_.find(Z=>Z.active),G=_.find(Z=>Z.id===x),te=[U,G,..._].filter(Boolean).map(Z=>Z.ref.current);Xo(te,h)}}N.current=!1}),onBlur:ce(e.onBlur,()=>y(!1))})})}),Qo="RovingFocusGroupItem",Yo=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:a,...c}=e,d=$e(),u=o||d,h=bp(Qo,n),m=h.currentTabStopId===u,v=Ko(n),{onFocusableItemAdd:f,onFocusableItemRemove:p,currentTabStopId:x}=h;return w.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),l.jsx(Ys.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:l.jsx(Ee.span,{tabIndex:m?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:ce(e.onMouseDown,g=>{r?h.onItemFocus(u):g.preventDefault()}),onFocus:ce(e.onFocus,()=>h.onItemFocus(u)),onKeyDown:ce(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){h.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=Sp(g,h.orientation,h.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let S=v().filter(z=>z.focusable).map(z=>z.ref.current);if(b==="last")S.reverse();else if(b==="prev"||b==="next"){b==="prev"&&S.reverse();const z=S.indexOf(g.currentTarget);S=h.loop?zp(S,z+1):S.slice(z+1)}setTimeout(()=>Xo(S))}}),children:typeof a=="function"?a({isCurrentTabStop:m,hasTabStop:x!=null}):a})})});Yo.displayName=Qo;var yp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sp(e,t,n){const r=Cp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yp[r]}function Xo(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zo=qo,Jo=Yo;function Mp(e){const t=Np(e),n=w.forwardRef((r,i)=>{const{children:o,...a}=r,c=w.Children.toArray(o),d=c.find(kp);if(d){const u=d.props.children,h=c.map(m=>m===d?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return l.jsx(t,{...a,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,h):null})}return l.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Np(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const a=Dp(i),c=Fp(o,i.props);return i.type!==w.Fragment&&(c.ref=r?Ye(r,a):a),w.cloneElement(i,c)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jp=Symbol("radix.slottable");function kp(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jp}function Fp(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Dp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ap=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xn=new WeakMap,Tr=new WeakMap,Pr={},Xs=0,Ro=function(e){return e&&(e.host||Ro(e.parentNode))},Hp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ro(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tp=function(e,t,n,r){var i=Hp(t,Array.isArray(e)?e:[e]);Pr[n]||(Pr[n]=new WeakMap);var o=Pr[n],a=[],c=new Set,d=new Set(i),u=function(m){!m||c.has(m)||(c.add(m),u(m.parentNode))};i.forEach(u);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(c.has(v))h(v);else try{var f=v.getAttribute(r),p=f!==null&&f!=="false",x=(xn.get(v)||0)+1,g=(o.get(v)||0)+1;xn.set(v,x),o.set(v,g),a.push(v),x===1&&p&&Tr.set(v,!0),g===1&&v.setAttribute(n,"true"),p||v.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",v,b)}})};return h(t),c.clear(),Xs++,function(){a.forEach(function(m){var v=xn.get(m)-1,f=o.get(m)-1;xn.set(m,v),o.set(m,f),v||(Tr.has(m)||m.removeAttribute(r),Tr.delete(m)),f||m.removeAttribute(n)}),Xs--,Xs||(xn=new WeakMap,xn=new WeakMap,Tr=new WeakMap,Pr={})}},ea=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Ap(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Tp(r,i,n,"aria-hidden")):function(){return null}},Ct=function(){return Ct=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ct.apply(this,arguments)};function ta(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pp(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ir="right-scroll-bar-position",Or="width-before-scroll-bar",Ip="with-scroll-bars-hidden",Op="--removed-body-scroll-bar-size";function Zs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lp(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var _p=typeof window<"u"?w.useLayoutEffect:w.useEffect,na=new WeakMap;function Vp(e,t){var n=Lp(null,function(r){return e.forEach(function(i){return Zs(i,r)})});return _p(function(){var r=na.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(c){o.has(c)||Zs(c,null)}),o.forEach(function(c){i.has(c)||Zs(c,a)})}na.set(n,e)},[e]),n}function Bp(e){return e}function $p(e,t){t===void 0&&(t=Bp);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(o),a=n}var d=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function Wp(e){e===void 0&&(e={});var t=$p(null);return t.options=Ct({async:!0,ssr:!1},e),t}var ra=function(e){var t=e.sideCar,n=ta(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Ct({},n))};ra.isSideCarExport=!0;function Up(e,t){return e.useMedium(t),ra}var sa=Wp(),Js=function(){},Lr=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:Js,onWheelCapture:Js,onTouchMoveCapture:Js}),i=r[0],o=r[1],a=e.forwardProps,c=e.children,d=e.className,u=e.removeScrollBar,h=e.enabled,m=e.shards,v=e.sideCar,f=e.noRelative,p=e.noIsolation,x=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,S=e.gapMode,z=ta(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=v,E=Vp([n,t]),C=Ct(Ct({},z),i);return w.createElement(w.Fragment,null,h&&w.createElement(N,{sideCar:sa,removeScrollBar:u,shards:m,noRelative:f,noIsolation:p,inert:x,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:S}),a?w.cloneElement(w.Children.only(c),Ct(Ct({},C),{ref:E})):w.createElement(y,Ct({},C,{className:d,ref:E}),c))});Lr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Lr.classNames={fullWidth:Or,zeroRight:Ir};var Gp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Kp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gp();return t&&e.setAttribute("nonce",t),e}function qp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Kp())&&(qp(t,n),Qp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xp=function(){var e=Yp();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},la=function(){var e=Xp(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Zp={left:0,top:0,right:0,gap:0},Rs=function(e){return parseInt(e||"",10)||0},Jp=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Rs(n),Rs(r),Rs(i)]},Rp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zp;var t=Jp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},eg=la(),wn="data-scroll-locked",tg=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
7
+ .`.concat(Ip,` {
8
+ overflow: hidden `).concat(r,`;
9
+ padding-right: `).concat(c,"px ").concat(r,`;
10
+ }
11
+ body[`).concat(wn,`] {
12
+ overflow: hidden `).concat(r,`;
13
+ overscroll-behavior: contain;
14
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
15
+ padding-left: `.concat(i,`px;
16
+ padding-top: `).concat(o,`px;
17
+ padding-right: `).concat(a,`px;
18
+ margin-left:0;
19
+ margin-top:0;
20
+ margin-right: `).concat(c,"px ").concat(r,`;
21
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
22
+ }
23
+
24
+ .`).concat(Ir,` {
25
+ right: `).concat(c,"px ").concat(r,`;
26
+ }
27
+
28
+ .`).concat(Or,` {
29
+ margin-right: `).concat(c,"px ").concat(r,`;
30
+ }
31
+
32
+ .`).concat(Ir," .").concat(Ir,` {
33
+ right: 0 `).concat(r,`;
34
+ }
35
+
36
+ .`).concat(Or," .").concat(Or,` {
37
+ margin-right: 0 `).concat(r,`;
38
+ }
39
+
40
+ body[`).concat(wn,`] {
41
+ `).concat(Op,": ").concat(c,`px;
42
+ }
43
+ `)},ia=function(){var e=parseInt(document.body.getAttribute(wn)||"0",10);return isFinite(e)?e:0},ng=function(){w.useEffect(function(){return document.body.setAttribute(wn,(ia()+1).toString()),function(){var e=ia()-1;e<=0?document.body.removeAttribute(wn):document.body.setAttribute(wn,e.toString())}},[])},rg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;ng();var o=w.useMemo(function(){return Rp(i)},[i]);return w.createElement(eg,{styles:tg(o,!t,i,n?"":"!important")})},el=!1;if(typeof window<"u")try{var _r=Object.defineProperty({},"passive",{get:function(){return el=!0,!0}});window.addEventListener("test",_r,_r),window.removeEventListener("test",_r,_r)}catch{el=!1}var bn=el?{passive:!1}:!1,sg=function(e){return e.tagName==="TEXTAREA"},oa=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sg(e)&&n[t]==="visible")},lg=function(e){return oa(e,"overflowY")},ig=function(e){return oa(e,"overflowX")},aa=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=ca(e,r);if(i){var o=da(e,r),a=o[1],c=o[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},og=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ag=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ca=function(e,t){return e==="v"?lg(t):ig(t)},da=function(e,t){return e==="v"?og(t):ag(t)},cg=function(e,t){return e==="h"&&t==="rtl"?-1:1},dg=function(e,t,n,r,i){var o=cg(e,window.getComputedStyle(t).direction),a=o*r,c=n.target,d=t.contains(c),u=!1,h=a>0,m=0,v=0;do{if(!c)break;var f=da(e,c),p=f[0],x=f[1],g=f[2],b=x-g-o*p;(p||b)&&ca(e,c)&&(m+=b,v+=p);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(h&&Math.abs(m)<1||!h&&Math.abs(v)<1)&&(u=!0),u},Vr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ua=function(e){return[e.deltaX,e.deltaY]},ha=function(e){return e&&"current"in e?e.current:e},ug=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hg=function(e){return`
44
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
45
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
46
+ `)},mg=0,En=[];function fg(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(mg++)[0],o=w.useState(la)[0],a=w.useRef(e);w.useEffect(function(){a.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=Pp([e.lockRef.current],(e.shards||[]).map(ha),!0).filter(Boolean);return x.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=w.useCallback(function(x,g){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var b=Vr(x),y=n.current,S="deltaX"in x?x.deltaX:y[0]-b[0],z="deltaY"in x?x.deltaY:y[1]-b[1],N,E=x.target,C=Math.abs(S)>Math.abs(z)?"h":"v";if("touches"in x&&C==="h"&&E.type==="range")return!1;var M=window.getSelection(),D=M&&M.anchorNode,A=D?D===E||D.contains(E):!1;if(A)return!1;var _=aa(C,E);if(!_)return!0;if(_?N=C:(N=C==="v"?"h":"v",_=aa(C,E)),!_)return!1;if(!r.current&&"changedTouches"in x&&(S||z)&&(r.current=N),!N)return!0;var U=r.current||N;return dg(U,g,x,U==="h"?S:z)},[]),d=w.useCallback(function(x){var g=x;if(!(!En.length||En[En.length-1]!==o)){var b="deltaY"in g?ua(g):Vr(g),y=t.current.filter(function(N){return N.name===g.type&&(N.target===g.target||g.target===N.shadowParent)&&ug(N.delta,b)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var S=(a.current.shards||[]).map(ha).filter(Boolean).filter(function(N){return N.contains(g.target)}),z=S.length>0?c(g,S[0]):!a.current.noIsolation;z&&g.cancelable&&g.preventDefault()}}},[]),u=w.useCallback(function(x,g,b,y){var S={name:x,delta:g,target:b,should:y,shadowParent:pg(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(z){return z!==S})},1)},[]),h=w.useCallback(function(x){n.current=Vr(x),r.current=void 0},[]),m=w.useCallback(function(x){u(x.type,ua(x),x.target,c(x,e.lockRef.current))},[]),v=w.useCallback(function(x){u(x.type,Vr(x),x.target,c(x,e.lockRef.current))},[]);w.useEffect(function(){return En.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,bn),document.addEventListener("touchmove",d,bn),document.addEventListener("touchstart",h,bn),function(){En=En.filter(function(x){return x!==o}),document.removeEventListener("wheel",d,bn),document.removeEventListener("touchmove",d,bn),document.removeEventListener("touchstart",h,bn)}},[]);var f=e.removeScrollBar,p=e.inert;return w.createElement(w.Fragment,null,p?w.createElement(o,{styles:hg(i)}):null,f?w.createElement(rg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gg=Up(sa,fg);var tl=w.forwardRef(function(e,t){return w.createElement(Lr,Ct({},e,{ref:t,sideCar:gg}))});tl.classNames=Lr.classNames;var nl=["Enter"," "],vg=["ArrowDown","PageUp","Home"],ma=["ArrowUp","PageDown","End"],xg=[...vg,...ma],wg={ltr:[...nl,"ArrowRight"],rtl:[...nl,"ArrowLeft"]},bg={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Kn="Menu",[qn,Eg,yg]=Ji(Kn),[Rt,Br]=et(Kn,[yg,Dr,Hr]),Qn=Dr(),fa=Hr(),[pa,Bt]=Rt(Kn),[Cg,Yn]=Rt(Kn),ga=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,c=Qn(t),[d,u]=w.useState(null),h=w.useRef(!1),m=Oe(o),v=wr(i);return w.useEffect(()=>{const f=()=>{h.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>h.current=!1;return document.addEventListener("keydown",f,{capture:!0}),()=>{document.removeEventListener("keydown",f,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),l.jsx(Ks,{...c,children:l.jsx(pa,{scope:t,open:n,onOpenChange:m,content:d,onContentChange:u,children:l.jsx(Cg,{scope:t,onClose:w.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:h,dir:v,modal:a,children:r})})})};ga.displayName=Kn;var Sg="MenuAnchor",rl=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Qn(n);return l.jsx(Wo,{...i,...r,ref:t})});rl.displayName=Sg;var sl="MenuPortal",[zg,va]=Rt(sl,{forceMount:void 0}),xa=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Bt(sl,t);return l.jsx(zg,{scope:t,forceMount:n,children:l.jsx(Ke,{present:n||o.open,children:l.jsx(qs,{asChild:!0,container:i,children:r})})})};xa.displayName=sl;var tt="MenuContent",[Mg,ll]=Rt(tt),wa=w.forwardRef((e,t)=>{const n=va(tt,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Bt(tt,e.__scopeMenu),a=Yn(tt,e.__scopeMenu);return l.jsx(qn.Provider,{scope:e.__scopeMenu,children:l.jsx(Ke,{present:r||o.open,children:l.jsx(qn.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(Ng,{...i,ref:t}):l.jsx(jg,{...i,ref:t})})})})}),Ng=w.forwardRef((e,t)=>{const n=Bt(tt,e.__scopeMenu),r=w.useRef(null),i=Ne(t,r);return w.useEffect(()=>{const o=r.current;if(o)return ea(o)},[]),l.jsx(il,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ce(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jg=w.forwardRef((e,t)=>{const n=Bt(tt,e.__scopeMenu);return l.jsx(il,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),kg=Mp("MenuContent.ScrollLock"),il=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:v,onDismiss:f,disableOutsideScroll:p,...x}=e,g=Bt(tt,n),b=Yn(tt,n),y=Qn(n),S=fa(n),z=Eg(n),[N,E]=w.useState(null),C=w.useRef(null),M=Ne(t,C,g.onContentChange),D=w.useRef(0),A=w.useRef(""),_=w.useRef(0),U=w.useRef(null),G=w.useRef("right"),Y=w.useRef(0),te=p?tl:w.Fragment,Z=p?{as:kg,allowPinchZoom:!0}:void 0,P=I=>{const X=A.current+I,T=z().filter(ne=>!ne.disabled),j=document.activeElement,V=T.find(ne=>ne.ref.current===j)?.textValue,L=T.map(ne=>ne.textValue),$=Bg(L,X,V),se=T.find(ne=>ne.textValue===$)?.ref.current;(function ne(de){A.current=de,window.clearTimeout(D.current),de!==""&&(D.current=window.setTimeout(()=>ne(""),1e3))})(X),se&&setTimeout(()=>se.focus())};w.useEffect(()=>()=>window.clearTimeout(D.current),[]),ro();const W=w.useCallback(I=>G.current===U.current?.side&&Wg(I,U.current?.area),[]);return l.jsx(Mg,{scope:n,searchRef:A,onItemEnter:w.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:w.useCallback(I=>{W(I)||(C.current?.focus(),E(null))},[W]),onTriggerLeave:w.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:_,onPointerGraceIntentChange:w.useCallback(I=>{U.current=I},[]),children:l.jsx(te,{...Z,children:l.jsx(Ds,{asChild:!0,trapped:i,onMountAutoFocus:ce(o,I=>{I.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(br,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:v,onDismiss:f,children:l.jsx(Zo,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:E,onEntryFocus:ce(d,I=>{b.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Uo,{role:"menu","aria-orientation":"vertical","data-state":Oa(g.open),"data-radix-menu-content":"",dir:b.dir,...y,...x,ref:M,style:{outline:"none",...x.style},onKeyDown:ce(x.onKeyDown,I=>{const T=I.target.closest("[data-radix-menu-content]")===I.currentTarget,j=I.ctrlKey||I.altKey||I.metaKey,V=I.key.length===1;T&&(I.key==="Tab"&&I.preventDefault(),!j&&V&&P(I.key));const L=C.current;if(I.target!==L||!xg.includes(I.key))return;I.preventDefault();const se=z().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);ma.includes(I.key)&&se.reverse(),_g(se)}),onBlur:ce(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(D.current),A.current="")}),onPointerMove:ce(e.onPointerMove,Zn(I=>{const X=I.target,T=Y.current!==I.clientX;if(I.currentTarget.contains(X)&&T){const j=I.clientX>Y.current?"right":"left";G.current=j,Y.current=I.clientX}}))})})})})})})});wa.displayName=tt;var Fg="MenuGroup",ol=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Ee.div,{role:"group",...r,ref:t})});ol.displayName=Fg;var Dg="MenuLabel",ba=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Ee.div,{...r,ref:t})});ba.displayName=Dg;var $r="MenuItem",Ea="menu.itemSelect",Wr=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=w.useRef(null),a=Yn($r,e.__scopeMenu),c=ll($r,e.__scopeMenu),d=Ne(t,o),u=w.useRef(!1),h=()=>{const m=o.current;if(!n&&m){const v=new CustomEvent(Ea,{bubbles:!0,cancelable:!0});m.addEventListener(Ea,f=>r?.(f),{once:!0}),Xi(m,v),v.defaultPrevented?u.current=!1:a.onClose()}};return l.jsx(ya,{...i,ref:d,disabled:n,onClick:ce(e.onClick,h),onPointerDown:m=>{e.onPointerDown?.(m),u.current=!0},onPointerUp:ce(e.onPointerUp,m=>{u.current||m.currentTarget?.click()}),onKeyDown:ce(e.onKeyDown,m=>{const v=c.searchRef.current!=="";n||v&&m.key===" "||nl.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Wr.displayName=$r;var ya=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=ll($r,n),c=fa(n),d=w.useRef(null),u=Ne(t,d),[h,m]=w.useState(!1),[v,f]=w.useState("");return w.useEffect(()=>{const p=d.current;p&&f((p.textContent??"").trim())},[o.children]),l.jsx(qn.ItemSlot,{scope:n,disabled:r,textValue:i??v,children:l.jsx(Jo,{asChild:!0,...c,focusable:!r,children:l.jsx(Ee.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ce(e.onPointerMove,Zn(p=>{r?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(e.onPointerLeave,Zn(p=>a.onItemLeave(p))),onFocus:ce(e.onFocus,()=>m(!0)),onBlur:ce(e.onBlur,()=>m(!1))})})})}),Ag="MenuCheckboxItem",Ca=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return l.jsx(ja,{scope:e.__scopeMenu,checked:n,children:l.jsx(Wr,{role:"menuitemcheckbox","aria-checked":Ur(n)?"mixed":n,...i,ref:t,"data-state":dl(n),onSelect:ce(i.onSelect,()=>r?.(Ur(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ca.displayName=Ag;var Sa="MenuRadioGroup",[Hg,Tg]=Rt(Sa,{value:void 0,onValueChange:()=>{}}),za=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Oe(r);return l.jsx(Hg,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx(ol,{...i,ref:t})})});za.displayName=Sa;var Ma="MenuRadioItem",Na=w.forwardRef((e,t)=>{const{value:n,...r}=e,i=Tg(Ma,e.__scopeMenu),o=n===i.value;return l.jsx(ja,{scope:e.__scopeMenu,checked:o,children:l.jsx(Wr,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":dl(o),onSelect:ce(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Na.displayName=Ma;var al="MenuItemIndicator",[ja,Pg]=Rt(al,{checked:!1}),ka=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=Pg(al,n);return l.jsx(Ke,{present:r||Ur(o.checked)||o.checked===!0,children:l.jsx(Ee.span,{...i,ref:t,"data-state":dl(o.checked)})})});ka.displayName=al;var Ig="MenuSeparator",Fa=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Fa.displayName=Ig;var Og="MenuArrow",Da=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Qn(n);return l.jsx(Go,{...i,...r,ref:t})});Da.displayName=Og;var cl="MenuSub",[Lg,Aa]=Rt(cl),Ha=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,o=Bt(cl,t),a=Qn(t),[c,d]=w.useState(null),[u,h]=w.useState(null),m=Oe(i);return w.useEffect(()=>(o.open===!1&&m(!1),()=>m(!1)),[o.open,m]),l.jsx(Ks,{...a,children:l.jsx(pa,{scope:t,open:r,onOpenChange:m,content:u,onContentChange:h,children:l.jsx(Lg,{scope:t,contentId:$e(),triggerId:$e(),trigger:c,onTriggerChange:d,children:n})})})};Ha.displayName=cl;var Xn="MenuSubTrigger",Ta=w.forwardRef((e,t)=>{const n=Bt(Xn,e.__scopeMenu),r=Yn(Xn,e.__scopeMenu),i=Aa(Xn,e.__scopeMenu),o=ll(Xn,e.__scopeMenu),a=w.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=o,u={__scopeMenu:e.__scopeMenu},h=w.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return w.useEffect(()=>h,[h]),w.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),d(null)}},[c,d]),l.jsx(rl,{asChild:!0,...u,children:l.jsx(ya,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Oa(n.open),...e,ref:Ye(t,i.onTriggerChange),onClick:m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ce(e.onPointerMove,Zn(m=>{o.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:ce(e.onPointerLeave,Zn(m=>{h();const v=n.content?.getBoundingClientRect();if(v){const f=n.content?.dataset.side,p=f==="right",x=p?-5:5,g=v[p?"left":"right"],b=v[p?"right":"left"];o.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:g,y:v.top},{x:b,y:v.top},{x:b,y:v.bottom},{x:g,y:v.bottom}],side:f}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(m),m.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ce(e.onKeyDown,m=>{const v=o.searchRef.current!=="";e.disabled||v&&m.key===" "||wg[r.dir].includes(m.key)&&(n.onOpenChange(!0),n.content?.focus(),m.preventDefault())})})})});Ta.displayName=Xn;var Pa="MenuSubContent",Ia=w.forwardRef((e,t)=>{const n=va(tt,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Bt(tt,e.__scopeMenu),a=Yn(tt,e.__scopeMenu),c=Aa(Pa,e.__scopeMenu),d=w.useRef(null),u=Ne(t,d);return l.jsx(qn.Provider,{scope:e.__scopeMenu,children:l.jsx(Ke,{present:r||o.open,children:l.jsx(qn.Slot,{scope:e.__scopeMenu,children:l.jsx(il,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{a.isUsingKeyboardRef.current&&d.current?.focus(),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:ce(e.onFocusOutside,h=>{h.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ce(e.onEscapeKeyDown,h=>{a.onClose(),h.preventDefault()}),onKeyDown:ce(e.onKeyDown,h=>{const m=h.currentTarget.contains(h.target),v=bg[a.dir].includes(h.key);m&&v&&(o.onOpenChange(!1),c.trigger?.focus(),h.preventDefault())})})})})})});Ia.displayName=Pa;function Oa(e){return e?"open":"closed"}function Ur(e){return e==="indeterminate"}function dl(e){return Ur(e)?"indeterminate":e?"checked":"unchecked"}function _g(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Vg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bg(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Vg(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const d=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function $g(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const c=t[o],d=t[a],u=c.x,h=c.y,m=d.x,v=d.y;h>r!=v>r&&n<(m-u)*(r-h)/(v-h)+u&&(i=!i)}return i}function Wg(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return $g(n,t)}function Zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var La=ga,_a=rl,Va=xa,Ba=wa,$a=ol,Wa=ba,Ua=Wr,Ga=Ca,Ka=za,qa=Na,Qa=ka,Ya=Fa,Xa=Da,Za=Ha,Ja=Ta,Ra=Ia,Gr="DropdownMenu",[Ug]=et(Gr,[Br]),Ve=Br(),[Gg,ec]=Ug(Gr),tc=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,d=Ve(t),u=w.useRef(null),[h,m]=Ot({prop:i,defaultProp:o??!1,onChange:a,caller:Gr});return l.jsx(Gg,{scope:t,triggerId:$e(),triggerRef:u,contentId:$e(),open:h,onOpenChange:m,onOpenToggle:w.useCallback(()=>m(v=>!v),[m]),modal:c,children:l.jsx(La,{...d,open:h,onOpenChange:m,dir:r,modal:c,children:n})})};tc.displayName=Gr;var nc="DropdownMenuTrigger",rc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=ec(nc,n),a=Ve(n);return l.jsx(_a,{asChild:!0,...a,children:l.jsx(Ee.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ye(t,o.triggerRef),onPointerDown:ce(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:ce(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});rc.displayName=nc;var Kg="DropdownMenuPortal",sc=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ve(t);return l.jsx(Va,{...r,...n})};sc.displayName=Kg;var lc="DropdownMenuContent",ic=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ec(lc,n),o=Ve(n),a=w.useRef(!1);return l.jsx(Ba,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:ce(e.onCloseAutoFocus,c=>{a.current||i.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:ce(e.onInteractOutside,c=>{const d=c.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0,h=d.button===2||u;(!i.modal||h)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ic.displayName=lc;var qg="DropdownMenuGroup",oc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx($a,{...i,...r,ref:t})});oc.displayName=qg;var Qg="DropdownMenuLabel",ac=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Wa,{...i,...r,ref:t})});ac.displayName=Qg;var Yg="DropdownMenuItem",cc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Ua,{...i,...r,ref:t})});cc.displayName=Yg;var Xg="DropdownMenuCheckboxItem",dc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Ga,{...i,...r,ref:t})});dc.displayName=Xg;var Zg="DropdownMenuRadioGroup",uc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Ka,{...i,...r,ref:t})});uc.displayName=Zg;var Jg="DropdownMenuRadioItem",hc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(qa,{...i,...r,ref:t})});hc.displayName=Jg;var Rg="DropdownMenuItemIndicator",mc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Qa,{...i,...r,ref:t})});mc.displayName=Rg;var ev="DropdownMenuSeparator",fc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Ya,{...i,...r,ref:t})});fc.displayName=ev;var tv="DropdownMenuArrow",nv=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Xa,{...i,...r,ref:t})});nv.displayName=tv;var rv=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:o}=e,a=Ve(t),[c,d]=Ot({prop:r,defaultProp:o??!1,onChange:i,caller:"DropdownMenuSub"});return l.jsx(Za,{...a,open:c,onOpenChange:d,children:n})},sv="DropdownMenuSubTrigger",pc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Ja,{...i,...r,ref:t})});pc.displayName=sv;var lv="DropdownMenuSubContent",gc=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ve(n);return l.jsx(Ra,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gc.displayName=lv;var iv=tc,ov=rc,vc=sc,xc=ic,av=oc,wc=ac,bc=cc,Ec=dc,cv=uc,yc=hc,Cc=mc,Sc=fc,dv=rv,zc=pc,Mc=gc;const $t=iv,Wt=ov,Nc=av,uv=vc,hv=dv,mv=cv,jc=w.forwardRef(({className:e,inset:t,children:n,...r},i)=>l.jsxs(zc,{ref:i,className:H("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,l.jsx(O.ChevronRight,{className:"ml-auto h-4 w-4"})]}));jc.displayName=zc.displayName;const kc=w.forwardRef(({className:e,...t},n)=>l.jsx(Mc,{ref:n,className:H("z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));kc.displayName=Mc.displayName;const At=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(vc,{children:l.jsx(xc,{ref:r,sideOffset:t,className:H("z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md 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",e),...n})}));At.displayName=xc.displayName;const Ut=w.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(bc,{ref:r,className:H("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Ut.displayName=bc.displayName;const ul=w.forwardRef(({className:e,children:t,checked:n,...r},i)=>l.jsxs(Ec,{ref:i,className:H("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Cc,{children:l.jsx(O.Check,{className:"h-4 w-4"})})}),t]}));ul.displayName=Ec.displayName;const Fc=w.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(yc,{ref:r,className:H("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Cc,{children:l.jsx(O.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Fc.displayName=yc.displayName;const yn=w.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(wc,{ref:r,className:H("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));yn.displayName=wc.displayName;const Cn=w.forwardRef(({className:e,...t},n)=>l.jsx(Sc,{ref:n,className:H("-mx-1 my-1 h-px bg-muted",e),...t}));Cn.displayName=Sc.displayName;const Dc=({className:e,...t})=>l.jsx("span",{className:H("ml-auto text-xs tracking-widest opacity-60",e),...t});Dc.displayName="DropdownMenuShortcut";const Ac=({className:e})=>{oe.get("ThemeService")||oe.register("ThemeService",new xr);const t=oe.getOrThrow("ThemeService"),[n,r]=s.useState(t.getState());s.useEffect(()=>t.subscribe(a=>{r({...a})}),[t]);const i=[{name:"Zinc",label:"Zinc",colorClass:"bg-zinc-900 dark:bg-zinc-100"},{name:"Blue",label:"Blue",colorClass:"bg-blue-600"},{name:"Green",label:"Green",colorClass:"bg-green-600"},{name:"Orange",label:"Orange",colorClass:"bg-orange-500"},{name:"Rose",label:"Rose",colorClass:"bg-rose-500"}],o=[0,.3,.5,.75,1];return l.jsxs($t,{children:[l.jsx(Wt,{asChild:!0,children:l.jsxs(J,{variant:"ghost",size:"icon",className:H("h-9 w-9",e),children:[l.jsx(O.Palette,{className:"h-[1.2rem] w-[1.2rem]"}),l.jsx("span",{className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},children:"Change theme"})]})}),l.jsx(At,{align:"end",className:"w-[280px]",children:l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsxs("div",{children:[l.jsx(yn,{className:"px-0 pt-0",children:"Color"}),l.jsx("div",{className:"grid grid-cols-3 gap-2 py-2",children:i.map(a=>l.jsxs(J,{variant:"outline",size:"sm",onClick:()=>t.setThemeColor(a.name),className:H("flex flex-col items-center justify-center h-14 w-full p-0 rounded-md border-2",n.themeColor===a.name?"border-primary":"border-transparent"),children:[l.jsx("span",{className:H("h-4 w-4 rounded-full shadow-sm mb-1",a.colorClass)}),l.jsx("span",{className:"text-[10px] font-medium",children:a.label})]},a.name))})]}),l.jsx(Cn,{}),l.jsxs("div",{children:[l.jsx(yn,{className:"px-0",children:"Radius"}),l.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:o.map(a=>l.jsx(J,{variant:"outline",size:"sm",onClick:()=>t.setRadius(a),className:H("h-8 px-0 text-xs font-medium",n.radius===a?"border-primary bg-primary/5":"border-transparent"),children:a},a))})]})]})})]})};var fv=["title"],pv=["title"],gv=["title"],vv=["title"],xv=["title"],wv=["title"],bv=["title"],Ev=["title"],yv=["title"],Cv=["title"],Sv=["title"],zv=["title"],Mv=["title"],Nv=["title"],jv=["title"],kv=["title"],Fv=["title"],Dv=["title"],Av=["title"],Hv=["title"],Tv=["title"],Pv=["title"],Iv=["title"],Ov=["title"],Lv=["title"],_v=["title"],Vv=["title"],Bv=["title"],$v=["title"],Wv=["title"],Uv=["title"],Gv=["title"],Kv=["title"],qv=["title"],Qv=["title"],Yv=["title"],Xv=["title"],Zv=["title"],Jv=["title"],Rv=["title"],ex=["title"],tx=["title"],nx=["title"],rx=["title"],sx=["title"],lx=["title"],ix=["title"],ox=["title"],ax=["title"],cx=["title"],dx=["title"],ux=["title"],hx=["title"],mx=["title"],fx=["title"],px=["title"],gx=["title"],vx=["title"],xx=["title"],wx=["title"],bx=["title"],Ex=["title"],yx=["title"],Cx=["title"],Sx=["title"],zx=["title"],Mx=["title"],Nx=["title"],jx=["title"],kx=["title"],Fx=["title"],Dx=["title"],Ax=["title"],Hx=["title"],Tx=["title"],Px=["title"],Ix=["title"],Ox=["title"],Lx=["title"],_x=["title"],Vx=["title"],Bx=["title"],$x=["title"],Wx=["title"],Ux=["title"],Gx=["title"],Kx=["title"],qx=["title"],Qx=["title"],Yx=["title"],Xx=["title"],Zx=["title"],Jx=["title"],Rx=["title"],e7=["title"],t7=["title"],n7=["title"],r7=["title"],s7=["title"],l7=["title"],i7=["title"],o7=["title"],a7=["title"],c7=["title"],d7=["title"],u7=["title"],h7=["title"],m7=["title"],f7=["title"],p7=["title"],g7=["title"],v7=["title"],x7=["title"],w7=["title"],b7=["title"],E7=["title"],y7=["title"],C7=["title"],S7=["title"],z7=["title"],M7=["title"],N7=["title"],j7=["title"],k7=["title"],F7=["title"],D7=["title"],A7=["title"],H7=["title"],T7=["title"],P7=["title"],I7=["title"],O7=["title"],L7=["title"],_7=["title"],V7=["title"],B7=["title"],$7=["title"],W7=["title"],U7=["title"],G7=["title"],K7=["title"],q7=["title"],Q7=["title"],Y7=["title"],X7=["title"],Z7=["title"],J7=["title"],R7=["title"],e6=["title"],t6=["title"],n6=["title"],r6=["title"],s6=["title"],l6=["title"],i6=["title"],o6=["title"],a6=["title"],c6=["title"],d6=["title"],u6=["title"],h6=["title"],m6=["title"],f6=["title"],p6=["title"],g6=["title"],v6=["title"],x6=["title"],w6=["title"],b6=["title"],E6=["title"],y6=["title"],C6=["title"],S6=["title"],z6=["title"],M6=["title"],N6=["title"],j6=["title"],k6=["title"],F6=["title"],D6=["title"],A6=["title"],H6=["title"],T6=["title"],P6=["title"],I6=["title"],O6=["title"],L6=["title"],_6=["title"],V6=["title"],B6=["title"],$6=["title"],W6=["title"],U6=["title"],G6=["title"],K6=["title"],q6=["title"],Q6=["title"],Y6=["title"],X6=["title"],Z6=["title"],J6=["title"],R6=["title"],e8=["title"],t8=["title"],n8=["title"],r8=["title"],s8=["title"],l8=["title"],i8=["title"],o8=["title"],a8=["title"],c8=["title"],d8=["title"],u8=["title"],h8=["title"],m8=["title"],f8=["title"],p8=["title"],g8=["title"],v8=["title"],x8=["title"],w8=["title"],b8=["title"],E8=["title"],y8=["title"],C8=["title"],S8=["title"],z8=["title"],M8=["title"],N8=["title"],j8=["title"],k8=["title"],F8=["title"],D8=["title"],A8=["title"],H8=["title"],T8=["title"],P8=["title"],I8=["title"],O8=["title"],L8=["title"],_8=["title"],V8=["title"],B8=["title"],$8=["title"],W8=["title"],U8=["title"],G8=["title"],K8=["title"],q8=["title"],Q8=["title"],Y8=["title"],X8=["title"],Z8=["title"],J8=["title"],R8=["title"],e9=["title"],t9=["title"],n9=["title"],r9=["title"],s9=["title"],l9=["title"],i9=["title"],o9=["title"],a9=["title"];function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function F(e,t){if(e==null)return{};var n=c9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hc=function(t){var n=t.title,r=F(t,fv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M440.1 181.1c-.1 39.2-6.4 81.4-57.4 101.5-51.1-20.1-57.3-62.3-57.4-101.5h114.8z"}),s.createElement("path",{fill:"#1B81B6",d:"M439.6 197.7c-2.8 34.9-12.4 67.4-57 85-44.4-17.6-54.5-51.2-56.9-84.9"}),s.createElement("path",{fill:"#FFF",d:"M437.8 214.1c-3.2 24.3-16.7 53.5-55.1 68.6-38.4-15.1-50.5-42.5-55.1-68.4"}),s.createElement("path",{fill:"#1B81B6",d:"M434.2 230.3c-5.7 17.7-19.3 39.4-51.3 52.8-32-12.6-45.2-33.8-51.4-53"}),s.createElement("path",{fill:"#FFF",d:"M426.7 246.9c-6.5 11.3-17.7 25.4-44 35.9-27.5-11.5-37.4-25.3-44-36.1"}),s.createElement("path",{fill:"#1B81B6",d:"M412.4 265.1c-8.1 7.2-12 11.2-29.6 17.9-20.1-7.9-22.6-11.6-29.2-17.5"}),s.createElement("path",{fill:"#288549",d:"M383.3 231.6c-.2-.2-27.9 35.7-27.9 35.7-1.8-1.3-10-9.5-13.3-15l41.3-50.1 40.2 49.7c-3.9 6.5-11.4 13.6-13.2 15M382.6 85.3l-26.5 45h53z"}),s.createElement("path",{d:"M275.9 223.6c3.6-26.7 13.5-47.3 22.1-46.2s12.6 23.7 9 50.4-13.5 47.3-22.1 46.2c-8.6-1.2-12.6-23.7-9-50.4zm191.2-45.9c8.6-1.2 18.5 19.5 22.1 46.2s-.4 49.2-9 50.4-18.5-19.6-22.2-46.3c-3.6-26.6.5-49.2 9.1-50.3z",fill:"#F0955D"}),s.createElement("path",{d:"M296.4 162c2.4-6 7.4-9.7 11-8.2 3.7 1.5 4.7 7.5 2.3 13.5s-7.4 9.7-11 8.2c-3.6-1.5-4.7-7.5-2.3-13.5zm-8 109.2c.9-6.2 3.1-11.1 4.9-10.8s2.5 5.5 1.6 11.8c-.9 6.2-3.1 11.1-4.9 10.8s-2.5-5.5-1.6-11.8zm10.6-12.8c1.8-.1 3.6 4.7 3.9 10.8s-.9 11.1-2.7 11.2c-1.8.1-3.6-4.7-3.9-10.8-.3-6.1.9-11.1 2.7-11.2zm10.5-70c2.1-.8 6.1 4.2 8.8 11.2 2.8 7 3.3 13.4 1.2 14.2-2.1.8-6.1-4.2-8.8-11.2-2.8-7-3.3-13.4-1.2-14.2zm6.5-14.1c7-2.8 13.4-3.3 14.2-1.2.8 2.1-4.2 6.1-11.2 8.8-7 2.8-13.4 3.3-14.2 1.2-.9-2.1 4.2-6 11.2-8.8zm141.6-20.2c3.7-1.5 8.6 2.2 11 8.2 2.4 6 1.4 12.1-2.3 13.5-3.7 1.5-8.6-2.2-11-8.2-2.4-6-1.3-12.1 2.3-13.5zm14.2 106.5c1.8-.3 4 4.6 4.9 10.8.9 6.2.2 11.5-1.6 11.8-1.8.3-4-4.6-4.9-10.8-1-6.3-.2-11.5 1.6-11.8zm-9.6 8.8c.3-6.1 2.1-10.9 3.9-10.8 1.8.1 3 5.1 2.7 11.2-.3 6.1-2.1 10.9-3.9 10.8-1.8-.1-3-5.1-2.7-11.2zm-15.5-69.7c2.8-7 6.7-12.1 8.8-11.2 2.1.8 1.6 7.2-1.2 14.2-2.8 7-6.7 12.1-8.8 11.2s-1.6-7.2 1.2-14.2zm-11.8-26.5c.8-2.1 7.2-1.6 14.2 1.2 7 2.8 12.1 6.7 11.2 8.8-.8 2.1-7.2 1.6-14.2-1.2-7-2.7-12.1-6.7-11.2-8.8z",fill:"#EADFD5"}),s.createElement("path",{fill:"#B0C6CC",d:"M373.3 130.3 356.1 155l17.8 26.1H396l4.7-25.4-5.4-25.4z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},Tc=function(t){var n=t.title,r=F(t,pv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M342 0h171v342H342zM198.9 113.6H256v64.8h-57.1z"}),s.createElement("path",{d:"M267.6 113.6v64.7m16.6-64.7v64.7m16.6-64.7v64.7",stroke:"#D80027",strokeWidth:7}),s.createElement("path",{d:"M247.4 178.4v64.7m-13.3-64.7v64.7m-13.3-64.6v53.9m-13.7-53.9v47.1",stroke:"#D80027",strokeWidth:5}),s.createElement("path",{fill:"#FFDA44",d:"m199.9 146 27.6-32.4 28.5 32.3-28.1 32.4z"}),s.createElement("path",{fill:"#BC8B00",d:"M182.2 95.9v92.2c0 34.3 27.3 54.2 48.6 64.5-.8 1.4 25.1 8.3 25.1 8.3s25.9-6.9 25.1-8.3c21.4-10.3 48.6-30.1 48.6-64.5V95.9H182.2zm129.9 92.2c0 16.9-10 29.4-32.8 43.9-8.6 5.5-17.5 9-23.3 11-5.8-2-14.7-5.5-23.3-11-22.8-14.5-32.8-28-32.8-43.9v-74.5h112.2v74.5z"}),s.createElement("path",{fill:"#D80027",d:"M264.4 188.9h29.5v8.6h-29.5zm0 17.6h29.5v8.6h-29.5z"}))},Pc=function(t){var n=t.title,r=F(t,gv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#009e49",d:"M0 0h513v114H0z"}),s.createElement("path",{d:"M0 228h513v114H0z"}),s.createElement("path",{fill:"#ce1126",d:"M0 0h171v342H0z"}))},Ic=function(t){var n=t.title,r=F(t,vv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#DB3E00",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#479900",d:"M331 0h182v342H331z"}),s.createElement("path",{d:"M0 0h181.8v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M256 126.7c-19.4 0-35.2 15.8-35.2 35.2v52.8h70.4v-52.8c0-19.5-15.8-35.2-35.2-35.2z"}),s.createElement("path",{fill:"#FFF",d:"M256 84.3c-47.7 0-86.4 38.7-86.4 86.4S208.3 257 256 257s86.4-38.7 86.4-86.4-38.7-86.3-86.4-86.3zm0 157.7c-39.4 0-71.4-32-71.4-71.4 0-39.4 32-71.4 71.4-71.4 39.4 0 71.4 32 71.4 71.4 0 39.5-32 71.4-71.4 71.4z"}))},Oc=function(t){var n=t.title,r=F(t,xv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0072c6",d:"M88.8 136.5c-2.2 12.9-3.4 26.2-3.4 39.8 0 13.6 1.2 27 3.4 39.8L256 228.3l167.2-12.1c2.2-12.9 3.4-26.2 3.4-39.8s-1.2-27-3.4-39.8"}),s.createElement("path",{fill:"#FFF",d:"M423.2 219H88.8c15.8 69.8 84.7 122.3 167.2 122.3S407.4 288.8 423.2 219z"}),s.createElement("path",{fill:"#FFDA44",d:"M365.9 136.5H146.1l44.9-21.1-23.9-43.5 48.8 9.4L222 32l34 36.2L290 32l6.1 49.3 48.8-9.4-23.9 43.5z"}),s.createElement("g",{fill:"#ce1126"},s.createElement("path",{d:"M256.5 342 0 0v342z"}),s.createElement("path",{d:"M513 342V0L256 342z"})))},Lc=function(t){var n=t.title,r=F(t,wv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M454.8 265.38c7.94-10.93 13.24-24.27 13.24-40.42V104.89a59.754 59.754 0 0 1-36.02 12.01c-19.64 0-37.07-9.43-48.03-24.01-10.95 14.58-28.39 24.01-48.03 24.01-13.52 0-25.99-4.47-36.02-12v120.06c0 16.16 5.3 29.5 13.24 40.42H454.8z"}),s.createElement("path",{fill:"#9cf",d:"M310.23 260.98C332.65 296.96 384 309 384 309s51.35-12.04 73.77-48.02H310.23z"}),s.createElement("g",{fill:"#f90"},s.createElement("path",{d:"M396.66 172.21c.32 1.42 8.72 10.17 17.56 20.15 1.39 1.57-8.74 12.63-6.91 12.59 4.75-.12 19.27-17.26 19.34 6.65.05 15.94-30 27.51-30 27.51h17.47l.65 14.96s4.97-13.34 7.59-16.57c8.1-9.97 20.18-30.07 34.59-27.1 14.41 2.97-13.66-13.92-13.66-13.92s-5.2-15.19-16.63-16.97c-10.06-1.57-14.29-2.51-26.64-7.3-1.68-.65-3.88-2.32-3.36 0z"}),s.createElement("path",{d:"M359.69 198.69c1.07-.99 4.46-12.63 8.69-25.28.67-1.99 15.31 1.27 14.35-.3-2.47-4.06-24.58-8.08-3.9-20.08 13.79-8 38.82 12.27 38.82 12.27l-8.72-15.14 12.64-8.03s-14.05 2.35-18.14 1.69c-12.68-2.04-36.13-2.48-40.75-16.45-4.62-13.97-5.25 18.79-5.25 18.79s-10.56 12.08-6.4 22.88c3.66 9.5 4.96 13.64 6.97 26.73.29 1.79-.06 4.53 1.69 2.92z"}),s.createElement("path",{d:"M395.67 219.87c-1.39-.43-13.16 2.49-26.22 5.18-2.06.42-6.59-13.88-7.47-12.26-2.27 4.17 5.36 25.31-15.41 13.45-13.84-7.91-8.89-39.73-8.89-39.73l-8.71 15.14-13.29-6.9s9.09 10.96 10.57 14.84c4.6 11.99 16 32.49 6.24 43.49-9.76 11.01 18.88-4.9 18.88-4.9s15.76 3.07 23-5.96c6.38-7.94 9.3-11.14 19.61-19.45 1.43-1.12 3.97-2.19 1.69-2.9z"})),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},_c=function(t){var n=t.title,r=F(t,bv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 90 60"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ED2024",d:"M0 0h90v60H0z"}),s.createElement("path",{fill:"#212121",d:"M32.5 12.2v16l7.1 2.5-5 4.9 2.4 3 5.3-5.5 1.2 2.3-3 4.9 3.6 5.6-1.8 2.6 2.8 3.6 2.7-3.7-1.5-2.6 3-5.8-2.7-4.6 1.2-2.3 5.2 5.5 2.5-2.9-5.2-5.1 7.2-2.6V12.2l-5.2 1.9-.1 3.8-3.3.3v-2.6l1.7-2.3 5.6-2.2-2.3-.4 1.4-1.2.9.4-.8-1.4L54 9l-1-1.1L47.5 9l1.4 1.1-3.8 4.9-3.8-4.8 1.3-1.1-5-1.2L36.2 9l-1.5-.4-.8 1.4.9-.6 1.6 1.1-2.3.5 5.5 2 1.6 2.3v2.9l-3.3-.3v-3.6z"}),s.createElement("path",{d:"M26.2 25h6.4v2.5h-6.4zm0-4.1h6.4v2.7h-6.4zm0-4.2h6.4v2.6h-6.4zm0-4h6.4v2.5h-6.4zM57.4 25h6.4v2.5h-6.4zm0-4.1h6.4v2.7h-6.4zm0-4.2h6.4v2.6h-6.4zm0-4h6.4v2.5h-6.4zM53.4 36.1h6.4V38h-6.4zm-23.2 0h6.4V38h-6.4z",fill:"#212121"}))},Vc=function(t){var n=t.title,r=F(t,Ev);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#FF9811",d:"M0 228h513v114H0z"}))},Bc=function(t){var n=t.title,r=F(t,yv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 171h513v171H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v171H0z"}),s.createElement("g",{fill:"#FFDA44"},s.createElement("path",{d:"m332.7 135.6 17.5-8.6-7.4-19-18.7 6.2zm-45.6-56 5.5-18.8-19.1-7.2-8 18zm29.4 23.2 12.2-15.3-14.9-13.9-14.2 13.6zm19.4 68.9 19.5-.8v-21.3l-22.9.2zm-12.6 38.1 18.8 5.5 7.3-19-18-8zm-29 32.4 14.9 12.7 14.4-14.4-13.1-14.7zm-47-147.7 9.8 19.9 21.9 3.3-15.9 15.5 3.6 21.9-19.6-10.4-19.7 10.2 3.8-21.9-15.8-15.5 22-3.1z"}),s.createElement("path",{d:"m250.8 61.3-2.7 18.3c43.1 3.2 77 39.2 77 83.1 0 46-37.3 82.9-83.4 83.4-29.2.3-51.3-14.8-67-33.7l-13.9 12.3c15 19 40.8 39.9 80.9 39.9 56.3 0 101.9-45.6 101.9-101.9.1-53.2-40.7-96.9-92.8-101.4z"}),s.createElement("path",{fill:"#000",d:"m291.9 223.4-11.8 14s51.9 38.9 53.6 40.4c1.7 1.5 5.2 2 9.1-2.7 3.7-4.5 2.8-8.1.9-9.7-2-1.5-51.8-42-51.8-42z"}),s.createElement("path",{d:"M206.1 157.2c-7.7 10.3-7.5 23.1 2.8 30.9 0 0 135.2 101.5 136.9 103 1.7 1.5 5.2 2 9.1-2.7 3.7-4.5 2.8-8.1.9-9.7-1.9-1.5-149.7-121.5-149.7-121.5zm47.7 99.1 7.3 18.2 19.5-6-4.8-19.1zm-40.4-3.7-2 19.5 20.1 3.6 4.5-19.1zm-35.7-21.2L167.4 248l16.4 12.1 12.5-15.2z"})))},$c=function(t){var n=t.title,r=F(t,Cv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 744 496"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#3A7DCE",d:"M0 0h744v496H0V0z"}),s.createElement("path",{fill:"#fff",d:"m120 125 90 63 54-14 23-81 61-36 92 14 105 55 6 90 34 12v92l-65 115-78 24-72-17 18-30-8-32-10 9-162-25-49-85 20-46-49-62z"}))},Wc=function(t){var n=t.title,r=F(t,Sv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h512v342H0z"}),s.createElement("path",{fill:"#338AF3",d:"M0 0h512v114H0zm0 228h512v114H0z"}),s.createElement("circle",{fill:"#FFDA44",stroke:"#d6ab00",strokeWidth:5,cx:256.5,cy:171,r:40}))},Uc=function(t){var n=t.title,r=F(t,zv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#10338c",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M513 33 95.3 171 513 310.76V342L0 171 513 0z"}),s.createElement("path",{fill:"#FFF",d:"M513 287.18v24.58L81.72 171 513 30v24.16"}),s.createElement("path",{fill:"#A2001D",d:"m476.98 140.21-21.89 10.68-3.18-15.32 31.19-29.77s-9.42-40.65-13.75-44.98l-112.32 55.82-6.84 36.76-31.9 28.59-.4 34.2 34.29-22.76 67.23-2.66-1.51 38.11h22.23l11.9-44.64 31.55-24.61-6.6-19.42z"}),s.createElement("path",{fill:"#EFC100",stroke:"#231F20",strokeMiterlimit:10,d:"m317.89 238.41-22.24-11.11 22.24-11.11h144.46v22.22z"}))},Gc=function(t){var n=t.title,r=F(t,Mv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 114h513v114H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0zm0 228h513v114H0z"}))},Kc=function(t){var n=t.title,r=F(t,Nv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#00008b",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m188 212.6 11 22.9 24.7-5.7-11 22.8 19.9 15.8-24.8 5.6.1 25.4-19.9-15.9-19.8 15.9.1-25.4-24.8-5.6 19.9-15.8-11.1-22.8 24.8 5.7zm197.9 28.5 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.6v12.2l-9.4-7.6-9.5 7.6.1-12.2-11.8-2.6 9.5-7.5-5.3-10.9 11.8 2.7zm-48.6-116 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.7v12.1l-9.4-7.6-9.5 7.6.1-12.1-11.9-2.7 9.5-7.5-5.3-10.9L332 136zm48.6-66.2 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.7v12.1l-9.4-7.6-9.5 7.6.1-12.1-11.8-2.7 9.5-7.5-5.3-10.9 11.8 2.7zm42.5 49.7 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.6V150l-9.4-7.6-9.5 7.6v-12.2l-11.8-2.6 9.5-7.5-5.3-10.9 11.8 2.7zM398 166.5l4.1 12.7h13.3l-10.8 7.8 4.2 12.7-10.8-7.9-10.8 7.9 4.1-12.7-10.7-7.8h13.3z",fill:"#FFF"}),s.createElement("path",{fill:"#00008b",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"red"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},qc=function(t){var n=t.title,r=F(t,jv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 363 242"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 0h363v242H0z"}),s.createElement("path",{fill:"#FFF",d:"M57 96.9 14.7 78.2 57 59.6l18.6-42.2 18.6 42.2 42.3 18.6-42.3 18.7-18.6 42.2z"}),s.createElement("path",{fill:"#f30028",d:"m75.6 40.6 11.5 26.1 26.1 11.5-26.1 11.5-11.5 26.1-11.5-26.1L38 78.2l26.1-11.5z"}),s.createElement("path",{d:"M0 152.2h363v15.7H0zm0 31.4h363v15.7H0z",fill:"#FFDA44"}))},Qc=function(t){var n=t.title,r=F(t,kv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M513 210.9H202.2V342h-79.8V210.9H0v-79.8h122.4V0h79.8v131.1H513v61.2z"}),s.createElement("path",{fill:"#D80027",d:"M513 149.7v42.6H183.7V342H141V192.3H0v-42.6h141V0h42.7v149.7z"}))},Yc=function(t){var n=t.title,r=F(t,Fv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ef3340",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#00b5e2",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#509e2f",d:"M0 228h513v114H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M265.6 212.6c-23 0-41.6-18.6-41.6-41.6s18.6-41.6 41.6-41.6c7.2 0 13.9 1.8 19.8 5-9.2-9-21.9-14.6-35.8-14.6-28.3 0-51.2 22.9-51.2 51.2s22.9 51.2 51.2 51.2c13.9 0 26.6-5.6 35.8-14.6-5.9 3.2-12.6 5-19.8 5z"}),s.createElement("path",{d:"m297.6 142.2 5.5 15.5 14.9-7.1-7.1 14.9 15.5 5.5-15.5 5.5 7.1 14.9-14.9-7.1-5.5 15.5-5.5-15.5-14.9 7.1 7.1-14.9-15.5-5.5 15.5-5.5-7.1-14.9 14.9 7.1z"})))},Xc=function(t){var n=t.title,r=F(t,Dv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#10338C",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#F6C500",d:"M99.9 0h342v342"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M19.9 21.1 40.3 6.2 60.9 21 54 0H26.7z"}),s.createElement("path",{d:"M92.3 25.5 84.4 1.3l-7.8 24.2H51.3l20.5 14.8-7.8 24 20.4-14.8L105 64.3l-7.9-24 20.5-14.9z"}),s.createElement("path",{d:"m136.3 69.2-7.8-24-7.8 24H95.5l20.4 14.9-7.8 24 20.4-14.8 20.6 14.8-7.8-24 20.4-14.9z"}),s.createElement("path",{d:"m179.4 112.3-7.8-24.1-7.8 24.1h-25.3l20.5 14.9-7.8 24 20.4-14.8 20.6 14.8-7.9-24 20.5-15z"}),s.createElement("path",{d:"m222.5 155.3-7.8-24-7.8 24h-25.4l20.6 15-7.8 24 20.4-14.9 20.4 14.9-7.8-24 20.6-15z"}),s.createElement("path",{d:"m265.6 198.4-7.8-24-7.8 24h-25.4l20.6 14.9-7.8 24.1 20.4-14.9 20.4 14.9-7.8-24.2 20.5-14.8z"}),s.createElement("path",{d:"m308.7 241.5-7.9-24-7.8 24h-25.3l20.5 14.8-7.9 24.2 20.6-14.9 20.4 14.8-7.8-24.1 20.5-14.8z"}),s.createElement("path",{d:"m351.7 284.6-7.8-24.2-7.8 24.2h-25.3l20.4 14.8-7.8 24.1 20.5-14.9 20.5 14.9-7.8-24.1 20.4-14.8z"}),s.createElement("path",{d:"m387 303.5-7.9 24.1-25.3.1 19.8 14.3h26.6l19.9-14.4h-25.3z"})))},Zc=function(t){var n=t.title,r=F(t,Av);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ffc726",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h171v342H0zm342 0h171v342H342z",fill:"#00267f"}),s.createElement("path",{d:"m325.74 101.02-31.97 12.4c-.68 1.35-5.79 7.54-8.18 53.06h-17.05v-60.42L256 78.68l-12.54 27v60.8H226.4c-2.39-45.53-7.8-52.48-8.47-53.84l-31.68-11.63c.15.31 15.4 31.34 15.4 78.01v12.54h41.81v71.07h25.08v-71.07h41.81v-12.54c0-24.13 4.17-44.02 7.68-56.46 3.82-13.57 7.7-21.49 7.74-21.57l-.03.03z"}))},Jc=function(t){var n=t.title,r=F(t,Hv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#2d6e41",d:"M0 85.331h513v342H0z"}),s.createElement("circle",{fill:"#F40B32",cx:218.902,cy:256.5,r:115}))},Rc=function(t){var n=t.title,r=F(t,Tv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#fdda25",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#ef3340",d:"M342 0h171v342H342z"}))},ed=function(t){var n=t.title,r=F(t,Pv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#3d944f",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#ef2b2d",d:"M0 0h513v171H0z"}),s.createElement("path",{fill:"#FFDA44",d:"m256 102.6 16.9 52h54.7l-44.2 32.2 16.8 52-44.2-32.1-44.2 32.1 16.8-52-44.2-32.2h54.7z"}))},td=function(t){var n=t.title,r=F(t,Iv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#00966e",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#d62612",d:"M0 228h513v114H0z"}))},nd=function(t){var n=t.title,r=F(t,Ov);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"m222.8 34.3-85.2 34.2 85.2 34.1-85.2 34.1 85.2 34.1-85.2 34.1 85.2 34.1-85.2 34.1 85.2 34.1-85.2 34.8H0V0h137.6z"}))},rd=function(t){var n=t.title,r=F(t,Lv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M215.9 170.7 0 314.6V26.8zM513 26.8v287.8L297.1 170.7z",fill:"#47a644"}),s.createElement("path",{fill:"#0052B4",d:"M513 26.8 296.1 170.7 513 314.6V342h-41.1L256 197.4 40.1 342H0v-27.4l215.9-143.9L0 26.8V0h40.1L256 143.9 471.9 0H513z"}),s.createElement("path",{fill:"#FFF",d:"M513 26.8 297.1 170.7 513 314.6V342h-40L256 197.4 39 342H0v-27.4l215.9-143.9L0 26.8V0h40.1L256 143.9 471.9 0H513z"}),s.createElement("circle",{fill:"#FFF",cx:251.6,cy:170.7,r:100.2}),s.createElement("path",{d:"m251.4 103.6 7.4 12.9h14.8l-7.4 12.8 7.4 12.8h-14.8l-7.4 12.9-7.4-12.9h-14.8l7.4-12.8-7.4-12.8H244zm38.8 66.7 7.4 12.9h14.8L305 196l7.4 12.8h-14.8l-7.4 12.9-7.4-12.9h-14.9l7.4-12.8-7.4-12.8h14.9zm-77.2 0 7.4 12.9h14.9l-7.4 12.8 7.4 12.8h-14.9l-7.4 12.9-7.4-12.9h-14.8l7.4-12.8-7.4-12.8h14.8z",fill:"#D80027",stroke:"#47a644",strokeWidth:3}))},sd=function(t){var n=t.title,r=F(t,_v);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#008751",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#fcd116",d:"M197 0h316v171H197z"}),s.createElement("path",{fill:"#e8112d",d:"M197 171h316v171H197z"}))},ld=function(t){var n=t.title,r=F(t,Vv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M157.3 199.8s-9 43.9-19.3 40.4c-10.6-3.5-17.5-18.8-17.5-18.8L106 242.6s38.2 8.5 41 5.5c1.2-1.1 8.2-15.1 10.3-26.1v-22.2zm-56.1 60.5s-2.5 20.2-1.1 22.7c1.2 2.3 39.5 11.3 39.5 11.3s-25 16.5-29.7 20.5l-18.1-29.9-.7-24.6h10.1zm11.3-165.7s39.7 41.6 40.4 45.5c.7 3.7-4.2 3.2-4.2 3.2s-44.8-37.5-49.9-41.1c-5.4-3.5 13.7-7.6 13.7-7.6zm246.7 106.7s9 42.4 19.2 38.9c10.6-3.5 17.5-18.8 17.5-18.8l14.5 21.2s-37 8.5-39.8 5.5c-1.2-1.1-9.3-13.8-11.5-24.7l.1-22.1zm56 59s2.5 20.2 1.1 22.7c-1.2 2.3-39.5 11.3-39.5 11.3s25 16.5 29.7 20.5l18.1-29.9.7-24.6h-10.1zM403.9 94.6s-39.6 41.6-40.4 45.5c-.7 3.7 4.2 3.2 4.2 3.2s44.8-37.5 49.9-41.1c5.2-3.5-13.7-7.6-13.7-7.6z",fill:"#E6BC00"}),s.createElement("path",{d:"M99.4 104.7s17-.7 16.6-11.5c-.4-10.6-11.2-14.9-19.1-12.4-8 2.3-23 13.4-13.6 35.1 9.4 21.4 23.4 29.4 26.2 47.8 0 0-5.5 9.9-19.1.4-16.9-11.8-6.2-38.2-10.4-45-4.2-7.1-41-38.9-41-38.9s-30.2 39.4-18 74.9c17 49.2 51.7 32 64.6 36.8 0 0-42.1 62-49.6 67.1 0 0 24.1 8.3 47.8-18.8 0 0 5.8 9.7 7.1 20.2h10.3c4.8-26.2 51.5-64.3 49.9-82.3-1.8-21.3-49.2-49.5-51.7-73.4zM365.1 178c-1.6 18.1 45.1 56.1 49.9 82.3h10.3c1.2-10.4 7.1-20.2 7.1-20.2 23.7 27.1 47.8 18.8 47.8 18.8-7.4-5.1-49.6-67.1-49.6-67.1 12.9-4.8 47.7 12.4 64.6-36.8 12.2-35.6-18-74.9-18-74.9s-36.7 31.8-41 38.9c-4.2 6.7 6.5 33.2-10.4 45-13.7 9.5-19.1-.4-19.1-.4 2.8-18.4 16.8-26.4 26.2-47.8 9.4-21.6-5.7-32.8-13.6-35.1-8-2.5-18.8 1.8-19.1 12.4-.4 10.8 16.6 11.5 16.6 11.5-2.5 24-49.9 52.2-51.7 73.4z",fill:"#ADADAD"}),s.createElement("path",{fill:"#125ECC",d:"M157.3 87.1h201.8v145.5c0 16.1-9.7 21.4-21.9 31.8l-45.9 39.4c-18.2 15.6-47.9 15.6-66.1 0l-46-39.4c-12.1-10.4-21.9-15.7-21.9-31.8V87.1z"}),s.createElement("path",{fill:"#FFE600",d:"M200.6 147.7c-8 0-14.4-6.4-14.4-14.4s6.4-14.4 14.4-14.4 14.4 6.4 14.4 14.4-6.5 14.4-14.4 14.4zm57.6-3c-8 0-14.4-6.4-14.4-14.4s6.4-14.4 14.4-14.4 14.4 6.4 14.4 14.4-6.4 14.4-14.4 14.4zm57.7 3c-8 0-14.4-6.4-14.4-14.4s6.5-14.4 14.4-14.4 14.4 6.4 14.4 14.4-6.5 14.4-14.4 14.4zM215 274.4c-8 0-14.4-6.5-14.4-14.4 0-8 6.4-14.4 14.4-14.4s14.4 6.4 14.4 14.4-6.5 14.4-14.4 14.4zm43.2 14.5c-8 0-14.4-6.5-14.4-14.4s6.4-14.4 14.4-14.4 14.4 6.5 14.4 14.4-6.4 14.4-14.4 14.4zm43.2-14.5c-8 0-14.4-6.5-14.4-14.4 0-8 6.5-14.4 14.4-14.4s14.4 6.4 14.4 14.4c.1 8-6.4 14.4-14.4 14.4z"}),s.createElement("path",{fill:"#D60537",d:"M157.3 175.4h201.8V233H157.3v-57.6z"}),s.createElement("path",{fill:"#EACE00",d:"M142.9 43.8s57.6-14.4 115.3-14.4 115.3 14.4 115.3 14.4l-14.4 57.7s-50.5-14.4-100.9-14.4-100.9 14.4-100.9 14.4l-14.4-57.7z"}),s.createElement("path",{fill:"#7A6920",d:"M258.2 72.7c-8 0-14.4-6.4-14.4-14.4s6.4-14.4 14.4-14.4 14.4 6.5 14.4 14.4-6.4 14.4-14.4 14.4zm57.7 5c-8 0-14.4-6.4-14.4-14.4s6.5-14.4 14.4-14.4 14.4 6.5 14.4 14.4-6.5 14.4-14.4 14.4zm-115.3 0c-8 0-14.4-6.4-14.4-14.4s6.4-14.4 14.4-14.4S215 55.3 215 63.2s-6.5 14.5-14.4 14.5z"}),s.createElement("circle",{fill:"#FFF",cx:258.2,cy:204.2,r:16.9}))},id=function(t){var n=t.title,r=F(t,Bv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#c8102e",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#fff",stroke:"#000",strokeWidth:2,d:"M303.9 94.94v99.69c0 59.81 79.75 99.69 79.75 99.69s79.75-39.88 79.75-99.69V94.94H303.9z"}),s.createElement("path",{fill:"#2F8F22",d:"M436.37 254.44H330.93c23.13 25.08 52.72 39.88 52.72 39.88s29.59-14.8 52.72-39.88z"}),s.createElement("circle",{fill:"#65B5D2",cx:383.65,cy:214.56,r:39.88}),s.createElement("circle",{fill:"#c8102e",cx:343.77,cy:194.63,r:19.94}),s.createElement("circle",{fill:"#c8102e",cx:423.52,cy:194.63,r:19.94}),s.createElement("circle",{fill:"#c8102e",cx:383.65,cy:154.75,r:19.94}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#c8102e"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},od=function(t){var n=t.title,r=F(t,$v);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m0 193.74 513 127.19V214.26L0 97.08z"}),s.createElement("path",{fill:"#FFF",d:"M513 234.26v-86.67L0 20.41v86.67"}),s.createElement("g",{fill:"#D80027",stroke:"#231F20",strokeWidth:3,strokeMiterlimit:10},s.createElement("path",{d:"M306.4 134.01a50.28 50.28 0 0 1 6.07 24.02c0 21.55-13.51 39.94-32.52 47.19v-59.51c5.7-1.19 10-6.37 10-12.59 6.9 0 12.5-5.75 12.5-12.85h-.42c6.9 0 12.91-5.75 12.91-12.85h-34.99V76.58l-14.99-27.71-15 27.71v30.84h-34.99c0 7.1 6.01 12.85 12.91 12.85h-.42c0 7.1 5.6 12.85 12.5 12.85 0 6.22 4.29 11.4 9.99 12.59v61.37c-22.09-5.39-38.48-25.3-38.48-49.05 0-8.7 2.2-16.88 6.07-24.02-10.96 11.21-17.72 26.53-17.72 43.44 0 34.32 27.82 62.15 62.15 62.15s62.15-27.83 62.15-62.15c0-16.91-6.77-32.24-17.72-43.44z"}),s.createElement("path",{d:"M198.46 226.81s20.69 27.71 66.5 27.71 66.5-27.71 66.5-27.71l13.47 28.37s-21.03 27.71-79.97 27.71-79.97-27.71-79.97-27.71l13.47-28.37zm-69.22-93.63h20.88l24.93 27.26v73.45h-26.28v-68.37zm270.76 0h-20.88l-24.93 27.26v73.45h26.27v-68.37z"})))},ad=function(t){var n=t.title,r=F(t,Wv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#d52b1e",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#f9e300",d:"M0 114h513v114H0z"}),s.createElement("path",{fill:"#007934",d:"M0 228h513v114H0z"}))},cd=function(t){var n=t.title,r=F(t,Uv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012a87",d:"M0 342h513V0z"}),s.createElement("path",{fill:"#f9d90f",d:"M250.4 0H0v166.9z"}),s.createElement("path",{fill:"#dc171d",d:"m140.4 118.3 12.2 21.2h24.5l-12.3 21.1 12.3 21.2h-24.5L140.4 203l-12.2-21.2h-24.5l12.3-21.2-12.3-21.1h24.5z"}),s.createElement("circle",{fill:"none",stroke:"#000",strokeWidth:9,strokeMiterlimit:10,cx:140.4,cy:160.6,r:57.7}))},dd=function(t){var n=t.title,r=F(t,Gv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#DC171D",d:"M512 342H0V.7h512V342z"}),s.createElement("path",{fill:"#012A87",d:"M512 342H0V171.3h512V342z"}),s.createElement("path",{fill:"#FFF",d:"M256 342 0 171.3 256 .7l256 170.7L256 342z"}),s.createElement("path",{fill:"#F9D90F",d:"m199.2 249.5 21.7-66.8-56.8-41.2h70.5L256 74.7l21.7 66.8h70.2l-56.8 41.2 21.7 66.8-56.8-41.3z"}))},ud=function(t){var n=t.title,r=F(t,Kv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",width:900,height:600},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h900v600H0z",fill:"#dc171d"}),s.createElement("path",{d:"M450 168.787 215.691 300 450 431.213 684.309 300z",fill:"#fff"}),s.createElement("path",{d:"M281.477 336.852V376h69.961l290.727-52.4V376h-93.668z",fill:"#dc171f"}),s.createElement("path",{d:"M188 288H20V20h418v128zm524 0h168V20H462v128zm-524 24H20v268h418V452zm524 0h168v268H462V452z",fill:"#012a87"}),s.createElement("path",{d:"m450 199.5 8.068 24.827h26.105l-21.12 15.346 8.067 24.827L450 249.157 428.88 264.5l8.066-24.827-21.119-15.345 26.105-.001z",fill:"#f9d90f"}),s.createElement("path",{d:"M281.477 336.852c2.712-8.848 8.614-12.77 16.594-10.995 4.94-18.73 27.739-22.07 36.786-12.857l22.273 22.37c4.837 2.251 12.207 3.095 17.326 3.095 6.33.1 5.621 3.005 10.91 3.106 14.096.27 51.143.458 57.857 0 2.75-.187 64.134-67.857 64.134-67.857 5.12-6.31 18.453-8.333 25.714-3.214 6.786 6.429 13.929 7.143 18.929 2.857 4.405-6.547 14.392-7.309 20.714-3.571l69.45 53.815L548.497 376H351.438l-69.96-39.148z",fill:"#008830"}))},hd=function(t){var n=t.title,r=F(t,qv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012a87",d:"M0 342h513V0z"}),s.createElement("path",{fill:"#f9d90f",d:"M250.4 0H0v166.9z"}),s.createElement("path",{fill:"#dc171d",d:"m140.4 118.3 12.2 21.2h24.5l-12.3 21.1 12.3 21.2h-24.5L140.4 203l-12.2-21.2h-24.5l12.3-21.2-12.3-21.1h24.5z"}),s.createElement("circle",{fill:"none",stroke:"#000",strokeWidth:9,strokeMiterlimit:10,cx:140.4,cy:160.6,r:57.7}))},md=function(t){var n=t.title,r=F(t,Qv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#009b3a",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#fedf00",d:"m256.5 19.3 204.9 151.4L256.5 322 50.6 170.7z"}),s.createElement("circle",{fill:"#FFF",cx:256.5,cy:171,r:80.4}),s.createElement("path",{fill:"#002776",d:"M215.9 165.7c-13.9 0-27.4 2.1-40.1 6 .6 43.9 36.3 79.3 80.3 79.3 27.2 0 51.3-13.6 65.8-34.3-24.9-31-63.2-51-106-51zm119 20.3c.9-5 1.5-10.1 1.5-15.4 0-44.4-36-80.4-80.4-80.4-33.1 0-61.5 20.1-73.9 48.6 10.9-2.2 22.1-3.4 33.6-3.4 46.8.1 89 19.5 119.2 50.6z"}))},fd=function(t){var n=t.title,r=F(t,Yv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ffc72c",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0zm0 228h513v114H0z",fill:"#00778b"}),s.createElement("path",{d:"M256 171 0 342V0z"}))},pd=function(t){var n=t.title,r=F(t,Xv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FF7415",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M513 0H0v342"}),s.createElement("path",{fill:"none",stroke:"#FFF",strokeWidth:42,strokeMiterlimit:10,d:"M128.7 255.5s35 54 67.3 32.4c56.9-37.9-68.9-108.6-2.9-152.6 58.3-38.8 76.6 103.5 137.6 62.8 59-39.3-64.7-111.4-9.2-148.4 33.4-22.2 67.1 32.6 67.1 32.6"}))},gd=function(t){var n=t.title,r=F(t,Zv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#EF2B2D",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",className:"prefix__st1",d:"M139.9 0h93.3v342h-93.3z"}),s.createElement("path",{fill:"#FFF",className:"prefix__st1",d:"M0 119h513v104.1H0z"}),s.createElement("path",{fill:"#002868",d:"M163.2 0h46.6v342h-46.6z"}),s.createElement("path",{fill:"#002868",d:"M0 145h513v52H0z"}))},vd=function(t){var n=t.title,r=F(t,Jv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 238h513v104H0zM0 0h513v104H0z",fill:"#6da9d2"}),s.createElement("path",{d:"M0 125.5h513v89.656H0z"}))},xd=function(t){var n=t.title,r=F(t,Rv);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#007C30",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#CE1720",d:"M0 230h513V0H0"}),s.createElement("path",{fill:"#FFF",d:"M100 230V0H0v342h513-413z"}),s.createElement("path",{d:"M28 159.6 8.6 128.2 28 97.4l19.3 30.8zm44.6 0-19.3-31.4 19.3-30.8L92 128.2zM28 241.2 8.6 209.8 28 179l19.3 30.8zm44.6 0-19.3-31.4L72.6 179 92 209.8z",fill:"#CE1720"}),s.createElement("path",{d:"m28 73.8-16.1-26L28 22.2l16 25.6zm44.6 0-16-26 16-25.6 16.1 25.6zM28 318l-16.1-26.1L28 266.3l16 25.6zm44.6 0-16-26.1 16-25.6 16.1 25.6z",fill:"none",stroke:"#CE1720",strokeWidth:7}))},wd=function(t){var n=t.title,r=F(t,ex);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#003e87",d:"M0 0h513v342H0z"}),s.createElement("circle",{fill:"#FFF",cx:260.9,cy:170.9,r:118.9}),s.createElement("circle",{fill:"none",stroke:"#6DA544",strokeWidth:18,strokeMiterlimit:10,cx:261.9,cy:173.1,r:94.5}),s.createElement("g",{stroke:"#000"},s.createElement("path",{fill:"#003e87",d:"m261.9 151.5-50.6 23.4v20c0 11.8 6.1 22.8 16.2 28.9L262 239l34.5-15.2c10-6.2 16.2-17.1 16.2-28.9v-20l-50.8-23.4z"}),s.createElement("path",{fill:"#FFDA44",d:"M211.3 128.1h101.3v46.7H211.3z"})),s.createElement("path",{d:"M0 0h513v35H0zm0 306h513v35H0z",fill:"#ce1127"}))},bd=function(t){var n=t.title,r=F(t,tx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h142v342H0zm371 0h142v342H371zm-64.5 206 50.4-25.2-25.2-12.6V143l-50.4 25.2 25.2-50.4h-25.2L256.1 80l-25.2 37.8h-25.2l25.2 50.4-50.4-25.2v25.2l-25.2 12.6 50.4 25.2-12.6 25.2h50.4V269h25.2v-37.8h50.4z",fill:"red"}))},Ed=function(t){var n=t.title,r=F(t,nx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"green",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m422.7 252.4 6.2 12.8 13.8-3.2-6.2 12.8 11.2 8.8-13.9 3.2V301l-11.1-8.9-11.1 8.9v-14.2l-13.8-3.2 11.1-8.8-6.2-12.8 13.9 3.2zm-46.6-136.3 6.2 12.9 13.8-3.2-6.2 12.8 11.2 8.8-13.9 3.1v14.3l-11.1-8.9-11.1 8.9.1-14.3-13.9-3.1 11.1-8.8-6.2-12.8L370 129zm37-77.8 6.2 12.8 13.8-3.2-6.2 12.8 11.2 8.9-13.9 3.1v14.2L413.1 78 402 86.9l.1-14.2-13.9-3.1 11.1-8.9-6.2-12.8 13.9 3.2zm51.8 58.4 6.2 12.8 13.9-3.2-6.3 12.8 11.2 8.9-13.9 3.1.1 14.2-11.2-8.9-11.1 8.9.1-14.2L440 128l11.2-8.9-6.3-12.8 13.9 3.2zm-28 68.1 4.9 14.8h15.6l-12.6 9.2 4.8 14.9-12.7-9.2-12.6 9.2 4.8-14.9-12.6-9.2h15.6zM306.8 254.7c-49.2 0-89.1-39.9-89.1-89.1s39.9-89.1 89.1-89.1c15.3 0 29.8 3.9 42.4 10.7C329.4 67.9 302.3 56 272.5 56c-60.5 0-109.6 49.1-109.6 109.6S212 275.3 272.5 275.3c29.8 0 56.9-11.9 76.6-31.3-12.6 6.8-27 10.7-42.3 10.7zM140.4 59.5C129.7 41 109.7 28.6 86.8 28.6S44 41 33.3 59.5h107.1zm.2.4-53.8 53.8-53.7-53.8C28 68.9 25 79.3 25 90.5c0 34.2 27.7 61.9 61.9 61.9s61.9-27.7 61.9-61.9c-.1-11.2-3.1-21.6-8.2-30.6z",fill:"#FFDA44"}),s.createElement("path",{fill:"#A2001D",d:"M71.4 98.2v52.2c4.9 1.3 10.1 1.9 15.5 1.9s10.5-.7 15.5-1.9V98.2h-31z"}))},yd=function(t){var n=t.title,r=F(t,rx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M513 66.9V0H411.7L0 274.4V342h100.3z"}),s.createElement("path",{fill:"#D80027",d:"M513 0v40.1L60.2 342H0v-40.8L451.8 0z"}),s.createElement("path",{fill:"#FFDA44",d:"m93.6 31.2 16.3 50.4H163l-42.9 31.2 16.4 50.5-42.9-31.2-43 31.2L67 112.8 24.1 81.6h53.1z"}))},Cd=function(t){var n=t.title,r=F(t,sx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#d21034",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 171h211.5v85.3H0zm300.5 0H512v85.3H300.5z",fill:"#3a9927"}),s.createElement("path",{fill:"#003082",d:"M0 0v85.3h211.5V0h89v85.3H513V0z"}),s.createElement("path",{d:"M300.5 85.3H512v85.3H300.5zM0 85.3h211.5v85.3H0z",fill:"#FFF"}),s.createElement("path",{d:"M300.5 342h-89v-86H0v86h513v-86H300.5zM105.7 8.6l8.6 26.2h27.5L119.5 51l8.6 26.2L105.7 61 83.4 77.2 91.9 51 69.6 34.8h27.6z",fill:"#ffce00"}))},Sd=function(t){var n=t.title,r=F(t,lx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#009739",d:"M0 0h900v600H0z"}),s.createElement("path",{d:"M0 600 600 0h300v600z",fill:"#ffd100"}),s.createElement("path",{d:"M900 0v600H300z",fill:"#dc241f"}))},zd=function(t){var n=t.title,r=F(t,ix);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 768 512"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"red",d:"M0 0h768v512H0V0z"}),s.createElement("path",{fill:"#FFF",d:"M336 96h96v112h112v96H432v112h-96V304H224v-96h112V96z"}))},Md=function(t){var n=t.title,r=F(t,ox);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#009e60",d:"M342 0h171v342H342z"}),s.createElement("path",{fill:"#f77f00",d:"M0 0h171v342H0z"}))},Nd=function(t){var n=t.title,r=F(t,ax);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m384 71.4 5.3 16.2h17.1l-13.9 10.1 5.3 16.2-13.8-10-13.8 10 5.3-16.2-13.9-10.1h17.1zm-70.2 29.1 15.2 7.7 12.1-12.1-2.7 16.9 15.3 7.8-16.9 2.6-2.7 16.9-7.8-15.2-16.8 2.7 12.1-12.1zm-29.1 70.2 16.3-5.3v-17.1l10 13.8 16.3-5.3-10.1 13.9 10.1 13.8-16.3-5.3-10 13.8v-17.1zm29.1 70.2 7.7-15.3-12-12 16.8 2.6 7.8-15.2 2.7 16.9 16.9 2.7-15.3 7.7 2.7 16.9-12.1-12.1zM384 270l-5.3-16.3h-17.1l13.9-10-5.3-16.3 13.8 10 13.8-10-5.3 16.3 13.9 10h-17.1zm70.2-29.1-15.2-7.8-12.1 12.1 2.7-16.9-15.3-7.7 16.9-2.7 2.7-16.9 7.8 15.2 16.8-2.6-12.1 12zm29.1-70.2-16.3 5.2V193l-10-13.8-16.3 5.3 10.1-13.8-10.1-13.9 16.3 5.3 10-13.8v17.1zm-29.1-70.2-7.7 15.2 12 12.1-16.8-2.7-7.8 15.2-2.7-16.9-16.9-2.6 15.3-7.8-2.7-16.9 12.1 12.1z",fill:"#FFF"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},jd=function(t){var n=t.title,r=F(t,cx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M196 0h317v171H196z"}),s.createElement("path",{fill:"#0037A1",d:"M0 0h196v171H0z"}),s.createElement("path",{fill:"#FFF",d:"M98 24.5 113.1 71H162l-39.6 28.7 15.2 46.5L98 117.5l-39.6 28.7 15.2-46.5L34 71h48.9z"}))},kd=function(t){var n=t.title,r=F(t,dx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ce1126",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#007a5e",d:"M0 0h171v342H0z"}),s.createElement("path",{d:"M342 0h171v342H342zm-86 102.2 17.2 53H329L283.9 188l17.2 53-45.1-32.7-45.1 32.7 17.2-53-45.1-32.8h55.8z",fill:"#fcd116"}))},Fd=function(t){var n=t.title,r=F(t,ux);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},Dd=function(t){var n=t.title,r=F(t,hx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 256.5h513V342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 171h513v85.5H0z"}))},Ad=function(t){var n=t.title,r=F(t,mx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 114h513v114H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 285h513v57H0zM0 0h513v57H0z"}))},Hd=function(t){var n=t.title,r=F(t,fx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FF9811",d:"M0-40.8v422.9-211.4z"}),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v68.3H0zm0 136.5h513v68.3H0zm0 136.6h513v68.3H0z",fill:"#0052B4"}),s.createElement("path",{fill:"#D80027",d:"M256 170.7 0 342V0z"}),s.createElement("path",{fill:"#FFF",d:"m86.5 111.4 12.7 39.2h41.3l-33.4 24.2 12.8 39.3-33.4-24.2-33.4 24.2 12.8-39.3-33.4-24.2h41.2z"}))},Td=function(t){var n=t.title,r=F(t,px);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#003893",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#cf2027",d:"M0 182.2h513v41.4H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 140.8h513v41.4H0zm0 82.8h513V265H0z"}),s.createElement("path",{d:"m150.4 70 6.9 21.1h22.2l-18 13.1 6.9 21.1-18-13.1-17.9 13.1 6.8-21.1-17.9-13.1h22.2zm0 209.7 6.9 21.1h22.2l-18 13 6.9 21.2-18-13.1-17.9 13.1 6.8-21.2-17.9-13h22.2zm-97.6-70.9 6.9 21.1h22.2l-18 13 6.9 21.2-18-13.1-17.9 13.1 6.8-21.2-17.9-13H46zM90.1 91l6.9 21.1h22.2l-18 13 6.9 21.2-18-13.1-17.9 13.1 6.8-21.2-18-13h22.3zm-66.3 71H46l6.8-21.1 6.9 21.1h22.2l-18 13.1 6.9 21.1-18-13-17.9 13 6.8-21.1zm48.4 148.9 6.8-21.1-18-13h22.3l6.8-21.2 6.9 21.2h22.2l-18 13 6.9 21.1-18-13zM248 208.8l-6.9 21.1h-22.2l18 13-6.9 21.2 18-13.1 18 13.1-6.9-21.2 18-13h-22.2zM210.7 91l-6.8 21.1h-22.2l17.9 13-6.8 21.2 17.9-13.1 18 13.1-6.9-21.2 18-13h-22.2zm66.4 71h-22.2l-6.9-21.1-6.9 21.1h-22.2l18 13.1-6.9 21.1 18-13 18 13-6.9-21.1zm-48.4 148.9-6.9-21.1 18-13h-22.2l-6.9-21.2-6.8 21.2h-22.2l17.9 13-6.8 21.1 17.9-13z",fill:"#f7d116",stroke:"#000"}))},Pd=function(t){var n=t.title,r=F(t,gx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#002b7f",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#f9e814",d:"M0 233.5h513v51H0z"}),s.createElement("path",{d:"m168.7 86.5 12.9 39.8h41.8l-33.8 24.5 12.9 39.7-33.8-24.5-33.8 24.5 12.9-39.7-33.8-24.5h41.8zm-83.3-54 7.8 23.9h25L97.9 71.1l7.8 23.8-20.3-14.7-20.3 14.7 7.8-23.8-20.3-14.7h25.1z",fill:"#FFF"}))},Id=function(t){var n=t.title,r=F(t,vx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0021ad",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#1c8a42",d:"M0 0h513v342"}),s.createElement("path",{d:"m77.6 272 5.7 11.9 12.8-3-5.7 11.9 10.3 8.1-12.8 2.9V317l-10.3-8.3-10.2 8.3v-13.2l-12.8-2.9 10.3-8.1-5.8-11.9 12.9 3zm-37.1-98.9 5.7 11.9 12.8-3-5.7 11.8 10.3 8.2-12.9 2.9.1 13.2-10.3-8.3-10.3 8.3.1-13.2-12.9-2.9 10.4-8.2L22 182l12.8 3zm37.1-80.9 5.7 11.8 12.8-2.9-5.7 11.8 10.3 8.2-12.8 2.9v13.1l-10.3-8.2-10.2 8.2V124l-12.8-2.9 10.3-8.2-5.8-11.8L72 104zm46.1 62.9 5.7 11.9 12.8-3-5.7 11.9 10.3 8.1-12.8 2.9v13.2l-10.3-8.2-10.2 8.2v-13.2l-12.8-2.9 10.3-8.1-5.7-11.9 12.8 3zm-32.9 54 4.4 13.7h14.5L98 231.3l4.5 13.7-11.7-8.4-11.7 8.4 4.5-13.7-11.7-8.5h14.4z",fill:"#FFF"}),s.createElement("circle",{fill:"#ffc639",cx:267.1,cy:170.7,r:74.5}),s.createElement("path",{fill:"#1c8a42",d:"M267.1 220.3h24.8s10.8-19 0-37.2l24.8-24.8-12.4-24.8h-12.4s-6.2 18.6-31 18.6-31-18.6-31-18.6h-12.4l12.4 24.8-12.4 24.8 12.4 12.4s12.4-24.8 37.2-12.4c0 0 10.5 15.5 0 37.2z"}),s.createElement("path",{fill:"#ffc639",d:"M464.4 92.2c.6-2.9-.2-17.6-.2-20.7 0-21.3-13.9-39.4-33.2-45.7 5.9 12 9.2 25.4 9.2 39.7 0 4.8-.4 9.5-1.1 14.1-2.9-4.7-6.6-8.9-11.2-12.6-17.1-13.6-40.6-14-57.9-2.5 13.4 2.9 26.3 8.9 37.7 18 9 7.1 16.2 16.8 21.7 26.1 0 0-17.8 10.9-31 15.1s-42.3 7.9-42.3 7.9c72 12 132-36 132-36-6.5-13.4-15.8-4-23.7-3.4z"}))},Od=function(t){var n=t.title,r=F(t,xx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#DB7D00",d:"M141.7 154.7s.2 67.1 74.7 65.3l4.5 13.9h8.9s-7.4-41.1 60.1-41.5c0 0 0-27.6 27.6-27.6H359s-66-51.8 58.9-118l1.8-13.1s-129.9 71-198.9 57.2c0 0 10.7 42.5-10.8 42.5-10.8 0-9.7-8.1-32.3-8.1-18.7 0-17.3 19.7-26.3 19.5-8.9-.2-18.8-12.3-19.6-10.2-.7 2.1 9.9 20.1 9.9 20.1z"}),s.createElement("g",{fill:"#006651"},s.createElement("path",{d:"M237.2 308.1c6.9-5 13-6.6 22.4-8.3s19.4-4.4 24.6-5.8-17.7 6.6-23.5 8.3c-5.8 1.6-23.5 5.8-23.5 5.8zm37.9-14.7c-1.9-11.9 2.8-24.3 13.5-29.3 2.5 8.6-5.2 23.2-13.5 29.3zm18.2-6.2c-5.8-9.8 4-22.6 11.1-28.8 3.3 6-2.5 23.7-11.1 28.8zm16.9-7.6c-6.2-8.4 1.1-23.2 8.8-29 3.1 8.2.1 23.2-8.8 29zm16.9-10.6c-5.6-8-1.7-20.4 6.3-28.4 5.8 6.6.9 21-6.3 28.4zm13.5-10.7c-4.7-7.5 1.1-25.4 8.6-30.4 3.3 6.6.8 25.4-8.6 30.4zm10.8-2.8c-1.4-10.8 17.4-22.7 25.2-22.4-.9 8.9-8.9 18.6-25.2 22.4zm-10.5 12.2c8.8-9.1 26-9.1 32.1-7.2-1.7 5.3-21.9 16.9-32.1 7.2z"}),s.createElement("path",{d:"M328.7 276.8c12.4-3.3 20.5-6.1 27.9 1.7-5.2 6.6-25.4 4.7-27.9-1.7zm-17.7 8c11.9-6.4 26.3 3 28.5 8.6-13.3 5.5-28.7-7.2-28.5-8.6zm-16.3 9.2c10.8-4.1 23.2 1.4 28.2 7.5-5.8 2.7-21 5.7-28.2-7.5zm-14.9 4.7c12.4-1.4 24.4 8 27 13.4-15.9 1.5-22-3.2-27-13.4zm-4 9.4c-6.9-5-13-6.6-22.4-8.3-9.4-1.7-19.4-4.4-24.6-5.8-5.3-1.4 17.7 6.6 23.5 8.3 5.8 1.6 23.5 5.8 23.5 5.8zm-37.9-14.7c1.9-11.9-2.8-24.3-13.5-29.3-2.5 8.6 5.2 23.2 13.5 29.3zm-18.2-6.2c5.8-9.8-4-22.6-11.1-28.8-3.3 6 2.5 23.7 11.1 28.8zm-16.9-7.6c6.2-8.4-1.1-23.2-8.8-29-3.1 8.2-.1 23.2 8.8 29zM185.9 269c5.6-8 1.7-20.4-6.3-28.4-5.8 6.6-.9 21 6.3 28.4zm-13.5-10.7c4.7-7.5-1.1-25.4-8.6-30.4-3.3 6.6-.8 25.4 8.6 30.4zm-10.8-2.8c1.4-10.8-17.4-22.7-25.2-22.4.9 8.9 8.9 18.6 25.2 22.4zm10.5 12.2c-8.8-9.1-26-9.1-32.1-7.2 1.7 5.3 21.9 16.9 32.1 7.2z"}),s.createElement("path",{d:"M184.3 276.8c-12.4-3.3-20.5-6.1-27.9 1.7 5.2 6.6 25.4 4.7 27.9-1.7zm17.7 8c-11.9-6.4-26.3 3-28.5 8.6 13.3 5.5 28.7-7.2 28.5-8.6zm16.3 9.2c-10.8-4.1-23.2 1.4-28.2 7.5 5.8 2.7 21 5.7 28.2-7.5zm14.9 4.7c-12.4-1.4-24.4 8-27 13.4 15.9 1.5 22-3.2 27-13.4z"})))},Ld=function(t){var n=t.title,r=F(t,wx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#11457e",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#d7141a",d:"M513 171v171H0l256.5-171z"}),s.createElement("path",{fill:"#FFF",d:"M513 0v171H256.5L0 0z"}))},_d=function(t){var n=t.title,r=F(t,bx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 228h513v114H0z"}))},Vd=function(t){var n=t.title,r=F(t,Ex);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#12ad2b",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#6ab2e7",d:"M513 0v166.7L0 170.8V0z"}),s.createElement("path",{fill:"#FFF",d:"M256 170.7 0 342V0z"}),s.createElement("path",{fill:"#d7141a",d:"m89.8 92.5 17 52.4H162l-44.6 32.5 17 52.4-44.6-32.4-44.6 32.4 17-52.4-44.6-32.5h55.2z"}))},Bd=function(t){var n=t.title,r=F(t,yx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#c60c30",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M190 0h-60v140H0v60h130v142h60V200h323v-60H190z"}))},$d=function(t){var n=t.title,r=F(t,Cx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#496E2D",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 110.7v120h513v-120z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 110.7h513v40H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 190.7h513v40H0z"}),s.createElement("path",{d:"M196 0h120v342H196z"}),s.createElement("path",{fill:"#FFDA44",d:"M196 0h40v342h-40z"}),s.createElement("path",{fill:"#FFF",d:"M274.7 0h40v342h-40z"}),s.createElement("circle",{fill:"#D80027",cx:256,cy:170.7,r:123.1}),s.createElement("path",{d:"m256 58.6 4.6 14.2h15l-12.1 8.9 4.6 14.2-12.1-8.8-12.1 8.8 4.6-14.2-12.1-8.9h15zM190.1 80l12.2 8.8 12.1-8.8-4.6 14.3 12.1 8.8h-15l-4.6 14.2-4.7-14.2h-15l12.1-8.8zm-40.7 56h15l4.6-14.2 4.7 14.2h15l-12.2 8.8 4.7 14.3-12.2-8.8-12.1 8.8 4.6-14.3zm0 69.3 12.1-8.8-4.6-14.3L169 191l12.2-8.8-4.7 14.3 12.2 8.8h-15l-4.7 14.3-4.6-14.3zm40.7 56.1 4.6-14.3-12.1-8.8h15l4.7-14.3 4.6 14.3h15l-12.1 8.8 4.6 14.3-12.1-8.9zm65.9 21.4-4.6-14.3h-15l12.1-8.8-4.6-14.3 12.1 8.8 12.1-8.8-4.6 14.3 12.1 8.8h-15zm65.9-21.4-12.2-8.9-12.1 8.9 4.6-14.3-12.1-8.8h15l4.6-14.3 4.7 14.3h15l-12.1 8.8zm40.7-56.1h-15l-4.6 14.3-4.7-14.3h-15l12.2-8.8-4.7-14.3L343 191l12.1-8.8-4.6 14.3zm0-69.3-12.1 8.8 4.6 14.3-12.1-8.8-12.2 8.8 4.7-14.3-12.2-8.8h15l4.7-14.2 4.6 14.2zm-40.7-56-4.6 14.3 12.1 8.8h-15l-4.7 14.2-4.6-14.2h-15l12.1-8.8-4.6-14.3 12.1 8.8zM279.3 168.7c-11-21.1-14.5-25.1-14.5-25.1s.4-9.7.4-15.6c0-8.8-7.4-15.8-16.5-15.8-8.6 0-15.7 2.9-16.5 11-4.2.9-8.6 4.1-8.6 10.7 0 4.8 1 7.3 5.2 9.3 2.1-4.6 4.3-4.8 9.3-6.4.8.6 1.7 3 2.6 3.4l.3 1s-13.3 6.6-13.3 30.9c0 29.5 22 45.4 22 45.4l-1.8.3-1.9 7.1h22v-7.2l11 17.5c.3-.3 10.2-47.6.3-66.5z",fill:"#496E2D"}))},Wd=function(t){var n=t.title,r=F(t,Sx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 216h211v126H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 0h211v126H0z"}),s.createElement("path",{fill:"#D80027",d:"M302 0h211v126H302z"}),s.createElement("path",{fill:"#0052B4",d:"M302 216h211v126H302z"}),s.createElement("g",{stroke:"#FFF",strokeWidth:5,strokeMiterlimit:10},s.createElement("path",{fill:"#0052B4",d:"M256 130h-49.9v49.4s19.5 6 49.9 6V130z"}),s.createElement("path",{fill:"#D80027",d:"M206.1 179.4v6c0 27.5 22.3 49.9 49.9 49.9v-49.9c-30.4 0-49.9-6-49.9-6z"}),s.createElement("path",{fill:"#0052B4",d:"M256 235.3c27.5 0 49.9-22.3 49.9-49.9v-6s-19.5 6-49.9 6v49.9z"}),s.createElement("path",{fill:"#D80027",d:"M256 130v55.4c30.4 0 49.9-6 49.9-6V130H256z"})))},Ud=function(t){var n=t.title,r=F(t,zx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#41662E",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M256.5 0H513v342H256.5z"}),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"m341.5 105.3-29.4 40.4-47.5-15.4 29.4 40.4-29.4 40.4 47.5-15.4 29.4 40.4v-50l47.5-15.5-47.5-15.4z"}),s.createElement("path",{d:"M309.9 276.7c-58.5 0-106-47.5-106-106s47.5-106 106-106c18.3 0 35.4 4.6 50.4 12.7-23.5-23-55.7-37.2-91.2-37.2-72 0-130.4 58.4-130.4 130.4S197.1 301 269.1 301c35.5 0 67.7-14.2 91.2-37.2-14.9 8.2-32.1 12.9-50.4 12.9z"})))},Gd=function(t){var n=t.title,r=F(t,Mx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 170.7h513V256H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 256h513v85.3H0z"}),s.createElement("circle",{fill:"#FFDA44",cx:256,cy:171,r:60}),s.createElement("path",{fill:"#4C1F00",d:"M369.2 79.9s-27.2-13.8-33.9-16c-6.7-2.2-49.1-13.2-49.1-7 0 10.3-13.5 12-15.5 12s-2-5.3-14.8-5.3-13.7 4.8-15.8 4.8c-2.2 0-14.5-1-14.5-11.5 0-5.2-42.9 4-49.1 7-6.1 3.1-33.9 16-33.9 16s45.8 2.7 53.9 6.2 43.8 16.5 43.8 16.5l-2.8 13.3h37.8l-3.8-13.3s35.1-12.7 43.8-16.5 53.9-6.2 53.9-6.2z"}),s.createElement("path",{fill:"#57BA17",d:"M217.7 171.7c0 21.1 17.2 38.3 38.3 38.3 21.1 0 38.3-17.2 38.3-38.3v-11.5h-76.5v11.5z"}),s.createElement("path",{fill:"#338AF3",d:"M256 110.5c-21.1 0-38.3 17.2-38.3 38.3v11.5h76.5v-11.5c.1-21.1-17.1-38.3-38.2-38.3z"}))},Kd=function(t){var n=t.title,r=F(t,Nx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#111",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#368FD8",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 228h513v114H0z"}))},qd=function(t){var n=t.title,r=F(t,jx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{d:"M0 228h513v114H0z"}),s.createElement("path",{fill:"#C09300",d:"M220.3 204.4s0-58.4 4.5-64.7c3.1-4.3 16.8 5.2 22.7 4.5 0 0 4.2-7.5 4.5-12 .3-4.6-1.1-7.6-4.9-6.2 0 0-1.2-2.1.5-3.3 1.6-1.2 5.6.1 5.6.1s-.5-1 1.6-.9c2.9.2 7.2 1.4 7.4 5.6.2 3.1.3 7.7.4 8.7.7 6.8 2.7 8.7 2.7 8.7s18.4-9.2 22-5.2c3.3 3.8 4.5 64.7 4.5 64.7l-18.1-16.8 12.1 29.5s-14.4 2.4-28.9 2.4c-14.5 0-31.1-4.2-31.1-4.2l13.8-28.2-19.3 17.3z"}))},Qd=function(t){var n=t.title,r=F(t,kx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#428823",d:"M0 228h513v114H0z"}),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M256 171 0 342V0zm53.1 0c0-22.9 13.1-42.1 34.6-46.8-3.3-.7-6.7-1.1-10.3-1.1-26.4 0-47.9 21.4-47.9 47.9s21.4 47.9 47.9 47.9c3.5 0 7-.4 10.3-1.1-21.5-5.1-34.6-24.2-34.6-46.8z"}),s.createElement("path",{d:"m365 129.2 10.3 31.7h33.3l-27 19.6 10.3 31.7-26.9-19.6-27 19.6 10.3-31.7-27-19.6h33.4z"})))},Yd=function(t){var n=t.title,r=F(t,Fx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#56AF35",d:"M0 0h513v171H0z"}),s.createElement("path",{fill:"#D80027",d:"m0 342 513-171L0 0v342z"}),s.createElement("g",{fill:"#ffc945"},s.createElement("path",{d:"M134.7 231.5c33.6 0 60.8-27.2 60.8-60.8s-27.2-60.8-60.8-60.8-60.8 27.2-60.8 60.8 27.2 60.8 60.8 60.8zm0 24.3c-47 0-85.2-38.1-85.2-85.2s38.1-85.2 85.2-85.2 85.2 38.1 85.2 85.2-38.2 85.2-85.2 85.2z"}),s.createElement("circle",{cx:119.5,cy:148.3,r:17.5}),s.createElement("circle",{cx:148.9,cy:158.5,r:17.5}),s.createElement("circle",{cx:134.7,cy:135.2,r:17.5}),s.createElement("circle",{cx:119.5,cy:172.7,r:17.5}),s.createElement("circle",{cx:149.9,cy:182.8,r:17.5}),s.createElement("circle",{cx:122.5,cy:198,r:17.5}),s.createElement("circle",{cx:145.9,cy:205.2,r:17.5})))},Xd=function(t){var n=t.title,r=F(t,Dx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",width:810,height:540},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FCDD09",d:"M0 0h810v540H0z"}),s.createElement("path",{stroke:"#DA121A",strokeWidth:60,d:"M0 90h810m0 120H0m0 120h810m0 120H0"}))},Zd=function(t){var n=t.title,r=F(t,Ax);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22.5 15"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h22.5v15H0V0z"}),s.createElement("path",{fill:"#D03433",d:"M0 0h22.5v4H0V0zm0 11h22.5v4H0v-4z"}),s.createElement("path",{fill:"#FBCA46",d:"M0 4h22.5v7H0V4z"}),s.createElement("path",{fill:"#FFF",d:"M7.8 7h1v.5h-1V7z"}),s.createElement("path",{fill:"#A41517",d:"M7.2 8.5c0 .3.3.5.6.5s.6-.2.6-.5L8.5 7H7.1l.1 1.5zM6.6 7c0-.3.2-.5.4-.5h1.5c.3 0 .5.2.5.4V7l-.1 1.5c-.1.6-.5 1-1.1 1-.6 0-1-.4-1.1-1L6.6 7z"}),s.createElement("path",{fill:"#A41517",d:"M6.8 7.5h2V8h-.5l-.5 1-.5-1h-.5v-.5zM5.3 6h1v3.5h-1V6zm4 0h1v3.5h-1V6zm-2.5-.5c0-.3.2-.5.5-.5h1c.3 0 .5.2.5.5v.2c0 .2-.1.3-.3.3H7c-.1 0-.2-.1-.2-.2v-.3z"}))},Jd=function(t){var n=t.title,r=F(t,Hx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22.5 15"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#20AA46",d:"M0 0h22.5v5H0V0z"}),s.createElement("path",{fill:"#E92F3B",d:"M0 10h22.5v5H0v-5z"}),s.createElement("path",{fill:"#FADF50",d:"M0 5h22.5v5H0V5z"}),s.createElement("circle",{fill:"#205CCA",cx:11.3,cy:7.5,r:5.2}),s.createElement("g",{stroke:"#FFDB3D",fill:"none"},s.createElement("path",{d:"m11.3 8.8-2.1 1.5.8-2.4-2-1.5h2.5l.8-2.3.8 2.3h2.6l-2.1 1.5.8 2.4-2.1-1.5zm-1-2.4h1.9M9.9 7.8l1.3 1m.8-2.6.7 1.8M10 7.9l.6-1.8M11 9l1.6-1.1",strokeWidth:.5}),s.createElement("path",{d:"m8.7 3.9 1.1 1.6m4-1.7-1 1.6m-1.5 4.7V12M8.9 8.3 7.1 9m8.4 0-1.8-.7",strokeWidth:.25})))},Rd=function(t){var n=t.title,r=F(t,Tx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 810 540"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#039",d:"M0 0h810v540H0z"}),s.createElement("path",{fill:"#FC0",d:"m404.951 59.865 6.735 20.718h21.894l-17.633 12.812 6.638 20.74-17.634-12.812-17.634 12.812 6.736-20.729-17.633-12.812h21.796zm-90 24 6.735 20.718h21.894l-17.633 12.812 6.638 20.74-17.634-12.812-17.634 12.812 6.736-20.729-17.633-12.812h21.796zm-66 66 6.735 20.718h21.894l-17.633 12.812 6.638 20.74-17.634-12.812-17.634 12.812 6.736-20.729-17.633-12.812h21.796zm-24 89.999 6.735 20.719h21.894l-17.633 12.813 6.638 20.74-17.634-12.813-17.634 12.813 6.736-20.731-17.633-12.811h21.796zm24 90.001 6.735 20.719h21.894l-17.633 12.811 6.638 20.74-17.634-12.811-17.634 12.811 6.736-20.729-17.633-12.812h21.796zm66 66 6.735 20.719h21.894l-17.633 12.811 6.638 20.74-17.634-12.811-17.634 12.811 6.736-20.729-17.633-12.812h21.796zm180-312 6.735 20.718h21.894l-17.633 12.812 6.637 20.74-17.633-12.812-17.635 12.812 6.737-20.729-17.633-12.812h21.795zm66 66 6.735 20.718h21.894l-17.633 12.812 6.637 20.74-17.633-12.812-17.635 12.812 6.737-20.729-17.633-12.812h21.795zm24 90 6.735 20.718h21.894l-17.633 12.813 6.638 20.74-17.634-12.813-17.634 12.813 6.736-20.731-17.633-12.811h21.796zm-24 90 6.735 20.719h21.894l-17.633 12.811 6.638 20.74-17.634-12.811-17.634 12.811 6.736-20.729-17.633-12.812h21.796zm-156 90 6.735 20.719h21.894l-17.633 12.811 6.638 20.74-17.634-12.811-17.634 12.811 6.736-20.729-17.633-12.812h21.796zm90-24.001 6.735 20.719h21.894l-17.633 12.812 6.639 20.74-17.635-12.812-17.633 12.812 6.735-20.73-17.633-12.811h21.797z"}))},e1=function(t){var n=t.title,r=F(t,Px);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#2E52B2",d:"M513 129.3V212H203.7v130H121V212H0v-82.7h121V0h82.7v129.3z"}))},t1=function(t){var n=t.title,r=F(t,Ix);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#62B5E5",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#F3F3F3",d:"M307.1 127.1v92c0 61.6 80.5 80.5 80.5 80.5s80.4-19 80.4-80.6v-92l-80.5-23-80.4 23.1z"}),s.createElement("path",{fill:"#c8102e",d:"M468 132.8V98.3H307.1v34.5h69v69h-69v23h69V296c6.9 2.5 11.5 3.5 11.5 3.5s4.6-1.1 11.5-3.5v-71.2h69v-23h-69v-69H468z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},n1=function(t){var n=t.title,r=F(t,Ox);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})),s.createElement("path",{fill:"#2a7fff",d:"M311.2 190.2v-90c0-8.5 6.5-15.3 15-15.3h120.5c8.3 0 15 6.8 15 15.3v90c0 75.2-75.2 105.3-75.2 105.3s-75.3-30.1-75.3-105.3z"}),s.createElement("path",{fill:"#FFF",d:"M311.2 190.2v-90c0-8.5 6.5-15.3 15-15.3h120.5c8.3 0 15 6.8 15 15.3v90c0 75.2-75.2 105.3-75.2 105.3s-75.3-30.1-75.3-105.3zm79.6 86.3c7.9-4.5 15.9-10 23.2-16.7 20.5-18.5 32.6-41.4 32.6-69.7v-90c0-.3-120.4-.3-120.4-.3v90.3c0 28.3 12.1 51.2 32.6 69.7 8.3 7.5 17.6 13.9 27.6 19 1.4-.6 2.8-1.4 4.4-2.3z"}),s.createElement("path",{fill:"#3e6d1e",d:"M346.1 189.4c-2.6-7.9 1.7-14.3 10.1-14.3h60.5c8.2 0 12.8 6.3 10.1 14.3l-5.5 16.5c-2.6 7.9-8.9 9.2-15.8 4 0 0 2.6-4.8-19.1-4.8s-19.1 4.8-19.1 4.8c-6.1 5.7-13.1 4-15.8-4 .1.1-5.4-16.5-5.4-16.5z"}),s.createElement("path",{fill:"#e5e5e5",d:"M356.4 175.1c8.1 1.6 17.8-15 30.1-15 13.1 0 21.8 17.1 30.1 15 7.4-1.8 15-22.2 15-30.1 0-16.6-20.2-30.1-45.1-30.1s-45.1 13.5-45.1 30.1c-.1 8.5 6.6 28.5 15 30.1z"}),s.createElement("path",{fill:"#FFF",d:"M355 266.7c6.2.4 12.5-1.8 17.2-6.5l9-9c2.9-2.9 7.5-2.9 10.4 0l9 9c4.7 4.7 11 6.9 17.1 6.5 5.3-.3 32.5-33.5 25.7-32.6-4.6.6-9.1 2.8-12.7 6.3l-.1.1-9 9c-2.9 2.9-7.5 2.9-10.4 0l-9-9c-8.7-8.8-22.9-8.8-31.7-.1l-.1.1-9 9c-2.9 2.9-7.5 2.9-10.4 0l-9-9c-3.5-3.5-7.8-5.6-12.3-6.3-6.7-1.1 20.1 32.2 25.3 32.5zM321.1 206c2.9-2.9 7.5-2.9 10.4 0l9 9c8.8 8.7 22.9 8.7 31.7 0l9-9c2.9-2.9 7.5-2.9 10.4 0l9 9c8.8 8.7 22.9 8.7 31.7 0l9-9c2.9-2.9 7.5-2.9 10.4 0 0 0 5.5-14.8 2.5-15.9-7.9-2.9-17.2-1.2-23.5 5.2l-.1.1-9 9c-2.9 2.9-7.5 2.9-10.4 0l-9-9c-8.7-8.8-22.9-8.8-31.7-.1l-.1.1-9 9c-2.9 2.9-7.5 2.9-10.4 0l-9-9c-6.2-6.2-15.1-8-22.8-5.5-3.1 1.1 1.9 16.1 1.9 16.1z"}))},r1=function(t){var n=t.title,r=F(t,Lx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m256 37.9 10.1 31.2H299l-26.6 19.3 10.2 31.2-26.6-19.3-26.6 19.3 10.2-31.2L213 69.1h32.9zM123.2 170.7l31.2-10.2v-32.8l19.3 26.6 31.2-10.2-19.3 26.6 19.3 26.5-31.2-10.1-19.3 26.5v-32.8zM256 303.5l-10.1-31.2H213l26.6-19.3-10.2-31.3L256 241l26.6-19.3-10.2 31.3 26.6 19.3h-32.9zm132.8-132.8-31.2 10.1v32.8l-19.3-26.5-31.2 10.1 19.3-26.5-19.3-26.6 31.2 10.2 19.3-26.6v32.8z",fill:"#FFF"}))},s1=function(t){var n=t.title,r=F(t,_x);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0F61A5",d:"M513 214.5H206.2V342h-87.8V214.5H0v-87.7h118.4V0h87.8v126.8H513V192z"}),s.createElement("path",{fill:"#E50E3D",d:"M513 149.3V192H183.7v150H141V192H0v-42.7h141V0h42.7v149.3z"}))},l1=function(t){var n=t.title,r=F(t,Vx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#00318A",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M342 0h171v342H342z"}))},i1=function(t){var n=t.title,r=F(t,Bx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 228h513v114H0z"}))},o1=function(t){var n=t.title,r=F(t,$x);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 136h513v70H0z"}),s.createElement("path",{fill:"#D80027",d:"M221.5 0h70v342h-70z"}))},a1=function(t){var n=t.title,r=F(t,Wx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 136h513v70H0z"}),s.createElement("path",{fill:"#D80027",d:"M221.5 0h70v342h-70z"}),s.createElement("path",{fill:"#FFF",stroke:"#231F20",strokeMiterlimit:10,d:"m256.5 87.8-24 41.4h-48.8l24.7 42.1-24.7 42.1h48.8l24 42.1 24-42.1h48.8l-24.7-42.1 24.7-42.1h-48.8l-24-41.4z"}),s.createElement("path",{fill:"#D80027",d:"M258.6 130.6c-3.3 0-3.3 3.3-3.3 3.3V160h-2v-22s0-4-3.3-4c-4 0-4 4-4 4v23.4l-2 .7v-16.7s0-4-3.3-4c-4 0-4 4-4 4V174c0 6.7 3.3 13.4 8 17.4v14h24V194c6-3.3 10.7-9.4 12-16.7 0-4 1.3-7.3 2.7-10.7l2.7-9.4s.7-3.3-2.7-4.7-4.7 2-4.7 2l-5.3 12.7h-2v-31.4s0-3.3-3.3-3.3c-4 0-4 3.3-4 3.3v24h-1.3v-26.1c-.2.2-.2-3.1-4.2-3.1z"}),s.createElement("path",{fill:"#FFDA44",stroke:"#231F20",strokeMiterlimit:10,d:"M249.2 25.7V33h-7.3v14.7h7.3v14c-4-4-9.4-6-14.7-6-12.2-.1-22.1 9.6-22.3 21.8-.1 6.1 2.4 12 6.9 16.3v13.4h74.8V93.8c4-4.7 6.7-10 6.7-16-.2-12.2-10.3-21.9-22.4-21.6-5.3.1-10.4 2.1-14.3 5.6v-14h7.3V33.1h-7.3v-7.3l-14.7-.1z"}))},c1=function(t){var n=t.title,r=F(t,Ux);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#005EB8",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 302.1V342h59.9l196.6-131.1L453.1 342H513v-39.9L316.4 171 513 39.9V0h-59.9L256.5 131.1 59.9 0H0v39.9L196.7 171z"}))},d1=function(t){var n=t.title,r=F(t,Gx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v171H0z"}),s.createElement("path",{fill:"#529E3C",d:"M0 171h513v171H0z"}),s.createElement("path",{fill:"#D11C1C",d:"m201 259.8 28.2-4.8-21.8-10.3 14.9-8.4s25.2 21.2 25.2 14.4c0-7.3 23.7-4.1 22.7-14.4-1.3-14.1-26.2-1-30.6-18.7-2.5-9.9-10.3-8.6-10.3-8.6l-25.1 8.6-12.5 18.7-6.2-18.7s-14.6 11.9-19.5 18.7c-5.2 7.3-10.7 23.5-10.7 23.5l25.6 10.7-37.3-6.6-27.2 6.6-16.7 4.6 7.3-7.7-15-7.6 15-9-7.3-6.1 32.3 6.1s11.8-1.2 16.3-6.1c5.6-6.2 10.1-27.1 10.1-27.1l-14.8-8.6-11.6 21s-8-19.9-15.6-31c-5.7-8.3-24.3-27.3-24.3-27.3l-24 12.6 13.4-26.7s10.6-9.3 3.9-18.8c-6.8-9.5-12.4-30.9-12.4-30.9s14.1 24.4 19.2 22.5c7.2-2.7-9-25 0-28.9 6.5-2.9 7.6 25.5 7.6 25.5l7.3-13.9v17.3s-4.3 20.7 3 33c7.2 12.3 28.7 20.9 28.7 20.9s-5.6-12.3 0-36c3.8-16 17.2-43.4 23.6-52.1 3.3-4.6-26.7 17-26.7 17v-17l-28.6-2.9-7.3 8.3-18.3-30L104 83.1h34.6l-6.7-8.3H104s5.9-12.1 34.6-12.1l13.6-9.2s18.6.5 29 .9c9.3.4 26.1-11.5 26.1-11.5l4.7 11.5-11 17.3 11.1 11.4-4.7 7 8.1 11.5H201l11.1 17.9-11.1-6.3 6.4 17.3-6.4 17.8 28.2-9.5s0-25.6 10.3-37.2C271.1 69.2 322.6 43 322.6 43s-2.7 23.5 4.9 25.4c11.1 2.7 59.4-19.4 59.4-19.4s-29 31.3-23.1 34.1c3.2 1.5 8.5 7 8.5 7s-25.1 20.5-29.3 29.3c-4.2 8.8 6.1 19.4 6.1 19.4s-21.7 0-32.5 9.5c32.5 0 59.1 15.4 74.8 4 10.5-7.6-37.7-2.9-31.4-21.9 2.4-7.1 8.5-15.2 22.6-17.3s19.1 6.3 19.1 6.3l7.6-11.5h-22.4l40.6-39.6 5.3 51.1-13.7-11.4-6.2 19.2c14.6 44.6-52.8 54.1-52.8 54.1l41.6 27.8-14.8 4.2-4.2 41.7 19.1 15.5-25-6.6-49.2 11.2 9.8-15.3-20.6 4.1 13.7-13.1-13.7-6.1 17.6-4.9 22.1 15.2s11-14.2 12.2-21.7c1.3-7.8-4.8-24.2-4.8-24.2s-32.6-.7-44.1-3.5-18.2-11.9-18.2-11.9l-13.1 15.4s45.5 17.1 34.1 24.2c-2.6 1.7-15.7-3.2-15.7-3.2s-22.4 26.2-36.8 29.7c-6.5 1.6 18.3 10.7 18.3 10.7s-21.2-3.4-32-6.6c-11.3-3.4-44.4 6.6-44.4 6.6l-11-10.7zM383.9 138c3.1 0 5.7-2.6 5.7-5.7s-2.6-5.7-5.7-5.7-5.7 2.6-5.7 5.7 2.5 5.7 5.7 5.7z"}))},u1=function(t){var n=t.title,r=F(t,Kx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M0 0h513v341.3H0V0z"}),s.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),s.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#012169"}),s.createElement("g",{fill:"#c8102e"},s.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),s.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},h1=function(t){var n=t.title,r=F(t,qx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#c60a0a",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#3E8446",d:"m256.5 170.7-212 126.1V44.5z"}),s.createElement("path",{d:"m256.5 170.7 211 126.1h-423zm211-126.2-211 126.2-212-126.2z",fill:"#FFDA44"}),s.createElement("path",{fill:"#3E8446",d:"M467.5 44.5v252.3l-211-126.1z"}),s.createElement("path",{d:"m256.5 10.4 2.8 10.2H270l-8.6 6.3 3.3 10.2-8.2-6.3-9.2 6.3 3.3-10.2-8.6-6.3h10.7zm-86.4 0 3.3 10.2h10.7l-8.6 6.3 3.3 10.2-8.7-6.3-8.7 6.3 3.3-10.2-8.6-6.3h10.7zm171.8 0 3.3 10.2H356l-8.7 6.3 3.3 10.2-8.7-6.3-8.7 6.3 3.3-10.2-8.6-6.3h10.7zm-85.4 293.8 2.8 10.2H270l-8.6 6.3 3.3 10.2-8.2-6.3-9.2 6.3 3.3-10.2-8.6-6.3h10.7zm-86.4 0 3.3 10.2h10.7l-8.6 6.3 3.3 10.2-8.7-6.3-8.7 6.3 3.3-10.2-8.6-6.3h10.7zm171.8 0 3.3 10.2H356l-8.7 6.3 3.3 10.2-8.7-6.3-8.7 6.3 3.3-10.2-8.6-6.3h10.7z",fill:"#FFDA44"}),s.createElement("circle",{fill:"#c60a0a",cx:244.5,cy:170.7,r:76.2}),s.createElement("path",{fill:"#FFDA44",d:"m244.5 110.1 13.6 41.8h44l-35.6 25.8 13.6 41.8-35.6-25.8-35.5 25.8 13.6-41.8-35.6-25.8h44zm-136.8 57.7c4.4 6.9 2.3 16.1-4.6 20.5s-16.1 2.3-20.5-4.6c-7.9-12.5-3.3-33-3.3-33s20.4 4.6 28.4 17.1z"}),s.createElement("circle",{fill:"#A2001D",cx:99.1,cy:182.1,r:7.4}))},m1=function(t){var n=t.title,r=F(t,Qx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22.5 15"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#fff",d:"M0 0h22.5v15H0z"}),s.createElement("path",{fill:"#eb000e",d:"M9.8 6H0v3h9.8v6h3V9h9.8V6h-9.8V0h-3v6z"}),s.createElement("path",{fill:"#eb000e",d:"m17.3 2.7-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2zm-12.7 0-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2zm0 9-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2zm12.7 0-.2-1.2h1l-.2 1.2 1.2-.2v1l-1.2-.2.2 1.2h-1l.2-1.2-1.2.2v-1l1.2.2z"}))},f1=function(t){var n=t.title,r=F(t,Yx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 90 60"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FDEB01",d:"m0 0 90 60H0z"}),s.createElement("path",{fill:"#58A846",d:"M90 0v60L0 0z"}),s.createElement("path",{fill:"#ED3D24",d:"m50.7 33.3 9.3-6.7H48.5L45 15.7l-3.5 10.9H30l9.3 6.7-3.6 11 9.3-6.7 9.3 6.7z"}))},p1=function(t){var n=t.title,r=F(t,Xx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M308 0H204v118.7H0v104h204V342h104V222.7h205v-104H308z"}),s.createElement("path",{fill:"#FFDA44",d:"m368.6 188 26 17.3V136l-26 17.3h-95.3V58.1l17.3-26h-69.2l17.3 26v95.2h-95.3l-26-17.3v69.3l26-17.3h95.3v95.2l-17.3 26h69.2l-17.3-26V188z"}))},g1=function(t){var n=t.title,r=F(t,Zx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#496E2D",d:"M0 228h513v114H0z"}),s.createElement("path",{d:"m255.9 113.8 14.1 43.4 40.4 3.2-37 26.9 19.5 40.3-37-26.9-37 26.9 14.1-43.5-36.9-26.9h45.7z"}))},v1=function(t){var n=t.title,r=F(t,Jx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 230h513v112H0z"}),s.createElement("path",{fill:"#D80027",stroke:"#000",strokeMiterlimit:10,d:"M363.1 131.8V99.1H374V77.3h-21.9v10.9h-21.8V77.3h-21.8v21.8h10.9v32.7h-21.8V55.5h10.9V33.7h-21.8v10.9h-10.9V33.7H254v10.9h-10.9V33.7h-21.8v21.8h10.9v76.3h-21.8V99.1h10.9V77.3h-21.8v10.9h-21.8V77.3h-21.8v21.8h10.9v32.7H145V219h239.9v-87.2z"}),s.createElement("path",{fill:"#FFDA44",stroke:"#000",strokeMiterlimit:10,d:"m264.9 235.5-24.2 18.2 19.1 14.3v31.3h-23.2v9h23v7.9h-23v9.3H270V268l19.1-14.3-24.2-18.2zm0 25.3-10.1-7.1 10.1-7.1 10.1 7.1-10.1 7.1z"}),s.createElement("path",{d:"M239.6 209.7v-27.9s.1-22.3 25-22.3c24.8 0 25.7 22 25.7 22v28.2h-50.7zm-69.1 0v-24.3s.1-18.7 19.6-18.7 20.2 18.4 20.2 18.4v24.5h-39.8z"}),s.createElement("path",{d:"M169.1 209.7v-24.3s.1-18.7 19.6-18.7 20.2 18.4 20.2 18.4v24.5h-39.8zm151.8 0v-24.3s.1-18.7 19.6-18.7 20.2 18.4 20.2 18.4v24.5h-39.8zm8.4-77.7v-15.7s.1-12.1 11.3-12.1c11.3 0 11.7 11.9 11.7 11.9V132h-23zm-78.8 0v-23.7s.1-18.3 14.3-18.3c14.2 0 14.7 18 14.7 18v24h-29zm-73 0v-15.7s.1-12.1 11.3-12.1 11.7 11.9 11.7 11.9V132h-23z"}))},x1=function(t){var n=t.title,r=F(t,Rx);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M513 0v171H0V0z"}),s.createElement("circle",{fill:"#FFF",cx:185.8,cy:171.2,r:117.8}),s.createElement("path",{fill:"#D80027",d:"M68 171c0-65.1 52.8-117.8 117.8-117.8 65.1 0 117.8 52.8 117.8 117.8"}))},w1=function(t){var n=t.title,r=F(t,e7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#cf0d19",d:"M0 0h513v100H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 121h513v100H0z"}),s.createElement("path",{fill:"#1a7e25",d:"M0 242h513v100H0z"}))},b1=function(t){var n=t.title,r=F(t,t7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h512v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M342 0h171v342H342z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h171v342H0z"}))},E1=function(t){var n=t.title,r=F(t,n7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#00318A",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M342 0h171v342H342z"}))},y1=function(t){var n=t.title,r=F(t,r7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 0h513v113.8H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 227.6h513V342H0z"}),s.createElement("path",{fill:"#0070C8",d:"M126 171 0 342V0z"}),s.createElement("path",{fill:"none",stroke:"#000",strokeMiterlimit:10,d:"M233.8 139.4v40.4c0 35.6 35.6 35.6 35.6 35.6s35.6 0 35.6-35.6v-40.4h-71.2z"}),s.createElement("path",{fill:"#786145",d:"M264.5 179.8h9.8l4 25.8h-17.8z"}),s.createElement("path",{fill:"#6DA544",d:"M287.2 162c0-9.8-8-14.8-17.8-14.8s-17.8 5-17.8 14.8c-4.9 0-8.9 4-8.9 8.9s4 8.9 8.9 8.9h35.6c4.9 0 8.9-4 8.9-8.9s-4-8.9-8.9-8.9z"}),s.createElement("path",{d:"m230.7 120 1.9 3.3h3.8l-1.9 3.3 1.9 3.2h-3.8l-1.9 3.3-1.9-3.3H225l1.9-3.2-1.9-3.3h3.8zm15.3 0 1.9 3.3h3.7l-1.9 3.3 1.9 3.2h-3.7l-1.9 3.3-1.9-3.3h-3.8l1.9-3.2-1.9-3.3h3.8zm15.3 0 1.9 3.3h3.7l-1.9 3.3 1.9 3.2h-3.7l-1.9 3.3-1.9-3.3h-3.8l1.9-3.2-1.9-3.3h3.8zm15.8 0 1.9 3.3h3.8l-1.9 3.3 1.9 3.2H279l-1.9 3.3-1.9-3.3h-3.7l1.8-3.2-1.8-3.3h3.7zm16 0 1.9 3.3h3.8l-1.9 3.3 1.9 3.2H295l-1.9 3.3-1.9-3.3h-3.7l1.8-3.2-1.8-3.3h3.7zm15 0 1.9 3.3h3.7l-1.9 3.3 1.9 3.2H310l-1.9 3.3-1.9-3.3h-3.8l1.9-3.2-1.9-3.3h3.8z",fill:"#FFDA00",stroke:"#000",strokeMiterlimit:10}))},C1=function(t){var n=t.title,r=F(t,s7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("g",{fill:"#0d5eaf"},s.createElement("path",{d:"M0 0h513v38H0zm0 76h513v38H0zm0 76h513v38H0zm0 76h513v38H0zm0 76h513v38H0z"}),s.createElement("path",{d:"M0 0h190v190H0z"})),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M0 76h190v38H0z"}),s.createElement("path",{d:"M76 0h38v190H76z"})))},S1=function(t){var n=t.title,r=F(t,l7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})),s.createElement("ellipse",{fill:"#FFF",cx:443.4,cy:233.6,rx:29,ry:43.5}),s.createElement("ellipse",{fill:"#FFCE00",cx:406.9,cy:317.7,rx:22,ry:9.3}),s.createElement("ellipse",{fill:"#FFCE00",cx:364,cy:317.7,rx:22,ry:9.3}),s.createElement("path",{fill:"#39B200",d:"m342 190.1 43.4 86.9 43.5-86.9z"}),s.createElement("ellipse",{fill:"#9B9B9B",cx:327.5,cy:233.6,rx:29,ry:43.5}),s.createElement("path",{fill:"#757575",d:"m371 175.6-14.5 14.5h57.9l-14.5-14.5 14.5-43.5s-13-29-29-29-29 29-29 29l14.6 43.5z"}),s.createElement("circle",{fill:"#C6B56F",cx:385.4,cy:67,r:29}),s.createElement("circle",{fill:"#923f00",cx:386,cy:88.7,r:29}),s.createElement("circle",{fill:"#FFF",cx:443.4,cy:117.7,r:29}),s.createElement("circle",{fill:"#0049FF",cx:342.2,cy:146.7,r:29}),s.createElement("circle",{fill:"#0041F9",cx:429.8,cy:146.7,r:29}),s.createElement("circle",{fill:"#F7D71E",cx:386,cy:233.6,r:29}),s.createElement("circle",{fill:"#CEC851",cx:457.9,cy:190.1,r:29}),s.createElement("circle",{fill:"#FFF",cx:385.4,cy:289.5,r:29}),s.createElement("path",{fill:"#7C0B29",d:"m371 135.7 14.5-3.5 14.5 3.5c0 7.5-14.5 11-14.5 11s-14.5-3.5-14.5-11z"}),s.createElement("circle",{fill:"#FFF",cx:327.5,cy:117.4,r:29}))},z1=function(t){var n=t.title,r=F(t,i7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h171v342H0zm342 0h171v342H342z",fill:"#338AF3"}),s.createElement("circle",{fill:"#DCC26D",cx:256,cy:155.8,r:25.5}),s.createElement("path",{fill:"#628A40",d:"M194.2 155.9c0 22.1 11.8 42.5 30.8 53.5 5.9 3.4 13.5 1.4 16.9-4.5 3.4-5.9 1.4-13.5-4.5-16.9-11.5-6.6-18.5-18.9-18.5-32.1 0-6.8-5.5-12.4-12.4-12.4s-12.3 5.5-12.3 12.4zm95.1 52.1c17.8-11.4 28.6-31 28.5-52.1 0-6.8-5.5-12.4-12.4-12.4-6.8 0-12.4 5.5-12.4 12.4 0 12.7-6.5 24.5-17.1 31.3-5.8 3.6-7.7 11.2-4.1 17 3.6 5.8 11.2 7.7 17 4.1.2-.1.3-.2.5-.3z"}))},M1=function(t){var n=t.title,r=F(t,o7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M11.1 11.1h489.7v319.1H11.1z"}),s.createElement("path",{fill:"#7DBEF1",d:"M256 285.3s76.4-51.3 76.4-114.6S256 56 256 56s-76.4 51.3-76.4 114.6S256 285.3 256 285.3z"}),s.createElement("path",{fill:"#1C8AE6",d:"M179.8 180.7h152.6l-29.3 64.9h-95.2z"}),s.createElement("path",{fill:"#FFF042",d:"M192.3 205.9s40.5 38.2 51 38.2c12.4 0 12.6-18.4 25.5-25.5 20.2-11.1 51-12.7 51-12.7L297 248.7l-41 36.6-46.8-39.7-16.9-39.7z"}),s.createElement("path",{fill:"#259C7B",d:"m256 157.5-22.5 15.6 7.9-26.2-21.8-16.5 27.4-.5 9-25.9 9 25.9 27.4.5-21.8 16.6 7.9 26.2-22.5-15.7z"}),s.createElement("path",{fill:"#8E5715",d:"M249.7 144.6c-.9 9.2-1.5 18.4-1.7 27.6-.3 11.9.3 20.7 2 26 2.2 6.6 7.2 12.9 14.2 18.9 5.3 4.6 10.6 8.1 14.2 10.1 3.1 1.7 7 .6 8.7-2.4 1.7-3.1.6-7-2.4-8.7-4.3-2.5-8.4-5.4-12.2-8.7-5.4-4.6-9.1-9.2-10.4-13.3-1.1-3.4-1.6-11.3-1.4-21.7.2-8.9.8-17.8 1.7-26.6.4-3.5-2.2-6.6-5.7-7-3.6-.3-6.7 2.3-7 5.8z"}),s.createElement("path",{fill:"#FFF",d:"m217.8 170.7 25.5 38.2h-25.5v-38.2z"}),s.createElement("path",{fill:"none",stroke:"#D80027",strokeWidth:12,strokeMiterlimit:10,d:"M256 285.3s76.4-51.3 76.4-114.6S256 56 256 56s-76.4 51.3-76.4 114.6S256 285.3 256 285.3z"}))},N1=function(t){var n=t.title,r=F(t,a7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#6DA544",d:"M0 0h512v342H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 0h512v171H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h182v342H0z"}),s.createElement("path",{d:"m98.3 109.8 15.1 46.5h48.9L122.8 185l15.1 46.5-39.6-28.7-39.5 28.7L73.9 185l-39.6-28.7h48.9z"}))},j1=function(t){var n=t.title,r=F(t,c7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#009E49",d:"M0 0h900v600H0V0z"}),s.createElement("path",{fill:"#FFF",d:"m0 0 947 300L0 600V0z"}),s.createElement("path",{fill:"#FFD00D",d:"M0 26.1 870 300 0 573.9V26.1z"}),s.createElement("path",{fill:"#2D2D2D",d:"m0 0 450 300L0 600V0z"}),s.createElement("path",{fill:"#D3132F",d:"m0 35 397.5 265L0 565V35z"}))},k1=function(t){var n=t.title,r=F(t,d7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 14"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h21v14H0V0z"}),s.createElement("path",{fill:"#EE1C25",d:"M0 0h21v14H0V0z"}),s.createElement("path",{fill:"#FFF",d:"M12 6.7c-.8-.5-1 .4-1 0 0-.8.9-1.5 2-1.5s2 .7 2 1.5c-.9 0-1 .5-1.5.5-.6 0-.7 0-1.5-.5zm1.2-.2c.1 0 .2-.1.2-.2s0-.3-.2-.3-.2.1-.2.2.1.3.2.3zm-1.8 2c.2-.9-.7-.8-.3-.9.8-.3 1.7.4 2 1.4.3 1.1 0 2.1-.8 2.4-.3-.9-.8-.8-.9-1.3-.1-.6-.2-.7 0-1.6zm.6 1.1c0 .1.2.2.3.2.1 0 .2-.2.2-.3s-.2-.2-.3-.2c-.2 0-.2.2-.2.3zM9.6 8.5c.9-.1.6-.9.8-.6.5.7.2 1.7-.7 2.4-.9.6-2 .6-2.5 0 .8-.6.6-1 .9-1.3.4-.4.5-.5 1.5-.5zm-.9.9c-.1 0-.2.2-.1.3s.3.2.4.1.1-.3 0-.4-.2-.1-.3 0zM9 6.7c.3.9 1 .3.8.6-.5.7-1.6.7-2.5 0-.9-.6-1.2-1.7-.7-2.4.8.6 1.1.2 1.5.5.4.4.5.4.9 1.3zm-1.1-.6c-.1-.1-.3 0-.4.1s-.1.3 0 .4c.1.1.3 0 .3-.1.2-.1.2-.3.1-.4zm2.6-.5c-.7.6.1 1.1-.3 1-.8-.3-1.2-1.4-.8-2.4.3-1 1.3-1.7 2-1.4-.3.9.2 1.1 0 1.6-.1.5-.2.6-.9 1.2zm.2-1.2c0-.1 0-.3-.1-.3s-.3 0-.3.1 0 .3.2.3c0 .1.1 0 .2-.1z"}))},F1=function(t){var n=t.title,r=F(t,u7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})),s.createElement("path",{d:"m189.2 212.6 11 22.9 24.7-5.7-11.1 22.8 19.9 15.8L209 274v25.4l-19.8-15.9-19.8 15.9.1-25.4-24.8-5.6 19.9-15.8-11.1-22.8 24.8 5.7zm197.9 28.5 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.6v12.2l-9.4-7.6-9.5 7.6.1-12.2-11.9-2.6 9.5-7.5-5.3-10.9 11.9 2.7zm-48.6-116 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.7v12.1l-9.4-7.6-9.5 7.6v-12.1l-11.8-2.7 9.5-7.5-5.3-10.9 11.8 2.7zm48.6-66.2 5.2 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.7v12.1l-9.4-7.6-9.5 7.6.1-12.1-11.9-2.7 9.5-7.5-5.3-10.9 11.9 2.7zm42.4 49.7 5.3 10.9 11.8-2.7-5.3 10.9 9.5 7.5-11.8 2.6V150l-9.5-7.6-9.4 7.6v-12.2l-11.8-2.6 9.5-7.5-5.3-10.9 11.8 2.7zm-30.3 57.9 4.1 12.7h13.3l-10.8 7.8 4.1 12.6-10.7-7.8-10.8 7.8 4.1-12.6-10.7-7.8h13.3z",fill:"#FFF"}))},D1=function(t){var n=t.title,r=F(t,h7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0zm0 228h513v114H0zm203.5-110.1 6.7 16.6 17.6 1-14 10.9 4.7 17.7-15-9.9-15 9.9 4.7-17.7-14-10.9 17.6-1zm105 0 6.7 16.6 17.6 1-14 10.9 4.7 17.7-15-9.9-15 9.9 4.7-17.7-14-10.9 17.6-1zM256 147.6l6.7 16.6 17.6 1-14 10.9 4.7 17.7-15-9.9-15 9.9 4.7-17.7-14-10.9 17.6-1zm-52.5 29.7 6.7 16.6 17.6 1-14 10.9 4.7 17.6-15-9.9-15 9.9 4.7-17.6-14-10.9 17.6-1zm105 0 6.7 16.6 17.6 1-14 10.9 4.7 17.6-15-9.9-15 9.9 4.7-17.6-14-10.9 17.6-1z",fill:"#338AF3"}))},A1=function(t){var n=t.title,r=F(t,m7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 228h513v114H0z"}),s.createElement("path",{d:"M309.3 113.2v-44l17.5-14.4 17.7 14.4v44zm-105.6 0v-44l-17.3-14.4-17.9 14.4v44zm35.2 0v-44l17.6-14.4 17.6 14.4v44z",fill:"#338AF3"}),s.createElement("path",{d:"M309.3 113.2h-35.2v-44l17.5-14.4 17.7 14.4zm-70.4 0h-35.2v-44l17.5-14.4 17.7 14.4z",fill:"#0052B4"}),s.createElement("path",{stroke:"#D80027",fill:"#FFF",d:"M168.5 113.2v101.9c0 24.3 14.4 46.2 35.4 59.4 21.3 13.4 42.1 14.7 52.6 14.7s31.4-1.7 52.6-14.8c21-13 35.4-35.1 35.4-59.3V113.2h-176z"}),s.createElement("path",{d:"M168.5 113.2h35.2v35.2h-35.2zm70.4 0h35.2v35.2h-35.2zm70.4 0h35.2v35.2h-35.2zm-105.6 35.2h35.2v35.2h-35.2zm70.4 0h35.2v35.2h-35.2zm-105.6 35.2h35.2v35.2h-35.2zm35.2 35.2h35.2V254h-35.2zm35.2-35.2h35.2v35.2h-35.2zm70.4 0h35.2v35.2h-35.2zm-35.2 35.2h35.2V254h-35.2zm35.2 55.5c8.6-5.4 16.2-12.3 22-20.3h-22v20.3zM181.7 254c5.8 8 13.3 14.9 22 20.4V254h-22zm57.2 0v33.7c7.2 1.2 13.3 1.5 17.6 1.5 4.3 0 10.4-.3 17.6-1.6V254h-35.2z",fill:"#D80027"}))},H1=function(t){var n=t.title,r=F(t,f7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#A2001D",d:"M0 0h513v172H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 172h513v172H0z"}),s.createElement("path",{fill:"#FFF",d:"m381.4 251.5-110.7-13.8-110.8 13.8V85.4h221.5z"}),s.createElement("circle",{fill:"#0052B4",cx:270.7,cy:182.3,r:55.4}),s.createElement("circle",{fill:"#A2001D",cx:270.7,cy:182.3,r:27.7}),s.createElement("path",{fill:"#6DA544",d:"M229.1 113.1h83.1l-41.5 41.5z"}),s.createElement("path",{fill:"#FFDA44",d:"M256.8 140.8h27.7v83h-27.7z"}),s.createElement("path",{fill:"#6DA544",d:"M314.9 215.5h-88.5l-66.5 36h221.5z"}))},T1=function(t){var n=t.title,r=F(t,p7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 228h513v114H0z"}))},P1=function(t){var n=t.title,r=F(t,g7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 300 200"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#fc0",d:"M0 0h300v200H0z"}),s.createElement("path",{fill:"#0768a9",d:"M0 0h200v200H0z"}),s.createElement("path",{fill:"#fff",d:"M0 0h100v200H0z"}))},I1=function(t){var n=t.title,r=F(t,v7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#E00",d:"M0 0h513v171H0z"}))},O1=function(t){var n=t.title,r=F(t,x7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#FF9811",d:"M342 0h171v342H342z"}))},L1=function(t){var n=t.title,r=F(t,w7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M340.6 122.4h-56.1l-28-48.6-28 48.6h-56.1l28 48.6-28 48.6h56.1l28 48.6 28-48.6h56.1l-28-48.6 28-48.6zM293.2 171 276 204.2h-38.9L219.8 171l17.2-33.2h38.9l17.3 33.2zm-36.7-71.8 11.9 23.3h-23.9l12-23.3zm-58.3 38.6h23.9l-10.8 21-13.1-21zm0 66.4 13-22.1 11.9 22.1h-24.9zm58.3 37.5-11.9-22.1h23.9l-12 22.1zm59.4-37.5h-25l11.9-22.1 13.1 22.1zm-26.1-66.4h26.1l-13 22.1-13.1-22.1zM0 21.3h512V64H0zm0 256h512V320H0z",fill:"#2E52B2"}))},_1=function(t){var n=t.title,r=F(t,b7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#E52D42",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M393.3 68.2h-45.8l-33.8 80.2-34.4-22.9s-24.7-59.1-34.4-68.2c-9.7-9.7-18.7-.6-48.9 7.8-29.6 8.4-30.8 18.7-42.2 18.7-4.8 0-19.9-17.5-27.7-22.3-12.1-7.8-16.9-4.2-13.9 7.2 1.2 4.8 10.9 10.9 16.9 19.9 7.8 11.5 12.7 25.9 12.7 25.9s10.9-10.3 16.9-12.1c9-2.4 19.3 1.8 31.4 0 15.1-2.4 31.4-10.9 31.4-10.9l4.2 43.4s-54.3 50.7-49.5 70.6 56.1 44.6 68.2 62.7c12.1 17.5-7.2 24.1-7.2 32.6s-1.8 19.9 7.2 16.3c9-3.6 10.3-18.1 18.7-31.4 6-9 10.3-13.9 11.5-17.5 1.8-9-23.5-32-37.4-48.9-6.6-7.8-19.9-18.7-19.9-18.7l39.2-29.6s67.6 27.7 82.6 18.7c15.1-9 19.3-98.3 19.3-98.3l47-11.5-12.1-11.7z"}),s.createElement("path",{fill:"#F8DD4E",d:"M279.3 262.4c-6 0-11.5-4.8-11.5-11.5s4.8-11.5 11.5-11.5c6 0 11.5 4.8 11.5 11.5s-5.5 11.5-11.5 11.5zm45.8-182.8c-6 0-11.5-4.8-11.5-11.5s4.8-11.5 11.5-11.5c6 0 11.5 4.8 11.5 11.5s-5.5 11.5-11.5 11.5zm0 91.1c-6 0-11.5-4.8-11.5-11.5 0-6 4.8-11.5 11.5-11.5 6 0 11.5 4.8 11.5 11.5-.6 6.7-5.5 11.5-11.5 11.5zm-136.9 45.8c-6 0-11.5-4.8-11.5-11.5 0-6 4.8-11.5 11.5-11.5 6.6 0 11.5 4.8 11.5 11.5s-5.5 11.5-11.5 11.5zm45.2-136.9c-6 0-11.5-4.8-11.5-11.5s4.8-11.5 11.5-11.5c6 0 11.5 4.8 11.5 11.5s-4.8 11.5-11.5 11.5zm22.9 91.1c-6 0-11.5-10.3-11.5-22.9s4.8-22.9 11.5-22.9c6 0 11.5 10.3 11.5 22.9s-4.8 22.9-11.5 22.9zm-114-45.2c-6 0-11.5-4.8-11.5-11.5 0-6.6 4.8-11.5 11.5-11.5 6.6 0 11.5 4.8 11.5 11.5 0 6.6-4.8 11.5-11.5 11.5z"}))},V1=function(t){var n=t.title,r=F(t,E7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ff6820",d:"M0 0h513v114H0V0z"}),s.createElement("path",{fill:"#FFF",d:"M0 114h513v114H0V114z"}),s.createElement("path",{fill:"#046a38",d:"M0 228h513v114H0V228z"}),s.createElement("path",{fill:"none",stroke:"#07038d",strokeWidth:4,d:"M256.5 136.8c18.9 0 34.2 15.3 34.2 34.2s-15.3 34.2-34.2 34.2-34.2-15.3-34.2-34.2 15.3-34.2 34.2-34.2z"}),s.createElement("path",{d:"m265.3 138.2-17.6 65.7m17.6-65.7-17.6 65.7m25.8-62.3-34 58.9m41-53.5-48 48m53.4-41L227 188m62.3-25.8-65.7 17.6m66.9-8.8h-68m66.8 8.8-65.7-17.6m62.3 25.8L227 154m53.5 41-48-48m41 53.4-34-58.9m25.8 62.3-17.6-65.7m8.8 66.9v-68m-8.8 66.8 17.6-65.7m-25.8 62.3 34-58.9m-41 53.5 48.1-48.1M227.1 188l58.9-34m-62.3 25.8 65.7-17.6m-66.9 8.8h68m-66.8-8.8 65.7 17.6M227.1 154l58.9 34m-53.5-41 48.1 48.1m-41.1-53.5 34 58.9m-25.8-62.3 17.6 65.7",stroke:"#07038d",strokeWidth:2}))},B1=function(t){var n=t.title,r=F(t,y7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0-.3h513V342H0V-.3z"}),s.createElement("path",{fill:"#012169",d:"M462.9 198.1c-4 0-14-5-21-9-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-16 9-20 9s-14-5-20-9c-11-6-22-12-32.1-12-9 0-20 6-31.1 12-7 4-16 9-20 9s-13-5-20-9c-11-6-22-12-31.1-12-10 0-21 6-32.1 12-6 4-16 9-20 9s-13-5-20-9c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-17 9-21 9s-13-5-20-9c-10-6-20-12-30.1-12v22l19 10c11 6 21 12 31.1 12s21-6 32.1-12c6-4 16-10 20-10s13 6 20 10c11 6 21 12 31.1 12s20-6 31.1-12c7-4 17-10 21-10s13 6 20 10c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-10 20-10s14 6 21 10c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-10 20-10s14 6 20 10c11 6 22 12 32.1 12s20-6 31.1-12l19-10v-22c-10 0-20 6-30.1 12-7 4-16 9-20 9zM0 31.7l19 10c11 6 21 12 31.1 12s21-6 32.1-12c6-4 16-10 20-10s13 6 20 10c11 6 21 12 31.1 12s20-6 31.1-12c7-4 17-10 21-10s13 6 20 10c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-10 20-10s14 6 21 10c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-10 20-10s14 6 20 10c11 6 22 12 32.1 12s20-6 31.1-12l19-10v-22c-10 1-20 6-30.1 12-7 4-16 9-20 9s-14-5-21-9c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-16 9-20 9s-14-5-20-9c-11-6-22-12-32.1-12s-20 6-31.1 12c-7 4-16 9-20 9s-13-5-20-9c-11-6-22-12-31.1-12s-21 6-32.1 12c-6 4-16 9-20 9s-13-5-20-9c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-17 9-21 9s-13-5-20-9c-10-6-20-11-30.1-12v22zm462.9 55.2c-4 0-14-5-21-9-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-16 9-20 9s-14-5-20-9c-11-6-22-12-32.1-12-9 0-20 6-31.1 12-7 4-16 9-20 9s-13-5-20-9c-11-6-22-12-31.1-12-10 0-21 6-32.1 12-6 4-16 9-20 9s-13-5-20-9c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-17 9-21 9s-13-5-20-9c-10-6-20-12-30.1-12v22l19 9c11 6 21 12 31.1 12s21-6 32.1-12c6-4 16-9 20-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 17-9 21-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 21 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 20 9c11 6 22 12 32.1 12s20-6 31.1-12l19-9v-22c-10 0-20 6-30.1 12-7 3.9-16 9-20 9zm50.1 34c-10 1-20 6-30.1 12-7 4-16 10-20 10s-14-6-21-10c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-16 10-20 10s-14-6-20-10c-11-6-22-12-32.1-12s-20 6-31.1 12c-7 4-16 10-20 10s-13-6-20-10c-11-6-22-12-31.1-12s-21 6-32.1 12c-6 4-16 10-20 10s-13-6-20-10c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-17 10-21 10s-13-6-20-10c-10-6-20-11-30.1-12v23c4 1 13 5 19 9 11 6 21 12 31.1 12s21-6 32.1-12c6-4 16-9 20-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 17-9 21-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 21 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 20 9c11 6 22 12 32.1 12s20-6 31.1-12c6-4 15-8 19-9v-23zm-50.1 133.3c-4 0-14-5-21-9-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-16 9-20 9s-14-5-20-9c-11-6-22-12-32.1-12-9 0-20 6-31.1 12-7 4-16 9-20 9s-13-5-20-9c-11-6-22-12-31.1-12-10 0-21 6-32.1 12-6 4-16 9-20 9s-13-5-20-9c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-17 9-21 9s-13-5-20-9c-10-6-20-12-30.1-12v22l19 9c11 6 21 12 31.1 12s21-6 32.1-12c6-4 16-9 20-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 17-9 21-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 21 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 20 9c11 6 22 12 32.1 12s20-6 31.1-12l19-9v-22c-10 0-20 6-30.1 12-7 4-16 9-20 9zm50.1 34c-10 1-20 6-30.1 12-7 4-16 10-20 10s-14-6-21-10c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-16 10-20 10s-14-6-20-10c-11-6-22-12-32.1-12s-20 6-31.1 12c-7 4-16 10-20 10s-13-6-20-10c-11-6-22-12-31.1-12s-21 6-32.1 12c-6 4-16 10-20 10s-13-6-20-10c-11-6-21-12-31.1-12s-20 6-31.1 12c-7 4-17 10-21 10s-13-6-20-10c-10-6-20-11-30.1-12v23c4 0 13 5 19 9 11 6 21 12 31.1 12s21-6 32.1-12c6-4 16-9 20-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 17-9 21-9s13 5 20 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 21 9c11 6 21 12 31.1 12s20-6 31.1-12c7-4 16-9 20-9s14 5 20 9c11 6 22 12 32.1 12s20-6 31.1-12c6-4 15-9 19-9v-23z"}),s.createElement("g",{strokeWidth:2,strokeMiterlimit:10},s.createElement("path",{d:"M389.8 119.9H408v78.8h-18.3l.1-78.8zm0 117.8H408v75.1h-18.3l.1-75.1z",fill:"#a24300",stroke:"#000"}),s.createElement("path",{fill:"#006d00",stroke:"#004100",d:"M462.8 91.5h-29.1l25.7-25.7c4.5-4.4 4.5-11.4 0-15.8l-3.4-3.4c-4.4-4.4-11.4-4.4-15.8 0l-25.9 25.9V37.4c0-6.2-5.1-11.3-11.3-11.3h-4.7c-6.2 0-11.3 5.1-11.3 11.3v31.7l-23.5-23.8c-4.7-4.7-12.2-4.7-16.9 0l-3.6 3.6c-4.7 4.7-4.7 12.4 0 17.2l25 25.4h-30.6c-6 0-10.9 4.9-10.9 10.9v4.6c0 6 4.9 10.9 10.9 10.9H369l-20.7 20.7c-4.4 4.4-4.4 11.4 0 15.8l3.4 3.4c4.4 4.4 11.4 4.4 15.8 0l19.6-19.6V167c0 6.1 5.1 11.1 11.3 11.3h4.7c6.2 0 11.3-5.1 11.3-11.3v-28.3l22.2 22.6c4.7 4.7 12.4 4.7 17.1 0l3.6-3.6c4.7-4.7 4.7-12.4 0-17.2L435.2 118h27.6c5.9 0 10.7-4.9 10.9-10.9v-4.6c0-6.1-4.9-11-10.9-11z"}),s.createElement("path",{fill:"#fed100",stroke:"#525625",d:"M439.2 249.1h-79.8s-.9-13.4-6-21.8c-6.2-10.4-13.9-28.1-1.4-36.7 15.9-10.9 33.7.8 48.2.8 11.8.1 26.9-14 45-.8 12.2 8.9 3.9 28.2-1.3 36.7-7 11.5-4.7 21.8-4.7 21.8z"})),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},$1=function(t){var n=t.title,r=F(t,C7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#CE1126",d:"M0 0h513v114H0z"}),s.createElement("path",{d:"M0 228h513v114H0z"}),s.createElement("path",{d:"M219.2 160.7h-29.3c1.5-5.7 6.6-9.9 12.8-9.9v-19.9c-18.3 0-33.1 14.9-33.1 33.1v16.5h49.6c1.8 0 3.3 1.5 3.3 3.3v6.6h-66.2v19.9h86.1v-26.5c0-12.7-10.4-23.1-23.2-23.1zm49.6 29.8v-59.6H249v79.5h33.1v-19.9zm66.2 0v-59.6h-19.8v59.6h-6.6v-19.8h-19.9v39.7h59.6v-19.9z",fill:"#547C31"}))},W1=function(t){var n=t.title,r=F(t,S7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h512v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 0h513v114H0z"}),s.createElement("path",{d:"M0 227.9h513v114H0zm278.8-93.1c.1 2 8.7 26.2 4.4 39.4-6.6 20.3-15.8 21.8-19.8 24.5V134l-6.9-4.2-6.9 4.2v64.7c-4-2.7-12.4-2.4-19.8-24.5-4.3-12.7 5.7-37.3 5.8-39.2 0 0-9.5 8.1-15.8 24-5.9 14.8 1.9 49.6 29.5 54.8 2.3.4 4.7 5.6 7.2 5.6 2.1 0 4.1-5.2 6-5.5 28.4-4.6 35-41.7 29.9-55.6-5.4-14.6-13.6-23.5-13.6-23.5z",fill:"#D80027"}),s.createElement("path",{d:"M44.6 98.9h22.3v24.4H44.6zM0 98.9h22.3v24.4H0zm89.2 0h22.3v24.4H89.2zm44.6 0h22.3v24.4h-22.3zm44.6 0h22.3v24.4h-22.3zm44.6 0h22.3v24.4H223zm44.7 0H290v24.4h-22.3zm44.6 0h22.3v24.4h-22.3zm44.6 0h22.3v24.4h-22.3zm44.6 0h22.3v24.4h-22.3zm44.6 0h22.3v24.4h-22.3zm44.6 0H513v24.4h-22.3zm-446.1 118h22.3v25.5H44.6zm-44.6 0h22.3v25.5H0zm89.2 0h22.3v25.5H89.2zm44.6 0h22.3v25.5h-22.3zm44.6 0h22.3v25.5h-22.3zm44.6 0h22.3v25.5H223zm44.7 0H290v25.5h-22.3zm44.6 0h22.3v25.5h-22.3zm44.6 0h22.3v25.5h-22.3zm44.6 0h22.3v25.5h-22.3zm44.6 0h22.3v25.5h-22.3zm44.6 0H513v25.5h-22.3z",fill:"#FFF",opacity:.5}))},U1=function(t){var n=t.title,r=F(t,z7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M513 210.6H202.2v130.7h-79.8V210.6H0v-79.8h122.4V0h79.8v130.8H513v18.5l-1 42.7z"}),s.createElement("path",{fill:"#D80027",d:"M513 149.3V192H183.7v149.3H141V192H0v-42.7h141V0h42.7v149.3z"}))},G1=function(t){var n=t.title,r=F(t,M7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#F4F5F0",d:"M342 0H0v341.3h512V0z"}),s.createElement("path",{fill:"#008C45",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#CD212A",d:"M342 0h171v342H342z"}))},K1=function(t){var n=t.title,r=F(t,N7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M301.8 171 513 30.2V0h-45.3L256.5 140.8 45.3 0H0v30.2L211.2 171 0 311.8V342h45.3l211.2-140.8L467.7 342H513v-30.2z"}),s.createElement("path",{fill:"#FFDA44",d:"m233.7 44.6 22.3 5.6 22.3-5.6 4-20.9-14.9 6.5L256 14.8l-11.4 15.4-14.9-6.5z"}),s.createElement("path",{fill:"#D80027",d:"M233.7 44.6s-4 12.9-4 29.9c0 27.9 26.3 41.3 26.3 41.3s26.3-15.5 26.3-41.3c0-15.4-4-29.9-4-29.9s-8.1-5-22.3-5-22.3 5-22.3 5z"}))},q1=function(t){var n=t.title,r=F(t,j7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#6DA544",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M215.9 171 0 314.6V26.8zM513 26.8v287.8L296.1 171z"}),s.createElement("path",{fill:"#0052B4",d:"M513 26.8 296.1 171 513 314.6V342h-41.1L256 197.4 40.1 342H0v-27.4L215.9 171 0 26.8V0h40.1L256 143.9 471.9 0H513z"}),s.createElement("path",{fill:"#FFDA44",d:"M513 26.8 296.1 171 513 314.6V342h-41.1L256 197.4 40.1 342H0v-27.4L215.9 171 0 26.8V0h40.1L256 143.9 471.9 0H513z"}))},Q1=function(t){var n=t.title,r=F(t,k7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 228h513v114H0z"}),s.createElement("path",{fill:"#D80027",d:"M256.5 170.7 0 341.3V0z"}),s.createElement("path",{fill:"#FFF",d:"m77.9 139.5 7.9 16.4 17.8-4.1-8 16.5 14.3 11.3-17.8 4 .1 18.3-14.3-11.5-14.2 11.5v-18.3l-17.8-4 14.3-11.3-7.9-16.5 17.7 4.1z"}))},Y1=function(t){var n=t.title,r=F(t,F7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h512v342H0z"}),s.createElement("circle",{fill:"#D80027",cx:256.5,cy:171,r:96}))},X1=function(t){var n=t.title,r=F(t,D7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h512v90.579H0z"}),s.createElement("path",{fill:"#496E2D",d:"M0 251h513v91H0z"}),s.createElement("path",{fill:"#A2001D",d:"M0 114h513v114H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"m323.3 54.5-25.6-11.8L256 137l-41.7-94.3-25.6 11.8 51.8 116.2-51.8 116.2 25.6 11.8 41.7-94.4 41.7 94.4 25.6-11.8-51.8-116.2z"}),s.createElement("path",{d:"M273.4 65.6c-9.9-10.8-17.4-17-17.4-17s-7.5 6.2-17.4 17v210.1c9.9 10.8 17.4 17 17.4 17s7.5-6.2 17.4-17V65.6z"})),s.createElement("path",{d:"M209 105.9v129.5c10.5 18.5 23.3 33.7 32.9 43.8V62.1c-9.6 10.1-22.4 25.3-32.9 43.8zm94 0c-10.5-18.5-23.3-33.7-32.9-43.8v217.2c9.6-10.1 22.4-25.3 32.9-43.8V105.9z",fill:"#A2001D"}),s.createElement("path",{d:"M303 105.9v129.5c10.6-18.8 18.8-41 18.8-64.8s-8.2-45.9-18.8-64.7zm-94 0v129.5c-10.6-18.8-18.8-41-18.8-64.8s8.2-45.9 18.8-64.7z"}))},Z1=function(t){var n=t.title,r=F(t,A7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M0 0h513v342H0z"}),s.createElement("circle",{cx:256,cy:171,r:171})),s.createElement("path",{fill:"#FFDA44",d:"M382.4 170.7 330.8 195l27.5 50-56.1-10.7-7.1 56.6-39.1-41.7-39.1 41.7-7.1-56.6-56.1 10.7 27.5-50-51.6-24.3 51.6-24.3-27.5-50.1 56.1 10.8 7.1-56.7L256 92.1l39.1-41.7 7.1 56.7 56.1-10.8-27.5 50.1z"}),s.createElement("circle",{fill:"#D80027",cx:257.4,cy:170.7,r:71.6}),s.createElement("path",{d:"M214.2 170.7c-2.1 0-4.1.1-6.2.3.1 12 4.4 22.9 11.6 31.5 3.8-10.3 9.5-19.6 16.7-27.7-6.9-2.7-14.3-4.1-22.1-4.1zm26.6 46.5c5.2 1.9 10.8 2.9 16.6 2.9 5.8 0 11.4-1 16.6-2.9-2.8-11.1-8.7-21-16.6-28.8-7.9 7.8-13.8 17.7-16.6 28.8zm59.4-71.2c-8.5-14.8-24.5-24.7-42.8-24.7-18.3 0-34.2 9.9-42.8 24.7 15.6.1 30.2 4.3 42.8 11.6 12.6-7.3 27.2-11.6 42.8-11.6zm-21.7 28.8c7.2 8 12.9 17.4 16.7 27.7 7.2-8.5 11.5-19.5 11.6-31.5-2-.2-4.1-.3-6.2-.3-7.7 0-15.2 1.4-22.1 4.1z",fill:"#FFDA44"}))},J1=function(t){var n=t.title,r=F(t,H7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0zm0 228h513v114H0z",fill:"#0052B4"}),s.createElement("path",{fill:"#FFF",d:"M303.5 196.6v-17.8h-11.9v-23.7l-11.9-11.9-11.8 11.9v-23.8L256 119.5l-11.9 11.8v23.8l-11.8-11.9-11.9 11.9v23.7h-11.9v17.8h-11.9v17.8h118.8v-17.8z"}))},R1=function(t){var n=t.title,r=F(t,T7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 450 300"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#CE1126",d:"M0 0h450v300H0V0z"}),s.createElement("g",{fill:"#FCD116"},s.createElement("circle",{cx:227.6,cy:161.2,r:56.2}),s.createElement("path",{d:"m254.1 73.4-23.7 26 28.6 6.5zm-51.5.2-4.8 33.1 28.5-8zm94.3 26.7-34.7 8.5 20.1 23.7zm-138.3-1.8 15.5 32.7 20.2-22.7zm159 45.3-34.4-9.9 5.6 29.5zm-182-2.6 31.9 19.8 5.2-27.7z"})),s.createElement("path",{fill:"#003F87",d:"M0 175h450v125H0V175z"}),s.createElement("path",{fill:"#FFF",d:"M0 267c15 0 30 13 45 13s30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13v-21c-15 0-30 13-45 13s-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13v21zm0-43c15 0 30 13 45 13s30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13v-21c-15 0-30 13-45 13s-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13v21zm0-43c15 0 30 13 45 13s30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13 30 13 45 13 30-13 45-13v-21c-15 0-30 13-45 13s-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13-30 13-45 13-30-13-45-13v21z"}),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"#FCD116",d:"m183.2 48.3-1.1-5.3 22.4-3.7s-30.1-7.1-40-10.7c-14.3-5.1-16.3-12.1-16.3-12.1s44.7 11 64.8 11c4.3 0 12.8 10.7 12.8 10.7s14.8-14.9 21.9-15.4c32.1-2.3 66.6-6.4 66.6-6.4s-10 6.7-16 8.5c-16.2 4.9-50.6 11.7-50.6 11.7l-4.8 7.5H277l-14.4 4.3 7.4 6.9s-7.8-4.1-18.1-2.1c-7.1 1.3-15.4 6-22.9 8-18.7 4.8-29.9-12.8-29.9-12.8l-15.9-.1z"}))},eu=function(t){var n=t.title,r=F(t,P7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v85.5H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 85.5h513V171H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 171h513v85.5H0z"}),s.createElement("path",{fill:"#6DA544",d:"M256.5 171 0 342V0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M68.6 170.7c0-24.9 17.5-45.6 40.8-50.7-3.6-.8-7.3-1.2-11.1-1.2-28.7 0-51.9 23.3-51.9 51.9s23.3 51.9 51.9 51.9c3.8 0 7.5-.4 11.1-1.2-23.3-5.1-40.8-25.9-40.8-50.7z"}),s.createElement("path",{d:"m108.9 126.1 2.7 8.5h9l-7.3 5.3 2.8 8.5-7.2-5.2-7.3 5.2 2.8-8.5-7.2-5.3h8.9zm0 22.3 2.7 8.5h9l-7.3 5.3 2.8 8.5-7.2-5.3-7.3 5.3 2.8-8.5-7.2-5.3h8.9z"}),s.createElement("path",{d:"m108.9 170.7 2.7 8.5h9l-7.3 5.2 2.8 8.5-7.2-5.2-7.3 5.2 2.8-8.5-7.2-5.2h8.9zm0 22.2 2.7 8.5h9l-7.3 5.3 2.8 8.5-7.2-5.3-7.3 5.3 2.8-8.5-7.2-5.3h8.9z"})))},tu=function(t){var n=t.title,r=F(t,I7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M512 0H0v342"}),s.createElement("path",{fill:"#FFDA44",d:"M307.7 0 0 194.5V342h206.9L513 148.5V0z"}),s.createElement("path",{d:"M513 0H385.2L0 249.4V341l126.2 1L513 91.6z"}),s.createElement("path",{d:"m141.1 187 31.2 24 32.3-22.2-13.1 37 31.1 23.9-39.2-1.1-13.2 37-11.1-37.6-39.2-1.1 32.3-22.2zM310.6 70.8l31.2 23.9 32.3-22.2-13.1 37 31.1 23.9-39.2-1.1-13.2 37-11.1-37.6-39.2-1.1 32.4-22.2z",fill:"#FFF"}))},nu=function(t){var n=t.title,r=F(t,O7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#91DC5A",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v57.188H0zm0 284.1h513v57.177H0z",fill:"#0052B4"}),s.createElement("path",{fill:"#D80027",d:"M0 79.9h513v181.582H0z"}),s.createElement("circle",{fill:"#FFF",cx:190.33,cy:171,r:65.668}),s.createElement("path",{fill:"#D80027",d:"m190.3 105 14.8 45.3h47.7l-38.6 28.1 14.8 45.5-38.7-28.2-38.6 28.1 14.8-45.4-38.6-28.1h47.7z"}))},ru=function(t){var n=t.title,r=F(t,L7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M84.6 107.8 132 36.6m-29.7 83 47.4-71.1m-29.6 83 47.4-71.1m177.9 221.3 47.4-71.1m-29.6 82.9 47.4-71.1m-29.6 83 47.4-71.1M132 305.4l-47.4-71.1m65.2 59.2-47.4-71.1m65.2 59.3-47.4-71.1m272.6-79.1-47.4-71.1m65.2 59.2-47.4-71.1m65.2 59.3L381 36.6",stroke:"#000",strokeWidth:14.25}),s.createElement("path",{d:"m357.3 238.2 59.3 39.5m-299.4-13.8L135 252m222.3-148.2L378 90m17.8-11.9 17.8-11.9",stroke:"#FFF",strokeWidth:12.5}),s.createElement("circle",{fill:"#CA163A",cx:256.5,cy:171,r:85.5}),s.createElement("path",{fill:"#0E4896",d:"M185.3 123.6c-13.1 19.6-7.8 46.2 11.9 59.3s46.2 7.8 59.3-11.9 39.6-24.9 59.3-11.9c19.6 13.1 24.9 39.6 11.9 59.3-26.2 39.3-79.3 49.9-118.6 23.7s-49.9-79.3-23.8-118.5z"}))},su=function(t){var n=t.title,r=F(t,_7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 228h513v114H0z"}),s.createElement("path",{d:"M167 227.6 0 341.3V0l167 113.8z"}))},lu=function(t){var n=t.title,r=F(t,V7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("g",{stroke:"#fff"},s.createElement("circle",{fill:"#059334",cx:384,cy:96.5,r:29.7}),s.createElement("path",{fill:"#c8102e",d:"M332.1 89H436v44.5H332.1z"}),s.createElement("path",{fill:"#fcea83",d:"M332.1 200.3V230h15.6c9.4 9.2 22.2 14.8 36.3 14.8 14.1 0 27-5.7 36.3-14.8h15.6v-29.7H332.1z"}),s.createElement("path",{fill:"#004b9e",d:"M332.1 126.1v44.5c0 39.8 51.9 51.9 51.9 51.9s51.9-12.2 51.9-51.9v-44.5H332.1z"}),s.createElement("path",{d:"M384 149.9c-13 0-13 11.9-26 11.9s-13-11.9-26-11.9v20.8c13 0 13 11.9 26 11.9s13-11.9 26-11.9 13 11.9 26 11.9 13-11.9 26-11.9v-20.8c-13 0-13 11.9-26 11.9s-13-11.9-26-11.9zm0-41.6c-13 0-13 11.9-26 11.9s-13-11.9-26-11.9v20.8c13 0 13 11.9 26 11.9s13-11.9 26-11.9 13 11.9 26 11.9 13-11.9 26-11.9v-20.8c-13 0-13 11.9-26 11.9s-13-11.9-26-11.9z",fill:"#F3F3F3"})),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},iu=function(t){var n=t.title,r=F(t,B7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#36B6CC",d:"M0 0h513v342H0V0z"}),s.createElement("circle",{fill:"#FFD400",cx:256.5,cy:170.9,r:68.4}),s.createElement("path",{fill:"#FFD400",d:"m256.5 251.5-27.9 41.7-7.1-49.7-43.2 25.5 15.2-47.8-50 4.2 34.4-36.5-46.9-18 46.8-18-34.4-36.5 50 4.2-15.2-47.8 43.2 25.4 7.1-49.7 27.9 41.7 27.9-41.7 7.1 49.7 43.2-25.4-15.2 47.8 50-4.2-34.3 36.6 46.8 17.9-46.8 18 34.4 36.5-50-4.2 15.2 47.8-43.2-25.4-7.1 49.7c0-.1-27.9-41.8-27.9-41.8zm0-.8c44.1 0 79.9-35.8 79.9-79.9S300.6 91 256.5 91s-79.9 35.8-79.9 79.9 35.8 79.8 79.9 79.8zM22.8 28.3c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6V28.3zm0 45.7c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6V74zm0 45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0 45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0 45.7c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0 45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0 45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H28.5c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm22.8-22.8c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H51.3c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0-45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7V245c.1 3.1-2.4 5.7-5.6 5.7H51.3c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0-45.7c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H51.3c-3.1 0-5.7-2.5-5.7-5.6V188zm0-45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H51.3c-3.1 0-5.7-2.5-5.7-5.6v-11.4zm0-45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H51.3c-3.1 0-5.7-2.5-5.7-5.6V96.8zm0-45.6c0-3.2 2.4-5.7 5.7-5.7h11.3c3.2 0 5.7 2.4 5.7 5.7v11.3c.1 3.1-2.4 5.7-5.6 5.7H51.3c-3.1 0-5.7-2.5-5.7-5.6V51.2z"}))},ou=function(t){var n=t.title,r=F(t,$7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 .1h513v90.7H0zm0 251.2h513V342H0z",fill:"#D80027"}),s.createElement("circle",{fill:"#FFF",cx:256.5,cy:171,r:65.9}))},au=function(t){var n=t.title,r=F(t,W7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 .2h513v90.7H0zm.5 251.1H513V342H.5z",fill:"#D80027"}),s.createElement("path",{fill:"#6DA544",d:"M290.3 193.5 256 130.7l-34.3 62.8h25.7v17.2h17.2v-17.2z"}),s.createElement("path",{fill:"#14AF5A",d:"M241.3 213.1c4.4-4.4 4.4-11.6-.1-16l4.7 4.7c-5.2-4.7-12.2-6.6-19.1-5.3l-23.5 5.9c-6.1 1.5-6.8-.4-1.8-4.2l27.1-20.3c5.1-3.8 4.2-6.9-2.3-6.9h-11c-6.4 0-7-2.3-1.5-5.1l25.3-12.7c5.6-2.8 5.1-5.1-1.5-5.1h-11c-6.4 0-7.4-3.1-2.3-6.9l27.1-20.3c5.6-3.8 12.9-3.8 18.5 0l27.1 20.3c5.1 3.8 4.2 6.9-2.3 6.9h-11c-6.4 0-7 2.3-1.5 5.1l25.3 12.7c5.6 2.8 5.1 5.1-1.5 5.1h-11c-6.4 0-7.4 3.1-2.3 6.9l27.1 20.3c5.1 3.8 4.4 5.7-1.8 4.2l-23.5-5.9c-6.8-1.3-13.9.6-19.1 5.3l4.7-4.7c-4.4 4.4-4.5 11.5-.1 16l6.8 6.8c4.4 4.4 3.1 8-3.3 8h-45.8c-6.2 0-7.7-3.6-3.3-8 .1.1 6.9-6.8 6.9-6.8z"}))},cu=function(t){var n=t.title,r=F(t,U7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#55B2FF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#F3F3F3",d:"M148.5 298.1h216l-108-254.2z"}),s.createElement("path",{fill:"#333",d:"m186 272.7 70.5-160.3L327 272.7z"}),s.createElement("path",{fill:"#FFDA44",d:"M148.5 298.1h216l-108-101.7z"}))},du=function(t){var n=t.title,r=F(t,G7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v171H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M149.3 98.1c0-14-11.3-25.3-25.3-25.3-6.5 0-12.4 2.4-16.9 6.4V64.4h8.4V47.5h-8.4v-8.4H90.3v8.4h-8.4v16.9h8.4v14.9c-4.5-4-10.4-6.4-16.9-6.4-14 0-25.3 11.3-25.3 25.3 0 7.5 3.3 14.2 8.4 18.8v14.9h84.3V117c5.3-4.7 8.5-11.5 8.5-18.9z"}))},uu=function(t){var n=t.title,r=F(t,K7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#A2001D",d:"M222.6 22.3h267.1v296.8H222.6z"}),s.createElement("path",{fill:"#D80027",d:"M22.3 22.3h200.3v296.8H22.3z"}),s.createElement("path",{fill:"#FFDA44",d:"M200.3 0h22.3v342h-22.3z"}),s.createElement("path",{fill:"#6DA544",d:"M22.3 22.3h89v296.8h-89z"}),s.createElement("path",{fill:"#FF9811",d:"M111.3 22.3h89v296.8h-89z"}),s.createElement("path",{fill:"#FFDA44",d:"M368.2 156.8c-1.4-2 0-37.9 0-37.9.9-7.4.1-8.4 1-11.4.9-2.9 5.4-11.6 5.4-11.6s-6-2.3-10.3-.6c-4.3 1.7-24.7-7.5-31.2 3.4-4.4 7-23.6 16.2-24.6 14-1-2.2-5.9-5-6.9-2.9s-.7 13.9 0 16c.8 2.6 9.8 2 12.3 3.1 3.7 1.8 12.2 8.2 11.9 10.7-.3 2.5-22.5-6-24.2-4.5-1.4 1.2-1.9 13.2-.4 15 1.8 2.1 23.4 5.6 25 7.5 1.6 1.9-13.1 7.4-12.3 25 .7 14.7 8 17.4 8 17.4s-2.4 3.6-7.8 3.1c-6.2-.6-27.4-17.7-27.4-17.7s-3.5-109 3.6-121.4c4.9-8.5-22.7 10.1-22.7 50.8V151c0 6.6-1.4 22.4 2.6 34 0 0-.4 46.9 1.5 49.6s12.7 2.2 14.8 0 0-30 0-30c7.7.2 18.3 17.5 32.5 16.4 20.6-1.6 28.7-9.9 34.3-5 8.1 7.1 5.5 23.2.4 31.5-2.2 3.5-14.3 4.7-15.7 7.6-1.4 2.9.5 5.4.5 5.4h29.7s1.4-20.5 2.7-26.1c1.3-5.7-.6-10.7 5.9-10.4 23.5 1.1 39.8-15.3 45.5-8 3.2 4.1 5.6 29.9 3.3 33.3-2.2 3.4-13.8 2.8-15.2 6.7-1.4 4 .8 4.4.8 4.4h29.7s-.4-21.2 2.5-27.7 4.9-10.4 9.3-17.2c4.4-6.8 11.3-15.7 11.3-36.2 0-14.2-8.1-22.8-8.1-22.8H417c-14.1.2-47.4 2.3-48.8.3zm-136-124.5c10.7-10.6 20.2-2.7 22.2 2.1 1.9 4.8 2.1 8.2 2.8 13.6.9 6.9 4.9 14 4.9 14s-7.1-3.8-14.7-4.2c-4.7-.3-9-.6-13.6-2.5-5.7-2.3-11.7-12.9-1.6-23zm248.4-.1c10.7 10.6 2.8 20.2-2 22.2s-8.2 2.1-13.6 2.8c-6.9.9-14 5-14 5s3.7-7.1 4.2-14.7c.3-4.7.6-9.1 2.4-13.6 2.2-5.7 12.8-11.8 23-1.7zm.1 276.9c-10.7 10.6-20.2 2.6-22.2-2.2-1.9-4.8-2.1-8.2-2.7-13.6-.8-6.9-4.9-14.1-4.9-14.1s7 3.8 14.7 4.3c4.7.3 9 .6 13.6 2.5 5.7 2.4 11.7 13.1 1.5 23.1zm-248.2-.1c-10.6-10.7-2.7-20.2 2.1-22.2 4.8-1.9 8.2-2.1 13.6-2.8 6.9-.9 14-4.9 14-4.9s-3.8 7.1-4.2 14.7c-.3 4.7-.6 9-2.5 13.6-2.3 5.7-12.9 11.8-23 1.6z"}),s.createElement("path",{fill:"none",stroke:"#FFDA44",strokeWidth:6,strokeMiterlimit:10,d:"M446.9 162.4s7.5-2.6 8.4-16.1c.6-8.6-19.8-16-39-11.5-19.7 4.6-34-3.1-34-14.6 0-22.9 29.7-16.2 38.9-11.3 9.1 4.9 29.7 23.5 35.1 9.4"}))},hu=function(t){var n=t.title,r=F(t,q7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v31.1H0zm0 62.2h513v31.1H0zm0 62.3h513v31.1H0zm0 62.3h513v31.1H0zm0 62.5h513v31.1H0zm0 61.6h513V342H0z",fill:"#bf0a30"}),s.createElement("path",{fill:"#002868",d:"M0 0h155.6v155.6H0z"}),s.createElement("path",{fill:"#FFF",d:"m77.8 30.2 10.7 32.9h34.6l-28 20.4 10.7 32.9-28-20.3-28 20.3 10.7-32.9-28-20.4h34.6z"}))},mu=function(t){var n=t.title,r=F(t,Q7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 227.6h513v114H0z"}),s.createElement("path",{d:"m245.2 171 7.7-23.1c2-5.9 5.1-6 7.1 0l7.7 23.1 19.4 29.1c1.7 2.6 1.3 6.3-1.2 8 0 0-6.9 8-29.5 8s-29.5-8-29.5-8c-2.4-2-2.9-5.4-1.2-8l19.5-29.1z"}),s.createElement("path",{d:"M256.5 171c-12.5 0-22.6-10.1-22.6-22.6 0-12.5 10.1-22.6 22.6-22.6s22.6 10.1 22.6 22.6c0 12.5-10.2 22.6-22.6 22.6zm0 0c6.2 0 11.3-16.3 11.3-22.6 0-6.2-5.1-11.3-11.3-11.3-6.2 0-11.3 5.1-11.3 11.3 0 6.3 5 22.6 11.3 22.6z"}))},fu=function(t){var n=t.title,r=F(t,Y7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#6DA544",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 228h513v114H0z"}))},pu=function(t){var n=t.title,r=F(t,X7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#338AF3",d:"M0 228h513v114H0z"}))},gu=function(t){var n=t.title,r=F(t,Z7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{className:"prefix__st1",d:"M0 0h513v127.6H0zm0 214.4h513V342H0z",fill:"#A2001D"}))},vu=function(t){var n=t.title,r=F(t,J7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#496E2D",d:"M0 228h513v114H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"m281.4 150.7 9 12.3 14.5-4.7-9 12.4 9 12.3-14.5-4.7-9 12.3v-15.2l-14.5-4.7 14.5-4.7z"}),s.createElement("path",{d:"M257 201.5c-17 0-30.9-13.8-30.9-30.9s13.8-30.9 30.9-30.9c5.3 0 10.3 1.3 14.7 3.7-6.9-6.7-16.2-10.8-26.6-10.8-21 0-38 17-38 38s17 38 38 38c10.3 0 19.7-4.1 26.6-10.8-4.4 2.4-9.4 3.7-14.7 3.7z"})))},xu=function(t){var n=t.title,r=F(t,R7);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#d12a46",d:"M0 .3V342h513V.3z"}),s.createElement("path",{fill:"#316525",d:"M359.8 148.9h-73.3l-22.7-69.7-22.7 69.7h-73.3l59.3 43.1-22.7 69.7 59.3-43.1 59.3 43.1-22.5-69.7 59.3-43.1zm-116.1 37.7 7.7-23.6h24.8l7.7 23.6-20.1 14.6-20.1-14.6zm27.9-37.7H256l7.8-24 7.8 24zm24.3 29-4.8-14.9h25.3l-20.5 14.9zM236.6 163l-4.8 14.9-20.5-14.9h25.3zm-5.3 61.8 7.8-24 12.6 9.2-20.4 14.8zm44.5-14.9 12.6-9.2 7.8 24-20.4-14.8z"}))},wu=function(t){var n=t.title,r=F(t,e6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 171h513v171H0z"}),s.createElement("path",{fill:"#ce1126",d:"M0 0h513v171H0z"}))},bu=function(t){var n=t.title,r=F(t,t6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M342 0h171v342H342z"}),s.createElement("path",{fill:"#0052B4",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#AF7F59",stroke:"#231F20",strokeWidth:3,strokeMiterlimit:10,d:"m240.4 105.7 9.7 11.6-7.5 17.4-26.1-24.3-12.7 13.2v106.1l24.6-36 20.6 12.4-18 27.8 25.2 15.8 26.5-15.8-19.7-27.8 22.3-12.4 23.9 33.8v-106l-12.4-12-26.8 24.7-6.5-16.5 3.5-12.3-11.7-7.5z"}))},Eu=function(t){var n=t.title,r=F(t,n6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#ffc000",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#e30000",d:"M20 20h473v302H20z"}),s.createElement("path",{fill:"#ffc000",d:"M248.5 112.9c4.4 4.4 11.6 4.4 16 0l-4.7 4.7 22.7-22.7c4.9-4.5 12.1-5.6 18.2-2.8l2.1 1c5.7 2.9 6.7 8.7 2.3 13.1l4.7-4.7-22.8 22.8c-4.5 4.9-5.6 12.1-2.8 18.2l1 2.1c2.9 5.7 5.1 15.4 5.1 21.6v-11.3c0 6.2 4.4 9.1 10.2 6.2l2.1-1c5.7-2.9 6.7-8.7 2.3-13.1l4.7 4.7c-4.4-4.4-4.4-11.6 0-16l-4.7 4.7c5.2-5.5 9.6-11.6 13.1-18.2l1-2.1c2.9-5.7 6.3-15.1 7.9-21.2l5.8-23.3c1.5-6 5.9-6.8 9.6-1.8l20.2 26.9c3.8 5.1 6.9 14 6.9 20.6v22.4c0 6.3-2.2 15.8-5.1 21.7l-1 2.1c-3.5 6.6-7.9 12.7-13.1 18.2l-6.8 6.8c-5.4 5.2-11.5 9.6-18.2 13.1l-2.1 1c-5.7 2.9-15.5 5.1-21.6 5.1-6.2 0-6.9 2.2-1.1 5.1l2.1 1c5.7 2.9 13.8 8.7 18.2 13.1l-4.7-4.7c4.4 4.4 11.6 4.4 16 0l-4.7 4.7c4.4-4.4 11.6-4.4 16 0L339 226c4.6 4.9 5.7 12.1 2.9 18.2l-1 2.1c-2.9 5.7-10.4 10.2-16.4 10.2-7.5-.3-14.8-2-21.6-5.1l-2.1-1c-6.5-3.6-11.8-8.9-15.4-15.4l-1-2.1c-2.9-5.7-8.7-6.7-13.1-2.3l4.7-4.7c-4.4 4.7-5.2 11.8-1.8 17.3l10.3 15.4c3.4 5.1 2 12.1-3.1 15.5L266 284.4c-5.7 3.4-12.8 3.4-18.6 0L232 274.1c-5.1-3.4-6.5-10.3-3.1-15.5l10.3-15.4c3.4-5.5 2.6-12.6-1.8-17.3l4.7 4.7c-4.4-4.4-10.2-3.6-13.1 2.3l-1 2.1c-2.9 5.7-9.5 12.4-15.4 15.4l-2.1 1c-5.7 2.9-15.5 5.1-21.6 5.1-6.9-.3-13.1-4.2-16.4-10.2l-1-2.1c-2.8-6.1-1.6-13.3 2.9-18.2l-4.7 4.7c4.4-4.4 11.6-4.4 16 0L181 226c4.4 4.4 11.6 4.4 16 0l-4.7 4.7c5.5-5.2 11.6-9.6 18.2-13.1l2.1-1c5.7-2.9 5-5.1-1.1-5.1-7.5-.3-14.8-2-21.6-5.1l-2.1-1c-6.6-3.5-12.7-7.9-18.2-13.1l-6.8-6.8c-5.2-5.4-9.6-11.5-13.1-18.2l-1-2.1c-3.1-6.8-4.9-14.2-5.1-21.7V121c0-6.3 3.1-15.6 6.9-20.6l20.2-26.9c3.8-5.1 8.1-4.3 9.6 1.8l5.8 23.3c2 7.3 4.6 14.4 7.9 21.2l1 2.1c2.9 5.7 8.7 13.8 13.1 18.2l-4.7-4.7c4.4 4.4 4.4 11.6 0 16l4.7-4.7c-4.4 4.4-3.6 10.2 2.3 13.1l2.1 1c5.7 2.9 10.2 0 10.2-6.2v11.3c0-6.2 2.2-15.7 5.1-21.6l1-2.1c2.8-6.1 1.7-13.2-2.8-18.2l-22.7-22.7 4.7 4.7c-4.4-4.4-3.6-10.2 2.3-13.1l2.1-1c6.1-2.8 13.2-1.7 18.2 2.8l22.7 22.7-4.8-4.5zm-18-40.7c-4.4-4.4-3.2-9.5 2.8-11.5l12.4-4.2c3-1 6.9-7.5 10.8-7.5 3.9 0 7.8 6.5 10.8 7.5l12.4 4.2c6 2 7.2 7.1 2.8 11.5l-6.8 6.8c-5.3 4.7-12.1 7.5-19.2 7.9-6.2 0-14.8-3.5-19.2-7.9l-6.8-6.8z"}),s.createElement("path",{fill:"#0371ba",d:"M275 201.3h-37c-4.9 0-8.8-3.9-8.8-8.8v-34.2c0-4.9 3.9-8.8 8.8-8.8h37c4.9 0 8.8 3.9 8.8 8.8v34.2c0 4.8-3.9 8.8-8.8 8.8z"}),s.createElement("path",{fill:"#39B54A",d:"m230.8 212.8 24.4 17.9c.8.6 1.8.6 2.6 0l24.4-17.9c2.1-1.6 1.2-5.4-1.3-5.4h-48.8c-2.5 0-3.4 3.9-1.3 5.4z"}),s.createElement("path",{fill:"#ffc000",d:"M262.8 186.5h-12.5c-3.3 0-5.9-2.6-5.9-5.9V170c0-3.3 2.6-5.9 5.9-5.9h12.5c3.3 0 5.9 2.6 5.9 5.9v10.6c-.1 3.3-2.7 5.9-5.9 5.9z"}))},yu=function(t){var n=t.title,r=F(t,r6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 108 72"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h108v72H0z",fill:"#003787"}),s.createElement("path",{d:"M0 0h108L60 48v24H48V48z",fill:"#fff"}),s.createElement("circle",{cx:54,cy:30,r:8,fill:"#f9d90f"}),s.createElement("path",{d:"M44 30h20L54 48z",fill:"#fff"}),s.createElement("path",{d:"M54 48 38 33h32z",fill:"#cf142b"}))},Cu=function(t){var n=t.title,r=F(t,s6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#f9423a",d:"M0 0h513v171H0z"}),s.createElement("path",{fill:"#00843d",d:"M0 171h513v171H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 0h171v342H0z"}))},Su=function(t){var n=t.title,r=F(t,l6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#1E509C",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M513 176.1V81.3L0 342l513-165.9z"}),s.createElement("path",{fill:"#F18D36",d:"M513 0v81.3L0 342 513 0z"}),s.createElement("path",{fill:"#FFF",d:"m126.7 99.3-7.8-54.1-7.7 54.1-20.8-23.7 10.7 31.6-31.5-10.7 23.6 20.8-54.1 7.7 54.1 7.7-23.6 20.8 31.5-10.7-10.7 31.6 20.8-23.7 7.7 54.1 7.8-54.1 20.7 23.7-10.6-31.6 31.5 10.7-23.6-20.8 54-7.7-54-7.7 23.6-20.8-31.5 10.7 10.6-31.6z"}))},zu=function(t){var n=t.title,r=F(t,i6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 0h513v342H0z"}),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M384.6 342 256.5 167.3 283.4 342zM133.8 0l122.7 167.3L230.8 0zm95.8 342 26.9-174.7L128.4 342zM0 0v127.8l256.5 39.5L28.4 0zm0 342h18.2l238.3-174.7L0 206.7zm256.5-174.7L513 127.8V0h-28.4zM282.2 0l-25.7 167.3L379.2 0z"}),s.createElement("path",{d:"M513 342V206.7l-256.5-39.4L494.8 342z"}),s.createElement("circle",{cx:256.5,cy:171,r:59.5})),s.createElement("circle",{fill:"#FFDA44",cx:256.5,cy:171,r:44.5}))},Mu=function(t){var n=t.title,r=F(t,o6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#14b53a",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#fcd116",d:"M171 0h171v342H171z"}),s.createElement("path",{fill:"#ce1126",d:"M342 0h171v342H342z"}))},Nu=function(t){var n=t.title,r=F(t,a6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#fecb00",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#34b233",d:"M0 114h513v114H0z"}),s.createElement("path",{fill:"#ea2839",d:"M0 228h513v114H0z"}),s.createElement("path",{fill:"#FFF",d:"M384.8 142.2h-98L256.5 49l-30.3 93.2h-98l79.3 57.6-30.3 93.2 79.3-56.9 79.3 56.9-30.3-93.2 79.3-57.6z"}))},ju=function(t){var n=t.title,r=F(t,c6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0066b2",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M342 0h171v342H342zM0 0h171v342H0z",fill:"#da2031"}),s.createElement("g",{fill:"#ffd300"},s.createElement("path",{d:"M108.3 166.3h14.8v74.2h-14.8zm-59.4 0h14.8v74.2H48.9z"}),s.createElement("circle",{cx:86,cy:203.4,r:14.8}),s.createElement("path",{d:"M71.2 225.7h29.7v14.8H71.2zm0-59.4h29.7v14.8H71.2z"}),s.createElement("circle",{cx:86,cy:144,r:14.8}),s.createElement("path",{d:"M76.3 123.9h19.5L86 108.3z"})))},ku=function(t){var n=t.title,r=F(t,d6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0F7562",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M286.2 168.5c-4.2 0-8.2.8-11.9 2.2 2-4.5 3.4-9.5 3.4-14.9 0-21.2-21.2-37.1-21.2-37.1s-21.2 15.9-21.2 37.1c0 5.4 1.4 10.4 3.4 14.9-3.7-1.3-7.7-2.2-11.9-2.2-25.6 0-37.1 11.2-37.1 11.2s15.9 31.2 37.1 31.2c12.4 0 23-7.3 29.7-13.3 6.6 6 17.3 13.3 29.7 13.3 21.2 0 37.1-31.2 37.1-31.2s-10.8-11.2-37.1-11.2zm-29.7-96.8 4.4 13.5h14.2l-11.5 8.3L268 107l-11.5-8.3L245 107l4.4-13.5-11.5-8.3h14.2zm-53.9 23.6 8.4 7.6 9.9-5.7-4.7 10.4 8.5 7.6-11.3-1.2-4.6 10.3-2.4-11.1-11.3-1.1 9.9-5.7zm-39.4 39.5 11.1 2.3 5.6-9.8 1.2 11.3 11.1 2.3-10.4 4.6 1.2 11.3-7.6-8.4-10.3 4.6 5.6-9.8zm147.2-39.5-8.4 7.6-9.9-5.7 4.7 10.4-8.5 7.6 11.3-1.2 4.6 10.3 2.4-11.1 11.3-1.1-9.9-5.7zm39.4 39.5-11.1 2.3-5.6-9.8-1.2 11.3-11.1 2.3 10.4 4.6-1.2 11.3 7.6-8.4 10.3 4.6-5.6-9.8z",fill:"#FFDA44"}),s.createElement("path",{d:"M256.5 270.3c16.8 0 32.4-5.6 44.8-15.1h-89.6c12.4 9.4 28 15.1 44.8 15.1zm-68-44.6c2.4 5.4 5.3 10.4 8.9 15.1H238c13.9 0 18.5-7 18.5-7s5.3 7 18.6 7h40.6c3.5-4.6 6.5-9.7 8.9-15.1h-49.5c-15.5 0-18.6-10-18.6-10s-5.3 10-18.5 10h-49.5z",fill:"#FFF"}))},Fu=function(t){var n=t.title,r=F(t,u6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 750 500"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0071BC",d:"M0 0h750v500H0V0z"}),s.createElement("g",{fill:"#FFF",stroke:"#000",strokeWidth:1.9},s.createElement("circle",{cx:375,cy:245,r:225,fill:"#fff"}),s.createElement("circle",{cx:375,cy:245,r:165,fill:"#0071BC"})),s.createElement("g",{stroke:"#000"},s.createElement("path",{fill:"#8C8A8C",strokeWidth:1.9,d:"M444.7 450c.7 11-7.8 20-18.8 20H323.6c-11 0-19.5-9-19-20l16.7-325c.6-11 10-20 21-20h61.4c11 0 20.5 9 21.2 20l19.8 325z"}),s.createElement("path",{fill:"#FFF",strokeWidth:2,strokeLinejoin:"round",d:"m373 114 30 93h97l-78 56 29 92-78-56-78 57 30-93-79-57h97l30-92z"})))},Du=function(t){var n=t.title,r=F(t,h6);return s.createElement("svg",k({viewBox:"0 0 900 600",xmlns:"http://www.w3.org/2000/svg"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#231f1e",d:"M0 0h900v600H0z"}),s.createElement("path",{fill:"#00a650",d:"M0 0h900v300H0z"}),s.createElement("path",{fill:"#ef1923",d:"m0 0 450 300L0 600z"}))},Au=function(t){var n=t.title,r=F(t,m6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#00a95c",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#d01c1f",d:"M0 0h513v46H0zm0 296h513v46H0z"}),s.createElement("path",{fill:"gold",d:"M256 213.9c-46 0-84.3-32.3-93.8-75.4-1.4 6.6-2.2 13.5-2.2 20.6 0 53 43 96 96 96s96-43 96-96c0-7.1-.8-13.9-2.2-20.6-9.5 43.1-47.8 75.4-93.8 75.4z"}),s.createElement("path",{fill:"gold",d:"m256 87 8.9 27.5h29l-23.4 17 8.9 27.5-23.4-17-23.4 17 8.9-27.5-23.4-17h29z"}))},Hu=function(t){var n=t.title,r=F(t,f6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#00A2B8",stroke:"#FFF",strokeWidth:3,d:"M318.2 106.7v106.5c0 51.9 67.8 67.8 67.8 67.8s67.8-15.9 67.8-67.8V106.7H318.2z"}),s.createElement("path",{fill:"#A35023",d:"M319.7 212.7c0 50.8 66.3 66.3 66.3 66.3s66.3-15.6 66.3-66.3H319.7z"}),s.createElement("path",{fill:"#510",d:"M415.1 155.1h-19.4v-19.4h-19.4v19.4H357v19.4h19.3v58.1h19.4v-58.1h19.4z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},Tu=function(t){var n=t.title,r=F(t,p6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#cf142b",d:"M256 0h256.5v342H256z"}),s.createElement("path",{stroke:"#cf142b",strokeWidth:10,d:"M101.2 68.2V33H66v35.2H30.8v35.2H66v35.2h35.2v-35.2h35.2V68.2z"}),s.createElement("path",{fill:"#fff",stroke:"#acacac",strokeWidth:5,d:"M101.2 68.2V33H66v35.2H30.8v35.2H66v35.2h35.2v-35.2h35.2V68.2z"}),s.createElement("circle",{cx:85,cy:85,r:26,fill:"none",stroke:"#acacac",strokeWidth:5}),s.createElement("circle",{cx:85,cy:85,r:18,fill:"#dedede",stroke:"#acacac",strokeWidth:5}))},Pu=function(t){var n=t.title,r=F(t,g6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#d01c1f",d:"M0 0h513v85.5H0z"}),s.createElement("path",{fill:"#2d3359",d:"M0 85.5h513V171H0z"}),s.createElement("path",{fill:"#f7b718",d:"M0 171h513v85.5H0z"}),s.createElement("path",{fill:"#008658",d:"M0 256.5h513V342H0z"}))},Iu=function(t){var n=t.title,r=F(t,v6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 480"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#007E3A",stroke:"#D21034",strokeWidth:120,d:"M60 60h600v360H60z"}),s.createElement("circle",{fill:"#FFF",cx:390,cy:240,r:80}),s.createElement("circle",{fill:"#007E3A",cx:420,cy:240,r:80}))},Ou=function(t){var n=t.title,r=F(t,x6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#ce1126",d:"M0 114h513v114H0z"}),s.createElement("path",{fill:"#339e35",d:"M0 228h513v114H0z"}),s.createElement("circle",{fill:"#ce1126",cx:256.5,cy:125,r:95}),s.createElement("path",{d:"M0 100h513v14H0z"}))},Lu=function(t){var n=t.title,r=F(t,w6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#dc2339",d:"M342 0H0v341.3h513V0z"}),s.createElement("path",{fill:"#11865d",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M171 0h171v342H171z"}),s.createElement("path",{fill:"#8C9157",d:"M195.8 171.2c0 21.6 11.5 41.7 30.3 52.5 5.8 3.4 13.2 1.4 16.6-4.4 3.4-5.8 1.4-13.2-4.4-16.6-11.3-6.5-18.2-18.5-18.2-31.5 0-6.7-5.4-12.1-12.1-12.1-6.7 0-12.2 5.4-12.2 12.1zm93.4 51.1c17.5-11.1 28-30.4 28-51.1 0-6.7-5.4-12.1-12.1-12.1s-12.1 5.4-12.1 12.1c0 12.4-6.3 24-16.8 30.7-5.7 3.5-7.5 10.9-4.1 16.7s10.9 7.5 16.7 4.1c0-.2.2-.3.4-.4z"}),s.createElement("ellipse",{fill:"#C59262",cx:256.5,cy:159.1,rx:24.3,ry:36.4}))},_u=function(t){var n=t.title,r=F(t,b6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v24.4H0zm0 48.9h513v24.4H0zm0 48.8h513v24.4H0zm0 48.9h513V171H0zm0 48.8h513v24.4H0zm0 48.9h513v24.4H0zm0 48.8h513v24.4H0z",fill:"#c00"}),s.createElement("path",{fill:"#006",d:"M0 0h256.5v195.4H0z"}),s.createElement("path",{d:"M153.3 42.1C122.6 30.7 88.5 46.3 77.1 77s4.2 64.8 34.9 76.2c13.3 5 28 5 41.4 0-30.7 24.5-75.4 19.6-100-11.1s-19.6-75.4 11.1-100c26-20.7 62.9-20.7 88.8 0zm26.7 75-20.6 23.3 5.4-30.6-31-1.6 27.3-14.9L143 68l28.6 12 8.4-29.9 8.4 29.9L217 68l-18 25.4 27.3 14.9-31 1.6 5.4 30.6-20.7-23.4z",fill:"#fc0"}))},Vu=function(t){var n=t.title,r=F(t,E6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#006d66",d:"M0 0h513v104H0z"}),s.createElement("path",{d:"M0 119h513v104H0z"}),s.createElement("path",{fill:"#f4d900",d:"M0 238h513v104H0z"}),s.createElement("path",{fill:"#cb0f31",d:"M256 171 0 342V0z"}),s.createElement("path",{fill:"#f4d900",d:"m83.5 109.8 15.1 46.5h48.9L107.9 185l15.1 46.5-39.5-28.7-39.6 28.7L59 185l-39.5-28.7h48.9z"}))},Bu=function(t){var n=t.title,r=F(t,y6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#009a44",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#002f6c",d:"M0 342V0h513"}),s.createElement("path",{fill:"#FFF",d:"M513 67V0H412.5L0 275v67h100.5z"}),s.createElement("path",{fill:"#c8102e",d:"M513 0v40.2L60.3 342H0v-40.2L452.7 0z"}),s.createElement("path",{fill:"#ffcd00",d:"m188.1 104.1-22.8 10.7 12.2 22.1-24.8-4.8-3.1 25-17.3-18.4-17.2 18.4-3.1-25-24.8 4.8 12.2-22.1-22.8-10.7 22.8-10.7-12.2-22.1L112 76l3.1-25 17.2 18.4L149.6 51l3.1 25 24.8-4.7-12.2 22.1z"}))},$u=function(t){var n=t.title,r=F(t,C6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#009543",d:"M0 234.8h513V342H0V234.8z"}),s.createElement("path",{fill:"#ED4135",d:"M0 105.8h513v129.3H0V105.8z"}),s.createElement("path",{fill:"#0035AD",d:"M0 0h513v106.8H0V0z"}),s.createElement("circle",{fill:"#FAE600",stroke:"#000",strokeWidth:5.3,cx:192.4,cy:171,r:126.1}),s.createElement("path",{d:"m246.8 284.1-25.5 9.6-28.9 3.4-30.3-1.9-28.8-12.4s22.9-23.5 32.6-26.9c6.9-2.4 18-3 18-3V97.8l-.2-52.9h13.5l-.4 54.1v153.7s12.3 1 17.7 3.3c9 3.8 32.3 28.1 32.3 28.1z"}),s.createElement("path",{d:"m168.3 80.8 39.5-19.7 5.1 10.3-39.5 19.7-5.1-10.3z"}),s.createElement("ellipse",{cx:190.6,cy:224.8,rx:13.5,ry:21.2}),s.createElement("circle",{cx:190.3,cy:114.9,r:16.8}),s.createElement("ellipse",{cx:191.1,cy:169.2,rx:16,ry:9.7}),s.createElement("path",{d:"M171.4 146.7h37.7v8h-37.7zm0 36h37.7v8h-37.7z"}),s.createElement("g",{fill:"none",stroke:"#000",strokeWidth:10,strokeMiterlimit:10},s.createElement("path",{d:"M163.4 112.2s.8 26.8 27.3 26.8 26.5-26.8 26.5-26.8"}),s.createElement("path",{className:"prefix__st4",d:"M163.4 224.8s1.9-26.6 27.3-26.6 26.5 26.6 26.5 26.6"})))},Wu=function(t){var n=t.title,r=F(t,S6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#e05206",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#0db02b",d:"M0 228h513v114H0z"}),s.createElement("circle",{fill:"#e05206",cx:256.5,cy:171,r:32}))},Uu=function(t){var n=t.title,r=F(t,z6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h171v342H0zm342 0h171v342H342zm-38 227L256 75l-48 152h41v40h14v-40z",fill:"#007934"}))},Gu=function(t){var n=t.title,r=F(t,M6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h171v342H0zm342 0h171v342H342z",fill:"#008751"}))},Ku=function(t){var n=t.title,r=F(t,N6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v114H0zm0 228h513v114H0z",fill:"#0067c6"}),s.createElement("circle",{fill:"none",stroke:"#FFDA44",strokeWidth:5,cx:256.5,cy:171,r:50}),s.createElement("path",{fill:"#0a47a5",d:"M285.7 176.7h-58.4l-9.8 16.9h78z"}),s.createElement("path",{fill:"#6fd8f3",d:"m256.5 126.1-29.2 50.6h58.4z"}),s.createElement("path",{fill:"#97c924",d:"M221.7 186.4h69.6l-8-13.9h-53.6z"}),s.createElement("circle",{fill:"red",cx:256.5,cy:161,r:5}))},qu=function(t){var n=t.title,r=F(t,j6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 114h513v114H0z"}),s.createElement("path",{fill:"#cd1f2a",d:"M0 0h513v114H0z"}),s.createElement("path",{fill:"#1d4185",d:"M0 228h513v114H0z"}))},Qu=function(t){var n=t.title,r=F(t,k6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M513 211H202.6v131h-79.9V211H0v-80h122.7V0h79.9v131H513v61.4z"}),s.createElement("path",{fill:"#1f3f7a",d:"M513 149.6v42.8H184V342h-42.7V192.4H0v-42.8h141.3V0H184v149.6z"}))},Yu=function(t){var n=t.title,r=F(t,F6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 342V-.2L281.1 175H87.8l184 167z"}),s.createElement("path",{fill:"#D80027",d:"M243.4 164.8 9.2 19.3v313.5h235.2l-184.1-168z"}),s.createElement("path",{fill:"#FFF",d:"m62.4 204.1 7.9 16.2 14.9-10.1-1.3 18 18-1.3-10.1 14.9 16.2 7.9-16.2 7.8 10.1 15-18-1.3 1.3 17.9L70.3 279l-7.9 16.2-7.8-16.2-14.9 10.1 1.3-17.9-18 1.3 10.1-15-16.2-7.8 16.2-7.9L23 226.9l18 1.3-1.3-18 14.9 10.1zm-5.3-103.7 5.3 7.7 5.4-7.7 2 9.1 7.9-5-1.7 9.2 9.3-1.7-5.1 7.9 9.2 2-7.8 5.4 7.8 5.3-9.2 2 5.1 7.9-9.3-1.7 1.7 9.3-7.9-5.1-2 9.2-5.4-7.7-5.3 7.7-2-9.2-7.9 5.1 1.7-9.3-9.3 1.7 5.1-7.9-9.2-2 7.7-5.3-7.7-5.4 9.2-2-5.1-7.9 9.3 1.7-1.7-9.2 7.9 5z"}),s.createElement("path",{fill:"#FFF",d:"M18.5 108.7s4.8 27.7 44 27.7 44-27.7 44-27.7c0 9.4-6 46.5-44 46.5s-44-38.2-44-46.5z"}))},Xu=function(t){var n=t.title,r=F(t,D6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#ffc72c",d:"M0 155h513v32H0z"}),s.createElement("path",{fill:"#FFF",d:"m164.2 189 7.9 27.7 20.7-20-7 27.9 28-7-20.1 20.7 27.8 7.9-27.8 7.9 20.1 20.7-28-7 7 28-20.7-20.1-7.9 27.8-7.9-27.8-20.7 20.1 7-28-27.9 7 20-20.7-27.7-7.9 27.7-7.9-20-20.7 27.9 7-7-27.9 20.7 20z"}))},Zu=function(t){var n=t.title,r=F(t,A6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#fedd00",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})),s.createElement("circle",{fill:"#012169",cx:126.8,cy:85.7,r:29.9}),s.createElement("path",{d:"m128.3 128.6 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7h11.4zm-.1-115.4 3.6 10.9h11.4l-9.2 6.7 3.5 10.9-9.3-6.7-9.2 6.7 3.5-10.9-9.3-6.7h11.5zm76.4 58.1 3.5 10.9h11.5l-9.3 6.7 3.5 10.9-9.2-6.7-9.3 6.7 3.5-10.9-9.2-6.7H201zm-151.8.1 3.6 10.9h11.4l-9.3 6.8 3.6 10.8-9.3-6.7-9.3 6.7 3.6-10.8-9.3-6.8h11.5zm74-15.6 6.7 20.7h21.8l-17.7 12.8 6.8 20.6-17.6-12.7-17.7 12.7 6.8-20.6-17.6-12.8H120z",fill:"#fedd00"}))},Ju=function(t){var n=t.title,r=F(t,H6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"m448.9 107.7 4.2 13.1h13.8l-11.1 8.1L460 142l-11.1-8.1-11.1 8.1 4.2-13.1-11.1-8.1h13.7zm-64.2 145.9 5.1 15.6h16.4l-13.2 9.7 5 15.6-13.3-9.7-13.2 9.7 5-15.6-13.3-9.7h16.5zm.1-210.2 4.7 14.6h15.3l-12.4 8.9 4.7 14.6-12.3-9-12.4 9 4.7-14.6-12.3-8.9H380zm-64.2 86 4.7 14.5h15.3l-12.3 9 4.7 14.5-12.4-8.9-12.3 8.9 4.7-14.5-12.4-9h15.3z",fill:"#D80027",stroke:"#FFF",strokeWidth:2,strokeMiterlimit:10}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},Ru=function(t){var n=t.title,r=F(t,T6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M138 0h377v114H138z"}),s.createElement("path",{fill:"#4A7C3A",d:"M138 230h377v114H138z"}),s.createElement("g",{fill:"none",stroke:"#FFF",strokeWidth:10,strokeMiterlimit:2},s.createElement("path",{d:"M40.3 35.2s37.1 48 50.8 54.5c13.7 6.5 17.1 5.7 17.1 5.7"}),s.createElement("path",{d:"M100 35.2S62.9 80.6 53.3 87.6c-9.6 7-18.7 7.8-18.7 7.8m17.1-30.1h37.9M70.7 35.2v30.1"})))},e0=function(t){var n=t.title,r=F(t,P6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#da121a",d:"M256.5 0H513v171H256.5z"}),s.createElement("path",{fill:"#072357",d:"M0 171h256.5v171H0zM128 37.9l11.8 36.4h38.3l-31 22.4 11.9 36.4-31-22.5-31 22.5 11.9-36.4-31-22.4h38.3z"}),s.createElement("path",{fill:"#da121a",d:"m384 208.9 11.8 36.4h38.3l-31 22.4 11.9 36.4-31-22.5-31 22.5 11.9-36.4-31-22.4h38.3z"}))},t0=function(t){var n=t.title,r=F(t,I6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h171v342H0zm342 0h171v342H342z",fill:"#D80027"}),s.createElement("path",{fill:"#00A854",d:"M224.3 119c4.3 7.6-17.1 71.9-6.5 87.8s21.9 22.4 38.2 22.4c16.3 0 30.7-6.8 39.6-24.7s-14.2-76.3-6.8-85.4c7.4-9.1 29.3 8.5 35.5 35.2 6.2 26.7-8.4 60.2-20.7 70-12.3 9.7-20.3 9.7-47.6 9.7s-32.4-1.4-45-10.7c-12.5-9.4-28.9-35.8-22.7-67.3 6.2-31.7 31.7-44.6 36-37z"}),s.createElement("path",{fill:"#D91023",stroke:"#E7CA00",strokeWidth:2,d:"M272.6 218.9H240c-7.5 0-13.6-6.1-13.6-13.6v-45c0-7.5 6.1-13.6 13.6-13.6h32.6c7.5 0 13.6 6.1 13.6 13.6v45c.1 7.5-6 13.6-13.6 13.6z"}),s.createElement("ellipse",{fill:"#E7CA00",cx:256.4,cy:200.9,rx:25,ry:13.2}),s.createElement("path",{fill:"#FFF",d:"M256.4 147.6v35.1h28.9c0-38.3 3.9-35.1-28.9-35.1z"}),s.createElement("path",{fill:"#007EA8",d:"M256.4 147.6v35.1h-28.9c0-37.9-3.7-35.1 28.9-35.1z"}),s.createElement("path",{fill:"#947245",d:"M270.1 158.1h1.6v21.5h-1.6z"}),s.createElement("circle",{fill:"#D18219",stroke:"#FFF",cx:241.8,cy:165.2,r:8.1}),s.createElement("ellipse",{fill:"none",stroke:"#00A854",strokeWidth:6,cx:256.4,cy:122.2,rx:20.5,ry:16.5}),s.createElement("ellipse",{fill:"none",stroke:"#E7CA00",strokeWidth:3,cx:256.4,cy:122.2,rx:20.5,ry:16.5}),s.createElement("circle",{fill:"#E7CA00",cx:270.9,cy:163.1,r:8.9}))},n0=function(t){var n=t.title,r=F(t,O6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v85H0zm0 257h513v85H0z",fill:"#D80027"}),s.createElement("path",{fill:"#1481DB",d:"M329.5 171c0 40.3-32.7 73-73 73s-73-32.7-73-73"}),s.createElement("path",{fill:"#FFAB50",d:"M256.5 98c-40.3 0-73 32.7-73 73h146c0-40.3-32.7-73-73-73z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M181.9 169.3h150.5v4.5H181.9z"}),s.createElement("path",{d:"M222.4 162.9h66.5v10.9h-66.5z"})),s.createElement("path",{d:"M212.8 131.1H223s-1.6 55.5.1 57.4c11.9 13.5 25.3 0 25.3 0s-2.7 18.9-17.8 18.9-17.8-18.7-17.8-18.7v-57.6zm85.6 0h-10.2s1.6 55.5-.1 57.4c-11.9 13.5-25.3 0-25.3 0s2.7 18.9 17.8 18.9c15.1 0 17.8-18.7 17.8-18.7v-57.6zM242.6 156l25.9 6.9v-36.4s-14-3.8-14-16.8 14-9.6 14-9.6-25.9-4.6-25.9 8.1V156z",fill:"#D80027",stroke:"#630810",strokeWidth:2}))},r0=function(t){var n=t.title,r=F(t,L6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#C8102E",d:"M0 0h513v342"}),s.createElement("path",{d:"m153.7 225 2.7 8.5h9l-7.2 5.2 2.7 8.6-7.2-5.3-7.3 5.3 2.8-8.6-7.3-5.2h9zm-25.3-120 5.2 16h16.8l-13.6 9.9 5.2 16-13.6-9.9-13.6 9.9 5.2-16-13.6-9.9h16.8zm0 160.3 5.2 16h16.8l-13.6 9.9 5.2 16-13.6-9.9-13.6 9.9 5.2-16-13.6-9.9h16.8zm50.7-96.1 5.2 16h16.8l-13.6 9.9 5.2 16-13.6-9.9-13.6 9.9 5.2-16-13.6-9.9h16.8zm-107.3 4.1 5.2 16h16.8l-13.6 9.9 5.2 15.9-13.6-9.8-13.6 9.8 5.2-15.9-13.6-9.9h16.8z",fill:"#FFF"}),s.createElement("g",{fill:"#FFCD00"},s.createElement("path",{d:"M288 79.9s33 13.8 30 19.7c-2.9 5.9-17.4-7.1-30-3.5-12.7 3.5-28.6 32.4-28.6 32.4s18.6 2.7 34.2 1.5c15.6-1.2 19.7-7.4 19.7-7.4s.7 15.3 12.7 24.3c18.2 13.6 56.2 22.3 56.2 22.3s.6-6.5-2.7-20.7-8-21.4-8-21.4 55.7 38.3 51.2 59.3-30.1 19.6-30.1 19.6 28.4 12.5 37.4-13.5c12.4-35.6-42.4-65.2-42.4-65.2s6.5 3.1 17.1 4.6 20.3-.3 20.3-.3-13.8-43.6-29.2-52.1c-15.3-8.5-37.1-.9-37.1-.9s9.1-5.9 10-15.9c.9-10-3.5-24.1-3.5-24.1-50.1 21.2-21.2 41.2-33 49.2-2 1.4-9.5-9.9-18.8-8.2-11.5 1.8-25.4.3-25.4.3z"}),s.createElement("path",{d:"M404.7 131.8s15.3 17.7 8.2 35.9c-7.1 18.3-37.7 13.5-37.7 13.5s24.7 13.9 40.6-5.3-2.4-43.6-2.4-43.6l-8.7-.5z"})))},s0=function(t){var n=t.title,r=F(t,_6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#0052B4",d:"M512 85.337V256H256L0 85.337z"}),s.createElement("path",{fill:"#D80027",d:"M512 256v170.663H0L256 256z"}),s.createElement("path",{d:"m161.908 256-27.288-12.835 14.532-26.428-29.632 5.668-3.755-29.933-20.64 22.015-20.639-22.015-3.755 29.933-29.631-5.669 14.531 26.428L28.343 256l27.288 12.835L41.1 295.263l29.633-5.668 3.753 29.933 20.639-22.015 20.64 22.015 3.755-29.933 29.631 5.669-14.532-26.427zM21.789 117.607l9.081 12.696 14.879-4.714-9.268 12.56 9.081 12.694-14.809-4.932-9.268 12.559.117-15.608-14.809-4.934 14.88-4.712zm0 235.923 9.081 12.696 14.879-4.714-9.268 12.56 9.081 12.695-14.809-4.933-9.268 12.558.117-15.607-14.809-4.934 14.88-4.712zm188.606-117.961-9.081 12.695-14.879-4.713 9.268 12.559-9.081 12.696 14.809-4.933 9.268 12.558-.117-15.607 14.809-4.934-14.88-4.713z",fill:"#FFDA44"}))},l0=function(t){var n=t.title,r=F(t,V6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"m393.508 170.516 17.512 18.875 23.363-10.821-12.541 22.487 17.513 18.876-25.263-4.978-12.539 22.488-3.073-25.564-25.263-4.978 23.363-10.82z"}),s.createElement("path",{d:"M0 85.343h512v341.326H0z"})),s.createElement("path",{fill:"#01411c",d:"M128 85.331h384v341.337H128z"}),s.createElement("path",{d:"M361.909 298.793c-31.037 22.426-74.378 15.446-96.804-15.592-22.427-31.038-15.446-74.379 15.593-96.804 9.677-6.992 20.55-11.125 31.613-12.563-21.283-3.183-43.777 1.613-62.598 15.211-38.2 27.602-46.792 80.944-19.191 119.145 27.601 38.199 80.944 46.792 119.145 19.189 18.82-13.598 30.436-33.448 34.096-54.655-4.839 10.05-12.176 19.076-21.854 26.069zm-1.329-125.904 17.484 18.842 23.322-10.802-12.519 22.447 17.483 18.844-25.219-4.968-12.519 22.45-3.067-25.521-25.22-4.969 23.323-10.802z",fill:"#FFF"}))},i0=function(t){var n=t.title,r=F(t,B6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M0 85.337h512V256H0z"})),s.createElement("path",{fill:"#D80027",d:"M0 256h512v170.663H0z"}))},o0=function(t){var n=t.title,r=F(t,$6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#00318A",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M342 0h171v342H342z"}))},a0=function(t){var n=t.title,r=F(t,W6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("g",{stroke:"#000"},s.createElement("path",{fill:"#96877d",d:"m400.7 134.5-16.7 5.6-16.7-5.6-5.6-13.9 5.6-13.9h33.4l-5.6 13.9z"}),s.createElement("path",{fill:"#006ec7",d:"M345 134.5v61.2c0 29.8 39 39 39 39s39-9.1 39-39v-61.2h-78z"}),s.createElement("path",{fill:"#337321",d:"M348.6 210.2c9.6 18.4 35.4 24.5 35.4 24.5s25.9-6.1 35.4-24.5l-35.4-59-35.4 59z"}),s.createElement("path",{fill:"#f7e017",d:"m423 195.1-39-60.6-39 60.6v.6c0 5.5 1.3 10.3 3.5 14.5l35.4-55.1 35.4 55.1c2.2-4.2 3.5-9 3.5-14.5v-.6z"})),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},c0=function(t){var n=t.title,r=F(t,U6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M0 85.337h512V153.6H0zm0 136.526h512v68.263H0zM0 358.4h512v68.263H0z",fill:"#D80027"}),s.createElement("path",{fill:"#0052B4",d:"M256 256.006 0 426.668V85.331z"}),s.createElement("path",{fill:"#FFF",d:"m83.477 195.132 15.107 46.498h48.894l-39.554 28.739 15.107 46.499-39.554-28.738-39.555 28.738 15.11-46.499-39.554-28.739H68.37z"}))},d0=function(t){var n=t.title,r=F(t,G6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M0 85.337h512v113.775H0z"}),s.createElement("path",{fill:"#268024",d:"M0 312.888h512v113.775H0z"}),s.createElement("path",{fill:"#e4312b",d:"M256 256.006 0 426.668V85.331z"}))},u0=function(t){var n=t.title,r=F(t,K6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#6DA544",d:"M196.641 85.337v341.326H0V85.337z"}),s.createElement("circle",{fill:"#FFDA44",cx:196.641,cy:256,r:64}),s.createElement("path",{fill:"#D80027",d:"M160.638 224v40.001c0 19.882 16.118 36 36 36s36-16.118 36-36V224h-72z"}),s.createElement("path",{fill:"#FFF",d:"M196.638 276c-6.617 0-12-5.383-12-12v-16h24.001v16c-.001 6.616-5.385 12-12.001 12z"}))},h0=function(t){var n=t.title,r=F(t,q6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 85.331h512v341.337H0z"}),s.createElement("circle",{fill:"#FFDA44",cx:218.902,cy:255.994,r:74.207}))},m0=function(t){var n=t.title,r=F(t,Q6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v113.775H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 312.888h512v113.775H0z"}),s.createElement("path",{fill:"#6DA544",d:"m289.579 216.738-12.592 12.592c5.37 5.372 8.693 12.792 8.693 20.988 0 16.392-13.289 29.68-29.68 29.68-16.392 0-29.68-13.289-29.68-29.68 0-8.195 3.322-15.616 8.693-20.988l-12.592-12.592c-8.594 8.594-13.91 20.466-13.91 33.579 0 26.228 21.261 47.489 47.489 47.489s47.489-21.261 47.489-47.489c0-13.112-5.316-24.985-13.91-33.579z"}),s.createElement("path",{fill:"#FFDA44",d:"m256 232.51 4.421 13.605h14.304l-11.573 8.408 4.421 13.604L256 259.719l-11.573 8.408 4.421-13.604-11.573-8.408h14.304z"}))},f0=function(t){var n=t.title,r=F(t,Y6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#751A46",d:"M0 0h512v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 0v342h150.3l37.7-19.6-37.7-18.9 37.7-19-37.7-18.9 37.7-19-37.7-19 37.7-18.9-37.7-19 37.7-19-37.7-18.9 37.7-19-37.7-18.9 37.7-19-37.7-19L188 57l-37.7-19L188 19.1 150.3 0z"}))},p0=function(t){var n=t.title,r=F(t,X6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#00318A",d:"M0 0h171v342H0z"}),s.createElement("path",{fill:"#D80027",d:"M342 0h171v342H342z"}))},g0=function(t){var n=t.title,r=F(t,Z6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.331h512v341.326H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 85.331h170.663v341.337H0z"}),s.createElement("path",{fill:"#D80027",d:"M341.337 85.331H512v341.337H341.337z"}))},v0=function(t){var n=t.title,r=F(t,J6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 85.331h512v113.775H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 312.882h512v113.775H0z"}),s.createElement("path",{fill:"#D80027",d:"M129.468 181.793v85.136c0 48.429 63.267 63.267 63.267 63.267S256 315.356 256 266.929v-85.136H129.468z"}),s.createElement("path",{d:"M155.634 196.634h74.201v-29.681l-14.841 7.42-22.261-22.26-22.259 22.26-14.84-7.42zm85.526 82.148-48.231-48.231-48.231 48.231 15.741 15.74 32.49-32.49 32.49 32.49z",fill:"#FFDA44"}),s.createElement("path",{fill:"#FFF",d:"M241.16 233.734h-22.504a14.74 14.74 0 0 0 2.001-7.418c0-8.196-6.645-14.84-14.84-14.84-5.663 0-10.581 3.172-13.083 7.836-2.502-4.663-7.421-7.836-13.083-7.836-8.195 0-14.84 6.644-14.84 14.84 0 2.706.736 5.235 2.001 7.418h-22.114c0 8.196 7.139 14.84 15.334 14.84h-.494c0 8.196 6.644 14.84 14.84 14.84 0 7.257 5.211 13.286 12.094 14.576l-11.694 26.401a48.075 48.075 0 0 0 18.149 3.544 48.079 48.079 0 0 0 18.149-3.544l-11.694-26.401c6.883-1.29 12.094-7.319 12.094-14.576 8.196 0 14.84-6.644 14.84-14.84h-.494c8.199 0 15.338-6.644 15.338-14.84z"}))},x0=function(t){var n=t.title,r=F(t,R6);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.33v341.332h512V85.33z"}),s.createElement("path",{fill:"#0052B4",d:"M0 85.333h512V426.67H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 85.333h512v113.775H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 312.884h512v113.775H0z"}))},w0=function(t){var n=t.title,r=F(t,e8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 255.994h512v81.619H0z"}),s.createElement("path",{fill:"#496E2D",d:"M0 337.614h512v89.043H0z"}),s.createElement("path",{fill:"#FFDA44",d:"m278.261 185.209 20.844 9.804-11.099 20.186 22.632-4.33 2.868 22.865 15.765-16.816 15.766 16.816 2.867-22.865 22.633 4.33-11.099-20.186 20.843-9.804-20.844-9.805 11.1-20.185-22.633 4.329-2.868-22.864-15.765 16.816-15.766-16.816-2.867 22.864-22.634-4.329 11.1 20.187z"}))},b0=function(t){var n=t.title,r=F(t,t8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h513v342H0z",fill:"#fff"}),s.createElement("g",{fill:"#055e1c"},s.createElement("path",{d:"M0 0v342h513V0zm218 76q1 2-2 5-3 2-1 4 3 4 0 6-2 1-5-1-6-6 0-14 6-4 8 0m-102 2 1 6q0 4-2 4-5 1-5-6l2-4zm39 1 1 2q-1 4-5 4-5 0-6-4c0-4 7-6 10-2m47 2q3 4 2 9c-1 2-22 19-24 19q-3 0-4-4l6-6 6-5v-3c-5-10 7-18 14-10m35-3q3 1 0 7-2 8-6 6c-3-1-3 14 0 19q2 4 7-1c2-3 2-5 2-15 0-12 0-13 2-13q5-2 5 13 1 11 3 13 3 6 6 3 3-2-1-12-3-12 1-16h9q2-2 9 1l6 2 1-2q4-4 6-1l3 17c3 16 3 16 7 24l15 30q1 6-4 5l-8-14-6-12 1 20c1 21 1 23-4 23q-4 2-4-15l-1-27-1-16-9-13c-8-12-8-13-11-13q-6-1-2 6l2 7q0 4 3 2 6-2 6 3-1 4-8 5l-5 2-5 2q-6 0-10-3-2-3-5 1-5 5-12 2-5-1-7-10l-1-3-1 3q-3 7-9 8-7 0-9-11-3-10 2-10 4-1 5 7l2 6q1 0 4-7 6-17 13-12h1c-1-1 2-10 4-11zm-97 10 2 16 1 9h4q5 2 6-1c2-1 2-2-1-11l-3-12 3-1 11 5V82q4-2 6 1l3 23 1 20h2q5 0 5 5 1 6 3 0 3-9 8-2 1 3 2 0 3-7 4-6c5 0 6 7 1 13q-3 3-7 3l-6 1q-5 4-10 0l-2-2v5c0 21-16 42-33 42q-21-1-23-21 0-5 2-6 4-1 6 6 1 12 12 13 14 2 24-15 6-11 1-5-12 18-28 11-7-5-9-17-2-6 1-7 5-3 6 6 1 12 10 12 7 0 13-8 5-8-1-7-11-1-8-12 8-11 17-5l3 2-1-12-4-22q-3 1 0 7c2 6 2 6 0 10l-5 5q-3 3-7 1h-5l-1 16c-1 19-1 20-4 21-4 1-4-2-4-19l1-15-3 1q-3 1-6-2c-2-2-2-2-3-14l-1-12q-2-1-2 10l-1 13q-3 6-8 4c-3-2-4-4-7-15q-4-15 2-14 4-1 5 8l1 5 1-6q0-13 9-12l6 2c2 3 2 4 2 14l1 11 2-1 1-8-2-16q-3-12 2-11 3-1 5 7m163-3q4 10 1 13-4 3-7-7-3-11 2-10zm12-3 3 7q2 6 1 8v16l2 27c2 22 2 21 6 21h3l-1-5-2-23-3-33c-2-16-1-19 3-19 3 0 8 14 6 16v24c5 47 5 48 0 47q-3-2-1 4l2 6q2 1 5-9 7-18 10-16 3 0 7 5 4 7 7 7 4-1 1-33l-1-21-10-12-9-15q0-5 8-1 5 2 6 6l2 6q3 4 1-4 0-10 3-10c4 0 9 10 7 13l-1 8q1 8 4 12l3 3-2-15c-2-16-2-19 1-20q3 0 5 4l4 5h2q6-4 8 9 0 8-4 8-3 0-4-6 1-8-3-5c-1 2-1 3 1 19l2 17 5 7c6 10 12 21 11 22q-2 3-5 2l-5-8-5-8 1 8c0 11 0 11-3 11q-5 3-5-7l-1-16c0-8-1-10-4-15l-4-5v19c1 21 0 25-5 28q-6 5-13-3l-4-5-4 9q-6 14-11 15-9-1-11-16-1-8-5-1c-3 5-12 13-19 17q-8 4-8-2-1-2 6-6c9-5 17-14 17-18l-5-78q2-4 5-1m89 5 4 6q1 1-2 3l-2 2 4 24q4 25 4 35c0 10 0 11-3 17q-7 13-19 14-8 0-7-2-2-4 7-6 15-2 14-23a708 708 0 0 0-8-75c3-2 3-1 8 5m-211 19 1 4q0 3 2 2 5 0 5 4c0 4-9 6-13 2-4-5 0-17 5-12m108 1h2l4-1q4 2 0 7-7 6-11-1v-5q3-2 5 0m55 2q3 4-1 6-2 0-1 5t-1 6q-1 2-10-6-8-7-6-9 3-4 7 0l2 2 2-3q5-3 8-1m-131 13c3 2 6 14 6 17q-1 6 6 1l10-4q5-1 7-4 4-9 10-12 10 0 11 9 0 7-16 13l-2 1 13 1c16 0 16 0 13 9q-2 7-4 7l-10 2q-19 3-17 9 1 2 4 3 6 3 3 7l-7 1q-13-2-21-10l-3-3-2 3q-7 10-19 13-10 2-15-10l-5 2q-18 10-19 8l-2-3c0-2 1-2 15-11l9-6q1-3 5-4c3 1 10-5 12-9q3-6-1-15l-2-8q1-5 6-6c3 0 8 5 8 7q-1 4-4 3v1l1 10c1 9-1 13-10 21l-7 6 2 3q5 9 15-2 10-8 10-23 0-10-6-24v-4q3-4 6 1m17 2q2 3 4 0 11-3 5 5c-4 5-12 5-15-1v-4zm118 5 1 2q1 2-7 8c-8 6-9 7-11 5q-5-4 6-10c8-6 8-6 11-5m-229 3q3 2-10 10-12 8-13 3-5-3 9-10 13-8 14-3m229 10c3 2 4 9 3 11q-3 3-6 1c-2-2-3-11-1-13q1-2 4 1m-172 7q3 3 2 7 1 5-3 5-3 1-3-3l-2-4q-3-3-1-6 4-2 7 1m-79 9 1 8q0 9 3 6 4-1 4 3-1 7-7 7-7-1-7-14-1-9 2-10zm168 12q0 4 3 2t4 3q-2 6-8 8l-4-2q-3-3-4-2-4 0-5-4l5-6q7-6 7-4 3 1 2 5m102 3q4 4 1 9-7 7-7-4t6-5m-42 73c0 2 1 2 12 2q24-1 22 11 0 7-6 10c-4 1-31 2-34 0q-2-1-2-6v-4h-82l-74-1c-16 0-28-10-28-10h92c91 0 92-1 92-2q-1-3 4-5c5-2 4 4 4 5"}),s.createElement("path",{d:"m195 86 1 1 1-1-1-1q-2 0-1 1m84 5q-2 2 1 5l3 3-1-4-1-5zm-125 45q-3 3-1 4 5-1 6-4zm110-7q-4 5 0 3 6-4 2-4zm-31 30q0 6 4 8l5 4q3 2 2-3 0-3 4-7 4-3 2-4l-13-3h-5zm104 101q-1 3 13 2c11 0 13 0 14-2l-13-1z"})))},E0=function(t){var n=t.title,r=F(t,n8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#496E2D",d:"M0 85.334h512v341.337H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 426.663V85.329h512"}),s.createElement("path",{fill:"#FFDA44",d:"M0 396.494v30.169h45.255L512 115.499v-30.17h-45.255z"}),s.createElement("path",{d:"m85.688 108.787 5.12 15.756h16.566l-13.403 9.737 5.12 15.757-13.403-9.738-13.405 9.738 5.12-15.757L64 124.543h16.567zm84.624 0 5.121 15.756H192l-13.403 9.737 5.12 15.757-13.405-9.738-13.403 9.738 5.12-15.757-13.403-9.737h16.566zm-84.624 82.502 5.12 15.756h16.566l-13.403 9.738 5.12 15.757-13.403-9.739-13.405 9.739 5.12-15.757L64 207.045h16.567zm84.624 0 5.121 15.756H192l-13.403 9.738 5.12 15.757-13.405-9.739-13.403 9.739 5.12-15.757-13.403-9.738h16.566zM128 150.037l5.12 15.756h16.568l-13.405 9.738 5.12 15.758L128 181.55l-13.403 9.739 5.12-15.758-13.405-9.738h16.568z",fill:"#FFF"}))},y0=function(t){var n=t.title,r=F(t,r8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M235.454 85.337 0 426.663 427.345 85.337z"}),s.createElement("path",{fill:"#6DA544",d:"M512 329.393 0 426.663h512z"}),s.createElement("path",{fill:"#D80027",d:"M512 85.337h-84.655L0 426.663l512-204.512z"}),s.createElement("path",{fill:"#0052B4",d:"M0 85.337v341.326L235.454 85.337z"}))},C0=function(t){var n=t.title,r=F(t,s8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v113.775H0z"}),s.createElement("path",{d:"M0 312.888h512v113.775H0z"}),s.createElement("path",{fill:"#496E2D",d:"M0 426.668V85.331l256 170.675z"}))},S0=function(t){var n=t.title,r=F(t,l8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 85.333h512V426.67H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M192 85.33h-64v138.666H0v64h128v138.666h64V287.996h320v-64H192z"}))},z0=function(t){var n=t.title,r=F(t,i8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512V256H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M83.478 170.666c0-24.865 17.476-45.637 40.812-50.734a52.059 52.059 0 0 0-11.13-1.208c-28.688 0-51.942 23.254-51.942 51.941s23.255 51.942 51.942 51.942c3.822 0 7.543-.425 11.13-1.208-23.336-5.095-40.812-25.867-40.812-50.733zm66.783-48.231 3.684 11.337h11.921l-9.645 7.007 3.684 11.337-9.644-7.006-9.645 7.006 3.685-11.337-9.645-7.007h11.921z"}),s.createElement("path",{d:"m121.344 144.696 3.683 11.337h11.921l-9.645 7.007 3.684 11.337-9.643-7.006-9.645 7.006 3.685-11.337-9.645-7.007h11.921zm57.834 0 3.684 11.337h11.921l-9.645 7.007 3.684 11.337-9.644-7.006-9.644 7.006 3.685-11.337-9.645-7.007h11.921zm-11.131 33.391 3.684 11.337h11.921l-9.644 7.007 3.684 11.337-9.645-7.006-9.643 7.006 3.684-11.337-9.644-7.007h11.92zm-35.573 0 3.683 11.337h11.921l-9.644 7.007 3.684 11.337-9.644-7.006-9.644 7.006 3.684-11.337-9.644-7.007h11.92z"})))},M0=function(t){var n=t.title,r=F(t,o8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#5f7dbd",d:"M449 139.7c-.1 44.4-7.2 92.1-65 114.9-57.8-22.8-64.9-70.5-65-114.9h130z"}),s.createElement("path",{fill:"#f2d049",d:"M449 139.7c0-16.7-.9-32.9-.5-47.1C426.9 83 398.4 81 383.9 81s-42.9 2-64.6 11.6c.4 14.2-.5 30.4-.5 47.1H449z"}),s.createElement("path",{fill:"#b38c79",d:"m369.5 204.5.3 10.3-12.8.2 4.9 13.2h-17.3c-18-20.2-23.4-42.4-24.9-68.1l9.1-9.7 8.3 14.3 10.8-12.8 7 7.8.8 15.7 13.8 29.1z"}),s.createElement("path",{fill:"#5c5568",d:"m436.6 192.5-8.6 18.3h-47l-29.2-19.5 25.7 10.5h25.1l3.7-6.5 7.2.2 2-3z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},N0=function(t){var n=t.title,r=F(t,a8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 199.112h512v113.775H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 312.888h512v113.775H0z"}),s.createElement("path",{fill:"#FFF",d:"M233.606 196.639v14.837c0 34.081-44.522 44.522-44.522 44.522s-44.522-10.44-44.522-44.522v-14.837l-.145-44.188 89.043-.266.146 44.454z"}),s.createElement("path",{fill:"#0052B4",d:"M233.606 196.639v14.837c0 34.081-44.522 44.522-44.522 44.522s-44.522-10.44-44.522-44.522v-14.837l-.145-44.188 89.043-.266.146 44.454z"}),s.createElement("path",{fill:"#FFF",d:"M233.606 196.639v14.837c0 34.081-44.522 44.522-44.522 44.522s-44.522-10.44-44.522-44.522v-14.837l14.848 14.837 29.674-22.261 29.685 22.261 14.837-14.837z"}))},j0=function(t){var n=t.title,r=F(t,c8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.334h512v341.337H0z"}),s.createElement("path",{fill:"#FFF",d:"M512 295.883H202.195v130.783h-79.76V295.883H0v-79.772h122.435V85.329h79.76v130.782H512v61.218z"}),s.createElement("path",{fill:"#2E52B2",d:"M512 234.666v42.663H183.652v149.337h-42.674V277.329H0v-42.663h140.978V85.329h42.674v149.337z"}))},k0=function(t){var n=t.title,r=F(t,d8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 196.641h512v118.717H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 315.359h512v111.304H0z"}),s.createElement("path",{fill:"#FFF",d:"M129.468 181.799v85.136c0 48.429 63.267 63.267 63.267 63.267S256 315.362 256 266.935v-85.136H129.468z"}),s.createElement("path",{fill:"#D80027",d:"M146.126 184.294v81.941c0 5.472 1.215 10.64 3.623 15.485h85.97c2.408-4.844 3.623-10.012 3.623-15.485v-81.941h-93.216z"}),s.createElement("path",{fill:"#FFF",d:"M221.301 241.427h-21.425v-14.283h14.284v-14.283h-14.284v-14.284h-14.283v14.284h-14.282v14.283h14.282v14.283h-21.426v14.284h21.426v14.283h14.283v-14.283h21.425z"}),s.createElement("path",{fill:"#0052B4",d:"M169.232 301.658c9.204 5.783 18.66 9.143 23.502 10.636 4.842-1.494 14.298-4.852 23.502-10.636 9.282-5.833 15.79-12.506 19.484-19.939a24.878 24.878 0 0 0-14.418-4.583c-1.956 0-3.856.232-5.682.657-3.871-8.796-12.658-14.94-22.884-14.94-10.227 0-19.013 6.144-22.884 14.94a25.048 25.048 0 0 0-5.682-.657 24.88 24.88 0 0 0-14.418 4.583c3.691 7.433 10.198 14.106 19.48 19.939z"}))},F0=function(t){var n=t.title,r=F(t,u8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 85.337h512v113.775H0z"}),s.createElement("path",{fill:"#338AF3",d:"M0 312.888h512v113.775H0z"}))},D0=function(t){var n=t.title,r=F(t,h8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 85.34h512v341.326H0z"}),s.createElement("path",{fill:"#FFF",d:"M512 85.334v166.69L0 256.175V85.334z"}),s.createElement("path",{fill:"#6DA544",d:"M323.744 203.099 256 270.843l-67.744-67.744a81.156 81.156 0 0 0-13.879 45.483v22.261c0 35.744 23.097 66.193 55.148 77.213-4.277 8.385-3.556 18.848 2.712 26.671l24.258-19.439 24.258 19.439c6.342-7.915 7.011-18.534 2.564-26.968 31.614-11.261 54.308-41.485 54.308-76.916v-22.261a81.174 81.174 0 0 0-13.881-45.483z"}),s.createElement("path",{fill:"#FFDA44",d:"M256 330.206c-32.732 0-59.362-26.63-59.362-59.362v-22.261c0-32.733 26.63-59.363 59.362-59.363s59.362 26.63 59.362 59.362v22.261c0 32.733-26.63 59.363-59.362 59.363z"}),s.createElement("path",{fill:"#338AF3",d:"M293.101 270.843v-22.261c0-20.458-16.643-37.101-37.101-37.101s-37.101 16.643-37.101 37.101v22.261L256 278.264l37.101-7.421z"}),s.createElement("path",{fill:"#6DA544",d:"M218.899 270.843c0 20.458 16.643 37.101 37.101 37.101s37.101-16.643 37.101-37.101h-74.202z"}),s.createElement("path",{fill:"#FFDA44",d:"M300.522 189.22c0-12.295-9.966-22.261-22.261-22.261a22.173 22.173 0 0 0-14.84 5.672v-13.093h7.421v-14.84h-7.421v-7.421h-14.84v7.421h-7.421v14.84h7.421v13.093a22.177 22.177 0 0 0-14.841-5.672c-12.295 0-22.261 9.966-22.261 22.261 0 6.591 2.867 12.512 7.421 16.589v13.093h74.203v-13.093c4.552-4.077 7.419-9.997 7.419-16.589z"}))},A0=function(t){var n=t.title,r=F(t,m8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.331h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M330.207 85.331H512v341.337H330.207z"}),s.createElement("path",{d:"M0 85.331h181.793v341.337H0zm255.999 111.301 14.733 45.347h47.685l-38.576 28.029 14.734 45.348-38.576-28.026-38.577 28.026 14.737-45.348-38.576-28.029h47.681z",fill:"#496E2D"}))},H0=function(t){var n=t.title,r=F(t,f8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#FFF",d:"m256 157.273 22.663 69.748H352l-59.332 43.106 22.664 69.749L256 296.769l-59.332 43.107 22.664-69.749L160 227.021h73.337z"}))},T0=function(t){var n=t.title,r=F(t,p8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#A2001D",d:"M0 196.636h512v118.728H0z"}),s.createElement("path",{d:"M0 352.462h512v74.207H0zM0 85.331h512v74.207H0z",fill:"#6DA544"}),s.createElement("path",{fill:"#FFDA44",d:"m256.742 218.003 9.43 29.021h30.518L272 264.963l9.431 29.023-24.689-17.937-24.689 17.937 9.431-29.023-24.69-17.939h30.518z"}))},P0=function(t){var n=t.title,r=F(t,g8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#496E2D",d:"M0 322.783h512v103.88H0z"}),s.createElement("path",{d:"M0 85.337h512v104.515H0z"}),s.createElement("path",{fill:"#A2001D",d:"M0 210.877h512v89.656H0z"}),s.createElement("path",{fill:"#0052B4",d:"M256 256.006 0 426.668V85.331z"}),s.createElement("path",{fill:"#FFDA44",d:"m73.178 209.188 20.831 29.067 34.084-10.83-21.207 28.795 20.83 29.069-33.939-11.271-21.208 28.794.234-35.762-33.94-11.273 34.083-10.83z"}))},I0=function(t){var n=t.title,r=F(t,v8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M0 85.337h512v113.775H0zm0 227.551h512v113.775H0z",fill:"#6DA544"}),s.createElement("path",{fill:"#D80027",d:"M256 256.006 0 426.668V85.331z"}),s.createElement("path",{d:"m302.049 226.318 7.368 22.674h23.842l-19.288 14.016 7.366 22.674-19.288-14.015-19.287 14.015 7.366-22.674-19.288-14.016h23.842zm74.203 0 7.367 22.674h23.842l-19.288 14.016 7.367 22.674-19.288-14.015-19.288 14.015 7.367-22.674-19.288-14.016h23.842z"}))},O0=function(t){var n=t.title,r=F(t,x8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M0 85.337h512v113.775H0zm0 227.551h512v113.775H0z",fill:"#0052B4"}),s.createElement("path",{fill:"#FFDA44",d:"M228.582 261.936 256 214.447l27.418 47.489z"}),s.createElement("path",{fill:"#6DA544",d:"M291.616 277.616 256 295.425l-35.616-17.809v-23.744h71.232z"}),s.createElement("path",{fill:"#FFDA44",d:"m289.579 216.485-12.592 12.592c5.37 5.372 8.693 12.791 8.693 20.988 0 16.392-13.289 29.68-29.68 29.68-16.392 0-29.68-13.289-29.68-29.68 0-8.195 3.322-15.616 8.693-20.988l-12.592-12.592c-8.594 8.594-13.91 20.466-13.91 33.579 0 26.228 21.261 47.489 47.489 47.489s47.489-21.261 47.489-47.489c0-13.114-5.316-24.987-13.91-33.579z"}))},L0=function(t){var n=t.title,r=F(t,w8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M512 85.331v166.69L0 256.173V85.331z"}),s.createElement("path",{fill:"#FFF",d:"M256 256.006 0 426.668V85.331z"}),s.createElement("g",{fill:"#FFDA44"},s.createElement("path",{d:"M59.621 256a59.546 59.546 0 0 0-.193 4.57c0 32.821 26.607 59.429 59.429 59.429s59.429-26.607 59.429-59.429c0-1.539-.078-3.061-.193-4.57H59.621z"}),s.createElement("circle",{cx:118.862,cy:210.287,r:18.286})),s.createElement("path",{fill:"#D80027",d:"M77.715 205.714v59.429c0 31.494 41.144 41.143 41.144 41.143s41.144-9.649 41.144-41.143v-59.429H77.715z"}),s.createElement("path",{fill:"#338AF3",d:"M118.877 287.148c-7.632-2.746-22.876-9.767-22.876-22.006v-41.144h45.715v41.144c-.001 12.28-15.244 19.283-22.839 22.006z"}),s.createElement("path",{fill:"#F3F3F3",d:"M128.001 246.856v-9.142l-9.144-4.571-9.142 4.571v9.142l-4.571 4.573v18.285h27.428v-18.285z"}))},_0=function(t){var n=t.title,r=F(t,b8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h900v600H0z",fill:"#0f0f0f"}),s.createElement("path",{d:"M0 0h900v400H0z",fill:"#fff"}),s.createElement("path",{d:"M0 0h900v200H0z",fill:"#047a3f"}),s.createElement("path",{d:"m176.26 375 48.738-150 48.738 150-127.6-92.705h157.72M626.256 375l48.738-150 48.738 150-127.6-92.705h157.72M401.252 375l48.738-150 48.738 150-127.6-92.705h157.72",fill:"#ce1126"}))},V0=function(t){var n=t.title,r=F(t,E8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#2B5DEA",d:"M0 0h900v600H0V0z"}),s.createElement("path",{fill:"#FFDF29",d:"M0 100h900v400H0V100z"}),s.createElement("path",{fill:"#D70000",d:"M0 150h900v300H0V150z"}),s.createElement("path",{fill:"#FFF",d:"M450 171.4v257.2c114.3 0 171.4-85.7 214.3-128.6-42.9-42.9-100-128.6-214.3-128.6z"}),s.createElement("path",{d:"M450 171.4c-100 0-171.4 85.7-214.3 128.6C278.6 342.9 350 428.6 450 428.6V171.4z"}),s.createElement("path",{fill:"#FFF",d:"M346.3 254.3h21v91.3h-21zm51.9 0h21v91.3h-21z"}),s.createElement("path",{d:"M477.8 254.3h21v91.3h-21zm51.9 0h21v91.3h-21z"}))},B0=function(t){var n=t.title,r=F(t,y8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})),s.createElement("path",{fill:"#1799f8",d:"M448.9 169.5c0 9.6-.3 29.6-1.4 39.2-4.1 34.9-23.5 68.8-62.1 85.9-45.3-17.9-60.8-51-64.9-85.9-1.1-9.6-1.5-19.4-1.5-29l.3-47.1h129.2l.4 36.9z"}),s.createElement("path",{fill:"#FFF",d:"M447.5 208.7c-.2 1.6-.4 3.3-.6 4.9-4.8 33.1-22.9 65.4-61.5 81-43.2-17-59.4-47.9-64.2-81-.2-1.6-.4-3.2-.6-4.9"}),s.createElement("path",{fill:"#1799f8",d:"m385.4 251.7-22.9-43h45.8z"}),s.createElement("path",{fill:"#FFF",d:"m385.4 165.8-22.9 42.9h45.8z"}),s.createElement("ellipse",{fill:"#dcb072",cx:474.8,cy:236.8,rx:16.8,ry:43.3}),s.createElement("ellipse",{fill:"#dcb072",cx:295.3,cy:236.8,rx:16.8,ry:43.3}),s.createElement("path",{fill:"#FFF",d:"m385.4 31.5-33.4 44h68.5zM315.5 280s33.8 29.5 69.9 29.5 67.1-29.5 67.1-29.5l8.5 14.6S439.2 326 385.4 326 307 294.6 307 294.6l8.5-14.6z"}),s.createElement("ellipse",{fill:"#A5A5A5",cx:386.3,cy:104.3,rx:34.3,ry:23.3}))},$0=function(t){var n=t.title,r=F(t,C8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFDA44",stroke:"#fff",strokeWidth:4,d:"M332.1 106.7v78.2c0 38.1 51.9 49.8 51.9 49.8s51.9-11.7 51.9-49.8v-78.2H332.1z"}),s.createElement("path",{fill:"#fcad56",d:"M376.6 135.1c0 7.9-6.6 28.4-14.8 28.4S347 142.9 347 135.1c0-7.9 14.8-14.2 14.8-14.2s14.8 6.4 14.8 14.2z"}),s.createElement("path",{fill:"#9e540a",d:"M416 150.6c2.4-5.6 4.3-13.8 4.3-17.9 0-6.5-8.9-11.9-8.9-11.9s-8.9 5.3-8.9 11.9c0 4.1 1.9 12.3 4.3 17.9l-5.1 11.1c3 1.2 6.3 1.8 9.8 1.8 3.5 0 6.8-.7 9.8-1.8l-5.3-11.1z"}),s.createElement("path",{fill:"#009e49",d:"M372.9 184.9s-7.4 14.2-7.4 28.4h37.1c0-14.2-7.4-28.4-7.4-28.4l-11.1-7.1-11.2 7.1z"}),s.createElement("path",{fill:"#ce1126",d:"M395.1 184.9v-3.6c0-5.9-5-10.7-11.1-10.7s-11.1 4.8-11.1 10.7v3.6h22.2z"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},W0=function(t){var n=t.title,r=F(t,S8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 85.331h170.663v341.337H0z"}),s.createElement("path",{fill:"#D80027",d:"M341.337 85.331H512v341.337H341.337z"}))},U0=function(t){var n=t.title,r=F(t,z8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22.5 15"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h21v15H0V0z"}),s.createElement("path",{fill:"#0A388A",d:"M0 0h22.5v15H0V0z"}),s.createElement("path",{fill:"#FFF",d:"M0 0h11.3v7.5H0V0z"}),s.createElement("path",{fill:"#D80027",d:"M7.1 0h3.6v7H7.1V0z"}),s.createElement("path",{fill:"#0A388A",d:"M0 0h3.6v7H0V0z"}),s.createElement("path",{fill:"#FFF",d:"M3.6 0h3.6v7H3.6V0zm10.9 6h5L19 7h-1.5v.5h1l-.5 1h-.5V10h-1V7H15l-.5-1zm4 2.5 1 1.5h-2l1-1.5zm-3 0 1 1.5h-2l1-1.5zm1.5 3L16 10h2l-1 1.5zM20 8c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm-6 0c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm1 4c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm4 0c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm-2 1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5z"}))},G0=function(t){var n=t.title,r=F(t,M8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M0 85.337h512V153.6H0zM0 358.4h512v68.263H0zm0-136.537h512v68.263H0z",fill:"#496E2D"}),s.createElement("path",{fill:"#D80027",d:"M0 85.337h204.054v204.054H0z"}),s.createElement("path",{fill:"#FFF",d:"m102.026 133.938 13.26 40.812h42.916l-34.718 25.226 13.26 40.814-34.718-25.224-34.719 25.224 13.263-40.814-34.718-25.226h42.913z"}))},K0=function(t){var n=t.title,r=F(t,N8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.334h512V426.66H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 194.056h512v123.882H0z"}),s.createElement("path",{d:"M0 85.334h512v54.522H0zm0 286.809h512v54.522H0z",fill:"#D80027"}))},q0=function(t){var n=t.title,r=F(t,j8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v113.775H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 312.888h512v113.775H0z"}),s.createElement("path",{d:"M226.318 300.522h59.364v-25.23l-11.873 5.937L256 263.421l-17.809 17.808-11.873-5.937zm-33.963-29.682 2.763 8.504h8.94l-7.233 5.255 2.763 8.502-7.233-5.255-7.234 5.255 2.763-8.502-7.233-5.255h8.94zm8.566-29.68 2.763 8.502h8.94l-7.233 5.255 2.763 8.504-7.233-5.256-7.234 5.256 2.763-8.504-7.233-5.255h8.94zm24.488-22.261 2.763 8.502h8.94l-7.233 5.255 2.763 8.504-7.233-5.256-7.234 5.256 2.763-8.504-7.233-5.255h8.94zm94.236 51.941-2.763 8.504h-8.94l7.233 5.255-2.763 8.502 7.233-5.255 7.234 5.255-2.763-8.502 7.233-5.255h-8.94zm-8.566-29.68-2.763 8.502h-8.94l7.233 5.255-2.763 8.504 7.233-5.256 7.234 5.256-2.763-8.504 7.233-5.255h-8.94zm-24.488-22.261-2.763 8.502h-8.94l7.233 5.255-2.763 8.504 7.233-5.256 7.234 5.256-2.763-8.504 7.233-5.255h-8.94zM256 207.767l2.763 8.503h8.941l-7.234 5.256 2.763 8.502-7.233-5.254-7.233 5.254 2.763-8.502-7.234-5.256h8.941z",fill:"#FFDA44"}))},Q0=function(t){var n=t.title,r=F(t,k8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"m210.715 174.377 3.684 11.338h11.919l-9.643 7.006 3.684 11.337-9.644-7.007-9.644 7.007 3.684-11.337-9.645-7.006h11.921zm-93.899 107.594 4.605 14.172h14.9l-12.055 8.757 4.606 14.173-12.056-8.76-12.055 8.76 4.604-14.173-12.054-8.757h14.899zm27.88-162.292 4.604 14.172h14.901l-12.056 8.758 4.606 14.171-12.055-8.759-12.056 8.759 4.606-14.171-12.055-8.758h14.9zm-75.157 55.652 4.604 14.172h14.9l-12.055 8.758 4.606 14.171-12.055-8.758-12.056 8.758 4.606-14.171-12.055-8.758h14.9z",fill:"#FFF"}),s.createElement("path",{d:"M483.386 354.503H117.801s109.234-88.562 310.593-220.938c.001 0-88.443 128.935 54.992 220.938zm-365.585 11.586c-11.177 0-11.195 17.37 0 17.37h365.585c11.177 0 11.195-17.37 0-17.37H117.801z",fill:"#FFDA44"}))},Y0=function(t){var n=t.title,r=F(t,F8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M256 256 0 90.691v44.242L155.826 256 0 377.067v44.242z"}),s.createElement("path",{d:"M0 90.691v330.618L189.217 256z"}),s.createElement("path",{fill:"#FFF",d:"m44.184 213.36 24.912 23.577 30.121-16.41-14.723 30.98 24.911 23.575-34.012-4.43L60.67 301.63l-6.296-33.716-34.012-4.43 30.119-16.408z"}))},X0=function(t){var n=t.title,r=F(t,D8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#496E2D",d:"M0 85.337h512v341.326H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M357.208 183.679c8.397-23.404-1.036-48.858-21.281-61.536a52.131 52.131 0 0 1 10.884 2.621c27.002 9.688 41.038 39.428 31.35 66.431s-39.428 41.038-66.431 31.35a52.182 52.182 0 0 1-10.069-4.895c23.686 3.084 47.15-10.566 55.547-33.971zm-46.571-67.95-7.297 9.427-11.22-4.026 6.712 9.852-7.296 9.427 11.443-3.338 6.712 9.852.361-11.914 11.444-3.339-11.221-4.025z"}),s.createElement("path",{d:"m330.338 146.448-7.296 9.427-11.221-4.026 6.712 9.852-7.296 9.427 11.443-3.339 6.712 9.853.36-11.915 11.445-3.34-11.221-4.024zM275.9 126.916l-7.296 9.427-11.219-4.024 6.711 9.851-7.296 9.426 11.443-3.338 6.712 9.852.361-11.915 11.444-3.337-11.221-4.027zm-.799 35.189-7.296 9.427-11.221-4.026 6.712 9.852-7.296 9.427 11.444-3.338 6.711 9.852.362-11.915 11.443-3.338-11.22-4.026zm33.484 12.013-7.296 9.427-11.22-4.026 6.712 9.853-7.297 9.426 11.444-3.338 6.712 9.852.36-11.915 11.443-3.338-11.219-4.025z"})),s.createElement("path",{fill:"#D80027",d:"M83.478 85.337h89.043v341.326H83.478z"}),s.createElement("path",{fill:"#FFF",d:"m117.458 175.191-14.908-11.105v-15.705l14.908-11.105h21.084l14.908 11.105v15.705l-14.908 11.105z"}),s.createElement("path",{d:"M128 137.276h-10.542l-14.908 11.105v7.678H128zm0 37.915h10.542l14.908-11.105v-8.012H128z",fill:"#FF9811"}),s.createElement("path",{fill:"#FFF",d:"m117.458 374.725-14.908-11.106v-15.704l14.908-11.105h21.084l14.908 11.105v15.704l-14.908 11.106z"}),s.createElement("path",{d:"M128 336.81h-10.542l-14.908 11.105v7.678H128zm0 37.915h10.542l14.908-11.106v-8.011H128z",fill:"#FF9811"}),s.createElement("path",{d:"m117.458 274.957-14.908-11.105v-15.703l14.908-11.106h21.084l14.908 11.106v15.703l-14.908 11.105zm36.513 24.434h-6.493v-6.493h-11.411l-8.068-8.068-8.067 8.068h-11.41v6.493h-6.493v12.986h6.493v6.492h11.41l8.068 8.069 8.068-8.069h11.41v-6.492h6.493zm0-99.768h-6.493v-6.492h-11.411l-8.068-8.069-8.067 8.069h-11.41v6.492h-6.493v12.986h6.493v6.492h11.41l8.068 8.07 8.068-8.07h11.41v-6.492h6.493z",fill:"#496E2D"}),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M120.576 248.576h14.84v14.84h-14.84z"}),s.createElement("circle",{cx:128,cy:206.113,r:7.421}),s.createElement("circle",{cx:128,cy:305.887,r:7.421})))},Z0=function(t){var n=t.title,r=F(t,A8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.331h512v341.337H0z"}),s.createElement("circle",{fill:"#FFF",cx:256,cy:255.994,r:96}),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"m267.826 219.291 16.47 22.695 26.673-8.649-16.496 22.676 16.468 22.695-26.664-8.681-16.495 22.676.017-28.04-26.664-8.682 26.674-8.648z"}),s.createElement("path",{d:"M277.818 312.724c-31.33 0-56.727-25.397-56.727-56.727s25.397-56.727 56.727-56.727c9.769 0 18.96 2.47 26.985 6.819-12.589-12.31-29.804-19.909-48.803-19.909-38.558 0-69.818 31.259-69.818 69.818s31.26 69.818 69.818 69.818c18.999 0 36.215-7.599 48.803-19.909-8.026 4.347-17.216 6.817-26.985 6.817z"})))},J0=function(t){var n=t.title,r=F(t,H8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 85.331h256v170.663H0z"}),s.createElement("path",{fill:"#D80027",d:"M141.357 157.303V130.59h-26.714v26.713H87.93v26.713h26.713v26.713h26.714v-26.713h26.713v-26.713z"}))},R0=function(t){var n=t.title,r=F(t,T8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#E30A17",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#FFF",d:"M259.7 118.6c-13.1-9.5-29-14.6-45.3-14.5-40.8 0-73.8 30.8-73.8 68.9s33.1 68.9 73.8 68.9c17.1 0 32.9-5.4 45.3-14.5-30 38.6-85.7 45.6-124.3 15.5s-45.6-85.7-15.5-124.3 85.7-45.6 124.3-15.5c5.8 4.5 11 9.8 15.5 15.5zm39.9 65.8-18.1 21.9 1.2-28.4-26.4-10.4 27.3-7.6 1.8-28.3 15.6 23.7 27.5-7.1-17.5 22 15.3 23.9-26.7-9.7z"}))},e2=function(t){var n=t.title,r=F(t,P8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#FFF",d:"m6.066 85.337 207.961 212.636 131.584 128.69h160.323L297.973 214.027 166.389 85.337z"}),s.createElement("path",{d:"M43.364 85.337 384.69 426.663h83.946L127.31 85.337z"}))},t2=function(t){var n=t.title,r=F(t,I8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#00B2EE",d:"M0 171h256.5V0H513v342H0V171z"}),s.createElement("path",{d:"m196.8 274.1 16.8 51.6-43.9-31.9H224l-43.9 31.9 16.7-51.6zm205.8-80.3 16.8 51.6-43.9-31.9h54.3l-43.9 31.9 16.7-51.6zm60.7-44.7 16.8 51.6-43.9-31.9h54.3l-43.9 31.9 16.7-51.6zm0-127.8L480.1 73l-44-32h54.3l-43.9 32 16.8-51.7zm-53 53.7 16.8 51.6-43.9-31.9h54.3l-43.9 31.9L410.3 75zm-77.4 32 16.8 51.6-43.9-31.9H360l-43.9 31.9 16.8-51.6zM350 245.4l16.8 51.6-43.9-31.9h54.3L333.3 297l16.7-51.6zm-71.8-56.2 16.8 51.6-44-31.8h54.3l-43.9 31.9 16.8-51.7zm0 75.3 16.8 51.6-44-31.9h54.3l-43.9 31.9 16.8-51.6z",fill:"#FFDA44"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},n2=function(t){var n=t.title,r=F(t,O8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 85.337h256V256H0z"}),s.createElement("path",{fill:"#FFF",d:"M186.435 170.669 162.558 181.9l12.714 23.125-25.927-4.961-3.286 26.192L128 206.993l-18.06 19.263-3.285-26.192-25.927 4.96 12.714-23.125-23.877-11.23 23.877-11.231-12.714-23.125 25.927 4.96 3.286-26.192L128 134.344l18.06-19.263 3.285 26.192 25.928-4.96-12.715 23.125z"}),s.createElement("circle",{fill:"#0052B4",cx:128,cy:170.674,r:29.006}),s.createElement("path",{fill:"#FFF",d:"M128 190.06c-10.692 0-19.391-8.7-19.391-19.391 0-10.692 8.7-19.391 19.391-19.391 10.692 0 19.391 8.7 19.391 19.391 0 10.691-8.699 19.391-19.391 19.391z"}))},r2=function(t){var n=t.title,r=F(t,L8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#338AF3",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#6DA544",d:"M0 426.663V85.337h512"}),s.createElement("path",{fill:"#FFDA44",d:"M512 152.222V85.337H411.67L0 359.778v66.885h100.33z"}),s.createElement("path",{d:"M512 85.337v40.125L60.193 426.663H0v-40.125L451.807 85.337z"}))},s2=function(t){var n=t.title,r=F(t,_8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#338AF3",d:"M0 85.337h512V256H0z"}))},l2=function(t){var n=t.title,r=F(t,V8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 341.3"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#232323",d:"M0 0h512v341.3H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 56.9h512v56.9H0z"}),s.createElement("path",{fill:"#D32300",d:"M0 113.8h512v56.9H0z"}),s.createElement("path",{fill:"#FFDA44",d:"M0 227.6h512v56.9H0z"}),s.createElement("path",{fill:"#D32300",d:"M0 284.4h512v56.9H0z"}),s.createElement("circle",{fill:"#FFF",cx:256,cy:170.7,r:80.7}),s.createElement("path",{d:"M234.5 127.5c.9-1.4-19.6-2-19.6-2 1.7-2.5 18.4-10.5 18.4-10.5s-.9-6 2.7-9.8l-4.5-9.8s7-3.4 18.4-3.4 19.9 7 21 13.1l-6.4 3.4c-.1 4.7 1.7 11.6-4.3 17.3-5.9 5.7-8.3 6.9-8.5 18.8 0 3.9 2.3 8.2 8.8 11.7 17.4 9.3 38.6 28.2 44.6 33.9 6.1 5.7 5.1 19.2 2.6 25.2s-12.1 14.3-14.3 13.6c-2.2-.6 1.2-9.2-3.5-11.6 0 0-8.9-7.6-16.8.6s-.2 25.2 3.9 28c4.1 2.8 1.7 5-1.9 5H247c-3.8 0-5.4-2.3-1.9-5 7.6-3.8 12.4-15.3 7.4-20.3-4.9-4.9-18.3 1.5-21.5 6.3-2.8 2.8-8.8 3.6-12.9-1.4s-4.1-10.4-1.1-12.5c7-4.8 0 0 .1-.1 0 0 11.9-8.6 29.9-9 3.9 0 4.8-2.2 2.2-4.8 0 0-30.9-27.4-28.1-44.2 3-18.3 20-26.3 13.4-32.5-1.3-1.8 0 0 0 0z"}))},i2=function(t){var n=t.title,r=F(t,B8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v26.3H0zm0 52.6h513v26.3H0zm0 52.6h513v26.3H0zm0 52.6h513v26.3H0zm0 52.7h513v26.3H0zm0 52.6h513v26.3H0zm0 52.6h513V342H0z",fill:"#D80027"}),s.createElement("path",{fill:"#2E52B2",d:"M0 0h256.5v184.1H0z"}),s.createElement("path",{d:"m47.8 138.9-4-12.8-4.4 12.8H26.2l10.7 7.7-4 12.8 10.9-7.9 10.6 7.9-4.1-12.8 10.9-7.7zm56.3 0-4.1-12.8-4.2 12.8H82.6l10.7 7.7-4 12.8 10.7-7.9 10.8 7.9-4-12.8 10.7-7.7zm56.5 0-4.3-12.8-4 12.8h-13.5l11 7.7-4.2 12.8 10.7-7.9 11 7.9-4.2-12.8 10.7-7.7zm56.2 0-4-12.8-4.2 12.8h-13.3l10.8 7.7-4 12.8 10.7-7.9 10.8 7.9-4.3-12.8 11-7.7zM100 75.3l-4.2 12.8H82.6L93.3 96l-4 12.6 10.7-7.8 10.8 7.8-4-12.6 10.7-7.9h-13.4zm-56.2 0-4.4 12.8H26.2L36.9 96l-4 12.6 10.9-7.8 10.6 7.8L50.3 96l10.9-7.9H47.8zm112.5 0-4 12.8h-13.5l11 7.9-4.2 12.6 10.7-7.8 11 7.8-4.2-12.6 10.7-7.9h-13.2zm56.5 0-4.2 12.8h-13.3l10.8 7.9-4 12.6 10.7-7.8 10.8 7.8-4.3-12.6 11-7.9h-13.5zm-169-50.6-4.4 12.6H26.2l10.7 7.9-4 12.7L43.8 50l10.6 7.9-4.1-12.7 10.9-7.9H47.8zm56.2 0-4.2 12.6H82.6l10.7 7.9-4 12.7L100 50l10.8 7.9-4-12.7 10.7-7.9h-13.4zm56.3 0-4 12.6h-13.5l11 7.9-4.2 12.7 10.7-7.9 11 7.9-4.2-12.7 10.7-7.9h-13.2zm56.5 0-4.2 12.6h-13.3l10.8 7.9-4 12.7 10.7-7.9 10.8 7.9-4.3-12.7 11-7.9h-13.5z",fill:"#FFF"}))},o2=function(t){var n=t.title,r=F(t,$8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v26.3H0zm0 52.6h513v26.3H0zm0 52.6h513v26.3H0zm0 52.6h513v26.3H0zm0 52.7h513v26.3H0zm0 52.6h513v26.3H0zm0 52.6h513V342H0z",fill:"#D80027"}),s.createElement("path",{fill:"#2E52B2",d:"M0 0h256.5v184.1H0z"}),s.createElement("path",{d:"m47.8 138.9-4-12.8-4.4 12.8H26.2l10.7 7.7-4 12.8 10.9-7.9 10.6 7.9-4.1-12.8 10.9-7.7zm56.3 0-4.1-12.8-4.2 12.8H82.6l10.7 7.7-4 12.8 10.7-7.9 10.8 7.9-4-12.8 10.7-7.7zm56.5 0-4.3-12.8-4 12.8h-13.5l11 7.7-4.2 12.8 10.7-7.9 11 7.9-4.2-12.8 10.7-7.7zm56.2 0-4-12.8-4.2 12.8h-13.3l10.8 7.7-4 12.8 10.7-7.9 10.8 7.9-4.3-12.8 11-7.7zM100 75.3l-4.2 12.8H82.6L93.3 96l-4 12.6 10.7-7.8 10.8 7.8-4-12.6 10.7-7.9h-13.4zm-56.2 0-4.4 12.8H26.2L36.9 96l-4 12.6 10.9-7.8 10.6 7.8L50.3 96l10.9-7.9H47.8zm112.5 0-4 12.8h-13.5l11 7.9-4.2 12.6 10.7-7.8 11 7.8-4.2-12.6 10.7-7.9h-13.2zm56.5 0-4.2 12.8h-13.3l10.8 7.9-4 12.6 10.7-7.8 10.8 7.8-4.3-12.6 11-7.9h-13.5zm-169-50.6-4.4 12.6H26.2l10.7 7.9-4 12.7L43.8 50l10.6 7.9-4.1-12.7 10.9-7.9H47.8zm56.2 0-4.2 12.6H82.6l10.7 7.9-4 12.7L100 50l10.8 7.9-4-12.7 10.7-7.9h-13.4zm56.3 0-4 12.6h-13.5l11 7.9-4.2 12.7 10.7-7.9 11 7.9-4.2-12.7 10.7-7.9h-13.2zm56.5 0-4.2 12.6h-13.3l10.8 7.9-4 12.7 10.7-7.9 10.8 7.9-4.3-12.7 11-7.9h-13.5z",fill:"#FFF"}))},a2=function(t){var n=t.title,r=F(t,W8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 38h513v38H0zm0 76h513v38H0zm0 76h513v38H0zm0 76h513v38H0z",fill:"#0038a8"}),s.createElement("path",{fill:"#FFF",d:"M0 0h256.5v190H0z"}),s.createElement("path",{fill:"#FED443",d:"m128.3 138.7-15.1 22.6-3.8-26.9L86 148.2l8.2-25.9-27.2 2.2 18.6-19.8L60.3 95l25.4-9.7L67 65.5l27.1 2.3-8.2-25.9 23.4 13.8 3.9-26.9 15.1 22.6 15.1-22.6 3.8 26.9 23.4-13.8-8.2 25.9 27.1-2.2-18.6 19.8 25.4 9.7-25.4 9.7 18.6 19.8-27.1-2.2 8.2 25.9-23.4-13.8-3.9 26.9-15-22.7zm0-.5c23.9.9 44-17.6 44.9-41.5.9-23.9-17.6-44-41.5-44.9h-3.4c-23.9.8-42.6 20.8-41.8 44.6.6 22.8 19 41.1 41.8 41.8zm0-10.6c-18.8 0-34-15.2-34-34s15.2-34 34-34 34 15.2 34 34-15.3 34-34 34z"}))},c2=function(t){var n=t.title,r=F(t,U8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#3081f7",d:"M0 0h513v108H0z"}),s.createElement("path",{fill:"#ee162e",d:"M0 108h513v9H0z"}),s.createElement("path",{fill:"#FFF",d:"M0 117h513v108H0z"}),s.createElement("path",{fill:"#ee162e",d:"M0 225h513v9H0z"}),s.createElement("path",{fill:"#308738",d:"M0 233h513v108H0z"}),s.createElement("path",{d:"M53.5 54c0-23.1 16.4-35 34.3-38.9-2.7-.6-5.6-.9-8.5-.9-22 0-39.8 17.8-39.8 39.8s17.8 39.8 39.8 39.8c2.9 0 5.8-.3 8.5-.9C69.9 89 53.5 77.1 53.5 54zm57.9 21.3 1.8 5.9h6.2l-5 3.6 1.9 5.8-4.9-3.6-5 3.6 1.9-5.8-4.9-3.6h6.1zm27.8 0 1.9 5.9h6.1l-5 3.6 1.9 5.8-4.9-3.6-5 3.6 1.9-5.8-4.9-3.6h6.1zm27.8 0 1.9 5.9h6.1l-4.9 3.6 1.9 5.8-5-3.6-4.9 3.6 1.9-5.8-5-3.6h6.1zm27.9 0 1.9 5.9h6.1l-5 3.6 1.9 5.8-4.9-3.6-5 3.6 1.9-5.8-4.9-3.6h6.1zm27.8 0 1.9 5.9h6.1l-4.9 3.6 1.9 5.8-5-3.6-4.9 3.6 1.9-5.8-5-3.6h6.1zm-83.5-28.9 1.9 5.8h6.1l-5 3.6 1.9 5.8-4.9-3.6-5 3.6 1.9-5.8-4.9-3.6h6.1zm27.8 0 1.9 5.8h6.1l-4.9 3.6 1.9 5.8-5-3.6-4.9 3.6 1.9-5.8-5-3.6h6.1zm27.9 0 1.9 5.8h6.1l-5 3.6 1.9 5.8-4.9-3.6-5 3.6 1.9-5.8-4.9-3.6h6.1zm27.8 0 1.9 5.8h6.1l-4.9 3.6 1.9 5.8-5-3.6-4.9 3.6 1.9-5.8-5-3.6h6.1zm-55.7-29 1.9 5.8h6.1l-4.9 3.6 1.9 5.9-5-3.6-4.9 3.6 1.9-5.9-5-3.6h6.1zm27.9 0 1.9 5.8h6.1l-5 3.6 1.9 5.9-4.9-3.6-5 3.6 1.9-5.9-4.9-3.6h6.1zm27.8 0 1.9 5.8h6.1l-4.9 3.6 1.9 5.9-5-3.6-4.9 3.6 1.9-5.9-5-3.6h6.1z",fill:"#FFF"}))},d2=function(t){var n=t.title,r=F(t,G8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.331h512v341.326H0z"}),s.createElement("path",{fill:"#FFF",d:"M256 85.331h256v341.337H256z"}),s.createElement("path",{fill:"#ACABB1",d:"m321.353 233.837 32.073 42.43c-5.053 7.651-5.026 17.961.817 25.692 7.414 9.807 21.374 11.748 31.182 4.335 9.807-7.414 11.748-21.374 4.334-31.182-5.843-7.731-15.756-10.568-24.495-7.795l-49.988-66.129-11.838 8.949-17.759 13.424 17.899 23.677 17.775-13.401zm46.175 48.78a7.421 7.421 0 1 1 8.95 11.84 7.421 7.421 0 0 1-8.95-11.84z"}),s.createElement("path",{fill:"#FFDA44",d:"m376.367 247.24 17.899-23.677-17.759-13.424-11.838-8.949-49.988 66.129c-8.74-2.775-18.651.063-24.495 7.795-7.414 9.808-5.473 23.768 4.334 31.182 9.808 7.414 23.768 5.473 31.182-4.335 5.845-7.731 5.871-18.041.817-25.692l32.073-42.43 17.775 13.401zm-62.504 45.771a7.42 7.42 0 1 1-11.84-8.95 7.42 7.42 0 0 1 11.84 8.95z"}))},u2=function(t){var n=t.title,r=F(t,K8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFDA44",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#338AF3",d:"M0 85.331h170.663v341.337H0z"}),s.createElement("path",{d:"M341.337 85.331H512v341.337H341.337zM214.261 283.82l-33.393-50.086 33.392-50.087 33.392 50.087zm83.478 0-33.391-50.086 33.391-50.087 33.393 50.087zM256 350.603l-33.391-50.087L256 250.429l33.391 50.087z",fill:"#6DA544"}))},h2=function(t){var n=t.title,r=F(t,q8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22.5 15"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFCE00",d:"M0 0h22.5v5H0z"}),s.createElement("path",{fill:"#203899",d:"M0 5h22.5v5H0z"}),s.createElement("path",{fill:"#D82B2B",d:"M0 10h22.5v5H0z"}),s.createElement("path",{fill:"#FFF",d:"m12.13 5.38.14.46.45.14-.39.27.01.48-.38-.29-.45.15.15-.44-.28-.38h.47zm-1.77 0 .27.39h.47l-.28.38.15.45-.45-.16-.38.28.01-.47-.39-.28.45-.13zm3.44.56-.01.48.39.27-.46.14-.14.45-.27-.38h-.48l.29-.38-.15-.45.45.16zm-5.11.02.4.27.44-.18-.13.46.3.36-.47.02-.26.4-.16-.44-.46-.12.37-.3zm6.55 1.17-.2.44.25.4-.47-.05-.31.36-.1-.46-.43-.18.41-.24.03-.47.35.31zm.19 1.12.21.43.47.07-.34.33.08.46-.42-.22-.42.22.08-.46-.34-.33.47-.07zM7 8.2l.21.43.47.06-.34.33.08.47L7 9.27l-.42.22.08-.47-.34-.33.47-.06zm.31-1.15.45.14.38-.29v.48l.39.26-.45.15-.13.46-.28-.38-.47.01.27-.38z"}))},m2=function(t){var n=t.title,r=F(t,Q8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#012169",d:"M0 0h513v342H0z"}),s.createElement("path",{fill:"#ffc72c",d:"m384.8 174.7-46.2 46.2c8.7 16.7 26.1 28.1 46.2 28.1s37.6-11.4 46.2-28.1l-46.2-46.2z"}),s.createElement("path",{fill:"#006129",stroke:"#fff",strokeWidth:3,d:"M332.7 93v81.8c0 39.8 52 52 52 52s52-12.2 52-52V93h-104z"}),s.createElement("path",{fill:"#FFF",d:"M373.6 130.1h22.3v59.5h-22.3z"}),s.createElement("circle",{fill:"#9c4c00",cx:384.8,cy:130.1,r:11.2}),s.createElement("path",{d:"M347.6 107.8h14.9v14.9h-14.9zm0 33.5h14.9v14.9h-14.9zm0 33.4h14.9v14.9h-14.9zm59.5-66.9H422v14.9h-14.9zm0 33.5H422v14.9h-14.9zm0 33.4H422v14.9h-14.9z",fill:"#ffc72c"}),s.createElement("path",{fill:"#012169",d:"M0 0h256.5v171H0z"}),s.createElement("g",{fill:"#FFF"},s.createElement("path",{d:"M256.5 0v30.6l-45.3 25.2h45.3v59.4h-59.2l59.2 32.9V171h-26.7l-73.7-40.9V171h-55.7v-48.7L12.8 171H0v-30.6l45.3-25.2H0V55.8h59.2L0 22.9V0h26.7l73.7 40.9V0h55.7v48.7L243.7 0z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-55.7-59.4L0 0v15.8l72 40z"})),s.createElement("g",{fill:"#D80027"},s.createElement("path",{d:"M144.3 0h-32.1v69.5H0v32h112.2V171h32.1v-69.5h112.2v-32H144.3z"}),s.createElement("path",{d:"M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"})))},f2=function(t){var n=t.title,r=F(t,Y8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 341.3"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h512v341.3H0z"}),s.createElement("path",{fill:"#1583C4",d:"m397.7 166.3-51 97.7c-1.1 2-.3 4.5 1.8 5.6 2 1.1 4.5.3 5.6-1.8l51-97.7c1-2.1.1-4.6-2-5.5-2-.9-4.3-.2-5.4 1.7z"}),s.createElement("path",{fill:"#1583C4",d:"m404.9 188-57.8 75.4c-1.3 1.9-.8 4.5 1.1 5.8 1.7 1.2 4.1.9 5.5-.7l57.8-75.4c1.4-1.8 1.1-4.4-.8-5.8-1.8-1.5-4.4-1.1-5.8.7z"}),s.createElement("path",{fill:"#1583C4",d:"m379 181.3-32.5 83.1c-.8 2.1.2 4.6 2.4 5.4 2.1.8 4.6-.2 5.4-2.4l32.5-83.1c.7-2.2-.4-4.5-2.6-5.3-2.1-.6-4.3.4-5.2 2.3z"}),s.createElement("path",{fill:"#409347",d:"M122.1 171.9c.4 1.7 1.2 4.7 2.2 8.5 1.7 6.4 3.6 12.8 5.6 18.7 2.3 6.9 14.7 31.4 20.2 39.1 6.9 9.7 14.1 19.3 21.5 28.6 1.6 1.9 4.5 2.1 6.4.5 1.8-1.6 2.1-4.3.7-6.2-7.3-9.2-14.4-18.6-21.2-28.2-4.2-5.8-17.2-31.1-19-36.7-2.9-8.7-5.4-17.6-7.6-26.5-.5-2.4-2.9-4-5.3-3.5s-4 2.9-3.5 5.3c-.1.2 0 .3 0 .4z"}),s.createElement("g",{fill:"#FFD836",stroke:"#231F20",strokeMiterlimit:10},s.createElement("path",{d:"M297.1 114.9S279.5 42.8 261 42.8c-6.9 0-11.9-.6-15.4 6.4-.9 1.7-20.7-1.6-19.1 20.8.5 6.9 1.1-9.8 14.9-3.4 6.3 3-16.4 48.2-16.4 48.2h72.1z"}),s.createElement("path",{d:"m466.1 48.4-90.9 22c-75.3 18.3-42.1 44.4-42.1 44.4l-72.1 12-72.1-12s33.2-26.1-42.1-44.4l-90.9-22C43.1 45.3 38.1 51.8 45.3 63c0 0 106.6 104 126.8 112 20.2 8.1 40.8 0 40.8 0s-14.9 8.7-24 24c-9.2 15.3-4.6 34.7-38.9 40.2-5.5 6.6-5 14 2.9 19.9 7.9 5.8 72.1-48.1 72.1-48.1s-24 24.4-24 36.1c0 5.1 44.1 53.8 60.1 53.8s60.1-48.7 60.1-53.8c0-11.7-24-36.1-24-36.1s64.2 53.9 72.1 48.1 11.4-19.3 2.8-19.9c-28-1.8-29.7-24.9-38.9-40.2-9.2-15.3-24-24-24-24s20.6 8.1 40.8 0S476.7 63 476.7 63c7.2-11.2 2.3-17.7-10.6-14.6z"})),s.createElement("path",{fill:"#FFF",stroke:"#231F20",strokeMiterlimit:10,d:"M201.3 111.8v80.3c0 45.7 59.7 59.7 59.7 59.7s59.7-14 59.7-59.7v-80.3H201.3z"}),s.createElement("path",{d:"M225.2 137.7V235c8.2 6 17 10.2 23.9 12.9V137.7h-23.9zm71.6 0V235c-8.2 6-17 10.2-23.9 12.9V137.7h23.9z",fill:"#D80027"}),s.createElement("path",{fill:"#0052B4",d:"M201.3 111.8h119.4v37.9H201.3z"}),s.createElement("path",{fill:"#1583C4",d:"m60.1 210.5-21.9-58.1H15.7l31.8 80.8h25.2l31.5-80.8H81.7zm391.4-58.6h18.9v81.7h-18.9z"}))},p2=function(t){var n=t.title,r=F(t,X8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M196.641 85.337H0v341.326h512V85.337z"}),s.createElement("path",{fill:"#FFDA44",d:"m256 157.279 22.663 69.747H352l-59.332 43.106 22.664 69.749L256 296.774l-59.332 43.107 22.664-69.749L160 227.026h73.337z"}))},g2=function(t){var n=t.title,r=F(t,Z8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#6DA544",d:"M512 256v170.663H0L215.185 256z"}),s.createElement("path",{fill:"#D80027",d:"M512 85.337V256H215.185L0 85.337z"}),s.createElement("path",{d:"M221.001 239.304 26.868 85.337H8.956l208.168 165.098H512v-11.131zM8.956 426.663h17.912l194.133-153.967H512v-11.131H217.124zM0 92.44v14.206L188.317 256 0 405.354v14.205L206.229 256z"}),s.createElement("g",{fill:"#FFDA44"},s.createElement("path",{d:"M8.956 85.337H0v7.103L206.229 256 0 419.559v7.104h8.956l208.168-165.098H512v-11.13H217.124z"}),s.createElement("path",{d:"M63.718 292.382v-14.295c14.265 0 25.87-11.606 25.87-25.869 0-10.092-8.211-18.303-18.304-18.303-6.875 0-12.469 5.593-12.469 12.469 0 4.397 3.577 7.974 7.974 7.974a4.514 4.514 0 0 0 4.508-4.508h14.295c0 10.368-8.435 18.804-18.802 18.804-12.279-.002-22.269-9.993-22.269-22.271 0-14.758 12.006-26.764 26.764-26.764 17.975 0 32.599 14.623 32.599 32.599 0 22.145-18.018 40.164-40.166 40.164z"})))},v2=function(t){var n=t.title,r=F(t,J8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80B30",d:"M0 0h150v100H0z"}),s.createElement("path",{fill:"#00318A",d:"M0 0h20v44.33H0z"}),s.createElement("path",{fill:"#FFF",d:"M20 0h20v44.33H20z"}),s.createElement("path",{fill:"none",stroke:"#FFF",strokeWidth:3,d:"M0 44.33h62.75V0"}),s.createElement("path",{fill:"#FFF",d:"M108.08 43.29 87.96 23.17h40.25l-20.13 20.12zm-6.7 6.71L81.25 29.88v40.25L101.38 50zm6.7 6.71L87.96 76.83h40.25l-20.13-20.12zm6.71-6.71 20.13-20.13v40.25L114.79 50z"}))},x2=function(t){var n=t.title,r=F(t,R8);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#D80027",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#0052B4",d:"M0 85.331h256v170.663H0z"}),s.createElement("path",{d:"m165.483 181.79 2.764 8.504h8.939l-7.232 5.254 2.763 8.503-7.234-5.255-7.233 5.255 2.763-8.503-7.233-5.254h8.94zm-44.904-66.783 4.606 14.173h14.9l-12.055 8.757 4.605 14.171-12.056-8.758-12.054 8.758 4.605-14.171-12.056-8.757h14.901zm44.522 14.841 4.606 14.172h14.9l-12.055 8.757 4.604 14.173-12.055-8.76-12.054 8.76 4.604-14.173-12.055-8.757h14.9zm-35.192 59.363 4.606 14.172h14.9l-12.055 8.758 4.604 14.171-12.055-8.759-12.054 8.759 4.604-14.171-12.055-8.758h14.9zm-39.01-37.103 4.605 14.173h14.9l-12.055 8.757 4.604 14.173-12.054-8.76-12.055 8.76 4.604-14.173-12.055-8.757h14.9z",fill:"#FFF"}))},w2=function(t){var n=t.title,r=F(t,e9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),s.createElement("path",{d:"M0 0h513v48.8H0zm0 97.5h513v48.8H0zM0 195h513v48.8H0zm0 97.6h513v48.8H0z",fill:"#6DA544"}),s.createElement("path",{fill:"#D80027",d:"M0 0h256.5v146.3H0z"}),s.createElement("path",{fill:"#FFF",d:"m116.9 114.4-7.5-14.8V69.9L128 59l18.6 10.9v22.3l7.4-7.4 4.2 3-4.2 11.8-14.9 14.8z"}),s.createElement("circle",{fill:"#FFF",cx:82,cy:82.8,r:5.4}),s.createElement("circle",{fill:"#FFF",cx:90.8,cy:61.7,r:5.4}),s.createElement("circle",{fill:"#FFF",cx:106.6,cy:46.2,r:5.4}),s.createElement("circle",{fill:"#FFF",cx:128,cy:40.8,r:5.4}),s.createElement("circle",{fill:"#FFF",cx:149.4,cy:46.2,r:5.4}),s.createElement("circle",{fill:"#FFF",cx:165.2,cy:61.7,r:5.4}),s.createElement("circle",{fill:"#FFF",cx:174,cy:82.8,r:5.4}))},b2=function(t){var n=t.title,r=F(t,t9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 900 600",fill:"#e30a17"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 0h900v600H0z",fill:"#fff"}),s.createElement("circle",{cx:300,cy:300,r:150}),s.createElement("circle",{cx:337.5,cy:300,r:120,fill:"#fff"}),s.createElement("path",{d:"M0 60h900v60H0zm0 420h900v60H0zm417.5-180 135.676-44.084-83.852 115.413V228.671l83.852 115.413z"}))},E2=function(t){var n=t.title,r=F(t,n9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 341.33"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#0052B4",d:"M0 0h512v341.34H0z"}),s.createElement("path",{d:"m220.72 42.63 7.95 16.11 17.77 2.58-12.86 12.54 3.04 17.7-15.9-8.36-15.9 8.36 3.03-17.7-12.86-12.54 17.78-2.58zm70.56-.06 7.95 16.1 17.78 2.59-12.86 12.53 3.03 17.71-15.9-8.36-15.9 8.36 3.04-17.71-12.86-12.53 17.77-2.59zm62.08 11.36 7.95 16.11 17.77 2.58-12.86 12.54 3.04 17.7-15.9-8.35-15.9 8.35 3.04-17.7-12.87-12.54 17.78-2.58zm63.01 18.3 7.95 16.11 17.77 2.59-12.86 12.53 3.04 17.71-15.9-8.36-15.9 8.36 3.03-17.71-12.86-12.53 17.78-2.59zm-257.73-18.3 7.95 16.11 17.78 2.58-12.87 12.54 3.04 17.7-15.9-8.35-15.9 8.35 3.04-17.7-12.86-12.54 17.77-2.58zm-63.01 18.3 7.95 16.11 17.78 2.59-12.86 12.53 3.03 17.71-15.9-8.36-15.9 8.36 3.04-17.71-12.86-12.53 17.77-2.59z",fill:"#FFF"}),s.createElement("path",{fill:"#FFDA44",d:"m217.53 259.33-27.22-13.61-27.22-54.43h27.22l27.22-27.22 13.61-27.22 27.22-13.61 13.61 13.61 27.22 13.61v13.61l13.61 13.61 40.83 27.22L340 245.73l-40.83 40.83-13.61-27.22-40.83 27.22v27.22l-13.61-13.61-13.59-40.84z"}))},y2=function(t){var n=t.title,r=F(t,r9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 450 300"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h450v300H0z"}),s.createElement("path",{fill:"red",d:"M0 100h450v200H0z"}),s.createElement("path",{fill:"#FFDF00",d:"M0 200h450v100H0z"}))},C2=function(t){var n=t.title,r=F(t,s9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{fill:"#D80027",d:"M0 85.337h512v113.775H0z"}),s.createElement("path",{d:"M0 312.888h512v113.775H0z"}))},S2=function(t){var n=t.title,r=F(t,l9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 90 60"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 0h90v60H0z"}),s.createElement("path",{stroke:"#7f7f7f",strokeWidth:.25,fill:"#ABABAB",d:"M75.6 39.6c-1.1.7 0 1.8-.6 1.9-.6.1-1.5-1.4-.2-2.5 1.6-1.5 5.8 0 5.9 4.3 0 2.2-.9 6.8-7.2 6.8-7.6 0-11.4-5.7-11.4-11.4 0-4.8 3.7-13.5 6.5-14.6 3.1-1.2 6.7-3.5 6.8-5 0-.5-1.4-.1-3.3.9-3.1 1.7-6.6 2.5-6.6 1.4s2.9-3.1 4-4.6c1.2-1.6.9-5.5 3-5.5 7.6 0 9.9 7.7 7 11.7-1.9 2.6 4.3 1 4.3 1s0 5.3-3.2 7.3c-3 1.8-4.8 3.9-4.8 3.9s.2-4.6-.5-3.9c-.6.7-11.1 4.5-10.3 12 .3 3 4.5 5.4 8.5 5.2s5.7-2.4 5.8-4.9c.1-3.9-3-4.4-3.7-4zm-64.9 4c.1 2.5 1.8 4.7 5.8 4.9s8.2-2.2 8.5-5.2c.8-7.5-9.7-11.3-10.3-12-.7-.7-.5 3.9-.5 3.9s-1.8-2.1-4.8-3.9c-3.2-2-3.2-7.3-3.2-7.3s6.2 1.6 4.3-1c-2.9-4-.6-11.7 7-11.7 2.1 0 1.8 3.9 3 5.5 1.1 1.5 4 3.5 4 4.6s-3.5.3-6.6-1.4c-1.9-1-3.3-1.4-3.3-.9.1 1.5 3.7 3.8 6.8 5 2.8 1.1 6.5 9.8 6.5 14.6 0 5.7-3.8 11.4-11.4 11.4-6.3 0-7.2-4.6-7.2-6.8.1-4.3 4.3-5.8 5.9-4.3 1.2 1.1.4 2.7-.2 2.5-.6-.1.6-1.2-.6-1.9-.6-.4-3.7.1-3.7 4z"}),s.createElement("path",{fill:"#DE393A",d:"M31 28.8v14c0 1.9 2.1 1.6 2.1 1.6h9.3c1.2 0 2.6 2.3 2.6 2.3s1.4-2.3 2.5-2.3h9.6s2 .2 2-1.8V28.7H31z"}),s.createElement("path",{fill:"#3951A3",d:"M31 13.1h28v15.7H31z"}),s.createElement("path",{fill:"#FFF",d:"M50.1 16.5c-.4 2.4-2.5 4.2-5.1 4.2-2.5 0-4.6-1.8-5.1-4.2-.5.9-.8 1.9-.8 3 0 3.3 2.6 5.9 5.9 5.9 3.3 0 5.9-2.6 5.9-5.9 0-1.1-.3-2.1-.8-3z"}),s.createElement("circle",{fill:"#FEE05F",cx:39.1,cy:36.5,r:3}),s.createElement("circle",{fill:"#FEE05F",cx:50.9,cy:36.5,r:3}))},z2=function(t){var n=t.title,r=F(t,i9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#FFF",d:"M0 85.337h512v341.326H0z"}),s.createElement("path",{d:"M114.024 256.001 0 141.926v228.17z"}),s.createElement("path",{fill:"#ffb915",d:"M161.192 256 0 94.7v47.226l114.024 114.075L0 370.096v47.138z"}),s.createElement("path",{fill:"#007847",d:"M509.833 289.391c.058-.44.804-.878 2.167-1.318v-65.464H222.602L85.33 85.337H0V94.7L161.192 256 0 417.234v9.429h85.33l137.272-137.272h287.231z"}),s.createElement("path",{fill:"#000c8a",d:"M503.181 322.783H236.433l-103.881 103.88H512v-103.88z"}),s.createElement("path",{fill:"#e1392d",d:"M503.181 189.217H512V85.337H132.552l103.881 103.88z"}))},M2=function(t){var n=t.title,r=F(t,o9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{fill:"#496E2D",d:"M0 85.331h512v341.337H0z"}),s.createElement("path",{fill:"#FF9811",d:"M490.668 195.476h-48c0-8.836-7.164-16-16-16s-16 7.164-16 16h-48c0 8.836 7.697 16 16.533 16h-.533c0 8.836 7.162 16 16 16 0 8.836 7.162 16 16 16h32c8.836 0 16-7.164 16-16 8.836 0 16-7.164 16-16h-.533c8.837 0 16.533-7.164 16.533-16z"}),s.createElement("path",{fill:"#D80027",d:"M341.337 255.994h56.888v170.663h-56.888z"}),s.createElement("path",{fill:"#FF9811",d:"M455.112 255.994H512v170.663h-56.888z"}),s.createElement("path",{d:"M398.225 255.994h56.888v170.663h-56.888z"}))},N2=function(t){var n=t.title,r=F(t,a9);return s.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333"},r),n&&s.createElement("title",null,n),s.createElement("path",{d:"M0 85.333h512V426.67H0z"}),s.createElement("path",{d:"M0 134.196h512v48.868H0zm0 195.472h512v48.868H0z",fill:"#FFDA44"}),s.createElement("path",{fill:"#057f44",d:"M0 85.333h512v48.868H0z"}),s.createElement("path",{d:"M0 183.069h512v48.868H0zm0 97.737h512v48.868H0z",fill:"#D80027"}),s.createElement("path",{fill:"#057f44",d:"M0 378.542h512v48.128H0z"}),s.createElement("path",{fill:"#FFF",d:"M276.992 255.996 106.329 426.659H0V85.333h106.329z"}),s.createElement("path",{d:"M256 255.996 85.334 426.662h20.987l170.667-170.666L106.321 85.33H85.334z"}),s.createElement("path",{fill:"#D80027",d:"m102.465 202.57 13.259 40.812h42.917l-34.718 25.226 13.26 40.814-34.718-25.224-34.72 25.224 13.262-40.814-34.718-25.226h42.915z"}),s.createElement("path",{fill:"#FFDA44",d:"m138.94 259.335-34.559-12.243s-2.553-23.955-2.708-24.766c-1.173-6.18-6.603-10.851-13.123-10.851-7.376 0-13.357 5.98-13.357 13.357 0 1.223.178 2.402.486 3.528l-9.689 9.755h17.229c0 17.882-13.344 17.882-13.344 35.691l7.402 17.809h44.522l7.422-17.809h-.004a17.782 17.782 0 0 0 1.381-5.231c6.397-2.589 8.342-9.24 8.342-9.24z"}))};const j2=Object.freeze(Object.defineProperty({__proto__:null,AC:Hc,AD:Tc,AE:Pc,AF:Ic,AG:Oc,AI:Lc,AL:_c,AM:Vc,AO:Bc,AQ:$c,AR:Wc,AS:Uc,AT:Gc,AU:Kc,AW:qc,AX:Qc,AZ:Yc,BA:Xc,BB:Zc,BD:Jc,BE:Rc,BF:ed,BG:td,BH:nd,BI:rd,BJ:sd,BL:ld,BM:id,BN:od,BO:ad,BQ:hd,BQ_BO:cd,BQ_SA:dd,BQ_SE:ud,BR:md,BS:fd,BT:pd,BV:gd,BW:vd,BY:xd,BZ:wd,CA:bd,CC:Ed,CD:yd,CF:Cd,CG:Sd,CH:zd,CI:Md,CK:Nd,CL:jd,CM:kd,CN:Fd,CO:Dd,CR:Ad,CU:Hd,CV:Td,CW:Pd,CX:Id,CY:Od,CZ:Ld,DE:_d,DJ:Vd,DK:Bd,DM:$d,DO:Wd,DZ:Ud,EC:Gd,EE:Kd,EG:qd,EH:Qd,ER:Yd,ES:Zd,ES_CT:Xd,ET:Jd,EU:Rd,FI:e1,FJ:t1,FK:n1,FM:r1,FO:s1,FR:l1,GA:i1,GB:u1,GB_ENG:o1,GB_NIR:a1,GB_SCT:c1,GB_WLS:d1,GD:h1,GE:m1,GF:f1,GG:p1,GH:g1,GI:v1,GL:x1,GM:w1,GN:b1,GP:E1,GQ:y1,GR:C1,GS:S1,GT:z1,GU:M1,GW:N1,GY:j1,HK:k1,HM:F1,HN:D1,HR:A1,HT:H1,HU:T1,IC:P1,ID:I1,IE:O1,IL:L1,IM:_1,IN:V1,IO:B1,IQ:$1,IR:W1,IS:U1,IT:G1,JE:K1,JM:q1,JO:Q1,JP:Y1,KE:X1,KG:Z1,KH:J1,KI:R1,KM:eu,KN:tu,KP:nu,KR:ru,KW:su,KY:lu,KZ:iu,LA:ou,LB:au,LC:cu,LI:du,LK:uu,LR:hu,LS:mu,LT:fu,LU:pu,LV:gu,LY:vu,MA:xu,MC:wu,MD:bu,ME:Eu,MF:yu,MG:Cu,MH:Su,MK:zu,ML:Mu,MM:Nu,MN:ju,MO:ku,MP:Fu,MQ:Du,MR:Au,MS:Hu,MT:Tu,MU:Pu,MV:Iu,MW:Ou,MX:Lu,MY:_u,MZ:Vu,NA:Bu,NC:$u,NE:Wu,NF:Uu,NG:Gu,NI:Ku,NL:qu,NO:Qu,NP:Yu,NR:Xu,NU:Zu,NZ:Ju,OM:Ru,PA:e0,PE:t0,PF:n0,PG:r0,PH:s0,PK:l0,PL:i0,PM:o0,PN:a0,PR:c0,PS:d0,PT:u0,PW:h0,PY:m0,QA:f0,RE:p0,RO:g0,RS:v0,RU:x0,RW:w0,SA:b0,SB:E0,SC:y0,SD:C0,SE:S0,SG:z0,SH:M0,SI:N0,SJ:j0,SK:k0,SL:F0,SM:D0,SN:A0,SO:H0,SR:T0,SS:P0,ST:I0,SV:O0,SX:L0,SY:_0,SZ:V0,TA:B0,TC:$0,TD:W0,TF:U0,TG:G0,TH:K0,TJ:q0,TK:Q0,TL:Y0,TM:X0,TN:Z0,TO:J0,TR:R0,TT:e2,TV:t2,TW:n2,TZ:r2,UA:s2,UG:l2,UM:i2,US:o2,UY:a2,UZ:c2,VA:d2,VC:u2,VE:h2,VG:m2,VI:f2,VN:p2,VU:g2,WF:v2,WS:x2,XA:w2,XC:b2,XK:E2,XO:y2,YE:C2,YT:S2,ZA:z2,ZM:M2,ZW:N2,default:{AC:Hc,AD:Tc,AE:Pc,AF:Ic,AG:Oc,AI:Lc,AL:_c,AM:Vc,AO:Bc,AQ:$c,AR:Wc,AS:Uc,AT:Gc,AU:Kc,AW:qc,AX:Qc,AZ:Yc,BA:Xc,BB:Zc,BD:Jc,BE:Rc,BF:ed,BG:td,BH:nd,BI:rd,BJ:sd,BL:ld,BM:id,BN:od,BO:ad,BQ_BO:cd,BQ_SA:dd,BQ_SE:ud,BQ:hd,BR:md,BS:fd,BT:pd,BV:gd,BW:vd,BY:xd,BZ:wd,CA:bd,CC:Ed,CD:yd,CF:Cd,CG:Sd,CH:zd,CI:Md,CK:Nd,CL:jd,CM:kd,CN:Fd,CO:Dd,CR:Ad,CU:Hd,CV:Td,CW:Pd,CX:Id,CY:Od,CZ:Ld,DE:_d,DJ:Vd,DK:Bd,DM:$d,DO:Wd,DZ:Ud,EC:Gd,EE:Kd,EG:qd,EH:Qd,ER:Yd,ES_CT:Xd,ES:Zd,ET:Jd,EU:Rd,FI:e1,FJ:t1,FK:n1,FM:r1,FO:s1,FR:l1,GA:i1,GB_ENG:o1,GB_NIR:a1,GB_SCT:c1,GB_WLS:d1,GB:u1,GD:h1,GE:m1,GF:f1,GG:p1,GH:g1,GI:v1,GL:x1,GM:w1,GN:b1,GP:E1,GQ:y1,GR:C1,GS:S1,GT:z1,GU:M1,GW:N1,GY:j1,HK:k1,HM:F1,HN:D1,HR:A1,HT:H1,HU:T1,IC:P1,ID:I1,IE:O1,IL:L1,IM:_1,IN:V1,IO:B1,IQ:$1,IR:W1,IS:U1,IT:G1,JE:K1,JM:q1,JO:Q1,JP:Y1,KE:X1,KG:Z1,KH:J1,KI:R1,KM:eu,KN:tu,KP:nu,KR:ru,KW:su,KY:lu,KZ:iu,LA:ou,LB:au,LC:cu,LI:du,LK:uu,LR:hu,LS:mu,LT:fu,LU:pu,LV:gu,LY:vu,MA:xu,MC:wu,MD:bu,ME:Eu,MF:yu,MG:Cu,MH:Su,MK:zu,ML:Mu,MM:Nu,MN:ju,MO:ku,MP:Fu,MQ:Du,MR:Au,MS:Hu,MT:Tu,MU:Pu,MV:Iu,MW:Ou,MX:Lu,MY:_u,MZ:Vu,NA:Bu,NC:$u,NE:Wu,NF:Uu,NG:Gu,NI:Ku,NL:qu,NO:Qu,NP:Yu,NR:Xu,NU:Zu,NZ:Ju,OM:Ru,PA:e0,PE:t0,PF:n0,PG:r0,PH:s0,PK:l0,PL:i0,PM:o0,PN:a0,PR:c0,PS:d0,PT:u0,PW:h0,PY:m0,QA:f0,RE:p0,RO:g0,RS:v0,RU:x0,RW:w0,SA:b0,SB:E0,SC:y0,SD:C0,SE:S0,SG:z0,SH:M0,SI:N0,SJ:j0,SK:k0,SL:F0,SM:D0,SN:A0,SO:H0,SR:T0,SS:P0,ST:I0,SV:O0,SX:L0,SY:_0,SZ:V0,TA:B0,TC:$0,TD:W0,TF:U0,TG:G0,TH:K0,TJ:q0,TK:Q0,TL:Y0,TM:X0,TN:Z0,TO:J0,TR:R0,TT:e2,TV:t2,TW:n2,TZ:r2,UA:s2,UG:l2,UM:i2,US:o2,UY:a2,UZ:c2,VA:d2,VC:u2,VE:h2,VG:m2,VI:f2,VN:p2,VU:g2,WF:v2,WS:x2,XA:w2,XC:b2,XK:E2,XO:y2,YE:C2,YT:S2,ZA:z2,ZM:M2,ZW:N2}},Symbol.toStringTag,{value:"Module"})),k2=({className:e})=>{const t=oe.getOrThrow("I18nService"),[n,r]=s.useState(t.locale);s.useEffect(()=>{const c=t.subscribe(d=>{r(d.locale)});return()=>{c()}},[t]);const i=t.supportedLanguages,o=i.find(c=>c.code===n),a=o?j2[o.country]:null;return l.jsxs($t,{children:[l.jsx(Wt,{asChild:!0,children:l.jsxs(J,{variant:"ghost",size:"icon",className:H("h-9 w-9",e),children:[a?l.jsx(a,{className:"w-5 h-5 rounded-sm shadow-sm"}):l.jsx(O.Globe,{className:"h-[1.2rem] w-[1.2rem]"}),l.jsx("span",{className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},children:t.t("switch_language")})]})}),l.jsx(At,{align:"end",children:i.map(c=>{const d=j2[c.country];return l.jsxs(Ut,{onClick:()=>t.setLocale(c.code),className:H(n===c.code?"bg-accent":""),children:[d&&l.jsx(d,{className:"mr-2 w-5 h-5 rounded-sm shadow-sm"}),c.name]},c.code)})})]})},F2=({logo:e,companyName:t,breadcrumb:n,showThemeSwitcher:r=!0,showThemeColorChanger:i=!0,showLanguageSwitcher:o=!0,user:a,className:c,children:d})=>l.jsxs("div",{className:`w-full flex items-center justify-between ${c||""}`,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[e&&l.jsx("div",{className:"flex-shrink-0",children:e}),t&&l.jsx("span",{className:"font-bold text-lg text-foreground tracking-tight",children:t}),n&&l.jsxs("div",{className:"hidden md:flex items-center pl-2",children:[l.jsx("div",{className:"h-6 w-px bg-border mr-4"}),n]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[d,(o||i||r)&&l.jsxs("div",{className:"flex items-center gap-2 border-l border-border pl-3 ml-2",children:[i&&l.jsx(Ac,{}),r&&l.jsx(Yi,{}),o&&l.jsx(k2,{})]}),a&&l.jsxs("div",{className:"flex items-center gap-2 ml-2 pl-2 border-l border-border",children:[l.jsx("div",{className:"text-sm font-medium hidden md:block text-muted-foreground",children:a.name}),l.jsxs(ct,{className:"h-8 w-8 cursor-pointer hover:opacity-80 transition-opacity",children:[l.jsx(Nt,{src:a.avatarUrl,alt:a.name}),l.jsx(dt,{children:a.initials||a.name.charAt(0)})]})]})]})]}),D2=s.memo(({sidebarOpen:e,isMobile:t,sidebarWidth:n,children:r,layoutService:i,focusManager:o,className:a})=>{const c=s.useRef(null);return s.useEffect(()=>{if(t&&e&&c.current)return o.trapFocus(c.current)},[t,e,o]),l.jsxs(l.Fragment,{children:[l.jsx("aside",{ref:c,"aria-label":"Main Navigation",style:{width:e?n:0,transition:"width 400ms cubic-bezier(0.16, 1, 0.3, 1)",overflow:"hidden",whiteSpace:"nowrap",contain:"content"},className:H("border-e border-border flex-shrink-0 bg-background h-full transition-all duration-300",t?"fixed inset-y-0 left-0 z-50 shadow-2xl":"relative",a),children:r}),t&&e&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 animate-in fade-in duration-300",onClick:()=>i.toggleSidebar(!1)})]})});D2.displayName="EzSidebar";const d9=(e,t)=>{if(!e)return null;if(s.isValidElement(e))return typeof e.type=="string"?e:s.cloneElement(e,t);if(typeof e=="function"){const n=e;return l.jsx(n,{...t})}return e};function Kr(e){const[t,n]=s.useState(e.initialState),[r,i]=s.useState(!1),[o,a]=s.useState(null),c=s.useRef(e);s.useEffect(()=>{c.current=e},[e]);const d=s.useRef(null),u=s.useCallback(v=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{n(f=>{const p=typeof v=="function"?v(f):v;return c.current.onChange?.(p),p})},c.current.debounceMs||0)},[]),h=s.useCallback(v=>{c.current.debounceMs?u(v):n(f=>{const p=typeof v=="function"?v(f):v;return c.current.onChange?.(p),p})},[u]),m=s.useCallback(v=>{n(v),c.current.onChange?.(v)},[]);return s.useEffect(()=>{if(e.persistenceKey)try{const v=localStorage.getItem(e.persistenceKey);v&&n(f=>({...f,...JSON.parse(v)}))}catch(v){console.warn(`Failed to load persisted state for key: ${e.persistenceKey}`,v)}},[e.persistenceKey]),s.useEffect(()=>{if(e.persistenceKey)try{localStorage.setItem(e.persistenceKey,JSON.stringify(t))}catch(v){console.warn(`Failed to save state for key: ${e.persistenceKey}`,v)}},[e.persistenceKey,t]),s.useEffect(()=>{if(e.service&&typeof e.service.subscribe=="function"){const v=e.service.subscribe(f=>{});return()=>{typeof v=="function"&&v()}}},[e.service]),{state:t,setState:h,setImmediateState:m,loading:r,setLoading:i,error:o,setError:a}}class A2 extends gr{name="LayoutService";constructor(){super({sidebarOpen:!0,mode:"dashboard",headerHeight:64,sidebarWidth:256,breakpoint:768,viewportHeight:typeof window<"u"?window.innerHeight:0,isMobile:!1,authPage:"signin",panels:[]}),typeof window<"u"&&(this.handleResize(),window.addEventListener("resize",this.handleResize),this.registerCleanup(()=>window.removeEventListener("resize",this.handleResize)))}handleResize=()=>{const t=window.innerHeight,n=window.innerWidth<this.state.breakpoint;this.setState(r=>{let i={viewportHeight:t};return n!==r.isMobile&&(i.isMobile=n,n&&(i.sidebarOpen=!1)),i})};updateConfig(t){this.setState(n=>{const r={};t.headerHeight!==void 0&&(r.headerHeight=t.headerHeight),t.sidebarWidth!==void 0&&(r.sidebarWidth=t.sidebarWidth),t.breakpoint!==void 0&&(r.breakpoint=t.breakpoint);const i=r.breakpoint??n.breakpoint;if(typeof window<"u"){const o=window.innerWidth<i;o!==n.isMobile&&(r.isMobile=o,o&&(r.sidebarOpen=!1))}return r})}toggleSidebar(t){this.setState(n=>({sidebarOpen:t!==void 0?t:!n.sidebarOpen}))}setMode(t){this.setState({mode:t})}setAuthPage(t){this.setState({authPage:t})}addPanel(t){this.setState(n=>({panels:[...n.panels,t]}))}removePanel(t){this.setState(n=>({panels:n.panels.filter(r=>r.id!==t)}))}getMainContentStyle(){return{height:`calc(100vh - ${this.state.headerHeight}px)`,marginLeft:this.state.sidebarOpen&&!this.state.isMobile?`${this.state.sidebarWidth}px`:"0px",transition:"margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}}}function Ht(e,t={}){if(e==null)return"";const{format:n="float",decimals:r,locale:i="en-US",currency:o="USD"}=t,a=r!==void 0?r:n==="integer"?0:n==="percentage"?1:2;try{switch(n){case"currency":return new Intl.NumberFormat(i,{style:"currency",currency:o,minimumFractionDigits:a,maximumFractionDigits:a}).format(e);case"percentage":return new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a}).format(e/100);case"integer":return new Intl.NumberFormat(i,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(Math.round(e));default:return new Intl.NumberFormat(i,{style:"decimal",minimumFractionDigits:a,maximumFractionDigits:a}).format(e)}}catch{return typeof e=="number"?e.toFixed(a):String(e)}}function Jn(e,t={}){if(!e)return"";const n=e instanceof Date?e:new Date(e);if(isNaN(n.getTime()))return"Invalid Date";const{format:r="short",locale:i="en-US"}=t;switch(r){case"long":return new Intl.DateTimeFormat(i,{year:"numeric",month:"long",day:"numeric"}).format(n);case"iso":return n.toISOString().split("T")[0];case"relative":return u9(n,i);default:return new Intl.DateTimeFormat(i,{year:"numeric",month:"short",day:"numeric"}).format(n)}}function u9(e,t="en-US"){const r=new Date().getTime()-e.getTime(),i=Math.floor(r/1e3),o=Math.floor(i/60),a=Math.floor(o/60),c=Math.floor(a/24),d=Math.abs(c),u=Math.abs(a),h=Math.abs(o);try{const m=new Intl.RelativeTimeFormat(t,{numeric:"auto"});return d>=365?m.format(-Math.floor(c/365),"year"):d>=30?m.format(-Math.floor(c/30),"month"):d>=7?m.format(-Math.floor(c/7),"week"):d>=1?m.format(-c,"day"):u>=1?m.format(-a,"hour"):h>=1?m.format(-o,"minute"):"just now"}catch{return d>=1?`${c}d ago`:"just now"}}const H2=(e,t="en-US",n="USD")=>Ht(e,{format:"currency",locale:t,currency:n}),h9=(e,t="en-US")=>Ht(e,{format:"percentage",locale:t}),m9=(e,t="en-US")=>{const n=typeof e=="string"?new Date(e):e;return new Intl.DateTimeFormat(t,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(n)};class hl extends gr{name="I18nService";supportedLanguages=[{code:"en",name:"English",country:"US"},{code:"fr",name:"Français",country:"FR"},{code:"de",name:"Deutsch",country:"DE"},{code:"es",name:"Español",country:"ES"},{code:"zh",name:"中文",country:"CN"},{code:"ar",name:"العربية",country:"SA"}];initialTranslations={en:{controls:"Controls",customize_stroke:"Customize the stroke.",stroke_color:"Stroke Color",stroke_width:"Stroke Width",actions:"Actions",undo:"Undo",redo:"Redo",clear:"Clear",capture:"Capture",download_png:"Download PNG",captured_output:"Captured Output",download:"Download",add_card:"Add Card",add_column:"Add Column",add_swimlane:"Add Swimlane",search_placeholder:"Search cards...",view_standard:"Standard",view_swimlane:"Swimlane",view_timeline:"Timeline",view_analytics:"Analytics",uncategorized:"Uncategorized",no_cards:"No cards in this column",items:"items",switch_language:"Switch Language",reload_dataset:"Reload Dataset"},fr:{controls:"Contrôles",customize_stroke:"Personnaliser le trait.",stroke_color:"Couleur du trait",stroke_width:"Largeur du trait",actions:"Actions",undo:"Annuler",redo:"Rétablir",clear:"Effacer",capture:"Capturer",download_png:"Télécharger PNG",captured_output:"Sortie capturée",download:"Télécharger",add_card:"Ajouter une carte",add_column:"Ajouter une colonne",add_swimlane:"Ajouter un couloir",search_placeholder:"Rechercher des cartes...",view_standard:"Standard",view_swimlane:"Couloir",view_timeline:"Chronologie",view_analytics:"Analytique",uncategorized:"Non catégorisé",no_cards:"Aucune carte dans cette colonne",items:"éléments",switch_language:"Changer de langue",reload_dataset:"Recharger l'ensemble de données"},de:{controls:"Steuerung",customize_stroke:"Strich anpassen.",stroke_color:"Strichfarbe",stroke_width:"Strichbreite",actions:"Aktionen",undo:"Rückgängig",redo:"Wiederholen",clear:"Löschen",capture:"Erfassen",download_png:"Herunterladen PNG",captured_output:"Erfasste Ausgabe",download:"Herunterladen",add_card:"Karte hinzufügen",add_column:"Spalte hinzufügen",add_swimlane:"Schwimmbahn hinzufügen",search_placeholder:"Karten suchen...",view_standard:"Standard",view_swimlane:"Schwimmbahn",view_timeline:"Zeitplan",view_analytics:"Analytik",uncategorized:"Nicht kategorisiert",no_cards:"Keine Karten in dieser Spalte",items:"Elemente",switch_language:"Sprache wechseln",reload_dataset:"Chipsatz neu laden"},es:{controls:"Controles",customize_stroke:"Personalizar el trazo.",stroke_color:"Color del trazo",stroke_width:"Ancho del trazo",actions:"Acciones",undo:"Deshacer",redo:"Rehacer",clear:"Limpiar",capture:"Capturar",download_png:"Descargar PNG",captured_output:"Salida capturada",download:"Descargar",add_card:"Añadir tarjeta",add_column:"Añadir columna",add_swimlane:"Añadir carril",search_placeholder:"Buscar tarjetas...",view_standard:"Estándar",view_swimlane:"Carril",view_timeline:"Línea de tiempo",view_analytics:"Analítica",uncategorized:"Sin categoría",no_cards:"No hay tarjetas en esta columna",items:"elementos",switch_language:"Cambiar idioma",reload_dataset:"Recargar conjunto de datos"},zh:{controls:"控制",customize_stroke:"自定义笔触。",stroke_color:"笔触颜色",stroke_width:"笔触宽度",actions:"操作",undo:"撤销",redo:"重做",clear:"清除",capture:"捕获",download_png:"下载 PNG",captured_output:"捕获输出",download:"下载",add_card:"添加卡片",add_column:"添加列",add_swimlane:"添加泳道",search_placeholder:"搜索卡片...",view_standard:"标准",view_swimlane:"泳道",view_timeline:"时间轴",view_analytics:"分析",uncategorized:"未分类",no_cards:"此列中没有卡片",items:"项",switch_language:"切换语言",reload_dataset:"重新加载数据集"},ar:{controls:"عناصر التحكم",customize_stroke:"تخصيص الضربة.",stroke_color:"لون الضربة",stroke_width:"عرض الضربة",actions:"إجراءات",undo:"تراجع",redo:"إعادة",clear:"مسح",capture:"التقاط",download_png:"تحميل PNG",captured_output:"المخرجات الملتقطة",download:"تحميل",add_card:"أضف بطاقة",add_column:"أضف عمود",add_swimlane:"أضف مسار",search_placeholder:"بحث عن البطاقات...",view_standard:"قياسي",view_swimlane:"مسار",view_timeline:"الجدول الزمني",view_analytics:"تحليلات",uncategorized:"غير مصنف",no_cards:"لا توجد بطاقات في هذا العمود",items:"عناصر",switch_language:"تغيير اللغة",reload_dataset:"إعادة تحميل البيانات"}};_locale="en";_translations={};constructor(t="en"){super({locale:t,dir:["ar","he","fa"].includes(t)?"rtl":"ltr",translations:{}}),this._locale=t,this._translations={};const n=this;this.setLocale=r=>{n._locale=r,n.setState({locale:r,dir:["ar","he","fa"].includes(r)?"rtl":"ltr"})},this.registerTranslations=(r,i)=>{n._translations[r]={...n._translations[r],...i},n.setState(o=>({translations:{...o?.translations||{},[r]:{...o?.translations?.[r]||{},...i}}}))},this.t=r=>(n._translations[n._locale]||n._translations.en)?.[r]||r,this._translations=this.initialTranslations,this.setState(r=>({...r||{},translations:this.initialTranslations}))}get locale(){return this.state.locale}get dir(){return this.state.dir}formatDate=(t,n={})=>Jn(t,{...n,locale:this.state.locale});formatNumber=(t,n={})=>Ht(t,{...n,locale:this.state.locale});formatCurrency=(t,n="USD")=>H2(t,this.state.locale,n);setLocale(t){}registerTranslations(t,n){}t(t){return t}}class f9{name="FocusManagerService";focusableElements=[];currentFocusIndex=-1;constructor(){}registerFocusable(t){this.focusableElements.includes(t)||(this.focusableElements.push(t),this.focusableElements.sort((n,r)=>n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))}unregisterFocusable(t){const n=this.focusableElements.indexOf(t);n>-1&&(this.focusableElements.splice(n,1),this.currentFocusIndex>=n&&this.currentFocusIndex--)}focusNext(){this.focusableElements.length!==0&&(this.currentFocusIndex=(this.currentFocusIndex+1)%this.focusableElements.length,this.focusableElements[this.currentFocusIndex].focus())}focusPrevious(){this.focusableElements.length!==0&&(this.currentFocusIndex=(this.currentFocusIndex-1+this.focusableElements.length)%this.focusableElements.length,this.focusableElements[this.currentFocusIndex].focus())}trapFocus(t){const n=r=>{if(r.key==="Tab"){const i=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=i[0],a=i[i.length-1];r.shiftKey?document.activeElement===o&&(a.focus(),r.preventDefault()):document.activeElement===a&&(o.focus(),r.preventDefault())}};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)}cleanup(){this.focusableElements=[],this.currentFocusIndex=-1}}const p9=e=>{const{serviceRegistry:t=oe,headerHeight:n,sidebarWidth:r,breakpoint:i,onSidebarToggle:o}=e;d4(t,{LayoutService:()=>new A2,FocusManagerService:()=>new f9,NotificationService:()=>new vr,I18nService:()=>new hl});const a=t.getOrThrow("LayoutService"),c=t.getOrThrow("I18nService"),d=t.getOrThrow("FocusManagerService"),{state:u,setImmediateState:h}=Kr({initialState:a.getState(),service:a,onChange:x=>{o?.(x.sidebarOpen)}}),{state:m,setImmediateState:v}=Kr({initialState:{locale:c.locale,dir:c.dir},service:c}),[f,p]=s.useTransition();return s.useEffect(()=>{a.updateConfig({headerHeight:n,sidebarWidth:r,breakpoint:i})},[a,n,r,i]),s.useEffect(()=>{const x=a.subscribe(b=>{p(()=>h(b))}),g=c.subscribe(b=>{p(()=>v(b))});return()=>{x(),g()}},[a,c,h,v]),{layoutState:u,i18nState:m,isPending:f,layoutService:a,i18nService:c,focusManager:d,serviceRegistry:t}},qr=(e,t,n)=>{const r=s.useMemo(()=>t,[t,n]);s.useImperativeHandle(e,()=>r,[r])},g9=(e,t,n)=>{const{layoutService:r,serviceRegistry:i}=n,{onModeChange:o,onSidebarToggle:a,onAuthPageChange:c}=t,[,d]=s.useState({}),u=s.useMemo(()=>({toggleSidebar:h=>{r.toggleSidebar(h);const m=r.getState();a?.(m.sidebarOpen)},openSidebar:()=>{r.toggleSidebar(!0),a?.(!0)},closeSidebar:()=>{r.toggleSidebar(!1),a?.(!1)},isSidebarOpen:()=>r.getState().sidebarOpen,setMode:h=>{r.setMode(h),o?.(h)},getMode:()=>r.getState().mode,showDashboard:()=>{r.setMode("dashboard"),o?.("dashboard")},showAuth:()=>{r.setMode("auth"),o?.("auth")},showMinimal:()=>{r.setMode("minimal"),o?.("minimal")},setAuthPage:h=>{r.setAuthPage(h),c?.(h)},getAuthPage:()=>r.getState().authPage,showSignIn:()=>{r.setAuthPage("signin"),c?.("signin")},showSignUp:()=>{r.setAuthPage("signup"),c?.("signup")},getState:()=>r.getState(),getViewport:()=>({height:r.getState().viewportHeight,isMobile:r.getState().isMobile}),isMobile:()=>r.getState().isMobile,getHeaderHeight:()=>r.getState().headerHeight,getSidebarWidth:()=>r.getState().sidebarWidth,getMainContentStyle:()=>r.getMainContentStyle(),getLayoutService:()=>r,getServiceRegistry:()=>i,addPanel:h=>r.addPanel(h),removePanel:h=>r.removePanel(h),refresh:()=>d({})}),[r,i,o,a,c]);qr(e,u)},Rn=e=>{const[t]=s.useState(()=>e.serviceRegistry||oe),[n,r]=s.useState({isLoading:!1,error:null,isHydrated:!1}),i=s.useCallback(c=>{r(d=>({...d,isLoading:c}))},[]),o=s.useCallback(c=>{r(d=>({...d,error:c}))},[]);s.useEffect(()=>(r(c=>({...c,isHydrated:!0})),e.onCreated&&e.onCreated(),()=>{e.onDestroyed&&e.onDestroyed()}),[]);const a={showSpinner:s.useCallback(()=>i(!0),[]),hideSpinner:s.useCallback(()=>i(!1),[])};return{serviceRegistry:t,state:n,setIsLoading:i,setError:o,api:a}},v9=(e,t)=>{const n=Rn(e),{api:r}=n,i=p9(e),{layoutState:o,i18nState:a,isPending:c,layoutService:d,serviceRegistry:u,focusManager:h}=i;return g9(t,e,{layoutService:d,serviceRegistry:u}),{...r,layoutState:o,i18nState:a,isPending:c,layoutService:d,serviceRegistry:u,focusManager:h,renderInjected:d9}};function Sn({className:e,...t}){return l.jsx("div",{className:H("animate-pulse rounded-md bg-zinc-100 dark:bg-zinc-800",e),...t})}const T2=s.memo(({isPending:e,children:t,contentClassName:n})=>l.jsx("main",{"aria-label":"Main Content",className:H("flex-1 overflow-hidden relative min-w-0 flex flex-col",n),children:e?l.jsxs("div",{className:"flex-1 space-y-4 animate-pulse p-6",children:[l.jsx(Sn,{className:"h-8 w-1/3"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[l.jsx(Sn,{className:"h-32 rounded-lg"}),l.jsx(Sn,{className:"h-32 rounded-lg"}),l.jsx(Sn,{className:"h-32 rounded-lg"})]}),l.jsx(Sn,{className:"h-64 w-full rounded-lg"})]}):l.jsx("div",{className:"flex-1 min-h-0 w-full h-full flex flex-col animate-in fade-in slide-in-from-bottom-2 duration-300 ease-out",children:t})}));T2.displayName="MainContent";class er extends s.Component{constructor(t){super(t),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t,errorInfo:null}}componentDidCatch(t,n){console.error("Error caught by ErrorBoundary:",t,n),this.setState({errorInfo:n})}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:l.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md w-full",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",children:l.jsx(O.AlertTriangle,{className:"w-8 h-8 text-destructive"})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Something went wrong"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"An unexpected error occurred. Please try again."})]}),l.jsxs("button",{onClick:this.handleReset,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",children:[l.jsx(O.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})}):this.props.children}}const x9=()=>l.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md w-full",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",children:l.jsx(O.AlertTriangle,{className:"w-8 h-8 text-destructive"})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Layout Error"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Something went wrong with the layout. Please refresh the page."})]}),l.jsxs("button",{onClick:()=>window.location.reload(),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",children:[l.jsx(O.RefreshCw,{className:"w-4 h-4"}),"Refresh Page"]})]})}),ml=()=>{const[e,t]=s.useState([]);s.useEffect(()=>{let r;const i=()=>{const a=oe.get("NotificationService");a&&!r&&(r=a.subscribe(t))};i();const o=oe.subscribe(()=>{i()});return()=>{r&&r(),o()}},[]);const n=r=>{const i=oe.get("NotificationService");i&&i.remove(r)};return l.jsx("div",{"data-testid":"notification-panel",className:"fixed top-20 right-4 z-[9999] flex flex-col gap-3 pointer-events-none w-full max-w-sm",children:e.map(r=>l.jsxs("div",{className:H("pointer-events-auto flex items-start gap-3 p-4 rounded-xl border shadow-2xl animate-in slide-in-from-right-full duration-300",r.type==="success"&&"bg-green-50 border-green-200 text-green-900 dark:bg-green-900/20 dark:border-green-800/50 dark:text-green-100",r.type==="error"&&"bg-red-50 border-red-200 text-red-900 dark:bg-red-900/20 dark:border-red-800/50 dark:text-red-100",r.type==="warning"&&"bg-amber-50 border-amber-200 text-amber-900 dark:bg-amber-900/20 dark:border-amber-800/50 dark:text-amber-100",r.type==="info"&&"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-900/20 dark:border-blue-800/50 dark:text-blue-100"),children:[l.jsxs("div",{className:"shrink-0 mt-0.5",children:[r.type==="success"&&l.jsx(O.CheckCircle,{className:"h-5 w-5 text-green-600"}),r.type==="error"&&l.jsx(O.AlertCircle,{className:"h-5 w-5 text-red-600"}),r.type==="warning"&&l.jsx(O.AlertTriangle,{className:"h-5 w-5 text-amber-600"}),r.type==="info"&&l.jsx(O.Info,{className:"h-5 w-5 text-blue-600"})]}),l.jsx("div",{className:"flex-1 text-sm font-medium leading-relaxed",children:r.message}),l.jsx("button",{onClick:()=>n(r.id),className:"shrink-0 p-1 hover:bg-black/5 rounded-lg transition-colors",children:l.jsx(O.X,{className:"h-4 w-4 opacity-50"})})]},r.id))})};function zn(e,t,n){let r=n.initialDeps??[],i,o=!0;function a(){var c,d,u;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((p,x)=>r[x]!==p)))return i;r=m;let f;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(f=Date.now()),i=t(...m),n.key&&((u=n.debug)!=null&&u.call(n))){const p=Math.round((Date.now()-h)*100)/100,x=Math.round((Date.now()-f)*100)/100,g=x/16,b=(y,S)=>{for(y=String(y);y.length<S;)y=" "+y;return y};console.info(`%c⏱ ${b(x,5)} /${b(p,5)} ms`,`
47
+ font-size: .6rem;
48
+ font-weight: bold;
49
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(i),o=!1,i}return a.updateDeps=c=>{r=c},a}function P2(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const w9=(e,t)=>Math.abs(e-t)<1.01,b9=e=>e,E9=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},y9=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},C9=(e,{adjustments:t=0,behavior:n},r)=>{var i,o;const a=e+t;(o=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class S9{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=r())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=r())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:b9,rangeExtractor:E9,onChange:()=>{},measureElement:y9,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=zn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const i=new Map,o=new Map;for(let a=r-1;a>=0;a--){const c=n[a];if(i.has(c.lane))continue;const d=o.get(c.lane);if(d==null||c.end>d.end?o.set(c.lane,c):c.end<d.end&&i.set(c.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,c)=>a.end===c.end?a.index-c.index:a.end-c.end)[0]:void 0},this.getMeasurementOptions=zn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,i,o,a,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:a,lanes:c}),{key:!1}),this.getMeasurements=zn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:i,getItemKey:o,enabled:a,lanes:c},d)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const v of this.laneAssignments.keys())v>=n&&this.laneAssignments.delete(v);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,u),m=new Array(c).fill(void 0);for(let v=0;v<u;v++){const f=h[v];f&&(m[f.lane]=v)}for(let v=u;v<n;v++){const f=o(v),p=this.laneAssignments.get(v);let x,g;if(p!==void 0&&this.options.lanes>1){x=p;const z=m[x],N=z!==void 0?h[z]:void 0;g=N?N.end+this.options.gap:r+i}else{const z=this.options.lanes===1?h[v-1]:this.getFurthestMeasurement(h,v);g=z?z.end+this.options.gap:r+i,x=z?z.lane:v%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(v,x)}const b=d.get(f),y=typeof b=="number"?b:this.options.estimateSize(v),S=g+y;h[v]={index:v,start:g,size:y,end:S,key:f,lane:x},m[x]=v}return this.measurementsCache=h,h},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=zn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,o)=>this.range=n.length>0&&r>0?z9({measurements:n,outerSize:r,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=zn(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,o,a)=>o===null||a===null?[]:n({startIndex:o,endIndex:a,overscan:r,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const i=this.indexFromElement(n),o=this.measurementsCache[i];if(!o)return;const a=o.key,c=this.elementsCache.get(a);c!==n&&(c&&this.observer.unobserve(c),this.observer.observe(n),this.elementsCache.set(a,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const i=this.measurementsCache[n];if(!i)return;const o=this.itemSizeCache.get(i.key)??i.size,a=r-o;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,a,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=zn(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let o=0,a=n.length;o<a;o++){const c=n[o],d=r[c];i.push(d)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return P2(r[I2(0,r.length-1,i=>P2(r[i]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+o?"end":"start"),r==="center"?n+=(i-o)/2:r==="end"&&(n-=o);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const o=this.getSize(),a=this.getScrollOffset();if(r==="auto")if(i.end>=a+o-this.options.scrollPaddingEnd)r="end";else if(i.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,i.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:r="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let o=0;const a=10,c=u=>{if(!this.targetWindow)return;const h=this.getOffsetForIndex(n,u);if(!h){console.warn("Failed to get offset for index:",n);return}const[m,v]=h;this._scrollToOffset(m,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const f=()=>{if(this.currentScrollToIndex!==n)return;const p=this.getScrollOffset(),x=this.getOffsetForIndex(n,v);if(!x){console.warn("Failed to get offset for index:",n);return}w9(x[0],p)||d(v)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(f):f()})},d=u=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<a?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,a),this.targetWindow.requestAnimationFrame(()=>c(u))):console.warn(`Failed to scroll to index ${n} after ${a} attempts.`))};c(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&o.some(c=>c===null);){const c=r[a];o[c.lane]===null&&(o[c.lane]=c.end),a--}i=Math.max(...o.filter(c=>c!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const I2=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,o=n(i);if(o<r)e=i+1;else if(o>r)t=i-1;else return i}return e>0?e-1:0};function z9({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const i=e.length-1,o=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:i};let a=I2(0,i,o,n),c=a;if(r===1)for(;c<i&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<i&&d.some(h=>h<n+t);){const h=e[c];d[h.lane]=h.end,c++}const u=Array(r).fill(n+t);for(;a>=0&&u.some(h=>h>=n);){const h=e[a];u[h.lane]=h.start,a--}a=Math.max(0,a-a%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:a,endIndex:c}}class M9{name="VirtualizationService";virtualizers=new Map;createVirtualizer(t,n){const r=new S9({count:n.count,getScrollElement:n.getScrollElement,estimateSize:n.estimateSize,overscan:n.overscan??5,horizontal:n.horizontal??!1,scrollToFn:C9,observeElementRect:(i,o)=>{const a=i.scrollElement;if(!a||a===window)return;const c=new ResizeObserver(d=>{o(d[0].contentRect)});return c.observe(a),()=>c.disconnect()},observeElementOffset:(i,o)=>{const a=i.scrollElement;if(!a)return;const c=()=>{o(a===window?window.scrollY:a.scrollTop,!0)};return a.addEventListener("scroll",c,{passive:!0}),o(a===window?window.scrollY:a.scrollTop,!1),()=>a.removeEventListener("scroll",c)}});return this.virtualizers.set(t,r),r}registerVirtualizer(t,n){this.virtualizers.set(t,n)}getVirtualizer(t){return this.virtualizers.get(t)}cleanup(){this.virtualizers.clear()}}const fl=e=>{const{rowCount:t,rowHeight:n=48,overscanCount:r=5,enableRowVirtualization:i=!0,columnCount:o=0,columnWidth:a=150,enableColumnVirtualization:c=!1,scrollMargin:d=0,scrollPaddingStart:u=0,scrollPaddingEnd:h=0,progressiveRendering:m=!1,prefetchDistance:v=5,adaptiveSizing:f=!1,languageDirection:p="ltr",debug:x=!1,customRangeExtractor:g,onScroll:b,onScrollStart:y,onScrollStop:S}=e,z=s.useRef(null),[N,E]=s.useState(m?1:r||v),C=s.useRef(null),M=s.useRef(!1);s.useEffect(()=>{if(!m)return;let I;const X=()=>{E(1),clearTimeout(I),I=setTimeout(()=>{E(r||v)},150)},T=z.current;if(T)return T.addEventListener("scroll",X,{passive:!0}),()=>{T.removeEventListener("scroll",X),clearTimeout(I)}},[m,r,v]);const D=s.useMemo(()=>g||(I=>{const X=Zt.defaultRangeExtractor(I);return X.length===0&&I.count>0?[0]:X}),[g]),A=s.useCallback((I,X,T)=>{Zt.elementScroll(I,X,T)},[]),_=s.useMemo(()=>({count:t,getScrollElement:()=>z.current,estimateSize:typeof n=="function"?n:()=>n,overscan:N,scrollMargin:d,scrollPaddingStart:u,scrollPaddingEnd:h,rangeExtractor:D,scrollToFn:A,lanugageDirection:p,onChange:I=>{const X=I.scrollOffset??0;C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{b?.(X)},16),I.isScrolling?M.current||(M.current=!0,y?.()):M.current&&(M.current=!1,S?.())}}),[t,n,N,f,d,u,h,D,A,b,y,S]),U=Zt.useVirtualizer(_);s.useEffect(()=>{x&&console.log("[DEBUG_VIRTUAL] Virtualizer instance changed")},[U,x]);const G=s.useMemo(()=>jt(oe,"VirtualizationService",()=>new M9),[]);s.useEffect(()=>{e.id&&G&&G.registerVirtualizer(e.id,U)},[e.id,U,G]);const Y=s.useMemo(()=>{if(!(!c||!o))return{horizontal:!0,count:o,getScrollElement:()=>z.current,estimateSize:typeof a=="function"?a:()=>a,overscan:N,rangeExtractor:D,lanugageDirection:p}},[c,o,a,N,D]),te=Y?Zt.useVirtualizer(Y):void 0;s.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]),s.useEffect(()=>{x&&process.env.NODE_ENV!=="production"&&console.log("Virtualization Debug:",{rowCount:t,visibleRows:U.getVirtualItems().length,activeOverscan:N,scrollOffset:U.scrollOffset})},[x,t,U,N]);const Z=(I,X)=>{U.scrollToIndex(I,X)};return{parentRef:z,rowVirtualizer:U,columnVirtualizer:te,scrollToIndex:Z,scrollToRow:Z,scrollToColumn:te?(I,X)=>{te.scrollToIndex(I,X)}:void 0,getVirtualItems:()=>U.getVirtualItems(),scrollOffset:U.scrollOffset??0}},en=()=>s.useMemo(()=>oe.getOrThrow("I18nService"),[]),N9=e=>{const t=s.useRef(!1);s.useLayoutEffect(()=>{e.onRenderStart&&e.onRenderStart()}),s.useEffect(()=>{!t.current&&e.onRenderComplete&&(e.onRenderComplete(),t.current=!0)},[e.onRenderComplete]),s.useEffect(()=>()=>{t.current=!1},[])};function j9(e){const t=s.useCallback(g=>{e.onDragStart?.(g)},[e.onDragStart]),n=s.useCallback(g=>{e.onDragOver?.(g)},[e.onDragOver]),r=s.useCallback(g=>{e.onDragEnd?.(g)},[e.onDragEnd]),i=s.useCallback(g=>{e.onKeyPress?.(g)},[e.onKeyPress]),o=s.useCallback(g=>{e.onKeyDown?.(g)},[e.onKeyDown]),a=s.useCallback(g=>{e.onKeyUp?.(g)},[e.onKeyUp]),c=s.useCallback(g=>{e.onClick?.(g)},[e.onClick]),d=s.useCallback(g=>{e.onDoubleClick?.(g)},[e.onDoubleClick]),u=s.useCallback(g=>{e.onPointerDown?.(g)},[e.onPointerDown]),h=s.useCallback(g=>{e.onPointerMove?.(g)},[e.onPointerMove]),m=s.useCallback(g=>{e.onPointerUp?.(g)},[e.onPointerUp]),v=s.useCallback(g=>{e.onPointerLeave?.(g)},[e.onPointerLeave]),f=s.useCallback(g=>{e.onPointerEnter?.(g)},[e.onPointerEnter]),p=s.useCallback(()=>{e.onFocusChange?.(!0)},[e.onFocusChange]),x=s.useCallback(()=>{e.onFocusChange?.(!1)},[e.onFocusChange]);return{handleDragStart:t,handleDragOver:n,handleDragEnd:r,handleKeyPress:i,handleKeyDown:o,handleKeyUp:a,handleClick:c,handleDoubleClick:d,handlePointerDown:u,handlePointerMove:h,handlePointerUp:m,handlePointerLeave:v,handlePointerEnter:f,handleFocus:p,handleBlur:x}}const O2=(e,t)=>{s.useImperativeHandle(e,()=>t,[t])},k9=e=>({sensors:De.useSensors(De.useSensor(De.PointerSensor,{activationConstraint:{distance:e.distance??5}})),onDragEnd:e.onDragEnd,collisionDetection:e.collisionDetection}),F9=e=>{const{validateField:t,editSettings:n}=e,r=s.useCallback((o,a,c)=>{if(n?.requiredFields?.includes(o)&&(a==null||a===""))return{isValid:!1,error:"Field is required"};const d=n?.validationRules?.[o];if(d){const u=d(a,c);if(u!==!0&&u!=="")return{isValid:!1,error:typeof u=="string"?u:`Invalid value for ${o}`}}if(t){const u=t({fieldName:o,value:a,data:c});if(u!==!0&&u!=="")return{isValid:!1,error:typeof u=="string"?u:`Validation failed for ${o}`}}return{isValid:!0}},[t,n]),i=s.useCallback((o,a)=>{const c={};let d=!0;return a.forEach(u=>{const h=r(u,o[u],o);c[u]=h,h.isValid||(d=!1)}),c.__form={isValid:d},c},[r]);return{validate:r,validateForm:i}};function L2(e){const[t,n]=s.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return s.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(e),i=()=>n(r.matches);return r.addEventListener?r.addEventListener("change",i):r.addListener(i),()=>{r.removeEventListener?r.removeEventListener("change",i):r.removeListener(i)}},[e]),t}function pl(e=6e4){const[t,n]=s.useState(()=>new Date);return s.useEffect(()=>{const r=setInterval(()=>{n(new Date)},e);return()=>clearInterval(r)},[e]),t}function D9(e={}){const[t,n]=s.useState(!1),[r,i]=s.useState(e.initialMode||"view"),[o,a]=s.useState(e.initialData||{}),[c,d]=s.useState({}),u=s.useCallback((v,f,p)=>{i(v),f!==void 0?a(f):e.defaultData&&a(e.defaultData),p!==void 0&&d(p),n(!0)},[e.defaultData]),h=s.useCallback(()=>{n(!1)},[]),m=s.useCallback(()=>{n(v=>!v)},[]);return{isOpen:t,mode:r,data:o,meta:c,open:u,close:h,toggle:m,setData:a,setMode:i}}const _2=({totalItems:e,columns:t=1,onSelect:n,onAction:r,onCancel:i,wrap:o=!0,enabled:a=!0})=>{const[c,d]=s.useState(-1),u=s.useCallback(h=>{if(!a||e===0)return;let m=c;switch(h.key){case"ArrowDown":c===-1?m=0:(m=c+t,m>=e&&(m=o?m%t:c)),h.preventDefault();break;case"ArrowUp":if(c===-1)m=e-1;else if(m=c-t,m<0)if(o){const v=c%t;m=(Math.ceil(e/t)-1)*t+v,m>=e&&(m-=t)}else m=c;h.preventDefault();break;case"ArrowRight":c===-1?m=0:(m=c+1,m>=e&&(m=o?0:c)),h.preventDefault();break;case"ArrowLeft":c===-1?m=e-1:(m=c-1,m<0&&(m=o?e-1:c)),h.preventDefault();break;case"Enter":c!==-1&&r&&(r(c),h.preventDefault());break;case"Escape":i&&(i(),h.preventDefault()),d(-1);break;default:return}m!==c&&(d(m),n?.(m))},[c,e,t,n,r,i,o,a]);return s.useEffect(()=>{if(a)return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[a,u]),{selectedIndex:c,setSelectedIndex:d}},tr=e=>{const[t,n]=s.useState(()=>oe.get(e)?.getState());return s.useEffect(()=>{const r=oe.get(e);if(r)return n(r.getState()),r.subscribe(i=>{n(i)})},[e]),t},Mn=()=>{oe.get("I18nService")||oe.register("I18nService",new hl),oe.get("NotificationService")||oe.register("NotificationService",new vr)},A9=({user:e,onLogout:t,className:n})=>{oe.get("ThemeService")||oe.register("ThemeService",new xr);const r=oe.getOrThrow("ThemeService"),i=oe.getOrThrow("I18nService"),[o,a]=s.useState(r.getState().themeColor),[c,d]=s.useState(0);s.useEffect(()=>{const h=r.subscribe(v=>{a(v.themeColor)}),m=i.subscribe(()=>d(v=>v+1));return()=>{h(),m()}},[r,i]);const u=[{name:"Zinc",class:"bg-zinc-900 dark:bg-zinc-100"},{name:"Blue",class:"bg-blue-600"},{name:"Green",class:"bg-emerald-600"},{name:"Orange",class:"bg-orange-500"},{name:"Rose",class:"bg-rose-500"}];return l.jsxs($t,{children:[l.jsx(Wt,{asChild:!0,children:l.jsx(J,{variant:"ghost",className:H("relative h-10 w-10 rounded-full",n),children:l.jsxs(ct,{className:"h-10 w-10 border border-border",children:[l.jsx(Nt,{src:e.avatarUrl,alt:e.name}),l.jsx(dt,{children:e.initials||"U"})]})})}),l.jsxs(At,{className:"w-56",align:"end",forceMount:!0,children:[l.jsx(yn,{className:"font-normal",children:l.jsxs("div",{className:"flex flex-col space-y-1",children:[l.jsx("p",{className:"text-sm font-medium leading-none",children:e.name}),l.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:e.email||"user@example.com"})]})}),l.jsx(Cn,{}),l.jsxs(Nc,{children:[l.jsxs(Ut,{children:[l.jsx(O.User,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:i.t("profile")})]}),l.jsxs(Ut,{children:[l.jsx(O.Settings,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:i.t("nav_settings")})]})]}),l.jsx(Cn,{}),l.jsx(yn,{children:i.t("theme_color")}),l.jsx("div",{className:"grid grid-cols-6 gap-2 p-2 pt-0",children:u.map(h=>l.jsx("div",{onClick:()=>r.setThemeColor(h.name),className:H("h-6 w-6 rounded-full cursor-pointer flex items-center justify-center transition-all hover:scale-110",h.class,o===h.name?"ring-2 ring-primary ring-offset-2 ring-offset-background":""),title:h.name},h.name))}),l.jsx(Cn,{}),l.jsxs(Ut,{onClick:t,children:[l.jsx(O.LogOut,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:i.t("sign_out")})]})]})]})},V2=s.forwardRef((e,t)=>{Mn();const{components:n,authConfig:r,headerConfig:i,children:o,className:a,contentClassName:c,headerClassName:d,sidebarClassName:u,footerClassName:h}=e,{layoutState:m,i18nState:v,isPending:f,layoutService:p,focusManager:x,renderInjected:g}=v9(e,t),b=m.mode==="minimal";return m.mode==="auth"&&r?l.jsx(u4,{signInSlot:r.signInSlot,signUpSlot:r.signUpSlot,initialMode:m.authPage||"signin"}):l.jsx(er,{fallback:l.jsx(x9,{}),children:l.jsxs("div",{dir:v.dir,className:H("flex flex-col h-screen bg-background text-foreground transition-opacity duration-300",a),style:{height:"100vh",overflow:"hidden"},children:[l.jsx(ml,{}),g(n?.commandPalette),!b&&(n?.header||i)&&l.jsx("header",{"aria-label":"Global Header",style:{height:m.headerHeight},className:H("border-b border-border flex-shrink-0 px-4 flex items-center",d),children:g(n?.header,{...i,sidebarOpen:m.sidebarOpen,isMobile:m.isMobile,headerHeight:m.headerHeight,toggleSidebar:()=>p.toggleSidebar()})||i&&l.jsx(F2,{...i})}),l.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[!b&&n?.sidebar&&l.jsx(D2,{sidebarOpen:m.sidebarOpen,isMobile:m.isMobile,sidebarWidth:m.sidebarWidth,layoutService:p,focusManager:x,children:g(n?.sidebar,{open:m.sidebarOpen,isMobile:m.isMobile,onClose:()=>p.toggleSidebar(!1),className:u})}),m.panels?.filter(S=>S.position==="left").map(S=>l.jsx("aside",{className:"border-r border-border bg-background w-64 overflow-y-auto flex-shrink-0 relative z-20",children:S.content},S.id)),l.jsx(T2,{isPending:f,contentClassName:c,children:o}),m.panels?.filter(S=>S.position==="right").map(S=>l.jsx("aside",{className:"border-l border-border bg-background w-64 overflow-y-auto flex-shrink-0 relative z-20",children:S.content},S.id))]}),m.panels?.filter(S=>S.position==="bottom").map(S=>l.jsx("div",{className:"border-t border-border bg-background h-64 overflow-y-auto flex-shrink-0 relative z-30",children:S.content},S.id)),!b&&n?.footer&&l.jsx("footer",{"aria-label":"Global Footer",className:H("flex-shrink-0 border-t border-border bg-background",h),children:g(n.footer)})]})})});V2.displayName="EzLayout";const H9=V2;var Nn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},T9={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},P9=class{#e=T9;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!=="production"&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},tn=new P9;function I9(e){setTimeout(e,0)}var nn=typeof window>"u"||"Deno"in globalThis;function We(){}function O9(e,t){return typeof e=="function"?e(t):e}function gl(e){return typeof e=="number"&&e>=0&&e!==1/0}function B2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gt(e,t){return typeof e=="function"?e(t):e}function nt(e,t){return typeof e=="function"?e(t):e}function $2(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:c}=e;if(a){if(r){if(t.queryHash!==vl(a,t.options))return!1}else if(!nr(t.queryKey,a))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function W2(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(rn(t.options.mutationKey)!==rn(o))return!1}else if(!nr(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function vl(e,t){return(t?.queryKeyHashFn||rn)(e)}function rn(e){return JSON.stringify(e,(t,n)=>wl(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function nr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nr(e[n],t[n])):!1}var L9=Object.prototype.hasOwnProperty;function xl(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=U2(e)&&U2(t);if(!r&&!(wl(e)&&wl(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),c=a.length,d=r?new Array(c):{};let u=0;for(let h=0;h<c;h++){const m=r?h:a[h],v=e[m],f=t[m];if(v===f){d[m]=v,(r?h<o:L9.call(e,m))&&u++;continue}if(v===null||f===null||typeof v!="object"||typeof f!="object"){d[m]=f;continue}const p=xl(v,f,n+1);d[m]=p,p===v&&u++}return o===c&&u===o?e:d}function Qr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function U2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wl(e){if(!G2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!G2(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function G2(e){return Object.prototype.toString.call(e)==="[object Object]"}function _9(e){return new Promise(t=>{tn.setTimeout(t,e)})}function bl(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return xl(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return xl(e,t)}return t}function V9(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function B9(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Yr=Symbol();function K2(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Yr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Yr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function El(e,t){return typeof e=="function"?e(...t):!!e}function $9(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var W9=class extends Nn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!nn&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},yl=new W9;function Cl(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var U9=I9;function G9(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=U9;const o=c=>{t?e.push(c):i(()=>{n(c)})},a=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||a()}return d},batchCalls:c=>(...d)=>{o(()=>{c(...d)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var Ie=G9(),K9=class extends Nn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!nn&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Xr=new K9;function q9(e){return Math.min(1e3*2**e,3e4)}function q2(e){return(e??"online")==="online"?Xr.isOnline():!0}var Sl=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Q2(e){let t=!1,n=0,r;const i=Cl(),o=()=>i.status!=="pending",a=x=>{if(!o()){const g=new Sl(x);v(g),e.onCancel?.(g)}},c=()=>{t=!0},d=()=>{t=!1},u=()=>yl.isFocused()&&(e.networkMode==="always"||Xr.isOnline())&&e.canRun(),h=()=>q2(e.networkMode)&&e.canRun(),m=x=>{o()||(r?.(),i.resolve(x))},v=x=>{o()||(r?.(),i.reject(x))},f=()=>new Promise(x=>{r=g=>{(o()||u())&&x(g)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),p=()=>{if(o())return;let x;const g=n===0?e.initialPromise:void 0;try{x=g??e.fn()}catch(b){x=Promise.reject(b)}Promise.resolve(x).then(m).catch(b=>{if(o())return;const y=e.retry??(nn?0:3),S=e.retryDelay??q9,z=typeof S=="function"?S(n,b):S,N=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,b);if(t||!N){v(b);return}n++,e.onFail?.(n,b),_9(z).then(()=>u()?void 0:f()).then(()=>{t?v(b):p()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:d,canStart:h,start:()=>(h()?p():f().then(p),i)}}var Y2=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gl(this.gcTime)&&(this.#e=tn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(nn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(tn.clearTimeout(this.#e),this.#e=void 0)}},Q9=class extends Y2{#e;#t;#n;#s;#r;#i;#o;constructor(e){super(),this.#o=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=J2(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=J2(this.options);t.data!==void 0&&(this.setState(Z2(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=bl(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(We).catch(We):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>nt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Gt(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!B2(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const c=K2(this.options,t),u=(()=>{const h={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#o=!1,this.options.persister?this.options.persister(c,u,this):c(u)},a=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:i};return r(c),c})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=Q2({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof Sl&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{this.#l({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof Sl){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...X2(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Z2(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ie.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function X2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:q2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Z2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function J2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Y9=class extends Nn{constructor(e,t){super(),this.options=t,this.#e=e,this.#l=null,this.#o=Cl(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#i;#o;#l;#p;#h;#m;#c;#d;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),R2(this.#t,this.options)?this.#u():this.updateResult(),this.#w())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zl(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zl(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof nt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#y(),this.#t.setOptions(this.options),t._defaulted&&!Qr(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&eh(this.#t,n,this.options,t)&&this.#u(),this.updateResult(),r&&(this.#t!==n||nt(this.options.enabled,this.#t)!==nt(t.enabled,this.#t)||Gt(this.options.staleTime,this.#t)!==Gt(t.staleTime,this.#t))&&this.#g();const i=this.#v();r&&(this.#t!==n||nt(this.options.enabled,this.#t)!==nt(t.enabled,this.#t)||i!==this.#a)&&this.#x(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Z9(this,n)&&(this.#s=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#u({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#u(e){this.#y();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(We)),t}#g(){this.#b();const e=Gt(this.options.staleTime,this.#t);if(nn||this.#s.isStale||!gl(e))return;const n=B2(this.#s.dataUpdatedAt,e)+1;this.#c=tn.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#E(),this.#a=e,!(nn||nt(this.options.enabled,this.#t)===!1||!gl(this.#a)||this.#a===0)&&(this.#d=tn.setInterval(()=>{(this.options.refetchIntervalInBackground||yl.isFocused())&&this.#u()},this.#a))}#w(){this.#g(),this.#x(this.#v())}#b(){this.#c&&(tn.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#d&&(tn.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#s,o=this.#r,a=this.#i,d=e!==n?e.state:this.#n,{state:u}=e;let h={...u},m=!1,v;if(t._optimisticResults){const M=this.hasListeners(),D=!M&&R2(e,t),A=M&&eh(e,n,t,r);(D||A)&&(h={...h,...X2(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:f,errorUpdatedAt:p,status:x}=h;v=h.data;let g=!1;if(t.placeholderData!==void 0&&v===void 0&&x==="pending"){let M;i?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(M=i.data,g=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,M!==void 0&&(x="success",v=bl(i?.data,M,t),m=!0)}if(t.select&&v!==void 0&&!g)if(i&&v===o?.data&&t.select===this.#p)v=this.#h;else try{this.#p=t.select,v=t.select(v),v=bl(i?.data,v,t),this.#h=v,this.#l=null}catch(M){this.#l=M}this.#l&&(f=this.#l,v=this.#h,p=Date.now(),x="error");const b=h.fetchStatus==="fetching",y=x==="pending",S=x==="error",z=y&&b,N=v!==void 0,C={status:x,fetchStatus:h.fetchStatus,isPending:y,isSuccess:x==="success",isError:S,isInitialLoading:z,isLoading:z,data:v,dataUpdatedAt:h.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:S&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:S&&N,isStale:Ml(e,t),refetch:this.refetch,promise:this.#o,isEnabled:nt(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=C.data!==void 0,D=C.status==="error"&&!M,A=G=>{D?G.reject(C.error):M&&G.resolve(C.data)},_=()=>{const G=this.#o=C.promise=Cl();A(G)},U=this.#o;switch(U.status){case"pending":e.queryHash===n.queryHash&&A(U);break;case"fulfilled":(D||C.data!==U.value)&&_();break;case"rejected":(!D||C.error!==U.reason)&&_();break}}return C}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#m=this.#t),Qr(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const o=new Set(i??this.#f);return this.options.throwOnError&&o.add("error"),Object.keys(this.#s).some(a=>{const c=a;return this.#s[c]!==e[c]&&o.has(c)})};this.#C({listeners:n()})}#y(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#w()}#C(e){Ie.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function X9(e,t){return nt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function R2(e,t){return X9(e,t)||e.state.data!==void 0&&zl(e,t,t.refetchOnMount)}function zl(e,t,n){if(nt(t.enabled,e)!==!1&&Gt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ml(e,t)}return!1}function eh(e,t,n,r){return(e!==t||nt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ml(e,n)}function Ml(e,t){return nt(t.enabled,e)!==!1&&e.isStaleByTime(Gt(t.staleTime,e))}function Z9(e,t){return!Qr(e.getCurrentResult(),t)}function th(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const u=async()=>{let h=!1;const m=p=>{$9(p,()=>t.signal,()=>h=!0)},v=K2(t.options,t.fetchOptions),f=async(p,x,g)=>{if(h)return Promise.reject();if(x==null&&p.pages.length)return Promise.resolve(p);const y=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:x,direction:g?"backward":"forward",meta:t.options.meta};return m(E),E})(),S=await v(y),{maxPages:z}=t.options,N=g?B9:V9;return{pages:N(p.pages,S,z),pageParams:N(p.pageParams,x,z)}};if(i&&o.length){const p=i==="backward",x=p?J9:nh,g={pages:o,pageParams:a},b=x(r,g);c=await f(g,b,p)}else{const p=e??o.length;do{const x=d===0?a[0]??r.initialPageParam:nh(r,c);if(d>0&&x==null)break;c=await f(c,x),d++}while(d<p)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function nh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function J9(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var R9=class extends Y2{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||rh(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Q2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#r({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#s.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:i})}const o=await this.#s.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ie.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function rh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ew=class extends Nn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new R9({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Zr(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Zr(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Zr(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Zr(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ie.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>W2(t,n))}findAll(e={}){return this.getAll().filter(t=>W2(e,t))}notify(e){Ie.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ie.batch(()=>Promise.all(e.map(t=>t.continue().catch(We))))}};function Zr(e){return e.options.scope?.id}var tw=class extends Nn{#e;#t=void 0;#n;#s;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Qr(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&rn(n.mutationKey)!==rn(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(t,n){return this.#s=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??rh();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){Ie.batch(()=>{if(this.#s&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#s.onSuccess?.(t.data,n,r,i)}catch(o){Promise.reject(o)}try{this.#s.onSettled?.(t.data,null,n,r,i)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#s.onError?.(t.error,n,r,i)}catch(o){Promise.reject(o)}try{this.#s.onSettled?.(void 0,t.error,n,r,i)}catch(o){Promise.reject(o)}}}this.listeners.forEach(n=>{n(this.#t)})})}},nw=class extends Nn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??vl(r,t);let o=this.get(i);return o||(o=new Q9({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ie.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>$2(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>$2(e,n)):t}notify(e){Ie.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ie.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ie.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Nl=class{#e;#t;#n;#s;#r;#i;#o;#l;constructor(e={}){this.#e=e.queryCache||new nw,this.#t=e.mutationCache||new ew,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=yl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Xr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=O9(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ie.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ie.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ie.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ie.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(We).catch(We)}invalidateQueries(e,t={}){return Ie.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ie.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(We)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(We)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Gt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(We).catch(We)}fetchInfiniteQuery(e){return e.behavior=th(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(We).catch(We)}ensureInfiniteQueryData(e){return e.behavior=th(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xr.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(rn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{nr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(rn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{nr(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vl(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Yr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},sh=w.createContext(void 0),sn=e=>{const t=w.useContext(sh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},jl=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(sh.Provider,{value:e,children:t})),lh=w.createContext(!1),rw=()=>w.useContext(lh);lh.Provider;function sw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var lw=w.createContext(sw()),iw=()=>w.useContext(lw),ow=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?El(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},aw=e=>{w.useEffect(()=>{e.clearReset()},[e])},cw=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||El(n,[e.error,r])),dw=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uw=(e,t)=>e.isLoading&&e.isFetching&&!t,hw=(e,t)=>e?.suspense&&t.isPending,ih=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function mw(e,t,n){if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=rw(),i=iw(),o=sn(),a=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const c=o.getQueryCache().get(a.queryHash);process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=r?"isRestoring":"optimistic",dw(a),ow(a,i,c),aw(i);const d=!o.getQueryCache().get(a.queryHash),[u]=w.useState(()=>new t(o,a)),h=u.getOptimisticResult(a),m=!r&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(v=>{const f=m?u.subscribe(Ie.batchCalls(v)):We;return u.updateResult(),f},[u,m]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),w.useEffect(()=>{u.setOptions(a)},[a,u]),hw(a,h))throw ih(a,u,i);if(cw({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:c,suspense:a.suspense}))throw h.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!nn&&uw(h,r)&&(d?ih(a,u,i):c?.promise)?.catch(We).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?h:u.trackResult(h)}function oh(e,t){return mw(e,Y9)}function Le(e,t){const n=sn(),[r]=w.useState(()=>new tw(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const i=w.useSyncExternalStore(w.useCallback(a=>r.subscribe(Ie.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=w.useCallback((a,c)=>{r.mutate(a,c).catch(We)},[r]);if(i.error&&El(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const fw=(e,t="id")=>{const n=s.useMemo(()=>{const S=new Map;return e.forEach(z=>{const N=z[t];N!==void 0&&S.set(N,z)}),S},[e,t]),[r,i]=s.useState({data:e,history:{past:[],future:[]}}),o=s.useRef(new Set),a=s.useRef(e);a.current!==e&&(a.current=e,i({data:e,history:{past:[],future:[]}}),o.current.clear());const c=s.useCallback(S=>{i(z=>({...z,data:typeof S=="function"?S(z.data):S}))},[]),d=s.useCallback((S,z,N)=>{i(E=>{const C=E.data[S];if(!C)return E;const M=C[z];if(M===N)return E;const D=C[t];D!==void 0&&o.current.add(D);const A={type:"EDIT_CELL",payload:{rowIndex:S,rowId:D,columnId:z,oldValue:M,newValue:N},timestamp:Date.now()},_=[...E.data];return _[S]={...C,[z]:N},{data:_,history:{past:[...E.history.past,A],future:[]}}})},[t]),u=s.useCallback((S,z=0)=>{i(N=>{let E={...S};if(E[t]===void 0){const A=`_temp_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;E[t]=A}const C=E[t];C!==void 0&&o.current.add(C);const M={type:"ADD_ROW",payload:{rowIndex:z,rowId:C,row:E},timestamp:Date.now()},D=[...N.data];return D.splice(z,0,E),{data:D,history:{past:[...N.history.past,M],future:[]}}})},[t]),h=s.useCallback(S=>{i(z=>{const N=[...S].sort((M,D)=>D-M),E=[...z.history.past],C=[...z.data];return N.forEach(M=>{const D=z.data[M];if(!D)return;const A=D[t];A!==void 0&&o.current.add(A),E.push({type:"DELETE_ROW",payload:{rowIndex:M,rowId:A,row:D},timestamp:Date.now()}),C.splice(M,1)}),{data:C,history:{past:E,future:[]}}})},[t]),m=s.useCallback(()=>{i(S=>{if(S.history.past.length===0)return S;const z=S.history.past[S.history.past.length-1],N=S.history.past.slice(0,-1),E=[...S.data];if(z.type==="EDIT_CELL"){const{rowId:C,columnId:M,oldValue:D}=z.payload,A=E.findIndex(_=>_[t]===C);A!==-1&&M&&(E[A]={...E[A],[M]:D})}else if(z.type==="ADD_ROW"){const{rowId:C}=z.payload,M=E.findIndex(D=>D[t]===C);M!==-1&&E.splice(M,1)}else if(z.type==="DELETE_ROW"){const{rowIndex:C,row:M}=z.payload;M&&C!==void 0&&E.splice(C,0,M)}return{data:E,history:{past:N,future:[z,...S.history.future]}}})},[t]),v=s.useCallback(()=>{i(S=>{if(S.history.future.length===0)return S;const z=S.history.future[0],N=S.history.future.slice(1),E=[...S.data];if(z.type==="EDIT_CELL"){const{rowId:C,columnId:M,newValue:D}=z.payload,A=E.findIndex(_=>_[t]===C);A!==-1&&M&&(E[A]={...E[A],[M]:D})}else if(z.type==="ADD_ROW"){const{rowIndex:C,row:M}=z.payload;M&&C!==void 0&&E.splice(C,0,M)}else if(z.type==="DELETE_ROW"){const{rowId:C}=z.payload,M=E.findIndex(D=>D[t]===C);M!==-1&&E.splice(M,1)}return{data:E,history:{past:[...S.history.past,z],future:N}}})},[t]),{data:f}=r,p=r.history.past.length>0,x=r.history.future.length>0,g=s.useMemo(()=>{if(f===e)return{added:0,edited:0,deleted:0};const S=new Map;f.forEach(C=>{const M=C[t];M!==void 0&&S.set(M,C)});let z=0,N=0,E=0;return f.forEach(C=>{const M=C[t];if(M===void 0||!n.has(M))z++;else{const D=n.get(M);if(C===D)return;Object.keys(C).some(_=>_.startsWith("_")?!1:C[_]!==D[_])&&N++}}),n.forEach((C,M)=>{S.has(M)||E++}),{added:z,edited:N,deleted:E}},[f,e,n,t]),b=s.useMemo(()=>{if(f===e)return{addedRecords:[],changedRecords:[],deletedRecords:[]};const S=new Map;f.forEach(C=>{const M=C[t];M!==void 0&&S.set(M,C)});const z=[],N=[],E=[];return f.forEach(C=>{const M=C[t];if(M===void 0||!n.has(M))z.push(C);else{const D=n.get(M);if(C===D)return;Object.keys(C).some(_=>_.startsWith("_")?!1:C[_]!==D[_])&&N.push(C)}}),n.forEach((C,M)=>{S.has(M)||E.push(C)}),{addedRecords:z,changedRecords:N,deletedRecords:E}},[f,e,n,t]),y=s.useCallback(()=>{o.current.clear(),i({data:e,history:{past:[],future:[]}})},[e]);return{data:f,setData:c,performEdit:d,addRow:u,deleteRows:h,undo:m,redo:v,canUndo:p,canRedo:x,changes:g,batchChanges:b,resetData:y}},kl=(e,t="14px Inter, sans-serif")=>{if(typeof document>"u")return 0;const r=document.createElement("canvas").getContext("2d");return r?(r.font=t,r.measureText(e).width):0},pw=e=>({autoFitColumn:s.useCallback(n=>{const r=e.getColumn(n);if(!r)return;const o=e.getRowModel().rows.slice(0,50),a="14px Inter, sans-serif",c="600 14px Inter, sans-serif",d=r.columnDef.meta;let u=0;const h=typeof r.columnDef.header=="string"?r.columnDef.header:n;u=Math.max(u,kl(h,c)),o.forEach(v=>{let f=v.getValue(n);d?.columnType==="number"?f=Ht(f,d.numberOptions):d?.columnType==="date"?f=Jn(f,d.dateOptions):d?.columnType==="datetime"&&(f=Jn(f,d.dateTimeOptions));const p=f!=null?String(f):"";if(d?.columnType==="longtext"&&d?.longTextOptions?.previewLength){const x=p.length>d.longTextOptions.previewLength?p.substring(0,d.longTextOptions.previewLength)+"...":p;u=Math.max(u,kl(x,a))}else u=Math.max(u,kl(p,a))});const m=Math.ceil(u+100);e.setColumnSizing(v=>({...v,[n]:m}))},[e])}),gw=e=>e?.kind==="group",ah=(e,t)=>{for(const n of e){if(n.id===t)return n;if(n.children){const r=ah(n.children,t);if(r)return r}}},ch=(e,t,n)=>e.map(r=>r.id===t?{...r,...n}:r.children?{...r,children:ch(r.children,t,n)}:r),Fl=(e,t)=>{const n=t(e.field),r=e.value,i=String(n??"").toLowerCase(),o=String(r??"").toLowerCase(),a=Number(n),c=Number(r);switch(e.operator){case"contains":return i.includes(o);case"doesNotContain":return!i.includes(o);case"equals":return i===o;case"notEquals":case"doesNotEqual":return i!==o;case"startsWith":return i.startsWith(o);case"endsWith":return i.endsWith(o);case"empty":return n==null||n==="";case"notEmpty":return!(n==null||n==="");case"gt":case"greaterThan":return!isNaN(a)&&!isNaN(c)&&a>c;case"lt":case"lessThan":return!isNaN(a)&&!isNaN(c)&&a<c;case"gte":case"greaterThanOrEqual":return!isNaN(a)&&!isNaN(c)&&a>=c;case"lte":case"lessThanOrEqual":return!isNaN(a)&&!isNaN(c)&&a<=c;case"between":{if(Array.isArray(r)&&r.length===2){const[d,u]=r;return!isNaN(a)&&a>=Number(d)&&a<=Number(u)}return!1}case"shouldContain":return Array.isArray(n)&&Array.isArray(r)?r.some(d=>n.includes(d)):Array.isArray(n)?n.includes(r):!1;default:return!0}},Jr=(e,t)=>!e.filters||e.filters.length===0?!0:e.logic==="AND"?e.filters.every(n=>n.kind==="group"?Jr(n,t):Fl(n,t)):e.filters.some(n=>n.kind==="group"?Jr(n,t):Fl(n,t)),vw=(e,t,n)=>{if(typeof n=="string"){if(!n)return!0;const o=n.toLowerCase();return e.getAllCells().some(a=>{const c=a.getValue();return String(c??"").toLowerCase().includes(o)})}const{quickSearch:r,advanced:i}=n;if(r){const o=r.toLowerCase();if(!e.getAllCells().some(c=>{const d=c.getValue();return String(d??"").toLowerCase().includes(o)}))return!1}return!(i&&!Jr(i,o=>e.getValue(o)))},xw=(e,t,n)=>{try{if(Array.isArray(n)){if(n.length===0)return!0;const a=e.getValue(t);return n.includes(a)}if(typeof n=="object"&&n!==null){if(gw(n))return Jr(n,a=>e.getValue(a||t));if("operator"in n){const a={kind:"rule",id:t,field:t,operator:n.operator,value:n.value};return Fl(a,c=>e.getValue(c))}}const r=e.getValue(t),i=String(r??"").toLowerCase(),o=String(n??"").toLowerCase();return i.includes(o)}catch(r){return console.error(`Error in smartColumnFilterFn for column ${t}:`,r),!0}},Dl=({value:e,className:t,title:n,children:r,fallback:i=l.jsx("span",{className:"text-muted-foreground text-xs italic",children:"—"}),align:o="left"})=>e==null?l.jsx(l.Fragment,{children:i}):l.jsx("div",{className:H("text-sm",o==="center"&&"text-center",o==="right"&&"text-right",t),title:n||(typeof e=="string"?e:String(e)),children:r||String(e)}),Al=w.createContext(null),rt=({value:e,onValueChange:t,children:n,open:r,onOpenChange:i})=>{const[o,a]=w.useState(!1),c=r!==void 0?r:o,d=i||a;return l.jsx(Al.Provider,{value:{value:e,onValueChange:t,setOpen:d},children:l.jsx($t,{open:c,onOpenChange:d,children:n})})},st=({className:e,children:t})=>l.jsx(Wt,{asChild:!0,children:l.jsx("button",{className:H("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),children:t})}),lt=({placeholder:e})=>{const t=w.useContext(Al);return l.jsx("span",{children:t?.value||e})},it=({children:e})=>l.jsx(At,{className:"max-h-[200px] overflow-y-auto",children:e}),Ae=({value:e,children:t})=>{const n=w.useContext(Al);return l.jsx(Ut,{className:H("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n?.value===e&&"font-bold"),onSelect:()=>{n?.onValueChange?.(e),n?.setOpen(!1)},children:t})},Hl=({text:e,highlight:t})=>{const n=String(e??"");if(!t||!n)return l.jsx(l.Fragment,{children:n});const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=n.split(new RegExp(`(${r})`,"gi"));return l.jsx(l.Fragment,{children:i.map((o,a)=>o.toLowerCase()===t.toLowerCase()?l.jsx("mark",{className:"bg-[#ccff00] dark:bg-[#d4ff33] text-black rounded-sm px-0.5 font-bold shadow-[0_0_8px_rgba(204,255,0,0.5)] dark:shadow-[0_0_12px_rgba(212,255,51,0.4)] transition-all animate-in fade-in zoom-in duration-300 inline-block",children:o},a):o)})};var ww=Symbol("radix.slottable");function bw(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ww,t}var Ew=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),yw="VisuallyHidden",dh=w.forwardRef((e,t)=>l.jsx(Ee.span,{...e,ref:t,style:{...Ew,...e.style}}));dh.displayName=yw;var Cw=dh,[Rr]=et("Tooltip",[Dr]),es=Dr(),uh="TooltipProvider",Sw=700,Tl="tooltip.open",[zw,Pl]=Rr(uh),hh=e=>{const{__scopeTooltip:t,delayDuration:n=Sw,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,a=w.useRef(!0),c=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),l.jsx(zw,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(u=>{c.current=u},[]),disableHoverableContent:i,children:o})};hh.displayName=uh;var rr="Tooltip",[Mw,ts]=Rr(rr),mh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:c}=e,d=Pl(rr,e.__scopeTooltip),u=es(t),[h,m]=w.useState(null),v=$e(),f=w.useRef(0),p=a??d.disableHoverableContent,x=c??d.delayDuration,g=w.useRef(!1),[b,y]=Ot({prop:r,defaultProp:i??!1,onChange:C=>{C?(d.onOpen(),document.dispatchEvent(new CustomEvent(Tl))):d.onClose(),o?.(C)},caller:rr}),S=w.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),z=w.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,y(!0)},[y]),N=w.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),E=w.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,y(!0),f.current=0},x)},[x,y]);return w.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),l.jsx(Ks,{...u,children:l.jsx(Mw,{scope:t,contentId:v,open:b,stateAttribute:S,trigger:h,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?E():z()},[d.isOpenDelayedRef,E,z]),onTriggerLeave:w.useCallback(()=>{p?N():(window.clearTimeout(f.current),f.current=0)},[N,p]),onOpen:z,onClose:N,disableHoverableContent:p,children:n})})};mh.displayName=rr;var Il="TooltipTrigger",fh=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ts(Il,n),o=Pl(Il,n),a=es(n),c=w.useRef(null),d=Ne(t,c,i.onTriggerChange),u=w.useRef(!1),h=w.useRef(!1),m=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),l.jsx(Wo,{asChild:!0,...a,children:l.jsx(Ee.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:d,onPointerMove:ce(e.onPointerMove,v=>{v.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:ce(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ce(e.onBlur,i.onClose),onClick:ce(e.onClick,i.onClose)})})});fh.displayName=Il;var Nw="TooltipPortal",[zS,jw]=Rr(Nw,{forceMount:void 0}),jn="TooltipContent",ph=w.forwardRef((e,t)=>{const n=jw(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=ts(jn,e.__scopeTooltip);return l.jsx(Ke,{present:r||a.open,children:a.disableHoverableContent?l.jsx(gh,{side:i,...o,ref:t}):l.jsx(kw,{side:i,...o,ref:t})})}),kw=w.forwardRef((e,t)=>{const n=ts(jn,e.__scopeTooltip),r=Pl(jn,e.__scopeTooltip),i=w.useRef(null),o=Ne(t,i),[a,c]=w.useState(null),{trigger:d,onClose:u}=n,h=i.current,{onPointerInTransitChange:m}=r,v=w.useCallback(()=>{c(null),m(!1)},[m]),f=w.useCallback((p,x)=>{const g=p.currentTarget,b={x:p.clientX,y:p.clientY},y=Tw(b,g.getBoundingClientRect()),S=Pw(b,y),z=Iw(x.getBoundingClientRect()),N=Lw([...S,...z]);c(N),m(!0)},[m]);return w.useEffect(()=>()=>v(),[v]),w.useEffect(()=>{if(d&&h){const p=g=>f(g,h),x=g=>f(g,d);return d.addEventListener("pointerleave",p),h.addEventListener("pointerleave",x),()=>{d.removeEventListener("pointerleave",p),h.removeEventListener("pointerleave",x)}}},[d,h,f,v]),w.useEffect(()=>{if(a){const p=x=>{const g=x.target,b={x:x.clientX,y:x.clientY},y=d?.contains(g)||h?.contains(g),S=!Ow(b,a);y?v():S&&(v(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[d,h,a,u,v]),l.jsx(gh,{...e,ref:o})}),[Fw,Dw]=Rr(rr,{isInside:!1}),Aw=bw("TooltipContent"),gh=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...c}=e,d=ts(jn,n),u=es(n),{onClose:h}=d;return w.useEffect(()=>(document.addEventListener(Tl,h),()=>document.removeEventListener(Tl,h)),[h]),w.useEffect(()=>{if(d.trigger){const m=v=>{v.target?.contains(d.trigger)&&h()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,h]),l.jsx(br,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:m=>m.preventDefault(),onDismiss:h,children:l.jsxs(Uo,{"data-state":d.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(Aw,{children:r}),l.jsx(Fw,{scope:n,isInside:!0,children:l.jsx(Cw,{id:d.contentId,role:"tooltip",children:i||r})})]})})});ph.displayName=jn;var vh="TooltipArrow",Hw=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=es(n);return Dw(vh,n).isInside?null:l.jsx(Go,{...i,...r,ref:t})});Hw.displayName=vh;function Tw(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Pw(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Iw(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ow(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const c=t[o],d=t[a],u=c.x,h=c.y,m=d.x,v=d.y;h>r!=v>r&&n<(m-u)*(r-h)/(v-h)+u&&(i=!i)}return i}function Lw(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),_w(t)}function _w(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Vw=hh,Bw=mh,$w=fh,xh=ph;const kn=Vw,Fn=Bw,Dn=$w,ln=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(xh,{ref:r,sideOffset:t,className:H("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",e),...n}));ln.displayName=xh.displayName;const Kt=$t,qt=Wt,Tt=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>l.jsx(At,{ref:i,align:t,sideOffset:n,className:e,...r}));Tt.displayName="PopoverContent";const An=({value:e,columnType:t,meta:n,className:r,align:i,table:o})=>{let a=e;if(e==null)return l.jsx(Dl,{value:e,align:i,className:r});switch(t){case"number":a=Ht(e,{...n?.numberOptions});break;case"date":case"datetime":a=Jn(e,t==="datetime"?n?.dateTimeOptions:n?.dateOptions);break;case"longtext":const d=String(e);a=l.jsxs("div",{className:"flex items-start gap-1 group/longtext w-full overflow-hidden py-1.5",children:[l.jsxs(Fn,{children:[l.jsx(Dn,{asChild:!0,children:l.jsx("div",{className:"flex-1 min-w-0 cursor-help",children:l.jsx("span",{className:"block !whitespace-normal break-words text-xs leading-normal",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:d})})}),l.jsx(ln,{className:"max-w-[300px] p-3 break-words text-xs leading-relaxed",children:d})]}),d.length>20&&l.jsxs(Kt,{children:[l.jsx(qt,{asChild:!0,children:l.jsx(J,{variant:"ghost",size:"icon",className:"h-5 w-5 opacity-0 group-hover/longtext:opacity-100 transition-opacity shrink-0",onClick:u=>u.stopPropagation(),children:l.jsx(O.Maximize2,{className:"h-3 w-3 text-muted-foreground hover:text-primary"})})}),l.jsx(Tt,{className:"w-[400px] p-4 shadow-xl border-border bg-popover",align:"end",onClick:u=>u.stopPropagation(),children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[l.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"Detailed Description"}),l.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5 text-[10px] font-bold",onClick:u=>{u.stopPropagation(),navigator.clipboard.writeText(d)},children:[l.jsx(O.Copy,{className:"h-3 w-3"}),"Copy"]})]}),l.jsx("div",{className:"text-sm leading-relaxed text-foreground max-h-[300px] overflow-auto pr-2 custom-scrollbar whitespace-pre-wrap",children:d})]})})]})]});break}if(o?.options.meta?.enableSearchHighlighting){const d=o.getState().globalFilter,u=typeof d=="string"?d:d?.quickSearch;u&&(a=l.jsx(Hl,{text:a,highlight:u}))}const c=i||(t==="number"?"right":"left");return l.jsx(Dl,{value:e,align:c,title:t==="longtext"?"":void 0,className:H(t==="number"&&"font-mono tabular-nums",t==="number"&&e<0&&"text-rose-600 dark:text-rose-400","px-3 min-h-full flex",t==="longtext"?"items-start py-2 overflow-hidden":n?.wrapText?"items-start":"items-center",c==="right"&&"justify-end",c==="center"&&"justify-center",r),children:a})},Hn=({value:e,onChange:t,onBlur:n,columnType:r,autoFocus:i=!0,isFocused:o,className:a,placeholder:c,meta:d})=>{const u=s.useRef(null);s.useEffect(()=>{o&&u.current&&u.current.focus()},[o]);const[h,m]=s.useState(()=>e==null?"":r==="number"?new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20}).format(e):String(e)),v=x=>{let g=x.target.value;if(m(g),r==="number")if(g==="")t(null);else{const b=g.replace(/,/g,""),y=parseFloat(b);isNaN(y)||t(y)}else t(g)},f=()=>{if(r==="number"&&h!==""){const x=h.replace(/,/g,""),g=parseFloat(x);isNaN(g)||m(new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}).format(g))}n?.()},p=d?.align||(r==="number"?"right":"left");return l.jsx(je,{ref:u,type:r==="date"?"date":"text",value:h,onChange:v,onBlur:f,autoFocus:i,className:H("h-7 px-2 w-full border-0 shadow-none bg-transparent focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0",p==="right"&&"text-right",p==="center"&&"text-center",r==="number"&&"font-mono tabular-nums",a),placeholder:c,onClick:x=>x.stopPropagation()})},wh={text:[{label:"Contains",value:"contains"},{label:"Does not contain",value:"doesNotContain"},{label:"Equals",value:"equals"},{label:"Does not equal",value:"notEquals"},{label:"Starts with",value:"startsWith"},{label:"Ends with",value:"endsWith"}],number:[{label:"Equals",value:"equals"},{label:"Greater than",value:"gt"},{label:"Greater or equal",value:"gte"},{label:"Less than",value:"lt"},{label:"Less or equal",value:"lte"},{label:"Between",value:"between"}],date:[{label:"Equals",value:"equals"},{label:"After",value:"gt"},{label:"On or after",value:"gte"},{label:"Before",value:"lt"},{label:"On or before",value:"lte"},{label:"Between",value:"between"}]},Ww=({columnType:e,value:t,valueTo:n,operator:r,onChange:i})=>{const a=wh[e==="datetime"||e==="date"?"date":e==="number"?"number":"text"]||wh.text,c=e==="number"?"number":e==="date"||e==="datetime"?"date":"text";return l.jsxs("div",{className:"p-3 space-y-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-xs font-medium text-muted-foreground ml-1",children:"Condition"}),l.jsxs(rt,{value:r,onValueChange:d=>i(t,d,n),children:[l.jsx(st,{className:"h-8",children:l.jsx(lt,{})}),l.jsx(it,{children:a.map(d=>l.jsx(Ae,{value:d.value,children:d.label},d.value))})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-xs font-medium text-muted-foreground ml-1",children:"Value"}),l.jsx(je,{type:c,value:t??"",onChange:d=>i(d.target.value,r,n),className:"h-8 antialiased",placeholder:"Enter value...",onClick:d=>d.stopPropagation()}),r==="between"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 px-1",children:[l.jsx("div",{className:"h-[1px] flex-1 bg-border"}),l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:"and"}),l.jsx("div",{className:"h-[1px] flex-1 bg-border"})]}),l.jsx(je,{type:c,value:n??"",onChange:d=>i(t,r,d.target.value),className:"h-8 antialiased",placeholder:"To value...",onClick:d=>d.stopPropagation()})]})]})]})};function bh(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ns="Switch",[Uw]=et(ns),[Gw,Kw]=Uw(ns),Eh=w.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:c,value:d="on",onCheckedChange:u,form:h,...m}=e,[v,f]=w.useState(null),p=Ne(t,S=>f(S)),x=w.useRef(!1),g=v?h||!!v.closest("form"):!0,[b,y]=Ot({prop:i,defaultProp:o??!1,onChange:u,caller:ns});return l.jsxs(Gw,{scope:n,checked:b,disabled:c,children:[l.jsx(Ee.button,{type:"button",role:"switch","aria-checked":b,"aria-required":a,"data-state":zh(b),"data-disabled":c?"":void 0,disabled:c,value:d,...m,ref:p,onClick:ce(e.onClick,S=>{y(z=>!z),g&&(x.current=S.isPropagationStopped(),x.current||S.stopPropagation())})}),g&&l.jsx(Sh,{control:v,bubbles:!x.current,name:r,value:d,checked:b,required:a,disabled:c,form:h,style:{transform:"translateX(-100%)"}})]})});Eh.displayName=ns;var yh="SwitchThumb",Ch=w.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Kw(yh,n);return l.jsx(Ee.span,{"data-state":zh(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Ch.displayName=yh;var qw="SwitchBubbleInput",Sh=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=w.useRef(null),c=Ne(a,o),d=bh(n),u=Ws(t);return w.useEffect(()=>{const h=a.current;if(!h)return;const m=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(m,"checked").set;if(d!==n&&f){const p=new Event("click",{bubbles:r});f.call(h,n),h.dispatchEvent(p)}},[d,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Sh.displayName=qw;function zh(e){return e?"checked":"unchecked"}var Mh=Eh,Qw=Ch;const rs=w.forwardRef(({className:e,...t},n)=>l.jsx(Mh,{className:H("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:l.jsx(Qw,{className:H("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));rs.displayName=Mh.displayName;const qe=w.forwardRef(({className:e,checked:t,onCheckedChange:n,...r},i)=>{const o=w.useRef(null);return w.useImperativeHandle(i,()=>o.current),w.useEffect(()=>{o.current&&(o.current.indeterminate=t==="indeterminate")},[t]),l.jsx("input",{type:"checkbox",className:H("peer h-4 w-4 shrink-0 rounded-sm border border-zinc-200 border-zinc-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=checked]:text-zinc-50 dark:border-zinc-800 dark:border-zinc-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=checked]:text-zinc-900","accent-zinc-900 dark:accent-zinc-50",e),ref:o,checked:t==="indeterminate"?!1:t,onChange:a=>{n?.(a.target.checked)},...r})});qe.displayName="Checkbox";const Nh=({value:e,trueLabel:t="Yes",falseLabel:n="No",nullLabel:r="N/A",showIcon:i=!0,showLabel:o=!1,variant:a="checkbox",className:c,disabled:d=!0,onChange:u})=>{const h=e===!0,m=e===!1,v=e==null;return a==="switch"?l.jsxs("div",{className:H("flex items-center gap-2",c),children:[l.jsx(rs,{checked:h,onCheckedChange:u,disabled:d,className:"scale-90"}),o&&l.jsx("span",{className:"text-xs font-medium",children:h?t:m?n:r})]}):l.jsxs("div",{className:H("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md transition-colors text-xs font-medium",h&&"bg-emerald-50/50 text-emerald-700 dark:bg-emerald-900/20 dark:text-emerald-400",m&&"bg-rose-50/50 text-rose-700 dark:bg-rose-900/20 dark:text-rose-400",v&&"bg-muted/60 text-muted-foreground",c),children:[i&&l.jsxs(l.Fragment,{children:[h&&l.jsx(O.Check,{className:"w-3.5 h-3.5"}),m&&l.jsx(O.X,{className:"w-3.5 h-3.5"}),v&&l.jsx(O.Minus,{className:"w-3.5 h-3.5"})]}),o&&l.jsx("span",{className:"text-xs font-medium",children:h?t:m?n:r})]})},jh=({value:e,onChange:t,trueLabel:n="Yes",falseLabel:r="No",variant:i="checkbox",disabled:o=!1,className:a})=>{const c=e===!0;return i==="switch"?l.jsxs("div",{className:H("flex items-center gap-2 p-2",a),children:[l.jsx(rs,{id:"boolean-switch",checked:c,onCheckedChange:d=>{t(d)},disabled:o}),l.jsx(ze,{htmlFor:"boolean-switch",className:"text-sm font-medium cursor-pointer",children:c?n:r})]}):l.jsxs("div",{className:H("flex items-center gap-2 p-2",a),children:[l.jsx(qe,{id:"boolean-editor",checked:c,onCheckedChange:d=>{t(d===!0)},disabled:o,className:"data-[state=checked]:bg-primary data-[state=checked]:border-primary"}),l.jsx(ze,{htmlFor:"boolean-editor",className:"text-sm font-medium cursor-pointer",children:c?n:r})]})},kh=({value:e,onChange:t,trueLabel:n="Yes",falseLabel:r="No",nullLabel:i="N/A",allLabel:o="All",className:a})=>l.jsxs(rt,{value:e,onValueChange:t,children:[l.jsx(st,{className:H("w-full h-8",a),children:l.jsx(lt,{placeholder:"Filter..."})}),l.jsxs(it,{children:[l.jsx(Ae,{value:"all",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(O.Minus,{className:"w-4 h-4 text-muted-foreground"}),l.jsx("span",{children:o})]})}),l.jsx(Ae,{value:"true",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(O.Check,{className:"w-4 h-4 text-emerald-600"}),l.jsx("span",{children:n})]})}),l.jsx(Ae,{value:"false",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(O.X,{className:"w-4 h-4 text-rose-600"}),l.jsx("span",{children:r})]})}),l.jsx(Ae,{value:"null",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(O.Minus,{className:"w-4 h-4 text-muted-foreground"}),l.jsx("span",{children:i})]})})]})]});var Ol="Radio",[Yw,Fh]=et(Ol),[Xw,Zw]=Yw(Ol),Dh=w.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:a,value:c="on",onCheck:d,form:u,...h}=e,[m,v]=w.useState(null),f=Ne(t,g=>v(g)),p=w.useRef(!1),x=m?u||!!m.closest("form"):!0;return l.jsxs(Xw,{scope:n,checked:i,disabled:a,children:[l.jsx(Ee.button,{type:"button",role:"radio","aria-checked":i,"data-state":Ph(i),"data-disabled":a?"":void 0,disabled:a,value:c,...h,ref:f,onClick:ce(e.onClick,g=>{i||d?.(),x&&(p.current=g.isPropagationStopped(),p.current||g.stopPropagation())})}),x&&l.jsx(Th,{control:m,bubbles:!p.current,name:r,value:c,checked:i,required:o,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});Dh.displayName=Ol;var Ah="RadioIndicator",Hh=w.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=Zw(Ah,n);return l.jsx(Ke,{present:r||o.checked,children:l.jsx(Ee.span,{"data-state":Ph(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});Hh.displayName=Ah;var Jw="RadioBubbleInput",Th=w.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const a=w.useRef(null),c=Ne(a,o),d=bh(n),u=Ws(t);return w.useEffect(()=>{const h=a.current;if(!h)return;const m=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(m,"checked").set;if(d!==n&&f){const p=new Event("click",{bubbles:r});f.call(h,n),h.dispatchEvent(p)}},[d,n,r]),l.jsx(Ee.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Th.displayName=Jw;function Ph(e){return e?"checked":"unchecked"}var Rw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ss="RadioGroup",[eb]=et(ss,[Hr,Fh]),Ih=Hr(),Oh=Fh(),[tb,nb]=eb(ss),Lh=w.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:a=!1,disabled:c=!1,orientation:d,dir:u,loop:h=!0,onValueChange:m,...v}=e,f=Ih(n),p=wr(u),[x,g]=Ot({prop:o,defaultProp:i??null,onChange:m,caller:ss});return l.jsx(tb,{scope:n,name:r,required:a,disabled:c,value:x,onValueChange:g,children:l.jsx(Zo,{asChild:!0,...f,orientation:d,dir:p,loop:h,children:l.jsx(Ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":d,"data-disabled":c?"":void 0,dir:p,...v,ref:t})})})});Lh.displayName=ss;var _h="RadioGroupItem",Vh=w.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=nb(_h,n),a=o.disabled||r,c=Ih(n),d=Oh(n),u=w.useRef(null),h=Ne(t,u),m=o.value===i.value,v=w.useRef(!1);return w.useEffect(()=>{const f=x=>{Rw.includes(x.key)&&(v.current=!0)},p=()=>v.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),l.jsx(Jo,{asChild:!0,...c,focusable:!a,active:m,children:l.jsx(Dh,{disabled:a,required:o.required,checked:m,...d,...i,name:o.name,ref:h,onCheck:()=>o.onValueChange(i.value),onKeyDown:ce(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ce(i.onFocus,()=>{v.current&&u.current?.click()})})})});Vh.displayName=_h;var rb="RadioGroupIndicator",Bh=w.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=Oh(n);return l.jsx(Hh,{...i,...r,ref:t})});Bh.displayName=rb;var $h=Lh,Wh=Vh,sb=Bh;const ls=w.forwardRef(({className:e,...t},n)=>l.jsx($h,{className:H("grid gap-2",e),...t,ref:n}));ls.displayName=$h.displayName;const sr=w.forwardRef(({className:e,...t},n)=>l.jsx(Wh,{ref:n,className:H("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary",e),...t,children:l.jsx(sb,{className:"flex items-center justify-center",children:l.jsx(O.Circle,{className:"h-1.5 w-1.5 fill-white text-white"})})}));sr.displayName=Wh.displayName;var Uh=1,lb=.9,ib=.8,ob=.17,Ll=.1,_l=.999,ab=.9999,cb=.99,db=/[\\\/_+.#"@\[\(\{&]/,ub=/[\\\/_+.#"@\[\(\{&]/g,hb=/[\s-]/,Gh=/[\s-]/g;function Vl(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?Uh:cb;var c=`${i},${o}`;if(a[c]!==void 0)return a[c];for(var d=r.charAt(o),u=n.indexOf(d,i),h=0,m,v,f,p;u>=0;)m=Vl(e,t,n,r,u+1,o+1,a),m>h&&(u===i?m*=Uh:db.test(e.charAt(u-1))?(m*=ib,f=e.slice(i,u-1).match(ub),f&&i>0&&(m*=Math.pow(_l,f.length))):hb.test(e.charAt(u-1))?(m*=lb,p=e.slice(i,u-1).match(Gh),p&&i>0&&(m*=Math.pow(_l,p.length))):(m*=ob,i>0&&(m*=Math.pow(_l,u-i))),e.charAt(u)!==t.charAt(o)&&(m*=ab)),(m<Ll&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(v=Vl(e,t,n,r,u+1,o+2,a),v*Ll>m&&(m=v*Ll)),m>h&&(h=m),u=n.indexOf(d,u+1);return a[c]=h,h}function Kh(e){return e.toLowerCase().replace(Gh," ")}function mb(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Vl(e,t,Kh(e),Kh(t),0,0,{})}function fb(e){const t=pb(e),n=w.forwardRef((r,i)=>{const{children:o,...a}=r,c=w.Children.toArray(o),d=c.find(vb);if(d){const u=d.props.children,h=c.map(m=>m===d?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:m);return l.jsx(t,{...a,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,h):null})}return l.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function pb(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const a=wb(i),c=xb(o,i.props);return i.type!==w.Fragment&&(c.ref=r?Ye(r,a):a),w.cloneElement(i,c)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gb=Symbol("radix.slottable");function vb(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gb}function xb(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const d=o(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function wb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var is="Dialog",[qh]=et(is),[bb,mt]=qh(is),Qh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,c=w.useRef(null),d=w.useRef(null),[u,h]=Ot({prop:r,defaultProp:i??!1,onChange:o,caller:is});return l.jsx(bb,{scope:t,triggerRef:c,contentRef:d,contentId:$e(),titleId:$e(),descriptionId:$e(),open:u,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(m=>!m),[h]),modal:a,children:n})};Qh.displayName=is;var Yh="DialogTrigger",Eb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mt(Yh,n),o=Ne(t,i.triggerRef);return l.jsx(Ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Wl(i.open),...r,ref:o,onClick:ce(e.onClick,i.onOpenToggle)})});Eb.displayName=Yh;var Bl="DialogPortal",[yb,Xh]=qh(Bl,{forceMount:void 0}),Zh=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=mt(Bl,t);return l.jsx(yb,{scope:t,forceMount:n,children:w.Children.map(r,a=>l.jsx(Ke,{present:n||o.open,children:l.jsx(qs,{asChild:!0,container:i,children:a})}))})};Zh.displayName=Bl;var os="DialogOverlay",Jh=w.forwardRef((e,t)=>{const n=Xh(os,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=mt(os,e.__scopeDialog);return o.modal?l.jsx(Ke,{present:r||o.open,children:l.jsx(Sb,{...i,ref:t})}):null});Jh.displayName=os;var Cb=fb("DialogOverlay.RemoveScroll"),Sb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mt(os,n);return l.jsx(tl,{as:Cb,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(Ee.div,{"data-state":Wl(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),on="DialogContent",Rh=w.forwardRef((e,t)=>{const n=Xh(on,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=mt(on,e.__scopeDialog);return l.jsx(Ke,{present:r||o.open,children:o.modal?l.jsx(zb,{...i,ref:t}):l.jsx(Mb,{...i,ref:t})})});Rh.displayName=on;var zb=w.forwardRef((e,t)=>{const n=mt(on,e.__scopeDialog),r=w.useRef(null),i=Ne(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return ea(o)},[]),l.jsx(em,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&o.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,o=>o.preventDefault())})}),Mb=w.forwardRef((e,t)=>{const n=mt(on,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return l.jsx(em,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),em=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,c=mt(on,n),d=w.useRef(null),u=Ne(t,d);return ro(),l.jsxs(l.Fragment,{children:[l.jsx(Ds,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:l.jsx(br,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Wl(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Fb,{titleId:c.titleId}),l.jsx(Ab,{contentRef:d,descriptionId:c.descriptionId})]})]})}),$l="DialogTitle",Nb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mt($l,n);return l.jsx(Ee.h2,{id:i.titleId,...r,ref:t})});Nb.displayName=$l;var tm="DialogDescription",jb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mt(tm,n);return l.jsx(Ee.p,{id:i.descriptionId,...r,ref:t})});jb.displayName=tm;var nm="DialogClose",kb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mt(nm,n);return l.jsx(Ee.button,{type:"button",...r,ref:t,onClick:ce(e.onClick,()=>i.onOpenChange(!1))})});kb.displayName=nm;function Wl(e){return e?"open":"closed"}var rm="DialogTitleWarning",[MS,sm]=h4(rm,{contentName:on,titleName:$l,docsSlug:"dialog"}),Fb=({titleId:e})=>{const t=sm(rm),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
50
+
51
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
52
+
53
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Db="DialogDescriptionWarning",Ab=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sm(Db).contentName}}.`;return w.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Hb=Qh,Tb=Zh,Pb=Jh,Ib=Rh,lr='[cmdk-group=""]',Ul='[cmdk-group-items=""]',Ob='[cmdk-group-heading=""]',lm='[cmdk-item=""]',im=`${lm}:not([aria-disabled="true"])`,Gl="cmdk-item-select",Tn="data-value",Lb=(e,t,n)=>mb(e,t,n),om=w.createContext(void 0),ir=()=>w.useContext(om),am=w.createContext(void 0),Kl=()=>w.useContext(am),cm=w.createContext(void 0),dm=w.forwardRef((e,t)=>{let n=Pn(()=>{var j,V;return{search:"",value:(V=(j=e.value)!=null?j:e.defaultValue)!=null?V:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Pn(()=>new Set),i=Pn(()=>new Map),o=Pn(()=>new Map),a=Pn(()=>new Set),c=um(e),{label:d,children:u,value:h,onValueChange:m,filter:v,shouldFilter:f,loop:p,disablePointerSelection:x=!1,vimBindings:g=!0,...b}=e,y=$e(),S=$e(),z=$e(),N=w.useRef(null),E=Yb();an(()=>{if(h!==void 0){let j=h.trim();n.current.value=j,C.emit()}},[h]),an(()=>{E(6,G)},[]);let C=w.useMemo(()=>({subscribe:j=>(a.current.add(j),()=>a.current.delete(j)),snapshot:()=>n.current,setState:(j,V,L)=>{var $,se,ne,de;if(!Object.is(n.current[j],V)){if(n.current[j]=V,j==="search")U(),A(),E(1,_);else if(j==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let pe=document.getElementById(z);pe?pe.focus():($=document.getElementById(y))==null||$.focus()}if(E(7,()=>{var pe;n.current.selectedItemId=(pe=Y())==null?void 0:pe.id,C.emit()}),L||E(5,G),((se=c.current)==null?void 0:se.value)!==void 0){let pe=V??"";(de=(ne=c.current).onValueChange)==null||de.call(ne,pe);return}}C.emit()}},emit:()=>{a.current.forEach(j=>j())}}),[]),M=w.useMemo(()=>({value:(j,V,L)=>{var $;V!==(($=o.current.get(j))==null?void 0:$.value)&&(o.current.set(j,{value:V,keywords:L}),n.current.filtered.items.set(j,D(V,L)),E(2,()=>{A(),C.emit()}))},item:(j,V)=>(r.current.add(j),V&&(i.current.has(V)?i.current.get(V).add(j):i.current.set(V,new Set([j]))),E(3,()=>{U(),A(),n.current.value||_(),C.emit()}),()=>{o.current.delete(j),r.current.delete(j),n.current.filtered.items.delete(j);let L=Y();E(4,()=>{U(),L?.getAttribute("id")===j&&_(),C.emit()})}),group:j=>(i.current.has(j)||i.current.set(j,new Set),()=>{o.current.delete(j),i.current.delete(j)}),filter:()=>c.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:y,inputId:z,labelId:S,listInnerRef:N}),[]);function D(j,V){var L,$;let se=($=(L=c.current)==null?void 0:L.filter)!=null?$:Lb;return j?se(j,n.current.search,V):0}function A(){if(!n.current.search||c.current.shouldFilter===!1)return;let j=n.current.filtered.items,V=[];n.current.filtered.groups.forEach($=>{let se=i.current.get($),ne=0;se.forEach(de=>{let pe=j.get(de);ne=Math.max(pe,ne)}),V.push([$,ne])});let L=N.current;te().sort(($,se)=>{var ne,de;let pe=$.getAttribute("id"),we=se.getAttribute("id");return((ne=j.get(we))!=null?ne:0)-((de=j.get(pe))!=null?de:0)}).forEach($=>{let se=$.closest(Ul);se?se.appendChild($.parentElement===se?$:$.closest(`${Ul} > *`)):L.appendChild($.parentElement===L?$:$.closest(`${Ul} > *`))}),V.sort(($,se)=>se[1]-$[1]).forEach($=>{var se;let ne=(se=N.current)==null?void 0:se.querySelector(`${lr}[${Tn}="${encodeURIComponent($[0])}"]`);ne?.parentElement.appendChild(ne)})}function _(){let j=te().find(L=>L.getAttribute("aria-disabled")!=="true"),V=j?.getAttribute(Tn);C.setState("value",V||void 0)}function U(){var j,V,L,$;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let se=0;for(let ne of r.current){let de=(V=(j=o.current.get(ne))==null?void 0:j.value)!=null?V:"",pe=($=(L=o.current.get(ne))==null?void 0:L.keywords)!=null?$:[],we=D(de,pe);n.current.filtered.items.set(ne,we),we>0&&se++}for(let[ne,de]of i.current)for(let pe of de)if(n.current.filtered.items.get(pe)>0){n.current.filtered.groups.add(ne);break}n.current.filtered.count=se}function G(){var j,V,L;let $=Y();$&&(((j=$.parentElement)==null?void 0:j.firstChild)===$&&((L=(V=$.closest(lr))==null?void 0:V.querySelector(Ob))==null||L.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function Y(){var j;return(j=N.current)==null?void 0:j.querySelector(`${lm}[aria-selected="true"]`)}function te(){var j;return Array.from(((j=N.current)==null?void 0:j.querySelectorAll(im))||[])}function Z(j){let V=te()[j];V&&C.setState("value",V.getAttribute(Tn))}function P(j){var V;let L=Y(),$=te(),se=$.findIndex(de=>de===L),ne=$[se+j];(V=c.current)!=null&&V.loop&&(ne=se+j<0?$[$.length-1]:se+j===$.length?$[0]:$[se+j]),ne&&C.setState("value",ne.getAttribute(Tn))}function W(j){let V=Y(),L=V?.closest(lr),$;for(;L&&!$;)L=j>0?qb(L,lr):Qb(L,lr),$=L?.querySelector(im);$?C.setState("value",$.getAttribute(Tn)):P(j)}let I=()=>Z(te().length-1),X=j=>{j.preventDefault(),j.metaKey?I():j.altKey?W(1):P(1)},T=j=>{j.preventDefault(),j.metaKey?Z(0):j.altKey?W(-1):P(-1)};return w.createElement(Ee.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:j=>{var V;(V=b.onKeyDown)==null||V.call(b,j);let L=j.nativeEvent.isComposing||j.keyCode===229;if(!(j.defaultPrevented||L))switch(j.key){case"n":case"j":{g&&j.ctrlKey&&X(j);break}case"ArrowDown":{X(j);break}case"p":case"k":{g&&j.ctrlKey&&T(j);break}case"ArrowUp":{T(j);break}case"Home":{j.preventDefault(),Z(0);break}case"End":{j.preventDefault(),I();break}case"Enter":{j.preventDefault();let $=Y();if($){let se=new Event(Gl);$.dispatchEvent(se)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:Zb},d),as(e,j=>w.createElement(am.Provider,{value:C},w.createElement(om.Provider,{value:M},j))))}),_b=w.forwardRef((e,t)=>{var n,r;let i=$e(),o=w.useRef(null),a=w.useContext(cm),c=ir(),d=um(e),u=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;an(()=>{if(!u)return c.item(i,a?.id)},[u]);let h=hm(i,o,[e.value,e.children,o],e.keywords),m=Kl(),v=Qt(E=>E.value&&E.value===h.current),f=Qt(E=>u||c.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);w.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(Gl,p),()=>E.removeEventListener(Gl,p)},[f,e.onSelect,e.disabled]);function p(){var E,C;x(),(C=(E=d.current).onSelect)==null||C.call(E,h.current)}function x(){m.setState("value",h.current,!0)}if(!f)return null;let{disabled:g,value:b,onSelect:y,forceMount:S,keywords:z,...N}=e;return w.createElement(Ee.div,{ref:Ye(o,t),...N,id:i,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!v,"data-disabled":!!g,"data-selected":!!v,onPointerMove:g||c.getDisablePointerSelection()?void 0:x,onClick:g?void 0:p},e.children)}),Vb=w.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=$e(),c=w.useRef(null),d=w.useRef(null),u=$e(),h=ir(),m=Qt(f=>i||h.filter()===!1?!0:f.search?f.filtered.groups.has(a):!0);an(()=>h.group(a),[]),hm(a,c,[e.value,e.heading,d]);let v=w.useMemo(()=>({id:a,forceMount:i}),[i]);return w.createElement(Ee.div,{ref:Ye(c,t),...o,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&w.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),as(e,f=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},w.createElement(cm.Provider,{value:v},f))))}),Bb=w.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=w.useRef(null),o=Qt(a=>!a.search);return!n&&!o?null:w.createElement(Ee.div,{ref:Ye(i,t),...r,"cmdk-separator":"",role:"separator"})}),$b=w.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=Kl(),a=Qt(u=>u.search),c=Qt(u=>u.selectedItemId),d=ir();return w.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),w.createElement(Ee.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":c,id:d.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||o.setState("search",u.target.value),n?.(u.target.value)}})}),Wb=w.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=w.useRef(null),a=w.useRef(null),c=Qt(u=>u.selectedItemId),d=ir();return w.useEffect(()=>{if(a.current&&o.current){let u=a.current,h=o.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let f=u.offsetHeight;h.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return v.observe(u),()=>{cancelAnimationFrame(m),v.unobserve(u)}}},[]),w.createElement(Ee.div,{ref:Ye(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:d.listId},as(e,u=>w.createElement("div",{ref:Ye(a,d.listInnerRef),"cmdk-list-sizer":""},u)))}),Ub=w.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...c}=e;return w.createElement(Hb,{open:n,onOpenChange:r},w.createElement(Tb,{container:a},w.createElement(Pb,{"cmdk-overlay":"",className:i}),w.createElement(Ib,{"aria-label":e.label,"cmdk-dialog":"",className:o},w.createElement(dm,{ref:t,...c}))))}),Gb=w.forwardRef((e,t)=>Qt(n=>n.filtered.count===0)?w.createElement(Ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Kb=w.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return w.createElement(Ee.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},as(e,a=>w.createElement("div",{"aria-hidden":!0},a)))}),Qe=Object.assign(dm,{List:Wb,Item:_b,Input:$b,Group:Vb,Separator:Bb,Dialog:Ub,Empty:Gb,Loading:Kb});function qb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Qb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function um(e){let t=w.useRef(e);return an(()=>{t.current=e}),t}var an=typeof window>"u"?w.useEffect:w.useLayoutEffect;function Pn(e){let t=w.useRef();return t.current===void 0&&(t.current=e()),t}function Qt(e){let t=Kl(),n=()=>e(t.snapshot());return w.useSyncExternalStore(t.subscribe,n,n)}function hm(e,t,n,r=[]){let i=w.useRef(),o=ir();return an(()=>{var a;let c=(()=>{var u;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(u=h.current.textContent)==null?void 0:u.trim():i.current}})(),d=r.map(u=>u.trim());o.value(e,c,d),(a=t.current)==null||a.setAttribute(Tn,c),i.current=c}),i}var Yb=()=>{let[e,t]=w.useState(),n=Pn(()=>new Map);return an(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function Xb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function as({asChild:e,children:t},n){return e&&w.isValidElement(t)?w.cloneElement(Xb(t),{ref:t.ref},n(t.props.children)):n(t)}var Zb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ql=w.forwardRef(({className:e,...t},n)=>l.jsx(Qe,{ref:n,className:H("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ql.displayName=Qe.displayName;const mm=w.forwardRef(({className:e,...t},n)=>l.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[l.jsx(O.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),l.jsx(Qe.Input,{ref:n,className:H("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));mm.displayName=Qe.Input.displayName;const Ql=w.forwardRef(({className:e,...t},n)=>l.jsx(Qe.List,{ref:n,className:H("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ql.displayName=Qe.List.displayName;const Yl=w.forwardRef((e,t)=>l.jsx(Qe.Empty,{ref:t,className:"py-6 text-center text-sm text-muted-foreground",...e}));Yl.displayName=Qe.Empty.displayName;const fm=w.forwardRef(({className:e,...t},n)=>l.jsx(Qe.Group,{ref:n,className:H("overflow-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",e),...t}));fm.displayName=Qe.Group.displayName;const pm=w.forwardRef(({className:e,...t},n)=>l.jsx(Qe.Separator,{ref:n,className:H("-mx-1 h-px bg-border",e),...t}));pm.displayName=Qe.Separator.displayName;const Xl=w.forwardRef(({className:e,...t},n)=>l.jsx(Qe.Item,{ref:n,className:H("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-[selected='true']:bg-accent aria-[selected='true']:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",e),...t}));Xl.displayName=Qe.Item.displayName;const gm=({className:e,...t})=>l.jsx("span",{className:H("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});gm.displayName="CommandShortcut";const vm=({value:e,onChange:t,options:n=[],placeholder:r="Select option...",className:i,onBlur:o})=>{const[a,c]=s.useState(!1),[d,u]=s.useState(""),h=s.useMemo(()=>{if(!d)return n;const p=d.toLowerCase();return n.filter(x=>x.label.toLowerCase().includes(p)||x.value.toLowerCase().includes(p))},[n,d]),[m,v]=s.useState(null),f=Zt.useVirtualizer({count:h.length,getScrollElement:()=>m,estimateSize:()=>35,overscan:5});return l.jsxs(Kt,{open:a,onOpenChange:c,children:[l.jsx(qt,{asChild:!0,children:l.jsxs(J,{variant:"outline",role:"combobox","aria-expanded":a,className:H("w-full justify-between h-8 px-2 font-normal text-xs",i),children:[l.jsx("span",{className:"truncate",children:e?n.find(p=>p.value===e)?.label||e:r}),l.jsx(O.ChevronsUpDown,{className:"ml-2 h-3 w-3 shrink-0 opacity-50"})]})}),l.jsx(Tt,{className:"w-[var(--radix-popover-trigger-width)] p-0 max-h-[400px] overflow-hidden",align:"start",side:"bottom",collisionPadding:10,children:l.jsxs(ql,{shouldFilter:!1,className:"h-full",children:[l.jsxs("div",{className:"flex items-center border-b px-3",children:[l.jsx(O.Search,{className:"mr-2 h-3.5 w-3.5 shrink-0 opacity-50"}),l.jsx("input",{className:"flex h-9 w-full rounded-md bg-transparent py-3 text-xs outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 text-zinc-950 dark:text-zinc-50",placeholder:"Type to search...",value:d,onChange:p=>u(p.target.value)})]}),l.jsxs(Ql,{ref:v,className:"max-h-[300px] overflow-y-auto",style:{maxHeight:"300px"},children:[h.length===0&&l.jsx(Yl,{children:"No option found."}),l.jsx("div",{style:{height:`${f.getTotalSize()}px`,width:"100%",position:"relative"},children:f.getVirtualItems().map(p=>{const x=h[p.index];return l.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${p.size}px`,transform:`translateY(${p.start}px)`},children:l.jsxs(Xl,{value:x.value,onSelect:g=>{t(g===e?"":g),c(!1),u("")},className:"flex items-center justify-between text-xs py-1.5",children:[l.jsx("span",{className:"truncate",children:x.label}),l.jsx(O.Check,{className:H("h-3 w-3",e===x.value?"opacity-100":"opacity-0")})]})},p.key)})})]})]})})]})},Zl=({value:e,options:t=[],className:n,table:r})=>{if(e==null)return l.jsx("span",{className:"text-muted-foreground text-xs italic",children:"—"});const i=Array.isArray(e)?e:[e];if(i.length===0)return l.jsx("span",{className:"text-muted-foreground text-xs italic",children:"—"});const o=i.map(c=>t.find(u=>u.value===c)||{value:c,label:c,color:"default"}),a=c=>{switch(c){case"success":return{container:"bg-emerald-100 text-emerald-950 border-emerald-300 dark:bg-emerald-500/90 dark:text-emerald-50 dark:border-emerald-400/50",dot:"bg-emerald-600 dark:bg-emerald-200"};case"danger":case"destructive":return{container:"bg-rose-100 text-rose-950 border-rose-300 dark:bg-rose-500/90 dark:text-rose-50 dark:border-rose-400/50",dot:"bg-rose-600 dark:bg-rose-200"};case"warning":return{container:"bg-amber-100 text-amber-950 border-amber-300 dark:bg-amber-500/90 dark:text-amber-50 dark:border-amber-400/50",dot:"bg-amber-600 dark:bg-amber-200"};case"primary":case"info":return{container:"bg-blue-100 text-blue-950 border-blue-300 dark:bg-blue-500/90 dark:text-blue-50 dark:border-blue-400/50",dot:"bg-blue-600 dark:bg-blue-200"};default:return{container:"bg-slate-100 text-slate-950 border-slate-300 dark:bg-slate-500/90 dark:text-slate-50 dark:border-slate-400/50",dot:"bg-slate-600 dark:bg-slate-200"}}};return l.jsx("div",{className:H("inline-flex items-center gap-1.5 flex-wrap py-1",n),children:o.map((c,d)=>{const u=a(c.color);return l.jsxs("div",{className:H("inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[11px] font-bold border transition-all duration-300 shadow-sm",u.container),children:[l.jsx("span",{className:H("w-1.5 h-1.5 rounded-full",u.dot)}),r?.options.meta?.enableSearchHighlighting?l.jsx(Hl,{text:c.label,highlight:typeof r.getState().globalFilter=="string"?r.getState().globalFilter:r.getState().globalFilter?.quickSearch}):c.label]},`${c.value}-${d}`)})})},Jl=({value:e,onChange:t,options:n=[],variant:r="dropdown",onBlur:i,className:o,placeholder:a="Select...",isFocused:c})=>{const[d,u]=s.useState(!1),h=s.useRef(!1);s.useEffect(()=>{c&&r==="dropdown"?h.current||(u(!0),h.current=!0):(u(!1),h.current=!1)},[c,r]);const m=v=>{["Enter"," ","ArrowUp","ArrowDown"].includes(v.key)&&v.stopPropagation()};return r==="combobox"?l.jsx("div",{className:H("w-full",o),children:l.jsx(vm,{value:e,onChange:t,options:n,placeholder:a,onBlur:i})}):r==="radio"?l.jsx("div",{className:H("w-full px-2 py-1",o),onBlur:i,children:l.jsx(ls,{value:e||"",onValueChange:t,children:n.map(v=>l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(sr,{value:v.value,id:`radio-${v.value}`}),l.jsx(ze,{htmlFor:`radio-${v.value}`,className:"text-xs font-medium cursor-pointer",children:v.label})]},v.value))})}):l.jsx("div",{className:H("w-full -m-1 p-0.5",o),onBlur:i,onKeyDown:m,children:l.jsxs(rt,{value:e,onValueChange:t,open:d,onOpenChange:u,children:[l.jsx(st,{className:"h-7 py-0 border-0 shadow-none bg-transparent focus:ring-0 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:outline-none",children:l.jsx(lt,{placeholder:a})}),l.jsx(it,{children:n.map(v=>l.jsx(Ae,{value:v.value,children:v.label},v.value))})]})})},xm=({options:e=[],selectedValues:t=[],onChange:n,className:r})=>{const i=a=>{t.includes(a)?n(t.filter(c=>c!==a)):n([...t,a])},o=()=>{t.length===e.length?n([]):n(e.map(a=>a.value))};return l.jsxs("div",{className:H("flex flex-col gap-2 p-2 min-w-[180px]",r),children:[l.jsxs("div",{className:"flex items-center justify-between border-b pb-2 mb-1",children:[l.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Filter Options"}),l.jsx("button",{onClick:o,className:"text-[10px] font-medium text-primary hover:underline",children:t.length===e.length?"Clear All":"Select All"})]}),l.jsx("div",{className:"max-h-[180px] overflow-y-auto",children:l.jsx("div",{className:"flex flex-col gap-2 pr-2",children:e.map(a=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(qe,{id:`filter-${a.value}`,checked:t.includes(a.value),onCheckedChange:()=>i(a.value)}),l.jsx(ze,{htmlFor:`filter-${a.value}`,className:"text-sm font-normal cursor-pointer flex-1",children:a.label})]},a.value))})})]})},Rl=({value:e,showLabel:t=!0,color:n="default",size:r="md",className:i})=>{const o=Math.max(0,Math.min(100,e)),a=()=>{switch(n){case"success":return"bg-emerald-500 dark:bg-emerald-600";case"warning":return"bg-amber-500 dark:bg-amber-600";case"danger":return"bg-rose-500 dark:bg-rose-600";case"info":return"bg-blue-500 dark:bg-blue-600";default:return"bg-primary"}},c=()=>{switch(r){case"sm":return"h-1.5";case"lg":return"h-3";default:return"h-2"}};return l.jsxs("div",{className:H("flex items-center gap-2 w-full",i),children:[l.jsx("div",{className:"flex-1 bg-muted rounded-full overflow-hidden min-w-[60px]",children:l.jsx("div",{className:H("transition-all duration-300 rounded-full",c(),a()),style:{width:`${o}%`}})}),t&&l.jsxs("span",{className:"text-xs font-medium text-muted-foreground tabular-nums min-w-[42px] text-right",children:[o.toFixed(0),"%"]})]})},ei=({value:e,values:t,color:n="default",height:r=32,width:i=100,showDots:o=!1,className:a})=>{const c=e||t||[],d=s.useMemo(()=>{if(!c||c.length===0)return"";const v=Math.max(...c),f=Math.min(...c),p=v-f||1;return`M ${c.map((g,b)=>{const y=b/(c.length-1)*i,S=r-(g-f)/p*r;return`${y},${S}`}).join(" L ")}`},[c,r,i]),u=s.useMemo(()=>{if(!c||c.length===0||!o)return[];const v=Math.max(...c),f=Math.min(...c),p=v-f||1;return c.map((x,g)=>({x:g/(c.length-1)*i,y:r-(x-f)/p*r}))},[c,r,i,o]),h=()=>{switch(n){case"success":return"stroke-emerald-500 dark:stroke-emerald-400";case"warning":return"stroke-amber-500 dark:stroke-amber-400";case"danger":return"stroke-rose-500 dark:stroke-rose-400";case"info":return"stroke-blue-500 dark:stroke-blue-400";default:return"stroke-primary"}},m=()=>{switch(n){case"success":return"fill-emerald-500 dark:fill-emerald-400";case"warning":return"fill-amber-500 dark:fill-amber-400";case"danger":return"fill-rose-500 dark:fill-rose-400";case"info":return"fill-blue-500 dark:fill-blue-400";default:return"fill-primary"}};return!c||c.length===0?l.jsx("div",{className:"text-muted-foreground text-xs italic",children:"No data"}):l.jsxs("svg",{width:i,height:r,className:H("inline-block",a),viewBox:`0 0 ${i} ${r}`,children:[l.jsx("path",{d,fill:"none",className:H("transition-colors",h()),strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o&&u.map((v,f)=>l.jsx("circle",{cx:v.x,cy:v.y,r:"2",className:H("transition-colors",m())},f))]})},Jb={renderers:{text:{Cell:An,Editor:Hn},number:{Cell:An,Editor:Hn},date:{Cell:An,Editor:Hn},datetime:{Cell:An,Editor:Hn},longtext:{Cell:An,Editor:Hn},boolean:{Cell:Nh,Editor:jh},select:{Cell:Zl,Editor:Jl},multiselect:{Cell:Zl,Editor:Jl},progress:{Cell:Rl},sparkline:{Cell:ei},chart:{Cell:e=>{const t=e.value;return Array.isArray(t)?s.createElement(ei,{values:t,...e}):s.createElement(Rl,{value:t,...e})}}}},Rb=s.createContext(Jb),eE=()=>s.useContext(Rb),tE=({getValue:e,row:t,column:n,table:r})=>{const{renderers:i}=eE(),o=e(),[a,c]=s.useState(o),d=n.columnDef.meta,u=d?.columnType||"text",h=r.options.meta?.isRowEditable?r.options.meta.isRowEditable(t.original):!0,m=r.options.meta?.isCellEditable?r.options.meta.isCellEditable(t.original,n.id):!0,v=n.columnDef.enableEditing!==!1,f=r.options.meta?.enableEditing||!1,p=r.options.meta?.editingRows?.[t.index]||!1,x=f&&p&&h&&m&&v;s.useEffect(()=>{c(o)},[o]);const g=()=>{r.options.meta?.updateData(t.index,n.id,a)},b=E=>{c(E),(u==="boolean"||u==="select")&&r.options.meta?.updateData(t.index,n.id,E)},y=s.useMemo(()=>({getValue:e,row:t,column:n,enableEditing:r.options.meta?.enableEditing,isCellEditable:r.options.meta?.isCellEditable,value:a,onChange:b,onBlur:g,columnType:u,meta:d,isFocused:r.options.meta?.focusedCell?.r===t.index&&r.options.meta?.focusedCell?.c===r.getVisibleLeafColumns().findIndex(E=>E.id===n.id)}),[e,t,n,a,u,d,b,g,r.options.meta?.focusedCell,r.getVisibleLeafColumns]);if(x){if(d?.Editor){const C=d.Editor;return l.jsx(C,{...y})}const E=i[u];if(E?.Editor){const C=E.Editor,M={...u==="boolean"?d?.booleanOptions:{},...u==="select"?d?.selectOptions:{}};return l.jsx(C,{...y,...M})}}if(d?.Cell){const E=d.Cell;return l.jsx(E,{...y})}const z=(i[u]||i.text).Cell,N={...u==="boolean"?d?.booleanOptions:{},...u==="longtext"?d?.longTextOptions:{},...u==="number"?d?.numberOptions:{},...u==="date"?d?.dateOptions:{},...u==="datetime"?d?.dateTimeOptions:{},...u==="select"?d?.selectOptions:{},...u==="progress"||u==="chart"||u==="sparkline"?d?.chartOptions:{}};return l.jsx(z,{...y,...N})},ft=(e,t)=>typeof e=="function"?e(t):e,nE=(e,t)=>{const{columns:n,rowCount:r,pageCount:i,pagination:o,pageSize:a=10,enableRowSelection:c,selectionSettings:d,enableGrouping:u,enableRowPinning:h,enableColumnPinning:m,enableTreeData:v,getSubRows:f,manualPagination:p,manualSorting:x,manualFiltering:g,enablePersistence:b,persistenceKey:y,defaultGrouping:S=[],getRowId:z}=e,N=!!e.service||!!e.serviceName,{state:E,setState:C}=Kr({initialState:{sorting:[],columnFilters:[],globalFilter:"",columnSizing:{},rowSelection:{},grouping:S,expanded:{},rowPinning:{top:[],bottom:[]},pagination:{pageIndex:0,pageSize:a},columnPinning:{left:[],right:[]},columnVisibility:{}},persistenceKey:b?y:void 0}),M=s.useRef({}),D=T=>{C(j=>{const V=ft(T,j.sorting);return setTimeout(()=>{e.onSortingChange?.(V),e.onSort?.({columns:V.map(L=>({field:L.id,direction:L.desc?"desc":"asc"}))})},0),{...j,sorting:V}})},A=T=>{C(j=>{const V=ft(T,j.pagination);return setTimeout(()=>{e.onPaginationChange?.(V),e.onPageChange?.({currentPage:V.pageIndex+1,pageSize:V.pageSize})},0),{...j,pagination:V}})},_=T=>{C(j=>{const V=ft(T,j.rowSelection),L=M.current,$=Object.keys(L).filter(pe=>L[pe]),se=Object.keys(V).filter(pe=>V[pe]),ne=se.filter(pe=>!$.includes(pe)),de=$.filter(pe=>!se.includes(pe));return setTimeout(()=>{e.onRowSelectionChange?.(V),ne.forEach(pe=>{const we=parseInt(pe);!isNaN(we)&&t[we]&&e.onRowSelect?.({data:t[we],rowIndex:we})}),de.forEach(pe=>{const we=parseInt(pe);!isNaN(we)&&t[we]&&e.onRowDeselect?.({data:t[we],rowIndex:we})})},0),M.current=V,{...j,rowSelection:V}})},U=T=>C(j=>({...j,columnFilters:ft(T,j.columnFilters)})),G=T=>C(j=>({...j,globalFilter:ft(T,j.globalFilter)})),Y=T=>C(j=>({...j,columnSizing:ft(T,j.columnSizing)})),te=T=>C(j=>({...j,grouping:ft(T,j.grouping)})),Z=T=>C(j=>({...j,expanded:ft(T,j.expanded)})),P=T=>C(j=>({...j,rowPinning:ft(T,j.rowPinning)})),W=T=>C(j=>({...j,columnPinning:ft(T,j.columnPinning)})),I=T=>C(j=>({...j,columnVisibility:ft(T,j.columnVisibility)}));return{table:Ge.useReactTable({data:t,columns:n,getRowId:z,rowCount:r,pageCount:i,state:s.useMemo(()=>({sorting:E.sorting,columnFilters:E.columnFilters,globalFilter:E.globalFilter,columnSizing:E.columnSizing,rowSelection:E.rowSelection,pagination:E.pagination,grouping:E.grouping,expanded:E.expanded,rowPinning:E.rowPinning,columnPinning:E.columnPinning,columnVisibility:E.columnVisibility,...e.state}),[E,e.state]),onSortingChange:D,onColumnFiltersChange:U,onGlobalFilterChange:G,onColumnSizingChange:Y,onRowSelectionChange:_,onPaginationChange:A,onGroupingChange:te,onExpandedChange:Z,onRowPinningChange:P,onColumnPinningChange:W,onColumnVisibilityChange:I,globalFilterFn:vw,defaultColumn:{cell:tE,filterFn:xw},manualPagination:N||p,manualSorting:N||x,manualFiltering:N||g,enableRowSelection:d?!0:c,enableMultiRowSelection:d?d.type==="Multiple":!0,enableGrouping:u,enableSorting:!0,enableRowPinning:h,enableColumnPinning:m,columnResizeMode:"onChange",enableColumnResizing:!0,aggregationFns:{uniqueCount:(T,j)=>new Set(j.map(V=>V.getValue(T))).size},getSubRows:v?f:void 0,getCoreRowModel:Ge.getCoreRowModel(),getSortedRowModel:Ge.getSortedRowModel(),getFilteredRowModel:Ge.getFilteredRowModel(),getPaginationRowModel:o?Ge.getPaginationRowModel():void 0,getGroupedRowModel:u?Ge.getGroupedRowModel():void 0,getExpandedRowModel:u||v?Ge.getExpandedRowModel():void 0,getFacetedUniqueValues:Ge.getFacetedUniqueValues(),getFacetedMinMaxValues:Ge.getFacetedMinMaxValues(),meta:{}}),states:{sorting:E.sorting,setSorting:D,columnFilters:E.columnFilters,setColumnFilters:U,globalFilter:E.globalFilter,setGlobalFilter:G,rowSelection:E.rowSelection,setRowSelection:_,paginationState:E.pagination,setPaginationState:A,grouping:E.grouping,setGrouping:te,expanded:E.expanded,setExpanded:Z,rowPinning:E.rowPinning,setRowPinning:P,columnPinning:E.columnPinning,setColumnPinning:W,columnVisibility:E.columnVisibility,setColumnVisibility:I}}},rE=(e,t,n="ltr")=>{const{density:r="standard",rowHeight:i,estimatedRowHeight:o,enableColumnVirtualization:a=!1}=e,{rows:c}=t.getRowModel(),d=s.useMemo(()=>{if(i)return i;if(o)return o;switch(r){case"compact":return 41;case"comfortable":return 89;default:return 65}},[i,o,r]),u=s.useMemo(()=>{switch(r){case"compact":return 40;case"comfortable":return 56;default:return 48}},[r]),h=fl({rowCount:c.length,rowHeight:d,overscanCount:e.overscanCount??30,columnCount:a?t.getVisibleLeafColumns().length:0,columnWidth:b=>t.getVisibleLeafColumns()[b].getSize(),enableColumnVirtualization:a,progressiveRendering:e.progressiveRendering??!1,prefetchDistance:e.prefetchDistance??10,adaptiveSizing:e.adaptiveSizing,id:e.id,debug:!1,languageDirection:n,scrollPaddingStart:e.enableStickyHeader?e.scrollPaddingStart??u:e.scrollPaddingStart??0,scrollMargin:0}),{parentRef:m,rowVirtualizer:v,columnVirtualizer:f,scrollToIndex:p,scrollToRow:x,scrollToColumn:g}=h;return{parentRef:m,rowVirtualizer:v,columnVirtualizer:f,scrollToIndex:p,scrollToRow:x,scrollToColumn:g,effectiveRowHeight:d}},sE=(e,t)=>{const{enableRangeSelection:n=!1}=e,{rows:r}=t.getRowModel(),[i,o]=s.useState(null),[a,c]=s.useState(!1),d=s.useCallback((m,v)=>{n&&(c(!0),o({start:{r:m,c:v},end:{r:m,c:v}}))},[n]),u=s.useCallback((m,v)=>{!n||!a||o(f=>f?{...f,end:{r:m,c:v}}:null)},[n,a]);s.useEffect(()=>{if(!n)return;const m=()=>c(!1);return window.addEventListener("mouseup",m),()=>window.removeEventListener("mouseup",m)},[n]);const h=s.useCallback((m,v)=>{const f={},[p,x]=[Math.min(m,v),Math.max(m,v)];for(let g=p;g<=x;g++){const b=r[g];b&&(f[b.id]=!0)}t.setRowSelection(g=>({...g,...f}))},[r,t]);return{rangeSelection:i,onCellMouseDown:d,onCellMouseEnter:u,selectRowByRange:h,isSelecting:a}},lE=(e,t)=>{const[n,r]=s.useTransition(),i=s.useCallback(a=>{r(()=>{t.setColumnFilters(c=>{const d=typeof a=="function"?a(c):a;return setTimeout(()=>{e.onColumnFiltersChange?.(d);const u=d.map(h=>({id:h.id,field:h.id,operator:"contains",value:h.value}));e.onFilter?.({columns:u})},0),d})})},[t,e.onColumnFiltersChange,e.onFilter]),o=s.useCallback(a=>{r(()=>{t.setGlobalFilter(c=>{const d=typeof a=="function"?a(c):a;return setTimeout(()=>{e.onGlobalFilterChange?.(d),typeof d=="string"&&e.onSearch?.(d)},0),d})})},[t,e.onGlobalFilterChange,e.onSearch]);return{isFiltering:n,handleColumnFiltersChange:i,handleGlobalFilterChange:o,setFilterModel:t.setColumnFilters,setGlobalFilter:t.setGlobalFilter}},iE=(e,t,n,r)=>({getData:e,addRecord:t,updateRecord:n,deleteRecord:r}),wm=(e,t)=>({showSpinner:e,hideSpinner:t}),bm=(e,t)=>{const n={refresh:e};return t&&(n.forceUpdate=t),n},oE=(e,t,n,r,i,o)=>{const a={selectRow:e,selectRows:t,clearSelection:n,selectAll:r,getSelectedRecords:i};return o&&(a.selectRowByRange=o),a},Em=(e,t)=>{const n={scrollToIndex:e};return t&&(n.goToPage=t),n},ym=(e,t,n)=>{const r={};return e&&(r.exportDataAsCsv=e),t&&(r.exportToExcel=t),n&&(r.print=n),r},aE=(e,t,n,r,i,o={})=>{const{rows:a}=t.getRowModel(),c=s.useMemo(()=>{const d=bm(r.refresh,r.forceUpdate),u=wm(r.showSpinner,r.hideSpinner),h=oE(f=>{const p=typeof f=="string"?parseInt(f):f,x=a[p];x?.getCanSelect()&&x.toggleSelected(!0)},f=>{const p={};f.forEach(x=>{const g=typeof x=="string"?parseInt(x):x,b=a[g];b&&(p[b.id]=!0)}),t.setRowSelection(p)},()=>t.resetRowSelection(),()=>t.toggleAllRowsSelected(!0),()=>t.getSelectedRowModel().rows.map(f=>f.original),(f,p)=>{const x=typeof f=="string"?parseInt(f):f;r.scrollToIndex(x)}),m=Em(r.scrollToIndex,f=>t.setPageIndex(f)),v=ym(()=>e.onExportCSV?.(t),()=>e.onExportExcel?.(t),()=>{window.print()});return{...d,...u,getData:()=>n,setCellValue:(f,p,x)=>{const g=parseInt(f);isNaN(g)||r.performEdit(g,p,x)},setRowData:(f,p)=>{const x=parseInt(f);isNaN(x)||r.setData(g=>{const b=[...g];return b[x]={...b[x],...p},b})},addRecord:async f=>{const p=f||{},x=e.editSettings?.primaryKey,g=x?Array.isArray(x)?x[0]:x:"id";let b=p[g];if(b===void 0&&(b=`_temp_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,p[g]=b),r.service)try{const S=await r.addMutation.mutateAsync(p);oe.get("NotificationService")?.show({type:"success",message:"Row Added Successfully!",duration:3e3}),setTimeout(()=>{const N=S[g]||b;t.setRowSelection({[N]:!0});const E=n.findIndex(C=>C[g]===N);E!==-1&&(r.toggleRowEditing(E,!0),r.scrollToIndex(E))},100);return}catch(S){throw oe.get("NotificationService")?.show({type:"error",message:"Failed to Add Row",duration:3e3}),S}e.onDataChangeStart?.({action:"add",data:p}),e.onRowAddStart?.({data:p}),r.addRow(p,0),e.onDataChangeComplete?.({action:"add",data:p}),oe.get("NotificationService")?.show({type:"success",message:"Row Added Successfully!",duration:3e3}),setTimeout(()=>{t.resetRowSelection(),t.setRowSelection({[b]:!0}),r.toggleRowEditing(0,!0),r.scrollToIndex(0)},50)},updateRecord:async(f,p)=>{const x=typeof f=="number"?f:parseInt(f),g=e.editSettings?.primaryKey,b=g?Array.isArray(g)?g[0]:g:"id",y=n[x]?.[b];if(r.service&&y)try{await r.updateMutation.mutateAsync({id:y,updates:p}),oe.get("NotificationService")?.show({type:"success",message:"Row Updated Successfully!",duration:3e3});return}catch(S){throw oe.get("NotificationService")?.show({type:"error",message:"Failed to Update Row",duration:3e3}),S}e.onDataChangeStart?.({action:"edit",data:p}),r.setData(S=>{const z=[...S];return z[x]={...z[x],...p},oe.get("NotificationService")?.show({type:"success",message:"Row Updated Successfully!",duration:3e3}),z})},deleteRecord:async f=>{const p=typeof f=="number"?f:parseInt(f),x=n[p],g=e.editSettings?.primaryKey,b=g?Array.isArray(g)?g[0]:g:"id",y=x?.[b];if(r.service&&y)try{await r.deleteMutation.mutateAsync(y),oe.get("NotificationService")?.show({type:"success",message:"Row Deleted Successfully!",duration:3e3});return}catch(z){throw oe.get("NotificationService")?.show({type:"error",message:"Failed to Delete Row",duration:3e3}),z}e.onDataChangeStart?.({action:"delete",data:x}),r.deleteRows([p]),oe.get("NotificationService")?.show({type:"success",message:"Row Deleted Successfully!",duration:3e3})},deleteRecords:async f=>{if(r.service){const x=e.editSettings?.primaryKey,g=x?Array.isArray(x)?x[0]:x:"id";try{for(const y of f){const S=n[y]?.[g];S&&await r.deleteMutation.mutateAsync(S)}oe.get("NotificationService")?.show({type:"success",message:`${f.length} Rows Deleted Successfully!`,duration:3e3});return}catch(b){throw oe.get("NotificationService")?.show({type:"error",message:"Failed to Delete Rows",duration:3e3}),b}}e.onDataChangeStart?.({action:"delete",data:f.map(x=>n[x])}),r.deleteRows(f),oe.get("NotificationService")?.show({type:"success",message:`${f.length} Rows Deleted Successfully!`,duration:3e3})},getRowInfo:f=>{const p=typeof f=="number"?f:parseInt(f);return a[p]},editRecord:f=>{const p=typeof f=="number"?f:parseInt(f);r.toggleRowEditing(p,!0)},saveDataChanges:()=>{e.onDataChangeComplete?.({action:"edit",data:r.batchChanges.changedRecords}),oe.get("NotificationService")?.show({type:"success",message:"Changes Saved Successfully!",duration:3e3})},cancelDataChanges:()=>{r.resetData(),e.onDataChangeCancel?.({action:"edit"}),oe.get("NotificationService")?.show({type:"info",message:"Changes Discarded",duration:3e3})},getBatchChanges:()=>r.batchChanges,getChanges:()=>r.batchChanges,history:{changes:r.changes,batchChanges:r.batchChanges},...h,getSelectedRowIndexes:()=>Object.keys(t.getState().rowSelection).map(Number),clearRowSelection:()=>t.resetRowSelection(),...m,search:f=>t.setGlobalFilter(f),filterByColumn:(f,p,x)=>t.getColumn(f)?.setFilterValue({operator:p,value:x}),clearFilter:f=>f?t.getColumn(f)?.setFilterValue(void 0):t.resetColumnFilters(),sortByColumn:(f,p)=>t.setSorting([{id:f,desc:p==="desc"}]),clearSort:()=>t.resetSorting(),removeSortColumn:f=>t.setSorting(p=>p.filter(x=>x.id!==f)),getVisibleColumns:()=>t.getVisibleLeafColumns().map(f=>f.columnDef),getHiddenColumns:()=>t.getAllLeafColumns().filter(f=>!f.getIsVisible()).map(f=>f.columnDef),getColumnByField:f=>t.getColumn(f)?.columnDef||null,getColumns:()=>t.getAllLeafColumns().map(f=>f.columnDef),setColumnVisibility:f=>t.setColumnVisibility(f),copyToClipboard:async(f=!0)=>{if(!navigator?.clipboard)return;const p=t.getVisibleLeafColumns(),x=t.getRowModel().rows,g=f?p.map(y=>y.id).join(" ")+`
54
+ `:"",b=x.map(y=>p.map(S=>{const z=y.getValue(S.id);return z==null?"":String(z)}).join(" ")).join(`
55
+ `);try{await navigator.clipboard.writeText(g+b),oe.get("NotificationService")?.show({type:"success",message:"Copied to Clipboard!",duration:2e3})}catch(y){console.error("Failed to copy",y),oe.get("NotificationService")?.show({type:"error",message:"Failed to Copy",duration:3e3})}},autoFitColumns:()=>{t.getVisibleLeafColumns().forEach(f=>{r.autoFitColumn(f.id)})},expandAllGroups:()=>t.toggleAllRowsExpanded(!0),collapseAllGroups:()=>t.toggleAllRowsExpanded(!1),isRemote:()=>!!(e.manualPagination||e.onDataRequest),getDataModule:()=>({table:t,data:n}),setPagerMessage:f=>r.setPagerMessage(f),validateEditForm:()=>!0,getPrimaryKeyFieldNames:()=>{const f=e.editSettings?.primaryKey;return f?Array.isArray(f)?f:[f]:[]},...v,...o}},[e,t,n,a,r,o]);return qr(i,c),c},cE=[],dE=(e,t,n={})=>{const r=Rn(e),{api:i}=r,o=sn(),{dataSource:a,data:c,onRefresh:d,onDataRequest:u,onDataLoad:h,onError:m,enableEditing:v,isRowEditable:f,isCellEditable:p,pagination:x=!1,enableExport:g=!1,enableStickyHeader:b=!1,enableStickyPagination:y=!1,enableChangeTracking:S=!1,density:z="standard",dir:N}=e,E=tr("I18nService"),C=N==="auto"||!N?E?.dir||"ltr":N,M=a||c||cE,D=s.useMemo(()=>{const Se=e.editSettings?.primaryKey;return Se?Array.isArray(Se)?Se[0]:Se:"id"},[e.editSettings?.primaryKey]),{data:A,setData:_,performEdit:U,addRow:G,deleteRows:Y,undo:te,redo:Z,canUndo:P,canRedo:W,changes:I,batchChanges:X,resetData:T}=fw(M,D),[j,V]=s.useState(void 0),L=s.useMemo(()=>e.service?e.service:e.serviceName?oe.get(e.serviceName):null,[e.service,e.serviceName]),{table:$,states:se}=nE(e,A),ne=$.getState().pagination,de=$.getState().sorting,pe=$.getState().columnFilters,we=$.getState().globalFilter,Me=s.useMemo(()=>["table-data",e.serviceName||"local",ne.pageIndex,ne.pageSize,de,pe,we],[e.serviceName,ne,de,pe,we]),{data:ve,isLoading:Q,error:q}=oh({queryKey:Me,queryFn:async()=>L?L.getData({page:ne.pageIndex,pageSize:ne.pageSize,sorting:de,filters:pe,globalFilter:we?String(we):void 0}):{data:M,totalCount:M.length},enabled:!!L,placeholderData:{data:M,totalCount:M.length}}),me=ve?.data||M,ye=ve?.totalCount??M.length;s.useEffect(()=>{L&&me&&!I.added&&!I.edited&&!I.deleted&&_(me)},[me,L,_,I.added,I.edited,I.deleted]);const ke=Le({mutationFn:Se=>L.createRow(Se),onSuccess:()=>o.invalidateQueries({queryKey:Me})}),xe=Le({mutationFn:({id:Se,updates:xt})=>L.updateRow(Se,xt),onSuccess:()=>o.invalidateQueries({queryKey:Me})}),Ce=Le({mutationFn:Se=>L.deleteRow(Se),onSuccess:()=>o.invalidateQueries({queryKey:Me})}),[ee,re]=s.useState(!1),ae=Q||ee,{isFiltering:R,handleColumnFiltersChange:le,handleGlobalFilterChange:ie,setFilterModel:he,setGlobalFilter:ue}=lE(e,$),{parentRef:fe,rowVirtualizer:ge,columnVirtualizer:be,effectiveRowHeight:He}=rE(e,$,C),{rangeSelection:Te,onCellMouseDown:zt,onCellMouseEnter:ur}=sE(e,$),[Mt,_e]=s.useState(null),Fi=s.useCallback((Se,xt)=>{_e(Pt=>{if(!Pt)return{r:0,c:0};const It=$.getRowModel().rows.length,yS=Math.max(0,Math.min(It-1,Pt.r+Se)),CS=Math.max(0,Math.min($.getVisibleLeafColumns().length-1,Pt.c+xt));return{r:yS,c:CS}})},[$]),[_n,Ue]=s.useState({}),vt=s.useCallback((Se,xt)=>{const Pt=xt===!0||xt===void 0&&!_n[Se];Pt&&A[Se]&&e.onRowEditStart?.({row:$.getRowModel().rows[Se],data:A[Se]}),Ue(It=>Pt&&(e.editSettings?.mode==="Normal"||!e.editSettings?.mode)?{[String(Se)]:!0}:{...It,[Se]:xt!==void 0?xt:!It[Se]}),Pt&&_e(It=>({r:Se,c:It?.c??0}))},[A,_n,e.onRowEditStart,e.editSettings?.mode,$]),G3=s.useCallback((Se,xt,Pt)=>{if(!v)return;const It=A[Se];f&&!f(It)||p&&!p(It,xt)||U(Se,xt,Pt)},[v,U,A,f,p]),{autoFitColumn:K3}=pw($),bS=s.useCallback(async()=>{if(L)await o.invalidateQueries({queryKey:Me});else if(u){re(!0);try{u($.getState())}catch(Se){m&&m(Se)}finally{re(!1)}}$.reset(),d?.()},[u,$,d,m,L,o,Me]);s.useEffect(()=>{q&&m&&m(q)},[q,m]),s.useEffect(()=>{L&&ye!==void 0&&$.setOptions(Se=>({...Se,rowCount:ye}))},[ye,$,L]);const Xt=aE(e,$,A,{refresh:bS,setData:_,performEdit:U,showSpinner:()=>re(!0),hideSpinner:()=>re(!1),scrollToIndex:Se=>ge.scrollToIndex(Se,{align:"center"}),toggleRowEditing:vt,forceUpdate:()=>{re(Se=>!Se),setTimeout(()=>re(Se=>!Se),0)},resetData:T,setPagerMessage:V,batchChanges:X,changes:I,addRow:G,deleteRows:Y,setFocusedCell:_e,autoFitColumn:K3,addMutation:ke,updateMutation:xe,deleteMutation:Ce,service:L},t,n),ES=s.useMemo(()=>({updateData:G3,editingRows:_n,toggleRowEditing:vt,focusedCell:Mt,setFocusedCell:_e,navigateFocus:Fi,addRecord:Xt.addRecord,deleteRecord:Xt.deleteRecord,deleteRecords:Xt.deleteRecords,enableEditing:e.enableEditing&&(e.editSettings?.allowEditing??!0),isRowEditable:f,isCellEditable:p,enableSearchHighlighting:e.enableSearchHighlighting,selectionSettings:e.selectionSettings,editSettings:e.editSettings,classNames:e.classNames,icons:e.icons,slots:e.slots,slotProps:e.slotProps,localization:e.localization,dir:C}),[G3,_n,vt,Mt,Xt.addRecord,Xt.deleteRecord,Xt.deleteRecords,e.enableEditing,e.editSettings,f,p,e.enableSearchHighlighting,e.selectionSettings,e.editSettings,e.classNames,e.icons,e.slots,e.slotProps,e.localization]);return $.options.meta=ES,s.useEffect(()=>{h&&h(A)},[A,h]),N9({onRenderStart:e.onGridRenderStart,onRenderComplete:e.onGridRenderComplete}),s.useMemo(()=>({...i,...Xt,...se,parentRef:fe,rowVirtualizer:ge,columnVirtualizer:be,rows:$.getRowModel().rows,table:$,dir:C,paginationEnabled:x,exportEnabled:g,rangeSelection:Te,onCellMouseDown:zt,onCellMouseEnter:ur,enableStickyHeader:b,enableStickyPagination:y,enableChangeTracking:S,undo:te,redo:Z,canUndo:P,canRedo:W,changes:I,batchChanges:X,resetData:T,addRow:G,deleteRows:Y,toggleRowEditing:vt,enableEditing:v,density:z,isPending:R||e.isLoading||ae,autoFitColumn:K3,gridLines:e.gridLines,enableAltRow:e.enableAltRow,enableHover:e.enableHover,rowHeight:He,selectionSettings:e.selectionSettings,filterSettings:e.filterSettings,searchSettings:e.searchSettings,sortSettings:e.sortSettings,editSettings:e.editSettings,rowTemplate:e.rowTemplate,emptyRecordTemplate:e.emptyRecordTemplate,loadingTemplate:e.loadingTemplate,onRowClick:e.onRowClick,onRowDoubleClick:e.onRowDoubleClick,onCellFocus:e.onCellFocus,onToolbarItemClick:e.onToolbarItemClick,focusedCell:Mt,setFocusedCell:_e,globalFilter:se.globalFilter,setGlobalFilter:ue,handleColumnFiltersChange:le,handleGlobalFilterChange:ie,setFilterModel:he,getData:()=>A,getPrimaryKeyFieldNames:()=>{const Se=e.editSettings?.primaryKey;return Se?Array.isArray(Se)?Se:[Se]:[]},pagerMessage:j}),[i,Xt,se,fe,ge,be,$,C,x,g,Te,zt,ur,b,y,S,te,Z,P,W,I,X,T,G,Y,vt,z,R,e,A,le,ie,he,ue,j,Mt,_e,ee])},uE=({containerRef:e,containerSizeRef:t,resizeTimeoutRef:n,onResize:r},i)=>{s.useEffect(()=>{if(!e.current)return;const o=e.current;o.style.height="100%",o.style.minHeight="0",o.style.height="";const a=new ResizeObserver(c=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{for(const d of c){const{width:u,height:h}=d.contentRect;(Math.abs(u-t.current.width)>1||Math.abs(h-t.current.height)>1)&&(t.current={width:u,height:h},r())}},100)});return a.observe(o),()=>{a.disconnect(),n.current&&clearTimeout(n.current)}},i)},hE=({table:e,editSettings:t,toggleRowEditing:n,onRowClickProp:r,onRowDoubleClickProp:i,onCellClickProp:o,onCellDoubleClickProp:a})=>{const c=s.useCallback((d,u)=>{const h=e.options.meta;if(h?.setFocusedCell){const v=d.colIndex??e.getVisibleLeafColumns().findIndex(f=>f.id===d.columnId);v!==-1&&h.setFocusedCell({r:d.rowIndex,c:v})}u==="dblclick"&&t?.allowEditing&&t?.allowEditOnDblClick!==!1&&n(d.rowIndex,!0),(u==="click"?o??r:a??i)?.(d)},[e,t,n,r,i]);return{onRowClick:d=>c(d,"click"),onRowDoubleClick:d=>c(d,"dblclick"),onCellClick:d=>c(d,"click"),onCellDoubleClick:d=>c(d,"dblclick")}},mE=({dialogState:e,isDialogMode:t,rows:n,table:r})=>{s.useEffect(()=>{if(!t)return;const i=Object.keys(r.options.meta?.editingRows||{}).find(o=>r.options.meta?.editingRows?.[o]);if(i!==void 0){const o=parseInt(i);!isNaN(o)&&n[o]&&e.open("edit",n[o].original,{index:o})}},[t,e,n,r])},fE=()=>l.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md w-full",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",children:l.jsx(O.AlertTriangle,{className:"w-8 h-8 text-destructive"})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Table Error"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Something went wrong with the table. Please refresh the page or try again."})]}),l.jsxs("button",{onClick:()=>window.location.reload(),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",children:[l.jsx(O.RefreshCw,{className:"w-4 h-4"}),"Refresh Page"]})]})}),pE={compact:"py-1 text-xs",standard:"py-2 text-sm",comfortable:"py-4 text-base"},gE=(e="standard")=>pE[e],Cm="flex flex-col",ti={default:"border border-border",bottom:"border-b border-border"},Sm=s.memo(({globalFilter:e,setGlobalFilter:t,onExportExcel:n,onExportCSV:r,onExportPDF:i,enableChangeTracking:o,canUndo:a,canRedo:c,undo:d,redo:u,isPending:h,onAdd:m,onSave:v,onDiscard:f,enableEditing:p,changes:x,table:g})=>{const b=s.useCallback(y=>{const S=y.target.value;t(typeof e=="object"&&e!==null?{...e,quickSearch:S}:S)},[e,t]);return l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[l.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[p&&m&&l.jsxs(J,{variant:"default",size:"sm",className:"h-8 shadow-sm bg-primary hover:bg-primary/90 text-primary-foreground",onClick:m,children:[l.jsx(O.Plus,{className:"mr-1.5 h-3.5 w-3.5"}),"Add New"]}),p&&(x?.added||0)+(x?.edited||0)+(x?.deleted||0)>0&&l.jsxs("div",{className:"flex items-center gap-2 animate-in fade-in slide-in-from-left-2 duration-300",children:[l.jsxs(J,{variant:"default",size:"sm",className:"h-8 bg-emerald-600 hover:bg-emerald-700 text-white shadow-sm font-bold gap-1.5",onClick:v,children:[l.jsx(O.Save,{className:"h-3.5 w-3.5"}),"Save"]}),l.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-rose-200 text-rose-600 hover:bg-rose-50 hover:text-rose-700 font-bold gap-1.5",onClick:f,children:[l.jsx(O.XCircle,{className:"h-3.5 w-3.5"}),"Discard"]})]}),l.jsxs("div",{className:"relative",children:[l.jsx(je,{placeholder:"Filter all columns...",value:(typeof e=="string"?e:e?.quickSearch)??"",onChange:b,className:H("h-8 min-w-[150px] flex-1 lg:max-w-[250px]",h&&"opacity-70")}),h&&l.jsx(O.Loader2,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 animate-spin text-muted-foreground"})]}),o&&l.jsxs("div",{className:"flex items-center gap-1 ml-2 border-l border-border pl-2",children:[l.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:!a,onClick:d,title:"Undo",children:l.jsx(O.Undo,{className:"h-4 w-4"})}),l.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:!c,onClick:u,title:"Redo",children:l.jsx(O.Redo,{className:"h-4 w-4"})})]})]}),(r||n||i)&&l.jsxs("div",{className:"flex justify-end gap-2",children:[g&&l.jsxs($t,{children:[l.jsx(Wt,{asChild:!0,children:l.jsxs(J,{variant:"outline",size:"sm",className:"h-8 gap-2",children:[l.jsx(O.Columns3,{className:"w-4 h-4"})," Columns"]})}),l.jsx(At,{align:"end",className:"w-[180px]",children:g.getAllLeafColumns().filter(y=>typeof y.accessorFn<"u"&&y.getCanHide()).map(y=>l.jsx(ul,{className:"capitalize",checked:y.getIsVisible(),onCheckedChange:S=>y.toggleVisibility(!!S),children:y.columnDef.header},y.id))})]}),l.jsxs(J,{variant:"outline",size:"sm",onClick:()=>window.print(),className:"h-8 gap-2",children:[l.jsx(O.Printer,{className:"w-4 h-4"})," Print"]}),r&&l.jsxs(J,{variant:"secondary",size:"sm",onClick:()=>{r?.(),oe.get("NotificationService")?.add({type:"info",message:"Preparing CSV export...",duration:8e3})},className:"h-8 gap-2",children:[l.jsx(O.Download,{className:"w-4 h-4"})," Export CSV"]}),n&&l.jsxs(J,{variant:"secondary",size:"sm",onClick:()=>{n?.(),oe.get("NotificationService")?.add({type:"info",message:"Preparing Excel export...",duration:8e3})},className:"h-8 gap-2",children:[l.jsx(O.Download,{className:"w-4 h-4"})," Export Excel"]}),i&&l.jsxs(J,{variant:"secondary",size:"sm",onClick:()=>{i?.(),oe.get("NotificationService")?.add({type:"info",message:"Preparing PDF export...",duration:8e3})},className:"h-8 gap-2",children:[l.jsx(O.Download,{className:"w-4 h-4"})," Export PDF"]})]})]})});Sm.displayName="EzTableToolbar";const zm=({table:e,columnVirtualizer:t,density:n})=>{const r=e.getFooterGroups();if(r.length===0)return null;const i=t?.getVirtualItems()||e.getVisibleLeafColumns().map((c,d)=>({index:d})),o=t?.getVirtualItems()[0]?.start||0,a=t?t.getTotalSize()-(t.getVirtualItems()[t.getVirtualItems().length-1]?.end||0):0;return l.jsx(l.Fragment,{children:r.map(c=>l.jsxs("div",{className:H("flex w-full border-t border-border bg-background/95 backdrop-blur-sm font-bold z-20","sticky bottom-0 shadow-[0_-2px_10px_rgba(0,0,0,0.05)]"),role:"rowgroup",children:[o>0&&l.jsx("div",{style:{flex:`0 0 ${o}px`}}),i.map(d=>{const u=c.headers[d.index];if(!u)return null;const h=e.options.meta;return l.jsx("div",{className:H("px-4 flex items-center",h?.dir==="rtl"?"border-l border-border/50":"border-r border-border/50",n==="compact"&&"py-2 text-xs",n==="standard"&&"py-4 text-sm",n==="comfortable"&&"py-6 text-base",(u.column.columnDef.meta?.align==="right"||h?.dir==="rtl"&&!u.column.columnDef.meta?.align)&&"justify-end text-right",u.column.columnDef.meta?.align==="center"&&"justify-center text-center",(u.column.columnDef.meta?.align==="left"||!u.column.columnDef.meta?.align&&h?.dir!=="rtl")&&"justify-start text-left"),style:{width:u.getSize(),flex:`0 0 ${u.getSize()}px`},role:"cell",children:u.isPlaceholder?null:Ge.flexRender(u.column.columnDef.footer,u.getContext())},u.id)}),a>0&&l.jsx("div",{style:{flex:`0 0 ${a}px`}})]},c.id))})};zm.displayName="EzTableFooter";const Mm=s.memo(({table:e,selectionInfo:t})=>{const n=e.getPrePaginationRowModel().rows.length,r=Object.keys(e.getState().rowSelection).length;return l.jsxs("div",{className:H("flex border-t border-border p-2 text-xs text-muted-foreground justify-between bg-muted/30","rounded-b-md"),children:[l.jsxs("div",{className:"flex gap-4 items-center",children:[l.jsxs("span",{children:["Total: ",n," rows"]}),r>0&&l.jsxs("span",{className:"text-primary font-medium",children:[r," selected"]}),t&&l.jsxs("span",{children:["| ",t]})]}),l.jsx("div",{className:"flex gap-2"})]})});Mm.displayName="EzTableStatusBar";const vE=e=>{switch(e){case"compact":return"min-h-[40px]";case"comfortable":return"min-h-[56px]";default:return"min-h-[48px]"}},xE=e=>{switch(e){case"compact":return"py-0 px-2";case"comfortable":return"py-4 px-4";default:return"py-2 px-4"}},wE=e=>{switch(e){case"compact":return"text-xs";case"comfortable":return"text-base";default:return"text-sm"}},Nm=e=>H(vE(e),xE(e),wE(e)),jm=(e,t,n="ltr")=>e?{position:"sticky",[n==="rtl"?e==="left"?"right":"left":e==="left"?"left":"right"]:`${t}px`,zIndex:30}:{},km=(e,t="ltr")=>{if(!e)return"";const n="bg-background",r=e==="left",i=t==="rtl";return H(n,r&&!i||!r&&i?"shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)] dark:shadow-[2px_0_5px_-2px_rgba(0,0,0,0.3)]":"shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.1)] dark:shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.3)]")},bE=(e,t="ltr")=>{switch(e){case"center":return"justify-center text-center";case"right":return"justify-end text-right";case"left":return"justify-start text-left";default:return t==="rtl"?"justify-end text-right":"justify-start text-left"}},EE=(e,t)=>H(e&&"bg-primary/10 ring-1 ring-inset ring-primary/30 z-[1]",t&&"bg-primary/10 z-[10]"),yE=(e,t)=>{switch(e){case"wrap":return"whitespace-normal break-words";case"ellipsis":return t?"overflow-hidden":"truncate";default:return"truncate"}},CE=(e,t,n="ltr")=>!e||e==="None"||e==="Horizontal"?"":n==="rtl"?"border-l border-border/50":"border-r border-border/50",Fm=(...e)=>H(...e.filter(Boolean));function SE(e){if(!e||e.length===0)return"text";const n=e.slice(0,100).filter(d=>d!=null&&d!=="");if(n.length===0)return"text";if(n.every(d=>typeof d=="boolean"||d==="true"||d==="false"))return"boolean";if(n.every(d=>typeof d=="number"||!isNaN(parseFloat(d))&&isFinite(d)))return"number";if(n.every(d=>{if(d instanceof Date)return!0;if(typeof d=="string"){const u=Date.parse(d);return!isNaN(u)&&d.length>5&&(d.includes("-")||d.includes("/")||d.includes(":"))}return!1}))return n.some(u=>String(u).includes(":")||u instanceof Date&&(u.getHours()!==0||u.getMinutes()!==0))?"datetime":"date";const a=new Set(n.map(d=>String(d)));return a.size>0&&a.size<=Math.min(n.length*.2,10)?"select":n.some(d=>typeof d=="string"&&d.length>100)?"longtext":"text"}function zE(e,t){const[n,r]=s.useState(()=>Array.isArray(e)?new Set(e):null),i=n===null,o=s.useCallback(u=>{r(u?null:new Set)},[]),a=s.useCallback((u,h)=>{r(m=>{if(m===null){if(h)return null;const f=new Set(t);return f.delete(u),f}const v=new Set(m);if(h){if(v.add(u),v.size===t.length)return null}else v.delete(u);return v})},[t]),c=s.useCallback((u,h)=>{r(m=>{const v=m||new Set(t),f=new Set(v);if(h){if(u.forEach(p=>f.add(p)),f.size===t.length)return null}else u.forEach(p=>f.delete(p));return f})},[t]),d=s.useCallback(()=>{r(null)},[]);return{selectedValues:n,isAllSelected:i,handleSelectAll:o,handleSelect:a,handleBulkSelect:c,clearSelection:d}}const Dm=s.memo(({checked:e,indeterminate:t,onSelectAll:n,showSearchResults:r=!1})=>l.jsxs("div",{className:"flex items-center space-x-2 px-2 py-1.5 hover:bg-muted rounded text-sm cursor-pointer",onClick:()=>n(!e),children:[l.jsx(qe,{checked:e?!0:t?"indeterminate":!1,onCheckedChange:i=>n(i===!0)}),l.jsx("label",{className:"flex-1 cursor-pointer",children:r?"(Select All Search Results)":"(Select All)"})]}));Dm.displayName="SelectAllCheckbox";const Am=s.memo(({column:e})=>{const t=e.columnDef.meta;return l.jsxs("div",{className:"p-3 space-y-3",children:[l.jsx("div",{className:"text-sm font-medium",children:"Filter by value:"}),l.jsx(kh,{value:e.getFilterValue()||"all",onChange:n=>{e.setFilterValue(n)},trueLabel:t?.booleanOptions?.trueLabel,falseLabel:t?.booleanOptions?.falseLabel,nullLabel:t?.booleanOptions?.nullLabel})]})});Am.displayName="BooleanFilterSection";const Hm=s.memo(({column:e,allAvailableValues:t})=>l.jsx("div",{className:"p-1",children:l.jsx(xm,{options:t.map(n=>({value:String(n),label:String(n)})),selectedValues:Array.isArray(e.getFilterValue())?e.getFilterValue():[],onChange:n=>{e.setFilterValue(n.length>0?n:void 0)}})}));Hm.displayName="SelectFilterSection";const Tm=s.memo(({sortedUniqueValues:e,selectedValues:t,handleSelect:n,formatter:r})=>{const i=s.useRef(null),o=Zt.useVirtualizer({count:e.length,getScrollElement:()=>i.current,estimateSize:()=>32,overscan:5});return l.jsx("div",{ref:i,className:"flex-1 overflow-y-auto px-2 pb-2 min-h-0 pt-2",children:l.jsx("div",{style:{height:`${o.getTotalSize()}px`,width:"100%",position:"relative"},children:o.getVirtualItems().map(a=>{const c=e[a.index],d=t===null||t.has(c),u=r?r(c):String(c)||"(Empty)";return l.jsxs("div",{className:"absolute top-0 left-0 w-full flex items-center space-x-2 px-2 py-1 hover:bg-muted rounded text-sm cursor-pointer",style:{height:`${a.size}px`,transform:`translateY(${a.start}px)`},onClick:()=>n(c,!d),children:[l.jsx(qe,{checked:d,onCheckedChange:h=>n(c,h===!0)}),l.jsx("span",{className:"flex-1 truncate",children:u})]},a.key)})})})});Tm.displayName="VirtualizedFilterList";const ni=s.memo(({onClear:e,onApply:t,onAddRule:n,onAddGroup:r,onRemove:i,showClear:o=!0,showApply:a=!0,showAddRule:c=!1,showAddGroup:d=!1,showRemove:u=!1,className:h})=>l.jsxs("div",{className:`p-2 border-t flex justify-between bg-popover text-popover-foreground flex-shrink-0 sticky bottom-0 z-20 ${h||""}`,children:[l.jsxs("div",{className:"flex gap-2",children:[o&&e&&l.jsx(J,{variant:"ghost",size:"sm",onClick:e,className:"h-8 text-xs",children:"Clear"}),c&&n&&l.jsx(J,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:n,title:"Add Rule",children:l.jsx(O.PlusIcon,{className:"w-4 h-4"})}),d&&r&&l.jsx(J,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:r,title:"Add Group",children:l.jsx("span",{className:"font-bold text-xs",children:"( )"})})]}),l.jsxs("div",{className:"flex gap-2",children:[u&&i&&l.jsx(J,{variant:"ghost",size:"icon",className:"h-6 w-6 text-red-500 hover:text-red-600",onClick:i,children:l.jsx(O.XIcon,{className:"w-4 h-4"})}),a&&t&&l.jsx(J,{size:"sm",onClick:t,className:"min-w-[70px] h-8 text-xs font-semibold",children:"OK"})]})]}));ni.displayName="FilterActionButtons";function Pm({node:e,selectedValues:t,onBulkSelect:n}){const[r,i]=s.useState(!1);let o=!1;if(t===null)o=!0;else{const c=e.fullValues.filter(d=>t.has(d)).length;c===e.fullValues.length&&e.fullValues.length>0?o=!0:c>0?o="indeterminate":o=!1}const a=c=>{n(e.fullValues,c)};return l.jsxs("div",{className:"pl-4",children:[l.jsxs("div",{className:"flex items-center space-x-2 py-1 hover:bg-muted/50 rounded",children:[e.children&&e.children.length>0?l.jsx("button",{onClick:c=>{c.stopPropagation(),i(!r)},className:"p-0.5 hover:bg-muted rounded mr-1 text-muted-foreground",children:r?l.jsx(O.ChevronDown,{className:"w-4 h-4"}):l.jsx(O.ChevronRight,{className:"w-4 h-4"})}):l.jsx("span",{className:"w-5 mr-1"}),l.jsx(qe,{checked:o==="indeterminate"?"indeterminate":o,onCheckedChange:c=>a(c===!0),id:`node-${e.key}`}),l.jsxs("label",{htmlFor:`node-${e.key}`,className:"text-sm flex-1 cursor-pointer select-none text-foreground",children:[e.label,l.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",e.fullValues.length,")"]})]})]}),e.children&&r&&l.jsx("div",{className:"border-l border-border ml-2",children:e.children.map(c=>l.jsx(Pm,{node:c,selectedValues:t,onBulkSelect:n},c.key))})]})}function ME({uniqueValues:e,selectedValues:t,onBulkSelect:n}){const r=s.useMemo(()=>{const i=[],o=Array.from(e.keys()).map(c=>{const d=c instanceof Date?c:new Date(c);return{date:d,original:c,valid:!isNaN(d.getTime())}}).filter(c=>c.valid);o.sort((c,d)=>c.date.getTime()-d.date.getTime());const a=new Map;return o.forEach(c=>{const d=c.date.getFullYear();a.has(d)||a.set(d,[]),a.get(d).push(c)}),a.forEach((c,d)=>{const u={key:String(d),label:String(d),level:0,fullValues:c.map(m=>m.original),children:[]},h=new Map;c.forEach(m=>{const v=m.date.getMonth();h.has(v)||h.set(v,[]),h.get(v).push(m)}),h.forEach((m,v)=>{const f=new Date(d,v).toLocaleString("default",{month:"long"}),p={key:`${d}-${v}`,label:f,level:1,fullValues:m.map(g=>g.original),children:[]},x=new Map;m.forEach(g=>{const b=g.date.getDate();x.has(b)||x.set(b,[]),x.get(b).push(g)}),x.forEach((g,b)=>{const y={key:`${d}-${v}-${b}`,label:String(b),level:2,fullValues:g.map(S=>S.original),children:[]};p.children.push(y)}),u.children.push(p)}),i.push(u)}),i},[e]);return l.jsxs("div",{className:"space-y-1",children:[r.length===0&&l.jsx("div",{className:"p-2 text-sm text-muted-foreground",children:"No dates found"}),r.map(i=>l.jsx(Pm,{node:i,selectedValues:t,onBulkSelect:n},i.key))]})}const ri=s.memo(({value:e,onChange:t,options:n,placeholder:r,className:i})=>l.jsxs(rt,{value:e,onValueChange:o=>t(o),children:[l.jsx(st,{className:i,children:l.jsx(lt,{placeholder:r})}),l.jsx(it,{children:n.map(o=>l.jsx(Ae,{value:o.value,children:o.label},o.value))})]}));ri.displayName="FilterRuleSelect";const Im={text:[{label:"Contains",value:"contains"},{label:"Does not contain",value:"doesNotContain"},{label:"Equals",value:"equals"},{label:"Does not equal",value:"notEquals"},{label:"Starts with",value:"startsWith"},{label:"Ends with",value:"endsWith"}],number:[{label:"Equals",value:"equals"},{label:"Greater than",value:"gt"},{label:"Greater or equal",value:"gte"},{label:"Less than",value:"lt"},{label:"Less or equal",value:"lte"},{label:"Between",value:"between"}],date:[{label:"Equals",value:"equals"},{label:"After",value:"gt"},{label:"On or after",value:"gte"},{label:"Before",value:"lt"},{label:"On or before",value:"lte"},{label:"Between",value:"between"}]},NE=({columnType:e,columnId:t,value:n,onChange:r})=>{const o=Im[e==="datetime"||e==="date"?"date":e==="number"?"number":"text"]||Im.text,a=e==="number"?"number":e==="date"||e==="datetime"?"date":"text",c=n?.kind==="group",d=c?n.filters[0]:n?.operator?n:{operator:o[0].value,value:""},u=c?n.filters[1]:{operator:o[0].value,value:""},h=c?n.logic:"OR",m=c,[v,f]=s.useState(d),[p,x]=s.useState(u),[g,b]=s.useState(h),[y,S]=s.useState(m);s.useEffect(()=>{const E=n?.kind==="group",C=E?n.filters[0]:n?.operator?n:{operator:o[0].value,value:""},M=E?n.filters[1]:{operator:o[0].value,value:""},D=E?n.logic:"OR";f(C),x(M),b(D),S(E)},[n,o]);const z=(E,C,M,D)=>{if(!D){r({kind:"rule",operator:E.operator,value:E.value,field:E.field||t,id:E.id||t});return}r({kind:"group",logic:M,filters:[{kind:"rule",operator:E.operator,value:E.value,field:E.field||t,id:E.id||`${t}_1`},{kind:"rule",operator:C.operator,value:C.value,field:C.field||t,id:C.id||`${t}_2`}]})},N=(E,C)=>{if(E.operator==="between"){const M=Array.isArray(E.value)?E.value:[E.value??"",""];return l.jsxs("div",{className:"flex gap-2",children:[l.jsx(je,{type:a,value:M[0],onChange:D=>{const A=[D.target.value,M[1]],_={...E,value:A};C(_),z(E===v?_:v,E===v?p:_,g,y)},className:"h-8 shadow-none flex-1",placeholder:"From..."}),l.jsx(je,{type:a,value:M[1],onChange:D=>{const A=[M[0],D.target.value],_={...E,value:A};C(_),z(E===v?_:v,E===v?p:_,g,y)},className:"h-8 shadow-none flex-1",placeholder:"To..."})]})}return l.jsx(je,{type:a,value:E.value??"",onChange:M=>{const D={...E,value:M.target.value};C(D),z(E===v?D:v,E===v?p:D,g,y)},className:"h-8 shadow-none",placeholder:"Enter value..."})};return l.jsxs("div",{className:"p-3 space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-xs font-medium text-muted-foreground uppercase",children:"Show rows where:"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ri,{value:v.operator,options:o,onChange:E=>{const C=E,M={...v,operator:C,value:C==="between"?["",""]:v.value};f(M),z(M,p,g,y)},placeholder:"Select operator",className:"h-8 shadow-none"}),N(v,f)]})]}),l.jsx("div",{className:"flex justify-center",children:l.jsxs(ls,{value:g,onValueChange:E=>{b(E),y||S(!0),z(v,p,E,!0)},className:"flex gap-4",children:[l.jsxs("div",{className:"flex items-center space-x-1.5 focus-within:bg-muted/50 px-2 py-0.5 rounded transition",children:[l.jsx(sr,{value:"AND",id:"and",className:"h-3.5 w-3.5"}),l.jsx(ze,{htmlFor:"and",className:"text-xs cursor-pointer font-semibold uppercase tracking-wider",children:"And"})]}),l.jsxs("div",{className:"flex items-center space-x-1.5 focus-within:bg-muted/50 px-2 py-0.5 rounded transition",children:[l.jsx(sr,{value:"OR",id:"or",className:"h-3.5 w-3.5"}),l.jsx(ze,{htmlFor:"or",className:"text-xs cursor-pointer font-semibold uppercase tracking-wider",children:"Or"})]})]})}),l.jsx("div",{className:`space-y-2 transition-opacity duration-200 ${y?"":"opacity-50"}`,children:l.jsxs("div",{className:"space-y-2",children:[l.jsx(ri,{value:p.operator,options:o,onChange:E=>{const C=E,M={...p,operator:C,value:C==="between"?["",""]:p.value};x(M),y||S(!0),z(v,M,g,!0)},placeholder:"Select operator",className:"h-8 shadow-none"}),N(p,x)]})}),!y&&l.jsx("div",{className:"text-[10px] text-muted-foreground italic text-center",children:"Select AND/OR or enter a second value to combine filters"})]})};function jE({column:e}){const[t,n]=s.useState(!1);return l.jsxs(Kt,{open:t,onOpenChange:n,children:[l.jsx(qt,{asChild:!0,children:l.jsx("div",{className:H("ml-1 cursor-pointer p-1 rounded hover:bg-muted transition focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e.getIsFiltered()?"bg-primary/10":""),onClick:r=>r.stopPropagation(),children:l.jsx(O.ListFilter,{className:H("w-4 h-4",e.getIsFiltered()?"text-primary fill-primary":"text-muted-foreground")})})}),l.jsx(Tt,{className:"w-[280px] p-0",align:"start",children:t&&l.jsx(Om,{column:e,setIsOpen:n,filterValue:e.getFilterValue()})})]})}const kE=["date","datetime"],FE=["boolean"],DE=["select"],Om=s.memo(({column:e,setIsOpen:t,filterValue:n})=>{const[r,i]=s.useState("list"),[o,a]=s.useState(""),[c,d]=s.useState(""),[u,h]=s.useState(!0),[m,v]=s.useState(new Map),[f,p]=s.useState([]);s.useEffect(()=>{const P=setTimeout(()=>d(o),200),W=setTimeout(()=>{const I=e.getFacetedUniqueValues();v(I),p(Array.from(I.keys())),h(!1)},50);return()=>{clearTimeout(P),clearTimeout(W)}},[o,e]);const{selectedValues:x,handleSelectAll:g,handleSelect:b,handleBulkSelect:y,clearSelection:S}=zE(n,f),z=s.useMemo(()=>{const P=e.columnDef.meta;return P?.columnType?P.columnType:f.length===0?"text":SE(f)},[e.columnDef.meta,f]),N=kE.includes(z),E=FE.includes(z),C=DE.includes(z),M=s.useMemo(()=>{const P=[...f].sort((I,X)=>{if(I===X)return 0;if(I==null)return-1;if(X==null)return 1;const T=String(I),j=String(X);return T.localeCompare(j,void 0,{numeric:!0,sensitivity:"base"})});if(!c)return P;const W=c.toLowerCase();return P.filter(I=>String(I).toLowerCase().includes(W))},[f,c]),D=()=>{if(r==="filters"){t(!1);return}let P;x===null?P=c?M:void 0:P=Array.from(x),e.setFilterValue(P?.length===0?void 0:P),t(!1)},A=()=>{if(r==="filters"){e.setFilterValue(void 0),t(!1);return}S(),a("")},_=n,U=_&&typeof _=="object"&&!Array.isArray(_),G=P=>{e.setFilterValue(P)},Y=s.useMemo(()=>x===null?!0:M.length>0&&M.every(P=>x.has(P)),[x,M]),te=s.useMemo(()=>x===null?M.length>0:M.some(P=>x.has(P)),[x,M]),Z=P=>{c?y(M,P):g(P)};return u?l.jsxs("div",{className:"h-[300px] flex flex-col items-center justify-center space-y-3 bg-popover text-popover-foreground",children:[l.jsx(O.Loader2,{className:"h-8 w-8 animate-spin text-primary"}),l.jsx("span",{className:"text-sm text-muted-foreground animate-pulse font-medium",children:"Calculating filter values..."})]}):l.jsx("div",{className:"flex flex-col max-h-[500px]",children:r==="filters"?l.jsxs("div",{className:"flex flex-col animate-in fade-in slide-in-from-right-2 duration-200",children:[l.jsxs("div",{className:"p-3 border-b flex items-center space-x-2 bg-muted/30",children:[l.jsx(J,{variant:"ghost",size:"sm",onClick:()=>i("list"),className:"h-6 w-6 p-0",children:l.jsx(O.ChevronLeft,{className:"h-4 w-4"})}),l.jsxs("span",{className:"font-semibold text-sm capitalize",children:[z," Filters"]})]}),l.jsx(NE,{columnType:z,columnId:e.id,value:U?_:void 0,onChange:G}),l.jsx("div",{className:"flex-1"}),l.jsx(ni,{onClear:A,onApply:D,className:"border-t mt-auto"})]}):l.jsxs("div",{className:"flex flex-col animate-in fade-in slide-in-from-left-2 duration-200 flex-1 min-h-0",children:[e.getCanPin()&&l.jsxs("div",{className:"p-1 border-b border-border space-y-0.5",children:[["left","right"].map(P=>e.getIsPinned()!==P&&l.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 text-xs font-medium cursor-pointer hover:bg-muted rounded",onClick:()=>{e.pin(P),t(!1)},children:[l.jsx(O.Pin,{className:H("w-3.5 h-3.5",P==="left"?"rotate-[-45deg]":"rotate-[45deg]")})," Pin to ",P.charAt(0).toUpperCase()+P.slice(1)]},P)),e.getIsPinned()&&l.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 text-xs font-medium text-red-500 cursor-pointer hover:bg-red-50 dark:hover:bg-red-900/20 rounded",onClick:()=>{e.pin(!1),t(!1)},children:[l.jsx(O.PinOff,{className:"w-3.5 h-3.5"})," Unpin Column"]})]}),!E&&!C&&l.jsxs("div",{className:"p-2 border-b border-border flex justify-between items-center cursor-pointer hover:bg-muted/50 transition group",onClick:()=>i("filters"),children:[l.jsxs("span",{className:"text-sm font-medium capitalize",children:[z," Filters"]}),l.jsx(O.ChevronRight,{className:"w-4 h-4 text-muted-foreground group-hover:text-foreground"})]}),l.jsx("div",{className:"flex flex-col flex-1 overflow-hidden min-h-0",children:E?l.jsx(Am,{column:e}):C?l.jsx(Hm,{column:e,allAvailableValues:f}):l.jsxs("div",{className:"flex flex-col flex-1 min-h-0 pointer-events-auto",children:[l.jsxs("div",{className:"sticky top-0 bg-popover text-popover-foreground border-b z-20",children:[l.jsx("div",{className:"p-2",children:l.jsxs("div",{className:"relative",children:[l.jsx(O.Search,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx(je,{placeholder:"Search...",value:o,onChange:P=>a(P.target.value),className:"pl-9 h-9",autoFocus:!0})]})}),l.jsx(Dm,{checked:Y,indeterminate:te&&!Y,onSelectAll:Z,showSearchResults:!!c})]}),N?l.jsx("div",{className:"flex-1 overflow-y-auto px-2 pb-2 min-h-0 pt-2",children:l.jsx(ME,{uniqueValues:m,selectedValues:x,onBulkSelect:y})}):l.jsx(Tm,{sortedUniqueValues:M,selectedValues:x,handleSelect:b,formatter:P=>{const W=e.columnDef.meta;if(W?.columnType==="number"){if(W?.numberOptions?.format==="currency")return Ht(P,{format:"currency",...W.numberOptions});if(W?.numberOptions?.format==="percentage")return Ht(P,{format:"percentage",...W.numberOptions});if(W?.numberOptions?.format==="float"||W?.numberOptions?.format==="integer")return Ht(P,{format:W.numberOptions.format,...W.numberOptions})}return String(P)}})]})}),l.jsx(ni,{onClear:A,onApply:D})]})})});Om.displayName="FilterContent";var si="ContextMenu",[AE]=et(si,[Br]),Be=Br(),[HE,Lm]=AE(si),_m=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,c]=w.useState(!1),d=Be(t),u=Oe(r),h=w.useCallback(m=>{c(m),u(m)},[u]);return l.jsx(HE,{scope:t,open:a,onOpenChange:h,modal:o,children:l.jsx(La,{...d,dir:i,open:a,onOpenChange:h,modal:o,children:n})})};_m.displayName=si;var Vm="ContextMenuTrigger",Bm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...i}=e,o=Lm(Vm,n),a=Be(n),c=w.useRef({x:0,y:0}),d=w.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),u=w.useRef(0),h=w.useCallback(()=>window.clearTimeout(u.current),[]),m=v=>{c.current={x:v.clientX,y:v.clientY},o.onOpenChange(!0)};return w.useEffect(()=>h,[h]),w.useEffect(()=>{r&&h()},[r,h]),l.jsxs(l.Fragment,{children:[l.jsx(_a,{...a,virtualRef:d}),l.jsx(Ee.span,{"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,...i,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:ce(e.onContextMenu,v=>{h(),m(v),v.preventDefault()}),onPointerDown:r?e.onPointerDown:ce(e.onPointerDown,cs(v=>{h(),u.current=window.setTimeout(()=>m(v),700)})),onPointerMove:r?e.onPointerMove:ce(e.onPointerMove,cs(h)),onPointerCancel:r?e.onPointerCancel:ce(e.onPointerCancel,cs(h)),onPointerUp:r?e.onPointerUp:ce(e.onPointerUp,cs(h))})]})});Bm.displayName=Vm;var TE="ContextMenuPortal",$m=e=>{const{__scopeContextMenu:t,...n}=e,r=Be(t);return l.jsx(Va,{...r,...n})};$m.displayName=TE;var Wm="ContextMenuContent",Um=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Lm(Wm,n),o=Be(n),a=w.useRef(!1);return l.jsx(Ba,{...o,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&a.current&&c.preventDefault(),a.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Um.displayName=Wm;var PE="ContextMenuGroup",Gm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx($a,{...i,...r,ref:t})});Gm.displayName=PE;var IE="ContextMenuLabel",Km=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Wa,{...i,...r,ref:t})});Km.displayName=IE;var OE="ContextMenuItem",qm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Ua,{...i,...r,ref:t})});qm.displayName=OE;var LE="ContextMenuCheckboxItem",Qm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Ga,{...i,...r,ref:t})});Qm.displayName=LE;var _E="ContextMenuRadioGroup",Ym=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Ka,{...i,...r,ref:t})});Ym.displayName=_E;var VE="ContextMenuRadioItem",Xm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(qa,{...i,...r,ref:t})});Xm.displayName=VE;var BE="ContextMenuItemIndicator",Zm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Qa,{...i,...r,ref:t})});Zm.displayName=BE;var $E="ContextMenuSeparator",Jm=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Ya,{...i,...r,ref:t})});Jm.displayName=$E;var WE="ContextMenuArrow",UE=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Xa,{...i,...r,ref:t})});UE.displayName=WE;var Rm="ContextMenuSub",ef=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:o}=e,a=Be(t),[c,d]=Ot({prop:i,defaultProp:o??!1,onChange:r,caller:Rm});return l.jsx(Za,{...a,open:c,onOpenChange:d,children:n})};ef.displayName=Rm;var GE="ContextMenuSubTrigger",tf=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Ja,{...i,...r,ref:t})});tf.displayName=GE;var KE="ContextMenuSubContent",nf=w.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Be(n);return l.jsx(Ra,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nf.displayName=KE;function cs(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var qE=_m,QE=Bm,rf=$m,sf=Um,YE=Gm,lf=Km,of=qm,af=Qm,XE=Ym,cf=Xm,df=Zm,uf=Jm,ZE=ef,hf=tf,mf=nf;const li=qE,ii=QE,JE=YE,RE=rf,ey=ZE,ty=XE,ff=w.forwardRef(({className:e,inset:t,children:n,...r},i)=>l.jsxs(hf,{ref:i,className:H("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[state=open]:bg-zinc-100 data-[state=open]:text-zinc-900 dark:focus:bg-zinc-800 dark:focus:text-zinc-50 dark:data-[state=open]:bg-zinc-800 dark:data-[state=open]:text-zinc-50",t&&"pl-8",e),...r,children:[n,l.jsx(O.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ff.displayName=hf.displayName;const pf=w.forwardRef(({className:e,...t},n)=>l.jsx(mf,{ref:n,className:H("z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md 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 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",e),...t}));pf.displayName=mf.displayName;const ds=w.forwardRef(({className:e,...t},n)=>l.jsx(rf,{children:l.jsx(sf,{ref:n,className:H("z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md animate-in fade-in-80 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 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",e),...t})}));ds.displayName=sf.displayName;const Je=w.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(of,{ref:r,className:H("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",t&&"pl-8",e),...n}));Je.displayName=of.displayName;const gf=w.forwardRef(({className:e,children:t,checked:n,...r},i)=>l.jsxs(af,{ref:i,className:H("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(df,{children:l.jsx(O.Check,{className:"h-4 w-4"})})}),t]}));gf.displayName=af.displayName;const vf=w.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(cf,{ref:r,className:H("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(df,{children:l.jsx(O.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));vf.displayName=cf.displayName;const xf=w.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(lf,{ref:r,className:H("px-2 py-1.5 text-sm font-semibold text-zinc-950 dark:text-zinc-50",t&&"pl-8",e),...n}));xf.displayName=lf.displayName;const In=w.forwardRef(({className:e,...t},n)=>l.jsx(uf,{ref:n,className:H("-mx-1 my-1 h-px bg-zinc-200 dark:bg-zinc-800",e),...t}));In.displayName=uf.displayName;const cn=({className:e,...t})=>l.jsx("span",{className:H("ml-auto text-xs tracking-widest text-zinc-500 dark:text-zinc-400",e),...t});cn.displayName="ContextMenuShortcut";function ny({header:e,children:t}){const n=e.column,r=n.getIsPinned();return l.jsxs(li,{children:[l.jsx(ii,{asChild:!0,children:t}),l.jsxs(ds,{className:"w-48",children:[l.jsxs(Je,{onClick:()=>n.pin("left"),disabled:r==="left",className:"gap-2",children:[l.jsx(O.Pin,{className:"w-3.5 h-3.5 rotate-[-45deg]"}),"Pin to Left"]}),l.jsxs(Je,{onClick:()=>n.pin("right"),disabled:r==="right",className:"gap-2",children:[l.jsx(O.Pin,{className:"w-3.5 h-3.5 rotate-[45deg]"}),"Pin to Right"]}),r&&l.jsxs(l.Fragment,{children:[l.jsx(In,{}),l.jsxs(Je,{onClick:()=>n.pin(!1),className:"text-red-600 focus:text-red-700 focus:bg-red-50 dark:focus:bg-red-900/20 gap-2",children:[l.jsx(O.PinOff,{className:"w-3.5 h-3.5"}),"Unpin Column"]})]})]})]})}const wf=s.memo(({header:e,density:t,onAutoFit:n,columnPinning:r})=>{const{attributes:i,listeners:o,setNodeRef:a,isDragging:c}=De.useDraggable({id:e.column.id,disabled:!e.column.getCanGroup()||e.isPlaceholder,data:{type:"column",columnId:e.column.id}}),{setNodeRef:d,isOver:u}=De.useDroppable({id:`header-${e.column.id}`,disabled:!e.column.getCanGroup()||e.isPlaceholder,data:{type:"header",columnId:e.column.id}}),h=e.column.getIsPinned(),m=s.useMemo(()=>{if(!h)return{};const S=h==="right"?e.column.getAfter("right"):e.column.getStart("left"),z=e.getContext().table.options.meta;return jm(h,S,z?.dir)},[h,e.column,r]),v=s.useRef(0),f=s.useCallback(S=>{const z=Date.now();z-v.current<300&&n?.(e.column.id),v.current=z,e.getResizeHandler()(S)},[e,n]),p=e.column.columnDef.meta?.align||"left",x=e.column.columnDef.meta?.gridLines||e.getContext().table.options.meta?.gridLines,g=e.getContext().table.options.meta,b=g?.focusedCell?.c===e.index,y=l.jsxs("div",{ref:S=>{a(S),d(S)},className:H("relative h-full font-semibold text-foreground flex items-center select-none group/header transition-all flex-shrink-0 px-4",g?.dir==="rtl"?"border-l border-border/50":"border-r border-border/50",gE(t),c&&"opacity-50 bg-muted",u&&"ring-2 ring-inset ring-primary bg-accent/50",e.column.getIsGrouped()&&"bg-accent/30",b&&"bg-primary/5 text-primary border-b-2 border-primary",p==="center"&&"justify-center text-center",p==="right"&&"justify-end text-right",km(h),(x==="Both"||x==="Vertical")&&(g?.dir==="rtl"?"border-l border-border":"border-r border-border")),style:{width:`calc(var(--header-${e.id}-size) * 1px)`,minWidth:(e.column.columnDef.minSize??0)>0?e.column.columnDef.minSize:void 0,maxWidth:(e.column.columnDef.maxSize??0)>0&&e.column.columnDef.maxSize!==Number.MAX_SAFE_INTEGER?e.column.columnDef.maxSize:void 0,...m},role:"columnheader","aria-colindex":e.index+1,"aria-sort":e.column.getIsSorted()==="asc"?"ascending":e.column.getIsSorted()==="desc"?"descending":"none",children:[l.jsxs("div",{className:H("flex items-center w-full h-full gap-2",p==="center"&&"justify-center relative",p==="right"&&"justify-end"),children:[e.column.getCanGroup()&&!e.isPlaceholder&&l.jsx("div",{...i,...o,className:H("cursor-grab active:cursor-grabbing p-1 text-zinc-400 opacity-0 group-hover/header:opacity-100 transition-opacity",p==="center"?g?.dir==="rtl"?"absolute right-1 top-1/2 -translate-y-1/2":"absolute left-1 top-1/2 -translate-y-1/2":g?.dir==="rtl"?"-mr-2 ml-1":"-ml-2 mr-1"),children:l.jsx(O.GripVertical,{className:"w-3.5 h-3.5"})}),l.jsxs("div",{className:H("flex items-center min-w-0 gap-2 cursor-pointer group h-full select-none",p==="center"&&"justify-center",p==="right"&&"justify-end",e.column.getCanSort()?"hover:text-foreground/80":"",p!=="center"&&p!=="right"&&"flex-1"),onClick:e.column.getToggleSortingHandler(),tabIndex:e.column.getCanSort()?0:-1,role:"button","aria-label":`Sort by ${e.column.columnDef.header}`,children:[p==="center"&&e.column.getIsSorted()&&l.jsx("div",{className:"w-4 h-4 flex-shrink-0","aria-hidden":"true"}),l.jsx("span",{className:"truncate min-w-0",children:!e.isPlaceholder&&Ge.flexRender(e.column.columnDef.header,e.getContext())}),e.column.getIsSorted()==="asc"&&l.jsx(O.ArrowUp,{className:"w-4 h-4 text-foreground flex-shrink-0"}),e.column.getIsSorted()==="desc"&&l.jsx(O.ArrowDown,{className:"w-4 h-4 text-foreground flex-shrink-0"})]}),!e.isPlaceholder&&e.column.getCanFilter()&&l.jsx("div",{className:H(g?.dir==="rtl"?"ml-2":"mr-2",p==="center"&&(g?.dir==="rtl"?"absolute left-1 top-1/2 -translate-y-1/2 ml-0":"absolute right-1 top-1/2 -translate-y-1/2 mr-0")),children:l.jsx(jE,{column:e.column})})]}),e.column.getCanResize()&&l.jsx("div",{onMouseDown:f,onTouchStart:e.getResizeHandler(),className:H("absolute top-0 h-full w-4 cursor-col-resize hover:bg-primary/10 touch-none select-none z-30 transition-colors",g?.dir==="rtl"?"left-0":"right-0",e.column.getIsResizing()?"bg-primary w-1":""),role:"separator"})]});return e.column.getCanPin()?l.jsx(ny,{header:e,children:y}):y});wf.displayName="DraggableHeader";const ry=s.memo(sy);function sy({table:e,enableStickyHeader:t,classNames:n,density:r,autoFitColumn:i,slots:o}){return l.jsx("div",{className:H(Cm,"w-full bg-background shadow-sm",ti.bottom,t&&"sticky top-0 z-20",n?.header),role:"rowgroup",children:e.getHeaderGroups().map(a=>l.jsx("div",{className:H("flex w-full border-border/50 last:border-0 h-full",ti.bottom),role:"row",children:o?.header?l.jsx("div",{className:"contents",children:(()=>{const c=o.header;return a.headers.map(d=>l.jsx(c,{header:d,table:e},d.id))})()}):a.headers.map(c=>l.jsx(wf,{header:c,density:r,onAutoFit:i,columnPinning:e.getState().columnPinning},c.id))},a.id))})}const bf=s.memo(({isLoading:e,rowCount:t,renderNoRowsOverlay:n,slots:r,localization:i})=>{if(e){if(r?.loadingOverlay){const o=r.loadingOverlay;return l.jsx(o,{})}return l.jsx("div",{className:"absolute inset-x-0 top-0 z-50 flex flex-col items-center justify-center bg-white/50 dark:bg-black/50 backdrop-blur-[1px] min-h-[200px]",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 py-10",children:[l.jsx("div",{className:"w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"}),l.jsx("span",{className:"text-sm font-medium text-zinc-600 dark:text-zinc-400",children:i?.loadingLabel||"Loading data..."})]})})}if(t===0){if(r?.noRowsOverlay){const o=r.noRowsOverlay;return l.jsx(o,{})}return l.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-10 text-center",children:n?n():l.jsxs("div",{className:"flex flex-col items-center gap-2 text-zinc-400",children:[l.jsx(O.FilterIcon,{className:"w-12 h-12 opacity-10 mb-2"}),l.jsx("span",{className:"text-sm font-medium",children:i?.noRowsLabel||"No results found"}),l.jsx("p",{className:"text-xs",children:"Adjust your filters or search to see more results"})]})})}return null});bf.displayName="EzTableOverlays";const us=({row:e,data:t,contextId:n,children:r,enabled:i=!0,onAction:o})=>{if(!i)return l.jsx(l.Fragment,{children:r});const a=t||e?.original,d=(()=>{if(!n)return[];const m=oe.get("ContextMenuService");return m?m.getItems(n,a):[]})(),u=d.length>0,h=m=>{o?.(m,a)};return l.jsxs(li,{children:[l.jsx(ii,{asChild:!0,children:l.jsx("span",{className:"contents",children:r})}),l.jsx(ds,{className:"w-64",children:u?d.map((m,v)=>l.jsx(s.Fragment,{children:m.isSeparator?l.jsx(In,{}):l.jsxs(Je,{inset:!0,onClick:()=>{m.onClick?m.onClick(a):h(m.action)},disabled:m.disabled,className:m.className,children:[m.label,m.shortcut&&l.jsx(cn,{children:m.shortcut})]})},m.id||v)):l.jsxs(l.Fragment,{children:[l.jsxs(Je,{inset:!0,onClick:()=>h("edit"),children:["Edit Row",l.jsx(cn,{children:"⌘E"})]}),l.jsxs(Je,{inset:!0,onClick:()=>h("copy"),children:["Copy Data",l.jsx(cn,{children:"⌘C"})]}),l.jsxs(Je,{inset:!0,onClick:()=>h("paste"),children:["Paste Row",l.jsx(cn,{children:"⌘V"})]}),l.jsx(In,{}),e&&l.jsxs(l.Fragment,{children:[e.getIsPinned()!=="top"&&l.jsx(Je,{inset:!0,onClick:()=>h("pin-top"),children:"Pin to Top"}),e.getIsPinned()!=="bottom"&&l.jsx(Je,{inset:!0,onClick:()=>h("pin-bottom"),children:"Pin to Bottom"}),e.getIsPinned()&&l.jsx(Je,{inset:!0,onClick:()=>h("unpin"),children:"Unpin Row"}),l.jsx(In,{})]}),l.jsxs(Je,{inset:!0,className:"text-red-600 focus:text-red-600 focus:bg-red-50 dark:focus:bg-red-950/50",onClick:()=>h("delete"),children:["Delete Row",l.jsx(cn,{children:"⌘⌫"})]})]})})]})},oi=({children:e,content:t,enabled:n=!0,delayDuration:r=300,side:i,align:o,className:a})=>!n||!t?l.jsx(l.Fragment,{children:e}):l.jsx(kn,{children:l.jsxs(Fn,{delayDuration:r,children:[l.jsx(Dn,{asChild:!0,children:e}),l.jsx(ln,{side:i,align:o,className:a,children:t})]})}),ly=({children:e,text:t})=>{const n=s.useRef(null),[r,i]=s.useState(!1),o=()=>n.current?n.current.scrollWidth>n.current.clientWidth+1:!1;s.useEffect(()=>{if(o(),n.current){const d=new ResizeObserver(o);return d.observe(n.current),()=>d.disconnect()}},[e,t]);const a=()=>{o()&&i(!0)},c=()=>{i(!1)};return l.jsx(kn,{children:l.jsxs(Fn,{delayDuration:300,open:r,children:[l.jsx(Dn,{asChild:!0,children:l.jsx("div",{ref:n,className:"truncate w-full cursor-default min-w-0",onMouseEnter:a,onMouseLeave:c,children:e})}),l.jsx(ln,{children:l.jsx("p",{className:"max-w-sm break-words",children:t||e})})]})})},Ef=s.memo(({cell:e,virtualRowIndex:t,cellIndex:n,isPinned:r,isSelected:i,isFocused:o,density:a,onCellMouseDown:c,onCellMouseEnter:d,onCellClick:u,onCellDoubleClick:h,tableMeta:m,rowDepth:v,renderDetailPanel:f,isFirstColumn:p,columnPinning:x})=>{const g=s.useMemo(()=>({width:`calc(var(--col-${e.column.id}-size) * 1px)`,minWidth:(e.column.columnDef.minSize??0)>0?e.column.columnDef.minSize:void 0,maxWidth:(e.column.columnDef.maxSize??0)>0&&e.column.columnDef.maxSize!==Number.MAX_SAFE_INTEGER?e.column.columnDef.maxSize:void 0,...jm(r,r==="right"?e.column.getAfter("right"):e.column.getStart("left"),m?.dir),paddingLeft:m?.dir!=="rtl"&&(e.column.id==="firstName"||e.column.id==="name"||e.column.id==="id")?`${v*20+16}px`:void 0,paddingRight:m?.dir==="rtl"&&(e.column.id==="firstName"||e.column.id==="name"||e.column.id==="id")?`${v*20+16}px`:void 0}),[e.column.id,r,v,x]),b=l.jsx(l.Fragment,{children:e.getIsGrouped()?l.jsxs("span",{className:"font-semibold",children:[Ge.flexRender(e.column.columnDef.cell,e.getContext()),l.jsxs("span",{className:"text-muted-foreground font-normal ml-1",children:["(",e.row.subRows.length,")"]})]}):e.getIsAggregated()?l.jsx("span",{className:H("font-medium tabular-nums",m?.enableGroupFooters&&"text-primary/80 bg-primary/5 px-2 py-0.5 rounded"),children:Ge.flexRender(e.column.columnDef.aggregatedCell??e.column.columnDef.cell,e.getContext())}):e.getIsPlaceholder()?null:Ge.flexRender(e.column.columnDef.cell,e.getContext())}),y=e.column.columnDef.meta?.clipMode,S=s.useMemo(()=>{if(!m?.validate||!m?.validationAttempted)return{isValid:!0};const N=e.column.id,E=e.getValue(),C=e.row.original;return m.validate(N,E,C)},[m,e,t,e.getValue()]),z=o?{boxShadow:S.isValid?"inset 0 0 0 2px hsl(var(--primary))":"inset 0 0 0 2px hsl(var(--destructive))",zIndex:20,position:"relative"}:{};return l.jsxs("div",{onMouseDown:N=>{N.button===0&&(c(t,n,N),m?.setFocusedCell?.({r:t,c:n}))},onMouseEnter:()=>d(t,n),onClick:N=>{u?.({row:e.row.original,columnId:e.column.id,cellValue:e.getValue(),event:N,rowIndex:t,colIndex:n}),o&&m?.toggleRowEditing&&!m?.editingRows?.[t]&&m.toggleRowEditing(t,!0)},onDoubleClick:N=>h?.({row:e.row.original,columnId:e.column.id,cellValue:e.getValue(),event:N,rowIndex:t,colIndex:n}),className:Fm("px-4 text-sm text-foreground flex select-none min-h-full min-w-0 flex-shrink-0 relative",o&&"z-20",o&&S.isValid&&"bg-primary/5",o&&!S.isValid&&"bg-destructive/5",!S.isValid&&"ring-1 ring-inset ring-destructive",!o&&(m?.dir==="rtl"?"border-l border-border/50":"border-r border-border/50"),e.column.columnDef.meta?.wrapText?"items-start pt-3":"items-center",Nm(a),EE(i,o),bE(e.column.columnDef.meta?.align,m?.dir),yE(e.column.columnDef.meta?.wrapText?"wrap":y==="ellipsis-tooltip"?"ellipsis":"truncate",y==="ellipsis-tooltip"),km(r,m?.dir),!o&&CE(e.column.columnDef.meta?.gridLines||m?.gridLines,void 0,m?.dir),typeof m?.classNames?.cell=="function"?m.classNames.cell(e):m?.classNames?.cell),style:{...g,...z},role:"cell","data-column-id":e.column.id,children:[e.getIsGrouped()||e.row.getCanExpand()&&p||f&&p?l.jsx("button",{className:H(m?.dir==="rtl"?"ml-2":"mr-2","p-1 hover:bg-muted rounded transition-transform",!e.row.getCanExpand()&&!f&&"invisible"),onClick:N=>{N.stopPropagation(),e.row.getToggleExpandedHandler()()},children:e.row.getIsExpanded()?l.jsx(O.ChevronDown,{className:"w-4 h-4"}):l.jsx(O.ChevronRight,{className:"w-4 h-4"})}):null,S.isValid?y==="ellipsis-tooltip"?l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx(ly,{text:typeof e.getValue()=="string"?e.getValue():void 0,children:b})}):b:l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx(oi,{enabled:!0,side:m?.dir==="rtl"?"left":"right",className:"bg-destructive text-destructive-foreground border-destructive/20 shadow-xl z-50",content:l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider mb-0.5 opacity-80",children:"Validation Error"}),l.jsx("p",{className:"text-xs font-medium",children:S.error})]}),children:l.jsx("div",{className:"w-full h-full flex items-center",children:b})})})]})});Ef.displayName="EzTableCell";const yf=s.memo(({virtualRow:e,row:t,table:n,density:r,enableContextMenu:i,onContextMenuItemClick:o,isCellSelected:a,onCellMouseDown:c,onCellMouseEnter:d,onCellClick:u,onCellDoubleClick:h,focusedCell:m,renderDetailPanel:v,measureElement:f,columnVirtualizer:p,onRowClick:x,onRowDoubleClick:g,onRowMouseEnter:b,onRowMouseLeave:y,columnPinning:S})=>{const z=p?.getVirtualItems()||t.getVisibleCells().map((M,D)=>({index:D})),N=t.getVisibleCells(),{paddingLeft:E,paddingRight:C}=s.useMemo(()=>!p||z.length===0?{paddingLeft:0,paddingRight:0}:{paddingLeft:z[0]?.start||0,paddingRight:p.getTotalSize()-(z[z.length-1]?.end||0)},[p,z]);return l.jsx(us,{row:t,enabled:i,onAction:(M,D)=>{M==="pin-top"?t.pin("top"):M==="pin-bottom"?t.pin("bottom"):M==="unpin"?t.pin(!1):o?.(M,D)},children:l.jsxs("div",{"data-index":e.index,ref:f,className:"absolute top-0 left-0 w-full flex flex-col group border-b border-border",role:"row","aria-rowindex":e.index+1,style:{transform:`translateY(${e.start}px)`,...t.getIsExpanded()||N.some(M=>M.column.columnDef.meta?.wrapText)?{minHeight:`${e.size}px`}:{height:`${e.size}px`}},onClick:M=>x?.({row:t.original,data:t.original,rowIndex:t.index,originalEvent:M}),onDoubleClick:M=>g?.({row:t.original,data:t.original,rowIndex:t.index,originalEvent:M}),onMouseEnter:M=>b?.(t.index,M),onMouseLeave:M=>y?.(t.index,M),children:[l.jsxs("div",{className:Fm("flex items-stretch w-full min-w-max hover:bg-muted/50 transition-[background-color] duration-200",t.getIsSelected()&&"bg-muted",Nm(r),typeof n.options.meta?.classNames?.row=="function"?n.options.meta.classNames.row(t):n.options.meta?.classNames?.row),children:[E>0&&l.jsx("div",{style:{flex:`0 0 ${E}px`}}),z.map(M=>{const D=N[M.index];return D?l.jsx(Ef,{cell:D,virtualRowIndex:e.index,cellIndex:M.index,density:r,isPinned:D.column.getIsPinned(),isSelected:a(e.index,M.index),isFocused:m?.r===e.index&&m?.c===M.index,onCellMouseDown:(A,_,U)=>c(A,_,U),onCellMouseEnter:d,onCellClick:u,onCellDoubleClick:h,tableMeta:n.options.meta,rowDepth:t.depth,renderDetailPanel:v,isFirstColumn:M.index===0,table:n,columnPinning:S},D.id):null}),C>0&&l.jsx("div",{style:{flex:`0 0 ${C}px`}})]}),t.getIsExpanded()&&v&&l.jsx("div",{className:"w-full bg-muted/30 border-t border-border",children:v({row:t})})]})})});yf.displayName="EzTableRow";function iy({table:e,rows:t,rowVirtualizer:n,columnVirtualizer:r,density:i,classNames:o,isLoading:a,enableInfiniteScroll:c,isPending:d,renderNoRowsOverlay:u,slots:h,localization:m,enableContextMenu:v,onContextMenuItemClick:f,isCellSelected:p,focusedCell:x,onCellMouseDown:g,onCellMouseEnter:b,onCellClick:y,onCellDoubleClick:S,renderDetailPanel:z,onRowClick:N,onRowDoubleClick:E}){const C=!!((a||d)&&!c);return l.jsxs("div",{className:H("relative w-full",o?.body),style:{height:`${n?.getTotalSize()??0}px`,minHeight:"0",flexShrink:"0"},children:[l.jsx(bf,{isLoading:C,rowCount:t.length,renderNoRowsOverlay:u,slots:h,localization:m}),n?.getVirtualItems().map(M=>{const D=t[M.index];return l.jsx(yf,{virtualRow:M,row:D,table:e,density:i,enableContextMenu:!!v,onContextMenuItemClick:f,isCellSelected:p,focusedCell:x,onCellMouseDown:g,onCellMouseEnter:b,onCellClick:y,onCellDoubleClick:S,renderDetailPanel:z,measureElement:n.measureElement,columnVirtualizer:r,onRowClick:N,onRowDoubleClick:E,columnPinning:e.getState().columnPinning,tableMeta:e.options.meta},D.id)})]})}const oy=({pageIndex:e,pageSize:t,pageCount:n,totalRows:r,onPageChange:i,onPageSizeChange:o,canPreviousPage:a,canNextPage:c,localization:d,changes:u})=>l.jsxs("div",{className:"flex items-center justify-between w-full px-4 py-3 border-t border-border bg-background",children:[l.jsxs("div",{className:"flex items-center gap-6",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx("span",{className:"hidden sm:inline whitespace-nowrap",children:d?.rowsPerPageLabel||"Rows per page"}),l.jsx("span",{className:"sm:hidden",children:d?.rowsLabel||"Rows"}),l.jsxs(rt,{value:`${t}`,onValueChange:h=>o(Number(h)),children:[l.jsx(st,{className:"h-8 w-[70px] bg-muted/20 border-border",children:l.jsx(lt,{placeholder:t.toString()})}),l.jsx(it,{children:[10,20,30,40,50,100].map(h=>l.jsx(Ae,{value:`${h}`,children:h},h))})]})]}),l.jsx("div",{className:"h-4 w-px bg-border hidden sm:block"}),l.jsxs("div",{className:"hidden md:flex items-center gap-2 text-sm text-muted-foreground font-medium bg-muted/30 px-3 py-1 rounded-full border border-border/50",children:[l.jsxs("div",{children:[d?.totalLabel||"Total"," ",l.jsx("span",{className:"text-foreground font-bold",children:r})," ",d?.recordsLabel||"records"]}),u&&(u.added>0||u.edited>0||u.deleted>0)&&l.jsxs("div",{className:"flex items-center gap-2 border-l border-border/50 pl-2 ml-1",children:[u.added>0&&l.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400 font-bold",children:[u.added," added"]}),u.edited>0&&l.jsxs("span",{className:"text-amber-600 dark:text-amber-400 font-bold",children:[u.edited," edited"]}),u.deleted>0&&l.jsxs("span",{className:"text-rose-600 dark:text-rose-400 font-bold",children:[u.deleted," deleted"]})]})]}),d?.pagerMessage&&l.jsx("div",{className:"hidden lg:block text-sm text-muted-foreground italic",children:d.pagerMessage})]}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs("div",{className:"flex items-center text-sm font-medium text-foreground whitespace-nowrap bg-muted/20 px-3 py-1 rounded-md border border-border/50 gap-1.5",children:[l.jsx("span",{className:"text-muted-foreground font-normal",children:d?.pageLabel||"Page"}),l.jsx("span",{className:"text-primary font-black px-0.5",children:e+1}),l.jsx("span",{className:"text-muted-foreground font-normal",children:d?.ofLabel||"of"}),l.jsx("span",{className:"font-bold px-0.5",children:n})]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs(J,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex bg-background border-border hover:bg-muted",onClick:()=>i(0),disabled:!a,title:d?.firstPage||"First Page",children:[l.jsx(O.ChevronsLeft,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Go to first page"})]}),l.jsxs(J,{variant:"outline",className:"h-8 w-8 p-0 bg-background border-border hover:bg-muted",onClick:()=>i(e-1),disabled:!a,title:d?.previousPage||"Previous Page",children:[l.jsx(O.ChevronLeft,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Go to previous page"})]})]}),l.jsxs("div",{className:"flex items-center gap-2 px-2 h-8 bg-muted/20 rounded-md border border-border/50 hover:border-primary/50 transition-colors",children:[l.jsx("span",{className:"text-[10px] hidden sm:inline text-muted-foreground uppercase font-black tracking-tighter",children:d?.goToLabel||"Go To"}),l.jsx(je,{type:"number",min:1,max:n,value:e+1,onFocus:h=>h.target.select(),onClick:h=>h.currentTarget.select(),onChange:h=>{const m=h.target.value;if(m==="")return;const v=Number(m)-1;v>=0&&v<n&&i(v)},className:"h-6 w-10 p-0 text-center border-none bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm font-bold"})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs(J,{variant:"outline",className:"h-8 w-8 p-0 bg-background border-border hover:bg-muted",onClick:()=>i(e+1),disabled:!c,title:d?.nextPage||"Next Page",children:[l.jsx(O.ChevronRight,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Go to next page"})]}),l.jsxs(J,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex bg-background border-border hover:bg-muted",onClick:()=>i(n-1),disabled:!c,title:d?.lastPage||"Last Page",children:[l.jsx(O.ChevronsRight,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Go to last page"})]})]})]})]})]});function ay({table:e,pagerMessage:t,enableStickyPagination:n,classNames:r,localization:i,changes:o}){return l.jsx("div",{className:H("w-full bg-background border-t border-border z-30",n&&"sticky bottom-0 shadow-[0_-4px_12px_rgba(0,0,0,0.1)] dark:shadow-[0_-4px_12px_rgba(0,0,0,0.3)]",r?.footer),children:l.jsx(oy,{pageIndex:e.getState().pagination.pageIndex,pageSize:e.getState().pagination.pageSize,pageCount:e.getPageCount(),totalRows:e.getPrePaginationRowModel().rows.length,canNextPage:e.getCanNextPage(),canPreviousPage:e.getCanPreviousPage(),onPageChange:e.setPageIndex,onPageSizeChange:e.setPageSize,localization:{...i,pagerMessage:t},changes:o})})}const cy=e=>s.useMemo(()=>{const t=e.getFlatHeaders(),n={};for(let r=0;r<t.length;r++){const i=t[r];n[`--header-${i.id}-size`]=i.getSize(),n[`--col-${i.column.id}-size`]=i.column.getSize()}return n},[e.getState().columnSizing,e.getState().columnSizingInfo,e.getState().columnVisibility,e.getFlatHeaders()]);var hs={exports:{}},ai={},ms={exports:{}},ci={};var Cf;function dy(){if(Cf)return ci;Cf=1;var e=s;function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function c(m,v){var f=v(),p=r({inst:{value:f,getSnapshot:v}}),x=p[0].inst,g=p[1];return o(function(){x.value=f,x.getSnapshot=v,d(x)&&g({inst:x})},[m,f,v]),i(function(){return d(x)&&g({inst:x}),m(function(){d(x)&&g({inst:x})})},[m]),a(f),f}function d(m){var v=m.getSnapshot;m=m.value;try{var f=v();return!n(m,f)}catch{return!0}}function u(m,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return ci.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,ci}var di={};var Sf;function uy(){return Sf||(Sf=1,process.env.NODE_ENV!=="production"&&(function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){h||i.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=p();if(!m){var g=p();o(x,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}g=a({inst:{value:x,getSnapshot:p}});var b=g[0].inst,y=g[1];return d(function(){b.value=x,b.getSnapshot=p,n(b)&&y({inst:b})},[f,x,p]),c(function(){return n(b)&&y({inst:b}),f(function(){n(b)&&y({inst:b})})},[f]),u(x),x}function n(f){var p=f.getSnapshot;f=f.value;try{var x=p();return!o(f,x)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=s,o=typeof Object.is=="function"?Object.is:e,a=i.useState,c=i.useEffect,d=i.useLayoutEffect,u=i.useDebugValue,h=!1,m=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;di.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),di}var zf;function Mf(){return zf||(zf=1,process.env.NODE_ENV==="production"?ms.exports=dy():ms.exports=uy()),ms.exports}var Nf;function hy(){if(Nf)return ai;Nf=1;var e=s,t=Mf();function n(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,c=e.useMemo,d=e.useDebugValue;return ai.useSyncExternalStoreWithSelector=function(u,h,m,v,f){var p=o(null);if(p.current===null){var x={hasValue:!1,value:null};p.current=x}else x=p.current;p=c(function(){function b(E){if(!y){if(y=!0,S=E,E=v(E),f!==void 0&&x.hasValue){var C=x.value;if(f(C,E))return z=C}return z=E}if(C=z,r(S,E))return C;var M=v(E);return f!==void 0&&f(C,M)?(S=E,C):(S=E,z=M)}var y=!1,S,z,N=m===void 0?null:m;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,m,v,f]);var g=i(u,p[0],p[1]);return a(function(){x.hasValue=!0,x.value=g},[g]),d(g),g},ai}var ui={};var jf;function my(){return jf||(jf=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=s,n=Mf(),r=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,o=t.useRef,a=t.useEffect,c=t.useMemo,d=t.useDebugValue;ui.useSyncExternalStoreWithSelector=function(u,h,m,v,f){var p=o(null);if(p.current===null){var x={hasValue:!1,value:null};p.current=x}else x=p.current;p=c(function(){function b(E){if(!y){if(y=!0,S=E,E=v(E),f!==void 0&&x.hasValue){var C=x.value;if(f(C,E))return z=C}return z=E}if(C=z,r(S,E))return C;var M=v(E);return f!==void 0&&f(C,M)?(S=E,C):(S=E,z=M)}var y=!1,S,z,N=m===void 0?null:m;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,m,v,f]);var g=i(u,p[0],p[1]);return a(function(){x.hasValue=!0,x.value=g},[g]),d(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ui}var kf;function fy(){return kf||(kf=1,process.env.NODE_ENV==="production"?hs.exports=hy():hs.exports=my()),hs.exports}var py=fy();const hi=new WeakMap,gy=new WeakMap,fs={current:[]};let mi=!1;const ps=new Set,Ff=new Map;function Df(e){for(const t of e){if(fs.current.includes(t))continue;fs.current.push(t),t.recompute();const n=gy.get(t);if(n)for(const r of n){const i=hi.get(r);i?.length&&Df(i)}}}function vy(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function xy(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function wy(e){if(ps.add(e),!mi)try{for(mi=!0;ps.size>0;){const t=Array.from(ps);ps.clear();for(const n of t){const r=Ff.get(n)??n.prevState;n.prevState=r,vy(n)}for(const n of t){const r=hi.get(n);r&&(fs.current.push(n),Df(r))}for(const n of t){const r=hi.get(n);if(r)for(const i of r)xy(i)}}}finally{mi=!1,fs.current=[],Ff.clear()}}function by(e){return typeof e=="function"}class Af{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,o;this.listeners.add(r);const a=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,r,this);return()=>{this.listeners.delete(r),a?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):by(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),wy(this)}}function dn(e,t=r=>r,n={}){const r=n.equal??Ey;return py.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function Ey(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Hf(e);if(n.length!==Hf(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Hf(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const yy=s.lazy(()=>Promise.resolve().then(()=>gS).then(e=>({default:e.EzGroupingPanel}))),Cy=s.lazy(()=>Promise.resolve().then(()=>vS).then(e=>({default:e.EzTableEditDialog}))),Tf=s.forwardRef((e,t)=>{const n=dE(e),r=s.useRef(null),i=s.useRef({width:0,height:0}),o=s.useRef(null);uE({containerRef:r,containerSizeRef:i,resizeTimeoutRef:o,onResize:()=>{n.rowVirtualizer&&n.rowVirtualizer.measure()}},[n.rowVirtualizer]);const{parentRef:a,rowVirtualizer:c,rows:d,table:u,dir:h,rangeSelection:m,onCellMouseDown:v,onCellMouseEnter:f,globalFilter:p,setGlobalFilter:x,enableStickyHeader:g,enableChangeTracking:b,undo:y,redo:S,canUndo:z,canRedo:N,changes:E,batchChanges:C,resetData:M,enableEditing:D,toggleRowEditing:A,density:_,isPending:U,autoFitColumn:G,columnVirtualizer:Y,pagerMessage:te,addRecord:Z,updateRecord:P,getData:W,onRowClick:I,onRowDoubleClick:X,focusedCell:T,editSettings:j}=n,{validate:V,validateForm:L}=F9({validateField:e.validateField,editSettings:j}),[$,se]=s.useState(!1);s.useEffect(()=>{if(E.added+E.edited+E.deleted>0&&D){const le=ie=>(ie.preventDefault(),ie.returnValue="","");return window.addEventListener("beforeunload",le),()=>window.removeEventListener("beforeunload",le)}},[E,D]),s.useEffect(()=>{e.onDataChange&&e.onDataChange(E)},[E,e.onDataChange]);const{onRowClick:ne,onRowDoubleClick:de,onCellClick:pe,onCellDoubleClick:we}=hE({table:u,editSettings:j,toggleRowEditing:A,onRowClickProp:I,onRowDoubleClickProp:X}),Me=cy(u),ve=D9({initialMode:"view"});mE({dialogState:ve,isDialogMode:j?.mode==="Dialog",rows:d,table:u});const Q=s.useCallback(R=>{ve.mode==="create"?Z(R):(P(ve.meta.index,R),A(ve.meta.index,!1)),ve.close()},[ve,Z,P,A]),q=s.useCallback(()=>{j?.mode==="Dialog"?ve.open("create",{}):Z({})},[j?.mode,Z]),me=s.useCallback(()=>{if(e.onBatchSave){const R=[...C.addedRecords,...C.changedRecords],ie=u.getVisibleLeafColumns().map(ue=>ue.id).filter(ue=>ue!=="select"&&ue!=="actions");for(const ue of R)if(!L(ue,ie).__form.isValid){se(!0);return}e.onBatchSave(C);const he=oe.get("NotificationService");if(he&&he.add({type:"success",message:`Successfully saved ${C.addedRecords.length+C.changedRecords.length} changes.`,duration:5e3}),M(),se(!1),u.options.meta?.toggleRowEditing){const ue=u.options.meta.editingRows||{};Object.keys(ue).forEach(fe=>{u.options.meta?.toggleRowEditing?.(parseInt(fe),!1)})}}},[e.onBatchSave,C,M,u.options.meta,L,u]),ye=s.useCallback(()=>{if(e.onBatchDiscard&&e.onBatchDiscard(),M(),se(!1),u.options.meta?.toggleRowEditing){const R=u.options.meta.editingRows||{};Object.keys(R).forEach(le=>{u.options.meta?.toggleRowEditing?.(parseInt(le),!1)})}},[e.onBatchDiscard,M,u.options.meta]),ke=s.useMemo(()=>{const{...R}=n;return{...R,validateField:le=>{let ie={};if(j?.mode==="Dialog"&&ve.isOpen)ie=ve.data;else{const ue=u.options.meta?.editingRows||{},fe=Object.keys(ue).find(ge=>ue[ge]);if(fe){const ge=parseInt(fe),be=W();be&&be[ge]&&(ie=be[ge])}}const{isValid:he}=V(le,ie[le],ie);return he},validateEditForm:()=>{const le=u.getVisibleLeafColumns();let ie=!0;return le.forEach(he=>{const ue=he.id;let fe={};if(j?.mode==="Dialog"&&ve.isOpen)fe=ve.data;else{const be=u.options.meta?.editingRows||{},He=Object.keys(be).find(Te=>be[Te]);He&&W()[parseInt(He)]&&(fe=W()[parseInt(He)])}const{isValid:ge}=V(ue,fe[ue],fe);ge||(ie=!1)}),ie}}},[n,W,j,ve,u,V]);u.options.meta={...u.options.meta,...e,validate:V,validationAttempted:$},O2(t,ke);const{handleDragEnd:xe,handleKeyDown:Ce}=j9({onDragEnd:R=>{const{active:le,over:ie}=R;if(!ie)return;const he=le.id,ue=[...u.getState().grouping];if(ie.id==="grouping-panel")ue.includes(he)||u.setGrouping([...ue,he]);else if(typeof ie.id=="string"&&ie.id.startsWith("header-")){const fe=ie.id.replace("header-","");if(he!==fe){let ge=[...ue];ge.includes(fe)||ge.push(fe),ge.includes(he)&&(ge=ge.filter(He=>He!==he));const be=ge.indexOf(fe);ge.splice(be+1,0,he),u.setGrouping(ge)}}},onKeyDown:R=>{const le=u.options.meta;if(le?.navigateFocus){if(R.target.tagName==="INPUT"){R.key==="Enter"&&(R.preventDefault(),R.target.blur(),le.navigateFocus(1,0)),R.key==="Tab"&&(R.preventDefault(),R.target.blur(),le.navigateFocus(0,R.shiftKey?-1:1));return}switch(R.key){case"ArrowUp":R.preventDefault(),le.navigateFocus(-1,0);break;case"ArrowDown":R.preventDefault(),le.navigateFocus(1,0);break;case"ArrowLeft":R.preventDefault(),le.navigateFocus(0,-1);break;case"ArrowRight":R.preventDefault(),le.navigateFocus(0,1);break;case"Tab":R.preventDefault(),le.navigateFocus(0,R.shiftKey?-1:1);break;case"Enter":R.preventDefault(),le.navigateFocus(1,0);break}}}}),ee=s.useCallback((R,le)=>{if(!m)return!1;const{start:ie,end:he}=m;return R>=Math.min(ie.r,he.r)&&R<=Math.max(ie.r,he.r)&&le>=Math.min(ie.c,he.c)&&le<=Math.max(ie.c,he.c)},[m]),{sensors:re,onDragEnd:ae}=k9({onDragEnd:xe,distance:5});return l.jsx(er,{fallback:l.jsx(fE,{}),children:l.jsx(kn,{children:l.jsx(De.DndContext,{sensors:re,onDragEnd:ae,children:l.jsxs("div",{className:H(Cm,"w-full min-h-0 gap-3",e.className,e.classNames?.root),dir:h,children:[e.enableGrouping&&l.jsx(s.Suspense,{fallback:null,children:l.jsx(yy,{grouping:u.getState().grouping,onGroupingChange:u.setGrouping,columns:u.getAllColumns()})}),e.slots?.toolbar?l.jsx(e.slots.toolbar,{table:u,globalFilter:p,setGlobalFilter:x,isPending:U,columns:u.getAllColumns()}):l.jsx(Sm,{globalFilter:p,setGlobalFilter:x,enableAdvancedFiltering:e.enableAdvancedFiltering,enableExport:e.enableExport,onExportExcel:e.onExportExcel?()=>e.onExportExcel(u):void 0,onExportCSV:e.onExportCSV?()=>e.onExportCSV(u):void 0,onExportPDF:e.onExportPDF?()=>e.onExportPDF(u):void 0,enableChangeTracking:b,canUndo:z,canRedo:N,undo:y,redo:S,columns:u.getAllColumns(),isPending:U,onAdd:j?.allowAdding?q:void 0,onSave:me,onDiscard:ye,enableEditing:D,changes:E,table:u}),l.jsx("div",{ref:R=>{a.current=R,r.current=R},className:H("flex-1 w-full overflow-auto rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-primary/20",ti.default),dir:h,onScroll:R=>{if(e.enableInfiniteScroll){const{scrollTop:le,scrollHeight:ie,clientHeight:he}=R.currentTarget;ie-le-he<50&&u.getCanNextPage()&&!e.isLoading&&u.nextPage()}},role:"table",style:{overflowAnchor:"none",scrollBehavior:e.scrollBehavior??"smooth",height:"100%",position:"relative",minHeight:"0"},onKeyDown:Ce,children:l.jsxs("div",{className:"flex flex-col relative w-full min-w-max flex-1",role:"presentation",style:{...Me,height:"100%"},children:[l.jsx(ry,{table:u,enableStickyHeader:g,classNames:e.classNames,density:_,autoFitColumn:G,slots:e.slots,columnPinning:u.getState().columnPinning,columnSizing:u.getState().columnSizing,sorting:u.getState().sorting,grouping:u.getState().grouping,columnVisibility:u.getState().columnVisibility}),l.jsx(iy,{table:u,rows:d,rowVirtualizer:c,columnVirtualizer:Y,density:_,classNames:e.classNames,isLoading:e.isLoading,enableInfiniteScroll:e.enableInfiniteScroll,isPending:U,renderNoRowsOverlay:e.renderNoRowsOverlay,slots:e.slots,localization:e.localization,enableContextMenu:e.enableContextMenu,onContextMenuItemClick:e.onContextMenuItemClick,isCellSelected:ee,focusedCell:T,onCellMouseDown:v,onCellMouseEnter:f,onCellClick:pe,onCellDoubleClick:we,renderDetailPanel:e.renderDetailPanel,onRowClick:ne,onRowDoubleClick:de}),e.slots?.footer?l.jsx(e.slots.footer,{table:u}):l.jsx(zm,{table:u,columnVirtualizer:Y,density:_})]})}),e.pagination&&l.jsx(ay,{table:u,pagerMessage:te,enableStickyPagination:e.enableStickyPagination,classNames:e.classNames,localization:e.localization,changes:E}),l.jsx(Mm,{table:u,selectionInfo:E.added+E.edited+E.deleted>0?`${E.added+E.edited+E.deleted} pending changes`:void 0}),j?.mode==="Dialog"&&l.jsx(s.Suspense,{fallback:null,children:l.jsx(Cy,{open:ve.isOpen,onClose:()=>{ve.close(),ve.mode!=="create"&&ve.meta.index!==void 0&&A(ve.meta.index,!1)},onSave:Q,columns:u.getAllColumns(),initialData:ve.data,isNew:ve.mode==="create",onFormRender:e.onFormRender})})]})})})})});Tf.displayName="EzTableImpl";const Sy=new Nl,zy=s.forwardRef((e,t)=>(Mn(),l.jsx(jl,{client:Sy,children:l.jsx(Tf,{...e,ref:t})}))),My=e=>new Af({events:[],resources:[],view:"week",currentDate:new Date,selectedDate:new Date,selectedEventId:null,slotDuration:30,is24Hour:!0,...e}),Ny=e=>({setEvents:t=>{e.setState(n=>({...n,events:t}))},addEvent:t=>{e.setState(n=>({...n,events:[...n.events,t]}))},updateEvent:t=>{e.setState(n=>({...n,events:n.events.map(r=>r.id===t.id?t:r)}))},deleteEvent:t=>{e.setState(n=>({...n,events:n.events.filter(r=>r.id!==t)}))},setResources:t=>{e.setState(n=>({...n,resources:t}))},setView:t=>{e.setState(n=>({...n,view:t}))},setCurrentDate:t=>{e.setState(n=>({...n,currentDate:t}))},setSelectedDate:t=>{e.setState(n=>({...n,selectedDate:t}))},setSelectedEventId:t=>{e.setState(n=>({...n,selectedEventId:t}))},setSlotDuration:t=>{e.setState(n=>({...n,slotDuration:t}))},setIs24Hour:t=>{e.setState(n=>({...n,is24Hour:t}))}}),Pe={events:new Map,resources:new Map};class Pf{name="SchedulerService";constructor(t=[]){this.initializeWithData(t)}async init(){console.log("[SchedulerService] Initialized")}async cleanup(){}initializeWithData(t,n=[]){Pe.events.clear(),Pe.resources.clear(),t.forEach(r=>{Pe.events.set(String(r.id),JSON.parse(JSON.stringify(r)))}),n.forEach(r=>{Pe.resources.set(String(r.id),JSON.parse(JSON.stringify(r)))})}async getEvents(t,n){return await this.simulateLatency(),!t||!n?Array.from(Pe.events.values()):Array.from(Pe.events.values()).filter(i=>{const o=new Date(i.start),a=new Date(i.end);return o>=t&&o<n||a>t&&a<=n||o<=t&&a>=n}).map(i=>({...i,start:new Date(i.start),end:new Date(i.end)}))}async addEvent(t){await this.simulateLatency();const n={id:t.id||Math.random().toString(36).substring(2,9),title:t.title||"Untitled Event",start:t.start||new Date,end:t.end||new Date(new Date().getTime()+3600*1e3),description:t.description,resourceId:t.resourceId,resourceIds:t.resourceIds,allDay:t.allDay||!1,...t};return Pe.events.set(n.id,n),n}async updateEvent(t){console.log("[SchedulerService] Updating event:",t.id,t.start,t.end),await this.simulateLatency();const n=String(t.id);if(Pe.events.has(n)){const i={...Pe.events.get(n),...t,id:n};return Pe.events.set(n,i),console.log("[SchedulerService] Event updated in DB:",i),i}else if(Pe.events.has(t.id)){const i={...Pe.events.get(t.id),...t};return Pe.events.set(t.id,i),i}throw console.error("[SchedulerService] Event not found in DB:",t.id,"Keys:",Array.from(Pe.events.keys())),new Error(`Event with ID ${t.id} not found`)}async deleteEvent(t){await this.simulateLatency();const n=String(t);Pe.events.has(n)?Pe.events.delete(n):Pe.events.has(t)&&Pe.events.delete(t)}async getResources(){return await this.simulateLatency(),Array.from(Pe.resources.values())}async addResource(t){return await this.simulateLatency(),t.id||(t.id=Math.random().toString(36).substring(2,9)),Pe.resources.set(t.id,t),t}simulateLatency(){return new Promise(t=>setTimeout(t,300))}}class jy{name="RecurrenceEngine";expandEvents(t,n,r){const i=[];return t.forEach(o=>{if(o.recurrenceRule||o.rrule)try{const a=o.recurrenceRule||o.rrule||"";if(!a)return;const c=new Date(o.start),d=new Date(o.end),u=Di.RRule.parseString(a);u.dtstart=c;const m=new Di.RRule(u).between(n,r,!0),v=new Set;o.exdate&&Array.isArray(o.exdate)?o.exdate.forEach(f=>{const p=new Date(f).getTime();isNaN(p)||v.add(p)}):typeof o.recurrenceException=="string"&&o.recurrenceException.split(",").forEach(f=>{const p=new Date(f).getTime();isNaN(p)||v.add(p)}),m.forEach(f=>{if(v.has(f.getTime()))return;const p=d.getTime()-c.getTime();if(isNaN(p))return;const x=new Date(f.getTime()+p);i.push({...o,id:`${o.id}-${f.getTime()}`,recurrenceId:String(o.id),start:f,end:x,originalStart:c})})}catch(a){console.error(`Error processing recurrence rule for event ${o.id}:`,a),i.push(o)}else i.push(o)}),i}cleanup(){}}const If=(e,t,n)=>{const{events:r,serviceRegistry:i=oe,showWeekend:o=!0,recurrenceEngine:a,onEventCreate:c,onEventChange:d,onEventDelete:u}=e,h=sn(),m=jt(i,"SchedulerService",()=>new Pf(r||[])),v=a||jt(i,"RecurrenceEngine",()=>new jy);s.useEffect(()=>{r&&r.length>0&&(m.initializeWithData(r),h.invalidateQueries({queryKey:["scheduler-events"]}))},[r,m,h]);const f=s.useMemo(()=>{let E,C;if(t==="day"||t==="timeline-day")E=K.startOfDay(n),C=K.endOfDay(n);else if(t==="month"||t==="timeline-month")E=t==="month"?K.startOfWeek(K.startOfMonth(n),{weekStartsOn:0}):K.startOfMonth(n),C=t==="month"?K.endOfWeek(K.endOfMonth(n),{weekStartsOn:0}):K.endOfMonth(n);else if(t==="week"||t==="workweek"||t==="timeline-week"){const M=K.startOfWeek(n,{weekStartsOn:0});E=t==="workweek"?K.addDays(M,1):M,C=t==="workweek"?K.addDays(M,5):K.endOfWeek(n,{weekStartsOn:0})}else E=K.startOfDay(n),C=K.endOfDay(n);try{const M=K.eachDayOfInterval({start:E,end:C});return o?M:M.filter(D=>{const A=D.getDay();return A!==0&&A!==6})}catch{return[n]}},[t,n,o]),p=f.length>0?K.startOfDay(f[0]):new Date,x=f.length>0?K.endOfDay(f[f.length-1]):new Date,{data:g=[]}=oh({queryKey:["scheduler-events",p.toISOString(),x.toISOString()],queryFn:()=>m.getEvents(p,x),placeholderData:r||[]}),b=s.useMemo(()=>f.length===0?[]:v.expandEvents(g,p,x),[g,f,v,p,x]),y=s.useMemo(()=>f.length?b.filter(E=>K.isWithinInterval(E.start,{start:p,end:x})||K.isWithinInterval(E.end,{start:p,end:x})||E.start<p&&E.end>x):[],[b,f,p,x]),S=Le({mutationFn:async E=>{const C=await m.addEvent(E);return c&&await c(C),C},onMutate:async E=>{const C=["scheduler-events",p.toISOString(),x.toISOString()];await h.cancelQueries({queryKey:C});const M=h.getQueryData(C);return h.setQueryData(C,(D=[])=>{const A={...E,id:E.id||Date.now().toString(),start:E.start||new Date,end:E.end||new Date};return[...D,A]}),{previousEvents:M,queryKey:C}},onError:(E,C,M)=>{M?.previousEvents&&h.setQueryData(M.queryKey,M.previousEvents)},onSettled:()=>{h.invalidateQueries({queryKey:["scheduler-events"]})}}),z=Le({mutationFn:async E=>{const C=await m.updateEvent(E);return d&&await d(C),C},onMutate:async E=>{const C=["scheduler-events",p.toISOString(),x.toISOString()];await h.cancelQueries({queryKey:C});const M=h.getQueryData(C);return h.setQueryData(C,(D=[])=>D.map(A=>A.id===E.id?E:A)),{previousEvents:M,queryKey:C}},onError:(E,C,M)=>{M?.previousEvents&&h.setQueryData(M.queryKey,M.previousEvents)},onSettled:()=>{h.invalidateQueries({queryKey:["scheduler-events"]})}}),N=Le({mutationFn:async E=>(await m.deleteEvent(E),u&&await u(E.toString()),E),onMutate:async E=>{const C=["scheduler-events",p.toISOString(),x.toISOString()];await h.cancelQueries({queryKey:C});const M=h.getQueryData(C);return h.setQueryData(C,(D=[])=>D.filter(A=>A.id!==E)),{previousEvents:M,queryKey:C}},onError:(E,C,M)=>{M?.previousEvents&&h.setQueryData(M.queryKey,M.previousEvents)},onSettled:()=>{h.invalidateQueries({queryKey:["scheduler-events"]})}});return{schedulerService:m,recurrenceEngine:v,daysInView:f,visibleEvents:y,allEvents:g,addEvent:S.mutateAsync,updateEvent:z.mutateAsync,deleteEvent:N.mutateAsync,isUpdating:S.isPending||z.isPending||N.isPending}},ky=e=>{const{overscanCount:t=2,startHour:n="00:00",endHour:r="24:00"}=e,i=parseInt(n.split(":")[0],10),o=parseInt(r.split(":")[0],10),c=60/(e.slotDuration||30),d=Math.max(1,(o-i)*c),{rowVirtualizer:u,columnVirtualizer:h,parentRef:m}=fl({rowCount:d,rowHeight:64,overscanCount:t,progressiveRendering:e.progressiveRendering,prefetchDistance:e.prefetchDistance,enableColumnVirtualization:e.view?.startsWith("timeline"),columnCount:e.view?.startsWith("timeline")?d:0,columnWidth:100,id:e.id,debug:e.debugVirtualization,onScrollStart:()=>{e.virtualScrollStart&&e.virtualScrollStart({virtualizer:{}})},onScrollStop:()=>{e.virtualScrollStop&&e.virtualScrollStop({virtualizer:{}})}});return{parentRef:m,rowVirtualizer:u,columnVirtualizer:h}},Fy=(e,t,n,r)=>{const i=d=>{t(d),r?.(d)};return{next:()=>{let d=e;n==="day"||n==="timeline-day"?d=K.addDays(e,1):n==="week"||n==="workweek"||n==="timeline-week"?d=K.addWeeks(e,1):(n==="month"||n==="timeline-month")&&(d=K.addMonths(e,1)),i(d)},prev:()=>{let d=e;n==="day"||n==="timeline-day"?d=K.subDays(e,1):n==="week"||n==="workweek"||n==="timeline-week"?d=K.subWeeks(e,1):(n==="month"||n==="timeline-month")&&(d=K.subMonths(e,1)),i(d)},today:()=>{i(new Date)}}},Of=(e,t,n,r,i,o,a={})=>{const c=s.useMemo(()=>{const d=Em(i.scrollToIndex),u=iE(()=>n.getEvents(),f=>n.addEvent(f),f=>n.updateEvent(f),f=>n.deleteEvent(f)),h=wm(i.showSpinner,i.hideSpinner),m=bm(()=>{},i.forceUpdate),v=ym(()=>a.onExportExcel?.(r),()=>a.onExportICS?.(r),()=>{window.print()});return{changeView:i.changeView,changeCurrentView:i.changeView,next:i.next,prev:i.prev,today:i.today,...d,scrollTo:(f,p=0)=>{const g=parseInt(f.split(":")[0])*60+p,y=Math.floor(g/30);i.scrollToIndex(y)},scrollToTime:(f,p)=>{const x=f*60+p,b=Math.floor(x/30);i.scrollToIndex(b)},...u,getEvents:()=>n.getEvents(),getEventsInDateRange:(f,p)=>n.getEvents(f,p),addEvent:f=>n.addEvent(f),saveEvent:f=>n.updateEvent(f),deleteEvent:f=>n.deleteEvent(f),getCurrentViewEvents:()=>r,addResource:f=>i.setResources(p=>[...p,f]),removeResource:f=>i.setResources(p=>p.filter(x=>x.id!==f)),openEditor:(f,p="Add")=>{i.setEditorState({isOpen:!0,mode:p==="Edit"?"edit":"create",event:f})},closeEditor:()=>i.setEditorState({isOpen:!1}),closeQuickInfoPopup:i.closeQuickInfoPopup,...h,...m,...v,...a}},[e,t,r,i,n,a]);qr(o,c)};class Dy extends gr{name="HistoryService";undoStack=[];redoStack=[];maxHistorySize=50;constructor(){super({canUndo:!1,canRedo:!1})}record(t){const n={...t,timestamp:Date.now()};this.undoStack.push(n),this.undoStack.length>this.maxHistorySize&&this.undoStack.shift(),this.redoStack=[],this.updateState()}undo(){if(this.undoStack.length===0)return null;const t=this.undoStack.pop();return this.redoStack.push(t),this.updateState(),t}redo(){if(this.redoStack.length===0)return null;const t=this.redoStack.pop();return this.undoStack.push(t),this.updateState(),t}clear(){this.undoStack=[],this.redoStack=[],this.updateState()}updateState(){this.setState({canUndo:this.undoStack.length>0,canRedo:this.redoStack.length>0})}cleanup(){this.clear(),super.cleanup()}}class Ay{name="SearchService";search(t,n,r={}){if(!n||!n.trim())return t;const i=r.matchCase?n:n.toLowerCase(),o=r.fields||["title","description","location"];return t.filter(a=>o.some(c=>{const d=a[c];return typeof d!="string"?!1:r.matchCase?d.includes(i):d.toLowerCase().includes(i)}))}cleanup(){}}class Hy{name="TimezoneService";constructor(){}toTimezone(t,n){if(!n||n==="UTC"||n==="Local")return new Date(t);try{const i=new Date(t).toLocaleString("en-US",{timeZone:n});return new Date(i)}catch(r){return console.warn(`TimezoneService: Invalid timezone ${n}`,r),new Date(t)}}formatInTimezone(t,n,r){try{return new Intl.DateTimeFormat("en-US",{...r,timeZone:n}).format(new Date(t))}catch(i){return console.error("TimezoneService formatting error:",i),""}}getLocalTimezone(){return Intl.DateTimeFormat().resolvedOptions().timeZone}cleanup(){}}class Ty{name="AttendeeService";constructor(){}isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}getStatusLabel(t){switch(t){case"accepted":return"Accepted";case"declined":return"Declined";case"tentative":return"Tentative";case"needs-action":return"Needs Action";default:return"Unknown"}}cleanup(){}}class Py{name="ReminderService";timer=null;checkInterval=6e4;onReminderTriggered;constructor(){}start(t){this.onReminderTriggered=t,this.timer&&clearInterval(this.timer),this.timer=setInterval(()=>this.checkReminders(),this.checkInterval)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}checkReminders(){console.log("[ReminderService] Checking for due reminders...",this.onReminderTriggered)}getTriggerTime(t,n){return new Date(t.getTime()-n*6e4)}cleanup(){this.stop()}}const Iy=e=>{const t=Rn(e),{serviceRegistry:n,state:r,api:i}=t,a=tr("I18nService")?.dir||"ltr",d=e.dir==="auto"||!e.dir?a:e.dir,u=s.useMemo(()=>My({events:e.events||[],resources:e.resources||[],view:e.view?.toLowerCase()||"week",currentDate:e.selectedDate||new Date,selectedDate:e.selectedDate||new Date,slotDuration:e.slotDuration||30,is24Hour:e.is24Hour??!0}),[]),h=s.useMemo(()=>Ny(u),[u]),m=dn(u);s.useEffect(()=>{e.events&&h.setEvents(e.events)},[e.events]),s.useEffect(()=>{e.resources&&h.setResources(e.resources)},[e.resources]),s.useEffect(()=>{if(e.view){const L=e.view.toLowerCase().replace(/[^a-z]/g,""),$={day:"day",week:"week",workweek:"workweek",month:"month",timelineday:"timeline-day",timelineweek:"timeline-week",timelineworkweek:"timeline-week",timelinemonth:"timeline-month",agenda:"agenda",timeline:"timeline-day"};h.setView($[L]||L)}},[e.view]),s.useEffect(()=>{e.selectedDate&&(h.setCurrentDate(e.selectedDate),h.setSelectedDate(e.selectedDate))},[e.selectedDate]),s.useEffect(()=>{e.slotDuration!==void 0&&h.setSlotDuration(e.slotDuration)},[e.slotDuration]),s.useEffect(()=>{e.is24Hour!==void 0&&h.setIs24Hour(e.is24Hour)},[e.is24Hour]);const{view:v,currentDate:f,events:p}=m,{schedulerService:x,recurrenceEngine:g,daysInView:b,visibleEvents:y,allEvents:S}=If({...e,events:p},v,f),{addEvent:z,updateEvent:N,deleteEvent:E,isUpdating:C}=If({...e,events:p},v,f),{parentRef:M,rowVirtualizer:D,columnVirtualizer:A}=ky(e),{next:_,prev:U,today:G}=Fy(f,h.setCurrentDate,v,e.onDateChange),[Y,te]=s.useState(null),{selectedIndex:Z,setSelectedIndex:P}=_2({totalItems:y.length,enabled:!0,onSelect:L=>{const $=y[L];$&&(te($.id),(document.getElementById(`event-${$.id}`)||document.querySelector(`[data-event-id="${$.id}"]`))?.scrollIntoView({behavior:"smooth",block:"nearest"}))},onAction:L=>{const $=y[L];$&&e.onEventClick&&e.onEventClick($)}}),W=s.useMemo(()=>({showWeekend:e.showWeekend??!0,timeFormat:e.timeFormat,weekRule:e.weekRule||"FirstDay",monthsCount:e.monthsCount||1,eventDragArea:e.eventDragArea,dir:d||"ltr"}),[e.showWeekend,e.timeFormat,e.weekRule,e.monthsCount,e.eventDragArea,d]),I=jt(n,"HistoryService",()=>new Dy),X=jt(n,"SearchService",()=>new Ay),T=jt(n,"TimezoneService",()=>new Hy),j=jt(n,"AttendeeService",()=>new Ty),V=jt(n,"ReminderService",()=>new Py);return{currentView:m.view,selectedDate:m.selectedDate,events:m.events,resources:m.resources,viewEvents:y,nextPeriod:_,prevPeriod:U,setView:h.setView,setDate:h.setSelectedDate,addEvent:z,updateEvent:N,deleteEvent:E,isUpdating:C,selectedIndex:Z,setSelectedIndex:P,highlightedEventId:Y,setHighlightedEventId:te,baseState:r,baseApi:i,...W,useSchedulerImperative:Of,store:u,actions:h,view:v,visibleEvents:y,currentDate:f,setCurrentDate:h.setCurrentDate,next:_,prev:U,daysInView:b,allEvents:S,slotDuration:m.slotDuration,setSlotDuration:h.setSlotDuration,is24Hour:m.is24Hour,setIs24Hour:h.setIs24Hour,today:G,parentRef:M,rowVirtualizer:D,columnVirtualizer:A,schedulerService:x,recurrenceEngine:g,historyService:I,searchService:X,timezoneService:T,attendeeService:j,reminderService:V,serviceRegistry:n}},Oy=({resources:e})=>{const t=s.useMemo(()=>!e||e.length===0?[]:"dataSource"in e[0]?e.flatMap(i=>i.dataSource):e,[e]),[n,r]=s.useState(t);return s.useEffect(()=>{r(t)},[t]),{resources:t,internalResources:n,setInternalResources:r}},Ly=({events:e,onEventChange:t,slotDuration:n=30})=>{const r=s.useCallback(o=>{const{active:a,over:c,delta:d}=o,u=e.find(m=>m.id===a.id||m.id===(a.data?.current?.eventId||a.data?.current?.id));if(!u)return;if(a.data?.current?.type?.startsWith("resize-")){const m=a.data.current.type,v=a.data.current,f=v?.orientation||"vertical",p=v?.pixelsPerSlot||64,x=f==="vertical"?d.y:d.x,g=Math.round(x/p)*n;if(g===0)return;if(m==="resize-bottom"){const b=new Date(u.end.getTime()+g*60*1e3),y=new Date(u.start.getTime()+n*60*1e3),S=b<y?y:b;t?.({...u,end:S})}else if(m==="resize-top"){const b=new Date(u.start.getTime()+g*60*1e3),y=new Date(u.end.getTime()-n*60*1e3),S=b>y?y:b;t?.({...u,start:S})}return}if(typeof c.id=="string"&&c.id.startsWith("slot-")){const m=c.data?.current?.date,v=c.data?.current?.resourceId;if(m){const f=u.end.getTime()-u.start.getTime(),p=new Date(m),x=new Date(p.getTime()+f);t?.({...u,start:p,end:x,resourceId:v==="none"?void 0:v})}return}const h=typeof c.id=="string"&&c.id.startsWith("header-")?c.id.replace("header-",""):null;if(h){const m={...u,resourceId:h};t?.(m)}},[e,t,n]);return{sensors:De.useSensors(De.useSensor(De.PointerSensor,{activationConstraint:{distance:8}})),handleDragEnd:r}},_y=()=>l.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md w-full",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",children:l.jsx(O.AlertTriangle,{className:"w-8 h-8 text-destructive"})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Scheduler Error"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Something went wrong with the scheduler. Please refresh the page or try again."})]}),l.jsxs("button",{onClick:()=>window.location.reload(),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",children:[l.jsx(O.RefreshCw,{className:"w-4 h-4"}),"Refresh Page"]})]})}),Vy=({variant:e="primary",text:t="Loading",className:n})=>{const r="absolute inset-0 bg-background/40 backdrop-blur-[2px] z-[100] flex items-center justify-center transition-all duration-300",i={md:"w-10 h-10"},o={primary:"border-primary/20 border-t-primary",blue:"border-blue-500 border-t-transparent"};return l.jsx("div",{className:H(r,n),children:l.jsxs("div",{className:"flex flex-col items-center gap-3",children:[l.jsx("div",{className:H(i.md,o[e],"rounded-full animate-spin")}),l.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-primary animate-pulse",children:t})]})})},By=()=>l.jsx(Vy,{text:"Synchronizing"}),$y=({start:e,end:t,resourceId:n,resources:r,onSave:i,onCancel:o,onMoreOptions:a,position:c})=>{const[d,u]=s.useState(""),h=s.useRef(null),m=s.useRef(null);s.useEffect(()=>{h.current?.focus()},[]),s.useEffect(()=>{const g=b=>{m.current&&!m.current.contains(b.target)&&o()};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[o]);const v=()=>{d.trim()&&i({title:d,start:e,end:t,resourceId:n})},f=g=>{g.key==="Enter"&&v(),g.key==="Escape"&&o()},p=r?.find(g=>g.id===n),x=K.isBefore(e,new Date);return l.jsxs("div",{ref:m,className:H("fixed z-[100] w-[320px] p-4 rounded-xl shadow-2xl animate-in fade-in zoom-in duration-200","bg-background/80 backdrop-blur-xl border border-white/20 dark:border-white/10","shadow-[0_8px_32px_rgba(0,0,0,0.12)]"),style:{left:Math.min(c.x,window.innerWidth-340),top:Math.min(c.y,window.innerHeight-200)},children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Quick Add"})]}),l.jsx(J,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded-full",onClick:o,children:l.jsx(O.X,{className:"h-3 w-3"})})]}),l.jsx(je,{ref:h,placeholder:"What's the plan?",value:d,onChange:g=>u(g.target.value),onKeyDown:f,className:"mb-4 bg-transparent border-none text-lg font-bold p-0 focus-visible:ring-0 placeholder:text-muted-foreground/50 h-auto"}),l.jsxs("div",{className:"space-y-2 mb-6",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(O.Calendar,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:K.format(e,"EEE, MMM d")})]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(O.Clock,{className:"h-3.5 w-3.5"}),l.jsxs("span",{children:[K.format(e,"h:mm a")," - ",K.format(t,"h:mm a")]})]}),p&&l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx("div",{className:"w-3.5 h-3.5 rounded-full",style:{backgroundColor:p.color||"hsl(var(--primary))"}}),l.jsx("span",{children:p.name})]}),x&&l.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-500 font-medium",children:[l.jsx(O.AlertCircle,{className:"h-3 w-3"}),l.jsx("span",{children:"This event is in the past"})]})]}),l.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[l.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 gap-2 text-muted-foreground hover:text-foreground",onClick:()=>a({title:d,start:e,end:t,resourceId:n}),children:[l.jsx(O.MoreHorizontal,{className:"h-4 w-4"}),"More"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(J,{variant:"ghost",size:"sm",onClick:o,className:"h-8",children:"Cancel"}),l.jsx(J,{size:"sm",onClick:v,className:"h-8 px-4",disabled:!d.trim(),children:"Save"})]})]})]})},Lf=({event:e,style:t,onClick:n,onDoubleClick:r,onDelete:i,orientation:o="vertical",resizable:a=!1,className:c,showTime:d=!0,isBlocked:u=!1,isPast:h=!1,isHighlighted:m=!1,slotDuration:v=30,pixelsPerSlot:f})=>{const p=u||e.isBlock,x=p||h,{attributes:g,listeners:b,setNodeRef:y,transform:S,isDragging:z}=De.useDraggable({id:e.id,data:e,disabled:x}),N=f||(o==="vertical"?64:80),{attributes:E,listeners:C,setNodeRef:M,transform:D,isDragging:A}=De.useDraggable({id:`resize-bottom-${e.id}`,data:{type:"resize-bottom",eventId:e.id,orientation:o,pixelsPerSlot:N},disabled:!a||x}),{attributes:_,listeners:U,setNodeRef:G,transform:Y,isDragging:te}=De.useDraggable({id:`resize-top-${e.id}`,data:{type:"resize-top",eventId:e.id,orientation:o,pixelsPerSlot:N},disabled:!a||x}),Z=A||te,P=N/v;let W=new Date(e.start),I=new Date(e.end);if(z&&S){const L=o==="vertical"?S.y:S.x,$=Math.round(L/P/15)*15;W=K.addMinutes(W,$),I=K.addMinutes(I,$)}else if(te&&Y){const L=o==="vertical"?Y.y:Y.x,$=Math.round(L/P/15)*15;W=K.addMinutes(W,$)}else if(A&&D){const L=o==="vertical"?D.y:D.x,$=Math.round(L/P/15)*15;I=K.addMinutes(I,$)}const X=t?.borderColor||e.color||"hsl(var(--primary))",T=p?{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.05) 10px, rgba(0,0,0,0.05) 20px)",backgroundColor:"rgba(0,0,0,0.02)",color:"gray",borderLeftWidth:"4px",borderColor:"#d1d5db",borderStyle:"solid",opacity:1}:{},j={...t,transform:Ai.CSS.Translate.toString(S),opacity:z?.6:h?.7:1,zIndex:z||Z?100:x?10:20,touchAction:"none",pointerEvents:z||Z?"none":"auto",position:"absolute",backgroundColor:`color-mix(in srgb, ${X} 12%, transparent)`,color:`color-mix(in srgb, ${X} 90%, black)`,borderLeftWidth:"4px",borderColor:X,...p?T:{},...A&&o==="vertical"&&D?{height:`${Math.max((parseInt(t?.height)||0)+D.y,24)}px`}:{},...te&&o==="vertical"&&Y?{top:`${(parseInt(t?.top)||0)+Y.y}px`,height:`${Math.max((parseInt(t?.height)||0)-Y.y,24)}px`}:{},...A&&o==="horizontal"&&D?{width:`${Math.max((parseInt(t?.width)||0)+D.x,24)}px`}:{},...te&&o==="horizontal"&&Y?{left:`${(parseInt(t?.left)||0)+Y.x}px`,width:`${Math.max((parseInt(t?.width)||0)-Y.x,24)}px`}:{}},V=l.jsxs("div",{ref:y,style:j,...g,...b,className:H("absolute rounded-md text-xs border overflow-hidden group select-none flex flex-col","bg-primary/10 border-primary/20 text-foreground shadow-sm hover:shadow-md transition-shadow",z&&"opacity-50 z-50 shadow-xl scale-105 cursor-grabbing ring-2 ring-primary ring-offset-2",m&&"ring-2 ring-primary ring-offset-1 bg-primary/20 shadow-md transition-all duration-300",p&&"bg-muted/50 border-muted opacity-80",!p&&"pointer-events-auto",p&&"pointer-events-auto select-none grayscale",c),onClick:L=>{!z&&!Z&&(L.stopPropagation(),n?.(e))},onDoubleClick:L=>{L.stopPropagation(),r?.(e)},role:"button","aria-label":`Event: ${e.title}`,children:[l.jsxs("div",{className:"flex-1 min-h-0 relative px-2 py-1",children:[l.jsxs("div",{className:"flex items-start justify-between gap-1",children:[l.jsx("div",{className:"font-semibold truncate pr-4 leading-tight",children:e.title}),!p&&l.jsx("button",{className:"opacity-0 group-hover:opacity-100 transition-opacity p-0.5 hover:bg-destructive/10 rounded absolute top-0 right-0 z-10",onClick:L=>{L.stopPropagation(),i?.(e.id)},onPointerDown:L=>L.stopPropagation(),children:l.jsx(O.X,{className:"h-3 w-3 text-muted-foreground hover:text-destructive"})})]}),d&&!p&&l.jsxs("div",{className:"text-[10px] text-muted-foreground truncate leading-tight",children:[K.format(W,"h:mm a")," - ",K.format(I,"h:mm a")]}),e.description&&l.jsx("div",{className:"text-[10px] text-muted-foreground line-clamp-2 leading-tight mt-0.5",children:e.description}),p&&l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("span",{className:"text-xs font-medium text-muted-foreground opacity-70 -rotate-45 select-none",children:"BLOCKED"})})]}),a&&!p&&l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:M,...E,...C,className:H("absolute z-20 hover:bg-primary/20 transition-colors flex items-center justify-center opacity-0 group-hover:opacity-100",o==="vertical"?"bottom-0 left-0 right-0 h-3 cursor-ns-resize":"right-0 top-0 bottom-0 w-3 cursor-ew-resize"),style:{touchAction:"none"},children:l.jsx("div",{className:H("bg-primary/40 rounded-full",o==="vertical"?"w-10 h-1":"h-10 w-1")})}),l.jsx("div",{ref:G,..._,...U,className:H("absolute z-20 hover:bg-primary/20 transition-colors flex items-center justify-center opacity-0 group-hover:opacity-100",o==="vertical"?"top-0 left-0 right-0 h-3 cursor-ns-resize":"left-0 top-0 bottom-0 w-3 cursor-ew-resize"),style:{touchAction:"none"},children:l.jsx("div",{className:H("bg-primary/40 rounded-full",o==="vertical"?"w-10 h-1 shadow-[0_-1px_0_rgba(0,0,0,0.1)]":"h-10 w-1 shadow-[-1px_0_0_rgba(0,0,0,0.1)]")})})]})]});return l.jsx(oi,{content:e.description,enabled:!!e.description&&!z,children:l.jsx(us,{contextId:"scheduler-event",data:e,children:V})})},Wy=({date:e,resourceId:t,children:n,className:r,style:i,onClick:o,onDoubleClick:a,onMouseDown:c,onMouseEnter:d,onContextMenu:u,data:h,isSelected:m,isWorkHour:v})=>{const{active:f}=De.useDndContext(),{setNodeRef:p,isOver:x}=De.useDroppable({id:`slot-${e.toISOString()}-${t||"none"}`,data:{date:e,resourceId:t,...h||{}}}),g=!!f;return l.jsx("div",{ref:p,"data-testid":"scheduler-slot","data-shaded":v===!1,className:H("relative transition-all duration-200",m&&"bg-primary/15",!m&&v===!1&&"bg-background",g&&"before:absolute before:inset-0 before:border before:border-dashed before:border-primary/10 before:pointer-events-none before:z-0",x&&"bg-primary/20 ring-2 ring-primary ring-inset z-10 before:opacity-0",r),style:i,onClick:o,onDoubleClick:a,onMouseDown:c,onMouseEnter:d,onContextMenu:u,children:n})};function _f(e,t=!0){return t?Y3.sanitize(e,{ALLOWED_TAGS:["b","i","em","strong","u","span","div","p","br","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["class","style","href","src","alt","title"],ALLOW_DATA_ATTR:!1}):e}function Uy(e,t,n=!0){if(!e)return null;if(typeof e=="function"){const r=e(t);return typeof r=="string"?{__html:_f(r,n)}:r}return typeof e=="string"?{__html:_f(e,n)}:null}function Gy(e,t="FirstDay"){switch(t){case"FirstDay":return K.getWeek(e,{weekStartsOn:0});case"FirstFourDayWeek":return K.getISOWeek(e);case"FirstFullWeek":return K.getWeek(e,{weekStartsOn:0,firstWeekContainsDate:1});default:return K.getWeek(e)}}const Ky=(e,t,n,r,i,o,a,c,d,u=!0,h=!1)=>{let m=0,v=0;if(u){const b=i/r,y=b/a;m=t*i+n*b+o*y,v=y*.98}else{const b=i/r,y=b/a;m=n*i+t*b+o*y,v=y*.98}const p=((e.start.getHours()-c)*60+e.start.getMinutes())/d*64,g=(e.end.getTime()-e.start.getTime())/(1e3*60)/d*64;return{top:`${p}px`,height:`${Math.max(g,24)}px`,[h?"right":"left"]:`${m}%`,width:`${v}%`,[h?"borderRightWidth":"borderLeftWidth"]:"4px",borderColor:e.color||"hsl(var(--primary))"}},qy=({startHour:e,slotDuration:t,isRtl:n})=>{const r=pl(),o=((r.getHours()-e)*60+r.getMinutes())/t*64;return o<0?null:l.jsxs("div",{className:H("absolute inset-x-0 z-50 pointer-events-none flex items-center"),style:{top:`${o}px`},children:[l.jsx("div",{className:"w-full border-t-2 border-primary"}),l.jsx("div",{className:H("absolute w-3 h-3 bg-primary rounded-full shadow-sm ring-2 ring-background",n?"-right-1.5":"-left-1.5")})]})},Qy=({daysInView:e,visibleEvents:t,rowVirtualizer:n,resources:r=[],showResourcesInDayView:i=!1,onEventClick:o,onEventDoubleClick:a,onEventDelete:c,scrollRef:d,onViewChange:u,onDateChange:h,locale:m,components:v,onRangeSelect:f,onSlotClick:p,onSlotDoubleClick:x,dateHeaderTemplate:g,showWeekNumber:b=!1,weekRule:y="FirstDay",cellTemplate:S,enableHtmlSanitizer:z=!0,showUnassignedLane:N=!1,startHour:E="00:00",slotDuration:C=30,is24Hour:M=!0,setIs24Hour:D,group:A,onCellContextMenu:_,dir:U})=>{const G=U==="rtl",Y=pl(),te=parseInt(E.split(":")[0],10),[Z,P]=s.useState(null),[W,I]=s.useState(!1),X=s.useRef(null),T=(re,ae,R)=>t.some(ie=>(ie.isHoliday||ie.isFullyBooked)&&K.isSameDay(ie.start,re))?!0:t.some(ie=>ie.isBlock&&(ie.resourceId===R||!ie.resourceId&&!R)&&K.areIntervalsOverlapping({start:ie.start,end:ie.end},{start:re,end:ae})),j=(re,ae)=>{const R=K.addMinutes(re,C);if(T(re,R,ae))return;I(!0);const le={start:re,end:R,resourceId:ae};P(le),X.current=le},V=re=>{if(!W||!X.current)return;const ae=new Date(re.getTime()+C*60*1e3),R={...X.current,end:ae};P(R),X.current=R};s.useEffect(()=>{const re=ae=>{if(W&&X.current){const{start:R,end:le,resourceId:ie}=X.current,he=R<le?R:le,ue=R<le?le:R;T(he,ue,ie)||(f?.(he,ue,ie,{x:ae.clientX,y:ae.clientY}),p?.(he,ie))}I(!1),P(null),X.current=null};return window.addEventListener("mouseup",re),()=>window.removeEventListener("mouseup",re)},[W,f,p]);const L=L2("(max-width: 768px)"),$=s.useMemo(()=>{let re=i&&r.length>0?[...r]:[];return(N||i&&re.length===0)&&(re.find(ae=>ae.id===""||ae.id==="unassigned")||re.unshift({id:"unassigned",name:"Unassigned",type:"Global Inbox",color:"hsl(var(--muted-foreground))"})),re.length>0?re:[{id:"",name:""}]},[r,i,N]),se=L&&i&&$.length>1,ne=!L&&($.length>3||e.length>3&&$.length>1),de=se||ne,Me=e.length*$.length*150,ve={width:de&&Me>0?`${Me}px`:"100%",minWidth:"100%"},Q=new Intl.DateTimeFormat(m,{day:"numeric"}),q=A?.byDate??!0,me=q?e:$,ye=q?$:e,ke=me,xe=ye,Ce=100/ke.length,ee=100/xe.length;return l.jsxs("div",{ref:d,"data-testid":"scheduler-scroll-container","data-view":"day-week",style:{scrollbarGutter:"stable"},className:H("flex-1 flex flex-col min-h-0 relative overflow-auto bg-background select-none border border-border rounded-lg",de&&"snap-x snap-mandatory"),children:[l.jsxs("div",{className:"sticky top-0 z-50 bg-background/95 backdrop-blur-md border-b border-border flex shrink-0",style:ve,children:[b&&l.jsx("div",{className:H("w-12 shrink-0 sticky z-50 bg-background border-e border-border flex items-center justify-center",G?"right-0":"left-0"),children:l.jsx("span",{className:"text-[9px] font-bold text-muted-foreground uppercase tracking-wider",children:"WK"})}),l.jsxs("div",{className:H("w-24 shrink-0 sticky bg-background border-e border-border z-50 cursor-pointer hover:bg-muted/50 transition-colors flex flex-col items-center justify-center gap-1 group",b?G?"right-12":"left-12":G?"right-0":"left-0"),onClick:()=>D?.(!M),title:"Toggle 24h / AM-PM format",children:[l.jsx(O.Clock,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors"}),l.jsx("span",{className:"text-[9px] font-bold uppercase text-muted-foreground/60 group-hover:text-primary/70",children:M?"24 Hours":"AM / PM"})]}),l.jsx("div",{className:"flex flex-1",style:de?{width:"100%"}:void 0,children:ke.map(re=>{const ae=q,R=ae?re:null,le=ae?null:re,ie=ae&&K.isSameDay(R,new Date);return l.jsxs("div",{style:{width:`${Ce}%`},className:"flex flex-col border-e border-border last:border-e-0",children:[l.jsx("div",{className:H("flex flex-col items-center justify-center py-3 transition-colors shrink-0 border-e-2 border-foreground/20",ie&&"bg-background"),children:ae?(()=>{const he=t.find(ue=>(ue.isHoliday||ue.isFullyBooked)&&K.isSameDay(ue.start,R));return l.jsxs("div",{className:"flex flex-col items-center relative w-full",children:[he?.isHoliday&&l.jsx("span",{className:"absolute -top-1 px-1.5 py-0.5 bg-destructive/10 text-destructive text-[9px] font-black uppercase tracking-tighter rounded-full border border-destructive/20 mb-1 leading-none shadow-sm",children:"Holiday"}),he?.isFullyBooked&&l.jsx("span",{className:"absolute -top-1 px-1.5 py-0.5 bg-amber-500/10 text-amber-600 text-[9px] font-black uppercase tracking-tighter rounded-full border border-amber-500/20 mb-1 leading-none shadow-sm",children:"Fully Booked"}),g?l.jsx("div",{className:"h-full w-full flex items-center justify-center pt-2",children:typeof g=="function"?g({date:R,type:"Day",text:Q.format(R)}):g}):l.jsx("div",{className:"flex flex-col items-center cursor-pointer hover:bg-muted/50 transition-colors pt-2",onClick:()=>{u&&h&&(h(R),u("day"))},children:e.length>1&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:H("text-base font-medium mt-0.5",ie?"text-primary font-bold":"text-foreground"),children:K.format(R,"dd MMM yyyy")}),l.jsx("span",{className:H("text-sm font-medium uppercase tracking-wider",ie?"text-primary":"text-muted-foreground/80"),children:K.format(R,"EEE")})]})})]})})():l.jsxs("div",{className:"flex items-center gap-2 px-2",children:[l.jsxs(ct,{className:"h-8 w-8 shadow-sm border border-background",children:[le.avatar&&l.jsx(Nt,{src:le.avatar}),l.jsx(dt,{className:"text-xs font-bold",children:le.name?.charAt(0)})]}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-bold truncate",children:le.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground truncate",children:le.type||"Resource"})]})]})}),xe.length>0&&l.jsx("div",{className:"flex w-full border-t border-border bg-background h-10 shrink-0",children:xe.map((he,ue)=>{const fe=ae?null:he,ge=ae?he:null,be=fe?t.find(Te=>Te.isHoliday&&K.isSameDay(Te.start,fe)):null,He=fe?t.find(Te=>Te.isFullyBooked&&K.isSameDay(Te.start,fe)):null;return l.jsx("div",{style:{width:`${ee}%`},className:H("flex items-center justify-center px-1 border-e border-border/30 last:border-e-0 group",de&&"snap-center",(ue%2===0,"bg-background")),children:ae?l.jsxs(l.Fragment,{children:[l.jsxs(ct,{className:"h-4 w-4 me-1 shadow-sm border border-background",children:[ge.avatar&&l.jsx(Nt,{src:ge.avatar}),l.jsx(dt,{className:"text-[7px] font-bold",children:ge.name?.charAt(0)})]}),l.jsx("span",{className:"text-[9px] font-bold text-muted-foreground truncate group-hover:text-foreground transition-colors",children:ge.name})]}):l.jsxs("div",{className:"flex flex-col items-center justify-center",children:[be&&l.jsx("span",{className:"text-xs font-black uppercase tracking-wider text-destructive bg-destructive/10 px-2 py-0.5 rounded-sm mb-0.5",children:"Holiday"}),He&&l.jsx("span",{className:"text-xs font-black uppercase tracking-wider text-amber-600 bg-amber-500/10 px-2 py-0.5 rounded-sm mb-0.5",children:"Fully Booked"}),l.jsx("span",{className:H("text-[10px] font-bold text-muted-foreground uppercase",be&&"text-destructive",He&&"text-amber-600"),children:K.format(fe,"EEE d")})]})},fe?fe.toISOString():ge.id)})})]},ae?R.toISOString():le.id)})})]}),l.jsxs("div",{"data-testid":"scheduler-virtual-body",className:"relative shrink-0",style:{height:`${n.getTotalSize()}px`,...ve},children:[n.getVirtualItems().map(re=>{const ae=re.index*C,R=te+Math.floor(ae/60),le=ae%60;let ie="";if(M)ie=`${R<10?"0"+R:R}:${le<10?"0"+le:le}`;else{const he=R>=12?"PM":"AM",ue=R%12||12;ie=`${ue<10?"0"+ue:ue}:${le<10?"0"+le:le} ${he}`}return l.jsxs("div",{className:"absolute left-0 w-full flex",style:{height:"64px",top:`${re.start}px`},children:[l.jsxs("div",{className:H("w-24 shrink-0 flex flex-col items-end justify-center pe-3 border-e border-border bg-background z-50 sticky backdrop-blur-md",G?"right-0":"left-0"),children:[ie&&l.jsx("span",{className:"text-sm text-foreground font-black bg-background px-1 relative z-50 uppercase tracking-tighter tabular-nums",children:ie}),b&&R===0&&l.jsxs("span",{className:"text-[9px] text-muted-foreground/60 font-semibold mt-1",children:["W",Gy(e[0],y)]})]}),l.jsxs("div",{className:"flex flex-1 relative",style:{height:"64px"},children:[l.jsx("div",{className:"absolute bottom-0 left-0 w-full border-b border-border/40"}),l.jsx("div",{className:"absolute top-1/2 left-0 w-full border-b border-dashed border-border/20 h-px"}),ke.map(he=>l.jsx("div",{style:{width:`${Ce}%`},className:"h-full flex relative border-e-2 border-foreground/20 last:border-e-0",children:xe.map((ue,fe)=>{const ge=q?he:ue,be=q?ue:he,He=re.index+te,Te=ge.getDay(),zt=t.find(Ue=>Ue.isHoliday&&K.isSameDay(Ue.start,ge)),ur=t.find(Ue=>Ue.isFullyBooked&&K.isSameDay(Ue.start,ge));let Mt=!0;be.workingHours?Mt=be.workingHours.days.includes(Te)&&He>=be.workingHours.start&&He<be.workingHours.end:Mt=Te!==0&&Te!==6&&He>=9&&He<17;const _e=new Date(new Date(ge).setHours(R,le,0,0)),Fi=K.isSameDay(ge,new Date),_n=!!Z&&Z.resourceId===be.id&&_e>=Z.start&&_e<Z.end;return l.jsx(Wy,{date:_e,resourceId:be.id,isWorkHour:Mt,isSelected:_n,onMouseDown:()=>j(_e,be.id),onMouseEnter:()=>V(_e),onDoubleClick:()=>{const Ue=K.addMinutes(_e,C);T(_e,Ue,be.id)||x?.(_e,be.id)},onContextMenu:Ue=>{Ue.preventDefault(),_?.({date:_e,x:Ue.clientX,y:Ue.clientY})},style:{width:`${ee}%`,minWidth:"auto",height:"100%"},className:H("border-e border-border/30 relative cursor-pointer hover:bg-primary/5 transition-colors pointer-events-auto",fe===xe.length-1&&"border-e-0",de&&"snap-center",zt&&"bg-[repeating-linear-gradient(-45deg,hsl(var(--destructive)/0.05)_0px,hsl(var(--destructive)/0.05)_10px,transparent_10px,transparent_20px)] bg-destructive/[0.02]",ur&&"bg-[repeating-linear-gradient(-45deg,theme(colors.amber.500/0.05)_0px,theme(colors.amber.500/0.05)_10px,transparent_10px,transparent_20px)] bg-amber-500/[0.02]",!zt&&!ur&&"bg-background"),children:S?(()=>{const Ue={date:_e,resourceId:be.id,isWorkHour:Mt,isToday:Fi},vt=Uy(S,Ue,z);return vt&&typeof vt=="object"&&"__html"in vt?l.jsx("div",{className:"w-full h-full",dangerouslySetInnerHTML:vt}):l.jsx("div",{className:"w-full h-full",children:vt})})():v?.timeSlot?l.jsx(v.timeSlot,{date:_e,isWorkHour:Mt}):null},q?be.id||fe:ge.toISOString()||fe)})},q?he.toISOString():he.id))]})]},re.index)}),l.jsxs("div",{className:"absolute top-0 h-full z-10",style:{width:"calc(100% - 6rem)",[G?"right":"left"]:"6rem",pointerEvents:"none"},children:[l.jsx(qy,{startHour:te,slotDuration:C,isRtl:G}),e.map((re,ae)=>{const R=t.filter(ie=>K.isSameDay(re,ie.start));R.sort((ie,he)=>ie.start.getTime()-he.start.getTime());const le=new Map;return R.forEach(ie=>{let he=ie.resourceId;!he&&N&&(he="unassigned");let ue=$.findIndex(fe=>fe.id===he);if(ue===-1)if($.length===1&&($[0].id===""||!i))ue=0;else return;le.has(ue)||le.set(ue,[]),le.get(ue).push(ie)}),[...le.entries()].map(([ie,he])=>{const ue=[];return he.forEach(fe=>{let ge=!1;for(const be of ue)if(be.some(He=>K.areIntervalsOverlapping({start:He.start,end:He.end},{start:fe.start,end:fe.end}))){be.push(fe),ge=!0;break}ge||ue.push([fe])}),ue.map(fe=>{const ge=[];return fe.forEach(be=>{let He=!1;for(let Te=0;Te<ge.length;Te++)if(!ge[Te].some(zt=>K.areIntervalsOverlapping({start:zt.start,end:zt.end},{start:be.start,end:be.end}))){ge[Te].push(be),He=!0;break}He||ge.push([be])}),fe.map(be=>{const He=ge.findIndex(zt=>zt.includes(be)),Te=Ky(be,ae,ie,q?$.length:e.length,Ce,He,ge.length,te,C,q,G);return l.jsx(Lf,{event:be,style:Te,onClick:o,onDoubleClick:a,onDelete:c,components:v,orientation:"vertical",resizable:!0,isBlocked:be.isBlock,isPast:be.end<Y,slotDuration:C,pixelsPerSlot:64},be.id)})})})})]})]})]})},Yy=({currentDate:e,daysInView:t,visibleEvents:n,onSlotClick:r,onSlotDoubleClick:i,onEventClick:o,components:a,moreEventsClick:c,dir:d})=>{const u=d==="rtl",h=a?.event,m=a?.timeSlot,v=f=>n.filter(p=>K.isSameDay(p.start,f));return l.jsx(kn,{children:l.jsxs("div",{className:"flex flex-col h-full w-full bg-background rounded-xl border border-border overflow-hidden shadow-sm",children:[l.jsx("div",{className:"grid grid-cols-7 border-b border-border bg-muted/30",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((f,p)=>l.jsx("div",{className:"py-3 text-center text-xs font-semibold uppercase text-muted-foreground tracking-widest",children:f},p))}),l.jsx("div",{className:"grid grid-cols-7 grid-rows-6 flex-1 min-h-0 bg-muted/20 gap-px",children:t.map(f=>{const p=v(f).filter(N=>!N.isBlock),x=K.isSameMonth(f,e),g=K.isSameDay(f,new Date),b=4,y=p.slice(0,b),S=p.length-b,z=p.length;return l.jsx("div",{onClick:()=>r?.(f),onDoubleClick:()=>i?.(f),className:H("relative flex flex-col p-2 transition-colors group bg-background focus-visible:z-10",!x&&"bg-muted/5 text-muted-foreground/50",x&&"hover:bg-muted/30","min-h-[100px]"),children:m?l.jsx(m,{date:f}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:H("flex items-center mb-2 pointer-events-none",u?"flex-row-reverse":"justify-between"),children:[l.jsx("span",{className:H("text-sm font-medium w-7 h-7 flex items-center justify-center rounded-full transition-all",g?"bg-primary text-primary-foreground shadow-sm font-bold scale-110":"text-foreground group-hover:bg-muted/50",!x&&"text-muted-foreground opacity-50"),children:K.format(f,"d")}),z>0&&l.jsx("span",{className:"text-[10px] text-muted-foreground font-medium px-1.5 py-0.5 rounded-full bg-muted/50",children:z})]}),l.jsxs("div",{className:"flex-1 flex flex-col gap-1.5 min-w-0",children:[y.map(N=>l.jsxs(Fn,{delayDuration:300,children:[l.jsx(Dn,{asChild:!0,children:l.jsx("div",{onClick:E=>{E.stopPropagation(),o?.(N)},className:H("group/event relative",!h&&"flex items-center gap-2 px-2 py-1 rounded-md text-xs font-medium cursor-pointer transition-all shadow-sm hover:shadow-md border border-transparent hover:border-border/50 overflow-hidden bg-card hover:bg-accent/50",!h&&!x&&"opacity-60 grayscale"),style:h?void 0:{[u?"borderRight":"borderLeft"]:`3px solid ${N.color||"oklch(var(--primary))"}`},children:h?l.jsx(h,{event:N}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex-1 truncate leading-tight",children:N.title}),N.start&&l.jsx("span",{className:"text-[10px] text-muted-foreground/70 tabular-nums shrink-0",children:K.format(N.start,"h:mm a")})]})})}),l.jsx(ln,{className:"p-3 max-w-xs bg-popover/95 backdrop-blur-sm border-border/50 shadow-xl",sideOffset:5,children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/50 pb-1.5",children:[l.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:N.color||"oklch(var(--primary))"}}),l.jsx("span",{className:"font-semibold text-sm truncate",children:N.title})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-0.5",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"font-medium text-foreground/80",children:"Time:"}),l.jsxs("span",{children:[K.format(N.start,"MMM d, h:mm a")," - ",K.format(N.end,"h:mm a")]})]}),N.location&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"font-medium text-foreground/80",children:"Location:"}),l.jsx("span",{children:N.location})]}),N.description&&l.jsx("div",{className:"pt-1 mt-1 border-t border-border/30 text-muted-foreground/80 line-clamp-3",children:N.description})]})]})})]},N.id)),S>0&&l.jsxs("button",{onClick:N=>{N.stopPropagation(),c?.({date:f})},className:"mt-auto self-start text-[10px] bg-muted/50 hover:bg-muted text-muted-foreground hover:text-foreground font-medium px-2 py-1 rounded-md transition-colors w-full text-left",children:["+",S," more"]})]})]})},f.toISOString())})})]})})},Xy=({view:e,daysInView:t,visibleEvents:n,resources:r=[],onSlotClick:i,onSlotDoubleClick:o,onEventClick:a,onEventDelete:c,onRangeSelect:d,components:u,currentTimeIndicator:h,showResourceHeaders:m=!0,group:v,showUnassignedLane:f=!1,startHour:p="00:00",endHour:x="24:00",slotDuration:g=60,is24Hour:b=!1,scrollRef:y,dir:S})=>{const z=S==="rtl",N=pl(),E=p?parseInt(p.split(":")[0],10):0,C=x?parseInt(x.split(":")[0],10):24,M=C-E,[D,A]=s.useState(null),[_,U]=s.useState(!1),G=s.useRef(null),Y=s.useRef(null),te=e==="timeline-month",Z=te?1440:g,P=60/Z,W=te?1:M*P,I=t.length*W,X=te?120:80,T=I*X,j=s.useMemo(()=>{const ee=r.length>0?[...r]:[];return(f||ee.length===0)&&(ee.find(re=>re.id==="unassigned")||ee.unshift({id:"unassigned",name:"Unassigned",type:"Global Inbox",color:"hsl(var(--muted-foreground))"})),ee},[r,f]),V=s.useMemo(()=>{if(!v||!v.resources||v.resources.length===0)return{isGrouped:!1,groups:[{name:"All",resources:j}]};const ee=v.resources[0],re=new Map;j.forEach(R=>{const le=R[ee]||"Unassigned";re.has(le)||re.set(le,[]),re.get(le)?.push(R)});const ae=[];return re.forEach((R,le)=>{ae.push({name:le,resources:R})}),{isGrouped:!0,groups:ae}},[j,v]),L=s.useMemo(()=>V.groups.flatMap(ee=>ee.resources),[V]),$=ee=>{if(te)return K.startOfDay(t[ee]);const re=Math.floor(ee/W),ae=ee%W,R=K.startOfDay(t[re]);return K.addMinutes(R,E*60+ae*Z)},se=ee=>{if(te){const ie=t.findIndex(he=>K.isSameDay(he,K.startOfDay(ee)));return ie!==-1?ie*X:-1}const re=K.startOfDay(ee),ae=t.findIndex(ie=>K.isSameDay(ie,re));if(ae===-1)return-1;const le=K.differenceInMinutes(ee,re)-E*60;return(ae*M*60+le)/Z*X},de=(()=>{if(te){const ae=K.startOfDay(t[0]),R=K.startOfDay(t[t.length-1]);return N<ae||N>R?null:se(N)}const ee=se(N),re=N.getHours();return ee===-1||re<E||re>=C?null:ee})(),pe=s.useRef(!1);s.useEffect(()=>{y?.current&&de!==null&&!pe.current&&setTimeout(()=>{y.current&&(z?y.current.scrollLeft=-de:y.current.scrollLeft=de,pe.current=!0)},50)},[y,de,e]);const we=(ee,re)=>{const ae=$(ee);if(n.some(ie=>(ie.isHoliday||ie.isFullyBooked)&&K.isSameDay(ie.start,ae)))return;U(!0);const le={startSlot:ee,endSlot:ee,resourceId:re};A(le),G.current=le},Me=ee=>{if(!_||!G.current)return;const re={...G.current,endSlot:ee};A(re),G.current=re};s.useEffect(()=>{const ee=re=>{if(_&&G.current){const{startSlot:ae,endSlot:R,resourceId:le}=G.current,ie=Math.min(ae,R),he=Math.max(ae,R),ue=$(ie),fe=$(he+1);n.some(be=>(be.isHoliday||be.isFullyBooked)&&K.isSameDay(be.start,ue))||(d?.(ue,fe,le,{x:re.clientX,y:re.clientY}),i?.(ue,le))}U(!1),A(null),G.current=null};return window.addEventListener("mouseup",ee),()=>window.removeEventListener("mouseup",ee)},[_,d,i,t]);const ve=(ee,re)=>{if(!D||D.resourceId!==re)return!1;const ae=Math.min(D.startSlot,D.endSlot),R=Math.max(D.startSlot,D.endSlot);return ee>=ae&&ee<=R},{resourceMap:Q,maxLevels:q}=s.useMemo(()=>{const ee=new Map,re=new Map;return L.forEach(ae=>{ee.set(ae.id,[]),re.set(ae.id,1)}),n.forEach(ae=>{const R=ae.resourceId||"unassigned",le=String(R);ee.has(le)?ee.get(le)?.push(ae):ee.has("unassigned")}),ee.forEach((ae,R)=>{const le=[...ae].sort((ue,fe)=>ue.start.getTime()-fe.start.getTime()),ie=[],he=le.map(ue=>{let fe=0;const ge=300*1e3;for(;ie[fe]!==void 0&&ie[fe]>ue.start.getTime()+ge;)fe++;return ie[fe]=ue.end.getTime(),{...ue,level:fe}});ee.set(R,he),re.set(R,ie.length||1)}),{resourceMap:ee,maxLevels:re}},[n,L]),me=ee=>{const re=se(ee.start),ae=se(ee.end);if(re===-1&&ae===-1)return{display:"none"};const R=Math.max(0,re),le=ae===-1?T:Math.min(T,ae),ie=Math.max(0,le-R);if(ie<=4)return{display:"none"};const he=36,fe=20+ee.level*(he+10),ge=ee.color||"hsl(var(--primary))";return{[z?"right":"left"]:`${R}px`,width:`${Math.max(ie,4)}px`,top:`${fe}px`,height:`${he}px`,background:`linear-gradient(135deg, color-mix(in srgb, ${ge} 20%, transparent), color-mix(in srgb, ${ge} 10%, transparent))`,backdropFilter:"blur(4px)",[z?"borderRight":"borderLeft"]:`4px solid ${ge}`,borderTop:`1px solid color-mix(in srgb, ${ge} 30%, transparent)`,[z?"borderLeft":"borderRight"]:`1px solid color-mix(in srgb, ${ge} 30%, transparent)`,borderBottom:`1px solid color-mix(in srgb, ${ge} 30%, transparent)`,color:"hsl(var(--foreground))",borderRadius:"6px",boxShadow:"0 2px 8px -2px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"600",paddingInlineStart:"12px",paddingInlineEnd:"8px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",zIndex:20+ee.level,cursor:"pointer"}},ye=u?.resourceHeader,ke=40,xe=240,Ce=m?V.isGrouped?ke+xe:xe:0;return l.jsxs("div",{className:"flex flex-col h-full w-full overflow-hidden border border-border/40 rounded-xl bg-background shadow-sm",children:[l.jsxs("div",{className:"flex bg-background z-40 sticky top-0 border-b border-border/40 shadow-[0_1px_2px_rgba(0,0,0,0.03)] items-center",children:[m&&V.isGrouped&&l.jsx("div",{className:H("w-[40px] shrink-0 border-e border-border/40 p-1 flex items-center justify-center bg-background select-none sticky z-50",z?"right-0":"left-0"),children:l.jsx("div",{className:"writing-mode-vertical rotate-180 font-bold text-[10px] uppercase tracking-widest text-muted-foreground/70",children:"Group"})}),m&&l.jsx("div",{className:H("w-[240px] shrink-0 border-e border-border/40 px-6 py-4 font-bold text-[11px] uppercase tracking-widest flex items-center bg-background text-muted-foreground select-none sticky z-50",V.isGrouped?z?"right-[40px]":"left-[40px]":z?"right-0":"left-0"),children:"RESOURCES"}),l.jsx("div",{ref:Y,className:"overflow-hidden flex-1 relative",children:l.jsx("div",{className:"flex",style:{width:T},children:t.map(ee=>{const re=t.length===1,ae=ee.getDay()===0||ee.getDay()===6;return te?l.jsxs("div",{className:H("flex shrink-0 border-e border-border/30 h-14 flex-col justify-center items-center transition-colors select-none",ae?"bg-muted/10":"bg-transparent hover:bg-muted/5"),style:{width:X},children:[l.jsx("span",{className:H("text-[10px] font-bold uppercase mb-0.5 tracking-wider",ae?"text-muted-foreground":"text-primary"),children:K.format(ee,"EEE")}),l.jsx("span",{className:H("text-xs font-semibold",ae?"text-muted-foreground/70":"text-foreground/80"),children:K.format(ee,"d")})]},ee.toISOString()):l.jsx("div",{className:"flex shrink-0 border-e border-border/40",style:{width:T/t.length},children:Array.from({length:W}).map((R,le)=>{const ie=le*Z,he=E+Math.floor(ie/60),ue=ie%60,fe=new Date(new Date().setHours(he,ue,0,0));let ge="";return b?ge=K.format(fe,"HH:mm"):ge=Z<60||ue!==0?K.format(fe,"h:mm a"):K.format(fe,"ha"),l.jsxs("div",{className:"flex flex-col justify-end pb-2 border-e border-border/10 last:border-e-0 relative h-14",style:{width:X},children:[!re&&le===0&&l.jsx("div",{className:H("absolute top-2 px-2 py-0.5 rounded text-[10px] font-bold text-foreground/80 bg-muted/50 border border-border/20 whitespace-nowrap",z?"right-2":"left-2"),children:K.format(ee,"EEE, MMM d")}),l.jsx("span",{className:"text-[11px] font-black text-foreground text-center px-1 select-none tabular-nums truncate",children:ge})]},le)})},ee.toISOString())})})})]}),l.jsx("div",{ref:y,"data-testid":"scheduler-scroll-container",className:"flex-1 overflow-auto relative custom-scrollbar bg-background",onScroll:ee=>{Y.current&&(Y.current.scrollLeft=ee.currentTarget.scrollLeft)},children:l.jsxs("div",{className:"relative min-w-max",style:{width:T+Ce,minHeight:"100%"},children:[de!==null&&h!==!1&&l.jsxs("div",{className:"current-time-indicator z-50 pointer-events-none",style:{[z?"right":"left"]:`${de+Ce}px`,height:"100%"},children:[l.jsx("div",{className:"absolute top-0 -translate-x-1/2 w-[2px] h-full bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.6)]"}),l.jsx("div",{className:"absolute top-0 -translate-x-1/2 -mt-1 w-2.5 h-2.5 rounded-full bg-red-500 shadow-md border-2 border-background"})]}),V.groups.map(ee=>l.jsxs("div",{className:"flex border-b border-border/30 relative",children:[m&&V.isGrouped&&l.jsxs("div",{className:H("w-[40px] shrink-0 sticky z-30 bg-background border-e border-border/40 flex items-center justify-center p-1",z?"right-0":"left-0"),style:{height:"auto"},children:[l.jsx("div",{className:"absolute inset-0 bg-background/80"}),l.jsx("div",{className:"relative writing-mode-vertical transform rotate-180 text-[10px] font-bold uppercase tracking-wide text-foreground/70 whitespace-nowrap py-2 overflow-hidden text-ellipsis max-h-full",children:ee.name})]}),l.jsx("div",{className:"flex flex-col w-full",children:ee.resources.map((re,ae)=>{const le=(q.get(re.id)||1)*46+40;return l.jsxs("div",{className:H("flex border-b border-border/30 last:border-b-0 group/row hover:bg-muted/5 transition-colors",(ae%2===0,"bg-background")),style:{height:`${le}px`},children:[l.jsx("div",{className:H("w-[240px] shrink-0 sticky z-30 bg-background/95 backdrop-blur border-e border-border/40 px-6 py-4 flex items-center gap-4 transition-all shadow-[1px_0_4px_rgba(0,0,0,0.02)]",V.isGrouped?z?"right-[40px]":"left-[40px]":z?"right-0":"left-0",!m&&"hidden"),children:ye?l.jsx(ye,{resource:re}):l.jsxs(l.Fragment,{children:[l.jsxs(ct,{className:"h-9 w-9 border border-border/60 shadow-sm",children:[re.avatar&&l.jsx(Nt,{src:re.avatar,alt:re.name,className:"object-cover"}),l.jsx(dt,{className:"text-xs font-bold bg-primary/5 text-primary",children:re.name.charAt(0)})]}),l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-[13px] font-semibold truncate text-foreground/90 tracking-tight leading-none mb-1.5",children:re.name}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:H("w-1.5 h-1.5 rounded-full",re.type==="Internal"?"bg-blue-500 shadow-[0_0_6px_rgba(59,130,246,0.5)]":"bg-emerald-500 shadow-[0_0_6px_rgba(16,185,129,0.5)]")}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:re.type||"Available"})]})]})]})}),l.jsx(Zy,{resource:re,totalSlots:I,slotWidth:X,totalWidth:T,slotToDate:$,onSlotMouseDown:we,onSlotMouseEnter:Me,onSlotDoubleClick:o,isSlotSelected:ve,resourceMap:Q,getEventStyle:me,onEventClick:a,onEventDelete:c,components:u,slotDuration:Z,now:N,visibleEvents:n,slotsPerDay:W,daysInView:t,dir:S})]},re.id)})})]},ee.name))]})})]})},Zy=({resource:e,totalSlots:t,slotWidth:n,totalWidth:r,slotToDate:i,onSlotMouseDown:o,onSlotMouseEnter:a,onSlotDoubleClick:c,isSlotSelected:d,resourceMap:u,getEventStyle:h,onEventClick:m,onEventDelete:v,components:f,slotDuration:p,now:x,visibleEvents:g,slotsPerDay:b,daysInView:y,dir:S})=>{const z=S==="rtl",{setNodeRef:N,isOver:E}=De.useDroppable({id:`row-${e.id}`,data:{resourceId:e.id}});return l.jsxs("div",{ref:N,className:H("relative flex-1 group/interactive",E&&"bg-primary/5 shadow-inner"),style:{width:r},onMouseMove:C=>{const M=C.currentTarget.getBoundingClientRect(),D=C.clientX-M.left,A=Math.floor(z?(M.width-D)/n:D/n);A>=0&&A<t&&a(A)},onMouseDown:C=>{const M=C.currentTarget.getBoundingClientRect(),D=C.clientX-M.left,A=Math.floor(z?(M.width-D)/n:D/n);A>=0&&A<t&&o(A,e.id)},onDoubleClick:C=>{const M=C.currentTarget.getBoundingClientRect(),D=C.clientX-M.left,A=Math.floor(z?(M.width-D)/n:D/n);if(A>=0&&A<t){const _=i(A);g.some(G=>(G.isHoliday||G.isFullyBooked)&&K.isSameDay(G.start,_))||c?.(_,e.id)}},children:[l.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:`repeating-linear-gradient(${z?"to left":"to right"}, transparent, transparent ${n-1}px, hsl(var(--border) / 0.1) ${n-1}px, hsl(var(--border) / 0.1) ${n}px)`,backgroundSize:`${n}px 100%`}}),l.jsx("div",{className:"absolute inset-0 pointer-events-none flex",children:y.map((C,M)=>{const D=g.find(_=>_.isHoliday&&K.isSameDay(_.start,C)),A=g.find(_=>_.isFullyBooked&&K.isSameDay(_.start,C));return!D&&!A?l.jsx("div",{style:{width:b*n}},M):l.jsx("div",{style:{width:b*n},className:H("h-full border-e border-border/10",D&&"bg-[repeating-linear-gradient(-45deg,hsl(var(--destructive)/0.05)_0px,hsl(var(--destructive)/0.05)_10px,transparent_10px,transparent_20px)] bg-destructive/[0.02]",A&&"bg-[repeating-linear-gradient(-45deg,theme(colors.amber.500/0.05)_0px,theme(colors.amber.500/0.05)_10px,transparent_10px,transparent_20px)] bg-amber-500/[0.02]")},M)})}),l.jsx(Jy,{totalSlots:t,resourceId:e.id,slotWidth:n,isSlotSelected:d,isRtl:z}),u.get(e.id)?.map(C=>l.jsx(Lf,{event:C,style:h(C),onClick:m,onDelete:v,components:f,orientation:"horizontal",resizable:!0,isBlocked:C.isBlock,isPast:C.end<x,slotDuration:p,pixelsPerSlot:n},C.id))]})},Jy=s.memo(({totalSlots:e,resourceId:t,slotWidth:n,isSlotSelected:r,isRtl:i})=>{const o=[];let a=null;for(let c=0;c<e;c++)r(c,t)?a?a.length++:(a={start:c,length:1},o.push(a)):a=null;return l.jsx(l.Fragment,{children:o.map((c,d)=>l.jsx("div",{className:"absolute top-0 bottom-0 bg-primary/20 border-x border-primary/30 z-10 pointer-events-none",style:{[i?"right":"left"]:`${c.start*n}px`,width:`${c.length*n}px`}},d))})}),Ry=({daysInView:e,visibleEvents:t,onEventClick:n,components:r})=>{const i=r?.event;return l.jsx("div",{"data-testid":"scheduler-scroll-container",className:"flex flex-col h-full w-full bg-background overflow-y-auto border border-border rounded-lg",children:e.map(o=>{const a=t.filter(d=>K.isSameDay(d.start,o)).sort((d,u)=>d.start.getTime()-u.start.getTime()),c=K.isSameDay(o,new Date);return l.jsxs("div",{className:"flex flex-col border-b border-border pb-2 last:border-b-0",children:[l.jsxs("div",{className:H("flex items-center px-4 py-2 sticky top-0 bg-background/95 backdrop-blur z-10 border-b border-border",c&&"text-primary font-semibold"),children:[l.jsxs("div",{className:"flex flex-col items-center mr-4 w-12 shrink-0",children:[l.jsx("span",{className:"text-[10px] uppercase font-bold text-muted-foreground",children:K.format(o,"EEE")}),l.jsx("span",{className:"text-xl font-bold leading-none",children:K.format(o,"d")})]}),l.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:K.format(o,"MMMM yyyy")})]}),l.jsx("div",{className:"flex flex-col px-2 py-1 gap-2",children:a.length===0?l.jsx("div",{className:"text-sm text-muted-foreground px-4 py-2 italic opacity-50",children:"No events"}):a.map(d=>l.jsx(us,{contextId:"scheduler-event",data:d,children:l.jsxs("div",{"data-testid":`scheduler-event-${d.id}`,className:H("flex items-center p-3 rounded-lg border bg-card text-card-foreground shadow-sm cursor-pointer hover:bg-muted/50 transition-colors",d.color&&`border-l-4 border-l-[${d.color}]`),style:{borderLeftColor:d.color},onClick:()=>n?.(d),children:[l.jsxs("div",{className:"flex flex-col mr-4 min-w-[80px] shrink-0",children:[l.jsx("span",{className:"text-sm font-bold",children:K.format(d.start,"h:mm a")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:K.format(d.end,"h:mm a")})]}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"font-semibold truncate",children:i?l.jsx(i,{event:d}):d.title}),d.description&&l.jsx("div",{className:"text-xs text-muted-foreground truncate",children:d.description})]}),d.resourceId&&l.jsx("div",{className:"hidden sm:block ml-2 px-2 py-0.5 rounded-full bg-muted text-[10px] text-muted-foreground",children:d.resourceId})]})},d.id))})]},o.toISOString())})})};function eC({view:e,daysInView:t,visibleEvents:n,rowVirtualizer:r,resources:i,handleSlotDoubleClick:o,handleEventDoubleClick:a,handleEventDelete:c,parentRef:d,setView:u,setCurrentDate:h,props:m,handleRangeSelect:v,currentDate:f,showUnassignedLane:p,slotDuration:x,is24Hour:g,setIs24Hour:b,dir:y}){const S=L2("(max-width: 768px)"),z=typeof m.cell=="function"?m.cell:void 0;switch(S&&(e==="week"||e==="workweek")?"agenda":e){case"day":case"week":case"workweek":return l.jsx(Qy,{daysInView:t,visibleEvents:n,rowVirtualizer:r,resources:i,onSlotDoubleClick:o,onEventDoubleClick:a,onEventDelete:c,scrollRef:d,onViewChange:u,onDateChange:h,components:m.components,onRangeSelect:v,onSlotClick:(E,C)=>m.onCellClick?.(E,C),onEventClick:E=>m.onEventClick?.(E),showResourcesInDayView:m.showResourcesInDayView,showWeekNumber:m.showWeekNumber,weekRule:m.weekRule,cellTemplate:z,enableHtmlSanitizer:m.enableHtmlSanitizer,showUnassignedLane:p,startHour:m.startHour,endHour:m.endHour,slotDuration:x,is24Hour:g,setIs24Hour:b,group:m.group,onCellContextMenu:m.onCellContextMenu,dir:y});case"month":return l.jsx(Yy,{currentDate:f,daysInView:t,visibleEvents:n,onSlotClick:E=>m.onCellClick?.(E),onSlotDoubleClick:E=>o(E),onEventClick:E=>m.onEventClick?.(E)||a(E),components:m.components,monthsCount:m.monthsCount,dir:y});case"timeline":case"timeline-day":case"timelineday":case"timeline-week":case"timelineweek":case"timeline-month":case"timelinemonth":return l.jsx(Xy,{view:e,currentDate:f,daysInView:t,visibleEvents:n,resources:i,onSlotClick:(E,C)=>m.onCellClick?.(E,C),onSlotDoubleClick:o,onEventClick:E=>m.onEventClick?.(E)||a(E),onEventDelete:c,onRangeSelect:v,components:m.components,currentTimeIndicator:m.currentTimeIndicator,showResourceHeaders:m.showResourceHeaders,group:m.group,showUnassignedLane:m.showUnassignedLane,startHour:m.startHour,endHour:m.endHour,slotDuration:x,is24Hour:g,scrollRef:d,dir:y});case"agenda":return l.jsx(Ry,{daysInView:t,visibleEvents:n,onEventClick:E=>m.onEventClick?.(E)||a(E),components:m.components});default:return l.jsxs("div",{children:["View ",e," not implemented"]})}}function fi({selected:e,onSelect:t,className:n,locale:r,minDate:i,modifiers:o={}}){const[a,c]=s.useState(new Date),d=()=>c(K.subMonths(a,1)),u=()=>c(K.addMonths(a,1)),h=K.startOfWeek(K.startOfMonth(a),{weekStartsOn:0}),m=K.endOfWeek(K.endOfMonth(a),{weekStartsOn:0}),v=K.eachDayOfInterval({start:h,end:m}),f=s.useMemo(()=>new Intl.DateTimeFormat(r,{month:"long",year:"numeric"}),[r]),p=s.useMemo(()=>new Intl.DateTimeFormat(r,{day:"numeric"}),[r]),x=["Su","Mo","Tu","We","Th","Fr","Sa"];return l.jsxs("div",{className:H("p-4 bg-background text-foreground select-none",n),style:{minWidth:"280px"},children:[l.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[l.jsx("div",{className:"font-bold text-lg text-foreground",children:f.format(a)}),l.jsxs("div",{className:"flex gap-1",children:[l.jsx(J,{variant:"ghost",size:"icon",onClick:d,className:"h-8 w-8 text-muted-foreground hover:text-primary hover:bg-primary/5",children:l.jsx(O.ChevronLeft,{className:"h-5 w-5"})}),l.jsx(J,{variant:"ghost",size:"icon",onClick:u,className:"h-8 w-8 text-muted-foreground hover:text-primary hover:bg-primary/5",children:l.jsx(O.ChevronRight,{className:"h-5 w-5"})})]})]}),l.jsx("div",{className:"grid gap-0 mb-2",style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)"},children:x.map((g,b)=>l.jsx("div",{className:"text-center text-[13px] text-muted-foreground/60 font-medium h-8 flex items-center justify-center",children:g},b))}),l.jsx("div",{className:"grid gap-y-1",style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)"},children:v.map(g=>{const b=e&&K.isSameDay(g,e),y=K.isSameMonth(g,a),S=i?K.isBefore(g,K.startOfDay(i)):!1,z=g.toISOString().split("T")[0],N=o[z],E=N?.disabled,C=S||E,M=l.jsx("button",{onClick:()=>!C&&t&&t(g),disabled:C,className:H("h-9 w-9 p-0 text-[14px] rounded-md flex items-center justify-center transition-all duration-150 relative","hover:bg-accent text-foreground",b?"bg-primary text-primary-foreground hover:bg-primary/90 font-bold shadow-sm z-10":"",!y&&"text-muted-foreground/30",K.isToday(g)&&!b&&"text-primary font-bold border-b-2 border-primary rounded-none",C&&"opacity-50 cursor-not-allowed hover:bg-transparent text-muted-foreground",N?.className),children:l.jsx("time",{dateTime:g.toISOString(),children:p.format(g)})});return l.jsx("div",{className:"flex items-center justify-center",children:N?.tooltip?l.jsx(kn,{children:l.jsxs(Fn,{delayDuration:300,children:[l.jsx(Dn,{asChild:!0,children:l.jsx("span",{className:"cursor-default",children:M})}),l.jsx(ln,{className:"text-xs font-semibold px-2 py-1",children:N.tooltip})]})}):M},g.toString())})}),l.jsx("div",{className:"mt-2 pt-2 border-t border-border/30 flex justify-center",children:l.jsx(J,{variant:"ghost",className:"text-primary font-bold hover:bg-primary/5 w-full h-10 text-[15px]",onClick:()=>{const g=new Date;c(g),t&&t(g)},children:"Today"})})]})}function tC(e,[t,n]){return Math.min(n,Math.max(t,e))}function nC(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var pi="ScrollArea",[Vf]=et(pi),[rC,ot]=Vf(pi),Bf=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[c,d]=w.useState(null),[u,h]=w.useState(null),[m,v]=w.useState(null),[f,p]=w.useState(null),[x,g]=w.useState(null),[b,y]=w.useState(0),[S,z]=w.useState(0),[N,E]=w.useState(!1),[C,M]=w.useState(!1),D=Ne(t,_=>d(_)),A=wr(i);return l.jsx(rC,{scope:n,type:r,dir:A,scrollHideDelay:o,scrollArea:c,viewport:u,onViewportChange:h,content:m,onContentChange:v,scrollbarX:f,onScrollbarXChange:p,scrollbarXEnabled:N,onScrollbarXEnabledChange:E,scrollbarY:x,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:M,onCornerWidthChange:y,onCornerHeightChange:z,children:l.jsx(Ee.div,{dir:A,...a,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});Bf.displayName=pi;var $f="ScrollAreaViewport",Wf=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=ot($f,n),c=w.useRef(null),d=Ne(t,c,a.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),l.jsx(Ee.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Wf.displayName=$f;var St="ScrollAreaScrollbar",Uf=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ot(St,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,c=e.orientation==="horizontal";return w.useEffect(()=>(c?o(!0):a(!0),()=>{c?o(!1):a(!1)}),[c,o,a]),i.type==="hover"?l.jsx(sC,{...r,ref:t,forceMount:n}):i.type==="scroll"?l.jsx(lC,{...r,ref:t,forceMount:n}):i.type==="auto"?l.jsx(Gf,{...r,ref:t,forceMount:n}):i.type==="always"?l.jsx(gi,{...r,ref:t}):null});Uf.displayName=St;var sC=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ot(St,e.__scopeScrollArea),[o,a]=w.useState(!1);return w.useEffect(()=>{const c=i.scrollArea;let d=0;if(c){const u=()=>{window.clearTimeout(d),a(!0)},h=()=>{d=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",h)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(Ke,{present:n||o,children:l.jsx(Gf,{"data-state":o?"visible":"hidden",...r,ref:t})})}),lC=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ot(St,e.__scopeScrollArea),o=e.orientation==="horizontal",a=ws(()=>d("SCROLL_END"),100),[c,d]=nC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>d("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,i.scrollHideDelay,d]),w.useEffect(()=>{const u=i.viewport,h=o?"scrollLeft":"scrollTop";if(u){let m=u[h];const v=()=>{const f=u[h];m!==f&&(d("SCROLL"),a()),m=f};return u.addEventListener("scroll",v),()=>u.removeEventListener("scroll",v)}},[i.viewport,o,d,a]),l.jsx(Ke,{present:n||c!=="hidden",children:l.jsx(gi,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ce(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:ce(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Gf=w.forwardRef((e,t)=>{const n=ot(St,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=w.useState(!1),c=e.orientation==="horizontal",d=ws(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?u:h)}},10);return On(n.viewport,d),On(n.content,d),l.jsx(Ke,{present:r||o,children:l.jsx(gi,{"data-state":o?"visible":"hidden",...i,ref:t})})}),gi=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ot(St,e.__scopeScrollArea),o=w.useRef(null),a=w.useRef(0),[c,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Xf(c.viewport,c.content),h={...r,sizes:c,onSizesChange:d,hasThumb:u>0&&u<1,onThumbChange:v=>o.current=v,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:v=>a.current=v};function m(v,f){return uC(v,a.current,c,f)}return n==="horizontal"?l.jsx(iC,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollLeft,f=Zf(v,c,i.dir);o.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollLeft=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollLeft=m(v,i.dir))}}):n==="vertical"?l.jsx(oC,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const v=i.viewport.scrollTop,f=Zf(v,c);o.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollTop=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollTop=m(v))}}):null}),iC=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ot(St,e.__scopeScrollArea),[a,c]=w.useState(),d=w.useRef(null),u=Ne(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.jsx(qf,{"data-orientation":"horizontal",...i,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xs(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,m)=>{if(o.viewport){const v=o.viewport.scrollLeft+h.deltaX;e.onWheelScroll(v),Rf(v,m)&&h.preventDefault()}},onResize:()=>{d.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:vs(a.paddingLeft),paddingEnd:vs(a.paddingRight)}})}})}),oC=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ot(St,e.__scopeScrollArea),[a,c]=w.useState(),d=w.useRef(null),u=Ne(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.jsx(qf,{"data-orientation":"vertical",...i,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xs(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,m)=>{if(o.viewport){const v=o.viewport.scrollTop+h.deltaY;e.onWheelScroll(v),Rf(v,m)&&h.preventDefault()}},onResize:()=>{d.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:vs(a.paddingTop),paddingEnd:vs(a.paddingBottom)}})}})}),[aC,Kf]=Vf(St),qf=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:h,onResize:m,...v}=e,f=ot(St,n),[p,x]=w.useState(null),g=Ne(t,D=>x(D)),b=w.useRef(null),y=w.useRef(""),S=f.viewport,z=r.content-r.viewport,N=Oe(h),E=Oe(d),C=ws(m,10);function M(D){if(b.current){const A=D.clientX-b.current.left,_=D.clientY-b.current.top;u({x:A,y:_})}}return w.useEffect(()=>{const D=A=>{const _=A.target;p?.contains(_)&&N(A,z)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[S,p,z,N]),w.useEffect(E,[r,E]),On(p,C),On(f.content,C),l.jsx(aC,{scope:n,scrollbar:p,hasThumb:i,onThumbChange:Oe(o),onThumbPointerUp:Oe(a),onThumbPositionChange:E,onThumbPointerDown:Oe(c),children:l.jsx(Ee.div,{...v,ref:g,style:{position:"absolute",...v.style},onPointerDown:ce(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),b.current=p.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),M(D))}),onPointerMove:ce(e.onPointerMove,M),onPointerUp:ce(e.onPointerUp,D=>{const A=D.target;A.hasPointerCapture(D.pointerId)&&A.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=y.current,f.viewport&&(f.viewport.style.scrollBehavior=""),b.current=null})})})}),gs="ScrollAreaThumb",Qf=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Kf(gs,e.__scopeScrollArea);return l.jsx(Ke,{present:n||i.hasThumb,children:l.jsx(cC,{ref:t,...r})})}),cC=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=ot(gs,n),a=Kf(gs,n),{onThumbPositionChange:c}=a,d=Ne(t,m=>a.onThumbChange(m)),u=w.useRef(void 0),h=ws(()=>{u.current&&(u.current(),u.current=void 0)},100);return w.useEffect(()=>{const m=o.viewport;if(m){const v=()=>{if(h(),!u.current){const f=hC(m,c);u.current=f,c()}};return c(),m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[o.viewport,h,c]),l.jsx(Ee.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ce(e.onPointerDownCapture,m=>{const f=m.target.getBoundingClientRect(),p=m.clientX-f.left,x=m.clientY-f.top;a.onThumbPointerDown({x:p,y:x})}),onPointerUp:ce(e.onPointerUp,a.onThumbPointerUp)})});Qf.displayName=gs;var vi="ScrollAreaCorner",Yf=w.forwardRef((e,t)=>{const n=ot(vi,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(dC,{...e,ref:t}):null});Yf.displayName=vi;var dC=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ot(vi,n),[o,a]=w.useState(0),[c,d]=w.useState(0),u=!!(o&&c);return On(i.scrollbarX,()=>{const h=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(h),d(h)}),On(i.scrollbarY,()=>{const h=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(h),a(h)}),u?l.jsx(Ee.div,{...r,ref:t,style:{width:o,height:c,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vs(e){return e?parseInt(e,10):0}function Xf(e,t){const n=e/t;return isNaN(n)?0:n}function xs(e){const t=Xf(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function uC(e,t,n,r="ltr"){const i=xs(n),o=i/2,a=t||o,c=i-a,d=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,h=n.content-n.viewport,m=r==="ltr"?[0,h]:[h*-1,0];return Jf([d,u],m)(e)}function Zf(e,t,n="ltr"){const r=xs(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,c=o-r,d=n==="ltr"?[0,a]:[a*-1,0],u=tC(e,d);return Jf([0,a],[0,c])(u)}function Jf(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Rf(e,t){return e>0&&e<t}var hC=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,c=n.top!==o.top;(a||c)&&t(),n=o,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function ws(e,t){const n=Oe(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function On(e,t){const n=Oe(t);kt(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var mC=Bf,fC=Wf,pC=Uf,gC=Qf,vC=Yf;function xi({className:e,children:t,...n}){return l.jsxs(mC,{"data-slot":"scroll-area",className:H("relative",e),...n,children:[l.jsx(fC,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),l.jsx(e3,{}),l.jsx(vC,{})]})}function e3({className:e,orientation:t="vertical",...n}){return l.jsx(pC,{"data-slot":"scroll-area-scrollbar",orientation:t,className:H("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:l.jsx(gC,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const t3=()=>{const[e,t]=s.useState([]),[n,r]=s.useState(!1);s.useEffect(()=>{let c;const d=()=>{const h=oe.get("NotificationService");h&&!c&&(c=h.subscribe(m=>t(m)))};d();const u=oe.subscribe(()=>{d()});return()=>{c&&c(),u()}},[]);const i=()=>{oe.get("NotificationService")?.clearAll()},o=(c,d)=>{d.stopPropagation(),oe.get("NotificationService")?.remove(c)},a=c=>{switch(c){case"success":return l.jsx(O.CheckCircle,{className:"h-4 w-4 text-green-600"});case"error":return l.jsx(O.AlertCircle,{className:"h-4 w-4 text-red-600"});case"warning":return l.jsx(O.AlertTriangle,{className:"h-4 w-4 text-amber-600"});default:return l.jsx(O.Info,{className:"h-4 w-4 text-blue-600"})}};return l.jsxs(Kt,{open:n,onOpenChange:r,children:[l.jsx(qt,{asChild:!0,children:l.jsxs(J,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground relative",children:[l.jsx(O.Bell,{className:"w-5 h-5"}),e.length>0&&l.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] font-bold text-white ring-2 ring-background animate-in zoom-in duration-300",children:e.length>9?"9+":e.length})]})}),l.jsxs(Tt,{className:"w-80 p-0 mr-4",align:"end",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[l.jsx("h4",{className:"font-semibold text-sm",children:"Notifications"}),e.length>0&&l.jsxs(J,{variant:"ghost",size:"sm",className:"h-auto px-2 py-1 text-xs text-muted-foreground hover:text-destructive",onClick:i,children:[l.jsx(O.Trash2,{className:"w-3 h-3 mr-1"}),"Clear all"]})]}),l.jsx(xi,{className:"h-[300px]",children:e.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center h-[200px] text-muted-foreground",children:[l.jsx(O.Bell,{className:"w-8 h-8 mb-2 opacity-20"}),l.jsx("p",{className:"text-xs",children:"No notifications"})]}):l.jsx("div",{className:"flex flex-col divide-y",children:e.map(c=>l.jsx("div",{className:"p-4 hover:bg-muted/50 transition-colors relative group",children:l.jsxs("div",{className:"flex gap-3",children:[l.jsx("div",{className:"shrink-0 mt-0.5",children:a(c.type)}),l.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[l.jsx("p",{className:"text-xs leading-relaxed text-foreground/90 break-words",children:c.message}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Just now"})]}),l.jsx("button",{onClick:d=>o(c.id,d),className:"opacity-0 group-hover:opacity-100 transition-opacity absolute top-2 right-2 p-1 hover:bg-background rounded-md text-muted-foreground hover:text-foreground",children:l.jsx(O.X,{className:"w-3 h-3"})})]})},c.id))})})]})]})},xC=e=>e.replace(/([A-Z])/g," $1").trim(),wC=(e,t)=>K.format(e,"MMMM yyyy"),n3=s.memo(({currentDate:e,next:t,prev:n,today:r,slotDuration:i,setSlotDuration:o,setCurrentDate:a,onPrev:c,onNext:d,onToday:u,currentView:h,onViewChange:m,views:v=[],onExportExcel:f,onExportCSV:p,onExportICS:x,dir:g})=>{const b=g==="rtl",y=(S,z)=>{if(typeof S=="string")switch(S){case"Previous":return l.jsx(J,{variant:"ghost",size:"icon",onClick:c,children:l.jsx(O.ChevronLeft,{className:"h-4 w-4"})},z);case"Next":return l.jsx(J,{variant:"ghost",size:"icon",onClick:d,children:l.jsx(O.ChevronRight,{className:"h-4 w-4"})},z);case"Today":return l.jsx(J,{variant:"outline",onClick:u,children:"Today"},z);case"DateRange":return l.jsx("div",{className:"flex items-center gap-2",children:l.jsx("span",{className:"text-lg font-semibold min-w-[200px] text-center",children:wC(e)})},z);case"Search":return l.jsxs("div",{className:"relative w-48 hidden md:block",children:[l.jsx(O.Search,{className:H("absolute top-2.5 h-4 w-4 text-muted-foreground",b?"right-2":"left-2")}),l.jsx(je,{placeholder:"Search...",className:"ps-8 h-9"})]},z);case"Timezone":return l.jsxs(J,{variant:"ghost",size:"sm",className:"hidden lg:flex gap-1 text-xs text-muted-foreground",children:[l.jsx(O.Globe,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"UTC"})]},z);case"ActiveView":return l.jsxs(rt,{value:h,onValueChange:N=>m(N),children:[l.jsx(st,{className:"w-[140px]",children:l.jsx(lt,{placeholder:"Select view"})}),l.jsx(it,{children:v.map(N=>{const E=typeof N=="string"?N:N.option;return l.jsx(Ae,{value:E,children:xC(E)},E)})})]});default:return null}return l.jsx("div",{className:S.cssClass,children:S.text},z)};return l.jsxs("div",{"data-testid":"scheduler-toolbar",className:"flex items-center justify-between p-4 border-b border-border shrink-0 bg-background h-16",children:[l.jsxs("div",{className:"flex items-center gap-6",children:[l.jsxs("div",{className:"flex items-center gap-1.5 ",children:[l.jsx(J,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:b?l.jsx(O.ChevronRight,{className:"w-5 h-5"}):l.jsx(O.ChevronLeft,{className:"w-5 h-5"})}),l.jsx(J,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:b?l.jsx(O.ChevronLeft,{className:"w-5 h-5"}):l.jsx(O.ChevronRight,{className:"w-5 h-5"})}),l.jsxs(Kt,{children:[l.jsx(qt,{asChild:!0,children:l.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground hover:bg-muted",children:l.jsx(O.Calendar,{className:"h-4 w-4"})})}),l.jsx(Tt,{className:"w-auto p-0",align:"start",children:l.jsx(fi,{selected:e,onSelect:S=>S&&a(S)})})]})]}),l.jsx("div",{className:"text-xl font-bold tracking-tight text-foreground cursor-pointer hover:text-primary transition-colors ms-4",onClick:()=>{},children:K.format(e,"EEEE, MMM d yyyy")})]}),l.jsxs("div",{className:"flex items-center gap-4",children:[y("Search",0)," ",y("Timezone",1)," ",y("ActiveView",2),l.jsx(J,{variant:"outline",onClick:r,className:"h-9 px-4 text-xs font-bold uppercase tracking-wider border-border hover:bg-muted transition-colors rounded-md",children:"TODAY"}),l.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 px-2 py-1 rounded-lg border border-border/50",children:[l.jsx(O.Clock,{className:"w-3.5 h-3.5 text-muted-foreground"}),l.jsxs(rt,{value:String(i),onValueChange:S=>o(Number(S)),children:[l.jsx(st,{className:"h-7 w-[90px] text-[10px] font-bold uppercase tracking-tight bg-transparent border-none shadow-none focus:ring-0",children:l.jsx(lt,{placeholder:"Interval"})}),l.jsxs(it,{children:[l.jsx(Ae,{value:"5",children:"5 minutes"}),l.jsx(Ae,{value:"10",children:"10 minutes"}),l.jsx(Ae,{value:"15",children:"15 minutes"}),l.jsx(Ae,{value:"30",children:"30 minutes"}),l.jsx(Ae,{value:"45",children:"45 minutes"}),l.jsx(Ae,{value:"60",children:"1 hour"})]})]})]}),l.jsx(t3,{}),l.jsxs("div",{className:"flex items-center gap-1 border-s border-border ps-2",children:[f&&l.jsx(J,{variant:"ghost",size:"icon",onClick:f,title:"Export to Excel",children:l.jsx(O.Download,{className:"w-4 h-4"})}),p&&l.jsx(J,{variant:"ghost",size:"icon",onClick:p,title:"Export to CSV",children:l.jsx(O.Download,{className:"w-4 h-4 text-primary"})}),x&&l.jsx(J,{variant:"ghost",size:"icon",onClick:x,title:"Export to ICS",children:l.jsx(O.Calendar,{className:"w-4 h-4"})})]}),l.jsx(J,{variant:"ghost",size:"icon",className:"h-9 w-9 text-muted-foreground hover:text-foreground rounded-full",children:l.jsx(O.Settings,{className:"w-5 h-5"})})]})]})});n3.displayName="EzSchedulerToolbar";const wi=({isOpen:e,onClose:t,title:n,children:r,footer:i,className:o,size:a="md",closeOnBackdropClick:c=!0,showCloseButton:d=!0})=>{if(s.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset"}},[e]),!e)return null;const u={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-[95vw] h-[95vh]"},h=l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 sm:p-6",role:"dialog","aria-modal":"true",children:[l.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity animate-in fade-in duration-200",onClick:c?t:void 0,"aria-hidden":"true"}),l.jsxs("div",{className:H("relative w-full bg-background rounded-xl border border-border shadow-2xl flex flex-col overflow-hidden animate-in zoom-in-95 slide-in-from-bottom-2 duration-200",u[a],o),children:[(n||d)&&l.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border bg-muted/10 shrink-0",children:[l.jsx("div",{className:"text-lg font-semibold leading-none tracking-tight",children:n}),d&&l.jsxs(J,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8 rounded-full p-0 text-muted-foreground hover:bg-muted",children:[l.jsx(O.X,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:r}),i&&l.jsx("div",{className:"flex items-center justify-end gap-2 px-6 py-4 border-t border-border bg-muted/5 shrink-0",children:i})]})]});return mr.createPortal(h,document.body)},bC=s.lazy(()=>Promise.resolve().then(()=>wS).then(e=>({default:e.EzEventModal}))),EC=new Nl,bi=s.forwardRef((e,t)=>(Mn(),l.jsx(jl,{client:EC,children:l.jsx(r3,{...e,ref:t})})));bi.displayName="EzScheduler";const r3=s.forwardRef((e,t)=>{const n=Iy({...e,defaultView:e.view?.toLowerCase()||"week",defaultSelectedDate:e.selectedDate??e.defaultSelectedDate}),{store:r,actions:i,view:o,setView:a,currentDate:c,setCurrentDate:d,visibleEvents:u,rowVirtualizer:h,parentRef:m,schedulerService:v,baseApi:f}=n,p=j=>{if(!j.start||!j.end)return{hasBlockOverlap:!1,hasRegularOverlap:!1,overlappingEvents:[]};const V=u.filter(L=>L.id===j.id||!(L.resourceId===j.resourceId||L.resourceIds?.some(se=>j.resourceId===se)||!L.resourceId&&!j.resourceId)?!1:K.areIntervalsOverlapping({start:L.start,end:L.end},{start:j.start,end:j.end}));return{hasBlockOverlap:V.some(L=>L.isBlock),hasRegularOverlap:V.length>0,overlappingEvents:V}},x=(j="regular")=>{const V=n.serviceRegistry.get("NotificationService");if(V){let L="",$="warning";j==="block"?(L="Cannot place event here: This time is blocked (e.g. Lunch Break).",$="error"):j==="past"?(L="Cannot move or create events in the past.",$="error"):(L="Warning: This event overlaps with an existing event.",$="warning"),V.add({type:$,message:L,duration:5e3})}},{sensors:g,handleDragEnd:b}=Ly({events:u,slotDuration:n.slotDuration,onEventChange:j=>{if(!e.allowPastEvents&&j.start<new Date){x("past");return}const{hasBlockOverlap:V,hasRegularOverlap:L,overlappingEvents:$}=p(j);if(V){x("block");return}if(L){if(e.onEventOverlap){const se={event:j,existingEvents:$,cancel:!1};if(e.onEventOverlap(se),se.cancel)return}x("regular")}console.log("[EzScheduler] Calling scheduler.updateEvent",j),n.updateEvent(j)}}),{internalResources:y,setInternalResources:S}=Oy({resources:e.resources}),[z,N]=s.useState({isOpen:!1,mode:"create"}),[E,C]=s.useState(!1),[M,D]=s.useState(null),[A,_]=s.useState({x:0,y:0}),U=s.useMemo(()=>({...n.baseApi,onExportExcel:e.onExportExcel,onExportCSV:e.onExportCSV,onExportICS:e.onExportICS,get currentView(){return o},destroy:()=>{e.destroyed&&e.destroyed({})}}),[n.baseApi,o,e.destroyed,e.onExportExcel,e.onExportCSV,e.onExportICS]);Of(o,c,v,u,{setEditorState:N,setResources:S,scrollToIndex:j=>{m.current&&(m.current.scrollTop=j*64)},forceUpdate:()=>{},showSpinner:f.showSpinner,hideSpinner:f.hideSpinner,closeQuickInfoPopup:()=>C(!1),changeView:j=>a(j.toLowerCase()),next:n.next,prev:n.prev,today:n.today},t,U);const G=(j,V)=>{e.onCellDoubleClick?e.onCellDoubleClick(j,V):N({isOpen:!0,mode:"create",event:{start:j,end:K.addMinutes(j,30),resourceId:V,resourceIds:V?[V]:[]}})},Y=j=>{if(e.onEventDoubleClick)e.onEventDoubleClick(j);else{const V=j.end<new Date;N({isOpen:!0,mode:V?"view":"edit",event:j})}},te=async j=>{if(!e.allowPastEvents&&j.start&&j.start<new Date){x("past");return}const{hasBlockOverlap:V,hasRegularOverlap:L}=p(j);if(V){x("block");return}L&&x("regular"),z.mode==="create"?(await e.onEventCreate?.(j),n.addEvent(j)):(await e.onEventChange?.(j),n.updateEvent(j)),N($=>({...$,isOpen:!1}))},[Z,P]=s.useState({isOpen:!1}),W=async j=>{P({isOpen:!0,eventId:j})},I=async()=>{const j=Z.eventId;if(!j)return;const V=u.find(L=>L.id===j);if(V){await e.onEventDelete?.(j),n.deleteEvent(j);const L=n.serviceRegistry.get("NotificationService");if(L){const $=K.format(V.start,"MMM d, yyyy h:mm a");L.add({type:"success",message:`Event "${V.title}" on ${$} has been cancelled.`,duration:5e3})}}P({isOpen:!1})},X=j=>{if(!e.allowPastEvents&&j.start&&j.start<new Date){x("past");return}n.addEvent(j),e.onEventCreate?.(j),C(!1)},T=(j,V,L,$)=>{e.showQuickInfoPopup&&(D({start:j,end:V,resourceId:L}),_({x:$?.x||0,y:$?.y||0}),C(!0))};return l.jsx(er,{fallback:l.jsx(_y,{}),children:l.jsxs("div",{className:H("ez-scheduler flex flex-col w-full h-full bg-background select-none overflow-hidden",e.className),dir:n.dir,children:[e.showHeaderBar!==!1&&l.jsx(n3,{view:o,setView:a,currentDate:c,next:n.next,prev:n.prev,today:n.today,onAddClick:s.useCallback(()=>N({isOpen:!0,mode:"create",event:{}}),[]),slotDuration:n.slotDuration,setSlotDuration:n.setSlotDuration,setCurrentDate:d,onPrev:n.prev,onNext:n.next,onToday:n.today,currentView:o,onViewChange:j=>{const V=j.toLowerCase().replace(/[^a-z]/g,""),$={day:"day",week:"week",workweek:"workweek",month:"month",timelineday:"timeline-day",timelineweek:"timeline-week",timelineworkweek:"timeline-week",timelinemonth:"timeline-month",agenda:"agenda",timeline:"timeline-day"}[V]||V;a($)},views:e.views||["Day","Week","Month"],onExportExcel:s.useCallback(()=>e.onExportExcel?.(u),[e.onExportExcel,u]),onExportCSV:s.useCallback(()=>e.onExportCSV?.(u),[e.onExportCSV,u]),onExportICS:s.useCallback(()=>e.onExportICS?.(u),[e.onExportICS,u]),dir:n.dir}),l.jsxs(De.DndContext,{sensors:g,onDragEnd:b,collisionDetection:De.closestCenter,children:[l.jsxs("div",{className:"flex-1 overflow-hidden relative flex flex-col",children:[l.jsx(eC,{store:r,actions:i,view:o,daysInView:n.daysInView,visibleEvents:u,rowVirtualizer:h,resources:y,handleSlotDoubleClick:G,handleEventDoubleClick:Y,handleEventDelete:W,parentRef:m,setView:a,setCurrentDate:d,props:e,handleRangeSelect:T,currentDate:c,showUnassignedLane:e.showUnassignedLane,slotDuration:n.slotDuration,is24Hour:n.is24Hour,setIs24Hour:n.setIs24Hour,dir:n.dir}),e.isLoading&&l.jsx(By,{})]}),E&&M&&l.jsx($y,{start:M.start,end:M.end,resourceId:M.resourceId,resources:y,onSave:X,onCancel:()=>C(!1),onMoreOptions:j=>{C(!1),N({isOpen:!0,mode:"create",event:j})},position:A}),l.jsx(s.Suspense,{fallback:null,children:l.jsx(bC,{isOpen:z.isOpen,onClose:()=>N(j=>({...j,isOpen:!1})),mode:z.mode,event:z.event,onSave:te,onDelete:W,resources:y,locale:e.locale})}),l.jsx(wi,{isOpen:Z.isOpen,onClose:()=>P({isOpen:!1}),title:"Delete Event",footer:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(J,{variant:"ghost",onClick:()=>P({isOpen:!1}),children:"Cancel"}),l.jsx(J,{variant:"destructive",onClick:I,children:"Delete"})]}),children:l.jsx("p",{className:"text-sm text-muted-foreground",children:"Are you sure you want to delete this event? This action cannot be undone."})})]})]})})});r3.displayName="EzSchedulerInner";class yC{name="HierarchyService";nodeMap=new Map;constructor(){}registerNode(t){this.nodeMap.set(t.id,t)}unregisterNode(t){this.nodeMap.delete(t)}getParent(t){const n=this.nodeMap.get(t);if(n&&n.parentId)return this.nodeMap.get(n.parentId)}getChildren(t){const n=this.nodeMap.get(t);return n&&n.children?n.children.map(r=>this.nodeMap.get(r)).filter(r=>!!r):[]}getDescendants(t){const n=[],r=[...this.nodeMap.get(t)?.children||[]];for(;r.length>0;){const i=r.pop();n.push(i);const o=this.nodeMap.get(i);o?.children&&r.push(...o.children)}return n}getAncestors(t){const n=[];let r=this.nodeMap.get(t)?.parentId;for(;r;)n.push(r),r=this.nodeMap.get(r)?.parentId;return n}getNode(t){return this.nodeMap.get(t)}cleanup(){this.nodeMap.clear()}}const CC=(e,t)=>t?{id:t.id?e[t.id]:e.id,label:t.text?e[t.text]:e.label,children:t.children?e[t.children]:e.children,icon:t.icon?e[t.icon]:e.icon,...e}:e,s3=(e,t)=>!t||t==="None"?e:[...e].sort((r,i)=>{const o=r.label.localeCompare(i.label);return t==="Ascending"?o:-o}).map(r=>({...r,children:r.children?s3(r.children,t):void 0})),Ei=ah,bs=ch,SC=e=>{const{data:t,fields:n,sortOrder:r,onDataSourceChanged:i,onDataBound:o}=e,{state:a,setState:c}=Kr({initialState:{internalTreeData:t,loadingNodes:new Set}}),d=s.useRef(!1),u=s.useCallback(g=>{c(b=>({...b,internalTreeData:typeof g=="function"?g(b.internalTreeData):g}))},[c]),h=s.useCallback(g=>{c(b=>({...b,loadingNodes:typeof g=="function"?g(b.loadingNodes):g}))},[c]),{internalTreeData:m,loadingNodes:v}=a,f=s.useMemo(()=>{let g=m;if(n){const b=y=>y.map(S=>{const z=CC(S,n);return z.children&&(z.children=b(z.children)),z});g=b(g)}return r&&(g=s3(g,r)),g},[m,n,r]),p=s.useRef(t);s.useEffect(()=>{p.current!==t&&(u(t),i?.(),p.current=t)},[t,i]),s.useEffect(()=>{d.current&&o?.()},[f,o]),s.useEffect(()=>(d.current=!0,()=>{d.current=!1}),[]);const x=s.useCallback((g,b)=>{u(y=>bs(y,g,b))},[u]);return{treeData:f,setInternalTreeData:u,loadingNodes:v,setLoadingNodes:h,updateNode:x}},zC=(e,t,n,r,i)=>{const{expandedNodes:o,onNodeExpanding:a,onNodeExpanded:c,onNodeCollapsing:d,onNodeCollapsed:u,onNodeExpand:h,onLoadChildren:m,onActionFailure:v}=e,[f,p]=s.useState(new Set),x=o?new Set(o):f,g=s.useCallback(async b=>{const y=x.has(b),S=!y;if(S){if(a?.(b)===!1)return}else if(d?.(b)===!1)return;if(S&&(m||i)){const N=Ei(t,b);if(N&&!N.isLoaded&&!N.isLeaf){r(E=>new Set(E).add(b));try{const E=i?await i.loadNodes(b):await m(b);n(b,{children:E,isLoaded:!0})}catch(E){v?.(E);return}finally{r(E=>{const C=new Set(E);return C.delete(b),C})}}}const z=new Set(x);y?z.delete(b):z.add(b),o||p(z),h?.(b,S),S?c?.(b):u?.(b)},[x,t,m,h,o,a,d,c,u,v,n,r,i]);return{expandedNodes:x,setInternalExpandedNodes:p,toggleExpand:g}},MC=(e,t)=>{const{selectedNodes:n,checkedNodes:r,selectionMode:i="single",onSelectionChange:o,onCheckedChange:a,onNodeSelecting:c,onNodeSelected:d,onNodeChecking:u,onNodeChecked:h,autoCheck:m=!0}=e,[v,f]=s.useState(new Set),p=n?new Set(n):v,[x,g]=s.useState(new Set),b=r?new Set(r):x,[y,S]=s.useState(new Set),z=s.useCallback(C=>{if(c?.(C)===!1)return;const M=new Set(i==="multiple"?p:[]);M.has(C)?M.delete(C):M.add(C),n||f(M),o?.(Array.from(M)),d?.(C)},[p,i,o,n,c,d]),N=s.useCallback((C,M)=>{const D=new Set(b),A=new Set(y),_=t.getDescendants(C),U=t.getAncestors(C);M?(D.add(C),A.delete(C),m&&_.forEach(G=>{D.add(G),A.delete(G)})):(D.delete(C),A.delete(C),m&&_.forEach(G=>{D.delete(G),A.delete(G)})),m&&U.forEach(G=>{const Y=t.getChildren(G),te=Y.every(P=>D.has(P.id)),Z=Y.every(P=>!D.has(P.id)&&!A.has(P.id));te?(D.add(G),A.delete(G)):Z?(D.delete(G),A.delete(G)):(D.delete(G),A.add(G))}),r||(g(D),S(A)),a?.(Array.from(D)),h?.(C,M)},[b,y,t,a,m,r,h]),E=s.useCallback(C=>{const M=b.has(C);u?.(C,!M)!==!1&&N(C,!M)},[b,N,u]);return{selectedNodes:p,setInternalSelectedNodes:f,toggleSelect:z,checkedNodes:b,setInternalCheckedNodes:g,indeterminateNodes:y,setIndeterminateNodes:S,toggleCheck:E,updateCheckState:N}},NC=(e,t,n="")=>{const r=n.toLowerCase(),i=s.useMemo(()=>{if(!r)return null;const a=new Map,c=d=>{if(a.has(d.id))return a.get(d.id);let u=d.label.toLowerCase().includes(r),h=!1;if(d.children)for(const v of d.children)c(v).matches&&(h=!0);const m={matches:u||h,hasChildMatch:h};return a.set(d.id,m),m};return e.forEach(d=>c(d)),a},[e,r]);return{flattenedNodes:s.useMemo(()=>{const a=[],c=(d,u=0)=>{d.forEach(h=>{const m=i?i.get(h.id):void 0;if((i?m?.matches:!0)===!1)return;a.push({node:h,level:u});const f=i&&m?.hasChildMatch;(t.has(h.id)||f)&&h.children&&c(h.children,u+1)})};return c(e),a},[e,t,i])}},jC=(e,t,n,r,i,o,a,c,d,u,h,m,v,f,p={})=>{const{expandedNodes:x,checkedNodes:g,selectedNodes:b,onNodeExpand:y,onCheckedChange:S,onSelectionChange:z,onNodeEditing:N}=e,E=s.useMemo(()=>({...p,...{expandAll:()=>{const M=Array.from(m.nodeMap.keys());x?y?.(M[0],!0):i(new Set(M))},collapseAll:()=>{x?y?.("",!1):i(new Set)},checkAll:()=>{const M=Array.from(m.nodeMap.keys());g?S?.(M):(a(new Set(M)),d(new Set))},uncheckAll:()=>{g?S?.([]):(a(new Set),d(new Set))},selectNode:M=>{b?z?.([M]):c(new Set([M]))},expandNode:(M,D=!0)=>{x?y?.(M,D):i(A=>{const _=new Set(A);return D?_.add(M):_.delete(M),_})},checkNode:(M,D=!0)=>u(M,D),getFlattenedNodes:()=>h,addNodes:(M,D,A)=>{if(!D)n(_=>{const U=[..._];return A!==void 0?U.splice(A,0,...M):U.push(...M),U});else{const _=U=>U.map(G=>{if(G.id===D){const Y=[...G.children||[]];return A!==void 0?Y.splice(A,0,...M):Y.push(...M),{...G,children:Y}}return G.children?{...G,children:_(G.children)}:G});n(U=>_(U))}oe.get("NotificationService")?.show({type:"success",message:`${M.length} Node(s) Added`,duration:2e3})},removeNodes:M=>{const D=new Set(M),A=_=>_.filter(U=>!D.has(U.id)).map(U=>({...U,children:U.children?A(U.children):void 0}));n(_=>A(_)),oe.get("NotificationService")?.show({type:"success",message:`${M.length} Node(s) Removed`,duration:2e3})},updateNode:(M,D)=>{n(A=>bs(A,M,D)),oe.get("NotificationService")?.show({type:"success",message:"Node Updated Successfully",duration:2e3})},moveNodes:(M,D,A)=>{const _=[],U=new Set(M),G=Z=>Z.filter(P=>U.has(P.id)?(_.push(P),!1):!0).map(P=>({...P,children:P.children?G(P.children):void 0})),Y=G(t),te=Z=>Z.map(P=>{if(P.id===D){const W=[...P.children||[]];return A!==void 0?W.splice(A,0,..._):W.push(..._),{...P,children:W}}return P.children?{...P,children:te(P.children)}:P});n(te(Y)),oe.get("NotificationService")?.show({type:"success",message:"Nodes Moved Successfully",duration:2e3})},getNode:M=>Ei(t,M),getTreeData:()=>t,ensureVisible:M=>{const D=m.getAncestors(M);x?(D.forEach(A=>y?.(A,!0)),y?.(M,!0)):i(A=>{const _=new Set(A);return D.forEach(U=>_.add(U)),_.add(M),_})},beginEdit:M=>{Ei(t,M)&&N?.(M)!==!1&&v(M)},disableNodes:(M,D=!0)=>{M.forEach(A=>{n(_=>bs(_,A,{disabled:D}))})},enableNodes:M=>{M.forEach(D=>{n(A=>bs(A,D,{disabled:!1}))})},getAllCheckedNodes:()=>Array.from(o),getDisabledNodes:()=>{const M=[],D=A=>{A.forEach(_=>{_.disabled&&M.push(_.id),_.children&&D(_.children)})};return D(t),M}}}),[m,t,r,o,x,g,b,y,S,z,N,n,i,a,c,d,u,h,v,p]);qr(f,E)},kC=e=>{const n=tr("I18nService")?.dir||"ltr",r=Rn(e),{serviceRegistry:i,api:o}=r,{dir:a,apiRef:c,searchTerm:d}=e,u=a==="auto"||!a?n:a,{treeData:h,setInternalTreeData:m,loadingNodes:v,setLoadingNodes:f,updateNode:p}=SC(e),x=s.useMemo(()=>e.service?e.service:e.serviceName?oe.get(e.serviceName):null,[e.service,e.serviceName]);s.useEffect(()=>{x&&x.loadNodes().then(W=>{m(W)})},[x,m]);const g=Qi("HierarchyService",()=>new yC,i||oe),b=s.useCallback((W,I=0,X)=>{W.forEach(T=>{const j={id:T.id,level:I,parentId:X,children:T.children?.map(V=>V.id)};g.registerNode(j),T.children&&b(T.children,I+1,T.id)})},[g]);s.useEffect(()=>{g&&(g.cleanup(),b(h))},[h,g,b]);const{selectedNodes:y,setInternalSelectedNodes:S,toggleSelect:z,checkedNodes:N,setInternalCheckedNodes:E,indeterminateNodes:C,setIndeterminateNodes:M,toggleCheck:D,updateCheckState:A}=MC(e,g),{expandedNodes:_,setInternalExpandedNodes:U,toggleExpand:G}=zC(e,h,p,f,x),{flattenedNodes:Y}=NC(h,_,d),[te,Z]=s.useState(null),P=s.useCallback((W,I)=>{p(W,{label:I}),e.onNodeRename?.(W,I)},[p,e.onNodeRename]);return jC(e,h,m,_,U,N,E,S,M,A,Y,g,Z,c,o),{treeData:h,expandedNodes:_,selectedNodes:y,checkedNodes:N,indeterminateNodes:C,loadingNodes:v,flattenedNodes:Y,toggleExpand:G,toggleSelect:z,toggleCheck:D,handleNodeRename:P,dir:u,allowTextWrap:e.allowTextWrap,animation:e.animation,checkOnClick:e.checkOnClick,fullRowSelect:e.fullRowSelect,fullRowNavigable:e.fullRowNavigable,onKeyPress:e.onKeyPress,onNodeClicked:e.onNodeClicked,onDrawNode:e.onDrawNode,editingNodeId:te,setEditingNodeId:Z}},FC=()=>l.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md w-full",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",children:l.jsx(O.AlertTriangle,{className:"w-8 h-8 text-destructive"})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Tree View Error"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Something went wrong with the tree view. Please refresh the page or try again."})]}),l.jsxs("button",{onClick:()=>window.location.reload(),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",children:[l.jsx(O.RefreshCw,{className:"w-4 h-4"}),"Refresh Page"]})]})}),l3=s.memo(({node:e,level:t,isExpanded:n,isSelected:r,isChecked:i,isIndeterminate:o,isLoading:a,hasChildren:c,onToggleExpand:d,onToggleSelect:u,onToggleCheck:h,onRename:m,showCheckboxes:v,allowEditing:f,searchTerm:p,style:x,onKeyDown:g,tabIndex:b,autoFocus:y,components:S,allowTextWrap:z,animation:N,checkOnClick:E,fullRowSelect:C,fullRowNavigable:M,onNodeClicked:D,onDrawNode:A,isEditing:_,onEditingChange:U,dir:G})=>{const Y=G==="rtl",[te,Z]=s.useState(!1),[P,W]=s.useState(e.label);s.useEffect(()=>{_!==void 0&&_!==te&&(Z(_),_&&W(e.label))},[_,te,e.label]),s.useEffect(()=>{A?.(e)},[e,A]);const{setNodeRef:I,transform:X,isDragging:T,attributes:j,listeners:V}=De.useDraggable({id:e.id,data:{node:e,type:"tree-item"}}),{setNodeRef:L,isOver:$}=De.useDroppable({id:e.id,data:{node:e,level:t}}),se=s.useRef(null),ne=xe=>{L(xe),I(xe),se.current=xe};s.useEffect(()=>{y&&se.current&&!te&&se.current.focus({preventScroll:!0})},[y,te]);const de=()=>{f&&(Z(!0),W(e.label),U?.(!0))},pe=xe=>{xe.key==="Enter"?(m(e.id,P),Z(!1),U?.(!1)):xe.key==="Escape"&&(W(e.label),Z(!1),U?.(!1))},we=t*20+(c?0:20),Me={...x,transform:Ai.CSS.Translate.toString(X),opacity:T?.5:1,zIndex:T?999:"auto"},ve=S?.node,Q=S?.expandIcon,q=S?.checkbox,me=()=>{if(a)return l.jsx(O.Loader2,{className:"w-3.5 h-3.5 animate-spin"});if(!c)return null;if(Q){const xe=Q;return l.jsx(xe,{isExpanded:n,isLoading:a})}return n?l.jsx(O.ChevronDown,{className:"w-4 h-4"}):Y?l.jsx(O.ChevronRight,{className:"w-4 h-4 rotate-180"}):l.jsx(O.ChevronRight,{className:"w-4 h-4"})},ye=()=>{if(!v)return null;if(q){const xe=q;return l.jsx(xe,{checked:i,indeterminate:o,onChange:()=>h(e.id)})}return l.jsxs("div",{"data-testid":`tree-checkbox-${e.id}`,onClick:xe=>{xe.stopPropagation(),h(e.id)},className:`w-4 h-4 me-2 flex items-center justify-center rounded border transition-colors cursor-pointer
56
+ ${i||o?"bg-primary border-primary text-primary-foreground":"bg-background border-input"}`,children:[i&&l.jsx(O.Check,{className:"w-3 h-3"}),o&&l.jsx(O.Minus,{className:"w-3 h-3"})]})},ke=xe=>{xe==="edit"&&f&&(Z(!0),W(e.label))};return l.jsx(us,{contextId:"tree-node",data:e,onAction:ke,children:l.jsx("div",{ref:ne,...j,...V,role:"treeitem","data-testid":`tree-item-${e.id}`,"aria-expanded":c?n:void 0,"aria-selected":r,tabIndex:b,onKeyDown:xe=>{f&&xe.key==="F2"&&(xe.stopPropagation(),Z(!0),W(e.label)),V?.onKeyDown&&V.onKeyDown(xe),g(xe,e.id)},onClick:()=>{u(e.id),D?.(e.id),E&&v&&h(e.id)},className:H("flex items-center py-1.5 px-2 cursor-pointer hover:bg-muted/50 rounded-md w-full group outline-none focus:ring-1 focus:ring-primary/30 select-none",r?"bg-primary/10 text-primary":"text-foreground",$?"bg-primary/20 ring-2 ring-primary":"",N?"transition-all duration-200":""),style:{...Me,paddingInlineStart:`${we}px`},children:ve?l.jsx(ve,{node:e,level:t,isExpanded:n,isSelected:r,isChecked:i,isIndeterminate:o,onToggleExpand:()=>d(e.id),onToggleSelect:()=>u(e.id),onToggleCheck:()=>h(e.id)}):l.jsxs(l.Fragment,{children:[c||a?l.jsx("button",{"data-testid":"expand-button",onClick:xe=>{xe.stopPropagation(),d(e.id)},onPointerDown:xe=>xe.stopPropagation(),className:"w-5 h-5 flex items-center justify-center me-1 text-muted-foreground hover:text-foreground hover:bg-muted rounded focus:outline-none transition-colors",tabIndex:-1,children:me()}):null,ye(),e.icon&&l.jsx("span",{className:"me-2 flex-shrink-0 text-muted-foreground group-hover:text-foreground transition-colors",children:e.icon}),te?l.jsx("input",{"data-testid":"tree-item-edit-input",autoFocus:!0,value:P,onChange:xe=>W(xe.target.value),onKeyDown:pe,onBlur:()=>Z(!1),onClick:xe=>xe.stopPropagation(),className:"flex-1 bg-background border border-primary rounded px-1 text-sm outline-none"}):l.jsx("span",{className:`text-sm font-medium flex-1 ${z?"whitespace-normal":"truncate"}`,onDoubleClick:xe=>{xe.stopPropagation(),de()},children:l.jsx(Hl,{text:e.label,highlight:p})})]})})})});l3.displayName="EzTreeViewItem";const i3=s.memo(({items:e,expandedNodes:t,selectedNodes:n,checkedNodes:r,indeterminateNodes:i,loadingNodes:o,onToggleExpand:a,onToggleSelect:c,onToggleCheck:d,onNodeRename:u,className:h,dir:m,showCheckboxes:v,allowEditing:f,searchTerm:p,components:x,allowTextWrap:g,animation:b,checkOnClick:y,fullRowSelect:S,fullRowNavigable:z,onKeyPress:N,onNodeClicked:E,onDrawNode:C,editingNodeId:M,setEditingNodeId:D})=>{const{rowVirtualizer:A,parentRef:_,getVirtualItems:U}=fl({rowCount:e.length,rowHeight:32,overscanCount:10,progressiveRendering:!0}),[G,Y]=s.useState(0),te=s.useMemo(()=>{const P=new Map;return e.forEach((W,I)=>P.set(W.node.id,I)),P},[e]),Z=s.useCallback((P,W,I)=>{const X=m==="rtl",T=X?"ArrowLeft":"ArrowRight",j=X?"ArrowRight":"ArrowLeft";if(P.key==="ArrowDown"){P.preventDefault();const V=Math.min(e.length-1,W+1);Y(V),A.scrollToIndex(V)}else if(P.key==="ArrowUp"){P.preventDefault();const V=Math.max(0,W-1);Y(V),A.scrollToIndex(V)}else if(P.key===T)P.preventDefault(),(I.children?.length||!I.isLoaded&&!I.isLeaf)&&!t.has(I.id)?a(I.id):I.children?.length&&t.has(I.id)&&W+1<e.length&&e[W+1].level>(I.level??0)&&(Y(W+1),A.scrollToIndex(W+1));else if(P.key===j){if(P.preventDefault(),t.has(I.id))a(I.id);else if(I.parentId){const V=te.get(I.parentId);V!==void 0&&(Y(V),A.scrollToIndex(V))}}else(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),v?d(I.id):c(I.id))},[e,t,a,c,d,v,te,A]);return l.jsx("div",{ref:_,className:H("absolute inset-0 overflow-y-auto bg-background border rounded-lg shadow-sm focus:outline-none focus:ring-1 focus:ring-primary/20",h),dir:m,role:"tree",onKeyDown:P=>N?.(P),children:l.jsx("div",{style:{height:`${A.getTotalSize()}px`,width:"100%",position:"relative"},children:U().map(P=>{const W=e[P.index],{node:I,level:X}=W,T=G===P.index;return l.jsx(l3,{node:I,level:X,isExpanded:t.has(I.id),isSelected:n.has(I.id),isChecked:r.has(I.id),isIndeterminate:i.has(I.id),isLoading:o.has(I.id),hasChildren:!!I.children?.length||!I.isLoaded&&!I.isLeaf,onToggleExpand:a,onToggleSelect:c,onToggleCheck:d,onRename:u,showCheckboxes:v,allowEditing:f,searchTerm:p,onKeyDown:j=>Z(j,P.index,I),style:{position:"absolute",top:`${P.start}px`,left:0,width:"100%",height:`${P.size}px`},tabIndex:T?0:-1,autoFocus:T,components:x,allowTextWrap:g,animation:b,checkOnClick:y,fullRowSelect:S,fullRowNavigable:z,onNodeClicked:E,onDrawNode:C,isEditing:M===I.id,onEditingChange:j=>D(j?I.id:null),dir:m},I.id)})})})});i3.displayName="EzVirtualTree";const DC=({onDragEnd:e,onDragStart:t})=>{const[n,r]=s.useState(null),[i,o]=s.useState(null),[a,c]=s.useState("inside"),d=De.useSensors(De.useSensor(De.PointerSensor,{activationConstraint:{distance:8}})),u=s.useCallback(v=>{const{active:f}=v,p=f.data.current?.node;p&&(r(p),t?.(p))},[t]),h=s.useCallback(v=>{v.preventDefault();const{active:f,over:p}=v;if(!p)return;const x=f.data.current?.node,g=p.data.current?.node;if(x&&g&&x.id!==g.id){const b=p.rect,y=b.top+b.height/2;y<b.top+10?c("before"):y>b.bottom-10?c("after"):c("inside"),o(g)}},[]),m=s.useCallback(v=>{const{active:f,over:p}=v;f&&p&&n&&i&&e(n,i,a),r(null),o(null),c("inside")},[n,i,a,e]);return{sensors:d,activeNode:n,dragOverNode:i,dragPosition:a,handleDragStart:u,handleDragOver:h,handleDragEnd:m}},AC=e=>{Mn();const{expandedNodes:t,selectedNodes:n,checkedNodes:r,indeterminateNodes:i,loadingNodes:o,flattenedNodes:a,toggleExpand:c,toggleSelect:d,toggleCheck:u,handleNodeRename:h,dir:m,allowTextWrap:v,animation:f,checkOnClick:p,fullRowSelect:x,fullRowNavigable:g,onKeyPress:b,onNodeClicked:y,onDrawNode:S,editingNodeId:z,setEditingNodeId:N}=kC(e),{handleDragEnd:E,sensors:C}=DC({onDragEnd:(M,D,A)=>{e.onNodeDrop&&e.onNodeDrop(M,D,A)}});return l.jsx(er,{fallback:l.jsx(FC,{}),children:l.jsx("div",{className:H("relative flex-1 w-full h-full min-h-0",e.className),children:l.jsx(De.DndContext,{sensors:C,collisionDetection:De.closestCenter,onDragEnd:E,children:l.jsx(i3,{items:a,expandedNodes:t,selectedNodes:n,checkedNodes:r,indeterminateNodes:i,loadingNodes:o,onToggleExpand:c,onToggleSelect:d,onToggleCheck:u,onNodeRename:h,dir:m,showCheckboxes:e.showCheckboxes,allowEditing:e.allowEditing,searchTerm:e.searchTerm,components:e.components,allowTextWrap:v,animation:f,checkOnClick:p,fullRowSelect:x,fullRowNavigable:g,onKeyPress:b,onNodeClicked:y,onDrawNode:S,editingNodeId:z,setEditingNodeId:N})})})})},HC=()=>l.jsx("div",{className:"flex flex-col items-center justify-center h-full p-8",children:l.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",children:l.jsx(O.AlertTriangle,{className:"w-8 h-8 text-destructive"})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Kanban Board Error"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"An error occurred while rendering the Kanban board. Please refresh the page or contact support if the issue persists."})]}),l.jsx(J,{onClick:()=>window.location.reload(),children:"Reload Board"})]})}),TC=(e,t="standard")=>new Af({board:e,selectedCards:[],selectedColumnId:null,view:t,searchQuery:"",activeFilters:{},history:[e],historyIndex:0}),PC=e=>({setBoard:t=>{e.setState(n=>{const r=[...n.history.slice(0,n.historyIndex+1),t];return{...n,board:t,history:r,historyIndex:r.length-1}})},addCard:t=>{e.setState(n=>{const r={...n.board,cards:[...n.board.cards,t]},i=[...n.history.slice(0,n.historyIndex+1),r];return{...n,board:r,history:i,historyIndex:i.length-1}})},updateCard:(t,n)=>{e.setState(r=>{const i={...r.board,cards:r.board.cards.map(a=>a.id===t?{...a,...n}:a)},o=[...r.history.slice(0,r.historyIndex+1),i];return{...r,board:i,history:o,historyIndex:o.length-1}})},deleteCard:t=>{e.setState(n=>{const r={...n.board,cards:n.board.cards.filter(o=>o.id!==t)},i=[...n.history.slice(0,n.historyIndex+1),r];return{...n,board:r,history:i,historyIndex:i.length-1}})},moveCard:(t,n)=>{e.setState(r=>{const i={...r.board,cards:r.board.cards.map(a=>a.id===t?{...a,columnId:n}:a)},o=[...r.history.slice(0,r.historyIndex+1),i];return{...r,board:i,history:o,historyIndex:o.length-1}})},addColumn:t=>{e.setState(n=>{const r={...n.board,columns:[...n.board.columns,t]},i=[...n.history.slice(0,n.historyIndex+1),r];return{...n,board:r,history:i,historyIndex:i.length-1}})},updateColumn:(t,n)=>{e.setState(r=>{const i={...r.board,columns:r.board.columns.map(a=>a.id===t?{...a,...n}:a)},o=[...r.history.slice(0,r.historyIndex+1),i];return{...r,board:i,history:o,historyIndex:o.length-1}})},deleteColumn:t=>{e.setState(n=>{const r={...n.board,columns:n.board.columns.filter(o=>o.id!==t),cards:n.board.cards.filter(o=>o.columnId!==t)},i=[...n.history.slice(0,n.historyIndex+1),r];return{...n,board:r,history:i,historyIndex:i.length-1}})},setSelectedCards:t=>{e.setState(n=>({...n,selectedCards:t}))},setSelectedColumnId:t=>{e.setState(n=>({...n,selectedColumnId:t}))},setView:t=>{e.setState(n=>({...n,view:t}))},setSearchQuery:t=>{e.setState(n=>({...n,searchQuery:t}))},setActiveFilters:t=>{e.setState(n=>({...n,activeFilters:t}))},undo:()=>{e.setState(t=>t.historyIndex>0?{...t,board:t.history[t.historyIndex-1],historyIndex:t.historyIndex-1}:t)},redo:()=>{e.setState(t=>t.historyIndex<t.history.length-1?{...t,board:t.history[t.historyIndex+1],historyIndex:t.historyIndex+1}:t)},canUndo:()=>e.state.historyIndex>0,canRedo:()=>e.state.historyIndex<e.state.history.length-1}),IC=e=>{const t=s.useMemo(()=>TC(e.board,e.view),[e.board.id,e.view]),n=s.useMemo(()=>PC(t),[t]),r=dn(t,m=>m.board),i=dn(t,m=>m.selectedCards),o=dn(t,m=>m.selectedColumnId),a=dn(t,m=>m.view),c=dn(t,m=>m.searchQuery),d=dn(t,m=>m.activeFilters),u=s.useRef(JSON.stringify(e.board)),h=s.useRef(e.view);return s.useEffect(()=>{const m=JSON.stringify(e.board);m!==u.current&&(u.current=m,n.setBoard(e.board)),e.view&&e.view!==h.current&&(h.current=e.view,n.setView(e.view))},[e.board,e.view,n]),{board:r,selectedCards:i,selectedColumnId:o,view:a,searchQuery:c,activeFilters:d,setBoard:n.setBoard,setSelectedCards:n.setSelectedCards,setSelectedColumnId:n.setSelectedColumnId,setView:n.setView,setSearchQuery:n.setSearchQuery,setActiveFilters:n.setActiveFilters,addCard:n.addCard,updateCard:n.updateCard,deleteCard:n.deleteCard,moveCard:n.moveCard,addColumn:n.addColumn,updateColumn:n.updateColumn,deleteColumn:n.deleteColumn,undo:n.undo,redo:n.redo,canUndo:n.canUndo(),canRedo:n.canRedo(),store:t,actions:n}},OC=(e,t)=>{const n=sn(),r=()=>oe.get("KanbanService"),i=(b,y,S=3e3)=>{const z=oe.get("NotificationService");z&&z.add({type:b,message:y,duration:S})},o=b=>{n.setQueryData(["board",t.id],b),e.onBoardChange?.(b)},a=Le({mutationFn:async b=>{const y=r();return y?await y.createCard(t.id,b):await e.onCardCreate?.(b),b},onMutate:async b=>{await n.cancelQueries({queryKey:["board",t.id]});const y=n.getQueryData(["board",t.id]),S={...t,cards:[...t.cards,b]};return o(S),{previousBoard:y}},onError:(b,y,S)=>{S?.previousBoard&&o(S.previousBoard),i("error","Failed to create card. Please try again.",5e3)},onSuccess:b=>{i("success",`Card "${b.title}" created successfully`)}}),c=s.useCallback(async b=>{const y={id:`card-${Date.now()}`,type:b.type||"standard",title:b.title||"New Card",description:b.description,columnId:b.columnId||t.columns[0]?.id||"",position:b.position??t.cards.filter(S=>S.columnId===b.columnId).length,assignees:b.assignees||[],tags:b.tags||[],priority:b.priority,metadata:b.metadata||{},createdBy:"current-user",createdAt:new Date,updatedBy:"current-user",updatedAt:new Date,...b};return a.mutateAsync(y)},[t,a]),d=Le({mutationFn:async({cardId:b,updates:y})=>{const S=r();if(S)await S.updateCard(b,y);else{const z=t.cards.find(N=>N.id===b);z&&await e.onCardUpdate?.({...z,...y},"edit")}return{cardId:b,updates:y}},onMutate:async({cardId:b,updates:y})=>{await n.cancelQueries({queryKey:["board",t.id]});const S=n.getQueryData(["board",t.id]),z=t.cards.map(E=>E.id===b?{...E,...y,updatedAt:new Date}:E),N={...t,cards:z};return o(N),{previousBoard:S}},onError:(b,y,S)=>{S?.previousBoard&&o(S.previousBoard),i("error","Failed to update card",5e3)},onSuccess:()=>{i("success","Card updated successfully",2e3)}}),u=s.useCallback(async(b,y)=>d.mutateAsync({cardId:b,updates:y}),[d]),h=Le({mutationFn:async b=>{const y=r();return y?await y.deleteCard(b):await e.onCardDelete?.(b),b},onMutate:async b=>{await n.cancelQueries({queryKey:["board",t.id]});const y=n.getQueryData(["board",t.id]),S={...t,cards:t.cards.filter(z=>z.id!==b)};return o(S),{previousBoard:y,deletedCardTitle:y?.cards.find(z=>z.id===b)?.title}},onError:(b,y,S)=>{S?.previousBoard&&o(S.previousBoard),i("error","Failed to delete card",5e3)},onSuccess:(b,y,S)=>{const z=S?.deletedCardTitle||"Card";i("success",`Card "${z}" deleted`)}}),m=s.useCallback(async b=>h.mutateAsync(b),[h]),v=Le({mutationFn:async b=>{const{cardId:y,targetColumnId:S,targetSwimlaneId:z,targetPosition:N}=b,E=r();if(E)await E.moveCard(y,S,z,N);else{const C=t.cards.find(M=>M.id===y);C&&await e.onCardUpdate?.({...C,columnId:S,swimlaneId:z},"move")}},onMutate:async({cardId:b,targetColumnId:y,targetSwimlaneId:S,targetPosition:z})=>{await n.cancelQueries({queryKey:["board",t.id]});const N=n.getQueryData(["board",t.id]),E=t.cards.map(M=>M.id===b?{...M,columnId:y,swimlaneId:S,position:z??M.position,updatedAt:new Date}:M),C={...t,cards:E};return o(C),{previousBoard:N}},onError:(b,y,S)=>{S?.previousBoard&&o(S.previousBoard),i("error","Failed to move card",3e3)}}),f=s.useCallback(async(b,y,S,z)=>v.mutateAsync({cardId:b,targetColumnId:y,targetSwimlaneId:S,targetPosition:z}),[v]),p=s.useCallback(async b=>{const y=t.cards.find(z=>z.id===b);if(!y)throw new Error("Card not found");const S={...y,id:`card-${Date.now()}`,title:`${y.title} (Copy)`,position:(y.position??0)+1,createdAt:new Date,updatedAt:new Date};return c(S)},[t.cards,c]),x=s.useCallback(async b=>u(b,{isArchived:!0}),[u]),g=s.useCallback(async b=>u(b,{isArchived:!1}),[u]);return{createCard:c,updateCard:u,deleteCard:m,moveCard:f,duplicateCard:p,archiveCard:x,restoreCard:g}},LC=(e,t)=>{const n=sn(),r=()=>oe.get("KanbanService"),i=(g,b,y=3e3)=>{const S=oe.get("NotificationService");S&&S.add({type:g,message:b,duration:y})},o=g=>{n.setQueryData(["board",t.id],g),e.onBoardChange?.(g)},a=Le({mutationFn:async g=>{const b=r();return b?await b.createColumn(t.id,g):await e.onColumnCreate?.(g),g},onMutate:async g=>{await n.cancelQueries({queryKey:["board",t.id]});const b=n.getQueryData(["board",t.id]),y={...t,columns:[...t.columns,g]};return o(y),{previousBoard:b}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to create column",5e3)},onSuccess:g=>{i("success",`Column "${g.name}" added`)}}),c=s.useCallback(async g=>{const b={id:`column-${Date.now()}`,name:g.name||"New Column",color:g.color,icon:g.icon,wipLimit:g.wipLimit,position:g.position??t.columns.length,isCollapsed:!1,...g};return a.mutateAsync(b)},[t.columns.length,a]),d=Le({mutationFn:async({columnId:g,updates:b})=>{const y=r();if(y)await y.updateColumn(g,b);else{const S=t.columns.find(z=>z.id===g);S&&await e.onColumnUpdate?.({...S,...b})}return{columnId:g,updates:b}},onMutate:async({columnId:g,updates:b})=>{await n.cancelQueries({queryKey:["board",t.id]});const y=n.getQueryData(["board",t.id]),S={...t,columns:t.columns.map(z=>z.id===g?{...z,...b}:z)};return o(S),{previousBoard:y}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to update column",5e3)}}),u=s.useCallback(async(g,b)=>d.mutateAsync({columnId:g,updates:b}),[d]),h=Le({mutationFn:async g=>{const b=r();return b?await b.deleteColumn(g):await e.onColumnDelete?.(g),g},onMutate:async g=>{await n.cancelQueries({queryKey:["board",t.id]});const b=n.getQueryData(["board",t.id]),y=b?.columns.find(z=>z.id===g),S={...t,columns:t.columns.filter(z=>z.id!==g),cards:t.cards.filter(z=>z.columnId!==g)};return o(S),{previousBoard:b,deletedColumnName:y?.name}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to delete column",5e3)},onSuccess:(g,b,y)=>{const S=y?.deletedColumnName||"Column";i("success",`Column "${S}" deleted`)}}),m=s.useCallback(async g=>h.mutateAsync(g),[h]),v=Le({mutationFn:async g=>{const b=r();if(b){const y=g.map((S,z)=>b.updateColumn(S,{position:z}));await Promise.all(y)}return g},onMutate:async g=>{await n.cancelQueries({queryKey:["board",t.id]});const b=n.getQueryData(["board",t.id]),y={...t,columns:g.map((S,z)=>{const N=t.columns.find(E=>E.id===S);if(!N)throw new Error(`Column ${S} not found`);return{...N,position:z}})};return o(y),{previousBoard:b}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to reorder columns",3e3)}}),f=s.useCallback(async g=>v.mutateAsync(g),[v]),p=s.useCallback(g=>{u(g,{isCollapsed:!0})},[u]),x=s.useCallback(g=>{u(g,{isCollapsed:!1})},[u]);return{createColumn:c,updateColumn:u,deleteColumn:m,reorderColumns:f,collapseColumn:p,expandColumn:x}},_C=(e,t)=>{const n=sn(),r=()=>oe.get("KanbanService"),i=(g,b,y=3e3)=>{const S=oe.get("NotificationService");S&&S.add({type:g,message:b,duration:y})},o=g=>{n.setQueryData(["board",t.id],g),e.onBoardChange?.(g)},a=Le({mutationFn:async g=>{const b=r();return b?await b.createSwimlane(t.id,g):await e.onSwimlaneCreate?.(g),g},onMutate:async g=>{await n.cancelQueries({queryKey:["board",t.id]});const b=n.getQueryData(["board",t.id]),y={...t,swimlanes:[...t.swimlanes||[],g]};return o(y),{previousBoard:b}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to create swimlane",5e3)},onSuccess:g=>{i("success",`Swimlane "${g.name}" added`)}}),c=s.useCallback(async g=>{const b={id:`swimlane-${Date.now()}`,name:g.name||"New Swimlane",type:g.type||"custom",color:g.color,position:g.position??(t.swimlanes?.length||0),isCollapsed:!1,...g};return a.mutateAsync(b)},[t.swimlanes,a]),d=Le({mutationFn:async({swimlaneId:g,updates:b})=>{const y=r();if(y)await y.updateSwimlane(g,b);else{const S=t.swimlanes?.find(z=>z.id===g);S&&await e.onSwimlaneUpdate?.({...S,...b})}return{swimlaneId:g,updates:b}},onMutate:async({swimlaneId:g,updates:b})=>{await n.cancelQueries({queryKey:["board",t.id]});const y=n.getQueryData(["board",t.id]),S={...t,swimlanes:(t.swimlanes||[]).map(z=>z.id===g?{...z,...b}:z)};return o(S),{previousBoard:y}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to update swimlane",5e3)}}),u=s.useCallback(async(g,b)=>d.mutateAsync({swimlaneId:g,updates:b}),[d]),h=Le({mutationFn:async g=>{const b=r();return b?await b.deleteSwimlane(g):await e.onSwimlaneDelete?.(g),g},onMutate:async g=>{await n.cancelQueries({queryKey:["board",t.id]});const b=n.getQueryData(["board",t.id]),y=b?.swimlanes?.find(z=>z.id===g),S={...t,swimlanes:(t.swimlanes||[]).filter(z=>z.id!==g),cards:t.cards.map(z=>z.swimlaneId===g?{...z,swimlaneId:void 0}:z)};return o(S),{previousBoard:b,deletedSwimlaneName:y?.name}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to delete swimlane",5e3)},onSuccess:(g,b,y)=>{const S=y?.deletedSwimlaneName||"Swimlane";i("success",`Swimlane "${S}" deleted`)}}),m=s.useCallback(async g=>h.mutateAsync(g),[h]),v=Le({mutationFn:async g=>{const b=r();if(b){const y=g.map((S,z)=>b.updateSwimlane(S,{position:z}));await Promise.all(y)}return g},onMutate:async g=>{await n.cancelQueries({queryKey:["board",t.id]});const b=n.getQueryData(["board",t.id]),y={...t,swimlanes:g.map((S,z)=>{const N=t.swimlanes?.find(E=>E.id===S);return N?{...N,position:z}:null}).filter(Boolean)};return o(y),{previousBoard:b}},onError:(g,b,y)=>{y?.previousBoard&&o(y.previousBoard),i("error","Failed to reorder swimlanes",3e3)}}),f=s.useCallback(async g=>v.mutateAsync(g),[v]),p=s.useCallback(g=>{u(g,{isCollapsed:!0}),e.onSwimlaneToggle?.({swimlaneId:g,isCollapsed:!0})},[u,e.onSwimlaneToggle]),x=s.useCallback(g=>{u(g,{isCollapsed:!1}),e.onSwimlaneToggle?.({swimlaneId:g,isCollapsed:!1})},[u,e.onSwimlaneToggle]);return{createSwimlane:c,updateSwimlane:u,deleteSwimlane:m,reorderSwimlanes:f,collapseSwimlane:p,expandSwimlane:x}},VC=e=>{const[t,n]=s.useState(""),[r,i]=s.useState({});return{filteredCards:s.useMemo(()=>e.cards.filter(c=>{if(t){const d=t.toLowerCase();if(!(c.title.toLowerCase().includes(d)||c.description?.toLowerCase().includes(d)||c.tags.some(h=>h.name.toLowerCase().includes(d))))return!1}return!(r.tags&&r.tags.length>0&&!c.tags.some(u=>r.tags?.includes(u.id))||r.assignees&&r.assignees.length>0&&!c.assignees.some(u=>r.assignees?.includes(u.id))||r.priority&&r.priority.length>0&&c.priority&&!r.priority.includes(c.priority)||r.columns&&r.columns.length>0&&!r.columns.includes(c.columnId))}),[e.cards,t,r]),searchQuery:t,setSearchQuery:n,activeFilters:r,setActiveFilters:i,clearFilters:()=>{n(""),i({})}}},BC=(e,t,n=!1,r)=>{const[i,o]=s.useState(null),[a,c]=s.useState(null),[d,u]=s.useState(null),h=s.useCallback(p=>{if(r?.onCardDragStart){const x={card:p,columnId:p.columnId,cancel:!1};if(r.onCardDragStart(x),x.cancel)return}o(p)},[r?.onCardDragStart]),m=s.useCallback((p,x)=>{i&&a!==p&&(a&&r?.onCardDragLeave&&r.onCardDragLeave({card:i,targetColumnId:a}),r?.onCardDragEnter&&r.onCardDragEnter({card:i,targetColumnId:p})),c(p),x&&u(x)},[i,r,a]),v=s.useCallback(()=>{i&&r?.onCardDragStop&&r.onCardDragStop({card:i,columnId:i.columnId}),o(null),c(null),u(null)},[i,r?.onCardDragStop]),f=s.useCallback((p,x)=>{if(!i)return;const g=e.columns.find(b=>b.id===p);if(g?.wipLimit&&e.cards.filter(y=>y.columnId===p&&!y.isArchived).length>=g.wipLimit&&(i.columnId!==p||i.swimlaneId!==x)){const y=oe.get("NotificationService");if(y&&y.add({type:"warning",message:`WIP limit reached for "${g.name}" (${g.wipLimit} cards)`,duration:4e3}),n){y?.add({type:"error",message:`Cannot move card: "${g.name}" is full (Strict WIP)`,duration:4e3}),o(null),c(null),u(null);return}}t(i.id,p,x),r?.onCardDragStop&&r.onCardDragStop({card:i,columnId:p}),o(null),c(null),u(null)},[i,e,t,r?.onCardDragStop]);return{draggedCard:i,dragOverColumn:a,dragOverSwimlane:d,handleDragStart:h,handleDragOver:m,handleDragEnd:v,handleDrop:f}},$C=(e,t={})=>{const r=tr("I18nService")?.dir||"ltr",i=e.dir==="auto"||!e.dir?r:e.dir,o={showSpinner:()=>{},hideSpinner:()=>{}},a=null,{board:c,setBoard:d,selectedCards:u,setSelectedCards:h,selectedColumnId:m,setSelectedColumnId:v,view:f,setView:p,undo:x,redo:g,canUndo:b,canRedo:y}=IC(e),[S,z]=s.useState(null),{createCard:N,updateCard:E,deleteCard:C,moveCard:M,duplicateCard:D,archiveCard:A,restoreCard:_}=OC(e,c),{createColumn:U,updateColumn:G,deleteColumn:Y,reorderColumns:te,collapseColumn:Z,expandColumn:P}=LC(e,c),{createSwimlane:W,updateSwimlane:I,deleteSwimlane:X,reorderSwimlanes:T,collapseSwimlane:j,expandSwimlane:V}=_C(e,c),{draggedCard:L,dragOverColumn:$,handleDragStart:se,handleDragOver:ne,handleDragEnd:de,handleDrop:pe}=BC(c,M,e.wipStrict,e),{filteredCards:we,searchQuery:Me,setSearchQuery:ve,activeFilters:Q,setActiveFilters:q,clearFilters:me}=VC(c),{selectedIndex:ye,setSelectedIndex:ke}=_2({totalItems:we.length,columns:1,enabled:!e.readOnly,onSelect:Ce=>{const ee=we[Ce];ee&&(z(ee.id),(document.getElementById(ee.id)||document.querySelector(`[data-card-id="${ee.id}"]`))?.scrollIntoView({behavior:"smooth",block:"nearest"}))},onAction:Ce=>{const ee=we[Ce];ee&&t.onCardClick&&t.onCardClick(ee)}}),xe=s.useMemo(()=>({addCard:N,updateCard:E,deleteCard:C,moveCard:M,duplicateCard:D,archiveCard:A,restoreCard:_,getCard:Ce=>c.cards.find(ee=>ee.id===Ce),getCards:()=>c.cards,getCardsInColumn:Ce=>c.cards.filter(ee=>ee.columnId===Ce),getOrderedCards:Ce=>c.cards.filter(ee=>ee.columnId===Ce).sort((ee,re)=>(ee.position??0)-(re.position??0)),addColumn:U,updateColumn:G,deleteColumn:Y,reorderColumns:te,collapseColumn:Z,expandColumn:P,getColumn:Ce=>c.columns.find(ee=>ee.id===Ce),getColumns:()=>c.columns,addSwimlane:W,updateSwimlane:I,deleteSwimlane:X,reorderSwimlanes:T,collapseSwimlane:j,expandSwimlane:V,getSwimlane:Ce=>c.swimlanes?.find(ee=>ee.id===Ce),getSwimlanes:()=>c.swimlanes||[],selectCard:Ce=>h([Ce]),selectCards:h,deselectCard:Ce=>{const ee=u.filter(re=>re!==Ce);h(ee)},deselectAllCards:()=>h([]),getSelectedCards:()=>c.cards.filter(Ce=>u.includes(Ce.id)),focusCard:Ce=>{const ee=document.getElementById(Ce)||document.querySelector(`[data-card-id="${Ce}"]`);ee instanceof HTMLElement&&(ee.focus(),ee.scrollIntoView({behavior:"smooth",block:"center"}))},highlightCard:(Ce,ee=2e3)=>{z(Ce),setTimeout(()=>z(null),ee)},setView:p,getView:()=>f,scrollToColumn:(Ce,ee)=>{(document.getElementById(`column-${Ce}`)||document.querySelector(`[data-column-id="${Ce}"]`))?.scrollIntoView(ee||{behavior:"smooth",block:"center",inline:"center"})},scrollToCard:(Ce,ee)=>{(document.getElementById(Ce)||document.querySelector(`[data-card-id="${Ce}"]`))?.scrollIntoView(ee||{behavior:"smooth",block:"center"})},setSearchQuery:ve,getSearchQuery:()=>Me,setActiveFilters:q,getActiveFilters:()=>Q,clearFilters:me,getFilteredCards:()=>we,getBoard:()=>c,setBoard:d,refresh:async()=>{},reset:()=>d(e.board),showSpinner:o.showSpinner,hideSpinner:o.hideSpinner,forceUpdate:()=>{},getStatistics:()=>({totalCards:c.cards.length,totalColumns:c.columns.length}),validate:()=>({isValid:!0,errors:[]}),...t}),[c,N,E,C,M,D,A,_,U,G,Y,te,Z,P,W,I,X,T,j,V,u,h,m,v,Me,ve,Q,q,me,we,d,e.board,o,t,f,e.wipStrict,e]);return s.useMemo(()=>({...xe,board:c,setBoard:d,selectedCards:u,setSelectedCards:h,highlightedCardId:S,selectedColumnId:m,setSelectedColumnId:v,view:f,setView:p,dir:i,createCard:N,updateCard:E,deleteCard:C,moveCard:M,duplicateCard:D,archiveCard:A,restoreCard:_,createColumn:U,updateColumn:G,deleteColumn:Y,reorderColumns:te,collapseColumn:Z,expandColumn:P,createSwimlane:W,updateSwimlane:I,deleteSwimlane:X,reorderSwimlanes:T,collapseSwimlane:j,expandSwimlane:V,draggedCard:L,dragOverColumn:$,handleDragStart:se,handleDragOver:ne,handleDragEnd:de,handleDrop:pe,filteredCards:we,searchQuery:Me,setSearchQuery:ve,activeFilters:Q,setActiveFilters:q,clearFilters:me,serviceRegistry:a,selectedIndex:ye,setSelectedIndex:ke,undo:x,redo:g,canUndo:b,canRedo:y}),[o,xe,c,d,u,h,S,m,v,f,p,i,N,E,C,M,D,A,_,U,G,Y,te,Z,P,W,I,X,T,j,V,L,$,se,ne,de,pe,we,Me,ve,Q,q,me,a,ye,ke,x,g,b,y])},Es=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Es.displayName="Card";const yi=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("flex flex-col space-y-1.5 p-6",e),...t}));yi.displayName="CardHeader";const o3=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("font-semibold leading-none tracking-tight",e),...t}));o3.displayName="CardTitle";const a3=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("text-sm text-muted-foreground",e),...t}));a3.displayName="CardDescription";const ys=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("p-6 pt-0",e),...t}));ys.displayName="CardContent";const c3=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("flex items-center p-6 pt-0",e),...t}));c3.displayName="CardFooter";const d3=zs.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ci({className:e,variant:t,...n}){return l.jsx("div",{className:H(d3({variant:t}),e),...n})}const u3={Active:{container:"bg-emerald-100 text-emerald-950 border-emerald-300 dark:bg-emerald-500 dark:text-emerald-50 dark:border-emerald-400",dot:"bg-emerald-600 dark:bg-emerald-200"},Verified:{container:"bg-emerald-100 text-emerald-950 border-emerald-300 dark:bg-emerald-500 dark:text-emerald-50 dark:border-emerald-400",dot:"bg-emerald-600 dark:bg-emerald-200"},Completed:{container:"bg-emerald-100 text-emerald-950 border-emerald-300 dark:bg-emerald-500 dark:text-emerald-50 dark:border-emerald-400",dot:"bg-emerald-600 dark:bg-emerald-200"},Inactive:{container:"bg-rose-100 text-rose-950 border-rose-300 dark:bg-rose-500 dark:text-rose-50 dark:border-rose-400",dot:"bg-rose-600 dark:bg-rose-200"},Unverified:{container:"bg-rose-100 text-rose-950 border-rose-300 dark:bg-rose-500 dark:text-rose-50 dark:border-rose-400",dot:"bg-rose-600 dark:bg-rose-200"},"On Leave":{container:"bg-rose-100 text-rose-950 border-rose-300 dark:bg-rose-500 dark:text-rose-50 dark:border-rose-400",dot:"bg-rose-600 dark:bg-rose-200"},Pending:{container:"bg-amber-100 text-amber-950 border-amber-300 dark:bg-amber-500 dark:text-amber-50 dark:border-amber-400",dot:"bg-amber-600 dark:bg-amber-200"},"In Progress":{container:"bg-blue-100 text-blue-950 border-blue-300 dark:bg-blue-500 dark:text-blue-50 dark:border-blue-400",dot:"bg-blue-600 dark:bg-blue-200"},Default:{container:"bg-slate-100 text-slate-950 border-slate-300 dark:bg-slate-500 dark:text-slate-50 dark:border-slate-400",dot:"bg-slate-600 dark:bg-slate-200"}},Si=s.memo(({status:e,className:t})=>{const n=u3[e]||u3.Default;return l.jsxs("div",{className:H("inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[12px] font-black border tracking-wide transition-all duration-300 shadow-sm",n.container,t),children:[l.jsx("span",{className:H("w-2 h-2 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.1)]",n.dot)}),e]})});Si.displayName="StatusBadge";const h3={formatDate:(e,t="PP")=>{if(!e)return"";const n=new Date(e);return K.isValid(n)?K.format(n,t):""},formatDateTime:(e,t="PP p")=>{if(!e)return"";const n=new Date(e);return K.isValid(n)?K.format(n,t):""},isValidDate:e=>{const t=new Date(e);return K.isValid(t)}},m3=({card:e,onClick:t,onDoubleClick:n,onDragStart:r,onDragEnd:i,isDragging:o,isHighlighted:a,enableTooltip:c,tooltipTemplate:d,customFields:u,customRenderers:h,className:m,dir:v})=>{const f=v==="rtl",p=C=>{C.dataTransfer.effectAllowed="move",C.dataTransfer.setData("text/plain",e.id),r?.(e)},x={low:"Pending",medium:"In Progress",high:"Active",critical:"Inactive"},g=e.checklists?.reduce((C,M)=>C+M.items.length,0)||0,b=e.checklists?.reduce((C,M)=>C+M.items.filter(D=>D.isChecked).length,0)||0,y=e.subtasks?.length||0,S=e.subtasks?.filter(C=>C.isCompleted).length||0,z=l.jsxs("div",{className:"p-0 space-y-2",children:[e.coverImage&&l.jsx("div",{className:"h-32 w-full overflow-hidden rounded-t-lg",children:l.jsx("img",{src:e.coverImage,alt:"Cover",className:"w-full h-full object-cover"})}),l.jsxs("div",{className:H("p-3 space-y-2",e.coverImage?"pt-1":""),children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsx("h4",{className:"font-medium text-sm line-clamp-2 flex-1",children:e.title}),e.priority&&l.jsx(Si,{status:x[e.priority]||"Pending",className:"shrink-0"})]}),e.description&&l.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.description}),e.tags&&e.tags.length>0&&l.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map(C=>l.jsx(Ci,{variant:"secondary",className:"text-xs px-2 py-0",style:{backgroundColor:C.color,color:"#fff"},children:C.name},C.id))}),(g>0||e.attachments&&e.attachments.length>0||e.comments&&e.comments.length>0||y>0||e.timeTracking)&&l.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground pt-1 flex-wrap",children:[e.attachments&&e.attachments.length>0&&l.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[l.jsx(O.Paperclip,{className:"w-3 h-3"}),l.jsx("span",{children:e.attachments.length})]}),e.comments&&e.comments.length>0&&l.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[l.jsx(O.MessageSquare,{className:"w-3 h-3"}),l.jsx("span",{children:e.comments.length})]}),g>0&&l.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[l.jsx(O.CheckSquare,{className:"w-3 h-3"}),l.jsxs("span",{children:[b,"/",g]})]}),y>0&&l.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[l.jsx(O.List,{className:"w-3 h-3"}),l.jsxs("span",{children:[S,"/",y]})]}),e.timeTracking&&(e.timeTracking.estimated>0||e.timeTracking.actual>0)&&l.jsxs("div",{className:"flex items-center gap-1 text-xs",title:`Estimated: ${e.timeTracking.estimated}h, Actual: ${e.timeTracking.actual}h`,children:[l.jsx(O.Clock,{className:"w-3 h-3"}),l.jsxs("span",{children:[e.timeTracking.actual,"h / ",e.timeTracking.estimated,"h"]})]})]}),l.jsxs("div",{className:"flex items-center justify-between pt-1",children:[e.assignees&&e.assignees.length>0&&l.jsxs("div",{className:"flex -space-x-2",children:[e.assignees.slice(0,3).map(C=>l.jsx(ct,{className:"w-6 h-6 border-2 border-background",children:C.avatarUrl?l.jsx(Nt,{src:C.avatarUrl,alt:C.name}):l.jsx(dt,{className:"text-xs",children:C.name.substring(0,2).toUpperCase()})},C.id)),e.assignees.length>3&&l.jsx("div",{className:"w-6 h-6 rounded-full bg-muted border-2 border-background flex items-center justify-center",children:l.jsxs("span",{className:"text-xs",children:["+",e.assignees.length-3]})})]}),e.dueDate&&l.jsxs("div",{className:H("flex items-center gap-1 text-xs text-muted-foreground",f?"mr-auto":"ml-auto"),children:[l.jsx(O.Calendar,{className:"w-3 h-3"}),l.jsx("span",{children:h3.formatDate(e.dueDate)})]})]})]}),u&&u.length>0&&e.customFieldValues&&l.jsx("div",{className:"px-3 pb-3 gap-1 flex flex-wrap",children:u.map(C=>{const M=e.customFieldValues?.[C.id];return M==null||M===""?null:l.jsxs("div",{className:"text-xs bg-muted px-1.5 py-0.5 rounded flex items-center gap-1 max-w-full truncate",children:[l.jsxs("span",{className:"text-muted-foreground opacity-70",children:[C.name,":"]}),l.jsx("span",{className:"font-medium truncate",children:C.type==="date"?h3.formatDate(M):String(M)})]},C.id)})})]}),N=h?.cardContent?h.cardContent(e):z,E=l.jsx(Es,{draggable:!0,onDragStart:p,onDragEnd:i,onClick:()=>t?.(e),onDoubleClick:()=>n?.(e),id:e.id,"data-card-id":e.id,className:H("cursor-pointer transition-all hover:shadow-md overflow-hidden",o&&"opacity-50",a&&"ring-2 ring-primary bg-primary/5 transition-colors duration-300",m),children:N});return h?.card?h.card(e,E):l.jsx(oi,{enabled:c,content:d?d(e):null,children:E})};m3.displayName="KanbanCard";const zi=s.memo(m3),WC=({cards:e,estimateSize:t=120,overscan:n=5})=>{const r=s.useRef(null),i=Zt.useVirtualizer({count:e.length,getScrollElement:()=>r.current,estimateSize:()=>t,overscan:n});return{parentRef:r,virtualizer:i,virtualItems:i.getVirtualItems(),totalSize:i.getTotalSize()}},UC=({column:e,cards:t,onCardClick:n,onCardDoubleClick:r,onCardDragStart:i,onCardDragEnd:o,onDrop:a,onAddCard:c,onToggleCollapse:d,onDeleteColumn:u,onUpdateColumn:h,onColumnClick:m,selectedColumnId:v,draggedCardId:f,highlightedCardId:p,customFields:x,customRenderers:g,className:b,dir:y})=>{const S=y==="rtl",{t:z}=en(),[N,E]=s.useState(!1),[C,M]=s.useState(e.name),D=s.useRef(null);s.useEffect(()=>{N&&D.current&&(D.current.focus(),D.current.select())},[N]);const A=()=>{C.trim()&&C!==e.name?h?.(e.id,{name:C}):M(e.name),E(!1)},_=P=>{P.key==="Enter"?A():P.key==="Escape"&&(M(e.name),E(!1))},U=P=>{P.preventDefault(),P.dataTransfer.dropEffect="move"},G=P=>{P.preventDefault(),a?.(e.id)},Y=e.wipLimit&&t.length>e.wipLimit,te=e.wipLimit&&t.length===e.wipLimit,Z=l.jsxs(Es,{className:H("flex flex-col w-80 shrink-0 transition-colors",v===e.id?"ring-2 ring-primary border-primary":"",b),onDragOver:U,onDrop:G,onClick:()=>m?.(e.id),children:[l.jsxs(yi,{className:"pb-3",onDoubleClick:()=>E(!0),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[l.jsx(J,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>d?.(e.id),children:e.isCollapsed?S?l.jsx(O.ChevronRight,{className:"h-4 w-4 rotate-180"}):l.jsx(O.ChevronRight,{className:"h-4 w-4"}):l.jsx(O.ChevronDown,{className:"h-4 w-4"})}),l.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[N?l.jsx("input",{ref:D,value:C,onChange:P=>M(P.target.value),onBlur:A,onKeyDown:_,className:"h-6 w-full text-sm font-semibold border rounded px-1 bg-background",onClick:P=>P.stopPropagation()}):l.jsx("h3",{className:"font-semibold text-sm truncate",title:e.name,children:e.name}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.length," ",z("items")]})]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs($t,{children:[l.jsx(Wt,{asChild:!0,children:l.jsx(J,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",children:l.jsx(O.MoreHorizontal,{className:"h-4 w-4"})})}),l.jsx(At,{align:"end",children:l.jsxs(Ut,{className:"text-red-600 focus:text-red-600 focus:bg-red-50",onClick:()=>u?.(e.id),children:[l.jsx(O.Trash2,{className:"h-4 w-4 me-2"}),z("delete_column")||"Delete Column"]})})]}),l.jsx(J,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>c?.(e.id),children:l.jsx(O.Plus,{className:"h-4 w-4"})})]})]}),e.wipLimit&&l.jsx("div",{className:"mt-2",children:l.jsx("div",{className:"h-1 w-full bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:H("h-full transition-all",Y?"bg-red-500":te?"bg-yellow-500":"bg-green-500"),style:{width:`${Math.min(t.length/e.wipLimit*100,100)}%`}})})})]}),!e.isCollapsed&&(()=>{const P=t.sort((W,I)=>W.position-I.position);if(P.length>50){const{parentRef:W,virtualItems:I,totalSize:X}=WC({cards:P,estimateSize:120,overscan:5});return l.jsxs(ys,{ref:W,className:"flex-1 overflow-y-auto max-h-[calc(100vh-200px)]",children:[l.jsx("div",{style:{height:`${X}px`,position:"relative"},children:I.map(T=>{const j=P[T.index];return l.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${T.start}px)`,paddingBottom:"8px"},children:l.jsx(zi,{card:j,onClick:n,onDoubleClick:r,onDragStart:i,onDragEnd:o,isDragging:f===j.id,isHighlighted:p===j.id,customFields:x,customRenderers:g,dir:y})},j.id)})}),P.length===0&&l.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:z("no_cards")})]})}return l.jsxs(ys,{className:"flex-1 overflow-y-auto max-h-[calc(100vh-200px)] space-y-2",children:[P.map(W=>l.jsx(zi,{card:W,onClick:n,onDoubleClick:r,onDragStart:i,onDragEnd:o,isDragging:f===W.id,isHighlighted:p===W.id,customFields:x,customRenderers:g,dir:y},W.id)),t.length===0&&l.jsx("div",{className:"flex h-32 items-center justify-center rounded-lg border border-dashed text-sm text-muted-foreground",children:z("no_cards")})]})})()]});return g?.column?g.column(e):Z},f3=({swimlane:e,columns:t,cards:n,onCardClick:r,onCardDoubleClick:i,onCardDragStart:o,onCardDragEnd:a,onDrop:c,onToggleCollapse:d,draggedCardId:u,highlightedCardId:h,customFields:m,customRenderers:v,className:f,dir:p})=>{const x=p==="rtl",{t:g}=en(),b=S=>{S.preventDefault(),S.dataTransfer.dropEffect="move"},y=(S,z)=>{S.preventDefault(),c?.(z,e.id)};return l.jsxs("div",{className:H("flex flex-col border rounded-lg bg-card text-card-foreground shadow-sm mb-4",f),children:[l.jsxs("div",{className:"flex items-center gap-2 p-3 border-b bg-muted/30",children:[l.jsx(J,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>d?.(e.id),children:e.isCollapsed?x?l.jsx(O.ChevronRight,{className:"h-4 w-4 rotate-180"}):l.jsx(O.ChevronRight,{className:"h-4 w-4"}):l.jsx(O.ChevronDown,{className:"h-4 w-4"})}),l.jsx("h3",{className:"font-semibold text-sm",children:e.name}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",n.length," ",g("items"),")"]})]}),!e.isCollapsed&&l.jsx("div",{className:H("flex divide-x",x&&"divide-x-reverse"),children:t.map(S=>{const z=n.filter(N=>N.columnId===S.id);return l.jsx("div",{className:"flex-1 min-w-[280px] p-2 min-h-[100px]",onDragOver:b,onDrop:N=>y(N,S.id),children:l.jsx("div",{className:"space-y-2",children:z.map(N=>l.jsx(zi,{card:N,onClick:r,onDoubleClick:i,onDragStart:o,onDragEnd:a,isDragging:u===N.id,isHighlighted:h===N.id,customFields:m,customRenderers:v,dir:p},N.id))})},S.id)})})]})},GC=(e,t)=>t.find(r=>r.id===e.columnId)?.color||"hsl(var(--primary))",KC=({cards:e,columns:t,swimlanes:n,onCardUpdate:r,onCardClick:i,onCardCreate:o,className:a,dir:c})=>{const d=s.useMemo(()=>{let f=[];return n&&n.length>0?(f=n.sort((p,x)=>p.position-x.position).map(p=>({id:p.id,name:p.name,color:p.color})),e.some(p=>!p.swimlaneId)&&f.push({id:"uncategorized",name:"Uncategorized",color:"hsl(var(--muted-foreground))"}),f):t.sort((p,x)=>p.position-x.position).map(p=>({id:p.id,name:p.name,color:p.color}))},[n,t,e]),u=s.useMemo(()=>e.map(f=>{const p=n&&n.length>0?f.swimlaneId||"uncategorized":f.columnId||"uncategorized",x=f.startDate?new Date(f.startDate):f.dueDate?K.startOfDay(new Date(f.dueDate)):K.startOfDay(new Date),g=f.dueDate?new Date(f.dueDate):K.addDays(x,1),b=t.find(y=>y.id===f.columnId);return{id:f.id,title:f.title,start:x,end:g,resourceId:p||"uncategorized",description:f.description,color:GC(f,t),status:b?.name,originalCard:f}}),[e,n,t]),h=s.useCallback(f=>{const p=f.originalCard;if(!p)return;const x={...p,startDate:f.start,dueDate:f.end,...n&&n.length>0?{swimlaneId:f.resourceId}:{columnId:f.resourceId||p.columnId||t[0]?.id||""}};r?.(x,"move")},[r,n,t]),m=s.useCallback(f=>{const p=n&&n.length>0,x={title:f.title||"New Card",startDate:f.start,dueDate:f.end,columnId:!p&&f.resourceId?f.resourceId:t[0]?.id||"",swimlaneId:p&&f.resourceId?f.resourceId:void 0,description:f.description||"",priority:"medium"};o?.(x)},[n,t,o]),v=s.useCallback(f=>{const p=f.originalCard;p&&i?.(p)},[i]);return l.jsx("div",{className:a,style:{height:"100%",minHeight:"600px"},children:l.jsx(bi,{events:u,resources:d,selectedDate:new Date,view:"TimelineMonth",views:["TimelineWeek","TimelineMonth"],onEventChange:h,onEventCreate:m,onEventClick:v,showHeaderBar:!0,showResourceHeaders:!0,dir:c})})},qC=({board:e,onCardClick:t,onCardDoubleClick:n,onCardDragStart:r,onCardDragEnd:i,onCardDrop:o,onAddCard:a,onToggleColumnCollapse:c,onToggleSwimlaneCollapse:d,onAddColumn:u,onDeleteColumn:h,onUpdateColumn:m,onColumnClick:v,onCreateCard:f,selectedColumnId:p,draggedCardId:x,filteredCards:g,customRenderers:b,className:y,view:S="standard",dir:z})=>{const N=g||e.cards,{t:E}=en();return S==="timeline"?l.jsx(KC,{cards:N,columns:e.columns,swimlanes:e.swimlanes,onCardUpdate:o?async(C,M)=>{M==="move"&&o(C.columnId,C.swimlaneId)}:void 0,onCardClick:t,onCardCreate:f,className:y,dir:z}):S==="swimlane"&&e.swimlanes&&e.swimlanes.length>0?l.jsxs("div",{className:H("flex flex-col p-4 overflow-y-auto h-full",y),children:[e.swimlanes.sort((C,M)=>C.position-M.position).map(C=>{const M=N.filter(D=>D.swimlaneId===C.id);return l.jsx(f3,{swimlane:C,columns:e.columns.sort((D,A)=>D.position-A.position),cards:M,onCardClick:t,onCardDoubleClick:n,onCardDragStart:r,onCardDragEnd:i,onDrop:o,onToggleCollapse:d,draggedCardId:x,customFields:e.customFields,customRenderers:b,dir:z},C.id)}),N.some(C=>!C.swimlaneId)&&l.jsx(f3,{swimlane:{id:"uncategorized",name:E("uncategorized"),type:"custom",position:9999,isCollapsed:!1},columns:e.columns.sort((C,M)=>C.position-M.position),cards:N.filter(C=>!C.swimlaneId),onCardClick:t,onCardDoubleClick:n,onCardDragStart:r,onCardDragEnd:i,onDrop:o,onToggleCollapse:()=>{},draggedCardId:x,customFields:e.customFields,customRenderers:b,dir:z})]}):l.jsxs("div",{className:H("flex gap-4 overflow-x-auto p-4",y),children:[e.columns.sort((C,M)=>C.position-M.position).map(C=>{const M=N.filter(D=>D.columnId===C.id);return l.jsx(UC,{column:C,cards:M,onCardClick:t,onCardDoubleClick:n,onCardDragStart:r,onCardDragEnd:i,onDrop:o,onAddCard:a,onToggleCollapse:c,onDeleteColumn:h,onUpdateColumn:m,onColumnClick:v,selectedColumnId:p,draggedCardId:x,customFields:e.customFields,customRenderers:b,dir:z},C.id)}),u&&l.jsx("div",{className:"w-80 shrink-0",children:l.jsxs(J,{variant:"outline",className:"w-full h-12 border-dashed",onClick:u,children:[l.jsx(O.Plus,{className:"me-2 h-4 w-4"}),E("add_column")||"Add Column"]})})]})};function QC(e,t=300){const[n,r]=s.useState(e);return s.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}const YC=({board:e,activeFilters:t,onFiltersChange:n,onClearFilters:r})=>{const o=Array.from(new Set(e.cards.flatMap(f=>f.tags).map(f=>JSON.stringify(f)))).map(f=>JSON.parse(f)).filter((f,p,x)=>p===x.findIndex(g=>g.id===f.id)),c=Array.from(new Set(e.cards.flatMap(f=>f.assignees).map(f=>JSON.stringify(f)))).map(f=>JSON.parse(f)).filter((f,p,x)=>p===x.findIndex(g=>g.id===f.id)),d=["low","medium","high","critical"],u=f=>{const p=t.priority||[],x=p.includes(f)?p.filter(g=>g!==f):[...p,f];n({...t,priority:x.length?x:void 0})},h=f=>{const p=t.tags||[],x=p.includes(f)?p.filter(g=>g!==f):[...p,f];n({...t,tags:x.length?x:void 0})},m=f=>{const p=t.assignees||[],x=p.includes(f)?p.filter(g=>g!==f):[...p,f];n({...t,assignees:x.length?x:void 0})},v=(t.priority?.length||0)+(t.tags?.length||0)+(t.assignees?.length||0);return l.jsxs(Kt,{children:[l.jsx(qt,{asChild:!0,children:l.jsxs(J,{variant:"outline",size:"sm",className:"relative",children:[l.jsx(O.Filter,{className:"h-4 w-4 mr-2"}),"Filters",v>0&&l.jsx(Ci,{variant:"secondary",className:"ml-2 h-5 min-w-[20px] px-1 text-[10px] flex items-center justify-center",children:v})]})}),l.jsxs(Tt,{className:"w-80 p-4",align:"start",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h4",{className:"font-medium leading-none",children:"Filters"}),v>0&&l.jsx(J,{variant:"ghost",size:"sm",className:"h-auto p-0 text-xs text-muted-foreground",onClick:r,children:"Clear all"})]}),l.jsx(xi,{className:"h-[300px] pr-4",children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("h5",{className:"text-sm font-medium text-muted-foreground",children:"Priority"}),l.jsx("div",{className:"space-y-2",children:d.map(f=>l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(qe,{id:`priority-${f}`,checked:t.priority?.includes(f),onCheckedChange:()=>u(f)}),l.jsx(ze,{htmlFor:`priority-${f}`,className:"capitalize text-sm font-normal cursor-pointer",children:f})]},f))})]}),c.length>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsx("h5",{className:"text-sm font-medium text-muted-foreground",children:"Assignees"}),l.jsx("div",{className:"space-y-2",children:c.map(f=>l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(qe,{id:`assignee-${f.id}`,checked:t.assignees?.includes(f.id),onCheckedChange:()=>m(f.id)}),l.jsxs(ze,{htmlFor:`assignee-${f.id}`,className:"text-sm font-normal cursor-pointer flex items-center gap-2",children:[f.avatarUrl&&l.jsx("img",{src:f.avatarUrl,alt:"",className:"w-4 h-4 rounded-full"}),f.name]})]},f.id))})]}),o.length>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsx("h5",{className:"text-sm font-medium text-muted-foreground",children:"Tags"}),l.jsx("div",{className:"space-y-2",children:o.map(f=>l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(qe,{id:`tag-${f.id}`,checked:t.tags?.includes(f.id),onCheckedChange:()=>h(f.id)}),l.jsxs(ze,{htmlFor:`tag-${f.id}`,className:"text-sm font-normal cursor-pointer flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:f.color}}),f.name]})]},f.id))})]})]})})]})]})},XC=({searchQuery:e,onSearchChange:t,onAddCardClick:n,onAddColumn:r,board:i,className:o,view:a="standard",onViewChange:c,onUndo:d,onRedo:u,canUndo:h,canRedo:m,activeFilters:v,onFiltersChange:f})=>{const[p,x]=s.useState(e),{t:g}=en(),b=QC(p,300);s.useEffect(()=>{t(b)},[b,t]),s.useEffect(()=>{x(e)},[e]);const y=()=>{n?.()},S=z=>{if(i)try{const N=oe.get("ExportService");if(z==="csv"){const C=i.cards.map(M=>({id:M.id,title:M.title,description:M.description||"",column:i.columns.find(D=>D.id===M.columnId)?.name||"",priority:M.priority||"",assignees:M.assignees?.map(D=>D.name).join("; ")||"",tags:M.tags?.map(D=>D.name).join("; ")||"",dueDate:M.dueDate?new Date(M.dueDate).toISOString().split("T")[0]:"",isArchived:M.isArchived?"Yes":"No"}));if(N){const M=N.toCSV(C);N.download(M,`kanban-board-${i.id}.csv`)}else{const M=Object.keys(C[0]||{}),D=[M.join(","),...C.map(G=>M.map(Y=>`"${G[Y]}"`).join(","))].join(`
57
+ `),A=new Blob([D],{type:"text/csv"}),_=URL.createObjectURL(A),U=document.createElement("a");U.href=_,U.download=`kanban-board-${i.id}.csv`,U.click(),URL.revokeObjectURL(_)}}else{const C=JSON.stringify(i,null,2);if(N)N.download(C,`kanban-board-${i.id}.json`);else{const M=new Blob([C],{type:"application/json"}),D=URL.createObjectURL(M),A=document.createElement("a");A.href=D,A.download=`kanban-board-${i.id}.json`,A.click(),URL.revokeObjectURL(D)}}const E=oe.get("NotificationService");E&&E.add({type:"success",message:`Board exported as ${z.toUpperCase()}`,duration:3e3})}catch(N){const E=oe.get("NotificationService");E&&E.add({type:"error",message:`Failed to export board: ${N instanceof Error?N.message:"Unknown error"}`,duration:4e3})}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`flex items-center gap-4 p-4 border-b ${o||""}`,children:[l.jsxs("div",{className:"flex gap-1 mr-2",children:[l.jsx(J,{variant:"ghost",size:"icon",onClick:d,disabled:!h,title:"Undo (Ctrl+Z)",children:l.jsx(O.Undo2,{className:"h-4 w-4"})}),l.jsx(J,{variant:"ghost",size:"icon",onClick:u,disabled:!m,title:"Redo (Ctrl+Shift+Z)",children:l.jsx(O.Redo2,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(O.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),l.jsx(je,{placeholder:g("search_placeholder"),value:p,onChange:z=>x(z.target.value),className:"pl-9"})]}),l.jsx("div",{className:"w-[180px]",children:l.jsxs(rt,{value:a,onValueChange:z=>c?.(z),children:[l.jsx(st,{children:l.jsx(lt,{placeholder:"Select view"})}),l.jsxs(it,{children:[l.jsx(Ae,{value:"standard",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx(O.Layout,{className:"h-4 w-4 mr-2"}),g("view_standard")]})}),l.jsx(Ae,{value:"swimlane",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx(O.Layers,{className:"h-4 w-4 mr-2"}),g("view_swimlane")]})}),l.jsx(Ae,{value:"timeline",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx(O.Layout,{className:"h-4 w-4 mr-2"})," ",g("view_timeline")]})})]})]})}),i&&l.jsx(YC,{board:i,activeFilters:v||{},onFiltersChange:z=>f?.(z),onClearFilters:()=>f?.({})}),i&&l.jsxs("div",{className:"flex gap-1",children:[l.jsxs(J,{variant:"outline",size:"sm",onClick:()=>S("csv"),title:"Export as CSV",children:[l.jsx(O.Download,{className:"h-4 w-4 mr-2"}),"CSV"]}),l.jsxs(J,{variant:"outline",size:"sm",onClick:()=>S("json"),title:"Export as JSON",children:[l.jsx(O.Download,{className:"h-4 w-4 mr-2"}),"JSON"]})]}),l.jsxs("div",{className:"ml-auto flex gap-2",children:[l.jsxs(J,{variant:"outline",size:"sm",onClick:r,children:[l.jsx(O.Plus,{className:"h-4 w-4 mr-2"}),g("add_column")]}),l.jsxs(J,{size:"sm",onClick:y,children:[l.jsx(O.Plus,{className:"h-4 w-4 mr-2"}),g("add_card")]})]})]})})},or=w.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:H("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",e),ref:n,...t}));or.displayName="Textarea";const Mi=w.createContext(void 0),Ni=w.forwardRef(({className:e,defaultValue:t,value:n,onValueChange:r,children:i,...o},a)=>{const[c,d]=w.useState(t||""),u=n!==void 0,h=u?n:c,m=w.useCallback(v=>{u||d(v),r?.(v)},[u,r]);return l.jsx(Mi.Provider,{value:{value:h,onValueChange:m},children:l.jsx("div",{ref:a,className:H(e),...o,children:i})})});Ni.displayName="Tabs";const ji=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:H("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ji.displayName="TabsList";const un=w.forwardRef(({className:e,value:t,onClick:n,...r},i)=>{const o=w.useContext(Mi);if(!o)throw new Error("TabsTrigger must be used within Tabs");const a=o.value===t;return l.jsx("button",{ref:i,type:"button",className:H("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a&&"bg-background text-foreground shadow-sm",e),onClick:c=>{o.onValueChange(t),n?.(c)},...r})});un.displayName="TabsTrigger";const hn=w.forwardRef(({className:e,value:t,children:n,...r},i)=>{const o=w.useContext(Mi);if(!o)throw new Error("TabsContent must be used within Tabs");return o.value!==t?null:l.jsx("div",{ref:i,className:H("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n})});hn.displayName="TabsContent";function mn({date:e,setDate:t,disabled:n,id:r,locale:i,className:o,mode:a="datetime",minDate:c}){const[d,u]=s.useState(!1),[h,m]=s.useState("date"),[v,f]=s.useState(""),p=s.useRef(null),x=a==="datetime"?"M/d/yy h:mm a":"M/d/yy";s.useEffect(()=>{e&&K.isValid(e)?f(K.format(e,x)):f("")},[e,x]);const g=N=>{const E=N.target.value;f(E);const C=K.parse(E,x,new Date);K.isValid(C)&&t(C)},b=N=>{if(!N){t(void 0);return}const E=e||new Date,C=new Date(N);a==="datetime"?(C.setHours(E.getHours()),C.setMinutes(E.getMinutes())):(C.setHours(0),C.setMinutes(0)),t(C),u(!1)},y=(N,E)=>{const C=e||new Date,M=new Date(C);M.setHours(N),M.setMinutes(E),t(M),u(!1)},S=(N,E)=>{N.preventDefault(),N.stopPropagation(),d&&h===E?u(!1):(m(E),u(!0))},z=s.useMemo(()=>{const N=[];let E=K.startOfDay(new Date);for(let C=0;C<48;C++)N.push({label:K.format(E,"h:mm a"),hh:E.getHours(),mm:E.getMinutes()}),E=K.addMinutes(E,30);return c&&e&&K.isSameDay(e,c)?N.filter(C=>{const M=C.hh*60+C.mm,D=c.getHours()*60+c.getMinutes();return M>D}):N},[e,c]);return s.useEffect(()=>{if(d&&h==="time"&&p.current&&e){const N=z.findIndex(E=>E.hh===e.getHours()&&E.mm===(e.getMinutes()>=30?30:0));if(N!==-1){const E=p.current.children[N];E&&(p.current.scrollTop=E.offsetTop-80)}}},[d,h,e,z]),l.jsxs(Kt,{open:d,onOpenChange:u,children:[l.jsx(qt,{asChild:!0,children:l.jsxs("div",{className:H("group flex items-center w-full h-10 rounded-md border border-slate-200 bg-background transition-all focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary",n&&"opacity-50 cursor-not-allowed",o),children:[l.jsx("input",{id:r,className:"flex-1 min-w-0 h-full px-3 bg-transparent text-sm font-medium outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",value:v,onChange:g,placeholder:a==="datetime"?"M/D/YY H:MM AM":"M/D/YY",disabled:n,autoComplete:"off"}),v&&!n&&l.jsx("button",{type:"button",onClick:N=>{N.preventDefault(),N.stopPropagation(),t(void 0)},onPointerDown:N=>N.stopPropagation(),className:"h-full px-2 text-slate-400 hover:text-slate-600 transition-colors",children:l.jsx(O.X,{className:"w-4 h-4"})}),l.jsx("div",{className:"h-6 w-[1px] bg-slate-200"}),l.jsx("button",{type:"button",onClick:N=>S(N,"date"),onPointerDown:N=>N.stopPropagation(),disabled:n,className:H("h-full px-3 flex items-center justify-center text-slate-500 hover:bg-slate-50 transition-colors",h==="date"&&d&&"text-primary"),children:l.jsx(O.Calendar,{className:"w-4 h-4"})}),a==="datetime"&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"h-6 w-[1px] bg-slate-200"}),l.jsx("button",{type:"button",onClick:N=>S(N,"time"),onPointerDown:N=>N.stopPropagation(),disabled:n,className:H("h-full px-3 flex items-center justify-center text-slate-500 hover:bg-slate-50 transition-colors rounded-r-md",h==="time"&&d&&"text-primary"),children:l.jsx(O.Clock,{className:"w-4 h-4"})})]})]})}),l.jsx(Tt,{className:"w-auto p-0 shadow-xl border border-border bg-popover text-popover-foreground overflow-hidden animate-in fade-in zoom-in-95 duration-150",style:{zIndex:11e3,maxWidth:"300px",width:"auto"},align:"start",sideOffset:4,children:h==="date"?l.jsx(fi,{selected:e,onSelect:b,locale:i,minDate:c}):l.jsx("div",{ref:p,className:"w-[180px] overflow-y-auto py-1 custom-scrollbar",style:{height:"363px"},children:z.map(N=>{const E=e&&e.getHours()===N.hh&&e.getMinutes()===N.mm;return l.jsx("button",{type:"button",onClick:()=>y(N.hh,N.mm),className:H("w-full text-left px-4 py-2.5 text-[14px] transition-colors",E?"bg-primary text-white font-bold":"text-slate-700 hover:bg-primary/5 hover:text-primary"),children:N.label},N.label)})})})]})}const ZC=({isOpen:e,onClose:t,onSave:n,onDelete:r,card:i,columns:o=[],columnId:a,customFields:c=[],currentUser:d={id:"current-user",name:"Current User"}})=>{const{t:u}=en(),h=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`id-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,m=hr.useForm({defaultValues:{title:i?.title||"",description:i?.description||"",columnId:i?.columnId||a||o[0]?.id||"",priority:i?.priority||"medium",startDate:i?.startDate?new Date(i.startDate):void 0,dueDate:i?.dueDate?new Date(i.dueDate):void 0,checklists:i?.checklists||[],attachments:i?.attachments||[],comments:i?.comments||[],coverImage:i?.coverImage||"",customFieldValues:i?.customFieldValues||{},subtasks:i?.subtasks||[],timeTracking:i?.timeTracking||{estimated:0,actual:0},activity:i?.activity||[],assignees:i?.assignees||[],tags:i?.tags||[],...i},onSubmit:async({value:Q})=>{n(Q),t()}});s.useEffect(()=>{},[e,i]);const v=()=>{i?.id&&r&&r(i.id)},[f,p]=s.useState({}),x=()=>{const Q={id:h(),title:"Checklist",items:[]};m.pushFieldValue("checklists",Q)},g=(Q,q)=>{p(me=>({...me,[Q]:q}))},b=Q=>{const q=f[Q]?.trim();if(!q)return;const ye=(m.getFieldValue("checklists")||[]).map(ke=>ke.id===Q?{...ke,items:[...ke.items,{id:h(),text:q,isChecked:!1}]}:ke);m.setFieldValue("checklists",ye),p(ke=>({...ke,[Q]:""}))},y=(Q,q)=>{const ye=(m.getFieldValue("checklists")||[]).map(ke=>ke.id===Q?{...ke,items:ke.items.map(xe=>xe.id===q?{...xe,isChecked:!xe.isChecked}:xe)}:ke);m.setFieldValue("checklists",ye)},[S,z]=s.useState(""),[N,E]=s.useState(null),[C,M]=s.useState(""),[D,A]=s.useState(null),_=()=>{if(!S.trim())return;const Q={id:h(),text:S,authorId:d.id,authorName:d.name,createdAt:new Date};m.pushFieldValue("comments",Q),z("");const q={id:h(),type:"comment",text:`commented "${S.slice(0,20)}${S.length>20?"...":""}"`,userId:d.id,userName:d.name,createdAt:new Date};m.pushFieldValue("activity",q)},U=Q=>{E(Q.id),M(Q.text)},G=()=>{if(N&&C.trim()){const q=(m.getFieldValue("comments")||[]).map(me=>me.id===N?{...me,text:C}:me);m.setFieldValue("comments",q),E(null),M("")}},Y=()=>{E(null),M("")},te=Q=>{A(Q)},Z=()=>{A(null)},P=Q=>{const q=m.getFieldValue("comments")||[];m.setFieldValue("comments",q.filter(ye=>ye.id!==Q)),A(null);const me={id:h(),type:"delete",text:"deleted a comment",userId:d.id,userName:d.name,createdAt:new Date};m.pushFieldValue("activity",me)},[W,I]=s.useState(""),X=()=>{if(!W.trim())return;const Q={id:h(),title:W,isCompleted:!1};m.pushFieldValue("subtasks",Q),I("")},T=Q=>{const me=(m.getFieldValue("subtasks")||[]).map(ye=>ye.id===Q?{...ye,isCompleted:!ye.isCompleted}:ye);m.setFieldValue("subtasks",me)},j=Q=>{const q=m.getFieldValue("subtasks")||[];m.setFieldValue("subtasks",q.filter(me=>me.id!==Q))},V=s.useRef(null),[L,$]=s.useState(!1),[se,ne]=s.useState(null),de=async Q=>{const q=Q.target.files?.[0];if(!q)return;$(!0),ne(null),await new Promise(ke=>setTimeout(ke,1500));const me={id:h(),name:q.name,url:URL.createObjectURL(q),type:q.type.startsWith("image/")?"image":"file",size:q.size,uploadedAt:new Date};m.pushFieldValue("attachments",me),$(!1),V.current&&(V.current.value="");const ye={id:h(),type:"attachment",text:`attached ${q.name}`,userId:d.id,userName:d.name,createdAt:new Date};m.pushFieldValue("activity",ye)},pe=Q=>{const q=m.getFieldValue("attachments")||[];m.setFieldValue("attachments",q.filter(ye=>ye.id!==Q));const me={id:h(),type:"delete",text:"removed an attachment",userId:d.id,userName:d.name,createdAt:new Date};m.pushFieldValue("activity",me)},we=!!i?.id,Me=Q=>{Q.preventDefault(),Q.stopPropagation(),m.handleSubmit()},ve=l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex items-start justify-between gap-4",children:l.jsxs("div",{className:"flex-1 space-y-4",children:[l.jsx(m.Field,{name:"title",children:Q=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{htmlFor:"title",className:"text-right",children:u("common.title")}),l.jsx(je,{id:"title",value:Q.state.value,onChange:q=>Q.handleChange(q.target.value),placeholder:u("kanban.cardTitlePlaceholder"),className:"text-lg font-semibold"})]})}),l.jsxs("div",{className:"flex gap-4 items-center",children:[l.jsx("div",{className:"w-[200px]",children:l.jsx(m.Field,{name:"columnId",children:Q=>l.jsxs(rt,{value:Q.state.value,onValueChange:q=>Q.handleChange(q),children:[l.jsx(st,{children:l.jsx(lt,{placeholder:"Status"})}),l.jsx(it,{children:o.map(q=>l.jsx(Ae,{value:q.id,children:q.name},q.id))})]})})}),we&&l.jsxs("span",{className:"text-sm text-muted-foreground font-mono",children:["#",i?.id?.slice(0,8)]})]})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[l.jsx(m.Field,{name:"priority",children:Q=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{children:"Priority"}),l.jsxs(rt,{value:Q.state.value,onValueChange:q=>Q.handleChange(q),children:[l.jsx(st,{children:l.jsx(lt,{placeholder:"Priority"})}),l.jsxs(it,{children:[l.jsx(Ae,{value:"low",children:"Low"}),l.jsx(Ae,{value:"medium",children:"Medium"}),l.jsx(Ae,{value:"high",children:"High"}),l.jsx(Ae,{value:"critical",children:"Critical"})]})]})]})}),l.jsx(m.Field,{name:"startDate",children:Q=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{children:"Start Date"}),l.jsx(mn,{date:Q.state.value,setDate:q=>Q.handleChange(q),mode:"date"})]})}),l.jsx(m.Field,{name:"dueDate",children:Q=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{children:"Due Date"}),l.jsx(mn,{date:Q.state.value,setDate:q=>Q.handleChange(q),mode:"date"})]})})]}),l.jsx(m.Field,{name:"description",children:Q=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{children:"Description"}),l.jsx(or,{value:Q.state.value||"",onChange:q=>Q.handleChange(q.target.value),className:"min-h-[150px]"})]})}),c.length>0&&l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-t pt-4",children:c.map(Q=>l.jsx(m.Field,{name:`customFieldValues.${Q.id}`,children:q=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{children:Q.name}),Q.type==="text"&&l.jsx(je,{value:q.state.value||"",onChange:me=>q.handleChange(me.target.value)}),Q.type==="number"&&l.jsx(je,{type:"number",value:q.state.value||"",onChange:me=>q.handleChange(Number(me.target.value))}),Q.type==="date"&&l.jsx(mn,{date:q.state.value,setDate:me=>q.handleChange(me),mode:"date"}),Q.type==="select"&&l.jsxs(rt,{value:q.state.value||"",onValueChange:me=>q.handleChange(me),children:[l.jsx(st,{children:l.jsx(lt,{placeholder:"Select..."})}),l.jsx(it,{children:Q.options?.map(me=>l.jsx(Ae,{value:me,children:me},me))})]}),Q.type==="checkbox"&&l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(qe,{checked:!!q.state.value,onCheckedChange:me=>q.handleChange(!!me)}),l.jsx("span",{className:"text-sm font-medium",children:Q.name})]})]})},Q.id))}),l.jsxs(Ni,{defaultValue:"subtasks",className:"w-full",children:[l.jsxs(ji,{className:"grid w-full grid-cols-5",children:[l.jsx(un,{value:"subtasks",children:"Subtasks"}),l.jsx(un,{value:"checklists",children:"Checklists"}),l.jsx(un,{value:"attachments",children:"Attachments"}),l.jsx(un,{value:"comments",children:"Comments"}),l.jsx(un,{value:"activity",children:"Activity"})]}),l.jsxs(hn,{value:"subtasks",className:"space-y-4 pt-4",children:[l.jsx(m.Field,{name:"subtasks",children:Q=>l.jsxs("div",{className:"space-y-2",children:[Q.state.value?.map(q=>l.jsxs("div",{className:"flex items-center gap-2 border p-3 rounded-md",children:[l.jsx(qe,{checked:q.isCompleted,onCheckedChange:()=>T(q.id)}),l.jsx("span",{className:q.isCompleted?"line-through text-muted-foreground flex-1":"flex-1",children:q.title}),l.jsx(J,{variant:"ghost",size:"icon",onClick:()=>j(q.id),children:l.jsx(O.X,{className:"w-4 h-4"})})]},q.id)),(!Q.state.value||Q.state.value.length===0)&&l.jsx("div",{className:"text-center py-8 text-muted-foreground border border-dashed rounded-lg",children:"No subtasks yet."})]})}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(je,{value:W,onChange:Q=>I(Q.target.value),placeholder:"Add a subtask...",onKeyDown:Q=>Q.key==="Enter"&&X()}),l.jsx(J,{onClick:X,disabled:!W.trim(),children:"Add"})]})]}),l.jsxs(hn,{value:"checklists",className:"space-y-4 pt-4",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h3",{className:"font-medium",children:"Checklists"}),l.jsxs(J,{size:"sm",onClick:x,variant:"outline",children:[l.jsx(O.Plus,{className:"w-4 h-4 mr-2"})," Add Checklist"]})]}),l.jsx(m.Field,{name:"checklists",children:Q=>l.jsxs("div",{className:"space-y-4",children:[Q.state.value?.map(q=>{const me=q.items.length>0?Math.round(q.items.filter(ye=>ye.isChecked).length/q.items.length*100):0;return l.jsxs("div",{className:"border rounded-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"font-medium",children:q.title}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[me,"%"]})]}),l.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${me}%`}})}),l.jsx("div",{className:"space-y-2",children:q.items.map(ye=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(qe,{checked:ye.isChecked,onCheckedChange:()=>y(q.id,ye.id)}),l.jsx("span",{className:ye.isChecked?"line-through text-muted-foreground":"",children:ye.text})]},ye.id))}),l.jsxs("div",{className:"pt-2 flex gap-2",children:[l.jsx(je,{placeholder:"Add an item...",className:"h-8 text-sm",value:f[q.id]||"",onChange:ye=>g(q.id,ye.target.value),onKeyDown:ye=>ye.key==="Enter"&&b(q.id)}),l.jsx(J,{size:"sm",onClick:()=>b(q.id),disabled:!f[q.id]?.trim(),children:"Add"})]})]},q.id)}),(!Q.state.value||Q.state.value.length===0)&&l.jsx("div",{className:"text-center py-8 text-muted-foreground border border-dashed rounded-lg",children:"No checklists yet."})]})})]}),l.jsxs(hn,{value:"attachments",className:"space-y-4 pt-4",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h3",{className:"font-medium",children:"Attachments"}),l.jsx("input",{type:"file",className:"hidden",ref:V,onChange:de}),l.jsxs("div",{className:"flex items-center gap-2",children:[se&&l.jsx("span",{className:"text-xs text-red-500",children:se}),l.jsxs(J,{size:"sm",variant:"outline",onClick:()=>V.current?.click(),disabled:L,children:[L?l.jsx(O.Loader2,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(O.Paperclip,{className:"w-4 h-4 mr-2"}),L?"Uploading...":"Upload"]})]})]}),l.jsx(m.Field,{name:"attachments",children:Q=>l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[Q.state.value?.map(q=>l.jsxs("div",{className:"border p-2 rounded flex items-center gap-2",children:[l.jsx("div",{className:"w-10 h-10 bg-muted flex items-center justify-center rounded",children:l.jsx(O.Image,{className:"w-5 h-5 text-muted-foreground"})}),l.jsxs("div",{className:"overflow-hidden",children:[l.jsx("div",{className:"truncate font-medium text-sm",children:q.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:q.type})]}),l.jsx(J,{variant:"ghost",size:"icon",className:"ml-auto",onClick:()=>pe(q.id),children:l.jsx(O.X,{className:"w-4 h-4 text-muted-foreground"})})]},q.id)),(!Q.state.value||Q.state.value.length===0)&&!L&&l.jsx("div",{className:"text-center py-8 text-muted-foreground border border-dashed rounded-lg",children:"No attachments yet."})]})})]}),l.jsxs(hn,{value:"comments",className:"space-y-4 pt-4",children:[l.jsx(m.Field,{name:"comments",children:Q=>l.jsxs("div",{className:"space-y-4",children:[Q.state.value?.map(q=>l.jsxs("div",{className:"flex gap-3",children:[l.jsx(ct,{className:"w-8 h-8",children:l.jsx(dt,{children:q.authorName[0]})}),l.jsxs("div",{className:"space-y-1 w-full",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-semibold text-sm",children:q.authorName}),l.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(q.createdAt).toLocaleString()})]}),N===q.id?l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx(or,{value:C,onChange:me=>M(me.target.value),onKeyDown:me=>{me.key==="Enter"&&(me.metaKey||me.ctrlKey)?G():me.key==="Escape"&&Y()},autoFocus:!0}),l.jsxs("div",{className:"flex gap-2 justify-end",children:[l.jsx(J,{size:"sm",variant:"ghost",onClick:Y,children:"Cancel"}),l.jsx(J,{size:"sm",onClick:G,children:"Save"})]})]}):l.jsx("div",{className:"text-sm bg-muted/50 p-2 rounded-md",children:q.text}),D===q.id&&l.jsxs("div",{className:"flex items-center gap-2 p-2 bg-red-50 text-red-800 rounded-md text-sm mt-2",children:[l.jsx(O.AlertTriangle,{className:"w-4 h-4"}),l.jsx("span",{className:"flex-1",children:"Delete this comment?"}),l.jsx(J,{size:"sm",variant:"ghost",className:"h-6 px-2 hover:bg-red-100 text-red-800",onClick:Z,children:"No"}),l.jsx(J,{size:"sm",variant:"destructive",className:"h-6 px-2",onClick:()=>P(q.id),children:"Yes"})]})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx(J,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>U(q),disabled:!!D,children:l.jsx(O.Edit2,{className:"w-3 h-3 text-muted-foreground"})}),l.jsx(J,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>te(q.id),disabled:!!D,children:l.jsx(O.Trash2,{className:"w-3 h-3 text-muted-foreground"})})]})]},q.id)),(!Q.state.value||Q.state.value.length===0)&&l.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No comments yet."})]})}),l.jsx("div",{className:"pt-4 border-t sticky bottom-0 bg-background",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(ct,{className:"w-8 h-8",children:l.jsx(dt,{children:d?.name?.[0]||"U"})}),l.jsxs("div",{className:"flex-1 space-y-2",children:[l.jsx(or,{value:S,onChange:Q=>z(Q.target.value),placeholder:"Write a comment...",rows:2}),l.jsx("div",{className:"flex justify-end",children:l.jsx(J,{size:"sm",onClick:_,disabled:!S.trim(),children:"Send"})})]})]})})]}),l.jsx(hn,{value:"activity",className:"space-y-4 pt-4",children:l.jsx(m.Field,{name:"activity",children:Q=>l.jsxs("div",{className:"space-y-4",children:[Q.state.value?.map(q=>l.jsxs("div",{className:"flex gap-3 text-sm",children:[l.jsx("div",{className:"mt-1",children:l.jsx(O.Activity,{className:"w-4 h-4 text-muted-foreground"})}),l.jsxs("div",{children:[l.jsx("span",{className:"font-semibold",children:q.userName})," ",l.jsx("span",{className:"text-muted-foreground",children:q.text}),l.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:new Date(q.createdAt).toLocaleString()})]})]},q.id)),(!Q.state.value||Q.state.value.length===0)&&l.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No activity yet."})]})})})]})]});return l.jsxs(wi,{isOpen:e,onClose:t,title:we?"Edit Card":"New Card",className:"sm:max-w-[800px] h-[85vh] flex flex-col",children:[l.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:ve}),l.jsxs("div",{className:"flex justify-between pt-4 border-t mt-4",children:[we&&l.jsx(J,{variant:"destructive",onClick:v,children:"Delete Card"}),l.jsxs("div",{className:"flex gap-2 ml-auto",children:[l.jsx(J,{variant:"outline",onClick:t,children:"Cancel"}),l.jsx(J,{onClick:Q=>Me(Q),children:"Save"})]})]})]})},JC=({isOpen:e,onClose:t,onConfirm:n,title:r,message:i,description:o})=>{const{t:a}=en(),c=()=>{n(),t()};return l.jsx(wi,{isOpen:e,onClose:t,title:r||a("confirm_delete")||"Confirm Delete",size:"sm",footer:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(J,{variant:"ghost",onClick:t,children:a("cancel")||"Cancel"}),l.jsx(J,{variant:"destructive",onClick:c,children:a("delete")||"Delete"})]}),children:l.jsxs("div",{className:"py-2",children:[l.jsx("p",{children:i||a("confirm_delete_message")||"Are you sure you want to delete this item?"}),(o||a("action_cannot_be_undone"))&&l.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:o||a("action_cannot_be_undone")||"This action cannot be undone."})]})})},RC=new Nl,p3=s.forwardRef((e,t)=>{const{className:n,readOnly:r,...i}=e;return Mn(),l.jsx(jl,{client:RC,children:l.jsx(er,{fallback:l.jsx(HC,{}),children:l.jsx(g3,{ref:t,className:n,readOnly:r,...i})})})});p3.displayName="EzKanban";const g3=s.forwardRef((e,t)=>{const{className:n,readOnly:r,onCardClick:i,onCardDoubleClick:o}=e,a=$C(e,t),[c,d]=s.useState(!1),[u,h]=s.useState(void 0),[m,v]=s.useState(!1),[f,p]=s.useState(null);s.useImperativeHandle(t,()=>({addCard:a.createCard,updateCard:a.updateCard,deleteCard:a.deleteCard,moveCard:a.moveCard,duplicateCard:a.duplicateCard,archiveCard:a.archiveCard,restoreCard:a.restoreCard,getCard:a.getCard,getCards:a.getCards,getCardsInColumn:a.getCardsInColumn,addColumn:a.createColumn,updateColumn:a.updateColumn,deleteColumn:a.deleteColumn,reorderColumns:a.reorderColumns,collapseColumn:a.collapseColumn,expandColumn:a.expandColumn,getColumn:a.getColumn,getColumns:a.getColumns,addSwimlane:a.createSwimlane,updateSwimlane:a.updateSwimlane,deleteSwimlane:a.deleteSwimlane,reorderSwimlanes:a.reorderSwimlanes,collapseSwimlane:a.collapseSwimlane,expandSwimlane:a.expandSwimlane,getSwimlane:a.getSwimlane,getSwimlanes:a.getSwimlanes,selectCard:a.selectCard,selectCards:a.selectCards,deselectCard:a.deselectCard,deselectAllCards:a.deselectAllCards,getSelectedCards:a.getSelectedCards,setView:a.setView,getView:a.getView,scrollToColumn:a.scrollToColumn,scrollToCard:a.scrollToCard,setSearchQuery:a.setSearchQuery,getSearchQuery:a.getSearchQuery,setActiveFilters:a.setActiveFilters,getActiveFilters:a.getActiveFilters,clearFilters:a.clearFilters,getFilteredCards:a.getFilteredCards,getBoard:a.getBoard,setBoard:a.setBoard,refresh:a.refresh,reset:a.reset,showSpinner:a.showSpinner,hideSpinner:a.hideSpinner,forceUpdate:a.forceUpdate,getStatistics:a.getStatistics,validate:a.validate,getOrderedCards:a.getOrderedCards,focusCard:a.focusCard,highlightCard:a.highlightCard}),[a]);const x=E=>{const C=E||a.selectedColumnId||a.board.columns[0]?.id;h({columnId:C,title:"",description:"",priority:"medium"}),d(!0)},g=async E=>{E.id?await a.updateCard(E.id,E):await a.createCard(E),d(!1)},b=E=>{e.confirmOnDelete!==!1?(p(E),v(!0),d(!1)):(a.deleteCard(E),d(!1))},y=async()=>{f&&(await a.deleteCard(f),v(!1),p(null))},S=E=>{r||(h(E),d(!0)),i?.(E)},z=E=>{const C=a.board.columns.find(M=>M.id===E);C&&(C.isCollapsed?a.expandColumn(E):a.collapseColumn(E))},N=E=>{const C=a.board.swimlanes?.find(M=>M.id===E);C&&(C.isCollapsed?a.expandSwimlane(E):a.collapseSwimlane(E))};return l.jsxs("div",{className:H("flex flex-col h-full bg-background",n),dir:a.dir,children:[l.jsx(ml,{}),!r&&l.jsx(XC,{searchQuery:a.searchQuery,onSearchChange:a.setSearchQuery,onAddCardClick:()=>x(),onAddColumn:()=>{a.createColumn({name:"New Column",position:a.board.columns.length}).then(E=>{a.setSelectedColumnId(E.id)})},activeFilters:a.activeFilters,onFiltersChange:a.setActiveFilters,view:a.view,onViewChange:a.setView,onUndo:a.undo,onRedo:a.redo,canUndo:a.canUndo,canRedo:a.canRedo}),l.jsx("div",{className:"flex-1 overflow-hidden h-full",children:l.jsx(qC,{board:a.board,onCardClick:S,onCardDoubleClick:o,onCardDragStart:a.handleDragStart,onCardDragEnd:a.handleDragEnd,onCardDrop:a.handleDrop,onAddCard:x,onToggleColumnCollapse:z,onToggleSwimlaneCollapse:N,onDeleteColumn:a.deleteColumn,onUpdateColumn:a.updateColumn,onColumnClick:a.setSelectedColumnId,onCreateCard:g,selectedColumnId:a.selectedColumnId,draggedCardId:a.draggedCard?.id,filteredCards:a.filteredCards,customRenderers:e.customRenderers,view:a.view,dir:a.dir,className:"flex-1 h-full"})}),e.customRenderers?.cardEditor?e.customRenderers.cardEditor({isOpen:c,card:u,onClose:()=>d(!1),onSave:g,onDelete:b,columns:a.board.columns}):l.jsx(ZC,{isOpen:c,onClose:()=>d(!1),onSave:g,onDelete:b,card:u,columns:a.board.columns}),l.jsx(JC,{isOpen:m,onClose:()=>v(!1),onConfirm:y,title:"Confirm Delete",message:"Are you sure you want to delete this card?",description:"This action cannot be undone."})]})});g3.displayName="EzKanbanInner";function eS(e){return[-e[0],-e[1]]}function pt(e,t){return[e[0]+t[0],e[1]+t[1]]}function Re(e,t){return[e[0]-t[0],e[1]-t[1]]}function gt(e,t){return[e[0]*t,e[1]*t]}function tS(e,t){return[e[0]/t,e[1]/t]}function ar(e){return[e[1],-e[0]]}function v3(e,t){return e[0]*t[0]+e[1]*t[1]}function x3(e,t){return e[0]===t[0]&&e[1]===t[1]}function nS(e){return Math.hypot(e[0],e[1])}function rS(e){return e[0]*e[0]+e[1]*e[1]}function w3(e,t){return rS(Re(e,t))}function ki(e){return tS(e,nS(e))}function b3(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function cr(e,t,n){const r=Math.sin(n),i=Math.cos(n),o=e[0]-t[0],a=e[1]-t[1],c=o*i-a*r,d=o*r+a*i;return[c+t[0],d+t[1]]}function Cs(e,t,n){return pt(e,gt(Re(t,e),n))}function E3(e,t,n){return pt(e,gt(t,n))}function y3(e,t,n,r=i=>i){return e*r(.5-t*(.5-n))}function sS(e,t={}){const{streamline:n=.5,size:r=16,last:i=!1}=t;if(e.length===0)return[];const o=.15+(1-n)*.85;let a=Array.isArray(e[0])?e:e.map(({x:v,y:f,pressure:p=.5})=>[v,f,p]);if(a.length===2){const v=a[1];a=a.slice(0,-1);for(let f=1;f<5;f++)a.push(Cs(a[0],v,f/4))}a.length===1&&(a=[...a,[...pt(a[0],[1,1]),...a[0].slice(2)]]);const c=[{point:[a[0][0],a[0][1]],pressure:a[0][2]>=0?a[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];let d=!1,u=0,h=c[0];const m=a.length-1;for(let v=1;v<a.length;v++){const f=i&&v===m?a[v].slice(0,2):Cs(h.point,a[v],o);if(x3(h.point,f))continue;const p=b3(f,h.point);if(u+=p,v<m&&!d){if(u<r)continue;d=!0;let x=c[c.length-1],g=x.runningLength;for(let b=1;b<=v;b++){const y=a[b],S=Cs(x.point,y,o);if(x3(x.point,S))continue;const z=b3(S,x.point);g+=z,x={point:S,pressure:y[2]>=0?y[2]:.5,vector:ki(Re(x.point,S)),distance:z,runningLength:g},c.push(x)}h=x,u=g;continue}h={point:f,pressure:a[v][2]>=0?a[v][2]:.5,vector:ki(Re(h.point,f)),distance:p,runningLength:u},c.push(h)}return c[0].vector=c[1]?.vector||[0,0],c}const{min:Ln,PI:lS}=Math,C3=.275,dr=lS+1e-4;function iS(e,t={}){const{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:o=!0,easing:a=P=>P,start:c={},end:d={},last:u=!1}=t,{cap:h=!0,easing:m=P=>P*(2-P)}=c,{cap:v=!0,easing:f=P=>--P*P*P+1}=d;if(e.length===0||n<=0)return[];const p=e[e.length-1].runningLength,x=c.taper===!1?0:c.taper===!0?Math.max(n,p):c.taper,g=d.taper===!1?0:d.taper===!0?Math.max(n,p):d.taper,b=Math.pow(n*r,2),y=[],S=[];let z=e.slice(0,10).reduce((P,W)=>{let I=W.pressure;if(o){const X=Ln(1,W.distance/n),T=Ln(1,1-X);I=Ln(1,P+(T-P)*(X*C3))}return(P+I)/2},e[0].pressure),N=y3(n,i,e[e.length-1].pressure,a),E,C=e[0].vector,M=e[0].point,D=M,A=M,_=D,U=!1;for(let P=0;P<e.length;P++){let{pressure:W}=e[P];const{point:I,vector:X,distance:T,runningLength:j}=e[P];if(P<e.length-1&&p-j<3)continue;if(i){if(o){const Me=Ln(1,T/n),ve=Ln(1,1-Me);W=Ln(1,z+(ve-z)*(Me*C3))}N=y3(n,i,W,a)}else N=n/2;E===void 0&&(E=N);const V=j<x?m(j/x):1,L=p-j<g?f((p-j)/g):1;N=Math.max(.01,N*Math.min(V,L));const $=(P<e.length-1?e[P+1]:e[P]).vector,se=P<e.length-1?v3(X,$):1,de=v3(X,C)<0&&!U,pe=se!==null&&se<0;if(de||pe){const Me=gt(ar(C),N);for(let ve=1/13,Q=0;Q<=1;Q+=ve)A=cr(Re(I,Me),I,dr*Q),y.push(A),_=cr(pt(I,Me),I,dr*-Q),S.push(_);M=A,D=_,pe&&(U=!0);continue}if(U=!1,P===e.length-1){const Me=gt(ar(X),N);y.push(Re(I,Me)),S.push(pt(I,Me));continue}const we=gt(ar(Cs($,X,se)),N);A=Re(I,we),(P<=1||w3(M,A)>b)&&(y.push(A),M=A),_=pt(I,we),(P<=1||w3(D,_)>b)&&(S.push(_),D=_),z=W,C=X}const G=e[0].point.slice(0,2),Y=e.length>1?e[e.length-1].point.slice(0,2):pt(e[0].point,[1,1]),te=[],Z=[];if(e.length===1){if(!(x||g)||u){const P=E3(G,ki(ar(Re(G,Y))),-(E||N)),W=[];for(let I=1/13,X=I;X<=1;X+=I)W.push(cr(P,G,dr*2*X));return W}}else{if(!(x||g&&e.length===1))if(h)for(let W=1/13,I=W;I<=1;I+=W){const X=cr(S[0],G,dr*I);te.push(X)}else{const W=Re(y[0],S[0]),I=gt(W,.5),X=gt(W,.51);te.push(Re(G,I),Re(G,X),pt(G,X),pt(G,I))}const P=ar(eS(e[e.length-1].vector));if(g||x&&e.length===1)Z.push(Y);else if(v){const W=E3(Y,P,N);for(let I=1/29,X=I;X<1;X+=I)Z.push(cr(W,Y,dr*3*X))}else Z.push(pt(Y,gt(P,N)),pt(Y,gt(P,N*.99)),Re(Y,gt(P,N*.99)),Re(Y,gt(P,N)))}return y.concat(Z,S.reverse(),te)}function S3(e,t={}){return iS(sS(e,t),t)}function z3(e){if(!e.length)return"";const t=e.reduce((n,[r,i],o,a)=>{const[c,d]=a[(o+1)%a.length];return n.push(r,i,(r+c)/2,(i+d)/2),n},["M",...e[0],"Q"]);return t.push("Z"),t.join(" ")}const oS=s.memo(({stroke:e,options:t,color:n})=>{const r=S3(e,t);return l.jsx("path",{d:z3(r),fill:n})}),M3=s.forwardRef((e,t)=>{const{width:n="100%",height:r=300,backgroundColor:i="transparent",strokeColor:o,minStrokeWidth:a=2.5,maxStrokeWidth:c=5,smoothing:d=.5,thinning:u=0,readOnly:h=!1,disabled:m=!1,className:v,style:f,onEnd:p,onChange:x,onSave:g,dir:b,...y}=e,z=tr("I18nService")?.dir||"ltr",N=b==="auto"||!b?z:b;Rn(e),Mn();const[E,C]=s.useState([]),[M,D]=s.useState([]),[A,_]=s.useState([]),[U,G]=s.useState(-1),Y=s.useRef(null),te=o||"#000f55",Z=s.useCallback(L=>{const $=A.slice(0,U+1);$.push(L),_($),G($.length-1),x&&x(L.map(se=>JSON.stringify(se)))},[A,U,x]),P=L=>{if(h||m)return;L.currentTarget.setPointerCapture(L.pointerId);const $=[L.nativeEvent.offsetX,L.nativeEvent.offsetY,L.pressure];C([$])},W=L=>{if(h||m||L.buttons!==1)return;const $=[L.nativeEvent.offsetX,L.nativeEvent.offsetY,L.pressure];C(se=>[...se,$])},I=L=>{if(!(h||m)&&E.length>0){const $=[...M,E];D($),Z($),C([]),p&&p(L)}},X=s.useMemo(()=>({clear:()=>{D([]),C([]),Z([]),oe.get("NotificationService")?.show({type:"info",message:"Signature Cleared",duration:2e3})},undo:()=>{if(U>0){const L=U-1;G(L),D(A[L])}else U===0&&(G(-1),D([]))},redo:()=>{if(U<A.length-1){const L=U+1;G(L),D(A[L])}},canUndo:()=>U>=0,canRedo:()=>U<A.length-1,isEmpty:()=>M.length===0&&E.length===0,getSignature:()=>M,load:L=>{Array.isArray(L)&&(D(L),Z(L))},save:async(L="png")=>{if(!Y.current)return"";const $=new XMLSerializer().serializeToString(Y.current),se=document.createElement("canvas"),ne=se.getContext("2d"),de=new Image,pe=Y.current.getBoundingClientRect();return se.width=pe.width,se.height=pe.height,new Promise((we,Me)=>{de.onload=()=>{if(ne){i&&i!=="transparent"&&(ne.fillStyle=i,ne.fillRect(0,0,se.width,se.height)),ne.drawImage(de,0,0);const ve=se.toDataURL(`image/${L}`);g&&g(ve,L),oe.get("NotificationService")?.show({type:"success",message:"Signature Saved Successfully",duration:3e3}),we(ve)}else{const ve=new Error("Canvas context not defined");oe.get("NotificationService")?.show({type:"error",message:"Failed to Save Signature",duration:3e3}),Me(ve)}},de.onerror=ve=>{oe.get("NotificationService")?.show({type:"error",message:"Failed to Process Signature Image",duration:3e3}),Me(ve)},de.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent($)))})}}),[A,U,M,E,i,g,Z]);O2(t,X);const T=s.useMemo(()=>({size:c,thinning:u,smoothing:d,start:{cap:!0,taper:!1},end:{cap:!0,taper:!0}}),[c,u,d]),j=s.useMemo(()=>M.map((L,$)=>l.jsx(oS,{stroke:L,options:T,color:te},$)),[M,T,te]),V=E.length>0&&l.jsx("path",{d:z3(S3(E,{size:c,thinning:u,smoothing:d,simulatePressure:E.length>2})),fill:te,opacity:.8});return l.jsx("div",{className:H("ez-signature-container relative overflow-hidden select-none touch-none",v),style:{width:n,height:r,...f},dir:N,...y,children:l.jsxs("svg",{ref:Y,className:"w-full h-full",style:{backgroundColor:i,touchAction:"none"},onPointerDown:P,onPointerMove:W,onPointerUp:I,onPointerLeave:I,children:[j,V]})})});M3.displayName="EzSignature";const Yt=new Map;class aS{name="TableService";async init(){console.log("[TableService] Initialized")}async cleanup(){}initializeWithData(t){Yt.set("default",JSON.parse(JSON.stringify(t)))}async getData(t){await this.simulateLatency();let n=Yt.get("default")||[];if(t.filters&&t.filters.length>0&&t.filters.forEach(i=>{n=n.filter(o=>{const a=o[i.id];return a==null?!1:String(a).toLowerCase().includes(String(i.value).toLowerCase())})}),t.globalFilter){const i=t.globalFilter.toLowerCase();n=n.filter(o=>Object.values(o).some(a=>a!=null&&String(a).toLowerCase().includes(i)))}if(t.sorting&&t.sorting.length>0){const i=t.sorting[0];n=[...n].sort((o,a)=>{const c=o[i.id],d=a[i.id];if(c===d)return 0;if(c==null)return 1;if(d==null)return-1;const u=c<d?-1:1;return i.desc?-u:u})}const r=n.length;if(t.page!==void 0&&t.pageSize!==void 0){const i=t.page*t.pageSize;n=n.slice(i,i+t.pageSize)}return{data:JSON.parse(JSON.stringify(n)),totalCount:r}}async createRow(t){await this.simulateLatency();const n=Yt.get("default")||[],r={id:t.id||Math.random().toString(36).substring(2,9),...t};return n.push(r),Yt.set("default",n),r}async updateRow(t,n){await this.simulateLatency();const r=Yt.get("default")||[],i=r.findIndex(o=>String(o.id)===String(t));if(i!==-1)return r[i]={...r[i],...n},Yt.set("default",r),r[i];throw new Error(`Row with ID ${t} not found`)}async deleteRow(t){await this.simulateLatency();const r=(Yt.get("default")||[]).filter(i=>String(i.id)!==String(t));Yt.set("default",r)}simulateLatency(){return new Promise(t=>setTimeout(t,300))}}const at=new Map,cS=()=>{at.has("root")||(at.set("root",[{id:"1",label:"Documents",hasChildren:!0},{id:"2",label:"Music",hasChildren:!0},{id:"3",label:"Pictures",hasChildren:!0},{id:"4",label:"Videos",hasChildren:!1}]),at.set("1",[{id:"1-1",label:"Work",hasChildren:!0},{id:"1-2",label:"Personal",hasChildren:!1}]),at.set("1-1",[{id:"1-1-1",label:"Project A",hasChildren:!1},{id:"1-1-2",label:"Project B",hasChildren:!1}]),at.set("2",[{id:"2-1",label:"Rock",hasChildren:!1},{id:"2-2",label:"Pop",hasChildren:!1}]))};class dS{name="TreeService";constructor(){cS()}async simulateLatency(){await new Promise(t=>setTimeout(t,300+Math.random()*500))}async loadNodes(t){await this.simulateLatency();const n=t||"root";return JSON.parse(JSON.stringify(at.get(n)||[]))}async moveNode(t,n,r){await this.simulateLatency(),console.log(`Moving node ${t} to ${n} at index ${r}`)}async renameNode(t,n){await this.simulateLatency();for(const[r,i]of at.entries()){const o=i.find(a=>a.id===t);o&&(o.label=n,at.set(r,[...i]))}}async deleteNode(t){await this.simulateLatency();for(const[n,r]of at.entries()){const i=r.findIndex(o=>o.id===t);i!==-1&&(r.splice(i,1),at.set(n,[...r]))}}async addNode(t,n){await this.simulateLatency();const r=at.get(t)||[],i={id:`new-${Date.now()}`,label:"New Node",hasChildren:!1,...n};return at.set(t,[...r,i]),i}}const Fe=new Map;class uS{name="KanbanService";async init(){console.log("[KanbanService] Initialized")}async cleanup(){}initializeWithData(t){t.forEach(n=>{Fe.has(n.id)||Fe.set(n.id,JSON.parse(JSON.stringify(n)))})}async getBoard(t){await this.simulateLatency();const n=Fe.get(t);if(!n)throw new Error(`Board with ID ${t} not found`);return JSON.parse(JSON.stringify(n))}async createBoard(t){await this.simulateLatency();const n={id:t.id||`board-${Date.now()}`,name:t.name||"Untitled Board",description:t.description,columns:t.columns||[],cards:t.cards||[],permissions:t.permissions,settings:t.settings||{allowDragAndDrop:!0,allowMultiSelect:!0,enableWipLimits:!1,defaultView:"standard"},createdAt:new Date,updatedAt:new Date};return Fe.set(n.id,n),n}async updateBoard(t,n){await this.simulateLatency();const r=Fe.get(t);if(!r)throw new Error(`Board with ID ${t} not found`);const i={...r,...n,updatedAt:new Date};Fe.set(t,i)}async deleteBoard(t){await this.simulateLatency(),Fe.delete(t)}async createCard(t,n){await this.simulateLatency();const r=Fe.get(t);if(!r)throw new Error(`Board with ID ${t} not found`);const i={id:n.id||`card-${Date.now()}`,type:n.type||"standard",title:n.title||"Untitled Card",description:n.description,columnId:n.columnId||r.columns[0]?.id||"",position:n.position??r.cards.filter(o=>o.columnId===n.columnId).length,assignees:n.assignees||[],tags:n.tags||[],priority:n.priority,metadata:n.metadata||{},createdBy:n.createdBy||"current-user",createdAt:new Date,updatedBy:n.updatedBy||"current-user",updatedAt:new Date,...n};return r.cards.push(i),Fe.set(t,r),i}async updateCard(t,n){await this.simulateLatency();for(const[r,i]of Fe.entries()){const o=i.cards.findIndex(a=>a.id===t);if(o!==-1){i.cards[o]={...i.cards[o],...n,updatedAt:new Date},Fe.set(r,i);return}}throw new Error(`Card with ID ${t} not found`)}async deleteCard(t){await this.simulateLatency();for(const[n,r]of Fe.entries()){const i=r.cards.filter(o=>o.id!==t);if(i.length!==r.cards.length){r.cards=i,Fe.set(n,r);return}}throw new Error(`Card with ID ${t} not found`)}async moveCard(t,n,r,i){await this.simulateLatency();for(const[o,a]of Fe.entries()){const c=a.cards.find(d=>d.id===t);if(c){c.columnId=n,r!==void 0&&(c.swimlaneId=r),i!==void 0&&(c.position=i),c.updatedAt=new Date,Fe.set(o,a);return}}throw new Error(`Card with ID ${t} not found`)}async createColumn(t,n){await this.simulateLatency();const r=Fe.get(t);if(!r)throw new Error(`Board with ID ${t} not found`);const i={id:n.id||`column-${Date.now()}`,name:n.name||"Untitled Column",color:n.color,icon:n.icon,wipLimit:n.wipLimit,position:n.position??r.columns.length,isCollapsed:n.isCollapsed||!1};return r.columns.push(i),Fe.set(t,r),i}async updateColumn(t,n){await this.simulateLatency();for(const[r,i]of Fe.entries()){const o=i.columns.findIndex(a=>a.id===t);if(o!==-1){i.columns[o]={...i.columns[o],...n},Fe.set(r,i);return}}throw new Error(`Column with ID ${t} not found`)}async deleteColumn(t){await this.simulateLatency();for(const[n,r]of Fe.entries()){const i=r.columns.filter(o=>o.id!==t);if(i.length!==r.columns.length){const o=r.cards.filter(a=>a.columnId!==t);r.columns=i,r.cards=o,Fe.set(n,r);return}}throw new Error(`Column with ID ${t} not found`)}async createSwimlane(t,n){await this.simulateLatency();const r=Fe.get(t);if(!r)throw new Error(`Board with ID ${t} not found`);const i={id:n.id||`swimlane-${Date.now()}`,name:n.name||"New Swimlane",type:n.type||"custom",color:n.color,position:n.position??(r.swimlanes?.length||0),isCollapsed:!1,...n},o=r.swimlanes||[];return o.push(i),r.swimlanes=o,Fe.set(t,r),i}async updateSwimlane(t,n){await this.simulateLatency();for(const[r,i]of Fe.entries()){const o=i.swimlanes||[],a=o.findIndex(c=>c.id===t);if(a!==-1){o[a]={...o[a],...n},i.swimlanes=o,Fe.set(r,i);return}}throw new Error(`Swimlane with ID ${t} not found`)}async deleteSwimlane(t){await this.simulateLatency();for(const[n,r]of Fe.entries()){const i=r.swimlanes||[];if(i.some(o=>o.id===t)){r.swimlanes=i.filter(o=>o.id!==t),r.cards=r.cards.map(o=>o.swimlaneId===t?{...o,swimlaneId:void 0}:o),Fe.set(n,r);return}}throw new Error(`Swimlane with ID ${t} not found`)}simulateLatency(){return new Promise(t=>setTimeout(t,300))}}function hS(e,t){const n=t.map(i=>i.header).join(","),r=e.map(i=>t.map(o=>{const a=i[o.id];if(a==null)return"";const c=String(a);return c.includes(",")||c.includes(`
58
+ `)||c.includes('"')?`"${c.replace(/"/g,'""')}"`:c}).join(","));return[n,...r].join(`
59
+ `)}const mS=({resources:e,selectedResourceIds:t,onSelectionChange:n,className:r=""})=>{const[i,o]=s.useState(""),a=s.useMemo(()=>i?e.filter(u=>u.name.toLowerCase().includes(i.toLowerCase())):e,[e,i]),c=u=>{t.includes(u)?n(t.filter(h=>h!==u)):n([...t,u])},d=()=>{if(a.every(h=>t.includes(h.id))){const h=t.filter(m=>!a.find(v=>v.id===m));n(h)}else{const h=a.map(v=>v.id),m=Array.from(new Set([...t,...h]));n(m)}};return l.jsxs("div",{className:`p-4 border-r border-border bg-background flex flex-col gap-4 overflow-y-auto ${r}`,children:[l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"relative",children:[l.jsx(O.Search,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx(je,{type:"search",placeholder:"Search resources...",className:"pl-9 h-9 text-sm",value:i,onChange:u=>o(u.target.value)})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("h3",{className:"font-semibold text-xs uppercase tracking-wider text-muted-foreground",children:[a.length," Found"]}),l.jsx("button",{onClick:d,className:"text-xs text-primary hover:text-primary/80 font-medium",children:"Select All"})]})]}),l.jsxs("div",{className:"flex flex-col gap-2 min-h-0 flex-1 overflow-y-auto",children:[a.map(u=>l.jsxs("div",{className:"flex items-center space-x-2 p-1 hover:bg-muted/50 rounded transition-colors",children:[l.jsx(qe,{id:`res-${u.id}`,checked:t.includes(u.id),onCheckedChange:()=>c(u.id),className:"data-[state=checked]:bg-primary data-[state=checked]:border-primary"}),l.jsxs(ze,{htmlFor:`res-${u.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 flex items-center gap-2 cursor-pointer flex-1 py-1",children:[l.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:u.color||"#ccc"}}),l.jsx("span",{className:"truncate",children:u.name})]})]},u.id)),a.length===0&&l.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No resources found."})]})]})},Ss=["#06d6a0","#ef476f","#ffd166","#118ab2","#073b4c"],fS=({text:e,className:t="",defaultColor:n="#2d2e33",highlight:r,delay:i,textSize:o,textDir:a,highlightDir:c})=>{const d=e.split(""),h=`${o||"text-4xl md:text-5xl lg:text-6xl"} font-black tracking-tight ${t}`,m=r?r.split(""):[],[v,f]=s.useState(!1);s.useEffect(()=>{const x=()=>{const y=document.documentElement.classList.contains("dark")||window.matchMedia("(prefers-color-scheme: dark)").matches;f(y)};x();const g=new MutationObserver(()=>{x()});g.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});const b=window.matchMedia("(prefers-color-scheme: dark)");return b.addEventListener("change",x),()=>{g.disconnect(),b.removeEventListener("change",x)}},[]);const p=v?"#ffffff":n;return l.jsxs("span",{className:`flex flex-col justify-center items-center ${h}`,style:{letterSpacing:"-0.05em"},children:[l.jsx("style",{children:`
60
+ @keyframes wobble {
61
+ 0% { transform: translateX(0); }
62
+ 20% { transform: translateX(-4px); }
63
+ 40% { transform: translateX(4px); }
64
+ 60% { transform: translateX(-4px); }
65
+ 80% { transform: translateX(4px); }
66
+ 100% { transform: translateX(0); }
67
+ }
68
+ `}),l.jsx("span",{className:"flex flex-wrap justify-center text-center",dir:a,children:d.map((x,g)=>l.jsx(N3,{char:x,defaultColor:p,brandColor:Ss[g%Ss.length]},`main-${g}`))}),r&&l.jsx("span",{className:"flex flex-wrap justify-center text-center mt-2",dir:c,children:m.map((x,g)=>l.jsx(N3,{char:x,defaultColor:"oklch(var(--primary))",brandColor:Ss[(d.length+g)%Ss.length]},`highlight-${g}`))})]})},N3=({char:e,defaultColor:t,brandColor:n})=>{const[r,i]=s.useState(!1),o=()=>{i(!0)},a=()=>{i(!1)};return l.jsx("span",{onMouseEnter:o,onAnimationEnd:a,style:{display:"inline-block",whiteSpace:"pre",cursor:"default",fontWeight:900,padding:"0 1px",color:r?n:t,animation:r?"wobble 0.8s ease-in-out 2":"none",transition:"color 0.2s ease"},children:e})},j3=w.forwardRef(({...e},t)=>l.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));j3.displayName="Breadcrumb";const k3=w.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:H("flex flex-wrap items-center gap-1.5 break-words text-sm text-zinc-500 sm:gap-2.5 dark:text-zinc-400",e),...t}));k3.displayName="BreadcrumbList";const F3=w.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:H("inline-flex items-center gap-1.5",e),...t}));F3.displayName="BreadcrumbItem";const D3=w.forwardRef(({asChild:e,className:t,...n},r)=>{const i=e?Bi:"a";return l.jsx(i,{ref:r,className:H("transition-colors hover:text-zinc-950 dark:hover:text-zinc-50",t),...n})});D3.displayName="BreadcrumbLink";const A3=w.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:H("font-normal text-zinc-950 dark:text-zinc-50",e),...t}));A3.displayName="BreadcrumbPage";const H3=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:H("[&>svg]:size-3.5",t),...n,children:e??l.jsx(O.ChevronRight,{})});H3.displayName="BreadcrumbSeparator";const T3=({className:e,...t})=>l.jsxs("span",{role:"presentation","aria-hidden":"true",className:H("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(O.MoreHorizontal,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More"})]});T3.displayName="BreadcrumbElipsis";const P3=w.forwardRef(({className:e,...t},n)=>{const[r,i]=w.useState(!1);return l.jsxs("div",{className:"relative",children:[l.jsx(je,{type:r?"text":"password",className:H("pr-10",e),ref:n,...t}),l.jsxs("button",{type:"button",onClick:()=>i(o=>!o),className:"absolute right-3 top-1/2 -translate-y-1/2 text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 focus:outline-none",tabIndex:-1,children:[r?l.jsx(O.EyeOff,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(O.Eye,{className:"h-4 w-4","aria-hidden":"true"}),l.jsxs("span",{className:"sr-only",children:[r?"Hide":"Show"," password"]})]})]})});P3.displayName="PasswordInput";const I3=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:H("w-full caption-bottom text-sm",e),...t})}));I3.displayName="Table";const O3=w.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:H("[&_tr]:border-b",e),...t}));O3.displayName="TableHeader";const L3=w.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:H("[&_tr:last-child]:border-0",e),...t}));L3.displayName="TableBody";const _3=w.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:H("border-t bg-zinc-100/50 font-medium [&>tr]:last:border-b-0 dark:bg-zinc-800/50",e),...t}));_3.displayName="TableFooter";const V3=w.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:H("border-b transition-colors hover:bg-zinc-100/50 data-[state=selected]:bg-zinc-100 dark:hover:bg-zinc-800/50 dark:data-[state=selected]:bg-zinc-800",e),...t}));V3.displayName="TableRow";const B3=w.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:H("h-12 px-4 text-left align-middle font-medium text-zinc-500 [&:has([role=checkbox])]:pr-0 dark:text-zinc-400",e),...t}));B3.displayName="TableHead";const $3=w.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:H("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));$3.displayName="TableCell";const W3=w.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:H("mt-4 text-sm text-zinc-500 dark:text-zinc-400",e),...t}));W3.displayName="TableCaption";const U3=w.forwardRef(({className:e,value:t=0,max:n=100,...r},i)=>{const o=Math.min(Math.max(t/n*100,0),100);return l.jsx("div",{ref:i,className:H("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:l.jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all duration-300 ease-in-out",style:{transform:`translateX(-${100-o}%)`}})})});U3.displayName="Progress";const pS=({isOpen:e,onClose:t,title:n,children:r,className:i})=>(w.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),e?l.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:t}),l.jsxs("div",{className:H("relative bg-card text-card-foreground w-full max-w-lg rounded-2xl shadow-2xl border flex flex-col max-h-[90vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200",i),children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[n&&l.jsx("h2",{className:"text-lg font-bold truncate",children:n}),l.jsx(J,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8 rounded-full ml-auto",children:l.jsx(O.X,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:r})]})]}):null),gS=Object.freeze(Object.defineProperty({__proto__:null,EzGroupingPanel:({grouping:e,onGroupingChange:t,columns:n})=>{const{setNodeRef:r,isOver:i}=De.useDroppable({id:"grouping-panel"}),o=c=>{t(e.filter(d=>d!==c))},a=c=>n.find(u=>u.id===c)?.columnDef.header||c;return l.jsxs("div",{ref:r,className:H("flex items-center gap-2 p-2 min-h-[40px] border rounded-md transition-all duration-200","bg-muted/40 border-dashed border-border",i&&"bg-blue-50 dark:bg-blue-900/20 border-blue-400 ring-1 ring-blue-400"),children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mr-2",children:[l.jsx(O.Layers,{className:"w-4 h-4"}),l.jsx("span",{className:"text-xs font-medium uppercase tracking-wider",children:"Group By"})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.length===0&&!i&&l.jsx("span",{className:"text-sm text-muted-foreground/70 italic",children:"Drag columns here to group"}),e.map((c,d)=>l.jsxs(s.Fragment,{children:[d>0&&l.jsx("div",{className:"flex items-center text-muted-foreground",children:l.jsx(O.ChevronRight,{className:"w-4 h-4"})}),l.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-card border border-border rounded-md shadow-sm animate-in fade-in zoom-in duration-200",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:a(c)}),l.jsx("button",{onClick:()=>o(c),className:"p-0.5 hover:bg-muted rounded transition-colors",children:l.jsx(O.X,{className:"w-3 h-3 text-muted-foreground hover:text-destructive"})})]})]},c)),i&&l.jsx("div",{className:"px-2 py-1 border border-blue-400 border-dashed bg-blue-50/50 dark:bg-blue-900/20 rounded-md text-sm text-blue-500 animate-pulse",children:"Drop to Group"})]})]})}},Symbol.toStringTag,{value:"Module"})),vS=Object.freeze(Object.defineProperty({__proto__:null,EzTableEditDialog:({open:e,onClose:t,onSave:n,columns:r,initialData:i,isNew:o,onFormRender:a})=>{const[c,d]=s.useState({});if(s.useEffect(()=>{e&&(d(i||{}),a?.({form:{data:i||{},columns:r},mode:o?"Add":"Edit"}))},[e,i,r,o,a]),!e)return null;const u=()=>{n(c),t()},h=(v,f)=>{d(p=>({...p,[v]:f}))},m=r.filter(v=>v.accessorKey&&v.meta?.isEditable!==!1&&v.id!=="actions"&&v.id!=="select");return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm animate-in fade-in-0",children:l.jsxs("div",{className:"bg-background w-full max-w-lg rounded-lg border shadow-lg p-6 space-y-6 animate-in zoom-in-95 slide-in-from-bottom-2",role:"dialog","aria-modal":"true",children:[l.jsxs("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left",children:[l.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:o?"Add New Record":"Edit Record"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:o?"Enter details for the new record.":"Make changes to the record below."})]}),l.jsx("div",{className:"grid gap-4 py-4 max-h-[60vh] overflow-y-auto pr-2",children:m.map(v=>{const f=v.accessorKey,p=c[f]??"";return l.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[l.jsx(ze,{htmlFor:f,className:"text-right",children:typeof v.header=="string"?v.header:f}),l.jsx(je,{id:f,value:p,onChange:x=>h(f,x.target.value),className:"col-span-3"})]},f)})}),l.jsxs("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",children:[l.jsx(J,{variant:"outline",onClick:t,children:"Cancel"}),l.jsx(J,{onClick:u,children:"Save Changes"})]})]})})}},Symbol.toStringTag,{value:"Module"})),xS=[{label:"S",value:"SU"},{label:"M",value:"MO"},{label:"T",value:"TU"},{label:"W",value:"WE"},{label:"T",value:"TH"},{label:"F",value:"FR"},{label:"S",value:"SA"}],wS=Object.freeze(Object.defineProperty({__proto__:null,EzEventModal:({isOpen:e,onClose:t,mode:n,event:r,onSave:i,onDelete:o,locale:a,editorTemplate:c,headerTemplate:d,footerTemplate:u})=>{const h=hr.useForm({defaultValues:{title:r?.title||"",start:r?.start,end:r?.end,resourceIds:r?.resourceIds||(r?.resourceId?[r.resourceId]:[])||[],location:r?.location||"",isAllDay:!!r?.allDay||!!r?.isAllDay||!1,description:r?.description||"",isTimezoneEnabled:!!r?.timezone,startTimezone:r?.timezone?.start||"Asia/Calcutta",endTimezone:r?.timezone?.end||"Asia/Calcutta",repeatFrequency:r?.recurrence?.frequency||"Never",repeatInterval:r?.recurrence?.interval||1,repeatDays:r?.recurrence?.days||[],repeatBy:r?.recurrence?.repeatBy||"day",repeatEndLevel:r?.recurrence?.end||"Never",repeatEndCount:r?.recurrence?.endCount||1,repeatEndUntil:r?.recurrence?.endUntil,attachments:r?.attachments||[]},onSubmit:async({value:p})=>{i({...r,title:p.title,start:p.start,end:p.end,resourceId:p.resourceIds[0],resourceIds:p.resourceIds,location:p.location,allDay:p.isAllDay,description:p.description,timezone:p.isTimezoneEnabled?{start:p.startTimezone,end:p.endTimezone}:void 0,recurrence:p.repeatFrequency!=="Never"?{frequency:p.repeatFrequency,interval:p.repeatInterval,unit:p.repeatFrequency.replace("ly","")+"(s)",end:p.repeatEndLevel,endCount:p.repeatEndLevel==="Count"?p.repeatEndCount:void 0,endUntil:p.repeatEndLevel==="Until"?p.repeatEndUntil:void 0,days:p.repeatFrequency==="Weekly"?p.repeatDays:void 0,repeatBy:p.repeatFrequency==="Monthly"||p.repeatFrequency==="Yearly"?p.repeatBy:void 0}:void 0,attachments:p.attachments}),t()}});if(s.useEffect(()=>{e&&h.reset()},[e,r,h]),!e)return null;const m=p=>{p.preventDefault(),p.stopPropagation(),h.handleSubmit()},v=n==="view",f=l.jsxs("div",{"data-testid":"ez-event-modal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:1e4,backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(2px)",pointerEvents:"auto"},children:[l.jsx("div",{style:{position:"absolute",inset:0},onClick:t}),l.jsxs("div",{className:H("bg-background rounded-xl shadow-2xl flex flex-col border border-border overflow-hidden","animate-in zoom-in-95 fade-in duration-300 ease-out"),style:{backgroundColor:"white",width:"650px",maxWidth:"95vw",maxHeight:"92vh",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10001},children:[l.jsx("div",{className:"flex items-center justify-between shrink-0 bg-background",style:{padding:"16px 40px"},children:d?d(r||{},n):l.jsxs(l.Fragment,{children:[l.jsxs("h2",{className:"text-xl font-bold tracking-tight text-foreground",children:[n==="create"&&"New Event",n==="edit"&&"Edit Event",n==="view"&&"Event Details"]}),l.jsx(J,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-full hover:bg-muted text-muted-foreground mr-[-8px]",onClick:t,children:l.jsx(O.X,{className:"w-5 h-5"})})]})}),c?l.jsx("div",{className:"overflow-y-auto custom-scrollbar flex-1 bg-background",style:{padding:"8px 40px 32px 40px"},children:c(r||{})}):l.jsxs("form",{onSubmit:m,className:"space-y-6 overflow-y-auto custom-scrollbar flex-1 bg-background",style:{padding:"8px 40px 32px 40px"},children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(h.Field,{name:"title",validators:{onChange:({value:p})=>p?void 0:"Title is required"},children:p=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{htmlFor:"title",className:"text-[13px] font-semibold text-foreground/70",children:"Title"}),l.jsx(je,{id:"title",placeholder:"Add title",value:p.state.value,onChange:x=>p.handleChange(x.target.value),onBlur:p.handleBlur,disabled:v,className:H("h-10 rounded-md border-slate-100 focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all",p.state.meta.errors.length>0&&"border-destructive focus-visible:border-destructive ring-destructive/20")}),p.state.meta.errors.length>0&&l.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",children:p.state.meta.errors.join(", ")})]})}),l.jsx(h.Field,{name:"location",children:p=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{htmlFor:"location",className:"text-[13px] font-semibold text-foreground/70",children:"Location"}),l.jsx(je,{id:"location",placeholder:"Add location",value:p.state.value,onChange:x=>p.handleChange(x.target.value),disabled:v,className:"h-10 rounded-md border-slate-100 focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"})]})})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(h.Field,{name:"start",validators:{onChange:({value:p})=>p?void 0:"Start date is required"},children:p=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Start"}),l.jsx(mn,{date:p.state.value,setDate:x=>p.handleChange(x),disabled:v,required:!0,locale:a,mode:h.getFieldValue("isAllDay")?"date":"datetime",className:"border-slate-200 focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20"}),p.state.meta.errors.length>0&&l.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5",children:p.state.meta.errors.join(", ")})]})}),l.jsx(h.Field,{name:"end",validators:{onChange:({value:p,fieldApi:x})=>{if(!p)return"End date is required";const g=x.form.getFieldValue("start");if(g&&p<=g)return"End time must be after start time"}},children:p=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"End"}),l.jsx(mn,{date:p.state.value,setDate:x=>p.handleChange(x),disabled:v,required:!0,locale:a,mode:h.getFieldValue("isAllDay")?"date":"datetime",minDate:h.getFieldValue("start"),className:H("border-slate-200 focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20",p.state.meta.errors.length>0&&"border-destructive focus-visible:border-destructive ring-destructive/20")}),p.state.meta.errors.length>0&&l.jsx("p",{className:"text-[12px] font-medium text-destructive mt-1.5 animate-in fade-in slide-in-from-top-1",children:p.state.meta.errors.join(", ")})]})})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(h.Field,{name:"isAllDay",children:p=>l.jsx("div",{className:"flex items-center h-10",children:l.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group select-none",children:[l.jsx("input",{type:"checkbox",checked:p.state.value,onChange:x=>p.handleChange(x.target.checked),disabled:v,className:"h-4 w-4 rounded border-slate-300 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"}),l.jsx("span",{className:"text-[14px] font-medium text-foreground/70 group-hover:text-foreground",children:"All day event"})]})})}),l.jsx(h.Field,{name:"isTimezoneEnabled",children:p=>l.jsx("div",{className:"flex items-center h-10",children:l.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group select-none",children:[l.jsx("input",{type:"checkbox",checked:p.state.value,onChange:x=>p.handleChange(x.target.checked),disabled:v,className:"h-4 w-4 rounded border-slate-300 text-primary focus:ring-primary/30 accent-primary transition-all cursor-pointer"}),l.jsx("span",{className:"text-[14px] font-medium text-foreground/70 group-hover:text-foreground",children:"Enable timezone"})]})})})]}),l.jsx(h.Subscribe,{selector:p=>[p.values.isTimezoneEnabled],children:([p])=>p&&l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-slate-50/50 rounded-lg border border-slate-100 animate-in slide-in-from-top-2 duration-300",children:[l.jsx(h.Field,{name:"startTimezone",children:x=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Start Timezone"}),l.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-slate-100 bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:x.state.value,onChange:g=>x.handleChange(g.target.value),children:[l.jsx("option",{value:"Asia/Calcutta",children:"Asia/Calcutta"}),l.jsx("option",{value:"UTC",children:"UTC"}),l.jsx("option",{value:"America/New_York",children:"America/New_York"})]})]})}),l.jsx(h.Field,{name:"endTimezone",children:x=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"End Timezone"}),l.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-slate-100 bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:x.state.value,onChange:g=>x.handleChange(g.target.value),children:[l.jsx("option",{value:"Asia/Calcutta",children:"Asia/Calcutta"}),l.jsx("option",{value:"UTC",children:"UTC"}),l.jsx("option",{value:"America/New_York",children:"America/New_York"})]})]})})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(h.Field,{name:"repeatFrequency",children:p=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat"}),l.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-slate-100 bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:p.state.value,onChange:x=>p.handleChange(x.target.value),children:[l.jsx("option",{value:"Never",children:"Never"}),l.jsx("option",{value:"Daily",children:"Daily"}),l.jsx("option",{value:"Weekly",children:"Weekly"}),l.jsx("option",{value:"Monthly",children:"Monthly"}),l.jsx("option",{value:"Yearly",children:"Yearly"})]})]})}),l.jsx(h.Subscribe,{selector:p=>[p.values.repeatFrequency],children:([p])=>p!=="Never"&&l.jsx(h.Field,{name:"repeatEndLevel",children:x=>l.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-2 duration-300",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"End"}),l.jsxs("select",{className:"w-full h-10 px-3 rounded-md border-slate-100 bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:x.state.value,onChange:g=>x.handleChange(g.target.value),children:[l.jsx("option",{value:"Never",children:"Never"}),l.jsx("option",{value:"Until",children:"Until"}),l.jsx("option",{value:"Count",children:"Count"})]})]})})})]}),l.jsx(h.Subscribe,{selector:p=>[p.values.repeatFrequency,p.values.repeatEndLevel],children:([p,x])=>p!=="Never"&&l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 animate-in slide-in-from-top-2 duration-300",children:[l.jsx(h.Field,{name:"repeatInterval",children:g=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat every"}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("select",{className:"flex-1 h-10 px-3 rounded-md border-slate-100 bg-background text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xlmns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20fill%3D%27none%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20stroke%3D%27%236b7280%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%20stroke-width%3D%271.5%27%20d%3D%27m6%208%204%204%204-4%27%2F%3E%3C%2Fsvg%3E')] bg-[length:20px] bg-[right_8px_center] bg-no-repeat transition-all",value:g.state.value,onChange:b=>g.handleChange(parseInt(b.target.value)),children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,30].map(b=>l.jsx("option",{value:b,children:b},b))}),l.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p==="Daily"?"Day(s)":p.replace("ly","")+"(s)"})]})]})}),x==="Until"&&l.jsx(h.Field,{name:"repeatEndUntil",children:g=>l.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-1",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Until"}),l.jsx(mn,{date:g.state.value,setDate:b=>g.handleChange(b),disabled:v,locale:a,mode:"date",minDate:h.getFieldValue("start"),className:"border-slate-100 focus:border-primary"})]})}),x==="Count"&&l.jsx(h.Field,{name:"repeatEndCount",children:g=>l.jsxs("div",{className:"space-y-2 animate-in slide-in-from-top-1",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Occurrences"}),l.jsx(je,{type:"number",min:1,value:g.state.value,onChange:b=>g.handleChange(parseInt(b.target.value)),className:"h-10 rounded-md border-slate-100 focus-visible:border-primary focus-visible:ring-1 focus-visible:ring-primary/20 bg-background transition-all"})]})})]})}),l.jsx(h.Subscribe,{selector:p=>[p.values.repeatFrequency],children:([p])=>p==="Weekly"&&l.jsx(h.Field,{name:"repeatDays",children:x=>l.jsxs("div",{className:"space-y-3 animate-in fade-in duration-300",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat On"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:xS.map(g=>l.jsx("button",{type:"button",onClick:()=>{const b=x.state.value||[];b.includes(g.value)?x.handleChange(b.filter(y=>y!==g.value)):x.handleChange([...b,g.value])},className:H("w-9 h-9 rounded-full flex items-center justify-center text-sm font-bold transition-all border",(x.state.value||[]).includes(g.value)?"bg-primary text-white border-primary shadow-sm":"bg-background text-foreground/60 border-border/60 hover:border-primary/40 hover:text-primary"),children:g.label},g.value))})]})})}),l.jsx(h.Subscribe,{selector:p=>[p.values.repeatFrequency],children:([p])=>(p==="Monthly"||p==="Yearly")&&l.jsx(h.Field,{name:"repeatBy",children:x=>l.jsxs("div",{className:"space-y-4 animate-in fade-in duration-300",children:[l.jsx(ze,{className:"text-[13px] font-semibold text-foreground/70",children:"Repeat On"}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group",children:[l.jsx("input",{type:"radio",name:"repeatBy",checked:x.state.value==="day",onChange:()=>x.handleChange("day"),className:"h-4 w-4 border-border text-primary focus:ring-primary"}),l.jsx("span",{className:"text-sm text-foreground/80",children:"Day of the month"})]}),l.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer group",children:[l.jsx("input",{type:"radio",name:"repeatBy",checked:x.state.value==="ordinal",onChange:()=>x.handleChange("ordinal"),className:"h-4 w-4 border-border text-primary focus:ring-primary"}),l.jsx("span",{className:"text-sm text-foreground/80",children:"Ordinal position"})]})]})]})})}),l.jsx(h.Field,{name:"description",children:p=>l.jsxs("div",{className:"space-y-2",children:[l.jsx(ze,{htmlFor:"description",className:"text-[13px] font-semibold text-foreground/70",children:"Description"}),l.jsx("textarea",{id:"description",placeholder:"Add description",className:"flex min-h-[100px] w-full rounded-md border-slate-100 bg-background px-4 py-3 text-sm placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/20 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 resize-none transition-all hover:border-slate-200",value:p.state.value,onChange:x=>p.handleChange(x.target.value),disabled:v})]})}),l.jsx(h.Field,{name:"attachments",children:p=>l.jsxs("div",{className:"space-y-4 pt-4 pb-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs(ze,{className:"text-[13px] font-semibold text-foreground/70 flex items-center gap-2",children:[l.jsx(O.Paperclip,{className:"w-4 h-4"})," Attachments"]}),l.jsx("input",{type:"file",id:"file-upload",multiple:!0,className:"hidden",onChange:x=>{x.target.files&&p.handleChange([...p.state.value||[],...Array.from(x.target.files)])}}),l.jsxs(J,{type:"button",variant:"outline",size:"sm",className:"h-8 text-xs font-semibold gap-2 border-dashed border-slate-300 hover:border-indigo-600/40 hover:text-indigo-600 transition-all",onClick:()=>document.getElementById("file-upload")?.click(),children:[l.jsx(O.Paperclip,{className:"w-3 h-3"})," Add Files"]})]}),(p.state.value||[]).length>0&&l.jsx("div",{className:"grid grid-cols-1 gap-3",children:(p.state.value||[]).map((x,g)=>l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-slate-50 border border-slate-100 group hover:border-slate-200 transition-all",children:[l.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[l.jsx("div",{className:"w-9 h-9 rounded-md bg-white border border-slate-200 flex items-center justify-center shrink-0 shadow-sm",children:l.jsx(O.Paperclip,{className:"w-4 h-4 text-slate-400"})}),l.jsxs("div",{className:"flex flex-col overflow-hidden",children:[l.jsx("span",{className:"text-[13px] font-medium text-slate-700 truncate",children:x.name}),l.jsxs("span",{className:"text-[11px] text-slate-400 font-medium",children:[(x.size/1024).toFixed(1)," KB"]})]})]}),l.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-300 hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all",onClick:()=>p.handleChange((p.state.value||[]).filter((b,y)=>y!==g)),children:l.jsx(O.Trash2,{className:"w-4 h-4"})})]},g))})]})})]}),u?u(r||{},n,()=>m({}),t):l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"24px 40px",backgroundColor:"#fafbfc",gap:"12px",width:"100%",flexShrink:0},children:[!v&&o&&n==="edit"&&l.jsx(J,{type:"button",variant:"ghost",className:"text-destructive hover:bg-destructive/10 hover:text-destructive h-10 px-5 font-bold mr-auto",onClick:()=>{o(r?.id),t()},children:"Delete"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[!v&&l.jsx(h.Subscribe,{selector:p=>[p.canSubmit,p.isSubmitting],children:([p,x])=>l.jsx(J,{type:"submit",variant:"default",className:"h-10 px-10 font-bold rounded-md shrink-0 flex items-center justify-center transition-all hover:opacity-90",style:{minWidth:"120px"},disabled:!p||x,onClick:g=>{g.preventDefault(),g.stopPropagation(),h.handleSubmit()},children:x?"Saving...":"Save"})}),l.jsx(J,{type:"button",variant:"outline",className:"h-10 px-8 font-bold border border-slate-200 hover:bg-slate-50 text-slate-700 shrink-0 rounded-md transition-all",style:{minWidth:"100px"},onClick:t,children:"Cancel"})]})]})]})]});return mr.createPortal(f,document.body)}},Symbol.toStringTag,{value:"Module"}));B.AnimatedText=fS,B.Avatar=ct,B.AvatarFallback=dt,B.AvatarImage=Nt,B.Badge=Ci,B.BaseCell=Dl,B.BooleanCell=Nh,B.BooleanEditor=jh,B.BooleanFilter=kh,B.Breadcrumb=j3,B.BreadcrumbEllipsis=T3,B.BreadcrumbItem=F3,B.BreadcrumbLink=D3,B.BreadcrumbList=k3,B.BreadcrumbPage=A3,B.BreadcrumbSeparator=H3,B.Button=J,B.Calendar=fi,B.Card=Es,B.CardContent=ys,B.CardDescription=a3,B.CardFooter=c3,B.CardHeader=yi,B.CardTitle=o3,B.Checkbox=qe,B.Command=ql,B.CommandEmpty=Yl,B.CommandGroup=fm,B.CommandInput=mm,B.CommandItem=Xl,B.CommandList=Ql,B.CommandSeparator=pm,B.CommandShortcut=gm,B.ContextMenu=li,B.ContextMenuCheckboxItem=gf,B.ContextMenuContent=ds,B.ContextMenuGroup=JE,B.ContextMenuItem=Je,B.ContextMenuLabel=xf,B.ContextMenuPortal=RE,B.ContextMenuRadioGroup=ty,B.ContextMenuRadioItem=vf,B.ContextMenuSeparator=In,B.ContextMenuShortcut=cn,B.ContextMenuSub=ey,B.ContextMenuSubContent=pf,B.ContextMenuSubTrigger=ff,B.ContextMenuTrigger=ii,B.DateTimePicker=mn,B.DropdownMenu=$t,B.DropdownMenuCheckboxItem=ul,B.DropdownMenuContent=At,B.DropdownMenuGroup=Nc,B.DropdownMenuItem=Ut,B.DropdownMenuLabel=yn,B.DropdownMenuPortal=uv,B.DropdownMenuRadioGroup=mv,B.DropdownMenuRadioItem=Fc,B.DropdownMenuSeparator=Cn,B.DropdownMenuShortcut=Dc,B.DropdownMenuSub=hv,B.DropdownMenuSubContent=kc,B.DropdownMenuSubTrigger=jc,B.DropdownMenuTrigger=Wt,B.EzHeader=F2,B.EzKanban=p3,B.EzLanguageSwitcher=k2,B.EzLayout=H9,B.EzNotificationDropdown=t3,B.EzResourceSidebar=mS,B.EzScheduler=bi,B.EzServiceRegistry=qi,B.EzSignature=M3,B.EzTable=zy,B.EzThemeColorChanger=Ac,B.EzThemeSwitcher=Yi,B.EzTreeView=AC,B.EzUserProfile=A9,B.I18nService=hl,B.Input=je,B.KanbanService=uS,B.Label=ze,B.LayoutService=A2,B.Modal=pS,B.NotificationPanel=ml,B.NotificationService=vr,B.PasswordInput=P3,B.Popover=Kt,B.PopoverContent=Tt,B.PopoverTrigger=qt,B.PrimitiveCell=An,B.PrimitiveEditor=Hn,B.PrimitiveFilter=Ww,B.Progress=U3,B.ProgressCell=Rl,B.RadioGroup=ls,B.RadioGroupItem=sr,B.SchedulerService=Pf,B.ScrollArea=xi,B.ScrollBar=e3,B.SearchableSelect=vm,B.Select=rt,B.SelectCell=Zl,B.SelectContent=it,B.SelectEditor=Jl,B.SelectFilter=xm,B.SelectItem=Ae,B.SelectTrigger=st,B.SelectValue=lt,B.SignInForm=Ki,B.SignUpForm=Gi,B.Skeleton=Sn,B.SparklineCell=ei,B.StatusBadge=Si,B.Switch=rs,B.Table=I3,B.TableBody=L3,B.TableCaption=W3,B.TableCell=$3,B.TableFooter=_3,B.TableHead=B3,B.TableHeader=O3,B.TableRow=V3,B.TableService=aS,B.Tabs=Ni,B.TabsContent=hn,B.TabsList=ji,B.TabsTrigger=un,B.Textarea=or,B.ThemeService=xr,B.Tooltip=Fn,B.TooltipContent=ln,B.TooltipProvider=kn,B.TooltipTrigger=Dn,B.TreeService=dS,B.badgeVariants=d3,B.buttonVariants=$i,B.cn=H,B.convertToCSV=hS,B.formatCurrency=H2,B.formatDate=Jn,B.formatDateTime=m9,B.formatNumber=Ht,B.formatPercent=h9,B.globalServiceRegistry=oe,B.useI18n=en,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})}));