@burdenoff/microfe-admin 2026.1030.2 → 2026.1107.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/dist/admin/AdminRoot.d.ts +29 -0
  2. package/dist/admin/AdminRoot.js +34 -31
  3. package/dist/admin/AdminRoot.js.map +1 -1
  4. package/dist/admin/AdminRoutes.d.ts +28 -0
  5. package/dist/admin/AdminRoutes.js +17 -18
  6. package/dist/admin/AdminRoutes.js.map +1 -1
  7. package/dist/admin/components/AccessDenied.d.ts +6 -0
  8. package/dist/admin/components/AccessDenied.js +1 -2
  9. package/dist/admin/components/AccessDenied.js.map +1 -1
  10. package/dist/admin/components/ActivityFeed.d.ts +18 -0
  11. package/dist/admin/components/ActivityFeed.js +23 -24
  12. package/dist/admin/components/ActivityFeed.js.map +1 -1
  13. package/dist/admin/components/Charts.d.ts +31 -0
  14. package/dist/admin/components/Charts.js +14 -15
  15. package/dist/admin/components/Charts.js.map +1 -1
  16. package/dist/admin/components/ConfirmDialog.d.ts +43 -0
  17. package/dist/admin/components/ConfirmDialog.js +7 -8
  18. package/dist/admin/components/ConfirmDialog.js.map +1 -1
  19. package/dist/admin/components/DataTable.d.ts +62 -0
  20. package/dist/admin/components/DataTable.js +37 -38
  21. package/dist/admin/components/DataTable.js.map +1 -1
  22. package/dist/admin/components/FormSheet.d.ts +78 -0
  23. package/dist/admin/components/FormSheet.js +1 -2
  24. package/dist/admin/components/FormSheet.js.map +1 -1
  25. package/dist/admin/components/MarkdownEditor.d.ts +27 -0
  26. package/dist/admin/components/MarkdownEditor.js +1 -2
  27. package/dist/admin/components/MarkdownEditor.js.map +1 -1
  28. package/dist/admin/components/MetricCard.d.ts +43 -0
  29. package/dist/admin/components/MetricCard.js +9 -10
  30. package/dist/admin/components/MetricCard.js.map +1 -1
  31. package/dist/admin/components/PageLayout.d.ts +43 -0
  32. package/dist/admin/components/PageLayout.js +1 -2
  33. package/dist/admin/components/PageLayout.js.map +1 -1
  34. package/dist/admin/components/PermissionGuard.d.ts +10 -0
  35. package/dist/admin/components/PermissionGuard.js +1 -2
  36. package/dist/admin/components/PermissionGuard.js.map +1 -1
  37. package/dist/admin/components/RowActions.d.ts +39 -0
  38. package/dist/admin/components/RowActions.js +13 -14
  39. package/dist/admin/components/RowActions.js.map +1 -1
  40. package/dist/admin/components/StatusBadge.d.ts +33 -0
  41. package/dist/admin/components/StatusBadge.js +11 -12
  42. package/dist/admin/components/StatusBadge.js.map +1 -1
  43. package/dist/admin/components/TenantMembersPanel.d.ts +12 -0
  44. package/dist/admin/components/TenantMembersPanel.js +25 -26
  45. package/dist/admin/components/TenantMembersPanel.js.map +1 -1
  46. package/dist/admin/components/TenantSsoPanel.d.ts +6 -0
  47. package/dist/admin/components/TenantSsoPanel.js +21 -22
  48. package/dist/admin/components/TenantSsoPanel.js.map +1 -1
  49. package/dist/admin/components/Toast.d.ts +24 -0
  50. package/dist/admin/components/Toast.js +1 -2
  51. package/dist/admin/components/Toast.js.map +1 -1
  52. package/dist/admin/components/forms/SubscriptionForm.d.ts +56 -0
  53. package/dist/admin/components/forms/SubscriptionForm.js +22 -23
  54. package/dist/admin/components/forms/SubscriptionForm.js.map +1 -1
  55. package/dist/admin/components/forms/TenantForm.d.ts +67 -0
  56. package/dist/admin/components/forms/TenantForm.js +52 -50
  57. package/dist/admin/components/forms/TenantForm.js.map +1 -1
  58. package/dist/admin/components/forms/TicketForm.d.ts +66 -0
  59. package/dist/admin/components/forms/TicketForm.js +4 -5
  60. package/dist/admin/components/forms/TicketForm.js.map +1 -1
  61. package/dist/admin/components/forms/UserForm.d.ts +56 -0
  62. package/dist/admin/components/forms/UserForm.js +39 -40
  63. package/dist/admin/components/forms/UserForm.js.map +1 -1
  64. package/dist/admin/components/forms/index.d.ts +4 -0
  65. package/dist/admin/components/forms/index.js +4 -3
  66. package/dist/admin/components/index.d.ts +15 -0
  67. package/dist/admin/components/index.js +18 -17
  68. package/dist/admin/components/ui.d.ts +58 -0
  69. package/dist/admin/components/ui.js +1 -2
  70. package/dist/admin/components/ui.js.map +1 -1
  71. package/dist/admin/constants/featureFlags.d.ts +8 -0
  72. package/dist/admin/constants/featureFlags.js +1 -2
  73. package/dist/admin/constants/featureFlags.js.map +1 -1
  74. package/dist/admin/constants/index.d.ts +75 -0
  75. package/dist/admin/constants/index.js +1 -2
  76. package/dist/admin/constants/index.js.map +1 -1
  77. package/dist/admin/constants/permissions.d.ts +28 -0
  78. package/dist/admin/constants/permissions.js +1 -2
  79. package/dist/admin/constants/permissions.js.map +1 -1
  80. package/dist/admin/hooks/useAdminPermissions.d.ts +40 -0
  81. package/dist/admin/hooks/useAdminPermissions.js +2 -3
  82. package/dist/admin/hooks/useAdminPermissions.js.map +1 -1
  83. package/dist/admin/hooks/useTr.d.ts +16 -0
  84. package/dist/admin/hooks/useTr.js +1 -2
  85. package/dist/admin/hooks/useTr.js.map +1 -1
  86. package/dist/admin/index.d.ts +30 -0
  87. package/dist/admin/index.js +9 -8
  88. package/dist/admin/pages/AiSpendPage.d.ts +1 -0
  89. package/dist/admin/pages/AiSpendPage.js +130 -131
  90. package/dist/admin/pages/AiSpendPage.js.map +1 -1
  91. package/dist/admin/pages/AuditLogsPage.d.ts +4 -0
  92. package/dist/admin/pages/AuditLogsPage.js +17 -18
  93. package/dist/admin/pages/AuditLogsPage.js.map +1 -1
  94. package/dist/admin/pages/BillingPage.d.ts +1 -0
  95. package/dist/admin/pages/BillingPage.js +17 -18
  96. package/dist/admin/pages/BillingPage.js.map +1 -1
  97. package/dist/admin/pages/CommunicationsPage.d.ts +1 -0
  98. package/dist/admin/pages/CommunicationsPage.js +15 -16
  99. package/dist/admin/pages/CommunicationsPage.js.map +1 -1
  100. package/dist/admin/pages/ContentPagesPage.d.ts +1 -0
  101. package/dist/admin/pages/ContentPagesPage.js +120 -121
  102. package/dist/admin/pages/ContentPagesPage.js.map +1 -1
  103. package/dist/admin/pages/DashboardPage.d.ts +4 -0
  104. package/dist/admin/pages/DashboardPage.js +1 -2
  105. package/dist/admin/pages/DashboardPage.js.map +1 -1
  106. package/dist/admin/pages/ExploreConversationsPage.d.ts +12 -0
  107. package/dist/admin/pages/ExploreConversationsPage.js +48 -46
  108. package/dist/admin/pages/ExploreConversationsPage.js.map +1 -1
  109. package/dist/admin/pages/FeatureFlagsPage.d.ts +1 -0
  110. package/dist/admin/pages/FeatureFlagsPage.js +1 -2
  111. package/dist/admin/pages/FeatureFlagsPage.js.map +1 -1
  112. package/dist/admin/pages/OrganizationsListPage.d.ts +1 -0
  113. package/dist/admin/pages/OrganizationsListPage.js +1 -2
  114. package/dist/admin/pages/OrganizationsListPage.js.map +1 -1
  115. package/dist/admin/pages/ProductsPage.d.ts +4 -0
  116. package/dist/admin/pages/ProductsPage.js +27 -28
  117. package/dist/admin/pages/ProductsPage.js.map +1 -1
  118. package/dist/admin/pages/ReferralsPage.d.ts +1 -0
  119. package/dist/admin/pages/ReferralsPage.js +20 -25
  120. package/dist/admin/pages/ReferralsPage.js.map +1 -1
  121. package/dist/admin/pages/RolesPermissionsPage.d.ts +1 -0
  122. package/dist/admin/pages/RolesPermissionsPage.js +1 -2
  123. package/dist/admin/pages/RolesPermissionsPage.js.map +1 -1
  124. package/dist/admin/pages/SREPage.d.ts +4 -0
  125. package/dist/admin/pages/SREPage.js +22 -23
  126. package/dist/admin/pages/SREPage.js.map +1 -1
  127. package/dist/admin/pages/SandboxSettingsPage.d.ts +6 -0
  128. package/dist/admin/pages/SandboxSettingsPage.js +79 -84
  129. package/dist/admin/pages/SandboxSettingsPage.js.map +1 -1
  130. package/dist/admin/pages/SettingsPage.d.ts +4 -0
  131. package/dist/admin/pages/SettingsPage.js +39 -40
  132. package/dist/admin/pages/SettingsPage.js.map +1 -1
  133. package/dist/admin/pages/SyncFailuresPage.d.ts +13 -0
  134. package/dist/admin/pages/SyncFailuresPage.js +121 -122
  135. package/dist/admin/pages/SyncFailuresPage.js.map +1 -1
  136. package/dist/admin/pages/TenantDetailPage.d.ts +4 -0
  137. package/dist/admin/pages/TenantDetailPage.js +53 -54
  138. package/dist/admin/pages/TenantDetailPage.js.map +1 -1
  139. package/dist/admin/pages/TenantFormRoutePage.d.ts +5 -0
  140. package/dist/admin/pages/TenantFormRoutePage.js +45 -47
  141. package/dist/admin/pages/TenantFormRoutePage.js.map +1 -1
  142. package/dist/admin/pages/TenantsListPage.d.ts +4 -0
  143. package/dist/admin/pages/TenantsListPage.js +35 -36
  144. package/dist/admin/pages/TenantsListPage.js.map +1 -1
  145. package/dist/admin/pages/UsersListPage.d.ts +4 -0
  146. package/dist/admin/pages/UsersListPage.js +29 -30
  147. package/dist/admin/pages/UsersListPage.js.map +1 -1
  148. package/dist/admin/pages/WaitlistPage.d.ts +1 -0
  149. package/dist/admin/pages/WaitlistPage.js +9 -10
  150. package/dist/admin/pages/WaitlistPage.js.map +1 -1
  151. package/dist/admin/pages/WorkflowsPage.d.ts +1 -0
  152. package/dist/admin/pages/WorkflowsPage.js +13 -14
  153. package/dist/admin/pages/WorkflowsPage.js.map +1 -1
  154. package/dist/admin/pages/WorkspacesListPage.d.ts +2 -0
  155. package/dist/admin/pages/WorkspacesListPage.js +25 -26
  156. package/dist/admin/pages/WorkspacesListPage.js.map +1 -1
  157. package/dist/admin/pages/aiSpend/aiSpendFormat.d.ts +34 -0
  158. package/dist/admin/pages/aiSpend/aiSpendFormat.js +2 -3
  159. package/dist/admin/pages/aiSpend/aiSpendFormat.js.map +1 -1
  160. package/dist/admin/pages/index.d.ts +23 -0
  161. package/dist/admin/pages/index.js +1 -1
  162. package/dist/admin/providers/AdminProvider.d.ts +11 -0
  163. package/dist/admin/providers/AdminProvider.js +8 -9
  164. package/dist/admin/providers/AdminProvider.js.map +1 -1
  165. package/dist/admin/schemas/index.d.ts +337 -0
  166. package/dist/admin/schemas/index.js +2 -3
  167. package/dist/admin/schemas/index.js.map +1 -1
  168. package/dist/admin/store/adminStore.d.ts +26 -0
  169. package/dist/admin/store/adminStore.js +1 -2
  170. package/dist/admin/store/adminStore.js.map +1 -1
  171. package/dist/admin/types/index.d.ts +323 -0
  172. package/dist/admin/utils/cn.d.ts +5 -0
  173. package/dist/admin/utils/cn.js +2 -3
  174. package/dist/admin/utils/cn.js.map +1 -1
  175. package/dist/admin/utils/directActivityGraphql.d.ts +10 -0
  176. package/dist/admin/utils/directActivityGraphql.js +1 -2
  177. package/dist/admin/utils/directActivityGraphql.js.map +1 -1
  178. package/dist/admin/utils/formatters.d.ts +32 -0
  179. package/dist/admin/utils/formatters.js +12 -11
  180. package/dist/admin/utils/formatters.js.map +1 -1
  181. package/dist/admin/utils/gatewayGraphql.d.ts +8 -0
  182. package/dist/admin/utils/i18n.d.ts +4 -0
  183. package/dist/admin/utils/i18n.js +1 -2
  184. package/dist/admin/utils/i18n.js.map +1 -1
  185. package/dist/admin/utils/mappers.d.ts +13 -0
  186. package/dist/admin/utils/mappers.js +2 -3
  187. package/dist/admin/utils/mappers.js.map +1 -1
  188. package/dist/admin/utils/navigation.d.ts +8 -0
  189. package/dist/admin/utils/navigation.js +1 -2
  190. package/dist/admin/utils/navigation.js.map +1 -1
  191. package/dist/admin/utils/tenantEvents.d.ts +9 -0
  192. package/dist/admin/utils/tenantEvents.js +1 -2
  193. package/dist/admin/utils/tenantEvents.js.map +1 -1
  194. package/dist/dev/main.d.ts +0 -0
  195. package/dist/generated/global-operations.d.ts +3410 -0
  196. package/dist/generated/global-operations.js +137 -138
  197. package/dist/generated/global-operations.js.map +1 -1
  198. package/dist/generated/global-types.d.ts +27174 -0
  199. package/dist/generated/global-types.js +1 -2
  200. package/dist/generated/global-types.js.map +1 -1
  201. package/dist/generated/wspace-operations.d.ts +224 -0
  202. package/dist/generated/wspace-operations.js +2 -3
  203. package/dist/generated/wspace-operations.js.map +1 -1
  204. package/dist/generated/wspace-types.d.ts +123963 -0
  205. package/dist/index.d.ts +5 -0
  206. package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +4 -5
  207. package/dist/node_modules/@hookform/resolvers/dist/resolvers.js.map +1 -1
  208. package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +83 -75
  209. package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js.map +1 -1
  210. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  211. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  212. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +1 -2
  213. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -1
  214. package/dist/node_modules/date-fns/_lib/defaultOptions.js +1 -2
  215. package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +1 -1
  216. package/dist/node_modules/date-fns/_lib/format/formatters.js +27 -21
  217. package/dist/node_modules/date-fns/_lib/format/formatters.js.map +1 -1
  218. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +3 -4
  219. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -1
  220. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +2 -5
  221. package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -1
  222. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +1 -2
  223. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -1
  224. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +2 -3
  225. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -1
  226. package/dist/node_modules/date-fns/_lib/normalizeDates.js +2 -3
  227. package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +1 -1
  228. package/dist/node_modules/date-fns/_lib/protectedTokens.js +1 -2
  229. package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +1 -1
  230. package/dist/node_modules/date-fns/compareAsc.js +3 -4
  231. package/dist/node_modules/date-fns/compareAsc.js.map +1 -1
  232. package/dist/node_modules/date-fns/constants.js +5 -6
  233. package/dist/node_modules/date-fns/constants.js.map +1 -1
  234. package/dist/node_modules/date-fns/constructFrom.js +2 -3
  235. package/dist/node_modules/date-fns/constructFrom.js.map +1 -1
  236. package/dist/node_modules/date-fns/constructNow.js +3 -4
  237. package/dist/node_modules/date-fns/constructNow.js.map +1 -1
  238. package/dist/node_modules/date-fns/differenceInCalendarDays.js +7 -8
  239. package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +1 -1
  240. package/dist/node_modules/date-fns/differenceInCalendarMonths.js +2 -3
  241. package/dist/node_modules/date-fns/differenceInCalendarMonths.js.map +1 -1
  242. package/dist/node_modules/date-fns/differenceInMilliseconds.js +3 -4
  243. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -1
  244. package/dist/node_modules/date-fns/differenceInMonths.js +3 -4
  245. package/dist/node_modules/date-fns/differenceInMonths.js.map +1 -1
  246. package/dist/node_modules/date-fns/differenceInSeconds.js +2 -3
  247. package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -1
  248. package/dist/node_modules/date-fns/endOfDay.js +2 -3
  249. package/dist/node_modules/date-fns/endOfDay.js.map +1 -1
  250. package/dist/node_modules/date-fns/endOfMonth.js +2 -3
  251. package/dist/node_modules/date-fns/endOfMonth.js.map +1 -1
  252. package/dist/node_modules/date-fns/format.js +15 -16
  253. package/dist/node_modules/date-fns/format.js.map +1 -1
  254. package/dist/node_modules/date-fns/formatDistance.js +23 -21
  255. package/dist/node_modules/date-fns/formatDistance.js.map +1 -1
  256. package/dist/node_modules/date-fns/formatDistanceToNow.js +3 -4
  257. package/dist/node_modules/date-fns/formatDistanceToNow.js.map +1 -1
  258. package/dist/node_modules/date-fns/getDayOfYear.js +7 -8
  259. package/dist/node_modules/date-fns/getDayOfYear.js.map +1 -1
  260. package/dist/node_modules/date-fns/getISOWeek.js +6 -7
  261. package/dist/node_modules/date-fns/getISOWeek.js.map +1 -1
  262. package/dist/node_modules/date-fns/getISOWeekYear.js +8 -9
  263. package/dist/node_modules/date-fns/getISOWeekYear.js.map +1 -1
  264. package/dist/node_modules/date-fns/getWeek.js +6 -7
  265. package/dist/node_modules/date-fns/getWeek.js.map +1 -1
  266. package/dist/node_modules/date-fns/getWeekYear.js +9 -10
  267. package/dist/node_modules/date-fns/getWeekYear.js.map +1 -1
  268. package/dist/node_modules/date-fns/isDate.js +2 -3
  269. package/dist/node_modules/date-fns/isDate.js.map +1 -1
  270. package/dist/node_modules/date-fns/isLastDayOfMonth.js +7 -8
  271. package/dist/node_modules/date-fns/isLastDayOfMonth.js.map +1 -1
  272. package/dist/node_modules/date-fns/isValid.js +5 -6
  273. package/dist/node_modules/date-fns/isValid.js.map +1 -1
  274. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -2
  275. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -1
  276. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -2
  277. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -1
  278. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -2
  279. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -1
  280. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -2
  281. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -1
  282. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +1 -2
  283. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -1
  284. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -1
  285. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -1
  286. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +1 -2
  287. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -1
  288. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -1
  289. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -1
  290. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -1
  291. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -1
  292. package/dist/node_modules/date-fns/locale/en-US.js +2 -3
  293. package/dist/node_modules/date-fns/locale/en-US.js.map +1 -1
  294. package/dist/node_modules/date-fns/parseISO.js +3 -4
  295. package/dist/node_modules/date-fns/parseISO.js.map +1 -1
  296. package/dist/node_modules/date-fns/startOfDay.js +2 -3
  297. package/dist/node_modules/date-fns/startOfDay.js.map +1 -1
  298. package/dist/node_modules/date-fns/startOfISOWeek.js +2 -3
  299. package/dist/node_modules/date-fns/startOfISOWeek.js.map +1 -1
  300. package/dist/node_modules/date-fns/startOfISOWeekYear.js +7 -8
  301. package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +1 -1
  302. package/dist/node_modules/date-fns/startOfWeek.js +5 -6
  303. package/dist/node_modules/date-fns/startOfWeek.js.map +1 -1
  304. package/dist/node_modules/date-fns/startOfWeekYear.js +8 -9
  305. package/dist/node_modules/date-fns/startOfWeekYear.js.map +1 -1
  306. package/dist/node_modules/date-fns/startOfYear.js +2 -3
  307. package/dist/node_modules/date-fns/startOfYear.js.map +1 -1
  308. package/dist/node_modules/date-fns/toDate.js +3 -4
  309. package/dist/node_modules/date-fns/toDate.js.map +1 -1
  310. package/dist/node_modules/react-hook-form/dist/index.esm.js +1145 -861
  311. package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
  312. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
  313. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  314. package/dist/node_modules/zod/v3/ZodError.js +1 -2
  315. package/dist/node_modules/zod/v3/ZodError.js.map +1 -1
  316. package/dist/node_modules/zod/v3/errors.js +2 -3
  317. package/dist/node_modules/zod/v3/errors.js.map +1 -1
  318. package/dist/node_modules/zod/v3/helpers/errorUtil.js +1 -2
  319. package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +1 -1
  320. package/dist/node_modules/zod/v3/helpers/parseUtil.js +5 -6
  321. package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +1 -1
  322. package/dist/node_modules/zod/v3/helpers/util.js +2 -3
  323. package/dist/node_modules/zod/v3/helpers/util.js.map +1 -1
  324. package/dist/node_modules/zod/v3/locales/en.js +26 -27
  325. package/dist/node_modules/zod/v3/locales/en.js.map +1 -1
  326. package/dist/node_modules/zod/v3/types.js +966 -956
  327. package/dist/node_modules/zod/v3/types.js.map +1 -1
  328. package/package.json +66 -59
  329. package/dist/node_modules/zod/v4/core/core.js +0 -35
  330. package/dist/node_modules/zod/v4/core/core.js.map +0 -1
  331. package/dist/node_modules/zod/v4/core/errors.js +0 -24
  332. package/dist/node_modules/zod/v4/core/errors.js.map +0 -1
  333. package/dist/node_modules/zod/v4/core/parse.js +0 -29
  334. package/dist/node_modules/zod/v4/core/parse.js.map +0 -1
  335. package/dist/node_modules/zod/v4/core/util.js +0 -20
  336. package/dist/node_modules/zod/v4/core/util.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { normalizeDates as e } from "./_lib/normalizeDates.js";
