@mobilon-dev/chotto 0.3.64 → 0.3.65

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.
@@ -1,40 +1,40 @@
1
- import { defineComponent as Se, inject as P, computed as v, unref as s, toRefs as $e, ref as y, watch as ee, createElementBlock as c, openBlock as n, normalizeClass as te, createCommentVNode as f, createElementVNode as l, createVNode as R, withCtx as N, createTextVNode as _, toDisplayString as i, createBlock as k, Fragment as w, withDirectives as j, vShow as ae, vModelText as De, Transition as se, Teleport as Ne, renderList as Ve } from "vue";
1
+ import { defineComponent as De, inject as R, computed as p, unref as l, toRefs as $e, ref as f, watch as ae, createElementBlock as c, openBlock as n, normalizeClass as le, createCommentVNode as C, createElementVNode as s, createVNode as j, withCtx as $, createTextVNode as _, toDisplayString as u, createBlock as T, Fragment as w, withDirectives as B, vShow as se, vModelText as Ee, Transition as oe, Teleport as Ve, renderList as Le, nextTick as Pe } from "vue";
2
2
  import "../../../hooks/useMessageDraft.js";
3
3
  import "../../../hooks/useSearchModel.js";
4
- import { useTheme as Ae } from "../../../hooks/useTheme.js";
4
+ import { useTheme as Re } from "../../../hooks/useTheme.js";
5
5
  /* empty css */
6
6
  /* empty css */
7
- import { useMessageActions as Ee } from "../../../hooks/messages/useMessageActions.js";
7
+ import { useMessageActions as je } from "../../../hooks/messages/useMessageActions.js";
8
8
  import "../../../node_modules/linkifyjs/dist/linkify.js";
9
9
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
10
10
  import "../../../functions/parseMarkdown.js";
