@mobilon-dev/chotto 0.3.121 → 0.3.123

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 (219) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +4 -29
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +59 -40
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +4 -47
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +82 -55
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +51 -86
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +4 -32
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +28 -7
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +35 -22
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -30
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +4 -37
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +21 -7
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -30
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +4 -70
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +108 -76
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +13 -26
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +10 -16
  19. package/dist/components/1_icons/CloseIcon.vue.js +10 -16
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +10 -16
  21. package/dist/components/1_icons/DeletedMessageIcon.vue.js +11 -17
  22. package/dist/components/1_icons/MenuIcon.vue.js +10 -16
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
  24. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
  26. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
  28. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
  30. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
  32. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
  33. package/dist/components/1_icons/SearchIcon.vue.js +17 -29
  34. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  35. package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
  36. package/dist/components/1_icons/VerifiedBadge.vue.js +19 -25
  37. package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
  38. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +402 -552
  39. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
  51. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  52. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  53. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
  54. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +46 -12
  55. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
  56. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
  57. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
  58. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
  59. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
  60. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -62
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +98 -80
  63. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
  64. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
  67. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
  68. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
  69. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +45 -76
  70. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -100
  71. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +91 -16
  72. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -79
  73. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +111 -88
  74. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
  75. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
  76. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
  77. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
  78. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
  79. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
  80. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
  81. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
  82. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
  83. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
  84. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
  85. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +58 -32
  86. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
  87. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
  88. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
  89. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
  90. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
  91. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +35 -41
  92. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
  93. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +314 -131
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
  99. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
  100. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  101. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
  102. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
  103. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +68 -36
  104. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +37 -71
  105. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +62 -83
  106. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
  107. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
  108. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
  109. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
  110. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
  111. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +42 -22
  112. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -460
  113. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +499 -181
  114. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
  115. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
  116. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
  117. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
  118. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
  119. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
  120. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
  121. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
  122. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
  123. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
  124. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
  125. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
  127. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  128. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
  129. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -47
  131. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +46 -37
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
  133. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
  135. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
  136. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +4 -52
  137. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +39 -16
  138. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -270
  139. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +274 -95
  140. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -409
  141. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +422 -143
  142. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
  143. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
  144. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -57
  145. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +69 -41
  146. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +4 -97
  147. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +173 -102
  148. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
  149. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
  150. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
  151. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
  152. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
  153. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
  154. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
  155. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
  156. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
  157. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
  158. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
  159. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
  160. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
  161. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
  162. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
  163. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
  164. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
  165. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
  166. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
  167. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
  168. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
  169. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +118 -34
  170. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
  171. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
  172. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -94
  173. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +76 -10
  174. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
  175. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
  176. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -348
  177. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +339 -97
  178. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
  179. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  180. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -308
  181. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +299 -89
  182. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
  183. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
  184. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -321
  185. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +338 -96
  186. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
  187. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
  188. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +19 -36
  189. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
  190. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
  191. package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
  192. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
  193. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
  194. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
  195. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
  196. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
  197. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
  198. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -170
  199. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +336 -239
  200. package/dist/components/3_compounds/ChatInput/icons/ArrowIcon.vue.js +25 -43
  201. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
  202. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
  203. package/dist/components/3_compounds/ChatList/ChatList.vue.js +166 -256
  204. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +39 -57
  205. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  206. package/dist/components/3_compounds/Feed/Feed.vue.js +4 -185
  207. package/dist/components/3_compounds/Feed/Feed.vue2.js +314 -161
  208. package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +19 -17
  209. package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
  210. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
  211. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  212. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
  213. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
  214. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  215. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  216. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -33
  217. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +59 -90
  218. package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +2 -0
  219. package/package.json +1 -1
@@ -1,31 +1,55 @@
1
- import { defineComponent as ze, ref as u, computed as s, inject as Qe, watch as D, nextTick as We } from "vue";
2
- import Je from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
- import Ke from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
- import Xe from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
- import Ze from "../FeedReplyQuote/FeedReplyQuote.vue.js";
6
- import et from "../MessageReactions/MessageReactions.vue.js";
7
- import tt from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
- import at from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
- import nt from "../DeletedMessageContent/DeletedMessageContent.vue.js";
10
- import st from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
- import { useMessageActions as ot } from "../../../hooks/messages/useMessageActions.js";
12
- import { useMessageHoverActions as rt } from "../../../hooks/messages/useMessageHoverActions.js";
13
- import { useMessageReactionsInFeed as ut } from "../../../hooks/messages/useMessageReactionsInFeed.js";
14
- import { useMessageMenuActions as it } from "../../../hooks/messages/useMessageMenuActions.js";
15
- import { useMessageLinks as lt } from "../../../hooks/messages/useMessageLinks.js";
16
- import { useChannelAccentColor as ct } from "../../../hooks/messages/useChannelAccentColor.js";
17
- import { useSubtextTooltip as mt } from "../../../hooks/messages/useSubtextTooltip.js";
18
- import { useStartReply as dt } from "../../../hooks/messages/useStartReply.js";
1
+ import { defineComponent as us, ref as g, computed as r, inject as ls, watch as G, createElementBlock as m, openBlock as l, unref as o, normalizeStyle as Y, normalizeClass as C, createCommentVNode as d, createElementVNode as i, createVNode as w, withCtx as Z, createTextVNode as rs, toDisplayString as p, Fragment as q, createBlock as k, withDirectives as z, vShow as Ce, vModelText as ms, Transition as we, Teleport as ds, nextTick as cs } from "vue";
2
+ import vs from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
+ import gs from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
+ import fs from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
+ import ys from "../FeedReplyQuote/FeedReplyQuote.vue.js";
6
+ import ps from "../MessageReactions/MessageReactions.vue.js";
7
+ import xe from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
+ import hs from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
+ import bs from "../DeletedMessageContent/DeletedMessageContent.vue.js";
10
+ import Cs from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
+ import { useMessageActions as ws } from "../../../hooks/messages/useMessageActions.js";
12
+ import { useMessageHoverActions as xs } from "../../../hooks/messages/useMessageHoverActions.js";
13
+ import { useMessageReactionsInFeed as Ms } from "../../../hooks/messages/useMessageReactionsInFeed.js";
14
+ import { useMessageMenuActions as ks } from "../../../hooks/messages/useMessageMenuActions.js";
15
+ import { useMessageLinks as Rs } from "../../../hooks/messages/useMessageLinks.js";
16
+ import { useChannelAccentColor as Ts } from "../../../hooks/messages/useChannelAccentColor.js";
17
+ import { useSubtextTooltip as Ss } from "../../../hooks/messages/useSubtextTooltip.js";
18
+ import { useStartReply as Is } from "../../../hooks/messages/useStartReply.js";
19
19
  /* empty css */
