@paperless/core 0.1.0-alpha.43 → 0.1.0-alpha.430

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 (1091) hide show
  1. package/CHANGELOG.md +4109 -0
  2. package/README.md +9 -1
  3. package/dist/assets/i18n/page-size-select.i18n.en.json +4 -0
  4. package/dist/assets/i18n/page-size-select.i18n.nl.json +4 -0
  5. package/dist/assets/i18n/table-footer.i18n.en.json +3 -0
  6. package/dist/assets/i18n/table-footer.i18n.nl.json +3 -0
  7. package/dist/assets/i18n/table-header.i18n.en.json +6 -0
  8. package/dist/assets/i18n/table-header.i18n.nl.json +6 -0
  9. package/dist/assets/i18n/table.i18n.en.json +13 -0
  10. package/dist/assets/i18n/table.i18n.nl.json +13 -0
  11. package/dist/assets/icons/camera.svg +10 -0
  12. package/dist/assets/icons/filter.svg +6 -13
  13. package/dist/assets/icons/menu.svg +25 -0
  14. package/dist/assets/icons/more.svg +18 -0
  15. package/dist/assets/icons/notification.svg +10 -0
  16. package/dist/assets/icons/reload.svg +10 -0
  17. package/dist/assets/icons/signout.svg +23 -0
  18. package/dist/assets/icons/switch.svg +20 -0
  19. package/dist/assets/illustrations/e-mail.svg +1 -0
  20. package/dist/assets/illustrations/empty-state-add.svg +65 -0
  21. package/dist/assets/illustrations/empty-state-overview.svg +58 -0
  22. package/dist/assets/illustrations/empty-state-search.svg +88 -0
  23. package/dist/assets/images/helper/helper-hover.svg +6 -6
  24. package/dist/assets/images/helper/helper.svg +2 -2
  25. package/dist/build/index.esm.js +2 -0
  26. package/dist/build/index.esm.js.map +1 -0
  27. package/dist/build/p-09ea2a1a.js +2 -0
  28. package/dist/build/p-09ea2a1a.js.map +1 -0
  29. package/dist/build/p-0a3f2fe8.entry.js +2 -0
  30. package/dist/build/p-0a3f2fe8.entry.js.map +1 -0
  31. package/dist/build/p-0cb97c5e.entry.js +2 -0
  32. package/dist/build/p-0cb97c5e.entry.js.map +1 -0
  33. package/dist/build/p-0e0bffb3.entry.js +2 -0
  34. package/dist/build/p-0e0bffb3.entry.js.map +1 -0
  35. package/dist/build/p-10ad607e.entry.js +2 -0
  36. package/dist/build/p-10ad607e.entry.js.map +1 -0
  37. package/dist/build/p-1b5292a3.entry.js +2 -0
  38. package/dist/build/p-1b5292a3.entry.js.map +1 -0
  39. package/dist/build/p-3d8b5cc4.entry.js +2 -0
  40. package/dist/build/p-3d8b5cc4.entry.js.map +1 -0
  41. package/dist/build/p-3dcc02d8.entry.js +2 -0
  42. package/dist/build/p-3dcc02d8.entry.js.map +1 -0
  43. package/dist/build/p-45dfd940.entry.js +2 -0
  44. package/dist/build/p-45dfd940.entry.js.map +1 -0
  45. package/dist/build/p-464569dc.entry.js +2 -0
  46. package/dist/build/p-464569dc.entry.js.map +1 -0
  47. package/dist/build/p-4e650fe4.js +2 -0
  48. package/dist/build/p-4e650fe4.js.map +1 -0
  49. package/dist/build/p-5236b565.entry.js +2 -0
  50. package/dist/build/p-5236b565.entry.js.map +1 -0
  51. package/dist/build/p-57411b2b.entry.js +2 -0
  52. package/dist/build/p-57411b2b.entry.js.map +1 -0
  53. package/dist/build/p-58b52568.entry.js +2 -0
  54. package/dist/build/p-58b52568.entry.js.map +1 -0
  55. package/dist/build/p-5d118f66.entry.js +2 -0
  56. package/dist/build/p-5d118f66.entry.js.map +1 -0
  57. package/dist/build/p-6b7d2d41.entry.js +2 -0
  58. package/dist/build/p-6b7d2d41.entry.js.map +1 -0
  59. package/dist/build/p-6c60fd3d.js +2 -0
  60. package/dist/build/p-6c60fd3d.js.map +1 -0
  61. package/dist/build/p-6f82a1e7.entry.js +2 -0
  62. package/dist/build/p-6f82a1e7.entry.js.map +1 -0
  63. package/dist/build/p-6fd261ab.entry.js +2 -0
  64. package/dist/build/p-6fd261ab.entry.js.map +1 -0
  65. package/dist/build/p-7010541f.entry.js +2 -0
  66. package/dist/build/p-7010541f.entry.js.map +1 -0
  67. package/dist/build/p-756c06ec.entry.js +2 -0
  68. package/dist/build/p-756c06ec.entry.js.map +1 -0
  69. package/dist/build/p-78948e08.entry.js +2 -0
  70. package/dist/build/p-78948e08.entry.js.map +1 -0
  71. package/dist/build/p-78ce77d2.entry.js +2 -0
  72. package/dist/build/p-78ce77d2.entry.js.map +1 -0
  73. package/dist/build/p-7b94bc6a.entry.js +2 -0
  74. package/dist/build/p-7b94bc6a.entry.js.map +1 -0
  75. package/dist/build/p-8a6728d5.js +2 -0
  76. package/dist/build/p-8a6728d5.js.map +1 -0
  77. package/dist/build/p-8fb43cc7.entry.js +2 -0
  78. package/dist/build/p-8fb43cc7.entry.js.map +1 -0
  79. package/dist/build/p-93fb216c.entry.js +2 -0
  80. package/dist/build/p-93fb216c.entry.js.map +1 -0
  81. package/dist/build/p-9ee7b088.entry.js +2 -0
  82. package/dist/build/p-9ee7b088.entry.js.map +1 -0
  83. package/dist/build/p-a2bd1a79.entry.js +2 -0
  84. package/dist/build/p-a2bd1a79.entry.js.map +1 -0
  85. package/dist/build/p-a3fcf8b6.entry.js +2 -0
  86. package/dist/build/p-a3fcf8b6.entry.js.map +1 -0
  87. package/dist/build/p-a89bc06c.entry.js +2 -0
  88. package/dist/build/p-a89bc06c.entry.js.map +1 -0
  89. package/dist/build/p-ac1af618.js +3 -0
  90. package/dist/build/p-ac1af618.js.map +1 -0
  91. package/dist/build/p-ac7b48ff.entry.js +2 -0
  92. package/dist/build/p-ac7b48ff.entry.js.map +1 -0
  93. package/dist/build/p-b13a0ee4.entry.js +2 -0
  94. package/dist/build/p-b13a0ee4.entry.js.map +1 -0
  95. package/dist/build/p-b273ac6d.js +2 -0
  96. package/dist/build/p-b273ac6d.js.map +1 -0
  97. package/dist/build/p-b450d46f.entry.js +2 -0
  98. package/dist/build/p-b450d46f.entry.js.map +1 -0
  99. package/dist/build/p-b7b1de31.entry.js +2 -0
  100. package/dist/build/p-b7b1de31.entry.js.map +1 -0
  101. package/dist/build/p-bd85ff72.entry.js +2 -0
  102. package/dist/build/p-bd85ff72.entry.js.map +1 -0
  103. package/dist/build/p-befde602.entry.js +2 -0
  104. package/dist/build/p-befde602.entry.js.map +1 -0
  105. package/dist/build/p-c6ef7b79.entry.js +2 -0
  106. package/dist/build/p-c6ef7b79.entry.js.map +1 -0
  107. package/dist/build/p-cccc37c0.entry.js +2 -0
  108. package/dist/build/p-cccc37c0.entry.js.map +1 -0
  109. package/dist/build/p-d7d7f5d0.entry.js +2 -0
  110. package/dist/build/p-d7d7f5d0.entry.js.map +1 -0
  111. package/dist/build/p-dc01e9eb.entry.js +2 -0
  112. package/dist/build/p-dc01e9eb.entry.js.map +1 -0
  113. package/dist/build/p-dd2a50d0.entry.js +2 -0
  114. package/dist/build/p-dd2a50d0.entry.js.map +1 -0
  115. package/dist/build/p-e0f41dd5.entry.js +2 -0
  116. package/dist/build/p-e0f41dd5.entry.js.map +1 -0
  117. package/dist/build/p-e621e34c.js +2 -0
  118. package/dist/build/p-e621e34c.js.map +1 -0
  119. package/dist/build/p-ea824ef3.entry.js +2 -0
  120. package/dist/build/p-ea824ef3.entry.js.map +1 -0
  121. package/dist/build/p-ebc2ae62.entry.js +2 -0
  122. package/dist/build/p-ebc2ae62.entry.js.map +1 -0
  123. package/dist/build/p-f07793f6.entry.js +2 -0
  124. package/dist/build/p-f07793f6.entry.js.map +1 -0
  125. package/dist/build/paperless.css +1 -92
  126. package/dist/build/paperless.esm.js +2 -1
  127. package/dist/build/paperless.esm.js.map +1 -0
  128. package/dist/cjs/child-of-e472f812.js +11 -0
  129. package/dist/cjs/child-of-e472f812.js.map +1 -0
  130. package/dist/cjs/constants-a4459ec9.js +9 -0
  131. package/dist/cjs/constants-a4459ec9.js.map +1 -0
  132. package/dist/cjs/floating-ui.dom.esm-4cb215a4.js +1324 -0
  133. package/dist/cjs/floating-ui.dom.esm-4cb215a4.js.map +1 -0
  134. package/dist/cjs/index-040ec3f9.js +2483 -0
  135. package/dist/cjs/index-040ec3f9.js.map +1 -0
  136. package/dist/cjs/{index-f9c302b6.js → index-13ea09e0.js} +975 -294
  137. package/dist/cjs/index-13ea09e0.js.map +1 -0
  138. package/dist/cjs/index.cjs.js +19 -0
  139. package/dist/cjs/index.cjs.js.map +1 -0
  140. package/dist/cjs/loader.cjs.js +6 -3
  141. package/dist/cjs/loader.cjs.js.map +1 -0
  142. package/dist/cjs/localization-9e2ac7f3.js +62 -0
  143. package/dist/cjs/localization-9e2ac7f3.js.map +1 -0
  144. package/dist/cjs/object-get-by-path-6dc21ed5.js +14 -0
  145. package/dist/cjs/object-get-by-path-6dc21ed5.js.map +1 -0
  146. package/dist/cjs/p-accordion.cjs.entry.js +36 -0
  147. package/dist/cjs/p-accordion.cjs.entry.js.map +1 -0
  148. package/dist/cjs/p-attachment.cjs.entry.js +39 -0
  149. package/dist/cjs/p-attachment.cjs.entry.js.map +1 -0
  150. package/dist/cjs/p-avatar-group.cjs.entry.js +22 -0
  151. package/dist/cjs/p-avatar-group.cjs.entry.js.map +1 -0
  152. package/dist/cjs/p-avatar.cjs.entry.js +20 -10
  153. package/dist/cjs/p-avatar.cjs.entry.js.map +1 -0
  154. package/dist/cjs/p-backdrop.cjs.entry.js +43 -0
  155. package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -0
  156. package/dist/cjs/p-button_3.cjs.entry.js +212 -109
  157. package/dist/cjs/p-button_3.cjs.entry.js.map +1 -0
  158. package/dist/cjs/p-calendar.cjs.entry.js +710 -0
  159. package/dist/cjs/p-calendar.cjs.entry.js.map +1 -0
  160. package/dist/cjs/p-card-body.cjs.entry.js +5 -6
  161. package/dist/cjs/p-card-body.cjs.entry.js.map +1 -0
  162. package/dist/cjs/p-card-container.cjs.entry.js +6 -6
  163. package/dist/cjs/p-card-container.cjs.entry.js.map +1 -0
  164. package/dist/cjs/p-card-header.cjs.entry.js +6 -6
  165. package/dist/cjs/p-card-header.cjs.entry.js.map +1 -0
  166. package/dist/cjs/p-content-slider.cjs.entry.js +212 -0
  167. package/dist/cjs/p-content-slider.cjs.entry.js.map +1 -0
  168. package/dist/cjs/p-counter.cjs.entry.js +7 -3
  169. package/dist/cjs/p-counter.cjs.entry.js.map +1 -0
  170. package/dist/cjs/p-datepicker.cjs.entry.js +4083 -0
  171. package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -0
  172. package/dist/cjs/p-divider.cjs.entry.js +8 -3
  173. package/dist/cjs/p-divider.cjs.entry.js.map +1 -0
  174. package/dist/cjs/p-drawer-body_3.cjs.entry.js +51 -0
  175. package/dist/cjs/p-drawer-body_3.cjs.entry.js.map +1 -0
  176. package/dist/cjs/p-drawer.cjs.entry.js +65 -0
  177. package/dist/cjs/p-drawer.cjs.entry.js.map +1 -0
  178. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +7 -3
  179. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +1 -0
  180. package/dist/cjs/p-dropdown_2.cjs.entry.js +165 -0
  181. package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -0
  182. package/dist/cjs/p-helper_3.cjs.entry.js +144 -0
  183. package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -0
  184. package/dist/cjs/p-illustration_6.cjs.entry.js +2798 -0
  185. package/dist/cjs/p-illustration_6.cjs.entry.js.map +1 -0
  186. package/dist/cjs/p-info-panel.cjs.entry.js +6 -8
  187. package/dist/cjs/p-info-panel.cjs.entry.js.map +1 -0
  188. package/dist/cjs/p-label_3.cjs.entry.js +65 -0
  189. package/dist/cjs/p-label_3.cjs.entry.js.map +1 -0
  190. package/dist/cjs/p-layout.cjs.entry.js +22 -0
  191. package/dist/cjs/p-layout.cjs.entry.js.map +1 -0
  192. package/dist/cjs/p-modal-body_4.cjs.entry.js +79 -0
  193. package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -0
  194. package/dist/cjs/p-modal.cjs.entry.js +36 -14
  195. package/dist/cjs/p-modal.cjs.entry.js.map +1 -0
  196. package/dist/cjs/p-navbar.cjs.entry.js +30 -0
  197. package/dist/cjs/p-navbar.cjs.entry.js.map +1 -0
  198. package/dist/cjs/p-navigation-item.cjs.entry.js +9 -6
  199. package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -0
  200. package/dist/cjs/p-page-size-select_3.cjs.entry.js +224 -0
  201. package/dist/cjs/p-page-size-select_3.cjs.entry.js.map +1 -0
  202. package/dist/cjs/p-profile.cjs.entry.js +45 -0
  203. package/dist/cjs/p-profile.cjs.entry.js.map +1 -0
  204. package/dist/cjs/p-select.cjs.entry.js +246 -0
  205. package/dist/cjs/p-select.cjs.entry.js.map +1 -0
  206. package/dist/cjs/p-slider-indicator.cjs.entry.js +22 -0
  207. package/dist/cjs/p-slider-indicator.cjs.entry.js.map +1 -0
  208. package/dist/cjs/p-status.cjs.entry.js +7 -5
  209. package/dist/cjs/p-status.cjs.entry.js.map +1 -0
  210. package/dist/cjs/p-stepper-item.cjs.entry.js +26 -0
  211. package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -0
  212. package/dist/cjs/p-stepper-line.cjs.entry.js +23 -0
  213. package/dist/cjs/p-stepper-line.cjs.entry.js.map +1 -0
  214. package/dist/cjs/p-stepper.cjs.entry.js +80 -0
  215. package/dist/cjs/p-stepper.cjs.entry.js.map +1 -0
  216. package/dist/cjs/p-tab-group.cjs.entry.js +20 -0
  217. package/dist/cjs/p-tab-group.cjs.entry.js.map +1 -0
  218. package/dist/cjs/p-tab-item.cjs.entry.js +22 -0
  219. package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -0
  220. package/dist/cjs/p-table-column.cjs.entry.js +28 -0
  221. package/dist/cjs/p-table-column.cjs.entry.js.map +1 -0
  222. package/dist/cjs/p-table.cjs.entry.js +352 -0
  223. package/dist/cjs/p-table.cjs.entry.js.map +1 -0
  224. package/dist/cjs/p-toast-container.cjs.entry.js +22 -0
  225. package/dist/cjs/p-toast-container.cjs.entry.js.map +1 -0
  226. package/dist/cjs/p-toast.cjs.entry.js +35 -0
  227. package/dist/cjs/p-toast.cjs.entry.js.map +1 -0
  228. package/dist/cjs/p-tooltip.cjs.entry.js +56 -55
  229. package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -0
  230. package/dist/cjs/paperless.cjs.js +12 -3
  231. package/dist/cjs/paperless.cjs.js.map +1 -0
  232. package/dist/collection/assets/icons/camera.svg +10 -0
  233. package/dist/collection/assets/icons/filter.svg +6 -13
  234. package/dist/collection/assets/icons/menu.svg +25 -0
  235. package/dist/collection/assets/icons/more.svg +18 -0
  236. package/dist/collection/assets/icons/notification.svg +10 -0
  237. package/dist/collection/assets/icons/reload.svg +10 -0
  238. package/dist/collection/assets/icons/signout.svg +23 -0
  239. package/dist/collection/assets/icons/switch.svg +20 -0
  240. package/dist/collection/assets/illustrations/e-mail.svg +1 -0
  241. package/dist/collection/assets/illustrations/empty-state-add.svg +65 -0
  242. package/dist/collection/assets/illustrations/empty-state-overview.svg +58 -0
  243. package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
  244. package/dist/collection/assets/images/helper/helper-hover.svg +6 -6
  245. package/dist/collection/assets/images/helper/helper.svg +2 -2
  246. package/dist/collection/collection-manifest.json +38 -5
  247. package/dist/collection/components/atoms/avatar/avatar.component.css +1 -31
  248. package/dist/collection/components/atoms/avatar/avatar.component.js +107 -89
  249. package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -0
  250. package/dist/collection/components/atoms/avatar-group/avatar-group.component.css +1 -0
  251. package/dist/collection/components/atoms/avatar-group/avatar-group.component.js +42 -0
  252. package/dist/collection/components/atoms/avatar-group/avatar-group.component.js.map +1 -0
  253. package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -0
  254. package/dist/collection/components/atoms/backdrop/backdrop.component.js +149 -0
  255. package/dist/collection/components/atoms/backdrop/backdrop.component.js.map +1 -0
  256. package/dist/collection/components/atoms/button/button.component.css +1 -93
  257. package/dist/collection/components/atoms/button/button.component.js +305 -297
  258. package/dist/collection/components/atoms/button/button.component.js.map +1 -0
  259. package/dist/collection/components/atoms/card-body/card-body.component.css +1 -9
  260. package/dist/collection/components/atoms/card-body/card-body.component.js +35 -32
  261. package/dist/collection/components/atoms/card-body/card-body.component.js.map +1 -0
  262. package/dist/collection/components/atoms/card-container/card-container.component.css +1 -13
  263. package/dist/collection/components/atoms/card-container/card-container.component.js +53 -31
  264. package/dist/collection/components/atoms/card-container/card-container.component.js.map +1 -0
  265. package/dist/collection/components/atoms/card-header/card-header.component.css +1 -17
  266. package/dist/collection/components/atoms/card-header/card-header.component.js +52 -50
  267. package/dist/collection/components/atoms/card-header/card-header.component.js.map +1 -0
  268. package/dist/collection/components/atoms/counter/counter.component.css +1 -5
  269. package/dist/collection/components/atoms/counter/counter.component.js +57 -9
  270. package/dist/collection/components/atoms/counter/counter.component.js.map +1 -0
  271. package/dist/collection/components/atoms/divider/divider.component.css +1 -3
  272. package/dist/collection/components/atoms/divider/divider.component.js +16 -8
  273. package/dist/collection/components/atoms/divider/divider.component.js.map +1 -0
  274. package/dist/collection/components/atoms/drawer-body/drawer-body.component.css +1 -0
  275. package/dist/collection/components/atoms/drawer-body/drawer-body.component.js +44 -0
  276. package/dist/collection/components/atoms/drawer-body/drawer-body.component.js.map +1 -0
  277. package/dist/collection/components/atoms/drawer-container/drawer-container.component.css +1 -0
  278. package/dist/collection/components/atoms/drawer-container/drawer-container.component.js +48 -0
  279. package/dist/collection/components/atoms/drawer-container/drawer-container.component.js.map +1 -0
  280. package/dist/collection/components/atoms/drawer-header/drawer-header.component.css +1 -0
  281. package/dist/collection/components/atoms/drawer-header/drawer-header.component.js +66 -0
  282. package/dist/collection/components/atoms/drawer-header/drawer-header.component.js.map +1 -0
  283. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -5
  284. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +57 -9
  285. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js.map +1 -0
  286. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -13
  287. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +75 -30
  288. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -0
  289. package/dist/collection/components/atoms/helper/helper.component.css +1 -7
  290. package/dist/collection/components/atoms/helper/helper.component.js +43 -12
  291. package/dist/collection/components/atoms/helper/helper.component.js.map +1 -0
  292. package/dist/collection/components/atoms/icon/icon.component.css +1 -1
  293. package/dist/collection/components/atoms/icon/icon.component.js +103 -101
  294. package/dist/collection/components/atoms/icon/icon.component.js.map +1 -0
  295. package/dist/collection/components/atoms/illustration/illustration.component.js +30 -23
  296. package/dist/collection/components/atoms/illustration/illustration.component.js.map +1 -0
  297. package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -28
  298. package/dist/collection/components/atoms/info-panel/info-panel.component.js +86 -89
  299. package/dist/collection/components/atoms/info-panel/info-panel.component.js.map +1 -0
  300. package/dist/collection/components/atoms/label/label.component.css +1 -0
  301. package/dist/collection/components/atoms/label/label.component.js +171 -0
  302. package/dist/collection/components/atoms/label/label.component.js.map +1 -0
  303. package/dist/collection/components/atoms/layout/layout.component.css +1 -0
  304. package/dist/collection/components/atoms/layout/layout.component.js +44 -0
  305. package/dist/collection/components/atoms/layout/layout.component.js.map +1 -0
  306. package/dist/collection/components/atoms/loader/loader.component.css +1 -26
  307. package/dist/collection/components/atoms/loader/loader.component.js +113 -114
  308. package/dist/collection/components/atoms/loader/loader.component.js.map +1 -0
  309. package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -7
  310. package/dist/collection/components/atoms/modal-body/modal-body.component.js +53 -31
  311. package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -0
  312. package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -6
  313. package/dist/collection/components/atoms/modal-container/modal-container.component.js +58 -36
  314. package/dist/collection/components/atoms/modal-container/modal-container.component.js.map +1 -0
  315. package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -4
  316. package/dist/collection/components/atoms/modal-footer/modal-footer.component.js +13 -10
  317. package/dist/collection/components/atoms/modal-footer/modal-footer.component.js.map +1 -0
  318. package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -6
  319. package/dist/collection/components/atoms/modal-header/modal-header.component.js +60 -9
  320. package/dist/collection/components/atoms/modal-header/modal-header.component.js.map +1 -0
  321. package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -16
  322. package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +35 -32
  323. package/dist/collection/components/atoms/pagination-item/pagination-item.component.js.map +1 -0
  324. package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -5
  325. package/dist/collection/components/atoms/segment-container/segment-container.component.js +13 -9
  326. package/dist/collection/components/atoms/segment-container/segment-container.component.js.map +1 -0
  327. package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -21
  328. package/dist/collection/components/atoms/segment-item/segment-item.component.js +98 -91
  329. package/dist/collection/components/atoms/segment-item/segment-item.component.js.map +1 -0
  330. package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -0
  331. package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js +44 -0
  332. package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js.map +1 -0
  333. package/dist/collection/components/atoms/status/status.component.css +1 -16
  334. package/dist/collection/components/atoms/status/status.component.js +98 -93
  335. package/dist/collection/components/atoms/status/status.component.js.map +1 -0
  336. package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -0
  337. package/dist/collection/components/atoms/stepper-item/stepper-item.component.js +120 -0
  338. package/dist/collection/components/atoms/stepper-item/stepper-item.component.js.map +1 -0
  339. package/dist/collection/components/atoms/stepper-line/stepper-line.component.css +1 -0
  340. package/dist/collection/components/atoms/stepper-line/stepper-line.component.js +63 -0
  341. package/dist/collection/components/atoms/stepper-line/stepper-line.component.js.map +1 -0
  342. package/dist/collection/components/atoms/tab-group/tab-group.component.js +9 -0
  343. package/dist/collection/components/atoms/tab-group/tab-group.component.js.map +1 -0
  344. package/dist/collection/components/atoms/tab-item/tab-item.component.css +1 -0
  345. package/dist/collection/components/atoms/tab-item/tab-item.component.js +44 -0
  346. package/dist/collection/components/atoms/tab-item/tab-item.component.js.map +1 -0
  347. package/dist/collection/components/atoms/table-container/table-container.component.css +1 -0
  348. package/dist/collection/components/atoms/table-container/table-container.component.js +19 -0
  349. package/dist/collection/components/atoms/table-container/table-container.component.js.map +1 -0
  350. package/dist/collection/components/atoms/toast-container/toast-container.component.css +1 -0
  351. package/dist/collection/components/atoms/toast-container/toast-container.component.js +44 -0
  352. package/dist/collection/components/atoms/toast-container/toast-container.component.js.map +1 -0
  353. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -40
  354. package/dist/collection/components/atoms/tooltip/tooltip.component.js +236 -192
  355. package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -0
  356. package/dist/collection/components/helpers/table-column/table-column.component.js +151 -0
  357. package/dist/collection/components/helpers/table-column/table-column.component.js.map +1 -0
  358. package/dist/collection/components/molecules/accordion/accordion.component.css +1 -0
  359. package/dist/collection/components/molecules/accordion/accordion.component.js +128 -0
  360. package/dist/collection/components/molecules/accordion/accordion.component.js.map +1 -0
  361. package/dist/collection/components/molecules/attachment/attachment.component.css +1 -0
  362. package/dist/collection/components/molecules/attachment/attachment.component.js +145 -0
  363. package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -0
  364. package/dist/collection/components/molecules/calendar/calendar.component.css +1 -0
  365. package/dist/collection/components/molecules/calendar/calendar.component.js +503 -0
  366. package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -0
  367. package/dist/collection/components/molecules/content-slider/content-slider.component.css +1 -0
  368. package/dist/collection/components/molecules/content-slider/content-slider.component.js +317 -0
  369. package/dist/collection/components/molecules/content-slider/content-slider.component.js.map +1 -0
  370. package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -0
  371. package/dist/collection/components/molecules/datepicker/datepicker.component.js +509 -0
  372. package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -0
  373. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -9
  374. package/dist/collection/components/molecules/dropdown/dropdown.component.js +294 -156
  375. package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -0
  376. package/dist/collection/components/molecules/input-error/input-error.component.js +60 -0
  377. package/dist/collection/components/molecules/input-error/input-error.component.js.map +1 -0
  378. package/dist/collection/components/molecules/input-group/input-group.component.css +1 -0
  379. package/dist/collection/components/molecules/input-group/input-group.component.js +379 -0
  380. package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -0
  381. package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +1 -28
  382. package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +107 -104
  383. package/dist/collection/components/molecules/navigation-item/navigation-item.component.js.map +1 -0
  384. package/dist/collection/components/molecules/page-size-select/constants.js +3 -0
  385. package/dist/collection/components/molecules/page-size-select/constants.js.map +1 -0
  386. package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +207 -0
  387. package/dist/collection/components/molecules/page-size-select/page-size-select.component.js.map +1 -0
  388. package/dist/collection/components/molecules/pagination/pagination.component.css +1 -3
  389. package/dist/collection/components/molecules/pagination/pagination.component.js +119 -94
  390. package/dist/collection/components/molecules/pagination/pagination.component.js.map +1 -0
  391. package/dist/collection/components/molecules/profile/profile.component.css +1 -0
  392. package/dist/collection/components/molecules/profile/profile.component.js +90 -0
  393. package/dist/collection/components/molecules/profile/profile.component.js.map +1 -0
  394. package/dist/collection/components/molecules/select/select.component.css +1 -0
  395. package/dist/collection/components/molecules/select/select.component.js +724 -0
  396. package/dist/collection/components/molecules/select/select.component.js.map +1 -0
  397. package/dist/collection/components/molecules/stepper/stepper.component.css +1 -0
  398. package/dist/collection/components/molecules/stepper/stepper.component.js +141 -0
  399. package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -0
  400. package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -0
  401. package/dist/collection/components/molecules/table-cell/table-cell.component.js +263 -0
  402. package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -0
  403. package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -0
  404. package/dist/collection/components/molecules/table-footer/table-footer.component.js +276 -0
  405. package/dist/collection/components/molecules/table-footer/table-footer.component.js.map +1 -0
  406. package/dist/collection/components/molecules/table-header/table-header.component.css +1 -0
  407. package/dist/collection/components/molecules/table-header/table-header.component.js +452 -0
  408. package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -0
  409. package/dist/collection/components/molecules/table-row/table-row.component.css +1 -0
  410. package/dist/collection/components/molecules/table-row/table-row.component.js +65 -0
  411. package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -0
  412. package/dist/collection/components/molecules/toast/toast.component.css +1 -0
  413. package/dist/collection/components/molecules/toast/toast.component.js +197 -0
  414. package/dist/collection/components/molecules/toast/toast.component.js.map +1 -0
  415. package/dist/collection/components/organisms/drawer/drawer.component.css +1 -0
  416. package/dist/collection/components/organisms/drawer/drawer.component.js +234 -0
  417. package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -0
  418. package/dist/collection/components/organisms/modal/modal.component.js +259 -0
  419. package/dist/collection/components/organisms/modal/modal.component.js.map +1 -0
  420. package/dist/collection/components/organisms/navbar/navbar.component.css +1 -0
  421. package/dist/collection/components/organisms/navbar/navbar.component.js +90 -0
  422. package/dist/collection/components/organisms/navbar/navbar.component.js.map +1 -0
  423. package/dist/collection/components/organisms/table/table.component.css +1 -0
  424. package/dist/collection/components/organisms/table/table.component.js +1292 -0
  425. package/dist/collection/components/organisms/table/table.component.js.map +1 -0
  426. package/dist/collection/index.js +3 -1
  427. package/dist/collection/index.js.map +1 -0
  428. package/dist/collection/tailwind/animation.js +72 -2
  429. package/dist/collection/tailwind/border-radius.js +1 -0
  430. package/dist/collection/tailwind/height.js +5 -0
  431. package/dist/collection/tailwind/plugins/safe-area.js +98 -0
  432. package/dist/collection/tailwind/screens.js +8 -0
  433. package/dist/collection/tailwind/shadows.js +11 -5
  434. package/dist/collection/tailwind/spacing.js +10 -0
  435. package/dist/collection/tailwind/width.js +20 -0
  436. package/dist/collection/tailwind/z-index.js +15 -1
  437. package/dist/collection/tailwind.config.js +14 -3
  438. package/dist/collection/types/index.js +3 -0
  439. package/dist/collection/types/index.js.map +1 -0
  440. package/dist/collection/types/table.js +2 -0
  441. package/dist/collection/types/table.js.map +1 -0
  442. package/dist/collection/types/tailwind.js +2 -0
  443. package/dist/collection/types/tailwind.js.map +1 -0
  444. package/dist/collection/utils/child-of.js +1 -0
  445. package/dist/collection/utils/child-of.js.map +1 -0
  446. package/dist/collection/utils/icons.js +15 -0
  447. package/dist/collection/utils/icons.js.map +1 -0
  448. package/dist/collection/utils/illustrations.js +9 -0
  449. package/dist/collection/utils/illustrations.js.map +1 -0
  450. package/dist/collection/utils/index.js +7 -0
  451. package/dist/collection/utils/index.js.map +1 -0
  452. package/dist/collection/utils/localization.js +56 -0
  453. package/dist/collection/utils/localization.js.map +1 -0
  454. package/dist/collection/utils/object-get-by-path.js +9 -0
  455. package/dist/collection/utils/object-get-by-path.js.map +1 -0
  456. package/dist/collection/utils/transformers.js +5 -0
  457. package/dist/collection/utils/transformers.js.map +1 -0
  458. package/dist/components/backdrop.component.js +59 -0
  459. package/dist/components/backdrop.component.js.map +1 -0
  460. package/dist/components/button.component.js +102 -0
  461. package/dist/components/button.component.js.map +1 -0
  462. package/dist/components/calendar.component.js +3198 -0
  463. package/dist/components/calendar.component.js.map +1 -0
  464. package/dist/components/child-of.js +9 -0
  465. package/dist/components/child-of.js.map +1 -0
  466. package/dist/components/counter.component.js +11 -4
  467. package/dist/components/counter.component.js.map +1 -0
  468. package/dist/components/divider.component.js +8 -3
  469. package/dist/components/divider.component.js.map +1 -0
  470. package/dist/components/drawer-body.component.js +35 -0
  471. package/dist/components/drawer-body.component.js.map +1 -0
  472. package/dist/components/drawer-container.component.js +34 -0
  473. package/dist/components/drawer-container.component.js.map +1 -0
  474. package/dist/components/drawer-header.component.js +54 -0
  475. package/dist/components/drawer-header.component.js.map +1 -0
  476. package/dist/components/dropdown-menu-container.component.js +11 -4
  477. package/dist/components/dropdown-menu-container.component.js.map +1 -0
  478. package/dist/components/dropdown-menu-item.component.js +45 -0
  479. package/dist/components/dropdown-menu-item.component.js.map +1 -0
  480. package/dist/components/dropdown.component.js +177 -0
  481. package/dist/components/dropdown.component.js.map +1 -0
  482. package/dist/components/floating-ui.dom.esm.js +1317 -0
  483. package/dist/components/floating-ui.dom.esm.js.map +1 -0
  484. package/dist/components/helper.component.js +41 -0
  485. package/dist/components/helper.component.js.map +1 -0
  486. package/dist/components/icon.component.js +147 -25
  487. package/dist/components/icon.component.js.map +1 -0
  488. package/dist/{cjs/p-illustration.cjs.entry.js → components/illustration.component.js} +250 -16
  489. package/dist/components/illustration.component.js.map +1 -0
  490. package/dist/components/index.d.ts +9 -31
  491. package/dist/components/index.js +13 -29
  492. package/dist/components/index.js.map +1 -0
  493. package/dist/components/input-error.component.js +50 -0
  494. package/dist/components/input-error.component.js.map +1 -0
  495. package/dist/components/input-group.component.js +165 -0
  496. package/dist/components/input-group.component.js.map +1 -0
  497. package/dist/components/label.component.js +54 -0
  498. package/dist/components/label.component.js.map +1 -0
  499. package/dist/components/loader.component.js +12 -14
  500. package/dist/components/loader.component.js.map +1 -0
  501. package/dist/components/localization.js +59 -0
  502. package/dist/components/localization.js.map +1 -0
  503. package/dist/components/modal-body.component.js +8 -7
  504. package/dist/components/modal-body.component.js.map +1 -0
  505. package/dist/components/modal-container.component.js +13 -12
  506. package/dist/components/modal-container.component.js.map +1 -0
  507. package/dist/components/modal-footer.component.js +5 -3
  508. package/dist/components/modal-footer.component.js.map +1 -0
  509. package/dist/components/modal-header.component.js +30 -6
  510. package/dist/components/modal-header.component.js.map +1 -0
  511. package/dist/components/object-get-by-path.js +12 -0
  512. package/dist/components/object-get-by-path.js.map +1 -0
  513. package/dist/components/p-accordion.d.ts +11 -0
  514. package/dist/components/p-accordion.js +67 -0
  515. package/dist/components/p-accordion.js.map +1 -0
  516. package/dist/components/p-attachment.d.ts +11 -0
  517. package/dist/components/p-attachment.js +88 -0
  518. package/dist/components/p-attachment.js.map +1 -0
  519. package/dist/components/p-avatar-group.d.ts +11 -0
  520. package/dist/components/p-avatar-group.js +37 -0
  521. package/dist/components/p-avatar-group.js.map +1 -0
  522. package/dist/components/p-avatar.js +23 -14
  523. package/dist/components/p-avatar.js.map +1 -0
  524. package/dist/components/p-backdrop.d.ts +11 -0
  525. package/dist/components/p-backdrop.js +8 -0
  526. package/dist/components/p-backdrop.js.map +1 -0
  527. package/dist/components/p-button.js +3 -112
  528. package/dist/components/p-button.js.map +1 -0
  529. package/dist/components/p-calendar.d.ts +11 -0
  530. package/dist/components/p-calendar.js +8 -0
  531. package/dist/components/p-calendar.js.map +1 -0
  532. package/dist/components/p-card-body.js +6 -7
  533. package/dist/components/p-card-body.js.map +1 -0
  534. package/dist/components/p-card-container.js +8 -7
  535. package/dist/components/p-card-container.js.map +1 -0
  536. package/dist/components/p-card-header.js +7 -7
  537. package/dist/components/p-card-header.js.map +1 -0
  538. package/dist/components/{p-modal-backdrop.d.ts → p-content-slider.d.ts} +4 -4
  539. package/dist/components/p-content-slider.js +241 -0
  540. package/dist/components/p-content-slider.js.map +1 -0
  541. package/dist/components/p-counter.js +2 -0
  542. package/dist/components/p-counter.js.map +1 -0
  543. package/dist/components/p-datepicker.d.ts +11 -0
  544. package/dist/components/p-datepicker.js +4164 -0
  545. package/dist/components/p-datepicker.js.map +1 -0
  546. package/dist/components/p-divider.js +2 -0
  547. package/dist/components/p-divider.js.map +1 -0
  548. package/dist/components/p-drawer-body.d.ts +11 -0
  549. package/dist/components/p-drawer-body.js +8 -0
  550. package/dist/components/p-drawer-body.js.map +1 -0
  551. package/dist/components/p-drawer-container.d.ts +11 -0
  552. package/dist/components/p-drawer-container.js +8 -0
  553. package/dist/components/p-drawer-container.js.map +1 -0
  554. package/dist/components/p-drawer-header.d.ts +11 -0
  555. package/dist/components/p-drawer-header.js +8 -0
  556. package/dist/components/p-drawer-header.js.map +1 -0
  557. package/dist/components/p-drawer.d.ts +11 -0
  558. package/dist/components/p-drawer.js +130 -0
  559. package/dist/components/p-drawer.js.map +1 -0
  560. package/dist/components/p-dropdown-menu-container.js +2 -0
  561. package/dist/components/p-dropdown-menu-container.js.map +1 -0
  562. package/dist/components/p-dropdown-menu-item.js +3 -34
  563. package/dist/components/p-dropdown-menu-item.js.map +1 -0
  564. package/dist/components/p-dropdown.js +3 -161
  565. package/dist/components/p-dropdown.js.map +1 -0
  566. package/dist/components/p-helper.js +3 -34
  567. package/dist/components/p-helper.js.map +1 -0
  568. package/dist/components/p-icon.js +2 -0
  569. package/dist/components/p-icon.js.map +1 -0
  570. package/dist/components/p-illustration.js +3 -1432
  571. package/dist/components/p-illustration.js.map +1 -0
  572. package/dist/components/p-info-panel.js +6 -8
  573. package/dist/components/p-info-panel.js.map +1 -0
  574. package/dist/components/p-input-error.d.ts +11 -0
  575. package/dist/components/p-input-error.js +8 -0
  576. package/dist/components/p-input-error.js.map +1 -0
  577. package/dist/components/p-input-group.d.ts +11 -0
  578. package/dist/components/p-input-group.js +8 -0
  579. package/dist/components/p-input-group.js.map +1 -0
  580. package/dist/components/p-label.d.ts +11 -0
  581. package/dist/components/p-label.js +8 -0
  582. package/dist/components/p-label.js.map +1 -0
  583. package/dist/components/p-layout.d.ts +11 -0
  584. package/dist/components/p-layout.js +38 -0
  585. package/dist/components/p-layout.js.map +1 -0
  586. package/dist/components/p-loader.js +2 -0
  587. package/dist/components/p-loader.js.map +1 -0
  588. package/dist/components/p-modal-body.js +2 -0
  589. package/dist/components/p-modal-body.js.map +1 -0
  590. package/dist/components/p-modal-container.js +2 -0
  591. package/dist/components/p-modal-container.js.map +1 -0
  592. package/dist/components/p-modal-footer.js +2 -0
  593. package/dist/components/p-modal-footer.js.map +1 -0
  594. package/dist/components/p-modal-header.js +2 -0
  595. package/dist/components/p-modal-header.js.map +1 -0
  596. package/dist/components/p-modal.js +67 -21
  597. package/dist/components/p-modal.js.map +1 -0
  598. package/dist/components/p-navbar.d.ts +11 -0
  599. package/dist/components/p-navbar.js +72 -0
  600. package/dist/components/p-navbar.js.map +1 -0
  601. package/dist/components/p-navigation-item.js +9 -6
  602. package/dist/components/p-navigation-item.js.map +1 -0
  603. package/dist/components/p-page-size-select.d.ts +11 -0
  604. package/dist/components/p-page-size-select.js +8 -0
  605. package/dist/components/p-page-size-select.js.map +1 -0
  606. package/dist/components/p-pagination-item.js +2 -0
  607. package/dist/components/p-pagination-item.js.map +1 -0
  608. package/dist/components/p-pagination.js +3 -195
  609. package/dist/components/p-pagination.js.map +1 -0
  610. package/dist/components/p-profile.d.ts +11 -0
  611. package/dist/components/p-profile.js +81 -0
  612. package/dist/components/p-profile.js.map +1 -0
  613. package/dist/components/p-segment-container.js +3 -27
  614. package/dist/components/p-segment-container.js.map +1 -0
  615. package/dist/components/p-segment-item.js +3 -49
  616. package/dist/components/p-segment-item.js.map +1 -0
  617. package/dist/components/p-select.d.ts +11 -0
  618. package/dist/components/p-select.js +341 -0
  619. package/dist/components/p-select.js.map +1 -0
  620. package/dist/components/p-slider-indicator.d.ts +11 -0
  621. package/dist/components/p-slider-indicator.js +8 -0
  622. package/dist/components/p-slider-indicator.js.map +1 -0
  623. package/dist/components/p-status.js +7 -5
  624. package/dist/components/p-status.js.map +1 -0
  625. package/dist/components/p-stepper-item.d.ts +11 -0
  626. package/dist/components/p-stepper-item.js +52 -0
  627. package/dist/components/p-stepper-item.js.map +1 -0
  628. package/dist/components/p-stepper-line.d.ts +11 -0
  629. package/dist/components/p-stepper-line.js +8 -0
  630. package/dist/components/p-stepper-line.js.map +1 -0
  631. package/dist/components/p-stepper.d.ts +11 -0
  632. package/dist/components/p-stepper.js +104 -0
  633. package/dist/components/p-stepper.js.map +1 -0
  634. package/dist/components/p-tab-group.d.ts +11 -0
  635. package/dist/components/p-tab-group.js +38 -0
  636. package/dist/components/p-tab-group.js.map +1 -0
  637. package/dist/components/p-tab-item.d.ts +11 -0
  638. package/dist/components/p-tab-item.js +38 -0
  639. package/dist/components/p-tab-item.js.map +1 -0
  640. package/dist/components/p-table-cell.d.ts +11 -0
  641. package/dist/components/p-table-cell.js +8 -0
  642. package/dist/components/p-table-cell.js.map +1 -0
  643. package/dist/components/p-table-column.d.ts +11 -0
  644. package/dist/components/p-table-column.js +48 -0
  645. package/dist/components/p-table-column.js.map +1 -0
  646. package/dist/components/p-table-container.d.ts +11 -0
  647. package/dist/components/p-table-container.js +8 -0
  648. package/dist/components/p-table-container.js.map +1 -0
  649. package/dist/components/p-table-footer.d.ts +11 -0
  650. package/dist/components/p-table-footer.js +8 -0
  651. package/dist/components/p-table-footer.js.map +1 -0
  652. package/dist/components/p-table-header.d.ts +11 -0
  653. package/dist/components/p-table-header.js +8 -0
  654. package/dist/components/p-table-header.js.map +1 -0
  655. package/dist/components/p-table-row.d.ts +11 -0
  656. package/dist/components/p-table-row.js +8 -0
  657. package/dist/components/p-table-row.js.map +1 -0
  658. package/dist/components/p-table.d.ts +11 -0
  659. package/dist/components/p-table.js +544 -0
  660. package/dist/components/p-table.js.map +1 -0
  661. package/dist/components/p-toast-container.d.ts +11 -0
  662. package/dist/components/p-toast-container.js +38 -0
  663. package/dist/components/p-toast-container.js.map +1 -0
  664. package/dist/components/p-toast.d.ts +11 -0
  665. package/dist/components/p-toast.js +75 -0
  666. package/dist/components/p-toast.js.map +1 -0
  667. package/dist/components/p-tooltip.js +2 -0
  668. package/dist/components/p-tooltip.js.map +1 -0
  669. package/dist/components/page-size-select.component.js +107 -0
  670. package/dist/components/page-size-select.component.js.map +1 -0
  671. package/dist/components/pagination-item.component.js +4 -5
  672. package/dist/components/pagination-item.component.js.map +1 -0
  673. package/dist/components/pagination.component.js +196 -0
  674. package/dist/components/pagination.component.js.map +1 -0
  675. package/dist/components/segment-container.component.js +31 -0
  676. package/dist/components/segment-container.component.js.map +1 -0
  677. package/dist/components/segment-item.component.js +53 -0
  678. package/dist/components/segment-item.component.js.map +1 -0
  679. package/dist/components/slider-indicator.component.js +35 -0
  680. package/dist/components/slider-indicator.component.js.map +1 -0
  681. package/dist/components/stepper-line.component.js +37 -0
  682. package/dist/components/stepper-line.component.js.map +1 -0
  683. package/dist/components/table-cell.component.js +137 -0
  684. package/dist/components/table-cell.component.js.map +1 -0
  685. package/dist/components/table-container.component.js +32 -0
  686. package/dist/components/table-container.component.js.map +1 -0
  687. package/dist/components/table-footer.component.js +129 -0
  688. package/dist/components/table-footer.component.js.map +1 -0
  689. package/dist/components/table-header.component.js +1070 -0
  690. package/dist/components/table-header.component.js.map +1 -0
  691. package/dist/components/table-row.component.js +45 -0
  692. package/dist/components/table-row.component.js.map +1 -0
  693. package/dist/components/tooltip.component.js +58 -56
  694. package/dist/components/tooltip.component.js.map +1 -0
  695. package/dist/esm/child-of-90a8c4b5.js +9 -0
  696. package/dist/esm/child-of-90a8c4b5.js.map +1 -0
  697. package/dist/esm/constants-826f9460.js +6 -0
  698. package/dist/esm/constants-826f9460.js.map +1 -0
  699. package/dist/esm/floating-ui.dom.esm-82b72251.js +1317 -0
  700. package/dist/esm/floating-ui.dom.esm-82b72251.js.map +1 -0
  701. package/dist/esm/index-340e085c.js +2460 -0
  702. package/dist/esm/index-340e085c.js.map +1 -0
  703. package/dist/esm/{index-fff70567.js → index-94339e77.js} +975 -295
  704. package/dist/esm/index-94339e77.js.map +1 -0
  705. package/dist/esm/index.js +11 -0
  706. package/dist/esm/index.js.map +1 -0
  707. package/dist/esm/loader.js +6 -3
  708. package/dist/esm/loader.js.map +1 -0
  709. package/dist/esm/localization-901dc2d3.js +59 -0
  710. package/dist/esm/localization-901dc2d3.js.map +1 -0
  711. package/dist/esm/object-get-by-path-d6427a61.js +12 -0
  712. package/dist/esm/object-get-by-path-d6427a61.js.map +1 -0
  713. package/dist/esm/p-accordion.entry.js +32 -0
  714. package/dist/esm/p-accordion.entry.js.map +1 -0
  715. package/dist/esm/p-attachment.entry.js +35 -0
  716. package/dist/esm/p-attachment.entry.js.map +1 -0
  717. package/dist/esm/p-avatar-group.entry.js +18 -0
  718. package/dist/esm/p-avatar-group.entry.js.map +1 -0
  719. package/dist/esm/p-avatar.entry.js +20 -10
  720. package/dist/esm/p-avatar.entry.js.map +1 -0
  721. package/dist/esm/p-backdrop.entry.js +39 -0
  722. package/dist/esm/p-backdrop.entry.js.map +1 -0
  723. package/dist/esm/p-button_3.entry.js +212 -109
  724. package/dist/esm/p-button_3.entry.js.map +1 -0
  725. package/dist/esm/p-calendar.entry.js +706 -0
  726. package/dist/esm/p-calendar.entry.js.map +1 -0
  727. package/dist/esm/p-card-body.entry.js +5 -6
  728. package/dist/esm/p-card-body.entry.js.map +1 -0
  729. package/dist/esm/p-card-container.entry.js +6 -6
  730. package/dist/esm/p-card-container.entry.js.map +1 -0
  731. package/dist/esm/p-card-header.entry.js +6 -6
  732. package/dist/esm/p-card-header.entry.js.map +1 -0
  733. package/dist/esm/p-content-slider.entry.js +208 -0
  734. package/dist/esm/p-content-slider.entry.js.map +1 -0
  735. package/dist/esm/p-counter.entry.js +7 -3
  736. package/dist/esm/p-counter.entry.js.map +1 -0
  737. package/dist/esm/p-datepicker.entry.js +4079 -0
  738. package/dist/esm/p-datepicker.entry.js.map +1 -0
  739. package/dist/esm/p-divider.entry.js +8 -3
  740. package/dist/esm/p-divider.entry.js.map +1 -0
  741. package/dist/esm/p-drawer-body_3.entry.js +45 -0
  742. package/dist/esm/p-drawer-body_3.entry.js.map +1 -0
  743. package/dist/esm/p-drawer.entry.js +61 -0
  744. package/dist/esm/p-drawer.entry.js.map +1 -0
  745. package/dist/esm/p-dropdown-menu-container.entry.js +7 -3
  746. package/dist/esm/p-dropdown-menu-container.entry.js.map +1 -0
  747. package/dist/esm/p-dropdown_2.entry.js +160 -0
  748. package/dist/esm/p-dropdown_2.entry.js.map +1 -0
  749. package/dist/esm/p-helper_3.entry.js +138 -0
  750. package/dist/esm/p-helper_3.entry.js.map +1 -0
  751. package/dist/esm/{p-illustration.entry.js → p-illustration_6.entry.js} +1378 -8
  752. package/dist/esm/p-illustration_6.entry.js.map +1 -0
  753. package/dist/esm/p-info-panel.entry.js +6 -8
  754. package/dist/esm/p-info-panel.entry.js.map +1 -0
  755. package/dist/esm/p-label_3.entry.js +59 -0
  756. package/dist/esm/p-label_3.entry.js.map +1 -0
  757. package/dist/esm/p-layout.entry.js +18 -0
  758. package/dist/esm/p-layout.entry.js.map +1 -0
  759. package/dist/esm/p-modal-body_4.entry.js +72 -0
  760. package/dist/esm/p-modal-body_4.entry.js.map +1 -0
  761. package/dist/esm/p-modal.entry.js +36 -14
  762. package/dist/esm/p-modal.entry.js.map +1 -0
  763. package/dist/esm/p-navbar.entry.js +26 -0
  764. package/dist/esm/p-navbar.entry.js.map +1 -0
  765. package/dist/esm/p-navigation-item.entry.js +9 -6
  766. package/dist/esm/p-navigation-item.entry.js.map +1 -0
  767. package/dist/esm/p-page-size-select_3.entry.js +218 -0
  768. package/dist/esm/p-page-size-select_3.entry.js.map +1 -0
  769. package/dist/esm/p-profile.entry.js +41 -0
  770. package/dist/esm/p-profile.entry.js.map +1 -0
  771. package/dist/esm/p-select.entry.js +242 -0
  772. package/dist/esm/p-select.entry.js.map +1 -0
  773. package/dist/esm/p-slider-indicator.entry.js +18 -0
  774. package/dist/esm/p-slider-indicator.entry.js.map +1 -0
  775. package/dist/esm/p-status.entry.js +7 -5
  776. package/dist/esm/p-status.entry.js.map +1 -0
  777. package/dist/esm/p-stepper-item.entry.js +22 -0
  778. package/dist/esm/p-stepper-item.entry.js.map +1 -0
  779. package/dist/esm/p-stepper-line.entry.js +19 -0
  780. package/dist/esm/p-stepper-line.entry.js.map +1 -0
  781. package/dist/esm/p-stepper.entry.js +76 -0
  782. package/dist/esm/p-stepper.entry.js.map +1 -0
  783. package/dist/esm/p-tab-group.entry.js +16 -0
  784. package/dist/esm/p-tab-group.entry.js.map +1 -0
  785. package/dist/esm/p-tab-item.entry.js +18 -0
  786. package/dist/esm/p-tab-item.entry.js.map +1 -0
  787. package/dist/esm/p-table-column.entry.js +24 -0
  788. package/dist/esm/p-table-column.entry.js.map +1 -0
  789. package/dist/esm/p-table.entry.js +348 -0
  790. package/dist/esm/p-table.entry.js.map +1 -0
  791. package/dist/esm/p-toast-container.entry.js +18 -0
  792. package/dist/esm/p-toast-container.entry.js.map +1 -0
  793. package/dist/esm/p-toast.entry.js +31 -0
  794. package/dist/esm/p-toast.entry.js.map +1 -0
  795. package/dist/esm/p-tooltip.entry.js +56 -55
  796. package/dist/esm/p-tooltip.entry.js.map +1 -0
  797. package/dist/esm/paperless.js +9 -3
  798. package/dist/esm/paperless.js.map +1 -0
  799. package/dist/esm/polyfills/core-js.js +0 -0
  800. package/dist/esm/polyfills/css-shim.js +1 -1
  801. package/dist/esm/polyfills/dom.js +0 -0
  802. package/dist/esm/polyfills/es5-html-element.js +0 -0
  803. package/dist/esm/polyfills/index.js +0 -0
  804. package/dist/esm/polyfills/system.js +0 -0
  805. package/dist/index.html +1 -1
  806. package/dist/paperless/index.esm.js +2 -0
  807. package/dist/paperless/index.esm.js.map +1 -0
  808. package/dist/paperless/p-09ea2a1a.js +2 -0
  809. package/dist/paperless/p-09ea2a1a.js.map +1 -0
  810. package/dist/paperless/p-0a3f2fe8.entry.js +2 -0
  811. package/dist/paperless/p-0a3f2fe8.entry.js.map +1 -0
  812. package/dist/paperless/p-0cb97c5e.entry.js +2 -0
  813. package/dist/paperless/p-0cb97c5e.entry.js.map +1 -0
  814. package/dist/paperless/p-0e0bffb3.entry.js +2 -0
  815. package/dist/paperless/p-0e0bffb3.entry.js.map +1 -0
  816. package/dist/paperless/p-10ad607e.entry.js +2 -0
  817. package/dist/paperless/p-10ad607e.entry.js.map +1 -0
  818. package/dist/paperless/p-1b5292a3.entry.js +2 -0
  819. package/dist/paperless/p-1b5292a3.entry.js.map +1 -0
  820. package/dist/paperless/p-3d8b5cc4.entry.js +2 -0
  821. package/dist/paperless/p-3d8b5cc4.entry.js.map +1 -0
  822. package/dist/paperless/p-3dcc02d8.entry.js +2 -0
  823. package/dist/paperless/p-3dcc02d8.entry.js.map +1 -0
  824. package/dist/paperless/p-45dfd940.entry.js +2 -0
  825. package/dist/paperless/p-45dfd940.entry.js.map +1 -0
  826. package/dist/paperless/p-464569dc.entry.js +2 -0
  827. package/dist/paperless/p-464569dc.entry.js.map +1 -0
  828. package/dist/paperless/p-4e650fe4.js +2 -0
  829. package/dist/paperless/p-4e650fe4.js.map +1 -0
  830. package/dist/paperless/p-5236b565.entry.js +2 -0
  831. package/dist/paperless/p-5236b565.entry.js.map +1 -0
  832. package/dist/paperless/p-57411b2b.entry.js +2 -0
  833. package/dist/paperless/p-57411b2b.entry.js.map +1 -0
  834. package/dist/paperless/p-58b52568.entry.js +2 -0
  835. package/dist/paperless/p-58b52568.entry.js.map +1 -0
  836. package/dist/paperless/p-5d118f66.entry.js +2 -0
  837. package/dist/paperless/p-5d118f66.entry.js.map +1 -0
  838. package/dist/paperless/p-6b7d2d41.entry.js +2 -0
  839. package/dist/paperless/p-6b7d2d41.entry.js.map +1 -0
  840. package/dist/paperless/p-6c60fd3d.js +2 -0
  841. package/dist/paperless/p-6c60fd3d.js.map +1 -0
  842. package/dist/paperless/p-6f82a1e7.entry.js +2 -0
  843. package/dist/paperless/p-6f82a1e7.entry.js.map +1 -0
  844. package/dist/paperless/p-6fd261ab.entry.js +2 -0
  845. package/dist/paperless/p-6fd261ab.entry.js.map +1 -0
  846. package/dist/paperless/p-7010541f.entry.js +2 -0
  847. package/dist/paperless/p-7010541f.entry.js.map +1 -0
  848. package/dist/paperless/p-756c06ec.entry.js +2 -0
  849. package/dist/paperless/p-756c06ec.entry.js.map +1 -0
  850. package/dist/paperless/p-78948e08.entry.js +2 -0
  851. package/dist/paperless/p-78948e08.entry.js.map +1 -0
  852. package/dist/paperless/p-78ce77d2.entry.js +2 -0
  853. package/dist/paperless/p-78ce77d2.entry.js.map +1 -0
  854. package/dist/paperless/p-7b94bc6a.entry.js +2 -0
  855. package/dist/paperless/p-7b94bc6a.entry.js.map +1 -0
  856. package/dist/paperless/p-8a6728d5.js +2 -0
  857. package/dist/paperless/p-8a6728d5.js.map +1 -0
  858. package/dist/paperless/p-8fb43cc7.entry.js +2 -0
  859. package/dist/paperless/p-8fb43cc7.entry.js.map +1 -0
  860. package/dist/paperless/p-93fb216c.entry.js +2 -0
  861. package/dist/paperless/p-93fb216c.entry.js.map +1 -0
  862. package/dist/paperless/p-9ee7b088.entry.js +2 -0
  863. package/dist/paperless/p-9ee7b088.entry.js.map +1 -0
  864. package/dist/paperless/p-a2bd1a79.entry.js +2 -0
  865. package/dist/paperless/p-a2bd1a79.entry.js.map +1 -0
  866. package/dist/paperless/p-a3fcf8b6.entry.js +2 -0
  867. package/dist/paperless/p-a3fcf8b6.entry.js.map +1 -0
  868. package/dist/paperless/p-a89bc06c.entry.js +2 -0
  869. package/dist/paperless/p-a89bc06c.entry.js.map +1 -0
  870. package/dist/paperless/p-ac1af618.js +3 -0
  871. package/dist/paperless/p-ac1af618.js.map +1 -0
  872. package/dist/paperless/p-ac7b48ff.entry.js +2 -0
  873. package/dist/paperless/p-ac7b48ff.entry.js.map +1 -0
  874. package/dist/paperless/p-b13a0ee4.entry.js +2 -0
  875. package/dist/paperless/p-b13a0ee4.entry.js.map +1 -0
  876. package/dist/paperless/p-b273ac6d.js +2 -0
  877. package/dist/paperless/p-b273ac6d.js.map +1 -0
  878. package/dist/paperless/p-b450d46f.entry.js +2 -0
  879. package/dist/paperless/p-b450d46f.entry.js.map +1 -0
  880. package/dist/paperless/p-b7b1de31.entry.js +2 -0
  881. package/dist/paperless/p-b7b1de31.entry.js.map +1 -0
  882. package/dist/paperless/p-bd85ff72.entry.js +2 -0
  883. package/dist/paperless/p-bd85ff72.entry.js.map +1 -0
  884. package/dist/paperless/p-befde602.entry.js +2 -0
  885. package/dist/paperless/p-befde602.entry.js.map +1 -0
  886. package/dist/paperless/p-c6ef7b79.entry.js +2 -0
  887. package/dist/paperless/p-c6ef7b79.entry.js.map +1 -0
  888. package/dist/paperless/p-cccc37c0.entry.js +2 -0
  889. package/dist/paperless/p-cccc37c0.entry.js.map +1 -0
  890. package/dist/paperless/p-d7d7f5d0.entry.js +2 -0
  891. package/dist/paperless/p-d7d7f5d0.entry.js.map +1 -0
  892. package/dist/paperless/p-dc01e9eb.entry.js +2 -0
  893. package/dist/paperless/p-dc01e9eb.entry.js.map +1 -0
  894. package/dist/paperless/p-dd2a50d0.entry.js +2 -0
  895. package/dist/paperless/p-dd2a50d0.entry.js.map +1 -0
  896. package/dist/paperless/p-e0f41dd5.entry.js +2 -0
  897. package/dist/paperless/p-e0f41dd5.entry.js.map +1 -0
  898. package/dist/paperless/p-e621e34c.js +2 -0
  899. package/dist/paperless/p-e621e34c.js.map +1 -0
  900. package/dist/paperless/p-ea824ef3.entry.js +2 -0
  901. package/dist/paperless/p-ea824ef3.entry.js.map +1 -0
  902. package/dist/paperless/p-ebc2ae62.entry.js +2 -0
  903. package/dist/paperless/p-ebc2ae62.entry.js.map +1 -0
  904. package/dist/paperless/p-f07793f6.entry.js +2 -0
  905. package/dist/paperless/p-f07793f6.entry.js.map +1 -0
  906. package/dist/paperless/paperless.css +980 -576
  907. package/dist/paperless/paperless.esm.js +2 -1
  908. package/dist/paperless/paperless.esm.js.map +1 -0
  909. package/dist/style/_fonts.scss +70 -0
  910. package/dist/style/_helpers.scss +5 -0
  911. package/dist/style/_mixins.scss +1 -0
  912. package/dist/style/_reset.scss +30 -0
  913. package/dist/style/_tailwind.scss +3 -0
  914. package/dist/style/_typograhpy.scss +29 -0
  915. package/dist/style/_variables.scss +2 -0
  916. package/dist/style/form/_checkbox.scss +111 -0
  917. package/dist/style/form/_input.scss +31 -0
  918. package/dist/style/form/_mixins.scss +108 -0
  919. package/dist/style/form/_radio.scss +58 -0
  920. package/dist/style/form/_textarea.scss +18 -0
  921. package/dist/style/form/index.scss +4 -0
  922. package/dist/style/mixins/_scrollbar.scss +32 -0
  923. package/dist/style/paperless.scss +12 -0
  924. package/dist/sw.js +2 -906
  925. package/dist/sw.js.map +1 -0
  926. package/dist/tailwind/animation.js +72 -2
  927. package/dist/tailwind/border-radius.js +1 -0
  928. package/dist/tailwind/height.js +5 -0
  929. package/dist/tailwind/plugins/safe-area.js +98 -0
  930. package/dist/tailwind/screens.js +8 -0
  931. package/dist/tailwind/shadows.js +11 -5
  932. package/dist/tailwind/spacing.js +10 -0
  933. package/dist/tailwind/width.js +20 -0
  934. package/dist/tailwind/z-index.js +15 -1
  935. package/dist/tailwind.config.js +14 -3
  936. package/dist/types/components/atoms/avatar/avatar.component.d.ts +3 -1
  937. package/dist/types/components/atoms/avatar-group/avatar-group.component.d.ts +7 -0
  938. package/dist/types/components/atoms/backdrop/backdrop.component.d.ts +31 -0
  939. package/dist/types/components/atoms/button/button.component.d.ts +5 -1
  940. package/dist/types/components/atoms/card-container/card-container.component.d.ts +4 -0
  941. package/dist/types/components/atoms/card-header/card-header.component.d.ts +2 -2
  942. package/dist/types/components/atoms/counter/counter.component.d.ts +8 -0
  943. package/dist/types/components/atoms/divider/divider.component.d.ts +4 -0
  944. package/dist/types/components/atoms/drawer-body/drawer-body.component.d.ts +7 -0
  945. package/dist/types/components/atoms/drawer-container/drawer-container.component.d.ts +7 -0
  946. package/dist/types/components/atoms/drawer-header/drawer-header.component.d.ts +12 -0
  947. package/dist/types/components/atoms/dropdown-menu-container/dropdown-menu-container.component.d.ts +8 -0
  948. package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +9 -0
  949. package/dist/types/components/atoms/helper/helper.component.d.ts +5 -0
  950. package/dist/types/components/atoms/icon/icon.component.d.ts +3 -3
  951. package/dist/types/components/atoms/illustration/illustration.component.d.ts +1 -1
  952. package/dist/types/components/atoms/label/label.component.d.ts +33 -0
  953. package/dist/types/components/atoms/layout/layout.component.d.ts +7 -0
  954. package/dist/types/components/atoms/loader/loader.component.d.ts +1 -1
  955. package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +4 -0
  956. package/dist/types/components/atoms/modal-container/modal-container.component.d.ts +4 -0
  957. package/dist/types/components/atoms/modal-header/modal-header.component.d.ts +9 -0
  958. package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +1 -1
  959. package/dist/types/components/atoms/slider-indicator/slider-indicator.component.d.ts +7 -0
  960. package/dist/types/components/atoms/status/status.component.d.ts +1 -1
  961. package/dist/types/components/atoms/stepper-item/stepper-item.component.d.ts +23 -0
  962. package/dist/types/components/atoms/stepper-line/stepper-line.component.d.ts +11 -0
  963. package/dist/types/components/atoms/tab-group/tab-group.component.d.ts +3 -0
  964. package/dist/types/components/atoms/tab-item/tab-item.component.d.ts +7 -0
  965. package/dist/types/components/atoms/table-container/table-container.component.d.ts +3 -0
  966. package/dist/types/components/atoms/toast-container/toast-container.component.d.ts +7 -0
  967. package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +14 -4
  968. package/dist/types/components/helpers/table-column/table-column.component.d.ts +34 -0
  969. package/dist/types/components/molecules/accordion/accordion.component.d.ts +25 -0
  970. package/dist/types/components/molecules/attachment/attachment.component.d.ts +28 -0
  971. package/dist/types/components/molecules/calendar/calendar.component.d.ts +76 -0
  972. package/dist/types/components/molecules/content-slider/content-slider.component.d.ts +53 -0
  973. package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +93 -0
  974. package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +33 -5
  975. package/dist/types/components/molecules/input-error/input-error.component.d.ts +12 -0
  976. package/dist/types/components/molecules/input-group/input-group.component.d.ts +68 -0
  977. package/dist/types/components/molecules/page-size-select/constants.d.ts +2 -0
  978. package/dist/types/components/molecules/page-size-select/page-size-select.component.d.ts +50 -0
  979. package/dist/types/components/molecules/pagination/pagination.component.d.ts +7 -0
  980. package/dist/types/components/molecules/profile/profile.component.d.ts +20 -0
  981. package/dist/types/components/molecules/select/select.component.d.ts +139 -0
  982. package/dist/types/components/molecules/stepper/stepper.component.d.ts +21 -0
  983. package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +42 -0
  984. package/dist/types/components/molecules/table-footer/table-footer.component.d.ts +63 -0
  985. package/dist/types/components/molecules/table-header/table-header.component.d.ts +101 -0
  986. package/dist/types/components/molecules/table-row/table-row.component.d.ts +11 -0
  987. package/dist/types/components/molecules/toast/toast.component.d.ts +39 -0
  988. package/dist/types/components/organisms/drawer/drawer.component.d.ts +52 -0
  989. package/dist/types/components/organisms/modal/modal.component.d.ts +58 -0
  990. package/dist/types/components/organisms/navbar/navbar.component.d.ts +14 -0
  991. package/dist/types/components/organisms/table/table.component.d.ts +240 -0
  992. package/dist/types/components.d.ts +2788 -275
  993. package/dist/types/index.d.ts +2 -0
  994. package/dist/types/stencil-public-runtime.d.ts +91 -19
  995. package/dist/types/types/index.d.ts +2 -0
  996. package/dist/types/types/table.d.ts +27 -0
  997. package/dist/types/types/tailwind.d.ts +2 -0
  998. package/dist/types/utils/icons.d.ts +7 -0
  999. package/dist/types/utils/illustrations.d.ts +4 -0
  1000. package/dist/types/utils/index.d.ts +6 -0
  1001. package/dist/types/utils/localization.d.ts +2 -0
  1002. package/dist/types/utils/object-get-by-path.d.ts +1 -0
  1003. package/dist/types/utils/transformers.d.ts +2 -0
  1004. package/dist/workbox-5b279812.js +2 -0
  1005. package/dist/workbox-5b279812.js.map +1 -0
  1006. package/hydrate/index.d.ts +218 -0
  1007. package/hydrate/index.js +22266 -0
  1008. package/hydrate/package.json +6 -0
  1009. package/loader/index.d.ts +9 -0
  1010. package/loader/package.json +1 -0
  1011. package/package.json +28 -22
  1012. package/dist/build/p-0100c1a2.js +0 -2
  1013. package/dist/build/p-11d24001.entry.js +0 -1
  1014. package/dist/build/p-19d84fe7.entry.js +0 -1
  1015. package/dist/build/p-2120a0b7.entry.js +0 -1
  1016. package/dist/build/p-3b491ca2.entry.js +0 -1
  1017. package/dist/build/p-3f6d3736.entry.js +0 -1
  1018. package/dist/build/p-463f354c.entry.js +0 -1
  1019. package/dist/build/p-4a85b858.entry.js +0 -1
  1020. package/dist/build/p-5101f35f.entry.js +0 -1
  1021. package/dist/build/p-5438d70e.entry.js +0 -1
  1022. package/dist/build/p-63e5f5e1.entry.js +0 -1
  1023. package/dist/build/p-67fc89a6.entry.js +0 -1
  1024. package/dist/build/p-6e60b92a.entry.js +0 -1
  1025. package/dist/build/p-7784ee14.entry.js +0 -1
  1026. package/dist/build/p-864ac423.entry.js +0 -1
  1027. package/dist/build/p-94cef335.entry.js +0 -1
  1028. package/dist/build/p-a7086ffa.js +0 -1
  1029. package/dist/build/p-b68368f3.entry.js +0 -1
  1030. package/dist/build/p-c64e2313.entry.js +0 -1
  1031. package/dist/build/p-ccbddcbb.entry.js +0 -1
  1032. package/dist/build/p-d069673f.entry.js +0 -1
  1033. package/dist/build/p-f50c6e5b.entry.js +0 -1
  1034. package/dist/build/p-fb1e33eb.entry.js +0 -1
  1035. package/dist/build/p-ffeed7c6.entry.js +0 -1
  1036. package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +0 -23
  1037. package/dist/cjs/p-dropdown.cjs.entry.js +0 -141
  1038. package/dist/cjs/p-helper.cjs.entry.js +0 -19
  1039. package/dist/cjs/p-modal-backdrop_5.cjs.entry.js +0 -92
  1040. package/dist/cjs/p-pagination-item.cjs.entry.js +0 -23
  1041. package/dist/cjs/p-pagination.cjs.entry.js +0 -171
  1042. package/dist/cjs/p-segment-container.cjs.entry.js +0 -19
  1043. package/dist/cjs/p-segment-item.cjs.entry.js +0 -29
  1044. package/dist/cjs/popper-e0c4ed4c.js +0 -1790
  1045. package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.css +0 -7
  1046. package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.js +0 -15
  1047. package/dist/collection/components/molecules/modal/modal.component.js +0 -111
  1048. package/dist/collection/tailwind/grid.js +0 -26
  1049. package/dist/collection/utils/types.js +0 -1
  1050. package/dist/collection/utils/utils.js +0 -3
  1051. package/dist/components/modal-backdrop.component.js +0 -30
  1052. package/dist/components/p-modal-backdrop.js +0 -6
  1053. package/dist/components/popper.js +0 -1788
  1054. package/dist/esm/p-dropdown-menu-item.entry.js +0 -19
  1055. package/dist/esm/p-dropdown.entry.js +0 -137
  1056. package/dist/esm/p-helper.entry.js +0 -15
  1057. package/dist/esm/p-modal-backdrop_5.entry.js +0 -84
  1058. package/dist/esm/p-pagination-item.entry.js +0 -19
  1059. package/dist/esm/p-pagination.entry.js +0 -167
  1060. package/dist/esm/p-segment-container.entry.js +0 -15
  1061. package/dist/esm/p-segment-item.entry.js +0 -25
  1062. package/dist/esm/popper-41c6f9cd.js +0 -1788
  1063. package/dist/paperless/p-0100c1a2.js +0 -2
  1064. package/dist/paperless/p-11d24001.entry.js +0 -1
  1065. package/dist/paperless/p-19d84fe7.entry.js +0 -1
  1066. package/dist/paperless/p-2120a0b7.entry.js +0 -1
  1067. package/dist/paperless/p-3b491ca2.entry.js +0 -1
  1068. package/dist/paperless/p-3f6d3736.entry.js +0 -1
  1069. package/dist/paperless/p-463f354c.entry.js +0 -1
  1070. package/dist/paperless/p-4a85b858.entry.js +0 -1
  1071. package/dist/paperless/p-5101f35f.entry.js +0 -1
  1072. package/dist/paperless/p-5438d70e.entry.js +0 -1
  1073. package/dist/paperless/p-63e5f5e1.entry.js +0 -1
  1074. package/dist/paperless/p-67fc89a6.entry.js +0 -1
  1075. package/dist/paperless/p-6e60b92a.entry.js +0 -1
  1076. package/dist/paperless/p-7784ee14.entry.js +0 -1
  1077. package/dist/paperless/p-864ac423.entry.js +0 -1
  1078. package/dist/paperless/p-94cef335.entry.js +0 -1
  1079. package/dist/paperless/p-a7086ffa.js +0 -1
  1080. package/dist/paperless/p-b68368f3.entry.js +0 -1
  1081. package/dist/paperless/p-c64e2313.entry.js +0 -1
  1082. package/dist/paperless/p-ccbddcbb.entry.js +0 -1
  1083. package/dist/paperless/p-d069673f.entry.js +0 -1
  1084. package/dist/paperless/p-f50c6e5b.entry.js +0 -1
  1085. package/dist/paperless/p-fb1e33eb.entry.js +0 -1
  1086. package/dist/paperless/p-ffeed7c6.entry.js +0 -1
  1087. package/dist/tailwind/grid.js +0 -26
  1088. package/dist/types/components/atoms/modal-backdrop/modal-backdrop.component.d.ts +0 -3
  1089. package/dist/types/components/molecules/modal/modal.component.d.ts +0 -25
  1090. package/dist/types/utils/types.d.ts +0 -2
  1091. package/dist/types/utils/utils.d.ts +0 -1
