tuikit-atomicx-vue3 3.3.3 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (797) hide show
  1. package/.eslintrc.cjs +33 -0
  2. package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-DESfuJPj.js +89 -0
  3. package/dist/DialogPortal-CvJcEAsn.js +417 -0
  4. package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-C8oUv-KF.js +36 -0
  5. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js +116 -0
  6. package/dist/PopoverTrigger-L8abAry7.js +607 -0
  7. package/dist/PopperContent-XdhqL8Y2.js +1603 -0
  8. package/dist/Teleport-CSEuZbpM.js +913 -0
  9. package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-DlROoquV.js +89 -0
  10. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  11. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  12. package/dist/baseComp/ActionSheep.js +41 -51
  13. package/dist/baseComp/AudioIcon.js +27 -37
  14. package/dist/baseComp/Avatar.js +16 -28
  15. package/dist/baseComp/Dialog/DialogH5.js +56 -82
  16. package/dist/baseComp/Dialog/DialogPC.js +76 -118
  17. package/dist/baseComp/Dialog/index.js +2 -2
  18. package/dist/baseComp/IconButton.js +43 -56
  19. package/dist/baseComp/Input/InputH5.js +85 -128
  20. package/dist/baseComp/Input/InputPC.js +85 -128
  21. package/dist/baseComp/Input/InputWX.js +88 -131
  22. package/dist/baseComp/Input/index.js +5 -5
  23. package/dist/baseComp/MessageBox/index.js +120 -150
  24. package/dist/baseComp/Modal/Modal.js +38 -45
  25. package/dist/baseComp/Modal/index.js +3 -3
  26. package/dist/baseComp/ObserverView/ObserverView.js +50 -86
  27. package/dist/baseComp/ObserverView/index.js +2 -2
  28. package/dist/baseComp/Option/OptionH5.js +29 -40
  29. package/dist/baseComp/Option/OptionPC.js +34 -46
  30. package/dist/baseComp/Option/OptionWX.js +30 -41
  31. package/dist/baseComp/Option/index.js +2 -2
  32. package/dist/baseComp/Select/SelectH5.js +54 -86
  33. package/dist/baseComp/Select/SelectPC.js +78 -120
  34. package/dist/baseComp/Select/SelectWX.js +48 -79
  35. package/dist/baseComp/Select/index.js +2 -2
  36. package/dist/baseComp/SvgIcon.js +17 -22
  37. package/dist/baseComp/TuiSwitch.js +15 -19
  38. package/dist/baseComp/View/View.js +2 -2
  39. package/dist/baseComp/View/index.js +19 -24
  40. package/dist/baseComp/index.js +2 -2
  41. package/dist/baseComp/useZIndex.js +7 -12
  42. package/dist/chat/index.d.ts +1427 -990
  43. package/dist/chat/index.js +57 -73
  44. package/dist/chat/server.js +60 -79
  45. package/dist/components/AudioSetting/AudioMediaControl.js +52 -78
  46. package/dist/components/AudioSetting/AudioRequestDialog.js +2 -2
  47. package/dist/components/AudioSetting/AudioSettingTab.js +72 -102
  48. package/dist/components/AudioSetting/MicrophoneSelect.js +45 -57
  49. package/dist/components/AudioSetting/SpeakerSelect.js +45 -57
  50. package/dist/components/AudioSetting/index.js +3 -3
  51. package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -2
  52. package/dist/components/AudioSettingPanel/i18n/index.js +4 -4
  53. package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -2
  54. package/dist/components/AudioSettingPanel/index.js +102 -147
  55. package/dist/components/Avatar/Avatar.js +88 -140
  56. package/dist/components/Avatar/Avatar.vue.d.ts +1 -1
  57. package/dist/components/Avatar/AvatarBadge/AvatarBadge.js +25 -31
  58. package/dist/components/Avatar/AvatarBadge/index.js +2 -2
  59. package/dist/components/Avatar/constants/avatar.js +7 -12
  60. package/dist/components/Avatar/index.js +9 -9
  61. package/dist/components/BarrageInput/BarrageInput.js +50 -67
  62. package/dist/components/BarrageInput/BarrageInputH5.js +80 -111
  63. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +84 -97
  64. package/dist/components/BarrageInput/EmojiPicker/index.js +2 -2
  65. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +34 -62
  66. package/dist/components/BarrageInput/TextEditor/EditorCore.js +79 -90
  67. package/dist/components/BarrageInput/TextEditor/TextEditor.js +2 -2
  68. package/dist/components/BarrageInput/TextEditor/index.js +81 -125
  69. package/dist/components/BarrageInput/constants.js +2 -2
  70. package/dist/components/BarrageInput/i18n/en-US/index.js +2 -2
  71. package/dist/components/BarrageInput/i18n/index.js +4 -4
  72. package/dist/components/BarrageInput/i18n/zh-CN/index.js +2 -2
  73. package/dist/components/BarrageInput/index.js +11 -11
  74. package/dist/components/BarrageList/BarrageList.js +97 -173
  75. package/dist/components/BarrageList/BarrageListH5.js +96 -171
  76. package/dist/components/BarrageList/ClickAction/UserActionMenu.js +64 -94
  77. package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.js +2 -2
  78. package/dist/components/BarrageList/Message/CustomMessage/index.js +5 -7
  79. package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +16 -21
  80. package/dist/components/BarrageList/Message/FaceMessage/index.js +2 -2
  81. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +2 -2
  82. package/dist/components/BarrageList/Message/GroupTipMessage/index.js +13 -18
  83. package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +56 -80
  84. package/dist/components/BarrageList/Message/ImageMessage/index.js +2 -2
  85. package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +5 -5
  86. package/dist/components/BarrageList/Message/MergerMessage/index.js +2 -2
  87. package/dist/components/BarrageList/Message/Message.js +2 -2
  88. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +28 -39
  89. package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.js +2 -2
  90. package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +93 -101
  91. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +26 -32
  92. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +19 -22
  93. package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +2 -2
  94. package/dist/components/BarrageList/Message/MessageLayout/index.js +2 -2
  95. package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +31 -39
  96. package/dist/components/BarrageList/Message/RecalledMessage/index.js +2 -2
  97. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +67 -96
  98. package/dist/components/BarrageList/Message/TextMessage/index.js +2 -2
  99. package/dist/components/BarrageList/Message/index.js +11 -15
  100. package/dist/components/BarrageList/MessageForward/ForwardListItem.js +34 -43
  101. package/dist/components/BarrageList/MessageForward/MessageForward.js +158 -210
  102. package/dist/components/BarrageList/MessageForward/index.js +2 -2
  103. package/dist/components/BarrageList/MessageListContext.js +9 -10
  104. package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.js +20 -28
  105. package/dist/components/BarrageList/MessageTimeDivider/index.js +2 -2
  106. package/dist/components/BarrageList/i18n/en-US/index.js +3 -3
  107. package/dist/components/BarrageList/i18n/index.js +4 -4
  108. package/dist/components/BarrageList/i18n/zh-CN/index.js +3 -3
  109. package/dist/components/BarrageList/index.js +10 -10
  110. package/dist/components/CameraButton/index.js +34 -44
  111. package/dist/components/ChatSetting/C2CChatSetting/C2CChatSetting.js +92 -108
  112. package/dist/components/ChatSetting/C2CChatSetting/index.js +3 -3
  113. package/dist/components/ChatSetting/ChatSetting.js +17 -23
  114. package/dist/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.js +133 -163
  115. package/dist/components/ChatSetting/GroupChatSetting/GroupActions/index.js +2 -2
  116. package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +179 -245
  117. package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.js +124 -181
  118. package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/index.js +2 -2
  119. package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.js +195 -259
  120. package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/index.js +2 -2
  121. package/dist/components/ChatSetting/GroupChatSetting/GroupManagementEntry/GroupManagementEntry.js +23 -32
  122. package/dist/components/ChatSetting/GroupChatSetting/GroupManagementEntry/index.js +2 -2
  123. package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.js +149 -212
  124. package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/index.js +2 -2
  125. package/dist/components/ChatSetting/GroupChatSetting/PersonalSettings/PersonalSettings.js +35 -40
  126. package/dist/components/ChatSetting/GroupChatSetting/PersonalSettings/index.js +2 -2
  127. package/dist/components/ChatSetting/GroupChatSetting/index.js +2 -2
  128. package/dist/components/ChatSetting/SettingItem/SettingItem.js +201 -247
  129. package/dist/components/ChatSetting/SettingItem/index.js +2 -2
  130. package/dist/components/ChatSetting/i18n/en-US.js +2 -2
  131. package/dist/components/ChatSetting/i18n/index.js +6 -6
  132. package/dist/components/ChatSetting/i18n/zh-CN.js +2 -2
  133. package/dist/components/ChatSetting/index.js +7 -7
  134. package/dist/components/CoGuestPanel/CoGuestPanel.js +139 -180
  135. package/dist/components/CoGuestPanel/constants.js +2 -2
  136. package/dist/components/CoGuestPanel/i18n/en-US/index.js +9 -9
  137. package/dist/components/CoGuestPanel/i18n/index.js +4 -4
  138. package/dist/components/CoGuestPanel/i18n/zh-CN/index.js +9 -9
  139. package/dist/components/CoGuestPanel/index.js +8 -8
  140. package/dist/components/CoHostPanel/BattlePanel.js +196 -0
  141. package/dist/components/CoHostPanel/BattlePanel.vue.d.ts +19 -0
  142. package/dist/components/CoHostPanel/CoHostPanel.js +109 -0
  143. package/dist/components/CoHostPanel/CoHostPanel.vue.d.ts +19 -0
  144. package/dist/components/CoHostPanel/ConfigSettingPanel.js +110 -0
  145. package/dist/components/CoHostPanel/ConfigSettingPanel.vue.d.ts +33 -0
  146. package/dist/components/CoHostPanel/ConnectionPanel.js +273 -0
  147. package/dist/components/CoHostPanel/ConnectionPanel.vue.d.ts +19 -0
  148. package/dist/components/CoHostPanel/RecommendHostList.js +113 -0
  149. package/dist/components/CoHostPanel/RecommendHostList.vue.d.ts +13 -0
  150. package/dist/components/CoHostPanel/UserList.js +34 -0
  151. package/dist/components/CoHostPanel/UserList.vue.d.ts +28 -0
  152. package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +74 -0
  153. package/dist/components/CoHostPanel/i18n/en-US/index.js +81 -0
  154. package/dist/components/CoHostPanel/i18n/index.d.ts +4 -0
  155. package/dist/components/CoHostPanel/i18n/index.js +6 -0
  156. package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +75 -0
  157. package/dist/components/CoHostPanel/i18n/zh-CN/index.js +82 -0
  158. package/dist/components/CoHostPanel/index.d.ts +16 -0
  159. package/dist/components/CoHostPanel/index.js +10 -0
  160. package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +36 -51
  161. package/dist/components/ContactList/ContactInfo/BlacklistInfo/index.js +2 -2
  162. package/dist/components/ContactList/ContactInfo/ContactInfo.js +141 -196
  163. package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +39 -61
  164. package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/index.js +2 -2
  165. package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +109 -160
  166. package/dist/components/ContactList/ContactInfo/FriendInfo/index.js +2 -2
  167. package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +58 -86
  168. package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/index.js +2 -2
  169. package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +99 -133
  170. package/dist/components/ContactList/ContactInfo/GroupInfo/index.js +2 -2
  171. package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +86 -118
  172. package/dist/components/ContactList/ContactInfo/SearchGroupInfo/index.js +2 -2
  173. package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +72 -101
  174. package/dist/components/ContactList/ContactInfo/SearchUserInfo/index.js +2 -2
  175. package/dist/components/ContactList/ContactInfo/index.js +16 -16
  176. package/dist/components/ContactList/ContactList.js +164 -235
  177. package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +29 -38
  178. package/dist/components/ContactList/ContactListItem/BlacklistItem/index.js +2 -2
  179. package/dist/components/ContactList/ContactListItem/ContactListItem.js +2 -2
  180. package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +46 -61
  181. package/dist/components/ContactList/ContactListItem/FriendApplicationItem/index.js +2 -2
  182. package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +24 -31
  183. package/dist/components/ContactList/ContactListItem/FriendItem/index.js +2 -2
  184. package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +45 -64
  185. package/dist/components/ContactList/ContactListItem/GroupApplicationItem/index.js +2 -2
  186. package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +29 -38
  187. package/dist/components/ContactList/ContactListItem/GroupItem/index.js +2 -2
  188. package/dist/components/ContactList/ContactListItem/index.js +57 -66
  189. package/dist/components/ContactList/ContactSearch/ContactSearch.js +53 -73
  190. package/dist/components/ContactList/ContactSearch/index.js +2 -2
  191. package/dist/components/ContactList/constants/const.js +3 -4
  192. package/dist/components/ContactList/hooks/index.js +2 -2
  193. package/dist/components/ContactList/hooks/useContactList.js +11 -15
  194. package/dist/components/ContactList/i18n/en-US.js +21 -21
  195. package/dist/components/ContactList/i18n/index.js +4 -4
  196. package/dist/components/ContactList/i18n/zh-CN.js +21 -21
  197. package/dist/components/ContactList/index.js +12 -14
  198. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +107 -150
  199. package/dist/components/ConversationList/ConversationActions/index.js +2 -2
  200. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +116 -193
  201. package/dist/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.js +65 -80
  202. package/dist/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.js +108 -126
  203. package/dist/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.js +40 -52
  204. package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.js +61 -79
  205. package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/index.js +4 -4
  206. package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/type.js +8 -8
  207. package/dist/components/ConversationList/ConversationCreate/index.js +12 -12
  208. package/dist/components/ConversationList/ConversationList.js +112 -154
  209. package/dist/components/ConversationList/ConversationList.vue.d.ts +72 -72
  210. package/dist/components/ConversationList/ConversationListContent/ConversationListContent.js +27 -33
  211. package/dist/components/ConversationList/ConversationListContent/index.js +2 -2
  212. package/dist/components/ConversationList/ConversationListHeader/ConversationListHeader.js +30 -39
  213. package/dist/components/ConversationList/ConversationListHeader/index.js +2 -2
  214. package/dist/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.js +65 -81
  215. package/dist/components/ConversationList/ConversationPlaceHolder/index.js +2 -2
  216. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.js +2 -2
  217. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +72 -72
  218. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +40 -59
  219. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +29 -47
  220. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +25 -42
  221. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -111
  222. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +18 -18
  223. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +36 -51
  224. package/dist/components/ConversationList/ConversationPreview/index.js +55 -63
  225. package/dist/components/ConversationList/ConversationPreview/utils.js +36 -42
  226. package/dist/components/ConversationList/ConversationSearch/ConversationSearch.js +114 -160
  227. package/dist/components/ConversationList/ConversationSearch/index.js +2 -2
  228. package/dist/components/ConversationList/hooks/useConversation.js +12 -18
  229. package/dist/components/ConversationList/hooks/useConversationCreate.js +17 -18
  230. package/dist/components/ConversationList/i18n/en-US.js +32 -32
  231. package/dist/components/ConversationList/i18n/index.js +4 -4
  232. package/dist/components/ConversationList/i18n/zh-CN.js +32 -32
  233. package/dist/components/ConversationList/index.d.ts +989 -989
  234. package/dist/components/ConversationList/index.js +24 -32
  235. package/dist/components/LiveAudienceList/LiveAudienceList.js +85 -120
  236. package/dist/components/LiveAudienceList/LiveAudienceListH5.js +50 -72
  237. package/dist/components/LiveAudienceList/UserActionMenu.js +82 -124
  238. package/dist/components/LiveAudienceList/i18n/en-US/index.js +2 -2
  239. package/dist/components/LiveAudienceList/i18n/index.js +4 -4
  240. package/dist/components/LiveAudienceList/i18n/zh-CN/index.js +2 -2
  241. package/dist/components/LiveAudienceList/index.js +10 -10
  242. package/dist/components/LiveCoreView/CoreViewDecorate/BattleDecorate.js +152 -0
  243. package/dist/components/LiveCoreView/CoreViewDecorate/BattleDecorate.vue.d.ts +2 -0
  244. package/dist/components/LiveCoreView/CoreViewDecorate/BattleUserDecorate.js +66 -0
  245. package/dist/components/LiveCoreView/CoreViewDecorate/BattleUserDecorate.vue.d.ts +35 -0
  246. package/dist/components/LiveCoreView/CoreViewDecorate/CoHostDecorate.js +54 -0
  247. package/dist/components/LiveCoreView/CoreViewDecorate/CoHostDecorate.vue.d.ts +2 -0
  248. package/dist/components/LiveCoreView/CoreViewDecorate/LiveCoreDecorate.js +35 -0
  249. package/dist/components/LiveCoreView/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +35 -0
  250. package/dist/components/LiveCoreView/DefaultStreamViewUI.js +101 -154
  251. package/dist/components/LiveCoreView/PlayerControl/AudioControl.js +113 -236
  252. package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +78 -0
  253. package/dist/components/LiveCoreView/PlayerControl/MultiResolution.vue.d.ts +2 -0
  254. package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +150 -261
  255. package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.d.ts +11 -0
  256. package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +234 -379
  257. package/dist/components/LiveCoreView/PlayerControl/index.js +6 -6
  258. package/dist/components/LiveCoreView/PlayerControl/utils/deviceDetection.js +37 -121
  259. package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +32 -53
  260. package/dist/components/LiveCoreView/PlayerControl/utils/fullscreenManager.js +107 -177
  261. package/dist/components/LiveCoreView/i18n/en-US/index.d.ts +6 -0
  262. package/dist/components/LiveCoreView/i18n/en-US/index.js +14 -8
  263. package/dist/components/LiveCoreView/i18n/index.js +4 -4
  264. package/dist/components/LiveCoreView/i18n/zh-CN/index.d.ts +6 -0
  265. package/dist/components/LiveCoreView/i18n/zh-CN/index.js +14 -8
  266. package/dist/components/LiveCoreView/index.js +176 -301
  267. package/dist/components/LiveList/LiveList.js +109 -165
  268. package/dist/components/LiveList/LiveList.vue.d.ts +15 -3
  269. package/dist/components/LiveList/LiveListH5.js +109 -169
  270. package/dist/components/LiveList/i18n/en-US/index.d.ts +1 -1
  271. package/dist/components/LiveList/i18n/en-US/index.js +4 -4
  272. package/dist/components/LiveList/i18n/index.js +4 -4
  273. package/dist/components/LiveList/i18n/zh-CN/index.d.ts +1 -1
  274. package/dist/components/LiveList/i18n/zh-CN/index.js +4 -4
  275. package/dist/components/LiveList/index.d.ts +17 -1
  276. package/dist/components/LiveList/index.js +10 -10
  277. package/dist/components/LiveList/pullToRefresh.js +88 -163
  278. package/dist/components/LiveMonitorView/LiveMonitorView.js +72 -110
  279. package/dist/components/LiveMonitorView/i18n/en-US/index.js +2 -2
  280. package/dist/components/LiveMonitorView/i18n/index.js +4 -4
  281. package/dist/components/LiveMonitorView/i18n/zh-CN/index.js +2 -2
  282. package/dist/components/LiveMonitorView/index.js +7 -7
  283. package/dist/components/LiveScenePanel/CameraSettingDialog.js +126 -188
  284. package/dist/components/LiveScenePanel/LiveSceneSelect.js +79 -106
  285. package/dist/components/LiveScenePanel/MaterialDialog.js +78 -98
  286. package/dist/components/LiveScenePanel/MaterialItem.js +105 -142
  287. package/dist/components/LiveScenePanel/MaterialRenameDialog.js +2 -2
  288. package/dist/components/LiveScenePanel/i18n/en-US/index.js +2 -2
  289. package/dist/components/LiveScenePanel/i18n/index.js +4 -4
  290. package/dist/components/LiveScenePanel/i18n/zh-CN/index.js +2 -2
  291. package/dist/components/LiveScenePanel/icons/AddIcon.js +10 -11
  292. package/dist/components/LiveScenePanel/icons/CameraIcon.js +9 -10
  293. package/dist/components/LiveScenePanel/icons/CameraMirror.js +13 -14
  294. package/dist/components/LiveScenePanel/icons/CameraUnmirror.js +11 -12
  295. package/dist/components/LiveScenePanel/icons/ImageIcon.js +8 -9
  296. package/dist/components/LiveScenePanel/icons/MoreIcon.js +13 -14
  297. package/dist/components/LiveScenePanel/icons/ScreenIcon.js +8 -9
  298. package/dist/components/LiveScenePanel/index.js +142 -190
  299. package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.js +2 -2
  300. package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +10 -1
  301. package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +63 -2
  302. package/dist/components/MessageInput/AttachmentPicker/FilePicker.vue.d.ts +14 -13
  303. package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +63 -2
  304. package/dist/components/MessageInput/AttachmentPicker/ImagePicker.vue.d.ts +14 -13
  305. package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +63 -2
  306. package/dist/components/MessageInput/AttachmentPicker/VideoPicker.vue.d.ts +14 -13
  307. package/dist/components/MessageInput/AttachmentPicker/index.js +70 -72
  308. package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +155 -0
  309. package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.vue.d.ts +45 -0
  310. package/dist/components/MessageInput/AudioCallPicker/index.d.ts +3 -0
  311. package/dist/components/MessageInput/AudioCallPicker/index.js +4 -0
  312. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +108 -96
  313. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.vue.d.ts +34 -6
  314. package/dist/components/MessageInput/EmojiPicker/index.js +2 -2
  315. package/dist/components/MessageInput/MessageInput.js +2 -2
  316. package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.js +2 -2
  317. package/dist/components/MessageInput/QuotedMessagePreview/index.js +60 -74
  318. package/dist/components/MessageInput/SendButton/SendButton.js +2 -2
  319. package/dist/components/MessageInput/SendButton/index.js +20 -25
  320. package/dist/components/MessageInput/TextEditor/EditorCore.js +72 -79
  321. package/dist/components/MessageInput/TextEditor/TextEditor.js +2 -2
  322. package/dist/components/MessageInput/TextEditor/index.js +60 -95
  323. package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +158 -0
  324. package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.vue.d.ts +45 -0
  325. package/dist/components/MessageInput/VideoCallPicker/index.d.ts +3 -0
  326. package/dist/components/MessageInput/VideoCallPicker/index.js +4 -0
  327. package/dist/components/MessageInput/i18n/en-US.d.ts +4 -0
  328. package/dist/components/MessageInput/i18n/en-US.js +7 -3
  329. package/dist/components/MessageInput/i18n/index.d.ts +4 -0
  330. package/dist/components/MessageInput/i18n/index.js +6 -6
  331. package/dist/components/MessageInput/i18n/zh-CN.js +2 -2
  332. package/dist/components/MessageInput/index.d.ts +462 -191
  333. package/dist/components/MessageInput/index.js +23 -25
  334. package/dist/components/MessageList/Message/AudioMessage/AudioMessage.js +50 -65
  335. package/dist/components/MessageList/Message/AudioMessage/PlayButton.js +31 -37
  336. package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +37 -52
  337. package/dist/components/MessageList/Message/AudioMessage/index.js +2 -2
  338. package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +60 -0
  339. package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue.d.ts +16 -0
  340. package/dist/components/MessageList/Message/CustomMessage/CallMessage/index.d.ts +3 -0
  341. package/dist/components/MessageList/Message/CustomMessage/CallMessage/index.js +4 -0
  342. package/dist/components/MessageList/Message/CustomMessage/CustomMessage.js +49 -2
  343. package/dist/components/MessageList/Message/CustomMessage/CustomMessage.vue.d.ts +15 -1
  344. package/dist/components/MessageList/Message/CustomMessage/index.js +2 -10
  345. package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +16 -20
  346. package/dist/components/MessageList/Message/FaceMessage/index.js +2 -2
  347. package/dist/components/MessageList/Message/FileMessage/FileMessage.js +57 -70
  348. package/dist/components/MessageList/Message/FileMessage/index.js +2 -2
  349. package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.js +2 -2
  350. package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +1 -1
  351. package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -23
  352. package/dist/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.d.ts +1 -1
  353. package/dist/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.js +41 -59
  354. package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +106 -169
  355. package/dist/components/MessageList/Message/ImageMessage/index.js +2 -2
  356. package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +7 -7
  357. package/dist/components/MessageList/Message/LocationMessage/index.js +2 -2
  358. package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +7 -7
  359. package/dist/components/MessageList/Message/MergerMessage/index.js +2 -2
  360. package/dist/components/MessageList/Message/Message.js +2 -2
  361. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +800 -1074
  362. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +1 -1
  363. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.js +2 -2
  364. package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.js +36 -44
  365. package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +1 -1
  366. package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.js +2 -2
  367. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +116 -123
  368. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +1 -1
  369. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +47 -73
  370. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +24 -27
  371. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.js +2 -2
  372. package/dist/components/MessageList/Message/MessageLayout/index.js +2 -2
  373. package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.js +23 -28
  374. package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.js +39 -48
  375. package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +2 -2
  376. package/dist/components/MessageList/Message/RecalledMessage/index.js +2 -2
  377. package/dist/components/MessageList/Message/TextMessage/TextMessage.js +80 -102
  378. package/dist/components/MessageList/Message/TextMessage/index.js +2 -2
  379. package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +68 -92
  380. package/dist/components/MessageList/Message/VideoMessage/index.js +2 -2
  381. package/dist/components/MessageList/Message/index.js +18 -20
  382. package/dist/components/MessageList/MessageForward/ForwardListItem.js +46 -53
  383. package/dist/components/MessageList/MessageForward/MessageForward.js +102 -124
  384. package/dist/components/MessageList/MessageForward/index.js +2 -2
  385. package/dist/components/MessageList/MessageList.js +129 -204
  386. package/dist/components/MessageList/MessageListContext.js +9 -10
  387. package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +20 -28
  388. package/dist/components/MessageList/MessageTimeDivider/index.js +2 -2
  389. package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.js +294 -379
  390. package/dist/components/MessageList/ReadReceiptInfo/index.js +2 -2
  391. package/dist/components/MessageList/ScrollToBottom/ScrollToBottom.js +20 -25
  392. package/dist/components/MessageList/ScrollToBottom/index.js +2 -2
  393. package/dist/components/MessageList/i18n/en-US.d.ts +27 -1
  394. package/dist/components/MessageList/i18n/en-US.js +29 -3
  395. package/dist/components/MessageList/i18n/index.d.ts +134 -78
  396. package/dist/components/MessageList/i18n/index.js +6 -6
  397. package/dist/components/MessageList/i18n/zh-CN.d.ts +27 -1
  398. package/dist/components/MessageList/i18n/zh-CN.js +29 -3
  399. package/dist/components/MessageList/index.js +9 -10
  400. package/dist/components/MicButton/AudioIcon.js +27 -37
  401. package/dist/components/MicButton/index.js +37 -52
  402. package/dist/components/Search/Search.js +117 -156
  403. package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +378 -505
  404. package/dist/components/Search/SearchAdvanced/DateRangePicker/index.js +2 -2
  405. package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +147 -211
  406. package/dist/components/Search/SearchAdvanced/MessageAdvanced/index.js +2 -2
  407. package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +46 -60
  408. package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +39 -51
  409. package/dist/components/Search/SearchAdvanced/SearchTab/index.js +2 -2
  410. package/dist/components/Search/SearchAdvanced/Slider/Slider.js +53 -82
  411. package/dist/components/Search/SearchAdvanced/Slider/index.js +2 -2
  412. package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +247 -317
  413. package/dist/components/Search/SearchAdvanced/UserAdvanced/index.js +2 -2
  414. package/dist/components/Search/SearchAdvanced/index.js +12 -12
  415. package/dist/components/Search/SearchBar/SearchBar.js +98 -122
  416. package/dist/components/Search/SearchBar/index.js +2 -2
  417. package/dist/components/Search/SearchResults/EmptyResult/EmptyResult.js +26 -37
  418. package/dist/components/Search/SearchResults/EmptyResult/index.js +2 -2
  419. package/dist/components/Search/SearchResults/Loading/Loading.js +13 -19
  420. package/dist/components/Search/SearchResults/Loading/index.js +2 -2
  421. package/dist/components/Search/SearchResults/SearchResults.js +249 -355
  422. package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.js +61 -83
  423. package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/index.js +2 -2
  424. package/dist/components/Search/SearchResults/SearchResultsItem/Group/Group.js +40 -52
  425. package/dist/components/Search/SearchResults/SearchResultsItem/Group/index.js +2 -2
  426. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +134 -181
  427. package/dist/components/Search/SearchResults/SearchResultsItem/Message/index.js +2 -2
  428. package/dist/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.js +40 -46
  429. package/dist/components/Search/SearchResults/SearchResultsItem/User/User.js +56 -75
  430. package/dist/components/Search/SearchResults/SearchResultsItem/User/index.js +2 -2
  431. package/dist/components/Search/SearchResults/SearchResultsItem/index.js +11 -11
  432. package/dist/components/Search/SearchResults/SearchResultsItem/utils/highlightText.js +17 -36
  433. package/dist/components/Search/SearchResults/SearchResultsItem/utils/index.js +2 -2
  434. package/dist/components/Search/SearchResults/index.js +16 -16
  435. package/dist/components/Search/i18n/en-US/DateRangePicker.js +3 -3
  436. package/dist/components/Search/i18n/en-US/Search.js +3 -3
  437. package/dist/components/Search/i18n/en-US/index.js +7 -7
  438. package/dist/components/Search/i18n/index.js +4 -4
  439. package/dist/components/Search/i18n/zh-CN/DateRangePicker.js +3 -3
  440. package/dist/components/Search/i18n/zh-CN/Search.js +3 -3
  441. package/dist/components/Search/i18n/zh-CN/index.js +7 -7
  442. package/dist/components/Search/index.js +20 -26
  443. package/dist/components/StreamMixer/LocalMixer/MixerControl.js +68 -100
  444. package/dist/components/StreamMixer/LocalMixer/index.js +103 -171
  445. package/dist/components/StreamMixer/i18n/en-US/index.js +2 -2
  446. package/dist/components/StreamMixer/i18n/index.js +4 -4
  447. package/dist/components/StreamMixer/i18n/zh-CN/index.js +2 -2
  448. package/dist/components/StreamMixer/icons/CameraMirror.js +13 -14
  449. package/dist/components/StreamMixer/icons/Delete.js +13 -14
  450. package/dist/components/StreamMixer/icons/Down.js +10 -11
  451. package/dist/components/StreamMixer/icons/Rotation.js +11 -12
  452. package/dist/components/StreamMixer/icons/Up.js +10 -11
  453. package/dist/components/StreamMixer/index.js +19 -21
  454. package/dist/components/StreamView/Layout/CustomLayout.js +132 -209
  455. package/dist/components/StreamView/Layout/FloatLayout.js +136 -199
  456. package/dist/components/StreamView/Layout/GridLayout.js +117 -197
  457. package/dist/components/StreamView/Layout/MeetingLayout.js +129 -231
  458. package/dist/components/StreamView/Layout/MixLayout.js +70 -98
  459. package/dist/components/StreamView/common/ArrowStroke.js +26 -29
  460. package/dist/components/StreamView/common/LocalScreenView/index.js +82 -92
  461. package/dist/components/StreamView/common/StreamCover/index.js +33 -62
  462. package/dist/components/StreamView/common/StreamList/index.js +103 -163
  463. package/dist/components/StreamView/common/StreamPlay/index.js +58 -98
  464. package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.js +58 -90
  465. package/dist/components/StreamView/common/StreamRegion/index.js +2 -2
  466. package/dist/components/StreamView/index.js +64 -66
  467. package/dist/components/StreamView/manager/mediaManager.js +125 -236
  468. package/dist/components/UserList/AllUserActions/index.js +2 -2
  469. package/dist/components/UserList/AllUserActions/indexH5.js +59 -69
  470. package/dist/components/UserList/AllUserActions/indexPC.js +61 -73
  471. package/dist/components/UserList/AllUserActions/useIndexHooks.js +32 -39
  472. package/dist/components/UserList/UserItem/UserAction/index.js +2 -2
  473. package/dist/components/UserList/UserItem/UserAction/indexH5.js +47 -61
  474. package/dist/components/UserList/UserItem/UserAction/indexPC.js +86 -130
  475. package/dist/components/UserList/UserItem/UserInfo/index.js +67 -117
  476. package/dist/components/UserList/UserItem/UserInvite/index.js +18 -21
  477. package/dist/components/UserList/UserItem/index.js +2 -2
  478. package/dist/components/UserList/UserItem/indexH5.js +42 -54
  479. package/dist/components/UserList/UserItem/indexPC.js +32 -37
  480. package/dist/components/UserList/UserListContent/index.js +30 -44
  481. package/dist/components/UserList/UserListSearch/index.js +20 -26
  482. package/dist/components/UserList/index.js +50 -63
  483. package/dist/components/UserPicker/UserPicker.js +110 -148
  484. package/dist/components/UserPicker/components/ListMode/ListMode.js +70 -96
  485. package/dist/components/UserPicker/components/ListMode/index.js +2 -2
  486. package/dist/components/UserPicker/components/SearchBar/SearchBar.js +43 -58
  487. package/dist/components/UserPicker/components/SearchBar/index.js +2 -2
  488. package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +69 -94
  489. package/dist/components/UserPicker/components/SelectedPanel/index.js +2 -2
  490. package/dist/components/UserPicker/components/TreeMode/TreeMode.js +33 -42
  491. package/dist/components/UserPicker/components/TreeMode/TreeNode.js +81 -106
  492. package/dist/components/UserPicker/components/TreeMode/index.js +2 -2
  493. package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -80
  494. package/dist/components/UserPicker/hooks/useSelection.js +155 -313
  495. package/dist/components/UserPicker/hooks/useTreeState.js +17 -37
  496. package/dist/components/UserPicker/i18n/en-US.js +2 -2
  497. package/dist/components/UserPicker/i18n/index.js +6 -6
  498. package/dist/components/UserPicker/i18n/zh-CN.js +2 -2
  499. package/dist/components/UserPicker/index.js +7 -7
  500. package/dist/components/VideoSetting/CameraSelect.js +46 -58
  501. package/dist/components/VideoSetting/VideoMediaControl.js +45 -65
  502. package/dist/components/VideoSetting/VideoPreview.js +31 -40
  503. package/dist/components/VideoSetting/VideoProfile.js +38 -46
  504. package/dist/components/VideoSetting/VideoRequestDialog.js +2 -2
  505. package/dist/components/VideoSetting/VideoSettingTab.js +43 -55
  506. package/dist/components/VideoSetting/index.js +3 -3
  507. package/dist/components/VideoSettingPanel/CameraSelect.js +45 -57
  508. package/dist/components/VideoSettingPanel/VideoPreview.js +30 -39
  509. package/dist/components/VideoSettingPanel/VideoProfile.js +36 -44
  510. package/dist/components/VideoSettingPanel/i18n/en-US/index.js +5 -5
  511. package/dist/components/VideoSettingPanel/i18n/index.js +4 -4
  512. package/dist/components/VideoSettingPanel/i18n/zh-CN/index.js +5 -5
  513. package/dist/components/VideoSettingPanel/index.js +48 -63
  514. package/dist/constants/emoji.js +3 -4
  515. package/dist/directives/vClickOutside.js +9 -23
  516. package/dist/directives/vDblTouch.js +26 -51
  517. package/dist/directives/vTap.js +37 -68
  518. package/dist/directives/vTouchScale.js +83 -155
  519. package/dist/handler/index.js +4 -4
  520. package/dist/handler/translator.js +65 -97
  521. package/dist/handler/voiceConverter.js +21 -30
  522. package/dist/hooks/index.d.ts +1 -1
  523. package/dist/hooks/index.js +4 -4
  524. package/dist/hooks/useAudioControl.js +44 -128
  525. package/dist/hooks/useLongPress.js +41 -75
  526. package/dist/hooks/useMessageActions.d.ts +1 -1
  527. package/dist/hooks/useMessageActions.js +46 -57
  528. package/dist/hooks/useMouseHover.js +16 -26
  529. package/dist/hooks/useReadReceipt/useReadReceipt.js +66 -114
  530. package/dist/hooks/useRoomActions/index.js +11 -14
  531. package/dist/hooks/useRoomActions/useRoomAudioAction.js +39 -44
  532. package/dist/hooks/useRoomActions/useRoomScreenAction.js +41 -48
  533. package/dist/hooks/useRoomActions/useRoomVideoAction.js +38 -44
  534. package/dist/hooks/useRoomEngine.js +14 -17
  535. package/dist/hooks/useScroll.js +52 -89
  536. package/dist/hooks/useUserActions/index.js +81 -117
  537. package/dist/hooks/useUserActions/useAdminAction.js +29 -35
  538. package/dist/hooks/useUserActions/useAudioAction.js +36 -40
  539. package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.js +59 -69
  540. package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.js +40 -49
  541. package/dist/hooks/useUserActions/useChangeNameCardAction/index.js +43 -51
  542. package/dist/hooks/useUserActions/useChatAction.js +23 -25
  543. package/dist/hooks/useUserActions/useKickUserAction.js +27 -32
  544. package/dist/hooks/useUserActions/useMemberInviteAction.js +24 -40
  545. package/dist/hooks/useUserActions/useSeatAction.js +96 -108
  546. package/dist/hooks/useUserActions/useTransferOwnerAction.js +40 -47
  547. package/dist/hooks/useUserActions/useVideoAction.js +35 -38
  548. package/dist/hooks/useZIndex.js +7 -12
  549. package/dist/i18n/index.js +4 -4
  550. package/dist/index-CeQ4nl87.js +44 -0
  551. package/dist/index-D-KJvDvy.js +5125 -0
  552. package/dist/index-D88ja_7_.js +12047 -0
  553. package/dist/index-DPczIrgX.js +42 -0
  554. package/dist/index-DTq2ybsB.js +33 -0
  555. package/dist/index.d.ts +2 -1
  556. package/dist/index.js +178 -152
  557. package/dist/index.vue_vue_type_script_setup_true_lang-DZIBxSQ7.js +32 -0
  558. package/dist/locales/en-US.js +31 -31
  559. package/dist/locales/index.js +29 -34
  560. package/dist/locales/zh-CN.js +31 -31
  561. package/dist/rtc/index.d.ts +34 -2
  562. package/dist/rtc/index.js +63 -86
  563. package/dist/rtc/server.js +62 -85
  564. package/dist/states/BarrageListState/BarrageListState.js +98 -183
  565. package/dist/states/BarrageListState/index.js +2 -2
  566. package/dist/states/BattleState.d.ts +46 -0
  567. package/dist/states/BattleState.js +117 -0
  568. package/dist/states/C2CSettingState/C2CSettingState.js +52 -92
  569. package/dist/states/C2CSettingState/index.js +2 -2
  570. package/dist/states/CoGuestState.d.ts +1 -1
  571. package/dist/states/CoGuestState.js +191 -291
  572. package/dist/states/CoHostState/CoHostState.d.ts +30 -0
  573. package/dist/states/CoHostState/CoHostState.js +209 -0
  574. package/dist/states/CoHostState/index.d.ts +1 -0
  575. package/dist/states/CoHostState/index.js +4 -0
  576. package/dist/states/ContactListState/ContactListState.js +175 -271
  577. package/dist/states/ContactListState/index.js +2 -2
  578. package/dist/states/ConversationListState/ConversationListState.js +61 -112
  579. package/dist/states/ConversationListState/index.js +2 -2
  580. package/dist/states/DeviceState.js +240 -389
  581. package/dist/states/GroupSettingState/GroupSettingState.js +220 -378
  582. package/dist/states/GroupSettingState/index.js +7 -7
  583. package/dist/states/GroupSettingState/permissions.js +240 -250
  584. package/dist/states/GroupSettingState/types.js +5 -41
  585. package/dist/states/LiveAudienceState.js +100 -132
  586. package/dist/states/LiveMonitorState/api/http.js +1245 -1910
  587. package/dist/states/LiveMonitorState/index.js +92 -148
  588. package/dist/states/LiveMonitorState/player/adapters/trtc.js +54 -106
  589. package/dist/states/LiveMonitorState/player/base/basePlayer.js +111 -169
  590. package/dist/states/LiveMonitorState/player/index.js +10 -10
  591. package/dist/states/LiveMonitorState/player/manager/playerManager.js +27 -33
  592. package/dist/states/LiveMonitorState/player/types/index.js +8 -8
  593. package/dist/states/LiveMonitorState/player/types/player.js +3 -13
  594. package/dist/states/LiveMonitorState/player/types/trtc.js +6 -20
  595. package/dist/states/LiveMonitorState/utils/index.js +17 -22
  596. package/dist/states/LiveSeatState/index.js +16 -16
  597. package/dist/states/LiveSeatState/seatEventManager.js +54 -75
  598. package/dist/states/LiveSeatState/seatManager.js +29 -36
  599. package/dist/states/LiveSeatState/store.js +18 -25
  600. package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +43 -65
  601. package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +55 -83
  602. package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +59 -97
  603. package/dist/states/LiveSeatState/usePlayStream/index.js +44 -96
  604. package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.js +43 -55
  605. package/dist/states/LiveState/index.js +190 -275
  606. package/dist/states/LoginState.js +48 -59
  607. package/dist/states/MessageActionState/MessageActionState.d.ts +6 -6
  608. package/dist/states/MessageActionState/MessageActionState.js +45 -56
  609. package/dist/states/MessageActionState/index.js +2 -2
  610. package/dist/states/MessageInputState/MessageInputState.js +90 -139
  611. package/dist/states/MessageInputState/index.js +4 -4
  612. package/dist/states/MessageInputState/type.js +2 -10
  613. package/dist/states/MessageInputState/utils.js +20 -21
  614. package/dist/states/MessageListState/MessageListState.js +65 -89
  615. package/dist/states/MessageListState/index.js +2 -2
  616. package/dist/states/RoomState.js +223 -332
  617. package/dist/states/SearchState.d.ts +2 -2
  618. package/dist/states/SearchState.js +230 -356
  619. package/dist/states/SeatStore.js +140 -213
  620. package/dist/states/UserState/index.js +31 -51
  621. package/dist/states/UserState/store.js +95 -147
  622. package/dist/states/UserState/userEventManager.js +85 -134
  623. package/dist/states/UserState/userManager.js +184 -232
  624. package/dist/states/VideoMixerState.js +181 -228
  625. package/dist/statistical/const.d.ts +4 -0
  626. package/dist/statistical/const.js +4 -0
  627. package/dist/statistical/index.d.ts +2 -0
  628. package/dist/statistical/index.js +6 -0
  629. package/dist/statistical/statistical.d.ts +10 -0
  630. package/dist/statistical/statistical.js +19 -0
  631. package/dist/styles/index.css +1 -13144
  632. package/dist/types/battle.d.ts +11 -0
  633. package/dist/types/battle.js +1 -0
  634. package/dist/types/call.d.ts +55 -0
  635. package/dist/types/call.js +4 -0
  636. package/dist/types/chatSetting.d.ts +1 -0
  637. package/dist/types/chatSetting.js +6 -0
  638. package/dist/types/coGuest.js +2 -8
  639. package/dist/types/coHost.d.ts +44 -4
  640. package/dist/types/coHost.js +4 -8
  641. package/dist/types/contact.js +3 -17
  642. package/dist/types/conversation.js +6 -36
  643. package/dist/types/device.d.ts +4 -0
  644. package/dist/types/device.js +8 -45
  645. package/dist/types/engine.d.ts +23 -7
  646. package/dist/types/engine.js +5 -23
  647. package/dist/types/index.d.ts +9 -5
  648. package/dist/types/index.js +92 -80
  649. package/dist/types/live.js +4 -21
  650. package/dist/types/message.js +4 -29
  651. package/dist/types/monitor.js +2 -6
  652. package/dist/types/room.js +3 -16
  653. package/dist/types/search.js +9 -15
  654. package/dist/types/seat.d.ts +4 -4
  655. package/dist/types/stream.js +3 -14
  656. package/dist/types/types.js +32 -329
  657. package/dist/types/user.d.ts +0 -3
  658. package/dist/types/user.js +8 -65
  659. package/dist/useId-CtirfF0W.js +12 -0
  660. package/dist/utils/call.d.ts +6 -2
  661. package/dist/utils/call.js +126 -11
  662. package/dist/utils/copyText.js +20 -33
  663. package/dist/utils/documentLink.js +2 -2
  664. package/dist/utils/domOperation.js +99 -122
  665. package/dist/utils/downFile.js +11 -19
  666. package/dist/utils/emoji.js +24 -31
  667. package/dist/utils/enableSampleTaskStatus.js +5 -8
  668. package/dist/utils/env.js +8 -13
  669. package/dist/utils/environment.js +14 -18
  670. package/dist/utils/index.js +36 -36
  671. package/dist/utils/json.js +34 -58
  672. package/dist/utils/lodash.js +63 -109
  673. package/dist/utils/riseInput.js +19 -36
  674. package/dist/utils/time.js +640 -934
  675. package/dist/utils/type-check.js +21 -46
  676. package/dist/utils/utils.js +131 -235
  677. package/dist/utils-DaB7eSu5.js +48 -0
  678. package/package.json +5 -4
  679. package/src/chat/index.ts +27 -0
  680. package/src/chat/server.ts +5 -0
  681. package/src/components/BarrageInput/TextEditor/Editor.scss +2 -2
  682. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +1 -1
  683. package/src/components/ChatSetting/ChatSetting.vue +3 -3
  684. package/src/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.vue +3 -0
  685. package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +1 -0
  686. package/src/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.vue +1 -0
  687. package/src/components/CoGuestPanel/CoGuestPanel.vue +2 -1
  688. package/src/components/CoHostPanel/BattlePanel.vue +271 -0
  689. package/src/components/CoHostPanel/CoHostPanel.vue +218 -0
  690. package/src/components/CoHostPanel/ConfigSettingPanel.vue +264 -0
  691. package/src/components/CoHostPanel/ConnectionPanel.vue +549 -0
  692. package/src/components/CoHostPanel/RecommendHostList.vue +306 -0
  693. package/src/components/CoHostPanel/UserList.vue +93 -0
  694. package/src/components/CoHostPanel/i18n/en-US/index.ts +78 -0
  695. package/src/components/CoHostPanel/i18n/index.ts +4 -0
  696. package/src/components/CoHostPanel/i18n/zh-CN/index.ts +79 -0
  697. package/src/components/CoHostPanel/index.ts +7 -0
  698. package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -0
  699. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -1
  700. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +1 -1
  701. package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -0
  702. package/src/components/LiveCoreView/CoreViewDecorate/BattleDecorate.vue +420 -0
  703. package/src/components/LiveCoreView/CoreViewDecorate/BattleUserDecorate.vue +141 -0
  704. package/src/components/LiveCoreView/CoreViewDecorate/CoHostDecorate.vue +116 -0
  705. package/src/components/LiveCoreView/CoreViewDecorate/LiveCoreDecorate.vue +70 -0
  706. package/src/components/LiveCoreView/PlayerControl/MultiResolution.vue +130 -0
  707. package/src/components/LiveCoreView/PlayerControl/PlayerControl.vue +10 -8
  708. package/src/components/LiveCoreView/PlayerControl/PlayerControlState.ts +117 -1
  709. package/src/components/LiveCoreView/assets/img/defeat.png +0 -0
  710. package/src/components/LiveCoreView/assets/img/draw.png +0 -0
  711. package/src/components/LiveCoreView/assets/img/victory.png +0 -0
  712. package/src/components/LiveCoreView/assets/svg/BattleOrdinaryBadge.svg +20 -0
  713. package/src/components/LiveCoreView/assets/svg/BattleTopBadge.svg +16 -0
  714. package/src/components/LiveCoreView/assets/svg/blueBkg.svg +9 -0
  715. package/src/components/LiveCoreView/assets/svg/redBkg.svg +9 -0
  716. package/src/components/LiveCoreView/assets/svg/s.svg +17 -0
  717. package/src/components/LiveCoreView/assets/svg/v.svg +17 -0
  718. package/src/components/LiveCoreView/i18n/en-US/index.ts +6 -0
  719. package/src/components/LiveCoreView/i18n/zh-CN/index.ts +6 -0
  720. package/src/components/LiveCoreView/index.vue +4 -1
  721. package/src/components/LiveList/LiveList.vue +61 -106
  722. package/src/components/LiveList/LiveListH5.vue +1 -1
  723. package/src/components/LiveList/i18n/en-US/index.ts +1 -1
  724. package/src/components/LiveList/i18n/zh-CN/index.ts +1 -1
  725. package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +10 -8
  726. package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +59 -31
  727. package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +58 -31
  728. package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +58 -31
  729. package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +240 -0
  730. package/src/components/MessageInput/AudioCallPicker/index.ts +3 -0
  731. package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +107 -18
  732. package/src/components/MessageInput/MessageInput.module.scss +1 -1
  733. package/src/components/MessageInput/MessageInput.vue +6 -2
  734. package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +246 -0
  735. package/src/components/MessageInput/VideoCallPicker/index.ts +3 -0
  736. package/src/components/MessageInput/i18n/en-US.ts +4 -0
  737. package/src/components/MessageInput/index.ts +10 -4
  738. package/src/components/MessageInput/types.d.ts +3 -1
  739. package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +67 -0
  740. package/src/components/MessageList/Message/CustomMessage/CallMessage/index.ts +3 -0
  741. package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +59 -2
  742. package/src/components/MessageList/Message/CustomMessage/index.ts +1 -1
  743. package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +9 -10
  744. package/src/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.ts +1 -1
  745. package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +1 -1
  746. package/src/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +1 -1
  747. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +30 -18
  748. package/src/components/MessageList/Message/RecalledMessage/RecalledMessage.vue +10 -18
  749. package/src/components/MessageList/i18n/en-US.ts +32 -1
  750. package/src/components/MessageList/i18n/index.ts +4 -4
  751. package/src/components/MessageList/i18n/zh-CN.ts +32 -1
  752. package/src/components/MessageList/index.ts +2 -2
  753. package/src/components/Search/SearchResults/SearchResults.scss +1 -0
  754. package/src/components/UserPicker/UserPicker.vue +0 -2
  755. package/src/hooks/index.ts +1 -2
  756. package/src/hooks/useMessageActions.ts +9 -9
  757. package/src/index.ts +2 -1
  758. package/src/rtc/index.ts +5 -0
  759. package/src/statistical/const.ts +5 -0
  760. package/src/statistical/index.ts +2 -0
  761. package/src/statistical/statistical.ts +23 -0
  762. package/src/types/battle.ts +12 -0
  763. package/src/types/call.ts +62 -0
  764. package/src/types/chatSetting.ts +5 -0
  765. package/src/types/coHost.ts +46 -4
  766. package/src/types/device.ts +5 -0
  767. package/src/types/engine.ts +45 -21
  768. package/src/types/index.ts +12 -5
  769. package/src/types/seat.ts +5 -5
  770. package/src/types/user.ts +0 -4
  771. package/src/utils/call.ts +233 -5
  772. package/src/utils/time.ts +1 -1
  773. package/dist/AttachmentPicker.module-BesmtGyl.js +0 -11
  774. package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-BmX-qsat.js +0 -108
  775. package/dist/DialogPortal-DWeT-J6v.js +0 -496
  776. package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js +0 -76
  777. package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js +0 -76
  778. package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-CVh4Regz.js +0 -43
  779. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-wUJPjWbx.js +0 -128
  780. package/dist/PopoverTrigger-BKOIHfdS.js +0 -679
  781. package/dist/PopperContent-DtL7HVWz.js +0 -2227
  782. package/dist/Teleport-CMvGsENT.js +0 -1365
  783. package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js +0 -76
  784. package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-CnE-LwNh.js +0 -108
  785. package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
  786. package/dist/_plugin-vue_export-helper-1tPrXgE0.js +0 -10
  787. package/dist/index-BF6QB9jF.js +0 -63
  788. package/dist/index-CX1Zs9En.js +0 -44
  789. package/dist/index-DRcLhqhU.js +0 -38
  790. package/dist/index-ex2Jv3Tj.js +0 -7655
  791. package/dist/index-t9cbWbGG.js +0 -15913
  792. package/dist/index.vue_vue_type_script_setup_true_lang-EcKm3pYY.js +0 -36
  793. package/dist/states/CoHostState.d.ts +0 -22
  794. package/dist/states/CoHostState.js +0 -178
  795. package/dist/useId-CsgLY8y3.js +0 -13
  796. package/dist/utils-KP1QpeUS.js +0 -59
  797. package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +0 -28