11
- import { useSubtextTooltip as Le } from "../../../hooks/messages/useSubtextTooltip.js";
12
- import Pe from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
13
- import le from "../../1_atoms/Tooltip/Tooltip.vue.js";
14
- import Re from "./icons/IncomingCallIcon.vue.js";
15
- import je from "./icons/OutgoingCallIcon.vue.js";
16
- const Be = ["messageId"], Ue = ["src"], Oe = {
11
+ import { useSubtextTooltip as Be } from "../../../hooks/messages/useSubtextTooltip.js";
12
+ import Ue from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
13
+ import ne from "../../1_atoms/Tooltip/Tooltip.vue.js";
14
+ import Oe from "./icons/IncomingCallIcon.vue.js";
15
+ import Ze from "./icons/OutgoingCallIcon.vue.js";
16
+ const qe = ["messageId"], ze = ["src"], He = {
17
17
  key: 1,
18
18
  class: "call-message__subtext"
19
- }, Ze = { class: "call-message__content" }, qe = { class: "call-message__header-container" }, ze = { class: "call-message__title-wrapper" }, He = {
19
+ }, Ge = { class: "call-message__content" }, Je = { class: "call-message__header-container" }, Ke = { class: "call-message__title-wrapper" }, Qe = {
20
20
  key: 0,
21
21
  class: "call-message__title"
22
- }, Ge = { class: "call-message__call-participant" }, Je = {
22
+ }, Xe = { class: "call-message__call-participant" }, Ye = {
23
23
  key: 1,
24
24
  class: "call-message__title call-message__title--missed"
25
- }, Ke = { class: "call-message__call-participant" }, Qe = {
25
+ }, We = { class: "call-message__call-participant" }, et = {
26
26
  key: 0,
27
27
  class: "call-message__title"
28
- }, Xe = { class: "call-message__call-participant" }, Ye = {
28
+ }, tt = { class: "call-message__call-participant" }, at = {
29
29
  key: 1,
30
30
  class: "call-message__title call-message__title--missed"
31
- }, We = { class: "call-message__call-participant" }, et = {
31
+ }, lt = { class: "call-message__call-participant" }, st = {
32
32
  key: 0,
33
33
  class: "call-message__missed-info"
34
- }, tt = {
34
+ }, ot = {
35
35
  key: 1,
36
36
  class: "call-message__audio-wrapper"
37
- }, at = ["src"], st = { class: "call-message__audio-progress" }, lt = { class: "call-message__audio-progress-bar" }, ot = ["max"], nt = { class: "call-message__audio-time" }, it = { class: "call-message__info-container" }, ut = { class: "call-message__time" }, ct = ["data-theme"], rt = { class: "call-message__modal" }, Ft = /* @__PURE__ */ Se({
37
+ }, nt = ["src"], it = { class: "call-message__audio-progress" }, ut = { class: "call-message__audio-progress-bar" }, rt = ["max"], ct = { class: "call-message__audio-time" }, dt = { class: "call-message__info-container" }, mt = { class: "call-message__time" }, vt = ["data-theme"], pt = { class: "call-message__modal" }, At = /* @__PURE__ */ De({
38
38
  __name: "CallMessage",
39
39
  props: {
40
40
  message: {
@@ -52,20 +52,20 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
52
52
  }
53
53
  },
54
54
  emits: ["action", "reply"],
55
- setup(oe, { emit: ne }) {
56
- const ie = P("chatAppId"), { getTheme: B } = Ae(ie), U = P("channels", void 0), O = P("selectedChat", void 0), ue = v(() => {
57
- if (U)
58
- return s(U);
59
- }), ce = v(() => {
55
+ setup(ie, { emit: ue }) {
56
+ const re = R("chatAppId"), { getTheme: U } = Re(re), O = R("channels", void 0), Z = R("selectedChat", void 0), ce = p(() => {
60
57
  if (O)
61
- return s(O);
62
- }), re = ne, T = oe, { message: a, applyStyle: de } = $e(T), {
63
- isOpenMenu: V,
64
- buttonMenuVisible: me,
65
- showMenu: Z,
66
- hideMenu: A,
67
- clickAction: pe
68
- } = Ee(T.message, re), M = y(!1), o = y(null), m = y(!1), C = y(0), p = y(0), h = y(!1), F = y(0), E = [
58
+ return l(O);
59
+ }), de = p(() => {
60
+ if (Z)
61
+ return l(Z);
62
+ }), me = ue, M = ie, { message: a, applyStyle: ve } = $e(M), {
63
+ isOpenMenu: E,
64
+ buttonMenuVisible: pe,
65
+ showMenu: q,
66
+ hideMenu: V,
67
+ clickAction: ge
68
+ } = je(M.message, me), F = f(!1), o = f(null), b = f(void 0), m = f(!1), h = f(0), v = f(0), y = f(!1), N = f(0), L = [
69
69
  {
70
70
  text: "1.0x",
71
71
  speed: 1
@@ -82,61 +82,72 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
82
82
  text: "2.0x",
83
83
  speed: 2
84
84
  }
85
- ], L = v(() => E[F.value] ?? E[0]), ve = () => {
86
- m.value = !1, p.value = 0, C.value = 0, h.value = !1, F.value = 0;
85
+ ], P = p(() => L[N.value] ?? L[0]), _e = (e) => {
86
+ if (!e) return;
87
+ const r = e.trim().match(/^(\d+):([0-5]\d)$/);
88
+ if (!r) return;
89
+ const i = Number(r[1]), d = Number(r[2]);
90
+ if (!(Number.isNaN(i) || Number.isNaN(d)))
91
+ return i * 60 + d;
92
+ }, z = () => {
93
+ var e;
94
+ m.value = !1, v.value = 0, h.value = _e((e = a.value) == null ? void 0 : e.callDuration) ?? 0, y.value = !1, N.value = 0;
87
95
  };
88
- ee(
96
+ z(), ae(
89
97
  () => {
90
- var t;
91
- return (t = a.value) == null ? void 0 : t.url;
98
+ var e;
99
+ return (e = a.value) == null ? void 0 : e.url;
92
100
  },
93
- (t, e) => {
94
- t !== e && (ve(), o.value && (o.value.pause(), o.value.currentTime = 0, o.value.load()));
101
+ (e, t) => {
102
+ e !== t && (z(), b.value = void 0, o.value && (o.value.pause(), o.value.currentTime = 0, o.value.removeAttribute("src"), o.value.load()));
95
103
  }
96
104
  );
97
- const q = (t) => {
98
- const e = Math.floor(t / 60), r = Math.floor(t % 60);
99
- return `${e.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
100
- }, ge = v(() => q(p.value)), _e = v(() => q(C.value)), z = async () => {
101
- if (o.value)
105
+ const H = (e) => {
106
+ const t = Math.floor(e / 60), r = Math.floor(e % 60);
107
+ return `${t.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
108
+ }, fe = p(() => H(v.value)), Ce = p(() => H(h.value)), G = async () => {
109
+ var e;
110
+ if (!(!o.value || !((e = a.value) != null && e.url)))
102
111
  if (m.value)
103
112
  o.value.pause(), m.value = !1;
104
113
  else
105
114
  try {
106
- await o.value.play(), m.value = !0;
115
+ b.value || (b.value = a.value.url, await Pe(), o.value.load()), await o.value.play(), m.value = !0;
107
116
  } catch (t) {
108
117
  console.error("Не удалось воспроизвести запись звонка", t), m.value = !1;
109
118
  }
110
- }, fe = () => {
111
- F.value = (F.value + 1) % E.length, o.value && (o.value.playbackRate = L.value.speed);
119
+ }, he = () => {
120
+ N.value = (N.value + 1) % L.length, o.value && (o.value.playbackRate = P.value.speed);
112
121
  };
113
- ee(
114
- () => p.value,
122
+ ae(
123
+ () => v.value,
115
124
  () => {
116
- o.value && h.value && (o.value.duration !== 1 / 0 && !Number.isNaN(o.value.duration) && (o.value.currentTime = p.value), Math.abs(p.value - C.value) < 0.1 && (m.value = !1));
125
+ o.value && y.value && (o.value.duration !== 1 / 0 && !Number.isNaN(o.value.duration) && (o.value.currentTime = v.value), Math.abs(v.value - h.value) < 0.1 && (m.value = !1));
117
126
  }
118
127
  );
119
- const H = () => {
120
- o.value && h.value && o.value.duration !== 1 / 0 && !Number.isNaN(o.value.duration) && (o.value.currentTime = p.value), h.value = !1;
121
- }, Ce = () => {
128
+ const J = () => {
129
+ o.value && y.value && o.value.duration !== 1 / 0 && !Number.isNaN(o.value.duration) && (o.value.currentTime = v.value), y.value = !1;
130
+ }, ye = () => {
122
131
  if (!o.value) return;
123
- const t = o.value;
124
- if (C.value = 0, p.value = t.currentTime || 0, t.duration === 1 / 0 || Number.isNaN(t.duration)) {
125
- t.currentTime = 1e101;
126
- const e = () => {
127
- o.value && (C.value = o.value.duration || 0, p.value = 0, o.value.currentTime = 0);
132
+ const e = o.value;
133
+ if (h.value = 0, v.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
134
+ e.currentTime = 1e101;
135
+ const t = () => {
136
+ o.value && (h.value = o.value.duration || 0, v.value = 0, o.value.currentTime = 0);
128
137
  };
129
- t.addEventListener("timeupdate", e, { once: !0 });
138
+ e.addEventListener("timeupdate", t, { once: !0 });
130
139
  } else
131
- C.value = t.duration || 0;
132
- t.playbackRate = L.value.speed;
133
- }, he = () => {
134
- o.value && (h.value || (p.value = o.value.currentTime), o.value.ended && m.value && (m.value = !1));
135
- }, ye = () => {
140
+ h.value = e.duration || 0;
141
+ e.playbackRate = P.value.speed;
142
+ }, we = () => {
143
+ o.value && (y.value || (v.value = o.value.currentTime), o.value.ended && m.value && (m.value = !1));
144
+ }, be = () => {
136
145
  m.value = !1;
137
- }, I = v(() => {
138
- var t;
139
- switch ((t = a.value) == null ? void 0 : t.direction) {
146
+ }, xe = () => {
147
+ console.error("Не удалось загрузить запись звонка"), m.value = !1, b.value = void 0, o.value && (o.value.pause(), o.value.currentTime = 0, o.value.removeAttribute("src"), o.value.load());
148
+ }, I = p(() => {
149
+ var e;
150
+ switch ((e = a.value) == null ? void 0 : e.direction) {
140
151
  case "incoming":
141
152
  return "Входящий";
142
153
  case "outgoing":
@@ -144,9 +155,9 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
144
155
  default:
145
156
  return "Звонок";
146
157
  }
147
- }), S = v(() => {
148
- var t;
149
- switch ((t = a.value) == null ? void 0 : t.direction) {
158
+ }), S = p(() => {
159
+ var e;
160
+ switch ((e = a.value) == null ? void 0 : e.direction) {
150
161
  case "incoming":
151
162
  return "к";
152
163
  case "outgoing":
@@ -154,37 +165,37 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
154
165
  default:
155
166
  return "к";
156
167
  }
157
- }), G = v(() => {
158
- var e, r;
159
- const t = (e = a.value) == null ? void 0 : e.isMissedCall;
168
+ }), K = p(() => {
169
+ var t, r;
170
+ const e = (t = a.value) == null ? void 0 : t.isMissedCall;
160
171
  switch ((r = a.value) == null ? void 0 : r.direction) {
161
172
  case "incoming":
162
- return t ? "#F84932" : "#00AC47";
173
+ return e ? "#F84932" : "#00AC47";
163
174
  case "outgoing":
164
- return t ? "#5F5F5F" : "#118ABF";
175
+ return e ? "#5F5F5F" : "#118ABF";
165
176
  default:
166
- return t ? "#5F5F5F" : "#00AC47";
177
+ return e ? "#5F5F5F" : "#00AC47";
167
178
  }
168
- }), we = v(() => {
169
- var t;
170
- return ((t = a.value) == null ? void 0 : t.direction) === "outgoing" ? "Без ответа" : "Пропущенный";
171
- }), J = v(() => {
179
+ }), ke = p(() => {
180
+ var e;
181
+ return ((e = a.value) == null ? void 0 : e.direction) === "outgoing" ? "Без ответа" : "Пропущенный";
182
+ }), Q = p(() => {
172
183
  var g;
173
- const t = a.value, e = ue.value, r = ce.value;
174
- if (!(t != null && t.dialogId) || !e || !r)
184
+ const e = a.value, t = ce.value, r = de.value;
185
+ if (!(e != null && e.dialogId) || !t || !r)
175
186
  return null;
176
- const u = (g = r.dialogs) == null ? void 0 : g.find((x) => x.dialogId === t.dialogId);
177
- if (!(u != null && u.channelId))
187
+ const i = (g = r.dialogs) == null ? void 0 : g.find((x) => x.dialogId === e.dialogId);
188
+ if (!(i != null && i.channelId))
178
189
  return null;
179
- const d = e.find((x) => x.channelId === u.channelId);
190
+ const d = t.find((x) => x.channelId === i.channelId);
180
191
  return (d == null ? void 0 : d.title) || null;
181
- }), xe = Le(() => T.message, () => T.subtextTooltipData), K = {
192
+ }), Te = Be(() => M.message, () => M.subtextTooltipData), X = {
182
193
  textDialog: "textDialog",
183
194
  message: "message"
184
195
  };
185
- function Q(t, e) {
186
- const r = t.position;
187
- switch (e) {
196
+ function Y(e, t) {
197
+ const r = e.position;
198
+ switch (t) {
188
199
  case "textDialog":
189
200
  return r === "left" ? "call-message__text-dialog-left" : "call-message__text-dialog-right";
190
201
  case "message":
@@ -193,11 +204,11 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
193
204
  return "";
194
205
  }
195
206
  }
196
- const be = () => {
207
+ const Me = () => {
197
208
  alert("Перезвонить");
198
- }, ke = async () => {
199
- var t, e, r, u, d;
200
- if ((t = a.value) != null && t.url)
209
+ }, Fe = async () => {
210
+ var e, t, r, i, d;
211
+ if ((e = a.value) != null && e.url)
201
212
  try {
202
213
  const g = await fetch(a.value.url, {
203
214
  headers: {
@@ -206,7 +217,7 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
206
217
  });
207
218
  if (!g.ok)
208
219
  throw new Error(`HTTP error! status: ${g.status}`);
209
- const x = g.headers.get("content-type") || "", Me = await g.blob(), $ = ((r = (e = a.value.url.split(".").pop()) == null ? void 0 : e.split("?")[0]) == null ? void 0 : r.toLowerCase()) || "", Fe = {
220
+ const x = g.headers.get("content-type") || "", Ie = await g.blob(), A = ((r = (t = a.value.url.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : r.toLowerCase()) || "", Se = {
210
221
  "audio/mpeg": "mp3",
211
222
  "audio/mp3": "mp3",
212
223
  "audio/wav": "wav",
@@ -217,261 +228,262 @@ const Be = ["messageId"], Ue = ["src"], Oe = {
217
228
  "audio/flac": "flac",
218
229
  "audio/m4a": "m4a",
219
230
  "audio/x-m4a": "m4a",
220
- "application/octet-stream": $ || "mp3"
221
- }, X = $ && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes($) ? $ : Fe[x] || "mp3", Y = a.value.url.split("/"), D = decodeURIComponent(((u = Y[Y.length - 1]) == null ? void 0 : u.split("?")[0]) || ""), Ie = D ? D.includes(".") ? D : `${D}.${X}` : `call-${a.value.messageId}.${X}`, W = window.URL.createObjectURL(Me), b = document.createElement("a");
222
- b.href = W, b.download = Ie, document.body.appendChild(b), b.click(), document.body.removeChild(b), window.URL.revokeObjectURL(W);
231
+ "application/octet-stream": A || "mp3"
232
+ }, W = A && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(A) ? A : Se[x] || "mp3", ee = a.value.url.split("/"), D = decodeURIComponent(((i = ee[ee.length - 1]) == null ? void 0 : i.split("?")[0]) || ""), Ae = D ? D.includes(".") ? D : `${D}.${W}` : `call-${a.value.messageId}.${W}`, te = window.URL.createObjectURL(Ie), k = document.createElement("a");
233
+ k.href = te, k.download = Ae, document.body.appendChild(k), k.click(), document.body.removeChild(k), window.URL.revokeObjectURL(te);
223
234
  } catch (g) {
224
235
  console.error("Ошибка при скачивании аудио звонка:", g), (d = a.value) != null && d.url && window.open(a.value.url, "_blank");
225
236
  }
226
- }, Te = (t) => {
227
- t.action === "download" ? (ke(), A()) : pe(t);
237
+ }, Ne = (e) => {
238
+ e.action === "download" ? (Fe(), V()) : ge(e);
228
239
  };
229
- return (t, e) => {
240
+ return (e, t) => {
230
241
  var r;
231
242
  return n(), c("div", {
232
- class: te([
233
- Q(s(a), K.message),
234
- s(de)(s(a))
243
+ class: le([
244
+ Y(l(a), X.message),
245
+ l(ve)(l(a))
235
246
  ]),
236
- messageId: s(a).messageId,
237
- onMouseenter: e[6] || (e[6] = //@ts-ignore
238
- (...u) => s(Z) && s(Z)(...u)),
239
- onMouseleave: e[7] || (e[7] = //@ts-ignore
240
- (...u) => s(A) && s(A)(...u))
247
+ messageId: l(a).messageId,
248
+ onMouseenter: t[6] || (t[6] = //@ts-ignore
249
+ (...i) => l(q) && l(q)(...i)),
250
+ onMouseleave: t[7] || (t[7] = //@ts-ignore
251
+ (...i) => l(V) && l(V)(...i))
241
252
  }, [
242
- s(a).avatar ? (n(), c("img", {
253
+ l(a).avatar ? (n(), c("img", {
243
254
  key: 0,
244
255
  class: "call-message__avatar",
245
- src: s(a).avatar,
256
+ src: l(a).avatar,
246
257
  height: "32",
247
258
  width: "32"
248
- }, null, 8, Ue)) : f("", !0),
249
- s(a).subText ? (n(), c("p", Oe, [
250
- R(le, {
251
- text: s(xe),
252
- position: s(a).position === "left" ? "right" : "left",
259
+ }, null, 8, ze)) : C("", !0),
260
+ l(a).subText ? (n(), c("p", He, [
261
+ j(ne, {
262
+ text: l(Te),
263
+ position: l(a).position === "left" ? "right" : "left",
253
264
  offset: 8
254
265
  }, {
255
- default: N(() => [
256
- _(i(s(a).subText), 1)
266
+ default: $(() => [
267
+ _(u(l(a).subText), 1)
257
268
  ]),
258
269
  _: 1
259
270
  }, 8, ["text", "position"])
260
- ])) : f("", !0),
261
- l("div", Ze, [
262
- l("div", qe, [
263
- l("div", ze, [
264
- s(a).direction === "incoming" || !s(a).direction ? (n(), k(Re, {
271
+ ])) : C("", !0),
272
+ s("div", Ge, [
273
+ s("div", Je, [
274
+ s("div", Ke, [
275
+ l(a).direction === "incoming" || !l(a).direction ? (n(), T(Oe, {
265
276
  key: 0,
266
277
  class: "call-message__direction-icon",
267
- color: G.value
268
- }, null, 8, ["color"])) : (n(), k(je, {
278
+ color: K.value
279
+ }, null, 8, ["color"])) : (n(), T(Ze, {
269
280
  key: 1,
270
281
  class: "call-message__direction-icon",
271
- color: G.value
282
+ color: K.value
272
283
  }, null, 8, ["color"])),
273
- J.value ? (n(), k(le, {
284
+ Q.value ? (n(), T(ne, {
274
285
  key: 2,
275
- text: J.value,
286
+ text: Q.value,
276
287
  position: "top",
277
288
  offset: 8
278
289
  }, {
279
- default: N(() => [
280
- s(a).isMissedCall ? (n(), c("span", Je, [
281
- _(i(I.value) + " ", 1),
282
- s(a).direction !== "incoming" ? (n(), c(w, { key: 0 }, [
283
- e[8] || (e[8] = _(" звонок ", -1)),
284
- l("span", Ke, i(S.value) + " " + i(s(a).callParticipant), 1)
290
+ default: $(() => [
291
+ l(a).isMissedCall ? (n(), c("span", Ye, [
292
+ _(u(I.value) + " ", 1),
293
+ l(a).direction !== "incoming" ? (n(), c(w, { key: 0 }, [
294
+ t[8] || (t[8] = _(" звонок ", -1)),
295
+ s("span", We, u(S.value) + " " + u(l(a).callParticipant), 1)
285
296
  ], 64)) : (n(), c(w, { key: 1 }, [
286
297
  _(" звонок ")
287
298
  ], 64))
288
- ])) : (n(), c("span", He, [
289
- _(i(I.value) + " звонок ", 1),
290
- l("span", Ge, i(S.value) + " " + i(s(a).callParticipant), 1)
299
+ ])) : (n(), c("span", Qe, [
300
+ _(u(I.value) + " звонок ", 1),
301
+ s("span", Xe, u(S.value) + " " + u(l(a).callParticipant), 1)
291
302
  ]))
292
303
  ]),
293
304
  _: 1
294
305
  }, 8, ["text"])) : (n(), c(w, { key: 3 }, [
295
- s(a).isMissedCall ? (n(), c("span", Ye, [
296
- _(i(I.value) + " ", 1),
297
- s(a).direction !== "incoming" ? (n(), c(w, { key: 0 }, [
298
- e[9] || (e[9] = _(" звонок ", -1)),
299
- l("span", We, i(S.value) + " " + i(s(a).callParticipant), 1)
306
+ l(a).isMissedCall ? (n(), c("span", at, [
307
+ _(u(I.value) + " ", 1),
308
+ l(a).direction !== "incoming" ? (n(), c(w, { key: 0 }, [
309
+ t[9] || (t[9] = _(" звонок ", -1)),
310
+ s("span", lt, u(S.value) + " " + u(l(a).callParticipant), 1)
300
311
  ], 64)) : (n(), c(w, { key: 1 }, [
301
312
  _(" звонок ")
302
313
  ], 64))
303
- ])) : (n(), c("span", Qe, [
304
- _(i(I.value) + " звонок ", 1),
305
- l("span", Xe, i(S.value) + " " + i(s(a).callParticipant), 1)
314
+ ])) : (n(), c("span", et, [
315
+ _(u(I.value) + " звонок ", 1),
316
+ s("span", tt, u(S.value) + " " + u(l(a).callParticipant), 1)
306
317
  ]))
307
318
  ], 64))
308
319
  ]),
309
- s(a).isMissedCall ? (n(), c("p", et, i(we.value) + ": " + i(s(a).callAttemptDuration), 1)) : f("", !0),
310
- s(a).url && !s(a).isMissedCall ? (n(), c("div", tt, [
311
- l("audio", {
320
+ l(a).isMissedCall ? (n(), c("p", st, u(ke.value) + ": " + u(l(a).callAttemptDuration), 1)) : C("", !0),
321
+ l(a).url && !l(a).isMissedCall ? (n(), c("div", ot, [
322
+ s("audio", {
312
323
  ref_key: "player",
313
324
  ref: o,
314
- src: s(a).url,
325
+ src: b.value,
315
326
  type: "audio/webm",
316
- onLoadedmetadata: Ce,
317
- onTimeupdate: he,
318
- onEnded: ye
319
- }, null, 40, at),
320
- j(l("button", {
327
+ onLoadedmetadata: ye,
328
+ onTimeupdate: we,
329
+ onEnded: be,
330
+ onError: xe
331
+ }, null, 40, nt),
332
+ B(s("button", {
321
333
  class: "call-message__audio-play",
322
334
  type: "button",
323
- onClick: z
324
- }, [...e[10] || (e[10] = [
325
- l("div", { class: "call-message__audio-play-icon" }, [
326
- l("svg", {
335
+ onClick: G
336
+ }, [...t[10] || (t[10] = [
337
+ s("div", { class: "call-message__audio-play-icon" }, [
338
+ s("svg", {
327
339
  width: "20",
328
340
  height: "23",
329
341
  viewBox: "0 0 20 23",
330
342
  fill: "none",
331
343
  xmlns: "http://www.w3.org/2000/svg"
332
344
  }, [
333
- l("path", {
345
+ s("path", {
334
346
  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",
335
347
  fill: "#5F5F5F"
336
348
  })
337
349
  ])
338
350
  ], -1)
339
351
  ])], 512), [
340
- [ae, !m.value]
352
+ [se, !m.value]
341
353
  ]),
342
- j(l("button", {
354
+ B(s("button", {
343
355
  class: "call-message__audio-pause",
344
356
  type: "button",
345
- onClick: z
346
- }, [...e[11] || (e[11] = [
347
- l("div", { class: "call-message__audio-pause-icon" }, [
348
- l("svg", {
357
+ onClick: G
358
+ }, [...t[11] || (t[11] = [
359
+ s("div", { class: "call-message__audio-pause-icon" }, [
360
+ s("svg", {
349
361
  width: "20",
350
362
  height: "23",
351
363
  viewBox: "0 0 20 23",
352
364
  fill: "none",
353
365
  xmlns: "http://www.w3.org/2000/svg"
354
366
  }, [
355
- l("path", {
367
+ s("path", {
356
368
  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",
357
369
  fill: "#5F5F5F"
358
370
  })
359
371
  ])
360
372
  ], -1)
361
373
  ])], 512), [
362
- [ae, m.value]
374
+ [se, m.value]
363
375
  ]),
364
- l("div", st, [
365
- l("div", lt, [
366
- j(l("input", {
367
- "onUpdate:modelValue": e[0] || (e[0] = (u) => p.value = u),
376
+ s("div", it, [
377
+ s("div", ut, [
378
+ B(s("input", {
379
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => v.value = i),
368
380
  class: "call-message__audio-slider",
369
381
  type: "range",
370
382
  min: 0,
371
- max: C.value,
383
+ max: h.value,
372
384
  step: "0.1",
373
- onMousedown: e[1] || (e[1] = (u) => h.value = !0),
374
- onMouseup: H,
375
- onTouchstartPassive: e[2] || (e[2] = (u) => h.value = !0),
376
- onTouchendPassive: H
377
- }, null, 40, ot), [
378
- [De, p.value]
385
+ onMousedown: t[1] || (t[1] = (i) => y.value = !0),
386
+ onMouseup: J,
387
+ onTouchstartPassive: t[2] || (t[2] = (i) => y.value = !0),
388
+ onTouchendPassive: J
389
+ }, null, 40, rt), [
390
+ [Ee, v.value]
379
391
  ]),
380
- l("button", {
392
+ s("button", {
381
393
  type: "button",
382
394
  class: "call-message__audio-speed-btn",
383
- onClick: fe
384
- }, i(L.value.text), 1)
395
+ onClick: he
396
+ }, u(P.value.text), 1)
385
397
  ]),
386
- l("div", nt, [
387
- l("span", null, i(ge.value), 1),
388
- l("span", null, i(_e.value), 1)
398
+ s("div", ct, [
399
+ s("span", null, u(fe.value), 1),
400
+ s("span", null, u(Ce.value), 1)
389
401
  ])
390
402
  ])
391
- ])) : f("", !0)
403
+ ])) : C("", !0)
392
404
  ]),
393
- l("div", it, [
394
- l("button", {
405
+ s("div", dt, [
406
+ s("button", {
395
407
  class: "call-message__call-button",
396
408
  type: "button",
397
- onClick: be
409
+ onClick: Me
398
410
  }, " Нажмите, чтобы перезвонить "),
399
- l("span", ut, i(s(a).time), 1)
411
+ s("span", mt, u(l(a).time), 1)
400
412
  ]),
401
- (r = s(a).transcript) != null && r.dialog ? (n(), c("button", {
413
+ (r = l(a).transcript) != null && r.dialog ? (n(), c("button", {
402
414
  key: 0,
403
415
  class: "call-message__download-button",
404
- onClick: e[3] || (e[3] = (u) => M.value = !M.value)
405
- }, [...e[12] || (e[12] = [
406
- l("span", { class: "pi pi-arrow-up-right" }, null, -1)
407
- ])])) : f("", !0),
408
- s(me) && s(a).actions ? (n(), c("button", {
416
+ onClick: t[3] || (t[3] = (i) => F.value = !F.value)
417
+ }, [...t[12] || (t[12] = [
418
+ s("span", { class: "pi pi-arrow-up-right" }, null, -1)
419
+ ])])) : C("", !0),
420
+ l(pe) && l(a).actions ? (n(), c("button", {
409
421
  key: 1,
410
422
  class: "call-message__menu-button",
411
- onClick: e[4] || (e[4] = (u) => V.value = !s(V))
412
- }, [...e[13] || (e[13] = [
413
- l("svg", {
423
+ onClick: t[4] || (t[4] = (i) => E.value = !l(E))
424
+ }, [...t[13] || (t[13] = [
425
+ s("svg", {
414
426
  width: "4",
415
427
  height: "17",
416
428
  viewBox: "0 0 4 17",
417
429
  fill: "none",
418
430
  xmlns: "http://www.w3.org/2000/svg"
419
431
  }, [
420
- l("path", {
432
+ s("path", {
421
433
  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",
422
434
  fill: "#5F5F5F"
423
435
  })
424
436
  ], -1)
425
- ])])) : f("", !0),
426
- R(se, null, {
427
- default: N(() => [
428
- s(V) && s(a).actions ? (n(), k(Pe, {
437
+ ])])) : C("", !0),
438
+ j(oe, null, {
439
+ default: $(() => [
440
+ l(E) && l(a).actions ? (n(), T(Ue, {
429
441
  key: 0,
430
442
  class: "call-message__context-menu",
431
- actions: s(a).actions,
432
- onClick: Te
433
- }, null, 8, ["actions"])) : f("", !0)
443
+ actions: l(a).actions,
444
+ onClick: Ne
445
+ }, null, 8, ["actions"])) : C("", !0)
434
446
  ]),
435
447
  _: 1
436
448
  }),
437
- (n(), k(Ne, { to: "body" }, [
438
- R(se, { name: "modal-fade" }, {
439
- default: N(() => {
440
- var u;
449
+ (n(), T(Ve, { to: "body" }, [
450
+ j(oe, { name: "modal-fade" }, {
451
+ default: $(() => {
452
+ var i;
441
453
  return [
442
- M.value ? (n(), c("div", {
454
+ F.value ? (n(), c("div", {
443
455
  key: 0,
444
456
  class: "call-message__modal-overlay",
445
- "data-theme": s(B)().theme ? s(B)().theme : "light"
457
+ "data-theme": l(U)().theme ? l(U)().theme : "light"
446
458
  }, [
447
- l("div", rt, [
448
- l("button", {
459
+ s("div", pt, [
460
+ s("button", {
449
461
  class: "call-message__modal-close-button",
450
- onClick: e[5] || (e[5] = (d) => M.value = !1)
451
- }, [...e[14] || (e[14] = [
452
- l("span", null, [
453
- l("i", { class: "pi pi-times" })
462
+ onClick: t[5] || (t[5] = (d) => F.value = !1)
463
+ }, [...t[14] || (t[14] = [
464
+ s("span", null, [
465
+ s("i", { class: "pi pi-times" })
454
466
  ], -1)
455
467
  ])]),
456
- (n(!0), c(w, null, Ve((u = s(a).transcript) == null ? void 0 : u.dialog, (d) => (n(), c("div", {
468
+ (n(!0), c(w, null, Le((i = l(a).transcript) == null ? void 0 : i.dialog, (d) => (n(), c("div", {
457
469
  key: d.time,
458
- class: te(Q(d, K.textDialog))
470
+ class: le(Y(d, X.textDialog))
459
471
  }, [
460
- l("p", null, i(d.text), 1),
461
- l("span", null, i(d.time), 1)
472
+ s("p", null, u(d.text), 1),
473
+ s("span", null, u(d.time), 1)
462
474
  ], 2))), 128))
463
475
  ])
464
- ], 8, ct)) : f("", !0)
476
+ ], 8, vt)) : C("", !0)
465
477
  ];
466
478
  }),
467
479
  _: 1
468
480
  })
469
481
  ]))
470
482
  ])
471
- ], 42, Be);
483
+ ], 42, qe);
472
484
  };
473
485
  }
474
486
  });
475
487
  export {
476
- Ft as default
488
+ At as default
477
489
  };