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