@govbr-ds/webcomponents 2.1.0 → 2.1.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 (858) hide show
  1. package/cem/custom-elements.json +63 -63
  2. package/dist/cjs/app-globals-DcqHuMBv.js +9 -0
  3. package/dist/cjs/br-avatar.cjs.entry.js +248 -0
  4. package/dist/cjs/br-breadcrumb-item.cjs.entry.js +45 -0
  5. package/dist/cjs/br-breadcrumb.cjs.entry.js +443 -0
  6. package/dist/cjs/br-button_2.cjs.entry.js +280 -0
  7. package/dist/cjs/br-card.cjs.entry.js +111 -0
  8. package/dist/cjs/br-carousel-page.cjs.entry.js +80 -0
  9. package/dist/cjs/br-carousel.cjs.entry.js +565 -0
  10. package/dist/cjs/br-checkbox-group.cjs.entry.js +118 -0
  11. package/dist/cjs/br-checkbox.cjs.entry.js +288 -0
  12. package/dist/cjs/br-checkgroup.cjs.entry.js +20 -0
  13. package/dist/cjs/br-collapse_2.cjs.entry.js +683 -0
  14. package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +83 -0
  15. package/dist/cjs/br-cookiebar-group.cjs.entry.js +309 -0
  16. package/dist/cjs/br-cookiebar-header.cjs.entry.js +39 -0
  17. package/dist/cjs/br-cookiebar-link.cjs.entry.js +54 -0
  18. package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +70 -0
  19. package/dist/cjs/br-cookiebar-note.cjs.entry.js +25 -0
  20. package/dist/cjs/br-cookiebar.cjs.entry.js +758 -0
  21. package/dist/cjs/br-crumb.cjs.entry.js +51 -0
  22. package/dist/cjs/br-date-picker_3.cjs.entry.js +2446 -0
  23. package/dist/cjs/br-datetime-picker.cjs.entry.js +1887 -0
  24. package/dist/cjs/br-divider.cjs.entry.js +225 -0
  25. package/dist/cjs/br-dropdown_2.cjs.entry.js +1856 -0
  26. package/dist/cjs/br-footer-category.cjs.entry.js +102 -0
  27. package/dist/cjs/br-footer-item.cjs.entry.js +52 -0
  28. package/dist/cjs/br-footer-legal.cjs.entry.js +41 -0
  29. package/dist/cjs/br-footer-logo.cjs.entry.js +104 -0
  30. package/dist/cjs/br-footer-social.cjs.entry.js +71 -0
  31. package/dist/cjs/br-footer.cjs.entry.js +92 -0
  32. package/dist/cjs/br-header-function.cjs.entry.js +142 -0
  33. package/dist/cjs/br-header-link.cjs.entry.js +60 -0
  34. package/dist/cjs/br-header-list.cjs.entry.js +279 -0
  35. package/dist/cjs/br-header-logo.cjs.entry.js +177 -0
  36. package/dist/cjs/br-header.cjs.entry.js +642 -0
  37. package/dist/cjs/br-icon.cjs.entry.js +485 -0
  38. package/dist/cjs/br-input.cjs.entry.js +599 -0
  39. package/dist/cjs/br-item.cjs.entry.js +356 -0
  40. package/dist/cjs/br-link.cjs.entry.js +132 -0
  41. package/dist/cjs/br-loading.cjs.entry.js +505 -0
  42. package/dist/cjs/br-magic-button.cjs.entry.js +92 -0
  43. package/dist/cjs/br-menu-group.cjs.entry.js +23 -0
  44. package/dist/cjs/br-menu-header.cjs.entry.js +47 -0
  45. package/dist/cjs/br-menu-info.cjs.entry.js +38 -0
  46. package/dist/cjs/br-menu-item.cjs.entry.js +79 -0
  47. package/dist/cjs/br-menu-link.cjs.entry.js +55 -0
  48. package/dist/cjs/br-menu-list.cjs.entry.js +149 -0
  49. package/dist/cjs/br-menu-logo.cjs.entry.js +75 -0
  50. package/dist/cjs/br-menu-social.cjs.entry.js +65 -0
  51. package/dist/cjs/br-menu.cjs.entry.js +993 -0
  52. package/dist/cjs/br-modal.cjs.entry.js +496 -0
  53. package/dist/cjs/br-notification-body.cjs.entry.js +71 -0
  54. package/dist/cjs/br-notification-header.cjs.entry.js +48 -0
  55. package/dist/cjs/br-notification-item.cjs.entry.js +110 -0
  56. package/dist/cjs/br-notification.cjs.entry.js +334 -0
  57. package/dist/cjs/br-pagination.cjs.entry.js +884 -0
  58. package/dist/cjs/br-radio-group.cjs.entry.js +428 -0
  59. package/dist/cjs/br-radio.cjs.entry.js +357 -0
  60. package/dist/cjs/br-scrim.cjs.entry.js +1336 -0
  61. package/dist/cjs/br-select-input_3.cjs.entry.js +954 -0
  62. package/dist/cjs/br-sign-in.cjs.entry.js +125 -0
  63. package/dist/cjs/br-skip-link-item.cjs.entry.js +20 -0
  64. package/dist/cjs/br-skip-link.cjs.entry.js +362 -0
  65. package/dist/cjs/br-skiplink-item.cjs.entry.js +192 -0
  66. package/dist/cjs/br-slider.cjs.entry.js +688 -0
  67. package/dist/cjs/br-step_2.cjs.entry.js +628 -0
  68. package/dist/cjs/br-switch.cjs.entry.js +245 -0
  69. package/dist/cjs/br-tab-item.cjs.entry.js +185 -0
  70. package/dist/cjs/br-tab.cjs.entry.js +397 -0
  71. package/dist/cjs/br-table-body.cjs.entry.js +37 -0
  72. package/dist/cjs/br-table-cell.cjs.entry.js +184 -0
  73. package/dist/cjs/br-table-header-cell.cjs.entry.js +173 -0
  74. package/dist/cjs/br-table-header.cjs.entry.js +37 -0
  75. package/dist/cjs/br-table-row.cjs.entry.js +81 -0
  76. package/dist/cjs/br-table.cjs.entry.js +680 -0
  77. package/dist/cjs/br-tag.cjs.entry.js +494 -0
  78. package/dist/cjs/br-textarea.cjs.entry.js +306 -0
  79. package/dist/cjs/br-tooltip.cjs.entry.js +627 -0
  80. package/dist/cjs/br-upload.cjs.entry.js +582 -0
  81. package/dist/cjs/br-wizard-panel.cjs.entry.js +54 -0
  82. package/dist/cjs/br-wizard.cjs.entry.js +708 -0
  83. package/dist/cjs/breakpoint-observer-P8veqXg7.js +144 -0
  84. package/dist/cjs/clamp-Co_hWptd.js +25 -0
  85. package/dist/cjs/cookiebar.utils-CB1gQwZ4.js +18 -0
  86. package/dist/cjs/datetime-picker-constants-B5pWeOn1.js +3827 -0
  87. package/dist/cjs/event-CmVdNHxl.js +56 -0
  88. package/dist/cjs/floating-surface-dismiss-ccdiD0KF.js +63 -0
  89. package/dist/cjs/floating-ui-MBI1osio.js +136 -0
  90. package/dist/cjs/floating-ui.dom-BUSTaaxR.js +1715 -0
  91. package/dist/cjs/focus-DuywwJPR.js +30 -0
  92. package/dist/cjs/getNextElement-R9l3JtM9.js +31 -0
  93. package/dist/cjs/iconify-icon-DfODV9bf.js +2307 -0
  94. package/dist/cjs/id-CjRFMzf6.js +20 -0
  95. package/dist/cjs/index-C92n55ch.js +678 -0
  96. package/dist/cjs/index-CRdcutym.js +3287 -0
  97. package/dist/cjs/index.cjs.js +12 -0
  98. package/dist/cjs/isNil-DO5zWc3l.js +19 -0
  99. package/dist/cjs/isValid-Fu3kaWNn.js +3694 -0
  100. package/dist/cjs/loader.cjs.js +17 -0
  101. package/dist/cjs/native-dialog--Ewqm4w0.js +49 -0
  102. package/dist/cjs/navigation-AbzwcRCU.js +25 -0
  103. package/dist/cjs/parts-D5K3ae2C.js +19 -0
  104. package/dist/cjs/props-CScmBvKd.js +24 -0
  105. package/dist/cjs/raf-batcher-yc87a4dS.js +55 -0
  106. package/dist/cjs/slot-DAllytTj.js +48 -0
  107. package/dist/cjs/swipe-BU8_XE9f.js +345 -0
  108. package/dist/cjs/table-constants-BOPSay0B.js +183 -0
  109. package/dist/cjs/validator-CTCajtT9.js +123 -0
  110. package/dist/cjs/webcomponents.cjs.js +50 -0
  111. package/dist/collection/assets/icon-search.svg +6 -0
  112. package/dist/collection/assets/logo-negative.svg +1 -0
  113. package/dist/collection/assets/logo-positive.svg +1 -0
  114. package/dist/collection/assets/wc.svg +1 -0
  115. package/dist/collection/collection-manifest.json +113 -0
  116. package/dist/collection/components/avatar/avatar.css +1 -0
  117. package/dist/collection/components/avatar/avatar.js +589 -0
  118. package/dist/collection/components/avatar/avatar.types.js +1 -0
  119. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +166 -0
  120. package/dist/collection/components/breadcrumb/breadcrumb.css +1 -0
  121. package/dist/collection/components/breadcrumb/breadcrumb.js +619 -0
  122. package/dist/collection/components/breadcrumb/breadcrumb.types.js +1 -0
  123. package/dist/collection/components/breadcrumb/crumb/crumb.js +175 -0
  124. package/dist/collection/components/button/button.css +1 -0
  125. package/dist/collection/components/button/button.js +546 -0
  126. package/dist/collection/components/button/button.types.js +1 -0
  127. package/dist/collection/components/card/card.css +1 -0
  128. package/dist/collection/components/card/card.js +225 -0
  129. package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -0
  130. package/dist/collection/components/carousel/carousel-page/carousel-page.js +195 -0
  131. package/dist/collection/components/carousel/carousel.css +1 -0
  132. package/dist/collection/components/carousel/carousel.js +1217 -0
  133. package/dist/collection/components/carousel/carousel.types.js +1 -0
  134. package/dist/collection/components/checkbox/checkbox.css +1 -0
  135. package/dist/collection/components/checkbox/checkbox.js +823 -0
  136. package/dist/collection/components/checkbox/checkbox.types.js +1 -0
  137. package/dist/collection/components/checkbox-group/checkbox-group.css +1 -0
  138. package/dist/collection/components/checkbox-group/checkbox-group.js +268 -0
  139. package/dist/collection/components/checkgroup/checkgroup.js +166 -0
  140. package/dist/collection/components/collapse/collapse.css +1 -0
  141. package/dist/collection/components/collapse/collapse.js +642 -0
  142. package/dist/collection/components/collapse/collapse.types.js +1 -0
  143. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -0
  144. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +529 -0
  145. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -0
  146. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +628 -0
  147. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -0
  148. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +165 -0
  149. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -0
  150. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +200 -0
  151. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -0
  152. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +100 -0
  153. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -0
  154. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +172 -0
  155. package/dist/collection/components/cookiebar/cookiebar.css +1 -0
  156. package/dist/collection/components/cookiebar/cookiebar.js +1419 -0
  157. package/dist/collection/components/cookiebar/cookiebar.types.js +1 -0
  158. package/dist/collection/components/cookiebar/cookiebar.utils.js +14 -0
  159. package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +94 -0
  160. package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +57 -0
  161. package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -0
  162. package/dist/collection/components/datetime-picker/date-picker/date-picker.js +913 -0
  163. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +65 -0
  164. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -0
  165. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +825 -0
  166. package/dist/collection/components/datetime-picker/datetime-picker-constants.js +36 -0
  167. package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +112 -0
  168. package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +202 -0
  169. package/dist/collection/components/datetime-picker/datetime-picker.css +1 -0
  170. package/dist/collection/components/datetime-picker/datetime-picker.js +1925 -0
  171. package/dist/collection/components/datetime-picker/datetime-picker.types.js +1 -0
  172. package/dist/collection/components/datetime-picker/datetime-picker.utils.js +250 -0
  173. package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +13 -0
  174. package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -0
  175. package/dist/collection/components/datetime-picker/time-picker/time-picker.js +456 -0
  176. package/dist/collection/components/divider/divider.css +1 -0
  177. package/dist/collection/components/divider/divider.js +537 -0
  178. package/dist/collection/components/divider/divider.types.js +1 -0
  179. package/dist/collection/components/dropdown/dropdown.css +1 -0
  180. package/dist/collection/components/dropdown/dropdown.js +939 -0
  181. package/dist/collection/components/dropdown/dropdown.types.js +1 -0
  182. package/dist/collection/components/footer/footer-category/footer-category.css +1 -0
  183. package/dist/collection/components/footer/footer-category/footer-category.js +160 -0
  184. package/dist/collection/components/footer/footer-item/footer-item.css +1 -0
  185. package/dist/collection/components/footer/footer-item/footer-item.js +154 -0
  186. package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -0
  187. package/dist/collection/components/footer/footer-legal/footer-legal.js +75 -0
  188. package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -0
  189. package/dist/collection/components/footer/footer-logo/footer-logo.js +342 -0
  190. package/dist/collection/components/footer/footer-logo/footer-logo.types.js +1 -0
  191. package/dist/collection/components/footer/footer-social/footer-social.css +1 -0
  192. package/dist/collection/components/footer/footer-social/footer-social.js +239 -0
  193. package/dist/collection/components/footer/footer.css +1 -0
  194. package/dist/collection/components/footer/footer.js +245 -0
  195. package/dist/collection/components/footer/footer.types.js +1 -0
  196. package/dist/collection/components/global.types.js +1 -0
  197. package/dist/collection/components/header/header-function/header-function.css +1 -0
  198. package/dist/collection/components/header/header-function/header-function.js +311 -0
  199. package/dist/collection/components/header/header-link/header-link.css +1 -0
  200. package/dist/collection/components/header/header-link/header-link.js +189 -0
  201. package/dist/collection/components/header/header-list/header-list.css +1 -0
  202. package/dist/collection/components/header/header-list/header-list.js +452 -0
  203. package/dist/collection/components/header/header-logo/header-logo.css +1 -0
  204. package/dist/collection/components/header/header-logo/header-logo.js +420 -0
  205. package/dist/collection/components/header/header.css +1 -0
  206. package/dist/collection/components/header/header.js +1131 -0
  207. package/dist/collection/components/header/header.types.js +1 -0
  208. package/dist/collection/components/icon/default-icons-cache.js +233 -0
  209. package/dist/collection/components/icon/icon.css +1 -0
  210. package/dist/collection/components/icon/icon.js +598 -0
  211. package/dist/collection/components/icon/icon.types.js +1 -0
  212. package/dist/collection/components/icon/icon.utils.js +33 -0
  213. package/dist/collection/components/input/input.css +1 -0
  214. package/dist/collection/components/input/input.js +1642 -0
  215. package/dist/collection/components/input/input.types.js +1 -0
  216. package/dist/collection/components/item/item.css +1 -0
  217. package/dist/collection/components/item/item.js +906 -0
  218. package/dist/collection/components/item/item.types.js +1 -0
  219. package/dist/collection/components/link/link.css +1 -0
  220. package/dist/collection/components/link/link.js +698 -0
  221. package/dist/collection/components/list/list.css +1 -0
  222. package/dist/collection/components/list/list.js +728 -0
  223. package/dist/collection/components/loading/loading.css +1 -0
  224. package/dist/collection/components/loading/loading.js +1169 -0
  225. package/dist/collection/components/loading/loading.types.js +1 -0
  226. package/dist/collection/components/magic-button/magic-button.css +1 -0
  227. package/dist/collection/components/magic-button/magic-button.js +237 -0
  228. package/dist/collection/components/menu/menu-group/menu-group.css +1 -0
  229. package/dist/collection/components/menu/menu-group/menu-group.js +77 -0
  230. package/dist/collection/components/menu/menu-header/menu-header.css +1 -0
  231. package/dist/collection/components/menu/menu-header/menu-header.js +161 -0
  232. package/dist/collection/components/menu/menu-info/menu-info.css +1 -0
  233. package/dist/collection/components/menu/menu-info/menu-info.js +94 -0
  234. package/dist/collection/components/menu/menu-item/menu-item.css +1 -0
  235. package/dist/collection/components/menu/menu-item/menu-item.js +306 -0
  236. package/dist/collection/components/menu/menu-item/menu-item.types.js +1 -0
  237. package/dist/collection/components/menu/menu-link/menu-link.css +1 -0
  238. package/dist/collection/components/menu/menu-link/menu-link.js +259 -0
  239. package/dist/collection/components/menu/menu-list/menu-list.css +1 -0
  240. package/dist/collection/components/menu/menu-list/menu-list.js +311 -0
  241. package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -0
  242. package/dist/collection/components/menu/menu-logo/menu-logo.js +230 -0
  243. package/dist/collection/components/menu/menu-social/menu-social.css +1 -0
  244. package/dist/collection/components/menu/menu-social/menu-social.js +263 -0
  245. package/dist/collection/components/menu/menu.css +1 -0
  246. package/dist/collection/components/menu/menu.js +1372 -0
  247. package/dist/collection/components/menu/menu.types.js +1 -0
  248. package/dist/collection/components/menu/menu.utils.js +279 -0
  249. package/dist/collection/components/message/message.css +1 -0
  250. package/dist/collection/components/message/message.js +508 -0
  251. package/dist/collection/components/modal/modal.css +1 -0
  252. package/dist/collection/components/modal/modal.js +842 -0
  253. package/dist/collection/components/modal/modal.types.js +1 -0
  254. package/dist/collection/components/notification/notification-body/notification-body.css +1 -0
  255. package/dist/collection/components/notification/notification-body/notification-body.js +153 -0
  256. package/dist/collection/components/notification/notification-header/notification-header.css +1 -0
  257. package/dist/collection/components/notification/notification-header/notification-header.js +181 -0
  258. package/dist/collection/components/notification/notification-item/notification-item.css +1 -0
  259. package/dist/collection/components/notification/notification-item/notification-item.js +351 -0
  260. package/dist/collection/components/notification/notification-item/notification-item.types.js +1 -0
  261. package/dist/collection/components/notification/notification.css +1 -0
  262. package/dist/collection/components/notification/notification.js +838 -0
  263. package/dist/collection/components/notification/notification.types.js +1 -0
  264. package/dist/collection/components/pagination/pagination.css +1 -0
  265. package/dist/collection/components/pagination/pagination.js +1470 -0
  266. package/dist/collection/components/pagination/pagination.types.js +1 -0
  267. package/dist/collection/components/radio/radio.css +1 -0
  268. package/dist/collection/components/radio/radio.js +847 -0
  269. package/dist/collection/components/radio/radio.types.js +1 -0
  270. package/dist/collection/components/radio-group/radio-group.css +1 -0
  271. package/dist/collection/components/radio-group/radio-group.js +862 -0
  272. package/dist/collection/components/radio-group/radio-group.types.js +1 -0
  273. package/dist/collection/components/scrim/scrim.css +1 -0
  274. package/dist/collection/components/scrim/scrim.js +1825 -0
  275. package/dist/collection/components/scrim/scrim.types.js +1 -0
  276. package/dist/collection/components/scrim/scrim.utils.js +132 -0
  277. package/dist/collection/components/select/select-input/select-input.css +1 -0
  278. package/dist/collection/components/select/select-input/select-input.js +585 -0
  279. package/dist/collection/components/select/select-list/select-list.css +1 -0
  280. package/dist/collection/components/select/select-list/select-list.js +1147 -0
  281. package/dist/collection/components/select/select-option/select-option.css +1 -0
  282. package/dist/collection/components/select/select-option/select-option.js +543 -0
  283. package/dist/collection/components/select/select.constants.js +6 -0
  284. package/dist/collection/components/select/select.css +1 -0
  285. package/dist/collection/components/select/select.js +2575 -0
  286. package/dist/collection/components/select/select.types.js +1 -0
  287. package/dist/collection/components/sign-in/sign-in.css +1 -0
  288. package/dist/collection/components/sign-in/sign-in.js +400 -0
  289. package/dist/collection/components/sign-in/sign-in.types.js +1 -0
  290. package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +103 -0
  291. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -0
  292. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +450 -0
  293. package/dist/collection/components/skip-link/skip-link.css +1 -0
  294. package/dist/collection/components/skip-link/skip-link.js +699 -0
  295. package/dist/collection/components/skip-link/skip-link.types.js +1 -0
  296. package/dist/collection/components/slider/slider.css +1 -0
  297. package/dist/collection/components/slider/slider.js +1325 -0
  298. package/dist/collection/components/slider/slider.types.js +1 -0
  299. package/dist/collection/components/step/step-item/step-item.css +1 -0
  300. package/dist/collection/components/step/step-item/step-item.js +604 -0
  301. package/dist/collection/components/step/step-item/step-item.types.js +1 -0
  302. package/dist/collection/components/step/step.css +1 -0
  303. package/dist/collection/components/step/step.js +896 -0
  304. package/dist/collection/components/step/step.types.js +1 -0
  305. package/dist/collection/components/switch/switch.css +1 -0
  306. package/dist/collection/components/switch/switch.js +715 -0
  307. package/dist/collection/components/switch/switch.types.js +1 -0
  308. package/dist/collection/components/tab/tab-item/tab-item.css +1 -0
  309. package/dist/collection/components/tab/tab-item/tab-item.js +425 -0
  310. package/dist/collection/components/tab/tab.css +1 -0
  311. package/dist/collection/components/tab/tab.js +724 -0
  312. package/dist/collection/components/tab/tab.types.js +1 -0
  313. package/dist/collection/components/table/table-body/table-body.css +1 -0
  314. package/dist/collection/components/table/table-body/table-body.js +51 -0
  315. package/dist/collection/components/table/table-cell/table-cell.css +1 -0
  316. package/dist/collection/components/table/table-cell/table-cell.js +373 -0
  317. package/dist/collection/components/table/table-constants.js +171 -0
  318. package/dist/collection/components/table/table-header/table-header.css +1 -0
  319. package/dist/collection/components/table/table-header/table-header.js +51 -0
  320. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
  321. package/dist/collection/components/table/table-header-cell/table-header-cell.js +402 -0
  322. package/dist/collection/components/table/table-row/table-row.css +1 -0
  323. package/dist/collection/components/table/table-row/table-row.js +261 -0
  324. package/dist/collection/components/table/table-tokens.js +50 -0
  325. package/dist/collection/components/table/table-types.js +1 -0
  326. package/dist/collection/components/table/table-utils.js +44 -0
  327. package/dist/collection/components/table/table.css +1 -0
  328. package/dist/collection/components/table/table.js +1030 -0
  329. package/dist/collection/components/tag/tag.css +1 -0
  330. package/dist/collection/components/tag/tag.js +1153 -0
  331. package/dist/collection/components/tag/tag.types.js +1 -0
  332. package/dist/collection/components/textarea/textarea.css +1 -0
  333. package/dist/collection/components/textarea/textarea.js +985 -0
  334. package/dist/collection/components/textarea/textarea.types.js +1 -0
  335. package/dist/collection/components/tooltip/tooltip.css +1 -0
  336. package/dist/collection/components/tooltip/tooltip.js +1024 -0
  337. package/dist/collection/components/tooltip/tooltip.types.js +1 -0
  338. package/dist/collection/components/upload/upload.css +1 -0
  339. package/dist/collection/components/upload/upload.js +1315 -0
  340. package/dist/collection/components/upload/upload.types.js +1 -0
  341. package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -0
  342. package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +167 -0
  343. package/dist/collection/components/wizard/wizard.css +1 -0
  344. package/dist/collection/components/wizard/wizard.js +1228 -0
  345. package/dist/collection/index.js +14 -0
  346. package/dist/collection/pages/components/cookiebar/index.js +26 -0
  347. package/dist/collection/pages/components/link/index.js +29 -0
  348. package/dist/collection/pages/components/pagination/index.js +12 -0
  349. package/dist/collection/pages/components/slider/index.js +18 -0
  350. package/dist/collection/pages/scripts/code-editor.js +101 -0
  351. package/dist/collection/pages/scripts/component-controls.js +591 -0
  352. package/dist/collection/pages/scripts/dev-event-console.js +47 -0
  353. package/dist/collection/pages/scripts/menu.js +183 -0
  354. package/dist/collection/pages/scripts/pageLoader.js +1420 -0
  355. package/dist/collection/shared/utils/assetsPath.js +75 -0
  356. package/dist/collection/shared/utils/breakpoint-observer.js +139 -0
  357. package/dist/collection/shared/utils/clamp.js +21 -0
  358. package/dist/collection/shared/utils/css-variables.js +12 -0
  359. package/dist/collection/shared/utils/cssVariables.js +37 -0
  360. package/dist/collection/shared/utils/date.js +405 -0
  361. package/dist/collection/shared/utils/debounce.js +39 -0
  362. package/dist/collection/shared/utils/event.js +55 -0
  363. package/dist/collection/shared/utils/floating-surface-dismiss.js +59 -0
  364. package/dist/collection/shared/utils/floating-ui.js +131 -0
  365. package/dist/collection/shared/utils/focus.js +24 -0
  366. package/dist/collection/shared/utils/form.js +82 -0
  367. package/dist/collection/shared/utils/format-bytes.js +20 -0
  368. package/dist/collection/shared/utils/getNextElement.js +30 -0
  369. package/dist/collection/shared/utils/getRandom.js +27 -0
  370. package/dist/collection/shared/utils/helpers.js +31 -0
  371. package/dist/collection/shared/utils/id.js +16 -0
  372. package/dist/collection/shared/utils/index.js +60 -0
  373. package/dist/collection/shared/utils/interfaces.js +1 -0
  374. package/dist/collection/shared/utils/isClient.js +14 -0
  375. package/dist/collection/shared/utils/isDefined.js +19 -0
  376. package/dist/collection/shared/utils/isEmpty.js +30 -0
  377. package/dist/collection/shared/utils/isHTMLElement.js +16 -0
  378. package/dist/collection/shared/utils/isNil.js +15 -0
  379. package/dist/collection/shared/utils/isString.js +20 -0
  380. package/dist/collection/shared/utils/native-dialog.js +44 -0
  381. package/dist/collection/shared/utils/navigation.js +21 -0
  382. package/dist/collection/shared/utils/parts.js +15 -0
  383. package/dist/collection/shared/utils/prop-warning.js +7 -0
  384. package/dist/collection/shared/utils/props.js +37 -0
  385. package/dist/collection/shared/utils/raf-batcher.js +51 -0
  386. package/dist/collection/shared/utils/scrollLock.js +141 -0
  387. package/dist/collection/shared/utils/setRafTimeout.js +38 -0
  388. package/dist/collection/shared/utils/slot.js +113 -0
  389. package/dist/collection/shared/utils/ssr-date.js +33 -0
  390. package/dist/collection/shared/utils/stringToArray.js +29 -0
  391. package/dist/collection/shared/utils/swipe.js +342 -0
  392. package/dist/collection/shared/utils/transition.js +127 -0
  393. package/dist/collection/shared/utils/types.js +1 -0
  394. package/dist/collection/shared/utils/validator.js +51 -0
  395. package/dist/collection/value-accessors/angular-value-accessor-config.js +41 -0
  396. package/dist/collection/value-accessors/index.js +6 -0
  397. package/dist/collection/value-accessors/vue-model-config.js +43 -0
  398. package/dist/components/br-avatar.d.ts +11 -0
  399. package/dist/components/br-avatar.js +5 -0
  400. package/dist/components/br-breadcrumb-item.d.ts +11 -0
  401. package/dist/components/br-breadcrumb-item.js +5 -0
  402. package/dist/components/br-breadcrumb.d.ts +11 -0
  403. package/dist/components/br-breadcrumb.js +5 -0
  404. package/dist/components/br-button.d.ts +11 -0
  405. package/dist/components/br-button.js +5 -0
  406. package/dist/components/br-card.d.ts +11 -0
  407. package/dist/components/br-card.js +5 -0
  408. package/dist/components/br-carousel-page.d.ts +11 -0
  409. package/dist/components/br-carousel-page.js +5 -0
  410. package/dist/components/br-carousel.d.ts +11 -0
  411. package/dist/components/br-carousel.js +5 -0
  412. package/dist/components/br-checkbox-group.d.ts +11 -0
  413. package/dist/components/br-checkbox-group.js +5 -0
  414. package/dist/components/br-checkbox.d.ts +11 -0
  415. package/dist/components/br-checkbox.js +5 -0
  416. package/dist/components/br-checkgroup.d.ts +11 -0
  417. package/dist/components/br-checkgroup.js +5 -0
  418. package/dist/components/br-collapse.d.ts +11 -0
  419. package/dist/components/br-collapse.js +5 -0
  420. package/dist/components/br-cookiebar-cookie.d.ts +11 -0
  421. package/dist/components/br-cookiebar-cookie.js +5 -0
  422. package/dist/components/br-cookiebar-group.d.ts +11 -0
  423. package/dist/components/br-cookiebar-group.js +5 -0
  424. package/dist/components/br-cookiebar-header.d.ts +11 -0
  425. package/dist/components/br-cookiebar-header.js +5 -0
  426. package/dist/components/br-cookiebar-link.d.ts +11 -0
  427. package/dist/components/br-cookiebar-link.js +5 -0
  428. package/dist/components/br-cookiebar-note-group.d.ts +11 -0
  429. package/dist/components/br-cookiebar-note-group.js +5 -0
  430. package/dist/components/br-cookiebar-note.d.ts +11 -0
  431. package/dist/components/br-cookiebar-note.js +5 -0
  432. package/dist/components/br-cookiebar.d.ts +11 -0
  433. package/dist/components/br-cookiebar.js +5 -0
  434. package/dist/components/br-crumb.d.ts +11 -0
  435. package/dist/components/br-crumb.js +5 -0
  436. package/dist/components/br-date-picker.d.ts +11 -0
  437. package/dist/components/br-date-picker.js +5 -0
  438. package/dist/components/br-datetime-input.d.ts +11 -0
  439. package/dist/components/br-datetime-input.js +5 -0
  440. package/dist/components/br-datetime-picker.d.ts +11 -0
  441. package/dist/components/br-datetime-picker.js +5 -0
  442. package/dist/components/br-divider.d.ts +11 -0
  443. package/dist/components/br-divider.js +5 -0
  444. package/dist/components/br-dropdown.d.ts +11 -0
  445. package/dist/components/br-dropdown.js +5 -0
  446. package/dist/components/br-footer-category.d.ts +11 -0
  447. package/dist/components/br-footer-category.js +5 -0
  448. package/dist/components/br-footer-item.d.ts +11 -0
  449. package/dist/components/br-footer-item.js +5 -0
  450. package/dist/components/br-footer-legal.d.ts +11 -0
  451. package/dist/components/br-footer-legal.js +5 -0
  452. package/dist/components/br-footer-logo.d.ts +11 -0
  453. package/dist/components/br-footer-logo.js +5 -0
  454. package/dist/components/br-footer-social.d.ts +11 -0
  455. package/dist/components/br-footer-social.js +5 -0
  456. package/dist/components/br-footer.d.ts +11 -0
  457. package/dist/components/br-footer.js +5 -0
  458. package/dist/components/br-header-function.d.ts +11 -0
  459. package/dist/components/br-header-function.js +5 -0
  460. package/dist/components/br-header-link.d.ts +11 -0
  461. package/dist/components/br-header-link.js +5 -0
  462. package/dist/components/br-header-list.d.ts +11 -0
  463. package/dist/components/br-header-list.js +5 -0
  464. package/dist/components/br-header-logo.d.ts +11 -0
  465. package/dist/components/br-header-logo.js +5 -0
  466. package/dist/components/br-header.d.ts +11 -0
  467. package/dist/components/br-header.js +5 -0
  468. package/dist/components/br-icon.d.ts +11 -0
  469. package/dist/components/br-icon.js +5 -0
  470. package/dist/components/br-input.d.ts +11 -0
  471. package/dist/components/br-input.js +5 -0
  472. package/dist/components/br-item.d.ts +11 -0
  473. package/dist/components/br-item.js +5 -0
  474. package/dist/components/br-link.d.ts +11 -0
  475. package/dist/components/br-link.js +5 -0
  476. package/dist/components/br-list.d.ts +11 -0
  477. package/dist/components/br-list.js +5 -0
  478. package/dist/components/br-loading.d.ts +11 -0
  479. package/dist/components/br-loading.js +5 -0
  480. package/dist/components/br-magic-button.d.ts +11 -0
  481. package/dist/components/br-magic-button.js +5 -0
  482. package/dist/components/br-menu-group.d.ts +11 -0
  483. package/dist/components/br-menu-group.js +5 -0
  484. package/dist/components/br-menu-header.d.ts +11 -0
  485. package/dist/components/br-menu-header.js +5 -0
  486. package/dist/components/br-menu-info.d.ts +11 -0
  487. package/dist/components/br-menu-info.js +5 -0
  488. package/dist/components/br-menu-item.d.ts +11 -0
  489. package/dist/components/br-menu-item.js +5 -0
  490. package/dist/components/br-menu-link.d.ts +11 -0
  491. package/dist/components/br-menu-link.js +5 -0
  492. package/dist/components/br-menu-list.d.ts +11 -0
  493. package/dist/components/br-menu-list.js +5 -0
  494. package/dist/components/br-menu-logo.d.ts +11 -0
  495. package/dist/components/br-menu-logo.js +5 -0
  496. package/dist/components/br-menu-social.d.ts +11 -0
  497. package/dist/components/br-menu-social.js +5 -0
  498. package/dist/components/br-menu.d.ts +11 -0
  499. package/dist/components/br-menu.js +5 -0
  500. package/dist/components/br-message.d.ts +11 -0
  501. package/dist/components/br-message.js +5 -0
  502. package/dist/components/br-modal.d.ts +11 -0
  503. package/dist/components/br-modal.js +5 -0
  504. package/dist/components/br-notification-body.d.ts +11 -0
  505. package/dist/components/br-notification-body.js +5 -0
  506. package/dist/components/br-notification-header.d.ts +11 -0
  507. package/dist/components/br-notification-header.js +5 -0
  508. package/dist/components/br-notification-item.d.ts +11 -0
  509. package/dist/components/br-notification-item.js +5 -0
  510. package/dist/components/br-notification.d.ts +11 -0
  511. package/dist/components/br-notification.js +5 -0
  512. package/dist/components/br-pagination.d.ts +11 -0
  513. package/dist/components/br-pagination.js +5 -0
  514. package/dist/components/br-radio-group.d.ts +11 -0
  515. package/dist/components/br-radio-group.js +5 -0
  516. package/dist/components/br-radio.d.ts +11 -0
  517. package/dist/components/br-radio.js +5 -0
  518. package/dist/components/br-scrim.d.ts +11 -0
  519. package/dist/components/br-scrim.js +5 -0
  520. package/dist/components/br-select-input.d.ts +11 -0
  521. package/dist/components/br-select-input.js +5 -0
  522. package/dist/components/br-select-list.d.ts +11 -0
  523. package/dist/components/br-select-list.js +5 -0
  524. package/dist/components/br-select-option.d.ts +11 -0
  525. package/dist/components/br-select-option.js +5 -0
  526. package/dist/components/br-select.d.ts +11 -0
  527. package/dist/components/br-select.js +5 -0
  528. package/dist/components/br-sign-in.d.ts +11 -0
  529. package/dist/components/br-sign-in.js +5 -0
  530. package/dist/components/br-skip-link-item.d.ts +11 -0
  531. package/dist/components/br-skip-link-item.js +5 -0
  532. package/dist/components/br-skip-link.d.ts +11 -0
  533. package/dist/components/br-skip-link.js +5 -0
  534. package/dist/components/br-skiplink-item.d.ts +11 -0
  535. package/dist/components/br-skiplink-item.js +5 -0
  536. package/dist/components/br-slider.d.ts +11 -0
  537. package/dist/components/br-slider.js +5 -0
  538. package/dist/components/br-step-item.d.ts +11 -0
  539. package/dist/components/br-step-item.js +5 -0
  540. package/dist/components/br-step.d.ts +11 -0
  541. package/dist/components/br-step.js +5 -0
  542. package/dist/components/br-switch.d.ts +11 -0
  543. package/dist/components/br-switch.js +5 -0
  544. package/dist/components/br-tab-item.d.ts +11 -0
  545. package/dist/components/br-tab-item.js +5 -0
  546. package/dist/components/br-tab.d.ts +11 -0
  547. package/dist/components/br-tab.js +5 -0
  548. package/dist/components/br-table-body.d.ts +11 -0
  549. package/dist/components/br-table-body.js +5 -0
  550. package/dist/components/br-table-cell.d.ts +11 -0
  551. package/dist/components/br-table-cell.js +5 -0
  552. package/dist/components/br-table-header-cell.d.ts +11 -0
  553. package/dist/components/br-table-header-cell.js +5 -0
  554. package/dist/components/br-table-header.d.ts +11 -0
  555. package/dist/components/br-table-header.js +5 -0
  556. package/dist/components/br-table-row.d.ts +11 -0
  557. package/dist/components/br-table-row.js +5 -0
  558. package/dist/components/br-table.d.ts +11 -0
  559. package/dist/components/br-table.js +5 -0
  560. package/dist/components/br-tag.d.ts +11 -0
  561. package/dist/components/br-tag.js +5 -0
  562. package/dist/components/br-textarea.d.ts +11 -0
  563. package/dist/components/br-textarea.js +5 -0
  564. package/dist/components/br-time-picker.d.ts +11 -0
  565. package/dist/components/br-time-picker.js +5 -0
  566. package/dist/components/br-tooltip.d.ts +11 -0
  567. package/dist/components/br-tooltip.js +5 -0
  568. package/dist/components/br-upload.d.ts +11 -0
  569. package/dist/components/br-upload.js +5 -0
  570. package/dist/components/br-wizard-panel.d.ts +11 -0
  571. package/dist/components/br-wizard-panel.js +5 -0
  572. package/dist/components/br-wizard.d.ts +11 -0
  573. package/dist/components/br-wizard.js +5 -0
  574. package/dist/components/index.d.ts +213 -0
  575. package/dist/components/index.js +5 -0
  576. package/dist/components/p-0IYmyaTi.js +5 -0
  577. package/dist/components/p-41XwlWiS.js +5 -0
  578. package/dist/components/p-5z6jgH1D.js +5 -0
  579. package/dist/components/p-6OdfnwnK.js +5 -0
  580. package/dist/components/p-9S9bgUT0.js +5 -0
  581. package/dist/components/p-B-qLmYZC.js +5 -0
  582. package/dist/components/p-B-sbd1_h.js +5 -0
  583. package/dist/components/p-B55qsau4.js +5 -0
  584. package/dist/components/p-BC7f6MK8.js +5 -0
  585. package/dist/components/p-BPJpHGOW.js +5 -0
  586. package/dist/components/p-BW0_ORNA.js +5 -0
  587. package/dist/components/p-BWXfdbQH.js +5 -0
  588. package/dist/components/p-Bb-nLtTG.js +5 -0
  589. package/dist/components/p-BkS6ujyf.js +5 -0
  590. package/dist/components/p-Bm0ECvfB.js +5 -0
  591. package/dist/components/p-C1yRmdso.js +5 -0
  592. package/dist/components/p-C3LQSQpc.js +5 -0
  593. package/dist/components/p-C98-mHmV.js +5 -0
  594. package/dist/components/p-CDZFuUlU.js +5 -0
  595. package/dist/components/p-CRfi23Rd.js +5 -0
  596. package/dist/components/p-CUI5zWGf.js +5 -0
  597. package/dist/components/p-CXMwM9m4.js +5 -0
  598. package/dist/components/p-CdDwqbBv.js +5 -0
  599. package/dist/components/p-CxviDiCr.js +5 -0
  600. package/dist/components/p-D3usVJE2.js +16 -0
  601. package/dist/components/p-D6zroLx5.js +5 -0
  602. package/dist/components/p-D9SpD3Ay.js +5 -0
  603. package/dist/components/p-DA5GS53D.js +5 -0
  604. package/dist/components/p-DBP6K_aq.js +5 -0
  605. package/dist/components/p-DBmwzG9E.js +5 -0
  606. package/dist/components/p-DCrVo-8T.js +5 -0
  607. package/dist/components/p-DIK54tTj.js +5 -0
  608. package/dist/components/p-DQRSHR-D.js +5 -0
  609. package/dist/components/p-DRVMm1Py.js +5 -0
  610. package/dist/components/p-DWPmUV72.js +5 -0
  611. package/dist/components/p-DYA74R1r.js +5 -0
  612. package/dist/components/p-DYnkGWii.js +5 -0
  613. package/dist/components/p-D_CSvOY9.js +5 -0
  614. package/dist/components/p-DaeGwqw0.js +5 -0
  615. package/dist/components/p-Dkg2scYZ.js +5 -0
  616. package/dist/components/p-Dmfk7eEe.js +5 -0
  617. package/dist/components/p-DoXNfcTT.js +5 -0
  618. package/dist/components/p-DvrdmqoQ.js +5 -0
  619. package/dist/components/p-DxZJrIyL.js +5 -0
  620. package/dist/components/p-LmeJrLxH.js +5 -0
  621. package/dist/components/p-TFWd_UBV.js +5 -0
  622. package/dist/components/p-aF8bGN3t.js +5 -0
  623. package/dist/components/p-bhULC15U.js +5 -0
  624. package/dist/components/p-cF3ia5e9.js +5 -0
  625. package/dist/components/p-cfPt-vKA.js +5 -0
  626. package/dist/components/p-gvnfuTjd.js +5 -0
  627. package/dist/components/p-nJOJGpyl.js +5 -0
  628. package/dist/components/p-ttI0nvv_.js +5 -0
  629. package/dist/esm/app-globals-DVjNHTTs.js +7 -0
  630. package/dist/esm/br-avatar.entry.js +246 -0
  631. package/dist/esm/br-breadcrumb-item.entry.js +43 -0
  632. package/dist/esm/br-breadcrumb.entry.js +441 -0
  633. package/dist/esm/br-button_2.entry.js +277 -0
  634. package/dist/esm/br-card.entry.js +109 -0
  635. package/dist/esm/br-carousel-page.entry.js +78 -0
  636. package/dist/esm/br-carousel.entry.js +563 -0
  637. package/dist/esm/br-checkbox-group.entry.js +116 -0
  638. package/dist/esm/br-checkbox.entry.js +286 -0
  639. package/dist/esm/br-checkgroup.entry.js +18 -0
  640. package/dist/esm/br-collapse_2.entry.js +680 -0
  641. package/dist/esm/br-cookiebar-cookie.entry.js +81 -0
  642. package/dist/esm/br-cookiebar-group.entry.js +307 -0
  643. package/dist/esm/br-cookiebar-header.entry.js +37 -0
  644. package/dist/esm/br-cookiebar-link.entry.js +52 -0
  645. package/dist/esm/br-cookiebar-note-group.entry.js +68 -0
  646. package/dist/esm/br-cookiebar-note.entry.js +23 -0
  647. package/dist/esm/br-cookiebar.entry.js +756 -0
  648. package/dist/esm/br-crumb.entry.js +49 -0
  649. package/dist/esm/br-date-picker_3.entry.js +2442 -0
  650. package/dist/esm/br-datetime-picker.entry.js +1885 -0
  651. package/dist/esm/br-divider.entry.js +223 -0
  652. package/dist/esm/br-dropdown_2.entry.js +1853 -0
  653. package/dist/esm/br-footer-category.entry.js +100 -0
  654. package/dist/esm/br-footer-item.entry.js +50 -0
  655. package/dist/esm/br-footer-legal.entry.js +39 -0
  656. package/dist/esm/br-footer-logo.entry.js +102 -0
  657. package/dist/esm/br-footer-social.entry.js +69 -0
  658. package/dist/esm/br-footer.entry.js +90 -0
  659. package/dist/esm/br-header-function.entry.js +140 -0
  660. package/dist/esm/br-header-link.entry.js +58 -0
  661. package/dist/esm/br-header-list.entry.js +277 -0
  662. package/dist/esm/br-header-logo.entry.js +175 -0
  663. package/dist/esm/br-header.entry.js +640 -0
  664. package/dist/esm/br-icon.entry.js +483 -0
  665. package/dist/esm/br-input.entry.js +597 -0
  666. package/dist/esm/br-item.entry.js +354 -0
  667. package/dist/esm/br-link.entry.js +130 -0
  668. package/dist/esm/br-loading.entry.js +503 -0
  669. package/dist/esm/br-magic-button.entry.js +90 -0
  670. package/dist/esm/br-menu-group.entry.js +21 -0
  671. package/dist/esm/br-menu-header.entry.js +45 -0
  672. package/dist/esm/br-menu-info.entry.js +36 -0
  673. package/dist/esm/br-menu-item.entry.js +77 -0
  674. package/dist/esm/br-menu-link.entry.js +53 -0
  675. package/dist/esm/br-menu-list.entry.js +147 -0
  676. package/dist/esm/br-menu-logo.entry.js +73 -0
  677. package/dist/esm/br-menu-social.entry.js +63 -0
  678. package/dist/esm/br-menu.entry.js +991 -0
  679. package/dist/esm/br-modal.entry.js +494 -0
  680. package/dist/esm/br-notification-body.entry.js +69 -0
  681. package/dist/esm/br-notification-header.entry.js +46 -0
  682. package/dist/esm/br-notification-item.entry.js +108 -0
  683. package/dist/esm/br-notification.entry.js +332 -0
  684. package/dist/esm/br-pagination.entry.js +882 -0
  685. package/dist/esm/br-radio-group.entry.js +426 -0
  686. package/dist/esm/br-radio.entry.js +355 -0
  687. package/dist/esm/br-scrim.entry.js +1334 -0
  688. package/dist/esm/br-select-input_3.entry.js +950 -0
  689. package/dist/esm/br-sign-in.entry.js +123 -0
  690. package/dist/esm/br-skip-link-item.entry.js +18 -0
  691. package/dist/esm/br-skip-link.entry.js +360 -0
  692. package/dist/esm/br-skiplink-item.entry.js +190 -0
  693. package/dist/esm/br-slider.entry.js +686 -0
  694. package/dist/esm/br-step_2.entry.js +625 -0
  695. package/dist/esm/br-switch.entry.js +243 -0
  696. package/dist/esm/br-tab-item.entry.js +183 -0
  697. package/dist/esm/br-tab.entry.js +395 -0
  698. package/dist/esm/br-table-body.entry.js +35 -0
  699. package/dist/esm/br-table-cell.entry.js +182 -0
  700. package/dist/esm/br-table-header-cell.entry.js +171 -0
  701. package/dist/esm/br-table-header.entry.js +35 -0
  702. package/dist/esm/br-table-row.entry.js +79 -0
  703. package/dist/esm/br-table.entry.js +678 -0
  704. package/dist/esm/br-tag.entry.js +492 -0
  705. package/dist/esm/br-textarea.entry.js +304 -0
  706. package/dist/esm/br-tooltip.entry.js +625 -0
  707. package/dist/esm/br-upload.entry.js +580 -0
  708. package/dist/esm/br-wizard-panel.entry.js +52 -0
  709. package/dist/esm/br-wizard.entry.js +706 -0
  710. package/dist/esm/breakpoint-observer-DBmwzG9E.js +141 -0
  711. package/dist/esm/clamp-gvnfuTjd.js +23 -0
  712. package/dist/esm/cookiebar.utils-DYA74R1r.js +16 -0
  713. package/dist/esm/datetime-picker-constants-Bfm58jO6.js +3798 -0
  714. package/dist/esm/event-DFN_so7I.js +48 -0
  715. package/dist/esm/floating-surface-dismiss-BWXfdbQH.js +61 -0
  716. package/dist/esm/floating-ui-BavFwMnx.js +134 -0
  717. package/dist/esm/floating-ui.dom-DIK54tTj.js +1707 -0
  718. package/dist/esm/focus-DxZJrIyL.js +26 -0
  719. package/dist/esm/getNextElement-9S9bgUT0.js +28 -0
  720. package/dist/esm/iconify-icon-D3usVJE2.js +2303 -0
  721. package/dist/esm/id-BkS6ujyf.js +18 -0
  722. package/dist/esm/index-Bo-2igoO.js +671 -0
  723. package/dist/esm/index-C2RBydfd.js +3258 -0
  724. package/dist/esm/index.js +6 -0
  725. package/dist/esm/isNil-B-qLmYZC.js +17 -0
  726. package/dist/esm/isValid-DIUZX1qS.js +3684 -0
  727. package/dist/esm/loader.js +15 -0
  728. package/dist/esm/native-dialog-B55qsau4.js +46 -0
  729. package/dist/esm/navigation-bhULC15U.js +23 -0
  730. package/dist/esm/parts-Bb5vVlCC.js +17 -0
  731. package/dist/esm/props-DRVMm1Py.js +22 -0
  732. package/dist/esm/raf-batcher-cF3ia5e9.js +53 -0
  733. package/dist/esm/slot-BIG-yees.js +44 -0
  734. package/dist/esm/swipe-Dmfk7eEe.js +343 -0
  735. package/dist/esm/table-constants-CXMwM9m4.js +170 -0
  736. package/dist/esm/validator-D3tVP32U.js +113 -0
  737. package/dist/esm/webcomponents.js +46 -0
  738. package/dist/hydrate/index.d.ts +287 -0
  739. package/dist/hydrate/index.js +67323 -0
  740. package/dist/hydrate/index.mjs +67313 -0
  741. package/dist/hydrate/package.json +12 -0
  742. package/dist/index.cjs.js +1 -0
  743. package/dist/index.js +1 -0
  744. package/dist/loader/cdn.js +5 -0
  745. package/dist/loader/index.cjs.js +5 -0
  746. package/dist/loader/index.d.ts +24 -0
  747. package/dist/loader/index.es2017.js +5 -0
  748. package/dist/loader/index.js +6 -0
  749. package/dist/webcomponents/index.esm.js +5 -0
  750. package/dist/webcomponents/p-0196804a.entry.js +5 -0
  751. package/dist/webcomponents/p-0410186a.entry.js +5 -0
  752. package/dist/webcomponents/p-0415ef22.entry.js +5 -0
  753. package/dist/webcomponents/p-059c3d6c.entry.js +5 -0
  754. package/dist/webcomponents/p-0b8f39bc.entry.js +5 -0
  755. package/dist/webcomponents/p-0caa4d12.entry.js +5 -0
  756. package/dist/webcomponents/p-0d4f718d.entry.js +5 -0
  757. package/dist/webcomponents/p-0e84c9e8.entry.js +5 -0
  758. package/dist/webcomponents/p-12286e73.entry.js +5 -0
  759. package/dist/webcomponents/p-147ac8d3.entry.js +5 -0
  760. package/dist/webcomponents/p-1580beee.entry.js +5 -0
  761. package/dist/webcomponents/p-1b138f1c.entry.js +5 -0
  762. package/dist/webcomponents/p-1bca4499.entry.js +5 -0
  763. package/dist/webcomponents/p-1d6b0b6f.entry.js +5 -0
  764. package/dist/webcomponents/p-1d8cb8fd.entry.js +5 -0
  765. package/dist/webcomponents/p-22443c08.entry.js +5 -0
  766. package/dist/webcomponents/p-224daaac.entry.js +5 -0
  767. package/dist/webcomponents/p-28426d2a.entry.js +5 -0
  768. package/dist/webcomponents/p-2abd2da0.entry.js +5 -0
  769. package/dist/webcomponents/p-2fdc51ae.entry.js +5 -0
  770. package/dist/webcomponents/p-30c428b6.entry.js +5 -0
  771. package/dist/webcomponents/p-36bbea4e.entry.js +5 -0
  772. package/dist/webcomponents/p-3907ebfa.entry.js +5 -0
  773. package/dist/webcomponents/p-39a16f9d.entry.js +5 -0
  774. package/dist/webcomponents/p-3ebbd2f5.entry.js +5 -0
  775. package/dist/webcomponents/p-3ef7eac8.entry.js +5 -0
  776. package/dist/webcomponents/p-45356e9a.entry.js +5 -0
  777. package/dist/webcomponents/p-46513db4.entry.js +5 -0
  778. package/dist/webcomponents/p-4fe12a72.entry.js +5 -0
  779. package/dist/webcomponents/p-52df61cb.entry.js +5 -0
  780. package/dist/webcomponents/p-569134cf.entry.js +5 -0
  781. package/dist/webcomponents/p-5b257a4b.entry.js +5 -0
  782. package/dist/webcomponents/p-5ce7db4a.entry.js +5 -0
  783. package/dist/webcomponents/p-5f373708.entry.js +5 -0
  784. package/dist/webcomponents/p-5f6afb79.entry.js +5 -0
  785. package/dist/webcomponents/p-5fc7ba4c.entry.js +5 -0
  786. package/dist/webcomponents/p-60cc820c.entry.js +5 -0
  787. package/dist/webcomponents/p-66006312.entry.js +5 -0
  788. package/dist/webcomponents/p-66b13fd9.entry.js +5 -0
  789. package/dist/webcomponents/p-6OdfnwnK.js +5 -0
  790. package/dist/webcomponents/p-6c5f6cb6.entry.js +5 -0
  791. package/dist/webcomponents/p-6f1c4425.entry.js +5 -0
  792. package/dist/webcomponents/p-750799b7.entry.js +5 -0
  793. package/dist/webcomponents/p-756ff2ad.entry.js +5 -0
  794. package/dist/webcomponents/p-765bfe27.entry.js +5 -0
  795. package/dist/webcomponents/p-7ab96c11.entry.js +5 -0
  796. package/dist/webcomponents/p-7c2ff8b4.entry.js +5 -0
  797. package/dist/webcomponents/p-7cf9f4e5.entry.js +5 -0
  798. package/dist/webcomponents/p-7e1856e4.entry.js +5 -0
  799. package/dist/webcomponents/p-7f7506f0.entry.js +5 -0
  800. package/dist/webcomponents/p-7fb03a49.entry.js +5 -0
  801. package/dist/webcomponents/p-82200563.entry.js +5 -0
  802. package/dist/webcomponents/p-85f8063b.entry.js +5 -0
  803. package/dist/webcomponents/p-8b558233.entry.js +5 -0
  804. package/dist/webcomponents/p-8e6c2767.entry.js +5 -0
  805. package/dist/webcomponents/p-966ad32f.entry.js +5 -0
  806. package/dist/webcomponents/p-9679d230.entry.js +5 -0
  807. package/dist/webcomponents/p-96dd663b.entry.js +5 -0
  808. package/dist/webcomponents/p-98843fa3.entry.js +5 -0
  809. package/dist/webcomponents/p-9S9bgUT0.js +5 -0
  810. package/dist/webcomponents/p-9a375eff.entry.js +5 -0
  811. package/dist/webcomponents/p-9b358cff.entry.js +5 -0
  812. package/dist/webcomponents/p-9f7558c7.entry.js +5 -0
  813. package/dist/webcomponents/p-B-qLmYZC.js +5 -0
  814. package/dist/webcomponents/p-B55qsau4.js +5 -0
  815. package/dist/webcomponents/p-BIG-yees.js +5 -0
  816. package/dist/webcomponents/p-BWXfdbQH.js +5 -0
  817. package/dist/webcomponents/p-Bb5vVlCC.js +5 -0
  818. package/dist/webcomponents/p-Bfm58jO6.js +5 -0
  819. package/dist/webcomponents/p-BhMVJQ4-.js +5 -0
  820. package/dist/webcomponents/p-BkS6ujyf.js +5 -0
  821. package/dist/webcomponents/p-C2RBydfd.js +6 -0
  822. package/dist/webcomponents/p-CO5cOQQU.js +5 -0
  823. package/dist/webcomponents/p-CXMwM9m4.js +5 -0
  824. package/dist/webcomponents/p-D3tVP32U.js +5 -0
  825. package/dist/webcomponents/p-D3usVJE2.js +16 -0
  826. package/dist/webcomponents/p-DBmwzG9E.js +5 -0
  827. package/dist/webcomponents/p-DFN_so7I.js +5 -0
  828. package/dist/webcomponents/p-DIK54tTj.js +5 -0
  829. package/dist/webcomponents/p-DRVMm1Py.js +5 -0
  830. package/dist/webcomponents/p-DVjNHTTs.js +5 -0
  831. package/dist/webcomponents/p-DYA74R1r.js +5 -0
  832. package/dist/webcomponents/p-Dmfk7eEe.js +5 -0
  833. package/dist/webcomponents/p-DxZJrIyL.js +5 -0
  834. package/dist/webcomponents/p-a382e115.entry.js +5 -0
  835. package/dist/webcomponents/p-a9ff7c25.entry.js +5 -0
  836. package/dist/webcomponents/p-bba9fc09.entry.js +5 -0
  837. package/dist/webcomponents/p-bhULC15U.js +5 -0
  838. package/dist/webcomponents/p-c0b0f531.entry.js +5 -0
  839. package/dist/webcomponents/p-c211af17.entry.js +5 -0
  840. package/dist/webcomponents/p-c492d926.entry.js +5 -0
  841. package/dist/webcomponents/p-c4cfe599.entry.js +5 -0
  842. package/dist/webcomponents/p-c846e784.entry.js +5 -0
  843. package/dist/webcomponents/p-cF3ia5e9.js +5 -0
  844. package/dist/webcomponents/p-cedb8eea.entry.js +5 -0
  845. package/dist/webcomponents/p-d1e899cd.entry.js +5 -0
  846. package/dist/webcomponents/p-d38d82cc.entry.js +5 -0
  847. package/dist/webcomponents/p-dba376cb.entry.js +5 -0
  848. package/dist/webcomponents/p-e0ce536a.entry.js +5 -0
  849. package/dist/webcomponents/p-e1331288.entry.js +5 -0
  850. package/dist/webcomponents/p-e360a463.entry.js +5 -0
  851. package/dist/webcomponents/p-e80a1eb0.entry.js +5 -0
  852. package/dist/webcomponents/p-f078f972.entry.js +5 -0
  853. package/dist/webcomponents/p-f6318e94.entry.js +5 -0
  854. package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
  855. package/dist/webcomponents/p-gvnfuTjd.js +5 -0
  856. package/dist/webcomponents/webcomponents.esm.js +5 -0
  857. package/package.json +1 -1
  858. package/cem/.gitkeep +0 -0
