@keboola/design 11.0.0 → 11.2.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 (670) hide show
  1. package/AGENTS.md +16 -1
  2. package/CHANGELOG.md +2138 -0
  3. package/COMPONENT-API.md +40 -1
  4. package/dist/AIKit-DiS0CVOW.js +1320 -0
  5. package/dist/AIKit-DiS0CVOW.js.map +1 -0
  6. package/dist/Alert-DfZq9kGe.js +133 -0
  7. package/dist/Alert-DfZq9kGe.js.map +1 -0
  8. package/dist/AlertModal-Dp_XuJBW.js +219 -0
  9. package/dist/AlertModal-Dp_XuJBW.js.map +1 -0
  10. package/dist/AppShell-B5GQN6Zs.js +143 -0
  11. package/dist/AppShell-B5GQN6Zs.js.map +1 -0
  12. package/dist/AutoSaveTextarea-BeuWuszr.js +58 -0
  13. package/dist/{chunk-UGT6DKWM.js.map → AutoSaveTextarea-BeuWuszr.js.map} +1 -1
  14. package/dist/Badge-Ch26CXoP.js +195 -0
  15. package/dist/Badge-Ch26CXoP.js.map +1 -0
  16. package/dist/BrandEditor-DyzgfVkl.js +903 -0
  17. package/dist/BrandEditor-DyzgfVkl.js.map +1 -0
  18. package/dist/BrandLogo-CJkRd0F8.js +46 -0
  19. package/dist/BrandLogo-CJkRd0F8.js.map +1 -0
  20. package/dist/Breadcrumb-Frst8MTA.js +330 -0
  21. package/dist/Breadcrumb-Frst8MTA.js.map +1 -0
  22. package/dist/Button-6xBX0nNl.js +391 -0
  23. package/dist/Button-6xBX0nNl.js.map +1 -0
  24. package/dist/Calendar-cG5NIJ4O.js +6768 -0
  25. package/dist/Calendar-cG5NIJ4O.js.map +1 -0
  26. package/dist/Card-BAoZ35CV.js +105 -0
  27. package/dist/Card-BAoZ35CV.js.map +1 -0
  28. package/dist/Checkbox-GJ8-srt4.js +97 -0
  29. package/dist/Checkbox-GJ8-srt4.js.map +1 -0
  30. package/dist/Clipboard-CBJZiviP.js +58 -0
  31. package/dist/Clipboard-CBJZiviP.js.map +1 -0
  32. package/dist/ClipboardButton-ClcluT0C.js +43 -0
  33. package/dist/ClipboardButton-ClcluT0C.js.map +1 -0
  34. package/dist/CodeEditor-DyaN-Ij2.js +1000 -0
  35. package/dist/CodeEditor-DyaN-Ij2.js.map +1 -0
  36. package/dist/Collapsible-BQXWEOBC.js +34 -0
  37. package/dist/Collapsible-BQXWEOBC.js.map +1 -0
  38. package/dist/ColorInput-B8z4j4Y_.js +180 -0
  39. package/dist/ColorInput-B8z4j4Y_.js.map +1 -0
  40. package/dist/ColorModeSwitch-dZFZyqy1.js +77 -0
  41. package/dist/ColorModeSwitch-dZFZyqy1.js.map +1 -0
  42. package/dist/Combobox-Dgm6Z4ib.js +443 -0
  43. package/dist/Combobox-Dgm6Z4ib.js.map +1 -0
  44. package/dist/Command-C0aZfVTq.js +102 -0
  45. package/dist/Command-C0aZfVTq.js.map +1 -0
  46. package/dist/CopyField-BJ96zvXs.js +322 -0
  47. package/dist/CopyField-BJ96zvXs.js.map +1 -0
  48. package/dist/DateInput-B3UdzRfW.js +141 -0
  49. package/dist/DateInput-B3UdzRfW.js.map +1 -0
  50. package/dist/DatePicker-Dw3DpbUh.js +24 -0
  51. package/dist/DatePicker-Dw3DpbUh.js.map +1 -0
  52. package/dist/DateRangeInput-DTuySEiq.js +139 -0
  53. package/dist/DateRangeInput-DTuySEiq.js.map +1 -0
  54. package/dist/DateRangePicker-DCmMHg4s.js +159 -0
  55. package/dist/DateRangePicker-DCmMHg4s.js.map +1 -0
  56. package/dist/DiagramSkeleton-lwBS2YBa.js +11 -0
  57. package/dist/DiagramSkeleton-lwBS2YBa.js.map +1 -0
  58. package/dist/DiffView-ppTIzh2h.js +429 -0
  59. package/dist/DiffView-ppTIzh2h.js.map +1 -0
  60. package/dist/DropdownMenu-t90tVw6l.js +327 -0
  61. package/dist/DropdownMenu-t90tVw6l.js.map +1 -0
  62. package/dist/FieldBox-D7DYtX_m.js +70 -0
  63. package/dist/FieldBox-D7DYtX_m.js.map +1 -0
  64. package/dist/FieldItem-CAPj9lj3.d.ts +111 -0
  65. package/dist/FieldItem-D-h1NeBo.js +108 -0
  66. package/dist/FieldItem-D-h1NeBo.js.map +1 -0
  67. package/dist/FileUpload-BRv0TaZk.js +2527 -0
  68. package/dist/FileUpload-BRv0TaZk.js.map +1 -0
  69. package/dist/Form-DHvcFoEi.js +311 -0
  70. package/dist/Form-DHvcFoEi.js.map +1 -0
  71. package/dist/FormGroup-C41n65cE.js +124 -0
  72. package/dist/FormGroup-C41n65cE.js.map +1 -0
  73. package/dist/FullScreenModal-Cb3PGgh4.js +96 -0
  74. package/dist/FullScreenModal-Cb3PGgh4.js.map +1 -0
  75. package/dist/HoverCard-WfDkLK1s.js +31 -0
  76. package/dist/HoverCard-WfDkLK1s.js.map +1 -0
  77. package/dist/InputGroup-CdTq8H7c.js +292 -0
  78. package/dist/InputGroup-CdTq8H7c.js.map +1 -0
  79. package/dist/Kbd-CxHAo1oo.js +111 -0
  80. package/dist/Kbd-CxHAo1oo.js.map +1 -0
  81. package/dist/MarkedText-Ckbft5mw.js +44 -0
  82. package/dist/MarkedText-Ckbft5mw.js.map +1 -0
  83. package/dist/MermaidDiagram-ChL3WIQT.js +399 -0
  84. package/dist/MermaidDiagram-ChL3WIQT.js.map +1 -0
  85. package/dist/Modal-wqG8nJiK.js +185 -0
  86. package/dist/Modal-wqG8nJiK.js.map +1 -0
  87. package/dist/ModalTitle-C76ke2eo.js +28 -0
  88. package/dist/ModalTitle-C76ke2eo.js.map +1 -0
  89. package/dist/MultiActionButtonGroup-BiIIubiL.js +33 -0
  90. package/dist/MultiActionButtonGroup-BiIIubiL.js.map +1 -0
  91. package/dist/Navbar-BfaPeLUL.js +325 -0
  92. package/dist/Navbar-BfaPeLUL.js.map +1 -0
  93. package/dist/OtpInput-CbbymqYs.js +93 -0
  94. package/dist/OtpInput-CbbymqYs.js.map +1 -0
  95. package/dist/PageHeader-Q3IpCnQd.js +177 -0
  96. package/dist/PageHeader-Q3IpCnQd.js.map +1 -0
  97. package/dist/PageLayout-DSVM-ASz.js +176 -0
  98. package/dist/PageLayout-DSVM-ASz.js.map +1 -0
  99. package/dist/PageToolbar-OQg3mPF-.js +153 -0
  100. package/dist/PageToolbar-OQg3mPF-.js.map +1 -0
  101. package/dist/Pagination-Cjfda8KG.js +70 -0
  102. package/dist/Pagination-Cjfda8KG.js.map +1 -0
  103. package/dist/Popconfirm-D7_vfxFd.js +167 -0
  104. package/dist/Popconfirm-D7_vfxFd.js.map +1 -0
  105. package/dist/Popover-CzeHjvrB.js +85 -0
  106. package/dist/Popover-CzeHjvrB.js.map +1 -0
  107. package/dist/RadioGroup-sIveSsNa.js +233 -0
  108. package/dist/RadioGroup-sIveSsNa.js.map +1 -0
  109. package/dist/Resizable-D3vYToZH.js +52 -0
  110. package/dist/Resizable-D3vYToZH.js.map +1 -0
  111. package/dist/Search-3UiqNZRj.js +184 -0
  112. package/dist/Search-3UiqNZRj.js.map +1 -0
  113. package/dist/SearchInput-C7dF_Ir-.js +102 -0
  114. package/dist/SearchInput-C7dF_Ir-.js.map +1 -0
  115. package/dist/SectionNav-8NoTOKO8.js +276 -0
  116. package/dist/SectionNav-8NoTOKO8.js.map +1 -0
  117. package/dist/Select-Is0VkePH.js +181 -0
  118. package/dist/Select-Is0VkePH.js.map +1 -0
  119. package/dist/Sheet-Dw9BDvjI.js +169 -0
  120. package/dist/Sheet-Dw9BDvjI.js.map +1 -0
  121. package/dist/Sidebar-Dcb4rinA.js +799 -0
  122. package/dist/Sidebar-Dcb4rinA.js.map +1 -0
  123. package/dist/Slider-BOPfMOMm.js +127 -0
  124. package/dist/Slider-BOPfMOMm.js.map +1 -0
  125. package/dist/Stepper-C8sm9ZFM.js +325 -0
  126. package/dist/Stepper-C8sm9ZFM.js.map +1 -0
  127. package/dist/Switch-CX2A0v50.js +201 -0
  128. package/dist/Switch-CX2A0v50.js.map +1 -0
  129. package/dist/Table-CvYuTuNU.js +104 -0
  130. package/dist/Table-CvYuTuNU.js.map +1 -0
  131. package/dist/Tabs-UMQuDoW8.js +74 -0
  132. package/dist/Tabs-UMQuDoW8.js.map +1 -0
  133. package/dist/TextInput-CMuN1WfY.js +110 -0
  134. package/dist/TextInput-CMuN1WfY.js.map +1 -0
  135. package/dist/ThemeProvider-QncUrfJn.js +203 -0
  136. package/dist/ThemeProvider-QncUrfJn.js.map +1 -0
  137. package/dist/TimePicker-D9zktB8A.js +98 -0
  138. package/dist/TimePicker-D9zktB8A.js.map +1 -0
  139. package/dist/Timeline-6btyJl4D.js +154 -0
  140. package/dist/Timeline-6btyJl4D.js.map +1 -0
  141. package/dist/Toast-DQSbs3oA.js +49 -0
  142. package/dist/Toast-DQSbs3oA.js.map +1 -0
  143. package/dist/ToggleGroup-Cy_10Mvu.js +47 -0
  144. package/dist/ToggleGroup-Cy_10Mvu.js.map +1 -0
  145. package/dist/Workbench-BzE-Vvd9.js +293 -0
  146. package/dist/Workbench-BzE-Vvd9.js.map +1 -0
  147. package/dist/ZoomableSvg-CZEu6sAq.js +248 -0
  148. package/dist/ZoomableSvg-CZEu6sAq.js.map +1 -0
  149. package/dist/charts.d.ts +110 -103
  150. package/dist/charts.js +303 -254
  151. package/dist/charts.js.map +1 -1
  152. package/dist/classNames-BzrkDnOD.js +9 -0
  153. package/dist/classNames-BzrkDnOD.js.map +1 -0
  154. package/dist/context-KxxeMHbR.js +62 -0
  155. package/dist/context-KxxeMHbR.js.map +1 -0
  156. package/dist/editors.d.ts +244 -175
  157. package/dist/editors.js +802 -428
  158. package/dist/editors.js.map +1 -1
  159. package/dist/escapeStringRegexp-8MxP2knR.js +6 -0
  160. package/dist/escapeStringRegexp-8MxP2knR.js.map +1 -0
  161. package/dist/icons-Cek151jC.js +640 -0
  162. package/dist/icons-Cek151jC.js.map +1 -0
  163. package/dist/icons.d.ts +2 -41
  164. package/dist/icons.js +2 -9
  165. package/dist/index-m-kQEWiY.d.ts +54 -0
  166. package/dist/index.d.ts +6191 -9891
  167. package/dist/index.js +113 -124
  168. package/dist/internal/blocks/AIKit.js +2 -30
  169. package/dist/internal/blocks/AppShell.js +2 -11
  170. package/dist/internal/blocks/AutoSaveTextarea.js +2 -14
  171. package/dist/internal/blocks/BrandEditor.js +2 -23
  172. package/dist/internal/blocks/ChartPanel.js +45 -9
  173. package/dist/internal/blocks/ChartPanel.js.map +1 -1
  174. package/dist/internal/blocks/ClipboardButton.js +2 -12
  175. package/dist/internal/blocks/ColorInput.js +2 -13
  176. package/dist/internal/blocks/ColorModeSwitch.js +2 -13
  177. package/dist/internal/blocks/Command.js +2 -15
  178. package/dist/internal/blocks/CopyField.js +2 -11
  179. package/dist/internal/blocks/DashboardHero.js +58 -8
  180. package/dist/internal/blocks/DashboardHero.js.map +1 -1
  181. package/dist/internal/blocks/DateInput.js +2 -16
  182. package/dist/internal/blocks/DateRangeInput.js +2 -16
  183. package/dist/internal/blocks/EmptyConfigurationActionCard.js +15 -9
  184. package/dist/internal/blocks/EmptyConfigurationActionCard.js.map +1 -1
  185. package/dist/internal/blocks/EmptyState.js +141 -3
  186. package/dist/internal/blocks/EmptyState.js.map +1 -1
  187. package/dist/internal/blocks/ErrorState.js +178 -4
  188. package/dist/internal/blocks/ErrorState.js.map +1 -1
  189. package/dist/internal/blocks/ExportMenu.js +40 -12
  190. package/dist/internal/blocks/ExportMenu.js.map +1 -1
  191. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +56 -0
  192. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -0
  193. package/dist/internal/blocks/Form.js +2 -29
  194. package/dist/internal/blocks/FormGroup.js +2 -18
  195. package/dist/internal/blocks/GoogleButton.js +94 -9
  196. package/dist/internal/blocks/GoogleButton.js.map +1 -1
  197. package/dist/internal/blocks/MicrosoftButton.js +63 -9
  198. package/dist/internal/blocks/MicrosoftButton.js.map +1 -1
  199. package/dist/internal/blocks/MultiActionButtonGroup.js +2 -12
  200. package/dist/internal/blocks/MultiCombobox.js +192 -13
  201. package/dist/internal/blocks/MultiCombobox.js.map +1 -1
  202. package/dist/internal/blocks/NumberInput.js +43 -11
  203. package/dist/internal/blocks/NumberInput.js.map +1 -1
  204. package/dist/internal/blocks/OtpInput.js +2 -10
  205. package/dist/internal/blocks/PageHeader.js +2 -9
  206. package/dist/internal/blocks/PageLayout.js +2 -9
  207. package/dist/internal/blocks/PageToolbar.js +2 -13
  208. package/dist/internal/blocks/PasswordInput.js +96 -12
  209. package/dist/internal/blocks/PasswordInput.js.map +1 -1
  210. package/dist/internal/blocks/SearchInput.js +2 -12
  211. package/dist/internal/blocks/SearchInputWithNavigation.js +64 -15
  212. package/dist/internal/blocks/SearchInputWithNavigation.js.map +1 -1
  213. package/dist/internal/blocks/SectionNav.js +2 -15
  214. package/dist/internal/blocks/SplitButton.js +45 -13
  215. package/dist/internal/blocks/SplitButton.js.map +1 -1
  216. package/dist/internal/blocks/StatCard.js +96 -9
  217. package/dist/internal/blocks/StatCard.js.map +1 -1
  218. package/dist/internal/blocks/TextInput.js +2 -13
  219. package/dist/internal/blocks/Textarea.js +31 -12
  220. package/dist/internal/blocks/Textarea.js.map +1 -1
  221. package/dist/internal/blocks/TimeInput.js +76 -16
  222. package/dist/internal/blocks/TimeInput.js.map +1 -1
  223. package/dist/internal/components/Alert.js +2 -11
  224. package/dist/internal/components/AlertModal.js +2 -11
  225. package/dist/internal/components/Avatar.js +52 -8
  226. package/dist/internal/components/Avatar.js.map +1 -1
  227. package/dist/internal/components/Badge.js +2 -9
  228. package/dist/internal/components/BrandLogo.js +2 -11
  229. package/dist/internal/components/Breadcrumb.js +2 -14
  230. package/dist/internal/components/Button.js +2 -10
  231. package/dist/internal/components/ButtonGroup.js +65 -8
  232. package/dist/internal/components/ButtonGroup.js.map +1 -1
  233. package/dist/internal/components/Calendar.js +2 -9
  234. package/dist/internal/components/Card.js +2 -9
  235. package/dist/internal/components/Checkbox.js +2 -11
  236. package/dist/internal/components/Clipboard.js +2 -9
  237. package/dist/internal/components/Collapsible.js +2 -9
  238. package/dist/internal/components/CollapsiblePanel.js +86 -10
  239. package/dist/internal/components/CollapsiblePanel.js.map +1 -1
  240. package/dist/internal/components/Combobox.js +2 -13
  241. package/dist/internal/components/DatePicker.js +2 -11
  242. package/dist/internal/components/DateRangePicker.js +2 -17
  243. package/dist/internal/components/DiffView.js +2 -9
  244. package/dist/internal/components/DotsLoader.js +17 -4
  245. package/dist/internal/components/DotsLoader.js.map +1 -1
  246. package/dist/internal/components/DropdownMenu.js +2 -11
  247. package/dist/internal/components/EmptySearchContent.js +11 -3
  248. package/dist/internal/components/EmptySearchContent.js.map +1 -1
  249. package/dist/internal/components/FileUpload.js +2 -11
  250. package/dist/internal/components/FullScreenModal.js +2 -12
  251. package/dist/internal/components/HelpBlock.js +24 -3
  252. package/dist/internal/components/HelpBlock.js.map +1 -1
  253. package/dist/internal/components/HoverCard.js +2 -9
  254. package/dist/internal/components/InputGroup.js +2 -11
  255. package/dist/internal/components/Kbd.js +2 -9
  256. package/dist/internal/components/Label.js +38 -8
  257. package/dist/internal/components/Label.js.map +1 -1
  258. package/dist/internal/components/Link.js +21 -8
  259. package/dist/internal/components/Link.js.map +1 -1
  260. package/dist/internal/components/MarkedText.js +2 -5
  261. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +19 -9
  262. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js.map +1 -1
  263. package/dist/internal/components/MergeEditor/PaneHeader.js +12 -3
  264. package/dist/internal/components/MergeEditor/PaneHeader.js.map +1 -1
  265. package/dist/internal/components/MergeEditor/constants.js +17 -3
  266. package/dist/internal/components/MergeEditor/constants.js.map +1 -1
  267. package/dist/internal/components/MergeEditor/useMergeDiff.js +2 -5
  268. package/dist/internal/components/Modal.js +2 -13
  269. package/dist/internal/components/Navbar.js +2 -14
  270. package/dist/internal/components/Pagination.js +2 -11
  271. package/dist/internal/components/PanelWithDetails.js +30 -10
  272. package/dist/internal/components/PanelWithDetails.js.map +1 -1
  273. package/dist/internal/components/Popconfirm.js +2 -12
  274. package/dist/internal/components/Popover.js +2 -9
  275. package/dist/internal/components/Progress.js +46 -8
  276. package/dist/internal/components/Progress.js.map +1 -1
  277. package/dist/internal/components/RadioGroup.js +2 -12
  278. package/dist/internal/components/Resizable.js +2 -9
  279. package/dist/internal/components/ScrollArea.js +41 -8
  280. package/dist/internal/components/ScrollArea.js.map +1 -1
  281. package/dist/internal/components/Search.js +2 -10
  282. package/dist/internal/components/Select.js +2 -12
  283. package/dist/internal/components/Separator.js +83 -8
  284. package/dist/internal/components/Separator.js.map +1 -1
  285. package/dist/internal/components/Sheet.js +2 -12
  286. package/dist/internal/components/Sidebar.js +2 -20
  287. package/dist/internal/components/Skeleton/Skeleton.js +38 -8
  288. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
  289. package/dist/internal/components/Skeleton/SkeletonList.js +40 -9
  290. package/dist/internal/components/Skeleton/SkeletonList.js.map +1 -1
  291. package/dist/internal/components/Slider.js +2 -11
  292. package/dist/internal/components/SpotlightBackdrop.js +131 -8
  293. package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
  294. package/dist/internal/components/Stepper.js +2 -10
  295. package/dist/internal/components/Switch.js +2 -10
  296. package/dist/internal/components/Table.js +2 -10
  297. package/dist/internal/components/Tabs.js +2 -12
  298. package/dist/internal/components/ThemeProvider.js +3 -10
  299. package/dist/internal/components/TimePicker.js +2 -12
  300. package/dist/internal/components/Timeline.js +2 -10
  301. package/dist/internal/components/Toast.js +3 -11
  302. package/dist/internal/components/Toggle.js +168 -8
  303. package/dist/internal/components/Toggle.js.map +1 -1
  304. package/dist/internal/components/ToggleGroup.js +2 -9
  305. package/dist/internal/components/Tooltip.js +2 -8
  306. package/dist/internal/components/Truncated.js +44 -8
  307. package/dist/internal/components/Truncated.js.map +1 -1
  308. package/dist/internal/components/Workbench.js +2 -11
  309. package/dist/internal/components/ZoomableSvg.js +2 -13
  310. package/dist/internal/hooks/useAutosizeInput.js +76 -3
  311. package/dist/internal/hooks/useAutosizeInput.js.map +1 -1
  312. package/dist/internal/hooks/useScrollbarPosition.js +44 -4
  313. package/dist/internal/hooks/useScrollbarPosition.js.map +1 -1
  314. package/dist/internal/hooks/useStableCallback.js +28 -3
  315. package/dist/internal/hooks/useStableCallback.js.map +1 -1
  316. package/dist/internal/utils/mergeRefs.js +19 -3
  317. package/dist/internal/utils/mergeRefs.js.map +1 -1
  318. package/dist/internal/utils.js +5 -8
  319. package/dist/markdown-editor.d.ts +72 -72
  320. package/dist/markdown-editor.js +1122 -1207
  321. package/dist/markdown-editor.js.map +1 -1
  322. package/dist/mermaid.d.ts +12 -12
  323. package/dist/mermaid.js +2 -18
  324. package/dist/rjsf.d.ts +45 -34
  325. package/dist/rjsf.js +1601 -1671
  326. package/dist/rjsf.js.map +1 -1
  327. package/dist/rolldown-runtime-Bdc48AWt.js +33 -0
  328. package/dist/styles-DSUP_-9Z.js +158 -0
  329. package/dist/styles-DSUP_-9Z.js.map +1 -0
  330. package/dist/styles.css +1 -1
  331. package/dist/testing.d.ts +8 -7
  332. package/dist/testing.js +36 -21
  333. package/dist/testing.js.map +1 -1
  334. package/dist/themeTokens-BNg98Mu9.js +85 -0
  335. package/dist/themeTokens-BNg98Mu9.js.map +1 -0
  336. package/dist/toast-CjkURw0M.js +184 -0
  337. package/dist/toast-CjkURw0M.js.map +1 -0
  338. package/dist/useColorSchemeState-CYqcUfSH.js +61 -0
  339. package/dist/useColorSchemeState-CYqcUfSH.js.map +1 -0
  340. package/dist/useControllableState-M6494mCT.js +31 -0
  341. package/dist/useControllableState-M6494mCT.js.map +1 -0
  342. package/dist/useElement-DkF6esWL.js +15 -0
  343. package/dist/useElement-DkF6esWL.js.map +1 -0
  344. package/dist/useMergeDiff-CvowEXJ1.js +465 -0
  345. package/dist/useMergeDiff-CvowEXJ1.js.map +1 -0
  346. package/dist/utils-D0c5VAyF.js +308 -0
  347. package/dist/utils-D0c5VAyF.js.map +1 -0
  348. package/package.json +11 -10
  349. package/dist/MermaidDiagram-ZU5KAVRT.js +0 -18
  350. package/dist/MermaidDiagram-ZU5KAVRT.js.map +0 -1
  351. package/dist/chunk-2YYJDKSP.js +0 -51
  352. package/dist/chunk-2YYJDKSP.js.map +0 -1
  353. package/dist/chunk-3P5UUCFI.js +0 -385
  354. package/dist/chunk-3P5UUCFI.js.map +0 -1
  355. package/dist/chunk-3QDFDDWZ.js +0 -99
  356. package/dist/chunk-3QDFDDWZ.js.map +0 -1
  357. package/dist/chunk-3W27OLK5.js +0 -15
  358. package/dist/chunk-3W27OLK5.js.map +0 -1
  359. package/dist/chunk-4FIZZONW.js +0 -40
  360. package/dist/chunk-4FIZZONW.js.map +0 -1
  361. package/dist/chunk-4GIAXOJG.js +0 -133
  362. package/dist/chunk-4GIAXOJG.js.map +0 -1
  363. package/dist/chunk-52NDNMK7.js +0 -99
  364. package/dist/chunk-52NDNMK7.js.map +0 -1
  365. package/dist/chunk-576G5OES.js +0 -201
  366. package/dist/chunk-576G5OES.js.map +0 -1
  367. package/dist/chunk-5AIE6SET.js +0 -659
  368. package/dist/chunk-5AIE6SET.js.map +0 -1
  369. package/dist/chunk-5FTNAZRW.js +0 -327
  370. package/dist/chunk-5FTNAZRW.js.map +0 -1
  371. package/dist/chunk-5IG2S7ZY.js +0 -70
  372. package/dist/chunk-5IG2S7ZY.js.map +0 -1
  373. package/dist/chunk-5QCXHNCW.js +0 -404
  374. package/dist/chunk-5QCXHNCW.js.map +0 -1
  375. package/dist/chunk-6DUMGC7Y.js +0 -105
  376. package/dist/chunk-6DUMGC7Y.js.map +0 -1
  377. package/dist/chunk-6J25CVST.js +0 -174
  378. package/dist/chunk-6J25CVST.js.map +0 -1
  379. package/dist/chunk-6NN35XOP.js +0 -120
  380. package/dist/chunk-6NN35XOP.js.map +0 -1
  381. package/dist/chunk-6NZBVA4T.js +0 -24
  382. package/dist/chunk-6NZBVA4T.js.map +0 -1
  383. package/dist/chunk-6W5BHRCL.js +0 -295
  384. package/dist/chunk-6W5BHRCL.js.map +0 -1
  385. package/dist/chunk-72BKRCEG.js +0 -409
  386. package/dist/chunk-72BKRCEG.js.map +0 -1
  387. package/dist/chunk-7GTI3PPI.js +0 -95
  388. package/dist/chunk-7GTI3PPI.js.map +0 -1
  389. package/dist/chunk-7P6PLZ4B.js +0 -74
  390. package/dist/chunk-7P6PLZ4B.js.map +0 -1
  391. package/dist/chunk-7WZWY5IA.js +0 -46
  392. package/dist/chunk-7WZWY5IA.js.map +0 -1
  393. package/dist/chunk-AIYO2632.js +0 -489
  394. package/dist/chunk-AIYO2632.js.map +0 -1
  395. package/dist/chunk-ANFZWPNE.js +0 -112
  396. package/dist/chunk-ANFZWPNE.js.map +0 -1
  397. package/dist/chunk-ANZTVAJU.js +0 -73
  398. package/dist/chunk-ANZTVAJU.js.map +0 -1
  399. package/dist/chunk-BD5BTJKX.js +0 -166
  400. package/dist/chunk-BD5BTJKX.js.map +0 -1
  401. package/dist/chunk-BHGIDSRJ.js +0 -140
  402. package/dist/chunk-BHGIDSRJ.js.map +0 -1
  403. package/dist/chunk-BSQWZITZ.js +0 -507
  404. package/dist/chunk-BSQWZITZ.js.map +0 -1
  405. package/dist/chunk-D3LAIK62.js +0 -23
  406. package/dist/chunk-D3LAIK62.js.map +0 -1
  407. package/dist/chunk-DODCR43C.js +0 -155
  408. package/dist/chunk-DODCR43C.js.map +0 -1
  409. package/dist/chunk-EEK5NGZF.js +0 -40
  410. package/dist/chunk-EEK5NGZF.js.map +0 -1
  411. package/dist/chunk-ENRG7TXA.js +0 -11
  412. package/dist/chunk-ENRG7TXA.js.map +0 -1
  413. package/dist/chunk-EQRMGIGY.js +0 -239
  414. package/dist/chunk-EQRMGIGY.js.map +0 -1
  415. package/dist/chunk-ERAHK5YQ.js +0 -495
  416. package/dist/chunk-ERAHK5YQ.js.map +0 -1
  417. package/dist/chunk-F3FOFY2P.js +0 -124
  418. package/dist/chunk-F3FOFY2P.js.map +0 -1
  419. package/dist/chunk-F6BTWFOC.js +0 -507
  420. package/dist/chunk-F6BTWFOC.js.map +0 -1
  421. package/dist/chunk-F6J6NNAL.js +0 -34
  422. package/dist/chunk-F6J6NNAL.js.map +0 -1
  423. package/dist/chunk-FCHJ7D5O.js +0 -59
  424. package/dist/chunk-FCHJ7D5O.js.map +0 -1
  425. package/dist/chunk-FFJTEQCC.js +0 -80
  426. package/dist/chunk-FFJTEQCC.js.map +0 -1
  427. package/dist/chunk-FUFMVW7O.js +0 -64
  428. package/dist/chunk-FUFMVW7O.js.map +0 -1
  429. package/dist/chunk-FVPGQ6UE.js +0 -25
  430. package/dist/chunk-FVPGQ6UE.js.map +0 -1
  431. package/dist/chunk-G3PMV62Z.js +0 -33
  432. package/dist/chunk-G3PMV62Z.js.map +0 -1
  433. package/dist/chunk-GACFOW3E.js +0 -51
  434. package/dist/chunk-GACFOW3E.js.map +0 -1
  435. package/dist/chunk-GDT6HQMK.js +0 -42
  436. package/dist/chunk-GDT6HQMK.js.map +0 -1
  437. package/dist/chunk-HLGU22C6.js +0 -2589
  438. package/dist/chunk-HLGU22C6.js.map +0 -1
  439. package/dist/chunk-HPMYYGP7.js +0 -134
  440. package/dist/chunk-HPMYYGP7.js.map +0 -1
  441. package/dist/chunk-I2UCOD45.js +0 -197
  442. package/dist/chunk-I2UCOD45.js.map +0 -1
  443. package/dist/chunk-IEGDZUVM.js +0 -75
  444. package/dist/chunk-IEGDZUVM.js.map +0 -1
  445. package/dist/chunk-IIS7INHF.js +0 -47
  446. package/dist/chunk-IIS7INHF.js.map +0 -1
  447. package/dist/chunk-ITELSEFU.js +0 -256
  448. package/dist/chunk-ITELSEFU.js.map +0 -1
  449. package/dist/chunk-IXAYNBOY.js +0 -407
  450. package/dist/chunk-IXAYNBOY.js.map +0 -1
  451. package/dist/chunk-JUW2ETEI.js +0 -191
  452. package/dist/chunk-JUW2ETEI.js.map +0 -1
  453. package/dist/chunk-K65C7CVE.js +0 -127
  454. package/dist/chunk-K65C7CVE.js.map +0 -1
  455. package/dist/chunk-KDI64MCY.js +0 -189
  456. package/dist/chunk-KDI64MCY.js.map +0 -1
  457. package/dist/chunk-KN4ASMH5.js +0 -160
  458. package/dist/chunk-KN4ASMH5.js.map +0 -1
  459. package/dist/chunk-KQW7QNTU.js +0 -1549
  460. package/dist/chunk-KQW7QNTU.js.map +0 -1
  461. package/dist/chunk-KR7NXXHC.js +0 -66
  462. package/dist/chunk-KR7NXXHC.js.map +0 -1
  463. package/dist/chunk-KRZKIVMA.js +0 -142
  464. package/dist/chunk-KRZKIVMA.js.map +0 -1
  465. package/dist/chunk-KTTLLKGQ.js +0 -185
  466. package/dist/chunk-KTTLLKGQ.js.map +0 -1
  467. package/dist/chunk-KWKSHPDP.js +0 -234
  468. package/dist/chunk-KWKSHPDP.js.map +0 -1
  469. package/dist/chunk-KZVC7OYG.js +0 -57
  470. package/dist/chunk-KZVC7OYG.js.map +0 -1
  471. package/dist/chunk-L5DHUN2V.js +0 -204
  472. package/dist/chunk-L5DHUN2V.js.map +0 -1
  473. package/dist/chunk-LCTGEH57.js +0 -1376
  474. package/dist/chunk-LCTGEH57.js.map +0 -1
  475. package/dist/chunk-LXLIQ2D6.js +0 -12
  476. package/dist/chunk-LXLIQ2D6.js.map +0 -1
  477. package/dist/chunk-M4CTURKX.js +0 -84
  478. package/dist/chunk-M4CTURKX.js.map +0 -1
  479. package/dist/chunk-M6LTUPVP.js +0 -301
  480. package/dist/chunk-M6LTUPVP.js.map +0 -1
  481. package/dist/chunk-MA6RRHDT.js +0 -291
  482. package/dist/chunk-MA6RRHDT.js.map +0 -1
  483. package/dist/chunk-MODE4QIA.js +0 -6
  484. package/dist/chunk-MODE4QIA.js.map +0 -1
  485. package/dist/chunk-MVILMVGG.js +0 -118
  486. package/dist/chunk-MVILMVGG.js.map +0 -1
  487. package/dist/chunk-MWS4VCLV.js +0 -17
  488. package/dist/chunk-MWS4VCLV.js.map +0 -1
  489. package/dist/chunk-NEUX74SO.js +0 -315
  490. package/dist/chunk-NEUX74SO.js.map +0 -1
  491. package/dist/chunk-NFHKYBRD.js +0 -156
  492. package/dist/chunk-NFHKYBRD.js.map +0 -1
  493. package/dist/chunk-NHJNNXD3.js +0 -89
  494. package/dist/chunk-NHJNNXD3.js.map +0 -1
  495. package/dist/chunk-O2BF3HZL.js +0 -33
  496. package/dist/chunk-O2BF3HZL.js.map +0 -1
  497. package/dist/chunk-OANXCZYD.js +0 -212
  498. package/dist/chunk-OANXCZYD.js.map +0 -1
  499. package/dist/chunk-ODJF7YIP.js +0 -230
  500. package/dist/chunk-ODJF7YIP.js.map +0 -1
  501. package/dist/chunk-ON4BJTHI.js +0 -101
  502. package/dist/chunk-ON4BJTHI.js.map +0 -1
  503. package/dist/chunk-OTL5WXIJ.js +0 -16
  504. package/dist/chunk-OTL5WXIJ.js.map +0 -1
  505. package/dist/chunk-PACNBKJV.js +0 -47
  506. package/dist/chunk-PACNBKJV.js.map +0 -1
  507. package/dist/chunk-PROCA7K7.js +0 -23
  508. package/dist/chunk-PROCA7K7.js.map +0 -1
  509. package/dist/chunk-QGMIPA67.js +0 -85
  510. package/dist/chunk-QGMIPA67.js.map +0 -1
  511. package/dist/chunk-QQA37LFB.js +0 -190
  512. package/dist/chunk-QQA37LFB.js.map +0 -1
  513. package/dist/chunk-QZAWRSEB.js +0 -61
  514. package/dist/chunk-QZAWRSEB.js.map +0 -1
  515. package/dist/chunk-R74KGWNS.js +0 -699
  516. package/dist/chunk-R74KGWNS.js.map +0 -1
  517. package/dist/chunk-RFDLHMKL.js +0 -110
  518. package/dist/chunk-RFDLHMKL.js.map +0 -1
  519. package/dist/chunk-RL64HN7S.js +0 -40
  520. package/dist/chunk-RL64HN7S.js.map +0 -1
  521. package/dist/chunk-RMRQKPL7.js +0 -115
  522. package/dist/chunk-RMRQKPL7.js.map +0 -1
  523. package/dist/chunk-RQVK4IYC.js +0 -606
  524. package/dist/chunk-RQVK4IYC.js.map +0 -1
  525. package/dist/chunk-RTW56PWZ.js +0 -59
  526. package/dist/chunk-RTW56PWZ.js.map +0 -1
  527. package/dist/chunk-RUTPQNLR.js +0 -266
  528. package/dist/chunk-RUTPQNLR.js.map +0 -1
  529. package/dist/chunk-S6TAF63G.js +0 -25
  530. package/dist/chunk-S6TAF63G.js.map +0 -1
  531. package/dist/chunk-SBGAUGXY.js +0 -224
  532. package/dist/chunk-SBGAUGXY.js.map +0 -1
  533. package/dist/chunk-SC275NHZ.js +0 -407
  534. package/dist/chunk-SC275NHZ.js.map +0 -1
  535. package/dist/chunk-SCQPU4UE.js +0 -97
  536. package/dist/chunk-SCQPU4UE.js.map +0 -1
  537. package/dist/chunk-SFFF2WQP.js +0 -8
  538. package/dist/chunk-SFFF2WQP.js.map +0 -1
  539. package/dist/chunk-SJYMHZKA.js +0 -36
  540. package/dist/chunk-SJYMHZKA.js.map +0 -1
  541. package/dist/chunk-SLCCUJVN.js +0 -125
  542. package/dist/chunk-SLCCUJVN.js.map +0 -1
  543. package/dist/chunk-SVBSNSD4.js +0 -259
  544. package/dist/chunk-SVBSNSD4.js.map +0 -1
  545. package/dist/chunk-SVPLTL35.js +0 -62
  546. package/dist/chunk-SVPLTL35.js.map +0 -1
  547. package/dist/chunk-SWQFYNYG.js +0 -338
  548. package/dist/chunk-SWQFYNYG.js.map +0 -1
  549. package/dist/chunk-THHB4EWS.js +0 -72
  550. package/dist/chunk-THHB4EWS.js.map +0 -1
  551. package/dist/chunk-TUCDD33E.js +0 -246
  552. package/dist/chunk-TUCDD33E.js.map +0 -1
  553. package/dist/chunk-TV4WAP2R.js +0 -14
  554. package/dist/chunk-TV4WAP2R.js.map +0 -1
  555. package/dist/chunk-U3A6YBTZ.js +0 -134
  556. package/dist/chunk-U3A6YBTZ.js.map +0 -1
  557. package/dist/chunk-UGT6DKWM.js +0 -95
  558. package/dist/chunk-VSERHUWD.js +0 -212
  559. package/dist/chunk-VSERHUWD.js.map +0 -1
  560. package/dist/chunk-VYG7BDXC.js +0 -49
  561. package/dist/chunk-VYG7BDXC.js.map +0 -1
  562. package/dist/chunk-WETKNYZX.js +0 -52
  563. package/dist/chunk-WETKNYZX.js.map +0 -1
  564. package/dist/chunk-WGG4AML3.js +0 -216
  565. package/dist/chunk-WGG4AML3.js.map +0 -1
  566. package/dist/chunk-WKAUEL6I.js +0 -30
  567. package/dist/chunk-WKAUEL6I.js.map +0 -1
  568. package/dist/chunk-WPOLA5CG.js +0 -81
  569. package/dist/chunk-WPOLA5CG.js.map +0 -1
  570. package/dist/chunk-WPVETCGJ.js +0 -254
  571. package/dist/chunk-WPVETCGJ.js.map +0 -1
  572. package/dist/chunk-WTSM3A7E.js +0 -13
  573. package/dist/chunk-WTSM3A7E.js.map +0 -1
  574. package/dist/chunk-WU3F2K3T.js +0 -148
  575. package/dist/chunk-WU3F2K3T.js.map +0 -1
  576. package/dist/chunk-WZZK2DTZ.js +0 -39
  577. package/dist/chunk-WZZK2DTZ.js.map +0 -1
  578. package/dist/chunk-X4IHLKRD.js +0 -42
  579. package/dist/chunk-X4IHLKRD.js.map +0 -1
  580. package/dist/chunk-XAHEXZJC.js +0 -80
  581. package/dist/chunk-XAHEXZJC.js.map +0 -1
  582. package/dist/chunk-XCYGJDUX.js +0 -31
  583. package/dist/chunk-XCYGJDUX.js.map +0 -1
  584. package/dist/chunk-Y4W3JORC.js +0 -104
  585. package/dist/chunk-Y4W3JORC.js.map +0 -1
  586. package/dist/chunk-YFZJ3ZLG.js +0 -1297
  587. package/dist/chunk-YFZJ3ZLG.js.map +0 -1
  588. package/dist/chunk-YI3WLXEN.js +0 -4387
  589. package/dist/chunk-YI3WLXEN.js.map +0 -1
  590. package/dist/chunk-ZBKFSPD3.js +0 -29
  591. package/dist/chunk-ZBKFSPD3.js.map +0 -1
  592. package/dist/chunk-ZOERRQ6A.js +0 -79
  593. package/dist/chunk-ZOERRQ6A.js.map +0 -1
  594. package/dist/chunk-ZSTGUKHU.js +0 -10
  595. package/dist/chunk-ZSTGUKHU.js.map +0 -1
  596. package/dist/chunk-ZUEHDL27.js +0 -65
  597. package/dist/chunk-ZUEHDL27.js.map +0 -1
  598. package/dist/constants-D3gaMY-W.d.ts +0 -39
  599. package/dist/icons.js.map +0 -1
  600. package/dist/index.js.map +0 -1
  601. package/dist/internal/blocks/AIKit.js.map +0 -1
  602. package/dist/internal/blocks/AppShell.js.map +0 -1
  603. package/dist/internal/blocks/AutoSaveTextarea.js.map +0 -1
  604. package/dist/internal/blocks/BrandEditor.js.map +0 -1
  605. package/dist/internal/blocks/ClipboardButton.js.map +0 -1
  606. package/dist/internal/blocks/ColorInput.js.map +0 -1
  607. package/dist/internal/blocks/ColorModeSwitch.js.map +0 -1
  608. package/dist/internal/blocks/Command.js.map +0 -1
  609. package/dist/internal/blocks/CopyField.js.map +0 -1
  610. package/dist/internal/blocks/DateInput.js.map +0 -1
  611. package/dist/internal/blocks/DateRangeInput.js.map +0 -1
  612. package/dist/internal/blocks/Form.js.map +0 -1
  613. package/dist/internal/blocks/FormGroup.js.map +0 -1
  614. package/dist/internal/blocks/MultiActionButtonGroup.js.map +0 -1
  615. package/dist/internal/blocks/OtpInput.js.map +0 -1
  616. package/dist/internal/blocks/PageHeader.js.map +0 -1
  617. package/dist/internal/blocks/PageLayout.js.map +0 -1
  618. package/dist/internal/blocks/PageToolbar.js.map +0 -1
  619. package/dist/internal/blocks/SearchInput.js.map +0 -1
  620. package/dist/internal/blocks/SectionNav.js.map +0 -1
  621. package/dist/internal/blocks/TextInput.js.map +0 -1
  622. package/dist/internal/components/Alert.js.map +0 -1
  623. package/dist/internal/components/AlertModal.js.map +0 -1
  624. package/dist/internal/components/Badge.js.map +0 -1
  625. package/dist/internal/components/BrandLogo.js.map +0 -1
  626. package/dist/internal/components/Breadcrumb.js.map +0 -1
  627. package/dist/internal/components/Button.js.map +0 -1
  628. package/dist/internal/components/Calendar.js.map +0 -1
  629. package/dist/internal/components/Card.js.map +0 -1
  630. package/dist/internal/components/Checkbox.js.map +0 -1
  631. package/dist/internal/components/Clipboard.js.map +0 -1
  632. package/dist/internal/components/Collapsible.js.map +0 -1
  633. package/dist/internal/components/Combobox.js.map +0 -1
  634. package/dist/internal/components/DatePicker.js.map +0 -1
  635. package/dist/internal/components/DateRangePicker.js.map +0 -1
  636. package/dist/internal/components/DiffView.js.map +0 -1
  637. package/dist/internal/components/DropdownMenu.js.map +0 -1
  638. package/dist/internal/components/FileUpload.js.map +0 -1
  639. package/dist/internal/components/FullScreenModal.js.map +0 -1
  640. package/dist/internal/components/HoverCard.js.map +0 -1
  641. package/dist/internal/components/InputGroup.js.map +0 -1
  642. package/dist/internal/components/Kbd.js.map +0 -1
  643. package/dist/internal/components/MarkedText.js.map +0 -1
  644. package/dist/internal/components/MergeEditor/useMergeDiff.js.map +0 -1
  645. package/dist/internal/components/Modal.js.map +0 -1
  646. package/dist/internal/components/Navbar.js.map +0 -1
  647. package/dist/internal/components/Pagination.js.map +0 -1
  648. package/dist/internal/components/Popconfirm.js.map +0 -1
  649. package/dist/internal/components/Popover.js.map +0 -1
  650. package/dist/internal/components/RadioGroup.js.map +0 -1
  651. package/dist/internal/components/Resizable.js.map +0 -1
  652. package/dist/internal/components/Search.js.map +0 -1
  653. package/dist/internal/components/Select.js.map +0 -1
  654. package/dist/internal/components/Sheet.js.map +0 -1
  655. package/dist/internal/components/Sidebar.js.map +0 -1
  656. package/dist/internal/components/Slider.js.map +0 -1
  657. package/dist/internal/components/Stepper.js.map +0 -1
  658. package/dist/internal/components/Switch.js.map +0 -1
  659. package/dist/internal/components/Table.js.map +0 -1
  660. package/dist/internal/components/Tabs.js.map +0 -1
  661. package/dist/internal/components/ThemeProvider.js.map +0 -1
  662. package/dist/internal/components/TimePicker.js.map +0 -1
  663. package/dist/internal/components/Timeline.js.map +0 -1
  664. package/dist/internal/components/Toast.js.map +0 -1
  665. package/dist/internal/components/ToggleGroup.js.map +0 -1
  666. package/dist/internal/components/Tooltip.js.map +0 -1
  667. package/dist/internal/components/Workbench.js.map +0 -1
  668. package/dist/internal/components/ZoomableSvg.js.map +0 -1
  669. package/dist/internal/utils.js.map +0 -1
  670. package/dist/mermaid.js.map +0 -1
