@mobilon-dev/chotto 0.3.64 → 0.3.66
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.
- package/dist/chotto.css +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +429 -308
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +456 -361
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/apps/data/messages.d.ts +235 -10
- package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +1 -1
- package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +64 -0
- package/dist/types/components/2_feed_elements/CallMessage/CallMessage.vue.d.ts +1 -1
- package/dist/types/components/2_feed_elements/CallMessage/styles/types.d.ts +44 -44
- package/dist/types/components/2_feed_elements/types/messages.d.ts +33 -1
- package/package.json +1 -1
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useMessageActions as
|
|
11
|
-
import { useMessageLinks as
|
|
12
|
-
import { useChannelAccentColor as
|
|
13
|
-
import { useSubtextTooltip as
|
|
14
|
-
import { getStatus as
|
|
15
|
-
import { getMessageClass as
|
|
16
|
-
import { createReactionHandlers as
|
|
1
|
+
import { defineComponent as Ve, ref as p, computed as g, watch as D, createElementBlock as c, openBlock as l, unref as u, normalizeStyle as ie, normalizeClass as C, createCommentVNode as f, createElementVNode as o, createVNode as k, withCtx as j, createTextVNode as le, toDisplayString as y, createBlock as N, withDirectives as O, vShow as ue, vModelText as De, Transition as re, Fragment as U, renderList as je, nextTick as Oe } from "vue";
|
|
2
|
+
import Ue from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
3
|
+
import Ze from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
|
|
4
|
+
import He from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
|
|
5
|
+
import qe from "../BaseReplyMessage/BaseReplyMessage.vue.js";
|
|
6
|
+
import ze from "../MessageReactions/MessageReactions.vue.js";
|
|
7
|
+
import Je from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
|
|
8
|
+
import We from "../MessageSmsInvite/MessageSmsInvite.vue.js";
|
|
9
|
+
import Ge from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
10
|
+
import { useMessageActions as Ke } from "../../../hooks/messages/useMessageActions.js";
|
|
11
|
+
import { useMessageLinks as Qe } from "../../../hooks/messages/useMessageLinks.js";
|
|
12
|
+
import { useChannelAccentColor as Xe } from "../../../hooks/messages/useChannelAccentColor.js";
|
|
13
|
+
import { useSubtextTooltip as Ye } from "../../../hooks/messages/useSubtextTooltip.js";
|
|
14
|
+
import { getStatus as et, getStatusTitle as tt } from "../../../functions/getStatusMessage.js";
|
|
15
|
+
import { getMessageClass as st } from "../../../functions/getMessageClass.js";
|
|
16
|
+
import { createReactionHandlers as at } from "../../../functions/createReactionHandlers.js";
|
|
17
17
|
import "../../../functions/parseMarkdown.js";
|
|
18
|
-
|
|
19
|
-
import "../../../hooks/useSearchModel.js";
|
|
20
|
-
import { useTheme as Ze } from "../../../hooks/useTheme.js";
|
|
21
|
-
/* empty css */
|
|
22
|
-
/* empty css */
|
|
23
|
-
const je = ["messageId"], He = ["src"], Oe = {
|
|
18
|
+
const nt = ["messageId"], ot = ["src"], it = {
|
|
24
19
|
key: 1,
|
|
25
20
|
class: "audio-message__subtext"
|
|
26
|
-
},
|
|
21
|
+
}, lt = { class: "audio-message__audio-container" }, ut = ["src"], rt = { class: "audio-message__progress-wrapper" }, mt = ["max"], ct = { class: "audio-message__speed-btn-container" }, dt = { class: "audio-message__player-controls" }, gt = { class: "audio-message__current-time" }, vt = { class: "audio-message__duration" }, ft = {
|
|
27
22
|
key: 1,
|
|
28
|
-
class: "audio-message__transcript-container"
|
|
29
|
-
}, _e = {
|
|
30
|
-
key: 2,
|
|
31
23
|
class: "audio-message__text-container"
|
|
32
|
-
},
|
|
24
|
+
}, pt = ["innerHTML"], yt = { class: "audio-message__info-container" }, bt = { class: "audio-message__actions" }, ht = { class: "audio-message__time" }, xt = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "audio-message__expand-panel"
|
|
27
|
+
}, Ct = { class: "audio-message__expand-inner" }, wt = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "audio-message__expand-placeholder"
|
|
30
|
+
}, kt = {
|
|
31
|
+
key: 1,
|
|
32
|
+
class: "audio-message__expand-plain"
|
|
33
|
+
}, St = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "audio-message__expand-placeholder"
|
|
36
|
+
}, Tt = { class: "audio-message__expand-close-wrap" }, me = "Распознаем звонок, пожалуйста подождите...", Ht = /* @__PURE__ */ Ve({
|
|
33
37
|
__name: "AudioMessage",
|
|
34
38
|
props: {
|
|
35
39
|
message: {
|
|
@@ -60,8 +64,36 @@ const je = ["messageId"], He = ["src"], Oe = {
|
|
|
60
64
|
}
|
|
61
65
|
},
|
|
62
66
|
emits: ["action", "reply", "sms-invite"],
|
|
63
|
-
setup(
|
|
64
|
-
|
|
67
|
+
setup(s, { emit: ce }) {
|
|
68
|
+
function Z(e) {
|
|
69
|
+
if (e == null) return null;
|
|
70
|
+
if (typeof e == "object") return e;
|
|
71
|
+
if (typeof e != "string") return null;
|
|
72
|
+
const t = e.trim();
|
|
73
|
+
if (!t) return null;
|
|
74
|
+
try {
|
|
75
|
+
return JSON.parse(t);
|
|
76
|
+
} catch {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function H(e) {
|
|
81
|
+
var t;
|
|
82
|
+
if (e == null) return null;
|
|
83
|
+
if (typeof e == "object" && e !== null && "summary" in e)
|
|
84
|
+
return String(e.summary ?? "").trim() || null;
|
|
85
|
+
if (typeof e == "string") {
|
|
86
|
+
const a = e.trim();
|
|
87
|
+
if (!a) return null;
|
|
88
|
+
if (a.startsWith("{")) {
|
|
89
|
+
const m = Z(a);
|
|
90
|
+
return ((t = m == null ? void 0 : m.summary) == null ? void 0 : t.trim()) || null;
|
|
91
|
+
}
|
|
92
|
+
return a;
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
const i = s, _ = p([
|
|
65
97
|
{
|
|
66
98
|
text: "1.0x",
|
|
67
99
|
speed: 1
|
|
@@ -78,28 +110,79 @@ const je = ["messageId"], He = ["src"], Oe = {
|
|
|
78
110
|
text: "2.0x",
|
|
79
111
|
speed: 2
|
|
80
112
|
}
|
|
81
|
-
]),
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (
|
|
113
|
+
]), F = p(0), A = g(() => _.value[F.value] ?? _.value[0]), de = () => {
|
|
114
|
+
F.value = (F.value + 1) % _.value.length, n.value && (n.value.playbackRate = A.value.speed);
|
|
115
|
+
}, S = ce, n = p(null), w = p(void 0), d = p(!1), h = p(0), v = p(0), x = p(!1), E = g(() => {
|
|
116
|
+
var t, a;
|
|
117
|
+
const e = i.message;
|
|
118
|
+
return e.url || (typeof ((t = e.meta) == null ? void 0 : t.url) == "string" ? e.meta.url : void 0) || ((a = e.data) == null ? void 0 : a.url);
|
|
119
|
+
}), L = (e) => {
|
|
120
|
+
if (e == null) return;
|
|
121
|
+
if (typeof e == "number")
|
|
122
|
+
return !Number.isFinite(e) || e < 0 ? void 0 : Math.floor(e);
|
|
123
|
+
const t = String(e).trim();
|
|
124
|
+
if (!t) return;
|
|
125
|
+
if (/^\d+$/.test(t)) {
|
|
126
|
+
const r = Number(t);
|
|
127
|
+
return Number.isFinite(r) && r >= 0 ? Math.floor(r) : void 0;
|
|
128
|
+
}
|
|
129
|
+
const a = t.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
|
|
130
|
+
if (a) {
|
|
131
|
+
const r = Number(a[1]), B = Number(a[2]), V = Number(a[3]);
|
|
132
|
+
return r * 3600 + B * 60 + V;
|
|
133
|
+
}
|
|
134
|
+
const m = t.match(/^(\d+):([0-5]\d)$/);
|
|
135
|
+
if (m) return Number(m[1]) * 60 + Number(m[2]);
|
|
136
|
+
}, q = () => {
|
|
137
|
+
d.value = !1, v.value = 0, h.value = L(i.message.duration) ?? 0, x.value = !1;
|
|
138
|
+
};
|
|
139
|
+
q(), D(
|
|
140
|
+
() => E.value,
|
|
141
|
+
(e, t) => {
|
|
142
|
+
e !== t && (q(), w.value = void 0, n.value && (n.value.pause(), n.value.currentTime = 0, n.value.removeAttribute("src"), n.value.load()));
|
|
143
|
+
}
|
|
144
|
+
), D(
|
|
145
|
+
() => i.message.duration,
|
|
146
|
+
() => {
|
|
147
|
+
w.value === void 0 && (h.value = L(i.message.duration) ?? 0);
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
const {
|
|
151
|
+
isOpenMenu: $,
|
|
152
|
+
buttonMenuVisible: ge,
|
|
153
|
+
showMenu: z,
|
|
154
|
+
hideMenu: P,
|
|
155
|
+
clickAction: ve,
|
|
156
|
+
viewsAction: J,
|
|
157
|
+
handleClickReplied: fe
|
|
158
|
+
} = Ke(i.message, S), b = p(null), M = p({ text: !1, summary: !1 }), pe = g(() => {
|
|
159
|
+
var a;
|
|
160
|
+
const e = i.message, t = e.transcript ?? ((a = e.meta) == null ? void 0 : a.transcript);
|
|
161
|
+
return t ? typeof t == "object" && t !== null && "replies" in t ? t : typeof t == "string" && t.trim() ? Z(t) : null : null;
|
|
162
|
+
}), W = g(() => {
|
|
163
|
+
var m;
|
|
164
|
+
const e = pe.value;
|
|
165
|
+
if ((m = e == null ? void 0 : e.replies) != null && m.length)
|
|
166
|
+
return e.replies.map((r) => String(r.text ?? "").trim()).filter(Boolean);
|
|
167
|
+
const t = i.message, a = typeof t.transcript == "object" && t.transcript && "text" in t.transcript ? t.transcript.text ?? "" : "";
|
|
168
|
+
return String(a).split(/\r?\n+/g).map((r) => r.trim()).filter(Boolean);
|
|
169
|
+
}), G = g(() => W.value.length > 0), K = g(() => {
|
|
170
|
+
var t;
|
|
171
|
+
const e = i.message;
|
|
172
|
+
return H(e.summary) ?? H((t = e.meta) == null ? void 0 : t.summary) ?? "Резюме недоступно";
|
|
173
|
+
}), Q = g(() => K.value !== "Резюме недоступно"), ye = async () => {
|
|
174
|
+
var t, a, m;
|
|
175
|
+
const e = E.value;
|
|
176
|
+
if (e)
|
|
94
177
|
try {
|
|
95
|
-
const
|
|
178
|
+
const r = await fetch(e, {
|
|
96
179
|
headers: {
|
|
97
180
|
Accept: "audio/*"
|
|
98
181
|
}
|
|
99
182
|
});
|
|
100
|
-
if (!
|
|
101
|
-
throw new Error(`HTTP error! status: ${
|
|
102
|
-
const
|
|
183
|
+
if (!r.ok)
|
|
184
|
+
throw new Error(`HTTP error! status: ${r.status}`);
|
|
185
|
+
const B = r.headers.get("content-type") || "", V = await r.blob(), R = ((a = (t = e.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : a.toLowerCase()) || "", Pe = {
|
|
103
186
|
"audio/mpeg": "mp3",
|
|
104
187
|
"audio/mp3": "mp3",
|
|
105
188
|
"audio/wav": "wav",
|
|
@@ -110,286 +193,324 @@ const je = ["messageId"], He = ["src"], Oe = {
|
|
|
110
193
|
"audio/flac": "flac",
|
|
111
194
|
"audio/m4a": "m4a",
|
|
112
195
|
"audio/x-m4a": "m4a",
|
|
113
|
-
"application/octet-stream":
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
} catch (
|
|
117
|
-
console.error("Ошибка при скачивании аудио:",
|
|
196
|
+
"application/octet-stream": R || "mp3"
|
|
197
|
+
}, ae = R && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(R) ? R : Pe[B] || "mp3", ne = e.split("/"), I = decodeURIComponent(((m = ne[ne.length - 1]) == null ? void 0 : m.split("?")[0]) || ""), Be = I ? I.includes(".") ? I : `${I}.${ae}` : `audio-${i.message.messageId}.${ae}`, oe = window.URL.createObjectURL(V), T = document.createElement("a");
|
|
198
|
+
T.href = oe, T.download = Be, document.body.appendChild(T), T.click(), document.body.removeChild(T), window.URL.revokeObjectURL(oe);
|
|
199
|
+
} catch (r) {
|
|
200
|
+
console.error("Ошибка при скачивании аудио:", r), e && window.open(e, "_blank");
|
|
118
201
|
}
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
}, { linkedHtml:
|
|
122
|
-
|
|
202
|
+
}, be = (e) => {
|
|
203
|
+
e.action === "download" ? (ye(), P()) : ve(e);
|
|
204
|
+
}, { linkedHtml: he, inNewWindow: X } = Qe(() => i.message.text), xe = g(() => et(i.message.status)), Ce = g(() => tt(i.message.status, i.message.statusMsg)), { bubbleStyle: we } = Xe(
|
|
205
|
+
g(() => i.message),
|
|
123
206
|
{ cssVariable: "--chotto-audiomessage-right-background-color", position: "right" }
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
207
|
+
), Y = async () => {
|
|
208
|
+
const e = E.value;
|
|
209
|
+
if (!(!n.value || !e))
|
|
210
|
+
if (d.value)
|
|
211
|
+
n.value.pause(), d.value = !1;
|
|
212
|
+
else
|
|
213
|
+
try {
|
|
214
|
+
w.value || (w.value = e, await Oe(), n.value.load()), await n.value.play(), d.value = !0;
|
|
215
|
+
} catch (t) {
|
|
216
|
+
console.error("Не удалось воспроизвести аудио", t), d.value = !1;
|
|
217
|
+
}
|
|
218
|
+
}, ee = (e) => {
|
|
219
|
+
const t = Math.floor(e / 60), a = Math.floor(e % 60);
|
|
220
|
+
return `${t.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
|
|
221
|
+
}, ke = g(() => ee(v.value));
|
|
222
|
+
D(
|
|
223
|
+
() => v.value,
|
|
134
224
|
() => {
|
|
135
|
-
|
|
225
|
+
n.value && x.value && (n.value.duration != 1 / 0 && !Number.isNaN(n.value.duration) && (n.value.currentTime = v.value), Math.abs(v.value - h.value) < 0.1 && (d.value = !1));
|
|
136
226
|
}
|
|
137
227
|
);
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
|
|
228
|
+
const te = () => {
|
|
229
|
+
n.value && x.value && n.value.duration != 1 / 0 && !Number.isNaN(n.value.duration) && (n.value.currentTime = v.value), x.value = !1;
|
|
230
|
+
}, Se = g(() => ee(h.value)), Te = () => {
|
|
231
|
+
if (!n.value) return;
|
|
232
|
+
const e = n.value;
|
|
233
|
+
if (v.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
|
|
234
|
+
e.currentTime = 1e101;
|
|
235
|
+
const t = () => {
|
|
236
|
+
n.value && (h.value = n.value.duration || 0, v.value = 0, n.value.currentTime = 0);
|
|
237
|
+
};
|
|
238
|
+
e.addEventListener("timeupdate", t, { once: !0 });
|
|
239
|
+
} else
|
|
240
|
+
h.value = e.duration || 0;
|
|
241
|
+
e.playbackRate = A.value.speed;
|
|
242
|
+
}, Me = () => {
|
|
243
|
+
n.value && (x.value || (v.value = n.value.currentTime), n.value.ended && d.value && (d.value = !1));
|
|
244
|
+
}, Re = () => {
|
|
245
|
+
d.value = !1;
|
|
246
|
+
}, Ie = () => {
|
|
247
|
+
console.error("Не удалось загрузить аудио"), d.value = !1, w.value = void 0, n.value && (n.value.pause(), n.value.currentTime = 0, n.value.removeAttribute("src"), n.value.load()), h.value = L(i.message.duration) ?? 0;
|
|
248
|
+
};
|
|
249
|
+
function se(e) {
|
|
250
|
+
return st(e.position, "audio-message");
|
|
143
251
|
}
|
|
144
|
-
const { onToggleReaction:
|
|
145
|
-
function
|
|
146
|
-
|
|
252
|
+
const { onToggleReaction: Ne, onAddReaction: _e, onRemoveReaction: Fe } = at(S), Ae = Ye(() => i.message, () => i.subtextTooltipData);
|
|
253
|
+
function Ee() {
|
|
254
|
+
S("sms-invite", i.message);
|
|
147
255
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
256
|
+
const Le = () => {
|
|
257
|
+
const e = b.value === "text" ? null : "text";
|
|
258
|
+
b.value = e, e === "text" && !G.value && !M.value.text && (M.value.text = !0, S("action", { action: "fetchTranscript", messageId: i.message.messageId }));
|
|
259
|
+
}, $e = () => {
|
|
260
|
+
const e = b.value === "summary" ? null : "summary";
|
|
261
|
+
b.value = e, e === "summary" && !Q.value && !M.value.summary && (M.value.summary = !0, S("action", { action: "fetchSummary", messageId: i.message.messageId }));
|
|
262
|
+
};
|
|
263
|
+
return (e, t) => (l(), c("div", {
|
|
264
|
+
class: C(["audio-message", [
|
|
265
|
+
se(s.message),
|
|
266
|
+
s.applyStyle(s.message)
|
|
267
|
+
]]),
|
|
268
|
+
messageId: s.message.messageId,
|
|
269
|
+
style: ie(u(we)),
|
|
270
|
+
onMouseleave: t[8] || (t[8] = //@ts-ignore
|
|
271
|
+
(...a) => u(P) && u(P)(...a))
|
|
272
|
+
}, [
|
|
273
|
+
s.message.avatar && s.isFirstInSeries ? (l(), c("img", {
|
|
274
|
+
key: 0,
|
|
275
|
+
class: "audio-message__avatar",
|
|
276
|
+
src: s.message.avatar,
|
|
277
|
+
height: "32",
|
|
278
|
+
width: "32",
|
|
279
|
+
style: ie({ gridRow: s.message.subText ? "2" : "1" })
|
|
280
|
+
}, null, 12, ot)) : f("", !0),
|
|
281
|
+
s.message.subText && s.isFirstInSeries ? (l(), c("p", it, [
|
|
282
|
+
k(Ge, {
|
|
283
|
+
text: u(Ae),
|
|
284
|
+
position: s.message.position === "left" ? "right" : "left",
|
|
285
|
+
offset: 8
|
|
286
|
+
}, {
|
|
287
|
+
default: j(() => [
|
|
288
|
+
le(y(s.message.subText), 1)
|
|
289
|
+
]),
|
|
290
|
+
_: 1
|
|
291
|
+
}, 8, ["text", "position"])
|
|
292
|
+
])) : f("", !0),
|
|
293
|
+
o("div", {
|
|
294
|
+
class: C(["audio-message__content", { "is-first": s.isFirstInSeries, "with-avatar-indent": !s.isFirstInSeries && s.message.avatar }]),
|
|
295
|
+
onMouseenter: t[7] || (t[7] = //@ts-ignore
|
|
296
|
+
(...a) => u(z) && u(z)(...a))
|
|
167
297
|
}, [
|
|
168
|
-
|
|
298
|
+
s.message.reply ? (l(), N(qe, {
|
|
169
299
|
key: 0,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
300
|
+
style: { "grid-column": "1/3" },
|
|
301
|
+
message: s.message.reply,
|
|
302
|
+
class: C(s.message.position),
|
|
303
|
+
onReply: u(fe)
|
|
304
|
+
}, null, 8, ["message", "class", "onReply"])) : f("", !0),
|
|
305
|
+
o("div", lt, [
|
|
306
|
+
o("audio", {
|
|
307
|
+
ref_key: "player",
|
|
308
|
+
ref: n,
|
|
309
|
+
src: w.value,
|
|
310
|
+
type: "audio/webm",
|
|
311
|
+
onLoadedmetadata: Te,
|
|
312
|
+
onTimeupdate: Me,
|
|
313
|
+
onEnded: Re,
|
|
314
|
+
onError: Ie
|
|
315
|
+
}, null, 40, ut),
|
|
316
|
+
O(o("button", {
|
|
317
|
+
class: "audio-message__play",
|
|
318
|
+
onClick: Y
|
|
319
|
+
}, [...t[9] || (t[9] = [
|
|
320
|
+
o("div", { class: "audio-message__play-icon" }, [
|
|
321
|
+
o("svg", {
|
|
322
|
+
width: "20",
|
|
323
|
+
height: "23",
|
|
324
|
+
viewBox: "0 0 20 23",
|
|
325
|
+
fill: "none",
|
|
326
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
327
|
+
}, [
|
|
328
|
+
o("path", {
|
|
329
|
+
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",
|
|
330
|
+
fill: "#5F5F5F"
|
|
331
|
+
})
|
|
332
|
+
])
|
|
333
|
+
], -1)
|
|
334
|
+
])], 512), [
|
|
335
|
+
[ue, !d.value]
|
|
336
|
+
]),
|
|
337
|
+
O(o("button", {
|
|
338
|
+
class: "audio-message__pause",
|
|
339
|
+
onClick: Y
|
|
340
|
+
}, [...t[10] || (t[10] = [
|
|
341
|
+
o("div", { class: "audio-message__pause-icon" }, [
|
|
342
|
+
o("svg", {
|
|
343
|
+
width: "20",
|
|
344
|
+
height: "23",
|
|
345
|
+
viewBox: "0 0 20 23",
|
|
346
|
+
fill: "none",
|
|
347
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
348
|
+
}, [
|
|
349
|
+
o("path", {
|
|
350
|
+
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",
|
|
351
|
+
fill: "#5F5F5F"
|
|
352
|
+
})
|
|
353
|
+
])
|
|
354
|
+
], -1)
|
|
355
|
+
])], 512), [
|
|
356
|
+
[ue, d.value]
|
|
357
|
+
]),
|
|
358
|
+
o("div", rt, [
|
|
359
|
+
O(o("input", {
|
|
360
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => v.value = a),
|
|
361
|
+
class: "audio-message__progress-bar-container",
|
|
362
|
+
type: "range",
|
|
363
|
+
min: 0,
|
|
364
|
+
max: h.value,
|
|
365
|
+
step: "0.1",
|
|
366
|
+
onMousedown: t[1] || (t[1] = (a) => x.value = !0),
|
|
367
|
+
onMouseup: te,
|
|
368
|
+
onTouchstartPassive: t[2] || (t[2] = (a) => x.value = !0),
|
|
369
|
+
onTouchendPassive: te
|
|
370
|
+
}, null, 40, mt), [
|
|
371
|
+
[De, v.value]
|
|
184
372
|
]),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
373
|
+
o("div", ct, [
|
|
374
|
+
o("button", {
|
|
375
|
+
type: "button",
|
|
376
|
+
class: "audio-message__speed-btn",
|
|
377
|
+
onClick: de
|
|
378
|
+
}, y(A.value.text), 1)
|
|
379
|
+
])
|
|
380
|
+
]),
|
|
381
|
+
o("div", dt, [
|
|
382
|
+
o("p", gt, y(ke.value), 1),
|
|
383
|
+
o("p", vt, y(Se.value), 1)
|
|
384
|
+
])
|
|
385
|
+
]),
|
|
386
|
+
s.message.text ? (l(), c("div", ft, [
|
|
387
|
+
o("p", {
|
|
388
|
+
onClick: t[3] || (t[3] = //@ts-ignore
|
|
389
|
+
(...a) => u(X) && u(X)(...a)),
|
|
390
|
+
innerHTML: u(he)
|
|
391
|
+
}, null, 8, pt)
|
|
392
|
+
])) : f("", !0),
|
|
393
|
+
s.message.linkPreview ? (l(), N(Ze, {
|
|
394
|
+
key: 2,
|
|
395
|
+
class: C(["audio-message__link-preview", s.message.position]),
|
|
396
|
+
"link-preview": s.message.linkPreview
|
|
397
|
+
}, null, 8, ["class", "link-preview"])) : f("", !0),
|
|
398
|
+
s.message.embed ? (l(), N(He, {
|
|
399
|
+
key: 3,
|
|
400
|
+
class: C(s.message.position),
|
|
401
|
+
embed: s.message.embed
|
|
402
|
+
}, null, 8, ["class", "embed"])) : f("", !0),
|
|
403
|
+
k(ze, {
|
|
404
|
+
reactions: s.message.reactions,
|
|
405
|
+
"message-id": s.message.messageId,
|
|
406
|
+
enabled: s.reactionsEnabled,
|
|
407
|
+
onToggleReaction: u(Ne),
|
|
408
|
+
onAddReaction: u(_e),
|
|
409
|
+
onRemoveReaction: u(Fe)
|
|
410
|
+
}, null, 8, ["reactions", "message-id", "enabled", "onToggleReaction", "onAddReaction", "onRemoveReaction"]),
|
|
411
|
+
o("div", yt, [
|
|
412
|
+
o("div", bt, [
|
|
413
|
+
o("button", {
|
|
414
|
+
class: C([
|
|
415
|
+
"audio-message__action-button",
|
|
416
|
+
{ "audio-message__action-button--active": b.value === "text" }
|
|
417
|
+
]),
|
|
418
|
+
type: "button",
|
|
419
|
+
onClick: Le
|
|
420
|
+
}, " Текст ", 2),
|
|
421
|
+
o("button", {
|
|
422
|
+
class: C([
|
|
423
|
+
"audio-message__action-button",
|
|
424
|
+
{ "audio-message__action-button--active": b.value === "summary" }
|
|
425
|
+
]),
|
|
426
|
+
type: "button",
|
|
427
|
+
onClick: $e
|
|
428
|
+
}, " Резюме ", 2)
|
|
429
|
+
]),
|
|
430
|
+
s.message.views ? (l(), c("div", {
|
|
194
431
|
key: 0,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
[G, !f.value]
|
|
227
|
-
]),
|
|
228
|
-
N(a("button", {
|
|
229
|
-
class: "audio-message__pause",
|
|
230
|
-
onClick: D
|
|
231
|
-
}, [...s[11] || (s[11] = [
|
|
232
|
-
a("div", { class: "audio-message__pause-icon" }, [
|
|
233
|
-
a("svg", {
|
|
234
|
-
width: "20",
|
|
235
|
-
height: "23",
|
|
236
|
-
viewBox: "0 0 20 23",
|
|
237
|
-
fill: "none",
|
|
238
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
239
|
-
}, [
|
|
240
|
-
a("path", {
|
|
241
|
-
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",
|
|
242
|
-
fill: "#5F5F5F"
|
|
243
|
-
})
|
|
244
|
-
])
|
|
245
|
-
], -1)
|
|
246
|
-
])], 512), [
|
|
247
|
-
[G, f.value]
|
|
248
|
-
]),
|
|
249
|
-
a("div", We, [
|
|
250
|
-
N(a("input", {
|
|
251
|
-
"onUpdate:modelValue": s[0] || (s[0] = (n) => r.value = n),
|
|
252
|
-
class: "audio-message__progress-bar-container",
|
|
253
|
-
type: "range",
|
|
254
|
-
min: 0,
|
|
255
|
-
max: y.value,
|
|
256
|
-
step: "0.1",
|
|
257
|
-
onMousedown: s[1] || (s[1] = (n) => p.value = !0),
|
|
258
|
-
onMouseup: Z,
|
|
259
|
-
onTouchstartPassive: s[2] || (s[2] = (n) => p.value = !0),
|
|
260
|
-
onTouchendPassive: Z
|
|
261
|
-
}, null, 40, Ge), [
|
|
262
|
-
[ke, r.value]
|
|
432
|
+
class: "audio-message__views",
|
|
433
|
+
onClick: t[4] || (t[4] = //@ts-ignore
|
|
434
|
+
(...a) => u(J) && u(J)(...a))
|
|
435
|
+
}, [
|
|
436
|
+
t[11] || (t[11] = o("span", { class: "pi pi-eye" }, null, -1)),
|
|
437
|
+
o("p", null, y(s.message.views), 1)
|
|
438
|
+
])) : f("", !0),
|
|
439
|
+
o("span", ht, y(s.message.time), 1),
|
|
440
|
+
k(Je, {
|
|
441
|
+
"base-class": "audio-message",
|
|
442
|
+
"message-class": se(s.message),
|
|
443
|
+
"message-status": s.message.status,
|
|
444
|
+
"status-class": xe.value,
|
|
445
|
+
"status-title": Ce.value
|
|
446
|
+
}, null, 8, ["message-class", "message-status", "status-class", "status-title"])
|
|
447
|
+
]),
|
|
448
|
+
k(re, { name: "audio-message-expand" }, {
|
|
449
|
+
default: j(() => [
|
|
450
|
+
b.value ? (l(), c("div", xt, [
|
|
451
|
+
o("div", Ct, [
|
|
452
|
+
b.value === "text" ? (l(), c(U, { key: 0 }, [
|
|
453
|
+
G.value ? f("", !0) : (l(), c("p", wt, y(me))),
|
|
454
|
+
(l(!0), c(U, null, je(W.value, (a, m) => (l(), c("p", {
|
|
455
|
+
key: `au-tr-${m}`,
|
|
456
|
+
class: "audio-message__expand-line"
|
|
457
|
+
}, y(a), 1))), 128))
|
|
458
|
+
], 64)) : (l(), c("p", kt, [
|
|
459
|
+
Q.value ? (l(), c(U, { key: 1 }, [
|
|
460
|
+
le(y(K.value), 1)
|
|
461
|
+
], 64)) : (l(), c("span", St, y(me)))
|
|
462
|
+
]))
|
|
263
463
|
]),
|
|
264
|
-
|
|
265
|
-
|
|
464
|
+
o("div", Tt, [
|
|
465
|
+
o("button", {
|
|
266
466
|
type: "button",
|
|
267
|
-
class: "audio-
|
|
268
|
-
onClick:
|
|
269
|
-
},
|
|
467
|
+
class: "audio-message__expand-close",
|
|
468
|
+
onClick: t[5] || (t[5] = (a) => b.value = null)
|
|
469
|
+
}, " Закрыть ")
|
|
270
470
|
])
|
|
271
|
-
]),
|
|
272
|
-
a("div", Ke, [
|
|
273
|
-
a("p", Qe, g(le.value), 1),
|
|
274
|
-
a("p", Xe, g(ue.value), 1)
|
|
275
|
-
])
|
|
471
|
+
])) : f("", !0)
|
|
276
472
|
]),
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
]
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
"
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}, null, 8, ["reactions", "message-id", "enabled", "onToggleReaction", "onAddReaction", "onRemoveReaction"]),
|
|
307
|
-
a("div", ss, [
|
|
308
|
-
e.message.views ? (l(), c("div", {
|
|
473
|
+
_: 1
|
|
474
|
+
}),
|
|
475
|
+
k(We, {
|
|
476
|
+
status: s.message.status,
|
|
477
|
+
"has-messenger-account": s.message.hasMessengerAccount,
|
|
478
|
+
channel: s.channel,
|
|
479
|
+
onSmsInvite: Ee
|
|
480
|
+
}, null, 8, ["status", "has-messenger-account", "channel"]),
|
|
481
|
+
u(ge) && s.message.actions ? (l(), c("button", {
|
|
482
|
+
key: 4,
|
|
483
|
+
class: "audio-message__menu-button",
|
|
484
|
+
onClick: t[6] || (t[6] = (a) => $.value = !u($))
|
|
485
|
+
}, [...t[12] || (t[12] = [
|
|
486
|
+
o("svg", {
|
|
487
|
+
width: "4",
|
|
488
|
+
height: "17",
|
|
489
|
+
viewBox: "0 0 4 17",
|
|
490
|
+
fill: "none",
|
|
491
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
492
|
+
}, [
|
|
493
|
+
o("path", {
|
|
494
|
+
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",
|
|
495
|
+
fill: "#5F5F5F"
|
|
496
|
+
})
|
|
497
|
+
], -1)
|
|
498
|
+
])])) : f("", !0),
|
|
499
|
+
k(re, null, {
|
|
500
|
+
default: j(() => [
|
|
501
|
+
u($) && s.message.actions ? (l(), N(Ue, {
|
|
309
502
|
key: 0,
|
|
310
|
-
class: "audio-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}, [
|
|
314
|
-
s[12] || (s[12] = a("span", { class: "pi pi-eye" }, null, -1)),
|
|
315
|
-
a("p", null, g(e.message.views), 1)
|
|
316
|
-
])) : m("", !0),
|
|
317
|
-
a("span", ts, g(e.message.time), 1),
|
|
318
|
-
C(Fe, {
|
|
319
|
-
"base-class": "audio-message",
|
|
320
|
-
"message-class": j(e.message),
|
|
321
|
-
"message-status": e.message.status,
|
|
322
|
-
"status-class": ne.value,
|
|
323
|
-
"status-title": ie.value
|
|
324
|
-
}, null, 8, ["message-class", "message-status", "status-class", "status-title"])
|
|
503
|
+
class: "audio-message__context-menu",
|
|
504
|
+
actions: s.message.actions,
|
|
505
|
+
onClick: be
|
|
506
|
+
}, null, 8, ["actions"])) : f("", !0)
|
|
325
507
|
]),
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
onSmsInvite: ge
|
|
331
|
-
}, null, 8, ["status", "has-messenger-account", "channel"]),
|
|
332
|
-
i(Y) && e.message.actions ? (l(), c("button", {
|
|
333
|
-
key: 5,
|
|
334
|
-
class: "audio-message__menu-button",
|
|
335
|
-
onClick: s[6] || (s[6] = (n) => E.value = !i(E))
|
|
336
|
-
}, [...s[13] || (s[13] = [
|
|
337
|
-
a("svg", {
|
|
338
|
-
width: "4",
|
|
339
|
-
height: "17",
|
|
340
|
-
viewBox: "0 0 4 17",
|
|
341
|
-
fill: "none",
|
|
342
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
343
|
-
}, [
|
|
344
|
-
a("path", {
|
|
345
|
-
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",
|
|
346
|
-
fill: "#5F5F5F"
|
|
347
|
-
})
|
|
348
|
-
], -1)
|
|
349
|
-
])])) : m("", !0),
|
|
350
|
-
C(J, null, {
|
|
351
|
-
default: L(() => [
|
|
352
|
-
i(E) && e.message.actions ? (l(), k(Te, {
|
|
353
|
-
key: 0,
|
|
354
|
-
class: "audio-message__context-menu",
|
|
355
|
-
actions: e.message.actions,
|
|
356
|
-
onClick: te
|
|
357
|
-
}, null, 8, ["actions"])) : m("", !0)
|
|
358
|
-
]),
|
|
359
|
-
_: 1
|
|
360
|
-
}),
|
|
361
|
-
(l(), k(xe, { to: "body" }, [
|
|
362
|
-
C(J, { name: "modal-fade" }, {
|
|
363
|
-
default: L(() => {
|
|
364
|
-
var n;
|
|
365
|
-
return [
|
|
366
|
-
x.value ? (l(), c("div", {
|
|
367
|
-
key: 0,
|
|
368
|
-
class: "audio-message__modal-overlay",
|
|
369
|
-
"data-theme": i(V)().theme ? i(V)().theme : null
|
|
370
|
-
}, [
|
|
371
|
-
a("div", ns, [
|
|
372
|
-
a("button", {
|
|
373
|
-
class: "audio-message__modal-close-button",
|
|
374
|
-
onClick: s[7] || (s[7] = (H) => x.value = !1)
|
|
375
|
-
}, [...s[14] || (s[14] = [
|
|
376
|
-
a("span", null, [
|
|
377
|
-
a("i", { class: "pi pi-times" })
|
|
378
|
-
], -1)
|
|
379
|
-
])]),
|
|
380
|
-
a("p", is, g((n = e.message.transcript) == null ? void 0 : n.text), 1)
|
|
381
|
-
])
|
|
382
|
-
], 8, as)) : m("", !0)
|
|
383
|
-
];
|
|
384
|
-
}),
|
|
385
|
-
_: 1
|
|
386
|
-
})
|
|
387
|
-
]))
|
|
388
|
-
], 34)
|
|
389
|
-
], 46, je);
|
|
390
|
-
};
|
|
508
|
+
_: 1
|
|
509
|
+
})
|
|
510
|
+
], 34)
|
|
511
|
+
], 46, nt));
|
|
391
512
|
}
|
|
392
513
|
});
|
|
393
514
|
export {
|
|
394
|
-
|
|
515
|
+
Ht as default
|
|
395
516
|
};
|