@@ -0,0 +1,3827 @@
1
+ /*!
2
+ * Construído por SERPRO
3
+ * © https://serpro.gov.br/ - MIT License.
4
+ */
5
+ 'use strict';
6
+
7
+ var addDays = {};
8
+
9
+ var constructFrom = {};
10
+
11
+ var constants = {};
12
+
13
+ var hasRequiredConstants;
14
+
15
+ function requireConstants () {
16
+ if (hasRequiredConstants) return constants;
17
+ hasRequiredConstants = 1;
18
+ constants.secondsInYear =
19
+ constants.secondsInWeek =
20
+ constants.secondsInQuarter =
21
+ constants.secondsInMonth =
22
+ constants.secondsInMinute =
23
+ constants.secondsInHour =
24
+ constants.secondsInDay =
25
+ constants.quartersInYear =
26
+ constants.monthsInYear =
27
+ constants.monthsInQuarter =
28
+ constants.minutesInYear =
29
+ constants.minutesInMonth =
30
+ constants.minutesInHour =
31
+ constants.minutesInDay =
32
+ constants.minTime =
33
+ constants.millisecondsInWeek =
34
+ constants.millisecondsInSecond =
35
+ constants.millisecondsInMinute =
36
+ constants.millisecondsInHour =
37
+ constants.millisecondsInDay =
38
+ constants.maxTime =
39
+ constants.daysInYear =
40
+ constants.daysInWeek =
41
+ constants.constructFromSymbol =
42
+ void 0; /**
43
+ * @module constants
44
+ * @summary Useful constants
45
+ * @description
46
+ * Collection of useful date constants.
47
+ *
48
+ * The constants could be imported from `date-fns/constants`:
49
+ *
50
+ * ```ts
51
+ * import { maxTime, minTime } from "date-fns/constants";
52
+ *
53
+ * function isAllowedTime(time) {
54
+ * return time <= maxTime && time >= minTime;
55
+ * }
56
+ * ```
57
+ */
58
+
59
+ /**
60
+ * @constant
61
+ * @name daysInWeek
62
+ * @summary Days in 1 week.
63
+ */
64
+ (constants.daysInWeek = 7);
65
+
66
+ /**
67
+ * @constant
68
+ * @name daysInYear
69
+ * @summary Days in 1 year.
70
+ *
71
+ * @description
72
+ * How many days in a year.
73
+ *
74
+ * One years equals 365.2425 days according to the formula:
75
+ *
76
+ * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
77
+ * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
78
+ */
79
+ const daysInYear = (constants.daysInYear = 365.2425);
80
+
81
+ /**
82
+ * @constant
83
+ * @name maxTime
84
+ * @summary Maximum allowed time.
85
+ *
86
+ * @example
87
+ * import { maxTime } from "date-fns/constants";
88
+ *
89
+ * const isValid = 8640000000000001 <= maxTime;
90
+ * //=> false
91
+ *
92
+ * new Date(8640000000000001);
93
+ * //=> Invalid Date
94
+ */
95
+ const maxTime = (constants.maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000);
96
+
97
+ /**
98
+ * @constant
99
+ * @name minTime
100
+ * @summary Minimum allowed time.
101
+ *
102
+ * @example
103
+ * import { minTime } from "date-fns/constants";
104
+ *
105
+ * const isValid = -8640000000000001 >= minTime;
106
+ * //=> false
107
+ *
108
+ * new Date(-8640000000000001)
109
+ * //=> Invalid Date
110
+ */
111
+ (constants.minTime = -maxTime);
112
+
113
+ /**
114
+ * @constant
115
+ * @name millisecondsInWeek
116
+ * @summary Milliseconds in 1 week.
117
+ */
118
+ (constants.millisecondsInWeek = 604800000);
119
+
120
+ /**
121
+ * @constant
122
+ * @name millisecondsInDay
123
+ * @summary Milliseconds in 1 day.
124
+ */
125
+ (constants.millisecondsInDay = 86400000);
126
+
127
+ /**
128
+ * @constant
129
+ * @name millisecondsInMinute
130
+ * @summary Milliseconds in 1 minute
131
+ */
132
+ (constants.millisecondsInMinute = 60000);
133
+
134
+ /**
135
+ * @constant
136
+ * @name millisecondsInHour
137
+ * @summary Milliseconds in 1 hour
138
+ */
139
+ (constants.millisecondsInHour = 3600000);
140
+
141
+ /**
142
+ * @constant
143
+ * @name millisecondsInSecond
144
+ * @summary Milliseconds in 1 second
145
+ */
146
+ (constants.millisecondsInSecond = 1000);
147
+
148
+ /**
149
+ * @constant
150
+ * @name minutesInYear
151
+ * @summary Minutes in 1 year.
152
+ */
153
+ (constants.minutesInYear = 525600);
154
+
155
+ /**
156
+ * @constant
157
+ * @name minutesInMonth
158
+ * @summary Minutes in 1 month.
159
+ */
160
+ (constants.minutesInMonth = 43200);
161
+
162
+ /**
163
+ * @constant
164
+ * @name minutesInDay
165
+ * @summary Minutes in 1 day.
166
+ */
167
+ (constants.minutesInDay = 1440);
168
+
169
+ /**
170
+ * @constant
171
+ * @name minutesInHour
172
+ * @summary Minutes in 1 hour.
173
+ */
174
+ (constants.minutesInHour = 60);
175
+
176
+ /**
177
+ * @constant
178
+ * @name monthsInQuarter
179
+ * @summary Months in 1 quarter.
180
+ */
181
+ (constants.monthsInQuarter = 3);
182
+
183
+ /**
184
+ * @constant
185
+ * @name monthsInYear
186
+ * @summary Months in 1 year.
187
+ */
188
+ (constants.monthsInYear = 12);
189
+
190
+ /**
191
+ * @constant
192
+ * @name quartersInYear
193
+ * @summary Quarters in 1 year
194
+ */
195
+ (constants.quartersInYear = 4);
196
+
197
+ /**
198
+ * @constant
199
+ * @name secondsInHour
200
+ * @summary Seconds in 1 hour.
201
+ */
202
+ const secondsInHour = (constants.secondsInHour = 3600);
203
+
204
+ /**
205
+ * @constant
206
+ * @name secondsInMinute
207
+ * @summary Seconds in 1 minute.
208
+ */
209
+ (constants.secondsInMinute = 60);
210
+
211
+ /**
212
+ * @constant
213
+ * @name secondsInDay
214
+ * @summary Seconds in 1 day.
215
+ */
216
+ const secondsInDay = (constants.secondsInDay = secondsInHour * 24);
217
+
218
+ /**
219
+ * @constant
220
+ * @name secondsInWeek
221
+ * @summary Seconds in 1 week.
222
+ */
223
+ (constants.secondsInWeek = secondsInDay * 7);
224
+
225
+ /**
226
+ * @constant
227
+ * @name secondsInYear
228
+ * @summary Seconds in 1 year.
229
+ */
230
+ const secondsInYear = (constants.secondsInYear = secondsInDay * daysInYear);
231
+
232
+ /**
233
+ * @constant
234
+ * @name secondsInMonth
235
+ * @summary Seconds in 1 month
236
+ */
237
+ const secondsInMonth = (constants.secondsInMonth = secondsInYear / 12);
238
+
239
+ /**
240
+ * @constant
241
+ * @name secondsInQuarter
242
+ * @summary Seconds in 1 quarter.
243
+ */
244
+ (constants.secondsInQuarter = secondsInMonth * 3);
245
+
246
+ /**
247
+ * @constant
248
+ * @name constructFromSymbol
249
+ * @summary Symbol enabling Date extensions to inherit properties from the reference date.
250
+ *
251
+ * The symbol is used to enable the `constructFrom` function to construct a date
252
+ * using a reference date and a value. It allows to transfer extra properties
253
+ * from the reference date to the new date. It's useful for extensions like
254
+ * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
255
+ * a constructor argument.
256
+ */
257
+ (constants.constructFromSymbol =
258
+ Symbol.for("constructDateFrom"));
259
+ return constants;
260
+ }
261
+
262
+ var hasRequiredConstructFrom;
263
+
264
+ function requireConstructFrom () {
265
+ if (hasRequiredConstructFrom) return constructFrom;
266
+ hasRequiredConstructFrom = 1;
267
+ constructFrom.constructFrom = constructFrom$1;
268
+ var _index = /*@__PURE__*/ requireConstants();
269
+
270
+ /**
271
+ * @name constructFrom
272
+ * @category Generic Helpers
273
+ * @summary Constructs a date using the reference date and the value
274
+ *
275
+ * @description
276
+ * The function constructs a new date using the constructor from the reference
277
+ * date and the given value. It helps to build generic functions that accept
278
+ * date extensions.
279
+ *
280
+ * It defaults to `Date` if the passed reference date is a number or a string.
281
+ *
282
+ * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
283
+ * enabling to transfer extra properties from the reference date to the new date.
284
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
285
+ * that accept a time zone as a constructor argument.
286
+ *
287
+ * @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).
288
+ *
289
+ * @param date - The reference date to take constructor from
290
+ * @param value - The value to create the date
291
+ *
292
+ * @returns Date initialized using the given date and value
293
+ *
294
+ * @example
295
+ * import { constructFrom } from "date-fns";
296
+ *
297
+ * // A function that clones a date preserving the original type
298
+ * function cloneDate<DateType extends Date>(date: DateType): DateType {
299
+ * return constructFrom(
300
+ * date, // Use constructor from the given date
301
+ * date.getTime() // Use the date value to create a new date
302
+ * );
303
+ * }
304
+ */
305
+ function constructFrom$1(date, value) {
306
+ if (typeof date === "function") return date(value);
307
+
308
+ if (date && typeof date === "object" && _index.constructFromSymbol in date)
309
+ return date[_index.constructFromSymbol](value);
310
+
311
+ if (date instanceof Date) return new date.constructor(value);
312
+
313
+ return new Date(value);
314
+ }
315
+ return constructFrom;
316
+ }
317
+
318
+ var toDate = {};
319
+
320
+ var hasRequiredToDate;
321
+
322
+ function requireToDate () {
323
+ if (hasRequiredToDate) return toDate;
324
+ hasRequiredToDate = 1;
325
+ toDate.toDate = toDate$1;
326
+ var _index = /*@__PURE__*/ requireConstructFrom();
327
+
328
+ /**
329
+ * @name toDate
330
+ * @category Common Helpers
331
+ * @summary Convert the given argument to an instance of Date.
332
+ *
333
+ * @description
334
+ * Convert the given argument to an instance of Date.
335
+ *
336
+ * If the argument is an instance of Date, the function returns its clone.
337
+ *
338
+ * If the argument is a number, it is treated as a timestamp.
339
+ *
340
+ * If the argument is none of the above, the function returns Invalid Date.
341
+ *
342
+ * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
343
+ * enabling to transfer extra properties from the reference date to the new date.
344
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
345
+ * that accept a time zone as a constructor argument.
346
+ *
347
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
348
+ *
349
+ * @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).
350
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
351
+ *
352
+ * @param argument - The value to convert
353
+ *
354
+ * @returns The parsed date in the local time zone
355
+ *
356
+ * @example
357
+ * // Clone the date:
358
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
359
+ * //=> Tue Feb 11 2014 11:30:30
360
+ *
361
+ * @example
362
+ * // Convert the timestamp to date:
363
+ * const result = toDate(1392098430000)
364
+ * //=> Tue Feb 11 2014 11:30:30
365
+ */
366
+ function toDate$1(argument, context) {
367
+ // [TODO] Get rid of `toDate` or `constructFrom`?
368
+ return (0, _index.constructFrom)(context || argument, argument);
369
+ }
370
+ return toDate;
371
+ }
372
+
373
+ var hasRequiredAddDays;
374
+
375
+ function requireAddDays () {
376
+ if (hasRequiredAddDays) return addDays;
377
+ hasRequiredAddDays = 1;
378
+ addDays.addDays = addDays$1;
379
+ var _index = /*@__PURE__*/ requireConstructFrom();
380
+ var _index2 = /*@__PURE__*/ requireToDate();
381
+
382
+ /**
383
+ * The {@link addDays} function options.
384
+ */
385
+
386
+ /**
387
+ * @name addDays
388
+ * @category Day Helpers
389
+ * @summary Add the specified number of days to the given date.
390
+ *
391
+ * @description
392
+ * Add the specified number of days to the given date.
393
+ *
394
+ * **You don't need date-fns\***:
395
+ *
396
+ * Temporal has a built-in `add` method on all its classes:
397
+ *
398
+ * - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
399
+ * - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
400
+ * - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
401
+ * - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
402
+ * - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
403
+ * - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
404
+ *
405
+ * \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
406
+ *
407
+ * @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).
408
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
409
+ *
410
+ * @param date - The date to be changed
411
+ * @param amount - The amount of days to be added.
412
+ * @param options - An object with options
413
+ *
414
+ * @returns The new date with the days added
415
+ *
416
+ * @example
417
+ * // Add 10 days to 1 September 2014:
418
+ * const result = addDays(new Date(2014, 8, 1), 10)
419
+ * //=> Thu Sep 11 2014 00:00:00
420
+ *
421
+ * @example
422
+ * // Using Temporal:
423
+ * // Add 10 days to 1 September 2014:
424
+ * Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
425
+ * //=> "2014-09-11"
426
+ */
427
+ function addDays$1(date, amount, options) {
428
+ const _date = (0, _index2.toDate)(date, options?.in);
429
+ if (isNaN(amount)) return (0, _index.constructFrom)(options?.in || date, NaN);
430
+
431
+ // If 0 days, no-op to avoid changing times in the hour before end of DST
432
+ if (!amount) return _date;
433
+
434
+ _date.setDate(_date.getDate() + amount);
435
+ return _date;
436
+ }
437
+ return addDays;
438
+ }
439
+
440
+ var format = {};
441
+
442
+ var defaultLocale = {};
443
+
444
+ var enUS = {};
445
+
446
+ var formatDistance = {};
447
+
448
+ var hasRequiredFormatDistance;
449
+
450
+ function requireFormatDistance () {
451
+ if (hasRequiredFormatDistance) return formatDistance;
452
+ hasRequiredFormatDistance = 1;
453
+ formatDistance.formatDistance = void 0;
454
+
455
+ const formatDistanceLocale = {
456
+ lessThanXSeconds: {
457
+ one: "less than a second",
458
+ other: "less than {{count}} seconds",
459
+ },
460
+
461
+ xSeconds: {
462
+ one: "1 second",
463
+ other: "{{count}} seconds",
464
+ },
465
+
466
+ halfAMinute: "half a minute",
467
+
468
+ lessThanXMinutes: {
469
+ one: "less than a minute",
470
+ other: "less than {{count}} minutes",
471
+ },
472
+
473
+ xMinutes: {
474
+ one: "1 minute",
475
+ other: "{{count}} minutes",
476
+ },
477
+
478
+ aboutXHours: {
479
+ one: "about 1 hour",
480
+ other: "about {{count}} hours",
481
+ },
482
+
483
+ xHours: {
484
+ one: "1 hour",
485
+ other: "{{count}} hours",
486
+ },
487
+
488
+ xDays: {
489
+ one: "1 day",
490
+ other: "{{count}} days",
491
+ },
492
+
493
+ aboutXWeeks: {
494
+ one: "about 1 week",
495
+ other: "about {{count}} weeks",
496
+ },
497
+
498
+ xWeeks: {
499
+ one: "1 week",
500
+ other: "{{count}} weeks",
501
+ },
502
+
503
+ aboutXMonths: {
504
+ one: "about 1 month",
505
+ other: "about {{count}} months",
506
+ },
507
+
508
+ xMonths: {
509
+ one: "1 month",
510
+ other: "{{count}} months",
511
+ },
512
+
513
+ aboutXYears: {
514
+ one: "about 1 year",
515
+ other: "about {{count}} years",
516
+ },
517
+
518
+ xYears: {
519
+ one: "1 year",
520
+ other: "{{count}} years",
521
+ },
522
+
523
+ overXYears: {
524
+ one: "over 1 year",
525
+ other: "over {{count}} years",
526
+ },
527
+
528
+ almostXYears: {
529
+ one: "almost 1 year",
530
+ other: "almost {{count}} years",
531
+ },
532
+ };
533
+
534
+ const formatDistance$1 = (token, count, options) => {
535
+ let result;
536
+
537
+ const tokenValue = formatDistanceLocale[token];
538
+ if (typeof tokenValue === "string") {
539
+ result = tokenValue;
540
+ } else if (count === 1) {
541
+ result = tokenValue.one;
542
+ } else {
543
+ result = tokenValue.other.replace("{{count}}", count.toString());
544
+ }
545
+
546
+ if (options?.addSuffix) {
547
+ if (options.comparison && options.comparison > 0) {
548
+ return "in " + result;
549
+ } else {
550
+ return result + " ago";
551
+ }
552
+ }
553
+
554
+ return result;
555
+ };
556
+ formatDistance.formatDistance = formatDistance$1;
557
+ return formatDistance;
558
+ }
559
+
560
+ var formatLong = {};
561
+
562
+ var buildFormatLongFn = {};
563
+
564
+ var hasRequiredBuildFormatLongFn;
565
+
566
+ function requireBuildFormatLongFn () {
567
+ if (hasRequiredBuildFormatLongFn) return buildFormatLongFn;
568
+ hasRequiredBuildFormatLongFn = 1;
569
+ buildFormatLongFn.buildFormatLongFn = buildFormatLongFn$1;
570
+
571
+ function buildFormatLongFn$1(args) {
572
+ return (options = {}) => {
573
+ // TODO: Remove String()
574
+ const width = options.width ? String(options.width) : args.defaultWidth;
575
+ const format = args.formats[width] || args.formats[args.defaultWidth];
576
+ return format;
577
+ };
578
+ }
579
+ return buildFormatLongFn;
580
+ }
581
+
582
+ var hasRequiredFormatLong;
583
+
584
+ function requireFormatLong () {
585
+ if (hasRequiredFormatLong) return formatLong;
586
+ hasRequiredFormatLong = 1;
587
+ formatLong.formatLong = void 0;
588
+ var _index = /*@__PURE__*/ requireBuildFormatLongFn();
589
+
590
+ const dateFormats = {
591
+ full: "EEEE, MMMM do, y",
592
+ long: "MMMM do, y",
593
+ medium: "MMM d, y",
594
+ short: "MM/dd/yyyy",
595
+ };
596
+
597
+ const timeFormats = {
598
+ full: "h:mm:ss a zzzz",
599
+ long: "h:mm:ss a z",
600
+ medium: "h:mm:ss a",
601
+ short: "h:mm a",
602
+ };
603
+
604
+ const dateTimeFormats = {
605
+ full: "{{date}} 'at' {{time}}",
606
+ long: "{{date}} 'at' {{time}}",
607
+ medium: "{{date}}, {{time}}",
608
+ short: "{{date}}, {{time}}",
609
+ };
610
+
611
+ (formatLong.formatLong = {
612
+ date: (0, _index.buildFormatLongFn)({
613
+ formats: dateFormats,
614
+ defaultWidth: "full",
615
+ }),
616
+
617
+ time: (0, _index.buildFormatLongFn)({
618
+ formats: timeFormats,
619
+ defaultWidth: "full",
620
+ }),
621
+
622
+ dateTime: (0, _index.buildFormatLongFn)({
623
+ formats: dateTimeFormats,
624
+ defaultWidth: "full",
625
+ }),
626
+ });
627
+ return formatLong;
628
+ }
629
+
630
+ var formatRelative = {};
631
+
632
+ var hasRequiredFormatRelative;
633
+
634
+ function requireFormatRelative () {
635
+ if (hasRequiredFormatRelative) return formatRelative;
636
+ hasRequiredFormatRelative = 1;
637
+ formatRelative.formatRelative = void 0;
638
+
639
+ const formatRelativeLocale = {
640
+ lastWeek: "'last' eeee 'at' p",
641
+ yesterday: "'yesterday at' p",
642
+ today: "'today at' p",
643
+ tomorrow: "'tomorrow at' p",
644
+ nextWeek: "eeee 'at' p",
645
+ other: "P",
646
+ };
647
+
648
+ const formatRelative$1 = (token, _date, _baseDate, _options) =>
649
+ formatRelativeLocale[token];
650
+ formatRelative.formatRelative = formatRelative$1;
651
+ return formatRelative;
652
+ }
653
+
654
+ var localize = {};
655
+
656
+ var buildLocalizeFn = {};
657
+
658
+ var hasRequiredBuildLocalizeFn;
659
+
660
+ function requireBuildLocalizeFn () {
661
+ if (hasRequiredBuildLocalizeFn) return buildLocalizeFn;
662
+ hasRequiredBuildLocalizeFn = 1;
663
+ buildLocalizeFn.buildLocalizeFn = buildLocalizeFn$1;
664
+
665
+ /**
666
+ * The localize function argument callback which allows to convert raw value to
667
+ * the actual type.
668
+ *
669
+ * @param value - The value to convert
670
+ *
671
+ * @returns The converted value
672
+ */
673
+
674
+ /**
675
+ * The map of localized values for each width.
676
+ */
677
+
678
+ /**
679
+ * The index type of the locale unit value. It types conversion of units of
680
+ * values that don't start at 0 (i.e. quarters).
681
+ */
682
+
683
+ /**
684
+ * Converts the unit value to the tuple of values.
685
+ */
686
+
687
+ /**
688
+ * The tuple of localized era values. The first element represents BC,
689
+ * the second element represents AD.
690
+ */
691
+
692
+ /**
693
+ * The tuple of localized quarter values. The first element represents Q1.
694
+ */
695
+
696
+ /**
697
+ * The tuple of localized day values. The first element represents Sunday.
698
+ */
699
+
700
+ /**
701
+ * The tuple of localized month values. The first element represents January.
702
+ */
703
+
704
+ function buildLocalizeFn$1(args) {
705
+ return (value, options) => {
706
+ const context = options?.context ? String(options.context) : "standalone";
707
+
708
+ let valuesArray;
709
+ if (context === "formatting" && args.formattingValues) {
710
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
711
+ const width = options?.width ? String(options.width) : defaultWidth;
712
+
713
+ valuesArray =
714
+ args.formattingValues[width] || args.formattingValues[defaultWidth];
715
+ } else {
716
+ const defaultWidth = args.defaultWidth;
717
+ const width = options?.width ? String(options.width) : args.defaultWidth;
718
+
719
+ valuesArray = args.values[width] || args.values[defaultWidth];
720
+ }
721
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
722
+
723
+ // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
724
+ return valuesArray[index];
725
+ };
726
+ }
727
+ return buildLocalizeFn;
728
+ }
729
+
730
+ var hasRequiredLocalize;
731
+
732
+ function requireLocalize () {
733
+ if (hasRequiredLocalize) return localize;
734
+ hasRequiredLocalize = 1;
735
+ localize.localize = void 0;
736
+ var _index = /*@__PURE__*/ requireBuildLocalizeFn();
737
+
738
+ const eraValues = {
739
+ narrow: ["B", "A"],
740
+ abbreviated: ["BC", "AD"],
741
+ wide: ["Before Christ", "Anno Domini"],
742
+ };
743
+
744
+ const quarterValues = {
745
+ narrow: ["1", "2", "3", "4"],
746
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
747
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
748
+ };
749
+
750
+ // Note: in English, the names of days of the week and months are capitalized.
751
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
752
+ // Generally, formatted dates should look like they are in the middle of a sentence,
753
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
754
+ const monthValues = {
755
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
756
+ abbreviated: [
757
+ "Jan",
758
+ "Feb",
759
+ "Mar",
760
+ "Apr",
761
+ "May",
762
+ "Jun",
763
+ "Jul",
764
+ "Aug",
765
+ "Sep",
766
+ "Oct",
767
+ "Nov",
768
+ "Dec",
769
+ ],
770
+
771
+ wide: [
772
+ "January",
773
+ "February",
774
+ "March",
775
+ "April",
776
+ "May",
777
+ "June",
778
+ "July",
779
+ "August",
780
+ "September",
781
+ "October",
782
+ "November",
783
+ "December",
784
+ ],
785
+ };
786
+
787
+ const dayValues = {
788
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
789
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
790
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
791
+ wide: [
792
+ "Sunday",
793
+ "Monday",
794
+ "Tuesday",
795
+ "Wednesday",
796
+ "Thursday",
797
+ "Friday",
798
+ "Saturday",
799
+ ],
800
+ };
801
+
802
+ const dayPeriodValues = {
803
+ narrow: {
804
+ am: "a",
805
+ pm: "p",
806
+ midnight: "mi",
807
+ noon: "n",
808
+ morning: "morning",
809
+ afternoon: "afternoon",
810
+ evening: "evening",
811
+ night: "night",
812
+ },
813
+ abbreviated: {
814
+ am: "AM",
815
+ pm: "PM",
816
+ midnight: "midnight",
817
+ noon: "noon",
818
+ morning: "morning",
819
+ afternoon: "afternoon",
820
+ evening: "evening",
821
+ night: "night",
822
+ },
823
+ wide: {
824
+ am: "a.m.",
825
+ pm: "p.m.",
826
+ midnight: "midnight",
827
+ noon: "noon",
828
+ morning: "morning",
829
+ afternoon: "afternoon",
830
+ evening: "evening",
831
+ night: "night",
832
+ },
833
+ };
834
+
835
+ const formattingDayPeriodValues = {
836
+ narrow: {
837
+ am: "a",
838
+ pm: "p",
839
+ midnight: "mi",
840
+ noon: "n",
841
+ morning: "in the morning",
842
+ afternoon: "in the afternoon",
843
+ evening: "in the evening",
844
+ night: "at night",
845
+ },
846
+ abbreviated: {
847
+ am: "AM",
848
+ pm: "PM",
849
+ midnight: "midnight",
850
+ noon: "noon",
851
+ morning: "in the morning",
852
+ afternoon: "in the afternoon",
853
+ evening: "in the evening",
854
+ night: "at night",
855
+ },
856
+ wide: {
857
+ am: "a.m.",
858
+ pm: "p.m.",
859
+ midnight: "midnight",
860
+ noon: "noon",
861
+ morning: "in the morning",
862
+ afternoon: "in the afternoon",
863
+ evening: "in the evening",
864
+ night: "at night",
865
+ },
866
+ };
867
+
868
+ const ordinalNumber = (dirtyNumber, _options) => {
869
+ const number = Number(dirtyNumber);
870
+
871
+ // If ordinal numbers depend on context, for example,
872
+ // if they are different for different grammatical genders,
873
+ // use `options.unit`.
874
+ //
875
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
876
+ // 'day', 'hour', 'minute', 'second'.
877
+
878
+ const rem100 = number % 100;
879
+ if (rem100 > 20 || rem100 < 10) {
880
+ switch (rem100 % 10) {
881
+ case 1:
882
+ return number + "st";
883
+ case 2:
884
+ return number + "nd";
885
+ case 3:
886
+ return number + "rd";
887
+ }
888
+ }
889
+ return number + "th";
890
+ };
891
+
892
+ (localize.localize = {
893
+ ordinalNumber,
894
+
895
+ era: (0, _index.buildLocalizeFn)({
896
+ values: eraValues,
897
+ defaultWidth: "wide",
898
+ }),
899
+
900
+ quarter: (0, _index.buildLocalizeFn)({
901
+ values: quarterValues,
902
+ defaultWidth: "wide",
903
+ argumentCallback: (quarter) => quarter - 1,
904
+ }),
905
+
906
+ month: (0, _index.buildLocalizeFn)({
907
+ values: monthValues,
908
+ defaultWidth: "wide",
909
+ }),
910
+
911
+ day: (0, _index.buildLocalizeFn)({
912
+ values: dayValues,
913
+ defaultWidth: "wide",
914
+ }),
915
+
916
+ dayPeriod: (0, _index.buildLocalizeFn)({
917
+ values: dayPeriodValues,
918
+ defaultWidth: "wide",
919
+ formattingValues: formattingDayPeriodValues,
920
+ defaultFormattingWidth: "wide",
921
+ }),
922
+ });
923
+ return localize;
924
+ }
925
+
926
+ var match = {};
927
+
928
+ var buildMatchFn = {};
929
+
930
+ var hasRequiredBuildMatchFn;
931
+
932
+ function requireBuildMatchFn () {
933
+ if (hasRequiredBuildMatchFn) return buildMatchFn;
934
+ hasRequiredBuildMatchFn = 1;
935
+ buildMatchFn.buildMatchFn = buildMatchFn$1;
936
+
937
+ function buildMatchFn$1(args) {
938
+ return (string, options = {}) => {
939
+ const width = options.width;
940
+
941
+ const matchPattern =
942
+ (width && args.matchPatterns[width]) ||
943
+ args.matchPatterns[args.defaultMatchWidth];
944
+ const matchResult = string.match(matchPattern);
945
+
946
+ if (!matchResult) {
947
+ return null;
948
+ }
949
+ const matchedString = matchResult[0];
950
+
951
+ const parsePatterns =
952
+ (width && args.parsePatterns[width]) ||
953
+ args.parsePatterns[args.defaultParseWidth];
954
+
955
+ const key = Array.isArray(parsePatterns)
956
+ ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
957
+ : // [TODO] -- I challenge you to fix the type
958
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString));
959
+
960
+ let value;
961
+
962
+ value = args.valueCallback ? args.valueCallback(key) : key;
963
+ value = options.valueCallback
964
+ ? // [TODO] -- I challenge you to fix the type
965
+ options.valueCallback(value)
966
+ : value;
967
+
968
+ const rest = string.slice(matchedString.length);
969
+
970
+ return { value, rest };
971
+ };
972
+ }
973
+
974
+ function findKey(object, predicate) {
975
+ for (const key in object) {
976
+ if (
977
+ Object.prototype.hasOwnProperty.call(object, key) &&
978
+ predicate(object[key])
979
+ ) {
980
+ return key;
981
+ }
982
+ }
983
+ return undefined;
984
+ }
985
+
986
+ function findIndex(array, predicate) {
987
+ for (let key = 0; key < array.length; key++) {
988
+ if (predicate(array[key])) {
989
+ return key;
990
+ }
991
+ }
992
+ return undefined;
993
+ }
994
+ return buildMatchFn;
995
+ }
996
+
997
+ var buildMatchPatternFn = {};
998
+
999
+ var hasRequiredBuildMatchPatternFn;
1000
+
1001
+ function requireBuildMatchPatternFn () {
1002
+ if (hasRequiredBuildMatchPatternFn) return buildMatchPatternFn;
1003
+ hasRequiredBuildMatchPatternFn = 1;
1004
+ buildMatchPatternFn.buildMatchPatternFn = buildMatchPatternFn$1;
1005
+
1006
+ function buildMatchPatternFn$1(args) {
1007
+ return (string, options = {}) => {
1008
+ const matchResult = string.match(args.matchPattern);
1009
+ if (!matchResult) return null;
1010
+ const matchedString = matchResult[0];
1011
+
1012
+ const parseResult = string.match(args.parsePattern);
1013
+ if (!parseResult) return null;
1014
+ let value = args.valueCallback
1015
+ ? args.valueCallback(parseResult[0])
1016
+ : parseResult[0];
1017
+
1018
+ // [TODO] I challenge you to fix the type
1019
+ value = options.valueCallback ? options.valueCallback(value) : value;
1020
+
1021
+ const rest = string.slice(matchedString.length);
1022
+
1023
+ return { value, rest };
1024
+ };
1025
+ }
1026
+ return buildMatchPatternFn;
1027
+ }
1028
+
1029
+ var hasRequiredMatch;
1030
+
1031
+ function requireMatch () {
1032
+ if (hasRequiredMatch) return match;
1033
+ hasRequiredMatch = 1;
1034
+ match.match = void 0;
1035
+
1036
+ var _index = /*@__PURE__*/ requireBuildMatchFn();
1037
+ var _index2 = /*@__PURE__*/ requireBuildMatchPatternFn();
1038
+
1039
+ const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
1040
+ const parseOrdinalNumberPattern = /\d+/i;
1041
+
1042
+ const matchEraPatterns = {
1043
+ narrow: /^(b|a)/i,
1044
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1045
+ wide: /^(before christ|before common era|anno domini|common era)/i,
1046
+ };
1047
+ const parseEraPatterns = {
1048
+ any: [/^b/i, /^(a|c)/i],
1049
+ };
1050
+
1051
+ const matchQuarterPatterns = {
1052
+ narrow: /^[1234]/i,
1053
+ abbreviated: /^q[1234]/i,
1054
+ wide: /^[1234](th|st|nd|rd)? quarter/i,
1055
+ };
1056
+ const parseQuarterPatterns = {
1057
+ any: [/1/i, /2/i, /3/i, /4/i],
1058
+ };
1059
+
1060
+ const matchMonthPatterns = {
1061
+ narrow: /^[jfmasond]/i,
1062
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1063
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
1064
+ };
1065
+ const parseMonthPatterns = {
1066
+ narrow: [
1067
+ /^j/i,
1068
+ /^f/i,
1069
+ /^m/i,
1070
+ /^a/i,
1071
+ /^m/i,
1072
+ /^j/i,
1073
+ /^j/i,
1074
+ /^a/i,
1075
+ /^s/i,
1076
+ /^o/i,
1077
+ /^n/i,
1078
+ /^d/i,
1079
+ ],
1080
+
1081
+ any: [
1082
+ /^ja/i,
1083
+ /^f/i,
1084
+ /^mar/i,
1085
+ /^ap/i,
1086
+ /^may/i,
1087
+ /^jun/i,
1088
+ /^jul/i,
1089
+ /^au/i,
1090
+ /^s/i,
1091
+ /^o/i,
1092
+ /^n/i,
1093
+ /^d/i,
1094
+ ],
1095
+ };
1096
+
1097
+ const matchDayPatterns = {
1098
+ narrow: /^[smtwf]/i,
1099
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1100
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1101
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
1102
+ };
1103
+ const parseDayPatterns = {
1104
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1105
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
1106
+ };
1107
+
1108
+ const matchDayPeriodPatterns = {
1109
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1110
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
1111
+ };
1112
+ const parseDayPeriodPatterns = {
1113
+ any: {
1114
+ am: /^a/i,
1115
+ pm: /^p/i,
1116
+ midnight: /^mi/i,
1117
+ noon: /^no/i,
1118
+ morning: /morning/i,
1119
+ afternoon: /afternoon/i,
1120
+ evening: /evening/i,
1121
+ night: /night/i,
1122
+ },
1123
+ };
1124
+
1125
+ (match.match = {
1126
+ ordinalNumber: (0, _index2.buildMatchPatternFn)({
1127
+ matchPattern: matchOrdinalNumberPattern,
1128
+ parsePattern: parseOrdinalNumberPattern,
1129
+ valueCallback: (value) => parseInt(value, 10),
1130
+ }),
1131
+
1132
+ era: (0, _index.buildMatchFn)({
1133
+ matchPatterns: matchEraPatterns,
1134
+ defaultMatchWidth: "wide",
1135
+ parsePatterns: parseEraPatterns,
1136
+ defaultParseWidth: "any",
1137
+ }),
1138
+
1139
+ quarter: (0, _index.buildMatchFn)({
1140
+ matchPatterns: matchQuarterPatterns,
1141
+ defaultMatchWidth: "wide",
1142
+ parsePatterns: parseQuarterPatterns,
1143
+ defaultParseWidth: "any",
1144
+ valueCallback: (index) => index + 1,
1145
+ }),
1146
+
1147
+ month: (0, _index.buildMatchFn)({
1148
+ matchPatterns: matchMonthPatterns,
1149
+ defaultMatchWidth: "wide",
1150
+ parsePatterns: parseMonthPatterns,
1151
+ defaultParseWidth: "any",
1152
+ }),
1153
+
1154
+ day: (0, _index.buildMatchFn)({
1155
+ matchPatterns: matchDayPatterns,
1156
+ defaultMatchWidth: "wide",
1157
+ parsePatterns: parseDayPatterns,
1158
+ defaultParseWidth: "any",
1159
+ }),
1160
+
1161
+ dayPeriod: (0, _index.buildMatchFn)({
1162
+ matchPatterns: matchDayPeriodPatterns,
1163
+ defaultMatchWidth: "any",
1164
+ parsePatterns: parseDayPeriodPatterns,
1165
+ defaultParseWidth: "any",
1166
+ }),
1167
+ });
1168
+ return match;
1169
+ }
1170
+
1171
+ var hasRequiredEnUS;
1172
+
1173
+ function requireEnUS () {
1174
+ if (hasRequiredEnUS) return enUS;
1175
+ hasRequiredEnUS = 1;
1176
+ enUS.enUS = void 0;
1177
+ var _index = /*@__PURE__*/ requireFormatDistance();
1178
+ var _index2 = /*@__PURE__*/ requireFormatLong();
1179
+ var _index3 = /*@__PURE__*/ requireFormatRelative();
1180
+ var _index4 = /*@__PURE__*/ requireLocalize();
1181
+ var _index5 = /*@__PURE__*/ requireMatch();
1182
+
1183
+ /**
1184
+ * @category Locales
1185
+ * @summary English locale (United States).
1186
+ * @language English
1187
+ * @iso-639-2 eng
1188
+ * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
1189
+ * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
1190
+ */
1191
+ (enUS.enUS = {
1192
+ code: "en-US",
1193
+ formatDistance: _index.formatDistance,
1194
+ formatLong: _index2.formatLong,
1195
+ formatRelative: _index3.formatRelative,
1196
+ localize: _index4.localize,
1197
+ match: _index5.match,
1198
+ options: {
1199
+ weekStartsOn: 0 /* Sunday */,
1200
+ firstWeekContainsDate: 1,
1201
+ },
1202
+ });
1203
+ return enUS;
1204
+ }
1205
+
1206
+ var hasRequiredDefaultLocale;
1207
+
1208
+ function requireDefaultLocale () {
1209
+ if (hasRequiredDefaultLocale) return defaultLocale;
1210
+ hasRequiredDefaultLocale = 1;
1211
+ (function (exports) {
1212
+ Object.defineProperty(exports, "defaultLocale", {
1213
+ enumerable: true,
1214
+ get: function () {
1215
+ return _index.enUS;
1216
+ },
1217
+ });
1218
+ var _index = /*@__PURE__*/ requireEnUS();
1219
+ } (defaultLocale));
1220
+ return defaultLocale;
1221
+ }
1222
+
1223
+ var defaultOptions = {};
1224
+
1225
+ var hasRequiredDefaultOptions;
1226
+
1227
+ function requireDefaultOptions () {
1228
+ if (hasRequiredDefaultOptions) return defaultOptions;
1229
+ hasRequiredDefaultOptions = 1;
1230
+ defaultOptions.getDefaultOptions = getDefaultOptions;
1231
+ defaultOptions.setDefaultOptions = setDefaultOptions;
1232
+
1233
+ let defaultOptions$1 = {};
1234
+
1235
+ function getDefaultOptions() {
1236
+ return defaultOptions$1;
1237
+ }
1238
+
1239
+ function setDefaultOptions(newOptions) {
1240
+ defaultOptions$1 = newOptions;
1241
+ }
1242
+ return defaultOptions;
1243
+ }
1244
+
1245
+ var formatters = {};
1246
+
1247
+ var getDayOfYear = {};
1248
+
1249
+ var differenceInCalendarDays = {};
1250
+
1251
+ var getTimezoneOffsetInMilliseconds = {};
1252
+
1253
+ var hasRequiredGetTimezoneOffsetInMilliseconds;
1254
+
1255
+ function requireGetTimezoneOffsetInMilliseconds () {
1256
+ if (hasRequiredGetTimezoneOffsetInMilliseconds) return getTimezoneOffsetInMilliseconds;
1257
+ hasRequiredGetTimezoneOffsetInMilliseconds = 1;
1258
+ getTimezoneOffsetInMilliseconds.getTimezoneOffsetInMilliseconds = getTimezoneOffsetInMilliseconds$1;
1259
+ var _index = /*@__PURE__*/ requireToDate();
1260
+
1261
+ /**
1262
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
1263
+ * They usually appear for dates that denote time before the timezones were introduced
1264
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
1265
+ * and GMT+01:00:00 after that date)
1266
+ *
1267
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
1268
+ * which would lead to incorrect calculations.
1269
+ *
1270
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
1271
+ */
1272
+ function getTimezoneOffsetInMilliseconds$1(date) {
1273
+ const _date = (0, _index.toDate)(date);
1274
+ const utcDate = new Date(
1275
+ Date.UTC(
1276
+ _date.getFullYear(),
1277
+ _date.getMonth(),
1278
+ _date.getDate(),
1279
+ _date.getHours(),
1280
+ _date.getMinutes(),
1281
+ _date.getSeconds(),
1282
+ _date.getMilliseconds(),
1283
+ ),
1284
+ );
1285
+ utcDate.setUTCFullYear(_date.getFullYear());
1286
+ return +date - +utcDate;
1287
+ }
1288
+ return getTimezoneOffsetInMilliseconds;
1289
+ }
1290
+
1291
+ var normalizeDates = {};
1292
+
1293
+ var hasRequiredNormalizeDates;
1294
+
1295
+ function requireNormalizeDates () {
1296
+ if (hasRequiredNormalizeDates) return normalizeDates;
1297
+ hasRequiredNormalizeDates = 1;
1298
+ normalizeDates.normalizeDates = normalizeDates$1;
1299
+ var _index = /*@__PURE__*/ requireConstructFrom();
1300
+
1301
+ function normalizeDates$1(context, ...dates) {
1302
+ const normalize = _index.constructFrom.bind(
1303
+ null,
1304
+ context || dates.find((date) => typeof date === "object"),
1305
+ );
1306
+ return dates.map(normalize);
1307
+ }
1308
+ return normalizeDates;
1309
+ }
1310
+
1311
+ var startOfDay = {};
1312
+
1313
+ var hasRequiredStartOfDay;
1314
+
1315
+ function requireStartOfDay () {
1316
+ if (hasRequiredStartOfDay) return startOfDay;
1317
+ hasRequiredStartOfDay = 1;
1318
+ startOfDay.startOfDay = startOfDay$1;
1319
+ var _index = /*@__PURE__*/ requireToDate();
1320
+
1321
+ /**
1322
+ * The {@link startOfDay} function options.
1323
+ */
1324
+
1325
+ /**
1326
+ * @name startOfDay
1327
+ * @category Day Helpers
1328
+ * @summary Return the start of a day for the given date.
1329
+ *
1330
+ * @description
1331
+ * Return the start of a day for the given date.
1332
+ * The result will be in the local timezone.
1333
+ *
1334
+ * @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).
1335
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1336
+ *
1337
+ * @param date - The original date
1338
+ * @param options - The options
1339
+ *
1340
+ * @returns The start of a day
1341
+ *
1342
+ * @example
1343
+ * // The start of a day for 2 September 2014 11:55:00:
1344
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
1345
+ * //=> Tue Sep 02 2014 00:00:00
1346
+ */
1347
+ function startOfDay$1(date, options) {
1348
+ const _date = (0, _index.toDate)(date, options?.in);
1349
+ _date.setHours(0, 0, 0, 0);
1350
+ return _date;
1351
+ }
1352
+ return startOfDay;
1353
+ }
1354
+
1355
+ var hasRequiredDifferenceInCalendarDays;
1356
+
1357
+ function requireDifferenceInCalendarDays () {
1358
+ if (hasRequiredDifferenceInCalendarDays) return differenceInCalendarDays;
1359
+ hasRequiredDifferenceInCalendarDays = 1;
1360
+ differenceInCalendarDays.differenceInCalendarDays = differenceInCalendarDays$1;
1361
+ var _index = /*@__PURE__*/ requireGetTimezoneOffsetInMilliseconds();
1362
+ var _index2 = /*@__PURE__*/ requireNormalizeDates();
1363
+ var _index3 = /*@__PURE__*/ requireConstants();
1364
+ var _index4 = /*@__PURE__*/ requireStartOfDay();
1365
+
1366
+ /**
1367
+ * The {@link differenceInCalendarDays} function options.
1368
+ */
1369
+
1370
+ /**
1371
+ * @name differenceInCalendarDays
1372
+ * @category Day Helpers
1373
+ * @summary Get the number of calendar days between the given dates.
1374
+ *
1375
+ * @description
1376
+ * Get the number of calendar days between the given dates. This means that the times are removed
1377
+ * from the dates and then the difference in days is calculated.
1378
+ *
1379
+ * @param laterDate - The later date
1380
+ * @param earlierDate - The earlier date
1381
+ * @param options - The options object
1382
+ *
1383
+ * @returns The number of calendar days
1384
+ *
1385
+ * @example
1386
+ * // How many calendar days are between
1387
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
1388
+ * const result = differenceInCalendarDays(
1389
+ * new Date(2012, 6, 2, 0, 0),
1390
+ * new Date(2011, 6, 2, 23, 0)
1391
+ * )
1392
+ * //=> 366
1393
+ * // How many calendar days are between
1394
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
1395
+ * const result = differenceInCalendarDays(
1396
+ * new Date(2011, 6, 3, 0, 1),
1397
+ * new Date(2011, 6, 2, 23, 59)
1398
+ * )
1399
+ * //=> 1
1400
+ */
1401
+ function differenceInCalendarDays$1(laterDate, earlierDate, options) {
1402
+ const [laterDate_, earlierDate_] = (0, _index2.normalizeDates)(
1403
+ options?.in,
1404
+ laterDate,
1405
+ earlierDate,
1406
+ );
1407
+
1408
+ const laterStartOfDay = (0, _index4.startOfDay)(laterDate_);
1409
+ const earlierStartOfDay = (0, _index4.startOfDay)(earlierDate_);
1410
+
1411
+ const laterTimestamp =
1412
+ +laterStartOfDay -
1413
+ (0, _index.getTimezoneOffsetInMilliseconds)(laterStartOfDay);
1414
+ const earlierTimestamp =
1415
+ +earlierStartOfDay -
1416
+ (0, _index.getTimezoneOffsetInMilliseconds)(earlierStartOfDay);
1417
+
1418
+ // Round the number of days to the nearest integer because the number of
1419
+ // milliseconds in a day is not constant (e.g. it's different in the week of
1420
+ // the daylight saving time clock shift).
1421
+ return Math.round(
1422
+ (laterTimestamp - earlierTimestamp) / _index3.millisecondsInDay,
1423
+ );
1424
+ }
1425
+ return differenceInCalendarDays;
1426
+ }
1427
+
1428
+ var startOfYear = {};
1429
+
1430
+ var hasRequiredStartOfYear;
1431
+
1432
+ function requireStartOfYear () {
1433
+ if (hasRequiredStartOfYear) return startOfYear;
1434
+ hasRequiredStartOfYear = 1;
1435
+ startOfYear.startOfYear = startOfYear$1;
1436
+ var _index = /*@__PURE__*/ requireToDate();
1437
+
1438
+ /**
1439
+ * The {@link startOfYear} function options.
1440
+ */
1441
+
1442
+ /**
1443
+ * @name startOfYear
1444
+ * @category Year Helpers
1445
+ * @summary Return the start of a year for the given date.
1446
+ *
1447
+ * @description
1448
+ * Return the start of a year for the given date.
1449
+ * The result will be in the local timezone.
1450
+ *
1451
+ * @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).
1452
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1453
+ *
1454
+ * @param date - The original date
1455
+ * @param options - The options
1456
+ *
1457
+ * @returns The start of a year
1458
+ *
1459
+ * @example
1460
+ * // The start of a year for 2 September 2014 11:55:00:
1461
+ * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
1462
+ * //=> Wed Jan 01 2014 00:00:00
1463
+ */
1464
+ function startOfYear$1(date, options) {
1465
+ const date_ = (0, _index.toDate)(date, options?.in);
1466
+ date_.setFullYear(date_.getFullYear(), 0, 1);
1467
+ date_.setHours(0, 0, 0, 0);
1468
+ return date_;
1469
+ }
1470
+ return startOfYear;
1471
+ }
1472
+
1473
+ var hasRequiredGetDayOfYear;
1474
+
1475
+ function requireGetDayOfYear () {
1476
+ if (hasRequiredGetDayOfYear) return getDayOfYear;
1477
+ hasRequiredGetDayOfYear = 1;
1478
+ getDayOfYear.getDayOfYear = getDayOfYear$1;
1479
+ var _index = /*@__PURE__*/ requireDifferenceInCalendarDays();
1480
+ var _index2 = /*@__PURE__*/ requireStartOfYear();
1481
+ var _index3 = /*@__PURE__*/ requireToDate();
1482
+
1483
+ /**
1484
+ * The {@link getDayOfYear} function options.
1485
+ */
1486
+
1487
+ /**
1488
+ * @name getDayOfYear
1489
+ * @category Day Helpers
1490
+ * @summary Get the day of the year of the given date.
1491
+ *
1492
+ * @description
1493
+ * Get the day of the year of the given date.
1494
+ *
1495
+ * @param date - The given date
1496
+ * @param options - The options
1497
+ *
1498
+ * @returns The day of year
1499
+ *
1500
+ * @example
1501
+ * // Which day of the year is 2 July 2014?
1502
+ * const result = getDayOfYear(new Date(2014, 6, 2))
1503
+ * //=> 183
1504
+ */
1505
+ function getDayOfYear$1(date, options) {
1506
+ const _date = (0, _index3.toDate)(date, options?.in);
1507
+ const diff = (0, _index.differenceInCalendarDays)(
1508
+ _date,
1509
+ (0, _index2.startOfYear)(_date),
1510
+ );
1511
+ const dayOfYear = diff + 1;
1512
+ return dayOfYear;
1513
+ }
1514
+ return getDayOfYear;
1515
+ }
1516
+
1517
+ var getISOWeek = {};
1518
+
1519
+ var startOfISOWeek = {};
1520
+
1521
+ var startOfWeek = {};
1522
+
1523
+ var hasRequiredStartOfWeek;
1524
+
1525
+ function requireStartOfWeek () {
1526
+ if (hasRequiredStartOfWeek) return startOfWeek;
1527
+ hasRequiredStartOfWeek = 1;
1528
+ startOfWeek.startOfWeek = startOfWeek$1;
1529
+ var _index = /*@__PURE__*/ requireDefaultOptions();
1530
+ var _index2 = /*@__PURE__*/ requireToDate();
1531
+
1532
+ /**
1533
+ * The {@link startOfWeek} function options.
1534
+ */
1535
+
1536
+ /**
1537
+ * @name startOfWeek
1538
+ * @category Week Helpers
1539
+ * @summary Return the start of a week for the given date.
1540
+ *
1541
+ * @description
1542
+ * Return the start of a week for the given date.
1543
+ * The result will be in the local timezone.
1544
+ *
1545
+ * @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).
1546
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1547
+ *
1548
+ * @param date - The original date
1549
+ * @param options - An object with options
1550
+ *
1551
+ * @returns The start of a week
1552
+ *
1553
+ * @example
1554
+ * // The start of a week for 2 September 2014 11:55:00:
1555
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
1556
+ * //=> Sun Aug 31 2014 00:00:00
1557
+ *
1558
+ * @example
1559
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
1560
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
1561
+ * //=> Mon Sep 01 2014 00:00:00
1562
+ */
1563
+ function startOfWeek$1(date, options) {
1564
+ const defaultOptions = (0, _index.getDefaultOptions)();
1565
+ const weekStartsOn =
1566
+ options?.weekStartsOn ??
1567
+ options?.locale?.options?.weekStartsOn ??
1568
+ defaultOptions.weekStartsOn ??
1569
+ defaultOptions.locale?.options?.weekStartsOn ??
1570
+ 0;
1571
+
1572
+ const _date = (0, _index2.toDate)(date, options?.in);
1573
+ const day = _date.getDay();
1574
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
1575
+
1576
+ _date.setDate(_date.getDate() - diff);
1577
+ _date.setHours(0, 0, 0, 0);
1578
+ return _date;
1579
+ }
1580
+ return startOfWeek;
1581
+ }
1582
+
1583
+ var hasRequiredStartOfISOWeek;
1584
+
1585
+ function requireStartOfISOWeek () {
1586
+ if (hasRequiredStartOfISOWeek) return startOfISOWeek;
1587
+ hasRequiredStartOfISOWeek = 1;
1588
+ startOfISOWeek.startOfISOWeek = startOfISOWeek$1;
1589
+ var _index = /*@__PURE__*/ requireStartOfWeek();
1590
+
1591
+ /**
1592
+ * The {@link startOfISOWeek} function options.
1593
+ */
1594
+
1595
+ /**
1596
+ * @name startOfISOWeek
1597
+ * @category ISO Week Helpers
1598
+ * @summary Return the start of an ISO week for the given date.
1599
+ *
1600
+ * @description
1601
+ * Return the start of an ISO week for the given date.
1602
+ * The result will be in the local timezone.
1603
+ *
1604
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1605
+ *
1606
+ * @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).
1607
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1608
+ *
1609
+ * @param date - The original date
1610
+ * @param options - An object with options
1611
+ *
1612
+ * @returns The start of an ISO week
1613
+ *
1614
+ * @example
1615
+ * // The start of an ISO week for 2 September 2014 11:55:00:
1616
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
1617
+ * //=> Mon Sep 01 2014 00:00:00
1618
+ */
1619
+ function startOfISOWeek$1(date, options) {
1620
+ return (0, _index.startOfWeek)(date, { ...options, weekStartsOn: 1 });
1621
+ }
1622
+ return startOfISOWeek;
1623
+ }
1624
+
1625
+ var startOfISOWeekYear = {};
1626
+
1627
+ var getISOWeekYear = {};
1628
+
1629
+ var hasRequiredGetISOWeekYear;
1630
+
1631
+ function requireGetISOWeekYear () {
1632
+ if (hasRequiredGetISOWeekYear) return getISOWeekYear;
1633
+ hasRequiredGetISOWeekYear = 1;
1634
+ getISOWeekYear.getISOWeekYear = getISOWeekYear$1;
1635
+ var _index = /*@__PURE__*/ requireConstructFrom();
1636
+ var _index2 = /*@__PURE__*/ requireStartOfISOWeek();
1637
+ var _index3 = /*@__PURE__*/ requireToDate();
1638
+
1639
+ /**
1640
+ * The {@link getISOWeekYear} function options.
1641
+ */
1642
+
1643
+ /**
1644
+ * @name getISOWeekYear
1645
+ * @category ISO Week-Numbering Year Helpers
1646
+ * @summary Get the ISO week-numbering year of the given date.
1647
+ *
1648
+ * @description
1649
+ * Get the ISO week-numbering year of the given date,
1650
+ * which always starts 3 days before the year's first Thursday.
1651
+ *
1652
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1653
+ *
1654
+ * @param date - The given date
1655
+ *
1656
+ * @returns The ISO week-numbering year
1657
+ *
1658
+ * @example
1659
+ * // Which ISO-week numbering year is 2 January 2005?
1660
+ * const result = getISOWeekYear(new Date(2005, 0, 2))
1661
+ * //=> 2004
1662
+ */
1663
+ function getISOWeekYear$1(date, options) {
1664
+ const _date = (0, _index3.toDate)(date, options?.in);
1665
+ const year = _date.getFullYear();
1666
+
1667
+ const fourthOfJanuaryOfNextYear = (0, _index.constructFrom)(_date, 0);
1668
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
1669
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
1670
+ const startOfNextYear = (0, _index2.startOfISOWeek)(
1671
+ fourthOfJanuaryOfNextYear,
1672
+ );
1673
+
1674
+ const fourthOfJanuaryOfThisYear = (0, _index.constructFrom)(_date, 0);
1675
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
1676
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
1677
+ const startOfThisYear = (0, _index2.startOfISOWeek)(
1678
+ fourthOfJanuaryOfThisYear,
1679
+ );
1680
+
1681
+ if (_date.getTime() >= startOfNextYear.getTime()) {
1682
+ return year + 1;
1683
+ } else if (_date.getTime() >= startOfThisYear.getTime()) {
1684
+ return year;
1685
+ } else {
1686
+ return year - 1;
1687
+ }
1688
+ }
1689
+ return getISOWeekYear;
1690
+ }
1691
+
1692
+ var hasRequiredStartOfISOWeekYear;
1693
+
1694
+ function requireStartOfISOWeekYear () {
1695
+ if (hasRequiredStartOfISOWeekYear) return startOfISOWeekYear;
1696
+ hasRequiredStartOfISOWeekYear = 1;
1697
+ startOfISOWeekYear.startOfISOWeekYear = startOfISOWeekYear$1;
1698
+ var _index = /*@__PURE__*/ requireConstructFrom();
1699
+ var _index2 = /*@__PURE__*/ requireGetISOWeekYear();
1700
+ var _index3 = /*@__PURE__*/ requireStartOfISOWeek();
1701
+
1702
+ /**
1703
+ * The {@link startOfISOWeekYear} function options.
1704
+ */
1705
+
1706
+ /**
1707
+ * @name startOfISOWeekYear
1708
+ * @category ISO Week-Numbering Year Helpers
1709
+ * @summary Return the start of an ISO week-numbering year for the given date.
1710
+ *
1711
+ * @description
1712
+ * Return the start of an ISO week-numbering year,
1713
+ * which always starts 3 days before the year's first Thursday.
1714
+ * The result will be in the local timezone.
1715
+ *
1716
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1717
+ *
1718
+ * @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).
1719
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1720
+ *
1721
+ * @param date - The original date
1722
+ * @param options - An object with options
1723
+ *
1724
+ * @returns The start of an ISO week-numbering year
1725
+ *
1726
+ * @example
1727
+ * // The start of an ISO week-numbering year for 2 July 2005:
1728
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
1729
+ * //=> Mon Jan 03 2005 00:00:00
1730
+ */
1731
+ function startOfISOWeekYear$1(date, options) {
1732
+ const year = (0, _index2.getISOWeekYear)(date, options);
1733
+ const fourthOfJanuary = (0, _index.constructFrom)(options?.in || date, 0);
1734
+ fourthOfJanuary.setFullYear(year, 0, 4);
1735
+ fourthOfJanuary.setHours(0, 0, 0, 0);
1736
+ return (0, _index3.startOfISOWeek)(fourthOfJanuary);
1737
+ }
1738
+ return startOfISOWeekYear;
1739
+ }
1740
+
1741
+ var hasRequiredGetISOWeek;
1742
+
1743
+ function requireGetISOWeek () {
1744
+ if (hasRequiredGetISOWeek) return getISOWeek;
1745
+ hasRequiredGetISOWeek = 1;
1746
+ getISOWeek.getISOWeek = getISOWeek$1;
1747
+ var _index = /*@__PURE__*/ requireConstants();
1748
+ var _index2 = /*@__PURE__*/ requireStartOfISOWeek();
1749
+ var _index3 = /*@__PURE__*/ requireStartOfISOWeekYear();
1750
+ var _index4 = /*@__PURE__*/ requireToDate();
1751
+
1752
+ /**
1753
+ * The {@link getISOWeek} function options.
1754
+ */
1755
+
1756
+ /**
1757
+ * @name getISOWeek
1758
+ * @category ISO Week Helpers
1759
+ * @summary Get the ISO week of the given date.
1760
+ *
1761
+ * @description
1762
+ * Get the ISO week of the given date.
1763
+ *
1764
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1765
+ *
1766
+ * @param date - The given date
1767
+ * @param options - The options
1768
+ *
1769
+ * @returns The ISO week
1770
+ *
1771
+ * @example
1772
+ * // Which week of the ISO-week numbering year is 2 January 2005?
1773
+ * const result = getISOWeek(new Date(2005, 0, 2))
1774
+ * //=> 53
1775
+ */
1776
+ function getISOWeek$1(date, options) {
1777
+ const _date = (0, _index4.toDate)(date, options?.in);
1778
+ const diff =
1779
+ +(0, _index2.startOfISOWeek)(_date) -
1780
+ +(0, _index3.startOfISOWeekYear)(_date);
1781
+
1782
+ // Round the number of weeks to the nearest integer because the number of
1783
+ // milliseconds in a week is not constant (e.g. it's different in the week of
1784
+ // the daylight saving time clock shift).
1785
+ return Math.round(diff / _index.millisecondsInWeek) + 1;
1786
+ }
1787
+ return getISOWeek;
1788
+ }
1789
+
1790
+ var getWeek = {};
1791
+
1792
+ var startOfWeekYear = {};
1793
+
1794
+ var getWeekYear = {};
1795
+
1796
+ var hasRequiredGetWeekYear;
1797
+
1798
+ function requireGetWeekYear () {
1799
+ if (hasRequiredGetWeekYear) return getWeekYear;
1800
+ hasRequiredGetWeekYear = 1;
1801
+ getWeekYear.getWeekYear = getWeekYear$1;
1802
+ var _index = /*@__PURE__*/ requireDefaultOptions();
1803
+ var _index2 = /*@__PURE__*/ requireConstructFrom();
1804
+ var _index3 = /*@__PURE__*/ requireStartOfWeek();
1805
+ var _index4 = /*@__PURE__*/ requireToDate();
1806
+
1807
+ /**
1808
+ * The {@link getWeekYear} function options.
1809
+ */
1810
+
1811
+ /**
1812
+ * @name getWeekYear
1813
+ * @category Week-Numbering Year Helpers
1814
+ * @summary Get the local week-numbering year of the given date.
1815
+ *
1816
+ * @description
1817
+ * Get the local week-numbering year of the given date.
1818
+ * The exact calculation depends on the values of
1819
+ * `options.weekStartsOn` (which is the index of the first day of the week)
1820
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
1821
+ * the first week of the week-numbering year)
1822
+ *
1823
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
1824
+ *
1825
+ * @param date - The given date
1826
+ * @param options - An object with options.
1827
+ *
1828
+ * @returns The local week-numbering year
1829
+ *
1830
+ * @example
1831
+ * // Which week numbering year is 26 December 2004 with the default settings?
1832
+ * const result = getWeekYear(new Date(2004, 11, 26))
1833
+ * //=> 2005
1834
+ *
1835
+ * @example
1836
+ * // Which week numbering year is 26 December 2004 if week starts on Saturday?
1837
+ * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
1838
+ * //=> 2004
1839
+ *
1840
+ * @example
1841
+ * // Which week numbering year is 26 December 2004 if the first week contains 4 January?
1842
+ * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
1843
+ * //=> 2004
1844
+ */
1845
+ function getWeekYear$1(date, options) {
1846
+ const _date = (0, _index4.toDate)(date, options?.in);
1847
+ const year = _date.getFullYear();
1848
+
1849
+ const defaultOptions = (0, _index.getDefaultOptions)();
1850
+ const firstWeekContainsDate =
1851
+ options?.firstWeekContainsDate ??
1852
+ options?.locale?.options?.firstWeekContainsDate ??
1853
+ defaultOptions.firstWeekContainsDate ??
1854
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
1855
+ 1;
1856
+
1857
+ const firstWeekOfNextYear = (0, _index2.constructFrom)(
1858
+ options?.in || date,
1859
+ 0,
1860
+ );
1861
+ firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
1862
+ firstWeekOfNextYear.setHours(0, 0, 0, 0);
1863
+ const startOfNextYear = (0, _index3.startOfWeek)(
1864
+ firstWeekOfNextYear,
1865
+ options,
1866
+ );
1867
+
1868
+ const firstWeekOfThisYear = (0, _index2.constructFrom)(
1869
+ options?.in || date,
1870
+ 0,
1871
+ );
1872
+ firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
1873
+ firstWeekOfThisYear.setHours(0, 0, 0, 0);
1874
+ const startOfThisYear = (0, _index3.startOfWeek)(
1875
+ firstWeekOfThisYear,
1876
+ options,
1877
+ );
1878
+
1879
+ if (+_date >= +startOfNextYear) {
1880
+ return year + 1;
1881
+ } else if (+_date >= +startOfThisYear) {
1882
+ return year;
1883
+ } else {
1884
+ return year - 1;
1885
+ }
1886
+ }
1887
+ return getWeekYear;
1888
+ }
1889
+
1890
+ var hasRequiredStartOfWeekYear;
1891
+
1892
+ function requireStartOfWeekYear () {
1893
+ if (hasRequiredStartOfWeekYear) return startOfWeekYear;
1894
+ hasRequiredStartOfWeekYear = 1;
1895
+ startOfWeekYear.startOfWeekYear = startOfWeekYear$1;
1896
+ var _index = /*@__PURE__*/ requireDefaultOptions();
1897
+ var _index2 = /*@__PURE__*/ requireConstructFrom();
1898
+ var _index3 = /*@__PURE__*/ requireGetWeekYear();
1899
+ var _index4 = /*@__PURE__*/ requireStartOfWeek();
1900
+
1901
+ /**
1902
+ * The {@link startOfWeekYear} function options.
1903
+ */
1904
+
1905
+ /**
1906
+ * @name startOfWeekYear
1907
+ * @category Week-Numbering Year Helpers
1908
+ * @summary Return the start of a local week-numbering year for the given date.
1909
+ *
1910
+ * @description
1911
+ * Return the start of a local week-numbering year.
1912
+ * The exact calculation depends on the values of
1913
+ * `options.weekStartsOn` (which is the index of the first day of the week)
1914
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
1915
+ * the first week of the week-numbering year)
1916
+ *
1917
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
1918
+ *
1919
+ * @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).
1920
+ * @typeParam ResultDate - The result `Date` type.
1921
+ *
1922
+ * @param date - The original date
1923
+ * @param options - An object with options
1924
+ *
1925
+ * @returns The start of a week-numbering year
1926
+ *
1927
+ * @example
1928
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
1929
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
1930
+ * //=> Sun Dec 26 2004 00:00:00
1931
+ *
1932
+ * @example
1933
+ * // The start of a week-numbering year for 2 July 2005
1934
+ * // if Monday is the first day of week
1935
+ * // and 4 January is always in the first week of the year:
1936
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
1937
+ * weekStartsOn: 1,
1938
+ * firstWeekContainsDate: 4
1939
+ * })
1940
+ * //=> Mon Jan 03 2005 00:00:00
1941
+ */
1942
+ function startOfWeekYear$1(date, options) {
1943
+ const defaultOptions = (0, _index.getDefaultOptions)();
1944
+ const firstWeekContainsDate =
1945
+ options?.firstWeekContainsDate ??
1946
+ options?.locale?.options?.firstWeekContainsDate ??
1947
+ defaultOptions.firstWeekContainsDate ??
1948
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
1949
+ 1;
1950
+
1951
+ const year = (0, _index3.getWeekYear)(date, options);
1952
+ const firstWeek = (0, _index2.constructFrom)(options?.in || date, 0);
1953
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
1954
+ firstWeek.setHours(0, 0, 0, 0);
1955
+ const _date = (0, _index4.startOfWeek)(firstWeek, options);
1956
+ return _date;
1957
+ }
1958
+ return startOfWeekYear;
1959
+ }
1960
+
1961
+ var hasRequiredGetWeek;
1962
+
1963
+ function requireGetWeek () {
1964
+ if (hasRequiredGetWeek) return getWeek;
1965
+ hasRequiredGetWeek = 1;
1966
+ getWeek.getWeek = getWeek$1;
1967
+ var _index = /*@__PURE__*/ requireConstants();
1968
+ var _index2 = /*@__PURE__*/ requireStartOfWeek();
1969
+ var _index3 = /*@__PURE__*/ requireStartOfWeekYear();
1970
+ var _index4 = /*@__PURE__*/ requireToDate();
1971
+
1972
+ /**
1973
+ * The {@link getWeek} function options.
1974
+ */
1975
+
1976
+ /**
1977
+ * @name getWeek
1978
+ * @category Week Helpers
1979
+ * @summary Get the local week index of the given date.
1980
+ *
1981
+ * @description
1982
+ * Get the local week index of the given date.
1983
+ * The exact calculation depends on the values of
1984
+ * `options.weekStartsOn` (which is the index of the first day of the week)
1985
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
1986
+ * the first week of the week-numbering year)
1987
+ *
1988
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
1989
+ *
1990
+ * @param date - The given date
1991
+ * @param options - An object with options
1992
+ *
1993
+ * @returns The week
1994
+ *
1995
+ * @example
1996
+ * // Which week of the local week numbering year is 2 January 2005 with default options?
1997
+ * const result = getWeek(new Date(2005, 0, 2))
1998
+ * //=> 2
1999
+ *
2000
+ * @example
2001
+ * // Which week of the local week numbering year is 2 January 2005,
2002
+ * // if Monday is the first day of the week,
2003
+ * // and the first week of the year always contains 4 January?
2004
+ * const result = getWeek(new Date(2005, 0, 2), {
2005
+ * weekStartsOn: 1,
2006
+ * firstWeekContainsDate: 4
2007
+ * })
2008
+ * //=> 53
2009
+ */
2010
+ function getWeek$1(date, options) {
2011
+ const _date = (0, _index4.toDate)(date, options?.in);
2012
+ const diff =
2013
+ +(0, _index2.startOfWeek)(_date, options) -
2014
+ +(0, _index3.startOfWeekYear)(_date, options);
2015
+
2016
+ // Round the number of weeks to the nearest integer because the number of
2017
+ // milliseconds in a week is not constant (e.g. it's different in the week of
2018
+ // the daylight saving time clock shift).
2019
+ return Math.round(diff / _index.millisecondsInWeek) + 1;
2020
+ }
2021
+ return getWeek;
2022
+ }
2023
+
2024
+ var addLeadingZeros = {};
2025
+
2026
+ var hasRequiredAddLeadingZeros;
2027
+
2028
+ function requireAddLeadingZeros () {
2029
+ if (hasRequiredAddLeadingZeros) return addLeadingZeros;
2030
+ hasRequiredAddLeadingZeros = 1;
2031
+ addLeadingZeros.addLeadingZeros = addLeadingZeros$1;
2032
+ function addLeadingZeros$1(number, targetLength) {
2033
+ const sign = number < 0 ? "-" : "";
2034
+ const output = Math.abs(number).toString().padStart(targetLength, "0");
2035
+ return sign + output;
2036
+ }
2037
+ return addLeadingZeros;
2038
+ }
2039
+
2040
+ var lightFormatters = {};
2041
+
2042
+ var hasRequiredLightFormatters;
2043
+
2044
+ function requireLightFormatters () {
2045
+ if (hasRequiredLightFormatters) return lightFormatters;
2046
+ hasRequiredLightFormatters = 1;
2047
+ lightFormatters.lightFormatters = void 0;
2048
+ var _index = /*@__PURE__*/ requireAddLeadingZeros();
2049
+
2050
+ /*
2051
+ * | | Unit | | Unit |
2052
+ * |-----|--------------------------------|-----|--------------------------------|
2053
+ * | a | AM, PM | A* | |
2054
+ * | d | Day of month | D | |
2055
+ * | h | Hour [1-12] | H | Hour [0-23] |
2056
+ * | m | Minute | M | Month |
2057
+ * | s | Second | S | Fraction of second |
2058
+ * | y | Year (abs) | Y | |
2059
+ *
2060
+ * Letters marked by * are not implemented but reserved by Unicode standard.
2061
+ */
2062
+
2063
+ (lightFormatters.lightFormatters = {
2064
+ // Year
2065
+ y(date, token) {
2066
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
2067
+ // | Year | y | yy | yyy | yyyy | yyyyy |
2068
+ // |----------|-------|----|-------|-------|-------|
2069
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
2070
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
2071
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
2072
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
2073
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
2074
+
2075
+ const signedYear = date.getFullYear();
2076
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2077
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2078
+ return (0, _index.addLeadingZeros)(
2079
+ token === "yy" ? year % 100 : year,
2080
+ token.length,
2081
+ );
2082
+ },
2083
+
2084
+ // Month
2085
+ M(date, token) {
2086
+ const month = date.getMonth();
2087
+ return token === "M"
2088
+ ? String(month + 1)
2089
+ : (0, _index.addLeadingZeros)(month + 1, 2);
2090
+ },
2091
+
2092
+ // Day of the month
2093
+ d(date, token) {
2094
+ return (0, _index.addLeadingZeros)(date.getDate(), token.length);
2095
+ },
2096
+
2097
+ // AM or PM
2098
+ a(date, token) {
2099
+ const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
2100
+
2101
+ switch (token) {
2102
+ case "a":
2103
+ case "aa":
2104
+ return dayPeriodEnumValue.toUpperCase();
2105
+ case "aaa":
2106
+ return dayPeriodEnumValue;
2107
+ case "aaaaa":
2108
+ return dayPeriodEnumValue[0];
2109
+ case "aaaa":
2110
+ default:
2111
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
2112
+ }
2113
+ },
2114
+
2115
+ // Hour [1-12]
2116
+ h(date, token) {
2117
+ return (0, _index.addLeadingZeros)(
2118
+ date.getHours() % 12 || 12,
2119
+ token.length,
2120
+ );
2121
+ },
2122
+
2123
+ // Hour [0-23]
2124
+ H(date, token) {
2125
+ return (0, _index.addLeadingZeros)(date.getHours(), token.length);
2126
+ },
2127
+
2128
+ // Minute
2129
+ m(date, token) {
2130
+ return (0, _index.addLeadingZeros)(date.getMinutes(), token.length);
2131
+ },
2132
+
2133
+ // Second
2134
+ s(date, token) {
2135
+ return (0, _index.addLeadingZeros)(date.getSeconds(), token.length);
2136
+ },
2137
+
2138
+ // Fraction of second
2139
+ S(date, token) {
2140
+ const numberOfDigits = token.length;
2141
+ const milliseconds = date.getMilliseconds();
2142
+ const fractionalSeconds = Math.trunc(
2143
+ milliseconds * Math.pow(10, numberOfDigits - 3),
2144
+ );
2145
+ return (0, _index.addLeadingZeros)(fractionalSeconds, token.length);
2146
+ },
2147
+ });
2148
+ return lightFormatters;
2149
+ }
2150
+
2151
+ var hasRequiredFormatters;
2152
+
2153
+ function requireFormatters () {
2154
+ if (hasRequiredFormatters) return formatters;
2155
+ hasRequiredFormatters = 1;
2156
+ formatters.formatters = void 0;
2157
+ var _index = /*@__PURE__*/ requireGetDayOfYear();
2158
+ var _index2 = /*@__PURE__*/ requireGetISOWeek();
2159
+ var _index3 = /*@__PURE__*/ requireGetISOWeekYear();
2160
+ var _index4 = /*@__PURE__*/ requireGetWeek();
2161
+ var _index5 = /*@__PURE__*/ requireGetWeekYear();
2162
+
2163
+ var _index6 = /*@__PURE__*/ requireAddLeadingZeros();
2164
+ var _index7 = /*@__PURE__*/ requireLightFormatters();
2165
+
2166
+ const dayPeriodEnum = {
2167
+ midnight: "midnight",
2168
+ noon: "noon",
2169
+ morning: "morning",
2170
+ afternoon: "afternoon",
2171
+ evening: "evening",
2172
+ night: "night",
2173
+ };
2174
+
2175
+ /*
2176
+ * | | Unit | | Unit |
2177
+ * |-----|--------------------------------|-----|--------------------------------|
2178
+ * | a | AM, PM | A* | Milliseconds in day |
2179
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
2180
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
2181
+ * | d | Day of month | D | Day of year |
2182
+ * | e | Local day of week | E | Day of week |
2183
+ * | f | | F* | Day of week in month |
2184
+ * | g* | Modified Julian day | G | Era |
2185
+ * | h | Hour [1-12] | H | Hour [0-23] |
2186
+ * | i! | ISO day of week | I! | ISO week of year |
2187
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
2188
+ * | k | Hour [1-24] | K | Hour [0-11] |
2189
+ * | l* | (deprecated) | L | Stand-alone month |
2190
+ * | m | Minute | M | Month |
2191
+ * | n | | N | |
2192
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
2193
+ * | p! | Long localized time | P! | Long localized date |
2194
+ * | q | Stand-alone quarter | Q | Quarter |
2195
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
2196
+ * | s | Second | S | Fraction of second |
2197
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
2198
+ * | u | Extended year | U* | Cyclic year |
2199
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
2200
+ * | w | Local week of year | W* | Week of month |
2201
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
2202
+ * | y | Year (abs) | Y | Local week-numbering year |
2203
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
2204
+ *
2205
+ * Letters marked by * are not implemented but reserved by Unicode standard.
2206
+ *
2207
+ * Letters marked by ! are non-standard, but implemented by date-fns:
2208
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
2209
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
2210
+ * i.e. 7 for Sunday, 1 for Monday, etc.
2211
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
2212
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
2213
+ * `R` is supposed to be used in conjunction with `I` and `i`
2214
+ * for universal ISO week-numbering date, whereas
2215
+ * `Y` is supposed to be used in conjunction with `w` and `e`
2216
+ * for week-numbering date specific to the locale.
2217
+ * - `P` is long localized date format
2218
+ * - `p` is long localized time format
2219
+ */
2220
+
2221
+ (formatters.formatters = {
2222
+ // Era
2223
+ G: function (date, token, localize) {
2224
+ const era = date.getFullYear() > 0 ? 1 : 0;
2225
+ switch (token) {
2226
+ // AD, BC
2227
+ case "G":
2228
+ case "GG":
2229
+ case "GGG":
2230
+ return localize.era(era, { width: "abbreviated" });
2231
+ // A, B
2232
+ case "GGGGG":
2233
+ return localize.era(era, { width: "narrow" });
2234
+ // Anno Domini, Before Christ
2235
+ case "GGGG":
2236
+ default:
2237
+ return localize.era(era, { width: "wide" });
2238
+ }
2239
+ },
2240
+
2241
+ // Year
2242
+ y: function (date, token, localize) {
2243
+ // Ordinal number
2244
+ if (token === "yo") {
2245
+ const signedYear = date.getFullYear();
2246
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2247
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2248
+ return localize.ordinalNumber(year, { unit: "year" });
2249
+ }
2250
+
2251
+ return _index7.lightFormatters.y(date, token);
2252
+ },
2253
+
2254
+ // Local week-numbering year
2255
+ Y: function (date, token, localize, options) {
2256
+ const signedWeekYear = (0, _index5.getWeekYear)(date, options);
2257
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2258
+ const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
2259
+
2260
+ // Two digit year
2261
+ if (token === "YY") {
2262
+ const twoDigitYear = weekYear % 100;
2263
+ return (0, _index6.addLeadingZeros)(twoDigitYear, 2);
2264
+ }
2265
+
2266
+ // Ordinal number
2267
+ if (token === "Yo") {
2268
+ return localize.ordinalNumber(weekYear, { unit: "year" });
2269
+ }
2270
+
2271
+ // Padding
2272
+ return (0, _index6.addLeadingZeros)(weekYear, token.length);
2273
+ },
2274
+
2275
+ // ISO week-numbering year
2276
+ R: function (date, token) {
2277
+ const isoWeekYear = (0, _index3.getISOWeekYear)(date);
2278
+
2279
+ // Padding
2280
+ return (0, _index6.addLeadingZeros)(isoWeekYear, token.length);
2281
+ },
2282
+
2283
+ // Extended year. This is a single number designating the year of this calendar system.
2284
+ // The main difference between `y` and `u` localizers are B.C. years:
2285
+ // | Year | `y` | `u` |
2286
+ // |------|-----|-----|
2287
+ // | AC 1 | 1 | 1 |
2288
+ // | BC 1 | 1 | 0 |
2289
+ // | BC 2 | 2 | -1 |
2290
+ // Also `yy` always returns the last two digits of a year,
2291
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
2292
+ u: function (date, token) {
2293
+ const year = date.getFullYear();
2294
+ return (0, _index6.addLeadingZeros)(year, token.length);
2295
+ },
2296
+
2297
+ // Quarter
2298
+ Q: function (date, token, localize) {
2299
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2300
+ switch (token) {
2301
+ // 1, 2, 3, 4
2302
+ case "Q":
2303
+ return String(quarter);
2304
+ // 01, 02, 03, 04
2305
+ case "QQ":
2306
+ return (0, _index6.addLeadingZeros)(quarter, 2);
2307
+ // 1st, 2nd, 3rd, 4th
2308
+ case "Qo":
2309
+ return localize.ordinalNumber(quarter, { unit: "quarter" });
2310
+ // Q1, Q2, Q3, Q4
2311
+ case "QQQ":
2312
+ return localize.quarter(quarter, {
2313
+ width: "abbreviated",
2314
+ context: "formatting",
2315
+ });
2316
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2317
+ case "QQQQQ":
2318
+ return localize.quarter(quarter, {
2319
+ width: "narrow",
2320
+ context: "formatting",
2321
+ });
2322
+ // 1st quarter, 2nd quarter, ...
2323
+ case "QQQQ":
2324
+ default:
2325
+ return localize.quarter(quarter, {
2326
+ width: "wide",
2327
+ context: "formatting",
2328
+ });
2329
+ }
2330
+ },
2331
+
2332
+ // Stand-alone quarter
2333
+ q: function (date, token, localize) {
2334
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2335
+ switch (token) {
2336
+ // 1, 2, 3, 4
2337
+ case "q":
2338
+ return String(quarter);
2339
+ // 01, 02, 03, 04
2340
+ case "qq":
2341
+ return (0, _index6.addLeadingZeros)(quarter, 2);
2342
+ // 1st, 2nd, 3rd, 4th
2343
+ case "qo":
2344
+ return localize.ordinalNumber(quarter, { unit: "quarter" });
2345
+ // Q1, Q2, Q3, Q4
2346
+ case "qqq":
2347
+ return localize.quarter(quarter, {
2348
+ width: "abbreviated",
2349
+ context: "standalone",
2350
+ });
2351
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2352
+ case "qqqqq":
2353
+ return localize.quarter(quarter, {
2354
+ width: "narrow",
2355
+ context: "standalone",
2356
+ });
2357
+ // 1st quarter, 2nd quarter, ...
2358
+ case "qqqq":
2359
+ default:
2360
+ return localize.quarter(quarter, {
2361
+ width: "wide",
2362
+ context: "standalone",
2363
+ });
2364
+ }
2365
+ },
2366
+
2367
+ // Month
2368
+ M: function (date, token, localize) {
2369
+ const month = date.getMonth();
2370
+ switch (token) {
2371
+ case "M":
2372
+ case "MM":
2373
+ return _index7.lightFormatters.M(date, token);
2374
+ // 1st, 2nd, ..., 12th
2375
+ case "Mo":
2376
+ return localize.ordinalNumber(month + 1, { unit: "month" });
2377
+ // Jan, Feb, ..., Dec
2378
+ case "MMM":
2379
+ return localize.month(month, {
2380
+ width: "abbreviated",
2381
+ context: "formatting",
2382
+ });
2383
+ // J, F, ..., D
2384
+ case "MMMMM":
2385
+ return localize.month(month, {
2386
+ width: "narrow",
2387
+ context: "formatting",
2388
+ });
2389
+ // January, February, ..., December
2390
+ case "MMMM":
2391
+ default:
2392
+ return localize.month(month, { width: "wide", context: "formatting" });
2393
+ }
2394
+ },
2395
+
2396
+ // Stand-alone month
2397
+ L: function (date, token, localize) {
2398
+ const month = date.getMonth();
2399
+ switch (token) {
2400
+ // 1, 2, ..., 12
2401
+ case "L":
2402
+ return String(month + 1);
2403
+ // 01, 02, ..., 12
2404
+ case "LL":
2405
+ return (0, _index6.addLeadingZeros)(month + 1, 2);
2406
+ // 1st, 2nd, ..., 12th
2407
+ case "Lo":
2408
+ return localize.ordinalNumber(month + 1, { unit: "month" });
2409
+ // Jan, Feb, ..., Dec
2410
+ case "LLL":
2411
+ return localize.month(month, {
2412
+ width: "abbreviated",
2413
+ context: "standalone",
2414
+ });
2415
+ // J, F, ..., D
2416
+ case "LLLLL":
2417
+ return localize.month(month, {
2418
+ width: "narrow",
2419
+ context: "standalone",
2420
+ });
2421
+ // January, February, ..., December
2422
+ case "LLLL":
2423
+ default:
2424
+ return localize.month(month, { width: "wide", context: "standalone" });
2425
+ }
2426
+ },
2427
+
2428
+ // Local week of year
2429
+ w: function (date, token, localize, options) {
2430
+ const week = (0, _index4.getWeek)(date, options);
2431
+
2432
+ if (token === "wo") {
2433
+ return localize.ordinalNumber(week, { unit: "week" });
2434
+ }
2435
+
2436
+ return (0, _index6.addLeadingZeros)(week, token.length);
2437
+ },
2438
+
2439
+ // ISO week of year
2440
+ I: function (date, token, localize) {
2441
+ const isoWeek = (0, _index2.getISOWeek)(date);
2442
+
2443
+ if (token === "Io") {
2444
+ return localize.ordinalNumber(isoWeek, { unit: "week" });
2445
+ }
2446
+
2447
+ return (0, _index6.addLeadingZeros)(isoWeek, token.length);
2448
+ },
2449
+
2450
+ // Day of the month
2451
+ d: function (date, token, localize) {
2452
+ if (token === "do") {
2453
+ return localize.ordinalNumber(date.getDate(), { unit: "date" });
2454
+ }
2455
+
2456
+ return _index7.lightFormatters.d(date, token);
2457
+ },
2458
+
2459
+ // Day of year
2460
+ D: function (date, token, localize) {
2461
+ const dayOfYear = (0, _index.getDayOfYear)(date);
2462
+
2463
+ if (token === "Do") {
2464
+ return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
2465
+ }
2466
+
2467
+ return (0, _index6.addLeadingZeros)(dayOfYear, token.length);
2468
+ },
2469
+
2470
+ // Day of week
2471
+ E: function (date, token, localize) {
2472
+ const dayOfWeek = date.getDay();
2473
+ switch (token) {
2474
+ // Tue
2475
+ case "E":
2476
+ case "EE":
2477
+ case "EEE":
2478
+ return localize.day(dayOfWeek, {
2479
+ width: "abbreviated",
2480
+ context: "formatting",
2481
+ });
2482
+ // T
2483
+ case "EEEEE":
2484
+ return localize.day(dayOfWeek, {
2485
+ width: "narrow",
2486
+ context: "formatting",
2487
+ });
2488
+ // Tu
2489
+ case "EEEEEE":
2490
+ return localize.day(dayOfWeek, {
2491
+ width: "short",
2492
+ context: "formatting",
2493
+ });
2494
+ // Tuesday
2495
+ case "EEEE":
2496
+ default:
2497
+ return localize.day(dayOfWeek, {
2498
+ width: "wide",
2499
+ context: "formatting",
2500
+ });
2501
+ }
2502
+ },
2503
+
2504
+ // Local day of week
2505
+ e: function (date, token, localize, options) {
2506
+ const dayOfWeek = date.getDay();
2507
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2508
+ switch (token) {
2509
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
2510
+ case "e":
2511
+ return String(localDayOfWeek);
2512
+ // Padded numerical value
2513
+ case "ee":
2514
+ return (0, _index6.addLeadingZeros)(localDayOfWeek, 2);
2515
+ // 1st, 2nd, ..., 7th
2516
+ case "eo":
2517
+ return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
2518
+ case "eee":
2519
+ return localize.day(dayOfWeek, {
2520
+ width: "abbreviated",
2521
+ context: "formatting",
2522
+ });
2523
+ // T
2524
+ case "eeeee":
2525
+ return localize.day(dayOfWeek, {
2526
+ width: "narrow",
2527
+ context: "formatting",
2528
+ });
2529
+ // Tu
2530
+ case "eeeeee":
2531
+ return localize.day(dayOfWeek, {
2532
+ width: "short",
2533
+ context: "formatting",
2534
+ });
2535
+ // Tuesday
2536
+ case "eeee":
2537
+ default:
2538
+ return localize.day(dayOfWeek, {
2539
+ width: "wide",
2540
+ context: "formatting",
2541
+ });
2542
+ }
2543
+ },
2544
+
2545
+ // Stand-alone local day of week
2546
+ c: function (date, token, localize, options) {
2547
+ const dayOfWeek = date.getDay();
2548
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2549
+ switch (token) {
2550
+ // Numerical value (same as in `e`)
2551
+ case "c":
2552
+ return String(localDayOfWeek);
2553
+ // Padded numerical value
2554
+ case "cc":
2555
+ return (0, _index6.addLeadingZeros)(localDayOfWeek, token.length);
2556
+ // 1st, 2nd, ..., 7th
2557
+ case "co":
2558
+ return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
2559
+ case "ccc":
2560
+ return localize.day(dayOfWeek, {
2561
+ width: "abbreviated",
2562
+ context: "standalone",
2563
+ });
2564
+ // T
2565
+ case "ccccc":
2566
+ return localize.day(dayOfWeek, {
2567
+ width: "narrow",
2568
+ context: "standalone",
2569
+ });
2570
+ // Tu
2571
+ case "cccccc":
2572
+ return localize.day(dayOfWeek, {
2573
+ width: "short",
2574
+ context: "standalone",
2575
+ });
2576
+ // Tuesday
2577
+ case "cccc":
2578
+ default:
2579
+ return localize.day(dayOfWeek, {
2580
+ width: "wide",
2581
+ context: "standalone",
2582
+ });
2583
+ }
2584
+ },
2585
+
2586
+ // ISO day of week
2587
+ i: function (date, token, localize) {
2588
+ const dayOfWeek = date.getDay();
2589
+ const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
2590
+ switch (token) {
2591
+ // 2
2592
+ case "i":
2593
+ return String(isoDayOfWeek);
2594
+ // 02
2595
+ case "ii":
2596
+ return (0, _index6.addLeadingZeros)(isoDayOfWeek, token.length);
2597
+ // 2nd
2598
+ case "io":
2599
+ return localize.ordinalNumber(isoDayOfWeek, { unit: "day" });
2600
+ // Tue
2601
+ case "iii":
2602
+ return localize.day(dayOfWeek, {
2603
+ width: "abbreviated",
2604
+ context: "formatting",
2605
+ });
2606
+ // T
2607
+ case "iiiii":
2608
+ return localize.day(dayOfWeek, {
2609
+ width: "narrow",
2610
+ context: "formatting",
2611
+ });
2612
+ // Tu
2613
+ case "iiiiii":
2614
+ return localize.day(dayOfWeek, {
2615
+ width: "short",
2616
+ context: "formatting",
2617
+ });
2618
+ // Tuesday
2619
+ case "iiii":
2620
+ default:
2621
+ return localize.day(dayOfWeek, {
2622
+ width: "wide",
2623
+ context: "formatting",
2624
+ });
2625
+ }
2626
+ },
2627
+
2628
+ // AM or PM
2629
+ a: function (date, token, localize) {
2630
+ const hours = date.getHours();
2631
+ const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2632
+
2633
+ switch (token) {
2634
+ case "a":
2635
+ case "aa":
2636
+ return localize.dayPeriod(dayPeriodEnumValue, {
2637
+ width: "abbreviated",
2638
+ context: "formatting",
2639
+ });
2640
+ case "aaa":
2641
+ return localize
2642
+ .dayPeriod(dayPeriodEnumValue, {
2643
+ width: "abbreviated",
2644
+ context: "formatting",
2645
+ })
2646
+ .toLowerCase();
2647
+ case "aaaaa":
2648
+ return localize.dayPeriod(dayPeriodEnumValue, {
2649
+ width: "narrow",
2650
+ context: "formatting",
2651
+ });
2652
+ case "aaaa":
2653
+ default:
2654
+ return localize.dayPeriod(dayPeriodEnumValue, {
2655
+ width: "wide",
2656
+ context: "formatting",
2657
+ });
2658
+ }
2659
+ },
2660
+
2661
+ // AM, PM, midnight, noon
2662
+ b: function (date, token, localize) {
2663
+ const hours = date.getHours();
2664
+ let dayPeriodEnumValue;
2665
+ if (hours === 12) {
2666
+ dayPeriodEnumValue = dayPeriodEnum.noon;
2667
+ } else if (hours === 0) {
2668
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
2669
+ } else {
2670
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2671
+ }
2672
+
2673
+ switch (token) {
2674
+ case "b":
2675
+ case "bb":
2676
+ return localize.dayPeriod(dayPeriodEnumValue, {
2677
+ width: "abbreviated",
2678
+ context: "formatting",
2679
+ });
2680
+ case "bbb":
2681
+ return localize
2682
+ .dayPeriod(dayPeriodEnumValue, {
2683
+ width: "abbreviated",
2684
+ context: "formatting",
2685
+ })
2686
+ .toLowerCase();
2687
+ case "bbbbb":
2688
+ return localize.dayPeriod(dayPeriodEnumValue, {
2689
+ width: "narrow",
2690
+ context: "formatting",
2691
+ });
2692
+ case "bbbb":
2693
+ default:
2694
+ return localize.dayPeriod(dayPeriodEnumValue, {
2695
+ width: "wide",
2696
+ context: "formatting",
2697
+ });
2698
+ }
2699
+ },
2700
+
2701
+ // in the morning, in the afternoon, in the evening, at night
2702
+ B: function (date, token, localize) {
2703
+ const hours = date.getHours();
2704
+ let dayPeriodEnumValue;
2705
+ if (hours >= 17) {
2706
+ dayPeriodEnumValue = dayPeriodEnum.evening;
2707
+ } else if (hours >= 12) {
2708
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
2709
+ } else if (hours >= 4) {
2710
+ dayPeriodEnumValue = dayPeriodEnum.morning;
2711
+ } else {
2712
+ dayPeriodEnumValue = dayPeriodEnum.night;
2713
+ }
2714
+
2715
+ switch (token) {
2716
+ case "B":
2717
+ case "BB":
2718
+ case "BBB":
2719
+ return localize.dayPeriod(dayPeriodEnumValue, {
2720
+ width: "abbreviated",
2721
+ context: "formatting",
2722
+ });
2723
+ case "BBBBB":
2724
+ return localize.dayPeriod(dayPeriodEnumValue, {
2725
+ width: "narrow",
2726
+ context: "formatting",
2727
+ });
2728
+ case "BBBB":
2729
+ default:
2730
+ return localize.dayPeriod(dayPeriodEnumValue, {
2731
+ width: "wide",
2732
+ context: "formatting",
2733
+ });
2734
+ }
2735
+ },
2736
+
2737
+ // Hour [1-12]
2738
+ h: function (date, token, localize) {
2739
+ if (token === "ho") {
2740
+ let hours = date.getHours() % 12;
2741
+ if (hours === 0) hours = 12;
2742
+ return localize.ordinalNumber(hours, { unit: "hour" });
2743
+ }
2744
+
2745
+ return _index7.lightFormatters.h(date, token);
2746
+ },
2747
+
2748
+ // Hour [0-23]
2749
+ H: function (date, token, localize) {
2750
+ if (token === "Ho") {
2751
+ return localize.ordinalNumber(date.getHours(), { unit: "hour" });
2752
+ }
2753
+
2754
+ return _index7.lightFormatters.H(date, token);
2755
+ },
2756
+
2757
+ // Hour [0-11]
2758
+ K: function (date, token, localize) {
2759
+ const hours = date.getHours() % 12;
2760
+
2761
+ if (token === "Ko") {
2762
+ return localize.ordinalNumber(hours, { unit: "hour" });
2763
+ }
2764
+
2765
+ return (0, _index6.addLeadingZeros)(hours, token.length);
2766
+ },
2767
+
2768
+ // Hour [1-24]
2769
+ k: function (date, token, localize) {
2770
+ let hours = date.getHours();
2771
+ if (hours === 0) hours = 24;
2772
+
2773
+ if (token === "ko") {
2774
+ return localize.ordinalNumber(hours, { unit: "hour" });
2775
+ }
2776
+
2777
+ return (0, _index6.addLeadingZeros)(hours, token.length);
2778
+ },
2779
+
2780
+ // Minute
2781
+ m: function (date, token, localize) {
2782
+ if (token === "mo") {
2783
+ return localize.ordinalNumber(date.getMinutes(), { unit: "minute" });
2784
+ }
2785
+
2786
+ return _index7.lightFormatters.m(date, token);
2787
+ },
2788
+
2789
+ // Second
2790
+ s: function (date, token, localize) {
2791
+ if (token === "so") {
2792
+ return localize.ordinalNumber(date.getSeconds(), { unit: "second" });
2793
+ }
2794
+
2795
+ return _index7.lightFormatters.s(date, token);
2796
+ },
2797
+
2798
+ // Fraction of second
2799
+ S: function (date, token) {
2800
+ return _index7.lightFormatters.S(date, token);
2801
+ },
2802
+
2803
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2804
+ X: function (date, token, _localize) {
2805
+ const timezoneOffset = date.getTimezoneOffset();
2806
+
2807
+ if (timezoneOffset === 0) {
2808
+ return "Z";
2809
+ }
2810
+
2811
+ switch (token) {
2812
+ // Hours and optional minutes
2813
+ case "X":
2814
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2815
+
2816
+ // Hours, minutes and optional seconds without `:` delimiter
2817
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2818
+ // so this token always has the same output as `XX`
2819
+ case "XXXX":
2820
+ case "XX": // Hours and minutes without `:` delimiter
2821
+ return formatTimezone(timezoneOffset);
2822
+
2823
+ // Hours, minutes and optional seconds with `:` delimiter
2824
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2825
+ // so this token always has the same output as `XXX`
2826
+ case "XXXXX":
2827
+ case "XXX": // Hours and minutes with `:` delimiter
2828
+ default:
2829
+ return formatTimezone(timezoneOffset, ":");
2830
+ }
2831
+ },
2832
+
2833
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2834
+ x: function (date, token, _localize) {
2835
+ const timezoneOffset = date.getTimezoneOffset();
2836
+
2837
+ switch (token) {
2838
+ // Hours and optional minutes
2839
+ case "x":
2840
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2841
+
2842
+ // Hours, minutes and optional seconds without `:` delimiter
2843
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2844
+ // so this token always has the same output as `xx`
2845
+ case "xxxx":
2846
+ case "xx": // Hours and minutes without `:` delimiter
2847
+ return formatTimezone(timezoneOffset);
2848
+
2849
+ // Hours, minutes and optional seconds with `:` delimiter
2850
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2851
+ // so this token always has the same output as `xxx`
2852
+ case "xxxxx":
2853
+ case "xxx": // Hours and minutes with `:` delimiter
2854
+ default:
2855
+ return formatTimezone(timezoneOffset, ":");
2856
+ }
2857
+ },
2858
+
2859
+ // Timezone (GMT)
2860
+ O: function (date, token, _localize) {
2861
+ const timezoneOffset = date.getTimezoneOffset();
2862
+
2863
+ switch (token) {
2864
+ // Short
2865
+ case "O":
2866
+ case "OO":
2867
+ case "OOO":
2868
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
2869
+ // Long
2870
+ case "OOOO":
2871
+ default:
2872
+ return "GMT" + formatTimezone(timezoneOffset, ":");
2873
+ }
2874
+ },
2875
+
2876
+ // Timezone (specific non-location)
2877
+ z: function (date, token, _localize) {
2878
+ const timezoneOffset = date.getTimezoneOffset();
2879
+
2880
+ switch (token) {
2881
+ // Short
2882
+ case "z":
2883
+ case "zz":
2884
+ case "zzz":
2885
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
2886
+ // Long
2887
+ case "zzzz":
2888
+ default:
2889
+ return "GMT" + formatTimezone(timezoneOffset, ":");
2890
+ }
2891
+ },
2892
+
2893
+ // Seconds timestamp
2894
+ t: function (date, token, _localize) {
2895
+ const timestamp = Math.trunc(+date / 1000);
2896
+ return (0, _index6.addLeadingZeros)(timestamp, token.length);
2897
+ },
2898
+
2899
+ // Milliseconds timestamp
2900
+ T: function (date, token, _localize) {
2901
+ return (0, _index6.addLeadingZeros)(+date, token.length);
2902
+ },
2903
+ });
2904
+
2905
+ function formatTimezoneShort(offset, delimiter = "") {
2906
+ const sign = offset > 0 ? "-" : "+";
2907
+ const absOffset = Math.abs(offset);
2908
+ const hours = Math.trunc(absOffset / 60);
2909
+ const minutes = absOffset % 60;
2910
+ if (minutes === 0) {
2911
+ return sign + String(hours);
2912
+ }
2913
+ return (
2914
+ sign + String(hours) + delimiter + (0, _index6.addLeadingZeros)(minutes, 2)
2915
+ );
2916
+ }
2917
+
2918
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
2919
+ if (offset % 60 === 0) {
2920
+ const sign = offset > 0 ? "-" : "+";
2921
+ return sign + (0, _index6.addLeadingZeros)(Math.abs(offset) / 60, 2);
2922
+ }
2923
+ return formatTimezone(offset, delimiter);
2924
+ }
2925
+
2926
+ function formatTimezone(offset, delimiter = "") {
2927
+ const sign = offset > 0 ? "-" : "+";
2928
+ const absOffset = Math.abs(offset);
2929
+ const hours = (0, _index6.addLeadingZeros)(Math.trunc(absOffset / 60), 2);
2930
+ const minutes = (0, _index6.addLeadingZeros)(absOffset % 60, 2);
2931
+ return sign + hours + delimiter + minutes;
2932
+ }
2933
+ return formatters;
2934
+ }
2935
+
2936
+ var longFormatters = {};
2937
+
2938
+ var hasRequiredLongFormatters;
2939
+
2940
+ function requireLongFormatters () {
2941
+ if (hasRequiredLongFormatters) return longFormatters;
2942
+ hasRequiredLongFormatters = 1;
2943
+ longFormatters.longFormatters = void 0;
2944
+
2945
+ const dateLongFormatter = (pattern, formatLong) => {
2946
+ switch (pattern) {
2947
+ case "P":
2948
+ return formatLong.date({ width: "short" });
2949
+ case "PP":
2950
+ return formatLong.date({ width: "medium" });
2951
+ case "PPP":
2952
+ return formatLong.date({ width: "long" });
2953
+ case "PPPP":
2954
+ default:
2955
+ return formatLong.date({ width: "full" });
2956
+ }
2957
+ };
2958
+
2959
+ const timeLongFormatter = (pattern, formatLong) => {
2960
+ switch (pattern) {
2961
+ case "p":
2962
+ return formatLong.time({ width: "short" });
2963
+ case "pp":
2964
+ return formatLong.time({ width: "medium" });
2965
+ case "ppp":
2966
+ return formatLong.time({ width: "long" });
2967
+ case "pppp":
2968
+ default:
2969
+ return formatLong.time({ width: "full" });
2970
+ }
2971
+ };
2972
+
2973
+ const dateTimeLongFormatter = (pattern, formatLong) => {
2974
+ const matchResult = pattern.match(/(P+)(p+)?/) || [];
2975
+ const datePattern = matchResult[1];
2976
+ const timePattern = matchResult[2];
2977
+
2978
+ if (!timePattern) {
2979
+ return dateLongFormatter(pattern, formatLong);
2980
+ }
2981
+
2982
+ let dateTimeFormat;
2983
+
2984
+ switch (datePattern) {
2985
+ case "P":
2986
+ dateTimeFormat = formatLong.dateTime({ width: "short" });
2987
+ break;
2988
+ case "PP":
2989
+ dateTimeFormat = formatLong.dateTime({ width: "medium" });
2990
+ break;
2991
+ case "PPP":
2992
+ dateTimeFormat = formatLong.dateTime({ width: "long" });
2993
+ break;
2994
+ case "PPPP":
2995
+ default:
2996
+ dateTimeFormat = formatLong.dateTime({ width: "full" });
2997
+ break;
2998
+ }
2999
+
3000
+ return dateTimeFormat
3001
+ .replace("{{date}}", dateLongFormatter(datePattern, formatLong))
3002
+ .replace("{{time}}", timeLongFormatter(timePattern, formatLong));
3003
+ };
3004
+
3005
+ (longFormatters.longFormatters = {
3006
+ p: timeLongFormatter,
3007
+ P: dateTimeLongFormatter,
3008
+ });
3009
+ return longFormatters;
3010
+ }
3011
+
3012
+ var protectedTokens = {};
3013
+
3014
+ var hasRequiredProtectedTokens;
3015
+
3016
+ function requireProtectedTokens () {
3017
+ if (hasRequiredProtectedTokens) return protectedTokens;
3018
+ hasRequiredProtectedTokens = 1;
3019
+ protectedTokens.isProtectedDayOfYearToken = isProtectedDayOfYearToken;
3020
+ protectedTokens.isProtectedWeekYearToken = isProtectedWeekYearToken;
3021
+ protectedTokens.warnOrThrowProtectedError = warnOrThrowProtectedError;
3022
+ const dayOfYearTokenRE = /^D+$/;
3023
+ const weekYearTokenRE = /^Y+$/;
3024
+
3025
+ const throwTokens = ["D", "DD", "YY", "YYYY"];
3026
+
3027
+ function isProtectedDayOfYearToken(token) {
3028
+ return dayOfYearTokenRE.test(token);
3029
+ }
3030
+
3031
+ function isProtectedWeekYearToken(token) {
3032
+ return weekYearTokenRE.test(token);
3033
+ }
3034
+
3035
+ function warnOrThrowProtectedError(token, format, input) {
3036
+ const _message = message(token, format, input);
3037
+ console.warn(_message);
3038
+ if (throwTokens.includes(token)) throw new RangeError(_message);
3039
+ }
3040
+
3041
+ function message(token, format, input) {
3042
+ const subject = token[0] === "Y" ? "years" : "days of the month";
3043
+ return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
3044
+ }
3045
+ return protectedTokens;
3046
+ }
3047
+
3048
+ var isValid = {};
3049
+
3050
+ var isDate = {};
3051
+
3052
+ var hasRequiredIsDate;
3053
+
3054
+ function requireIsDate () {
3055
+ if (hasRequiredIsDate) return isDate;
3056
+ hasRequiredIsDate = 1;
3057
+ isDate.isDate = isDate$1; /**
3058
+ * @name isDate
3059
+ * @category Common Helpers
3060
+ * @summary Is the given value a date?
3061
+ *
3062
+ * @description
3063
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
3064
+ *
3065
+ * @param value - The value to check
3066
+ *
3067
+ * @returns True if the given value is a date
3068
+ *
3069
+ * @example
3070
+ * // For a valid date:
3071
+ * const result = isDate(new Date())
3072
+ * //=> true
3073
+ *
3074
+ * @example
3075
+ * // For an invalid date:
3076
+ * const result = isDate(new Date(NaN))
3077
+ * //=> true
3078
+ *
3079
+ * @example
3080
+ * // For some value:
3081
+ * const result = isDate('2014-02-31')
3082
+ * //=> false
3083
+ *
3084
+ * @example
3085
+ * // For an object:
3086
+ * const result = isDate({})
3087
+ * //=> false
3088
+ */
3089
+ function isDate$1(value) {
3090
+ return (
3091
+ value instanceof Date ||
3092
+ (typeof value === "object" &&
3093
+ Object.prototype.toString.call(value) === "[object Date]")
3094
+ );
3095
+ }
3096
+ return isDate;
3097
+ }
3098
+
3099
+ var hasRequiredIsValid;
3100
+
3101
+ function requireIsValid () {
3102
+ if (hasRequiredIsValid) return isValid;
3103
+ hasRequiredIsValid = 1;
3104
+ isValid.isValid = isValid$1;
3105
+ var _index = /*@__PURE__*/ requireIsDate();
3106
+ var _index2 = /*@__PURE__*/ requireToDate();
3107
+
3108
+ /**
3109
+ * @name isValid
3110
+ * @category Common Helpers
3111
+ * @summary Is the given date valid?
3112
+ *
3113
+ * @description
3114
+ * Returns false if argument is Invalid Date and true otherwise.
3115
+ * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
3116
+ * Invalid Date is a Date, whose time value is NaN.
3117
+ *
3118
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
3119
+ *
3120
+ * @param date - The date to check
3121
+ *
3122
+ * @returns The date is valid
3123
+ *
3124
+ * @example
3125
+ * // For the valid date:
3126
+ * const result = isValid(new Date(2014, 1, 31))
3127
+ * //=> true
3128
+ *
3129
+ * @example
3130
+ * // For the value, convertible into a date:
3131
+ * const result = isValid(1393804800000)
3132
+ * //=> true
3133
+ *
3134
+ * @example
3135
+ * // For the invalid date:
3136
+ * const result = isValid(new Date(''))
3137
+ * //=> false
3138
+ */
3139
+ function isValid$1(date) {
3140
+ return !(
3141
+ (!(0, _index.isDate)(date) && typeof date !== "number") ||
3142
+ isNaN(+(0, _index2.toDate)(date))
3143
+ );
3144
+ }
3145
+ return isValid;
3146
+ }
3147
+
3148
+ var hasRequiredFormat;
3149
+
3150
+ function requireFormat () {
3151
+ if (hasRequiredFormat) return format;
3152
+ hasRequiredFormat = 1;
3153
+ (function (exports) {
3154
+ exports.format = exports.formatDate = format;
3155
+ Object.defineProperty(exports, "formatters", {
3156
+ enumerable: true,
3157
+ get: function () {
3158
+ return _index3.formatters;
3159
+ },
3160
+ });
3161
+ Object.defineProperty(exports, "longFormatters", {
3162
+ enumerable: true,
3163
+ get: function () {
3164
+ return _index4.longFormatters;
3165
+ },
3166
+ });
3167
+ var _index = /*@__PURE__*/ requireDefaultLocale();
3168
+ var _index2 = /*@__PURE__*/ requireDefaultOptions();
3169
+ var _index3 = /*@__PURE__*/ requireFormatters();
3170
+ var _index4 = /*@__PURE__*/ requireLongFormatters();
3171
+ var _index5 = /*@__PURE__*/ requireProtectedTokens();
3172
+
3173
+ var _index6 = /*@__PURE__*/ requireIsValid();
3174
+ var _index7 = /*@__PURE__*/ requireToDate();
3175
+
3176
+ // Rexports of internal for libraries to use.
3177
+ // See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
3178
+
3179
+ // This RegExp consists of three parts separated by `|`:
3180
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
3181
+ // (one of the certain letters followed by `o`)
3182
+ // - (\w)\1* matches any sequences of the same letter
3183
+ // - '' matches two quote characters in a row
3184
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
3185
+ // except a single quote symbol, which ends the sequence.
3186
+ // Two quote characters do not end the sequence.
3187
+ // If there is no matching single quote
3188
+ // then the sequence will continue until the end of the string.
3189
+ // - . matches any single character unmatched by previous parts of the RegExps
3190
+ const formattingTokensRegExp =
3191
+ /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
3192
+
3193
+ // This RegExp catches symbols escaped by quotes, and also
3194
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
3195
+ const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
3196
+
3197
+ const escapedStringRegExp = /^'([^]*?)'?$/;
3198
+ const doubleQuoteRegExp = /''/g;
3199
+ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
3200
+
3201
+ /**
3202
+ * The {@link format} function options.
3203
+ */
3204
+
3205
+ /**
3206
+ * @name format
3207
+ * @alias formatDate
3208
+ * @category Common Helpers
3209
+ * @summary Format the date.
3210
+ *
3211
+ * @description
3212
+ * Return the formatted date string in the given format. The result may vary by locale.
3213
+ *
3214
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
3215
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3216
+ *
3217
+ * The characters wrapped between two single quotes characters (') are escaped.
3218
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
3219
+ * (see the last example)
3220
+ *
3221
+ * Format of the string is based on Unicode Technical Standard #35:
3222
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
3223
+ * with a few additions (see note 7 below the table).
3224
+ *
3225
+ * Accepted patterns:
3226
+ * | Unit | Pattern | Result examples | Notes |
3227
+ * |---------------------------------|---------|-----------------------------------|-------|
3228
+ * | Era | G..GGG | AD, BC | |
3229
+ * | | GGGG | Anno Domini, Before Christ | 2 |
3230
+ * | | GGGGG | A, B | |
3231
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
3232
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
3233
+ * | | yy | 44, 01, 00, 17 | 5 |
3234
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
3235
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
3236
+ * | | yyyyy | ... | 3,5 |
3237
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
3238
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
3239
+ * | | YY | 44, 01, 00, 17 | 5,8 |
3240
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
3241
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
3242
+ * | | YYYYY | ... | 3,5 |
3243
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
3244
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
3245
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
3246
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
3247
+ * | | RRRRR | ... | 3,5,7 |
3248
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
3249
+ * | | uu | -43, 01, 1900, 2017 | 5 |
3250
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
3251
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
3252
+ * | | uuuuu | ... | 3,5 |
3253
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
3254
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
3255
+ * | | QQ | 01, 02, 03, 04 | |
3256
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
3257
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
3258
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
3259
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
3260
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
3261
+ * | | qq | 01, 02, 03, 04 | |
3262
+ * | | qqq | Q1, Q2, Q3, Q4 | |
3263
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
3264
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
3265
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
3266
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
3267
+ * | | MM | 01, 02, ..., 12 | |
3268
+ * | | MMM | Jan, Feb, ..., Dec | |
3269
+ * | | MMMM | January, February, ..., December | 2 |
3270
+ * | | MMMMM | J, F, ..., D | |
3271
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
3272
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
3273
+ * | | LL | 01, 02, ..., 12 | |
3274
+ * | | LLL | Jan, Feb, ..., Dec | |
3275
+ * | | LLLL | January, February, ..., December | 2 |
3276
+ * | | LLLLL | J, F, ..., D | |
3277
+ * | Local week of year | w | 1, 2, ..., 53 | |
3278
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
3279
+ * | | ww | 01, 02, ..., 53 | |
3280
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
3281
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
3282
+ * | | II | 01, 02, ..., 53 | 7 |
3283
+ * | Day of month | d | 1, 2, ..., 31 | |
3284
+ * | | do | 1st, 2nd, ..., 31st | 7 |
3285
+ * | | dd | 01, 02, ..., 31 | |
3286
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
3287
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
3288
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
3289
+ * | | DDD | 001, 002, ..., 365, 366 | |
3290
+ * | | DDDD | ... | 3 |
3291
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
3292
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
3293
+ * | | EEEEE | M, T, W, T, F, S, S | |
3294
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
3295
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
3296
+ * | | io | 1st, 2nd, ..., 7th | 7 |
3297
+ * | | ii | 01, 02, ..., 07 | 7 |
3298
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
3299
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
3300
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
3301
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
3302
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
3303
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
3304
+ * | | ee | 02, 03, ..., 01 | |
3305
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
3306
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
3307
+ * | | eeeee | M, T, W, T, F, S, S | |
3308
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
3309
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
3310
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
3311
+ * | | cc | 02, 03, ..., 01 | |
3312
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
3313
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
3314
+ * | | ccccc | M, T, W, T, F, S, S | |
3315
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
3316
+ * | AM, PM | a..aa | AM, PM | |
3317
+ * | | aaa | am, pm | |
3318
+ * | | aaaa | a.m., p.m. | 2 |
3319
+ * | | aaaaa | a, p | |
3320
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
3321
+ * | | bbb | am, pm, noon, midnight | |
3322
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
3323
+ * | | bbbbb | a, p, n, mi | |
3324
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
3325
+ * | | BBBB | at night, in the morning, ... | 2 |
3326
+ * | | BBBBB | at night, in the morning, ... | |
3327
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
3328
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
3329
+ * | | hh | 01, 02, ..., 11, 12 | |
3330
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
3331
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
3332
+ * | | HH | 00, 01, 02, ..., 23 | |
3333
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
3334
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
3335
+ * | | KK | 01, 02, ..., 11, 00 | |
3336
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
3337
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
3338
+ * | | kk | 24, 01, 02, ..., 23 | |
3339
+ * | Minute | m | 0, 1, ..., 59 | |
3340
+ * | | mo | 0th, 1st, ..., 59th | 7 |
3341
+ * | | mm | 00, 01, ..., 59 | |
3342
+ * | Second | s | 0, 1, ..., 59 | |
3343
+ * | | so | 0th, 1st, ..., 59th | 7 |
3344
+ * | | ss | 00, 01, ..., 59 | |
3345
+ * | Fraction of second | S | 0, 1, ..., 9 | |
3346
+ * | | SS | 00, 01, ..., 99 | |
3347
+ * | | SSS | 000, 001, ..., 999 | |
3348
+ * | | SSSS | ... | 3 |
3349
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
3350
+ * | | XX | -0800, +0530, Z | |
3351
+ * | | XXX | -08:00, +05:30, Z | |
3352
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
3353
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
3354
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
3355
+ * | | xx | -0800, +0530, +0000 | |
3356
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
3357
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
3358
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
3359
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
3360
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
3361
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
3362
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
3363
+ * | Seconds timestamp | t | 512969520 | 7 |
3364
+ * | | tt | ... | 3,7 |
3365
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
3366
+ * | | TT | ... | 3,7 |
3367
+ * | Long localized date | P | 04/29/1453 | 7 |
3368
+ * | | PP | Apr 29, 1453 | 7 |
3369
+ * | | PPP | April 29th, 1453 | 7 |
3370
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
3371
+ * | Long localized time | p | 12:00 AM | 7 |
3372
+ * | | pp | 12:00:00 AM | 7 |
3373
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
3374
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
3375
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
3376
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
3377
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
3378
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
3379
+ * Notes:
3380
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
3381
+ * are the same as "stand-alone" units, but are different in some languages.
3382
+ * "Formatting" units are declined according to the rules of the language
3383
+ * in the context of a date. "Stand-alone" units are always nominative singular:
3384
+ *
3385
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
3386
+ *
3387
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
3388
+ *
3389
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
3390
+ * the single quote characters (see below).
3391
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
3392
+ * the output will be the same as default pattern for this unit, usually
3393
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
3394
+ * are marked with "2" in the last column of the table.
3395
+ *
3396
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
3397
+ *
3398
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
3399
+ *
3400
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
3401
+ *
3402
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
3403
+ *
3404
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
3405
+ *
3406
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
3407
+ * The output will be padded with zeros to match the length of the pattern.
3408
+ *
3409
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
3410
+ *
3411
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
3412
+ * These tokens represent the shortest form of the quarter.
3413
+ *
3414
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
3415
+ *
3416
+ * | Year | `y` | `u` |
3417
+ * |------|-----|-----|
3418
+ * | AC 1 | 1 | 1 |
3419
+ * | BC 1 | 1 | 0 |
3420
+ * | BC 2 | 2 | -1 |
3421
+ *
3422
+ * Also `yy` always returns the last two digits of a year,
3423
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
3424
+ *
3425
+ * | Year | `yy` | `uu` |
3426
+ * |------|------|------|
3427
+ * | 1 | 01 | 01 |
3428
+ * | 14 | 14 | 14 |
3429
+ * | 376 | 76 | 376 |
3430
+ * | 1453 | 53 | 1453 |
3431
+ *
3432
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
3433
+ * except local week-numbering years are dependent on `options.weekStartsOn`
3434
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
3435
+ * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
3436
+ *
3437
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
3438
+ * so right now these tokens fall back to GMT timezones.
3439
+ *
3440
+ * 7. These patterns are not in the Unicode Technical Standard #35:
3441
+ * - `i`: ISO day of week
3442
+ * - `I`: ISO week of year
3443
+ * - `R`: ISO week-numbering year
3444
+ * - `t`: seconds timestamp
3445
+ * - `T`: milliseconds timestamp
3446
+ * - `o`: ordinal number modifier
3447
+ * - `P`: long localized date
3448
+ * - `p`: long localized time
3449
+ *
3450
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
3451
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3452
+ *
3453
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
3454
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3455
+ *
3456
+ * @param date - The original date
3457
+ * @param format - The string of tokens
3458
+ * @param options - An object with options
3459
+ *
3460
+ * @returns The formatted date string
3461
+ *
3462
+ * @throws `date` must not be Invalid Date
3463
+ * @throws `options.locale` must contain `localize` property
3464
+ * @throws `options.locale` must contain `formatLong` property
3465
+ * @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
3466
+ * @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
3467
+ * @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
3468
+ * @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
3469
+ * @throws format string contains an unescaped latin alphabet character
3470
+ *
3471
+ * @example
3472
+ * // Represent 11 February 2014 in middle-endian format:
3473
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
3474
+ * //=> '02/11/2014'
3475
+ *
3476
+ * @example
3477
+ * // Represent 2 July 2014 in Esperanto:
3478
+ * import { eoLocale } from 'date-fns/locale/eo'
3479
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
3480
+ * locale: eoLocale
3481
+ * })
3482
+ * //=> '2-a de julio 2014'
3483
+ *
3484
+ * @example
3485
+ * // Escape string by single quote characters:
3486
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
3487
+ * //=> "3 o'clock"
3488
+ */
3489
+ function format(date, formatStr, options) {
3490
+ const defaultOptions = (0, _index2.getDefaultOptions)();
3491
+ const locale =
3492
+ options?.locale ?? defaultOptions.locale ?? _index.defaultLocale;
3493
+
3494
+ const firstWeekContainsDate =
3495
+ options?.firstWeekContainsDate ??
3496
+ options?.locale?.options?.firstWeekContainsDate ??
3497
+ defaultOptions.firstWeekContainsDate ??
3498
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
3499
+ 1;
3500
+
3501
+ const weekStartsOn =
3502
+ options?.weekStartsOn ??
3503
+ options?.locale?.options?.weekStartsOn ??
3504
+ defaultOptions.weekStartsOn ??
3505
+ defaultOptions.locale?.options?.weekStartsOn ??
3506
+ 0;
3507
+
3508
+ const originalDate = (0, _index7.toDate)(date, options?.in);
3509
+
3510
+ if (!(0, _index6.isValid)(originalDate)) {
3511
+ throw new RangeError("Invalid time value");
3512
+ }
3513
+
3514
+ let parts = formatStr
3515
+ .match(longFormattingTokensRegExp)
3516
+ .map((substring) => {
3517
+ const firstCharacter = substring[0];
3518
+ if (firstCharacter === "p" || firstCharacter === "P") {
3519
+ const longFormatter = _index4.longFormatters[firstCharacter];
3520
+ return longFormatter(substring, locale.formatLong);
3521
+ }
3522
+ return substring;
3523
+ })
3524
+ .join("")
3525
+ .match(formattingTokensRegExp)
3526
+ .map((substring) => {
3527
+ // Replace two single quote characters with one single quote character
3528
+ if (substring === "''") {
3529
+ return { isToken: false, value: "'" };
3530
+ }
3531
+
3532
+ const firstCharacter = substring[0];
3533
+ if (firstCharacter === "'") {
3534
+ return { isToken: false, value: cleanEscapedString(substring) };
3535
+ }
3536
+
3537
+ if (_index3.formatters[firstCharacter]) {
3538
+ return { isToken: true, value: substring };
3539
+ }
3540
+
3541
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
3542
+ throw new RangeError(
3543
+ "Format string contains an unescaped latin alphabet character `" +
3544
+ firstCharacter +
3545
+ "`",
3546
+ );
3547
+ }
3548
+
3549
+ return { isToken: false, value: substring };
3550
+ });
3551
+
3552
+ // invoke localize preprocessor (only for french locales at the moment)
3553
+ if (locale.localize.preprocessor) {
3554
+ parts = locale.localize.preprocessor(originalDate, parts);
3555
+ }
3556
+
3557
+ const formatterOptions = {
3558
+ firstWeekContainsDate,
3559
+ weekStartsOn,
3560
+ locale,
3561
+ };
3562
+
3563
+ return parts
3564
+ .map((part) => {
3565
+ if (!part.isToken) return part.value;
3566
+
3567
+ const token = part.value;
3568
+
3569
+ if (
3570
+ (!options?.useAdditionalWeekYearTokens &&
3571
+ (0, _index5.isProtectedWeekYearToken)(token)) ||
3572
+ (!options?.useAdditionalDayOfYearTokens &&
3573
+ (0, _index5.isProtectedDayOfYearToken)(token))
3574
+ ) {
3575
+ (0, _index5.warnOrThrowProtectedError)(token, formatStr, String(date));
3576
+ }
3577
+
3578
+ const formatter = _index3.formatters[token[0]];
3579
+ return formatter(originalDate, token, locale.localize, formatterOptions);
3580
+ })
3581
+ .join("");
3582
+ }
3583
+
3584
+ function cleanEscapedString(input) {
3585
+ const matched = input.match(escapedStringRegExp);
3586
+
3587
+ if (!matched) {
3588
+ return input;
3589
+ }
3590
+
3591
+ return matched[1].replace(doubleQuoteRegExp, "'");
3592
+ }
3593
+ } (format));
3594
+ return format;
3595
+ }
3596
+
3597
+ var formatExports = /*@__PURE__*/ requireFormat();
3598
+
3599
+ var setDay = {};
3600
+
3601
+ var hasRequiredSetDay;
3602
+
3603
+ function requireSetDay () {
3604
+ if (hasRequiredSetDay) return setDay;
3605
+ hasRequiredSetDay = 1;
3606
+ setDay.setDay = setDay$1;
3607
+ var _index = /*@__PURE__*/ requireDefaultOptions();
3608
+ var _index2 = /*@__PURE__*/ requireAddDays();
3609
+ var _index3 = /*@__PURE__*/ requireToDate();
3610
+
3611
+ /**
3612
+ * The {@link setDay} function options.
3613
+ */
3614
+
3615
+ /**
3616
+ * @name setDay
3617
+ * @category Weekday Helpers
3618
+ * @summary Set the day of the week to the given date.
3619
+ *
3620
+ * @description
3621
+ * Set the day of the week to the given date.
3622
+ *
3623
+ * @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).
3624
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
3625
+ *
3626
+ * @param date - The date to be changed
3627
+ * @param day - The day of the week of the new date
3628
+ * @param options - An object with options.
3629
+ *
3630
+ * @returns The new date with the day of the week set
3631
+ *
3632
+ * @example
3633
+ * // Set week day to Sunday, with the default weekStartsOn of Sunday:
3634
+ * const result = setDay(new Date(2014, 8, 1), 0)
3635
+ * //=> Sun Aug 31 2014 00:00:00
3636
+ *
3637
+ * @example
3638
+ * // Set week day to Sunday, with a weekStartsOn of Monday:
3639
+ * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })
3640
+ * //=> Sun Sep 07 2014 00:00:00
3641
+ */
3642
+ function setDay$1(date, day, options) {
3643
+ const defaultOptions = (0, _index.getDefaultOptions)();
3644
+ const weekStartsOn =
3645
+ options?.weekStartsOn ??
3646
+ options?.locale?.options?.weekStartsOn ??
3647
+ defaultOptions.weekStartsOn ??
3648
+ defaultOptions.locale?.options?.weekStartsOn ??
3649
+ 0;
3650
+
3651
+ const date_ = (0, _index3.toDate)(date, options?.in);
3652
+ const currentDay = date_.getDay();
3653
+
3654
+ const remainder = day % 7;
3655
+ const dayIndex = (remainder + 7) % 7;
3656
+
3657
+ const delta = 7 - weekStartsOn;
3658
+ const diff =
3659
+ day < 0 || day > 6
3660
+ ? day - ((currentDay + delta) % 7)
3661
+ : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);
3662
+ return (0, _index2.addDays)(date_, diff, options);
3663
+ }
3664
+ return setDay;
3665
+ }
3666
+
3667
+ var setMonth = {};
3668
+
3669
+ var getDaysInMonth = {};
3670
+
3671
+ var hasRequiredGetDaysInMonth;
3672
+
3673
+ function requireGetDaysInMonth () {
3674
+ if (hasRequiredGetDaysInMonth) return getDaysInMonth;
3675
+ hasRequiredGetDaysInMonth = 1;
3676
+ getDaysInMonth.getDaysInMonth = getDaysInMonth$1;
3677
+ var _index = /*@__PURE__*/ requireConstructFrom();
3678
+ var _index2 = /*@__PURE__*/ requireToDate();
3679
+
3680
+ /**
3681
+ * The {@link getDaysInMonth} function options.
3682
+ */
3683
+
3684
+ /**
3685
+ * @name getDaysInMonth
3686
+ * @category Month Helpers
3687
+ * @summary Get the number of days in a month of the given date.
3688
+ *
3689
+ * @description
3690
+ * Get the number of days in a month of the given date, considering the context if provided.
3691
+ *
3692
+ * @param date - The given date
3693
+ * @param options - An object with options
3694
+ *
3695
+ * @returns The number of days in a month
3696
+ *
3697
+ * @example
3698
+ * // How many days are in February 2000?
3699
+ * const result = getDaysInMonth(new Date(2000, 1))
3700
+ * //=> 29
3701
+ */
3702
+ function getDaysInMonth$1(date, options) {
3703
+ const _date = (0, _index2.toDate)(date, options?.in);
3704
+ const year = _date.getFullYear();
3705
+ const monthIndex = _date.getMonth();
3706
+ const lastDayOfMonth = (0, _index.constructFrom)(_date, 0);
3707
+ lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
3708
+ lastDayOfMonth.setHours(0, 0, 0, 0);
3709
+ return lastDayOfMonth.getDate();
3710
+ }
3711
+ return getDaysInMonth;
3712
+ }
3713
+
3714
+ var hasRequiredSetMonth;
3715
+
3716
+ function requireSetMonth () {
3717
+ if (hasRequiredSetMonth) return setMonth;
3718
+ hasRequiredSetMonth = 1;
3719
+ setMonth.setMonth = setMonth$1;
3720
+ var _index = /*@__PURE__*/ requireConstructFrom();
3721
+ var _index2 = /*@__PURE__*/ requireGetDaysInMonth();
3722
+ var _index3 = /*@__PURE__*/ requireToDate();
3723
+
3724
+ /**
3725
+ * The {@link setMonth} function options.
3726
+ */
3727
+
3728
+ /**
3729
+ * @name setMonth
3730
+ * @category Month Helpers
3731
+ * @summary Set the month to the given date.
3732
+ *
3733
+ * @description
3734
+ * Set the month to the given date.
3735
+ *
3736
+ * @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).
3737
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
3738
+ *
3739
+ * @param date - The date to be changed
3740
+ * @param month - The month index to set (0-11)
3741
+ * @param options - The options
3742
+ *
3743
+ * @returns The new date with the month set
3744
+ *
3745
+ * @example
3746
+ * // Set February to 1 September 2014:
3747
+ * const result = setMonth(new Date(2014, 8, 1), 1)
3748
+ * //=> Sat Feb 01 2014 00:00:00
3749
+ */
3750
+ function setMonth$1(date, month, options) {
3751
+ const _date = (0, _index3.toDate)(date, options?.in);
3752
+ const year = _date.getFullYear();
3753
+ const day = _date.getDate();
3754
+
3755
+ const midMonth = (0, _index.constructFrom)(options?.in || date, 0);
3756
+ midMonth.setFullYear(year, month, 15);
3757
+ midMonth.setHours(0, 0, 0, 0);
3758
+ const daysInMonth = (0, _index2.getDaysInMonth)(midMonth);
3759
+
3760
+ // Set the earlier date, allows to wrap Jan 31 to Feb 28
3761
+ _date.setMonth(month, Math.min(day, daysInMonth));
3762
+ return _date;
3763
+ }
3764
+ return setMonth;
3765
+ }
3766
+
3767
+ /**
3768
+ * Conjunto de modos suportados pelo datetime picker.
3769
+ *
3770
+ * `DEFAULT` define o modo aplicado quando o consumidor não informa um valor válido.
3771
+ */
3772
+ const DATETIME_PICKER_MODE = {
3773
+ DATE: 'date',
3774
+ TIME: 'time',
3775
+ DATETIME: 'datetime',
3776
+ DEFAULT: 'datetime',
3777
+ };
3778
+ /**
3779
+ * Valores de locale aceitos pelo componente.
3780
+ *
3781
+ * `DEFAULT` representa o locale padrão do design system.
3782
+ */
3783
+ const DATETIME_PICKER_LOCALE = {
3784
+ DEFAULT: 'pt-BR',
3785
+ };
3786
+ /**
3787
+ * Ações de navegação emitidas pelos controles do calendário e do relógio.
3788
+ *
3789
+ * Os nomes são usados como contrato entre os componentes que compartilham a navegação.
3790
+ */
3791
+ const NAVIGATION_ACTION = {
3792
+ PREVIOUS_HOUR: 'previous-hour',
3793
+ PREVIOUS_MINUTE: 'previous-minute',
3794
+ PREVIOUS_MONTH: 'previous-month',
3795
+ NEXT_HOUR: 'next-hour',
3796
+ NEXT_MINUTE: 'next-minute',
3797
+ NEXT_MONTH: 'next-month',
3798
+ };
3799
+
3800
+ exports.DATETIME_PICKER_LOCALE = DATETIME_PICKER_LOCALE;
3801
+ exports.DATETIME_PICKER_MODE = DATETIME_PICKER_MODE;
3802
+ exports.NAVIGATION_ACTION = NAVIGATION_ACTION;
3803
+ exports.formatExports = formatExports;
3804
+ exports.requireAddDays = requireAddDays;
3805
+ exports.requireAddLeadingZeros = requireAddLeadingZeros;
3806
+ exports.requireBuildFormatLongFn = requireBuildFormatLongFn;
3807
+ exports.requireBuildLocalizeFn = requireBuildLocalizeFn;
3808
+ exports.requireBuildMatchFn = requireBuildMatchFn;
3809
+ exports.requireBuildMatchPatternFn = requireBuildMatchPatternFn;
3810
+ exports.requireConstants = requireConstants;
3811
+ exports.requireConstructFrom = requireConstructFrom;
3812
+ exports.requireDefaultLocale = requireDefaultLocale;
3813
+ exports.requireDefaultOptions = requireDefaultOptions;
3814
+ exports.requireGetISOWeek = requireGetISOWeek;
3815
+ exports.requireGetTimezoneOffsetInMilliseconds = requireGetTimezoneOffsetInMilliseconds;
3816
+ exports.requireGetWeek = requireGetWeek;
3817
+ exports.requireGetWeekYear = requireGetWeekYear;
3818
+ exports.requireIsValid = requireIsValid;
3819
+ exports.requireLongFormatters = requireLongFormatters;
3820
+ exports.requireNormalizeDates = requireNormalizeDates;
3821
+ exports.requireProtectedTokens = requireProtectedTokens;
3822
+ exports.requireSetDay = requireSetDay;
3823
+ exports.requireSetMonth = requireSetMonth;
3824
+ exports.requireStartOfDay = requireStartOfDay;
3825
+ exports.requireStartOfISOWeek = requireStartOfISOWeek;
3826
+ exports.requireStartOfWeek = requireStartOfWeek;
3827
+ exports.requireToDate = requireToDate;