@mobilon-dev/chotto 0.3.85 → 0.3.87

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 (151) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +15 -13
  3. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +4 -2
  4. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +43 -39
  5. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +7 -5
  6. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -18
  7. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +2 -2
  8. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +83 -72
  9. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +174 -165
  10. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +21 -18
  11. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +32 -27
  12. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +44 -35
  13. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +11 -10
  14. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +4 -2
  15. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +18 -16
  16. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +16 -14
  17. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +4 -2
  18. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +4 -2
  19. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +4 -2
  20. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +4 -2
  21. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +4 -2
  22. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +4 -3
  23. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +4 -2
  24. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +3 -2
  25. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +4 -2
  26. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +3 -2
  27. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +7 -5
  28. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +4 -2
  29. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
  30. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +387 -340
  31. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +7 -0
  32. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +34 -0
  33. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +2 -2
  34. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +388 -352
  35. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +7 -0
  36. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +63 -0
  37. package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +21 -0
  38. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +7 -0
  39. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +35 -0
  40. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +2 -2
  41. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +204 -157
  42. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +3 -3
  43. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +273 -226
  44. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +9 -7
  45. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
  46. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +141 -117
  47. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +32 -0
  48. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +32 -0
  49. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +21 -0
  50. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -4
  51. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +102 -66
  52. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +11 -9
  53. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +14 -12
  54. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +11 -9
  55. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +13 -11
  56. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +11 -9
  57. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +4 -2
  58. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +2 -2
  59. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +255 -210
  60. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +1 -1
  61. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +241 -140
  62. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +3 -3
  63. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +245 -200
  64. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +7 -0
  65. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +58 -0
  66. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
  67. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +5 -4
  68. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +8 -8
  69. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +12 -13
  70. package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
  71. package/dist/components/3_compounds/Feed/Feed.vue2.js +187 -163
  72. package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +41 -26
  73. package/dist/components/3_compounds/Feed/composables/useFeedReply.js +16 -11
  74. package/dist/components/3_compounds/Feed/utils/getDefaultMessageMenuActions.js +31 -0
  75. package/dist/hooks/messages/buildEditPayload.js +10 -0
  76. package/dist/hooks/messages/calculateMessageMenuPosition.js +70 -0
  77. package/dist/hooks/messages/getDeletedOriginalText.js +26 -0
  78. package/dist/hooks/messages/getEditTooltipLines.js +28 -0
  79. package/dist/hooks/messages/useMessageActions.js +94 -19
  80. package/dist/hooks/messages/useMessageMenuActions.js +18 -0
  81. package/dist/hooks/messages/useStartEdit.js +30 -0
  82. package/dist/hooks/messages/useStartReply.js +16 -14
  83. package/dist/hooks/modals/useConfirmDeleteMessage.js +24 -0
  84. package/dist/hooks/useMessageDraft.js +46 -66
  85. package/dist/hooks/validators/messages/messageValidator.js +29 -35
  86. package/dist/index.js +220 -194
  87. package/dist/locale/en.js +6 -1
  88. package/dist/locale/ru.js +6 -1
  89. package/dist/themes/dark.css +1 -1
  90. package/dist/themes/default.css +1 -1
  91. package/dist/themes/glass.css +1 -1
  92. package/dist/themes/green.css +1 -1
  93. package/dist/themes/mobilon1.css +1 -1
  94. package/dist/types/apps/data/messages.d.ts +0 -321
  95. package/dist/types/components/1_atoms/ContextMenu/ContextMenu.vue.d.ts +0 -2
  96. package/dist/types/components/1_atoms/ContextMenu/stories/ContextMenu.stories.d.ts +1 -0
  97. package/dist/types/components/1_atoms/ContextMenu/styles/types.d.ts +18 -0
  98. package/dist/types/components/1_atoms/LoadingIndicator/styles/types.d.ts +0 -2
  99. package/dist/types/components/1_atoms/Tooltip/Tooltip.vue.d.ts +12 -1
  100. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -0
  101. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +3 -1
  102. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +3 -0
  103. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +4 -2
  104. package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +1 -0
  105. package/dist/types/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.d.ts +23 -0
  106. package/dist/types/components/2_feed_elements/BaseEditMessage/stories/BaseEditMessage.stories.d.ts +6 -0
  107. package/dist/types/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.d.ts +31 -0
  108. package/dist/types/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.d.ts +2 -0
  109. package/dist/types/components/2_feed_elements/DeletedMessageContent/styles/types.d.ts +35 -0
  110. package/dist/types/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.d.ts +13 -0
  111. package/dist/types/components/2_feed_elements/EditTextMessage/stories/EditTextMessage.stories.d.ts +7 -0
  112. package/dist/types/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.d.ts +1 -1
  113. package/dist/types/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.d.ts +1 -1
  114. package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +35 -0
  115. package/dist/types/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.d.ts +2 -0
  116. package/dist/types/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.d.ts +2 -0
  117. package/dist/types/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.d.ts +2 -0
  118. package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +11 -3
  119. package/dist/types/components/2_feed_elements/TextMessage/stories/TextMessage.stories.d.ts +1 -0
  120. package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +22 -0
  121. package/dist/types/components/2_feed_elements/VideoMessage/stories/VideoMessage.stories.d.ts +2 -2
  122. package/dist/types/components/2_feed_elements/types/components.d.ts +1 -2
  123. package/dist/types/components/2_feed_elements/types/messages.d.ts +116 -9
  124. package/dist/types/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.d.ts +22 -0
  125. package/dist/types/components/2_modals/ConfirmDeleteMessage/stories/ConfirmDeleteMessage.stories.d.ts +37 -0
  126. package/dist/types/components/2_modals/ConfirmDeleteMessage/styles/types.d.ts +97 -0
  127. package/dist/types/components/3_compounds/ChatInput/types/IInputMessage.d.ts +2 -1
  128. package/dist/types/components/3_compounds/ChatList/styles/types.d.ts +2 -2
  129. package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +20 -3
  130. package/dist/types/components/3_compounds/Feed/composables/useFeedComponents.d.ts +6 -2
  131. package/dist/types/components/3_compounds/Feed/composables/useFeedGrouping.d.ts +0 -1
  132. package/dist/types/components/3_compounds/Feed/composables/useFeedReply.d.ts +7 -1
  133. package/dist/types/components/3_compounds/Feed/utils/getDefaultMessageMenuActions.d.ts +3 -0
  134. package/dist/types/components/3_compounds/SideBar/SideBar.vue.d.ts +2 -2
  135. package/dist/types/components/index.d.ts +4 -0
  136. package/dist/types/hooks/messages/buildEditPayload.d.ts +7 -0
  137. package/dist/types/hooks/messages/calculateMessageMenuPosition.d.ts +16 -0
  138. package/dist/types/hooks/messages/getDeletedOriginalText.d.ts +28 -0
  139. package/dist/types/hooks/messages/getEditTooltipLines.d.ts +17 -0
  140. package/dist/types/hooks/messages/index.d.ts +6 -0
  141. package/dist/types/hooks/messages/useMessageActions.d.ts +33 -39
  142. package/dist/types/hooks/messages/useMessageMenuActions.d.ts +10 -0
  143. package/dist/types/hooks/messages/useStartEdit.d.ts +6 -0
  144. package/dist/types/hooks/modals/index.d.ts +1 -0
  145. package/dist/types/hooks/modals/useConfirmDeleteMessage.d.ts +2 -0
  146. package/dist/types/hooks/useMessageDraft.d.ts +10 -1
  147. package/dist/types/hooks/validators/messages/types.d.ts +0 -6
  148. package/dist/types/locale/en.d.ts +5 -0
  149. package/dist/types/locale/ru.d.ts +5 -0
  150. package/dist/types/main.d.ts +1 -0
  151. package/package.json +1 -1