@@ -1,4387 +0,0 @@
1
- import { cn } from './chunk-LXLIQ2D6.js';
2
- import { __export } from './chunk-G3PMV62Z.js';
3
- import React26, { createContext, useCallback, useContext, useMemo, useRef, useEffect, useState, useLayoutEffect } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- // ../../node_modules/.pnpm/@date-fns+tz@1.4.1/node_modules/@date-fns/tz/tzName/index.js
7
- function tzName(timeZone, date, format2 = "long") {
8
- return new Intl.DateTimeFormat("en-US", {
9
- // Enforces engine to render the time. Without the option JavaScriptCore omits it.
10
- hour: "numeric",
11
- timeZone,
12
- timeZoneName: format2
13
- }).format(date).split(/\s/g).slice(2).join(" ");
14
- }
15
-
16
- // ../../node_modules/.pnpm/@date-fns+tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.js
17
- var offsetFormatCache = {};
18
- var offsetCache = {};
19
- function tzOffset(timeZone, date) {
20
- try {
21
- const format2 = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat("en-US", {
22
- timeZone,
23
- timeZoneName: "longOffset"
24
- }).format;
25
- const offsetStr = format2(date).split("GMT")[1];
26
- if (offsetStr in offsetCache) return offsetCache[offsetStr];
27
- return calcOffset(offsetStr, offsetStr.split(":"));
28
- } catch {
29
- if (timeZone in offsetCache) return offsetCache[timeZone];
30
- const captures = timeZone?.match(offsetRe);
31
- if (captures) return calcOffset(timeZone, captures.slice(1));
32
- return NaN;
33
- }
34
- }
35
- var offsetRe = /([+-]\d\d):?(\d\d)?/;
36
- function calcOffset(cacheStr, values) {
37
- const hours = +(values[0] || 0);
38
- const minutes = +(values[1] || 0);
39
- const seconds = +(values[2] || 0) / 60;
40
- return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
41
- }
42
-
43
- // ../../node_modules/.pnpm/@date-fns+tz@1.4.1/node_modules/@date-fns/tz/date/mini.js
44
- var TZDateMini = class _TZDateMini extends Date {
45
- //#region static
46
- constructor(...args) {
47
- super();
48
- if (args.length > 1 && typeof args[args.length - 1] === "string") {
49
- this.timeZone = args.pop();
50
- }
51
- this.internal = /* @__PURE__ */ new Date();
52
- if (isNaN(tzOffset(this.timeZone, this))) {
53
- this.setTime(NaN);
54
- } else {
55
- if (!args.length) {
56
- this.setTime(Date.now());
57
- } else if (typeof args[0] === "number" && (args.length === 1 || args.length === 2 && typeof args[1] !== "number")) {
58
- this.setTime(args[0]);
59
- } else if (typeof args[0] === "string") {
60
- this.setTime(+new Date(args[0]));
61
- } else if (args[0] instanceof Date) {
62
- this.setTime(+args[0]);
63
- } else {
64
- this.setTime(+new Date(...args));
65
- adjustToSystemTZ(this);
66
- syncToInternal(this);
67
- }
68
- }
69
- }
70
- static tz(tz, ...args) {
71
- return args.length ? new _TZDateMini(...args, tz) : new _TZDateMini(Date.now(), tz);
72
- }
73
- //#endregion
74
- //#region time zone
75
- withTimeZone(timeZone) {
76
- return new _TZDateMini(+this, timeZone);
77
- }
78
- getTimezoneOffset() {
79
- const offset = -tzOffset(this.timeZone, this);
80
- return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
81
- }
82
- //#endregion
83
- //#region time
84
- setTime(time) {
85
- Date.prototype.setTime.apply(this, arguments);
86
- syncToInternal(this);
87
- return +this;
88
- }
89
- //#endregion
90
- //#region date-fns integration
91
- [/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
92
- return new _TZDateMini(+new Date(date), this.timeZone);
93
- }
94
- //#endregion
95
- };
96
- var re = /^(get|set)(?!UTC)/;
97
- Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
98
- if (!re.test(method)) return;
99
- const utcMethod = method.replace(re, "$1UTC");
100
- if (!TZDateMini.prototype[utcMethod]) return;
101
- if (method.startsWith("get")) {
102
- TZDateMini.prototype[method] = function() {
103
- return this.internal[utcMethod]();
104
- };
105
- } else {
106
- TZDateMini.prototype[method] = function() {
107
- Date.prototype[utcMethod].apply(this.internal, arguments);
108
- syncFromInternal(this);
109
- return +this;
110
- };
111
- TZDateMini.prototype[utcMethod] = function() {
112
- Date.prototype[utcMethod].apply(this, arguments);
113
- syncToInternal(this);
114
- return +this;
115
- };
116
- }
117
- });
118
- function syncToInternal(date) {
119
- date.internal.setTime(+date);
120
- date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
121
- }
122
- function syncFromInternal(date) {
123
- Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
124
- Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());
125
- adjustToSystemTZ(date);
126
- }
127
- function adjustToSystemTZ(date) {
128
- const baseOffset = tzOffset(date.timeZone, date);
129
- const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
130
- const prevHour = /* @__PURE__ */ new Date(+date);
131
- prevHour.setUTCHours(prevHour.getUTCHours() - 1);
132
- const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
133
- const prevHourSystemOffset = -(/* @__PURE__ */ new Date(+prevHour)).getTimezoneOffset();
134
- const systemDSTChange = systemOffset - prevHourSystemOffset;
135
- const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();
136
- if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
137
- const offsetDiff = systemOffset - offset;
138
- if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
139
- const systemDate = /* @__PURE__ */ new Date(+date);
140
- systemDate.setUTCSeconds(0);
141
- const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;
142
- const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;
143
- if (secondsOffset || systemSecondsOffset) {
144
- date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);
145
- Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);
146
- }
147
- const postBaseOffset = tzOffset(date.timeZone, date);
148
- const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);
149
- const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
150
- const postOffsetDiff = postSystemOffset - postOffset;
151
- const offsetChanged = postOffset !== offset;
152
- const postDiff = postOffsetDiff - offsetDiff;
153
- if (offsetChanged && postDiff) {
154
- Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
155
- const newBaseOffset = tzOffset(date.timeZone, date);
156
- const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
157
- const offsetChange = postOffset - newOffset;
158
- if (offsetChange) {
159
- date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
160
- Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);
161
- }
162
- }
163
- }
164
-
165
- // ../../node_modules/.pnpm/@date-fns+tz@1.4.1/node_modules/@date-fns/tz/date/index.js
166
- var TZDate = class _TZDate extends TZDateMini {
167
- //#region static
168
- static tz(tz, ...args) {
169
- return args.length ? new _TZDate(...args, tz) : new _TZDate(Date.now(), tz);
170
- }
171
- //#endregion
172
- //#region representation
173
- toISOString() {
174
- const [sign, hours, minutes] = this.tzComponents();
175
- const tz = `${sign}${hours}:${minutes}`;
176
- return this.internal.toISOString().slice(0, -1) + tz;
177
- }
178
- toString() {
179
- return `${this.toDateString()} ${this.toTimeString()}`;
180
- }
181
- toDateString() {
182
- const [day, date, month, year] = this.internal.toUTCString().split(" ");
183
- return `${day?.slice(0, -1)} ${month} ${date} ${year}`;
184
- }
185
- toTimeString() {
186
- const time = this.internal.toUTCString().split(" ")[4];
187
- const [sign, hours, minutes] = this.tzComponents();
188
- return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;
189
- }
190
- toLocaleString(locales, options) {
191
- return Date.prototype.toLocaleString.call(this, locales, {
192
- ...options,
193
- timeZone: options?.timeZone || this.timeZone
194
- });
195
- }
196
- toLocaleDateString(locales, options) {
197
- return Date.prototype.toLocaleDateString.call(this, locales, {
198
- ...options,
199
- timeZone: options?.timeZone || this.timeZone
200
- });
201
- }
202
- toLocaleTimeString(locales, options) {
203
- return Date.prototype.toLocaleTimeString.call(this, locales, {
204
- ...options,
205
- timeZone: options?.timeZone || this.timeZone
206
- });
207
- }
208
- //#endregion
209
- //#region private
210
- tzComponents() {
211
- const offset = this.getTimezoneOffset();
212
- const sign = offset > 0 ? "-" : "+";
213
- const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, "0");
214
- const minutes = String(Math.abs(offset) % 60).padStart(2, "0");
215
- return [sign, hours, minutes];
216
- }
217
- //#endregion
218
- withTimeZone(timeZone) {
219
- return new _TZDate(+this, timeZone);
220
- }
221
- //#region date-fns integration
222
- [/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
223
- return new _TZDate(+new Date(date), this.timeZone);
224
- }
225
- //#endregion
226
- };
227
- var millisecondsInWeek = 6048e5;
228
- var millisecondsInDay = 864e5;
229
- var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
230
-
231
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
232
- function constructFrom(date, value) {
233
- if (typeof date === "function") return date(value);
234
- if (date && typeof date === "object" && constructFromSymbol in date)
235
- return date[constructFromSymbol](value);
236
- if (date instanceof Date) return new date.constructor(value);
237
- return new Date(value);
238
- }
239
-
240
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
241
- function toDate(argument, context) {
242
- return constructFrom(context || argument, argument);
243
- }
244
-
245
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addDays.js
246
- function addDays(date, amount, options) {
247
- const _date = toDate(date, options?.in);
248
- if (isNaN(amount)) return constructFrom(date, NaN);
249
- if (!amount) return _date;
250
- _date.setDate(_date.getDate() + amount);
251
- return _date;
252
- }
253
-
254
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMonths.js
255
- function addMonths(date, amount, options) {
256
- const _date = toDate(date, options?.in);
257
- if (isNaN(amount)) return constructFrom(date, NaN);
258
- if (!amount) {
259
- return _date;
260
- }
261
- const dayOfMonth = _date.getDate();
262
- const endOfDesiredMonth = constructFrom(date, _date.getTime());
263
- endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
264
- const daysInMonth = endOfDesiredMonth.getDate();
265
- if (dayOfMonth >= daysInMonth) {
266
- return endOfDesiredMonth;
267
- } else {
268
- _date.setFullYear(
269
- endOfDesiredMonth.getFullYear(),
270
- endOfDesiredMonth.getMonth(),
271
- dayOfMonth
272
- );
273
- return _date;
274
- }
275
- }
276
-
277
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js
278
- var defaultOptions = {};
279
- function getDefaultOptions() {
280
- return defaultOptions;
281
- }
282
-
283
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js
284
- function startOfWeek(date, options) {
285
- const defaultOptions2 = getDefaultOptions();
286
- const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
287
- const _date = toDate(date, options?.in);
288
- const day = _date.getDay();
289
- const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
290
- _date.setDate(_date.getDate() - diff);
291
- _date.setHours(0, 0, 0, 0);
292
- return _date;
293
- }
294
-
295
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js
296
- function startOfISOWeek(date, options) {
297
- return startOfWeek(date, { ...options, weekStartsOn: 1 });
298
- }
299
-
300
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js
301
- function getISOWeekYear(date, options) {
302
- const _date = toDate(date, options?.in);
303
- const year = _date.getFullYear();
304
- const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
305
- fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
306
- fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
307
- const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
308
- const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
309
- fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
310
- fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
311
- const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
312
- if (_date.getTime() >= startOfNextYear.getTime()) {
313
- return year + 1;
314
- } else if (_date.getTime() >= startOfThisYear.getTime()) {
315
- return year;
316
- } else {
317
- return year - 1;
318
- }
319
- }
320
-
321
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
322
- function getTimezoneOffsetInMilliseconds(date) {
323
- const _date = toDate(date);
324
- const utcDate = new Date(
325
- Date.UTC(
326
- _date.getFullYear(),
327
- _date.getMonth(),
328
- _date.getDate(),
329
- _date.getHours(),
330
- _date.getMinutes(),
331
- _date.getSeconds(),
332
- _date.getMilliseconds()
333
- )
334
- );
335
- utcDate.setUTCFullYear(_date.getFullYear());
336
- return +date - +utcDate;
337
- }
338
-
339
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js
340
- function normalizeDates(context, ...dates) {
341
- const normalize = constructFrom.bind(
342
- null,
343
- dates.find((date) => typeof date === "object")
344
- );
345
- return dates.map(normalize);
346
- }
347
-
348
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js
349
- function startOfDay(date, options) {
350
- const _date = toDate(date, options?.in);
351
- _date.setHours(0, 0, 0, 0);
352
- return _date;
353
- }
354
-
355
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js
356
- function differenceInCalendarDays(laterDate, earlierDate, options) {
357
- const [laterDate_, earlierDate_] = normalizeDates(
358
- options?.in,
359
- laterDate,
360
- earlierDate
361
- );
362
- const laterStartOfDay = startOfDay(laterDate_);
363
- const earlierStartOfDay = startOfDay(earlierDate_);
364
- const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
365
- const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
366
- return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
367
- }
368
-
369
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js
370
- function startOfISOWeekYear(date, options) {
371
- const year = getISOWeekYear(date, options);
372
- const fourthOfJanuary = constructFrom(date, 0);
373
- fourthOfJanuary.setFullYear(year, 0, 4);
374
- fourthOfJanuary.setHours(0, 0, 0, 0);
375
- return startOfISOWeek(fourthOfJanuary);
376
- }
377
-
378
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addWeeks.js
379
- function addWeeks(date, amount, options) {
380
- return addDays(date, amount * 7, options);
381
- }
382
-
383
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addYears.js
384
- function addYears(date, amount, options) {
385
- return addMonths(date, amount * 12, options);
386
- }
387
-
388
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/max.js
389
- function max(dates, options) {
390
- let result;
391
- let context = options?.in;
392
- dates.forEach((date) => {
393
- if (!context && typeof date === "object")
394
- context = constructFrom.bind(null, date);
395
- const date_ = toDate(date, context);
396
- if (!result || result < date_ || isNaN(+date_)) result = date_;
397
- });
398
- return constructFrom(context, result || NaN);
399
- }
400
-
401
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/min.js
402
- function min(dates, options) {
403
- let result;
404
- let context = options?.in;
405
- dates.forEach((date) => {
406
- if (!context && typeof date === "object")
407
- context = constructFrom.bind(null, date);
408
- const date_ = toDate(date, context);
409
- if (!result || result > date_ || isNaN(+date_)) result = date_;
410
- });
411
- return constructFrom(context, result || NaN);
412
- }
413
-
414
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameDay.js
415
- function isSameDay(laterDate, earlierDate, options) {
416
- const [dateLeft_, dateRight_] = normalizeDates(
417
- options?.in,
418
- laterDate,
419
- earlierDate
420
- );
421
- return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
422
- }
423
-
424
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js
425
- function isDate(value) {
426
- return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
427
- }
428
-
429
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js
430
- function isValid(date) {
431
- return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
432
- }
433
-
434
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarMonths.js
435
- function differenceInCalendarMonths(laterDate, earlierDate, options) {
436
- const [laterDate_, earlierDate_] = normalizeDates(
437
- options?.in,
438
- laterDate,
439
- earlierDate
440
- );
441
- const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
442
- const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
443
- return yearsDiff * 12 + monthsDiff;
444
- }
445
-
446
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfMonth.js
447
- function endOfMonth(date, options) {
448
- const _date = toDate(date, options?.in);
449
- const month = _date.getMonth();
450
- _date.setFullYear(_date.getFullYear(), month + 1, 0);
451
- _date.setHours(23, 59, 59, 999);
452
- return _date;
453
- }
454
-
455
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeInterval.js
456
- function normalizeInterval(context, interval) {
457
- const [start, end] = normalizeDates(context, interval.start, interval.end);
458
- return { start, end };
459
- }
460
-
461
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/eachMonthOfInterval.js
462
- function eachMonthOfInterval(interval, options) {
463
- const { start, end } = normalizeInterval(options?.in, interval);
464
- let reversed = +start > +end;
465
- const endTime = reversed ? +start : +end;
466
- const date = reversed ? end : start;
467
- date.setHours(0, 0, 0, 0);
468
- date.setDate(1);
469
- let step = 1;
470
- const dates = [];
471
- while (+date <= endTime) {
472
- dates.push(constructFrom(start, date));
473
- date.setMonth(date.getMonth() + step);
474
- }
475
- return reversed ? dates.reverse() : dates;
476
- }
477
-
478
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfMonth.js
479
- function startOfMonth(date, options) {
480
- const _date = toDate(date, options?.in);
481
- _date.setDate(1);
482
- _date.setHours(0, 0, 0, 0);
483
- return _date;
484
- }
485
-
486
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfYear.js
487
- function endOfYear(date, options) {
488
- const _date = toDate(date, options?.in);
489
- const year = _date.getFullYear();
490
- _date.setFullYear(year + 1, 0, 0);
491
- _date.setHours(23, 59, 59, 999);
492
- return _date;
493
- }
494
-
495
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js
496
- function startOfYear(date, options) {
497
- const date_ = toDate(date, options?.in);
498
- date_.setFullYear(date_.getFullYear(), 0, 1);
499
- date_.setHours(0, 0, 0, 0);
500
- return date_;
501
- }
502
-
503
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/eachYearOfInterval.js
504
- function eachYearOfInterval(interval, options) {
505
- const { start, end } = normalizeInterval(options?.in, interval);
506
- let reversed = +start > +end;
507
- const endTime = reversed ? +start : +end;
508
- const date = reversed ? end : start;
509
- date.setHours(0, 0, 0, 0);
510
- date.setMonth(0, 1);
511
- let step = 1;
512
- const dates = [];
513
- while (+date <= endTime) {
514
- dates.push(constructFrom(start, date));
515
- date.setFullYear(date.getFullYear() + step);
516
- }
517
- return reversed ? dates.reverse() : dates;
518
- }
519
-
520
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfWeek.js
521
- function endOfWeek(date, options) {
522
- const defaultOptions2 = getDefaultOptions();
523
- const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
524
- const _date = toDate(date, options?.in);
525
- const day = _date.getDay();
526
- const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
527
- _date.setDate(_date.getDate() + diff);
528
- _date.setHours(23, 59, 59, 999);
529
- return _date;
530
- }
531
-
532
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfISOWeek.js
533
- function endOfISOWeek(date, options) {
534
- return endOfWeek(date, { ...options, weekStartsOn: 1 });
535
- }
536
-
537
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
538
- var formatDistanceLocale = {
539
- lessThanXSeconds: {
540
- one: "less than a second",
541
- other: "less than {{count}} seconds"
542
- },
543
- xSeconds: {
544
- one: "1 second",
545
- other: "{{count}} seconds"
546
- },
547
- halfAMinute: "half a minute",
548
- lessThanXMinutes: {
549
- one: "less than a minute",
550
- other: "less than {{count}} minutes"
551
- },
552
- xMinutes: {
553
- one: "1 minute",
554
- other: "{{count}} minutes"
555
- },
556
- aboutXHours: {
557
- one: "about 1 hour",
558
- other: "about {{count}} hours"
559
- },
560
- xHours: {
561
- one: "1 hour",
562
- other: "{{count}} hours"
563
- },
564
- xDays: {
565
- one: "1 day",
566
- other: "{{count}} days"
567
- },
568
- aboutXWeeks: {
569
- one: "about 1 week",
570
- other: "about {{count}} weeks"
571
- },
572
- xWeeks: {
573
- one: "1 week",
574
- other: "{{count}} weeks"
575
- },
576
- aboutXMonths: {
577
- one: "about 1 month",
578
- other: "about {{count}} months"
579
- },
580
- xMonths: {
581
- one: "1 month",
582
- other: "{{count}} months"
583
- },
584
- aboutXYears: {
585
- one: "about 1 year",
586
- other: "about {{count}} years"
587
- },
588
- xYears: {
589
- one: "1 year",
590
- other: "{{count}} years"
591
- },
592
- overXYears: {
593
- one: "over 1 year",
594
- other: "over {{count}} years"
595
- },
596
- almostXYears: {
597
- one: "almost 1 year",
598
- other: "almost {{count}} years"
599
- }
600
- };
601
- var formatDistance = (token, count, options) => {
602
- let result;
603
- const tokenValue = formatDistanceLocale[token];
604
- if (typeof tokenValue === "string") {
605
- result = tokenValue;
606
- } else if (count === 1) {
607
- result = tokenValue.one;
608
- } else {
609
- result = tokenValue.other.replace("{{count}}", count.toString());
610
- }
611
- if (options?.addSuffix) {
612
- if (options.comparison && options.comparison > 0) {
613
- return "in " + result;
614
- } else {
615
- return result + " ago";
616
- }
617
- }
618
- return result;
619
- };
620
-
621
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
622
- function buildFormatLongFn(args) {
623
- return (options = {}) => {
624
- const width = options.width ? String(options.width) : args.defaultWidth;
625
- const format2 = args.formats[width] || args.formats[args.defaultWidth];
626
- return format2;
627
- };
628
- }
629
-
630
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js
631
- var dateFormats = {
632
- full: "EEEE, MMMM do, y",
633
- long: "MMMM do, y",
634
- medium: "MMM d, y",
635
- short: "MM/dd/yyyy"
636
- };
637
- var timeFormats = {
638
- full: "h:mm:ss a zzzz",
639
- long: "h:mm:ss a z",
640
- medium: "h:mm:ss a",
641
- short: "h:mm a"
642
- };
643
- var dateTimeFormats = {
644
- full: "{{date}} 'at' {{time}}",
645
- long: "{{date}} 'at' {{time}}",
646
- medium: "{{date}}, {{time}}",
647
- short: "{{date}}, {{time}}"
648
- };
649
- var formatLong = {
650
- date: buildFormatLongFn({
651
- formats: dateFormats,
652
- defaultWidth: "full"
653
- }),
654
- time: buildFormatLongFn({
655
- formats: timeFormats,
656
- defaultWidth: "full"
657
- }),
658
- dateTime: buildFormatLongFn({
659
- formats: dateTimeFormats,
660
- defaultWidth: "full"
661
- })
662
- };
663
-
664
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
665
- var formatRelativeLocale = {
666
- lastWeek: "'last' eeee 'at' p",
667
- yesterday: "'yesterday at' p",
668
- today: "'today at' p",
669
- tomorrow: "'tomorrow at' p",
670
- nextWeek: "eeee 'at' p",
671
- other: "P"
672
- };
673
- var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
674
-
675
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
676
- function buildLocalizeFn(args) {
677
- return (value, options) => {
678
- const context = options?.context ? String(options.context) : "standalone";
679
- let valuesArray;
680
- if (context === "formatting" && args.formattingValues) {
681
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
682
- const width = options?.width ? String(options.width) : defaultWidth;
683
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
684
- } else {
685
- const defaultWidth = args.defaultWidth;
686
- const width = options?.width ? String(options.width) : args.defaultWidth;
687
- valuesArray = args.values[width] || args.values[defaultWidth];
688
- }
689
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
690
- return valuesArray[index];
691
- };
692
- }
693
-
694
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js
695
- var eraValues = {
696
- narrow: ["B", "A"],
697
- abbreviated: ["BC", "AD"],
698
- wide: ["Before Christ", "Anno Domini"]
699
- };
700
- var quarterValues = {
701
- narrow: ["1", "2", "3", "4"],
702
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
703
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
704
- };
705
- var monthValues = {
706
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
707
- abbreviated: [
708
- "Jan",
709
- "Feb",
710
- "Mar",
711
- "Apr",
712
- "May",
713
- "Jun",
714
- "Jul",
715
- "Aug",
716
- "Sep",
717
- "Oct",
718
- "Nov",
719
- "Dec"
720
- ],
721
- wide: [
722
- "January",
723
- "February",
724
- "March",
725
- "April",
726
- "May",
727
- "June",
728
- "July",
729
- "August",
730
- "September",
731
- "October",
732
- "November",
733
- "December"
734
- ]
735
- };
736
- var dayValues = {
737
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
738
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
739
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
740
- wide: [
741
- "Sunday",
742
- "Monday",
743
- "Tuesday",
744
- "Wednesday",
745
- "Thursday",
746
- "Friday",
747
- "Saturday"
748
- ]
749
- };
750
- var dayPeriodValues = {
751
- narrow: {
752
- am: "a",
753
- pm: "p",
754
- midnight: "mi",
755
- noon: "n",
756
- morning: "morning",
757
- afternoon: "afternoon",
758
- evening: "evening",
759
- night: "night"
760
- },
761
- abbreviated: {
762
- am: "AM",
763
- pm: "PM",
764
- midnight: "midnight",
765
- noon: "noon",
766
- morning: "morning",
767
- afternoon: "afternoon",
768
- evening: "evening",
769
- night: "night"
770
- },
771
- wide: {
772
- am: "a.m.",
773
- pm: "p.m.",
774
- midnight: "midnight",
775
- noon: "noon",
776
- morning: "morning",
777
- afternoon: "afternoon",
778
- evening: "evening",
779
- night: "night"
780
- }
781
- };
782
- var formattingDayPeriodValues = {
783
- narrow: {
784
- am: "a",
785
- pm: "p",
786
- midnight: "mi",
787
- noon: "n",
788
- morning: "in the morning",
789
- afternoon: "in the afternoon",
790
- evening: "in the evening",
791
- night: "at night"
792
- },
793
- abbreviated: {
794
- am: "AM",
795
- pm: "PM",
796
- midnight: "midnight",
797
- noon: "noon",
798
- morning: "in the morning",
799
- afternoon: "in the afternoon",
800
- evening: "in the evening",
801
- night: "at night"
802
- },
803
- wide: {
804
- am: "a.m.",
805
- pm: "p.m.",
806
- midnight: "midnight",
807
- noon: "noon",
808
- morning: "in the morning",
809
- afternoon: "in the afternoon",
810
- evening: "in the evening",
811
- night: "at night"
812
- }
813
- };
814
- var ordinalNumber = (dirtyNumber, _options) => {
815
- const number = Number(dirtyNumber);
816
- const rem100 = number % 100;
817
- if (rem100 > 20 || rem100 < 10) {
818
- switch (rem100 % 10) {
819
- case 1:
820
- return number + "st";
821
- case 2:
822
- return number + "nd";
823
- case 3:
824
- return number + "rd";
825
- }
826
- }
827
- return number + "th";
828
- };
829
- var localize = {
830
- ordinalNumber,
831
- era: buildLocalizeFn({
832
- values: eraValues,
833
- defaultWidth: "wide"
834
- }),
835
- quarter: buildLocalizeFn({
836
- values: quarterValues,
837
- defaultWidth: "wide",
838
- argumentCallback: (quarter) => quarter - 1
839
- }),
840
- month: buildLocalizeFn({
841
- values: monthValues,
842
- defaultWidth: "wide"
843
- }),
844
- day: buildLocalizeFn({
845
- values: dayValues,
846
- defaultWidth: "wide"
847
- }),
848
- dayPeriod: buildLocalizeFn({
849
- values: dayPeriodValues,
850
- defaultWidth: "wide",
851
- formattingValues: formattingDayPeriodValues,
852
- defaultFormattingWidth: "wide"
853
- })
854
- };
855
-
856
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js
857
- function buildMatchFn(args) {
858
- return (string, options = {}) => {
859
- const width = options.width;
860
- const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
861
- const matchResult = string.match(matchPattern);
862
- if (!matchResult) {
863
- return null;
864
- }
865
- const matchedString = matchResult[0];
866
- const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
867
- const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
868
- // [TODO] -- I challenge you to fix the type
869
- findKey(parsePatterns, (pattern) => pattern.test(matchedString))
870
- );
871
- let value;
872
- value = args.valueCallback ? args.valueCallback(key) : key;
873
- value = options.valueCallback ? (
874
- // [TODO] -- I challenge you to fix the type
875
- options.valueCallback(value)
876
- ) : value;
877
- const rest = string.slice(matchedString.length);
878
- return { value, rest };
879
- };
880
- }
881
- function findKey(object, predicate) {
882
- for (const key in object) {
883
- if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
884
- return key;
885
- }
886
- }
887
- return void 0;
888
- }
889
- function findIndex(array, predicate) {
890
- for (let key = 0; key < array.length; key++) {
891
- if (predicate(array[key])) {
892
- return key;
893
- }
894
- }
895
- return void 0;
896
- }
897
-
898
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
899
- function buildMatchPatternFn(args) {
900
- return (string, options = {}) => {
901
- const matchResult = string.match(args.matchPattern);
902
- if (!matchResult) return null;
903
- const matchedString = matchResult[0];
904
- const parseResult = string.match(args.parsePattern);
905
- if (!parseResult) return null;
906
- let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
907
- value = options.valueCallback ? options.valueCallback(value) : value;
908
- const rest = string.slice(matchedString.length);
909
- return { value, rest };
910
- };
911
- }
912
-
913
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js
914
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
915
- var parseOrdinalNumberPattern = /\d+/i;
916
- var matchEraPatterns = {
917
- narrow: /^(b|a)/i,
918
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
919
- wide: /^(before christ|before common era|anno domini|common era)/i
920
- };
921
- var parseEraPatterns = {
922
- any: [/^b/i, /^(a|c)/i]
923
- };
924
- var matchQuarterPatterns = {
925
- narrow: /^[1234]/i,
926
- abbreviated: /^q[1234]/i,
927
- wide: /^[1234](th|st|nd|rd)? quarter/i
928
- };
929
- var parseQuarterPatterns = {
930
- any: [/1/i, /2/i, /3/i, /4/i]
931
- };
932
- var matchMonthPatterns = {
933
- narrow: /^[jfmasond]/i,
934
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
935
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
936
- };
937
- var parseMonthPatterns = {
938
- narrow: [
939
- /^j/i,
940
- /^f/i,
941
- /^m/i,
942
- /^a/i,
943
- /^m/i,
944
- /^j/i,
945
- /^j/i,
946
- /^a/i,
947
- /^s/i,
948
- /^o/i,
949
- /^n/i,
950
- /^d/i
951
- ],
952
- any: [
953
- /^ja/i,
954
- /^f/i,
955
- /^mar/i,
956
- /^ap/i,
957
- /^may/i,
958
- /^jun/i,
959
- /^jul/i,
960
- /^au/i,
961
- /^s/i,
962
- /^o/i,
963
- /^n/i,
964
- /^d/i
965
- ]
966
- };
967
- var matchDayPatterns = {
968
- narrow: /^[smtwf]/i,
969
- short: /^(su|mo|tu|we|th|fr|sa)/i,
970
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
971
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
972
- };
973
- var parseDayPatterns = {
974
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
975
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
976
- };
977
- var matchDayPeriodPatterns = {
978
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
979
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
980
- };
981
- var parseDayPeriodPatterns = {
982
- any: {
983
- am: /^a/i,
984
- pm: /^p/i,
985
- midnight: /^mi/i,
986
- noon: /^no/i,
987
- morning: /morning/i,
988
- afternoon: /afternoon/i,
989
- evening: /evening/i,
990
- night: /night/i
991
- }
992
- };
993
- var match = {
994
- ordinalNumber: buildMatchPatternFn({
995
- matchPattern: matchOrdinalNumberPattern,
996
- parsePattern: parseOrdinalNumberPattern,
997
- valueCallback: (value) => parseInt(value, 10)
998
- }),
999
- era: buildMatchFn({
1000
- matchPatterns: matchEraPatterns,
1001
- defaultMatchWidth: "wide",
1002
- parsePatterns: parseEraPatterns,
1003
- defaultParseWidth: "any"
1004
- }),
1005
- quarter: buildMatchFn({
1006
- matchPatterns: matchQuarterPatterns,
1007
- defaultMatchWidth: "wide",
1008
- parsePatterns: parseQuarterPatterns,
1009
- defaultParseWidth: "any",
1010
- valueCallback: (index) => index + 1
1011
- }),
1012
- month: buildMatchFn({
1013
- matchPatterns: matchMonthPatterns,
1014
- defaultMatchWidth: "wide",
1015
- parsePatterns: parseMonthPatterns,
1016
- defaultParseWidth: "any"
1017
- }),
1018
- day: buildMatchFn({
1019
- matchPatterns: matchDayPatterns,
1020
- defaultMatchWidth: "wide",
1021
- parsePatterns: parseDayPatterns,
1022
- defaultParseWidth: "any"
1023
- }),
1024
- dayPeriod: buildMatchFn({
1025
- matchPatterns: matchDayPeriodPatterns,
1026
- defaultMatchWidth: "any",
1027
- parsePatterns: parseDayPeriodPatterns,
1028
- defaultParseWidth: "any"
1029
- })
1030
- };
1031
-
1032
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js
1033
- var enUS = {
1034
- code: "en-US",
1035
- formatDistance,
1036
- formatLong,
1037
- formatRelative,
1038
- localize,
1039
- match,
1040
- options: {
1041
- weekStartsOn: 0,
1042
- firstWeekContainsDate: 1
1043
- }
1044
- };
1045
-
1046
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js
1047
- function getDayOfYear(date, options) {
1048
- const _date = toDate(date, options?.in);
1049
- const diff = differenceInCalendarDays(_date, startOfYear(_date));
1050
- const dayOfYear = diff + 1;
1051
- return dayOfYear;
1052
- }
1053
-
1054
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js
1055
- function getISOWeek(date, options) {
1056
- const _date = toDate(date, options?.in);
1057
- const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
1058
- return Math.round(diff / millisecondsInWeek) + 1;
1059
- }
1060
-
1061
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js
1062
- function getWeekYear(date, options) {
1063
- const _date = toDate(date, options?.in);
1064
- const year = _date.getFullYear();
1065
- const defaultOptions2 = getDefaultOptions();
1066
- const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
1067
- const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
1068
- firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
1069
- firstWeekOfNextYear.setHours(0, 0, 0, 0);
1070
- const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
1071
- const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
1072
- firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
1073
- firstWeekOfThisYear.setHours(0, 0, 0, 0);
1074
- const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
1075
- if (+_date >= +startOfNextYear) {
1076
- return year + 1;
1077
- } else if (+_date >= +startOfThisYear) {
1078
- return year;
1079
- } else {
1080
- return year - 1;
1081
- }
1082
- }
1083
-
1084
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js
1085
- function startOfWeekYear(date, options) {
1086
- const defaultOptions2 = getDefaultOptions();
1087
- const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
1088
- const year = getWeekYear(date, options);
1089
- const firstWeek = constructFrom(options?.in || date, 0);
1090
- firstWeek.setFullYear(year, 0, firstWeekContainsDate);
1091
- firstWeek.setHours(0, 0, 0, 0);
1092
- const _date = startOfWeek(firstWeek, options);
1093
- return _date;
1094
- }
1095
-
1096
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js
1097
- function getWeek(date, options) {
1098
- const _date = toDate(date, options?.in);
1099
- const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
1100
- return Math.round(diff / millisecondsInWeek) + 1;
1101
- }
1102
-
1103
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
1104
- function addLeadingZeros(number, targetLength) {
1105
- const sign = number < 0 ? "-" : "";
1106
- const output = Math.abs(number).toString().padStart(targetLength, "0");
1107
- return sign + output;
1108
- }
1109
-
1110
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js
1111
- var lightFormatters = {
1112
- // Year
1113
- y(date, token) {
1114
- const signedYear = date.getFullYear();
1115
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
1116
- return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
1117
- },
1118
- // Month
1119
- M(date, token) {
1120
- const month = date.getMonth();
1121
- return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
1122
- },
1123
- // Day of the month
1124
- d(date, token) {
1125
- return addLeadingZeros(date.getDate(), token.length);
1126
- },
1127
- // AM or PM
1128
- a(date, token) {
1129
- const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
1130
- switch (token) {
1131
- case "a":
1132
- case "aa":
1133
- return dayPeriodEnumValue.toUpperCase();
1134
- case "aaa":
1135
- return dayPeriodEnumValue;
1136
- case "aaaaa":
1137
- return dayPeriodEnumValue[0];
1138
- case "aaaa":
1139
- default:
1140
- return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
1141
- }
1142
- },
1143
- // Hour [1-12]
1144
- h(date, token) {
1145
- return addLeadingZeros(date.getHours() % 12 || 12, token.length);
1146
- },
1147
- // Hour [0-23]
1148
- H(date, token) {
1149
- return addLeadingZeros(date.getHours(), token.length);
1150
- },
1151
- // Minute
1152
- m(date, token) {
1153
- return addLeadingZeros(date.getMinutes(), token.length);
1154
- },
1155
- // Second
1156
- s(date, token) {
1157
- return addLeadingZeros(date.getSeconds(), token.length);
1158
- },
1159
- // Fraction of second
1160
- S(date, token) {
1161
- const numberOfDigits = token.length;
1162
- const milliseconds = date.getMilliseconds();
1163
- const fractionalSeconds = Math.trunc(
1164
- milliseconds * Math.pow(10, numberOfDigits - 3)
1165
- );
1166
- return addLeadingZeros(fractionalSeconds, token.length);
1167
- }
1168
- };
1169
-
1170
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js
1171
- var dayPeriodEnum = {
1172
- midnight: "midnight",
1173
- noon: "noon",
1174
- morning: "morning",
1175
- afternoon: "afternoon",
1176
- evening: "evening",
1177
- night: "night"
1178
- };
1179
- var formatters = {
1180
- // Era
1181
- G: function(date, token, localize2) {
1182
- const era = date.getFullYear() > 0 ? 1 : 0;
1183
- switch (token) {
1184
- // AD, BC
1185
- case "G":
1186
- case "GG":
1187
- case "GGG":
1188
- return localize2.era(era, { width: "abbreviated" });
1189
- // A, B
1190
- case "GGGGG":
1191
- return localize2.era(era, { width: "narrow" });
1192
- // Anno Domini, Before Christ
1193
- case "GGGG":
1194
- default:
1195
- return localize2.era(era, { width: "wide" });
1196
- }
1197
- },
1198
- // Year
1199
- y: function(date, token, localize2) {
1200
- if (token === "yo") {
1201
- const signedYear = date.getFullYear();
1202
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
1203
- return localize2.ordinalNumber(year, { unit: "year" });
1204
- }
1205
- return lightFormatters.y(date, token);
1206
- },
1207
- // Local week-numbering year
1208
- Y: function(date, token, localize2, options) {
1209
- const signedWeekYear = getWeekYear(date, options);
1210
- const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
1211
- if (token === "YY") {
1212
- const twoDigitYear = weekYear % 100;
1213
- return addLeadingZeros(twoDigitYear, 2);
1214
- }
1215
- if (token === "Yo") {
1216
- return localize2.ordinalNumber(weekYear, { unit: "year" });
1217
- }
1218
- return addLeadingZeros(weekYear, token.length);
1219
- },
1220
- // ISO week-numbering year
1221
- R: function(date, token) {
1222
- const isoWeekYear = getISOWeekYear(date);
1223
- return addLeadingZeros(isoWeekYear, token.length);
1224
- },
1225
- // Extended year. This is a single number designating the year of this calendar system.
1226
- // The main difference between `y` and `u` localizers are B.C. years:
1227
- // | Year | `y` | `u` |
1228
- // |------|-----|-----|
1229
- // | AC 1 | 1 | 1 |
1230
- // | BC 1 | 1 | 0 |
1231
- // | BC 2 | 2 | -1 |
1232
- // Also `yy` always returns the last two digits of a year,
1233
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
1234
- u: function(date, token) {
1235
- const year = date.getFullYear();
1236
- return addLeadingZeros(year, token.length);
1237
- },
1238
- // Quarter
1239
- Q: function(date, token, localize2) {
1240
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
1241
- switch (token) {
1242
- // 1, 2, 3, 4
1243
- case "Q":
1244
- return String(quarter);
1245
- // 01, 02, 03, 04
1246
- case "QQ":
1247
- return addLeadingZeros(quarter, 2);
1248
- // 1st, 2nd, 3rd, 4th
1249
- case "Qo":
1250
- return localize2.ordinalNumber(quarter, { unit: "quarter" });
1251
- // Q1, Q2, Q3, Q4
1252
- case "QQQ":
1253
- return localize2.quarter(quarter, {
1254
- width: "abbreviated",
1255
- context: "formatting"
1256
- });
1257
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
1258
- case "QQQQQ":
1259
- return localize2.quarter(quarter, {
1260
- width: "narrow",
1261
- context: "formatting"
1262
- });
1263
- // 1st quarter, 2nd quarter, ...
1264
- case "QQQQ":
1265
- default:
1266
- return localize2.quarter(quarter, {
1267
- width: "wide",
1268
- context: "formatting"
1269
- });
1270
- }
1271
- },
1272
- // Stand-alone quarter
1273
- q: function(date, token, localize2) {
1274
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
1275
- switch (token) {
1276
- // 1, 2, 3, 4
1277
- case "q":
1278
- return String(quarter);
1279
- // 01, 02, 03, 04
1280
- case "qq":
1281
- return addLeadingZeros(quarter, 2);
1282
- // 1st, 2nd, 3rd, 4th
1283
- case "qo":
1284
- return localize2.ordinalNumber(quarter, { unit: "quarter" });
1285
- // Q1, Q2, Q3, Q4
1286
- case "qqq":
1287
- return localize2.quarter(quarter, {
1288
- width: "abbreviated",
1289
- context: "standalone"
1290
- });
1291
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
1292
- case "qqqqq":
1293
- return localize2.quarter(quarter, {
1294
- width: "narrow",
1295
- context: "standalone"
1296
- });
1297
- // 1st quarter, 2nd quarter, ...
1298
- case "qqqq":
1299
- default:
1300
- return localize2.quarter(quarter, {
1301
- width: "wide",
1302
- context: "standalone"
1303
- });
1304
- }
1305
- },
1306
- // Month
1307
- M: function(date, token, localize2) {
1308
- const month = date.getMonth();
1309
- switch (token) {
1310
- case "M":
1311
- case "MM":
1312
- return lightFormatters.M(date, token);
1313
- // 1st, 2nd, ..., 12th
1314
- case "Mo":
1315
- return localize2.ordinalNumber(month + 1, { unit: "month" });
1316
- // Jan, Feb, ..., Dec
1317
- case "MMM":
1318
- return localize2.month(month, {
1319
- width: "abbreviated",
1320
- context: "formatting"
1321
- });
1322
- // J, F, ..., D
1323
- case "MMMMM":
1324
- return localize2.month(month, {
1325
- width: "narrow",
1326
- context: "formatting"
1327
- });
1328
- // January, February, ..., December
1329
- case "MMMM":
1330
- default:
1331
- return localize2.month(month, { width: "wide", context: "formatting" });
1332
- }
1333
- },
1334
- // Stand-alone month
1335
- L: function(date, token, localize2) {
1336
- const month = date.getMonth();
1337
- switch (token) {
1338
- // 1, 2, ..., 12
1339
- case "L":
1340
- return String(month + 1);
1341
- // 01, 02, ..., 12
1342
- case "LL":
1343
- return addLeadingZeros(month + 1, 2);
1344
- // 1st, 2nd, ..., 12th
1345
- case "Lo":
1346
- return localize2.ordinalNumber(month + 1, { unit: "month" });
1347
- // Jan, Feb, ..., Dec
1348
- case "LLL":
1349
- return localize2.month(month, {
1350
- width: "abbreviated",
1351
- context: "standalone"
1352
- });
1353
- // J, F, ..., D
1354
- case "LLLLL":
1355
- return localize2.month(month, {
1356
- width: "narrow",
1357
- context: "standalone"
1358
- });
1359
- // January, February, ..., December
1360
- case "LLLL":
1361
- default:
1362
- return localize2.month(month, { width: "wide", context: "standalone" });
1363
- }
1364
- },
1365
- // Local week of year
1366
- w: function(date, token, localize2, options) {
1367
- const week = getWeek(date, options);
1368
- if (token === "wo") {
1369
- return localize2.ordinalNumber(week, { unit: "week" });
1370
- }
1371
- return addLeadingZeros(week, token.length);
1372
- },
1373
- // ISO week of year
1374
- I: function(date, token, localize2) {
1375
- const isoWeek = getISOWeek(date);
1376
- if (token === "Io") {
1377
- return localize2.ordinalNumber(isoWeek, { unit: "week" });
1378
- }
1379
- return addLeadingZeros(isoWeek, token.length);
1380
- },
1381
- // Day of the month
1382
- d: function(date, token, localize2) {
1383
- if (token === "do") {
1384
- return localize2.ordinalNumber(date.getDate(), { unit: "date" });
1385
- }
1386
- return lightFormatters.d(date, token);
1387
- },
1388
- // Day of year
1389
- D: function(date, token, localize2) {
1390
- const dayOfYear = getDayOfYear(date);
1391
- if (token === "Do") {
1392
- return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
1393
- }
1394
- return addLeadingZeros(dayOfYear, token.length);
1395
- },
1396
- // Day of week
1397
- E: function(date, token, localize2) {
1398
- const dayOfWeek = date.getDay();
1399
- switch (token) {
1400
- // Tue
1401
- case "E":
1402
- case "EE":
1403
- case "EEE":
1404
- return localize2.day(dayOfWeek, {
1405
- width: "abbreviated",
1406
- context: "formatting"
1407
- });
1408
- // T
1409
- case "EEEEE":
1410
- return localize2.day(dayOfWeek, {
1411
- width: "narrow",
1412
- context: "formatting"
1413
- });
1414
- // Tu
1415
- case "EEEEEE":
1416
- return localize2.day(dayOfWeek, {
1417
- width: "short",
1418
- context: "formatting"
1419
- });
1420
- // Tuesday
1421
- case "EEEE":
1422
- default:
1423
- return localize2.day(dayOfWeek, {
1424
- width: "wide",
1425
- context: "formatting"
1426
- });
1427
- }
1428
- },
1429
- // Local day of week
1430
- e: function(date, token, localize2, options) {
1431
- const dayOfWeek = date.getDay();
1432
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1433
- switch (token) {
1434
- // Numerical value (Nth day of week with current locale or weekStartsOn)
1435
- case "e":
1436
- return String(localDayOfWeek);
1437
- // Padded numerical value
1438
- case "ee":
1439
- return addLeadingZeros(localDayOfWeek, 2);
1440
- // 1st, 2nd, ..., 7th
1441
- case "eo":
1442
- return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
1443
- case "eee":
1444
- return localize2.day(dayOfWeek, {
1445
- width: "abbreviated",
1446
- context: "formatting"
1447
- });
1448
- // T
1449
- case "eeeee":
1450
- return localize2.day(dayOfWeek, {
1451
- width: "narrow",
1452
- context: "formatting"
1453
- });
1454
- // Tu
1455
- case "eeeeee":
1456
- return localize2.day(dayOfWeek, {
1457
- width: "short",
1458
- context: "formatting"
1459
- });
1460
- // Tuesday
1461
- case "eeee":
1462
- default:
1463
- return localize2.day(dayOfWeek, {
1464
- width: "wide",
1465
- context: "formatting"
1466
- });
1467
- }
1468
- },
1469
- // Stand-alone local day of week
1470
- c: function(date, token, localize2, options) {
1471
- const dayOfWeek = date.getDay();
1472
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1473
- switch (token) {
1474
- // Numerical value (same as in `e`)
1475
- case "c":
1476
- return String(localDayOfWeek);
1477
- // Padded numerical value
1478
- case "cc":
1479
- return addLeadingZeros(localDayOfWeek, token.length);
1480
- // 1st, 2nd, ..., 7th
1481
- case "co":
1482
- return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
1483
- case "ccc":
1484
- return localize2.day(dayOfWeek, {
1485
- width: "abbreviated",
1486
- context: "standalone"
1487
- });
1488
- // T
1489
- case "ccccc":
1490
- return localize2.day(dayOfWeek, {
1491
- width: "narrow",
1492
- context: "standalone"
1493
- });
1494
- // Tu
1495
- case "cccccc":
1496
- return localize2.day(dayOfWeek, {
1497
- width: "short",
1498
- context: "standalone"
1499
- });
1500
- // Tuesday
1501
- case "cccc":
1502
- default:
1503
- return localize2.day(dayOfWeek, {
1504
- width: "wide",
1505
- context: "standalone"
1506
- });
1507
- }
1508
- },
1509
- // ISO day of week
1510
- i: function(date, token, localize2) {
1511
- const dayOfWeek = date.getDay();
1512
- const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
1513
- switch (token) {
1514
- // 2
1515
- case "i":
1516
- return String(isoDayOfWeek);
1517
- // 02
1518
- case "ii":
1519
- return addLeadingZeros(isoDayOfWeek, token.length);
1520
- // 2nd
1521
- case "io":
1522
- return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
1523
- // Tue
1524
- case "iii":
1525
- return localize2.day(dayOfWeek, {
1526
- width: "abbreviated",
1527
- context: "formatting"
1528
- });
1529
- // T
1530
- case "iiiii":
1531
- return localize2.day(dayOfWeek, {
1532
- width: "narrow",
1533
- context: "formatting"
1534
- });
1535
- // Tu
1536
- case "iiiiii":
1537
- return localize2.day(dayOfWeek, {
1538
- width: "short",
1539
- context: "formatting"
1540
- });
1541
- // Tuesday
1542
- case "iiii":
1543
- default:
1544
- return localize2.day(dayOfWeek, {
1545
- width: "wide",
1546
- context: "formatting"
1547
- });
1548
- }
1549
- },
1550
- // AM or PM
1551
- a: function(date, token, localize2) {
1552
- const hours = date.getHours();
1553
- const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
1554
- switch (token) {
1555
- case "a":
1556
- case "aa":
1557
- return localize2.dayPeriod(dayPeriodEnumValue, {
1558
- width: "abbreviated",
1559
- context: "formatting"
1560
- });
1561
- case "aaa":
1562
- return localize2.dayPeriod(dayPeriodEnumValue, {
1563
- width: "abbreviated",
1564
- context: "formatting"
1565
- }).toLowerCase();
1566
- case "aaaaa":
1567
- return localize2.dayPeriod(dayPeriodEnumValue, {
1568
- width: "narrow",
1569
- context: "formatting"
1570
- });
1571
- case "aaaa":
1572
- default:
1573
- return localize2.dayPeriod(dayPeriodEnumValue, {
1574
- width: "wide",
1575
- context: "formatting"
1576
- });
1577
- }
1578
- },
1579
- // AM, PM, midnight, noon
1580
- b: function(date, token, localize2) {
1581
- const hours = date.getHours();
1582
- let dayPeriodEnumValue;
1583
- if (hours === 12) {
1584
- dayPeriodEnumValue = dayPeriodEnum.noon;
1585
- } else if (hours === 0) {
1586
- dayPeriodEnumValue = dayPeriodEnum.midnight;
1587
- } else {
1588
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
1589
- }
1590
- switch (token) {
1591
- case "b":
1592
- case "bb":
1593
- return localize2.dayPeriod(dayPeriodEnumValue, {
1594
- width: "abbreviated",
1595
- context: "formatting"
1596
- });
1597
- case "bbb":
1598
- return localize2.dayPeriod(dayPeriodEnumValue, {
1599
- width: "abbreviated",
1600
- context: "formatting"
1601
- }).toLowerCase();
1602
- case "bbbbb":
1603
- return localize2.dayPeriod(dayPeriodEnumValue, {
1604
- width: "narrow",
1605
- context: "formatting"
1606
- });
1607
- case "bbbb":
1608
- default:
1609
- return localize2.dayPeriod(dayPeriodEnumValue, {
1610
- width: "wide",
1611
- context: "formatting"
1612
- });
1613
- }
1614
- },
1615
- // in the morning, in the afternoon, in the evening, at night
1616
- B: function(date, token, localize2) {
1617
- const hours = date.getHours();
1618
- let dayPeriodEnumValue;
1619
- if (hours >= 17) {
1620
- dayPeriodEnumValue = dayPeriodEnum.evening;
1621
- } else if (hours >= 12) {
1622
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
1623
- } else if (hours >= 4) {
1624
- dayPeriodEnumValue = dayPeriodEnum.morning;
1625
- } else {
1626
- dayPeriodEnumValue = dayPeriodEnum.night;
1627
- }
1628
- switch (token) {
1629
- case "B":
1630
- case "BB":
1631
- case "BBB":
1632
- return localize2.dayPeriod(dayPeriodEnumValue, {
1633
- width: "abbreviated",
1634
- context: "formatting"
1635
- });
1636
- case "BBBBB":
1637
- return localize2.dayPeriod(dayPeriodEnumValue, {
1638
- width: "narrow",
1639
- context: "formatting"
1640
- });
1641
- case "BBBB":
1642
- default:
1643
- return localize2.dayPeriod(dayPeriodEnumValue, {
1644
- width: "wide",
1645
- context: "formatting"
1646
- });
1647
- }
1648
- },
1649
- // Hour [1-12]
1650
- h: function(date, token, localize2) {
1651
- if (token === "ho") {
1652
- let hours = date.getHours() % 12;
1653
- if (hours === 0) hours = 12;
1654
- return localize2.ordinalNumber(hours, { unit: "hour" });
1655
- }
1656
- return lightFormatters.h(date, token);
1657
- },
1658
- // Hour [0-23]
1659
- H: function(date, token, localize2) {
1660
- if (token === "Ho") {
1661
- return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
1662
- }
1663
- return lightFormatters.H(date, token);
1664
- },
1665
- // Hour [0-11]
1666
- K: function(date, token, localize2) {
1667
- const hours = date.getHours() % 12;
1668
- if (token === "Ko") {
1669
- return localize2.ordinalNumber(hours, { unit: "hour" });
1670
- }
1671
- return addLeadingZeros(hours, token.length);
1672
- },
1673
- // Hour [1-24]
1674
- k: function(date, token, localize2) {
1675
- let hours = date.getHours();
1676
- if (hours === 0) hours = 24;
1677
- if (token === "ko") {
1678
- return localize2.ordinalNumber(hours, { unit: "hour" });
1679
- }
1680
- return addLeadingZeros(hours, token.length);
1681
- },
1682
- // Minute
1683
- m: function(date, token, localize2) {
1684
- if (token === "mo") {
1685
- return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
1686
- }
1687
- return lightFormatters.m(date, token);
1688
- },
1689
- // Second
1690
- s: function(date, token, localize2) {
1691
- if (token === "so") {
1692
- return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
1693
- }
1694
- return lightFormatters.s(date, token);
1695
- },
1696
- // Fraction of second
1697
- S: function(date, token) {
1698
- return lightFormatters.S(date, token);
1699
- },
1700
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1701
- X: function(date, token, _localize) {
1702
- const timezoneOffset = date.getTimezoneOffset();
1703
- if (timezoneOffset === 0) {
1704
- return "Z";
1705
- }
1706
- switch (token) {
1707
- // Hours and optional minutes
1708
- case "X":
1709
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
1710
- // Hours, minutes and optional seconds without `:` delimiter
1711
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1712
- // so this token always has the same output as `XX`
1713
- case "XXXX":
1714
- case "XX":
1715
- return formatTimezone(timezoneOffset);
1716
- // Hours, minutes and optional seconds with `:` delimiter
1717
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1718
- // so this token always has the same output as `XXX`
1719
- case "XXXXX":
1720
- case "XXX":
1721
- // Hours and minutes with `:` delimiter
1722
- default:
1723
- return formatTimezone(timezoneOffset, ":");
1724
- }
1725
- },
1726
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1727
- x: function(date, token, _localize) {
1728
- const timezoneOffset = date.getTimezoneOffset();
1729
- switch (token) {
1730
- // Hours and optional minutes
1731
- case "x":
1732
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
1733
- // Hours, minutes and optional seconds without `:` delimiter
1734
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1735
- // so this token always has the same output as `xx`
1736
- case "xxxx":
1737
- case "xx":
1738
- return formatTimezone(timezoneOffset);
1739
- // Hours, minutes and optional seconds with `:` delimiter
1740
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1741
- // so this token always has the same output as `xxx`
1742
- case "xxxxx":
1743
- case "xxx":
1744
- // Hours and minutes with `:` delimiter
1745
- default:
1746
- return formatTimezone(timezoneOffset, ":");
1747
- }
1748
- },
1749
- // Timezone (GMT)
1750
- O: function(date, token, _localize) {
1751
- const timezoneOffset = date.getTimezoneOffset();
1752
- switch (token) {
1753
- // Short
1754
- case "O":
1755
- case "OO":
1756
- case "OOO":
1757
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
1758
- // Long
1759
- case "OOOO":
1760
- default:
1761
- return "GMT" + formatTimezone(timezoneOffset, ":");
1762
- }
1763
- },
1764
- // Timezone (specific non-location)
1765
- z: function(date, token, _localize) {
1766
- const timezoneOffset = date.getTimezoneOffset();
1767
- switch (token) {
1768
- // Short
1769
- case "z":
1770
- case "zz":
1771
- case "zzz":
1772
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
1773
- // Long
1774
- case "zzzz":
1775
- default:
1776
- return "GMT" + formatTimezone(timezoneOffset, ":");
1777
- }
1778
- },
1779
- // Seconds timestamp
1780
- t: function(date, token, _localize) {
1781
- const timestamp = Math.trunc(+date / 1e3);
1782
- return addLeadingZeros(timestamp, token.length);
1783
- },
1784
- // Milliseconds timestamp
1785
- T: function(date, token, _localize) {
1786
- return addLeadingZeros(+date, token.length);
1787
- }
1788
- };
1789
- function formatTimezoneShort(offset, delimiter = "") {
1790
- const sign = offset > 0 ? "-" : "+";
1791
- const absOffset = Math.abs(offset);
1792
- const hours = Math.trunc(absOffset / 60);
1793
- const minutes = absOffset % 60;
1794
- if (minutes === 0) {
1795
- return sign + String(hours);
1796
- }
1797
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1798
- }
1799
- function formatTimezoneWithOptionalMinutes(offset, delimiter) {
1800
- if (offset % 60 === 0) {
1801
- const sign = offset > 0 ? "-" : "+";
1802
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
1803
- }
1804
- return formatTimezone(offset, delimiter);
1805
- }
1806
- function formatTimezone(offset, delimiter = "") {
1807
- const sign = offset > 0 ? "-" : "+";
1808
- const absOffset = Math.abs(offset);
1809
- const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
1810
- const minutes = addLeadingZeros(absOffset % 60, 2);
1811
- return sign + hours + delimiter + minutes;
1812
- }
1813
-
1814
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js
1815
- var dateLongFormatter = (pattern, formatLong2) => {
1816
- switch (pattern) {
1817
- case "P":
1818
- return formatLong2.date({ width: "short" });
1819
- case "PP":
1820
- return formatLong2.date({ width: "medium" });
1821
- case "PPP":
1822
- return formatLong2.date({ width: "long" });
1823
- case "PPPP":
1824
- default:
1825
- return formatLong2.date({ width: "full" });
1826
- }
1827
- };
1828
- var timeLongFormatter = (pattern, formatLong2) => {
1829
- switch (pattern) {
1830
- case "p":
1831
- return formatLong2.time({ width: "short" });
1832
- case "pp":
1833
- return formatLong2.time({ width: "medium" });
1834
- case "ppp":
1835
- return formatLong2.time({ width: "long" });
1836
- case "pppp":
1837
- default:
1838
- return formatLong2.time({ width: "full" });
1839
- }
1840
- };
1841
- var dateTimeLongFormatter = (pattern, formatLong2) => {
1842
- const matchResult = pattern.match(/(P+)(p+)?/) || [];
1843
- const datePattern = matchResult[1];
1844
- const timePattern = matchResult[2];
1845
- if (!timePattern) {
1846
- return dateLongFormatter(pattern, formatLong2);
1847
- }
1848
- let dateTimeFormat;
1849
- switch (datePattern) {
1850
- case "P":
1851
- dateTimeFormat = formatLong2.dateTime({ width: "short" });
1852
- break;
1853
- case "PP":
1854
- dateTimeFormat = formatLong2.dateTime({ width: "medium" });
1855
- break;
1856
- case "PPP":
1857
- dateTimeFormat = formatLong2.dateTime({ width: "long" });
1858
- break;
1859
- case "PPPP":
1860
- default:
1861
- dateTimeFormat = formatLong2.dateTime({ width: "full" });
1862
- break;
1863
- }
1864
- return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
1865
- };
1866
- var longFormatters = {
1867
- p: timeLongFormatter,
1868
- P: dateTimeLongFormatter
1869
- };
1870
-
1871
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js
1872
- var dayOfYearTokenRE = /^D+$/;
1873
- var weekYearTokenRE = /^Y+$/;
1874
- var throwTokens = ["D", "DD", "YY", "YYYY"];
1875
- function isProtectedDayOfYearToken(token) {
1876
- return dayOfYearTokenRE.test(token);
1877
- }
1878
- function isProtectedWeekYearToken(token) {
1879
- return weekYearTokenRE.test(token);
1880
- }
1881
- function warnOrThrowProtectedError(token, format2, input) {
1882
- const _message = message(token, format2, input);
1883
- console.warn(_message);
1884
- if (throwTokens.includes(token)) throw new RangeError(_message);
1885
- }
1886
- function message(token, format2, input) {
1887
- const subject = token[0] === "Y" ? "years" : "days of the month";
1888
- return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1889
- }
1890
-
1891
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js
1892
- var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
1893
- var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
1894
- var escapedStringRegExp = /^'([^]*?)'?$/;
1895
- var doubleQuoteRegExp = /''/g;
1896
- var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
1897
- function format(date, formatStr, options) {
1898
- const defaultOptions2 = getDefaultOptions();
1899
- const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
1900
- const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
1901
- const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
1902
- const originalDate = toDate(date, options?.in);
1903
- if (!isValid(originalDate)) {
1904
- throw new RangeError("Invalid time value");
1905
- }
1906
- let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
1907
- const firstCharacter = substring[0];
1908
- if (firstCharacter === "p" || firstCharacter === "P") {
1909
- const longFormatter = longFormatters[firstCharacter];
1910
- return longFormatter(substring, locale.formatLong);
1911
- }
1912
- return substring;
1913
- }).join("").match(formattingTokensRegExp).map((substring) => {
1914
- if (substring === "''") {
1915
- return { isToken: false, value: "'" };
1916
- }
1917
- const firstCharacter = substring[0];
1918
- if (firstCharacter === "'") {
1919
- return { isToken: false, value: cleanEscapedString(substring) };
1920
- }
1921
- if (formatters[firstCharacter]) {
1922
- return { isToken: true, value: substring };
1923
- }
1924
- if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
1925
- throw new RangeError(
1926
- "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
1927
- );
1928
- }
1929
- return { isToken: false, value: substring };
1930
- });
1931
- if (locale.localize.preprocessor) {
1932
- parts = locale.localize.preprocessor(originalDate, parts);
1933
- }
1934
- const formatterOptions = {
1935
- firstWeekContainsDate,
1936
- weekStartsOn,
1937
- locale
1938
- };
1939
- return parts.map((part) => {
1940
- if (!part.isToken) return part.value;
1941
- const token = part.value;
1942
- if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
1943
- warnOrThrowProtectedError(token, formatStr, String(date));
1944
- }
1945
- const formatter = formatters[token[0]];
1946
- return formatter(originalDate, token, locale.localize, formatterOptions);
1947
- }).join("");
1948
- }
1949
- function cleanEscapedString(input) {
1950
- const matched = input.match(escapedStringRegExp);
1951
- if (!matched) {
1952
- return input;
1953
- }
1954
- return matched[1].replace(doubleQuoteRegExp, "'");
1955
- }
1956
-
1957
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDaysInMonth.js
1958
- function getDaysInMonth(date, options) {
1959
- const _date = toDate(date, options?.in);
1960
- const year = _date.getFullYear();
1961
- const monthIndex = _date.getMonth();
1962
- const lastDayOfMonth = constructFrom(_date, 0);
1963
- lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
1964
- lastDayOfMonth.setHours(0, 0, 0, 0);
1965
- return lastDayOfMonth.getDate();
1966
- }
1967
-
1968
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getMonth.js
1969
- function getMonth(date, options) {
1970
- return toDate(date, options?.in).getMonth();
1971
- }
1972
-
1973
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getYear.js
1974
- function getYear(date, options) {
1975
- return toDate(date, options?.in).getFullYear();
1976
- }
1977
-
1978
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isAfter.js
1979
- function isAfter(date, dateToCompare) {
1980
- return +toDate(date) > +toDate(dateToCompare);
1981
- }
1982
-
1983
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isBefore.js
1984
- function isBefore(date, dateToCompare) {
1985
- return +toDate(date) < +toDate(dateToCompare);
1986
- }
1987
-
1988
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameMonth.js
1989
- function isSameMonth(laterDate, earlierDate, options) {
1990
- const [laterDate_, earlierDate_] = normalizeDates(
1991
- options?.in,
1992
- laterDate,
1993
- earlierDate
1994
- );
1995
- return laterDate_.getFullYear() === earlierDate_.getFullYear() && laterDate_.getMonth() === earlierDate_.getMonth();
1996
- }
1997
-
1998
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameYear.js
1999
- function isSameYear(laterDate, earlierDate, options) {
2000
- const [laterDate_, earlierDate_] = normalizeDates(
2001
- options?.in,
2002
- laterDate,
2003
- earlierDate
2004
- );
2005
- return laterDate_.getFullYear() === earlierDate_.getFullYear();
2006
- }
2007
-
2008
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setMonth.js
2009
- function setMonth(date, month, options) {
2010
- const _date = toDate(date, options?.in);
2011
- const year = _date.getFullYear();
2012
- const day = _date.getDate();
2013
- const midMonth = constructFrom(date, 0);
2014
- midMonth.setFullYear(year, month, 15);
2015
- midMonth.setHours(0, 0, 0, 0);
2016
- const daysInMonth = getDaysInMonth(midMonth);
2017
- _date.setMonth(month, Math.min(day, daysInMonth));
2018
- return _date;
2019
- }
2020
-
2021
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setYear.js
2022
- function setYear(date, year, options) {
2023
- const date_ = toDate(date, options?.in);
2024
- if (isNaN(+date_)) return constructFrom(date, NaN);
2025
- date_.setFullYear(year);
2026
- return date_;
2027
- }
2028
-
2029
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js
2030
- var FIVE_WEEKS = 5;
2031
- var FOUR_WEEKS = 4;
2032
- function getBroadcastWeeksInMonth(month, dateLib) {
2033
- const firstDayOfMonth = dateLib.startOfMonth(month);
2034
- const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;
2035
- const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);
2036
- const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);
2037
- const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek) ? FIVE_WEEKS : FOUR_WEEKS;
2038
- return numberOfWeeks;
2039
- }
2040
-
2041
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js
2042
- function startOfBroadcastWeek(date, dateLib) {
2043
- const firstOfMonth = dateLib.startOfMonth(date);
2044
- const dayOfWeek = firstOfMonth.getDay();
2045
- if (dayOfWeek === 1) {
2046
- return firstOfMonth;
2047
- } else if (dayOfWeek === 0) {
2048
- return dateLib.addDays(firstOfMonth, -1 * 6);
2049
- } else {
2050
- return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));
2051
- }
2052
- }
2053
-
2054
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js
2055
- function endOfBroadcastWeek(date, dateLib) {
2056
- const startDate = startOfBroadcastWeek(date, dateLib);
2057
- const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);
2058
- const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
2059
- return endDate;
2060
- }
2061
-
2062
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/locale/en-US.js
2063
- var enUS2 = {
2064
- ...enUS,
2065
- labels: {
2066
- labelDayButton: (date, modifiers, options, dateLib) => {
2067
- let formatDate;
2068
- if (dateLib && typeof dateLib.format === "function") {
2069
- formatDate = dateLib.format.bind(dateLib);
2070
- } else {
2071
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
2072
- }
2073
- let label = formatDate(date, "PPPP");
2074
- if (modifiers.today)
2075
- label = `Today, ${label}`;
2076
- if (modifiers.selected)
2077
- label = `${label}, selected`;
2078
- return label;
2079
- },
2080
- labelMonthDropdown: "Choose the Month",
2081
- labelNext: "Go to the Next Month",
2082
- labelPrevious: "Go to the Previous Month",
2083
- labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
2084
- labelYearDropdown: "Choose the Year",
2085
- labelGrid: (date, options, dateLib) => {
2086
- let formatDate;
2087
- if (dateLib && typeof dateLib.format === "function") {
2088
- formatDate = dateLib.format.bind(dateLib);
2089
- } else {
2090
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
2091
- }
2092
- return formatDate(date, "LLLL yyyy");
2093
- },
2094
- labelGridcell: (date, modifiers, options, dateLib) => {
2095
- let formatDate;
2096
- if (dateLib && typeof dateLib.format === "function") {
2097
- formatDate = dateLib.format.bind(dateLib);
2098
- } else {
2099
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
2100
- }
2101
- let label = formatDate(date, "PPPP");
2102
- if (modifiers?.today) {
2103
- label = `Today, ${label}`;
2104
- }
2105
- return label;
2106
- },
2107
- labelNav: "Navigation bar",
2108
- labelWeekNumberHeader: "Week Number",
2109
- labelWeekday: (date, options, dateLib) => {
2110
- let formatDate;
2111
- if (dateLib && typeof dateLib.format === "function") {
2112
- formatDate = dateLib.format.bind(dateLib);
2113
- } else {
2114
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
2115
- }
2116
- return formatDate(date, "cccc");
2117
- }
2118
- }
2119
- };
2120
-
2121
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/classes/DateLib.js
2122
- var DateLib = class _DateLib {
2123
- /**
2124
- * Creates an instance of `DateLib`.
2125
- *
2126
- * @param options Configuration options for the date library.
2127
- * @param overrides Custom overrides for the date library functions.
2128
- */
2129
- constructor(options, overrides) {
2130
- this.today = () => {
2131
- if (this.overrides?.today) {
2132
- return this.overrides.today();
2133
- }
2134
- if (this.options.timeZone) {
2135
- return TZDate.tz(this.options.timeZone);
2136
- }
2137
- const DateCtor = this.options.Date ?? Date;
2138
- return new DateCtor();
2139
- };
2140
- this.newDate = (year, monthIndex, date) => {
2141
- if (this.overrides?.newDate) {
2142
- return this.overrides.newDate(year, monthIndex, date);
2143
- }
2144
- if (this.options.timeZone) {
2145
- return new TZDate(year, monthIndex, date, this.options.timeZone);
2146
- }
2147
- return new Date(year, monthIndex, date);
2148
- };
2149
- this.addDays = (date, amount) => {
2150
- return this.overrides?.addDays ? this.overrides.addDays(date, amount) : addDays(date, amount);
2151
- };
2152
- this.addMonths = (date, amount) => {
2153
- return this.overrides?.addMonths ? this.overrides.addMonths(date, amount) : addMonths(date, amount);
2154
- };
2155
- this.addWeeks = (date, amount) => {
2156
- return this.overrides?.addWeeks ? this.overrides.addWeeks(date, amount) : addWeeks(date, amount);
2157
- };
2158
- this.addYears = (date, amount) => {
2159
- return this.overrides?.addYears ? this.overrides.addYears(date, amount) : addYears(date, amount);
2160
- };
2161
- this.differenceInCalendarDays = (dateLeft, dateRight) => {
2162
- return this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(dateLeft, dateRight) : differenceInCalendarDays(dateLeft, dateRight);
2163
- };
2164
- this.differenceInCalendarMonths = (dateLeft, dateRight) => {
2165
- return this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(dateLeft, dateRight) : differenceInCalendarMonths(dateLeft, dateRight);
2166
- };
2167
- this.eachMonthOfInterval = (interval) => {
2168
- return this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
2169
- };
2170
- this.eachYearOfInterval = (interval) => {
2171
- const years = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
2172
- const uniqueYears = new Set(years.map((d) => this.getYear(d)));
2173
- if (uniqueYears.size === years.length) {
2174
- return years;
2175
- }
2176
- const yearsArray = [];
2177
- uniqueYears.forEach((y) => {
2178
- yearsArray.push(new Date(y, 0, 1));
2179
- });
2180
- return yearsArray;
2181
- };
2182
- this.endOfBroadcastWeek = (date) => {
2183
- return this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
2184
- };
2185
- this.endOfISOWeek = (date) => {
2186
- return this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(date) : endOfISOWeek(date);
2187
- };
2188
- this.endOfMonth = (date) => {
2189
- return this.overrides?.endOfMonth ? this.overrides.endOfMonth(date) : endOfMonth(date);
2190
- };
2191
- this.endOfWeek = (date, options2) => {
2192
- return this.overrides?.endOfWeek ? this.overrides.endOfWeek(date, options2) : endOfWeek(date, this.options);
2193
- };
2194
- this.endOfYear = (date) => {
2195
- return this.overrides?.endOfYear ? this.overrides.endOfYear(date) : endOfYear(date);
2196
- };
2197
- this.format = (date, formatStr, _options) => {
2198
- const formatted = this.overrides?.format ? this.overrides.format(date, formatStr, this.options) : format(date, formatStr, this.options);
2199
- if (this.options.numerals && this.options.numerals !== "latn") {
2200
- return this.replaceDigits(formatted);
2201
- }
2202
- return formatted;
2203
- };
2204
- this.getISOWeek = (date) => {
2205
- return this.overrides?.getISOWeek ? this.overrides.getISOWeek(date) : getISOWeek(date);
2206
- };
2207
- this.getMonth = (date, _options) => {
2208
- return this.overrides?.getMonth ? this.overrides.getMonth(date, this.options) : getMonth(date, this.options);
2209
- };
2210
- this.getYear = (date, _options) => {
2211
- return this.overrides?.getYear ? this.overrides.getYear(date, this.options) : getYear(date, this.options);
2212
- };
2213
- this.getWeek = (date, _options) => {
2214
- return this.overrides?.getWeek ? this.overrides.getWeek(date, this.options) : getWeek(date, this.options);
2215
- };
2216
- this.isAfter = (date, dateToCompare) => {
2217
- return this.overrides?.isAfter ? this.overrides.isAfter(date, dateToCompare) : isAfter(date, dateToCompare);
2218
- };
2219
- this.isBefore = (date, dateToCompare) => {
2220
- return this.overrides?.isBefore ? this.overrides.isBefore(date, dateToCompare) : isBefore(date, dateToCompare);
2221
- };
2222
- this.isDate = (value) => {
2223
- return this.overrides?.isDate ? this.overrides.isDate(value) : isDate(value);
2224
- };
2225
- this.isSameDay = (dateLeft, dateRight) => {
2226
- return this.overrides?.isSameDay ? this.overrides.isSameDay(dateLeft, dateRight) : isSameDay(dateLeft, dateRight);
2227
- };
2228
- this.isSameMonth = (dateLeft, dateRight) => {
2229
- return this.overrides?.isSameMonth ? this.overrides.isSameMonth(dateLeft, dateRight) : isSameMonth(dateLeft, dateRight);
2230
- };
2231
- this.isSameYear = (dateLeft, dateRight) => {
2232
- return this.overrides?.isSameYear ? this.overrides.isSameYear(dateLeft, dateRight) : isSameYear(dateLeft, dateRight);
2233
- };
2234
- this.max = (dates) => {
2235
- return this.overrides?.max ? this.overrides.max(dates) : max(dates);
2236
- };
2237
- this.min = (dates) => {
2238
- return this.overrides?.min ? this.overrides.min(dates) : min(dates);
2239
- };
2240
- this.setMonth = (date, month) => {
2241
- return this.overrides?.setMonth ? this.overrides.setMonth(date, month) : setMonth(date, month);
2242
- };
2243
- this.setYear = (date, year) => {
2244
- return this.overrides?.setYear ? this.overrides.setYear(date, year) : setYear(date, year);
2245
- };
2246
- this.startOfBroadcastWeek = (date, _dateLib) => {
2247
- return this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(date, this) : startOfBroadcastWeek(date, this);
2248
- };
2249
- this.startOfDay = (date) => {
2250
- return this.overrides?.startOfDay ? this.overrides.startOfDay(date) : startOfDay(date);
2251
- };
2252
- this.startOfISOWeek = (date) => {
2253
- return this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(date) : startOfISOWeek(date);
2254
- };
2255
- this.startOfMonth = (date) => {
2256
- return this.overrides?.startOfMonth ? this.overrides.startOfMonth(date) : startOfMonth(date);
2257
- };
2258
- this.startOfWeek = (date, _options) => {
2259
- return this.overrides?.startOfWeek ? this.overrides.startOfWeek(date, this.options) : startOfWeek(date, this.options);
2260
- };
2261
- this.startOfYear = (date) => {
2262
- return this.overrides?.startOfYear ? this.overrides.startOfYear(date) : startOfYear(date);
2263
- };
2264
- this.options = { locale: enUS2, ...options };
2265
- this.overrides = overrides;
2266
- }
2267
- /**
2268
- * Generates a mapping of Arabic digits (0-9) to the target numbering system
2269
- * digits.
2270
- *
2271
- * @since 9.5.0
2272
- * @returns A record mapping Arabic digits to the target numerals.
2273
- */
2274
- getDigitMap() {
2275
- const { numerals = "latn" } = this.options;
2276
- const formatter = new Intl.NumberFormat("en-US", {
2277
- numberingSystem: numerals
2278
- });
2279
- const digitMap = {};
2280
- for (let i = 0; i < 10; i++) {
2281
- digitMap[i.toString()] = formatter.format(i);
2282
- }
2283
- return digitMap;
2284
- }
2285
- /**
2286
- * Replaces Arabic digits in a string with the target numbering system digits.
2287
- *
2288
- * @since 9.5.0
2289
- * @param input The string containing Arabic digits.
2290
- * @returns The string with digits replaced.
2291
- */
2292
- replaceDigits(input) {
2293
- const digitMap = this.getDigitMap();
2294
- return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
2295
- }
2296
- /**
2297
- * Formats a number using the configured numbering system.
2298
- *
2299
- * @since 9.5.0
2300
- * @param value The number to format.
2301
- * @returns The formatted number as a string.
2302
- */
2303
- formatNumber(value) {
2304
- return this.replaceDigits(value.toString());
2305
- }
2306
- /**
2307
- * Returns the preferred ordering for month and year labels for the current
2308
- * locale.
2309
- */
2310
- getMonthYearOrder() {
2311
- const code = this.options.locale?.code;
2312
- if (!code) {
2313
- return "month-first";
2314
- }
2315
- return _DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
2316
- }
2317
- /**
2318
- * Formats the month/year pair respecting locale conventions.
2319
- *
2320
- * @since 9.11.0
2321
- */
2322
- formatMonthYear(date) {
2323
- const { locale, timeZone, numerals } = this.options;
2324
- const localeCode = locale?.code;
2325
- if (localeCode && _DateLib.yearFirstLocales.has(localeCode)) {
2326
- try {
2327
- const intl = new Intl.DateTimeFormat(localeCode, {
2328
- month: "long",
2329
- year: "numeric",
2330
- timeZone,
2331
- numberingSystem: numerals
2332
- });
2333
- const formatted = intl.format(date);
2334
- return formatted;
2335
- } catch {
2336
- }
2337
- }
2338
- const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
2339
- return this.format(date, pattern);
2340
- }
2341
- };
2342
- DateLib.yearFirstLocales = /* @__PURE__ */ new Set([
2343
- "eu",
2344
- "hu",
2345
- "ja",
2346
- "ja-Hira",
2347
- "ja-JP",
2348
- "ko",
2349
- "ko-KR",
2350
- "lt",
2351
- "lt-LT",
2352
- "lv",
2353
- "lv-LV",
2354
- "mn",
2355
- "mn-MN",
2356
- "zh",
2357
- "zh-CN",
2358
- "zh-HK",
2359
- "zh-TW"
2360
- ]);
2361
- var defaultDateLib = new DateLib();
2362
-
2363
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
2364
- var CalendarDay = class {
2365
- constructor(date, displayMonth, dateLib = defaultDateLib) {
2366
- this.date = date;
2367
- this.displayMonth = displayMonth;
2368
- this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
2369
- this.dateLib = dateLib;
2370
- this.isoDate = dateLib.format(date, "yyyy-MM-dd");
2371
- this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
2372
- this.dateMonthId = dateLib.format(date, "yyyy-MM");
2373
- }
2374
- /**
2375
- * Checks if this day is equal to another `CalendarDay`, considering both the
2376
- * date and the displayed month.
2377
- *
2378
- * @param day The `CalendarDay` to compare with.
2379
- * @returns `true` if the days are equal, otherwise `false`.
2380
- */
2381
- isEqualTo(day) {
2382
- return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
2383
- }
2384
- };
2385
-
2386
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
2387
- var CalendarMonth = class {
2388
- constructor(month, weeks) {
2389
- this.date = month;
2390
- this.weeks = weeks;
2391
- }
2392
- };
2393
-
2394
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
2395
- var CalendarWeek = class {
2396
- constructor(weekNumber, days) {
2397
- this.days = days;
2398
- this.weekNumber = weekNumber;
2399
- }
2400
- };
2401
-
2402
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/components/custom-components.js
2403
- var custom_components_exports = {};
2404
- __export(custom_components_exports, {
2405
- CaptionLabel: () => CaptionLabel,
2406
- Chevron: () => Chevron,
2407
- Day: () => Day,
2408
- DayButton: () => DayButton,
2409
- Dropdown: () => Dropdown,
2410
- DropdownNav: () => DropdownNav,
2411
- Footer: () => Footer,
2412
- Month: () => Month,
2413
- MonthCaption: () => MonthCaption,
2414
- MonthGrid: () => MonthGrid,
2415
- Months: () => Months,
2416
- MonthsDropdown: () => MonthsDropdown,
2417
- Nav: () => Nav,
2418
- NextMonthButton: () => NextMonthButton,
2419
- Option: () => Option,
2420
- PreviousMonthButton: () => PreviousMonthButton,
2421
- Root: () => Root,
2422
- Select: () => Select,
2423
- Week: () => Week,
2424
- WeekNumber: () => WeekNumber,
2425
- WeekNumberHeader: () => WeekNumberHeader,
2426
- Weekday: () => Weekday,
2427
- Weekdays: () => Weekdays,
2428
- Weeks: () => Weeks,
2429
- YearsDropdown: () => YearsDropdown
2430
- });
2431
- function CaptionLabel(props) {
2432
- return React26.createElement("span", { ...props });
2433
- }
2434
- function Chevron(props) {
2435
- const { size = 24, orientation = "left", className, style } = props;
2436
- return React26.createElement(
2437
- "svg",
2438
- { className, style, width: size, height: size, viewBox: "0 0 24 24" },
2439
- orientation === "up" && React26.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
2440
- orientation === "down" && React26.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
2441
- orientation === "left" && React26.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
2442
- orientation === "right" && React26.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
2443
- );
2444
- }
2445
- function Day(props) {
2446
- const { day, modifiers, ...tdProps } = props;
2447
- return React26.createElement("td", { ...tdProps });
2448
- }
2449
- function DayButton(props) {
2450
- const { day, modifiers, ...buttonProps } = props;
2451
- const ref = React26.useRef(null);
2452
- React26.useEffect(() => {
2453
- if (modifiers.focused)
2454
- ref.current?.focus();
2455
- }, [modifiers.focused]);
2456
- return React26.createElement("button", { ref, ...buttonProps });
2457
- }
2458
-
2459
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/UI.js
2460
- var UI;
2461
- (function(UI2) {
2462
- UI2["Root"] = "root";
2463
- UI2["Chevron"] = "chevron";
2464
- UI2["Day"] = "day";
2465
- UI2["DayButton"] = "day_button";
2466
- UI2["CaptionLabel"] = "caption_label";
2467
- UI2["Dropdowns"] = "dropdowns";
2468
- UI2["Dropdown"] = "dropdown";
2469
- UI2["DropdownRoot"] = "dropdown_root";
2470
- UI2["Footer"] = "footer";
2471
- UI2["MonthGrid"] = "month_grid";
2472
- UI2["MonthCaption"] = "month_caption";
2473
- UI2["MonthsDropdown"] = "months_dropdown";
2474
- UI2["Month"] = "month";
2475
- UI2["Months"] = "months";
2476
- UI2["Nav"] = "nav";
2477
- UI2["NextMonthButton"] = "button_next";
2478
- UI2["PreviousMonthButton"] = "button_previous";
2479
- UI2["Week"] = "week";
2480
- UI2["Weeks"] = "weeks";
2481
- UI2["Weekday"] = "weekday";
2482
- UI2["Weekdays"] = "weekdays";
2483
- UI2["WeekNumber"] = "week_number";
2484
- UI2["WeekNumberHeader"] = "week_number_header";
2485
- UI2["YearsDropdown"] = "years_dropdown";
2486
- })(UI || (UI = {}));
2487
- var DayFlag;
2488
- (function(DayFlag2) {
2489
- DayFlag2["disabled"] = "disabled";
2490
- DayFlag2["hidden"] = "hidden";
2491
- DayFlag2["outside"] = "outside";
2492
- DayFlag2["focused"] = "focused";
2493
- DayFlag2["today"] = "today";
2494
- })(DayFlag || (DayFlag = {}));
2495
- var SelectionState;
2496
- (function(SelectionState2) {
2497
- SelectionState2["range_end"] = "range_end";
2498
- SelectionState2["range_middle"] = "range_middle";
2499
- SelectionState2["range_start"] = "range_start";
2500
- SelectionState2["selected"] = "selected";
2501
- })(SelectionState || (SelectionState = {}));
2502
- var Animation;
2503
- (function(Animation2) {
2504
- Animation2["weeks_before_enter"] = "weeks_before_enter";
2505
- Animation2["weeks_before_exit"] = "weeks_before_exit";
2506
- Animation2["weeks_after_enter"] = "weeks_after_enter";
2507
- Animation2["weeks_after_exit"] = "weeks_after_exit";
2508
- Animation2["caption_after_enter"] = "caption_after_enter";
2509
- Animation2["caption_after_exit"] = "caption_after_exit";
2510
- Animation2["caption_before_enter"] = "caption_before_enter";
2511
- Animation2["caption_before_exit"] = "caption_before_exit";
2512
- })(Animation || (Animation = {}));
2513
- var dayPickerContext = createContext(void 0);
2514
- function useDayPicker() {
2515
- const context = useContext(dayPickerContext);
2516
- if (context === void 0) {
2517
- throw new Error("useDayPicker() must be used within a custom component.");
2518
- }
2519
- return context;
2520
- }
2521
-
2522
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/components/Dropdown.js
2523
- function Dropdown(props) {
2524
- const { options, className, ...selectProps } = props;
2525
- const { classNames, components, styles } = useDayPicker();
2526
- const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
2527
- const selectedOption = options?.find(({ value }) => value === selectProps.value);
2528
- return React26.createElement(
2529
- "span",
2530
- { "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot], style: styles?.[UI.DropdownRoot] },
2531
- React26.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => React26.createElement(components.Option, { key: value, value, disabled }, label))),
2532
- React26.createElement(
2533
- "span",
2534
- { className: classNames[UI.CaptionLabel], style: styles?.[UI.CaptionLabel], "aria-hidden": true },
2535
- selectedOption?.label,
2536
- React26.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron], style: styles?.[UI.Chevron] })
2537
- )
2538
- );
2539
- }
2540
- function DropdownNav(props) {
2541
- return React26.createElement("div", { ...props });
2542
- }
2543
- function Footer(props) {
2544
- return React26.createElement("div", { ...props });
2545
- }
2546
- function Month(props) {
2547
- const { calendarMonth, displayIndex, ...divProps } = props;
2548
- return React26.createElement("div", { ...divProps }, props.children);
2549
- }
2550
- function MonthCaption(props) {
2551
- const { calendarMonth, displayIndex, ...divProps } = props;
2552
- return React26.createElement("div", { ...divProps });
2553
- }
2554
- function MonthGrid(props) {
2555
- return React26.createElement("table", { ...props });
2556
- }
2557
- function Months(props) {
2558
- return React26.createElement("div", { ...props });
2559
- }
2560
- function MonthsDropdown(props) {
2561
- const { components } = useDayPicker();
2562
- return React26.createElement(components.Dropdown, { ...props });
2563
- }
2564
- function Nav(props) {
2565
- const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;
2566
- const { components, classNames, styles, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
2567
- const handleNextClick = useCallback((e) => {
2568
- if (nextMonth) {
2569
- onNextClick?.(e);
2570
- }
2571
- }, [nextMonth, onNextClick]);
2572
- const handlePreviousClick = useCallback((e) => {
2573
- if (previousMonth) {
2574
- onPreviousClick?.(e);
2575
- }
2576
- }, [previousMonth, onPreviousClick]);
2577
- return React26.createElement(
2578
- "nav",
2579
- { ...navProps },
2580
- React26.createElement(
2581
- components.PreviousMonthButton,
2582
- { type: "button", className: classNames[UI.PreviousMonthButton], style: styles?.[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
2583
- React26.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles?.[UI.Chevron], orientation: "left" })
2584
- ),
2585
- React26.createElement(
2586
- components.NextMonthButton,
2587
- { type: "button", className: classNames[UI.NextMonthButton], style: styles?.[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
2588
- React26.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron], style: styles?.[UI.Chevron] })
2589
- )
2590
- );
2591
- }
2592
- function NextMonthButton(props) {
2593
- return React26.createElement("button", { ...props });
2594
- }
2595
- function Option(props) {
2596
- return React26.createElement("option", { ...props });
2597
- }
2598
- function PreviousMonthButton(props) {
2599
- return React26.createElement("button", { ...props });
2600
- }
2601
- function Root(props) {
2602
- const { rootRef, ...rest } = props;
2603
- return React26.createElement("div", { ...rest, ref: rootRef });
2604
- }
2605
- function Select(props) {
2606
- return React26.createElement("select", { ...props });
2607
- }
2608
- function Week(props) {
2609
- const { week, ...trProps } = props;
2610
- return React26.createElement("tr", { ...trProps });
2611
- }
2612
- function Weekday(props) {
2613
- return React26.createElement("th", { ...props });
2614
- }
2615
- function Weekdays(props) {
2616
- return React26.createElement(
2617
- "thead",
2618
- { "aria-hidden": true },
2619
- React26.createElement("tr", { ...props })
2620
- );
2621
- }
2622
- function WeekNumber(props) {
2623
- const { week, ...thProps } = props;
2624
- return React26.createElement("th", { ...thProps });
2625
- }
2626
- function WeekNumberHeader(props) {
2627
- return React26.createElement("th", { ...props });
2628
- }
2629
- function Weeks(props) {
2630
- return React26.createElement("tbody", { ...props });
2631
- }
2632
- function YearsDropdown(props) {
2633
- const { components } = useDayPicker();
2634
- return React26.createElement(components.Dropdown, { ...props });
2635
- }
2636
-
2637
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
2638
- function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
2639
- let { from, to } = range;
2640
- const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
2641
- if (from && to) {
2642
- const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
2643
- if (isRangeInverted) {
2644
- [from, to] = [to, from];
2645
- }
2646
- const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
2647
- return isInRange;
2648
- }
2649
- if (!excludeEnds && to) {
2650
- return isSameDay2(to, date);
2651
- }
2652
- if (!excludeEnds && from) {
2653
- return isSameDay2(from, date);
2654
- }
2655
- return false;
2656
- }
2657
-
2658
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/typeguards.js
2659
- function isDateInterval(matcher) {
2660
- return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
2661
- }
2662
- function isDateRange(value) {
2663
- return Boolean(value && typeof value === "object" && "from" in value);
2664
- }
2665
- function isDateAfterType(value) {
2666
- return Boolean(value && typeof value === "object" && "after" in value);
2667
- }
2668
- function isDateBeforeType(value) {
2669
- return Boolean(value && typeof value === "object" && "before" in value);
2670
- }
2671
- function isDayOfWeekType(value) {
2672
- return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
2673
- }
2674
- function isDatesArray(value, dateLib) {
2675
- return Array.isArray(value) && value.every(dateLib.isDate);
2676
- }
2677
-
2678
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
2679
- function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
2680
- const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
2681
- const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
2682
- return matchersArr.some((matcher) => {
2683
- if (typeof matcher === "boolean") {
2684
- return matcher;
2685
- }
2686
- if (dateLib.isDate(matcher)) {
2687
- return isSameDay2(date, matcher);
2688
- }
2689
- if (isDatesArray(matcher, dateLib)) {
2690
- return matcher.some((matcherDate) => isSameDay2(date, matcherDate));
2691
- }
2692
- if (isDateRange(matcher)) {
2693
- return rangeIncludesDate(matcher, date, false, dateLib);
2694
- }
2695
- if (isDayOfWeekType(matcher)) {
2696
- if (!Array.isArray(matcher.dayOfWeek)) {
2697
- return matcher.dayOfWeek === date.getDay();
2698
- }
2699
- return matcher.dayOfWeek.includes(date.getDay());
2700
- }
2701
- if (isDateInterval(matcher)) {
2702
- const diffBefore = differenceInCalendarDays2(matcher.before, date);
2703
- const diffAfter = differenceInCalendarDays2(matcher.after, date);
2704
- const isDayBefore = diffBefore > 0;
2705
- const isDayAfter = diffAfter < 0;
2706
- const isClosedInterval = isAfter2(matcher.before, matcher.after);
2707
- if (isClosedInterval) {
2708
- return isDayAfter && isDayBefore;
2709
- } else {
2710
- return isDayBefore || isDayAfter;
2711
- }
2712
- }
2713
- if (isDateAfterType(matcher)) {
2714
- return differenceInCalendarDays2(date, matcher.after) > 0;
2715
- }
2716
- if (isDateBeforeType(matcher)) {
2717
- return differenceInCalendarDays2(matcher.before, date) > 0;
2718
- }
2719
- if (typeof matcher === "function") {
2720
- return matcher(date);
2721
- }
2722
- return false;
2723
- });
2724
- }
2725
-
2726
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
2727
- function createGetModifiers(days, props, navStart, navEnd, dateLib) {
2728
- const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props;
2729
- const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
2730
- const computedNavStart = navStart && startOfMonth2(navStart);
2731
- const computedNavEnd = navEnd && endOfMonth2(navEnd);
2732
- const internalModifiersMap = {
2733
- [DayFlag.focused]: [],
2734
- [DayFlag.outside]: [],
2735
- [DayFlag.disabled]: [],
2736
- [DayFlag.hidden]: [],
2737
- [DayFlag.today]: []
2738
- };
2739
- const customModifiersMap = {};
2740
- for (const day of days) {
2741
- const { date, displayMonth } = day;
2742
- const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
2743
- const isBeforeNavStart = Boolean(computedNavStart && isBefore2(date, computedNavStart));
2744
- const isAfterNavEnd = Boolean(computedNavEnd && isAfter2(date, computedNavEnd));
2745
- const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
2746
- const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
2747
- !broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
2748
- const isToday = isSameDay2(date, today);
2749
- if (isOutside)
2750
- internalModifiersMap.outside.push(day);
2751
- if (isDisabled)
2752
- internalModifiersMap.disabled.push(day);
2753
- if (isHidden)
2754
- internalModifiersMap.hidden.push(day);
2755
- if (isToday)
2756
- internalModifiersMap.today.push(day);
2757
- if (modifiers) {
2758
- Object.keys(modifiers).forEach((name) => {
2759
- const modifierValue = modifiers?.[name];
2760
- const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
2761
- if (!isMatch)
2762
- return;
2763
- if (customModifiersMap[name]) {
2764
- customModifiersMap[name].push(day);
2765
- } else {
2766
- customModifiersMap[name] = [day];
2767
- }
2768
- });
2769
- }
2770
- }
2771
- return (day) => {
2772
- const dayFlags = {
2773
- [DayFlag.focused]: false,
2774
- [DayFlag.disabled]: false,
2775
- [DayFlag.hidden]: false,
2776
- [DayFlag.outside]: false,
2777
- [DayFlag.today]: false
2778
- };
2779
- const customModifiers = {};
2780
- for (const name in internalModifiersMap) {
2781
- const days2 = internalModifiersMap[name];
2782
- dayFlags[name] = days2.some((d) => d === day);
2783
- }
2784
- for (const name in customModifiersMap) {
2785
- customModifiers[name] = customModifiersMap[name].some((d) => d === day);
2786
- }
2787
- return {
2788
- ...dayFlags,
2789
- // custom modifiers should override all the previous ones
2790
- ...customModifiers
2791
- };
2792
- };
2793
- }
2794
-
2795
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js
2796
- function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
2797
- const modifierClassNames = Object.entries(modifiers).filter(([, active]) => active === true).reduce((previousValue, [key]) => {
2798
- if (modifiersClassNames[key]) {
2799
- previousValue.push(modifiersClassNames[key]);
2800
- } else if (classNames[DayFlag[key]]) {
2801
- previousValue.push(classNames[DayFlag[key]]);
2802
- } else if (classNames[SelectionState[key]]) {
2803
- previousValue.push(classNames[SelectionState[key]]);
2804
- }
2805
- return previousValue;
2806
- }, [classNames[UI.Day]]);
2807
- return modifierClassNames;
2808
- }
2809
-
2810
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getComponents.js
2811
- function getComponents(customComponents) {
2812
- return {
2813
- ...custom_components_exports,
2814
- ...customComponents
2815
- };
2816
- }
2817
-
2818
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js
2819
- function getDataAttributes(props) {
2820
- const dataAttributes = {
2821
- "data-mode": props.mode ?? void 0,
2822
- "data-required": "required" in props ? props.required : void 0,
2823
- "data-multiple-months": props.numberOfMonths && props.numberOfMonths > 1 || void 0,
2824
- "data-week-numbers": props.showWeekNumber || void 0,
2825
- "data-broadcast-calendar": props.broadcastCalendar || void 0,
2826
- "data-nav-layout": props.navLayout || void 0
2827
- };
2828
- Object.entries(props).forEach(([key, val]) => {
2829
- if (key.startsWith("data-")) {
2830
- dataAttributes[key] = val;
2831
- }
2832
- });
2833
- return dataAttributes;
2834
- }
2835
-
2836
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js
2837
- function getDefaultClassNames() {
2838
- const classNames = {};
2839
- for (const key in UI) {
2840
- classNames[UI[key]] = `rdp-${UI[key]}`;
2841
- }
2842
- for (const key in DayFlag) {
2843
- classNames[DayFlag[key]] = `rdp-${DayFlag[key]}`;
2844
- }
2845
- for (const key in SelectionState) {
2846
- classNames[SelectionState[key]] = `rdp-${SelectionState[key]}`;
2847
- }
2848
- for (const key in Animation) {
2849
- classNames[Animation[key]] = `rdp-${Animation[key]}`;
2850
- }
2851
- return classNames;
2852
- }
2853
-
2854
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/index.js
2855
- var formatters_exports = {};
2856
- __export(formatters_exports, {
2857
- formatCaption: () => formatCaption,
2858
- formatDay: () => formatDay,
2859
- formatMonthDropdown: () => formatMonthDropdown,
2860
- formatWeekNumber: () => formatWeekNumber,
2861
- formatWeekNumberHeader: () => formatWeekNumberHeader,
2862
- formatWeekdayName: () => formatWeekdayName,
2863
- formatYearDropdown: () => formatYearDropdown
2864
- });
2865
-
2866
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js
2867
- function formatCaption(month, options, dateLib) {
2868
- const lib = dateLib ?? new DateLib(options);
2869
- return lib.formatMonthYear(month);
2870
- }
2871
-
2872
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatDay.js
2873
- function formatDay(date, options, dateLib) {
2874
- return (dateLib ?? new DateLib(options)).format(date, "d");
2875
- }
2876
-
2877
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js
2878
- function formatMonthDropdown(month, dateLib = defaultDateLib) {
2879
- return dateLib.format(month, "LLLL");
2880
- }
2881
-
2882
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
2883
- function formatWeekdayName(weekday, options, dateLib) {
2884
- return (dateLib ?? new DateLib(options)).format(weekday, "cccccc");
2885
- }
2886
-
2887
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js
2888
- function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
2889
- if (weekNumber < 10) {
2890
- return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
2891
- }
2892
- return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
2893
- }
2894
-
2895
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js
2896
- function formatWeekNumberHeader() {
2897
- return ``;
2898
- }
2899
-
2900
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js
2901
- function formatYearDropdown(year, dateLib = defaultDateLib) {
2902
- return dateLib.format(year, "yyyy");
2903
- }
2904
-
2905
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js
2906
- function getFormatters(customFormatters) {
2907
- return {
2908
- ...formatters_exports,
2909
- ...customFormatters
2910
- };
2911
- }
2912
-
2913
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/index.js
2914
- var labels_exports = {};
2915
- __export(labels_exports, {
2916
- labelDayButton: () => labelDayButton,
2917
- labelGrid: () => labelGrid,
2918
- labelGridcell: () => labelGridcell,
2919
- labelMonthDropdown: () => labelMonthDropdown,
2920
- labelNav: () => labelNav,
2921
- labelNext: () => labelNext,
2922
- labelPrevious: () => labelPrevious,
2923
- labelWeekNumber: () => labelWeekNumber,
2924
- labelWeekNumberHeader: () => labelWeekNumberHeader,
2925
- labelWeekday: () => labelWeekday,
2926
- labelYearDropdown: () => labelYearDropdown
2927
- });
2928
-
2929
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js
2930
- function labelDayButton(date, modifiers, options, dateLib) {
2931
- let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
2932
- if (modifiers.today)
2933
- label = `Today, ${label}`;
2934
- if (modifiers.selected)
2935
- label = `${label}, selected`;
2936
- return label;
2937
- }
2938
-
2939
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelGrid.js
2940
- function labelGrid(date, options, dateLib) {
2941
- const lib = dateLib ?? new DateLib(options);
2942
- return lib.formatMonthYear(date);
2943
- }
2944
-
2945
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js
2946
- function labelGridcell(date, modifiers, options, dateLib) {
2947
- let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
2948
- if (modifiers?.today) {
2949
- label = `Today, ${label}`;
2950
- }
2951
- return label;
2952
- }
2953
-
2954
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
2955
- function labelMonthDropdown(_options) {
2956
- return "Choose the Month";
2957
- }
2958
-
2959
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelNav.js
2960
- function labelNav() {
2961
- return "";
2962
- }
2963
-
2964
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelNext.js
2965
- var defaultLabel = "Go to the Next Month";
2966
- function labelNext(_month, _options) {
2967
- return defaultLabel;
2968
- }
2969
-
2970
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
2971
- function labelPrevious(_month) {
2972
- return "Go to the Previous Month";
2973
- }
2974
-
2975
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js
2976
- function labelWeekday(date, options, dateLib) {
2977
- return (dateLib ?? new DateLib(options)).format(date, "cccc");
2978
- }
2979
-
2980
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js
2981
- function labelWeekNumber(weekNumber, _options) {
2982
- return `Week ${weekNumber}`;
2983
- }
2984
-
2985
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js
2986
- function labelWeekNumberHeader(_options) {
2987
- return "Week Number";
2988
- }
2989
-
2990
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js
2991
- function labelYearDropdown(_options) {
2992
- return "Choose the Year";
2993
- }
2994
-
2995
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getLabels.js
2996
- var resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
2997
- if (customLabel)
2998
- return customLabel;
2999
- if (localeLabel) {
3000
- return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
3001
- }
3002
- return defaultLabel2;
3003
- };
3004
- function getLabels(customLabels, options) {
3005
- const localeLabels = options.locale?.labels ?? {};
3006
- return {
3007
- ...labels_exports,
3008
- ...customLabels ?? {},
3009
- labelDayButton: resolveLabel(labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),
3010
- labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),
3011
- labelNext: resolveLabel(labelNext, customLabels?.labelNext, localeLabels.labelNext),
3012
- labelPrevious: resolveLabel(labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),
3013
- labelWeekNumber: resolveLabel(labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),
3014
- labelYearDropdown: resolveLabel(labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),
3015
- labelGrid: resolveLabel(labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),
3016
- labelGridcell: resolveLabel(labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),
3017
- labelNav: resolveLabel(labelNav, customLabels?.labelNav, localeLabels.labelNav),
3018
- labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
3019
- labelWeekday: resolveLabel(labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday)
3020
- };
3021
- }
3022
-
3023
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
3024
- function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
3025
- const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
3026
- const months = eachMonthOfInterval2({
3027
- start: startOfYear2(displayMonth),
3028
- end: endOfYear2(displayMonth)
3029
- });
3030
- const options = months.map((month) => {
3031
- const label = formatters2.formatMonthDropdown(month, dateLib);
3032
- const value = getMonth2(month);
3033
- const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
3034
- return { value, label, disabled };
3035
- });
3036
- return options;
3037
- }
3038
-
3039
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
3040
- function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
3041
- let style = { ...styles?.[UI.Day] };
3042
- Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
3043
- style = {
3044
- ...style,
3045
- ...modifiersStyles?.[modifier]
3046
- };
3047
- });
3048
- return style;
3049
- }
3050
-
3051
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
3052
- function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
3053
- const referenceToday = today ?? dateLib.today();
3054
- const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
3055
- const days = [];
3056
- for (let i = 0; i < 7; i++) {
3057
- const day = dateLib.addDays(start, i);
3058
- days.push(day);
3059
- }
3060
- return days;
3061
- }
3062
-
3063
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
3064
- function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
3065
- if (!navStart)
3066
- return void 0;
3067
- if (!navEnd)
3068
- return void 0;
3069
- const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
3070
- const firstNavYear = startOfYear2(navStart);
3071
- const lastNavYear = endOfYear2(navEnd);
3072
- const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
3073
- if (reverse)
3074
- years.reverse();
3075
- return years.map((year) => {
3076
- const label = formatters2.formatYearDropdown(year, dateLib);
3077
- return {
3078
- value: getYear2(year),
3079
- label,
3080
- disabled: false
3081
- };
3082
- });
3083
- }
3084
-
3085
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/noonDateLib.js
3086
- function createNoonOverrides(timeZone, options = {}) {
3087
- const { weekStartsOn, locale } = options;
3088
- const fallbackWeekStartsOn = weekStartsOn ?? locale?.options?.weekStartsOn ?? 0;
3089
- const toNoonTZDate = (date) => {
3090
- const normalizedDate = typeof date === "number" || typeof date === "string" ? new Date(date) : date;
3091
- return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
3092
- };
3093
- const toCalendarDate = (date) => {
3094
- const zoned = toNoonTZDate(date);
3095
- return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);
3096
- };
3097
- return {
3098
- today: () => {
3099
- return toNoonTZDate(TZDate.tz(timeZone));
3100
- },
3101
- newDate: (year, monthIndex, date) => {
3102
- return new TZDate(year, monthIndex, date, 12, 0, 0, timeZone);
3103
- },
3104
- startOfDay: (date) => {
3105
- return toNoonTZDate(date);
3106
- },
3107
- startOfWeek: (date, options2) => {
3108
- const base = toNoonTZDate(date);
3109
- const weekStartsOnValue = options2?.weekStartsOn ?? fallbackWeekStartsOn;
3110
- const diff = (base.getDay() - weekStartsOnValue + 7) % 7;
3111
- base.setDate(base.getDate() - diff);
3112
- return base;
3113
- },
3114
- startOfISOWeek: (date) => {
3115
- const base = toNoonTZDate(date);
3116
- const diff = (base.getDay() - 1 + 7) % 7;
3117
- base.setDate(base.getDate() - diff);
3118
- return base;
3119
- },
3120
- startOfMonth: (date) => {
3121
- const base = toNoonTZDate(date);
3122
- base.setDate(1);
3123
- return base;
3124
- },
3125
- startOfYear: (date) => {
3126
- const base = toNoonTZDate(date);
3127
- base.setMonth(0, 1);
3128
- return base;
3129
- },
3130
- endOfWeek: (date, options2) => {
3131
- const base = toNoonTZDate(date);
3132
- const weekStartsOnValue = options2?.weekStartsOn ?? fallbackWeekStartsOn;
3133
- const endDow = (weekStartsOnValue + 6) % 7;
3134
- const diff = (endDow - base.getDay() + 7) % 7;
3135
- base.setDate(base.getDate() + diff);
3136
- return base;
3137
- },
3138
- endOfISOWeek: (date) => {
3139
- const base = toNoonTZDate(date);
3140
- const diff = (7 - base.getDay()) % 7;
3141
- base.setDate(base.getDate() + diff);
3142
- return base;
3143
- },
3144
- endOfMonth: (date) => {
3145
- const base = toNoonTZDate(date);
3146
- base.setMonth(base.getMonth() + 1, 0);
3147
- return base;
3148
- },
3149
- endOfYear: (date) => {
3150
- const base = toNoonTZDate(date);
3151
- base.setMonth(11, 31);
3152
- return base;
3153
- },
3154
- eachMonthOfInterval: (interval) => {
3155
- const start = toNoonTZDate(interval.start);
3156
- const end = toNoonTZDate(interval.end);
3157
- const result = [];
3158
- const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);
3159
- const endKey = end.getFullYear() * 12 + end.getMonth();
3160
- while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {
3161
- result.push(new TZDate(cursor, timeZone));
3162
- cursor.setMonth(cursor.getMonth() + 1, 1);
3163
- }
3164
- return result;
3165
- },
3166
- // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
3167
- // mutate the same TZDate, and return it.
3168
- addDays: (date, amount) => {
3169
- const base = toNoonTZDate(date);
3170
- base.setDate(base.getDate() + amount);
3171
- return base;
3172
- },
3173
- addWeeks: (date, amount) => {
3174
- const base = toNoonTZDate(date);
3175
- base.setDate(base.getDate() + amount * 7);
3176
- return base;
3177
- },
3178
- addMonths: (date, amount) => {
3179
- const base = toNoonTZDate(date);
3180
- base.setMonth(base.getMonth() + amount);
3181
- return base;
3182
- },
3183
- addYears: (date, amount) => {
3184
- const base = toNoonTZDate(date);
3185
- base.setFullYear(base.getFullYear() + amount);
3186
- return base;
3187
- },
3188
- eachYearOfInterval: (interval) => {
3189
- const start = toNoonTZDate(interval.start);
3190
- const end = toNoonTZDate(interval.end);
3191
- const years = [];
3192
- const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);
3193
- while (cursor.getFullYear() <= end.getFullYear()) {
3194
- years.push(new TZDate(cursor, timeZone));
3195
- cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);
3196
- }
3197
- return years;
3198
- },
3199
- getWeek: (date, options2) => {
3200
- const base = toCalendarDate(date);
3201
- return getWeek(base, {
3202
- weekStartsOn: options2?.weekStartsOn ?? fallbackWeekStartsOn,
3203
- firstWeekContainsDate: options2?.firstWeekContainsDate ?? locale?.options?.firstWeekContainsDate ?? 1
3204
- });
3205
- },
3206
- getISOWeek: (date) => {
3207
- const base = toCalendarDate(date);
3208
- return getISOWeek(base);
3209
- },
3210
- differenceInCalendarDays: (dateLeft, dateRight) => {
3211
- const left = toCalendarDate(dateLeft);
3212
- const right = toCalendarDate(dateRight);
3213
- return differenceInCalendarDays(left, right);
3214
- },
3215
- differenceInCalendarMonths: (dateLeft, dateRight) => {
3216
- const left = toCalendarDate(dateLeft);
3217
- const right = toCalendarDate(dateRight);
3218
- return differenceInCalendarMonths(left, right);
3219
- }
3220
- };
3221
- }
3222
- var asHtmlElement = (element) => {
3223
- if (element instanceof HTMLElement)
3224
- return element;
3225
- return null;
3226
- };
3227
- var queryMonthEls = (element) => [
3228
- ...element.querySelectorAll("[data-animated-month]") ?? []
3229
- ];
3230
- var queryMonthEl = (element) => asHtmlElement(element.querySelector("[data-animated-month]"));
3231
- var queryCaptionEl = (element) => asHtmlElement(element.querySelector("[data-animated-caption]"));
3232
- var queryWeeksEl = (element) => asHtmlElement(element.querySelector("[data-animated-weeks]"));
3233
- var queryNavEl = (element) => asHtmlElement(element.querySelector("[data-animated-nav]"));
3234
- var queryWeekdaysEl = (element) => asHtmlElement(element.querySelector("[data-animated-weekdays]"));
3235
- function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib }) {
3236
- const previousRootElSnapshotRef = useRef(null);
3237
- const previousMonthsRef = useRef(months);
3238
- const animatingRef = useRef(false);
3239
- useLayoutEffect(() => {
3240
- const previousMonths = previousMonthsRef.current;
3241
- previousMonthsRef.current = months;
3242
- if (!enabled || !rootElRef.current || // safety check because the ref can be set to anything by consumers
3243
- !(rootElRef.current instanceof HTMLElement) || // validation required for the animation to work as expected
3244
- months.length === 0 || previousMonths.length === 0 || months.length !== previousMonths.length) {
3245
- return;
3246
- }
3247
- const isSameMonth2 = dateLib.isSameMonth(months[0].date, previousMonths[0].date);
3248
- const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);
3249
- const captionAnimationClass = isAfterPreviousMonth ? classNames[Animation.caption_after_enter] : classNames[Animation.caption_before_enter];
3250
- const weeksAnimationClass = isAfterPreviousMonth ? classNames[Animation.weeks_after_enter] : classNames[Animation.weeks_before_enter];
3251
- const previousRootElSnapshot = previousRootElSnapshotRef.current;
3252
- const rootElSnapshot = rootElRef.current.cloneNode(true);
3253
- if (rootElSnapshot instanceof HTMLElement) {
3254
- const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);
3255
- currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {
3256
- if (!(currentMonthElSnapshot instanceof HTMLElement))
3257
- return;
3258
- const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);
3259
- if (previousMonthElSnapshot && currentMonthElSnapshot.contains(previousMonthElSnapshot)) {
3260
- currentMonthElSnapshot.removeChild(previousMonthElSnapshot);
3261
- }
3262
- const captionEl = queryCaptionEl(currentMonthElSnapshot);
3263
- if (captionEl) {
3264
- captionEl.classList.remove(captionAnimationClass);
3265
- }
3266
- const weeksEl = queryWeeksEl(currentMonthElSnapshot);
3267
- if (weeksEl) {
3268
- weeksEl.classList.remove(weeksAnimationClass);
3269
- }
3270
- });
3271
- previousRootElSnapshotRef.current = rootElSnapshot;
3272
- } else {
3273
- previousRootElSnapshotRef.current = null;
3274
- }
3275
- if (animatingRef.current || isSameMonth2 || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
3276
- focused) {
3277
- return;
3278
- }
3279
- const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
3280
- const currentMonthEls = queryMonthEls(rootElRef.current);
3281
- if (currentMonthEls?.every((el) => el instanceof HTMLElement) && previousMonthEls?.every((el) => el instanceof HTMLElement)) {
3282
- animatingRef.current = true;
3283
- rootElRef.current.style.isolation = "isolate";
3284
- const navEl = queryNavEl(rootElRef.current);
3285
- if (navEl) {
3286
- navEl.style.zIndex = "1";
3287
- }
3288
- currentMonthEls.forEach((currentMonthEl, index) => {
3289
- const previousMonthEl = previousMonthEls[index];
3290
- if (!previousMonthEl) {
3291
- return;
3292
- }
3293
- currentMonthEl.style.position = "relative";
3294
- currentMonthEl.style.overflow = "hidden";
3295
- const captionEl = queryCaptionEl(currentMonthEl);
3296
- if (captionEl) {
3297
- captionEl.classList.add(captionAnimationClass);
3298
- }
3299
- const weeksEl = queryWeeksEl(currentMonthEl);
3300
- if (weeksEl) {
3301
- weeksEl.classList.add(weeksAnimationClass);
3302
- }
3303
- const cleanUp = () => {
3304
- animatingRef.current = false;
3305
- if (rootElRef.current) {
3306
- rootElRef.current.style.isolation = "";
3307
- }
3308
- if (navEl) {
3309
- navEl.style.zIndex = "";
3310
- }
3311
- if (captionEl) {
3312
- captionEl.classList.remove(captionAnimationClass);
3313
- }
3314
- if (weeksEl) {
3315
- weeksEl.classList.remove(weeksAnimationClass);
3316
- }
3317
- currentMonthEl.style.position = "";
3318
- currentMonthEl.style.overflow = "";
3319
- if (currentMonthEl.contains(previousMonthEl)) {
3320
- currentMonthEl.removeChild(previousMonthEl);
3321
- }
3322
- };
3323
- previousMonthEl.style.pointerEvents = "none";
3324
- previousMonthEl.style.position = "absolute";
3325
- previousMonthEl.style.overflow = "hidden";
3326
- previousMonthEl.setAttribute("aria-hidden", "true");
3327
- const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);
3328
- if (previousWeekdaysEl) {
3329
- previousWeekdaysEl.style.opacity = "0";
3330
- }
3331
- const previousCaptionEl = queryCaptionEl(previousMonthEl);
3332
- if (previousCaptionEl) {
3333
- previousCaptionEl.classList.add(isAfterPreviousMonth ? classNames[Animation.caption_before_exit] : classNames[Animation.caption_after_exit]);
3334
- previousCaptionEl.addEventListener("animationend", cleanUp);
3335
- }
3336
- const previousWeeksEl = queryWeeksEl(previousMonthEl);
3337
- if (previousWeeksEl) {
3338
- previousWeeksEl.classList.add(isAfterPreviousMonth ? classNames[Animation.weeks_before_exit] : classNames[Animation.weeks_after_exit]);
3339
- }
3340
- currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);
3341
- });
3342
- }
3343
- });
3344
- }
3345
-
3346
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getDates.js
3347
- function getDates(displayMonths, maxDate, props, dateLib) {
3348
- const firstMonth = displayMonths[0];
3349
- const lastMonth = displayMonths[displayMonths.length - 1];
3350
- const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
3351
- const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
3352
- const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
3353
- const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
3354
- const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
3355
- const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
3356
- const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
3357
- const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
3358
- const dates = [];
3359
- for (let i = 0; i <= nOfDays; i++) {
3360
- const date = addDays2(startWeekFirstDate, i);
3361
- dates.push(date);
3362
- }
3363
- const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
3364
- const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;
3365
- if (fixedWeeks && dates.length < extraDates) {
3366
- const daysToAdd = extraDates - dates.length;
3367
- for (let i = 0; i < daysToAdd; i++) {
3368
- const date = addDays2(dates[dates.length - 1], 1);
3369
- dates.push(date);
3370
- }
3371
- }
3372
- return dates;
3373
- }
3374
-
3375
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getDays.js
3376
- function getDays(calendarMonths) {
3377
- const initialDays = [];
3378
- return calendarMonths.reduce((days, month) => {
3379
- const weekDays = month.weeks.reduce((weekDays2, week) => {
3380
- return weekDays2.concat(week.days.slice());
3381
- }, initialDays.slice());
3382
- return days.concat(weekDays.slice());
3383
- }, initialDays.slice());
3384
- }
3385
-
3386
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js
3387
- function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {
3388
- const { numberOfMonths = 1 } = props;
3389
- const months = [];
3390
- for (let i = 0; i < numberOfMonths; i++) {
3391
- const month = dateLib.addMonths(firstDisplayedMonth, i);
3392
- if (calendarEndMonth && month > calendarEndMonth) {
3393
- break;
3394
- }
3395
- months.push(month);
3396
- }
3397
- return months;
3398
- }
3399
-
3400
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js
3401
- function getInitialMonth(props, navStart, navEnd, dateLib) {
3402
- const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1 } = props;
3403
- let initialMonth = month || defaultMonth || today;
3404
- const { differenceInCalendarMonths: differenceInCalendarMonths2, addMonths: addMonths2, startOfMonth: startOfMonth2 } = dateLib;
3405
- if (navEnd && differenceInCalendarMonths2(navEnd, initialMonth) < numberOfMonths - 1) {
3406
- const offset = -1 * (numberOfMonths - 1);
3407
- initialMonth = addMonths2(navEnd, offset);
3408
- }
3409
- if (navStart && differenceInCalendarMonths2(initialMonth, navStart) < 0) {
3410
- initialMonth = navStart;
3411
- }
3412
- return startOfMonth2(initialMonth);
3413
- }
3414
-
3415
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getMonths.js
3416
- function getMonths(displayMonths, dates, props, dateLib) {
3417
- const { addDays: addDays2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, getISOWeek: getISOWeek2, getWeek: getWeek2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
3418
- const dayPickerMonths = displayMonths.reduce((months, month) => {
3419
- const firstDateOfFirstWeek = props.broadcastCalendar ? startOfBroadcastWeek2(month, dateLib) : props.ISOWeek ? startOfISOWeek2(month) : startOfWeek2(month);
3420
- const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month) : props.ISOWeek ? endOfISOWeek2(endOfMonth2(month)) : endOfWeek2(endOfMonth2(month));
3421
- const monthDates = dates.filter((date) => {
3422
- return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
3423
- });
3424
- const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;
3425
- if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {
3426
- const extraDates = dates.filter((date) => {
3427
- const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;
3428
- return date > lastDateOfLastWeek && date <= addDays2(lastDateOfLastWeek, daysToAdd);
3429
- });
3430
- monthDates.push(...extraDates);
3431
- }
3432
- const weeks = monthDates.reduce((weeks2, date) => {
3433
- const weekNumber = props.ISOWeek ? getISOWeek2(date) : getWeek2(date);
3434
- const week = weeks2.find((week2) => week2.weekNumber === weekNumber);
3435
- const day = new CalendarDay(date, month, dateLib);
3436
- if (!week) {
3437
- weeks2.push(new CalendarWeek(weekNumber, [day]));
3438
- } else {
3439
- week.days.push(day);
3440
- }
3441
- return weeks2;
3442
- }, []);
3443
- const dayPickerMonth = new CalendarMonth(month, weeks);
3444
- months.push(dayPickerMonth);
3445
- return months;
3446
- }, []);
3447
- if (!props.reverseMonths) {
3448
- return dayPickerMonths;
3449
- } else {
3450
- return dayPickerMonths.reverse();
3451
- }
3452
- }
3453
-
3454
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js
3455
- function getNavMonths(props, dateLib) {
3456
- let { startMonth, endMonth } = props;
3457
- const { startOfYear: startOfYear2, startOfDay: startOfDay2, startOfMonth: startOfMonth2, endOfMonth: endOfMonth2, addYears: addYears2, endOfYear: endOfYear2, today } = dateLib;
3458
- const hasYearDropdown = props.captionLayout === "dropdown" || props.captionLayout === "dropdown-years";
3459
- if (startMonth) {
3460
- startMonth = startOfMonth2(startMonth);
3461
- } else if (!startMonth && hasYearDropdown) {
3462
- startMonth = startOfYear2(addYears2(props.today ?? today(), -100));
3463
- }
3464
- if (endMonth) {
3465
- endMonth = endOfMonth2(endMonth);
3466
- } else if (!endMonth && hasYearDropdown) {
3467
- endMonth = endOfYear2(props.today ?? today());
3468
- }
3469
- return [
3470
- startMonth ? startOfDay2(startMonth) : startMonth,
3471
- endMonth ? startOfDay2(endMonth) : endMonth
3472
- ];
3473
- }
3474
-
3475
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js
3476
- function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {
3477
- if (options.disableNavigation) {
3478
- return void 0;
3479
- }
3480
- const { pagedNavigation, numberOfMonths = 1 } = options;
3481
- const { startOfMonth: startOfMonth2, addMonths: addMonths2, differenceInCalendarMonths: differenceInCalendarMonths2 } = dateLib;
3482
- const offset = pagedNavigation ? numberOfMonths : 1;
3483
- const month = startOfMonth2(firstDisplayedMonth);
3484
- if (!calendarEndMonth) {
3485
- return addMonths2(month, offset);
3486
- }
3487
- const monthsDiff = differenceInCalendarMonths2(calendarEndMonth, firstDisplayedMonth);
3488
- if (monthsDiff < numberOfMonths) {
3489
- return void 0;
3490
- }
3491
- return addMonths2(month, offset);
3492
- }
3493
-
3494
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js
3495
- function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {
3496
- if (options.disableNavigation) {
3497
- return void 0;
3498
- }
3499
- const { pagedNavigation, numberOfMonths } = options;
3500
- const { startOfMonth: startOfMonth2, addMonths: addMonths2, differenceInCalendarMonths: differenceInCalendarMonths2 } = dateLib;
3501
- const offset = pagedNavigation ? numberOfMonths ?? 1 : 1;
3502
- const month = startOfMonth2(firstDisplayedMonth);
3503
- if (!calendarStartMonth) {
3504
- return addMonths2(month, -offset);
3505
- }
3506
- const monthsDiff = differenceInCalendarMonths2(month, calendarStartMonth);
3507
- if (monthsDiff <= 0) {
3508
- return void 0;
3509
- }
3510
- return addMonths2(month, -offset);
3511
- }
3512
-
3513
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js
3514
- function getWeeks(months) {
3515
- const initialWeeks = [];
3516
- return months.reduce((weeks, month) => {
3517
- return weeks.concat(month.weeks.slice());
3518
- }, initialWeeks.slice());
3519
- }
3520
- function useControlledValue(defaultValue, controlledValue) {
3521
- const [uncontrolledValue, setValue] = useState(defaultValue);
3522
- const value = controlledValue === void 0 ? uncontrolledValue : controlledValue;
3523
- return [value, setValue];
3524
- }
3525
-
3526
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/useCalendar.js
3527
- function useCalendar(props, dateLib) {
3528
- const [navStart, navEnd] = getNavMonths(props, dateLib);
3529
- const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
3530
- const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
3531
- const [firstMonth, setFirstMonth] = useControlledValue(
3532
- initialMonth,
3533
- // initialMonth is always computed from props.month if provided
3534
- props.month ? initialMonth : void 0
3535
- );
3536
- useEffect(() => {
3537
- const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
3538
- setFirstMonth(newInitialMonth);
3539
- }, [props.timeZone]);
3540
- const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
3541
- const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
3542
- const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : void 0, {
3543
- ISOWeek: props.ISOWeek,
3544
- fixedWeeks: props.fixedWeeks,
3545
- broadcastCalendar: props.broadcastCalendar
3546
- }, dateLib);
3547
- const months2 = getMonths(displayMonths, dates, {
3548
- broadcastCalendar: props.broadcastCalendar,
3549
- fixedWeeks: props.fixedWeeks,
3550
- ISOWeek: props.ISOWeek,
3551
- reverseMonths: props.reverseMonths
3552
- }, dateLib);
3553
- const weeks2 = getWeeks(months2);
3554
- const days2 = getDays(months2);
3555
- const previousMonth2 = getPreviousMonth(firstMonth, navStart, props, dateLib);
3556
- const nextMonth2 = getNextMonth(firstMonth, navEnd, props, dateLib);
3557
- return {
3558
- months: months2,
3559
- weeks: weeks2,
3560
- days: days2,
3561
- previousMonth: previousMonth2,
3562
- nextMonth: nextMonth2
3563
- };
3564
- }, [
3565
- dateLib,
3566
- firstMonth.getTime(),
3567
- navEnd?.getTime(),
3568
- navStart?.getTime(),
3569
- props.disableNavigation,
3570
- props.broadcastCalendar,
3571
- props.endMonth?.getTime(),
3572
- props.fixedWeeks,
3573
- props.ISOWeek,
3574
- props.numberOfMonths,
3575
- props.pagedNavigation,
3576
- props.reverseMonths
3577
- ]);
3578
- const { disableNavigation, onMonthChange } = props;
3579
- const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
3580
- const goToMonth = (date) => {
3581
- if (disableNavigation) {
3582
- return;
3583
- }
3584
- let newMonth = startOfMonth2(date);
3585
- if (navStart && newMonth < startOfMonth2(navStart)) {
3586
- newMonth = startOfMonth2(navStart);
3587
- }
3588
- if (navEnd && newMonth > startOfMonth2(navEnd)) {
3589
- newMonth = startOfMonth2(navEnd);
3590
- }
3591
- setFirstMonth(newMonth);
3592
- onMonthChange?.(newMonth);
3593
- };
3594
- const goToDay = (day) => {
3595
- if (isDayInCalendar(day)) {
3596
- return;
3597
- }
3598
- goToMonth(day.date);
3599
- };
3600
- const calendar = {
3601
- months,
3602
- weeks,
3603
- days,
3604
- navStart,
3605
- navEnd,
3606
- previousMonth,
3607
- nextMonth,
3608
- goToMonth,
3609
- goToDay
3610
- };
3611
- return calendar;
3612
- }
3613
-
3614
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js
3615
- var FocusTargetPriority;
3616
- (function(FocusTargetPriority2) {
3617
- FocusTargetPriority2[FocusTargetPriority2["Today"] = 0] = "Today";
3618
- FocusTargetPriority2[FocusTargetPriority2["Selected"] = 1] = "Selected";
3619
- FocusTargetPriority2[FocusTargetPriority2["LastFocused"] = 2] = "LastFocused";
3620
- FocusTargetPriority2[FocusTargetPriority2["FocusedModifier"] = 3] = "FocusedModifier";
3621
- })(FocusTargetPriority || (FocusTargetPriority = {}));
3622
- function isFocusableDay(modifiers) {
3623
- return !modifiers[DayFlag.disabled] && !modifiers[DayFlag.hidden] && !modifiers[DayFlag.outside];
3624
- }
3625
- function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
3626
- let focusTarget;
3627
- let foundFocusTargetPriority = -1;
3628
- for (const day of days) {
3629
- const modifiers = getModifiers(day);
3630
- if (isFocusableDay(modifiers)) {
3631
- if (modifiers[DayFlag.focused] && foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {
3632
- focusTarget = day;
3633
- foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;
3634
- } else if (lastFocused?.isEqualTo(day) && foundFocusTargetPriority < FocusTargetPriority.LastFocused) {
3635
- focusTarget = day;
3636
- foundFocusTargetPriority = FocusTargetPriority.LastFocused;
3637
- } else if (isSelected(day.date) && foundFocusTargetPriority < FocusTargetPriority.Selected) {
3638
- focusTarget = day;
3639
- foundFocusTargetPriority = FocusTargetPriority.Selected;
3640
- } else if (modifiers[DayFlag.today] && foundFocusTargetPriority < FocusTargetPriority.Today) {
3641
- focusTarget = day;
3642
- foundFocusTargetPriority = FocusTargetPriority.Today;
3643
- }
3644
- }
3645
- }
3646
- if (!focusTarget) {
3647
- focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));
3648
- }
3649
- return focusTarget;
3650
- }
3651
-
3652
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js
3653
- function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
3654
- const { ISOWeek, broadcastCalendar } = props;
3655
- const { addDays: addDays2, addMonths: addMonths2, addWeeks: addWeeks2, addYears: addYears2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfWeek: endOfWeek2, max: max2, min: min2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
3656
- const moveFns = {
3657
- day: addDays2,
3658
- week: addWeeks2,
3659
- month: addMonths2,
3660
- year: addYears2,
3661
- startOfWeek: (date) => broadcastCalendar ? startOfBroadcastWeek2(date, dateLib) : ISOWeek ? startOfISOWeek2(date) : startOfWeek2(date),
3662
- endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date) : ISOWeek ? endOfISOWeek2(date) : endOfWeek2(date)
3663
- };
3664
- let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
3665
- if (moveDir === "before" && navStart) {
3666
- focusableDate = max2([navStart, focusableDate]);
3667
- } else if (moveDir === "after" && navEnd) {
3668
- focusableDate = min2([navEnd, focusableDate]);
3669
- }
3670
- return focusableDate;
3671
- }
3672
-
3673
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js
3674
- function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {
3675
- if (attempt > 365) {
3676
- return void 0;
3677
- }
3678
- const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
3679
- const isDisabled = Boolean(props.disabled && dateMatchModifiers(focusableDate, props.disabled, dateLib));
3680
- const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
3681
- const targetMonth = focusableDate;
3682
- const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);
3683
- if (!isDisabled && !isHidden) {
3684
- return focusDay;
3685
- }
3686
- return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);
3687
- }
3688
-
3689
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/useFocus.js
3690
- function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
3691
- const { autoFocus } = props;
3692
- const [lastFocused, setLastFocused] = useState();
3693
- const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected || (() => false), lastFocused);
3694
- const [focusedDay, setFocused] = useState(autoFocus ? focusTarget : void 0);
3695
- const blur = () => {
3696
- setLastFocused(focusedDay);
3697
- setFocused(void 0);
3698
- };
3699
- const moveFocus = (moveBy, moveDir) => {
3700
- if (!focusedDay)
3701
- return;
3702
- const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
3703
- if (!nextFocus)
3704
- return;
3705
- if (props.disableNavigation) {
3706
- const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));
3707
- if (!isNextInCalendar) {
3708
- return;
3709
- }
3710
- }
3711
- calendar.goToDay(nextFocus);
3712
- setFocused(nextFocus);
3713
- };
3714
- const isFocusTarget = (day) => {
3715
- return Boolean(focusTarget?.isEqualTo(day));
3716
- };
3717
- const useFocus2 = {
3718
- isFocusTarget,
3719
- setFocused,
3720
- focused: focusedDay,
3721
- blur,
3722
- moveFocus
3723
- };
3724
- return useFocus2;
3725
- }
3726
-
3727
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/selection/useMulti.js
3728
- function useMulti(props, dateLib) {
3729
- const { selected: initiallySelected, required, onSelect } = props;
3730
- const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
3731
- const selected = !onSelect ? internallySelected : initiallySelected;
3732
- const { isSameDay: isSameDay2 } = dateLib;
3733
- const isSelected = (date) => {
3734
- return selected?.some((d) => isSameDay2(d, date)) ?? false;
3735
- };
3736
- const { min: min2, max: max2 } = props;
3737
- const select = (triggerDate, modifiers, e) => {
3738
- let newDates = [...selected ?? []];
3739
- if (isSelected(triggerDate)) {
3740
- if (selected?.length === min2) {
3741
- return;
3742
- }
3743
- if (required && selected?.length === 1) {
3744
- return;
3745
- }
3746
- newDates = selected?.filter((d) => !isSameDay2(d, triggerDate));
3747
- } else {
3748
- if (selected?.length === max2) {
3749
- newDates = [triggerDate];
3750
- } else {
3751
- newDates = [...newDates, triggerDate];
3752
- }
3753
- }
3754
- if (!onSelect) {
3755
- setSelected(newDates);
3756
- }
3757
- onSelect?.(newDates, triggerDate, modifiers, e);
3758
- return newDates;
3759
- };
3760
- return {
3761
- selected,
3762
- select,
3763
- isSelected
3764
- };
3765
- }
3766
-
3767
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/addToRange.js
3768
- function addToRange(date, initialRange, min2 = 0, max2 = 0, required = false, dateLib = defaultDateLib) {
3769
- const { from, to } = initialRange || {};
3770
- const { isSameDay: isSameDay2, isAfter: isAfter2, isBefore: isBefore2 } = dateLib;
3771
- let range;
3772
- if (!from && !to) {
3773
- range = { from: date, to: min2 > 0 ? void 0 : date };
3774
- } else if (from && !to) {
3775
- if (isSameDay2(from, date)) {
3776
- if (min2 === 0) {
3777
- range = { from, to: date };
3778
- } else if (required) {
3779
- range = { from, to: void 0 };
3780
- } else {
3781
- range = void 0;
3782
- }
3783
- } else if (isBefore2(date, from)) {
3784
- range = { from: date, to: from };
3785
- } else {
3786
- range = { from, to: date };
3787
- }
3788
- } else if (from && to) {
3789
- if (isSameDay2(from, date) && isSameDay2(to, date)) {
3790
- if (required) {
3791
- range = { from, to };
3792
- } else {
3793
- range = void 0;
3794
- }
3795
- } else if (isSameDay2(from, date)) {
3796
- range = { from, to: min2 > 0 ? void 0 : date };
3797
- } else if (isSameDay2(to, date)) {
3798
- range = { from: date, to: min2 > 0 ? void 0 : date };
3799
- } else if (isBefore2(date, from)) {
3800
- range = { from: date, to };
3801
- } else if (isAfter2(date, from)) {
3802
- range = { from, to: date };
3803
- } else if (isAfter2(date, to)) {
3804
- range = { from, to: date };
3805
- } else {
3806
- throw new Error("Invalid range");
3807
- }
3808
- }
3809
- if (range?.from && range?.to) {
3810
- const diff = dateLib.differenceInCalendarDays(range.to, range.from);
3811
- if (max2 > 0 && diff > max2) {
3812
- range = { from: date, to: void 0 };
3813
- } else if (min2 > 1 && diff < min2) {
3814
- range = { from: date, to: void 0 };
3815
- }
3816
- }
3817
- return range;
3818
- }
3819
-
3820
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js
3821
- function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {
3822
- const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;
3823
- let date = range.from;
3824
- const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
3825
- const totalDaysLimit = Math.min(totalDays, 6);
3826
- for (let i = 0; i <= totalDaysLimit; i++) {
3827
- if (dayOfWeekArr.includes(date.getDay())) {
3828
- return true;
3829
- }
3830
- date = dateLib.addDays(date, 1);
3831
- }
3832
- return false;
3833
- }
3834
-
3835
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js
3836
- function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {
3837
- return rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) || rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) || rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) || rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib);
3838
- }
3839
-
3840
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js
3841
- function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
3842
- const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];
3843
- const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== "function");
3844
- const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {
3845
- if (typeof matcher === "boolean")
3846
- return matcher;
3847
- if (dateLib.isDate(matcher)) {
3848
- return rangeIncludesDate(range, matcher, false, dateLib);
3849
- }
3850
- if (isDatesArray(matcher, dateLib)) {
3851
- return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));
3852
- }
3853
- if (isDateRange(matcher)) {
3854
- if (matcher.from && matcher.to) {
3855
- return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);
3856
- }
3857
- return false;
3858
- }
3859
- if (isDayOfWeekType(matcher)) {
3860
- return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);
3861
- }
3862
- if (isDateInterval(matcher)) {
3863
- const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);
3864
- if (isClosedInterval) {
3865
- return rangeOverlaps(range, {
3866
- from: dateLib.addDays(matcher.after, 1),
3867
- to: dateLib.addDays(matcher.before, -1)
3868
- }, dateLib);
3869
- }
3870
- return dateMatchModifiers(range.from, matcher, dateLib) || dateMatchModifiers(range.to, matcher, dateLib);
3871
- }
3872
- if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {
3873
- return dateMatchModifiers(range.from, matcher, dateLib) || dateMatchModifiers(range.to, matcher, dateLib);
3874
- }
3875
- return false;
3876
- });
3877
- if (nonFunctionMatchersResult) {
3878
- return true;
3879
- }
3880
- const functionMatchers = matchers.filter((matcher) => typeof matcher === "function");
3881
- if (functionMatchers.length) {
3882
- let date = range.from;
3883
- const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
3884
- for (let i = 0; i <= totalDays; i++) {
3885
- if (functionMatchers.some((matcher) => matcher(date))) {
3886
- return true;
3887
- }
3888
- date = dateLib.addDays(date, 1);
3889
- }
3890
- }
3891
- return false;
3892
- }
3893
-
3894
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/selection/useRange.js
3895
- function useRange(props, dateLib) {
3896
- const { disabled, excludeDisabled, resetOnSelect, selected: initiallySelected, required, onSelect } = props;
3897
- const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
3898
- const selected = !onSelect ? internallySelected : initiallySelected;
3899
- const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);
3900
- const select = (triggerDate, modifiers, e) => {
3901
- const { min: min2, max: max2 } = props;
3902
- let newRange;
3903
- if (triggerDate) {
3904
- const selectedFrom = selected?.from;
3905
- const selectedTo = selected?.to;
3906
- const hasFullRange = !!selectedFrom && !!selectedTo;
3907
- const isClickingSingleDayRange = !!selectedFrom && !!selectedTo && dateLib.isSameDay(selectedFrom, selectedTo) && dateLib.isSameDay(triggerDate, selectedFrom);
3908
- if (resetOnSelect && (hasFullRange || !selected?.from)) {
3909
- if (!required && isClickingSingleDayRange) {
3910
- newRange = void 0;
3911
- } else {
3912
- newRange = { from: triggerDate, to: void 0 };
3913
- }
3914
- } else {
3915
- newRange = addToRange(triggerDate, selected, min2, max2, required, dateLib);
3916
- }
3917
- }
3918
- if (excludeDisabled && disabled && newRange?.from && newRange.to) {
3919
- if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {
3920
- newRange.from = triggerDate;
3921
- newRange.to = void 0;
3922
- }
3923
- }
3924
- if (!onSelect) {
3925
- setSelected(newRange);
3926
- }
3927
- onSelect?.(newRange, triggerDate, modifiers, e);
3928
- return newRange;
3929
- };
3930
- return {
3931
- selected,
3932
- select,
3933
- isSelected
3934
- };
3935
- }
3936
-
3937
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/selection/useSingle.js
3938
- function useSingle(props, dateLib) {
3939
- const { selected: initiallySelected, required, onSelect } = props;
3940
- const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
3941
- const selected = !onSelect ? internallySelected : initiallySelected;
3942
- const { isSameDay: isSameDay2 } = dateLib;
3943
- const isSelected = (compareDate) => {
3944
- return selected ? isSameDay2(selected, compareDate) : false;
3945
- };
3946
- const select = (triggerDate, modifiers, e) => {
3947
- let newDate = triggerDate;
3948
- if (!required && selected && selected && isSameDay2(triggerDate, selected)) {
3949
- newDate = void 0;
3950
- }
3951
- if (!onSelect) {
3952
- setSelected(newDate);
3953
- }
3954
- if (required) {
3955
- onSelect?.(newDate, triggerDate, modifiers, e);
3956
- } else {
3957
- onSelect?.(newDate, triggerDate, modifiers, e);
3958
- }
3959
- return newDate;
3960
- };
3961
- return {
3962
- selected,
3963
- select,
3964
- isSelected
3965
- };
3966
- }
3967
-
3968
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/useSelection.js
3969
- function useSelection(props, dateLib) {
3970
- const single = useSingle(props, dateLib);
3971
- const multi = useMulti(props, dateLib);
3972
- const range = useRange(props, dateLib);
3973
- switch (props.mode) {
3974
- case "single":
3975
- return single;
3976
- case "multiple":
3977
- return multi;
3978
- case "range":
3979
- return range;
3980
- default:
3981
- return void 0;
3982
- }
3983
- }
3984
-
3985
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/toTimeZone.js
3986
- function toTimeZone(date, timeZone) {
3987
- if (date instanceof TZDate && date.timeZone === timeZone) {
3988
- return date;
3989
- }
3990
- return new TZDate(date, timeZone);
3991
- }
3992
-
3993
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
3994
- function toZoneNoon(date, timeZone, noonSafe) {
3995
- return toTimeZone(date, timeZone);
3996
- }
3997
- function convertMatcher(matcher, timeZone, noonSafe) {
3998
- if (typeof matcher === "boolean" || typeof matcher === "function") {
3999
- return matcher;
4000
- }
4001
- if (matcher instanceof Date) {
4002
- return toZoneNoon(matcher, timeZone);
4003
- }
4004
- if (Array.isArray(matcher)) {
4005
- return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone) : value);
4006
- }
4007
- if (isDateRange(matcher)) {
4008
- return {
4009
- ...matcher,
4010
- from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
4011
- to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
4012
- };
4013
- }
4014
- if (isDateInterval(matcher)) {
4015
- return {
4016
- before: toZoneNoon(matcher.before, timeZone),
4017
- after: toZoneNoon(matcher.after, timeZone)
4018
- };
4019
- }
4020
- if (isDateAfterType(matcher)) {
4021
- return {
4022
- after: toZoneNoon(matcher.after, timeZone)
4023
- };
4024
- }
4025
- if (isDateBeforeType(matcher)) {
4026
- return {
4027
- before: toZoneNoon(matcher.before, timeZone)
4028
- };
4029
- }
4030
- return matcher;
4031
- }
4032
- function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
4033
- if (!matchers) {
4034
- return matchers;
4035
- }
4036
- if (Array.isArray(matchers)) {
4037
- return matchers.map((matcher) => convertMatcher(matcher, timeZone));
4038
- }
4039
- return convertMatcher(matchers, timeZone);
4040
- }
4041
-
4042
- // ../../node_modules/.pnpm/react-day-picker@10.0.1_@types+react@19.2.15_react@19.2.7/node_modules/react-day-picker/dist/esm/DayPicker.js
4043
- function DayPicker(initialProps) {
4044
- let props = initialProps;
4045
- const timeZone = props.timeZone;
4046
- if (timeZone) {
4047
- props = {
4048
- ...initialProps,
4049
- timeZone
4050
- };
4051
- if (props.today) {
4052
- props.today = toTimeZone(props.today, timeZone);
4053
- }
4054
- if (props.month) {
4055
- props.month = toTimeZone(props.month, timeZone);
4056
- }
4057
- if (props.defaultMonth) {
4058
- props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);
4059
- }
4060
- if (props.startMonth) {
4061
- props.startMonth = toTimeZone(props.startMonth, timeZone);
4062
- }
4063
- if (props.endMonth) {
4064
- props.endMonth = toTimeZone(props.endMonth, timeZone);
4065
- }
4066
- if (props.mode === "single" && props.selected) {
4067
- props.selected = toTimeZone(props.selected, timeZone);
4068
- } else if (props.mode === "multiple" && props.selected) {
4069
- props.selected = props.selected?.map((date) => toTimeZone(date, timeZone));
4070
- } else if (props.mode === "range" && props.selected) {
4071
- props.selected = {
4072
- from: props.selected.from ? toTimeZone(props.selected.from, timeZone) : props.selected.from,
4073
- to: props.selected.to ? toTimeZone(props.selected.to, timeZone) : props.selected.to
4074
- };
4075
- }
4076
- if (props.disabled !== void 0) {
4077
- props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);
4078
- }
4079
- if (props.hidden !== void 0) {
4080
- props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);
4081
- }
4082
- if (props.modifiers) {
4083
- const nextModifiers = {};
4084
- Object.keys(props.modifiers).forEach((key) => {
4085
- nextModifiers[key] = convertMatchersToTimeZone(props.modifiers?.[key], timeZone);
4086
- });
4087
- props.modifiers = nextModifiers;
4088
- }
4089
- }
4090
- const { components, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo(() => {
4091
- const locale2 = { ...enUS2, ...props.locale };
4092
- const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;
4093
- const noonOverrides = props.noonSafe && props.timeZone ? createNoonOverrides(props.timeZone, {
4094
- weekStartsOn,
4095
- locale: locale2
4096
- }) : void 0;
4097
- const overrides = props.dateLib && noonOverrides ? { ...noonOverrides, ...props.dateLib } : props.dateLib ?? noonOverrides;
4098
- const dateLib2 = new DateLib({
4099
- locale: locale2,
4100
- weekStartsOn,
4101
- firstWeekContainsDate: props.firstWeekContainsDate,
4102
- useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
4103
- useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
4104
- timeZone: props.timeZone,
4105
- numerals: props.numerals
4106
- }, overrides);
4107
- return {
4108
- dateLib: dateLib2,
4109
- components: getComponents(props.components),
4110
- formatters: getFormatters(props.formatters),
4111
- labels: getLabels(props.labels, dateLib2.options),
4112
- locale: locale2,
4113
- classNames: { ...getDefaultClassNames(), ...props.classNames }
4114
- };
4115
- }, [
4116
- props.locale,
4117
- props.broadcastCalendar,
4118
- props.weekStartsOn,
4119
- props.firstWeekContainsDate,
4120
- props.useAdditionalWeekYearTokens,
4121
- props.useAdditionalDayOfYearTokens,
4122
- props.timeZone,
4123
- props.numerals,
4124
- props.dateLib,
4125
- props.noonSafe,
4126
- props.components,
4127
- props.formatters,
4128
- props.labels,
4129
- props.classNames
4130
- ]);
4131
- if (!props.today) {
4132
- props = { ...props, today: dateLib.today() };
4133
- }
4134
- const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
4135
- const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
4136
- const calendar = useCalendar(props, dateLib);
4137
- const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
4138
- const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
4139
- const { isSelected, select, selected: selectedValue } = useSelection(props, dateLib) ?? {};
4140
- const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);
4141
- const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
4142
- const weekdays = useMemo(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
4143
- const isInteractive = mode !== void 0 || onDayClick !== void 0;
4144
- const handlePreviousClick = useCallback(() => {
4145
- if (!previousMonth)
4146
- return;
4147
- goToMonth(previousMonth);
4148
- onPrevClick?.(previousMonth);
4149
- }, [previousMonth, goToMonth, onPrevClick]);
4150
- const handleNextClick = useCallback(() => {
4151
- if (!nextMonth)
4152
- return;
4153
- goToMonth(nextMonth);
4154
- onNextClick?.(nextMonth);
4155
- }, [goToMonth, nextMonth, onNextClick]);
4156
- const handleDayClick = useCallback((day, m) => (e) => {
4157
- e.preventDefault();
4158
- e.stopPropagation();
4159
- setFocused(day);
4160
- if (m.disabled) {
4161
- return;
4162
- }
4163
- select?.(day.date, m, e);
4164
- onDayClick?.(day.date, m, e);
4165
- }, [select, onDayClick, setFocused]);
4166
- const handleDayFocus = useCallback((day, m) => (e) => {
4167
- setFocused(day);
4168
- onDayFocus?.(day.date, m, e);
4169
- }, [onDayFocus, setFocused]);
4170
- const handleDayBlur = useCallback((day, m) => (e) => {
4171
- blur();
4172
- onDayBlur?.(day.date, m, e);
4173
- }, [blur, onDayBlur]);
4174
- const handleDayKeyDown = useCallback((day, modifiers) => (e) => {
4175
- const keyMap = {
4176
- ArrowLeft: [
4177
- e.shiftKey ? "month" : "day",
4178
- props.dir === "rtl" ? "after" : "before"
4179
- ],
4180
- ArrowRight: [
4181
- e.shiftKey ? "month" : "day",
4182
- props.dir === "rtl" ? "before" : "after"
4183
- ],
4184
- ArrowDown: [e.shiftKey ? "year" : "week", "after"],
4185
- ArrowUp: [e.shiftKey ? "year" : "week", "before"],
4186
- PageUp: [e.shiftKey ? "year" : "month", "before"],
4187
- PageDown: [e.shiftKey ? "year" : "month", "after"],
4188
- Home: ["startOfWeek", "before"],
4189
- End: ["endOfWeek", "after"]
4190
- };
4191
- if (keyMap[e.key]) {
4192
- e.preventDefault();
4193
- e.stopPropagation();
4194
- const [moveBy, moveDir] = keyMap[e.key];
4195
- moveFocus(moveBy, moveDir);
4196
- }
4197
- onDayKeyDown?.(day.date, modifiers, e);
4198
- }, [moveFocus, onDayKeyDown, props.dir]);
4199
- const handleDayMouseEnter = useCallback((day, modifiers) => (e) => {
4200
- onDayMouseEnter?.(day.date, modifiers, e);
4201
- }, [onDayMouseEnter]);
4202
- const handleDayMouseLeave = useCallback((day, modifiers) => (e) => {
4203
- onDayMouseLeave?.(day.date, modifiers, e);
4204
- }, [onDayMouseLeave]);
4205
- const handleMonthChange = useCallback((date, monthOffset) => (e) => {
4206
- const selectedMonth = Number(e.target.value);
4207
- const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);
4208
- goToMonth(dateLib.addMonths(month, -monthOffset));
4209
- }, [dateLib, goToMonth]);
4210
- const handleYearChange = useCallback((date, monthOffset) => (e) => {
4211
- const selectedYear = Number(e.target.value);
4212
- const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);
4213
- goToMonth(dateLib.addMonths(month, -monthOffset));
4214
- }, [dateLib, goToMonth]);
4215
- const { className, style } = useMemo(() => ({
4216
- className: [classNames[UI.Root], props.className].filter(Boolean).join(" "),
4217
- style: { ...styles?.[UI.Root], ...props.style }
4218
- }), [classNames, props.className, props.style, styles]);
4219
- const dataAttributes = getDataAttributes(props);
4220
- const getDropdownStyle = (dropdown) => {
4221
- const dropdownStyle = styles?.[UI.Dropdown];
4222
- const specificDropdownStyle = styles?.[dropdown];
4223
- if (!dropdownStyle && !specificDropdownStyle) {
4224
- return void 0;
4225
- }
4226
- return {
4227
- ...dropdownStyle,
4228
- ...specificDropdownStyle
4229
- };
4230
- };
4231
- const rootElRef = useRef(null);
4232
- useAnimation(rootElRef, Boolean(props.animate), {
4233
- classNames,
4234
- months,
4235
- focused,
4236
- dateLib
4237
- });
4238
- const contextValue = {
4239
- dayPickerProps: props,
4240
- selected: selectedValue,
4241
- select,
4242
- isSelected,
4243
- months,
4244
- nextMonth,
4245
- previousMonth,
4246
- goToMonth,
4247
- getModifiers,
4248
- components,
4249
- classNames,
4250
- styles,
4251
- labels,
4252
- formatters: formatters2
4253
- };
4254
- return React26.createElement(
4255
- dayPickerContext.Provider,
4256
- { value: contextValue },
4257
- React26.createElement(
4258
- components.Root,
4259
- { rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang ?? locale.code, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], ...dataAttributes },
4260
- React26.createElement(
4261
- components.Months,
4262
- { className: classNames[UI.Months], style: styles?.[UI.Months] },
4263
- !props.hideNavigation && !navLayout && React26.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
4264
- months.map((calendarMonth, displayIndex) => {
4265
- const monthOffset = props.reverseMonths ? months.length - 1 - displayIndex : displayIndex;
4266
- return React26.createElement(
4267
- components.Month,
4268
- {
4269
- "data-animated-month": props.animate ? "true" : void 0,
4270
- className: classNames[UI.Month],
4271
- style: styles?.[UI.Month],
4272
- // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
4273
- key: displayIndex,
4274
- displayIndex,
4275
- calendarMonth
4276
- },
4277
- navLayout === "around" && !props.hideNavigation && displayIndex === 0 && React26.createElement(
4278
- components.PreviousMonthButton,
4279
- { type: "button", className: classNames[UI.PreviousMonthButton], style: styles?.[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
4280
- React26.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles?.[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
4281
- ),
4282
- React26.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth, displayIndex }, captionLayout?.startsWith("dropdown") ? React26.createElement(
4283
- components.DropdownNav,
4284
- { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },
4285
- (() => {
4286
- const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React26.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date, monthOffset), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: getDropdownStyle(UI.MonthsDropdown), value: dateLib.getMonth(calendarMonth.date) }) : React26.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
4287
- const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React26.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date, monthOffset), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: getDropdownStyle(UI.YearsDropdown), value: dateLib.getYear(calendarMonth.date) }) : React26.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
4288
- const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
4289
- return controls;
4290
- })(),
4291
- React26.createElement("span", { role: "status", "aria-live": "polite", style: {
4292
- border: 0,
4293
- clip: "rect(0 0 0 0)",
4294
- height: "1px",
4295
- margin: "-1px",
4296
- overflow: "hidden",
4297
- padding: 0,
4298
- position: "absolute",
4299
- width: "1px",
4300
- whiteSpace: "nowrap",
4301
- wordWrap: "normal"
4302
- } }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
4303
- ) : React26.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], style: styles?.[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
4304
- navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React26.createElement(
4305
- components.NextMonthButton,
4306
- { type: "button", className: classNames[UI.NextMonthButton], style: styles?.[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
4307
- React26.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles?.[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
4308
- ),
4309
- displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && React26.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
4310
- React26.createElement(
4311
- components.MonthGrid,
4312
- { role: "grid", "aria-multiselectable": mode === "multiple" || mode === "range", "aria-label": labelGrid2(calendarMonth.date, dateLib.options, dateLib) || void 0, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },
4313
- !props.hideWeekdays && React26.createElement(
4314
- components.Weekdays,
4315
- { "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },
4316
- showWeekNumber && React26.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
4317
- weekdays.map((weekday) => React26.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles?.[UI.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
4318
- ),
4319
- React26.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week) => {
4320
- return React26.createElement(
4321
- components.Week,
4322
- { className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week },
4323
- showWeekNumber && React26.createElement(components.WeekNumber, { week, style: styles?.[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
4324
- locale
4325
- }), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
4326
- week.days.map((day) => {
4327
- const { date } = day;
4328
- const modifiers = getModifiers(day);
4329
- modifiers[DayFlag.focused] = !modifiers.hidden && Boolean(focused?.isEqualTo(day));
4330
- modifiers[SelectionState.selected] = isSelected?.(date) || modifiers.selected;
4331
- if (isDateRange(selectedValue)) {
4332
- const { from, to } = selectedValue;
4333
- modifiers[SelectionState.range_start] = Boolean(from && to && dateLib.isSameDay(date, from));
4334
- modifiers[SelectionState.range_end] = Boolean(from && to && dateLib.isSameDay(date, to));
4335
- modifiers[SelectionState.range_middle] = rangeIncludesDate(selectedValue, date, true, dateLib);
4336
- }
4337
- const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
4338
- const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
4339
- const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
4340
- return React26.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React26.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
4341
- })
4342
- );
4343
- }))
4344
- )
4345
- );
4346
- })
4347
- ),
4348
- props.footer && React26.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
4349
- )
4350
- );
4351
- }
4352
- var dayPickerClassNames = {
4353
- selected: `tw:bg-primary tw:border-primary tw:font-medium tw:hover:bg-primary/90 tw:hover:border-primary/90 tw:text-primary-foreground tw:rounded`
4354
- };
4355
- var rangePickerClassNames = {
4356
- range_start: `tw:bg-primary tw:rounded-r-none tw:font-medium tw:border-primary tw:hover:bg-primary/90 tw:hover:border-primary/90 tw:text-primary-foreground`,
4357
- range_end: `tw:bg-primary tw:rounded-l-none tw:font-medium tw:border-primary tw:hover:bg-primary/90 tw:hover:border-primary/90 tw:text-primary-foreground`,
4358
- selected: `tw:font-medium tw:rounded`,
4359
- range_middle: `tw:bg-accent tw:border-accent tw:text-accent-foreground tw:rounded-none tw:font-medium`
4360
- };
4361
- var Calendar = ({ className, classNames, ...props }) => {
4362
- const defaultClassNames = getDefaultClassNames();
4363
- return /* @__PURE__ */ jsx(
4364
- DayPicker,
4365
- {
4366
- ...props,
4367
- captionLayout: "dropdown",
4368
- className: cn(className, "tw:p-3"),
4369
- classNames: {
4370
- chevron: `${defaultClassNames.chevron} tw:fill-foreground`,
4371
- day: `${defaultClassNames.day} tw:hover:bg-accent tw:rounded`,
4372
- day_button: `${defaultClassNames.day_button} tw:rounded`,
4373
- today: `tw:bg-accent tw:text-accent-foreground tw:font-medium`,
4374
- ...dayPickerClassNames,
4375
- ...rangePickerClassNames,
4376
- selected: `${props.mode === "range" ? rangePickerClassNames.selected : dayPickerClassNames.selected}`,
4377
- ...classNames
4378
- },
4379
- required: false
4380
- }
4381
- );
4382
- };
4383
- Calendar.displayName = "Calendar";
4384
-
4385
- export { Calendar };
4386
- //# sourceMappingURL=chunk-YI3WLXEN.js.map
4387
- //# sourceMappingURL=chunk-YI3WLXEN.js.map