@@ -0,0 +1,3198 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './icon.component.js';
3
+
4
+ function toInteger(dirtyNumber) {
5
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
6
+ return NaN;
7
+ }
8
+
9
+ var number = Number(dirtyNumber);
10
+
11
+ if (isNaN(number)) {
12
+ return number;
13
+ }
14
+
15
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
16
+ }
17
+
18
+ function requiredArgs(required, args) {
19
+ if (args.length < required) {
20
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
21
+ }
22
+ }
23
+
24
+ function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
25
+ /**
26
+ * @name toDate
27
+ * @category Common Helpers
28
+ * @summary Convert the given argument to an instance of Date.
29
+ *
30
+ * @description
31
+ * Convert the given argument to an instance of Date.
32
+ *
33
+ * If the argument is an instance of Date, the function returns its clone.
34
+ *
35
+ * If the argument is a number, it is treated as a timestamp.
36
+ *
37
+ * If the argument is none of the above, the function returns Invalid Date.
38
+ *
39
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
40
+ *
41
+ * @param {Date|Number} argument - the value to convert
42
+ * @returns {Date} the parsed date in the local time zone
43
+ * @throws {TypeError} 1 argument required
44
+ *
45
+ * @example
46
+ * // Clone the date:
47
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
48
+ * //=> Tue Feb 11 2014 11:30:30
49
+ *
50
+ * @example
51
+ * // Convert the timestamp to date:
52
+ * const result = toDate(1392098430000)
53
+ * //=> Tue Feb 11 2014 11:30:30
54
+ */
55
+
56
+ function toDate(argument) {
57
+ requiredArgs(1, arguments);
58
+ var argStr = Object.prototype.toString.call(argument); // Clone the date
59
+
60
+ if (argument instanceof Date || _typeof$1(argument) === 'object' && argStr === '[object Date]') {
61
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
62
+ return new Date(argument.getTime());
63
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
64
+ return new Date(argument);
65
+ } else {
66
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
67
+ // eslint-disable-next-line no-console
68
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
69
+
70
+ console.warn(new Error().stack);
71
+ }
72
+
73
+ return new Date(NaN);
74
+ }
75
+ }
76
+
77
+ /**
78
+ * @name addDays
79
+ * @category Day Helpers
80
+ * @summary Add the specified number of days to the given date.
81
+ *
82
+ * @description
83
+ * Add the specified number of days to the given date.
84
+ *
85
+ * @param {Date|Number} date - the date to be changed
86
+ * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
87
+ * @returns {Date} - the new date with the days added
88
+ * @throws {TypeError} - 2 arguments required
89
+ *
90
+ * @example
91
+ * // Add 10 days to 1 September 2014:
92
+ * const result = addDays(new Date(2014, 8, 1), 10)
93
+ * //=> Thu Sep 11 2014 00:00:00
94
+ */
95
+
96
+ function addDays(dirtyDate, dirtyAmount) {
97
+ requiredArgs(2, arguments);
98
+ var date = toDate(dirtyDate);
99
+ var amount = toInteger(dirtyAmount);
100
+
101
+ if (isNaN(amount)) {
102
+ return new Date(NaN);
103
+ }
104
+
105
+ if (!amount) {
106
+ // If 0 days, no-op to avoid changing times in the hour before end of DST
107
+ return date;
108
+ }
109
+
110
+ date.setDate(date.getDate() + amount);
111
+ return date;
112
+ }
113
+
114
+ /**
115
+ * @name addMonths
116
+ * @category Month Helpers
117
+ * @summary Add the specified number of months to the given date.
118
+ *
119
+ * @description
120
+ * Add the specified number of months to the given date.
121
+ *
122
+ * @param {Date|Number} date - the date to be changed
123
+ * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
124
+ * @returns {Date} the new date with the months added
125
+ * @throws {TypeError} 2 arguments required
126
+ *
127
+ * @example
128
+ * // Add 5 months to 1 September 2014:
129
+ * const result = addMonths(new Date(2014, 8, 1), 5)
130
+ * //=> Sun Feb 01 2015 00:00:00
131
+ */
132
+
133
+ function addMonths(dirtyDate, dirtyAmount) {
134
+ requiredArgs(2, arguments);
135
+ var date = toDate(dirtyDate);
136
+ var amount = toInteger(dirtyAmount);
137
+
138
+ if (isNaN(amount)) {
139
+ return new Date(NaN);
140
+ }
141
+
142
+ if (!amount) {
143
+ // If 0 months, no-op to avoid changing times in the hour before end of DST
144
+ return date;
145
+ }
146
+
147
+ var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for
148
+ // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
149
+ // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
150
+ // want except that dates will wrap around the end of a month, meaning that
151
+ // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
152
+ // we'll default to the end of the desired month by adding 1 to the desired
153
+ // month and using a date of 0 to back up one day to the end of the desired
154
+ // month.
155
+
156
+ var endOfDesiredMonth = new Date(date.getTime());
157
+ endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
158
+ var daysInMonth = endOfDesiredMonth.getDate();
159
+
160
+ if (dayOfMonth >= daysInMonth) {
161
+ // If we're already at the end of the month, then this is the correct date
162
+ // and we're done.
163
+ return endOfDesiredMonth;
164
+ } else {
165
+ // Otherwise, we now know that setting the original day-of-month value won't
166
+ // cause an overflow, so set the desired day-of-month. Note that we can't
167
+ // just set the date of `endOfDesiredMonth` because that object may have had
168
+ // its time changed in the unusual case where where a DST transition was on
169
+ // the last day of the month and its local time was in the hour skipped or
170
+ // repeated next to a DST transition. So we use `date` instead which is
171
+ // guaranteed to still have the original time.
172
+ date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
173
+ return date;
174
+ }
175
+ }
176
+
177
+ /**
178
+ * @name addMilliseconds
179
+ * @category Millisecond Helpers
180
+ * @summary Add the specified number of milliseconds to the given date.
181
+ *
182
+ * @description
183
+ * Add the specified number of milliseconds to the given date.
184
+ *
185
+ * @param {Date|Number} date - the date to be changed
186
+ * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
187
+ * @returns {Date} the new date with the milliseconds added
188
+ * @throws {TypeError} 2 arguments required
189
+ *
190
+ * @example
191
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
192
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
193
+ * //=> Thu Jul 10 2014 12:45:30.750
194
+ */
195
+
196
+ function addMilliseconds(dirtyDate, dirtyAmount) {
197
+ requiredArgs(2, arguments);
198
+ var timestamp = toDate(dirtyDate).getTime();
199
+ var amount = toInteger(dirtyAmount);
200
+ return new Date(timestamp + amount);
201
+ }
202
+
203
+ var defaultOptions = {};
204
+ function getDefaultOptions() {
205
+ return defaultOptions;
206
+ }
207
+
208
+ /**
209
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
210
+ * They usually appear for dates that denote time before the timezones were introduced
211
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
212
+ * and GMT+01:00:00 after that date)
213
+ *
214
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
215
+ * which would lead to incorrect calculations.
216
+ *
217
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
218
+ */
219
+ function getTimezoneOffsetInMilliseconds(date) {
220
+ var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
221
+ utcDate.setUTCFullYear(date.getFullYear());
222
+ return date.getTime() - utcDate.getTime();
223
+ }
224
+
225
+ /**
226
+ * @name startOfDay
227
+ * @category Day Helpers
228
+ * @summary Return the start of a day for the given date.
229
+ *
230
+ * @description
231
+ * Return the start of a day for the given date.
232
+ * The result will be in the local timezone.
233
+ *
234
+ * @param {Date|Number} date - the original date
235
+ * @returns {Date} the start of a day
236
+ * @throws {TypeError} 1 argument required
237
+ *
238
+ * @example
239
+ * // The start of a day for 2 September 2014 11:55:00:
240
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
241
+ * //=> Tue Sep 02 2014 00:00:00
242
+ */
243
+
244
+ function startOfDay(dirtyDate) {
245
+ requiredArgs(1, arguments);
246
+ var date = toDate(dirtyDate);
247
+ date.setHours(0, 0, 0, 0);
248
+ return date;
249
+ }
250
+
251
+ /**
252
+ * @name addYears
253
+ * @category Year Helpers
254
+ * @summary Add the specified number of years to the given date.
255
+ *
256
+ * @description
257
+ * Add the specified number of years to the given date.
258
+ *
259
+ * @param {Date|Number} date - the date to be changed
260
+ * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
261
+ * @returns {Date} the new date with the years added
262
+ * @throws {TypeError} 2 arguments required
263
+ *
264
+ * @example
265
+ * // Add 5 years to 1 September 2014:
266
+ * const result = addYears(new Date(2014, 8, 1), 5)
267
+ * //=> Sun Sep 01 2019 00:00:00
268
+ */
269
+
270
+ function addYears(dirtyDate, dirtyAmount) {
271
+ requiredArgs(2, arguments);
272
+ var amount = toInteger(dirtyAmount);
273
+ return addMonths(dirtyDate, amount * 12);
274
+ }
275
+
276
+ /**
277
+ * @name isSameDay
278
+ * @category Day Helpers
279
+ * @summary Are the given dates in the same day (and year and month)?
280
+ *
281
+ * @description
282
+ * Are the given dates in the same day (and year and month)?
283
+ *
284
+ * @param {Date|Number} dateLeft - the first date to check
285
+ * @param {Date|Number} dateRight - the second date to check
286
+ * @returns {Boolean} the dates are in the same day (and year and month)
287
+ * @throws {TypeError} 2 arguments required
288
+ *
289
+ * @example
290
+ * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
291
+ * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
292
+ * //=> true
293
+ *
294
+ * @example
295
+ * // Are 4 September and 4 October in the same day?
296
+ * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))
297
+ * //=> false
298
+ *
299
+ * @example
300
+ * // Are 4 September, 2014 and 4 September, 2015 in the same day?
301
+ * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))
302
+ * //=> false
303
+ */
304
+
305
+ function isSameDay(dirtyDateLeft, dirtyDateRight) {
306
+ requiredArgs(2, arguments);
307
+ var dateLeftStartOfDay = startOfDay(dirtyDateLeft);
308
+ var dateRightStartOfDay = startOfDay(dirtyDateRight);
309
+ return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
310
+ }
311
+
312
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
313
+ /**
314
+ * @name isDate
315
+ * @category Common Helpers
316
+ * @summary Is the given value a date?
317
+ *
318
+ * @description
319
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
320
+ *
321
+ * @param {*} value - the value to check
322
+ * @returns {boolean} true if the given value is a date
323
+ * @throws {TypeError} 1 arguments required
324
+ *
325
+ * @example
326
+ * // For a valid date:
327
+ * const result = isDate(new Date())
328
+ * //=> true
329
+ *
330
+ * @example
331
+ * // For an invalid date:
332
+ * const result = isDate(new Date(NaN))
333
+ * //=> true
334
+ *
335
+ * @example
336
+ * // For some value:
337
+ * const result = isDate('2014-02-31')
338
+ * //=> false
339
+ *
340
+ * @example
341
+ * // For an object:
342
+ * const result = isDate({})
343
+ * //=> false
344
+ */
345
+
346
+ function isDate(value) {
347
+ requiredArgs(1, arguments);
348
+ return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
349
+ }
350
+
351
+ /**
352
+ * @name isValid
353
+ * @category Common Helpers
354
+ * @summary Is the given date valid?
355
+ *
356
+ * @description
357
+ * Returns false if argument is Invalid Date and true otherwise.
358
+ * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
359
+ * Invalid Date is a Date, whose time value is NaN.
360
+ *
361
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
362
+ *
363
+ * @param {*} date - the date to check
364
+ * @returns {Boolean} the date is valid
365
+ * @throws {TypeError} 1 argument required
366
+ *
367
+ * @example
368
+ * // For the valid date:
369
+ * const result = isValid(new Date(2014, 1, 31))
370
+ * //=> true
371
+ *
372
+ * @example
373
+ * // For the value, convertable into a date:
374
+ * const result = isValid(1393804800000)
375
+ * //=> true
376
+ *
377
+ * @example
378
+ * // For the invalid date:
379
+ * const result = isValid(new Date(''))
380
+ * //=> false
381
+ */
382
+
383
+ function isValid(dirtyDate) {
384
+ requiredArgs(1, arguments);
385
+
386
+ if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
387
+ return false;
388
+ }
389
+
390
+ var date = toDate(dirtyDate);
391
+ return !isNaN(Number(date));
392
+ }
393
+
394
+ /**
395
+ * @name endOfMonth
396
+ * @category Month Helpers
397
+ * @summary Return the end of a month for the given date.
398
+ *
399
+ * @description
400
+ * Return the end of a month for the given date.
401
+ * The result will be in the local timezone.
402
+ *
403
+ * @param {Date|Number} date - the original date
404
+ * @returns {Date} the end of a month
405
+ * @throws {TypeError} 1 argument required
406
+ *
407
+ * @example
408
+ * // The end of a month for 2 September 2014 11:55:00:
409
+ * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
410
+ * //=> Tue Sep 30 2014 23:59:59.999
411
+ */
412
+
413
+ function endOfMonth(dirtyDate) {
414
+ requiredArgs(1, arguments);
415
+ var date = toDate(dirtyDate);
416
+ var month = date.getMonth();
417
+ date.setFullYear(date.getFullYear(), month + 1, 0);
418
+ date.setHours(23, 59, 59, 999);
419
+ return date;
420
+ }
421
+
422
+ /**
423
+ * @name startOfMonth
424
+ * @category Month Helpers
425
+ * @summary Return the start of a month for the given date.
426
+ *
427
+ * @description
428
+ * Return the start of a month for the given date.
429
+ * The result will be in the local timezone.
430
+ *
431
+ * @param {Date|Number} date - the original date
432
+ * @returns {Date} the start of a month
433
+ * @throws {TypeError} 1 argument required
434
+ *
435
+ * @example
436
+ * // The start of a month for 2 September 2014 11:55:00:
437
+ * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
438
+ * //=> Mon Sep 01 2014 00:00:00
439
+ */
440
+
441
+ function startOfMonth(dirtyDate) {
442
+ requiredArgs(1, arguments);
443
+ var date = toDate(dirtyDate);
444
+ date.setDate(1);
445
+ date.setHours(0, 0, 0, 0);
446
+ return date;
447
+ }
448
+
449
+ /**
450
+ * @name subMilliseconds
451
+ * @category Millisecond Helpers
452
+ * @summary Subtract the specified number of milliseconds from the given date.
453
+ *
454
+ * @description
455
+ * Subtract the specified number of milliseconds from the given date.
456
+ *
457
+ * @param {Date|Number} date - the date to be changed
458
+ * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
459
+ * @returns {Date} the new date with the milliseconds subtracted
460
+ * @throws {TypeError} 2 arguments required
461
+ *
462
+ * @example
463
+ * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
464
+ * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
465
+ * //=> Thu Jul 10 2014 12:45:29.250
466
+ */
467
+
468
+ function subMilliseconds(dirtyDate, dirtyAmount) {
469
+ requiredArgs(2, arguments);
470
+ var amount = toInteger(dirtyAmount);
471
+ return addMilliseconds(dirtyDate, -amount);
472
+ }
473
+
474
+ var MILLISECONDS_IN_DAY = 86400000;
475
+ function getUTCDayOfYear(dirtyDate) {
476
+ requiredArgs(1, arguments);
477
+ var date = toDate(dirtyDate);
478
+ var timestamp = date.getTime();
479
+ date.setUTCMonth(0, 1);
480
+ date.setUTCHours(0, 0, 0, 0);
481
+ var startOfYearTimestamp = date.getTime();
482
+ var difference = timestamp - startOfYearTimestamp;
483
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
484
+ }
485
+
486
+ function startOfUTCISOWeek(dirtyDate) {
487
+ requiredArgs(1, arguments);
488
+ var weekStartsOn = 1;
489
+ var date = toDate(dirtyDate);
490
+ var day = date.getUTCDay();
491
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
492
+ date.setUTCDate(date.getUTCDate() - diff);
493
+ date.setUTCHours(0, 0, 0, 0);
494
+ return date;
495
+ }
496
+
497
+ function getUTCISOWeekYear(dirtyDate) {
498
+ requiredArgs(1, arguments);
499
+ var date = toDate(dirtyDate);
500
+ var year = date.getUTCFullYear();
501
+ var fourthOfJanuaryOfNextYear = new Date(0);
502
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
503
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
504
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
505
+ var fourthOfJanuaryOfThisYear = new Date(0);
506
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
507
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
508
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
509
+
510
+ if (date.getTime() >= startOfNextYear.getTime()) {
511
+ return year + 1;
512
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
513
+ return year;
514
+ } else {
515
+ return year - 1;
516
+ }
517
+ }
518
+
519
+ function startOfUTCISOWeekYear(dirtyDate) {
520
+ requiredArgs(1, arguments);
521
+ var year = getUTCISOWeekYear(dirtyDate);
522
+ var fourthOfJanuary = new Date(0);
523
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
524
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
525
+ var date = startOfUTCISOWeek(fourthOfJanuary);
526
+ return date;
527
+ }
528
+
529
+ var MILLISECONDS_IN_WEEK$1 = 604800000;
530
+ function getUTCISOWeek(dirtyDate) {
531
+ requiredArgs(1, arguments);
532
+ var date = toDate(dirtyDate);
533
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer
534
+ // because the number of milliseconds in a week is not constant
535
+ // (e.g. it's different in the week of the daylight saving time clock shift)
536
+
537
+ return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
538
+ }
539
+
540
+ function startOfUTCWeek(dirtyDate, options) {
541
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
542
+
543
+ requiredArgs(1, arguments);
544
+ var defaultOptions = getDefaultOptions();
545
+ var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
546
+
547
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
548
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
549
+ }
550
+
551
+ var date = toDate(dirtyDate);
552
+ var day = date.getUTCDay();
553
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
554
+ date.setUTCDate(date.getUTCDate() - diff);
555
+ date.setUTCHours(0, 0, 0, 0);
556
+ return date;
557
+ }
558
+
559
+ function getUTCWeekYear(dirtyDate, options) {
560
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
561
+
562
+ requiredArgs(1, arguments);
563
+ var date = toDate(dirtyDate);
564
+ var year = date.getUTCFullYear();
565
+ var defaultOptions = getDefaultOptions();
566
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
567
+
568
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
569
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
570
+ }
571
+
572
+ var firstWeekOfNextYear = new Date(0);
573
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
574
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
575
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
576
+ var firstWeekOfThisYear = new Date(0);
577
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
578
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
579
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
580
+
581
+ if (date.getTime() >= startOfNextYear.getTime()) {
582
+ return year + 1;
583
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
584
+ return year;
585
+ } else {
586
+ return year - 1;
587
+ }
588
+ }
589
+
590
+ function startOfUTCWeekYear(dirtyDate, options) {
591
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
592
+
593
+ requiredArgs(1, arguments);
594
+ var defaultOptions = getDefaultOptions();
595
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
596
+ var year = getUTCWeekYear(dirtyDate, options);
597
+ var firstWeek = new Date(0);
598
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
599
+ firstWeek.setUTCHours(0, 0, 0, 0);
600
+ var date = startOfUTCWeek(firstWeek, options);
601
+ return date;
602
+ }
603
+
604
+ var MILLISECONDS_IN_WEEK = 604800000;
605
+ function getUTCWeek(dirtyDate, options) {
606
+ requiredArgs(1, arguments);
607
+ var date = toDate(dirtyDate);
608
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer
609
+ // because the number of milliseconds in a week is not constant
610
+ // (e.g. it's different in the week of the daylight saving time clock shift)
611
+
612
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
613
+ }
614
+
615
+ function addLeadingZeros(number, targetLength) {
616
+ var sign = number < 0 ? '-' : '';
617
+ var output = Math.abs(number).toString();
618
+
619
+ while (output.length < targetLength) {
620
+ output = '0' + output;
621
+ }
622
+
623
+ return sign + output;
624
+ }
625
+
626
+ /*
627
+ * | | Unit | | Unit |
628
+ * |-----|--------------------------------|-----|--------------------------------|
629
+ * | a | AM, PM | A* | |
630
+ * | d | Day of month | D | |
631
+ * | h | Hour [1-12] | H | Hour [0-23] |
632
+ * | m | Minute | M | Month |
633
+ * | s | Second | S | Fraction of second |
634
+ * | y | Year (abs) | Y | |
635
+ *
636
+ * Letters marked by * are not implemented but reserved by Unicode standard.
637
+ */
638
+
639
+ var formatters$1 = {
640
+ // Year
641
+ y: function y(date, token) {
642
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
643
+ // | Year | y | yy | yyy | yyyy | yyyyy |
644
+ // |----------|-------|----|-------|-------|-------|
645
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
646
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
647
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
648
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
649
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
650
+ var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
651
+
652
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
653
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
654
+ },
655
+ // Month
656
+ M: function M(date, token) {
657
+ var month = date.getUTCMonth();
658
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
659
+ },
660
+ // Day of the month
661
+ d: function d(date, token) {
662
+ return addLeadingZeros(date.getUTCDate(), token.length);
663
+ },
664
+ // AM or PM
665
+ a: function a(date, token) {
666
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
667
+
668
+ switch (token) {
669
+ case 'a':
670
+ case 'aa':
671
+ return dayPeriodEnumValue.toUpperCase();
672
+
673
+ case 'aaa':
674
+ return dayPeriodEnumValue;
675
+
676
+ case 'aaaaa':
677
+ return dayPeriodEnumValue[0];
678
+
679
+ case 'aaaa':
680
+ default:
681
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
682
+ }
683
+ },
684
+ // Hour [1-12]
685
+ h: function h(date, token) {
686
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
687
+ },
688
+ // Hour [0-23]
689
+ H: function H(date, token) {
690
+ return addLeadingZeros(date.getUTCHours(), token.length);
691
+ },
692
+ // Minute
693
+ m: function m(date, token) {
694
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
695
+ },
696
+ // Second
697
+ s: function s(date, token) {
698
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
699
+ },
700
+ // Fraction of second
701
+ S: function S(date, token) {
702
+ var numberOfDigits = token.length;
703
+ var milliseconds = date.getUTCMilliseconds();
704
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
705
+ return addLeadingZeros(fractionalSeconds, token.length);
706
+ }
707
+ };
708
+
709
+ var dayPeriodEnum = {
710
+ am: 'am',
711
+ pm: 'pm',
712
+ midnight: 'midnight',
713
+ noon: 'noon',
714
+ morning: 'morning',
715
+ afternoon: 'afternoon',
716
+ evening: 'evening',
717
+ night: 'night'
718
+ };
719
+
720
+ /*
721
+ * | | Unit | | Unit |
722
+ * |-----|--------------------------------|-----|--------------------------------|
723
+ * | a | AM, PM | A* | Milliseconds in day |
724
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
725
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
726
+ * | d | Day of month | D | Day of year |
727
+ * | e | Local day of week | E | Day of week |
728
+ * | f | | F* | Day of week in month |
729
+ * | g* | Modified Julian day | G | Era |
730
+ * | h | Hour [1-12] | H | Hour [0-23] |
731
+ * | i! | ISO day of week | I! | ISO week of year |
732
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
733
+ * | k | Hour [1-24] | K | Hour [0-11] |
734
+ * | l* | (deprecated) | L | Stand-alone month |
735
+ * | m | Minute | M | Month |
736
+ * | n | | N | |
737
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
738
+ * | p! | Long localized time | P! | Long localized date |
739
+ * | q | Stand-alone quarter | Q | Quarter |
740
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
741
+ * | s | Second | S | Fraction of second |
742
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
743
+ * | u | Extended year | U* | Cyclic year |
744
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
745
+ * | w | Local week of year | W* | Week of month |
746
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
747
+ * | y | Year (abs) | Y | Local week-numbering year |
748
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
749
+ *
750
+ * Letters marked by * are not implemented but reserved by Unicode standard.
751
+ *
752
+ * Letters marked by ! are non-standard, but implemented by date-fns:
753
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
754
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
755
+ * i.e. 7 for Sunday, 1 for Monday, etc.
756
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
757
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
758
+ * `R` is supposed to be used in conjunction with `I` and `i`
759
+ * for universal ISO week-numbering date, whereas
760
+ * `Y` is supposed to be used in conjunction with `w` and `e`
761
+ * for week-numbering date specific to the locale.
762
+ * - `P` is long localized date format
763
+ * - `p` is long localized time format
764
+ */
765
+ var formatters = {
766
+ // Era
767
+ G: function G(date, token, localize) {
768
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
769
+
770
+ switch (token) {
771
+ // AD, BC
772
+ case 'G':
773
+ case 'GG':
774
+ case 'GGG':
775
+ return localize.era(era, {
776
+ width: 'abbreviated'
777
+ });
778
+ // A, B
779
+
780
+ case 'GGGGG':
781
+ return localize.era(era, {
782
+ width: 'narrow'
783
+ });
784
+ // Anno Domini, Before Christ
785
+
786
+ case 'GGGG':
787
+ default:
788
+ return localize.era(era, {
789
+ width: 'wide'
790
+ });
791
+ }
792
+ },
793
+ // Year
794
+ y: function y(date, token, localize) {
795
+ // Ordinal number
796
+ if (token === 'yo') {
797
+ var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
798
+
799
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
800
+ return localize.ordinalNumber(year, {
801
+ unit: 'year'
802
+ });
803
+ }
804
+
805
+ return formatters$1.y(date, token);
806
+ },
807
+ // Local week-numbering year
808
+ Y: function Y(date, token, localize, options) {
809
+ var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)
810
+
811
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year
812
+
813
+ if (token === 'YY') {
814
+ var twoDigitYear = weekYear % 100;
815
+ return addLeadingZeros(twoDigitYear, 2);
816
+ } // Ordinal number
817
+
818
+
819
+ if (token === 'Yo') {
820
+ return localize.ordinalNumber(weekYear, {
821
+ unit: 'year'
822
+ });
823
+ } // Padding
824
+
825
+
826
+ return addLeadingZeros(weekYear, token.length);
827
+ },
828
+ // ISO week-numbering year
829
+ R: function R(date, token) {
830
+ var isoWeekYear = getUTCISOWeekYear(date); // Padding
831
+
832
+ return addLeadingZeros(isoWeekYear, token.length);
833
+ },
834
+ // Extended year. This is a single number designating the year of this calendar system.
835
+ // The main difference between `y` and `u` localizers are B.C. years:
836
+ // | Year | `y` | `u` |
837
+ // |------|-----|-----|
838
+ // | AC 1 | 1 | 1 |
839
+ // | BC 1 | 1 | 0 |
840
+ // | BC 2 | 2 | -1 |
841
+ // Also `yy` always returns the last two digits of a year,
842
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
843
+ u: function u(date, token) {
844
+ var year = date.getUTCFullYear();
845
+ return addLeadingZeros(year, token.length);
846
+ },
847
+ // Quarter
848
+ Q: function Q(date, token, localize) {
849
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
850
+
851
+ switch (token) {
852
+ // 1, 2, 3, 4
853
+ case 'Q':
854
+ return String(quarter);
855
+ // 01, 02, 03, 04
856
+
857
+ case 'QQ':
858
+ return addLeadingZeros(quarter, 2);
859
+ // 1st, 2nd, 3rd, 4th
860
+
861
+ case 'Qo':
862
+ return localize.ordinalNumber(quarter, {
863
+ unit: 'quarter'
864
+ });
865
+ // Q1, Q2, Q3, Q4
866
+
867
+ case 'QQQ':
868
+ return localize.quarter(quarter, {
869
+ width: 'abbreviated',
870
+ context: 'formatting'
871
+ });
872
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
873
+
874
+ case 'QQQQQ':
875
+ return localize.quarter(quarter, {
876
+ width: 'narrow',
877
+ context: 'formatting'
878
+ });
879
+ // 1st quarter, 2nd quarter, ...
880
+
881
+ case 'QQQQ':
882
+ default:
883
+ return localize.quarter(quarter, {
884
+ width: 'wide',
885
+ context: 'formatting'
886
+ });
887
+ }
888
+ },
889
+ // Stand-alone quarter
890
+ q: function q(date, token, localize) {
891
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
892
+
893
+ switch (token) {
894
+ // 1, 2, 3, 4
895
+ case 'q':
896
+ return String(quarter);
897
+ // 01, 02, 03, 04
898
+
899
+ case 'qq':
900
+ return addLeadingZeros(quarter, 2);
901
+ // 1st, 2nd, 3rd, 4th
902
+
903
+ case 'qo':
904
+ return localize.ordinalNumber(quarter, {
905
+ unit: 'quarter'
906
+ });
907
+ // Q1, Q2, Q3, Q4
908
+
909
+ case 'qqq':
910
+ return localize.quarter(quarter, {
911
+ width: 'abbreviated',
912
+ context: 'standalone'
913
+ });
914
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
915
+
916
+ case 'qqqqq':
917
+ return localize.quarter(quarter, {
918
+ width: 'narrow',
919
+ context: 'standalone'
920
+ });
921
+ // 1st quarter, 2nd quarter, ...
922
+
923
+ case 'qqqq':
924
+ default:
925
+ return localize.quarter(quarter, {
926
+ width: 'wide',
927
+ context: 'standalone'
928
+ });
929
+ }
930
+ },
931
+ // Month
932
+ M: function M(date, token, localize) {
933
+ var month = date.getUTCMonth();
934
+
935
+ switch (token) {
936
+ case 'M':
937
+ case 'MM':
938
+ return formatters$1.M(date, token);
939
+ // 1st, 2nd, ..., 12th
940
+
941
+ case 'Mo':
942
+ return localize.ordinalNumber(month + 1, {
943
+ unit: 'month'
944
+ });
945
+ // Jan, Feb, ..., Dec
946
+
947
+ case 'MMM':
948
+ return localize.month(month, {
949
+ width: 'abbreviated',
950
+ context: 'formatting'
951
+ });
952
+ // J, F, ..., D
953
+
954
+ case 'MMMMM':
955
+ return localize.month(month, {
956
+ width: 'narrow',
957
+ context: 'formatting'
958
+ });
959
+ // January, February, ..., December
960
+
961
+ case 'MMMM':
962
+ default:
963
+ return localize.month(month, {
964
+ width: 'wide',
965
+ context: 'formatting'
966
+ });
967
+ }
968
+ },
969
+ // Stand-alone month
970
+ L: function L(date, token, localize) {
971
+ var month = date.getUTCMonth();
972
+
973
+ switch (token) {
974
+ // 1, 2, ..., 12
975
+ case 'L':
976
+ return String(month + 1);
977
+ // 01, 02, ..., 12
978
+
979
+ case 'LL':
980
+ return addLeadingZeros(month + 1, 2);
981
+ // 1st, 2nd, ..., 12th
982
+
983
+ case 'Lo':
984
+ return localize.ordinalNumber(month + 1, {
985
+ unit: 'month'
986
+ });
987
+ // Jan, Feb, ..., Dec
988
+
989
+ case 'LLL':
990
+ return localize.month(month, {
991
+ width: 'abbreviated',
992
+ context: 'standalone'
993
+ });
994
+ // J, F, ..., D
995
+
996
+ case 'LLLLL':
997
+ return localize.month(month, {
998
+ width: 'narrow',
999
+ context: 'standalone'
1000
+ });
1001
+ // January, February, ..., December
1002
+
1003
+ case 'LLLL':
1004
+ default:
1005
+ return localize.month(month, {
1006
+ width: 'wide',
1007
+ context: 'standalone'
1008
+ });
1009
+ }
1010
+ },
1011
+ // Local week of year
1012
+ w: function w(date, token, localize, options) {
1013
+ var week = getUTCWeek(date, options);
1014
+
1015
+ if (token === 'wo') {
1016
+ return localize.ordinalNumber(week, {
1017
+ unit: 'week'
1018
+ });
1019
+ }
1020
+
1021
+ return addLeadingZeros(week, token.length);
1022
+ },
1023
+ // ISO week of year
1024
+ I: function I(date, token, localize) {
1025
+ var isoWeek = getUTCISOWeek(date);
1026
+
1027
+ if (token === 'Io') {
1028
+ return localize.ordinalNumber(isoWeek, {
1029
+ unit: 'week'
1030
+ });
1031
+ }
1032
+
1033
+ return addLeadingZeros(isoWeek, token.length);
1034
+ },
1035
+ // Day of the month
1036
+ d: function d(date, token, localize) {
1037
+ if (token === 'do') {
1038
+ return localize.ordinalNumber(date.getUTCDate(), {
1039
+ unit: 'date'
1040
+ });
1041
+ }
1042
+
1043
+ return formatters$1.d(date, token);
1044
+ },
1045
+ // Day of year
1046
+ D: function D(date, token, localize) {
1047
+ var dayOfYear = getUTCDayOfYear(date);
1048
+
1049
+ if (token === 'Do') {
1050
+ return localize.ordinalNumber(dayOfYear, {
1051
+ unit: 'dayOfYear'
1052
+ });
1053
+ }
1054
+
1055
+ return addLeadingZeros(dayOfYear, token.length);
1056
+ },
1057
+ // Day of week
1058
+ E: function E(date, token, localize) {
1059
+ var dayOfWeek = date.getUTCDay();
1060
+
1061
+ switch (token) {
1062
+ // Tue
1063
+ case 'E':
1064
+ case 'EE':
1065
+ case 'EEE':
1066
+ return localize.day(dayOfWeek, {
1067
+ width: 'abbreviated',
1068
+ context: 'formatting'
1069
+ });
1070
+ // T
1071
+
1072
+ case 'EEEEE':
1073
+ return localize.day(dayOfWeek, {
1074
+ width: 'narrow',
1075
+ context: 'formatting'
1076
+ });
1077
+ // Tu
1078
+
1079
+ case 'EEEEEE':
1080
+ return localize.day(dayOfWeek, {
1081
+ width: 'short',
1082
+ context: 'formatting'
1083
+ });
1084
+ // Tuesday
1085
+
1086
+ case 'EEEE':
1087
+ default:
1088
+ return localize.day(dayOfWeek, {
1089
+ width: 'wide',
1090
+ context: 'formatting'
1091
+ });
1092
+ }
1093
+ },
1094
+ // Local day of week
1095
+ e: function e(date, token, localize, options) {
1096
+ var dayOfWeek = date.getUTCDay();
1097
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1098
+
1099
+ switch (token) {
1100
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
1101
+ case 'e':
1102
+ return String(localDayOfWeek);
1103
+ // Padded numerical value
1104
+
1105
+ case 'ee':
1106
+ return addLeadingZeros(localDayOfWeek, 2);
1107
+ // 1st, 2nd, ..., 7th
1108
+
1109
+ case 'eo':
1110
+ return localize.ordinalNumber(localDayOfWeek, {
1111
+ unit: 'day'
1112
+ });
1113
+
1114
+ case 'eee':
1115
+ return localize.day(dayOfWeek, {
1116
+ width: 'abbreviated',
1117
+ context: 'formatting'
1118
+ });
1119
+ // T
1120
+
1121
+ case 'eeeee':
1122
+ return localize.day(dayOfWeek, {
1123
+ width: 'narrow',
1124
+ context: 'formatting'
1125
+ });
1126
+ // Tu
1127
+
1128
+ case 'eeeeee':
1129
+ return localize.day(dayOfWeek, {
1130
+ width: 'short',
1131
+ context: 'formatting'
1132
+ });
1133
+ // Tuesday
1134
+
1135
+ case 'eeee':
1136
+ default:
1137
+ return localize.day(dayOfWeek, {
1138
+ width: 'wide',
1139
+ context: 'formatting'
1140
+ });
1141
+ }
1142
+ },
1143
+ // Stand-alone local day of week
1144
+ c: function c(date, token, localize, options) {
1145
+ var dayOfWeek = date.getUTCDay();
1146
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1147
+
1148
+ switch (token) {
1149
+ // Numerical value (same as in `e`)
1150
+ case 'c':
1151
+ return String(localDayOfWeek);
1152
+ // Padded numerical value
1153
+
1154
+ case 'cc':
1155
+ return addLeadingZeros(localDayOfWeek, token.length);
1156
+ // 1st, 2nd, ..., 7th
1157
+
1158
+ case 'co':
1159
+ return localize.ordinalNumber(localDayOfWeek, {
1160
+ unit: 'day'
1161
+ });
1162
+
1163
+ case 'ccc':
1164
+ return localize.day(dayOfWeek, {
1165
+ width: 'abbreviated',
1166
+ context: 'standalone'
1167
+ });
1168
+ // T
1169
+
1170
+ case 'ccccc':
1171
+ return localize.day(dayOfWeek, {
1172
+ width: 'narrow',
1173
+ context: 'standalone'
1174
+ });
1175
+ // Tu
1176
+
1177
+ case 'cccccc':
1178
+ return localize.day(dayOfWeek, {
1179
+ width: 'short',
1180
+ context: 'standalone'
1181
+ });
1182
+ // Tuesday
1183
+
1184
+ case 'cccc':
1185
+ default:
1186
+ return localize.day(dayOfWeek, {
1187
+ width: 'wide',
1188
+ context: 'standalone'
1189
+ });
1190
+ }
1191
+ },
1192
+ // ISO day of week
1193
+ i: function i(date, token, localize) {
1194
+ var dayOfWeek = date.getUTCDay();
1195
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
1196
+
1197
+ switch (token) {
1198
+ // 2
1199
+ case 'i':
1200
+ return String(isoDayOfWeek);
1201
+ // 02
1202
+
1203
+ case 'ii':
1204
+ return addLeadingZeros(isoDayOfWeek, token.length);
1205
+ // 2nd
1206
+
1207
+ case 'io':
1208
+ return localize.ordinalNumber(isoDayOfWeek, {
1209
+ unit: 'day'
1210
+ });
1211
+ // Tue
1212
+
1213
+ case 'iii':
1214
+ return localize.day(dayOfWeek, {
1215
+ width: 'abbreviated',
1216
+ context: 'formatting'
1217
+ });
1218
+ // T
1219
+
1220
+ case 'iiiii':
1221
+ return localize.day(dayOfWeek, {
1222
+ width: 'narrow',
1223
+ context: 'formatting'
1224
+ });
1225
+ // Tu
1226
+
1227
+ case 'iiiiii':
1228
+ return localize.day(dayOfWeek, {
1229
+ width: 'short',
1230
+ context: 'formatting'
1231
+ });
1232
+ // Tuesday
1233
+
1234
+ case 'iiii':
1235
+ default:
1236
+ return localize.day(dayOfWeek, {
1237
+ width: 'wide',
1238
+ context: 'formatting'
1239
+ });
1240
+ }
1241
+ },
1242
+ // AM or PM
1243
+ a: function a(date, token, localize) {
1244
+ var hours = date.getUTCHours();
1245
+ var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
1246
+
1247
+ switch (token) {
1248
+ case 'a':
1249
+ case 'aa':
1250
+ return localize.dayPeriod(dayPeriodEnumValue, {
1251
+ width: 'abbreviated',
1252
+ context: 'formatting'
1253
+ });
1254
+
1255
+ case 'aaa':
1256
+ return localize.dayPeriod(dayPeriodEnumValue, {
1257
+ width: 'abbreviated',
1258
+ context: 'formatting'
1259
+ }).toLowerCase();
1260
+
1261
+ case 'aaaaa':
1262
+ return localize.dayPeriod(dayPeriodEnumValue, {
1263
+ width: 'narrow',
1264
+ context: 'formatting'
1265
+ });
1266
+
1267
+ case 'aaaa':
1268
+ default:
1269
+ return localize.dayPeriod(dayPeriodEnumValue, {
1270
+ width: 'wide',
1271
+ context: 'formatting'
1272
+ });
1273
+ }
1274
+ },
1275
+ // AM, PM, midnight, noon
1276
+ b: function b(date, token, localize) {
1277
+ var hours = date.getUTCHours();
1278
+ var dayPeriodEnumValue;
1279
+
1280
+ if (hours === 12) {
1281
+ dayPeriodEnumValue = dayPeriodEnum.noon;
1282
+ } else if (hours === 0) {
1283
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
1284
+ } else {
1285
+ dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
1286
+ }
1287
+
1288
+ switch (token) {
1289
+ case 'b':
1290
+ case 'bb':
1291
+ return localize.dayPeriod(dayPeriodEnumValue, {
1292
+ width: 'abbreviated',
1293
+ context: 'formatting'
1294
+ });
1295
+
1296
+ case 'bbb':
1297
+ return localize.dayPeriod(dayPeriodEnumValue, {
1298
+ width: 'abbreviated',
1299
+ context: 'formatting'
1300
+ }).toLowerCase();
1301
+
1302
+ case 'bbbbb':
1303
+ return localize.dayPeriod(dayPeriodEnumValue, {
1304
+ width: 'narrow',
1305
+ context: 'formatting'
1306
+ });
1307
+
1308
+ case 'bbbb':
1309
+ default:
1310
+ return localize.dayPeriod(dayPeriodEnumValue, {
1311
+ width: 'wide',
1312
+ context: 'formatting'
1313
+ });
1314
+ }
1315
+ },
1316
+ // in the morning, in the afternoon, in the evening, at night
1317
+ B: function B(date, token, localize) {
1318
+ var hours = date.getUTCHours();
1319
+ var dayPeriodEnumValue;
1320
+
1321
+ if (hours >= 17) {
1322
+ dayPeriodEnumValue = dayPeriodEnum.evening;
1323
+ } else if (hours >= 12) {
1324
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
1325
+ } else if (hours >= 4) {
1326
+ dayPeriodEnumValue = dayPeriodEnum.morning;
1327
+ } else {
1328
+ dayPeriodEnumValue = dayPeriodEnum.night;
1329
+ }
1330
+
1331
+ switch (token) {
1332
+ case 'B':
1333
+ case 'BB':
1334
+ case 'BBB':
1335
+ return localize.dayPeriod(dayPeriodEnumValue, {
1336
+ width: 'abbreviated',
1337
+ context: 'formatting'
1338
+ });
1339
+
1340
+ case 'BBBBB':
1341
+ return localize.dayPeriod(dayPeriodEnumValue, {
1342
+ width: 'narrow',
1343
+ context: 'formatting'
1344
+ });
1345
+
1346
+ case 'BBBB':
1347
+ default:
1348
+ return localize.dayPeriod(dayPeriodEnumValue, {
1349
+ width: 'wide',
1350
+ context: 'formatting'
1351
+ });
1352
+ }
1353
+ },
1354
+ // Hour [1-12]
1355
+ h: function h(date, token, localize) {
1356
+ if (token === 'ho') {
1357
+ var hours = date.getUTCHours() % 12;
1358
+ if (hours === 0) hours = 12;
1359
+ return localize.ordinalNumber(hours, {
1360
+ unit: 'hour'
1361
+ });
1362
+ }
1363
+
1364
+ return formatters$1.h(date, token);
1365
+ },
1366
+ // Hour [0-23]
1367
+ H: function H(date, token, localize) {
1368
+ if (token === 'Ho') {
1369
+ return localize.ordinalNumber(date.getUTCHours(), {
1370
+ unit: 'hour'
1371
+ });
1372
+ }
1373
+
1374
+ return formatters$1.H(date, token);
1375
+ },
1376
+ // Hour [0-11]
1377
+ K: function K(date, token, localize) {
1378
+ var hours = date.getUTCHours() % 12;
1379
+
1380
+ if (token === 'Ko') {
1381
+ return localize.ordinalNumber(hours, {
1382
+ unit: 'hour'
1383
+ });
1384
+ }
1385
+
1386
+ return addLeadingZeros(hours, token.length);
1387
+ },
1388
+ // Hour [1-24]
1389
+ k: function k(date, token, localize) {
1390
+ var hours = date.getUTCHours();
1391
+ if (hours === 0) hours = 24;
1392
+
1393
+ if (token === 'ko') {
1394
+ return localize.ordinalNumber(hours, {
1395
+ unit: 'hour'
1396
+ });
1397
+ }
1398
+
1399
+ return addLeadingZeros(hours, token.length);
1400
+ },
1401
+ // Minute
1402
+ m: function m(date, token, localize) {
1403
+ if (token === 'mo') {
1404
+ return localize.ordinalNumber(date.getUTCMinutes(), {
1405
+ unit: 'minute'
1406
+ });
1407
+ }
1408
+
1409
+ return formatters$1.m(date, token);
1410
+ },
1411
+ // Second
1412
+ s: function s(date, token, localize) {
1413
+ if (token === 'so') {
1414
+ return localize.ordinalNumber(date.getUTCSeconds(), {
1415
+ unit: 'second'
1416
+ });
1417
+ }
1418
+
1419
+ return formatters$1.s(date, token);
1420
+ },
1421
+ // Fraction of second
1422
+ S: function S(date, token) {
1423
+ return formatters$1.S(date, token);
1424
+ },
1425
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1426
+ X: function X(date, token, _localize, options) {
1427
+ var originalDate = options._originalDate || date;
1428
+ var timezoneOffset = originalDate.getTimezoneOffset();
1429
+
1430
+ if (timezoneOffset === 0) {
1431
+ return 'Z';
1432
+ }
1433
+
1434
+ switch (token) {
1435
+ // Hours and optional minutes
1436
+ case 'X':
1437
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1438
+ // Hours, minutes and optional seconds without `:` delimiter
1439
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1440
+ // so this token always has the same output as `XX`
1441
+
1442
+ case 'XXXX':
1443
+ case 'XX':
1444
+ // Hours and minutes without `:` delimiter
1445
+ return formatTimezone(timezoneOffset);
1446
+ // Hours, minutes and optional seconds with `:` delimiter
1447
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1448
+ // so this token always has the same output as `XXX`
1449
+
1450
+ case 'XXXXX':
1451
+ case 'XXX': // Hours and minutes with `:` delimiter
1452
+
1453
+ default:
1454
+ return formatTimezone(timezoneOffset, ':');
1455
+ }
1456
+ },
1457
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1458
+ x: function x(date, token, _localize, options) {
1459
+ var originalDate = options._originalDate || date;
1460
+ var timezoneOffset = originalDate.getTimezoneOffset();
1461
+
1462
+ switch (token) {
1463
+ // Hours and optional minutes
1464
+ case 'x':
1465
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1466
+ // Hours, minutes and optional seconds without `:` delimiter
1467
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1468
+ // so this token always has the same output as `xx`
1469
+
1470
+ case 'xxxx':
1471
+ case 'xx':
1472
+ // Hours and minutes without `:` delimiter
1473
+ return formatTimezone(timezoneOffset);
1474
+ // Hours, minutes and optional seconds with `:` delimiter
1475
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1476
+ // so this token always has the same output as `xxx`
1477
+
1478
+ case 'xxxxx':
1479
+ case 'xxx': // Hours and minutes with `:` delimiter
1480
+
1481
+ default:
1482
+ return formatTimezone(timezoneOffset, ':');
1483
+ }
1484
+ },
1485
+ // Timezone (GMT)
1486
+ O: function O(date, token, _localize, options) {
1487
+ var originalDate = options._originalDate || date;
1488
+ var timezoneOffset = originalDate.getTimezoneOffset();
1489
+
1490
+ switch (token) {
1491
+ // Short
1492
+ case 'O':
1493
+ case 'OO':
1494
+ case 'OOO':
1495
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1496
+ // Long
1497
+
1498
+ case 'OOOO':
1499
+ default:
1500
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1501
+ }
1502
+ },
1503
+ // Timezone (specific non-location)
1504
+ z: function z(date, token, _localize, options) {
1505
+ var originalDate = options._originalDate || date;
1506
+ var timezoneOffset = originalDate.getTimezoneOffset();
1507
+
1508
+ switch (token) {
1509
+ // Short
1510
+ case 'z':
1511
+ case 'zz':
1512
+ case 'zzz':
1513
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1514
+ // Long
1515
+
1516
+ case 'zzzz':
1517
+ default:
1518
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1519
+ }
1520
+ },
1521
+ // Seconds timestamp
1522
+ t: function t(date, token, _localize, options) {
1523
+ var originalDate = options._originalDate || date;
1524
+ var timestamp = Math.floor(originalDate.getTime() / 1000);
1525
+ return addLeadingZeros(timestamp, token.length);
1526
+ },
1527
+ // Milliseconds timestamp
1528
+ T: function T(date, token, _localize, options) {
1529
+ var originalDate = options._originalDate || date;
1530
+ var timestamp = originalDate.getTime();
1531
+ return addLeadingZeros(timestamp, token.length);
1532
+ }
1533
+ };
1534
+
1535
+ function formatTimezoneShort(offset, dirtyDelimiter) {
1536
+ var sign = offset > 0 ? '-' : '+';
1537
+ var absOffset = Math.abs(offset);
1538
+ var hours = Math.floor(absOffset / 60);
1539
+ var minutes = absOffset % 60;
1540
+
1541
+ if (minutes === 0) {
1542
+ return sign + String(hours);
1543
+ }
1544
+
1545
+ var delimiter = dirtyDelimiter || '';
1546
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1547
+ }
1548
+
1549
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
1550
+ if (offset % 60 === 0) {
1551
+ var sign = offset > 0 ? '-' : '+';
1552
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
1553
+ }
1554
+
1555
+ return formatTimezone(offset, dirtyDelimiter);
1556
+ }
1557
+
1558
+ function formatTimezone(offset, dirtyDelimiter) {
1559
+ var delimiter = dirtyDelimiter || '';
1560
+ var sign = offset > 0 ? '-' : '+';
1561
+ var absOffset = Math.abs(offset);
1562
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
1563
+ var minutes = addLeadingZeros(absOffset % 60, 2);
1564
+ return sign + hours + delimiter + minutes;
1565
+ }
1566
+
1567
+ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
1568
+ switch (pattern) {
1569
+ case 'P':
1570
+ return formatLong.date({
1571
+ width: 'short'
1572
+ });
1573
+
1574
+ case 'PP':
1575
+ return formatLong.date({
1576
+ width: 'medium'
1577
+ });
1578
+
1579
+ case 'PPP':
1580
+ return formatLong.date({
1581
+ width: 'long'
1582
+ });
1583
+
1584
+ case 'PPPP':
1585
+ default:
1586
+ return formatLong.date({
1587
+ width: 'full'
1588
+ });
1589
+ }
1590
+ };
1591
+
1592
+ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
1593
+ switch (pattern) {
1594
+ case 'p':
1595
+ return formatLong.time({
1596
+ width: 'short'
1597
+ });
1598
+
1599
+ case 'pp':
1600
+ return formatLong.time({
1601
+ width: 'medium'
1602
+ });
1603
+
1604
+ case 'ppp':
1605
+ return formatLong.time({
1606
+ width: 'long'
1607
+ });
1608
+
1609
+ case 'pppp':
1610
+ default:
1611
+ return formatLong.time({
1612
+ width: 'full'
1613
+ });
1614
+ }
1615
+ };
1616
+
1617
+ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
1618
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
1619
+ var datePattern = matchResult[1];
1620
+ var timePattern = matchResult[2];
1621
+
1622
+ if (!timePattern) {
1623
+ return dateLongFormatter(pattern, formatLong);
1624
+ }
1625
+
1626
+ var dateTimeFormat;
1627
+
1628
+ switch (datePattern) {
1629
+ case 'P':
1630
+ dateTimeFormat = formatLong.dateTime({
1631
+ width: 'short'
1632
+ });
1633
+ break;
1634
+
1635
+ case 'PP':
1636
+ dateTimeFormat = formatLong.dateTime({
1637
+ width: 'medium'
1638
+ });
1639
+ break;
1640
+
1641
+ case 'PPP':
1642
+ dateTimeFormat = formatLong.dateTime({
1643
+ width: 'long'
1644
+ });
1645
+ break;
1646
+
1647
+ case 'PPPP':
1648
+ default:
1649
+ dateTimeFormat = formatLong.dateTime({
1650
+ width: 'full'
1651
+ });
1652
+ break;
1653
+ }
1654
+
1655
+ return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
1656
+ };
1657
+
1658
+ var longFormatters = {
1659
+ p: timeLongFormatter,
1660
+ P: dateTimeLongFormatter
1661
+ };
1662
+
1663
+ var protectedDayOfYearTokens = ['D', 'DD'];
1664
+ var protectedWeekYearTokens = ['YY', 'YYYY'];
1665
+ function isProtectedDayOfYearToken(token) {
1666
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
1667
+ }
1668
+ function isProtectedWeekYearToken(token) {
1669
+ return protectedWeekYearTokens.indexOf(token) !== -1;
1670
+ }
1671
+ function throwProtectedError(token, format, input) {
1672
+ if (token === 'YYYY') {
1673
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1674
+ } else if (token === 'YY') {
1675
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1676
+ } else if (token === 'D') {
1677
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1678
+ } else if (token === 'DD') {
1679
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1680
+ }
1681
+ }
1682
+
1683
+ var formatDistanceLocale = {
1684
+ lessThanXSeconds: {
1685
+ one: 'less than a second',
1686
+ other: 'less than {{count}} seconds'
1687
+ },
1688
+ xSeconds: {
1689
+ one: '1 second',
1690
+ other: '{{count}} seconds'
1691
+ },
1692
+ halfAMinute: 'half a minute',
1693
+ lessThanXMinutes: {
1694
+ one: 'less than a minute',
1695
+ other: 'less than {{count}} minutes'
1696
+ },
1697
+ xMinutes: {
1698
+ one: '1 minute',
1699
+ other: '{{count}} minutes'
1700
+ },
1701
+ aboutXHours: {
1702
+ one: 'about 1 hour',
1703
+ other: 'about {{count}} hours'
1704
+ },
1705
+ xHours: {
1706
+ one: '1 hour',
1707
+ other: '{{count}} hours'
1708
+ },
1709
+ xDays: {
1710
+ one: '1 day',
1711
+ other: '{{count}} days'
1712
+ },
1713
+ aboutXWeeks: {
1714
+ one: 'about 1 week',
1715
+ other: 'about {{count}} weeks'
1716
+ },
1717
+ xWeeks: {
1718
+ one: '1 week',
1719
+ other: '{{count}} weeks'
1720
+ },
1721
+ aboutXMonths: {
1722
+ one: 'about 1 month',
1723
+ other: 'about {{count}} months'
1724
+ },
1725
+ xMonths: {
1726
+ one: '1 month',
1727
+ other: '{{count}} months'
1728
+ },
1729
+ aboutXYears: {
1730
+ one: 'about 1 year',
1731
+ other: 'about {{count}} years'
1732
+ },
1733
+ xYears: {
1734
+ one: '1 year',
1735
+ other: '{{count}} years'
1736
+ },
1737
+ overXYears: {
1738
+ one: 'over 1 year',
1739
+ other: 'over {{count}} years'
1740
+ },
1741
+ almostXYears: {
1742
+ one: 'almost 1 year',
1743
+ other: 'almost {{count}} years'
1744
+ }
1745
+ };
1746
+
1747
+ var formatDistance = function formatDistance(token, count, options) {
1748
+ var result;
1749
+ var tokenValue = formatDistanceLocale[token];
1750
+
1751
+ if (typeof tokenValue === 'string') {
1752
+ result = tokenValue;
1753
+ } else if (count === 1) {
1754
+ result = tokenValue.one;
1755
+ } else {
1756
+ result = tokenValue.other.replace('{{count}}', count.toString());
1757
+ }
1758
+
1759
+ if (options !== null && options !== void 0 && options.addSuffix) {
1760
+ if (options.comparison && options.comparison > 0) {
1761
+ return 'in ' + result;
1762
+ } else {
1763
+ return result + ' ago';
1764
+ }
1765
+ }
1766
+
1767
+ return result;
1768
+ };
1769
+
1770
+ function buildFormatLongFn(args) {
1771
+ return function () {
1772
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1773
+ // TODO: Remove String()
1774
+ var width = options.width ? String(options.width) : args.defaultWidth;
1775
+ var format = args.formats[width] || args.formats[args.defaultWidth];
1776
+ return format;
1777
+ };
1778
+ }
1779
+
1780
+ var dateFormats = {
1781
+ full: 'EEEE, MMMM do, y',
1782
+ long: 'MMMM do, y',
1783
+ medium: 'MMM d, y',
1784
+ short: 'MM/dd/yyyy'
1785
+ };
1786
+ var timeFormats = {
1787
+ full: 'h:mm:ss a zzzz',
1788
+ long: 'h:mm:ss a z',
1789
+ medium: 'h:mm:ss a',
1790
+ short: 'h:mm a'
1791
+ };
1792
+ var dateTimeFormats = {
1793
+ full: "{{date}} 'at' {{time}}",
1794
+ long: "{{date}} 'at' {{time}}",
1795
+ medium: '{{date}}, {{time}}',
1796
+ short: '{{date}}, {{time}}'
1797
+ };
1798
+ var formatLong = {
1799
+ date: buildFormatLongFn({
1800
+ formats: dateFormats,
1801
+ defaultWidth: 'full'
1802
+ }),
1803
+ time: buildFormatLongFn({
1804
+ formats: timeFormats,
1805
+ defaultWidth: 'full'
1806
+ }),
1807
+ dateTime: buildFormatLongFn({
1808
+ formats: dateTimeFormats,
1809
+ defaultWidth: 'full'
1810
+ })
1811
+ };
1812
+
1813
+ var formatRelativeLocale = {
1814
+ lastWeek: "'last' eeee 'at' p",
1815
+ yesterday: "'yesterday at' p",
1816
+ today: "'today at' p",
1817
+ tomorrow: "'tomorrow at' p",
1818
+ nextWeek: "eeee 'at' p",
1819
+ other: 'P'
1820
+ };
1821
+
1822
+ var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
1823
+ return formatRelativeLocale[token];
1824
+ };
1825
+
1826
+ function buildLocalizeFn(args) {
1827
+ return function (dirtyIndex, options) {
1828
+ var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
1829
+ var valuesArray;
1830
+
1831
+ if (context === 'formatting' && args.formattingValues) {
1832
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1833
+ var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
1834
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1835
+ } else {
1836
+ var _defaultWidth = args.defaultWidth;
1837
+
1838
+ var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
1839
+
1840
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
1841
+ }
1842
+
1843
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: 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!
1844
+
1845
+ return valuesArray[index];
1846
+ };
1847
+ }
1848
+
1849
+ var eraValues = {
1850
+ narrow: ['B', 'A'],
1851
+ abbreviated: ['BC', 'AD'],
1852
+ wide: ['Before Christ', 'Anno Domini']
1853
+ };
1854
+ var quarterValues = {
1855
+ narrow: ['1', '2', '3', '4'],
1856
+ abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
1857
+ wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
1858
+ }; // Note: in English, the names of days of the week and months are capitalized.
1859
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1860
+ // Generally, formatted dates should look like they are in the middle of a sentence,
1861
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
1862
+
1863
+ var monthValues = {
1864
+ narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
1865
+ abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
1866
+ wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
1867
+ };
1868
+ var dayValues = {
1869
+ narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
1870
+ short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
1871
+ abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
1872
+ wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
1873
+ };
1874
+ var dayPeriodValues = {
1875
+ narrow: {
1876
+ am: 'a',
1877
+ pm: 'p',
1878
+ midnight: 'mi',
1879
+ noon: 'n',
1880
+ morning: 'morning',
1881
+ afternoon: 'afternoon',
1882
+ evening: 'evening',
1883
+ night: 'night'
1884
+ },
1885
+ abbreviated: {
1886
+ am: 'AM',
1887
+ pm: 'PM',
1888
+ midnight: 'midnight',
1889
+ noon: 'noon',
1890
+ morning: 'morning',
1891
+ afternoon: 'afternoon',
1892
+ evening: 'evening',
1893
+ night: 'night'
1894
+ },
1895
+ wide: {
1896
+ am: 'a.m.',
1897
+ pm: 'p.m.',
1898
+ midnight: 'midnight',
1899
+ noon: 'noon',
1900
+ morning: 'morning',
1901
+ afternoon: 'afternoon',
1902
+ evening: 'evening',
1903
+ night: 'night'
1904
+ }
1905
+ };
1906
+ var formattingDayPeriodValues = {
1907
+ narrow: {
1908
+ am: 'a',
1909
+ pm: 'p',
1910
+ midnight: 'mi',
1911
+ noon: 'n',
1912
+ morning: 'in the morning',
1913
+ afternoon: 'in the afternoon',
1914
+ evening: 'in the evening',
1915
+ night: 'at night'
1916
+ },
1917
+ abbreviated: {
1918
+ am: 'AM',
1919
+ pm: 'PM',
1920
+ midnight: 'midnight',
1921
+ noon: 'noon',
1922
+ morning: 'in the morning',
1923
+ afternoon: 'in the afternoon',
1924
+ evening: 'in the evening',
1925
+ night: 'at night'
1926
+ },
1927
+ wide: {
1928
+ am: 'a.m.',
1929
+ pm: 'p.m.',
1930
+ midnight: 'midnight',
1931
+ noon: 'noon',
1932
+ morning: 'in the morning',
1933
+ afternoon: 'in the afternoon',
1934
+ evening: 'in the evening',
1935
+ night: 'at night'
1936
+ }
1937
+ };
1938
+
1939
+ var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
1940
+ var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
1941
+ // if they are different for different grammatical genders,
1942
+ // use `options.unit`.
1943
+ //
1944
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
1945
+ // 'day', 'hour', 'minute', 'second'.
1946
+
1947
+ var rem100 = number % 100;
1948
+
1949
+ if (rem100 > 20 || rem100 < 10) {
1950
+ switch (rem100 % 10) {
1951
+ case 1:
1952
+ return number + 'st';
1953
+
1954
+ case 2:
1955
+ return number + 'nd';
1956
+
1957
+ case 3:
1958
+ return number + 'rd';
1959
+ }
1960
+ }
1961
+
1962
+ return number + 'th';
1963
+ };
1964
+
1965
+ var localize = {
1966
+ ordinalNumber: ordinalNumber,
1967
+ era: buildLocalizeFn({
1968
+ values: eraValues,
1969
+ defaultWidth: 'wide'
1970
+ }),
1971
+ quarter: buildLocalizeFn({
1972
+ values: quarterValues,
1973
+ defaultWidth: 'wide',
1974
+ argumentCallback: function argumentCallback(quarter) {
1975
+ return quarter - 1;
1976
+ }
1977
+ }),
1978
+ month: buildLocalizeFn({
1979
+ values: monthValues,
1980
+ defaultWidth: 'wide'
1981
+ }),
1982
+ day: buildLocalizeFn({
1983
+ values: dayValues,
1984
+ defaultWidth: 'wide'
1985
+ }),
1986
+ dayPeriod: buildLocalizeFn({
1987
+ values: dayPeriodValues,
1988
+ defaultWidth: 'wide',
1989
+ formattingValues: formattingDayPeriodValues,
1990
+ defaultFormattingWidth: 'wide'
1991
+ })
1992
+ };
1993
+
1994
+ function buildMatchFn(args) {
1995
+ return function (string) {
1996
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1997
+ var width = options.width;
1998
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1999
+ var matchResult = string.match(matchPattern);
2000
+
2001
+ if (!matchResult) {
2002
+ return null;
2003
+ }
2004
+
2005
+ var matchedString = matchResult[0];
2006
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
2007
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
2008
+ return pattern.test(matchedString);
2009
+ }) : findKey(parsePatterns, function (pattern) {
2010
+ return pattern.test(matchedString);
2011
+ });
2012
+ var value;
2013
+ value = args.valueCallback ? args.valueCallback(key) : key;
2014
+ value = options.valueCallback ? options.valueCallback(value) : value;
2015
+ var rest = string.slice(matchedString.length);
2016
+ return {
2017
+ value: value,
2018
+ rest: rest
2019
+ };
2020
+ };
2021
+ }
2022
+
2023
+ function findKey(object, predicate) {
2024
+ for (var key in object) {
2025
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
2026
+ return key;
2027
+ }
2028
+ }
2029
+
2030
+ return undefined;
2031
+ }
2032
+
2033
+ function findIndex(array, predicate) {
2034
+ for (var key = 0; key < array.length; key++) {
2035
+ if (predicate(array[key])) {
2036
+ return key;
2037
+ }
2038
+ }
2039
+
2040
+ return undefined;
2041
+ }
2042
+
2043
+ function buildMatchPatternFn(args) {
2044
+ return function (string) {
2045
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2046
+ var matchResult = string.match(args.matchPattern);
2047
+ if (!matchResult) return null;
2048
+ var matchedString = matchResult[0];
2049
+ var parseResult = string.match(args.parsePattern);
2050
+ if (!parseResult) return null;
2051
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
2052
+ value = options.valueCallback ? options.valueCallback(value) : value;
2053
+ var rest = string.slice(matchedString.length);
2054
+ return {
2055
+ value: value,
2056
+ rest: rest
2057
+ };
2058
+ };
2059
+ }
2060
+
2061
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
2062
+ var parseOrdinalNumberPattern = /\d+/i;
2063
+ var matchEraPatterns = {
2064
+ narrow: /^(b|a)/i,
2065
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
2066
+ wide: /^(before christ|before common era|anno domini|common era)/i
2067
+ };
2068
+ var parseEraPatterns = {
2069
+ any: [/^b/i, /^(a|c)/i]
2070
+ };
2071
+ var matchQuarterPatterns = {
2072
+ narrow: /^[1234]/i,
2073
+ abbreviated: /^q[1234]/i,
2074
+ wide: /^[1234](th|st|nd|rd)? quarter/i
2075
+ };
2076
+ var parseQuarterPatterns = {
2077
+ any: [/1/i, /2/i, /3/i, /4/i]
2078
+ };
2079
+ var matchMonthPatterns = {
2080
+ narrow: /^[jfmasond]/i,
2081
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
2082
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
2083
+ };
2084
+ var parseMonthPatterns = {
2085
+ narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
2086
+ any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
2087
+ };
2088
+ var matchDayPatterns = {
2089
+ narrow: /^[smtwf]/i,
2090
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
2091
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
2092
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
2093
+ };
2094
+ var parseDayPatterns = {
2095
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
2096
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
2097
+ };
2098
+ var matchDayPeriodPatterns = {
2099
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
2100
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
2101
+ };
2102
+ var parseDayPeriodPatterns = {
2103
+ any: {
2104
+ am: /^a/i,
2105
+ pm: /^p/i,
2106
+ midnight: /^mi/i,
2107
+ noon: /^no/i,
2108
+ morning: /morning/i,
2109
+ afternoon: /afternoon/i,
2110
+ evening: /evening/i,
2111
+ night: /night/i
2112
+ }
2113
+ };
2114
+ var match = {
2115
+ ordinalNumber: buildMatchPatternFn({
2116
+ matchPattern: matchOrdinalNumberPattern,
2117
+ parsePattern: parseOrdinalNumberPattern,
2118
+ valueCallback: function valueCallback(value) {
2119
+ return parseInt(value, 10);
2120
+ }
2121
+ }),
2122
+ era: buildMatchFn({
2123
+ matchPatterns: matchEraPatterns,
2124
+ defaultMatchWidth: 'wide',
2125
+ parsePatterns: parseEraPatterns,
2126
+ defaultParseWidth: 'any'
2127
+ }),
2128
+ quarter: buildMatchFn({
2129
+ matchPatterns: matchQuarterPatterns,
2130
+ defaultMatchWidth: 'wide',
2131
+ parsePatterns: parseQuarterPatterns,
2132
+ defaultParseWidth: 'any',
2133
+ valueCallback: function valueCallback(index) {
2134
+ return index + 1;
2135
+ }
2136
+ }),
2137
+ month: buildMatchFn({
2138
+ matchPatterns: matchMonthPatterns,
2139
+ defaultMatchWidth: 'wide',
2140
+ parsePatterns: parseMonthPatterns,
2141
+ defaultParseWidth: 'any'
2142
+ }),
2143
+ day: buildMatchFn({
2144
+ matchPatterns: matchDayPatterns,
2145
+ defaultMatchWidth: 'wide',
2146
+ parsePatterns: parseDayPatterns,
2147
+ defaultParseWidth: 'any'
2148
+ }),
2149
+ dayPeriod: buildMatchFn({
2150
+ matchPatterns: matchDayPeriodPatterns,
2151
+ defaultMatchWidth: 'any',
2152
+ parsePatterns: parseDayPeriodPatterns,
2153
+ defaultParseWidth: 'any'
2154
+ })
2155
+ };
2156
+
2157
+ /**
2158
+ * @type {Locale}
2159
+ * @category Locales
2160
+ * @summary English locale (United States).
2161
+ * @language English
2162
+ * @iso-639-2 eng
2163
+ * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
2164
+ * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
2165
+ */
2166
+ var locale = {
2167
+ code: 'en-US',
2168
+ formatDistance: formatDistance,
2169
+ formatLong: formatLong,
2170
+ formatRelative: formatRelative,
2171
+ localize: localize,
2172
+ match: match,
2173
+ options: {
2174
+ weekStartsOn: 0
2175
+ /* Sunday */
2176
+ ,
2177
+ firstWeekContainsDate: 1
2178
+ }
2179
+ };
2180
+
2181
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
2182
+ // (one of the certain letters followed by `o`)
2183
+ // - (\w)\1* matches any sequences of the same letter
2184
+ // - '' matches two quote characters in a row
2185
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
2186
+ // except a single quote symbol, which ends the sequence.
2187
+ // Two quote characters do not end the sequence.
2188
+ // If there is no matching single quote
2189
+ // then the sequence will continue until the end of the string.
2190
+ // - . matches any single character unmatched by previous parts of the RegExps
2191
+
2192
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also
2193
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
2194
+
2195
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
2196
+ var escapedStringRegExp = /^'([^]*?)'?$/;
2197
+ var doubleQuoteRegExp = /''/g;
2198
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
2199
+ /**
2200
+ * @name format
2201
+ * @category Common Helpers
2202
+ * @summary Format the date.
2203
+ *
2204
+ * @description
2205
+ * Return the formatted date string in the given format. The result may vary by locale.
2206
+ *
2207
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
2208
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2209
+ *
2210
+ * The characters wrapped between two single quotes characters (') are escaped.
2211
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
2212
+ * (see the last example)
2213
+ *
2214
+ * Format of the string is based on Unicode Technical Standard #35:
2215
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
2216
+ * with a few additions (see note 7 below the table).
2217
+ *
2218
+ * Accepted patterns:
2219
+ * | Unit | Pattern | Result examples | Notes |
2220
+ * |---------------------------------|---------|-----------------------------------|-------|
2221
+ * | Era | G..GGG | AD, BC | |
2222
+ * | | GGGG | Anno Domini, Before Christ | 2 |
2223
+ * | | GGGGG | A, B | |
2224
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
2225
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
2226
+ * | | yy | 44, 01, 00, 17 | 5 |
2227
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
2228
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
2229
+ * | | yyyyy | ... | 3,5 |
2230
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
2231
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
2232
+ * | | YY | 44, 01, 00, 17 | 5,8 |
2233
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
2234
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
2235
+ * | | YYYYY | ... | 3,5 |
2236
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
2237
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
2238
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
2239
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
2240
+ * | | RRRRR | ... | 3,5,7 |
2241
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
2242
+ * | | uu | -43, 01, 1900, 2017 | 5 |
2243
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
2244
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
2245
+ * | | uuuuu | ... | 3,5 |
2246
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
2247
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
2248
+ * | | QQ | 01, 02, 03, 04 | |
2249
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
2250
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
2251
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
2252
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
2253
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
2254
+ * | | qq | 01, 02, 03, 04 | |
2255
+ * | | qqq | Q1, Q2, Q3, Q4 | |
2256
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
2257
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
2258
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
2259
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
2260
+ * | | MM | 01, 02, ..., 12 | |
2261
+ * | | MMM | Jan, Feb, ..., Dec | |
2262
+ * | | MMMM | January, February, ..., December | 2 |
2263
+ * | | MMMMM | J, F, ..., D | |
2264
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
2265
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
2266
+ * | | LL | 01, 02, ..., 12 | |
2267
+ * | | LLL | Jan, Feb, ..., Dec | |
2268
+ * | | LLLL | January, February, ..., December | 2 |
2269
+ * | | LLLLL | J, F, ..., D | |
2270
+ * | Local week of year | w | 1, 2, ..., 53 | |
2271
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
2272
+ * | | ww | 01, 02, ..., 53 | |
2273
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
2274
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
2275
+ * | | II | 01, 02, ..., 53 | 7 |
2276
+ * | Day of month | d | 1, 2, ..., 31 | |
2277
+ * | | do | 1st, 2nd, ..., 31st | 7 |
2278
+ * | | dd | 01, 02, ..., 31 | |
2279
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
2280
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
2281
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
2282
+ * | | DDD | 001, 002, ..., 365, 366 | |
2283
+ * | | DDDD | ... | 3 |
2284
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
2285
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
2286
+ * | | EEEEE | M, T, W, T, F, S, S | |
2287
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
2288
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
2289
+ * | | io | 1st, 2nd, ..., 7th | 7 |
2290
+ * | | ii | 01, 02, ..., 07 | 7 |
2291
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
2292
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
2293
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
2294
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
2295
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
2296
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
2297
+ * | | ee | 02, 03, ..., 01 | |
2298
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
2299
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
2300
+ * | | eeeee | M, T, W, T, F, S, S | |
2301
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
2302
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
2303
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
2304
+ * | | cc | 02, 03, ..., 01 | |
2305
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
2306
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
2307
+ * | | ccccc | M, T, W, T, F, S, S | |
2308
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
2309
+ * | AM, PM | a..aa | AM, PM | |
2310
+ * | | aaa | am, pm | |
2311
+ * | | aaaa | a.m., p.m. | 2 |
2312
+ * | | aaaaa | a, p | |
2313
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
2314
+ * | | bbb | am, pm, noon, midnight | |
2315
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
2316
+ * | | bbbbb | a, p, n, mi | |
2317
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
2318
+ * | | BBBB | at night, in the morning, ... | 2 |
2319
+ * | | BBBBB | at night, in the morning, ... | |
2320
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
2321
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
2322
+ * | | hh | 01, 02, ..., 11, 12 | |
2323
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
2324
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
2325
+ * | | HH | 00, 01, 02, ..., 23 | |
2326
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
2327
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
2328
+ * | | KK | 01, 02, ..., 11, 00 | |
2329
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
2330
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
2331
+ * | | kk | 24, 01, 02, ..., 23 | |
2332
+ * | Minute | m | 0, 1, ..., 59 | |
2333
+ * | | mo | 0th, 1st, ..., 59th | 7 |
2334
+ * | | mm | 00, 01, ..., 59 | |
2335
+ * | Second | s | 0, 1, ..., 59 | |
2336
+ * | | so | 0th, 1st, ..., 59th | 7 |
2337
+ * | | ss | 00, 01, ..., 59 | |
2338
+ * | Fraction of second | S | 0, 1, ..., 9 | |
2339
+ * | | SS | 00, 01, ..., 99 | |
2340
+ * | | SSS | 000, 001, ..., 999 | |
2341
+ * | | SSSS | ... | 3 |
2342
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
2343
+ * | | XX | -0800, +0530, Z | |
2344
+ * | | XXX | -08:00, +05:30, Z | |
2345
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
2346
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
2347
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
2348
+ * | | xx | -0800, +0530, +0000 | |
2349
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
2350
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
2351
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
2352
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
2353
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
2354
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
2355
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
2356
+ * | Seconds timestamp | t | 512969520 | 7 |
2357
+ * | | tt | ... | 3,7 |
2358
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
2359
+ * | | TT | ... | 3,7 |
2360
+ * | Long localized date | P | 04/29/1453 | 7 |
2361
+ * | | PP | Apr 29, 1453 | 7 |
2362
+ * | | PPP | April 29th, 1453 | 7 |
2363
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
2364
+ * | Long localized time | p | 12:00 AM | 7 |
2365
+ * | | pp | 12:00:00 AM | 7 |
2366
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
2367
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
2368
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
2369
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
2370
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
2371
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
2372
+ * Notes:
2373
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
2374
+ * are the same as "stand-alone" units, but are different in some languages.
2375
+ * "Formatting" units are declined according to the rules of the language
2376
+ * in the context of a date. "Stand-alone" units are always nominative singular:
2377
+ *
2378
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
2379
+ *
2380
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
2381
+ *
2382
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
2383
+ * the single quote characters (see below).
2384
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
2385
+ * the output will be the same as default pattern for this unit, usually
2386
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
2387
+ * are marked with "2" in the last column of the table.
2388
+ *
2389
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
2390
+ *
2391
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
2392
+ *
2393
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
2394
+ *
2395
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
2396
+ *
2397
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
2398
+ *
2399
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
2400
+ * The output will be padded with zeros to match the length of the pattern.
2401
+ *
2402
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
2403
+ *
2404
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
2405
+ * These tokens represent the shortest form of the quarter.
2406
+ *
2407
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
2408
+ *
2409
+ * | Year | `y` | `u` |
2410
+ * |------|-----|-----|
2411
+ * | AC 1 | 1 | 1 |
2412
+ * | BC 1 | 1 | 0 |
2413
+ * | BC 2 | 2 | -1 |
2414
+ *
2415
+ * Also `yy` always returns the last two digits of a year,
2416
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
2417
+ *
2418
+ * | Year | `yy` | `uu` |
2419
+ * |------|------|------|
2420
+ * | 1 | 01 | 01 |
2421
+ * | 14 | 14 | 14 |
2422
+ * | 376 | 76 | 376 |
2423
+ * | 1453 | 53 | 1453 |
2424
+ *
2425
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
2426
+ * except local week-numbering years are dependent on `options.weekStartsOn`
2427
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
2428
+ * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
2429
+ *
2430
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
2431
+ * so right now these tokens fall back to GMT timezones.
2432
+ *
2433
+ * 7. These patterns are not in the Unicode Technical Standard #35:
2434
+ * - `i`: ISO day of week
2435
+ * - `I`: ISO week of year
2436
+ * - `R`: ISO week-numbering year
2437
+ * - `t`: seconds timestamp
2438
+ * - `T`: milliseconds timestamp
2439
+ * - `o`: ordinal number modifier
2440
+ * - `P`: long localized date
2441
+ * - `p`: long localized time
2442
+ *
2443
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
2444
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2445
+ *
2446
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
2447
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2448
+ *
2449
+ * @param {Date|Number} date - the original date
2450
+ * @param {String} format - the string of tokens
2451
+ * @param {Object} [options] - an object with options.
2452
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
2453
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
2454
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
2455
+ * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
2456
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2457
+ * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
2458
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2459
+ * @returns {String} the formatted date string
2460
+ * @throws {TypeError} 2 arguments required
2461
+ * @throws {RangeError} `date` must not be Invalid Date
2462
+ * @throws {RangeError} `options.locale` must contain `localize` property
2463
+ * @throws {RangeError} `options.locale` must contain `formatLong` property
2464
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
2465
+ * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
2466
+ * @throws {RangeError} 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
2467
+ * @throws {RangeError} 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
2468
+ * @throws {RangeError} 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
2469
+ * @throws {RangeError} 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
2470
+ * @throws {RangeError} format string contains an unescaped latin alphabet character
2471
+ *
2472
+ * @example
2473
+ * // Represent 11 February 2014 in middle-endian format:
2474
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
2475
+ * //=> '02/11/2014'
2476
+ *
2477
+ * @example
2478
+ * // Represent 2 July 2014 in Esperanto:
2479
+ * import { eoLocale } from 'date-fns/locale/eo'
2480
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
2481
+ * locale: eoLocale
2482
+ * })
2483
+ * //=> '2-a de julio 2014'
2484
+ *
2485
+ * @example
2486
+ * // Escape string by single quote characters:
2487
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
2488
+ * //=> "3 o'clock"
2489
+ */
2490
+
2491
+ function format(dirtyDate, dirtyFormatStr, options) {
2492
+ var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
2493
+
2494
+ requiredArgs(2, arguments);
2495
+ var formatStr = String(dirtyFormatStr);
2496
+ var defaultOptions = getDefaultOptions();
2497
+ var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
2498
+ var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
2499
+
2500
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
2501
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
2502
+ }
2503
+
2504
+ var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
2505
+
2506
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
2507
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
2508
+ }
2509
+
2510
+ if (!locale$1.localize) {
2511
+ throw new RangeError('locale must contain localize property');
2512
+ }
2513
+
2514
+ if (!locale$1.formatLong) {
2515
+ throw new RangeError('locale must contain formatLong property');
2516
+ }
2517
+
2518
+ var originalDate = toDate(dirtyDate);
2519
+
2520
+ if (!isValid(originalDate)) {
2521
+ throw new RangeError('Invalid time value');
2522
+ } // Convert the date in system timezone to the same date in UTC+00:00 timezone.
2523
+ // This ensures that when UTC functions will be implemented, locales will be compatible with them.
2524
+ // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
2525
+
2526
+
2527
+ var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
2528
+ var utcDate = subMilliseconds(originalDate, timezoneOffset);
2529
+ var formatterOptions = {
2530
+ firstWeekContainsDate: firstWeekContainsDate,
2531
+ weekStartsOn: weekStartsOn,
2532
+ locale: locale$1,
2533
+ _originalDate: originalDate
2534
+ };
2535
+ var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
2536
+ var firstCharacter = substring[0];
2537
+
2538
+ if (firstCharacter === 'p' || firstCharacter === 'P') {
2539
+ var longFormatter = longFormatters[firstCharacter];
2540
+ return longFormatter(substring, locale$1.formatLong);
2541
+ }
2542
+
2543
+ return substring;
2544
+ }).join('').match(formattingTokensRegExp).map(function (substring) {
2545
+ // Replace two single quote characters with one single quote character
2546
+ if (substring === "''") {
2547
+ return "'";
2548
+ }
2549
+
2550
+ var firstCharacter = substring[0];
2551
+
2552
+ if (firstCharacter === "'") {
2553
+ return cleanEscapedString(substring);
2554
+ }
2555
+
2556
+ var formatter = formatters[firstCharacter];
2557
+
2558
+ if (formatter) {
2559
+ if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
2560
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2561
+ }
2562
+
2563
+ if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
2564
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2565
+ }
2566
+
2567
+ return formatter(utcDate, substring, locale$1.localize, formatterOptions);
2568
+ }
2569
+
2570
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
2571
+ throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
2572
+ }
2573
+
2574
+ return substring;
2575
+ }).join('');
2576
+ return result;
2577
+ }
2578
+
2579
+ function cleanEscapedString(input) {
2580
+ var matched = input.match(escapedStringRegExp);
2581
+
2582
+ if (!matched) {
2583
+ return input;
2584
+ }
2585
+
2586
+ return matched[1].replace(doubleQuoteRegExp, "'");
2587
+ }
2588
+
2589
+ /**
2590
+ * @name getDay
2591
+ * @category Weekday Helpers
2592
+ * @summary Get the day of the week of the given date.
2593
+ *
2594
+ * @description
2595
+ * Get the day of the week of the given date.
2596
+ *
2597
+ * @param {Date|Number} date - the given date
2598
+ * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday
2599
+ * @throws {TypeError} 1 argument required
2600
+ *
2601
+ * @example
2602
+ * // Which day of the week is 29 February 2012?
2603
+ * const result = getDay(new Date(2012, 1, 29))
2604
+ * //=> 3
2605
+ */
2606
+
2607
+ function getDay(dirtyDate) {
2608
+ requiredArgs(1, arguments);
2609
+ var date = toDate(dirtyDate);
2610
+ var day = date.getDay();
2611
+ return day;
2612
+ }
2613
+
2614
+ /**
2615
+ * @name getDaysInMonth
2616
+ * @category Month Helpers
2617
+ * @summary Get the number of days in a month of the given date.
2618
+ *
2619
+ * @description
2620
+ * Get the number of days in a month of the given date.
2621
+ *
2622
+ * @param {Date|Number} date - the given date
2623
+ * @returns {Number} the number of days in a month
2624
+ * @throws {TypeError} 1 argument required
2625
+ *
2626
+ * @example
2627
+ * // How many days are in February 2000?
2628
+ * const result = getDaysInMonth(new Date(2000, 1))
2629
+ * //=> 29
2630
+ */
2631
+
2632
+ function getDaysInMonth(dirtyDate) {
2633
+ requiredArgs(1, arguments);
2634
+ var date = toDate(dirtyDate);
2635
+ var year = date.getFullYear();
2636
+ var monthIndex = date.getMonth();
2637
+ var lastDayOfMonth = new Date(0);
2638
+ lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
2639
+ lastDayOfMonth.setHours(0, 0, 0, 0);
2640
+ return lastDayOfMonth.getDate();
2641
+ }
2642
+
2643
+ /**
2644
+ * @name getYear
2645
+ * @category Year Helpers
2646
+ * @summary Get the year of the given date.
2647
+ *
2648
+ * @description
2649
+ * Get the year of the given date.
2650
+ *
2651
+ * @param {Date|Number} date - the given date
2652
+ * @returns {Number} the year
2653
+ * @throws {TypeError} 1 argument required
2654
+ *
2655
+ * @example
2656
+ * // Which year is 2 July 2014?
2657
+ * const result = getYear(new Date(2014, 6, 2))
2658
+ * //=> 2014
2659
+ */
2660
+
2661
+ function getYear(dirtyDate) {
2662
+ requiredArgs(1, arguments);
2663
+ return toDate(dirtyDate).getFullYear();
2664
+ }
2665
+
2666
+ /**
2667
+ * @name isAfter
2668
+ * @category Common Helpers
2669
+ * @summary Is the first date after the second one?
2670
+ *
2671
+ * @description
2672
+ * Is the first date after the second one?
2673
+ *
2674
+ * @param {Date|Number} date - the date that should be after the other one to return true
2675
+ * @param {Date|Number} dateToCompare - the date to compare with
2676
+ * @returns {Boolean} the first date is after the second date
2677
+ * @throws {TypeError} 2 arguments required
2678
+ *
2679
+ * @example
2680
+ * // Is 10 July 1989 after 11 February 1987?
2681
+ * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
2682
+ * //=> true
2683
+ */
2684
+
2685
+ function isAfter(dirtyDate, dirtyDateToCompare) {
2686
+ requiredArgs(2, arguments);
2687
+ var date = toDate(dirtyDate);
2688
+ var dateToCompare = toDate(dirtyDateToCompare);
2689
+ return date.getTime() > dateToCompare.getTime();
2690
+ }
2691
+
2692
+ /**
2693
+ * @name isBefore
2694
+ * @category Common Helpers
2695
+ * @summary Is the first date before the second one?
2696
+ *
2697
+ * @description
2698
+ * Is the first date before the second one?
2699
+ *
2700
+ * @param {Date|Number} date - the date that should be before the other one to return true
2701
+ * @param {Date|Number} dateToCompare - the date to compare with
2702
+ * @returns {Boolean} the first date is before the second date
2703
+ * @throws {TypeError} 2 arguments required
2704
+ *
2705
+ * @example
2706
+ * // Is 10 July 1989 before 11 February 1987?
2707
+ * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
2708
+ * //=> false
2709
+ */
2710
+
2711
+ function isBefore(dirtyDate, dirtyDateToCompare) {
2712
+ requiredArgs(2, arguments);
2713
+ var date = toDate(dirtyDate);
2714
+ var dateToCompare = toDate(dirtyDateToCompare);
2715
+ return date.getTime() < dateToCompare.getTime();
2716
+ }
2717
+
2718
+ /**
2719
+ * @name isSameMonth
2720
+ * @category Month Helpers
2721
+ * @summary Are the given dates in the same month (and year)?
2722
+ *
2723
+ * @description
2724
+ * Are the given dates in the same month (and year)?
2725
+ *
2726
+ * @param {Date|Number} dateLeft - the first date to check
2727
+ * @param {Date|Number} dateRight - the second date to check
2728
+ * @returns {Boolean} the dates are in the same month (and year)
2729
+ * @throws {TypeError} 2 arguments required
2730
+ *
2731
+ * @example
2732
+ * // Are 2 September 2014 and 25 September 2014 in the same month?
2733
+ * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
2734
+ * //=> true
2735
+ *
2736
+ * @example
2737
+ * // Are 2 September 2014 and 25 September 2015 in the same month?
2738
+ * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
2739
+ * //=> false
2740
+ */
2741
+
2742
+ function isSameMonth(dirtyDateLeft, dirtyDateRight) {
2743
+ requiredArgs(2, arguments);
2744
+ var dateLeft = toDate(dirtyDateLeft);
2745
+ var dateRight = toDate(dirtyDateRight);
2746
+ return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();
2747
+ }
2748
+
2749
+ /**
2750
+ * @name isSameYear
2751
+ * @category Year Helpers
2752
+ * @summary Are the given dates in the same year?
2753
+ *
2754
+ * @description
2755
+ * Are the given dates in the same year?
2756
+ *
2757
+ * @param {Date|Number} dateLeft - the first date to check
2758
+ * @param {Date|Number} dateRight - the second date to check
2759
+ * @returns {Boolean} the dates are in the same year
2760
+ * @throws {TypeError} 2 arguments required
2761
+ *
2762
+ * @example
2763
+ * // Are 2 September 2014 and 25 September 2014 in the same year?
2764
+ * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))
2765
+ * //=> true
2766
+ */
2767
+
2768
+ function isSameYear(dirtyDateLeft, dirtyDateRight) {
2769
+ requiredArgs(2, arguments);
2770
+ var dateLeft = toDate(dirtyDateLeft);
2771
+ var dateRight = toDate(dirtyDateRight);
2772
+ return dateLeft.getFullYear() === dateRight.getFullYear();
2773
+ }
2774
+
2775
+ /**
2776
+ * @name setMonth
2777
+ * @category Month Helpers
2778
+ * @summary Set the month to the given date.
2779
+ *
2780
+ * @description
2781
+ * Set the month to the given date.
2782
+ *
2783
+ * @param {Date|Number} date - the date to be changed
2784
+ * @param {Number} month - the month of the new date
2785
+ * @returns {Date} the new date with the month set
2786
+ * @throws {TypeError} 2 arguments required
2787
+ *
2788
+ * @example
2789
+ * // Set February to 1 September 2014:
2790
+ * const result = setMonth(new Date(2014, 8, 1), 1)
2791
+ * //=> Sat Feb 01 2014 00:00:00
2792
+ */
2793
+
2794
+ function setMonth(dirtyDate, dirtyMonth) {
2795
+ requiredArgs(2, arguments);
2796
+ var date = toDate(dirtyDate);
2797
+ var month = toInteger(dirtyMonth);
2798
+ var year = date.getFullYear();
2799
+ var day = date.getDate();
2800
+ var dateWithDesiredMonth = new Date(0);
2801
+ dateWithDesiredMonth.setFullYear(year, month, 15);
2802
+ dateWithDesiredMonth.setHours(0, 0, 0, 0);
2803
+ var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month
2804
+ // if the original date was the last day of the longer month
2805
+
2806
+ date.setMonth(month, Math.min(day, daysInMonth));
2807
+ return date;
2808
+ }
2809
+
2810
+ /**
2811
+ * @name setDate
2812
+ * @category Day Helpers
2813
+ * @summary Set the day of the month to the given date.
2814
+ *
2815
+ * @description
2816
+ * Set the day of the month to the given date.
2817
+ *
2818
+ * @param {Date|Number} date - the date to be changed
2819
+ * @param {Number} dayOfMonth - the day of the month of the new date
2820
+ * @returns {Date} the new date with the day of the month set
2821
+ * @throws {TypeError} 2 arguments required
2822
+ *
2823
+ * @example
2824
+ * // Set the 30th day of the month to 1 September 2014:
2825
+ * const result = setDate(new Date(2014, 8, 1), 30)
2826
+ * //=> Tue Sep 30 2014 00:00:00
2827
+ */
2828
+
2829
+ function setDate(dirtyDate, dirtyDayOfMonth) {
2830
+ requiredArgs(2, arguments);
2831
+ var date = toDate(dirtyDate);
2832
+ var dayOfMonth = toInteger(dirtyDayOfMonth);
2833
+ date.setDate(dayOfMonth);
2834
+ return date;
2835
+ }
2836
+
2837
+ /**
2838
+ * @name setYear
2839
+ * @category Year Helpers
2840
+ * @summary Set the year to the given date.
2841
+ *
2842
+ * @description
2843
+ * Set the year to the given date.
2844
+ *
2845
+ * @param {Date|Number} date - the date to be changed
2846
+ * @param {Number} year - the year of the new date
2847
+ * @returns {Date} the new date with the year set
2848
+ * @throws {TypeError} 2 arguments required
2849
+ *
2850
+ * @example
2851
+ * // Set year 2013 to 1 September 2014:
2852
+ * const result = setYear(new Date(2014, 8, 1), 2013)
2853
+ * //=> Sun Sep 01 2013 00:00:00
2854
+ */
2855
+
2856
+ function setYear(dirtyDate, dirtyYear) {
2857
+ requiredArgs(2, arguments);
2858
+ var date = toDate(dirtyDate);
2859
+ var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date
2860
+
2861
+ if (isNaN(date.getTime())) {
2862
+ return new Date(NaN);
2863
+ }
2864
+
2865
+ date.setFullYear(year);
2866
+ return date;
2867
+ }
2868
+
2869
+ const calendarComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.relative{position:relative!important}.col-start-1{grid-column-start:1!important}.col-start-2{grid-column-start:2!important}.col-start-3{grid-column-start:3!important}.col-start-4{grid-column-start:4!important}.col-start-5{grid-column-start:5!important}.col-start-6{grid-column-start:6!important}.col-start-7{grid-column-start:7!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.block{display:block!important}.flex{display:flex!important}.grid{display:grid!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-auto{height:auto!important}.h-full{height:100%!important}.w-6{width:1.5rem!important}.w-full{width:100%!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.self-center{align-self:center!important}.justify-self-center{justify-self:center!important}.overflow-y-auto{overflow-y:auto!important}.rounded{border-radius:.25rem!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border{border-width:1px!important}.border-l-0{border-left-width:0!important}.border-r-0{border-right-width:0!important}.border-solid{border-style:solid!important}.border-indigo-light{--tw-border-opacity:1!important;border-color:rgb(241 246 255/var(--tw-border-opacity))!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.font-semibold{font-weight:600!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-negative{--tw-text-opacity:1!important}.text-negative{color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative,.text-negative-light{--tw-text-opacity:1!important}.text-negative-light{color:rgb(255 204 211/var(--tw-text-opacity))!important}.text-storm{color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm,.text-storm-medium{--tw-text-opacity:1!important}.text-storm-medium{color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-40{opacity:.4!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}.h-\\[12rem\\]{height:12rem!important}.min-h-\\[12rem\\]{min-height:12rem!important}.w-\\[14rem\\]{width:14rem!important}.text-indigo,.text-storm{--tw-text-opacity:1!important}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:.5rem;width:14rem}:host .view-day,:host .view-month,:host .view-year{display:flex;flex-direction:column;gap:.5rem;height:12rem;width:100%}:host .header{align-items:center;display:flex;font-size:1rem;gap:.25rem;justify-content:space-between;line-height:1.5rem;width:100%}:host .header span{--tw-text-opacity:1;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;height:2rem;padding-left:.5rem;padding-right:.5rem}:host .header span.disabled{cursor:default}:host .header span:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header span.year{font-weight:600}:host .header .nav{--tw-text-opacity:1;align-items:center;border-radius:100%;color:rgb(82 138 250/var(--tw-text-opacity));cursor:pointer;display:flex;height:1.5rem;justify-content:center;position:relative;text-decoration-line:none;transition-duration:.2s;width:1.5rem}:host .header .nav:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header .nav.disabled{opacity:0}:host .view-day{height:auto;min-height:12rem}:host .view-day .dates{display:grid;gap:.25rem;grid-template-columns:repeat(7,1fr)}:host .view-day .dates>span{--tw-text-opacity:1;align-self:center;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.75rem;font-weight:600;justify-self:center;line-height:1rem;text-align:center;width:1.5rem}:host .view-day .dates>time{--tw-text-opacity:1;align-items:center;align-self:center;border:1px solid transparent;border-radius:100%;box-sizing:border-box;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:1.5rem;justify-content:center;justify-self:center;line-height:1.25rem;transition-duration:.2s;width:1.5rem}:host .view-day .dates>time.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-day .dates>time.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-day .dates>time.disabled,:host .view-day .dates>time.other-month{cursor:default;opacity:.4}:host .view-day .dates>time.disabled{text-decoration-line:line-through}:host .view-day .dates>time:hover:not(.disabled):not(.active):not(.other-month){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(81 83 107/var(--tw-text-opacity))}:host .view-month .items,:host .view-year .items{align-items:center;display:grid;gap:.25rem;grid-template-columns:repeat(3,1fr);height:100%;overflow-y:auto;position:relative;width:100%}:host .view-month .items>div,:host .view-year .items>div{--tw-text-opacity:1;align-items:center;border:1px solid transparent;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:2rem;justify-content:center;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem}:host .view-month .items>div.current,:host .view-year .items>div.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-month .items>div.active,:host .view-year .items>div.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-month .items>div.disabled,:host .view-year .items>div.disabled{cursor:default;opacity:.4;text-decoration-line:line-through}:host .view-month .items>div:hover:not(.disabled):not(.active),:host .view-year .items>div:hover:not(.disabled):not(.active){--tw-bg-opacity:1;background-color:rgb(247 250 252/var(--tw-bg-opacity))}:host .view-month .items{grid-template-columns:repeat(2,1fr)}:host .view-year .header{justify-content:center}:host(.variant-default){--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.variant-embedded){padding:0}.-rotate-0,.-rotate-135,.-rotate-180,.-rotate-225,.-rotate-25,.-rotate-270,.-rotate-315,.-rotate-45,.-rotate-90,.rotate-0,.rotate-135,.rotate-180,.rotate-225,.rotate-25,.rotate-270,.rotate-315,.rotate-45,.rotate-90,.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-lg,.text-xl{line-height:1.75rem!important}.hover\\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";
2870
+
2871
+ const Calendar = /*@__PURE__*/ proxyCustomElement(class Calendar extends HTMLElement {
2872
+ constructor() {
2873
+ super();
2874
+ this.__registerHost();
2875
+ this.__attachShadow();
2876
+ this.valueChange = createEvent(this, "valueChange", 7);
2877
+ this._today = new Date();
2878
+ this._weekDays = Array.from(Array(7).keys());
2879
+ this.variant = 'default';
2880
+ this.value = undefined;
2881
+ this.preselectToday = false;
2882
+ this.disabledDates = undefined;
2883
+ this.minDate = new Date(1970, 0, 1);
2884
+ this.maxDate = this._getAutomaticMax();
2885
+ this.disableWeekends = false;
2886
+ this.mode = 'day';
2887
+ this._view = this.mode;
2888
+ this._viewDate = this._today;
2889
+ this._value = undefined;
2890
+ this._minDate = undefined;
2891
+ this._maxDate = undefined;
2892
+ this._disabledDates = [];
2893
+ }
2894
+ componentWillLoad() {
2895
+ if (this.disabledDates) {
2896
+ this._parseDisabledDates(this.disabledDates);
2897
+ }
2898
+ if (this.minDate) {
2899
+ this._parseMinDate(this.minDate);
2900
+ }
2901
+ if (this.maxDate) {
2902
+ this._parseMaxDate(this.maxDate);
2903
+ }
2904
+ this._parseValue(this.value);
2905
+ if (this._value) {
2906
+ this._viewDate = this._value;
2907
+ }
2908
+ }
2909
+ componentDidRender() {
2910
+ if (this._view === 'year') {
2911
+ this._scrollYearIntoView();
2912
+ }
2913
+ }
2914
+ _parseValue(value) {
2915
+ if (!value && this.preselectToday) {
2916
+ value = new Date();
2917
+ }
2918
+ if (typeof value === 'string') {
2919
+ value = new Date(value);
2920
+ }
2921
+ this._setValue(value);
2922
+ }
2923
+ _parseMinDate(minDate) {
2924
+ if (typeof minDate === 'string') {
2925
+ minDate = new Date(minDate);
2926
+ }
2927
+ if (!isValid(minDate)) {
2928
+ return;
2929
+ }
2930
+ this._minDate = minDate;
2931
+ }
2932
+ _parseMaxDate(maxDate) {
2933
+ if (typeof maxDate === 'string') {
2934
+ maxDate = new Date(maxDate);
2935
+ }
2936
+ if (!isValid(maxDate)) {
2937
+ return;
2938
+ }
2939
+ this._maxDate = maxDate;
2940
+ }
2941
+ _parseDisabledDates(disabledDates) {
2942
+ if (typeof disabledDates === 'string') {
2943
+ disabledDates = JSON.parse(disabledDates);
2944
+ }
2945
+ if (!disabledDates || !Array.isArray(disabledDates)) {
2946
+ return;
2947
+ }
2948
+ // normalize all to date
2949
+ this._disabledDates = disabledDates
2950
+ .map((date) => {
2951
+ if (typeof date === 'string') {
2952
+ return new Date(date);
2953
+ }
2954
+ return date;
2955
+ })
2956
+ .filter((date) => isValid(date));
2957
+ }
2958
+ render() {
2959
+ return (h(Host, { class: `p-calendar variant-${this.variant}` }, this._getView()));
2960
+ }
2961
+ _getView() {
2962
+ if (this._view === 'year') {
2963
+ return this._getYearView();
2964
+ }
2965
+ if (this._view === 'month') {
2966
+ return this._getMonthView();
2967
+ }
2968
+ return this._getDayView();
2969
+ }
2970
+ /* With this, we shall hack the system in ways no one would ever have thought.
2971
+ <div class="col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7"></div>
2972
+ */
2973
+ _getDayView() {
2974
+ const daysInMonth = this._generateDaysInMonth();
2975
+ return (h("div", { class: "view-day" }, h("div", { class: "header" }, h("div", { class: `nav ${!this._canSetAmount('month', -1) && 'disabled'}`, onClick: () => this._changeMonth(-1) }, h("p-icon", { variant: "chevron", rotate: 90 })), h("div", null, h("span", { onClick: () => this._changeView('month'), class: !this._canChangeView('month') && 'disabled' }, format(this._viewDate, 'MMMM')), h("span", { onClick: () => this._changeView('year'), class: `year ${!this._canChangeView('year') && 'disabled'}` }, getYear(this._viewDate))), h("div", { class: `nav ${!this._canSetAmount('month', 1) && 'disabled'}`, onClick: () => this._changeMonth(1) }, h("p-icon", { variant: "chevron", rotate: -90 }))), h("div", { class: "dates" }, this._weekDays.map((weekday) => (h("span", null, format(addDays(new Date(2022, 7, 1), weekday), 'eee')))), daysInMonth.map((day) => {
2976
+ return (h("time", { class: `day ${day.active && 'active'} ${day.disabled && 'disabled'} ${day.current && 'current'} ${day.offset !== false &&
2977
+ `col-start-${day.offset}`}`, onClick: () => this._setValue(day.date) }, day.day));
2978
+ }))));
2979
+ }
2980
+ _getMonthView() {
2981
+ const months = this._generateMonths();
2982
+ return (h("div", { class: "view-month" }, h("div", { class: "header" }, h("div", { class: `nav ${!this._canSetAmount('year', -1) && 'disabled'}`, onClick: () => this._changeYear(-1) }, h("p-icon", { variant: "chevron", rotate: 90 })), h("div", null, h("span", { onClick: () => this._changeView('year'), class: `year ${!this._canChangeView('year') && 'disabled'}` }, getYear(this._viewDate))), h("div", { class: `nav ${!this._canSetAmount('year', 1) && 'disabled'}`, onClick: () => this._changeYear(1) }, h("p-icon", { variant: "chevron", rotate: -90 }))), h("div", { class: "items" }, months.map((month) => (h("div", { onClick: () => this._setMonth(month.month), class: `month ${month.active && 'active'} ${month.disabled && 'disabled'} ${month.current && 'current'}` }, format(setMonth(new Date(), month.month), 'MMMM')))))));
2983
+ }
2984
+ _getYearView() {
2985
+ const years = this._generateYears();
2986
+ return (h("div", { class: "view-year" }, h("div", { class: "header" }, h("div", null, h("span", { class: "year disabled" }, years === null || years === void 0 ? void 0 :
2987
+ years[0].year, " - ", years === null || years === void 0 ? void 0 :
2988
+ years[years.length - 1].year))), h("div", { class: "items" }, years.map((year) => (h("div", { onClick: () => this._setYear(year.year), class: `year ${year.active && 'active'} ${year.current && 'current'}` }, year.year))))));
2989
+ }
2990
+ _setYear(year) {
2991
+ const date = setYear(this._viewDate, year);
2992
+ if (this.mode === 'year') {
2993
+ return this._setValue(setMonth(setDate(date, 1), 0));
2994
+ }
2995
+ this._viewDate = setYear(this._viewDate, year);
2996
+ this._view = 'month';
2997
+ }
2998
+ _setMonth(month) {
2999
+ const date = setMonth(this._viewDate, month);
3000
+ if (this.mode === 'month') {
3001
+ return this._setValue(setDate(date, 1));
3002
+ }
3003
+ this._viewDate = date;
3004
+ this._view = 'day';
3005
+ }
3006
+ _changeMonth(amount = 1) {
3007
+ const allowed = this._canSetAmount('month', amount);
3008
+ if (!allowed) {
3009
+ return;
3010
+ }
3011
+ const newDate = addMonths(this._viewDate, amount);
3012
+ this._viewDate = newDate;
3013
+ }
3014
+ _changeYear(amount = 1) {
3015
+ const allowed = this._canSetAmount('year', amount);
3016
+ if (!allowed) {
3017
+ return;
3018
+ }
3019
+ let newDate = addYears(this._viewDate, amount);
3020
+ this._viewDate = newDate;
3021
+ }
3022
+ _setValue(value) {
3023
+ if (value === null) {
3024
+ this._value = null;
3025
+ this.valueChange.emit(null);
3026
+ return;
3027
+ }
3028
+ if (!isValid(value)) {
3029
+ return;
3030
+ }
3031
+ if (this._isDisabledDay(value)) {
3032
+ return;
3033
+ }
3034
+ value = startOfDay(value);
3035
+ const isSameValue = isSameDay(value, this._value);
3036
+ if (isSameValue) {
3037
+ return;
3038
+ }
3039
+ this._value = value;
3040
+ this.valueChange.emit(value);
3041
+ }
3042
+ _generateDaysInMonth() {
3043
+ const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());
3044
+ return days.map((day) => {
3045
+ day = day + 1;
3046
+ const date = setDate(this._viewDate, day);
3047
+ const dayOfWeek = getDay(date);
3048
+ return {
3049
+ day,
3050
+ date,
3051
+ offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,
3052
+ current: isSameDay(date, this._today),
3053
+ active: isSameDay(date, this._value),
3054
+ disabled: this._isDisabledDay(date),
3055
+ };
3056
+ });
3057
+ }
3058
+ _isDisabledDay(day) {
3059
+ return (isBefore(day, this._minDate) ||
3060
+ (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||
3061
+ ((getDay(day) === 0 || getDay(day) === 6) &&
3062
+ this.disableWeekends) ||
3063
+ this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0);
3064
+ }
3065
+ _generateMonths() {
3066
+ const year = getYear(this._viewDate);
3067
+ const months = Array.from(Array(12).keys());
3068
+ return months.map((month) => {
3069
+ const date = new Date(year, month, 1);
3070
+ return {
3071
+ month,
3072
+ current: isSameMonth(this._today, date),
3073
+ active: isSameMonth(this._value, date),
3074
+ disabled: isAfter(date, this._maxDate) ||
3075
+ isBefore(endOfMonth(date), this._minDate),
3076
+ };
3077
+ });
3078
+ }
3079
+ _generateYears() {
3080
+ const maxYear = getYear(this._maxDate) + 1;
3081
+ const minYear = getYear(this._minDate);
3082
+ return Array.from(Array(maxYear - minYear).keys()).map((index) => {
3083
+ const year = minYear + index;
3084
+ return {
3085
+ year,
3086
+ current: getYear(this._today) === year,
3087
+ active: getYear(this._value) === year,
3088
+ };
3089
+ });
3090
+ }
3091
+ _scrollYearIntoView() {
3092
+ const items = this._el.shadowRoot.querySelector('.view-year .items');
3093
+ if (!items) {
3094
+ return;
3095
+ }
3096
+ const active = items.querySelector('.year.active');
3097
+ if (active) {
3098
+ return items.scrollTo({
3099
+ top: active.offsetTop,
3100
+ });
3101
+ }
3102
+ const current = items.querySelector('.year.current');
3103
+ if (current) {
3104
+ return items.scrollTo({
3105
+ top: current.offsetTop,
3106
+ });
3107
+ }
3108
+ }
3109
+ _changeView(view) {
3110
+ if (!this._canChangeView(view)) {
3111
+ return;
3112
+ }
3113
+ this._view = view;
3114
+ }
3115
+ _canChangeView(view) {
3116
+ if (view === 'year') {
3117
+ if (isSameYear(this._minDate, this._maxDate)) {
3118
+ return false;
3119
+ }
3120
+ return true;
3121
+ }
3122
+ if (isSameMonth(this._minDate, this._maxDate)) {
3123
+ return false;
3124
+ }
3125
+ return true;
3126
+ }
3127
+ _canSetAmount(type, amount = 1) {
3128
+ if (type === 'month') {
3129
+ const newDate = addMonths(this._viewDate, amount);
3130
+ const startNewDate = startOfMonth(newDate);
3131
+ if ((isBefore(startNewDate, this._minDate) &&
3132
+ !isSameDay(startNewDate, this._minDate)) ||
3133
+ isAfter(startNewDate, endOfMonth(this._maxDate))) {
3134
+ return false;
3135
+ }
3136
+ }
3137
+ if (type === 'year') {
3138
+ let newDate = addYears(this._viewDate, amount);
3139
+ const year = getYear(newDate);
3140
+ if (year < getYear(this._minDate) ||
3141
+ year > getYear(this._maxDate)) {
3142
+ return false;
3143
+ }
3144
+ }
3145
+ return true;
3146
+ }
3147
+ _getAutomaticMax() {
3148
+ const date = addYears(new Date(), 50);
3149
+ let year = getYear(date);
3150
+ year = Math.ceil(year / 10) * 10;
3151
+ return setYear(date, year);
3152
+ }
3153
+ get _el() { return this; }
3154
+ static get watchers() { return {
3155
+ "value": ["_parseValue"],
3156
+ "minDate": ["_parseMinDate"],
3157
+ "maxDate": ["_parseMaxDate"],
3158
+ "disabledDates": ["_parseDisabledDates"]
3159
+ }; }
3160
+ static get style() { return calendarComponentCss; }
3161
+ }, [1, "p-calendar", {
3162
+ "variant": [1],
3163
+ "value": [1],
3164
+ "preselectToday": [4, "preselect-today"],
3165
+ "disabledDates": [1, "disabled-dates"],
3166
+ "minDate": [1, "min-date"],
3167
+ "maxDate": [1, "max-date"],
3168
+ "disableWeekends": [4, "disable-weekends"],
3169
+ "mode": [1],
3170
+ "_view": [32],
3171
+ "_viewDate": [32],
3172
+ "_value": [32],
3173
+ "_minDate": [32],
3174
+ "_maxDate": [32],
3175
+ "_disabledDates": [32]
3176
+ }]);
3177
+ function defineCustomElement() {
3178
+ if (typeof customElements === "undefined") {
3179
+ return;
3180
+ }
3181
+ const components = ["p-calendar", "p-icon"];
3182
+ components.forEach(tagName => { switch (tagName) {
3183
+ case "p-calendar":
3184
+ if (!customElements.get(tagName)) {
3185
+ customElements.define(tagName, Calendar);
3186
+ }
3187
+ break;
3188
+ case "p-icon":
3189
+ if (!customElements.get(tagName)) {
3190
+ defineCustomElement$1();
3191
+ }
3192
+ break;
3193
+ } });
3194
+ }
3195
+
3196
+ export { Calendar as C, startOfUTCISOWeek as a, getUTCWeek as b, toInteger as c, defineCustomElement as d, getUTCISOWeek as e, getDefaultOptions as f, getUTCWeekYear as g, subMilliseconds as h, getTimezoneOffsetInMilliseconds as i, locale as j, isProtectedWeekYearToken as k, longFormatters as l, throwProtectedError as m, isProtectedDayOfYearToken as n, format as o, isValid as p, isBefore as q, requiredArgs as r, startOfUTCWeek as s, toDate as t, isAfter as u, startOfDay as v, isSameDay as w };
3197
+
3198
+ //# sourceMappingURL=calendar.component.js.map