@@ -1,53 +1,62 @@
1
- import { defineComponent as He, inject as re, computed as r, unref as l, toRefs as Ge, ref as g, watch as ce, createElementBlock as i, openBlock as n, normalizeClass as G, createCommentVNode as f, createElementVNode as o, createVNode as Y, withCtx as V, createTextVNode as h, toDisplayString as d, createBlock as $, Fragment as x, withDirectives as Z, vShow as de, vModelText as Ye, Transition as me, nextTick as Ze } from "vue";
2
- import { useMessageActions as qe } from "../../../hooks/messages/useMessageActions.js";
1
+ import { defineComponent as We, inject as Y, computed as r, unref as a, toRefs as et, ref as g, watch as de, createElementBlock as u, openBlock as n, normalizeClass as Z, createCommentVNode as p, createElementVNode as o, createVNode as P, withCtx as $, createTextVNode as b, toDisplayString as c, Fragment as y, createBlock as T, withDirectives as q, vShow as me, vModelText as tt, Transition as ve, Teleport as at, normalizeStyle as st, nextTick as lt } from "vue";
2
+ import { useMessageActions as nt } from "../../../hooks/messages/useMessageActions.js";
3
+ import { useMessageMenuActions as ot } from "../../../hooks/messages/useMessageMenuActions.js";
3
4
  import "../../../node_modules/linkifyjs/dist/linkify.js";
4
5
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
5
6
  import "../../../functions/parseMarkdown.js";
6
7
  import "../../../hooks/useEmojiNative.js";
7
- import { useSubtextTooltip as ze } from "../../../hooks/messages/useSubtextTooltip.js";
8
+ import { useSubtextTooltip as ut } from "../../../hooks/messages/useSubtextTooltip.js";
9
+ import { useStartReply as it } from "../../../hooks/messages/useStartReply.js";
8
10
  import "../../../hooks/useMessageDraft.js";
9
11
  import "../../../hooks/useSearchModel.js";
10
12
  import "../../../hooks/useTheme.js";
11
13
  /* empty css */
12
14
  /* empty css */