20
20
  /* empty css */
21
21
  import "../../../locale/useLocale.js";
22
22
  /* empty css */
23
- import { buildReplyPayload as ne } from "../../../hooks/messages/buildReplyPayload.js";
24
- import { getStatus as vt, getStatusTitle as pt } from "../../../functions/getStatusMessage.js";
25
- import { getMessageClass as ft } from "../../../functions/getMessageClass.js";
26
- import { createReactionHandlers as gt } from "../../../functions/createReactionHandlers.js";
23
+ import { buildReplyPayload as Me } from "../../../hooks/messages/buildReplyPayload.js";
24
+ import { getStatus as Ns, getStatusTitle as _s } from "../../../functions/getStatusMessage.js";
25
+ import { getMessageClass as Es } from "../../../functions/getMessageClass.js";
26
+ import { createReactionHandlers as As } from "../../../functions/createReactionHandlers.js";
27
27
  import "../../../functions/parseMarkdown.js";
28
- const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
28
+ const Fs = ["messageId"], Ls = ["src"], Os = {
29
+ key: 1,
30
+ class: "audio-message__subtext"
31
+ }, Ps = { class: "audio-message__footer" }, Ds = { class: "audio-message__info-container" }, Us = {
32
+ key: 0,
33
+ class: "audio-message__time"
34
+ }, $s = { class: "audio-message__audio-container" }, Hs = ["src"], Vs = { class: "audio-message__progress-wrapper" }, Bs = ["max"], js = { class: "audio-message__speed-btn-container" }, Gs = { class: "audio-message__player-controls" }, Ys = { class: "audio-message__current-time" }, Zs = { class: "audio-message__duration" }, qs = {
35
+ key: 1,
36
+ class: "audio-message__text-container"
37
+ }, zs = ["innerHTML"], Qs = { class: "audio-message__footer" }, Ws = { class: "audio-message__info-container" }, Js = {
38
+ key: 0,
39
+ class: "audio-message__actions"
40
+ }, Ks = { class: "audio-message__time" }, Xs = {
41
+ key: 0,
42
+ class: "audio-message__expand-panel"
43
+ }, et = { class: "audio-message__expand-inner" }, st = {
44
+ key: 0,
45
+ class: "audio-message__expand-placeholder"
46
+ }, tt = ["innerHTML"], at = {
47
+ key: 1,
48
+ class: "audio-message__expand-plain"
49
+ }, nt = {
50
+ key: 0,
51
+ class: "audio-message__expand-placeholder"
52
+ }, ot = ["innerHTML"], it = { class: "audio-message__expand-close-wrap" }, ut = "RECOGNITION_READY", lt = "SUMMARY_READY", Dt = /* @__PURE__ */ us({
29
53
  __name: "AudioMessage",
30
54
  props: {
31
55
  message: {
@@ -47,7 +71,7 @@ const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
47
71
  reactionsMode: {
48
72
  type: String,
49
73
  default: "single",
50
- validator: (N) => ["single", "multi"].includes(N)
74
+ validator: (t) => ["single", "multi"].includes(t)
51
75
  },
52
76
  currentUserId: {
53
77
  type: [String, Number],
@@ -69,9 +93,8 @@ const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
69
93
  }
70
94
  },
71
95
  emits: ["action", "reply", "sms-invite"],
72
- setup(N, { expose: re, emit: ue }) {
73
- re();
74
- const n = N, R = u([
96
+ setup(t, { emit: ke }) {
97
+ const u = t, O = g([
75
98
  {
76
99
  text: "1.0x",
77
100
  speed: 1
@@ -88,96 +111,96 @@ const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
88
111
  text: "2.0x",
89
112
  speed: 2
90
113
  }
91
- ]), M = u(0), E = s(() => R.value[M.value] ?? R.value[0]), ie = () => {
92
- M.value = (M.value + 1) % R.value.length, a.value && (a.value.playbackRate = E.value.speed);
93
- }, d = ue, { menuActions: P } = it(() => n.message), { hoverActionsEnabled: le, reactionsActive: L } = rt(
94
- () => n.channel,
95
- () => n.reactionsEnabled,
96
- () => n.message
97
- ), U = Qe("chatAppId"), { startReply: $ } = dt(U || ""), a = u(null), v = u(void 0), i = u(!1), c = u(0), l = u(0), p = u(!1), S = s(() => {
98
- var t, o;
99
- const e = n.message;
100
- return e.url || (typeof ((t = e.meta) == null ? void 0 : t.url) == "string" ? e.meta.url : void 0) || ((o = e.data) == null ? void 0 : o.url);
101
- }), x = (e) => {
114
+ ]), P = g(0), D = r(() => O.value[P.value] ?? O.value[0]), Re = () => {
115
+ P.value = (P.value + 1) % O.value.length, n.value && (n.value.playbackRate = D.value.speed);
116
+ }, R = ke, { menuActions: S } = ks(() => u.message), { hoverActionsEnabled: Q, reactionsActive: W } = xs(
117
+ () => u.channel,
118
+ () => u.reactionsEnabled,
119
+ () => u.message
120
+ ), Te = ls("chatAppId"), { startReply: Se } = Is(Te || ""), n = g(null), x = g(void 0), c = g(!1), h = g(0), f = g(0), b = g(!1), U = r(() => {
121
+ var s, a;
122
+ const e = u.message;
123
+ return e.url || (typeof ((s = e.meta) == null ? void 0 : s.url) == "string" ? e.meta.url : void 0) || ((a = e.data) == null ? void 0 : a.url);
124
+ }), $ = (e) => {
102
125
  if (e == null) return;
103
126
  if (typeof e == "number")
104
127
  return !Number.isFinite(e) || e < 0 ? void 0 : Math.floor(e);
105
- const t = String(e).trim();
106
- if (!t) return;
107
- if (/^\d+$/.test(t)) {
108
- const r = Number(t);
109
- return Number.isFinite(r) && r >= 0 ? Math.floor(r) : void 0;
128
+ const s = String(e).trim();
129
+ if (!s) return;
130
+ if (/^\d+$/.test(s)) {
131
+ const v = Number(s);
132
+ return Number.isFinite(v) && v >= 0 ? Math.floor(v) : void 0;
110
133
  }
111
- const o = t.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
112
- if (o) {
113
- const r = Number(o[1]), _ = Number(o[2]), k = Number(o[3]);
114
- return r * 3600 + _ * 60 + k;
134
+ const a = s.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
135
+ if (a) {
136
+ const v = Number(a[1]), B = Number(a[2]), j = Number(a[3]);
137
+ return v * 3600 + B * 60 + j;
115
138
  }
116
- const f = t.match(/^(\d+):([0-5]\d)$/);
117
- if (f) return Number(f[1]) * 60 + Number(f[2]);
118
- }, I = () => {
119
- i.value = !1, l.value = 0, c.value = x(n.message.duration) ?? 0, p.value = !1;
139
+ const M = s.match(/^(\d+):([0-5]\d)$/);
140
+ if (M) return Number(M[1]) * 60 + Number(M[2]);
141
+ }, J = () => {
142
+ c.value = !1, f.value = 0, h.value = $(u.message.duration) ?? 0, b.value = !1;
120
143
  };
121
- I(), D(
122
- () => S.value,
123
- (e, t) => {
124
- e !== t && (I(), v.value = void 0, a.value && (a.value.pause(), a.value.currentTime = 0, a.value.removeAttribute("src"), a.value.load()));
144
+ J(), G(
145
+ () => U.value,
146
+ (e, s) => {
147
+ e !== s && (J(), x.value = void 0, n.value && (n.value.pause(), n.value.currentTime = 0, n.value.removeAttribute("src"), n.value.load()));
125
148
  }
126
- ), D(
127
- () => n.message.duration,
149
+ ), G(
150
+ () => u.message.duration,
128
151
  () => {
129
- v.value === void 0 && (c.value = x(n.message.duration) ?? 0);
152
+ x.value === void 0 && (h.value = $(u.message.duration) ?? 0);
130
153
  }
131
154
  );
132
155
  const {
133
- isOpenMenu: ce,
134
- buttonMenuVisible: me,
135
- menuAnchorRef: de,
136
- menuRef: ve,
137
- menuStyle: pe,
138
- menuTheme: fe,
139
- showMenu: ge,
140
- hideMenu: j,
141
- openMenu: F,
142
- toggleMenu: ye,
143
- onMenuMouseEnter: he,
144
- onMenuMouseLeave: be,
145
- clickAction: H,
146
- viewsAction: Re,
147
- handleClickReplied: Me
148
- } = ot(n.message, d, {
149
- onReply: () => $(ne(n.message, "message.audio"))
150
- }), m = u(null), g = u({ text: !1, summary: !1 }), y = s(() => {
151
- var o;
152
- const e = n.message, t = e.transcript ?? ((o = e.meta) == null ? void 0 : o.transcript);
153
- return !t || typeof t != "object" ? null : t;
154
- }), h = s(() => {
155
- var o;
156
- const e = n.message, t = e.summary ?? ((o = e.meta) == null ? void 0 : o.summary);
157
- return !t || typeof t != "object" ? null : t;
158
- }), G = s(() => {
159
- var t;
160
- const e = (t = y.value) == null ? void 0 : t.html;
156
+ isOpenMenu: Ie,
157
+ buttonMenuVisible: Ne,
158
+ menuAnchorRef: _e,
159
+ menuRef: Ee,
160
+ menuStyle: Ae,
161
+ menuTheme: Fe,
162
+ showMenu: Le,
163
+ hideMenu: H,
164
+ openMenu: Oe,
165
+ toggleMenu: K,
166
+ onMenuMouseEnter: Pe,
167
+ onMenuMouseLeave: De,
168
+ clickAction: Ue,
169
+ viewsAction: X,
170
+ handleClickReplied: $e
171
+ } = ws(u.message, R, {
172
+ onReply: () => Se(Me(u.message, "message.audio"))
173
+ }), y = g(null), I = g({ text: !1, summary: !1 }), N = r(() => {
174
+ var a;
175
+ const e = u.message, s = e.transcript ?? ((a = e.meta) == null ? void 0 : a.transcript);
176
+ return !s || typeof s != "object" ? null : s;
177
+ }), _ = r(() => {
178
+ var a;
179
+ const e = u.message, s = e.summary ?? ((a = e.meta) == null ? void 0 : a.summary);
180
+ return !s || typeof s != "object" ? null : s;
181
+ }), ee = r(() => {
182
+ var s;
183
+ const e = (s = N.value) == null ? void 0 : s.html;
161
184
  return typeof e != "string" ? "" : e.trim();
162
- }), Y = s(() => {
185
+ }), se = r(() => {
163
186
  var e;
164
- return ((e = y.value) == null ? void 0 : e.status) === se && G.value.length > 0;
165
- }), B = s(() => {
166
- var t;
167
- const e = (t = h.value) == null ? void 0 : t.html;
187
+ return ((e = N.value) == null ? void 0 : e.status) === ut && ee.value.length > 0;
188
+ }), te = r(() => {
189
+ var s;
190
+ const e = (s = _.value) == null ? void 0 : s.html;
168
191
  return typeof e != "string" ? "" : e.trim();
169
- }), q = s(() => {
192
+ }), ae = r(() => {
170
193
  var e;
171
- return ((e = h.value) == null ? void 0 : e.status) === oe && B.value.length > 0;
172
- }), A = s(() => {
194
+ return ((e = _.value) == null ? void 0 : e.status) === lt && te.value.length > 0;
195
+ }), E = r(() => {
173
196
  var e;
174
- return !!((e = y.value) != null && e.status);
175
- }), O = s(() => {
197
+ return !!((e = N.value) != null && e.status);
198
+ }), A = r(() => {
176
199
  var e;
177
- return !!((e = h.value) != null && e.status);
178
- }), Se = s(() => m.value === "text" ? A.value : m.value === "summary" ? O.value : !1), xe = s(() => {
200
+ return !!((e = _.value) != null && e.status);
201
+ }), He = r(() => y.value === "text" ? E.value : y.value === "summary" ? A.value : !1), Ve = r(() => {
179
202
  var e;
180
- switch ((e = y.value) == null ? void 0 : e.status) {
203
+ switch ((e = N.value) == null ? void 0 : e.status) {
181
204
  case "RECOGNITION_PLANNED":
182
205
  return "Распознаем сообщение, пожалуйста подождите...";
183
206
  case "RECOGNITION_ERROR":
@@ -187,9 +210,9 @@ const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
187
210
  default:
188
211
  return "Текст сообщения недоступен";
189
212
  }
190
- }), Te = s(() => {
213
+ }), Be = r(() => {
191
214
  var e;
192
- switch ((e = h.value) == null ? void 0 : e.status) {
215
+ switch ((e = _.value) == null ? void 0 : e.status) {
193
216
  case "SUMMARY_PLANNED":
194
217
  return "Формируем резюме, пожалуйста подождите...";
195
218
  case "SUMMARY_ERROR":
@@ -199,19 +222,19 @@ const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
199
222
  default:
200
223
  return "Резюме недоступно";
201
224
  }
202
- }), V = async () => {
203
- var t, o, f;
204
- const e = S.value;
225
+ }), je = async () => {
226
+ var s, a, M;
227
+ const e = U.value;
205
228
  if (e)
206
229
  try {
207
- const r = await fetch(e, {
230
+ const v = await fetch(e, {
208
231
  headers: {
209
232
  Accept: "audio/*"
210
233
  }
211
234
  });
212
- if (!r.ok)
213
- throw new Error(`HTTP error! status: ${r.status}`);
214
- const _ = r.headers.get("content-type") || "", k = await r.blob(), T = ((o = (t = e.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : o.toLowerCase()) || "", qe = {
235
+ if (!v.ok)
236
+ throw new Error(`HTTP error! status: ${v.status}`);
237
+ const B = v.headers.get("content-type") || "", j = await v.blob(), F = ((a = (s = e.split(".").pop()) == null ? void 0 : s.split("?")[0]) == null ? void 0 : a.toLowerCase()) || "", os = {
215
238
  "audio/mpeg": "mp3",
216
239
  "audio/mp3": "mp3",
217
240
  "audio/wav": "wav",
@@ -222,98 +245,393 @@ const se = "RECOGNITION_READY", oe = "SUMMARY_READY", zt = /* @__PURE__ */ ze({
222
245
  "audio/flac": "flac",
223
246
  "audio/m4a": "m4a",
224
247
  "audio/x-m4a": "m4a",
225
- "application/octet-stream": T || "mp3"
226
- }, ee = T && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(T) ? T : qe[_] || "mp3", te = e.split("/"), w = decodeURIComponent(((f = te[te.length - 1]) == null ? void 0 : f.split("?")[0]) || ""), Ve = w ? w.includes(".") ? w : `${w}.${ee}` : `audio-${n.message.messageId}.${ee}`, ae = window.URL.createObjectURL(k), b = document.createElement("a");
227
- b.href = ae, b.download = Ve, document.body.appendChild(b), b.click(), document.body.removeChild(b), window.URL.revokeObjectURL(ae);
228
- } catch (r) {
229
- console.error("Ошибка при скачивании аудио:", r), e && window.open(e, "_blank");
248
+ "application/octet-stream": F || "mp3"
249
+ }, pe = F && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(F) ? F : os[B] || "mp3", he = e.split("/"), L = decodeURIComponent(((M = he[he.length - 1]) == null ? void 0 : M.split("?")[0]) || ""), is = L ? L.includes(".") ? L : `${L}.${pe}` : `audio-${u.message.messageId}.${pe}`, be = window.URL.createObjectURL(j), T = document.createElement("a");
250
+ T.href = be, T.download = is, document.body.appendChild(T), T.click(), document.body.removeChild(T), window.URL.revokeObjectURL(be);
251
+ } catch (v) {
252
+ console.error("Ошибка при скачивании аудио:", v), e && window.open(e, "_blank");
230
253
  }
231
- }, we = (e) => {
232
- e.action === "download" ? (V(), j()) : H(e);
233
- }, { linkedHtml: Ne, inNewWindow: Ee } = lt(() => n.message.text), Ie = s(() => vt(n.message.status)), Ae = s(() => pt(n.message.status, n.message.statusMsg)), { bubbleStyle: Oe } = ct(
234
- s(() => n.message),
254
+ }, Ge = (e) => {
255
+ e.action === "download" ? (je(), H()) : Ue(e);
256
+ }, { linkedHtml: Ye, inNewWindow: ne } = Rs(() => u.message.text), oe = r(() => Ns(u.message.status)), ie = r(() => _s(u.message.status, u.message.statusMsg)), { bubbleStyle: Ze } = Ts(
257
+ r(() => u.message),
235
258
  { cssVariable: "--chotto-audiomessage-right-background-color", position: "right" }
236
- ), Ce = async () => {
237
- const e = S.value;
238
- if (!(!a.value || !e))
239
- if (i.value)
240
- a.value.pause(), i.value = !1;
259
+ ), ue = async () => {
260
+ const e = U.value;
261
+ if (!(!n.value || !e))
262
+ if (c.value)
263
+ n.value.pause(), c.value = !1;
241
264
  else
242
265
  try {
243
- v.value || (v.value = e, await We(), a.value.load()), await a.value.play(), i.value = !0;
244
- } catch (t) {
245
- console.error("Не удалось воспроизвести аудио", t), i.value = !1;
266
+ x.value || (x.value = e, await cs(), n.value.load()), await n.value.play(), c.value = !0;
267
+ } catch (s) {
268
+ console.error("Не удалось воспроизвести аудио", s), c.value = !1;
246
269
  }
247
- }, C = (e) => {
248
- const t = Math.floor(e / 60), o = Math.floor(e % 60);
249
- return `${t.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
250
- }, _e = s(() => C(l.value));
251
- D(
252
- () => l.value,
270
+ }, le = (e) => {
271
+ const s = Math.floor(e / 60), a = Math.floor(e % 60);
272
+ return `${s.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
273
+ }, qe = r(() => le(f.value));
274
+ G(
275
+ () => f.value,
253
276
  () => {
254
- a.value && p.value && (a.value.duration != 1 / 0 && !Number.isNaN(a.value.duration) && (a.value.currentTime = l.value), Math.abs(l.value - c.value) < 0.1 && (i.value = !1));
277
+ n.value && b.value && (n.value.duration != 1 / 0 && !Number.isNaN(n.value.duration) && (n.value.currentTime = f.value), Math.abs(f.value - h.value) < 0.1 && (c.value = !1));
255
278
  }
256
279
  );
257
- const ke = () => {
258
- a.value && p.value && a.value.duration != 1 / 0 && !Number.isNaN(a.value.duration) && (a.value.currentTime = l.value), p.value = !1;
259
- }, De = s(() => C(c.value)), Pe = () => {
260
- if (!a.value) return;
261
- const e = a.value;
262
- if (l.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
280
+ const re = () => {
281
+ n.value && b.value && n.value.duration != 1 / 0 && !Number.isNaN(n.value.duration) && (n.value.currentTime = f.value), b.value = !1;
282
+ }, ze = r(() => le(h.value)), Qe = () => {
283
+ if (!n.value) return;
284
+ const e = n.value;
285
+ if (f.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
263
286
  e.currentTime = 1e101;
264
- const t = () => {
265
- a.value && (c.value = a.value.duration || 0, l.value = 0, a.value.currentTime = 0);
287
+ const s = () => {
288
+ n.value && (h.value = n.value.duration || 0, f.value = 0, n.value.currentTime = 0);
266
289
  };
267
- e.addEventListener("timeupdate", t, { once: !0 });
290
+ e.addEventListener("timeupdate", s, { once: !0 });
268
291
  } else
269
- c.value = e.duration || 0;
270
- e.playbackRate = E.value.speed;
271
- }, Le = () => {
272
- a.value && (p.value || (l.value = a.value.currentTime), a.value.ended && i.value && (i.value = !1));
273
- }, Ue = () => {
274
- i.value = !1;
275
- }, $e = () => {
276
- console.error("Не удалось загрузить аудио"), i.value = !1, v.value = void 0, a.value && (a.value.pause(), a.value.currentTime = 0, a.value.removeAttribute("src"), a.value.load()), c.value = x(n.message.duration) ?? 0;
292
+ h.value = e.duration || 0;
293
+ e.playbackRate = D.value.speed;
294
+ }, We = () => {
295
+ n.value && (b.value || (f.value = n.value.currentTime), n.value.ended && c.value && (c.value = !1));
296
+ }, Je = () => {
297
+ c.value = !1;
298
+ }, Ke = () => {
299
+ console.error("Не удалось загрузить аудио"), c.value = !1, x.value = void 0, n.value && (n.value.pause(), n.value.currentTime = 0, n.value.removeAttribute("src"), n.value.load()), h.value = $(u.message.duration) ?? 0;
277
300
  };
278
- function je(e) {
279
- return ft(e.position, "audio-message");
301
+ function V(e) {
302
+ return Es(e.position, "audio-message");
280
303
  }
281
- const { onToggleReaction: z, onAddReaction: Q, onRemoveReaction: W } = gt(d), J = u(null), K = u(null), X = s(() => {
282
- var t;
283
- const e = (t = K.value) == null ? void 0 : t.$el;
304
+ const { onToggleReaction: me, onAddReaction: de, onRemoveReaction: ce } = As(R), ve = g(null), ge = g(null), Xe = r(() => {
305
+ var s;
306
+ const e = (s = ge.value) == null ? void 0 : s.$el;
284
307
  return e instanceof HTMLElement ? e : null;
285
- }), { showReactions: Fe, onContentPointerEnter: He, onContentPointerLeave: Ge } = ut({
286
- message: () => n.message,
287
- messageId: () => n.message.messageId,
288
- reactions: () => n.message.reactions,
289
- reactionsActive: L,
290
- reactionsMode: () => n.reactionsMode,
291
- reply: () => ne(n.message, "message.audio"),
292
- menuEnabled: () => P.value.length > 0,
293
- contentRef: J,
294
- chipsRef: X,
308
+ }), { showReactions: es, onContentPointerEnter: fe, onContentPointerLeave: ye } = Ms({
309
+ message: () => u.message,
310
+ messageId: () => u.message.messageId,
311
+ reactions: () => u.message.reactions,
312
+ reactionsActive: W,
313
+ reactionsMode: () => u.reactionsMode,
314
+ reply: () => Me(u.message, "message.audio"),
315
+ menuEnabled: () => S.value.length > 0,
316
+ contentRef: ve,
317
+ chipsRef: Xe,
295
318
  handlers: {
296
- onToggleReaction: z,
297
- onAddReaction: Q,
298
- onRemoveReaction: W,
299
- onMenu: F
319
+ onToggleReaction: me,
320
+ onAddReaction: de,
321
+ onRemoveReaction: ce,
322
+ onMenu: Oe
300
323
  }
301
- }), Ye = mt(() => n.message, () => n.subtextTooltipData);
302
- function Be() {
303
- d("sms-invite", n.message);
324
+ }), ss = Ss(() => u.message, () => u.subtextTooltipData);
325
+ function ts() {
326
+ R("sms-invite", u.message);
304
327
  }
305
- const Z = { props: n, speed: R, speedIndex: M, currentSpeed: E, cycleSpeed: ie, emit: d, menuActions: P, hoverActionsEnabled: le, reactionsActive: L, chatAppId: U, startReply: $, player: a, lazyAudioSrc: v, isPlaying: i, audioDuration: c, currentTime: l, isSeeking: p, audioSrc: S, parseMessageDurationToSeconds: x, resetAudioState: I, isOpenMenu: ce, buttonMenuVisible: me, menuAnchorRef: de, menuRef: ve, menuStyle: pe, menuTheme: fe, showMenu: ge, hideMenu: j, openMenu: F, toggleMenu: ye, onMenuMouseEnter: he, onMenuMouseLeave: be, clickAction: H, viewsAction: Re, handleClickReplied: Me, expandedPanel: m, requestedOnDemand: g, recognitionReadyStatus: se, summaryReadyStatus: oe, transcriptData: y, summaryData: h, transcriptHtml: G, isTranscriptReady: Y, summaryHtml: B, isSummaryReady: q, hasTextOption: A, hasSummaryOption: O, isExpandedPanelVisible: Se, transcriptPlaceholderText: xe, summaryPlaceholderText: Te, downloadAudio: V, handleActionClick: we, linkedHtml: Ne, inNewWindow: Ee, status: Ie, statusTitle: Ae, rightBubbleStyle: Oe, togglePlayPause: Ce, formatTime: C, formatCurrentTime: _e, handleSeekEnd: ke, formatDuration: De, handleLoadedMetadata: Pe, handleTimeUpdate: Le, handleEnded: Ue, handleAudioError: $e, getClass: je, onToggleReaction: z, onAddReaction: Q, onRemoveReaction: W, contentRef: J, reactionsRef: K, chipsRef: X, showReactions: Fe, onContentPointerEnter: He, onContentPointerLeave: Ge, channelInfo: Ye, handleSmsInvite: Be, handleText: () => {
328
+ const as = () => {
329
+ if (!E.value) return;
330
+ const e = y.value === "text" ? null : "text";
331
+ y.value = e, e === "text" && !se.value && !I.value.text && (I.value.text = !0, R("action", { action: "fetchTranscript", messageId: u.message.messageId }));
332
+ }, ns = () => {
306
333
  if (!A.value) return;
307
- const e = m.value === "text" ? null : "text";
308
- m.value = e, e === "text" && !Y.value && !g.value.text && (g.value.text = !0, d("action", { action: "fetchTranscript", messageId: n.message.messageId }));
309
- }, handleSummary: () => {
310
- if (!O.value) return;
311
- const e = m.value === "summary" ? null : "summary";
312
- m.value = e, e === "summary" && !q.value && !g.value.summary && (g.value.summary = !0, d("action", { action: "fetchSummary", messageId: n.message.messageId }));
313
- }, ContextMenu: Je, LinkPreview: Ke, EmbedPreview: Xe, FeedReplyQuote: Ze, MessageReactions: et, MessageStatusIndicator: tt, MessageSmsInvite: at, DeletedMessageContent: nt, Tooltip: st };
314
- return Object.defineProperty(Z, "__isScriptSetup", { enumerable: !1, value: !0 }), Z;
334
+ const e = y.value === "summary" ? null : "summary";
335
+ y.value = e, e === "summary" && !ae.value && !I.value.summary && (I.value.summary = !0, R("action", { action: "fetchSummary", messageId: u.message.messageId }));
336
+ };
337
+ return (e, s) => (l(), m("div", {
338
+ ref_key: "menuAnchorRef",
339
+ ref: _e,
340
+ class: C(["audio-message", [
341
+ V(t.message),
342
+ t.applyStyle(t.message)
343
+ ]]),
344
+ messageId: t.message.messageId,
345
+ style: Y(o(Ze)),
346
+ onMouseleave: s[10] || (s[10] = //@ts-ignore
347
+ (...a) => o(H) && o(H)(...a))
348
+ }, [
349
+ t.message.avatar && t.isFirstInSeries ? (l(), m("img", {
350
+ key: 0,
351
+ class: "audio-message__avatar",
352
+ src: t.message.avatar,
353
+ height: "32",
354
+ width: "32",
355
+ style: Y({ gridRow: t.message.subText ? "2" : "1" })
356
+ }, null, 12, Ls)) : d("", !0),
357
+ t.message.subText && t.isFirstInSeries ? (l(), m("p", Os, [
358
+ w(Cs, {
359
+ text: o(ss),
360
+ position: t.message.position === "left" ? "right" : "left",
361
+ offset: 8
362
+ }, {
363
+ default: Z(() => [
364
+ rs(p(t.message.subText), 1)
365
+ ]),
366
+ _: 1
367
+ }, 8, ["text", "position"])
368
+ ])) : d("", !0),
369
+ i("div", {
370
+ ref_key: "contentRef",
371
+ ref: ve,
372
+ class: C(["audio-message__content", { "is-first": t.isFirstInSeries, "with-avatar-indent": !t.isFirstInSeries && t.message.avatar }]),
373
+ onMouseenter: s[7] || (s[7] = (a) => o(Q) && o(Le)()),
374
+ onPointerenter: s[8] || (s[8] = //@ts-ignore
375
+ (...a) => o(fe) && o(fe)(...a)),
376
+ onPointerleave: s[9] || (s[9] = //@ts-ignore
377
+ (...a) => o(ye) && o(ye)(...a))
378
+ }, [
379
+ s[15] || (s[15] = i("div", {
380
+ class: "audio-message__bottom-shadow",
381
+ "aria-hidden": "true"
382
+ }, null, -1)),
383
+ t.message.deleted ? (l(), m(q, { key: 0 }, [
384
+ w(bs),
385
+ i("div", Ps, [
386
+ i("div", Ds, [
387
+ t.message.time ? (l(), m("span", Us, p(t.message.time), 1)) : d("", !0),
388
+ w(xe, {
389
+ "base-class": "audio-message",
390
+ "message-class": V(t.message),
391
+ "message-status": t.message.status,
392
+ "status-class": oe.value,
393
+ "status-title": ie.value
394
+ }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
395
+ ])
396
+ ])
397
+ ], 64)) : (l(), m(q, { key: 1 }, [
398
+ t.message.reply ? (l(), k(ys, {
399
+ key: 0,
400
+ style: { "grid-column": "1/3" },
401
+ message: t.message.reply,
402
+ class: C(t.message.position),
403
+ onReply: o($e)
404
+ }, null, 8, ["message", "class", "onReply"])) : d("", !0),
405
+ i("div", $s, [
406
+ i("audio", {
407
+ ref_key: "player",
408
+ ref: n,
409
+ src: x.value,
410
+ type: "audio/webm",
411
+ onLoadedmetadata: Qe,
412
+ onTimeupdate: We,
413
+ onEnded: Je,
414
+ onError: Ke
415
+ }, null, 40, Hs),
416
+ z(i("button", {
417
+ class: "audio-message__play",
418
+ onClick: ue
419
+ }, [...s[11] || (s[11] = [
420
+ i("div", { class: "audio-message__play-icon" }, [
421
+ i("svg", {
422
+ width: "20",
423
+ height: "23",
424
+ viewBox: "0 0 20 23",
425
+ fill: "none",
426
+ xmlns: "http://www.w3.org/2000/svg"
427
+ }, [
428
+ i("path", {
429
+ d: "M18.99 12.9934L3.0825 22.2234C1.7325 23.0059 0 22.0584 0 20.4809V2.02087C0 0.44587 1.73 -0.50413 3.0825 0.28087L18.99 9.51087C19.2971 9.68618 19.5524 9.93959 19.7299 10.2454C19.9075 10.5512 20.001 10.8985 20.001 11.2521C20.001 11.6057 19.9075 11.953 19.7299 12.2589C19.5524 12.5647 19.2971 12.8181 18.99 12.9934Z",
430
+ fill: "#5F5F5F"
431
+ })
432
+ ])
433
+ ], -1)
434
+ ])], 512), [
435
+ [Ce, !c.value]
436
+ ]),
437
+ z(i("button", {
438
+ class: "audio-message__pause",
439
+ onClick: ue
440
+ }, [...s[12] || (s[12] = [
441
+ i("div", { class: "audio-message__pause-icon" }, [
442
+ i("svg", {
443
+ width: "20",
444
+ height: "23",
445
+ viewBox: "0 0 20 23",
446
+ fill: "none",
447
+ xmlns: "http://www.w3.org/2000/svg"
448
+ }, [
449
+ i("path", {
450
+ d: "M3.75 0C4.74456 0 5.69839 0.395088 6.40165 1.09835C7.10491 1.80161 7.5 2.75544 7.5 3.75V18.75C7.5 19.7446 7.10491 20.6984 6.40165 21.4017C5.69839 22.1049 4.74456 22.5 3.75 22.5C2.75544 22.5 1.80161 22.1049 1.09835 21.4017C0.395088 20.6984 2.09588e-08 19.7446 0 18.75V3.75C0 2.75544 0.395088 1.80161 1.09835 1.09835C1.80161 0.395088 2.75544 0 3.75 0ZM16.25 0C17.2446 0 18.1984 0.395088 18.9017 1.09835C19.6049 1.80161 20 2.75544 20 3.75V18.75C20 19.7446 19.6049 20.6984 18.9017 21.4017C18.1984 22.1049 17.2446 22.5 16.25 22.5C15.2554 22.5 14.3016 22.1049 13.5983 21.4017C12.8951 20.6984 12.5 19.7446 12.5 18.75V3.75C12.5 2.75544 12.8951 1.80161 13.5983 1.09835C14.3016 0.395088 15.2554 0 16.25 0Z",
451
+ fill: "#5F5F5F"
452
+ })
453
+ ])
454
+ ], -1)
455
+ ])], 512), [
456
+ [Ce, c.value]
457
+ ]),
458
+ i("div", Vs, [
459
+ z(i("input", {
460
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => f.value = a),
461
+ class: "audio-message__progress-bar-container",
462
+ type: "range",
463
+ min: 0,
464
+ max: h.value,
465
+ step: "0.1",
466
+ onMousedown: s[1] || (s[1] = (a) => b.value = !0),
467
+ onMouseup: re,
468
+ onTouchstartPassive: s[2] || (s[2] = (a) => b.value = !0),
469
+ onTouchendPassive: re
470
+ }, null, 40, Bs), [
471
+ [ms, f.value]
472
+ ]),
473
+ i("div", js, [
474
+ i("button", {
475
+ type: "button",
476
+ class: "audio-message__speed-btn",
477
+ onClick: Re
478
+ }, p(D.value.text), 1)
479
+ ])
480
+ ]),
481
+ i("div", Gs, [
482
+ i("p", Ys, p(qe.value), 1),
483
+ i("p", Zs, p(ze.value), 1)
484
+ ])
485
+ ]),
486
+ t.message.text ? (l(), m("div", qs, [
487
+ i("p", {
488
+ onClick: s[3] || (s[3] = //@ts-ignore
489
+ (...a) => o(ne) && o(ne)(...a)),
490
+ innerHTML: o(Ye)
491
+ }, null, 8, zs)
492
+ ])) : d("", !0),
493
+ t.message.linkPreview ? (l(), k(gs, {
494
+ key: 2,
495
+ class: C(["audio-message__link-preview", t.message.position]),
496
+ "link-preview": t.message.linkPreview
497
+ }, null, 8, ["class", "link-preview"])) : d("", !0),
498
+ t.message.embed ? (l(), k(fs, {
499
+ key: 3,
500
+ class: C(t.message.position),
501
+ embed: t.message.embed
502
+ }, null, 8, ["class", "embed"])) : d("", !0),
503
+ i("div", Qs, [
504
+ o(es) ? (l(), k(ps, {
505
+ key: 0,
506
+ ref_key: "reactionsRef",
507
+ ref: ge,
508
+ reactions: t.message.reactions,
509
+ "message-id": t.message.messageId,
510
+ enabled: o(W),
511
+ mode: t.reactionsMode,
512
+ "current-user-id": t.currentUserId,
513
+ "reaction-user-names": t.reactionUserNames,
514
+ onToggleReaction: o(me),
515
+ onAddReaction: o(de),
516
+ onRemoveReaction: o(ce)
517
+ }, null, 8, ["reactions", "message-id", "enabled", "mode", "current-user-id", "reaction-user-names", "onToggleReaction", "onAddReaction", "onRemoveReaction"])) : d("", !0),
518
+ i("div", Ws, [
519
+ E.value || A.value ? (l(), m("div", Js, [
520
+ E.value ? (l(), m("button", {
521
+ key: 0,
522
+ class: C([
523
+ "audio-message__action-button",
524
+ { "audio-message__action-button--active": y.value === "text" }
525
+ ]),
526
+ type: "button",
527
+ onClick: as
528
+ }, " Текст ", 2)) : d("", !0),
529
+ A.value ? (l(), m("button", {
530
+ key: 1,
531
+ class: C([
532
+ "audio-message__action-button",
533
+ { "audio-message__action-button--active": y.value === "summary" }
534
+ ]),
535
+ type: "button",
536
+ onClick: ns
537
+ }, " Резюме ", 2)) : d("", !0)
538
+ ])) : d("", !0),
539
+ t.message.views ? (l(), m("div", {
540
+ key: 1,
541
+ class: "audio-message__views",
542
+ onClick: s[4] || (s[4] = //@ts-ignore
543
+ (...a) => o(X) && o(X)(...a))
544
+ }, [
545
+ s[13] || (s[13] = i("span", { class: "pi pi-eye" }, null, -1)),
546
+ i("p", null, p(t.message.views), 1)
547
+ ])) : d("", !0),
548
+ i("span", Ks, p(t.message.time), 1),
549
+ w(xe, {
550
+ "base-class": "audio-message",
551
+ "message-class": V(t.message),
552
+ "message-status": t.message.status,
553
+ "status-class": oe.value,
554
+ "status-title": ie.value
555
+ }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
556
+ ])
557
+ ]),
558
+ w(we, { name: "audio-message-expand" }, {
559
+ default: Z(() => [
560
+ He.value ? (l(), m("div", Xs, [
561
+ i("div", et, [
562
+ y.value === "text" ? (l(), m(q, { key: 0 }, [
563
+ se.value ? (l(), m("p", {
564
+ key: 1,
565
+ class: "audio-message__expand-plain",
566
+ innerHTML: ee.value
567
+ }, null, 8, tt)) : (l(), m("p", st, p(Ve.value), 1))
568
+ ], 64)) : (l(), m("p", at, [
569
+ ae.value ? (l(), m("span", {
570
+ key: 1,
571
+ innerHTML: te.value
572
+ }, null, 8, ot)) : (l(), m("span", nt, p(Be.value), 1))
573
+ ]))
574
+ ]),
575
+ i("div", it, [
576
+ i("button", {
577
+ type: "button",
578
+ class: "audio-message__expand-close",
579
+ onClick: s[5] || (s[5] = (a) => y.value = null)
580
+ }, " Закрыть ")
581
+ ])
582
+ ])) : d("", !0)
583
+ ]),
584
+ _: 1
585
+ }),
586
+ w(hs, {
587
+ status: t.message.status,
588
+ "has-messenger-account": t.message.hasMessengerAccount,
589
+ channel: t.channel,
590
+ onSmsInvite: ts
591
+ }, null, 8, ["status", "has-messenger-account", "channel"]),
592
+ o(Ne) && o(S).length && !t.reactionsEnabled && o(Q) ? (l(), m("button", {
593
+ key: 4,
594
+ class: "audio-message__menu-button",
595
+ onClick: s[6] || (s[6] = //@ts-ignore
596
+ (...a) => o(K) && o(K)(...a))
597
+ }, [...s[14] || (s[14] = [
598
+ i("svg", {
599
+ width: "4",
600
+ height: "17",
601
+ viewBox: "0 0 4 17",
602
+ fill: "none",
603
+ xmlns: "http://www.w3.org/2000/svg"
604
+ }, [
605
+ i("path", {
606
+ d: "M3.75 14.375C3.75 14.8723 3.55246 15.3492 3.20083 15.7008C2.84919 16.0525 2.37228 16.25 1.875 16.25C1.37772 16.25 0.900805 16.0525 0.549175 15.7008C0.197544 15.3492 0 14.8723 0 14.375C0 13.8777 0.197544 13.4008 0.549175 13.0492C0.900805 12.6975 1.37772 12.5 1.875 12.5C2.37228 12.5 2.84919 12.6975 3.20083 13.0492C3.55246 13.4008 3.75 13.8777 3.75 14.375ZM3.75 8.125C3.75 8.62228 3.55246 9.09919 3.20083 9.45083C2.84919 9.80246 2.37228 10 1.875 10C1.37772 10 0.900805 9.80246 0.549175 9.45083C0.197544 9.09919 0 8.62228 0 8.125C0 7.62772 0.197544 7.15081 0.549175 6.79917C0.900805 6.44754 1.37772 6.25 1.875 6.25C2.37228 6.25 2.84919 6.44754 3.20083 6.79917C3.55246 7.15081 3.75 7.62772 3.75 8.125ZM3.75 1.875C3.75 2.37228 3.55246 2.84919 3.20083 3.20083C2.84919 3.55246 2.37228 3.75 1.875 3.75C1.37772 3.75 0.900805 3.55246 0.549175 3.20083C0.197544 2.84919 0 2.37228 0 1.875C0 1.37772 0.197544 0.900806 0.549175 0.549175C0.900805 0.197544 1.37772 0 1.875 0C2.37228 0 2.84919 0.197544 3.20083 0.549175C3.55246 0.900806 3.75 1.37772 3.75 1.875Z",
607
+ fill: "#5F5F5F"
608
+ })
609
+ ], -1)
610
+ ])])) : d("", !0),
611
+ (l(), k(ds, { to: "body" }, [
612
+ w(we, null, {
613
+ default: Z(() => [
614
+ o(Ie) && o(S).length ? (l(), k(vs, {
615
+ key: 0,
616
+ ref_key: "menuRef",
617
+ ref: Ee,
618
+ class: "audio-message__context-menu message-actions-menu",
619
+ style: Y(o(Ae)),
620
+ "data-theme": o(Fe),
621
+ actions: o(S),
622
+ onClick: Ge,
623
+ onMouseenter: o(Pe),
624
+ onMouseleave: o(De)
625
+ }, null, 8, ["style", "data-theme", "actions", "onMouseenter", "onMouseleave"])) : d("", !0)
626
+ ]),
627
+ _: 1
628
+ })
629
+ ]))
630
+ ], 64))
631
+ ], 34)
632
+ ], 46, Fs));
315
633
  }
316
634
  });
317
635
  export {
318
- zt as default
636
+ Dt as default
319
637
  };