@@ -1,131 +1,94 @@
1
- import { useUIKit } from "@tencentcloud/uikit-base-component-vue3";
2
- const millisecondsInWeek = 6048e5;
3
- const millisecondsInDay = 864e5;
4
- const constructFromSymbol = Symbol.for("constructDateFrom");
5
- function constructFrom(date, value) {
6
- if (typeof date === "function") return date(value);
7
- if (date && typeof date === "object" && constructFromSymbol in date)
8
- return date[constructFromSymbol](value);
9
- if (date instanceof Date) return new date.constructor(value);
10
- return new Date(value);
1
+ import { useUIKit as A } from "@tencentcloud/uikit-base-component-vue3";
2
+ const G = 6048e5, p = 864e5, X = Symbol.for("constructDateFrom");
3
+ function l(e, t) {
4
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && X in e ? e[X](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
11
5
  }
12
- function toDate(argument, context) {
13
- return constructFrom(context || argument, argument);
6
+ function g(e, t) {
7
+ return l(t || e, e);
14
8
  }
15
- function addDays(date, amount, options) {
16
- const _date = toDate(date, options == null ? void 0 : options.in);
17
- if (isNaN(amount)) return constructFrom(date, NaN);
18
- _date.setDate(_date.getDate() + amount);
19
- return _date;
9
+ function ee(e, t, n) {
10
+ const r = g(e, n == null ? void 0 : n.in);
11
+ return isNaN(t) ? l(e, NaN) : (r.setDate(r.getDate() + t), r);
20
12
  }
21
- let defaultOptions = {};
22
- function getDefaultOptions() {
23
- return defaultOptions;
13
+ let te = {};
14
+ function T() {
15
+ return te;
24
16
  }
25
- function startOfWeek(date, options) {
26
- var _a, _b, _c, _d;
27
- const defaultOptions2 = getDefaultOptions();
28
- const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.weekStartsOn) ?? 0;
29
- const _date = toDate(date, options == null ? void 0 : options.in);
30
- const day = _date.getDay();
31
- const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
32
- _date.setDate(_date.getDate() - diff);
33
- _date.setHours(0, 0, 0, 0);
34
- return _date;
17
+ function v(e, t) {
18
+ var s, c, d, f;
19
+ const n = T(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.weekStartsOn) ?? 0, a = g(e, t == null ? void 0 : t.in), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
20
+ return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
35
21
  }
36
- function startOfISOWeek(date, options) {
37
- return startOfWeek(date, { ...options, weekStartsOn: 1 });
22
+ function S(e, t) {
23
+ return v(e, { ...t, weekStartsOn: 1 });
38
24
  }
39
- function getISOWeekYear(date, options) {
40
- const _date = toDate(date, options == null ? void 0 : options.in);
41
- const year = _date.getFullYear();
42
- const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
43
- fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
44
- fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
45
- const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
46
- const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
47
- fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
48
- fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
49
- const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
50
- if (_date.getTime() >= startOfNextYear.getTime()) {
51
- return year + 1;
52
- } else if (_date.getTime() >= startOfThisYear.getTime()) {
53
- return year;
54
- } else {
55
- return year - 1;
56
- }
25
+ function B(e, t) {
26
+ const n = g(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = l(n, 0);
27
+ a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
28
+ const i = S(a), o = l(n, 0);
29
+ o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
30
+ const s = S(o);
31
+ return n.getTime() >= i.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
57
32
  }
58
- function getTimezoneOffsetInMilliseconds(date) {
59
- const _date = toDate(date);
60
- const utcDate = new Date(
33
+ function _(e) {
34
+ const t = g(e), n = new Date(
61
35
  Date.UTC(
62
- _date.getFullYear(),
63
- _date.getMonth(),
64
- _date.getDate(),
65
- _date.getHours(),
66
- _date.getMinutes(),
67
- _date.getSeconds(),
68
- _date.getMilliseconds()
36
+ t.getFullYear(),
37
+ t.getMonth(),
38
+ t.getDate(),
39
+ t.getHours(),
40
+ t.getMinutes(),
41
+ t.getSeconds(),
42
+ t.getMilliseconds()
69
43
  )
70
44
  );
71
- utcDate.setUTCFullYear(_date.getFullYear());
72
- return +date - +utcDate;
45
+ return n.setUTCFullYear(t.getFullYear()), +e - +n;
73
46
  }
74
- function normalizeDates(context, ...dates) {
75
- const normalize = constructFrom.bind(
47
+ function E(e, ...t) {
48
+ const n = l.bind(
76
49
  null,
77
- context || dates.find((date) => typeof date === "object")
50
+ e || t.find((r) => typeof r == "object")
78
51
  );
79
- return dates.map(normalize);
52
+ return t.map(n);
80
53
  }
81
- function startOfDay(date, options) {
82
- const _date = toDate(date, options == null ? void 0 : options.in);
83
- _date.setHours(0, 0, 0, 0);
84
- return _date;
54
+ function Y(e, t) {
55
+ const n = g(e, t == null ? void 0 : t.in);
56
+ return n.setHours(0, 0, 0, 0), n;
85
57
  }
86
- function differenceInCalendarDays(laterDate, earlierDate, options) {
87
- const [laterDate_, earlierDate_] = normalizeDates(
88
- options == null ? void 0 : options.in,
89
- laterDate,
90
- earlierDate
91
- );
92
- const laterStartOfDay = startOfDay(laterDate_);
93
- const earlierStartOfDay = startOfDay(earlierDate_);
94
- const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
95
- const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
96
- return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
58
+ function ne(e, t, n) {
59
+ const [r, a] = E(
60
+ n == null ? void 0 : n.in,
61
+ e,
62
+ t
63
+ ), i = Y(r), o = Y(a), s = +i - _(i), c = +o - _(o);
64
+ return Math.round((s - c) / p);
97
65
  }
98
- function startOfISOWeekYear(date, options) {
99
- const year = getISOWeekYear(date, options);
100
- const fourthOfJanuary = constructFrom(date, 0);
101
- fourthOfJanuary.setFullYear(year, 0, 4);
102
- fourthOfJanuary.setHours(0, 0, 0, 0);
103
- return startOfISOWeek(fourthOfJanuary);
66
+ function re(e, t) {
67
+ const n = B(e, t), r = l(e, 0);
68
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), S(r);
104
69
  }
105
- function constructNow(date) {
106
- return constructFrom(date, Date.now());
70
+ function C(e) {
71
+ return l(e, Date.now());
107
72
  }
108
- function isSameDay(laterDate, earlierDate, options) {
109
- const [dateLeft_, dateRight_] = normalizeDates(
110
- options == null ? void 0 : options.in,
111
- laterDate,
112
- earlierDate
73
+ function z(e, t, n) {
74
+ const [r, a] = E(
75
+ n == null ? void 0 : n.in,
76
+ e,
77
+ t
113
78
  );
114
- return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
79
+ return +Y(r) == +Y(a);
115
80
  }
116
- function isDate(value) {
117
- return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
81
+ function ae(e) {
82
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
118
83
  }
119
- function isValid(date) {
120
- return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
84
+ function ie(e) {
85
+ return !(!ae(e) && typeof e != "number" || isNaN(+g(e)));
121
86
  }
122
- function startOfYear(date, options) {
123
- const date_ = toDate(date, options == null ? void 0 : options.in);
124
- date_.setFullYear(date_.getFullYear(), 0, 1);
125
- date_.setHours(0, 0, 0, 0);
126
- return date_;
87
+ function oe(e, t) {
88
+ const n = g(e, t == null ? void 0 : t.in);
89
+ return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
127
90
  }
128
- const formatDistanceLocale$1 = {
91
+ const ue = {
129
92
  lessThanXSeconds: {
130
93
  one: "less than a second",
131
94
  other: "less than {{count}} seconds"
@@ -187,102 +150,77 @@ const formatDistanceLocale$1 = {
187
150
  one: "almost 1 year",
188
151
  other: "almost {{count}} years"
189
152
  }
153
+ }, se = (e, t, n) => {
154
+ let r;
155
+ const a = ue[e];
156
+ return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
190
157
  };
191
- const formatDistance$1 = (token, count, options) => {
192
- let result;
193
- const tokenValue = formatDistanceLocale$1[token];
194
- if (typeof tokenValue === "string") {
195
- result = tokenValue;
196
- } else if (count === 1) {
197
- result = tokenValue.one;
198
- } else {
199
- result = tokenValue.other.replace("{{count}}", count.toString());
200
- }
201
- if (options == null ? void 0 : options.addSuffix) {
202
- if (options.comparison && options.comparison > 0) {
203
- return "in " + result;
204
- } else {
205
- return result + " ago";
206
- }
207
- }
208
- return result;
209
- };
210
- function buildFormatLongFn(args) {
211
- return (options = {}) => {
212
- const width = options.width ? String(options.width) : args.defaultWidth;
213
- const format2 = args.formats[width] || args.formats[args.defaultWidth];
214
- return format2;
158
+ function D(e) {
159
+ return (t = {}) => {
160
+ const n = t.width ? String(t.width) : e.defaultWidth;
161
+ return e.formats[n] || e.formats[e.defaultWidth];
215
162
  };
216
163
  }
217
- const dateFormats$1 = {
164
+ const ce = {
218
165
  full: "EEEE, MMMM do, y",
219
166
  long: "MMMM do, y",
220
167
  medium: "MMM d, y",
221
168
  short: "MM/dd/yyyy"
222
- };
223
- const timeFormats$1 = {
169
+ }, de = {
224
170
  full: "h:mm:ss a zzzz",
225
171
  long: "h:mm:ss a z",
226
172
  medium: "h:mm:ss a",
227
173
  short: "h:mm a"
228
- };
229
- const dateTimeFormats$1 = {
174
+ }, he = {
230
175
  full: "{{date}} 'at' {{time}}",
231
176
  long: "{{date}} 'at' {{time}}",
232
177
  medium: "{{date}}, {{time}}",
233
178
  short: "{{date}}, {{time}}"
234
- };
235
- const formatLong$1 = {
236
- date: buildFormatLongFn({
237
- formats: dateFormats$1,
179
+ }, fe = {
180
+ date: D({
181
+ formats: ce,
238
182
  defaultWidth: "full"
239
183
  }),
240
- time: buildFormatLongFn({
241
- formats: timeFormats$1,
184
+ time: D({
185
+ formats: de,
242
186
  defaultWidth: "full"
243
187
  }),
244
- dateTime: buildFormatLongFn({
245
- formats: dateTimeFormats$1,
188
+ dateTime: D({
189
+ formats: he,
246
190
  defaultWidth: "full"
247
191
  })
248
- };
249
- const formatRelativeLocale$1 = {
192
+ }, me = {
250
193
  lastWeek: "'last' eeee 'at' p",
251
194
  yesterday: "'yesterday at' p",
252
195
  today: "'today at' p",
253
196
  tomorrow: "'tomorrow at' p",
254
197
  nextWeek: "eeee 'at' p",
255
198
  other: "P"
256
- };
257
- const formatRelative$1 = (token, _date, _baseDate, _options) => formatRelativeLocale$1[token];
258
- function buildLocalizeFn(args) {
259
- return (value, options) => {
260
- const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
261
- let valuesArray;
262
- if (context === "formatting" && args.formattingValues) {
263
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
264
- const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
265
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
199
+ }, le = (e, t, n, r) => me[e];
200
+ function w(e) {
201
+ return (t, n) => {
202
+ const r = n != null && n.context ? String(n.context) : "standalone";
203
+ let a;
204
+ if (r === "formatting" && e.formattingValues) {
205
+ const o = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : o;
206
+ a = e.formattingValues[s] || e.formattingValues[o];
266
207
  } else {
267
- const defaultWidth = args.defaultWidth;
268
- const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
269
- valuesArray = args.values[width] || args.values[defaultWidth];
208
+ const o = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth;
209
+ a = e.values[s] || e.values[o];
270
210
  }
271
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
272
- return valuesArray[index];
211
+ const i = e.argumentCallback ? e.argumentCallback(t) : t;
212
+ return a[i];
273
213
  };
274
214
  }
275
- const eraValues$1 = {
215
+ const ge = {
276
216
  narrow: ["B", "A"],
277
217
  abbreviated: ["BC", "AD"],
278
218
  wide: ["Before Christ", "Anno Domini"]
279
- };
280
- const quarterValues$1 = {
219
+ }, we = {
281
220
  narrow: ["1", "2", "3", "4"],
282
221
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
283
222
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
284
- };
285
- const monthValues$1 = {
223
+ }, ye = {
286
224
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
287
225
  abbreviated: [
288
226
  "Jan",
@@ -312,8 +250,7 @@ const monthValues$1 = {
312
250
  "November",
313
251
  "December"
314
252
  ]
315
- };
316
- const dayValues$1 = {
253
+ }, be = {
317
254
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
318
255
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
319
256
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -326,8 +263,7 @@ const dayValues$1 = {
326
263
  "Friday",
327
264
  "Saturday"
328
265
  ]
329
- };
330
- const dayPeriodValues$1 = {
266
+ }, Pe = {
331
267
  narrow: {
332
268
  am: "a",
333
269
  pm: "p",
@@ -358,8 +294,7 @@ const dayPeriodValues$1 = {
358
294
  evening: "evening",
359
295
  night: "night"
360
296
  }
361
- };
362
- const formattingDayPeriodValues$1 = {
297
+ }, Me = {
363
298
  narrow: {
364
299
  am: "a",
365
300
  pm: "p",
@@ -390,125 +325,101 @@ const formattingDayPeriodValues$1 = {
390
325
  evening: "in the evening",
391
326
  night: "at night"
392
327
  }
393
- };
394
- const ordinalNumber$1 = (dirtyNumber, _options) => {
395
- const number = Number(dirtyNumber);
396
- const rem100 = number % 100;
397
- if (rem100 > 20 || rem100 < 10) {
398
- switch (rem100 % 10) {
328
+ }, We = (e, t) => {
329
+ const n = Number(e), r = n % 100;
330
+ if (r > 20 || r < 10)
331
+ switch (r % 10) {
399
332
  case 1:
400
- return number + "st";
333
+ return n + "st";
401
334
  case 2:
402
- return number + "nd";
335
+ return n + "nd";
403
336
  case 3:
404
- return number + "rd";
337
+ return n + "rd";
405
338
  }
406
- }
407
- return number + "th";
408
- };
409
- const localize$1 = {
410
- ordinalNumber: ordinalNumber$1,
411
- era: buildLocalizeFn({
412
- values: eraValues$1,
339
+ return n + "th";
340
+ }, ve = {
341
+ ordinalNumber: We,
342
+ era: w({
343
+ values: ge,
413
344
  defaultWidth: "wide"
414
345
  }),
415
- quarter: buildLocalizeFn({
416
- values: quarterValues$1,
346
+ quarter: w({
347
+ values: we,
417
348
  defaultWidth: "wide",
418
- argumentCallback: (quarter) => quarter - 1
349
+ argumentCallback: (e) => e - 1
419
350
  }),
420
- month: buildLocalizeFn({
421
- values: monthValues$1,
351
+ month: w({
352
+ values: ye,
422
353
  defaultWidth: "wide"
423
354
  }),
424
- day: buildLocalizeFn({
425
- values: dayValues$1,
355
+ day: w({
356
+ values: be,
426
357
  defaultWidth: "wide"
427
358
  }),
428
- dayPeriod: buildLocalizeFn({
429
- values: dayPeriodValues$1,
359
+ dayPeriod: w({
360
+ values: Pe,
430
361
  defaultWidth: "wide",
431
- formattingValues: formattingDayPeriodValues$1,
362
+ formattingValues: Me,
432
363
  defaultFormattingWidth: "wide"
433
364
  })
434
365
  };
435
- function buildMatchFn(args) {
436
- return (string, options = {}) => {
437
- const width = options.width;
438
- const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
439
- const matchResult = string.match(matchPattern);
440
- if (!matchResult) {
366
+ function y(e) {
367
+ return (t, n = {}) => {
368
+ const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
369
+ if (!i)
441
370
  return null;
442
- }
443
- const matchedString = matchResult[0];
444
- const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
445
- const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
371
+ const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? De(s, (b) => b.test(o)) : (
446
372
  // [TODO] -- I challenge you to fix the type
447
- findKey(parsePatterns, (pattern) => pattern.test(matchedString))
373
+ ke(s, (b) => b.test(o))
448
374
  );
449
- let value;
450
- value = args.valueCallback ? args.valueCallback(key) : key;
451
- value = options.valueCallback ? (
375
+ let d;
376
+ d = e.valueCallback ? e.valueCallback(c) : c, d = n.valueCallback ? (
452
377
  // [TODO] -- I challenge you to fix the type
453
- options.valueCallback(value)
454
- ) : value;
455
- const rest = string.slice(matchedString.length);
456
- return { value, rest };
378
+ n.valueCallback(d)
379
+ ) : d;
380
+ const f = t.slice(o.length);
381
+ return { value: d, rest: f };
457
382
  };
458
383
  }
459
- function findKey(object, predicate) {
460
- for (const key in object) {
461
- if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
462
- return key;
463
- }
464
- }
465
- return void 0;
384
+ function ke(e, t) {
385
+ for (const n in e)
386
+ if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
387
+ return n;
466
388
  }
467
- function findIndex(array, predicate) {
468
- for (let key = 0; key < array.length; key++) {
469
- if (predicate(array[key])) {
470
- return key;
471
- }
472
- }
473
- return void 0;
389
+ function De(e, t) {
390
+ for (let n = 0; n < e.length; n++)
391
+ if (t(e[n]))
392
+ return n;
474
393
  }
475
- function buildMatchPatternFn(args) {
476
- return (string, options = {}) => {
477
- const matchResult = string.match(args.matchPattern);
478
- if (!matchResult) return null;
479
- const matchedString = matchResult[0];
480
- const parseResult = string.match(args.parsePattern);
481
- if (!parseResult) return null;
482
- let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
483
- value = options.valueCallback ? options.valueCallback(value) : value;
484
- const rest = string.slice(matchedString.length);
485
- return { value, rest };
394
+ function I(e) {
395
+ return (t, n = {}) => {
396
+ const r = t.match(e.matchPattern);
397
+ if (!r) return null;
398
+ const a = r[0], i = t.match(e.parsePattern);
399
+ if (!i) return null;
400
+ let o = e.valueCallback ? e.valueCallback(i[0]) : i[0];
401
+ o = n.valueCallback ? n.valueCallback(o) : o;
402
+ const s = t.slice(a.length);
403
+ return { value: o, rest: s };
486
404
  };
487
405
  }
488
- const matchOrdinalNumberPattern$1 = /^(\d+)(th|st|nd|rd)?/i;
489
- const parseOrdinalNumberPattern$1 = /\d+/i;
490
- const matchEraPatterns$1 = {
406
+ const Oe = /^(\d+)(th|st|nd|rd)?/i, xe = /\d+/i, Se = {
491
407
  narrow: /^(b|a)/i,
492
408
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
493
409
  wide: /^(before christ|before common era|anno domini|common era)/i
494
- };
495
- const parseEraPatterns$1 = {
410
+ }, Ye = {
496
411
  any: [/^b/i, /^(a|c)/i]
497
- };
498
- const matchQuarterPatterns$1 = {
412
+ }, Te = {
499
413
  narrow: /^[1234]/i,
500
414
  abbreviated: /^q[1234]/i,
501
415
  wide: /^[1234](th|st|nd|rd)? quarter/i
502
- };
503
- const parseQuarterPatterns$1 = {
416
+ }, Ee = {
504
417
  any: [/1/i, /2/i, /3/i, /4/i]
505
- };
506
- const matchMonthPatterns$1 = {
418
+ }, Fe = {
507
419
  narrow: /^[jfmasond]/i,
508
420
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
509
421
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
510
- };
511
- const parseMonthPatterns$1 = {
422
+ }, Ce = {
512
423
  narrow: [
513
424
  /^j/i,
514
425
  /^f/i,
@@ -537,22 +448,18 @@ const parseMonthPatterns$1 = {
537
448
  /^n/i,
538
449
  /^d/i
539
450
  ]
540
- };
541
- const matchDayPatterns$1 = {
451
+ }, Ne = {
542
452
  narrow: /^[smtwf]/i,
543
453
  short: /^(su|mo|tu|we|th|fr|sa)/i,
544
454
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
545
455
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
546
- };
547
- const parseDayPatterns$1 = {
456
+ }, $e = {
548
457
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
549
458
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
550
- };
551
- const matchDayPeriodPatterns$1 = {
459
+ }, qe = {
552
460
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
553
461
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
554
- };
555
- const parseDayPeriodPatterns$1 = {
462
+ }, He = {
556
463
  any: {
557
464
  am: /^a/i,
558
465
  pm: /^p/i,
@@ -563,219 +470,183 @@ const parseDayPeriodPatterns$1 = {
563
470
  evening: /evening/i,
564
471
  night: /night/i
565
472
  }
566
- };
567
- const match$1 = {
568
- ordinalNumber: buildMatchPatternFn({
569
- matchPattern: matchOrdinalNumberPattern$1,
570
- parsePattern: parseOrdinalNumberPattern$1,
571
- valueCallback: (value) => parseInt(value, 10)
473
+ }, Xe = {
474
+ ordinalNumber: I({
475
+ matchPattern: Oe,
476
+ parsePattern: xe,
477
+ valueCallback: (e) => parseInt(e, 10)
572
478
  }),
573
- era: buildMatchFn({
574
- matchPatterns: matchEraPatterns$1,
479
+ era: y({
480
+ matchPatterns: Se,
575
481
  defaultMatchWidth: "wide",
576
- parsePatterns: parseEraPatterns$1,
482
+ parsePatterns: Ye,
577
483
  defaultParseWidth: "any"
578
484
  }),
579
- quarter: buildMatchFn({
580
- matchPatterns: matchQuarterPatterns$1,
485
+ quarter: y({
486
+ matchPatterns: Te,
581
487
  defaultMatchWidth: "wide",
582
- parsePatterns: parseQuarterPatterns$1,
488
+ parsePatterns: Ee,
583
489
  defaultParseWidth: "any",
584
- valueCallback: (index) => index + 1
490
+ valueCallback: (e) => e + 1
585
491
  }),
586
- month: buildMatchFn({
587
- matchPatterns: matchMonthPatterns$1,
492
+ month: y({
493
+ matchPatterns: Fe,
588
494
  defaultMatchWidth: "wide",
589
- parsePatterns: parseMonthPatterns$1,
495
+ parsePatterns: Ce,
590
496
  defaultParseWidth: "any"
591
497
  }),
592
- day: buildMatchFn({
593
- matchPatterns: matchDayPatterns$1,
498
+ day: y({
499
+ matchPatterns: Ne,
594
500
  defaultMatchWidth: "wide",
595
- parsePatterns: parseDayPatterns$1,
501
+ parsePatterns: $e,
596
502
  defaultParseWidth: "any"
597
503
  }),
598
- dayPeriod: buildMatchFn({
599
- matchPatterns: matchDayPeriodPatterns$1,
504
+ dayPeriod: y({
505
+ matchPatterns: qe,
600
506
  defaultMatchWidth: "any",
601
- parsePatterns: parseDayPeriodPatterns$1,
507
+ parsePatterns: He,
602
508
  defaultParseWidth: "any"
603
509
  })
604
- };
605
- const enUS = {
510
+ }, J = {
606
511
  code: "en-US",
607
- formatDistance: formatDistance$1,
608
- formatLong: formatLong$1,
609
- formatRelative: formatRelative$1,
610
- localize: localize$1,
611
- match: match$1,
512
+ formatDistance: se,
513
+ formatLong: fe,
514
+ formatRelative: le,
515
+ localize: ve,
516
+ match: Xe,
612
517
  options: {
613
518
  weekStartsOn: 0,
614
519
  firstWeekContainsDate: 1
615
520
  }
616
521
  };
617
- function getDayOfYear(date, options) {
618
- const _date = toDate(date, options == null ? void 0 : options.in);
619
- const diff = differenceInCalendarDays(_date, startOfYear(_date));
620
- const dayOfYear = diff + 1;
621
- return dayOfYear;
522
+ function _e(e, t) {
523
+ const n = g(e, t == null ? void 0 : t.in);
524
+ return ne(n, oe(n)) + 1;
622
525
  }
623
- function getISOWeek(date, options) {
624
- const _date = toDate(date, options == null ? void 0 : options.in);
625
- const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
626
- return Math.round(diff / millisecondsInWeek) + 1;
526
+ function Le(e, t) {
527
+ const n = g(e, t == null ? void 0 : t.in), r = +S(n) - +re(n);
528
+ return Math.round(r / G) + 1;
627
529
  }
628
- function getWeekYear(date, options) {
629
- var _a, _b, _c, _d;
630
- const _date = toDate(date, options == null ? void 0 : options.in);
631
- const year = _date.getFullYear();
632
- const defaultOptions2 = getDefaultOptions();
633
- const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
634
- const firstWeekOfNextYear = constructFrom((options == null ? void 0 : options.in) || date, 0);
635
- firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
636
- firstWeekOfNextYear.setHours(0, 0, 0, 0);
637
- const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
638
- const firstWeekOfThisYear = constructFrom((options == null ? void 0 : options.in) || date, 0);
639
- firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
640
- firstWeekOfThisYear.setHours(0, 0, 0, 0);
641
- const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
642
- if (+_date >= +startOfNextYear) {
643
- return year + 1;
644
- } else if (+_date >= +startOfThisYear) {
645
- return year;
646
- } else {
647
- return year - 1;
648
- }
530
+ function U(e, t) {
531
+ var f, b, O, x;
532
+ const n = g(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = T(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((b = (f = t == null ? void 0 : t.locale) == null ? void 0 : f.options) == null ? void 0 : b.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((x = (O = a.locale) == null ? void 0 : O.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, o = l((t == null ? void 0 : t.in) || e, 0);
533
+ o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
534
+ const s = v(o, t), c = l((t == null ? void 0 : t.in) || e, 0);
535
+ c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
536
+ const d = v(c, t);
537
+ return +n >= +s ? r + 1 : +n >= +d ? r : r - 1;
649
538
  }
650
- function startOfWeekYear(date, options) {
651
- var _a, _b, _c, _d;
652
- const defaultOptions2 = getDefaultOptions();
653
- const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
654
- const year = getWeekYear(date, options);
655
- const firstWeek = constructFrom((options == null ? void 0 : options.in) || date, 0);
656
- firstWeek.setFullYear(year, 0, firstWeekContainsDate);
657
- firstWeek.setHours(0, 0, 0, 0);
658
- const _date = startOfWeek(firstWeek, options);
659
- return _date;
539
+ function Qe(e, t) {
540
+ var s, c, d, f;
541
+ const n = T(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((f = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = U(e, t), i = l((t == null ? void 0 : t.in) || e, 0);
542
+ return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), v(i, t);
660
543
  }
661
- function getWeek(date, options) {
662
- const _date = toDate(date, options == null ? void 0 : options.in);
663
- const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
664
- return Math.round(diff / millisecondsInWeek) + 1;
544
+ function Ve(e, t) {
545
+ const n = g(e, t == null ? void 0 : t.in), r = +v(n, t) - +Qe(n, t);
546
+ return Math.round(r / G) + 1;
665
547
  }
666
- function addLeadingZeros(number, targetLength) {
667
- const sign = number < 0 ? "-" : "";
668
- const output = Math.abs(number).toString().padStart(targetLength, "0");
669
- return sign + output;
548
+ function u(e, t) {
549
+ const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
550
+ return n + r;
670
551
  }
671
- const lightFormatters = {
552
+ const P = {
672
553
  // Year
673
- y(date, token) {
674
- const signedYear = date.getFullYear();
675
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
676
- return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
554
+ y(e, t) {
555
+ const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
556
+ return u(t === "yy" ? r % 100 : r, t.length);
677
557
  },
678
558
  // Month
679
- M(date, token) {
680
- const month = date.getMonth();
681
- return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
559
+ M(e, t) {
560
+ const n = e.getMonth();
561
+ return t === "M" ? String(n + 1) : u(n + 1, 2);
682
562
  },
683
563
  // Day of the month
684
- d(date, token) {
685
- return addLeadingZeros(date.getDate(), token.length);
564
+ d(e, t) {
565
+ return u(e.getDate(), t.length);
686
566
  },
687
567
  // AM or PM
688
- a(date, token) {
689
- const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
690
- switch (token) {
568
+ a(e, t) {
569
+ const n = e.getHours() / 12 >= 1 ? "pm" : "am";
570
+ switch (t) {
691
571
  case "a":
692
572
  case "aa":
693
- return dayPeriodEnumValue.toUpperCase();
573
+ return n.toUpperCase();
694
574
  case "aaa":
695
- return dayPeriodEnumValue;
575
+ return n;
696
576
  case "aaaaa":
697
- return dayPeriodEnumValue[0];
577
+ return n[0];
698
578
  case "aaaa":
699
579
  default:
700
- return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
580
+ return n === "am" ? "a.m." : "p.m.";
701
581
  }
702
582
  },
703
583
  // Hour [1-12]
704
- h(date, token) {
705
- return addLeadingZeros(date.getHours() % 12 || 12, token.length);
584
+ h(e, t) {
585
+ return u(e.getHours() % 12 || 12, t.length);
706
586
  },
707
587
  // Hour [0-23]
708
- H(date, token) {
709
- return addLeadingZeros(date.getHours(), token.length);
588
+ H(e, t) {
589
+ return u(e.getHours(), t.length);
710
590
  },
711
591
  // Minute
712
- m(date, token) {
713
- return addLeadingZeros(date.getMinutes(), token.length);
592
+ m(e, t) {
593
+ return u(e.getMinutes(), t.length);
714
594
  },
715
595
  // Second
716
- s(date, token) {
717
- return addLeadingZeros(date.getSeconds(), token.length);
596
+ s(e, t) {
597
+ return u(e.getSeconds(), t.length);
718
598
  },
719
599
  // Fraction of second
720
- S(date, token) {
721
- const numberOfDigits = token.length;
722
- const milliseconds = date.getMilliseconds();
723
- const fractionalSeconds = Math.trunc(
724
- milliseconds * Math.pow(10, numberOfDigits - 3)
600
+ S(e, t) {
601
+ const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
602
+ r * Math.pow(10, n - 3)
725
603
  );
726
- return addLeadingZeros(fractionalSeconds, token.length);
604
+ return u(a, t.length);
727
605
  }
728
- };
729
- const dayPeriodEnum = {
606
+ }, k = {
730
607
  midnight: "midnight",
731
608
  noon: "noon",
732
609
  morning: "morning",
733
610
  afternoon: "afternoon",
734
611
  evening: "evening",
735
612
  night: "night"
736
- };
737
- const formatters = {
613
+ }, L = {
738
614
  // Era
739
- G: function(date, token, localize2) {
740
- const era = date.getFullYear() > 0 ? 1 : 0;
741
- switch (token) {
615
+ G: function(e, t, n) {
616
+ const r = e.getFullYear() > 0 ? 1 : 0;
617
+ switch (t) {
742
618
  case "G":
743
619
  case "GG":
744
620
  case "GGG":
745
- return localize2.era(era, { width: "abbreviated" });
621
+ return n.era(r, { width: "abbreviated" });
746
622
  case "GGGGG":
747
- return localize2.era(era, { width: "narrow" });
623
+ return n.era(r, { width: "narrow" });
748
624
  case "GGGG":
749
625
  default:
750
- return localize2.era(era, { width: "wide" });
626
+ return n.era(r, { width: "wide" });
751
627
  }
752
628
  },
753
629
  // Year
754
- y: function(date, token, localize2) {
755
- if (token === "yo") {
756
- const signedYear = date.getFullYear();
757
- const year = signedYear > 0 ? signedYear : 1 - signedYear;
758
- return localize2.ordinalNumber(year, { unit: "year" });
630
+ y: function(e, t, n) {
631
+ if (t === "yo") {
632
+ const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
633
+ return n.ordinalNumber(a, { unit: "year" });
759
634
  }
760
- return lightFormatters.y(date, token);
635
+ return P.y(e, t);
761
636
  },
762
637
  // Local week-numbering year
763
- Y: function(date, token, localize2, options) {
764
- const signedWeekYear = getWeekYear(date, options);
765
- const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
766
- if (token === "YY") {
767
- const twoDigitYear = weekYear % 100;
768
- return addLeadingZeros(twoDigitYear, 2);
638
+ Y: function(e, t, n, r) {
639
+ const a = U(e, r), i = a > 0 ? a : 1 - a;
640
+ if (t === "YY") {
641
+ const o = i % 100;
642
+ return u(o, 2);
769
643
  }
770
- if (token === "Yo") {
771
- return localize2.ordinalNumber(weekYear, { unit: "year" });
772
- }
773
- return addLeadingZeros(weekYear, token.length);
644
+ return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : u(i, t.length);
774
645
  },
775
646
  // ISO week-numbering year
776
- R: function(date, token) {
777
- const isoWeekYear = getISOWeekYear(date);
778
- return addLeadingZeros(isoWeekYear, token.length);
647
+ R: function(e, t) {
648
+ const n = B(e);
649
+ return u(n, t.length);
779
650
  },
780
651
  // Extended year. This is a single number designating the year of this calendar system.
781
652
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -786,696 +657,603 @@ const formatters = {
786
657
  // | BC 2 | 2 | -1 |
787
658
  // Also `yy` always returns the last two digits of a year,
788
659
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
789
- u: function(date, token) {
790
- const year = date.getFullYear();
791
- return addLeadingZeros(year, token.length);
660
+ u: function(e, t) {
661
+ const n = e.getFullYear();
662
+ return u(n, t.length);
792
663
  },
793
664
  // Quarter
794
- Q: function(date, token, localize2) {
795
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
796
- switch (token) {
665
+ Q: function(e, t, n) {
666
+ const r = Math.ceil((e.getMonth() + 1) / 3);
667
+ switch (t) {
797
668
  case "Q":
798
- return String(quarter);
669
+ return String(r);
799
670
  case "QQ":
800
- return addLeadingZeros(quarter, 2);
671
+ return u(r, 2);
801
672
  case "Qo":
802
- return localize2.ordinalNumber(quarter, { unit: "quarter" });
673
+ return n.ordinalNumber(r, { unit: "quarter" });
803
674
  case "QQQ":
804
- return localize2.quarter(quarter, {
675
+ return n.quarter(r, {
805
676
  width: "abbreviated",
806
677
  context: "formatting"
807
678
  });
808
679
  case "QQQQQ":
809
- return localize2.quarter(quarter, {
680
+ return n.quarter(r, {
810
681
  width: "narrow",
811
682
  context: "formatting"
812
683
  });
813
684
  case "QQQQ":
814
685
  default:
815
- return localize2.quarter(quarter, {
686
+ return n.quarter(r, {
816
687
  width: "wide",
817
688
  context: "formatting"
818
689
  });
819
690
  }
820
691
  },
821
692
  // Stand-alone quarter
822
- q: function(date, token, localize2) {
823
- const quarter = Math.ceil((date.getMonth() + 1) / 3);
824
- switch (token) {
693
+ q: function(e, t, n) {
694
+ const r = Math.ceil((e.getMonth() + 1) / 3);
695
+ switch (t) {
825
696
  case "q":
826
- return String(quarter);
697
+ return String(r);
827
698
  case "qq":
828
- return addLeadingZeros(quarter, 2);
699
+ return u(r, 2);
829
700
  case "qo":
830
- return localize2.ordinalNumber(quarter, { unit: "quarter" });
701
+ return n.ordinalNumber(r, { unit: "quarter" });
831
702
  case "qqq":
832
- return localize2.quarter(quarter, {
703
+ return n.quarter(r, {
833
704
  width: "abbreviated",
834
705
  context: "standalone"
835
706
  });
836
707
  case "qqqqq":
837
- return localize2.quarter(quarter, {
708
+ return n.quarter(r, {
838
709
  width: "narrow",
839
710
  context: "standalone"
840
711
  });
841
712
  case "qqqq":
842
713
  default:
843
- return localize2.quarter(quarter, {
714
+ return n.quarter(r, {
844
715
  width: "wide",
845
716
  context: "standalone"
846
717
  });
847
718
  }
848
719
  },
849
720
  // Month
850
- M: function(date, token, localize2) {
851
- const month = date.getMonth();
852
- switch (token) {
721
+ M: function(e, t, n) {
722
+ const r = e.getMonth();
723
+ switch (t) {
853
724
  case "M":
854
725
  case "MM":
855
- return lightFormatters.M(date, token);
726
+ return P.M(e, t);
856
727
  case "Mo":
857
- return localize2.ordinalNumber(month + 1, { unit: "month" });
728
+ return n.ordinalNumber(r + 1, { unit: "month" });
858
729
  case "MMM":
859
- return localize2.month(month, {
730
+ return n.month(r, {
860
731
  width: "abbreviated",
861
732
  context: "formatting"
862
733
  });
863
734
  case "MMMMM":
864
- return localize2.month(month, {
735
+ return n.month(r, {
865
736
  width: "narrow",
866
737
  context: "formatting"
867
738
  });
868
739
  case "MMMM":
869
740
  default:
870
- return localize2.month(month, { width: "wide", context: "formatting" });
741
+ return n.month(r, { width: "wide", context: "formatting" });
871
742
  }
872
743
  },
873
744
  // Stand-alone month
874
- L: function(date, token, localize2) {
875
- const month = date.getMonth();
876
- switch (token) {
745
+ L: function(e, t, n) {
746
+ const r = e.getMonth();
747
+ switch (t) {
877
748
  case "L":
878
- return String(month + 1);
749
+ return String(r + 1);
879
750
  case "LL":
880
- return addLeadingZeros(month + 1, 2);
751
+ return u(r + 1, 2);
881
752
  case "Lo":
882
- return localize2.ordinalNumber(month + 1, { unit: "month" });
753
+ return n.ordinalNumber(r + 1, { unit: "month" });
883
754
  case "LLL":
884
- return localize2.month(month, {
755
+ return n.month(r, {
885
756
  width: "abbreviated",
886
757
  context: "standalone"
887
758
  });
888
759
  case "LLLLL":
889
- return localize2.month(month, {
760
+ return n.month(r, {
890
761
  width: "narrow",
891
762
  context: "standalone"
892
763
  });
893
764
  case "LLLL":
894
765
  default:
895
- return localize2.month(month, { width: "wide", context: "standalone" });
766
+ return n.month(r, { width: "wide", context: "standalone" });
896
767
  }
897
768
  },
898
769
  // Local week of year
899
- w: function(date, token, localize2, options) {
900
- const week = getWeek(date, options);
901
- if (token === "wo") {
902
- return localize2.ordinalNumber(week, { unit: "week" });
903
- }
904
- return addLeadingZeros(week, token.length);
770
+ w: function(e, t, n, r) {
771
+ const a = Ve(e, r);
772
+ return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : u(a, t.length);
905
773
  },
906
774
  // ISO week of year
907
- I: function(date, token, localize2) {
908
- const isoWeek = getISOWeek(date);
909
- if (token === "Io") {
910
- return localize2.ordinalNumber(isoWeek, { unit: "week" });
911
- }
912
- return addLeadingZeros(isoWeek, token.length);
775
+ I: function(e, t, n) {
776
+ const r = Le(e);
777
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : u(r, t.length);
913
778
  },
914
779
  // Day of the month
915
- d: function(date, token, localize2) {
916
- if (token === "do") {
917
- return localize2.ordinalNumber(date.getDate(), { unit: "date" });
918
- }
919
- return lightFormatters.d(date, token);
780
+ d: function(e, t, n) {
781
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : P.d(e, t);
920
782
  },
921
783
  // Day of year
922
- D: function(date, token, localize2) {
923
- const dayOfYear = getDayOfYear(date);
924
- if (token === "Do") {
925
- return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
926
- }
927
- return addLeadingZeros(dayOfYear, token.length);
784
+ D: function(e, t, n) {
785
+ const r = _e(e);
786
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : u(r, t.length);
928
787
  },
929
788
  // Day of week
930
- E: function(date, token, localize2) {
931
- const dayOfWeek = date.getDay();
932
- switch (token) {
789
+ E: function(e, t, n) {
790
+ const r = e.getDay();
791
+ switch (t) {
933
792
  case "E":
934
793
  case "EE":
935
794
  case "EEE":
936
- return localize2.day(dayOfWeek, {
795
+ return n.day(r, {
937
796
  width: "abbreviated",
938
797
  context: "formatting"
939
798
  });
940
799
  case "EEEEE":
941
- return localize2.day(dayOfWeek, {
800
+ return n.day(r, {
942
801
  width: "narrow",
943
802
  context: "formatting"
944
803
  });
945
804
  case "EEEEEE":
946
- return localize2.day(dayOfWeek, {
805
+ return n.day(r, {
947
806
  width: "short",
948
807
  context: "formatting"
949
808
  });
950
809
  case "EEEE":
951
810
  default:
952
- return localize2.day(dayOfWeek, {
811
+ return n.day(r, {
953
812
  width: "wide",
954
813
  context: "formatting"
955
814
  });
956
815
  }
957
816
  },
958
817
  // Local day of week
959
- e: function(date, token, localize2, options) {
960
- const dayOfWeek = date.getDay();
961
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
962
- switch (token) {
818
+ e: function(e, t, n, r) {
819
+ const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
820
+ switch (t) {
963
821
  case "e":
964
- return String(localDayOfWeek);
822
+ return String(i);
965
823
  case "ee":
966
- return addLeadingZeros(localDayOfWeek, 2);
824
+ return u(i, 2);
967
825
  case "eo":
968
- return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
826
+ return n.ordinalNumber(i, { unit: "day" });
969
827
  case "eee":
970
- return localize2.day(dayOfWeek, {
828
+ return n.day(a, {
971
829
  width: "abbreviated",
972
830
  context: "formatting"
973
831
  });
974
832
  case "eeeee":
975
- return localize2.day(dayOfWeek, {
833
+ return n.day(a, {
976
834
  width: "narrow",
977
835
  context: "formatting"
978
836
  });
979
837
  case "eeeeee":
980
- return localize2.day(dayOfWeek, {
838
+ return n.day(a, {
981
839
  width: "short",
982
840
  context: "formatting"
983
841
  });
984
842
  case "eeee":
985
843
  default:
986
- return localize2.day(dayOfWeek, {
844
+ return n.day(a, {
987
845
  width: "wide",
988
846
  context: "formatting"
989
847
  });
990
848
  }
991
849
  },
992
850
  // Stand-alone local day of week
993
- c: function(date, token, localize2, options) {
994
- const dayOfWeek = date.getDay();
995
- const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
996
- switch (token) {
851
+ c: function(e, t, n, r) {
852
+ const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
853
+ switch (t) {
997
854
  case "c":
998
- return String(localDayOfWeek);
855
+ return String(i);
999
856
  case "cc":
1000
- return addLeadingZeros(localDayOfWeek, token.length);
857
+ return u(i, t.length);
1001
858
  case "co":
1002
- return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
859
+ return n.ordinalNumber(i, { unit: "day" });
1003
860
  case "ccc":
1004
- return localize2.day(dayOfWeek, {
861
+ return n.day(a, {
1005
862
  width: "abbreviated",
1006
863
  context: "standalone"
1007
864
  });
1008
865
  case "ccccc":
1009
- return localize2.day(dayOfWeek, {
866
+ return n.day(a, {
1010
867
  width: "narrow",
1011
868
  context: "standalone"
1012
869
  });
1013
870
  case "cccccc":
1014
- return localize2.day(dayOfWeek, {
871
+ return n.day(a, {
1015
872
  width: "short",
1016
873
  context: "standalone"
1017
874
  });
1018
875
  case "cccc":
1019
876
  default:
1020
- return localize2.day(dayOfWeek, {
877
+ return n.day(a, {
1021
878
  width: "wide",
1022
879
  context: "standalone"
1023
880
  });
1024
881
  }
1025
882
  },
1026
883
  // ISO day of week
1027
- i: function(date, token, localize2) {
1028
- const dayOfWeek = date.getDay();
1029
- const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
1030
- switch (token) {
884
+ i: function(e, t, n) {
885
+ const r = e.getDay(), a = r === 0 ? 7 : r;
886
+ switch (t) {
1031
887
  case "i":
1032
- return String(isoDayOfWeek);
888
+ return String(a);
1033
889
  case "ii":
1034
- return addLeadingZeros(isoDayOfWeek, token.length);
890
+ return u(a, t.length);
1035
891
  case "io":
1036
- return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
892
+ return n.ordinalNumber(a, { unit: "day" });
1037
893
  case "iii":
1038
- return localize2.day(dayOfWeek, {
894
+ return n.day(r, {
1039
895
  width: "abbreviated",
1040
896
  context: "formatting"
1041
897
  });
1042
898
  case "iiiii":
1043
- return localize2.day(dayOfWeek, {
899
+ return n.day(r, {
1044
900
  width: "narrow",
1045
901
  context: "formatting"
1046
902
  });
1047
903
  case "iiiiii":
1048
- return localize2.day(dayOfWeek, {
904
+ return n.day(r, {
1049
905
  width: "short",
1050
906
  context: "formatting"
1051
907
  });
1052
908
  case "iiii":
1053
909
  default:
1054
- return localize2.day(dayOfWeek, {
910
+ return n.day(r, {
1055
911
  width: "wide",
1056
912
  context: "formatting"
1057
913
  });
1058
914
  }
1059
915
  },
1060
916
  // AM or PM
1061
- a: function(date, token, localize2) {
1062
- const hours = date.getHours();
1063
- const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
1064
- switch (token) {
917
+ a: function(e, t, n) {
918
+ const a = e.getHours() / 12 >= 1 ? "pm" : "am";
919
+ switch (t) {
1065
920
  case "a":
1066
921
  case "aa":
1067
- return localize2.dayPeriod(dayPeriodEnumValue, {
922
+ return n.dayPeriod(a, {
1068
923
  width: "abbreviated",
1069
924
  context: "formatting"
1070
925
  });
1071
926
  case "aaa":
1072
- return localize2.dayPeriod(dayPeriodEnumValue, {
927
+ return n.dayPeriod(a, {
1073
928
  width: "abbreviated",
1074
929
  context: "formatting"
1075
930
  }).toLowerCase();
1076
931
  case "aaaaa":
1077
- return localize2.dayPeriod(dayPeriodEnumValue, {
932
+ return n.dayPeriod(a, {
1078
933
  width: "narrow",
1079
934
  context: "formatting"
1080
935
  });
1081
936
  case "aaaa":
1082
937
  default:
1083
- return localize2.dayPeriod(dayPeriodEnumValue, {
938
+ return n.dayPeriod(a, {
1084
939
  width: "wide",
1085
940
  context: "formatting"
1086
941
  });
1087
942
  }
1088
943
  },
1089
944
  // AM, PM, midnight, noon
1090
- b: function(date, token, localize2) {
1091
- const hours = date.getHours();
1092
- let dayPeriodEnumValue;
1093
- if (hours === 12) {
1094
- dayPeriodEnumValue = dayPeriodEnum.noon;
1095
- } else if (hours === 0) {
1096
- dayPeriodEnumValue = dayPeriodEnum.midnight;
1097
- } else {
1098
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
1099
- }
1100
- switch (token) {
945
+ b: function(e, t, n) {
946
+ const r = e.getHours();
947
+ let a;
948
+ switch (r === 12 ? a = k.noon : r === 0 ? a = k.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
1101
949
  case "b":
1102
950
  case "bb":
1103
- return localize2.dayPeriod(dayPeriodEnumValue, {
951
+ return n.dayPeriod(a, {
1104
952
  width: "abbreviated",
1105
953
  context: "formatting"
1106
954
  });
1107
955
  case "bbb":
1108
- return localize2.dayPeriod(dayPeriodEnumValue, {
956
+ return n.dayPeriod(a, {
1109
957
  width: "abbreviated",
1110
958
  context: "formatting"
1111
959
  }).toLowerCase();
1112
960
  case "bbbbb":
1113
- return localize2.dayPeriod(dayPeriodEnumValue, {
961
+ return n.dayPeriod(a, {
1114
962
  width: "narrow",
1115
963
  context: "formatting"
1116
964
  });
1117
965
  case "bbbb":
1118
966
  default:
1119
- return localize2.dayPeriod(dayPeriodEnumValue, {
967
+ return n.dayPeriod(a, {
1120
968
  width: "wide",
1121
969
  context: "formatting"
1122
970
  });
1123
971
  }
1124
972
  },
1125
973
  // in the morning, in the afternoon, in the evening, at night
1126
- B: function(date, token, localize2) {
1127
- const hours = date.getHours();
1128
- let dayPeriodEnumValue;
1129
- if (hours >= 17) {
1130
- dayPeriodEnumValue = dayPeriodEnum.evening;
1131
- } else if (hours >= 12) {
1132
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
1133
- } else if (hours >= 4) {
1134
- dayPeriodEnumValue = dayPeriodEnum.morning;
1135
- } else {
1136
- dayPeriodEnumValue = dayPeriodEnum.night;
1137
- }
1138
- switch (token) {
974
+ B: function(e, t, n) {
975
+ const r = e.getHours();
976
+ let a;
977
+ switch (r >= 17 ? a = k.evening : r >= 12 ? a = k.afternoon : r >= 4 ? a = k.morning : a = k.night, t) {
1139
978
  case "B":
1140
979
  case "BB":
1141
980
  case "BBB":
1142
- return localize2.dayPeriod(dayPeriodEnumValue, {
981
+ return n.dayPeriod(a, {
1143
982
  width: "abbreviated",
1144
983
  context: "formatting"
1145
984
  });
1146
985
  case "BBBBB":
1147
- return localize2.dayPeriod(dayPeriodEnumValue, {
986
+ return n.dayPeriod(a, {
1148
987
  width: "narrow",
1149
988
  context: "formatting"
1150
989
  });
1151
990
  case "BBBB":
1152
991
  default:
1153
- return localize2.dayPeriod(dayPeriodEnumValue, {
992
+ return n.dayPeriod(a, {
1154
993
  width: "wide",
1155
994
  context: "formatting"
1156
995
  });
1157
996
  }
1158
997
  },
1159
998
  // Hour [1-12]
1160
- h: function(date, token, localize2) {
1161
- if (token === "ho") {
1162
- let hours = date.getHours() % 12;
1163
- if (hours === 0) hours = 12;
1164
- return localize2.ordinalNumber(hours, { unit: "hour" });
999
+ h: function(e, t, n) {
1000
+ if (t === "ho") {
1001
+ let r = e.getHours() % 12;
1002
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1165
1003
  }
1166
- return lightFormatters.h(date, token);
1004
+ return P.h(e, t);
1167
1005
  },
1168
1006
  // Hour [0-23]
1169
- H: function(date, token, localize2) {
1170
- if (token === "Ho") {
1171
- return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
1172
- }
1173
- return lightFormatters.H(date, token);
1007
+ H: function(e, t, n) {
1008
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : P.H(e, t);
1174
1009
  },
1175
1010
  // Hour [0-11]
1176
- K: function(date, token, localize2) {
1177
- const hours = date.getHours() % 12;
1178
- if (token === "Ko") {
1179
- return localize2.ordinalNumber(hours, { unit: "hour" });
1180
- }
1181
- return addLeadingZeros(hours, token.length);
1011
+ K: function(e, t, n) {
1012
+ const r = e.getHours() % 12;
1013
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(r, t.length);
1182
1014
  },
1183
1015
  // Hour [1-24]
1184
- k: function(date, token, localize2) {
1185
- let hours = date.getHours();
1186
- if (hours === 0) hours = 24;
1187
- if (token === "ko") {
1188
- return localize2.ordinalNumber(hours, { unit: "hour" });
1189
- }
1190
- return addLeadingZeros(hours, token.length);
1016
+ k: function(e, t, n) {
1017
+ let r = e.getHours();
1018
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(r, t.length);
1191
1019
  },
1192
1020
  // Minute
1193
- m: function(date, token, localize2) {
1194
- if (token === "mo") {
1195
- return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
1196
- }
1197
- return lightFormatters.m(date, token);
1021
+ m: function(e, t, n) {
1022
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : P.m(e, t);
1198
1023
  },
1199
1024
  // Second
1200
- s: function(date, token, localize2) {
1201
- if (token === "so") {
1202
- return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
1203
- }
1204
- return lightFormatters.s(date, token);
1025
+ s: function(e, t, n) {
1026
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : P.s(e, t);
1205
1027
  },
1206
1028
  // Fraction of second
1207
- S: function(date, token) {
1208
- return lightFormatters.S(date, token);
1029
+ S: function(e, t) {
1030
+ return P.S(e, t);
1209
1031
  },
1210
1032
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1211
- X: function(date, token, _localize) {
1212
- const timezoneOffset = date.getTimezoneOffset();
1213
- if (timezoneOffset === 0) {
1033
+ X: function(e, t, n) {
1034
+ const r = e.getTimezoneOffset();
1035
+ if (r === 0)
1214
1036
  return "Z";
1215
- }
1216
- switch (token) {
1037
+ switch (t) {
1217
1038
  case "X":
1218
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
1039
+ return V(r);
1219
1040
  case "XXXX":
1220
1041
  case "XX":
1221
- return formatTimezone(timezoneOffset);
1042
+ return W(r);
1222
1043
  case "XXXXX":
1223
1044
  case "XXX":
1224
1045
  default:
1225
- return formatTimezone(timezoneOffset, ":");
1046
+ return W(r, ":");
1226
1047
  }
1227
1048
  },
1228
1049
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1229
- x: function(date, token, _localize) {
1230
- const timezoneOffset = date.getTimezoneOffset();
1231
- switch (token) {
1050
+ x: function(e, t, n) {
1051
+ const r = e.getTimezoneOffset();
1052
+ switch (t) {
1232
1053
  case "x":
1233
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
1054
+ return V(r);
1234
1055
  case "xxxx":
1235
1056
  case "xx":
1236
- return formatTimezone(timezoneOffset);
1057
+ return W(r);
1237
1058
  case "xxxxx":
1238
1059
  case "xxx":
1239
1060
  default:
1240
- return formatTimezone(timezoneOffset, ":");
1061
+ return W(r, ":");
1241
1062
  }
1242
1063
  },
1243
1064
  // Timezone (GMT)
1244
- O: function(date, token, _localize) {
1245
- const timezoneOffset = date.getTimezoneOffset();
1246
- switch (token) {
1065
+ O: function(e, t, n) {
1066
+ const r = e.getTimezoneOffset();
1067
+ switch (t) {
1247
1068
  case "O":
1248
1069
  case "OO":
1249
1070
  case "OOO":
1250
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
1071
+ return "GMT" + Q(r, ":");
1251
1072
  case "OOOO":
1252
1073
  default:
1253
- return "GMT" + formatTimezone(timezoneOffset, ":");
1074
+ return "GMT" + W(r, ":");
1254
1075
  }
1255
1076
  },
1256
1077
  // Timezone (specific non-location)
1257
- z: function(date, token, _localize) {
1258
- const timezoneOffset = date.getTimezoneOffset();
1259
- switch (token) {
1078
+ z: function(e, t, n) {
1079
+ const r = e.getTimezoneOffset();
1080
+ switch (t) {
1260
1081
  case "z":
1261
1082
  case "zz":
1262
1083
  case "zzz":
1263
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
1084
+ return "GMT" + Q(r, ":");
1264
1085
  case "zzzz":
1265
1086
  default:
1266
- return "GMT" + formatTimezone(timezoneOffset, ":");
1087
+ return "GMT" + W(r, ":");
1267
1088
  }
1268
1089
  },
1269
1090
  // Seconds timestamp
1270
- t: function(date, token, _localize) {
1271
- const timestamp = Math.trunc(+date / 1e3);
1272
- return addLeadingZeros(timestamp, token.length);
1091
+ t: function(e, t, n) {
1092
+ const r = Math.trunc(+e / 1e3);
1093
+ return u(r, t.length);
1273
1094
  },
1274
1095
  // Milliseconds timestamp
1275
- T: function(date, token, _localize) {
1276
- return addLeadingZeros(+date, token.length);
1096
+ T: function(e, t, n) {
1097
+ return u(+e, t.length);
1277
1098
  }
1278
1099
  };
1279
- function formatTimezoneShort(offset, delimiter = "") {
1280
- const sign = offset > 0 ? "-" : "+";
1281
- const absOffset = Math.abs(offset);
1282
- const hours = Math.trunc(absOffset / 60);
1283
- const minutes = absOffset % 60;
1284
- if (minutes === 0) {
1285
- return sign + String(hours);
1286
- }
1287
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1100
+ function Q(e, t = "") {
1101
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
1102
+ return i === 0 ? n + String(a) : n + String(a) + t + u(i, 2);
1288
1103
  }
1289
- function formatTimezoneWithOptionalMinutes(offset, delimiter) {
1290
- if (offset % 60 === 0) {
1291
- const sign = offset > 0 ? "-" : "+";
1292
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
1293
- }
1294
- return formatTimezone(offset, delimiter);
1104
+ function V(e, t) {
1105
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + u(Math.abs(e) / 60, 2) : W(e, t);
1295
1106
  }
1296
- function formatTimezone(offset, delimiter = "") {
1297
- const sign = offset > 0 ? "-" : "+";
1298
- const absOffset = Math.abs(offset);
1299
- const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
1300
- const minutes = addLeadingZeros(absOffset % 60, 2);
1301
- return sign + hours + delimiter + minutes;
1107
+ function W(e, t = "") {
1108
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = u(Math.trunc(r / 60), 2), i = u(r % 60, 2);
1109
+ return n + a + t + i;
1302
1110
  }
1303
- const dateLongFormatter = (pattern, formatLong2) => {
1304
- switch (pattern) {
1111
+ const R = (e, t) => {
1112
+ switch (e) {
1305
1113
  case "P":
1306
- return formatLong2.date({ width: "short" });
1114
+ return t.date({ width: "short" });
1307
1115
  case "PP":
1308
- return formatLong2.date({ width: "medium" });
1116
+ return t.date({ width: "medium" });
1309
1117
  case "PPP":
1310
- return formatLong2.date({ width: "long" });
1118
+ return t.date({ width: "long" });
1311
1119
  case "PPPP":
1312
1120
  default:
1313
- return formatLong2.date({ width: "full" });
1121
+ return t.date({ width: "full" });
1314
1122
  }
1315
- };
1316
- const timeLongFormatter = (pattern, formatLong2) => {
1317
- switch (pattern) {
1123
+ }, K = (e, t) => {
1124
+ switch (e) {
1318
1125
  case "p":
1319
- return formatLong2.time({ width: "short" });
1126
+ return t.time({ width: "short" });
1320
1127
  case "pp":
1321
- return formatLong2.time({ width: "medium" });
1128
+ return t.time({ width: "medium" });
1322
1129
  case "ppp":
1323
- return formatLong2.time({ width: "long" });
1130
+ return t.time({ width: "long" });
1324
1131
  case "pppp":
1325
1132
  default:
1326
- return formatLong2.time({ width: "full" });
1327
- }
1328
- };
1329
- const dateTimeLongFormatter = (pattern, formatLong2) => {
1330
- const matchResult = pattern.match(/(P+)(p+)?/) || [];
1331
- const datePattern = matchResult[1];
1332
- const timePattern = matchResult[2];
1333
- if (!timePattern) {
1334
- return dateLongFormatter(pattern, formatLong2);
1133
+ return t.time({ width: "full" });
1335
1134
  }
1336
- let dateTimeFormat;
1337
- switch (datePattern) {
1135
+ }, Re = (e, t) => {
1136
+ const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1137
+ if (!a)
1138
+ return R(e, t);
1139
+ let i;
1140
+ switch (r) {
1338
1141
  case "P":
1339
- dateTimeFormat = formatLong2.dateTime({ width: "short" });
1142
+ i = t.dateTime({ width: "short" });
1340
1143
  break;
1341
1144
  case "PP":
1342
- dateTimeFormat = formatLong2.dateTime({ width: "medium" });
1145
+ i = t.dateTime({ width: "medium" });
1343
1146
  break;
1344
1147
  case "PPP":
1345
- dateTimeFormat = formatLong2.dateTime({ width: "long" });
1148
+ i = t.dateTime({ width: "long" });
1346
1149
  break;
1347
1150
  case "PPPP":
1348
1151
  default:
1349
- dateTimeFormat = formatLong2.dateTime({ width: "full" });
1152
+ i = t.dateTime({ width: "full" });
1350
1153
  break;
1351
1154
  }
1352
- return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
1353
- };
1354
- const longFormatters = {
1355
- p: timeLongFormatter,
1356
- P: dateTimeLongFormatter
1357
- };
1358
- const dayOfYearTokenRE = /^D+$/;
1359
- const weekYearTokenRE = /^Y+$/;
1360
- const throwTokens = ["D", "DD", "YY", "YYYY"];
1361
- function isProtectedDayOfYearToken(token) {
1362
- return dayOfYearTokenRE.test(token);
1155
+ return i.replace("{{date}}", R(r, t)).replace("{{time}}", K(a, t));
1156
+ }, je = {
1157
+ p: K,
1158
+ P: Re
1159
+ }, Ae = /^D+$/, Ge = /^Y+$/, Be = ["D", "DD", "YY", "YYYY"];
1160
+ function ze(e) {
1161
+ return Ae.test(e);
1363
1162
  }
1364
- function isProtectedWeekYearToken(token) {
1365
- return weekYearTokenRE.test(token);
1163
+ function Ie(e) {
1164
+ return Ge.test(e);
1366
1165
  }
1367
- function warnOrThrowProtectedError(token, format2, input) {
1368
- const _message = message(token, format2, input);
1369
- console.warn(_message);
1370
- if (throwTokens.includes(token)) throw new RangeError(_message);
1166
+ function Je(e, t, n) {
1167
+ const r = Ue(e, t, n);
1168
+ if (console.warn(r), Be.includes(e)) throw new RangeError(r);
1371
1169
  }
1372
- function message(token, format2, input) {
1373
- const subject = token[0] === "Y" ? "years" : "days of the month";
1374
- return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1170
+ function Ue(e, t, n) {
1171
+ const r = e[0] === "Y" ? "years" : "days of the month";
1172
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1375
1173
  }
1376
- const formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
1377
- const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
1378
- const escapedStringRegExp = /^'([^]*?)'?$/;
1379
- const doubleQuoteRegExp = /''/g;
1380
- const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
1381
- function format(date, formatStr, options) {
1382
- var _a, _b, _c, _d, _e, _f, _g, _h;
1383
- const defaultOptions2 = getDefaultOptions();
1384
- const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
1385
- const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
1386
- const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e = options == null ? void 0 : options.locale) == null ? void 0 : _e.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
1387
- const originalDate = toDate(date, options == null ? void 0 : options.in);
1388
- if (!isValid(originalDate)) {
1174
+ const Ke = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ze = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, pe = /^'([^]*?)'?$/, et = /''/g, tt = /[a-zA-Z]/;
1175
+ function M(e, t, n) {
1176
+ var f, b, O, x, N, $, q, H;
1177
+ const r = T(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? J, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((b = (f = n == null ? void 0 : n.locale) == null ? void 0 : f.options) == null ? void 0 : b.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((x = (O = r.locale) == null ? void 0 : O.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? (($ = (N = n == null ? void 0 : n.locale) == null ? void 0 : N.options) == null ? void 0 : $.weekStartsOn) ?? r.weekStartsOn ?? ((H = (q = r.locale) == null ? void 0 : q.options) == null ? void 0 : H.weekStartsOn) ?? 0, s = g(e, n == null ? void 0 : n.in);
1178
+ if (!ie(s))
1389
1179
  throw new RangeError("Invalid time value");
1390
- }
1391
- let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
1392
- const firstCharacter = substring[0];
1393
- if (firstCharacter === "p" || firstCharacter === "P") {
1394
- const longFormatter = longFormatters[firstCharacter];
1395
- return longFormatter(substring, locale.formatLong);
1180
+ let c = t.match(Ze).map((m) => {
1181
+ const h = m[0];
1182
+ if (h === "p" || h === "P") {
1183
+ const F = je[h];
1184
+ return F(m, a.formatLong);
1396
1185
  }
1397
- return substring;
1398
- }).join("").match(formattingTokensRegExp).map((substring) => {
1399
- if (substring === "''") {
1400
- return { isToken: false, value: "'" };
1401
- }
1402
- const firstCharacter = substring[0];
1403
- if (firstCharacter === "'") {
1404
- return { isToken: false, value: cleanEscapedString(substring) };
1405
- }
1406
- if (formatters[firstCharacter]) {
1407
- return { isToken: true, value: substring };
1408
- }
1409
- if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
1186
+ return m;
1187
+ }).join("").match(Ke).map((m) => {
1188
+ if (m === "''")
1189
+ return { isToken: !1, value: "'" };
1190
+ const h = m[0];
1191
+ if (h === "'")
1192
+ return { isToken: !1, value: nt(m) };
1193
+ if (L[h])
1194
+ return { isToken: !0, value: m };
1195
+ if (h.match(tt))
1410
1196
  throw new RangeError(
1411
- "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
1197
+ "Format string contains an unescaped latin alphabet character `" + h + "`"
1412
1198
  );
1413
- }
1414
- return { isToken: false, value: substring };
1199
+ return { isToken: !1, value: m };
1415
1200
  });
1416
- if (locale.localize.preprocessor) {
1417
- parts = locale.localize.preprocessor(originalDate, parts);
1418
- }
1419
- const formatterOptions = {
1420
- firstWeekContainsDate,
1421
- weekStartsOn,
1422
- locale
1201
+ a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1202
+ const d = {
1203
+ firstWeekContainsDate: i,
1204
+ weekStartsOn: o,
1205
+ locale: a
1423
1206
  };
1424
- return parts.map((part) => {
1425
- if (!part.isToken) return part.value;
1426
- const token = part.value;
1427
- if (!(options == null ? void 0 : options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token) || !(options == null ? void 0 : options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
1428
- warnOrThrowProtectedError(token, formatStr, String(date));
1429
- }
1430
- const formatter = formatters[token[0]];
1431
- return formatter(originalDate, token, locale.localize, formatterOptions);
1207
+ return c.map((m) => {
1208
+ if (!m.isToken) return m.value;
1209
+ const h = m.value;
1210
+ (!(n != null && n.useAdditionalWeekYearTokens) && Ie(h) || !(n != null && n.useAdditionalDayOfYearTokens) && ze(h)) && Je(h, t, String(e));
1211
+ const F = L[h[0]];
1212
+ return F(s, h, a.localize, d);
1432
1213
  }).join("");
1433
1214
  }
1434
- function cleanEscapedString(input) {
1435
- const matched = input.match(escapedStringRegExp);
1436
- if (!matched) {
1437
- return input;
1438
- }
1439
- return matched[1].replace(doubleQuoteRegExp, "'");
1215
+ function nt(e) {
1216
+ const t = e.match(pe);
1217
+ return t ? t[1].replace(et, "'") : e;
1440
1218
  }
1441
- function isSameWeek(laterDate, earlierDate, options) {
1442
- const [laterDate_, earlierDate_] = normalizeDates(
1443
- options == null ? void 0 : options.in,
1444
- laterDate,
1445
- earlierDate
1219
+ function Z(e, t, n) {
1220
+ const [r, a] = E(
1221
+ n == null ? void 0 : n.in,
1222
+ e,
1223
+ t
1446
1224
  );
1447
- return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
1225
+ return +v(r, n) == +v(a, n);
1448
1226
  }
1449
- function isSameYear(laterDate, earlierDate, options) {
1450
- const [laterDate_, earlierDate_] = normalizeDates(
1451
- options == null ? void 0 : options.in,
1452
- laterDate,
1453
- earlierDate
1227
+ function rt(e, t, n) {
1228
+ const [r, a] = E(
1229
+ n == null ? void 0 : n.in,
1230
+ e,
1231
+ t
1454
1232
  );
1455
- return laterDate_.getFullYear() === earlierDate_.getFullYear();
1233
+ return r.getFullYear() === a.getFullYear();
1456
1234
  }
1457
- function isThisYear(date, options) {
1458
- return isSameYear(
1459
- constructFrom(date, date),
1460
- constructNow(date)
1235
+ function at(e, t) {
1236
+ return rt(
1237
+ l(e, e),
1238
+ C(e)
1461
1239
  );
1462
1240
  }
1463
- function isToday(date, options) {
1464
- return isSameDay(
1465
- constructFrom(date, date),
1466
- constructNow(date)
1241
+ function it(e, t) {
1242
+ return z(
1243
+ l(e, e),
1244
+ C(e)
1467
1245
  );
1468
1246
  }
1469
- function subDays(date, amount, options) {
1470
- return addDays(date, -1, options);
1247
+ function ot(e, t, n) {
1248
+ return ee(e, -1, n);
1471
1249
  }
1472
- function isYesterday(date, options) {
1473
- return isSameDay(
1474
- constructFrom(date, date),
1475
- subDays(constructNow(date))
1250
+ function ut(e, t) {
1251
+ return z(
1252
+ l(e, e),
1253
+ ot(C(e))
1476
1254
  );
1477
1255
  }
1478
- const formatDistanceLocale = {
1256
+ const st = {
1479
1257
  lessThanXSeconds: {
1480
1258
  one: "不到 1 秒",
1481
1259
  other: "不到 {{count}} 秒"
@@ -1537,95 +1315,64 @@ const formatDistanceLocale = {
1537
1315
  one: "将近 1 年",
1538
1316
  other: "将近 {{count}} 年"
1539
1317
  }
1540
- };
1541
- const formatDistance = (token, count, options) => {
1542
- let result;
1543
- const tokenValue = formatDistanceLocale[token];
1544
- if (typeof tokenValue === "string") {
1545
- result = tokenValue;
1546
- } else if (count === 1) {
1547
- result = tokenValue.one;
1548
- } else {
1549
- result = tokenValue.other.replace("{{count}}", String(count));
1550
- }
1551
- if (options == null ? void 0 : options.addSuffix) {
1552
- if (options.comparison && options.comparison > 0) {
1553
- return result + "内";
1554
- } else {
1555
- return result + "前";
1556
- }
1557
- }
1558
- return result;
1559
- };
1560
- const dateFormats = {
1318
+ }, ct = (e, t, n) => {
1319
+ let r;
1320
+ const a = st[e];
1321
+ return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", String(t)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? r + "内" : r + "前" : r;
1322
+ }, dt = {
1561
1323
  full: "y'年'M'月'd'日' EEEE",
1562
1324
  long: "y'年'M'月'd'日'",
1563
1325
  medium: "yyyy-MM-dd",
1564
1326
  short: "yy-MM-dd"
1565
- };
1566
- const timeFormats = {
1327
+ }, ht = {
1567
1328
  full: "zzzz a h:mm:ss",
1568
1329
  long: "z a h:mm:ss",
1569
1330
  medium: "a h:mm:ss",
1570
1331
  short: "a h:mm"
1571
- };
1572
- const dateTimeFormats = {
1332
+ }, ft = {
1573
1333
  full: "{{date}} {{time}}",
1574
1334
  long: "{{date}} {{time}}",
1575
1335
  medium: "{{date}} {{time}}",
1576
1336
  short: "{{date}} {{time}}"
1577
- };
1578
- const formatLong = {
1579
- date: buildFormatLongFn({
1580
- formats: dateFormats,
1337
+ }, mt = {
1338
+ date: D({
1339
+ formats: dt,
1581
1340
  defaultWidth: "full"
1582
1341
  }),
1583
- time: buildFormatLongFn({
1584
- formats: timeFormats,
1342
+ time: D({
1343
+ formats: ht,
1585
1344
  defaultWidth: "full"
1586
1345
  }),
1587
- dateTime: buildFormatLongFn({
1588
- formats: dateTimeFormats,
1346
+ dateTime: D({
1347
+ formats: ft,
1589
1348
  defaultWidth: "full"
1590
1349
  })
1591
1350
  };
1592
- function checkWeek(date, baseDate, options) {
1593
- const baseFormat = "eeee p";
1594
- if (isSameWeek(date, baseDate, options)) {
1595
- return baseFormat;
1596
- } else if (date.getTime() > baseDate.getTime()) {
1597
- return "'下个'" + baseFormat;
1598
- }
1599
- return "'上个'" + baseFormat;
1351
+ function j(e, t, n) {
1352
+ const r = "eeee p";
1353
+ return Z(e, t, n) ? r : e.getTime() > t.getTime() ? "'下个'" + r : "'上个'" + r;
1600
1354
  }
1601
- const formatRelativeLocale = {
1602
- lastWeek: checkWeek,
1355
+ const lt = {
1356
+ lastWeek: j,
1603
1357
  // days before yesterday, maybe in this week or last week
1604
1358
  yesterday: "'昨天' p",
1605
1359
  today: "'今天' p",
1606
1360
  tomorrow: "'明天' p",
1607
- nextWeek: checkWeek,
1361
+ nextWeek: j,
1608
1362
  // days after tomorrow, maybe in this week or next week
1609
1363
  other: "PP p"
1610
- };
1611
- const formatRelative = (token, date, baseDate, options) => {
1612
- const format2 = formatRelativeLocale[token];
1613
- if (typeof format2 === "function") {
1614
- return format2(date, baseDate, options);
1615
- }
1616
- return format2;
1617
- };
1618
- const eraValues = {
1364
+ }, gt = (e, t, n, r) => {
1365
+ const a = lt[e];
1366
+ return typeof a == "function" ? a(t, n, r) : a;
1367
+ }, wt = {
1619
1368
  narrow: ["前", "公元"],
1620
1369
  abbreviated: ["前", "公元"],
1621
1370
  wide: ["公元前", "公元"]
1622
- };
1623
- const quarterValues = {
1371
+ }, yt = {
1624
1372
  narrow: ["1", "2", "3", "4"],
1625
1373
  abbreviated: ["第一季", "第二季", "第三季", "第四季"],
1626
1374
  wide: ["第一季度", "第二季度", "第三季度", "第四季度"]
1627
- };
1628
- const monthValues = {
1375
+ }, bt = {
1629
1376
  narrow: [
1630
1377
  "一",
1631
1378
  "二",
@@ -1668,14 +1415,12 @@ const monthValues = {
1668
1415
  "十一月",
1669
1416
  "十二月"
1670
1417
  ]
1671
- };
1672
- const dayValues = {
1418
+ }, Pt = {
1673
1419
  narrow: ["日", "一", "二", "三", "四", "五", "六"],
1674
1420
  short: ["日", "一", "二", "三", "四", "五", "六"],
1675
1421
  abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
1676
1422
  wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
1677
- };
1678
- const dayPeriodValues = {
1423
+ }, Mt = {
1679
1424
  narrow: {
1680
1425
  am: "上",
1681
1426
  pm: "下",
@@ -1706,8 +1451,7 @@ const dayPeriodValues = {
1706
1451
  evening: "晚上",
1707
1452
  night: "夜间"
1708
1453
  }
1709
- };
1710
- const formattingDayPeriodValues = {
1454
+ }, Wt = {
1711
1455
  narrow: {
1712
1456
  am: "上",
1713
1457
  pm: "下",
@@ -1738,72 +1482,62 @@ const formattingDayPeriodValues = {
1738
1482
  evening: "晚上",
1739
1483
  night: "夜间"
1740
1484
  }
1741
- };
1742
- const ordinalNumber = (dirtyNumber, options) => {
1743
- const number = Number(dirtyNumber);
1744
- switch (options == null ? void 0 : options.unit) {
1485
+ }, vt = (e, t) => {
1486
+ const n = Number(e);
1487
+ switch (t == null ? void 0 : t.unit) {
1745
1488
  case "date":
1746
- return number.toString() + "日";
1489
+ return n.toString() + "日";
1747
1490
  case "hour":
1748
- return number.toString() + "时";
1491
+ return n.toString() + "时";
1749
1492
  case "minute":
1750
- return number.toString() + "分";
1493
+ return n.toString() + "分";
1751
1494
  case "second":
1752
- return number.toString() + "秒";
1495
+ return n.toString() + "秒";
1753
1496
  default:
1754
- return "第 " + number.toString();
1497
+ return "第 " + n.toString();
1755
1498
  }
1756
- };
1757
- const localize = {
1758
- ordinalNumber,
1759
- era: buildLocalizeFn({
1760
- values: eraValues,
1499
+ }, kt = {
1500
+ ordinalNumber: vt,
1501
+ era: w({
1502
+ values: wt,
1761
1503
  defaultWidth: "wide"
1762
1504
  }),
1763
- quarter: buildLocalizeFn({
1764
- values: quarterValues,
1505
+ quarter: w({
1506
+ values: yt,
1765
1507
  defaultWidth: "wide",
1766
- argumentCallback: (quarter) => quarter - 1
1508
+ argumentCallback: (e) => e - 1
1767
1509
  }),
1768
- month: buildLocalizeFn({
1769
- values: monthValues,
1510
+ month: w({
1511
+ values: bt,
1770
1512
  defaultWidth: "wide"
1771
1513
  }),
1772
- day: buildLocalizeFn({
1773
- values: dayValues,
1514
+ day: w({
1515
+ values: Pt,
1774
1516
  defaultWidth: "wide"
1775
1517
  }),
1776
- dayPeriod: buildLocalizeFn({
1777
- values: dayPeriodValues,
1518
+ dayPeriod: w({
1519
+ values: Mt,
1778
1520
  defaultWidth: "wide",
1779
- formattingValues: formattingDayPeriodValues,
1521
+ formattingValues: Wt,
1780
1522
  defaultFormattingWidth: "wide"
1781
1523
  })
1782
- };
1783
- const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|时|分|秒)?/i;
1784
- const parseOrdinalNumberPattern = /\d+/i;
1785
- const matchEraPatterns = {
1524
+ }, Dt = /^(第\s*)?\d+(日|时|分|秒)?/i, Ot = /\d+/i, xt = {
1786
1525
  narrow: /^(前)/i,
1787
1526
  abbreviated: /^(前)/i,
1788
1527
  wide: /^(公元前|公元)/i
1789
- };
1790
- const parseEraPatterns = {
1528
+ }, St = {
1791
1529
  any: [/^(前)/i, /^(公元)/i]
1792
- };
1793
- const matchQuarterPatterns = {
1530
+ }, Yt = {
1794
1531
  narrow: /^[1234]/i,
1795
1532
  abbreviated: /^第[一二三四]刻/i,
1796
1533
  wide: /^第[一二三四]刻钟/i
1797
- };
1798
- const parseQuarterPatterns = {
1534
+ }, Tt = {
1799
1535
  any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
1800
- };
1801
- const matchMonthPatterns = {
1536
+ }, Et = {
1802
1537
  narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
1803
1538
  abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
1804
1539
  wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
1805
- };
1806
- const parseMonthPatterns = {
1540
+ }, Ft = {
1807
1541
  narrow: [
1808
1542
  /^一/i,
1809
1543
  /^二/i,
@@ -1832,20 +1566,16 @@ const parseMonthPatterns = {
1832
1566
  /^十一|11/i,
1833
1567
  /^十二|12/i
1834
1568
  ]
1835
- };
1836
- const matchDayPatterns = {
1569
+ }, Ct = {
1837
1570
  narrow: /^[一二三四五六日]/i,
1838
1571
  short: /^[一二三四五六日]/i,
1839
1572
  abbreviated: /^周[一二三四五六日]/i,
1840
1573
  wide: /^星期[一二三四五六日]/i
1841
- };
1842
- const parseDayPatterns = {
1574
+ }, Nt = {
1843
1575
  any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
1844
- };
1845
- const matchDayPeriodPatterns = {
1576
+ }, $t = {
1846
1577
  any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i
1847
- };
1848
- const parseDayPeriodPatterns = {
1578
+ }, qt = {
1849
1579
  any: {
1850
1580
  am: /^上午?/i,
1851
1581
  pm: /^下午?/i,
@@ -1856,103 +1586,79 @@ const parseDayPeriodPatterns = {
1856
1586
  evening: /^晚上?/i,
1857
1587
  night: /^凌晨/i
1858
1588
  }
1859
- };
1860
- const match = {
1861
- ordinalNumber: buildMatchPatternFn({
1862
- matchPattern: matchOrdinalNumberPattern,
1863
- parsePattern: parseOrdinalNumberPattern,
1864
- valueCallback: (value) => parseInt(value, 10)
1589
+ }, Ht = {
1590
+ ordinalNumber: I({
1591
+ matchPattern: Dt,
1592
+ parsePattern: Ot,
1593
+ valueCallback: (e) => parseInt(e, 10)
1865
1594
  }),
1866
- era: buildMatchFn({
1867
- matchPatterns: matchEraPatterns,
1595
+ era: y({
1596
+ matchPatterns: xt,
1868
1597
  defaultMatchWidth: "wide",
1869
- parsePatterns: parseEraPatterns,
1598
+ parsePatterns: St,
1870
1599
  defaultParseWidth: "any"
1871
1600
  }),
1872
- quarter: buildMatchFn({
1873
- matchPatterns: matchQuarterPatterns,
1601
+ quarter: y({
1602
+ matchPatterns: Yt,
1874
1603
  defaultMatchWidth: "wide",
1875
- parsePatterns: parseQuarterPatterns,
1604
+ parsePatterns: Tt,
1876
1605
  defaultParseWidth: "any",
1877
- valueCallback: (index) => index + 1
1606
+ valueCallback: (e) => e + 1
1878
1607
  }),
1879
- month: buildMatchFn({
1880
- matchPatterns: matchMonthPatterns,
1608
+ month: y({
1609
+ matchPatterns: Et,
1881
1610
  defaultMatchWidth: "wide",
1882
- parsePatterns: parseMonthPatterns,
1611
+ parsePatterns: Ft,
1883
1612
  defaultParseWidth: "any"
1884
1613
  }),
1885
- day: buildMatchFn({
1886
- matchPatterns: matchDayPatterns,
1614
+ day: y({
1615
+ matchPatterns: Ct,
1887
1616
  defaultMatchWidth: "wide",
1888
- parsePatterns: parseDayPatterns,
1617
+ parsePatterns: Nt,
1889
1618
  defaultParseWidth: "any"
1890
1619
  }),
1891
- dayPeriod: buildMatchFn({
1892
- matchPatterns: matchDayPeriodPatterns,
1620
+ dayPeriod: y({
1621
+ matchPatterns: $t,
1893
1622
  defaultMatchWidth: "any",
1894
- parsePatterns: parseDayPeriodPatterns,
1623
+ parsePatterns: qt,
1895
1624
  defaultParseWidth: "any"
1896
1625
  })
1897
- };
1898
- const zhCN = {
1626
+ }, Xt = {
1899
1627
  code: "zh-CN",
1900
- formatDistance,
1901
- formatLong,
1902
- formatRelative,
1903
- localize,
1904
- match,
1628
+ formatDistance: ct,
1629
+ formatLong: mt,
1630
+ formatRelative: gt,
1631
+ localize: kt,
1632
+ match: Ht,
1905
1633
  options: {
1906
1634
  weekStartsOn: 1,
1907
1635
  firstWeekContainsDate: 4
1908
1636
  }
1909
1637
  };
1910
- function getTimeStamp({ time, language = "en-US" }) {
1911
- const { t } = useUIKit();
1912
- const locales = {
1913
- "zh-CN": zhCN,
1914
- "en-US": enUS
1915
- };
1916
- const timeFormat = "HH:mm";
1917
- const locale = locales[language] || locales["en-US"];
1918
- const yesterdayText = t("MessageList.yesterday", {
1638
+ function _t({ time: e, language: t = "en-US" }) {
1639
+ const { t: n } = A(), r = {
1640
+ "zh-CN": Xt,
1641
+ "en-US": J
1642
+ }, a = "HH:mm", i = r[t] || r["en-US"], o = n("MessageList.yesterday", {
1919
1643
  defaultValue: "Yesterday"
1920
1644
  });
1921
- if (!time) {
1922
- return "";
1923
- }
1924
- if (isToday(time)) {
1925
- return format(time, timeFormat, {
1926
- locale
1927
- });
1928
- }
1929
- if (isYesterday(time)) {
1930
- return `${yesterdayText} ${format(time, timeFormat, {
1931
- locale
1932
- })}`;
1933
- }
1934
- if (isSameWeek(time, /* @__PURE__ */ new Date(), { weekStartsOn: 1 })) {
1935
- return `${format(time, "EEEE", { locale })} ${format(time, timeFormat)}`;
1936
- }
1937
- if (isThisYear(time)) {
1938
- if (language.startsWith("zh")) {
1939
- return format(time, "M月d日 HH:mm", {
1940
- locale
1941
- });
1942
- }
1943
- return format(time, "MMMM d HH:mm", {
1944
- locale
1945
- });
1946
- }
1947
- return format(time, "yyyy/MM/dd HH:mm", {
1948
- locale
1949
- });
1645
+ return e ? it(e) ? M(e, a, {
1646
+ locale: i
1647
+ }) : ut(e) ? `${o} ${M(e, a, {
1648
+ locale: i
1649
+ })}` : Z(e, /* @__PURE__ */ new Date(), { weekStartsOn: 1 }) ? `${M(e, "EEEE", { locale: i })} ${M(e, a)}` : at(e) ? t.startsWith("zh") ? M(e, "M月d日 HH:mm", {
1650
+ locale: i
1651
+ }) : M(e, "MMMM d HH:mm", {
1652
+ locale: i
1653
+ }) : M(e, "yyyy/MM/dd HH:mm", {
1654
+ locale: i
1655
+ }) : "";
1950
1656
  }
1951
- function getTimeStampAuto(time) {
1952
- const { language } = useUIKit();
1953
- return getTimeStamp({ time, language });
1657
+ function Qt(e) {
1658
+ const { language: t } = A();
1659
+ return _t({ time: e, language: t.value });
1954
1660
  }
1955
1661
  export {
1956
- getTimeStamp,
1957
- getTimeStampAuto
1662
+ _t as getTimeStamp,
1663
+ Qt as getTimeStampAuto
1958
1664
  };