2
- import t from "./compareAsc.js";
2
+ import { compareAsc as t } from "./compareAsc.js";
3
3
  import n from "./differenceInCalendarMonths.js";
4
4
  import r from "./isLastDayOfMonth.js";
5
- //#region node_modules/date-fns/differenceInMonths.js
5
+ // node_modules/date-fns/differenceInMonths.js
6
6
  function i(i, a, o) {
7
7
  let [s, c, l] = e(o?.in, i, i, a), u = t(c, l), d = Math.abs(n(c, l));
8
8
  if (d < 1) return 0;
@@ -12,7 +12,6 @@ function i(i, a, o) {
12
12
  let p = u * (d - +f);
13
13
  return p === 0 ? 0 : p;
14
14
  }
15
- //#endregion
16
- export { i as default };
15
+ export { i as default, i as differenceInMonths };
17
16
 
18
17
  //# sourceMappingURL=differenceInMonths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"differenceInMonths.js","names":[],"sources":["../../../node_modules/date-fns/differenceInMonths.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.js\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.js\";\n\n/**\n * The {@link differenceInMonths} function options.\n */\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(laterDate, earlierDate, options) {\n const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n laterDate,\n earlierDate,\n );\n\n const sign = compareAsc(workingLaterDate, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarMonths(workingLaterDate, earlierDate_),\n );\n\n if (difference < 1) return 0;\n\n if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)\n workingLaterDate.setDate(30);\n\n workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);\n\n let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;\n\n if (\n isLastDayOfMonth(laterDate_) &&\n difference === 1 &&\n compareAsc(laterDate_, earlierDate_) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n const result = sign * (difference - +isLastMonthNotFull);\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAyBA,SAAgB,EAAmB,GAAW,GAAa,GAAS;CAClE,IAAM,CAAC,GAAY,GAAkB,KAAgB,EACnD,GAAS,IACT,GACA,GACA,EACD,EAEK,IAAO,EAAW,GAAkB,EAAa,EACjD,IAAa,KAAK,IACtB,EAA2B,GAAkB,EAAa,CAC3D;AAED,KAAI,IAAa,EAAG,QAAO;AAK3B,CAHI,EAAiB,UAAU,KAAK,KAAK,EAAiB,SAAS,GAAG,MACpE,EAAiB,QAAQ,GAAG,EAE9B,EAAiB,SAAS,EAAiB,UAAU,GAAG,IAAO,EAAW;CAE1E,IAAI,IAAqB,EAAW,GAAkB,EAAa,KAAK,CAAC;AAEzE,CACE,EAAiB,EAAW,IAC5B,MAAe,KACf,EAAW,GAAY,EAAa,KAAK,MAEzC,IAAqB;CAGvB,IAAM,IAAS,KAAQ,IAAa,CAAC;AACrC,QAAO,MAAW,IAAI,IAAI"}
1
+ {"version":3,"file":"differenceInMonths.js","names":["differenceInCalendarMonths","isLastDayOfMonth","differenceInMonths","laterDate_","workingLaterDate","earlierDate_","normalizeDates","options","laterDate","earlierDate","sign","compareAsc","difference","isLastMonthNotFull","result"],"sources":["../../../node_modules/date-fns/differenceInMonths.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.js\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.js\";\n\n/**\n * The {@link differenceInMonths} function options.\n */\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(laterDate, earlierDate, options) {\n const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n laterDate,\n earlierDate,\n );\n\n const sign = compareAsc(workingLaterDate, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarMonths(workingLaterDate, earlierDate_),\n );\n\n if (difference < 1) return 0;\n\n if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)\n workingLaterDate.setDate(30);\n\n workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);\n\n let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;\n\n if (\n isLastDayOfMonth(laterDate_) &&\n difference === 1 &&\n compareAsc(laterDate_, earlierDate_) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n const result = sign * (difference - +isLastMonthNotFull);\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n"],"ignoreList":[0],"mappings":";;;;;AAyBA,SAAgBE,EAAmB,GAAW,GAAa,GAAS;CAClE,IAAM,CAACC,GAAYC,GAAkBC,KAAgBC,EACnDC,GAAS,IACTC,GACAA,GACAC,CACF,GAEMC,IAAOC,EAAWP,GAAkBC,CAAY,GAChDO,IAAa,KAAK,IACtBZ,EAA2BI,GAAkBC,CAAY,CAC3D;CAEA,IAAIO,IAAa,GAAG,OAAO;CAK3B,AAHIR,EAAiB,SAAS,MAAM,KAAKA,EAAiB,QAAQ,IAAI,MACpEA,EAAiB,QAAQ,EAAE,GAE7BA,EAAiB,SAASA,EAAiB,SAAS,IAAIM,IAAOE,CAAU;CAEzE,IAAIC,IAAqBF,EAAWP,GAAkBC,CAAY,MAAM,CAACK;CAEzE,AACET,EAAiBE,CAAU,KAC3BS,MAAe,KACfD,EAAWR,GAAYE,CAAY,MAAM,MAEzC,IAAqB;CAGvB,IAAMS,IAASJ,KAAQE,IAAa,CAACC;CACrC,OAAOC,MAAW,IAAI,IAAIA;AAC5B"}
@@ -1,11 +1,10 @@
1
1
  import { getRoundingMethod as e } from "./_lib/getRoundingMethod.js";
2
2
  import t from "./differenceInMilliseconds.js";
3
- //#region node_modules/date-fns/differenceInSeconds.js
3
+ // node_modules/date-fns/differenceInSeconds.js
4
4
  function n(n, r, i) {
5
5
  let a = t(n, r) / 1e3;
6
6
  return e(i?.roundingMethod)(a);
7
7
  }
8
- //#endregion
9
- export { n as default };
8
+ export { n as default, n as differenceInSeconds };
10
9
 
11
10
  //# sourceMappingURL=differenceInSeconds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"differenceInSeconds.js","names":[],"sources":["../../../node_modules/date-fns/differenceInSeconds.js"],"sourcesContent":["import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(laterDate, earlierDate, options) {\n const diff = differenceInMilliseconds(laterDate, earlierDate) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n"],"x_google_ignoreList":[0],"mappings":";;;AA8BA,SAAgB,EAAoB,GAAW,GAAa,GAAS;CACnE,IAAM,IAAO,EAAyB,GAAW,EAAY,GAAG;AAChE,QAAO,EAAkB,GAAS,eAAe,CAAC,EAAK"}
1
+ {"version":3,"file":"differenceInSeconds.js","names":["differenceInMilliseconds","differenceInSeconds","diff","laterDate","earlierDate","getRoundingMethod","options"],"sources":["../../../node_modules/date-fns/differenceInSeconds.js"],"sourcesContent":["import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(laterDate, earlierDate, options) {\n const diff = differenceInMilliseconds(laterDate, earlierDate) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n"],"ignoreList":[0],"mappings":";;;AA8BA,SAAgBC,EAAoB,GAAW,GAAa,GAAS;CACnE,IAAMC,IAAOF,EAAyBG,GAAWC,CAAW,IAAI;CAChE,OAAOC,EAAkBC,GAAS,cAAc,CAAC,CAACJ,CAAI;AACxD"}
@@ -1,10 +1,9 @@
1
1
  import e from "./toDate.js";
2
- //#region node_modules/date-fns/endOfDay.js
2
+ // node_modules/date-fns/endOfDay.js
3
3
  function t(t, n) {
4
4
  let r = e(t, n?.in);
5
5
  return r.setHours(23, 59, 59, 999), r;
6
6
  }
7
- //#endregion
8
- export { t as default };
7
+ export { t as default, t as endOfDay };
9
8
 
10
9
  //# sourceMappingURL=endOfDay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"endOfDay.js","names":[],"sources":["../../../node_modules/date-fns/endOfDay.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n"],"x_google_ignoreList":[0],"mappings":";;AA4BA,SAAgB,EAAS,GAAM,GAAS;CACtC,IAAM,IAAQ,EAAO,GAAM,GAAS,GAAG;AAEvC,QADA,EAAM,SAAS,IAAI,IAAI,IAAI,IAAI,EACxB"}
1
+ {"version":3,"file":"endOfDay.js","names":["toDate","endOfDay","_date","date","options"],"sources":["../../../node_modules/date-fns/endOfDay.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n"],"ignoreList":[0],"mappings":";;AA4BA,SAAgBC,EAAS,GAAM,GAAS;CACtC,IAAMC,IAAQF,EAAOG,GAAMC,GAAS,EAAE;CAEtC,OADAF,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT"}
@@ -1,10 +1,9 @@
1
1
  import e from "./toDate.js";
2
- //#region node_modules/date-fns/endOfMonth.js
2
+ // node_modules/date-fns/endOfMonth.js
3
3
  function t(t, n) {
4
4
  let r = e(t, n?.in), i = r.getMonth();
5
5
  return r.setFullYear(r.getFullYear(), i + 1, 0), r.setHours(23, 59, 59, 999), r;
6
6
  }
7
- //#endregion
8
- export { t as default };
7
+ export { t as default, t as endOfMonth };
9
8
 
10
9
  //# sourceMappingURL=endOfMonth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"endOfMonth.js","names":[],"sources":["../../../node_modules/date-fns/endOfMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n"],"x_google_ignoreList":[0],"mappings":";;AA4BA,SAAgB,EAAW,GAAM,GAAS;CACxC,IAAM,IAAQ,EAAO,GAAM,GAAS,GAAG,EACjC,IAAQ,EAAM,UAAU;AAG9B,QAFA,EAAM,YAAY,EAAM,aAAa,EAAE,IAAQ,GAAG,EAAE,EACpD,EAAM,SAAS,IAAI,IAAI,IAAI,IAAI,EACxB"}
1
+ {"version":3,"file":"endOfMonth.js","names":["toDate","endOfMonth","_date","date","options","month"],"sources":["../../../node_modules/date-fns/endOfMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n"],"ignoreList":[0],"mappings":";;AA4BA,SAAgBC,EAAW,GAAM,GAAS;CACxC,IAAMC,IAAQF,EAAOG,GAAMC,GAAS,EAAE,GAChCC,IAAQH,EAAM,SAAS;CAG7B,OAFAA,EAAM,YAAYA,EAAM,YAAY,GAAGG,IAAQ,GAAG,CAAC,GACnDH,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT"}
@@ -1,19 +1,19 @@
1
- import e from "./toDate.js";
1
+ import e from "./locale/en-US.js";
2
2
  import { getDefaultOptions as t } from "./_lib/defaultOptions.js";
3
- import n from "./isValid.js";
4
- import r from "./locale/en-US.js";
5
- import { formatters as i } from "./_lib/format/formatters.js";
6
- import { longFormatters as a } from "./_lib/format/longFormatters.js";
7
- import { isProtectedDayOfYearToken as o, isProtectedWeekYearToken as s, warnOrThrowProtectedError as c } from "./_lib/protectedTokens.js";
8
- //#region node_modules/date-fns/format.js
3
+ import { formatters as n } from "./_lib/format/formatters.js";
4
+ import { longFormatters as r } from "./_lib/format/longFormatters.js";
5
+ import { isProtectedDayOfYearToken as i, isProtectedWeekYearToken as a, warnOrThrowProtectedError as o } from "./_lib/protectedTokens.js";
6
+ import s from "./isValid.js";
7
+ import c from "./toDate.js";
8
+ // node_modules/date-fns/format.js
9
9
  var l = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, u = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, d = /^'([^]*?)'?$/, f = /''/g, p = /[a-zA-Z]/;
10
10
  function m(d, f, m) {
11
- let g = t(), _ = m?.locale ?? g.locale ?? r, v = m?.firstWeekContainsDate ?? m?.locale?.options?.firstWeekContainsDate ?? g.firstWeekContainsDate ?? g.locale?.options?.firstWeekContainsDate ?? 1, y = m?.weekStartsOn ?? m?.locale?.options?.weekStartsOn ?? g.weekStartsOn ?? g.locale?.options?.weekStartsOn ?? 0, b = e(d, m?.in);
12
- if (!n(b)) throw RangeError("Invalid time value");
11
+ let g = t(), _ = m?.locale ?? g.locale ?? e, v = m?.firstWeekContainsDate ?? m?.locale?.options?.firstWeekContainsDate ?? g.firstWeekContainsDate ?? g.locale?.options?.firstWeekContainsDate ?? 1, y = m?.weekStartsOn ?? m?.locale?.options?.weekStartsOn ?? g.weekStartsOn ?? g.locale?.options?.weekStartsOn ?? 0, b = c(d, m?.in);
12
+ if (!s(b)) throw RangeError("Invalid time value");
13
13
  let x = f.match(u).map((e) => {
14
14
  let t = e[0];
15
15
  if (t === "p" || t === "P") {
16
- let n = a[t];
16
+ let n = r[t];
17
17
  return n(e, _.formatLong);
18
18
  }
19
19
  return e;
@@ -27,7 +27,7 @@ function m(d, f, m) {
27
27
  isToken: !1,
28
28
  value: h(e)
29
29
  };
30
- if (i[t]) return {
30
+ if (n[t]) return {
31
31
  isToken: !0,
32
32
  value: e
33
33
  };
@@ -46,16 +46,15 @@ function m(d, f, m) {
46
46
  return x.map((e) => {
47
47
  if (!e.isToken) return e.value;
48
48
  let t = e.value;
49
- (!m?.useAdditionalWeekYearTokens && s(t) || !m?.useAdditionalDayOfYearTokens && o(t)) && c(t, f, String(d));
50
- let n = i[t[0]];
51
- return n(b, t, _.localize, S);
49
+ (!m?.useAdditionalWeekYearTokens && a(t) || !m?.useAdditionalDayOfYearTokens && i(t)) && o(t, f, String(d));
50
+ let r = n[t[0]];
51
+ return r(b, t, _.localize, S);
52
52
  }).join("");
53
53
  }
54
54
  function h(e) {
55
55
  let t = e.match(d);
56
56
  return t ? t[1].replace(f, "'") : e;
57
57
  }
58
- //#endregion
59
- export { m as default };
58
+ export { m as default, m as format, m as formatDate, n as formatters, r as longFormatters };
60
59
 
61
60
  //# sourceMappingURL=format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","names":["defaultLocale"],"sources":["../../../node_modules/date-fns/format.js"],"sourcesContent":["import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AA2BA,IAAM,IACJ,yDAII,IAA6B,qCAE7B,IAAsB,gBACtB,IAAoB,OACpB,IAAgC;AAoStC,SAAgB,EAAO,GAAM,GAAW,GAAS;CAC/C,IAAM,IAAiB,GAAmB,EACpC,IAAS,GAAS,UAAU,EAAe,UAAUA,GAErD,IACJ,GAAS,yBACT,GAAS,QAAQ,SAAS,yBAC1B,EAAe,yBACf,EAAe,QAAQ,SAAS,yBAChC,GAEI,IACJ,GAAS,gBACT,GAAS,QAAQ,SAAS,gBAC1B,EAAe,gBACf,EAAe,QAAQ,SAAS,gBAChC,GAEI,IAAe,EAAO,GAAM,GAAS,GAAG;AAE9C,KAAI,CAAC,EAAQ,EAAa,CACxB,OAAU,WAAW,qBAAqB;CAG5C,IAAI,IAAQ,EACT,MAAM,EAA2B,CACjC,KAAK,MAAc;EAClB,IAAM,IAAiB,EAAU;AACjC,MAAI,MAAmB,OAAO,MAAmB,KAAK;GACpD,IAAM,IAAgB,EAAe;AACrC,UAAO,EAAc,GAAW,EAAO,WAAW;;AAEpD,SAAO;GACP,CACD,KAAK,GAAG,CACR,MAAM,EAAuB,CAC7B,KAAK,MAAc;AAElB,MAAI,MAAc,KAChB,QAAO;GAAE,SAAS;GAAO,OAAO;GAAK;EAGvC,IAAM,IAAiB,EAAU;AACjC,MAAI,MAAmB,IACrB,QAAO;GAAE,SAAS;GAAO,OAAO,EAAmB,EAAU;GAAE;AAGjE,MAAI,EAAW,GACb,QAAO;GAAE,SAAS;GAAM,OAAO;GAAW;AAG5C,MAAI,EAAe,MAAM,EAA8B,CACrD,OAAU,WACR,mEACE,IACA,IACH;AAGH,SAAO;GAAE,SAAS;GAAO,OAAO;GAAW;GAC3C;AAGJ,CAAI,EAAO,SAAS,iBAClB,IAAQ,EAAO,SAAS,aAAa,GAAc,EAAM;CAG3D,IAAM,IAAmB;EACvB;EACA;EACA;EACD;AAED,QAAO,EACJ,KAAK,MAAS;AACb,MAAI,CAAC,EAAK,QAAS,QAAO,EAAK;EAE/B,IAAM,IAAQ,EAAK;AAEnB,GACG,CAAC,GAAS,+BACT,EAAyB,EAAM,IAChC,CAAC,GAAS,gCACT,EAA0B,EAAM,KAElC,EAA0B,GAAO,GAAW,OAAO,EAAK,CAAC;EAG3D,IAAM,IAAY,EAAW,EAAM;AACnC,SAAO,EAAU,GAAc,GAAO,EAAO,UAAU,EAAiB;GACxE,CACD,KAAK,GAAG;;AAGb,SAAS,EAAmB,GAAO;CACjC,IAAM,IAAU,EAAM,MAAM,EAAoB;AAMhD,QAJK,IAIE,EAAQ,GAAG,QAAQ,GAAmB,IAAI,GAHxC"}
1
+ {"version":3,"file":"format.js","names":["defaultLocale","enUS","isValid","toDate","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","defaultOptions","getDefaultOptions","locale","options","firstWeekContainsDate","weekStartsOn","originalDate","date","parts","formatStr","firstCharacter","substring","longFormatter","longFormatters","cleanEscapedString","formatters","formatterOptions","part","token","isProtectedWeekYearToken","isProtectedDayOfYearToken","warnOrThrowProtectedError","formatter","matched","input"],"sources":["../../../node_modules/date-fns/format.js"],"sourcesContent":["import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n"],"ignoreList":[0],"mappings":";;;;;;;;AA2BA,IAAMI,IACJ,yDAIIC,IAA6B,qCAE7BC,IAAsB,gBACtBC,IAAoB,OACpBC,IAAgC;AAoStC,SAAgBC,EAAO,GAAM,GAAW,GAAS;CAC/C,IAAMC,IAAiBC,EAAkB,GACnCC,IAASC,GAAS,UAAUH,EAAe,UAAUV,GAErDc,IACJD,GAAS,yBACTA,GAAS,QAAQ,SAAS,yBAC1BH,EAAe,yBACfA,EAAe,QAAQ,SAAS,yBAChC,GAEIK,IACJF,GAAS,gBACTA,GAAS,QAAQ,SAAS,gBAC1BH,EAAe,gBACfA,EAAe,QAAQ,SAAS,gBAChC,GAEIM,IAAeb,EAAOc,GAAMJ,GAAS,EAAE;CAE7C,IAAI,CAACX,EAAQc,CAAY,GACvB,MAAU,WAAW,oBAAoB;CAG3C,IAAIE,IAAQC,EACT,MAAMd,CAA0B,CAAC,CACjC,KAAK,MAAc;EAClB,IAAMe,IAAiBC,EAAU;EACjC,IAAID,MAAmB,OAAOA,MAAmB,KAAK;GACpD,IAAME,IAAgBC,EAAeH;GACrC,OAAOE,EAAcD,GAAWT,EAAO,UAAU;EACnD;EACA,OAAOS;CACT,CAAC,CAAC,CACD,KAAK,EAAE,CAAC,CACR,MAAMjB,CAAsB,CAAC,CAC7B,KAAK,MAAc;EAElB,IAAIiB,MAAc,MAChB,OAAO;GAAE,SAAS;GAAO,OAAO;EAAI;EAGtC,IAAMD,IAAiBC,EAAU;EACjC,IAAID,MAAmB,KACrB,OAAO;GAAE,SAAS;GAAO,OAAOI,EAAmBH,CAAS;EAAE;EAGhE,IAAII,EAAWL,IACb,OAAO;GAAE,SAAS;GAAM,OAAOC;EAAU;EAG3C,IAAID,EAAe,MAAMZ,CAA6B,GACpD,MAAU,WACR,mEACEY,IACA,GACJ;EAGF,OAAO;GAAE,SAAS;GAAO,OAAOC;EAAU;CAC5C,CAAC;CAGH,AAAIT,EAAO,SAAS,iBAClB,IAAQA,EAAO,SAAS,aAAaI,GAAcE,CAAK;CAG1D,IAAMQ,IAAmB;EACvB;EACA;EACA;CACF;CAEA,OAAOR,EACJ,KAAK,MAAS;EACb,IAAI,CAACS,EAAK,SAAS,OAAOA,EAAK;EAE/B,IAAMC,IAAQD,EAAK;EAEnB,CACG,CAACd,GAAS,+BACTgB,EAAyBD,CAAK,KAC/B,CAACf,GAAS,gCACTiB,EAA0BF,CAAK,MAEjCG,EAA0BH,GAAOT,GAAW,OAAOF,CAAI,CAAC;EAG1D,IAAMe,IAAYP,EAAWG,EAAM;EACnC,OAAOI,EAAUhB,GAAcY,GAAOhB,EAAO,UAAUc,CAAgB;CACzE,CAAC,CAAC,CACD,KAAK,EAAE;AACZ;AAEA,SAASF,EAAmB,GAAO;CACjC,IAAMS,IAAUC,EAAM,MAAM5B,CAAmB;CAM/C,OAJK2B,IAIEA,EAAQ,EAAE,CAAC,QAAQ1B,GAAmB,GAAG,IAHvC2B;AAIX"}
@@ -1,39 +1,41 @@
1
- import { minutesInDay as e, minutesInMonth as t } from "./constants.js";
2
- import { getDefaultOptions as n } from "./_lib/defaultOptions.js";
3
- import { getTimezoneOffsetInMilliseconds as r } from "./_lib/getTimezoneOffsetInMilliseconds.js";
4
- import { normalizeDates as i } from "./_lib/normalizeDates.js";
5
- import a from "./compareAsc.js";
6
- import o from "./differenceInMonths.js";
7
- import s from "./differenceInSeconds.js";
8
- import c from "./locale/en-US.js";
9
- //#region node_modules/date-fns/formatDistance.js
1
+ import e from "./locale/en-US.js";
2
+ import { getDefaultOptions as t } from "./_lib/defaultOptions.js";
3
+ import { getTimezoneOffsetInMilliseconds as n } from "./_lib/getTimezoneOffsetInMilliseconds.js";
4
+ import { normalizeDates as r } from "./_lib/normalizeDates.js";
5
+ import { compareAsc as i } from "./compareAsc.js";
6
+ import { minutesInDay as a, minutesInMonth as o } from "./constants.js";
7
+ import s from "./differenceInMonths.js";
8
+ import c from "./differenceInSeconds.js";
9
+ // node_modules/date-fns/formatDistance.js
10
10
  function l(l, u, d) {
11
- let f = n(), p = d?.locale ?? f.locale ?? c, m = a(l, u);
11
+ let f = t(), p = d?.locale ?? f.locale ?? e, m = i(l, u);
12
12
  if (isNaN(m)) throw RangeError("Invalid time value");
13
13
  let h = Object.assign({}, d, {
14
14
  addSuffix: d?.addSuffix,
15
15
  comparison: m
16
- }), [g, _] = i(d?.in, ...m > 0 ? [u, l] : [l, u]), v = s(_, g), y = (r(_) - r(g)) / 1e3, b = Math.round((v - y) / 60), x;
16
+ }), [g, _] = r(d?.in, ...m > 0 ? [u, l] : [l, u]), v = c(_, g), y = (n(_) - n(g)) / 1e3, b = Math.round((v - y) / 60), x;
17
17
  if (b < 2) return d?.includeSeconds ? v < 5 ? p.formatDistance("lessThanXSeconds", 5, h) : v < 10 ? p.formatDistance("lessThanXSeconds", 10, h) : v < 20 ? p.formatDistance("lessThanXSeconds", 20, h) : v < 40 ? p.formatDistance("halfAMinute", 0, h) : v < 60 ? p.formatDistance("lessThanXMinutes", 1, h) : p.formatDistance("xMinutes", 1, h) : b === 0 ? p.formatDistance("lessThanXMinutes", 1, h) : p.formatDistance("xMinutes", b, h);
18
18
  if (b < 45) return p.formatDistance("xMinutes", b, h);
19
19
  if (b < 90) return p.formatDistance("aboutXHours", 1, h);
20
20
  if (b < 1440) {
21
21
  let e = Math.round(b / 60);
22
22
  return p.formatDistance("aboutXHours", e, h);
23
- } else if (b < 2520) return p.formatDistance("xDays", 1, h);
24
- else if (b < 43200) {
25
- let t = Math.round(b / e);
26
- return p.formatDistance("xDays", t, h);
27
- } else if (b < 43200 * 2) return x = Math.round(b / t), p.formatDistance("aboutXMonths", x, h);
28
- if (x = o(_, g), x < 12) {
29
- let e = Math.round(b / t);
23
+ }
24
+ if (b < 2520) return p.formatDistance("xDays", 1, h);
25
+ if (b < 43200) {
26
+ let e = Math.round(b / a);
27
+ return p.formatDistance("xDays", e, h);
28
+ }
29
+ if (b < 86400) return x = Math.round(b / o), p.formatDistance("aboutXMonths", x, h);
30
+ if (x = s(_, g), x < 12) {
31
+ let e = Math.round(b / o);
30
32
  return p.formatDistance("xMonths", e, h);
31
- } else {
33
+ }
34
+ {
32
35
  let e = x % 12, t = Math.trunc(x / 12);
33
36
  return e < 3 ? p.formatDistance("aboutXYears", t, h) : e < 9 ? p.formatDistance("overXYears", t, h) : p.formatDistance("almostXYears", t + 1, h);
34
37
  }
35
38
  }
36
- //#endregion
37
- export { l as default };
39
+ export { l as default, l as formatDistance };
38
40
 
39
41
  //# sourceMappingURL=formatDistance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatDistance.js","names":["defaultLocale"],"sources":["../../../node_modules/date-fns/formatDistance.js"],"sourcesContent":["import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { minutesInDay, minutesInMonth } from \"./constants.js\";\nimport { differenceInMonths } from \"./differenceInMonths.js\";\nimport { differenceInSeconds } from \"./differenceInSeconds.js\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param laterDate - The date\n * @param earlierDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistance(laterDate, earlierDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(laterDate, earlierDate);\n\n if (isNaN(comparison)) throw new RangeError(\"Invalid time value\");\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n ...(comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]),\n );\n\n const seconds = differenceInSeconds(earlierDate_, laterDate_);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(earlierDate_) -\n getTimezoneOffsetInMilliseconds(laterDate_)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(earlierDate_, laterDate_);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AA2FA,SAAgB,EAAe,GAAW,GAAa,GAAS;CAC9D,IAAM,IAAiB,GAAmB,EACpC,IAAS,GAAS,UAAU,EAAe,UAAUA,GAGrD,IAAa,EAAW,GAAW,EAAY;AAErD,KAAI,MAAM,EAAW,CAAE,OAAU,WAAW,qBAAqB;CAEjE,IAAM,IAAkB,OAAO,OAAO,EAAE,EAAE,GAAS;EACjD,WAAW,GAAS;EACR;EACb,CAAC,EAEI,CAAC,GAAY,KAAgB,EACjC,GAAS,IACT,GAAI,IAAa,IAAI,CAAC,GAAa,EAAU,GAAG,CAAC,GAAW,EAAY,CACzE,EAEK,IAAU,EAAoB,GAAc,EAAW,EACvD,KACH,EAAgC,EAAa,GAC5C,EAAgC,EAAW,IAC7C,KACI,IAAU,KAAK,OAAO,IAAU,KAAmB,GAAG,EACxD;AAGJ,KAAI,IAAU,EAmBR,QAlBA,GAAS,iBACP,IAAU,IACL,EAAO,eAAe,oBAAoB,GAAG,EAAgB,GAC3D,IAAU,KACZ,EAAO,eAAe,oBAAoB,IAAI,EAAgB,GAC5D,IAAU,KACZ,EAAO,eAAe,oBAAoB,IAAI,EAAgB,GAC5D,IAAU,KACZ,EAAO,eAAe,eAAe,GAAG,EAAgB,GACtD,IAAU,KACZ,EAAO,eAAe,oBAAoB,GAAG,EAAgB,GAE7D,EAAO,eAAe,YAAY,GAAG,EAAgB,GAG1D,MAAY,IACP,EAAO,eAAe,oBAAoB,GAAG,EAAgB,GAE7D,EAAO,eAAe,YAAY,GAAS,EAAgB;KAK7D,IAAU,GACnB,QAAO,EAAO,eAAe,YAAY,GAAS,EAAgB;KAGzD,IAAU,GACnB,QAAO,EAAO,eAAe,eAAe,GAAG,EAAgB;KAGtD,IAAA,MAAwB;EACjC,IAAM,IAAQ,KAAK,MAAM,IAAU,GAAG;AACtC,SAAO,EAAO,eAAe,eAAe,GAAO,EAAgB;YAG1D,IAAU,KACnB,QAAO,EAAO,eAAe,SAAS,GAAG,EAAgB;UAGhD,IAAA,OAA0B;EACnC,IAAM,IAAO,KAAK,MAAM,IAAU,EAAa;AAC/C,SAAO,EAAO,eAAe,SAAS,GAAM,EAAgB;YAGnD,IAAA,QAA2B,EAEpC,QADA,IAAS,KAAK,MAAM,IAAU,EAAe,EACtC,EAAO,eAAe,gBAAgB,GAAQ,EAAgB;AAMvE,KAHA,IAAS,EAAmB,GAAc,EAAW,EAGjD,IAAS,IAAI;EACf,IAAM,IAAe,KAAK,MAAM,IAAU,EAAe;AACzD,SAAO,EAAO,eAAe,WAAW,GAAc,EAAgB;QAGjE;EACL,IAAM,IAAyB,IAAS,IAClC,IAAQ,KAAK,MAAM,IAAS,GAAG;AAYnC,SATE,IAAyB,IACpB,EAAO,eAAe,eAAe,GAAO,EAAgB,GAG1D,IAAyB,IAC3B,EAAO,eAAe,cAAc,GAAO,EAAgB,GAI3D,EAAO,eAAe,gBAAgB,IAAQ,GAAG,EAAgB"}
1
+ {"version":3,"file":"formatDistance.js","names":["defaultLocale","enUS","differenceInMonths","differenceInSeconds","formatDistance","defaultOptions","getDefaultOptions","locale","options","comparison","compareAsc","laterDate","earlierDate","localizeOptions","laterDate_","earlierDate_","normalizeDates","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","hours","days","minutesInDay","minutesInMonth","nearestMonth","monthsSinceStartOfYear","years"],"sources":["../../../node_modules/date-fns/formatDistance.js"],"sourcesContent":["import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { minutesInDay, minutesInMonth } from \"./constants.js\";\nimport { differenceInMonths } from \"./differenceInMonths.js\";\nimport { differenceInSeconds } from \"./differenceInSeconds.js\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param laterDate - The date\n * @param earlierDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistance(laterDate, earlierDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(laterDate, earlierDate);\n\n if (isNaN(comparison)) throw new RangeError(\"Invalid time value\");\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n ...(comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]),\n );\n\n const seconds = differenceInSeconds(earlierDate_, laterDate_);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(earlierDate_) -\n getTimezoneOffsetInMilliseconds(laterDate_)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(earlierDate_, laterDate_);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n"],"ignoreList":[0],"mappings":";;;;;;;;;AA2FA,SAAgBI,EAAe,GAAW,GAAa,GAAS;CAC9D,IAAMC,IAAiBC,EAAkB,GACnCC,IAASC,GAAS,UAAUH,EAAe,UAAUL,GAGrDS,IAAaC,EAAWC,GAAWC,CAAW;CAEpD,IAAI,MAAMH,CAAU,GAAG,MAAU,WAAW,oBAAoB;CAEhE,IAAMI,IAAkB,OAAO,OAAO,CAAC,GAAGL,GAAS;EACjD,WAAWA,GAAS;EACR;CACd,CAAC,GAEK,CAACM,GAAYC,KAAgBC,EACjCR,GAAS,IACT,GAAIC,IAAa,IAAI,CAACG,GAAaD,CAAS,IAAI,CAACA,GAAWC,CAAW,CACzE,GAEMK,IAAUd,EAAoBY,GAAcD,CAAU,GACtDI,KACHC,EAAgCJ,CAAY,IAC3CI,EAAgCL,CAAU,KAC5C,KACIM,IAAU,KAAK,OAAOH,IAAUC,KAAmB,EAAE,GACvDG;CAGJ,IAAID,IAAU,GAmBR,OAlBAZ,GAAS,iBACPS,IAAU,IACLV,EAAO,eAAe,oBAAoB,GAAGM,CAAe,IAC1DI,IAAU,KACZV,EAAO,eAAe,oBAAoB,IAAIM,CAAe,IAC3DI,IAAU,KACZV,EAAO,eAAe,oBAAoB,IAAIM,CAAe,IAC3DI,IAAU,KACZV,EAAO,eAAe,eAAe,GAAGM,CAAe,IACrDI,IAAU,KACZV,EAAO,eAAe,oBAAoB,GAAGM,CAAe,IAE5DN,EAAO,eAAe,YAAY,GAAGM,CAAe,IAGzDO,MAAY,IACPb,EAAO,eAAe,oBAAoB,GAAGM,CAAe,IAE5DN,EAAO,eAAe,YAAYa,GAASP,CAAe;CAKhE,IAAIO,IAAU,IACnB,OAAOb,EAAO,eAAe,YAAYa,GAASP,CAAe;CAG5D,IAAIO,IAAU,IACnB,OAAOb,EAAO,eAAe,eAAe,GAAGM,CAAe;CAGzD,IAAIO,IAAA,MAAwB;EACjC,IAAME,IAAQ,KAAK,MAAMF,IAAU,EAAE;EACrC,OAAOb,EAAO,eAAe,eAAee,GAAOT,CAAe;CAGpE;CAAO,IAAIO,IAAU,MACnB,OAAOb,EAAO,eAAe,SAAS,GAAGM,CAAe;CAGnD,IAAIO,IAAA,OAA0B;EACnC,IAAMG,IAAO,KAAK,MAAMH,IAAUI,CAAY;EAC9C,OAAOjB,EAAO,eAAe,SAASgB,GAAMV,CAAe;CAG7D;CAAO,IAAIO,IAAA,OAET,OADA,IAAS,KAAK,MAAMA,IAAUK,CAAc,GACrClB,EAAO,eAAe,gBAAgBc,GAAQR,CAAe;CAMtE,IAHA,IAASX,EAAmBa,GAAcD,CAAU,GAGhDO,IAAS,IAAI;EACf,IAAMK,IAAe,KAAK,MAAMN,IAAUK,CAAc;EACxD,OAAOlB,EAAO,eAAe,WAAWmB,GAAcb,CAAe;CAGvE;CAAO;EACL,IAAMc,IAAyBN,IAAS,IAClCO,IAAQ,KAAK,MAAMP,IAAS,EAAE;EAYlC,OATEM,IAAyB,IACpBpB,EAAO,eAAe,eAAeqB,GAAOf,CAAe,IAGzDc,IAAyB,IAC3BpB,EAAO,eAAe,cAAcqB,GAAOf,CAAe,IAI1DN,EAAO,eAAe,gBAAgBqB,IAAQ,GAAGf,CAAe;CAE3E;AACF"}
@@ -1,10 +1,9 @@
1
- import e from "./constructNow.js";
1
+ import { constructNow as e } from "./constructNow.js";
2
2
  import t from "./formatDistance.js";
3
- //#region node_modules/date-fns/formatDistanceToNow.js
3
+ // node_modules/date-fns/formatDistanceToNow.js
4
4
  function n(n, r) {
5
5
  return t(n, e(n), r);
6
6
  }
7
- //#endregion
8
- export { n as default };
7
+ export { n as default, n as formatDistanceToNow };
9
8
 
10
9
  //# sourceMappingURL=formatDistanceToNow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatDistanceToNow.js","names":[],"sources":["../../../node_modules/date-fns/formatDistanceToNow.js"],"sourcesContent":["import { constructNow } from \"./constructNow.js\";\n\nimport { formatDistance } from \"./formatDistance.js\";\n\n/**\n * The {@link formatDistanceToNow} function options.\n */\n\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param date - The given date\n * @param options - The object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistanceToNow(date, options) {\n return formatDistance(date, constructNow(date), options);\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceToNow;\n"],"x_google_ignoreList":[0],"mappings":";;;AAyFA,SAAgB,EAAoB,GAAM,GAAS;AACjD,QAAO,EAAe,GAAM,EAAa,EAAK,EAAE,EAAQ"}
1
+ {"version":3,"file":"formatDistanceToNow.js","names":["formatDistance","formatDistanceToNow","date","constructNow","options"],"sources":["../../../node_modules/date-fns/formatDistanceToNow.js"],"sourcesContent":["import { constructNow } from \"./constructNow.js\";\n\nimport { formatDistance } from \"./formatDistance.js\";\n\n/**\n * The {@link formatDistanceToNow} function options.\n */\n\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param date - The given date\n * @param options - The object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * const result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * const result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * const result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * const eoLocale = require('date-fns/locale/eo')\n * const result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nexport function formatDistanceToNow(date, options) {\n return formatDistance(date, constructNow(date), options);\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceToNow;\n"],"ignoreList":[0],"mappings":";;;AAyFA,SAAgBC,EAAoB,GAAM,GAAS;CACjD,OAAOD,EAAeE,GAAMC,EAAaD,CAAI,GAAGE,CAAO;AACzD"}
@@ -1,12 +1,11 @@
1
- import e from "./toDate.js";
2
- import t from "./differenceInCalendarDays.js";
3
- import n from "./startOfYear.js";
4
- //#region node_modules/date-fns/getDayOfYear.js
1
+ import e from "./differenceInCalendarDays.js";
2
+ import t from "./startOfYear.js";
3
+ import n from "./toDate.js";
4
+ // node_modules/date-fns/getDayOfYear.js
5
5
  function r(r, i) {
6
- let a = e(r, i?.in);
7
- return t(a, n(a)) + 1;
6
+ let a = n(r, i?.in);
7
+ return e(a, t(a)) + 1;
8
8
  }
9
- //#endregion
10
- export { r as default };
9
+ export { r as default, r as getDayOfYear };
11
10
 
12
11
  //# sourceMappingURL=getDayOfYear.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDayOfYear.js","names":[],"sources":["../../../node_modules/date-fns/getDayOfYear.js"],"sourcesContent":["import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n"],"x_google_ignoreList":[0],"mappings":";;;;AA0BA,SAAgB,EAAa,GAAM,GAAS;CAC1C,IAAM,IAAQ,EAAO,GAAM,GAAS,GAAG;AAGvC,QAFa,EAAyB,GAAO,EAAY,EAAM,CAAC,GACvC"}
1
+ {"version":3,"file":"getDayOfYear.js","names":["differenceInCalendarDays","startOfYear","toDate","getDayOfYear","_date","date","options"],"sources":["../../../node_modules/date-fns/getDayOfYear.js"],"sourcesContent":["import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n"],"ignoreList":[0],"mappings":";;;;AA0BA,SAAgBG,EAAa,GAAM,GAAS;CAC1C,IAAMC,IAAQF,EAAOG,GAAMC,GAAS,EAAE;CAGtC,OAFaN,EAAyBI,GAAOH,EAAYG,CAAK,CACzC,IAAI;AAE3B"}
@@ -1,13 +1,12 @@
1
1
  import { millisecondsInWeek as e } from "./constants.js";
2
- import t from "./toDate.js";
3
- import n from "./startOfISOWeek.js";
4
- import r from "./startOfISOWeekYear.js";
5
- //#region node_modules/date-fns/getISOWeek.js
2
+ import t from "./startOfISOWeek.js";
3
+ import n from "./startOfISOWeekYear.js";
4
+ import r from "./toDate.js";
5
+ // node_modules/date-fns/getISOWeek.js
6
6
  function i(i, a) {
7
- let o = t(i, a?.in), s = n(o) - +r(o);
7
+ let o = r(i, a?.in), s = +t(o) - n(o);
8
8
  return Math.round(s / e) + 1;
9
9
  }
10
- //#endregion
11
- export { i as default };
10
+ export { i as default, i as getISOWeek };
12
11
 
13
12
  //# sourceMappingURL=getISOWeek.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getISOWeek.js","names":[],"sources":["../../../node_modules/date-fns/getISOWeek.js"],"sourcesContent":["import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n"],"x_google_ignoreList":[0],"mappings":";;;;;AA6BA,SAAgB,EAAW,GAAM,GAAS;CACxC,IAAM,IAAQ,EAAO,GAAM,GAAS,GAAG,EACjC,IAAQ,EAAe,EAAM,GAAG,CAAC,EAAmB,EAAM;AAKhE,QAAO,KAAK,MAAM,IAAO,EAAmB,GAAG"}
1
+ {"version":3,"file":"getISOWeek.js","names":["startOfISOWeek","startOfISOWeekYear","toDate","getISOWeek","_date","date","options","diff","millisecondsInWeek"],"sources":["../../../node_modules/date-fns/getISOWeek.js"],"sourcesContent":["import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n"],"ignoreList":[0],"mappings":";;;;;AA6BA,SAAgBG,EAAW,GAAM,GAAS;CACxC,IAAMC,IAAQF,EAAOG,GAAMC,GAAS,EAAE,GAChCC,IAAO,CAACP,EAAeI,CAAK,IAAKH,EAAmBG,CAAK;CAK/D,OAAO,KAAK,MAAMG,IAAOC,CAAkB,IAAI;AACjD"}
@@ -1,16 +1,15 @@
1
- import e from "./constructFrom.js";
2
- import t from "./toDate.js";
3
- import n from "./startOfISOWeek.js";
4
- //#region node_modules/date-fns/getISOWeekYear.js
1
+ import { constructFrom as e } from "./constructFrom.js";
2
+ import t from "./startOfISOWeek.js";
3
+ import n from "./toDate.js";
4
+ // node_modules/date-fns/getISOWeekYear.js
5
5
  function r(r, i) {
6
- let a = t(r, i?.in), o = a.getFullYear(), s = e(a, 0);
6
+ let a = n(r, i?.in), o = a.getFullYear(), s = e(a, 0);
7
7
  s.setFullYear(o + 1, 0, 4), s.setHours(0, 0, 0, 0);
8
- let c = n(s), l = e(a, 0);
8
+ let c = t(s), l = e(a, 0);
9
9
  l.setFullYear(o, 0, 4), l.setHours(0, 0, 0, 0);
10
- let u = n(l);
10
+ let u = t(l);
11
11
  return a.getTime() >= c.getTime() ? o + 1 : a.getTime() >= u.getTime() ? o : o - 1;
12
12
  }
13
- //#endregion
14
- export { r as default };
13
+ export { r as default, r as getISOWeekYear };
15
14
 
16
15
  //# sourceMappingURL=getISOWeekYear.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getISOWeekYear.js","names":[],"sources":["../../../node_modules/date-fns/getISOWeekYear.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n"],"x_google_ignoreList":[0],"mappings":";;;;AA4BA,SAAgB,EAAe,GAAM,GAAS;CAC5C,IAAM,IAAQ,EAAO,GAAM,GAAS,GAAG,EACjC,IAAO,EAAM,aAAa,EAE1B,IAA4B,EAAc,GAAO,EAAE;AAEzD,CADA,EAA0B,YAAY,IAAO,GAAG,GAAG,EAAE,EACrD,EAA0B,SAAS,GAAG,GAAG,GAAG,EAAE;CAC9C,IAAM,IAAkB,EAAe,EAA0B,EAE3D,IAA4B,EAAc,GAAO,EAAE;AAEzD,CADA,EAA0B,YAAY,GAAM,GAAG,EAAE,EACjD,EAA0B,SAAS,GAAG,GAAG,GAAG,EAAE;CAC9C,IAAM,IAAkB,EAAe,EAA0B;AAO/D,QALE,EAAM,SAAS,IAAI,EAAgB,SAAS,GACvC,IAAO,IACL,EAAM,SAAS,IAAI,EAAgB,SAAS,GAC9C,IAEA,IAAO"}
1
+ {"version":3,"file":"getISOWeekYear.js","names":["startOfISOWeek","toDate","getISOWeekYear","_date","date","options","year","fourthOfJanuaryOfNextYear","constructFrom","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear"],"sources":["../../../node_modules/date-fns/getISOWeekYear.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n"],"ignoreList":[0],"mappings":";;;;AA4BA,SAAgBE,EAAe,GAAM,GAAS;CAC5C,IAAMC,IAAQF,EAAOG,GAAMC,GAAS,EAAE,GAChCC,IAAOH,EAAM,YAAY,GAEzBI,IAA4BC,EAAcL,GAAO,CAAC;CAExD,AADAI,EAA0B,YAAYD,IAAO,GAAG,GAAG,CAAC,GACpDC,EAA0B,SAAS,GAAG,GAAG,GAAG,CAAC;CAC7C,IAAME,IAAkBT,EAAeO,CAAyB,GAE1DG,IAA4BF,EAAcL,GAAO,CAAC;CAExD,AADAO,EAA0B,YAAYJ,GAAM,GAAG,CAAC,GAChDI,EAA0B,SAAS,GAAG,GAAG,GAAG,CAAC;CAC7C,IAAMC,IAAkBX,EAAeU,CAAyB;CAO9D,OALEP,EAAM,QAAQ,KAAKM,EAAgB,QAAQ,IACtCH,IAAO,IACLH,EAAM,QAAQ,KAAKQ,EAAgB,QAAQ,IAC7CL,IAEAA,IAAO;AAElB"}