13
- import Je from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
14
- import ve from "../../1_atoms/Tooltip/Tooltip.vue.js";
15
- import Ke from "./icons/IncomingCallIcon.vue.js";
16
- import Qe from "./icons/OutgoingCallIcon.vue.js";
17
- const Xe = ["messageId"], We = ["src"], et = {
15
+ import "../../../locale/useLocale.js";
16
+ /* empty css */
17
+ import { buildReplyPayload as rt } from "../../../hooks/messages/buildReplyPayload.js";
18
+ import ct from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
19
+ import pe from "../../1_atoms/Tooltip/Tooltip.vue.js";
20
+ import dt from "../DeletedMessageContent/DeletedMessageContent.vue.js";
21
+ import mt from "./icons/IncomingCallIcon.vue.js";
22
+ import vt from "./icons/OutgoingCallIcon.vue.js";
23
+ const pt = ["messageId"], _t = ["src"], ft = {
18
24
  key: 1,
19
25
  class: "call-message__subtext"
20
- }, tt = { class: "call-message__content" }, at = { class: "call-message__header-container" }, st = { class: "call-message__title-wrapper" }, lt = {
26
+ }, gt = { class: "call-message__content" }, yt = { class: "call-message__info-container" }, ht = {
27
+ key: 0,
28
+ class: "call-message__time"
29
+ }, Ct = { class: "call-message__header-container" }, xt = { class: "call-message__title-wrapper" }, bt = {
21
30
  key: 0,
22
31
  class: "call-message__title"
23
- }, nt = {
32
+ }, wt = {
24
33
  key: 1,
25
34
  class: "call-message__title call-message__title--missed"
26
- }, ot = {
35
+ }, kt = {
27
36
  key: 0,
28
37
  class: "call-message__title"
29
- }, ut = {
38
+ }, Mt = {
30
39
  key: 1,
31
40
  class: "call-message__title call-message__title--missed"
32
- }, it = {
41
+ }, Tt = {
33
42
  key: 0,
34
43
  class: "call-message__missed-info"
35
- }, rt = {
44
+ }, Rt = {
36
45
  key: 1,
37
46
  class: "call-message__audio-wrapper"
38
- }, ct = ["src"], dt = { class: "call-message__audio-progress" }, mt = { class: "call-message__audio-progress-bar" }, vt = ["max"], pt = { class: "call-message__audio-time" }, _t = { class: "call-message__info-container" }, ft = { class: "call-message__actions" }, gt = { class: "call-message__time" }, yt = {
47
+ }, Nt = ["src"], It = { class: "call-message__audio-progress" }, St = { class: "call-message__audio-progress-bar" }, At = ["max"], Et = { class: "call-message__audio-time" }, Ft = { class: "call-message__info-container" }, Ot = { class: "call-message__actions" }, Dt = { class: "call-message__time" }, Lt = {
39
48
  key: 0,
40
49
  class: "call-message__expand-panel"
41
- }, Ct = { class: "call-message__expand-inner" }, ht = {
50
+ }, Ut = { class: "call-message__expand-inner" }, Vt = {
42
51
  key: 0,
43
52
  class: "call-message__expand-placeholder"
44
- }, xt = ["innerHTML"], bt = {
53
+ }, Pt = ["innerHTML"], $t = {
45
54
  key: 1,
46
55
  class: "call-message__expand-plain"
47
- }, wt = {
56
+ }, jt = {
48
57
  key: 0,
49
58
  class: "call-message__expand-placeholder"
50
- }, kt = ["innerHTML"], Tt = { class: "call-message__expand-close-wrap" }, Mt = "RECOGNITION_READY", Nt = "SUMMARY_READY", Yt = /* @__PURE__ */ He({
59
+ }, Bt = ["innerHTML"], Ht = { class: "call-message__expand-close-wrap" }, Gt = "RECOGNITION_READY", Yt = "SUMMARY_READY", _a = /* @__PURE__ */ We({
51
60
  __name: "CallMessage",
52
61
  props: {
53
62
  message: {
@@ -74,54 +83,63 @@ const Xe = ["messageId"], We = ["src"], et = {
74
83
  }
75
84
  },
76
85
  emits: ["action", "reply", "call"],
77
- setup(pe, { emit: _e }) {
78
- const q = re("channels", void 0), z = re("selectedChat", void 0), fe = r(() => {
79
- if (q)
80
- return l(q);
81
- }), ge = r(() => {
86
+ setup(_e, { emit: fe }) {
87
+ const z = Y("channels", void 0), J = Y("selectedChat", void 0), ge = r(() => {
82
88
  if (z)
83
- return l(z);
84
- }), M = _e, b = pe, { message: a, applyStyle: ye } = Ge(b), N = r(() => {
85
- const e = a.value;
89
+ return a(z);
90
+ }), ye = r(() => {
91
+ if (J)
92
+ return a(J);
93
+ }), R = fe, { menuActions: j } = ot(() => h.message), he = Y("chatAppId"), { startReply: Ce } = it(he || ""), h = _e, { message: s, applyStyle: xe } = et(h), N = r(() => {
94
+ const e = s.value;
86
95
  return e.url ? e.url : typeof e.recordUrl == "string" ? e.recordUrl : void 0;
87
96
  }), {
88
- isOpenMenu: P,
89
- buttonMenuVisible: Ce,
90
- showMenu: J,
91
- hideMenu: j,
92
- clickAction: he
93
- } = qe(b.message, M), p = g(null), I = r(() => {
97
+ isOpenMenu: be,
98
+ buttonMenuVisible: we,
99
+ menuAnchorRef: ke,
100
+ menuRef: Me,
101
+ menuStyle: Te,
102
+ menuTheme: Re,
103
+ showMenu: K,
104
+ hideMenu: B,
105
+ toggleMenu: Q,
106
+ onMenuMouseEnter: Ne,
107
+ onMenuMouseLeave: Ie,
108
+ clickAction: Se
109
+ } = nt(h.message, R, {
110
+ onReply: () => Ce(rt(h.message, "message.call"))
111
+ }), _ = g(null), I = r(() => {
94
112
  var t;
95
- const e = (t = a.value) == null ? void 0 : t.transcript;
113
+ const e = (t = s.value) == null ? void 0 : t.transcript;
96
114
  return !e || typeof e != "object" ? null : e;
97
- }), R = r(() => {
115
+ }), S = r(() => {
98
116
  var t;
99
- const e = (t = a.value) == null ? void 0 : t.summary;
117
+ const e = (t = s.value) == null ? void 0 : t.summary;
100
118
  return !e || typeof e != "object" ? null : e;
101
- }), K = r(() => {
119
+ }), X = r(() => {
102
120
  var t;
103
121
  const e = (t = I.value) == null ? void 0 : t.html;
104
122
  return typeof e != "string" ? "" : e.trim();
105
- }), Q = r(() => {
123
+ }), W = r(() => {
106
124
  var t;
107
- const e = (t = R.value) == null ? void 0 : t.html;
125
+ const e = (t = S.value) == null ? void 0 : t.html;
108
126
  return typeof e != "string" ? "" : e.trim();
109
- }), X = r(() => {
127
+ }), ee = r(() => {
110
128
  var e;
111
- return ((e = I.value) == null ? void 0 : e.status) === Mt && K.value.length > 0;
112
- }), W = r(() => {
129
+ return ((e = I.value) == null ? void 0 : e.status) === Gt && X.value.length > 0;
130
+ }), te = r(() => {
113
131
  var e;
114
- return ((e = R.value) == null ? void 0 : e.status) === Nt && Q.value.length > 0;
115
- }), E = g({
132
+ return ((e = S.value) == null ? void 0 : e.status) === Yt && W.value.length > 0;
133
+ }), A = g({
116
134
  text: !1,
117
135
  summary: !1
118
- }), S = r(() => {
136
+ }), E = r(() => {
119
137
  var e, t;
120
- return !!((e = I.value) != null && e.status) && !((t = a.value) != null && t.isMissedCall);
138
+ return !!((e = I.value) != null && e.status) && !((t = s.value) != null && t.isMissedCall);
121
139
  }), F = r(() => {
122
140
  var e, t;
123
- return !!((e = R.value) != null && e.status) && !((t = a.value) != null && t.isMissedCall);
124
- }), xe = r(() => p.value === "text" ? S.value : p.value === "summary" ? F.value : !1), be = r(() => {
141
+ return !!((e = S.value) != null && e.status) && !((t = s.value) != null && t.isMissedCall);
142
+ }), Ae = r(() => _.value === "text" ? E.value : _.value === "summary" ? F.value : !1), Ee = r(() => {
125
143
  var e;
126
144
  switch ((e = I.value) == null ? void 0 : e.status) {
127
145
  case "RECOGNITION_PLANNED":
@@ -133,9 +151,9 @@ const Xe = ["messageId"], We = ["src"], et = {
133
151
  default:
134
152
  return "Текст звонка недоступен";
135
153
  }
136
- }), we = r(() => {
154
+ }), Fe = r(() => {
137
155
  var e;
138
- switch ((e = R.value) == null ? void 0 : e.status) {
156
+ switch ((e = S.value) == null ? void 0 : e.status) {
139
157
  case "SUMMARY_PLANNED":
140
158
  return "Формируем резюме, пожалуйста подождите...";
141
159
  case "SUMMARY_ERROR":
@@ -145,7 +163,7 @@ const Xe = ["messageId"], We = ["src"], et = {
145
163
  default:
146
164
  return "Резюме недоступно";
147
165
  }
148
- }), s = g(null), w = g(void 0), m = g(!1), y = g(0), v = g(0), C = g(!1), O = g(0), B = [
166
+ }), l = g(null), w = g(void 0), m = g(!1), C = g(0), v = g(0), x = g(!1), O = g(0), H = [
149
167
  {
150
168
  text: "1.0x",
151
169
  speed: 1
@@ -162,69 +180,69 @@ const Xe = ["messageId"], We = ["src"], et = {
162
180
  text: "2.0x",
163
181
  speed: 2
164
182
  }
165
- ], H = r(() => B[O.value] ?? B[0]), ke = (e) => {
183
+ ], G = r(() => H[O.value] ?? H[0]), Oe = (e) => {
166
184
  if (!e) return;
167
- const u = e.trim().match(/^(\d+):([0-5]\d)$/);
168
- if (!u) return;
169
- const _ = Number(u[1]), c = Number(u[2]);
170
- if (!(Number.isNaN(_) || Number.isNaN(c)))
171
- return _ * 60 + c;
172
- }, ee = () => {
185
+ const i = e.trim().match(/^(\d+):([0-5]\d)$/);
186
+ if (!i) return;
187
+ const f = Number(i[1]), d = Number(i[2]);
188
+ if (!(Number.isNaN(f) || Number.isNaN(d)))
189
+ return f * 60 + d;
190
+ }, ae = () => {
173
191
  var e;
174
- m.value = !1, v.value = 0, y.value = ke((e = a.value) == null ? void 0 : e.callDuration) ?? 0, C.value = !1, O.value = 0;
192
+ m.value = !1, v.value = 0, C.value = Oe((e = s.value) == null ? void 0 : e.callDuration) ?? 0, x.value = !1, O.value = 0;
175
193
  };
176
- ee(), ce(
194
+ ae(), de(
177
195
  N,
178
196
  (e, t) => {
179
- e !== t && (ee(), w.value = void 0, s.value && (s.value.pause(), s.value.currentTime = 0, s.value.removeAttribute("src"), s.value.load()));
197
+ e !== t && (ae(), w.value = void 0, l.value && (l.value.pause(), l.value.currentTime = 0, l.value.removeAttribute("src"), l.value.load()));
180
198
  }
181
199
  );
182
- const te = (e) => {
183
- const t = Math.floor(e / 60), u = Math.floor(e % 60);
184
- return `${t.toString().padStart(2, "0")}:${u.toString().padStart(2, "0")}`;
185
- }, Te = r(() => te(v.value)), Me = r(() => te(y.value)), ae = async () => {
200
+ const se = (e) => {
201
+ const t = Math.floor(e / 60), i = Math.floor(e % 60);
202
+ return `${t.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}`;
203
+ }, De = r(() => se(v.value)), Le = r(() => se(C.value)), le = async () => {
186
204
  const e = N.value;
187
- if (!(!s.value || !e))
205
+ if (!(!l.value || !e))
188
206
  if (m.value)
189
- s.value.pause(), m.value = !1;
207
+ l.value.pause(), m.value = !1;
190
208
  else
191
209
  try {
192
- w.value || (w.value = e, await Ze(), s.value.load()), await s.value.play(), m.value = !0;
210
+ w.value || (w.value = e, await lt(), l.value.load()), await l.value.play(), m.value = !0;
193
211
  } catch (t) {
194
212
  console.error("Не удалось воспроизвести запись звонка", t), m.value = !1;
195
213
  }
196
- }, Ne = () => {
197
- O.value = (O.value + 1) % B.length, s.value && (s.value.playbackRate = H.value.speed);
214
+ }, Ue = () => {
215
+ O.value = (O.value + 1) % H.length, l.value && (l.value.playbackRate = G.value.speed);
198
216
  };
199
- ce(
217
+ de(
200
218
  () => v.value,
201
219
  () => {
202
- s.value && C.value && (s.value.duration !== 1 / 0 && !Number.isNaN(s.value.duration) && (s.value.currentTime = v.value), Math.abs(v.value - y.value) < 0.1 && (m.value = !1));
220
+ l.value && x.value && (l.value.duration !== 1 / 0 && !Number.isNaN(l.value.duration) && (l.value.currentTime = v.value), Math.abs(v.value - C.value) < 0.1 && (m.value = !1));
203
221
  }
204
222
  );
205
- const se = () => {
206
- s.value && C.value && s.value.duration !== 1 / 0 && !Number.isNaN(s.value.duration) && (s.value.currentTime = v.value), C.value = !1;
207
- }, Ie = () => {
208
- if (!s.value) return;
209
- const e = s.value;
210
- if (y.value = 0, v.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
223
+ const ne = () => {
224
+ l.value && x.value && l.value.duration !== 1 / 0 && !Number.isNaN(l.value.duration) && (l.value.currentTime = v.value), x.value = !1;
225
+ }, Ve = () => {
226
+ if (!l.value) return;
227
+ const e = l.value;
228
+ if (C.value = 0, v.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
211
229
  e.currentTime = 1e101;
212
230
  const t = () => {
213
- s.value && (y.value = s.value.duration || 0, v.value = 0, s.value.currentTime = 0);
231
+ l.value && (C.value = l.value.duration || 0, v.value = 0, l.value.currentTime = 0);
214
232
  };
215
233
  e.addEventListener("timeupdate", t, { once: !0 });
216
234
  } else
217
- y.value = e.duration || 0;
218
- e.playbackRate = H.value.speed;
219
- }, Re = () => {
220
- s.value && (C.value || (v.value = s.value.currentTime), s.value.ended && m.value && (m.value = !1));
221
- }, Ee = () => {
235
+ C.value = e.duration || 0;
236
+ e.playbackRate = G.value.speed;
237
+ }, Pe = () => {
238
+ l.value && (x.value || (v.value = l.value.currentTime), l.value.ended && m.value && (m.value = !1));
239
+ }, $e = () => {
222
240
  m.value = !1;
223
- }, Se = () => {
224
- console.error("Не удалось загрузить запись звонка"), m.value = !1, w.value = void 0, s.value && (s.value.pause(), s.value.currentTime = 0, s.value.removeAttribute("src"), s.value.load());
225
- }, A = r(() => {
241
+ }, je = () => {
242
+ console.error("Не удалось загрузить запись звонка"), m.value = !1, w.value = void 0, l.value && (l.value.pause(), l.value.currentTime = 0, l.value.removeAttribute("src"), l.value.load());
243
+ }, D = r(() => {
226
244
  var e;
227
- switch ((e = a.value) == null ? void 0 : e.direction) {
245
+ switch ((e = s.value) == null ? void 0 : e.direction) {
228
246
  case "incoming":
229
247
  return "Входящий";
230
248
  case "outgoing":
@@ -232,10 +250,10 @@ const Xe = ["messageId"], We = ["src"], et = {
232
250
  default:
233
251
  return "Звонок";
234
252
  }
235
- }), le = r(() => {
236
- var t, u;
237
- const e = (t = a.value) == null ? void 0 : t.isMissedCall;
238
- switch ((u = a.value) == null ? void 0 : u.direction) {
253
+ }), oe = r(() => {
254
+ var t, i;
255
+ const e = (t = s.value) == null ? void 0 : t.isMissedCall;
256
+ switch ((i = s.value) == null ? void 0 : i.direction) {
239
257
  case "incoming":
240
258
  return e ? "#F84932" : "#00AC47";
241
259
  case "outgoing":
@@ -243,58 +261,58 @@ const Xe = ["messageId"], We = ["src"], et = {
243
261
  default:
244
262
  return e ? "#5F5F5F" : "#00AC47";
245
263
  }
246
- }), Fe = r(() => {
264
+ }), Be = r(() => {
247
265
  var e;
248
- return ((e = a.value) == null ? void 0 : e.direction) === "outgoing" ? "Без ответа" : "Пропущенный";
249
- }), ne = r(() => {
250
- var D;
251
- const e = a.value, t = fe.value, u = ge.value;
252
- if (!(e != null && e.dialogId) || !t || !u)
266
+ return ((e = s.value) == null ? void 0 : e.direction) === "outgoing" ? "Без ответа" : "Пропущенный";
267
+ }), ue = r(() => {
268
+ var L;
269
+ const e = s.value, t = ge.value, i = ye.value;
270
+ if (!(e != null && e.dialogId) || !t || !i)
253
271
  return null;
254
- const _ = (D = u.dialogs) == null ? void 0 : D.find((k) => k.dialogId === e.dialogId);
255
- if (!(_ != null && _.channelId))
272
+ const f = (L = i.dialogs) == null ? void 0 : L.find((k) => k.dialogId === e.dialogId);
273
+ if (!(f != null && f.channelId))
256
274
  return null;
257
- const c = t.find((k) => k.channelId === _.channelId);
258
- return (c == null ? void 0 : c.title) || null;
259
- }), Oe = ze(() => b.message, () => b.subtextTooltipData), Ae = {
275
+ const d = t.find((k) => k.channelId === f.channelId);
276
+ return (d == null ? void 0 : d.title) || null;
277
+ }), He = ut(() => h.message, () => h.subtextTooltipData), Ge = {
260
278
  message: "message"
261
279
  };
262
- function De(e, t) {
263
- const u = e.position;
280
+ function Ye(e, t) {
281
+ const i = e.position;
264
282
  switch (t) {
265
283
  case "message":
266
- return u === "left" ? "call-message__left" : "call-message__right";
284
+ return i === "left" ? "call-message__left" : "call-message__right";
267
285
  default:
268
286
  return "";
269
287
  }
270
288
  }
271
- const Le = () => {
272
- if (typeof b.onCall == "function") {
273
- b.onCall(a.value);
289
+ const Ze = () => {
290
+ if (typeof h.onCall == "function") {
291
+ h.onCall(s.value);
274
292
  return;
275
293
  }
276
- M("call", { message: a.value });
277
- }, Ue = () => {
278
- if (!S.value) return;
279
- const e = p.value === "text" ? null : "text";
280
- p.value = e, e === "text" && !X.value && !E.value.text && (E.value.text = !0, M("action", { action: "fetchTranscript", messageId: a.value.messageId }));
281
- }, Ve = () => {
294
+ R("call", { message: s.value });
295
+ }, qe = () => {
296
+ if (!E.value) return;
297
+ const e = _.value === "text" ? null : "text";
298
+ _.value = e, e === "text" && !ee.value && !A.value.text && (A.value.text = !0, R("action", { action: "fetchTranscript", messageId: s.value.messageId }));
299
+ }, ze = () => {
282
300
  if (!F.value) return;
283
- const e = p.value === "summary" ? null : "summary";
284
- p.value = e, e === "summary" && !W.value && !E.value.summary && (E.value.summary = !0, M("action", { action: "fetchCallSummary", messageId: a.value.messageId }));
285
- }, $e = async () => {
286
- var t, u, _;
301
+ const e = _.value === "summary" ? null : "summary";
302
+ _.value = e, e === "summary" && !te.value && !A.value.summary && (A.value.summary = !0, R("action", { action: "fetchCallSummary", messageId: s.value.messageId }));
303
+ }, Je = async () => {
304
+ var t, i, f;
287
305
  const e = N.value;
288
306
  if (e)
289
307
  try {
290
- const c = await fetch(e, {
308
+ const d = await fetch(e, {
291
309
  headers: {
292
310
  Accept: "audio/*"
293
311
  }
294
312
  });
295
- if (!c.ok)
296
- throw new Error(`HTTP error! status: ${c.status}`);
297
- const D = c.headers.get("content-type") || "", k = await c.blob(), L = ((u = (t = e.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : u.toLowerCase()) || "", je = {
313
+ if (!d.ok)
314
+ throw new Error(`HTTP error! status: ${d.status}`);
315
+ const L = d.headers.get("content-type") || "", k = await d.blob(), U = ((i = (t = e.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : i.toLowerCase()) || "", Qe = {
298
316
  "audio/mpeg": "mp3",
299
317
  "audio/mp3": "mp3",
300
318
  "audio/wav": "wav",
@@ -305,261 +323,279 @@ const Xe = ["messageId"], We = ["src"], et = {
305
323
  "audio/flac": "flac",
306
324
  "audio/m4a": "m4a",
307
325
  "audio/x-m4a": "m4a",
308
- "application/octet-stream": L || "mp3"
309
- }, oe = L && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(L) ? L : je[D] || "mp3", ue = e.split("/"), U = decodeURIComponent(((_ = ue[ue.length - 1]) == null ? void 0 : _.split("?")[0]) || ""), Be = U ? U.includes(".") ? U : `${U}.${oe}` : `call-${a.value.messageId}.${oe}`, ie = window.URL.createObjectURL(k), T = document.createElement("a");
310
- T.href = ie, T.download = Be, document.body.appendChild(T), T.click(), document.body.removeChild(T), window.URL.revokeObjectURL(ie);
311
- } catch (c) {
312
- console.error("Ошибка при скачивании аудио звонка:", c), e && window.open(e, "_blank");
326
+ "application/octet-stream": U || "mp3"
327
+ }, ie = U && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(U) ? U : Qe[L] || "mp3", re = e.split("/"), V = decodeURIComponent(((f = re[re.length - 1]) == null ? void 0 : f.split("?")[0]) || ""), Xe = V ? V.includes(".") ? V : `${V}.${ie}` : `call-${s.value.messageId}.${ie}`, ce = window.URL.createObjectURL(k), M = document.createElement("a");
328
+ M.href = ce, M.download = Xe, document.body.appendChild(M), M.click(), document.body.removeChild(M), window.URL.revokeObjectURL(ce);
329
+ } catch (d) {
330
+ console.error("Ошибка при скачивании аудио звонка:", d), e && window.open(e, "_blank");
313
331
  }
314
- }, Pe = (e) => {
315
- e.action === "download" ? ($e(), j()) : he(e);
332
+ }, Ke = (e) => {
333
+ e.action === "download" ? (Je(), B()) : Se(e);
316
334
  };
317
- return (e, t) => (n(), i("div", {
318
- class: G([
319
- De(l(a), Ae.message),
320
- l(ye)(l(a))
335
+ return (e, t) => (n(), u("div", {
336
+ ref_key: "menuAnchorRef",
337
+ ref: ke,
338
+ class: Z([
339
+ Ye(a(s), Ge.message),
340
+ a(xe)(a(s))
321
341
  ]),
322
- messageId: l(a).messageId,
342
+ messageId: a(s).messageId,
323
343
  onMouseenter: t[5] || (t[5] = //@ts-ignore
324
- (...u) => l(J) && l(J)(...u)),
344
+ (...i) => a(K) && a(K)(...i)),
325
345
  onMouseleave: t[6] || (t[6] = //@ts-ignore
326
- (...u) => l(j) && l(j)(...u))
346
+ (...i) => a(B) && a(B)(...i))
327
347
  }, [
328
- l(a).avatar ? (n(), i("img", {
348
+ a(s).avatar ? (n(), u("img", {
329
349
  key: 0,
330
350
  class: "call-message__avatar",
331
- src: l(a).avatar,
351
+ src: a(s).avatar,
332
352
  height: "32",
333
353
  width: "32"
334
- }, null, 8, We)) : f("", !0),
335
- l(a).subText ? (n(), i("p", et, [
336
- Y(ve, {
337
- text: l(Oe),
338
- position: l(a).position === "left" ? "right" : "left",
354
+ }, null, 8, _t)) : p("", !0),
355
+ a(s).subText ? (n(), u("p", ft, [
356
+ P(pe, {
357
+ text: a(He),
358
+ position: a(s).position === "left" ? "right" : "left",
339
359
  offset: 8
340
360
  }, {
341
- default: V(() => [
342
- h(d(l(a).subText), 1)
361
+ default: $(() => [
362
+ b(c(a(s).subText), 1)
343
363
  ]),
344
364
  _: 1
345
365
  }, 8, ["text", "position"])
346
- ])) : f("", !0),
347
- o("div", tt, [
348
- o("div", at, [
349
- o("div", st, [
350
- l(a).direction === "incoming" || !l(a).direction ? (n(), $(Ke, {
351
- key: 0,
352
- class: "call-message__direction-icon",
353
- color: le.value
354
- }, null, 8, ["color"])) : (n(), $(Qe, {
355
- key: 1,
356
- class: "call-message__direction-icon",
357
- color: le.value
358
- }, null, 8, ["color"])),
359
- ne.value ? (n(), $(ve, {
360
- key: 2,
361
- text: ne.value,
362
- position: "top",
363
- offset: 8
364
- }, {
365
- default: V(() => [
366
- l(a).isMissedCall ? (n(), i("span", nt, [
367
- h(d(A.value) + " ", 1),
368
- l(a).direction !== "incoming" ? (n(), i(x, { key: 0 }, [
369
- h(" звонок ")
370
- ], 64)) : (n(), i(x, { key: 1 }, [
371
- h(" звонок ")
366
+ ])) : p("", !0),
367
+ o("div", gt, [
368
+ a(s).deleted ? (n(), u(y, { key: 0 }, [
369
+ P(dt),
370
+ o("div", yt, [
371
+ a(s).time ? (n(), u("span", ht, c(a(s).time), 1)) : p("", !0)
372
+ ])
373
+ ], 64)) : (n(), u(y, { key: 1 }, [
374
+ o("div", Ct, [
375
+ o("div", xt, [
376
+ a(s).direction === "incoming" || !a(s).direction ? (n(), T(mt, {
377
+ key: 0,
378
+ class: "call-message__direction-icon",
379
+ color: oe.value
380
+ }, null, 8, ["color"])) : (n(), T(vt, {
381
+ key: 1,
382
+ class: "call-message__direction-icon",
383
+ color: oe.value
384
+ }, null, 8, ["color"])),
385
+ ue.value ? (n(), T(pe, {
386
+ key: 2,
387
+ text: ue.value,
388
+ position: "top",
389
+ offset: 8
390
+ }, {
391
+ default: $(() => [
392
+ a(s).isMissedCall ? (n(), u("span", wt, [
393
+ b(c(D.value) + " ", 1),
394
+ a(s).direction !== "incoming" ? (n(), u(y, { key: 0 }, [
395
+ b(" звонок ")
396
+ ], 64)) : (n(), u(y, { key: 1 }, [
397
+ b(" звонок ")
398
+ ], 64))
399
+ ])) : (n(), u("span", bt, c(D.value) + " звонок ", 1))
400
+ ]),
401
+ _: 1
402
+ }, 8, ["text"])) : (n(), u(y, { key: 3 }, [
403
+ a(s).isMissedCall ? (n(), u("span", Mt, [
404
+ b(c(D.value) + " ", 1),
405
+ a(s).direction !== "incoming" ? (n(), u(y, { key: 0 }, [
406
+ b(" звонок ")
407
+ ], 64)) : (n(), u(y, { key: 1 }, [
408
+ b(" звонок ")
372
409
  ], 64))
373
- ])) : (n(), i("span", lt, d(A.value) + " звонок ", 1))
374
- ]),
375
- _: 1
376
- }, 8, ["text"])) : (n(), i(x, { key: 3 }, [
377
- l(a).isMissedCall ? (n(), i("span", ut, [
378
- h(d(A.value) + " ", 1),
379
- l(a).direction !== "incoming" ? (n(), i(x, { key: 0 }, [
380
- h(" звонок ")
381
- ], 64)) : (n(), i(x, { key: 1 }, [
382
- h(" звонок ")
383
- ], 64))
384
- ])) : (n(), i("span", ot, d(A.value) + " звонок ", 1))
385
- ], 64))
386
- ]),
387
- l(a).isMissedCall ? (n(), i("p", it, d(Fe.value) + ": " + d(l(a).callAttemptDuration), 1)) : f("", !0),
388
- N.value && !l(a).isMissedCall ? (n(), i("div", rt, [
389
- o("audio", {
390
- ref_key: "player",
391
- ref: s,
392
- src: w.value,
393
- type: "audio/webm",
394
- onLoadedmetadata: Ie,
395
- onTimeupdate: Re,
396
- onEnded: Ee,
397
- onError: Se
398
- }, null, 40, ct),
399
- Z(o("button", {
400
- class: "call-message__audio-play",
401
- type: "button",
402
- onClick: ae
403
- }, [...t[7] || (t[7] = [
404
- o("div", { class: "call-message__audio-play-icon" }, [
405
- o("svg", {
406
- width: "20",
407
- height: "23",
408
- viewBox: "0 0 20 23",
409
- fill: "none",
410
- xmlns: "http://www.w3.org/2000/svg"
411
- }, [
412
- o("path", {
413
- 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",
414
- fill: "#5F5F5F"
415
- })
416
- ])
417
- ], -1)
418
- ])], 512), [
419
- [de, !m.value]
420
- ]),
421
- Z(o("button", {
422
- class: "call-message__audio-pause",
423
- type: "button",
424
- onClick: ae
425
- }, [...t[8] || (t[8] = [
426
- o("div", { class: "call-message__audio-pause-icon" }, [
427
- o("svg", {
428
- width: "20",
429
- height: "23",
430
- viewBox: "0 0 20 23",
431
- fill: "none",
432
- xmlns: "http://www.w3.org/2000/svg"
433
- }, [
434
- o("path", {
435
- 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 0 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",
436
- fill: "#5F5F5F"
437
- })
438
- ])
439
- ], -1)
440
- ])], 512), [
441
- [de, m.value]
410
+ ])) : (n(), u("span", kt, c(D.value) + " звонок ", 1))
411
+ ], 64))
442
412
  ]),
443
- o("div", dt, [
444
- o("div", mt, [
445
- Z(o("input", {
446
- "onUpdate:modelValue": t[0] || (t[0] = (u) => v.value = u),
447
- class: "call-message__audio-slider",
448
- type: "range",
449
- min: 0,
450
- max: y.value,
451
- step: "0.1",
452
- onMousedown: t[1] || (t[1] = (u) => C.value = !0),
453
- onMouseup: se,
454
- onTouchstartPassive: t[2] || (t[2] = (u) => C.value = !0),
455
- onTouchendPassive: se
456
- }, null, 40, vt), [
457
- [Ye, v.value]
458
- ]),
459
- o("button", {
460
- type: "button",
461
- class: "call-message__audio-speed-btn",
462
- onClick: Ne
463
- }, d(H.value.text), 1)
413
+ a(s).isMissedCall ? (n(), u("p", Tt, c(Be.value) + ": " + c(a(s).callAttemptDuration), 1)) : p("", !0),
414
+ N.value && !a(s).isMissedCall ? (n(), u("div", Rt, [
415
+ o("audio", {
416
+ ref_key: "player",
417
+ ref: l,
418
+ src: w.value,
419
+ type: "audio/webm",
420
+ onLoadedmetadata: Ve,
421
+ onTimeupdate: Pe,
422
+ onEnded: $e,
423
+ onError: je
424
+ }, null, 40, Nt),
425
+ q(o("button", {
426
+ class: "call-message__audio-play",
427
+ type: "button",
428
+ onClick: le
429
+ }, [...t[7] || (t[7] = [
430
+ o("div", { class: "call-message__audio-play-icon" }, [
431
+ o("svg", {
432
+ width: "20",
433
+ height: "23",
434
+ viewBox: "0 0 20 23",
435
+ fill: "none",
436
+ xmlns: "http://www.w3.org/2000/svg"
437
+ }, [
438
+ o("path", {
439
+ 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",
440
+ fill: "#5F5F5F"
441
+ })
442
+ ])
443
+ ], -1)
444
+ ])], 512), [
445
+ [me, !m.value]
464
446
  ]),
465
- o("div", pt, [
466
- o("span", null, d(Te.value), 1),
467
- o("span", null, d(Me.value), 1)
468
- ])
469
- ])
470
- ])) : f("", !0)
471
- ]),
472
- o("div", _t, [
473
- o("div", ft, [
474
- !l(a).isMissedCall && (S.value || F.value) ? (n(), i(x, { key: 0 }, [
475
- S.value ? (n(), i("button", {
476
- key: 0,
477
- class: G([
478
- "call-message__call-button",
479
- { "call-message__call-button--active": p.value === "text" }
480
- ]),
447
+ q(o("button", {
448
+ class: "call-message__audio-pause",
481
449
  type: "button",
482
- onClick: Ue
483
- }, " Текст ", 2)) : f("", !0),
484
- F.value ? (n(), i("button", {
485
- key: 1,
486
- class: G([
487
- "call-message__call-button",
488
- { "call-message__call-button--active": p.value === "summary" }
450
+ onClick: le
451
+ }, [...t[8] || (t[8] = [
452
+ o("div", { class: "call-message__audio-pause-icon" }, [
453
+ o("svg", {
454
+ width: "20",
455
+ height: "23",
456
+ viewBox: "0 0 20 23",
457
+ fill: "none",
458
+ xmlns: "http://www.w3.org/2000/svg"
459
+ }, [
460
+ o("path", {
461
+ 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 0 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",
462
+ fill: "#5F5F5F"
463
+ })
464
+ ])
465
+ ], -1)
466
+ ])], 512), [
467
+ [me, m.value]
468
+ ]),
469
+ o("div", It, [
470
+ o("div", St, [
471
+ q(o("input", {
472
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => v.value = i),
473
+ class: "call-message__audio-slider",
474
+ type: "range",
475
+ min: 0,
476
+ max: C.value,
477
+ step: "0.1",
478
+ onMousedown: t[1] || (t[1] = (i) => x.value = !0),
479
+ onMouseup: ne,
480
+ onTouchstartPassive: t[2] || (t[2] = (i) => x.value = !0),
481
+ onTouchendPassive: ne
482
+ }, null, 40, At), [
483
+ [tt, v.value]
484
+ ]),
485
+ o("button", {
486
+ type: "button",
487
+ class: "call-message__audio-speed-btn",
488
+ onClick: Ue
489
+ }, c(G.value.text), 1)
489
490
  ]),
490
- type: "button",
491
- onClick: Ve
492
- }, " Резюме ", 2)) : f("", !0)
493
- ], 64)) : f("", !0),
494
- o("button", {
495
- class: "call-message__call-button",
496
- type: "button",
497
- onClick: Le
498
- }, " Перезвонить ")
491
+ o("div", Et, [
492
+ o("span", null, c(De.value), 1),
493
+ o("span", null, c(Le.value), 1)
494
+ ])
495
+ ])
496
+ ])) : p("", !0)
499
497
  ]),
500
- o("span", gt, d(l(a).time), 1)
501
- ]),
502
- Y(me, { name: "call-message-expand" }, {
503
- default: V(() => [
504
- xe.value ? (n(), i("div", yt, [
505
- o("div", Ct, [
506
- p.value === "text" ? (n(), i(x, { key: 0 }, [
507
- X.value ? (n(), i("p", {
508
- key: 1,
509
- class: "call-message__expand-plain",
510
- innerHTML: K.value
511
- }, null, 8, xt)) : (n(), i("p", ht, d(be.value), 1))
512
- ], 64)) : (n(), i("p", bt, [
513
- W.value ? (n(), i("span", {
514
- key: 1,
515
- innerHTML: Q.value
516
- }, null, 8, kt)) : (n(), i("span", wt, d(we.value), 1))
517
- ]))
518
- ]),
519
- o("div", Tt, [
520
- o("button", {
498
+ o("div", Ft, [
499
+ o("div", Ot, [
500
+ !a(s).isMissedCall && (E.value || F.value) ? (n(), u(y, { key: 0 }, [
501
+ E.value ? (n(), u("button", {
502
+ key: 0,
503
+ class: Z([
504
+ "call-message__call-button",
505
+ { "call-message__call-button--active": _.value === "text" }
506
+ ]),
521
507
  type: "button",
522
- class: "call-message__expand-close",
523
- onClick: t[3] || (t[3] = (u) => p.value = null)
524
- }, " Закрыть ")
525
- ])
526
- ])) : f("", !0)
508
+ onClick: qe
509
+ }, " Текст ", 2)) : p("", !0),
510
+ F.value ? (n(), u("button", {
511
+ key: 1,
512
+ class: Z([
513
+ "call-message__call-button",
514
+ { "call-message__call-button--active": _.value === "summary" }
515
+ ]),
516
+ type: "button",
517
+ onClick: ze
518
+ }, " Резюме ", 2)) : p("", !0)
519
+ ], 64)) : p("", !0),
520
+ o("button", {
521
+ class: "call-message__call-button",
522
+ type: "button",
523
+ onClick: Ze
524
+ }, " Перезвонить ")
525
+ ]),
526
+ o("span", Dt, c(a(s).time), 1)
527
527
  ]),
528
- _: 1
529
- }),
530
- l(Ce) && l(a).actions ? (n(), i("button", {
531
- key: 0,
532
- class: "call-message__menu-button",
533
- onClick: t[4] || (t[4] = (u) => P.value = !l(P))
534
- }, [...t[9] || (t[9] = [
535
- o("svg", {
536
- width: "4",
537
- height: "17",
538
- viewBox: "0 0 4 17",
539
- fill: "none",
540
- xmlns: "http://www.w3.org/2000/svg"
541
- }, [
542
- o("path", {
543
- 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",
544
- fill: "#5F5F5F"
528
+ P(ve, { name: "call-message-expand" }, {
529
+ default: $(() => [
530
+ Ae.value ? (n(), u("div", Lt, [
531
+ o("div", Ut, [
532
+ _.value === "text" ? (n(), u(y, { key: 0 }, [
533
+ ee.value ? (n(), u("p", {
534
+ key: 1,
535
+ class: "call-message__expand-plain",
536
+ innerHTML: X.value
537
+ }, null, 8, Pt)) : (n(), u("p", Vt, c(Ee.value), 1))
538
+ ], 64)) : (n(), u("p", $t, [
539
+ te.value ? (n(), u("span", {
540
+ key: 1,
541
+ innerHTML: W.value
542
+ }, null, 8, Bt)) : (n(), u("span", jt, c(Fe.value), 1))
543
+ ]))
544
+ ]),
545
+ o("div", Ht, [
546
+ o("button", {
547
+ type: "button",
548
+ class: "call-message__expand-close",
549
+ onClick: t[3] || (t[3] = (i) => _.value = null)
550
+ }, " Закрыть ")
551
+ ])
552
+ ])) : p("", !0)
553
+ ]),
554
+ _: 1
555
+ }),
556
+ a(we) && a(j).length ? (n(), u("button", {
557
+ key: 0,
558
+ class: "call-message__menu-button",
559
+ onClick: t[4] || (t[4] = //@ts-ignore
560
+ (...i) => a(Q) && a(Q)(...i))
561
+ }, [...t[9] || (t[9] = [
562
+ o("svg", {
563
+ width: "4",
564
+ height: "17",
565
+ viewBox: "0 0 4 17",
566
+ fill: "none",
567
+ xmlns: "http://www.w3.org/2000/svg"
568
+ }, [
569
+ o("path", {
570
+ 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",
571
+ fill: "#5F5F5F"
572
+ })
573
+ ], -1)
574
+ ])])) : p("", !0),
575
+ (n(), T(at, { to: "body" }, [
576
+ P(ve, null, {
577
+ default: $(() => [
578
+ a(be) && a(j).length ? (n(), T(ct, {
579
+ key: 0,
580
+ ref_key: "menuRef",
581
+ ref: Me,
582
+ class: "call-message__context-menu message-actions-menu",
583
+ style: st(a(Te)),
584
+ "data-theme": a(Re),
585
+ actions: a(j),
586
+ onClick: Ke,
587
+ onMouseenter: a(Ne),
588
+ onMouseleave: a(Ie)
589
+ }, null, 8, ["style", "data-theme", "actions", "onMouseenter", "onMouseleave"])) : p("", !0)
590
+ ]),
591
+ _: 1
545
592
  })
546
- ], -1)
547
- ])])) : f("", !0),
548
- Y(me, null, {
549
- default: V(() => [
550
- l(P) && l(a).actions ? (n(), $(Je, {
551
- key: 0,
552
- class: "call-message__context-menu",
553
- actions: l(a).actions,
554
- onClick: Pe
555
- }, null, 8, ["actions"])) : f("", !0)
556
- ]),
557
- _: 1
558
- })
593
+ ]))
594
+ ], 64))
559
595
  ])
560
- ], 42, Xe));
596
+ ], 42, pt));
561
597
  }
562
598
  });
563
599
  export {
564
- Yt as default
600
+ _a as default
565
601
  };