@bcc-code/vue-bcc-chat-ui 7.4.0 → 7.4.1
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/index.d.ts +21 -1
- package/dist/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +1126 -902
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -107,6 +107,7 @@ function yt(e) {
|
|
|
107
107
|
var bt = {
|
|
108
108
|
en: {
|
|
109
109
|
addOption: "Add option",
|
|
110
|
+
addScheduleTime: "Add another time",
|
|
110
111
|
addToMessage: "Add to message",
|
|
111
112
|
applyLink: "Apply link",
|
|
112
113
|
attachAudio: "Attach audio",
|
|
@@ -138,6 +139,7 @@ var bt = {
|
|
|
138
139
|
deliveryAndReadDetails: "Delivery and read details",
|
|
139
140
|
directMessage: "Direct message",
|
|
140
141
|
downloadVideo: "Download video",
|
|
142
|
+
duplicateScheduleTimes: "The same send time is listed more than once.",
|
|
141
143
|
edit: "Edit",
|
|
142
144
|
edited: "edited",
|
|
143
145
|
editing: "Editing",
|
|
@@ -215,7 +217,10 @@ var bt = {
|
|
|
215
217
|
replying: "Replying",
|
|
216
218
|
replyingInContext: ({ context: e }) => e ? `Replying in ${e}` : "Replying",
|
|
217
219
|
remove: "Remove",
|
|
220
|
+
removeScheduleTime: "Remove send time",
|
|
218
221
|
reschedule: "Reschedule",
|
|
222
|
+
retry: "Retry",
|
|
223
|
+
retryScheduleTimesCount: ({ count: e }) => `Retry ${e ?? 1} times`,
|
|
219
224
|
save: "Save",
|
|
220
225
|
saveMessage: "Save message",
|
|
221
226
|
schedule: "Schedule",
|
|
@@ -223,6 +228,11 @@ var bt = {
|
|
|
223
228
|
scheduledDateLabel: ({ date: e }) => `Scheduled ${e ?? ""}`,
|
|
224
229
|
scheduledMessages: "Scheduled messages",
|
|
225
230
|
scheduleMessage: "Schedule message",
|
|
231
|
+
scheduleTimeLabel: ({ count: e }) => `Send time ${e ?? 1}`,
|
|
232
|
+
scheduleTimesCount: ({ count: e }) => `Schedule ${e ?? 1} times`,
|
|
233
|
+
scheduleTimeFailed: "Could not be scheduled",
|
|
234
|
+
scheduleTimeSucceeded: "Scheduled",
|
|
235
|
+
scheduling: "Scheduling…",
|
|
226
236
|
searchByGroupName: "Search by group name",
|
|
227
237
|
selectConversationToStart: "Select a conversation to start reading and sending messages.",
|
|
228
238
|
sendAt: "Send at",
|
|
@@ -258,6 +268,7 @@ var bt = {
|
|
|
258
268
|
},
|
|
259
269
|
nb: {
|
|
260
270
|
addOption: "Legg til alternativ",
|
|
271
|
+
addScheduleTime: "Legg til et tidspunkt til",
|
|
261
272
|
addToMessage: "Legg til i melding",
|
|
262
273
|
applyLink: "Bruk lenke",
|
|
263
274
|
attachAudio: "Legg ved lyd",
|
|
@@ -289,6 +300,7 @@ var bt = {
|
|
|
289
300
|
deliveryAndReadDetails: "Leverings- og lesedetaljer",
|
|
290
301
|
directMessage: "Direktemelding",
|
|
291
302
|
downloadVideo: "Last ned video",
|
|
303
|
+
duplicateScheduleTimes: "Samme sendetidspunkt er lagt inn flere ganger.",
|
|
292
304
|
edit: "Rediger",
|
|
293
305
|
edited: "redigert",
|
|
294
306
|
editing: "Redigerer",
|
|
@@ -366,7 +378,10 @@ var bt = {
|
|
|
366
378
|
replying: "Svarer",
|
|
367
379
|
replyingInContext: ({ context: e }) => e ? `Svarer i ${e}` : "Svarer",
|
|
368
380
|
remove: "Fjern",
|
|
381
|
+
removeScheduleTime: "Fjern sendetidspunkt",
|
|
369
382
|
reschedule: "Planlegg på nytt",
|
|
383
|
+
retry: "Prøv igjen",
|
|
384
|
+
retryScheduleTimesCount: ({ count: e }) => `Prøv ${e ?? 1} tidspunkt igjen`,
|
|
370
385
|
save: "Lagre",
|
|
371
386
|
saveMessage: "Lagre melding",
|
|
372
387
|
schedule: "Planlegg",
|
|
@@ -374,6 +389,11 @@ var bt = {
|
|
|
374
389
|
scheduledDateLabel: ({ date: e }) => `Planlagt ${e ?? ""}`,
|
|
375
390
|
scheduledMessages: "Planlagte meldinger",
|
|
376
391
|
scheduleMessage: "Planlegg melding",
|
|
392
|
+
scheduleTimeLabel: ({ count: e }) => `Sendetidspunkt ${e ?? 1}`,
|
|
393
|
+
scheduleTimesCount: ({ count: e }) => `Planlegg ${e ?? 1} ganger`,
|
|
394
|
+
scheduleTimeFailed: "Kunne ikke planlegges",
|
|
395
|
+
scheduleTimeSucceeded: "Planlagt",
|
|
396
|
+
scheduling: "Planlegger…",
|
|
377
397
|
searchByGroupName: "Søk etter gruppenavn",
|
|
378
398
|
selectConversationToStart: "Velg en samtale for å begynne å lese og sende meldinger.",
|
|
379
399
|
sendAt: "Send kl.",
|
|
@@ -4916,9 +4936,47 @@ async function Vl(e) {
|
|
|
4916
4936
|
}
|
|
4917
4937
|
}
|
|
4918
4938
|
//#endregion
|
|
4939
|
+
//#region src/chat/scheduleDates.ts
|
|
4940
|
+
var Hl = /^([01]\d|2[0-3]):([0-5]\d)$/, Ul = /^\d{4}-\d{2}-\d{2}$/;
|
|
4941
|
+
function Wl(e) {
|
|
4942
|
+
return Hl.test(e.trim());
|
|
4943
|
+
}
|
|
4944
|
+
function Gl(e) {
|
|
4945
|
+
return Ul.test(e.trim());
|
|
4946
|
+
}
|
|
4947
|
+
function Kl(e, t) {
|
|
4948
|
+
if (!Gl(e) || !Wl(t)) return null;
|
|
4949
|
+
let [n, r, i] = e.trim().split("-").map(Number), [a, o] = t.trim().split(":").map(Number), s = new Date(n, r - 1, i, a, o, 0, 0);
|
|
4950
|
+
return Number.isNaN(s.getTime()) || s.getFullYear() !== n || s.getMonth() !== r - 1 || s.getDate() !== i || s.getHours() !== a || s.getMinutes() !== o ? null : s.toISOString();
|
|
4951
|
+
}
|
|
4952
|
+
function ql(e) {
|
|
4953
|
+
let t = e instanceof Date ? e : new Date(e);
|
|
4954
|
+
if (Number.isNaN(t.getTime())) return {
|
|
4955
|
+
date: "",
|
|
4956
|
+
time: ""
|
|
4957
|
+
};
|
|
4958
|
+
let n = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), a = String(t.getHours()).padStart(2, "0"), o = String(t.getMinutes()).padStart(2, "0");
|
|
4959
|
+
return {
|
|
4960
|
+
date: `${n}-${r}-${i}`,
|
|
4961
|
+
time: `${a}:${o}`
|
|
4962
|
+
};
|
|
4963
|
+
}
|
|
4964
|
+
function Jl(e) {
|
|
4965
|
+
let t = /* @__PURE__ */ new Map();
|
|
4966
|
+
for (let n of e) {
|
|
4967
|
+
if (typeof n != "string" || !n.trim()) continue;
|
|
4968
|
+
let e = new Date(n).getTime();
|
|
4969
|
+
Number.isNaN(e) || t.has(e) || t.set(e, n);
|
|
4970
|
+
}
|
|
4971
|
+
return [...t.entries()].sort(([e], [t]) => e - t).map(([, e]) => e);
|
|
4972
|
+
}
|
|
4973
|
+
function Yl(e) {
|
|
4974
|
+
return Jl([...e.scheduleDates ?? [], e.scheduleDate]);
|
|
4975
|
+
}
|
|
4976
|
+
//#endregion
|
|
4919
4977
|
//#region src/chat/client.ts
|
|
4920
|
-
var
|
|
4921
|
-
function
|
|
4978
|
+
var Xl = null, Zl = null, Ql = null, $l = null, eu = null;
|
|
4979
|
+
function tu({ environment: e }) {
|
|
4922
4980
|
it(e);
|
|
4923
4981
|
let t = D(!1), n = D(!1), r = D(!1), i = D(!1), o = D(!1), s = D(!1), c = D(!1), l = D(!1), u = D(!1), d = D(!1), f = D(!1), p = D(!1), m = D(typeof navigator < "u" && !navigator.onLine), h = D(!1), g = D(!1), _ = D(null), v = D(null), y = D([]), b = D([]), x = D([]), S = D([]), C = D(!1), w = D(!1), T = D(null), E = D(null), O = D(null), k = D(null), A = D([]), j = D({}), M = a(() => A.value.length), N = D(/* @__PURE__ */ new Map()), P = D(null), F = D(null), ee = D("video"), I = D("idle"), L = D(null), R = !0, z = a(() => {
|
|
4924
4982
|
let [e] = N.value.values();
|
|
@@ -4950,7 +5008,7 @@ function ql({ environment: e }) {
|
|
|
4950
5008
|
})));
|
|
4951
5009
|
}
|
|
4952
5010
|
function H(e, t) {
|
|
4953
|
-
return V(e),
|
|
5011
|
+
return V(e), cu(e, t);
|
|
4954
5012
|
}
|
|
4955
5013
|
let U = a(() => y.value.find((e) => e.id === T.value) ?? null), ie = `bcc-ui-connection-${crypto.randomUUID()}`, ae = `bcc-ui-message-${crypto.randomUUID()}`, W = `bcc-ui-call-${crypto.randomUUID()}`, oe = !1, G = !1, se = null, ce = null, le = Promise.resolve(), ue = async () => {
|
|
4956
5014
|
if (I.value !== "idle") {
|
|
@@ -4977,7 +5035,7 @@ function ql({ environment: e }) {
|
|
|
4977
5035
|
getErrorMessage: Q
|
|
4978
5036
|
}), Be = /* @__PURE__ */ new Map(), Ve = /* @__PURE__ */ new Set(), He = null, Ue = null, We = 0, Ge = null, Ke = null, qe = 0, Je = 0;
|
|
4979
5037
|
async function Ye() {
|
|
4980
|
-
if (await
|
|
5038
|
+
if (await nu(e), Il(), t.value) {
|
|
4981
5039
|
await Tn();
|
|
4982
5040
|
return;
|
|
4983
5041
|
}
|
|
@@ -4989,8 +5047,8 @@ function ql({ environment: e }) {
|
|
|
4989
5047
|
await Ye();
|
|
4990
5048
|
let t = ut(), n = await Y(K.getLoggedinUser(), Rt);
|
|
4991
5049
|
n && t !== e && await Y(K.logout(), Rt), dt(e);
|
|
4992
|
-
let r = await Y(
|
|
4993
|
-
n && n.getUid() !== i.getUid() && await $e(), v.value =
|
|
5050
|
+
let r = await Y(ou(e), Rt), i = await Y(K.login(r), zt);
|
|
5051
|
+
n && n.getUid() !== i.getUid() && await $e(), v.value = pu(i), Xt(v.value.uid), g.value = !0, m.value = typeof navigator < "u" && !navigator.onLine, et(), _t(), je(), Te || await pt(), await xt(), pr();
|
|
4994
5052
|
} catch (e) {
|
|
4995
5053
|
throw zn(), _.value = Q(e, "Unable to sign in to chat."), e;
|
|
4996
5054
|
} finally {
|
|
@@ -5006,14 +5064,14 @@ function ql({ environment: e }) {
|
|
|
5006
5064
|
}
|
|
5007
5065
|
}
|
|
5008
5066
|
async function Qe() {
|
|
5009
|
-
let t = await Y(
|
|
5067
|
+
let t = await Y(iu(e), zt), n = ut();
|
|
5010
5068
|
if (!n) throw Error("Not signed in to chat.");
|
|
5011
|
-
let r = await Y(
|
|
5069
|
+
let r = await Y(ou(n), Rt), i = le.catch(() => void 0).then(() => Y(t.loginWithAuthToken(r), zt));
|
|
5012
5070
|
return le = i, await i, t;
|
|
5013
5071
|
}
|
|
5014
5072
|
async function $e() {
|
|
5015
|
-
if (
|
|
5016
|
-
let t = await Y(
|
|
5073
|
+
if (eu || ru()) try {
|
|
5074
|
+
let t = await Y(iu(e), zt);
|
|
5017
5075
|
t.isUserLoggedIn() && await Y(t.logout(), Rt);
|
|
5018
5076
|
} catch (e) {
|
|
5019
5077
|
console.warn("Unable to sign out of the calls SDK.", e);
|
|
@@ -5055,7 +5113,7 @@ function ql({ environment: e }) {
|
|
|
5055
5113
|
we = !0, pt();
|
|
5056
5114
|
return;
|
|
5057
5115
|
}
|
|
5058
|
-
e >=
|
|
5116
|
+
e >= _u && mt();
|
|
5059
5117
|
}
|
|
5060
5118
|
}
|
|
5061
5119
|
function st() {
|
|
@@ -5083,10 +5141,10 @@ function ql({ environment: e }) {
|
|
|
5083
5141
|
if (!e) {
|
|
5084
5142
|
let t = ut();
|
|
5085
5143
|
if (!t) return;
|
|
5086
|
-
let n = await Y(
|
|
5144
|
+
let n = await Y(ou(t), Rt);
|
|
5087
5145
|
e = await Y(K.login(n), zt);
|
|
5088
5146
|
}
|
|
5089
|
-
v.value =
|
|
5147
|
+
v.value = pu(e), g.value = !0, et();
|
|
5090
5148
|
let t = K.connect;
|
|
5091
5149
|
typeof t == "function" && (await Y(t.call(K), zt), p.value = !0), Ce = 0, we && await mt();
|
|
5092
5150
|
} catch (t) {
|
|
@@ -5110,11 +5168,11 @@ function ql({ environment: e }) {
|
|
|
5110
5168
|
function _t() {
|
|
5111
5169
|
if (!q || y.value.length > 0) return;
|
|
5112
5170
|
let e = q.getConversations();
|
|
5113
|
-
e.length !== 0 && (y.value =
|
|
5171
|
+
e.length !== 0 && (y.value = Tu(e), !T.value && y.value.length > 0 && vt(T.value));
|
|
5114
5172
|
}
|
|
5115
5173
|
function vt(e) {
|
|
5116
5174
|
if (!q || !e) return b.value = [], !1;
|
|
5117
|
-
let t = q.getMessages(e).sort(
|
|
5175
|
+
let t = q.getMessages(e).sort(Eu);
|
|
5118
5176
|
return b.value = t, t.length > 0;
|
|
5119
5177
|
}
|
|
5120
5178
|
async function yt() {
|
|
@@ -5128,13 +5186,13 @@ function ql({ environment: e }) {
|
|
|
5128
5186
|
async function xt() {
|
|
5129
5187
|
if (await Ye(), B(), r.value = !0, _.value = null, m.value) {
|
|
5130
5188
|
let e = q?.getConversations() ?? [];
|
|
5131
|
-
y.value =
|
|
5189
|
+
y.value = Tu(e), U.value && await hn(), r.value = !1;
|
|
5132
5190
|
return;
|
|
5133
5191
|
}
|
|
5134
5192
|
try {
|
|
5135
5193
|
let e = new K.ConversationsRequestBuilder().setLimit(50).withTags(!0).build(), t = [], n = [];
|
|
5136
5194
|
do
|
|
5137
|
-
n = await Y(e.fetchNext(), Rt), t.push(...n.map((e) =>
|
|
5195
|
+
n = await Y(e.fetchNext(), Rt), t.push(...n.map((e) => su(e, v.value?.uid)));
|
|
5138
5196
|
while (n.length === 50);
|
|
5139
5197
|
let r = new Set(t.filter((e) => e.type === "user").map((e) => e.targetId));
|
|
5140
5198
|
for (let e of y.value) {
|
|
@@ -5148,11 +5206,11 @@ function ql({ environment: e }) {
|
|
|
5148
5206
|
let t = i.get(e.id);
|
|
5149
5207
|
t && (e.subtitle === "No messages yet" && t.subtitle && t.subtitle !== "No messages yet" && (e.subtitle = t.subtitle), !e.lastMessageAt && t.lastMessageAt && (e.lastMessageAt = t.lastMessageAt), !e.lastMessage && t.lastMessage && (e.lastMessage = t.lastMessage));
|
|
5150
5208
|
}
|
|
5151
|
-
y.value =
|
|
5209
|
+
y.value = Tu(On(t, i)), q?.setConversations(y.value), kn(y.value), U.value && await hn();
|
|
5152
5210
|
} catch (e) {
|
|
5153
5211
|
let t = q?.getConversations() ?? [];
|
|
5154
5212
|
if (t.length > 0) {
|
|
5155
|
-
y.value =
|
|
5213
|
+
y.value = Tu(t);
|
|
5156
5214
|
return;
|
|
5157
5215
|
}
|
|
5158
5216
|
throw _.value = Q(e, "Unable to load conversations."), e;
|
|
@@ -5165,7 +5223,7 @@ function ql({ environment: e }) {
|
|
|
5165
5223
|
}
|
|
5166
5224
|
function Ct(e) {
|
|
5167
5225
|
let t = y.value.find((t) => t.type === "user" && t.targetId === e.targetId && t.id !== e.id);
|
|
5168
|
-
t && Dt(t.id, e.id), y.value =
|
|
5226
|
+
t && Dt(t.id, e.id), y.value = Tu([e, ...y.value.filter((t) => t.id !== e.id && (t.type !== "user" || t.targetId !== e.targetId))]), q?.setConversations(y.value);
|
|
5169
5227
|
}
|
|
5170
5228
|
async function wt(e) {
|
|
5171
5229
|
let t = e?.trim();
|
|
@@ -5180,9 +5238,9 @@ function ql({ environment: e }) {
|
|
|
5180
5238
|
_.value = null;
|
|
5181
5239
|
let r;
|
|
5182
5240
|
try {
|
|
5183
|
-
r =
|
|
5241
|
+
r = su(await K.getConversation(t, K.RECEIVER_TYPE.USER), v.value?.uid);
|
|
5184
5242
|
} catch (e) {
|
|
5185
|
-
if (!
|
|
5243
|
+
if (!zu(e)) throw _.value = Q(e, "Unable to open the direct message."), e;
|
|
5186
5244
|
try {
|
|
5187
5245
|
r = Tt(await K.getUser(t), t);
|
|
5188
5246
|
} catch (e) {
|
|
@@ -5251,7 +5309,7 @@ function ql({ environment: e }) {
|
|
|
5251
5309
|
await Pt(k.value, r);
|
|
5252
5310
|
return;
|
|
5253
5311
|
}
|
|
5254
|
-
let i = E.value?.id, a = crypto.randomUUID(), o =
|
|
5312
|
+
let i = E.value?.id, a = crypto.randomUUID(), o = Iu(nr(O.value, t), a);
|
|
5255
5313
|
u.value = !0, _.value = null;
|
|
5256
5314
|
try {
|
|
5257
5315
|
if (m.value) {
|
|
@@ -5267,7 +5325,7 @@ function ql({ environment: e }) {
|
|
|
5267
5325
|
muid: a,
|
|
5268
5326
|
deliveryState: "sending"
|
|
5269
5327
|
}));
|
|
5270
|
-
let e = new K.TextMessage(n.targetId, r,
|
|
5328
|
+
let e = new K.TextMessage(n.targetId, r, Bu(n));
|
|
5271
5329
|
e.setMuid?.(a), Object.keys(o).length > 0 && e.setMetadata?.(o), i && e.setParentMessageId?.(Number(i));
|
|
5272
5330
|
let t = await K.sendMessage(e);
|
|
5273
5331
|
Gn(H(t, v.value?.uid)), jn(t), await Pn(t), O.value = null;
|
|
@@ -5289,7 +5347,7 @@ function ql({ environment: e }) {
|
|
|
5289
5347
|
u.value = !0, _.value = null;
|
|
5290
5348
|
try {
|
|
5291
5349
|
let t;
|
|
5292
|
-
e.kind === "text" ? t = new K.TextMessage(n.targetId, r,
|
|
5350
|
+
e.kind === "text" ? t = new K.TextMessage(n.targetId, r, Bu(n)) : (t = new K.MediaMessage(n.targetId, e.source?.getAttachment?.()?.getFileUrl?.() ?? e.source?.getAttachment?.()?.getUrl?.() ?? e.attachments[0]?.url ?? "", e.source?.getType?.() ?? e.type ?? e.kind, Bu(n)), t.setCaption(r)), t.setId(Number(e.id));
|
|
5293
5351
|
let i = await K.editMessage(t);
|
|
5294
5352
|
Gn(H(i, v.value?.uid)), jn(i), k.value = null;
|
|
5295
5353
|
} catch (e) {
|
|
@@ -5303,7 +5361,7 @@ function ql({ environment: e }) {
|
|
|
5303
5361
|
if (u.value) return;
|
|
5304
5362
|
let n = U.value;
|
|
5305
5363
|
if (!n) return;
|
|
5306
|
-
let r = E.value?.id, i = crypto.randomUUID(), a =
|
|
5364
|
+
let r = E.value?.id, i = crypto.randomUUID(), a = Iu(nr(O.value, t), i), o = Wu(e.file);
|
|
5307
5365
|
u.value = !0, _.value = null;
|
|
5308
5366
|
try {
|
|
5309
5367
|
if (m.value) {
|
|
@@ -5317,7 +5375,7 @@ function ql({ environment: e }) {
|
|
|
5317
5375
|
attachments: [{
|
|
5318
5376
|
kind: o,
|
|
5319
5377
|
name: e.file.name,
|
|
5320
|
-
mimeType:
|
|
5378
|
+
mimeType: $u(e.file) || void 0,
|
|
5321
5379
|
size: e.file.size
|
|
5322
5380
|
}],
|
|
5323
5381
|
metadata: a,
|
|
@@ -5325,7 +5383,7 @@ function ql({ environment: e }) {
|
|
|
5325
5383
|
muid: i,
|
|
5326
5384
|
deliveryState: "sending"
|
|
5327
5385
|
}));
|
|
5328
|
-
let t = new K.MediaMessage(n.targetId, e.file, o,
|
|
5386
|
+
let t = new K.MediaMessage(n.targetId, e.file, o, Bu(n));
|
|
5329
5387
|
t.setMuid?.(i), Object.keys(a).length > 0 && t.setMetadata?.(a), r && t.setParentMessageId?.(Number(r)), e.caption?.trim() && t.setCaption?.(e.caption.trim());
|
|
5330
5388
|
let s = await K.sendMediaMessage(t);
|
|
5331
5389
|
Gn(H(s, v.value?.uid)), jn(s), await Pn(s), O.value = null;
|
|
@@ -5345,7 +5403,7 @@ function ql({ environment: e }) {
|
|
|
5345
5403
|
if (!n) return;
|
|
5346
5404
|
let r = e.question.trim(), i = e.options.map((e) => e.trim()).filter(Boolean);
|
|
5347
5405
|
if (!r || i.length < 2) return;
|
|
5348
|
-
let a = E.value?.id, o = crypto.randomUUID(), s =
|
|
5406
|
+
let a = E.value?.id, o = crypto.randomUUID(), s = Iu(nr(O.value, t), o);
|
|
5349
5407
|
u.value = !0, _.value = null;
|
|
5350
5408
|
try {
|
|
5351
5409
|
if (m.value) {
|
|
@@ -5532,7 +5590,7 @@ function ql({ environment: e }) {
|
|
|
5532
5590
|
S.value = o, Ge = r, Je = 0, $t();
|
|
5533
5591
|
} catch (e) {
|
|
5534
5592
|
if (!Yt(a, i)) return;
|
|
5535
|
-
if (
|
|
5593
|
+
if (Ru(e)) {
|
|
5536
5594
|
S.value = [], Ge = r;
|
|
5537
5595
|
return;
|
|
5538
5596
|
}
|
|
@@ -5558,12 +5616,12 @@ function ql({ environment: e }) {
|
|
|
5558
5616
|
return n === void 0 || Number.isNaN(n) ? e : e === null ? n : Math.min(e, n);
|
|
5559
5617
|
}, null);
|
|
5560
5618
|
if (!e || t === null) return;
|
|
5561
|
-
let n = t +
|
|
5562
|
-
tn(e, n > 0 ? Math.min(n,
|
|
5619
|
+
let n = t + vu - Date.now();
|
|
5620
|
+
tn(e, n > 0 ? Math.min(n, xu) : yu);
|
|
5563
5621
|
}
|
|
5564
5622
|
function en(e) {
|
|
5565
5623
|
if (Ge !== e || S.value.length === 0) return;
|
|
5566
|
-
let t = Math.min(
|
|
5624
|
+
let t = Math.min(yu * 2 ** Je, bu);
|
|
5567
5625
|
Je += 1, tn(e, t);
|
|
5568
5626
|
}
|
|
5569
5627
|
function tn(e, t) {
|
|
@@ -5579,20 +5637,36 @@ function ql({ environment: e }) {
|
|
|
5579
5637
|
}
|
|
5580
5638
|
async function an(e, t) {
|
|
5581
5639
|
let n = U.value;
|
|
5582
|
-
if (n) {
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5640
|
+
if (!n) return { occurrences: [] };
|
|
5641
|
+
let r = Yl(e);
|
|
5642
|
+
if (!r.length) return { occurrences: [] };
|
|
5643
|
+
if (n.type === "user") {
|
|
5644
|
+
let e = /* @__PURE__ */ Error("Scheduling is not yet supported for direct messages.");
|
|
5645
|
+
throw _.value = Q(e, "Unable to schedule the message."), e;
|
|
5646
|
+
}
|
|
5647
|
+
d.value = !0, _.value = null;
|
|
5648
|
+
let i = [];
|
|
5649
|
+
for (let a of r) {
|
|
5650
|
+
let r = {
|
|
5651
|
+
...e,
|
|
5652
|
+
scheduleDate: a,
|
|
5653
|
+
scheduleDates: void 0
|
|
5654
|
+
};
|
|
5588
5655
|
try {
|
|
5589
|
-
|
|
5656
|
+
r.file ? await Uu(n, r, t) : await Hu(n, r, t), i.push({
|
|
5657
|
+
scheduleDate: a,
|
|
5658
|
+
success: !0
|
|
5659
|
+
});
|
|
5590
5660
|
} catch (e) {
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5661
|
+
i.push({
|
|
5662
|
+
scheduleDate: a,
|
|
5663
|
+
success: !1,
|
|
5664
|
+
error: Q(e, "Unable to schedule the message.")
|
|
5665
|
+
});
|
|
5594
5666
|
}
|
|
5595
5667
|
}
|
|
5668
|
+
let a = i.filter((e) => !e.success).length;
|
|
5669
|
+
return i.length > a && await Kt(n.targetId).catch(() => void 0), _.value = a === 0 ? null : i.length > 1 ? `${a} of ${i.length} send times could not be scheduled. Check the schedule dialog to retry them.` : i[0]?.error ?? "Unable to schedule the message.", d.value = !1, { occurrences: i };
|
|
5596
5670
|
}
|
|
5597
5671
|
async function on(e) {
|
|
5598
5672
|
if (_.value = null, !e.scheduled) return;
|
|
@@ -5628,7 +5702,7 @@ function ql({ environment: e }) {
|
|
|
5628
5702
|
async function cn(e) {
|
|
5629
5703
|
d.value = !0, _.value = null;
|
|
5630
5704
|
try {
|
|
5631
|
-
let t =
|
|
5705
|
+
let t = Vu(), n = await fetch(`${at().chatApiBaseUrl}/chats/rescheduleMessage`, {
|
|
5632
5706
|
method: "POST",
|
|
5633
5707
|
headers: {
|
|
5634
5708
|
"Content-Type": "application/json",
|
|
@@ -5709,8 +5783,8 @@ function ql({ environment: e }) {
|
|
|
5709
5783
|
conversationId: t.id,
|
|
5710
5784
|
request: ln(t)
|
|
5711
5785
|
}, n = await fn(He.request));
|
|
5712
|
-
let r =
|
|
5713
|
-
b.value = e?.reset ?
|
|
5786
|
+
let r = ku(await Promise.all(n.map((e) => H(e, v.value?.uid)).filter(Pu).sort(Eu).map(dn)), b.value);
|
|
5787
|
+
b.value = e?.reset ? Mu(b.value.filter((e) => e.conversationId === t.id && Nu(e)), r) : Mu(b.value, r), C.value = n.length === 50, q?.setMessages(t.id, b.value);
|
|
5714
5788
|
let i = n[n.length - 1];
|
|
5715
5789
|
return i && Fn(i).then(() => Pn(i)), n.length > 0;
|
|
5716
5790
|
}
|
|
@@ -5735,7 +5809,7 @@ function ql({ environment: e }) {
|
|
|
5735
5809
|
} catch (n) {
|
|
5736
5810
|
let r = q?.getMessages(e.id) ?? [];
|
|
5737
5811
|
if (r.length > 0) {
|
|
5738
|
-
t || (b.value = r.sort(
|
|
5812
|
+
t || (b.value = r.sort(Eu));
|
|
5739
5813
|
return;
|
|
5740
5814
|
}
|
|
5741
5815
|
throw _.value = Q(n, "Unable to load messages."), n;
|
|
@@ -5758,14 +5832,14 @@ function ql({ environment: e }) {
|
|
|
5758
5832
|
parentMessageId: t,
|
|
5759
5833
|
request: un(t)
|
|
5760
5834
|
}, w.value = !0), !Ue) return !1;
|
|
5761
|
-
let n = await Y(Ue.request.fetchPrevious(), Rt), r =
|
|
5762
|
-
x.value = e?.reset ?
|
|
5835
|
+
let n = await Y(Ue.request.fetchPrevious(), Rt), r = ku(await Promise.all(n.map((e) => H(e, v.value?.uid)).filter(Pu).sort(Eu).map(dn)), x.value);
|
|
5836
|
+
x.value = e?.reset ? Mu(x.value.filter((e) => e.parentMessageId === t && Nu(e)), r) : Mu(x.value, r), w.value = n.length === 50, q?.setThreadMessages(t, x.value);
|
|
5763
5837
|
let i = n[n.length - 1];
|
|
5764
5838
|
return i && Fn(i).then(() => Pn(i)), n.length > 0;
|
|
5765
5839
|
}
|
|
5766
5840
|
async function vn(e) {
|
|
5767
5841
|
if (o.value = !0, m.value) {
|
|
5768
|
-
x.value = (q?.getThreadMessages(e) ?? []).sort(
|
|
5842
|
+
x.value = (q?.getThreadMessages(e) ?? []).sort(Eu), w.value = !1, Ue = null, o.value = !1;
|
|
5769
5843
|
return;
|
|
5770
5844
|
}
|
|
5771
5845
|
try {
|
|
@@ -5773,7 +5847,7 @@ function ql({ environment: e }) {
|
|
|
5773
5847
|
} catch (t) {
|
|
5774
5848
|
let n = q?.getThreadMessages(e) ?? [];
|
|
5775
5849
|
if (n.length > 0) {
|
|
5776
|
-
x.value = n.sort(
|
|
5850
|
+
x.value = n.sort(Eu);
|
|
5777
5851
|
return;
|
|
5778
5852
|
}
|
|
5779
5853
|
throw _.value = Q(t, "Unable to load thread."), t;
|
|
@@ -5848,7 +5922,7 @@ function ql({ environment: e }) {
|
|
|
5848
5922
|
if (e && typeof e == "object" && "code" in e && e.code === "USER_NOT_LOGED_IN") return;
|
|
5849
5923
|
console.error("Error fetching logged in user:", e);
|
|
5850
5924
|
}
|
|
5851
|
-
v.value = e ?
|
|
5925
|
+
v.value = e ? pu(e) : null, g.value = !!e;
|
|
5852
5926
|
}
|
|
5853
5927
|
function En() {
|
|
5854
5928
|
oe ||= (K.addConnectionListener(ie, new K.ConnectionListener({
|
|
@@ -5880,7 +5954,7 @@ function ql({ environment: e }) {
|
|
|
5880
5954
|
},
|
|
5881
5955
|
onMessageEdited: (e) => {
|
|
5882
5956
|
let t = H(e, v.value?.uid);
|
|
5883
|
-
|
|
5957
|
+
Pu(t) && t.conversationId === T.value && (Mn(t), jn(e));
|
|
5884
5958
|
},
|
|
5885
5959
|
onMessageDeleted: (e) => {
|
|
5886
5960
|
let t = H(e, v.value?.uid);
|
|
@@ -5906,7 +5980,7 @@ function ql({ environment: e }) {
|
|
|
5906
5980
|
}
|
|
5907
5981
|
})), K.addCallListener(W, new K.CallListener({
|
|
5908
5982
|
onIncomingCallReceived: (t) => {
|
|
5909
|
-
|
|
5983
|
+
iu(e), N.value = new Map(N.value).set(t.getSessionId(), t), ee.value = t.getType() === K.CALL_TYPE.AUDIO ? "audio" : "video";
|
|
5910
5984
|
},
|
|
5911
5985
|
onOutgoingCallAccepted: (e) => {
|
|
5912
5986
|
P.value = e, F.value = e.getSessionId(), I.value = "connecting";
|
|
@@ -5920,13 +5994,13 @@ function ql({ environment: e }) {
|
|
|
5920
5994
|
},
|
|
5921
5995
|
onCallEndedMessageReceived: (e) => {
|
|
5922
5996
|
let t = e?.getSessionId?.();
|
|
5923
|
-
F.value && t && t !== F.value || (
|
|
5997
|
+
F.value && t && t !== F.value || (eu?.leaveSession(), Cr("ended"));
|
|
5924
5998
|
}
|
|
5925
5999
|
})), !0);
|
|
5926
6000
|
}
|
|
5927
6001
|
async function Dn(e) {
|
|
5928
6002
|
let t = H(e, v.value?.uid);
|
|
5929
|
-
if (!
|
|
6003
|
+
if (!Pu(t)) return;
|
|
5930
6004
|
jn(e);
|
|
5931
6005
|
let n = Fn(e);
|
|
5932
6006
|
if (t.parentMessageId) {
|
|
@@ -5952,7 +6026,7 @@ function ql({ environment: e }) {
|
|
|
5952
6026
|
}
|
|
5953
6027
|
async function kn(e) {
|
|
5954
6028
|
let t = ++be, n = e.filter((e) => e.type !== "user"), r = /* @__PURE__ */ new Map(), i = 0;
|
|
5955
|
-
if (await Promise.all(Array.from({ length: Math.min(
|
|
6029
|
+
if (await Promise.all(Array.from({ length: Math.min(gu, n.length) }, async () => {
|
|
5956
6030
|
for (; i < n.length && t === be;) {
|
|
5957
6031
|
let e = n[i++];
|
|
5958
6032
|
r.set(e.targetId, await An(e.targetId));
|
|
@@ -5997,7 +6071,7 @@ function ql({ environment: e }) {
|
|
|
5997
6071
|
}
|
|
5998
6072
|
function jn(e) {
|
|
5999
6073
|
let t = H(e, v.value?.uid);
|
|
6000
|
-
if (!
|
|
6074
|
+
if (!Pu(t) || t.isDeleted) return;
|
|
6001
6075
|
let n = e.getConversationId(), r = y.value.find((e) => e.id === n) ?? Et(e, n);
|
|
6002
6076
|
if (!r) {
|
|
6003
6077
|
xt();
|
|
@@ -6010,13 +6084,13 @@ function ql({ environment: e }) {
|
|
|
6010
6084
|
unreadCount: n === T.value ? 0 : r.unreadCount + 1,
|
|
6011
6085
|
lastMessage: t
|
|
6012
6086
|
};
|
|
6013
|
-
y.value =
|
|
6087
|
+
y.value = Tu(y.value.map((e) => e.id === n ? i : e)), q?.setConversations(y.value);
|
|
6014
6088
|
}
|
|
6015
6089
|
function Mn(e) {
|
|
6016
|
-
b.value =
|
|
6090
|
+
b.value = Du(b.value, e), T.value && q?.setMessages(T.value, b.value);
|
|
6017
6091
|
}
|
|
6018
6092
|
function Nn(e) {
|
|
6019
|
-
e.parentMessageId === E.value?.id && (x.value =
|
|
6093
|
+
e.parentMessageId === E.value?.id && (x.value = Du(x.value, e), e.parentMessageId && q?.setThreadMessages(e.parentMessageId, x.value));
|
|
6020
6094
|
}
|
|
6021
6095
|
async function Pn(e) {
|
|
6022
6096
|
if (m.value) return;
|
|
@@ -6037,19 +6111,19 @@ function ql({ environment: e }) {
|
|
|
6037
6111
|
}
|
|
6038
6112
|
}
|
|
6039
6113
|
async function In(e) {
|
|
6040
|
-
return m.value ? [] :
|
|
6114
|
+
return m.value ? [] : lu(await Y(K.getMessageReceipts(String(e.id)), Rt));
|
|
6041
6115
|
}
|
|
6042
6116
|
async function Ln(e) {
|
|
6043
6117
|
if (m.value) return [];
|
|
6044
6118
|
try {
|
|
6045
|
-
return
|
|
6119
|
+
return du(await Rn(e.id));
|
|
6046
6120
|
} catch (e) {
|
|
6047
6121
|
return console.error("Unable to fetch message reactions.", e), [];
|
|
6048
6122
|
}
|
|
6049
6123
|
}
|
|
6050
6124
|
async function Rn(e) {
|
|
6051
|
-
let t = new K.ReactionsRequestBuilder().setMessageId(Number(e)).setLimit(20).build(), n = [], r = await Y(t.fetchNext(),
|
|
6052
|
-
for (; r.length > 0 && (n.push(...r), !(r.length < 20));) r = await Y(t.fetchNext(),
|
|
6125
|
+
let t = new K.ReactionsRequestBuilder().setMessageId(Number(e)).setLimit(20).build(), n = [], r = await Y(t.fetchNext(), hu);
|
|
6126
|
+
for (; r.length > 0 && (n.push(...r), !(r.length < 20));) r = await Y(t.fetchNext(), hu);
|
|
6053
6127
|
return n;
|
|
6054
6128
|
}
|
|
6055
6129
|
function zn() {
|
|
@@ -6067,7 +6141,7 @@ function ql({ environment: e }) {
|
|
|
6067
6141
|
let o = Qt(t === "read" ? e.getReadAt?.() : e.getDeliveredAt?.()) ?? Qt(Number(e.getTimestamp?.())) ?? /* @__PURE__ */ new Date(), s = !1, c = b.value.map((e) => {
|
|
6068
6142
|
let r = Number(e.id);
|
|
6069
6143
|
if (!e.isOwn || e.deliveryState !== "sent" || e.conversationId !== a.id || !Number.isFinite(r) || r > n) return e;
|
|
6070
|
-
let i =
|
|
6144
|
+
let i = Ou(e.receipts, {
|
|
6071
6145
|
deliveredAt: o,
|
|
6072
6146
|
readAt: t === "read" ? o : void 0
|
|
6073
6147
|
});
|
|
@@ -6101,10 +6175,10 @@ function ql({ environment: e }) {
|
|
|
6101
6175
|
try {
|
|
6102
6176
|
do {
|
|
6103
6177
|
n.again = !1;
|
|
6104
|
-
let t =
|
|
6178
|
+
let t = du(await Rn(e)), r = Hn(e);
|
|
6105
6179
|
if (!r) break;
|
|
6106
|
-
let i =
|
|
6107
|
-
|
|
6180
|
+
let i = Au(r.reactions, t, v.value?.uid);
|
|
6181
|
+
ju(r.reactions, i) || (Kn({
|
|
6108
6182
|
...r,
|
|
6109
6183
|
reactions: i
|
|
6110
6184
|
}), Xn());
|
|
@@ -6123,7 +6197,7 @@ function ql({ environment: e }) {
|
|
|
6123
6197
|
}), ge;
|
|
6124
6198
|
he = Y((async () => {
|
|
6125
6199
|
U.value && await hn(), t && E.value && await vn(E.value.id);
|
|
6126
|
-
})(),
|
|
6200
|
+
})(), Su);
|
|
6127
6201
|
try {
|
|
6128
6202
|
await he;
|
|
6129
6203
|
} finally {
|
|
@@ -6135,10 +6209,10 @@ function ql({ environment: e }) {
|
|
|
6135
6209
|
}
|
|
6136
6210
|
function Kn(e) {
|
|
6137
6211
|
if (e.parentMessageId) {
|
|
6138
|
-
E.value?.id === e.parentMessageId && (x.value =
|
|
6212
|
+
E.value?.id === e.parentMessageId && (x.value = Du(x.value, e));
|
|
6139
6213
|
return;
|
|
6140
6214
|
}
|
|
6141
|
-
b.value =
|
|
6215
|
+
b.value = Du(b.value, e), E.value?.id === e.id && (E.value = e);
|
|
6142
6216
|
}
|
|
6143
6217
|
function qn(e, t) {
|
|
6144
6218
|
return t ? x.value.find((t) => t.id === e) ?? null : E.value?.id === e ? E.value : b.value.find((t) => t.id === e) ?? null;
|
|
@@ -6171,7 +6245,7 @@ function ql({ environment: e }) {
|
|
|
6171
6245
|
...n,
|
|
6172
6246
|
replyCount: typeof t == "number" ? t : Math.max(n.replyCount + 1, 1)
|
|
6173
6247
|
};
|
|
6174
|
-
b.value =
|
|
6248
|
+
b.value = Du(b.value, r), E.value?.id === e && (E.value = r);
|
|
6175
6249
|
}
|
|
6176
6250
|
function Xn() {
|
|
6177
6251
|
T.value && q?.setMessages(T.value, b.value), E.value && q?.setThreadMessages(E.value.id, x.value);
|
|
@@ -6198,9 +6272,9 @@ function ql({ environment: e }) {
|
|
|
6198
6272
|
break;
|
|
6199
6273
|
}
|
|
6200
6274
|
}
|
|
6201
|
-
y.value =
|
|
6275
|
+
y.value = Tu(y.value.map((e) => e.id === t ? o ? {
|
|
6202
6276
|
...e,
|
|
6203
|
-
subtitle:
|
|
6277
|
+
subtitle: Lu(o),
|
|
6204
6278
|
lastMessageAt: o.sentAt,
|
|
6205
6279
|
lastMessage: o
|
|
6206
6280
|
} : a ? {
|
|
@@ -6211,17 +6285,17 @@ function ql({ environment: e }) {
|
|
|
6211
6285
|
}
|
|
6212
6286
|
function $n(e, t) {
|
|
6213
6287
|
let n = b.value.length > 0 ? b.value[b.value.length - 1] : null, r = t ?? n;
|
|
6214
|
-
y.value =
|
|
6288
|
+
y.value = Tu(y.value.map((t) => t.id === e ? {
|
|
6215
6289
|
...t,
|
|
6216
|
-
subtitle: r ?
|
|
6290
|
+
subtitle: r ? Lu(r) : "No messages yet",
|
|
6217
6291
|
lastMessageAt: r?.sentAt,
|
|
6218
6292
|
lastMessage: r
|
|
6219
6293
|
} : t)), q?.setConversations(y.value);
|
|
6220
6294
|
}
|
|
6221
6295
|
function er(e) {
|
|
6222
|
-
y.value =
|
|
6296
|
+
y.value = Tu(y.value.map((t) => t.id === e.conversationId ? {
|
|
6223
6297
|
...t,
|
|
6224
|
-
subtitle:
|
|
6298
|
+
subtitle: Lu(e),
|
|
6225
6299
|
lastMessageAt: e.sentAt,
|
|
6226
6300
|
lastMessage: e,
|
|
6227
6301
|
unreadCount: 0
|
|
@@ -6234,7 +6308,7 @@ function ql({ environment: e }) {
|
|
|
6234
6308
|
muid: e.muid,
|
|
6235
6309
|
conversationId: e.conversation.id,
|
|
6236
6310
|
senderId: v.value?.uid ?? "me",
|
|
6237
|
-
senderName:
|
|
6311
|
+
senderName: Ju(v.value, e.metadata),
|
|
6238
6312
|
senderAvatar: v.value?.avatar,
|
|
6239
6313
|
text: e.text,
|
|
6240
6314
|
kind: e.kind,
|
|
@@ -6347,14 +6421,14 @@ function ql({ environment: e }) {
|
|
|
6347
6421
|
});
|
|
6348
6422
|
}
|
|
6349
6423
|
async function lr(e, t, n, r, i) {
|
|
6350
|
-
let a =
|
|
6424
|
+
let a = Wu(t.file), o = tr({
|
|
6351
6425
|
conversation: e,
|
|
6352
6426
|
kind: a,
|
|
6353
6427
|
text: t.caption?.trim() ?? "",
|
|
6354
6428
|
attachments: [{
|
|
6355
6429
|
kind: a,
|
|
6356
6430
|
name: t.file.name,
|
|
6357
|
-
mimeType:
|
|
6431
|
+
mimeType: $u(t.file) || void 0,
|
|
6358
6432
|
size: t.file.size
|
|
6359
6433
|
}],
|
|
6360
6434
|
metadata: n,
|
|
@@ -6371,7 +6445,7 @@ function ql({ environment: e }) {
|
|
|
6371
6445
|
attachment: {
|
|
6372
6446
|
kind: a,
|
|
6373
6447
|
name: t.file.name,
|
|
6374
|
-
type:
|
|
6448
|
+
type: $u(t.file),
|
|
6375
6449
|
size: t.file.size,
|
|
6376
6450
|
caption: t.caption?.trim() || void 0
|
|
6377
6451
|
},
|
|
@@ -6394,11 +6468,11 @@ function ql({ environment: e }) {
|
|
|
6394
6468
|
A.value = [...A.value, t], dr(e);
|
|
6395
6469
|
}
|
|
6396
6470
|
function dr(e) {
|
|
6397
|
-
e.parentMessageId ? (E.value?.id === e.parentMessageId && (x.value =
|
|
6471
|
+
e.parentMessageId ? (E.value?.id === e.parentMessageId && (x.value = Du(x.value, e)), Yn(e.parentMessageId)) : b.value = Du(b.value, e), er(e), Xn();
|
|
6398
6472
|
}
|
|
6399
6473
|
function X(e, t) {
|
|
6400
6474
|
let n = (n) => n.map((n) => {
|
|
6401
|
-
let r =
|
|
6475
|
+
let r = Fu(n);
|
|
6402
6476
|
return n.muid !== t && r !== t ? n : {
|
|
6403
6477
|
...n,
|
|
6404
6478
|
deliveryState: e
|
|
@@ -6410,7 +6484,7 @@ function ql({ environment: e }) {
|
|
|
6410
6484
|
if (!e) return;
|
|
6411
6485
|
let t = [...b.value, ...x.value].filter((t) => {
|
|
6412
6486
|
if (!t.id.startsWith("local-")) return !1;
|
|
6413
|
-
let n =
|
|
6487
|
+
let n = Fu(t);
|
|
6414
6488
|
return t.muid === e || n === e;
|
|
6415
6489
|
});
|
|
6416
6490
|
for (let e of t) Zn(e);
|
|
@@ -6460,7 +6534,7 @@ function ql({ environment: e }) {
|
|
|
6460
6534
|
}
|
|
6461
6535
|
async function hr(t, n, r = "video", i = "user", a) {
|
|
6462
6536
|
let o = new K.Call(t, r === "video" ? K.CALL_TYPE.VIDEO : K.CALL_TYPE.AUDIO, i === "group" ? K.RECEIVER_TYPE.GROUP : K.RECEIVER_TYPE.USER);
|
|
6463
|
-
|
|
6537
|
+
iu(e);
|
|
6464
6538
|
try {
|
|
6465
6539
|
let e = await K.initiateCall(o);
|
|
6466
6540
|
return P.value = e, F.value = e.getSessionId(), ee.value = r, I.value = "outgoing", R = i === "user", await Sr(e.getSessionId(), n, r, a), e;
|
|
@@ -6469,10 +6543,10 @@ function ql({ environment: e }) {
|
|
|
6469
6543
|
}
|
|
6470
6544
|
}
|
|
6471
6545
|
async function gr(t, n, r = "video", i) {
|
|
6472
|
-
ee.value = r, I.value = "connecting", R = !1,
|
|
6546
|
+
ee.value = r, I.value = "connecting", R = !1, iu(e);
|
|
6473
6547
|
let a = () => I.value !== "connecting" || F.value !== null, o;
|
|
6474
6548
|
try {
|
|
6475
|
-
o = await Y(
|
|
6549
|
+
o = await Y(au(t), Rt);
|
|
6476
6550
|
} catch (e) {
|
|
6477
6551
|
if (a()) return;
|
|
6478
6552
|
throw console.error("Failed to get call session:", e), Cr("failed"), e;
|
|
@@ -6507,7 +6581,7 @@ function ql({ environment: e }) {
|
|
|
6507
6581
|
}
|
|
6508
6582
|
let e = F.value;
|
|
6509
6583
|
try {
|
|
6510
|
-
if (
|
|
6584
|
+
if (eu?.leaveSession(), e) try {
|
|
6511
6585
|
await K.endCall(e);
|
|
6512
6586
|
} catch (e) {
|
|
6513
6587
|
console.error("Failed to end call:", e);
|
|
@@ -6517,7 +6591,7 @@ function ql({ environment: e }) {
|
|
|
6517
6591
|
}
|
|
6518
6592
|
}
|
|
6519
6593
|
function br() {
|
|
6520
|
-
I.value !== "idle" && (
|
|
6594
|
+
I.value !== "idle" && (eu?.leaveSession(), Cr("left"));
|
|
6521
6595
|
}
|
|
6522
6596
|
async function xr(e, t) {
|
|
6523
6597
|
let n = F.value;
|
|
@@ -6642,34 +6716,34 @@ function ql({ environment: e }) {
|
|
|
6642
6716
|
lastCallEndReason: L
|
|
6643
6717
|
};
|
|
6644
6718
|
}
|
|
6645
|
-
async function
|
|
6646
|
-
return it(e),
|
|
6719
|
+
async function nu(e) {
|
|
6720
|
+
return it(e), Xl === e && Zl || (Zl = (async () => {
|
|
6647
6721
|
let t = at(), n = new K.AppSettingsBuilder().subscribePresenceForAllUsers().setRegion(t.region).autoEstablishSocketConnection(!0).setStorageMode(K.StorageMode.SESSION).build();
|
|
6648
|
-
await K.init(t.appId, n),
|
|
6649
|
-
})()),
|
|
6722
|
+
await K.init(t.appId, n), Xl = e;
|
|
6723
|
+
})()), Zl;
|
|
6650
6724
|
}
|
|
6651
|
-
function
|
|
6725
|
+
function ru() {
|
|
6652
6726
|
try {
|
|
6653
6727
|
return localStorage.getItem(`${at().appId}:common_store/user`) !== null;
|
|
6654
6728
|
} catch {
|
|
6655
6729
|
return !0;
|
|
6656
6730
|
}
|
|
6657
6731
|
}
|
|
6658
|
-
function
|
|
6659
|
-
if (
|
|
6732
|
+
function iu(e) {
|
|
6733
|
+
if (Ql === e && $l) return $l;
|
|
6660
6734
|
let t = (async () => {
|
|
6661
6735
|
let { CometChatCalls: e } = await import("@cometchat/calls-sdk-javascript"), t = at(), n = await e.init({
|
|
6662
6736
|
appId: t.appId,
|
|
6663
6737
|
region: t.region
|
|
6664
6738
|
});
|
|
6665
6739
|
if (!n.success) throw Error(n.error?.message ?? "Unable to initialize the calls SDK.");
|
|
6666
|
-
return
|
|
6740
|
+
return eu = e, e;
|
|
6667
6741
|
})();
|
|
6668
|
-
return
|
|
6669
|
-
|
|
6742
|
+
return Ql = e, $l = t, t.catch(() => {
|
|
6743
|
+
$l === t && ($l = null);
|
|
6670
6744
|
}), t;
|
|
6671
6745
|
}
|
|
6672
|
-
async function
|
|
6746
|
+
async function au(e) {
|
|
6673
6747
|
let t = ut();
|
|
6674
6748
|
if (!t) throw Error("Not logged in.");
|
|
6675
6749
|
let n = await fetch(`${at().chatApiBaseUrl}/chats/${e}/call`, {
|
|
@@ -6679,7 +6753,7 @@ async function Zl(e) {
|
|
|
6679
6753
|
if (!n.ok) throw Error(`Call session request failed with status ${n.status}.`);
|
|
6680
6754
|
return (await n.json()).sessionId;
|
|
6681
6755
|
}
|
|
6682
|
-
async function
|
|
6756
|
+
async function ou(e) {
|
|
6683
6757
|
let t = JSON.parse(atob(e.split(".")[1]));
|
|
6684
6758
|
if (!t.sub) throw Error("Cannot read JWT subject from access token.");
|
|
6685
6759
|
let n = ft();
|
|
@@ -6696,7 +6770,7 @@ async function Ql(e) {
|
|
|
6696
6770
|
token: i.token
|
|
6697
6771
|
}), i.token;
|
|
6698
6772
|
}
|
|
6699
|
-
function
|
|
6773
|
+
function su(e, t) {
|
|
6700
6774
|
let n = e.getConversationWith(), r = e.getConversationType() === K.RECEIVER_TYPE.GROUP ? "group" : "user", i = r === "user" ? n : null, a = r === "group" ? n : null, o = r === "group" ? a.getGuid() : i.getUid(), s = e.getLastMessage(), c = t ? `group_${t}` : null;
|
|
6701
6775
|
if (c && e.getConversationId() === c) return {
|
|
6702
6776
|
id: e.getConversationId(),
|
|
@@ -6709,13 +6783,13 @@ function $l(e, t) {
|
|
|
6709
6783
|
tags: [],
|
|
6710
6784
|
source: e
|
|
6711
6785
|
};
|
|
6712
|
-
let l = s ?
|
|
6786
|
+
let l = s ? cu(s, t) : null, u = e.getUnreadMessageCount();
|
|
6713
6787
|
return {
|
|
6714
6788
|
id: e.getConversationId(),
|
|
6715
6789
|
targetId: o,
|
|
6716
6790
|
type: r,
|
|
6717
6791
|
title: n.getName() ?? o,
|
|
6718
|
-
subtitle: l &&
|
|
6792
|
+
subtitle: l && Pu(l) && !l.isDeleted ? Lu(l) : "No messages yet",
|
|
6719
6793
|
avatar: i ? gt(i.getAvatar()) : void 0,
|
|
6720
6794
|
unreadCount: Number.isFinite(u) ? u : 0,
|
|
6721
6795
|
hasJoined: a?.getHasJoined() ?? !0,
|
|
@@ -6725,16 +6799,16 @@ function $l(e, t) {
|
|
|
6725
6799
|
source: e
|
|
6726
6800
|
};
|
|
6727
6801
|
}
|
|
6728
|
-
function
|
|
6729
|
-
let n = e.getSender?.(), r = n?.getUid?.() ?? "system", i = !!e.getDeletedAt?.(), a =
|
|
6802
|
+
function cu(e, t) {
|
|
6803
|
+
let n = e.getSender?.(), r = n?.getUid?.() ?? "system", i = !!e.getDeletedAt?.(), a = rd(e), o = md(e), s = i ? [] : od(e, a), c = i ? void 0 : dd(e), l = xd(e), u = e.getQuotedMessage?.() ?? e.getReplyMessage?.() ?? e.getParentMessage?.();
|
|
6730
6804
|
return {
|
|
6731
6805
|
id: String(e.getId?.() ?? `${e.getMuid?.() ?? crypto.randomUUID()}`),
|
|
6732
6806
|
muid: e.getMuid?.() ? String(e.getMuid()) : void 0,
|
|
6733
6807
|
conversationId: e.getConversationId(),
|
|
6734
6808
|
senderId: r,
|
|
6735
|
-
senderName:
|
|
6736
|
-
senderAvatar:
|
|
6737
|
-
text:
|
|
6809
|
+
senderName: Yu(n, l),
|
|
6810
|
+
senderAvatar: Xu(e, n),
|
|
6811
|
+
text: wu(e, t),
|
|
6738
6812
|
kind: a,
|
|
6739
6813
|
sentAt: Qt(e.getSentAt?.()) ?? /* @__PURE__ */ new Date(0),
|
|
6740
6814
|
category: e.getCategory?.() ?? "message",
|
|
@@ -6746,12 +6820,12 @@ function eu(e, t) {
|
|
|
6746
6820
|
poll: c,
|
|
6747
6821
|
scheduled: o,
|
|
6748
6822
|
translatedText: i ? void 0 : typeof l?.translated_message == "string" ? l.translated_message : void 0,
|
|
6749
|
-
replyTo:
|
|
6750
|
-
forwardedFrom:
|
|
6751
|
-
parentMessageId:
|
|
6752
|
-
replyCount:
|
|
6753
|
-
reactions:
|
|
6754
|
-
receipts:
|
|
6823
|
+
replyTo: gd(l ?? {}, u),
|
|
6824
|
+
forwardedFrom: _d(l ?? {}),
|
|
6825
|
+
parentMessageId: hd(e),
|
|
6826
|
+
replyCount: vd(e),
|
|
6827
|
+
reactions: bd(e),
|
|
6828
|
+
receipts: mu(e),
|
|
6755
6829
|
deliveryState: "sent",
|
|
6756
6830
|
pinnedAt: Qt(e.getPinnedAt?.()),
|
|
6757
6831
|
pinnedBy: e.getPinnedBy?.() ?? void 0,
|
|
@@ -6759,34 +6833,34 @@ function eu(e, t) {
|
|
|
6759
6833
|
source: e
|
|
6760
6834
|
};
|
|
6761
6835
|
}
|
|
6762
|
-
function
|
|
6763
|
-
return Array.isArray(e) ? e.map((e) =>
|
|
6836
|
+
function lu(e) {
|
|
6837
|
+
return Array.isArray(e) ? e.map((e) => uu(e)).filter((e) => !!e).sort((e, t) => {
|
|
6764
6838
|
let n = e.timestamp?.getTime() ?? 0;
|
|
6765
6839
|
return (t.timestamp?.getTime() ?? 0) - n;
|
|
6766
6840
|
}) : [];
|
|
6767
6841
|
}
|
|
6768
|
-
function
|
|
6842
|
+
function uu(e) {
|
|
6769
6843
|
let t = e?.getSender?.();
|
|
6770
6844
|
if (!t?.getUid?.()) return null;
|
|
6771
6845
|
let n = Qt(e.getReadAt?.()), r = Qt(e.getDeliveredAt?.()), i = n ? "read" : r ? "delivered" : null;
|
|
6772
6846
|
return i ? {
|
|
6773
6847
|
kind: i,
|
|
6774
|
-
user:
|
|
6848
|
+
user: pu(t),
|
|
6775
6849
|
timestamp: n ?? r
|
|
6776
6850
|
} : null;
|
|
6777
6851
|
}
|
|
6778
|
-
function
|
|
6779
|
-
return e.map((e) =>
|
|
6852
|
+
function du(e) {
|
|
6853
|
+
return e.map((e) => fu(e)).filter((e) => !!e).sort((e, t) => (t.reactedAt?.getTime() ?? 0) - (e.reactedAt?.getTime() ?? 0));
|
|
6780
6854
|
}
|
|
6781
|
-
function
|
|
6855
|
+
function fu(e) {
|
|
6782
6856
|
let t = e.getReactedBy?.();
|
|
6783
6857
|
return t?.getUid?.() ? {
|
|
6784
6858
|
emoji: e.getReaction(),
|
|
6785
|
-
user:
|
|
6859
|
+
user: pu(t),
|
|
6786
6860
|
reactedAt: Qt(e.getReactedAt?.())
|
|
6787
6861
|
} : null;
|
|
6788
6862
|
}
|
|
6789
|
-
function
|
|
6863
|
+
function pu(e) {
|
|
6790
6864
|
return {
|
|
6791
6865
|
uid: e.getUid(),
|
|
6792
6866
|
name: e.getName?.() ?? e.getUid(),
|
|
@@ -6795,7 +6869,7 @@ function au(e) {
|
|
|
6795
6869
|
lastSeen: Qt(e.getLastActiveAt?.())
|
|
6796
6870
|
};
|
|
6797
6871
|
}
|
|
6798
|
-
function
|
|
6872
|
+
function mu(e) {
|
|
6799
6873
|
return {
|
|
6800
6874
|
deliveredAt: Qt(e.getDeliveredAt?.()),
|
|
6801
6875
|
deliveredToMeAt: Qt(e.getDeliveredToMeAt?.()),
|
|
@@ -6803,54 +6877,54 @@ function ou(e) {
|
|
|
6803
6877
|
readByMeAt: Qt(e.getReadByMeAt?.())
|
|
6804
6878
|
};
|
|
6805
6879
|
}
|
|
6806
|
-
var
|
|
6807
|
-
function
|
|
6880
|
+
var hu = 8e3, gu = 6, _u = 3e4, vu = 5e3, yu = 6e4, bu = 9e5, xu = 36e5, Su = 6e4;
|
|
6881
|
+
function Cu(e, t) {
|
|
6808
6882
|
if (e.getDeletedAt?.()) return "Message removed";
|
|
6809
|
-
let n = e.getType?.(), r = e.getCategory?.(), i =
|
|
6810
|
-
if (String(r).toLowerCase() === "action" || String(r).toLowerCase() === "call") return
|
|
6883
|
+
let n = e.getType?.(), r = e.getCategory?.(), i = dd(e);
|
|
6884
|
+
if (String(r).toLowerCase() === "action" || String(r).toLowerCase() === "call") return ed(e);
|
|
6811
6885
|
if (i) return `Poll: ${i.question}`;
|
|
6812
6886
|
if (n === K.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
|
|
6813
6887
|
let t = qc(e.getText());
|
|
6814
6888
|
if (t) return t;
|
|
6815
6889
|
}
|
|
6816
|
-
if (String(r).toLowerCase() === "message" &&
|
|
6817
|
-
let t =
|
|
6890
|
+
if (String(r).toLowerCase() === "message" && id(n)) {
|
|
6891
|
+
let t = od(e, rd(e))[0];
|
|
6818
6892
|
return e.getCaption?.()?.trim?.() || Uc(t ? [t] : [], "Sent an attachment");
|
|
6819
6893
|
}
|
|
6820
6894
|
return e.getSender?.()?.getUid?.() === t ? Ot("youSentAMessage") : Ot("unsupportedMessageType");
|
|
6821
6895
|
}
|
|
6822
|
-
function
|
|
6896
|
+
function wu(e, t) {
|
|
6823
6897
|
if (e.getDeletedAt?.()) return "Message removed";
|
|
6824
|
-
let n = e.getType?.(), r = e.getCategory?.(), i =
|
|
6825
|
-
if (String(r).toLowerCase() === "action" || String(r).toLowerCase() === "call") return
|
|
6898
|
+
let n = e.getType?.(), r = e.getCategory?.(), i = dd(e);
|
|
6899
|
+
if (String(r).toLowerCase() === "action" || String(r).toLowerCase() === "call") return ed(e);
|
|
6826
6900
|
if (i) return `Poll: ${i.question}`;
|
|
6827
6901
|
if (n === K.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
|
|
6828
6902
|
let t = Wc(e.getText?.());
|
|
6829
6903
|
if (Kc(t)) return t;
|
|
6830
6904
|
}
|
|
6831
|
-
if (String(r).toLowerCase() === "message" &&
|
|
6905
|
+
if (String(r).toLowerCase() === "message" && id(n)) {
|
|
6832
6906
|
let t = Wc(e.getCaption?.());
|
|
6833
6907
|
if (Kc(t)) return t;
|
|
6834
|
-
let n =
|
|
6908
|
+
let n = od(e, rd(e))[0];
|
|
6835
6909
|
return Uc(n ? [n] : [], "Sent an attachment");
|
|
6836
6910
|
}
|
|
6837
6911
|
return e.getSender?.()?.getUid?.() === t ? Ot("youSentAMessage") : Ot("unsupportedMessageType");
|
|
6838
6912
|
}
|
|
6839
|
-
function
|
|
6913
|
+
function Tu(e) {
|
|
6840
6914
|
return [...e].filter((e) => e.title !== Ot("scheduledMessages")).sort((e, t) => {
|
|
6841
6915
|
let n = e.lastMessageAt?.getTime() ?? 0;
|
|
6842
6916
|
return (t.lastMessageAt?.getTime() ?? 0) - n;
|
|
6843
6917
|
});
|
|
6844
6918
|
}
|
|
6845
|
-
function
|
|
6919
|
+
function Eu(e, t) {
|
|
6846
6920
|
return e.sentAt.getTime() - t.sentAt.getTime();
|
|
6847
6921
|
}
|
|
6848
|
-
function
|
|
6849
|
-
if (!
|
|
6850
|
-
let n =
|
|
6851
|
-
return r >= 0 ? i[r] = t : i.push(t), i.sort(
|
|
6922
|
+
function Du(e, t) {
|
|
6923
|
+
if (!Pu(t)) return e.filter(Pu).sort(Eu);
|
|
6924
|
+
let n = Fu(t), r = e.findIndex((e) => e.id === t.id || !!(e.muid && t.muid && e.muid === t.muid) || !!(n && Fu(e) === n)), i = [...e];
|
|
6925
|
+
return r >= 0 ? i[r] = t : i.push(t), i.sort(Eu);
|
|
6852
6926
|
}
|
|
6853
|
-
function
|
|
6927
|
+
function Ou(e, t) {
|
|
6854
6928
|
let n = null;
|
|
6855
6929
|
for (let r of [
|
|
6856
6930
|
"deliveredAt",
|
|
@@ -6863,19 +6937,19 @@ function bu(e, t) {
|
|
|
6863
6937
|
}
|
|
6864
6938
|
return n ?? e;
|
|
6865
6939
|
}
|
|
6866
|
-
function
|
|
6940
|
+
function ku(e, t) {
|
|
6867
6941
|
let n = new Map(t.map((e) => [e.id, e]));
|
|
6868
6942
|
return e.map((e) => {
|
|
6869
6943
|
let t = n.get(e.id);
|
|
6870
6944
|
if (!t) return e;
|
|
6871
|
-
let r =
|
|
6945
|
+
let r = Ou(e.receipts, t.receipts);
|
|
6872
6946
|
return r === e.receipts ? e : {
|
|
6873
6947
|
...e,
|
|
6874
6948
|
receipts: r
|
|
6875
6949
|
};
|
|
6876
6950
|
});
|
|
6877
6951
|
}
|
|
6878
|
-
function
|
|
6952
|
+
function Au(e, t, n) {
|
|
6879
6953
|
let r = /* @__PURE__ */ new Map();
|
|
6880
6954
|
for (let t of e) r.set(t.emoji, {
|
|
6881
6955
|
emoji: t.emoji,
|
|
@@ -6892,29 +6966,29 @@ function Su(e, t, n) {
|
|
|
6892
6966
|
}
|
|
6893
6967
|
return [...r.values()].filter((e) => e.count > 0);
|
|
6894
6968
|
}
|
|
6895
|
-
function
|
|
6969
|
+
function ju(e, t) {
|
|
6896
6970
|
return e.length === t.length && e.every((e, n) => e.emoji === t[n]?.emoji && e.count === t[n]?.count && e.reactedByMe === t[n]?.reactedByMe);
|
|
6897
6971
|
}
|
|
6898
|
-
function
|
|
6899
|
-
return t.reduce((e, t) =>
|
|
6972
|
+
function Mu(e, t) {
|
|
6973
|
+
return t.reduce((e, t) => Du(e, t), e.filter(Pu));
|
|
6900
6974
|
}
|
|
6901
|
-
function
|
|
6975
|
+
function Nu(e) {
|
|
6902
6976
|
return e.id.startsWith("local-") || e.deliveryState !== "sent";
|
|
6903
6977
|
}
|
|
6904
|
-
function
|
|
6978
|
+
function Pu(e) {
|
|
6905
6979
|
return e.kind !== "unsupported" && (e.kind !== "action" || Kc(e.text));
|
|
6906
6980
|
}
|
|
6907
|
-
function
|
|
6981
|
+
function Fu(e) {
|
|
6908
6982
|
let t = e.metadata?.clientMuid;
|
|
6909
6983
|
return typeof t == "string" && t.trim() ? t.trim() : e.muid;
|
|
6910
6984
|
}
|
|
6911
|
-
function
|
|
6985
|
+
function Iu(e, t) {
|
|
6912
6986
|
return {
|
|
6913
6987
|
...e,
|
|
6914
6988
|
clientMuid: t
|
|
6915
6989
|
};
|
|
6916
6990
|
}
|
|
6917
|
-
function
|
|
6991
|
+
function Lu(e) {
|
|
6918
6992
|
return tl(e);
|
|
6919
6993
|
}
|
|
6920
6994
|
function Q(e, t) {
|
|
@@ -6923,28 +6997,28 @@ function Q(e, t) {
|
|
|
6923
6997
|
fallbackMessage: t
|
|
6924
6998
|
}), e instanceof Error && e.message ? e.message : t;
|
|
6925
6999
|
}
|
|
6926
|
-
function
|
|
7000
|
+
function Ru(e) {
|
|
6927
7001
|
if (!e || typeof e != "object") return !1;
|
|
6928
7002
|
let t = e;
|
|
6929
7003
|
return t.code === "ERR_GUID_NOT_FOUND" || t.status === 404 || t.statusCode === 404;
|
|
6930
7004
|
}
|
|
6931
|
-
function
|
|
7005
|
+
function zu(e) {
|
|
6932
7006
|
if (!e || typeof e != "object") return !1;
|
|
6933
7007
|
let t = e;
|
|
6934
7008
|
return t.code === "CONVERSATION_NOT_FOUND" || t.code === "ERR_CONVERSATION_NOT_FOUND" || t.code === "ERR_CONVERSATION_NOT_ACCESSIBLE" || t.status === 404 || t.statusCode === 404;
|
|
6935
7009
|
}
|
|
6936
|
-
function
|
|
7010
|
+
function Bu(e) {
|
|
6937
7011
|
return e.type === "group" ? K.RECEIVER_TYPE.GROUP : K.RECEIVER_TYPE.USER;
|
|
6938
7012
|
}
|
|
6939
|
-
function
|
|
7013
|
+
function Vu() {
|
|
6940
7014
|
let e = ut();
|
|
6941
7015
|
if (!e) throw Error("Missing access token.");
|
|
6942
7016
|
return e;
|
|
6943
7017
|
}
|
|
6944
|
-
async function
|
|
7018
|
+
async function Hu(e, t, n) {
|
|
6945
7019
|
let r = t.text?.trim();
|
|
6946
7020
|
if (!r) return;
|
|
6947
|
-
let i =
|
|
7021
|
+
let i = Vu(), a = await fetch(`${at().chatApiBaseUrl}/chats/scheduledMessages`, {
|
|
6948
7022
|
method: "POST",
|
|
6949
7023
|
headers: {
|
|
6950
7024
|
"Content-Type": "application/json",
|
|
@@ -6962,11 +7036,11 @@ async function Pu(e, t, n) {
|
|
|
6962
7036
|
});
|
|
6963
7037
|
if (!a.ok) throw Error(`Scheduling failed with status ${a.status}.`);
|
|
6964
7038
|
}
|
|
6965
|
-
async function
|
|
7039
|
+
async function Uu(e, t, n) {
|
|
6966
7040
|
if (!t.file) return;
|
|
6967
|
-
let r =
|
|
7041
|
+
let r = Vu(), i = ft()?.token;
|
|
6968
7042
|
if (!i) throw Error("Missing CometChat auth token.");
|
|
6969
|
-
let a =
|
|
7043
|
+
let a = Gu(t.file), o = t.caption?.trim() ?? "", s = Ku(e, t.file, a, o, t.scheduleDate, n), c = await fetch(`${at().chatApiBaseUrl}/chats/scheduledMediaMessages`, {
|
|
6970
7044
|
method: "POST",
|
|
6971
7045
|
headers: {
|
|
6972
7046
|
Accept: "multipart/form-data",
|
|
@@ -6977,24 +7051,24 @@ async function Fu(e, t, n) {
|
|
|
6977
7051
|
});
|
|
6978
7052
|
if (!c.ok) throw Error(`Scheduling failed with status ${c.status}.`);
|
|
6979
7053
|
}
|
|
6980
|
-
function
|
|
6981
|
-
let t =
|
|
7054
|
+
function Wu(e) {
|
|
7055
|
+
let t = $u(e);
|
|
6982
7056
|
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
|
|
6983
7057
|
}
|
|
6984
|
-
function
|
|
6985
|
-
let t =
|
|
7058
|
+
function Gu(e) {
|
|
7059
|
+
let t = Wu(e);
|
|
6986
7060
|
if (t === "file") throw Error("Scheduled attachments currently support images, video, and audio only.");
|
|
6987
7061
|
return t;
|
|
6988
7062
|
}
|
|
6989
|
-
function
|
|
6990
|
-
let o = new K.MediaMessage(e.targetId, t, n,
|
|
7063
|
+
function Ku(e, t, n, r, i, a) {
|
|
7064
|
+
let o = new K.MediaMessage(e.targetId, t, n, Bu(e));
|
|
6991
7065
|
return o.setSentAt(Math.floor(Date.now() / 1e3)), o.setMuid(globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${t.name}`), r && o.setCaption(r), o.setMetadata({
|
|
6992
7066
|
scheduleDate: i,
|
|
6993
7067
|
file: t,
|
|
6994
7068
|
...a?.senderDisplayName?.trim() ? { senderDisplayName: a.senderDisplayName.trim() } : {}
|
|
6995
|
-
}), o.setTags([e.targetId]),
|
|
7069
|
+
}), o.setTags([e.targetId]), qu(o);
|
|
6996
7070
|
}
|
|
6997
|
-
function
|
|
7071
|
+
function qu(e) {
|
|
6998
7072
|
let t = new FormData();
|
|
6999
7073
|
return Object.keys(e).forEach((n) => {
|
|
7000
7074
|
let r = e[n];
|
|
@@ -7011,31 +7085,31 @@ function zu(e) {
|
|
|
7011
7085
|
}
|
|
7012
7086
|
}), t;
|
|
7013
7087
|
}
|
|
7014
|
-
function
|
|
7088
|
+
function Ju(e, t) {
|
|
7015
7089
|
let n = t.senderDisplayName;
|
|
7016
7090
|
return typeof n == "string" && n.trim() ? n.trim() : e?.name ?? "You";
|
|
7017
7091
|
}
|
|
7018
|
-
function
|
|
7092
|
+
function Yu(e, t) {
|
|
7019
7093
|
let n = t?.senderDisplayName;
|
|
7020
7094
|
return typeof n == "string" && n.trim() ? n.trim() : e?.getName?.() ?? "System";
|
|
7021
7095
|
}
|
|
7022
|
-
function
|
|
7023
|
-
return gt(
|
|
7096
|
+
function Xu(e, t) {
|
|
7097
|
+
return gt(Qu(t)) || (Zu(e, "sender") ?? void 0);
|
|
7024
7098
|
}
|
|
7025
|
-
function
|
|
7026
|
-
let n =
|
|
7027
|
-
return gt(
|
|
7099
|
+
function Zu(e, t) {
|
|
7100
|
+
let n = yd(e)?.entities?.[t]?.entity;
|
|
7101
|
+
return gt(Qu(n));
|
|
7028
7102
|
}
|
|
7029
|
-
function
|
|
7103
|
+
function Qu(e) {
|
|
7030
7104
|
if (!e || typeof e != "object") return e;
|
|
7031
7105
|
let t = e;
|
|
7032
7106
|
return t.getAvatar?.() || t.getIcon?.() || (t.avatar ?? t.icon ?? t.url ?? t.src ?? t.uri ?? (t.metadata && typeof t.metadata == "object" ? t.metadata.avatar : void 0));
|
|
7033
7107
|
}
|
|
7034
|
-
function
|
|
7035
|
-
return e.type.trim().toLowerCase() ||
|
|
7108
|
+
function $u(e) {
|
|
7109
|
+
return e.type.trim().toLowerCase() || nd(e.name);
|
|
7036
7110
|
}
|
|
7037
|
-
function
|
|
7038
|
-
let t = String(e.getType?.() ?? "").toLowerCase(), n = String(e.getCategory?.() ?? "").toLowerCase(), r =
|
|
7111
|
+
function ed(e) {
|
|
7112
|
+
let t = String(e.getType?.() ?? "").toLowerCase(), n = String(e.getCategory?.() ?? "").toLowerCase(), r = yd(e), i = String(r?.action ?? e.getAction?.() ?? e.getStatus?.() ?? "").toLowerCase();
|
|
7039
7113
|
if (n === "call") {
|
|
7040
7114
|
let e = t === "audio" ? "Audio call" : "Video call";
|
|
7041
7115
|
switch (i) {
|
|
@@ -7051,7 +7125,7 @@ function Ku(e) {
|
|
|
7051
7125
|
}
|
|
7052
7126
|
}
|
|
7053
7127
|
if (t === "groupmember") {
|
|
7054
|
-
let e =
|
|
7128
|
+
let e = td(r, "on");
|
|
7055
7129
|
if (!e) return "";
|
|
7056
7130
|
switch (i) {
|
|
7057
7131
|
case "added": return `${e} added to conversation`;
|
|
@@ -7068,7 +7142,7 @@ function Ku(e) {
|
|
|
7068
7142
|
}
|
|
7069
7143
|
return "";
|
|
7070
7144
|
}
|
|
7071
|
-
function
|
|
7145
|
+
function td(e, t) {
|
|
7072
7146
|
let n = e?.entities?.[t]?.entity;
|
|
7073
7147
|
if (n && typeof n == "object") {
|
|
7074
7148
|
let e = n.name ?? n.uid ?? n.guid;
|
|
@@ -7076,7 +7150,7 @@ function qu(e, t) {
|
|
|
7076
7150
|
}
|
|
7077
7151
|
return "";
|
|
7078
7152
|
}
|
|
7079
|
-
function
|
|
7153
|
+
function nd(e) {
|
|
7080
7154
|
switch (e.split(".").pop()?.toLowerCase() ?? "") {
|
|
7081
7155
|
case "png": return "image/png";
|
|
7082
7156
|
case "jpg":
|
|
@@ -7090,11 +7164,11 @@ function Ju(e) {
|
|
|
7090
7164
|
default: return "";
|
|
7091
7165
|
}
|
|
7092
7166
|
}
|
|
7093
|
-
function
|
|
7167
|
+
function rd(e) {
|
|
7094
7168
|
let t = String(e.getType?.() ?? "text").toLowerCase(), n = String(e.getCategory?.() ?? "message").toLowerCase();
|
|
7095
|
-
return
|
|
7169
|
+
return dd(e) || t === "poll" ? "poll" : n === "action" || n === "call" ? "action" : t === "image" || t === "video" || t === "audio" || t === "file" ? t : t === "text" ? "text" : id(t) ? ad(e) : "unsupported";
|
|
7096
7170
|
}
|
|
7097
|
-
function
|
|
7171
|
+
function id(e) {
|
|
7098
7172
|
return [
|
|
7099
7173
|
"media",
|
|
7100
7174
|
"image",
|
|
@@ -7103,14 +7177,14 @@ function Xu(e) {
|
|
|
7103
7177
|
"file"
|
|
7104
7178
|
].includes(String(e).toLowerCase());
|
|
7105
7179
|
}
|
|
7106
|
-
function
|
|
7180
|
+
function ad(e) {
|
|
7107
7181
|
let t = e.getAttachment?.()?.getMimeType?.() ?? e.getAttachment?.()?.getType?.() ?? e.getData?.()?.attachments?.[0]?.mimeType ?? "";
|
|
7108
7182
|
return String(t).startsWith("image/") ? "image" : String(t).startsWith("video/") ? "video" : String(t).startsWith("audio/") ? "audio" : "file";
|
|
7109
7183
|
}
|
|
7110
|
-
function
|
|
7111
|
-
let n = e.getAttachment?.(), r =
|
|
7184
|
+
function od(e, t) {
|
|
7185
|
+
let n = e.getAttachment?.(), r = yd(e), i = r?.attachments?.[0] ?? null;
|
|
7112
7186
|
if (!n && !i && !r?.url) return [];
|
|
7113
|
-
let a = t === "image" || t === "video" || t === "audio" || t === "file" ? t :
|
|
7187
|
+
let a = t === "image" || t === "video" || t === "audio" || t === "file" ? t : ad(e), o = sd(e, n, i);
|
|
7114
7188
|
return [{
|
|
7115
7189
|
kind: a,
|
|
7116
7190
|
name: n?.getName?.() ?? i?.name ?? i?.fileName ?? "Attachment",
|
|
@@ -7122,8 +7196,8 @@ function Qu(e, t) {
|
|
|
7122
7196
|
height: o?.height
|
|
7123
7197
|
}];
|
|
7124
7198
|
}
|
|
7125
|
-
function
|
|
7126
|
-
let r =
|
|
7199
|
+
function sd(e, t, n) {
|
|
7200
|
+
let r = ld({
|
|
7127
7201
|
width: t?.getWidth?.() ?? t?.getImageWidth?.() ?? t?.getVideoWidth?.() ?? t?.width,
|
|
7128
7202
|
height: t?.getHeight?.() ?? t?.getImageHeight?.() ?? t?.getVideoHeight?.() ?? t?.height
|
|
7129
7203
|
});
|
|
@@ -7137,13 +7211,13 @@ function $u(e, t, n) {
|
|
|
7137
7211
|
e.getMetadata?.()
|
|
7138
7212
|
];
|
|
7139
7213
|
for (let e of i) {
|
|
7140
|
-
let t =
|
|
7214
|
+
let t = cd(e);
|
|
7141
7215
|
if (t) return t;
|
|
7142
7216
|
}
|
|
7143
7217
|
}
|
|
7144
|
-
function
|
|
7218
|
+
function cd(e) {
|
|
7145
7219
|
if (!e || typeof e != "object") return;
|
|
7146
|
-
let t =
|
|
7220
|
+
let t = ld(e);
|
|
7147
7221
|
if (t) return t;
|
|
7148
7222
|
for (let t of [
|
|
7149
7223
|
"dimensions",
|
|
@@ -7154,27 +7228,27 @@ function ed(e) {
|
|
|
7154
7228
|
"video",
|
|
7155
7229
|
"thumbnail"
|
|
7156
7230
|
]) {
|
|
7157
|
-
let n =
|
|
7231
|
+
let n = ld(e[t]);
|
|
7158
7232
|
if (n) return n;
|
|
7159
7233
|
}
|
|
7160
7234
|
}
|
|
7161
|
-
function
|
|
7235
|
+
function ld(e) {
|
|
7162
7236
|
if (!e || typeof e != "object") return;
|
|
7163
|
-
let t =
|
|
7237
|
+
let t = ud(e.width ?? e.w ?? e.imageWidth ?? e.videoWidth ?? e.naturalWidth), n = ud(e.height ?? e.h ?? e.imageHeight ?? e.videoHeight ?? e.naturalHeight);
|
|
7164
7238
|
if (t && n) return {
|
|
7165
7239
|
width: t,
|
|
7166
7240
|
height: n
|
|
7167
7241
|
};
|
|
7168
7242
|
}
|
|
7169
|
-
function
|
|
7243
|
+
function ud(e) {
|
|
7170
7244
|
if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
7171
7245
|
if (typeof e == "string") {
|
|
7172
7246
|
let t = Number(e);
|
|
7173
7247
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
7174
7248
|
}
|
|
7175
7249
|
}
|
|
7176
|
-
function
|
|
7177
|
-
let t = String(e.getType?.() ?? "").toLowerCase(), n = e.getCustomData?.() ?? e.getData?.()?.customData, r =
|
|
7250
|
+
function dd(e) {
|
|
7251
|
+
let t = String(e.getType?.() ?? "").toLowerCase(), n = e.getCustomData?.() ?? e.getData?.()?.customData, r = pd(e);
|
|
7178
7252
|
if (t !== "poll" && !r) return;
|
|
7179
7253
|
if (r) {
|
|
7180
7254
|
let e = String(r.question ?? "").trim(), t = r.options && typeof r.options == "object" ? r.options : {}, n = r.results?.options && typeof r.results.options == "object" ? r.results.options : {}, i = Array.from(/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])).sort((e, t) => Number(e) - Number(t));
|
|
@@ -7182,7 +7256,7 @@ function rd(e) {
|
|
|
7182
7256
|
id: r.id ? String(r.id) : void 0,
|
|
7183
7257
|
question: e,
|
|
7184
7258
|
options: i.map((e, r) => {
|
|
7185
|
-
let i = n[e] ?? {}, a =
|
|
7259
|
+
let i = n[e] ?? {}, a = fd(i.voters);
|
|
7186
7260
|
return {
|
|
7187
7261
|
id: String(e || r + 1),
|
|
7188
7262
|
text: String(i.text ?? t[e] ?? `Option ${r + 1}`),
|
|
@@ -7215,15 +7289,15 @@ function rd(e) {
|
|
|
7215
7289
|
allowsMultipleAnswers: !!n.allowsMultipleAnswers
|
|
7216
7290
|
};
|
|
7217
7291
|
}
|
|
7218
|
-
function
|
|
7292
|
+
function fd(e) {
|
|
7219
7293
|
return !e || typeof e != "object" ? [] : Object.entries(e).map(([e, t]) => ({
|
|
7220
7294
|
uid: e,
|
|
7221
7295
|
name: String(t?.name ?? e),
|
|
7222
7296
|
avatar: gt(t?.avatar)
|
|
7223
7297
|
}));
|
|
7224
7298
|
}
|
|
7225
|
-
function
|
|
7226
|
-
let t =
|
|
7299
|
+
function pd(e) {
|
|
7300
|
+
let t = xd(e), n = t?.["@injected"];
|
|
7227
7301
|
if (n && typeof n == "object") {
|
|
7228
7302
|
let e = n.extensions;
|
|
7229
7303
|
if (e && typeof e == "object") {
|
|
@@ -7237,8 +7311,8 @@ function ad(e) {
|
|
|
7237
7311
|
if (e && typeof e == "object") return e;
|
|
7238
7312
|
}
|
|
7239
7313
|
}
|
|
7240
|
-
function
|
|
7241
|
-
let t =
|
|
7314
|
+
function md(e) {
|
|
7315
|
+
let t = xd(e), n = t?.scheduleDate, r = t?.originalChatUid, i = e.getMuid?.(), a = Number(e.getId?.() ?? 0) || void 0;
|
|
7242
7316
|
if (n || r || i || a) return {
|
|
7243
7317
|
scheduleDate: typeof n == "string" || typeof n == "number" ? new Date(n) : void 0,
|
|
7244
7318
|
originalChatUid: r ? String(r) : void 0,
|
|
@@ -7246,11 +7320,11 @@ function od(e) {
|
|
|
7246
7320
|
messageId: a
|
|
7247
7321
|
};
|
|
7248
7322
|
}
|
|
7249
|
-
function
|
|
7323
|
+
function hd(e) {
|
|
7250
7324
|
let t = e.getParentMessageId?.() ?? e.parentMessageId ?? void 0;
|
|
7251
7325
|
if (t != null && t !== 0) return String(t);
|
|
7252
7326
|
}
|
|
7253
|
-
function
|
|
7327
|
+
function gd(e, t) {
|
|
7254
7328
|
let n = e.replyPreview;
|
|
7255
7329
|
if (n && typeof n == "object") {
|
|
7256
7330
|
let t = n;
|
|
@@ -7264,8 +7338,8 @@ function cd(e, t) {
|
|
|
7264
7338
|
if (t) return {
|
|
7265
7339
|
messageId: String(t.getId?.() ?? e.replyToMessageId ?? ""),
|
|
7266
7340
|
senderName: String(t.getSender?.()?.getName?.() ?? "Message"),
|
|
7267
|
-
text: t.getText?.() ??
|
|
7268
|
-
kind:
|
|
7341
|
+
text: t.getText?.() ?? Cu(t),
|
|
7342
|
+
kind: rd(t)
|
|
7269
7343
|
};
|
|
7270
7344
|
if (e.replyToMessageId) return {
|
|
7271
7345
|
messageId: String(e.replyToMessageId),
|
|
@@ -7274,34 +7348,34 @@ function cd(e, t) {
|
|
|
7274
7348
|
kind: "text"
|
|
7275
7349
|
};
|
|
7276
7350
|
}
|
|
7277
|
-
function
|
|
7351
|
+
function _d(e) {
|
|
7278
7352
|
let t = e.forwardedFrom;
|
|
7279
7353
|
if (!t || typeof t != "object") return;
|
|
7280
7354
|
let n = t;
|
|
7281
7355
|
if (n.senderName) return { senderName: String(n.senderName) };
|
|
7282
7356
|
}
|
|
7283
|
-
function
|
|
7357
|
+
function vd(e) {
|
|
7284
7358
|
let t = e.getReplyCount?.() ?? e.replyCount ?? e.getThreadMessageCount?.() ?? e.getRepliesCount?.() ?? 0;
|
|
7285
7359
|
return Number.isFinite(t) ? Number(t) : 0;
|
|
7286
7360
|
}
|
|
7287
|
-
function
|
|
7361
|
+
function yd(e) {
|
|
7288
7362
|
let t = e.getData?.() ?? e.data;
|
|
7289
7363
|
if (t && typeof t == "object") return t;
|
|
7290
7364
|
}
|
|
7291
|
-
function
|
|
7365
|
+
function bd(e) {
|
|
7292
7366
|
return (Array.isArray(e.getReactions?.()) ? e.getReactions?.() : []).map((e) => ({
|
|
7293
7367
|
emoji: String(e.getReaction?.() ?? e.reaction ?? ""),
|
|
7294
7368
|
count: Number(e.getCount?.() ?? e.count ?? 0),
|
|
7295
7369
|
reactedByMe: !!(e.getReactedByMe?.() ?? e.reactedByMe ?? !1)
|
|
7296
7370
|
}));
|
|
7297
7371
|
}
|
|
7298
|
-
function
|
|
7372
|
+
function xd(e) {
|
|
7299
7373
|
let t = e.getMetadata?.() ?? e.getData?.()?.metadata;
|
|
7300
7374
|
if (t && typeof t == "object") return t;
|
|
7301
7375
|
}
|
|
7302
7376
|
//#endregion
|
|
7303
7377
|
//#region src/chat/data.ts
|
|
7304
|
-
function
|
|
7378
|
+
function Sd(e, t) {
|
|
7305
7379
|
let n = t?.value?.getMetadata?.() ?? {};
|
|
7306
7380
|
if (!e?.getSender?.() || n.isChannel) return "";
|
|
7307
7381
|
let r = e?.getData?.()?.entities?.receiver?.entity?.scope, i = e?.getReceiver?.()?.getMetadata?.() ?? {};
|
|
@@ -7309,27 +7383,27 @@ function md(e, t) {
|
|
|
7309
7383
|
let a = i.systemDisplayName;
|
|
7310
7384
|
return e?.getData?.()?.metadata?.senderDisplayName && (r == "moderator" || r === void 0) ? e.getData().metadata.senderDisplayName : a && (e instanceof K.Action || r == "admin") ? a : e?.getSender?.()?.getName?.();
|
|
7311
7385
|
}
|
|
7312
|
-
function
|
|
7386
|
+
function Cd(e, t = 25, n) {
|
|
7313
7387
|
let r = e.trim();
|
|
7314
7388
|
if (!r || !n) return;
|
|
7315
|
-
let i =
|
|
7389
|
+
let i = Nd();
|
|
7316
7390
|
if (!i) return;
|
|
7317
7391
|
let a = new pl(i), o = r.toLowerCase(), s = a.getSearchableConversations(), c = new Map(s.map((e) => [e.id, e.targetId]));
|
|
7318
7392
|
return {
|
|
7319
7393
|
conversations: s.map((e) => ({
|
|
7320
7394
|
conversation: e,
|
|
7321
|
-
matches:
|
|
7395
|
+
matches: Ld(e.title, o)
|
|
7322
7396
|
})).filter((e) => e.matches.length > 0).slice(0, t),
|
|
7323
7397
|
messages: a.getAllMessages().filter((e) => !e.parentMessageId && e.category === "message").map((e) => ({
|
|
7324
7398
|
message: {
|
|
7325
7399
|
...e,
|
|
7326
7400
|
conversationId: c.get(e.conversationId) ?? e.conversationId
|
|
7327
7401
|
},
|
|
7328
|
-
matches:
|
|
7402
|
+
matches: Ld(e.text, o)
|
|
7329
7403
|
})).filter((e) => e.matches.length > 0).slice(0, t)
|
|
7330
7404
|
};
|
|
7331
7405
|
}
|
|
7332
|
-
async function
|
|
7406
|
+
async function wd(e) {
|
|
7333
7407
|
let t = new K.GroupMembersRequestBuilder(e).setLimit(50).build(), n = !0, r = [];
|
|
7334
7408
|
try {
|
|
7335
7409
|
for (; n;) {
|
|
@@ -7342,68 +7416,68 @@ async function gd(e) {
|
|
|
7342
7416
|
}
|
|
7343
7417
|
return r;
|
|
7344
7418
|
}
|
|
7345
|
-
async function
|
|
7346
|
-
await
|
|
7347
|
-
let t = await
|
|
7348
|
-
return
|
|
7419
|
+
async function Td(e) {
|
|
7420
|
+
await Fd("failed to get muted setting. User not logged in");
|
|
7421
|
+
let t = await Id(`${at().chatApiBaseUrl}/chats/${e}/settings/${(await K.getLoggedinUser())?.getUid?.()}`, { method: "GET" });
|
|
7422
|
+
return Md()?.storeParticipantSettings({
|
|
7349
7423
|
chatUid: e,
|
|
7350
7424
|
mutedUntil: t.mutedUntil,
|
|
7351
7425
|
lastUpdated: Date.now()
|
|
7352
7426
|
}), t.mutedUntil;
|
|
7353
7427
|
}
|
|
7354
|
-
async function
|
|
7355
|
-
await
|
|
7356
|
-
let n = await
|
|
7428
|
+
async function Ed(e, t) {
|
|
7429
|
+
await Fd("failed to mute chat. User not logged in");
|
|
7430
|
+
let n = await Id(`${at().chatApiBaseUrl}/chats/${e}/settings/${(await K.getLoggedinUser())?.getUid?.()}`, {
|
|
7357
7431
|
method: "PATCH",
|
|
7358
7432
|
body: JSON.stringify({ mutedUntil: t })
|
|
7359
7433
|
});
|
|
7360
|
-
return
|
|
7434
|
+
return Md()?.storeParticipantSettings({
|
|
7361
7435
|
chatUid: e,
|
|
7362
7436
|
mutedUntil: n.mutedUntil,
|
|
7363
7437
|
lastUpdated: Date.now()
|
|
7364
7438
|
}), n.mutedUntil;
|
|
7365
7439
|
}
|
|
7366
|
-
async function
|
|
7367
|
-
return await
|
|
7440
|
+
async function Dd() {
|
|
7441
|
+
return await Fd("failed to get muted all setting. User not logged in"), Id(`${at().chatApiBaseUrl}/person/settings`, { method: "GET" });
|
|
7368
7442
|
}
|
|
7369
|
-
async function
|
|
7370
|
-
return await
|
|
7443
|
+
async function Od(e) {
|
|
7444
|
+
return await Fd("failed to update person settings. User not logged in"), Id(`${at().chatApiBaseUrl}/person/settings`, {
|
|
7371
7445
|
method: "PATCH",
|
|
7372
7446
|
body: JSON.stringify(e)
|
|
7373
7447
|
});
|
|
7374
7448
|
}
|
|
7375
|
-
async function
|
|
7376
|
-
return (await
|
|
7449
|
+
async function kd(e) {
|
|
7450
|
+
return (await Od({ mutedAll: e })).mutedAll;
|
|
7377
7451
|
}
|
|
7378
|
-
async function
|
|
7379
|
-
let { mutedAll: e } = await
|
|
7380
|
-
return
|
|
7452
|
+
async function Ad() {
|
|
7453
|
+
let { mutedAll: e } = await Dd();
|
|
7454
|
+
return kd(!e);
|
|
7381
7455
|
}
|
|
7382
|
-
function
|
|
7456
|
+
function jd(e, t, n) {
|
|
7383
7457
|
let r = n ? new Date(n) : null;
|
|
7384
7458
|
return e.map((e) => e.targetId !== t && e.id !== t ? e : {
|
|
7385
7459
|
...e,
|
|
7386
7460
|
muteSettings: r
|
|
7387
7461
|
});
|
|
7388
7462
|
}
|
|
7389
|
-
function
|
|
7390
|
-
if (!
|
|
7391
|
-
let e =
|
|
7463
|
+
function Md() {
|
|
7464
|
+
if (!Pd()) return null;
|
|
7465
|
+
let e = Nd();
|
|
7392
7466
|
return e ? new pl(e) : null;
|
|
7393
7467
|
}
|
|
7394
|
-
function
|
|
7468
|
+
function Nd() {
|
|
7395
7469
|
let e = Jt();
|
|
7396
7470
|
return e ? `bcc-chat:${at().appId}:${e}` : null;
|
|
7397
7471
|
}
|
|
7398
|
-
function
|
|
7472
|
+
function Pd() {
|
|
7399
7473
|
return K.__bccCompatLoggedInUser ?? null;
|
|
7400
7474
|
}
|
|
7401
|
-
async function
|
|
7475
|
+
async function Fd(e) {
|
|
7402
7476
|
let t = await K.getLoggedinUser();
|
|
7403
7477
|
if (K.__bccCompatLoggedInUser = t ?? null, !t?.getUid?.()) throw Error(e);
|
|
7404
7478
|
return t;
|
|
7405
7479
|
}
|
|
7406
|
-
async function
|
|
7480
|
+
async function Id(e, t) {
|
|
7407
7481
|
let n = ut();
|
|
7408
7482
|
if (!n) throw Error("Missing access token.");
|
|
7409
7483
|
let r = await fetch(e, {
|
|
@@ -7416,7 +7490,7 @@ async function Od(e, t) {
|
|
|
7416
7490
|
if (!r.ok) throw Error(`Request failed with status ${r.status}`);
|
|
7417
7491
|
return await r.json();
|
|
7418
7492
|
}
|
|
7419
|
-
function
|
|
7493
|
+
function Ld(e, t) {
|
|
7420
7494
|
if (!e) return [];
|
|
7421
7495
|
let n = e.toLowerCase(), r = [], i = 0;
|
|
7422
7496
|
for (; i < n.length;) {
|
|
@@ -7434,7 +7508,7 @@ function kd(e, t) {
|
|
|
7434
7508
|
var $ = j(null);
|
|
7435
7509
|
//#endregion
|
|
7436
7510
|
//#region src/chat/theme.ts
|
|
7437
|
-
function
|
|
7511
|
+
function Rd(e) {
|
|
7438
7512
|
let t = { palette: {
|
|
7439
7513
|
mode: e,
|
|
7440
7514
|
setMode(e) {
|
|
@@ -7443,17 +7517,17 @@ function Ad(e) {
|
|
|
7443
7517
|
} };
|
|
7444
7518
|
return t;
|
|
7445
7519
|
}
|
|
7446
|
-
var
|
|
7447
|
-
function
|
|
7448
|
-
|
|
7520
|
+
var zd = D(Rd("light"));
|
|
7521
|
+
function Bd(e) {
|
|
7522
|
+
zd.value.palette.setMode(e);
|
|
7449
7523
|
}
|
|
7450
7524
|
//#endregion
|
|
7451
7525
|
//#region src/chat/types.ts
|
|
7452
|
-
var
|
|
7526
|
+
var Vd = /* @__PURE__ */ function(e) {
|
|
7453
7527
|
return e.DEBUG = "Debug", e.INFO = "Info", e.WARN = "Warn", e.ERROR = "Error", e;
|
|
7454
|
-
}({}),
|
|
7455
|
-
function
|
|
7456
|
-
|
|
7528
|
+
}({}), Hd = D(!1), Ud = D(null), Wd = D("light"), Gd = D(void 0), Kd = D(void 0), qd = /* @__PURE__ */ new Set(), Jd = D({}), Yd = /* @__PURE__ */ new Map(), Xd;
|
|
7529
|
+
function Zd(e, t, n) {
|
|
7530
|
+
Kd.value?.({
|
|
7457
7531
|
logUid: crypto.randomUUID(),
|
|
7458
7532
|
message: t,
|
|
7459
7533
|
severity: e,
|
|
@@ -7461,17 +7535,17 @@ function Ud(e, t, n) {
|
|
|
7461
7535
|
userMetadata: n
|
|
7462
7536
|
});
|
|
7463
7537
|
}
|
|
7464
|
-
function
|
|
7465
|
-
|
|
7538
|
+
function Qd(e) {
|
|
7539
|
+
Wd.value = e, Bd(e), !(typeof document > "u") && document.documentElement.classList.toggle("dark", e === "dark");
|
|
7466
7540
|
}
|
|
7467
|
-
function
|
|
7468
|
-
if ($.value && !e && !
|
|
7469
|
-
let t = e ??
|
|
7541
|
+
function $d(e) {
|
|
7542
|
+
if ($.value && !e && !Ud.value) return $.value;
|
|
7543
|
+
let t = e ?? Ud.value;
|
|
7470
7544
|
if (!t) throw Error("Environment has not been set yet. Call app.use(chat, { environment: ... }) first.");
|
|
7471
|
-
return (!$.value ||
|
|
7545
|
+
return (!$.value || Ud.value !== t) && (Ud.value = t, it(t), $.value = tu({ environment: t })), $.value;
|
|
7472
7546
|
}
|
|
7473
|
-
var
|
|
7474
|
-
function
|
|
7547
|
+
var ef = a(() => $.value?.currentUser.value?.uid);
|
|
7548
|
+
function tf(e) {
|
|
7475
7549
|
if (Array.isArray(e)) return e;
|
|
7476
7550
|
if (e && typeof e == "object") {
|
|
7477
7551
|
let t = e.data;
|
|
@@ -7479,30 +7553,30 @@ function qd(e) {
|
|
|
7479
7553
|
}
|
|
7480
7554
|
return [];
|
|
7481
7555
|
}
|
|
7482
|
-
function
|
|
7483
|
-
let t =
|
|
7556
|
+
function nf(e) {
|
|
7557
|
+
let t = Yd.get(e);
|
|
7484
7558
|
if (!t) {
|
|
7485
|
-
let n =
|
|
7486
|
-
|
|
7559
|
+
let n = rf(e).finally(() => {
|
|
7560
|
+
Yd.get(e) === n && Yd.delete(e);
|
|
7487
7561
|
});
|
|
7488
|
-
t = n,
|
|
7562
|
+
t = n, Yd.set(e, t);
|
|
7489
7563
|
}
|
|
7490
7564
|
return t;
|
|
7491
7565
|
}
|
|
7492
|
-
async function
|
|
7566
|
+
async function rf(e) {
|
|
7493
7567
|
try {
|
|
7494
7568
|
let t = await Y(K.getMessageReceipts(e), Rt);
|
|
7495
|
-
|
|
7496
|
-
...
|
|
7497
|
-
[e]:
|
|
7569
|
+
Jd.value = {
|
|
7570
|
+
...Jd.value,
|
|
7571
|
+
[e]: tf(t)
|
|
7498
7572
|
};
|
|
7499
7573
|
} catch {}
|
|
7500
7574
|
}
|
|
7501
|
-
async function
|
|
7575
|
+
async function af(e, t) {
|
|
7502
7576
|
let n = e.lastMessage, r = n ? void 0 : e.source?.getLastMessage?.();
|
|
7503
7577
|
if (!(r || n)) return;
|
|
7504
7578
|
let i = n?.senderId ?? r?.getSender?.()?.getUid?.() ?? "", a = String(n?.id ?? r?.getId?.() ?? ""), o = !!(t && i && t === i && a);
|
|
7505
|
-
return o && a &&
|
|
7579
|
+
return o && a && Jd.value[a] === void 0 && await nf(a), {
|
|
7506
7580
|
text: e.subtitle,
|
|
7507
7581
|
type: n?.type ?? r?.getType?.() ?? "text",
|
|
7508
7582
|
senderUid: i,
|
|
@@ -7510,10 +7584,10 @@ async function Xd(e, t) {
|
|
|
7510
7584
|
sentAt: n?.sentAt ?? Qt(r?.getSentAt?.()) ?? /* @__PURE__ */ new Date(0),
|
|
7511
7585
|
sentByCurrentUser: o,
|
|
7512
7586
|
readAt: Qt(r?.getReadAt?.()),
|
|
7513
|
-
messageReceipts: o ?
|
|
7587
|
+
messageReceipts: o ? Jd.value[a] : void 0
|
|
7514
7588
|
};
|
|
7515
7589
|
}
|
|
7516
|
-
var
|
|
7590
|
+
var of = a(() => $.value?.connected.value ?? !1), sf = a(() => Hd.value && !of.value), cf = a(() => $.value?.loggedIn.value ?? !1), lf = {
|
|
7517
7591
|
onlineMode: a({
|
|
7518
7592
|
get: () => $.value?.offlineMode.value ? "offline" : "online",
|
|
7519
7593
|
set: (e) => {
|
|
@@ -7521,83 +7595,83 @@ var Zd = a(() => $.value?.connected.value ?? !1), Qd = a(() => Pd.value && !Zd.v
|
|
|
7521
7595
|
}
|
|
7522
7596
|
}),
|
|
7523
7597
|
onlineStatus: a(() => $.value ? $.value.offlineMode.value || !$.value.connected.value ? "offline" : "online" : "offline")
|
|
7524
|
-
},
|
|
7525
|
-
async function
|
|
7598
|
+
}, uf = D([]);
|
|
7599
|
+
async function df(e, t) {
|
|
7526
7600
|
return {
|
|
7527
7601
|
chatUid: e.targetId,
|
|
7528
7602
|
type: e.type,
|
|
7529
7603
|
name: e.title,
|
|
7530
7604
|
unreadMessageCount: e.unreadCount,
|
|
7531
|
-
lastMessage: await
|
|
7605
|
+
lastMessage: await af(e, t),
|
|
7532
7606
|
membersCount: e.memberCount ?? 0,
|
|
7533
7607
|
tags: [...e.tags],
|
|
7534
7608
|
muteSettings: e.muteSettings ?? null,
|
|
7535
7609
|
hasJoined: e.hasJoined ?? !0
|
|
7536
7610
|
};
|
|
7537
7611
|
}
|
|
7538
|
-
var
|
|
7539
|
-
R([() => $.value?.conversations.value, () =>
|
|
7612
|
+
var ff = /* @__PURE__ */ new WeakMap(), pf, mf = "";
|
|
7613
|
+
R([() => $.value?.conversations.value, () => ef.value], async () => {
|
|
7540
7614
|
let e = crypto.randomUUID();
|
|
7541
|
-
|
|
7542
|
-
let t =
|
|
7543
|
-
t !==
|
|
7615
|
+
mf = e;
|
|
7616
|
+
let t = ef.value;
|
|
7617
|
+
t !== pf && (ff = /* @__PURE__ */ new WeakMap(), pf = t);
|
|
7544
7618
|
let n = await Promise.all(($.value?.conversations?.value ?? []).map((e) => {
|
|
7545
|
-
let n =
|
|
7546
|
-
return n || (n =
|
|
7619
|
+
let n = ff.get(e);
|
|
7620
|
+
return n || (n = df(e, t), ff.set(e, n), n.catch(() => ff.delete(e))), n;
|
|
7547
7621
|
}));
|
|
7548
|
-
|
|
7549
|
-
}), R(() =>
|
|
7550
|
-
|
|
7622
|
+
mf === e && (uf.value = n);
|
|
7623
|
+
}), R(() => ef.value, () => {
|
|
7624
|
+
Jd.value = {}, Yd.clear();
|
|
7551
7625
|
});
|
|
7552
|
-
async function
|
|
7553
|
-
|
|
7626
|
+
async function hf(e, t) {
|
|
7627
|
+
Kd.value = t.loggerCallback, Dt(t.language ?? "en"), Qd(t.themeMode), e.use(H);
|
|
7554
7628
|
let n = e.config.globalProperties.$primevue;
|
|
7555
|
-
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.provide("theme", { theme:
|
|
7556
|
-
let r =
|
|
7557
|
-
|
|
7629
|
+
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.provide("theme", { theme: zd });
|
|
7630
|
+
let r = $d(t.environment);
|
|
7631
|
+
Zd(Vd.INFO, "Initializing chat", {
|
|
7558
7632
|
environment: t.environment,
|
|
7559
7633
|
language: xt.value,
|
|
7560
7634
|
themeMode: t.themeMode
|
|
7561
|
-
}), await r.init(),
|
|
7562
|
-
e ? await
|
|
7563
|
-
}, { immediate: !0 }) : t.accessToken && await
|
|
7635
|
+
}), await r.init(), Hd.value = !0, Xd?.(), g(t.accessToken) ? Xd = R(t.accessToken, async (e) => {
|
|
7636
|
+
e ? await gf(e) : await _f();
|
|
7637
|
+
}, { immediate: !0 }) : t.accessToken && await gf(t.accessToken), Zd(Vd.INFO, "Chat initialized", { environment: at().appId });
|
|
7564
7638
|
}
|
|
7565
|
-
async function
|
|
7566
|
-
if (!e) return
|
|
7567
|
-
let t =
|
|
7568
|
-
|
|
7639
|
+
async function gf(e) {
|
|
7640
|
+
if (!e) return _f();
|
|
7641
|
+
let t = $d();
|
|
7642
|
+
Zd(Vd.INFO, "Signing in to chat"), await t.login(e);
|
|
7569
7643
|
}
|
|
7570
|
-
async function
|
|
7571
|
-
$.value && (
|
|
7644
|
+
async function _f() {
|
|
7645
|
+
$.value && (Zd(Vd.INFO, "Signing out from chat"), await $.value.logout());
|
|
7572
7646
|
}
|
|
7573
|
-
async function
|
|
7647
|
+
async function vf(e) {
|
|
7574
7648
|
let t = e ?? "default";
|
|
7575
|
-
|
|
7576
|
-
let n =
|
|
7577
|
-
await n.init(), await n.connectRealtime(), await
|
|
7649
|
+
qd.add(t);
|
|
7650
|
+
let n = $d();
|
|
7651
|
+
await n.init(), await n.connectRealtime(), await Df();
|
|
7578
7652
|
}
|
|
7579
|
-
async function
|
|
7653
|
+
async function yf(e) {
|
|
7580
7654
|
if (!$.value) return;
|
|
7581
7655
|
let t = e ?? "default";
|
|
7582
|
-
|
|
7656
|
+
qd.delete(t), !(qd.size > 0) && (await $.value.disconnectRealtime(), $.value.closeThread());
|
|
7583
7657
|
}
|
|
7584
|
-
async function
|
|
7585
|
-
|
|
7658
|
+
async function bf() {
|
|
7659
|
+
qd.clear(), $.value && (await $.value.disconnectRealtime(), $.value.closeThread());
|
|
7586
7660
|
}
|
|
7587
|
-
function
|
|
7661
|
+
function xf(e) {
|
|
7588
7662
|
Dt(e);
|
|
7589
7663
|
}
|
|
7590
|
-
function
|
|
7591
|
-
|
|
7664
|
+
function Sf(e) {
|
|
7665
|
+
Qd(e);
|
|
7592
7666
|
}
|
|
7593
|
-
function
|
|
7594
|
-
return e ?
|
|
7667
|
+
function Cf(e) {
|
|
7668
|
+
return e ? gf(e) : _f();
|
|
7595
7669
|
}
|
|
7596
|
-
function
|
|
7597
|
-
|
|
7670
|
+
function wf(e) {
|
|
7671
|
+
$d(e);
|
|
7598
7672
|
}
|
|
7599
|
-
async function
|
|
7600
|
-
if (
|
|
7673
|
+
async function Tf(e, t = !1) {
|
|
7674
|
+
if (!cf.value) return null;
|
|
7601
7675
|
try {
|
|
7602
7676
|
return await K.getGroup(e);
|
|
7603
7677
|
} catch (e) {
|
|
@@ -7606,14 +7680,14 @@ async function _f(e, t = !1) {
|
|
|
7606
7680
|
return null;
|
|
7607
7681
|
}
|
|
7608
7682
|
}
|
|
7609
|
-
async function
|
|
7610
|
-
let t =
|
|
7611
|
-
return
|
|
7683
|
+
async function Ef(e) {
|
|
7684
|
+
let t = $d();
|
|
7685
|
+
return Zd(Vd.INFO, "Starting direct message"), t.initiateDirectMessage(e);
|
|
7612
7686
|
}
|
|
7613
|
-
async function
|
|
7614
|
-
return $.value ? (await $.value.fetchConversations(),
|
|
7687
|
+
async function Df() {
|
|
7688
|
+
return $.value ? (await $.value.fetchConversations(), uf.value) : [];
|
|
7615
7689
|
}
|
|
7616
|
-
async function
|
|
7690
|
+
async function Of(e) {
|
|
7617
7691
|
if (!$.value) return;
|
|
7618
7692
|
let t = $.value.conversations;
|
|
7619
7693
|
t.value = t.value.map((t) => t.targetId === e || t.id === e ? {
|
|
@@ -7621,147 +7695,147 @@ async function bf(e) {
|
|
|
7621
7695
|
unreadCount: 0
|
|
7622
7696
|
} : t);
|
|
7623
7697
|
}
|
|
7624
|
-
async function
|
|
7698
|
+
async function kf(e) {
|
|
7625
7699
|
try {
|
|
7626
|
-
return
|
|
7700
|
+
return cf.value && (await K.getOnlineGroupMemberCount([e]))[e] || 0;
|
|
7627
7701
|
} catch {
|
|
7628
7702
|
return 0;
|
|
7629
7703
|
}
|
|
7630
7704
|
}
|
|
7631
|
-
async function
|
|
7632
|
-
let n = await
|
|
7633
|
-
return $.value && ($.value.conversations.value =
|
|
7705
|
+
async function Af(e, t) {
|
|
7706
|
+
let n = await Ed(e, t);
|
|
7707
|
+
return $.value && ($.value.conversations.value = jd($.value.conversations.value, e, n)), n;
|
|
7634
7708
|
}
|
|
7635
|
-
async function
|
|
7636
|
-
let t = await
|
|
7637
|
-
return $.value && ($.value.conversations.value =
|
|
7709
|
+
async function jf(e) {
|
|
7710
|
+
let t = await Td(e);
|
|
7711
|
+
return $.value && ($.value.conversations.value = jd($.value.conversations.value, e, t)), t;
|
|
7638
7712
|
}
|
|
7639
|
-
var
|
|
7640
|
-
function
|
|
7641
|
-
return
|
|
7713
|
+
var Mf = a(() => $.value?.pinnedMessages.value ?? []);
|
|
7714
|
+
function Nf(e) {
|
|
7715
|
+
return $d().pinMessage(e);
|
|
7642
7716
|
}
|
|
7643
|
-
function
|
|
7644
|
-
return
|
|
7717
|
+
function Pf(e) {
|
|
7718
|
+
return $d().unpinMessage(e);
|
|
7645
7719
|
}
|
|
7646
|
-
function
|
|
7647
|
-
return
|
|
7720
|
+
function Ff(e) {
|
|
7721
|
+
return $d().togglePinnedMessage(e);
|
|
7648
7722
|
}
|
|
7649
|
-
function
|
|
7723
|
+
function If(e) {
|
|
7650
7724
|
return $.value?.isMessagePinned(e) ?? !1;
|
|
7651
7725
|
}
|
|
7652
|
-
function
|
|
7653
|
-
|
|
7726
|
+
function Lf(e) {
|
|
7727
|
+
Gd.value = e;
|
|
7654
7728
|
}
|
|
7655
|
-
var
|
|
7729
|
+
var Rf = /* @__PURE__ */ new Map(), zf = {
|
|
7656
7730
|
state: a(() => $.value?.callState.value ?? "idle"),
|
|
7657
7731
|
activeType: a(() => $.value?.activeCallType.value ?? "video"),
|
|
7658
7732
|
activeSessionId: a(() => $.value?.activeCallSessionId.value ?? null),
|
|
7659
7733
|
incomingCall: a(() => $.value?.incomingCall.value ?? null),
|
|
7660
|
-
incomingCalls: a(() => $.value?.incomingCalls.value ??
|
|
7734
|
+
incomingCalls: a(() => $.value?.incomingCalls.value ?? Rf),
|
|
7661
7735
|
outgoingCall: a(() => $.value?.outgoingCall.value ?? null),
|
|
7662
7736
|
lastEndReason: a(() => $.value?.lastCallEndReason.value ?? null),
|
|
7663
|
-
start: (e, t, n = "video", r = "user", i) =>
|
|
7664
|
-
join: (e, t, n = "video", r) =>
|
|
7665
|
-
accept: (e, t, n) =>
|
|
7666
|
-
reject: (e) =>
|
|
7667
|
-
end: () =>
|
|
7737
|
+
start: (e, t, n = "video", r = "user", i) => $d().initiateCall(e, t, n, r, i),
|
|
7738
|
+
join: (e, t, n = "video", r) => $d().joinChatCall(e, t, n, r),
|
|
7739
|
+
accept: (e, t, n) => $d().acceptIncomingCall(e, t, n),
|
|
7740
|
+
reject: (e) => $d().rejectIncomingCall(e),
|
|
7741
|
+
end: () => $d().endActiveCall(),
|
|
7668
7742
|
leave: () => $.value?.leaveActiveCall(),
|
|
7669
|
-
joinActive: (e, t) =>
|
|
7670
|
-
},
|
|
7671
|
-
install:
|
|
7672
|
-
initialized:
|
|
7673
|
-
connected:
|
|
7674
|
-
connecting:
|
|
7675
|
-
loggedIn:
|
|
7676
|
-
userChats:
|
|
7677
|
-
userUid:
|
|
7678
|
-
connect:
|
|
7679
|
-
disconnect:
|
|
7680
|
-
disconnectAll:
|
|
7681
|
-
setAccessToken:
|
|
7682
|
-
login:
|
|
7683
|
-
logout:
|
|
7684
|
-
setCurrentEnvironment:
|
|
7743
|
+
joinActive: (e, t) => $d().joinOutgoingCallSession(e, t)
|
|
7744
|
+
}, Bf = {
|
|
7745
|
+
install: hf,
|
|
7746
|
+
initialized: Hd,
|
|
7747
|
+
connected: of,
|
|
7748
|
+
connecting: sf,
|
|
7749
|
+
loggedIn: cf,
|
|
7750
|
+
userChats: uf,
|
|
7751
|
+
userUid: ef,
|
|
7752
|
+
connect: vf,
|
|
7753
|
+
disconnect: yf,
|
|
7754
|
+
disconnectAll: bf,
|
|
7755
|
+
setAccessToken: Cf,
|
|
7756
|
+
login: gf,
|
|
7757
|
+
logout: _f,
|
|
7758
|
+
setCurrentEnvironment: wf,
|
|
7685
7759
|
getCurrentEnvironment: at,
|
|
7686
|
-
setThemeMode:
|
|
7687
|
-
setLanguage:
|
|
7688
|
-
getGroup:
|
|
7689
|
-
getChatMembersInfo:
|
|
7690
|
-
getUserChats:
|
|
7691
|
-
initiateDirectMessage:
|
|
7692
|
-
clearChatCount:
|
|
7760
|
+
setThemeMode: Sf,
|
|
7761
|
+
setLanguage: xf,
|
|
7762
|
+
getGroup: Tf,
|
|
7763
|
+
getChatMembersInfo: wd,
|
|
7764
|
+
getUserChats: Df,
|
|
7765
|
+
initiateDirectMessage: Ef,
|
|
7766
|
+
clearChatCount: Of,
|
|
7693
7767
|
refreshVisibleMessages: () => $.value?.refreshVisibleMessages(),
|
|
7694
|
-
getChatOnlineCount:
|
|
7695
|
-
searchChat: (e, t = 25) =>
|
|
7696
|
-
getSenderDisplayName:
|
|
7768
|
+
getChatOnlineCount: kf,
|
|
7769
|
+
searchChat: (e, t = 25) => Cd(e, t, $.value?.currentUser.value?.uid),
|
|
7770
|
+
getSenderDisplayName: Sd,
|
|
7697
7771
|
getMessageTextPreview: Zc,
|
|
7698
7772
|
proxyImage: _t,
|
|
7699
|
-
getMutedUntil:
|
|
7700
|
-
muteChat:
|
|
7701
|
-
getMyChatSettings:
|
|
7702
|
-
updateMyChatSettings:
|
|
7703
|
-
setMuteAll:
|
|
7704
|
-
toggleMuteAll:
|
|
7773
|
+
getMutedUntil: jf,
|
|
7774
|
+
muteChat: Af,
|
|
7775
|
+
getMyChatSettings: Dd,
|
|
7776
|
+
updateMyChatSettings: Od,
|
|
7777
|
+
setMuteAll: kd,
|
|
7778
|
+
toggleMuteAll: Ad,
|
|
7705
7779
|
toMarkdownHtml: jc,
|
|
7706
7780
|
retrieveCcToken: pt,
|
|
7707
|
-
scrollToMessageId:
|
|
7708
|
-
scrollToMessage:
|
|
7709
|
-
pinnedMessages:
|
|
7710
|
-
pinMessage:
|
|
7711
|
-
unpinMessage:
|
|
7712
|
-
togglePinnedMessage:
|
|
7713
|
-
isMessagePinned:
|
|
7714
|
-
connectivity:
|
|
7715
|
-
onlineMode:
|
|
7716
|
-
onlineStatus:
|
|
7717
|
-
theme:
|
|
7718
|
-
themeMode:
|
|
7781
|
+
scrollToMessageId: Gd,
|
|
7782
|
+
scrollToMessage: Lf,
|
|
7783
|
+
pinnedMessages: Mf,
|
|
7784
|
+
pinMessage: Nf,
|
|
7785
|
+
unpinMessage: Pf,
|
|
7786
|
+
togglePinnedMessage: Ff,
|
|
7787
|
+
isMessagePinned: If,
|
|
7788
|
+
connectivity: lf,
|
|
7789
|
+
onlineMode: lf.onlineMode,
|
|
7790
|
+
onlineStatus: lf.onlineStatus,
|
|
7791
|
+
theme: zd,
|
|
7792
|
+
themeMode: Wd,
|
|
7719
7793
|
language: xt,
|
|
7720
|
-
calls:
|
|
7794
|
+
calls: zf
|
|
7721
7795
|
};
|
|
7722
7796
|
//#endregion
|
|
7723
7797
|
//#region src/chat/conversationState.ts
|
|
7724
|
-
function
|
|
7798
|
+
function Vf(e) {
|
|
7725
7799
|
return e?.source?.getConversationWith?.();
|
|
7726
7800
|
}
|
|
7727
|
-
function
|
|
7728
|
-
return !!
|
|
7801
|
+
function Hf(e) {
|
|
7802
|
+
return !!Vf(e)?.getMetadata?.()?.isChannel;
|
|
7729
7803
|
}
|
|
7730
|
-
function
|
|
7731
|
-
return
|
|
7804
|
+
function Uf(e) {
|
|
7805
|
+
return Vf(e)?.getHasJoined?.() ?? !1;
|
|
7732
7806
|
}
|
|
7733
|
-
function
|
|
7734
|
-
let t =
|
|
7807
|
+
function Wf(e) {
|
|
7808
|
+
let t = Vf(e)?.getScope?.();
|
|
7735
7809
|
return typeof t == "string" ? t : void 0;
|
|
7736
7810
|
}
|
|
7737
|
-
function
|
|
7738
|
-
return
|
|
7811
|
+
function Gf(e) {
|
|
7812
|
+
return Hf(e) && (!Uf(e) || Wf(e) === "participant");
|
|
7739
7813
|
}
|
|
7740
|
-
function
|
|
7741
|
-
return !
|
|
7814
|
+
function Kf(e) {
|
|
7815
|
+
return !Hf(e) || Uf(e);
|
|
7742
7816
|
}
|
|
7743
|
-
function
|
|
7744
|
-
return !
|
|
7817
|
+
function qf(e) {
|
|
7818
|
+
return !Hf(e) || Uf(e);
|
|
7745
7819
|
}
|
|
7746
|
-
function
|
|
7747
|
-
return !
|
|
7820
|
+
function Jf(e) {
|
|
7821
|
+
return !Hf(e) || Uf(e) && Wf(e) !== "participant";
|
|
7748
7822
|
}
|
|
7749
|
-
function
|
|
7750
|
-
return !
|
|
7823
|
+
function Yf(e) {
|
|
7824
|
+
return !Hf(e) || Uf(e) && Wf(e) !== "participant";
|
|
7751
7825
|
}
|
|
7752
|
-
function
|
|
7753
|
-
return !
|
|
7826
|
+
function Xf(e) {
|
|
7827
|
+
return !Hf(e);
|
|
7754
7828
|
}
|
|
7755
|
-
function
|
|
7756
|
-
return e?.type === "user" || !
|
|
7829
|
+
function Zf(e) {
|
|
7830
|
+
return e?.type === "user" || !Hf(e) && Uf(e);
|
|
7757
7831
|
}
|
|
7758
7832
|
//#endregion
|
|
7759
7833
|
//#region src/composables/chat/useConversationContext.ts
|
|
7760
|
-
function
|
|
7761
|
-
let { chatClient: t, selectedConversation: n } = e, r = a(() => t.value?.currentUser.value?.uid), i = a(() =>
|
|
7834
|
+
function Qf(e) {
|
|
7835
|
+
let { chatClient: t, selectedConversation: n } = e, r = a(() => t.value?.currentUser.value?.uid), i = a(() => Kf(n.value)), o = a(() => qf(n.value)), s = a(() => Jf(n.value)), c = a(() => Xf(n.value)), l = a(() => !!t.value?.pinningEnabled.value && Yf(n.value)), u = a(() => {
|
|
7762
7836
|
let t = e.getPropIsReadOnly();
|
|
7763
|
-
return t === void 0 ?
|
|
7764
|
-
}), d = a(() =>
|
|
7837
|
+
return t === void 0 ? Gf(n.value) : t;
|
|
7838
|
+
}), d = a(() => Hf(n.value)), f = a(() => {
|
|
7765
7839
|
let t = n.value, i = r.value, a = e.getMentionCandidates();
|
|
7766
7840
|
return t ? t.type === "user" ? !t.targetId || t.targetId === i ? [] : [{
|
|
7767
7841
|
uid: t.targetId,
|
|
@@ -7783,26 +7857,26 @@ function Wf(e) {
|
|
|
7783
7857
|
mentionCandidates: f,
|
|
7784
7858
|
mentionNameByUid: a((e) => {
|
|
7785
7859
|
let n = Cn(cn(f.value), t.value?.mentionDisplayNamesByUid.value ?? {});
|
|
7786
|
-
return e &&
|
|
7860
|
+
return e && np(e, n) ? e : n;
|
|
7787
7861
|
})
|
|
7788
7862
|
};
|
|
7789
7863
|
}
|
|
7790
|
-
var
|
|
7791
|
-
function
|
|
7792
|
-
E(
|
|
7864
|
+
var $f = Symbol("conversationCtx");
|
|
7865
|
+
function ep(e) {
|
|
7866
|
+
E($f, e);
|
|
7793
7867
|
}
|
|
7794
|
-
function
|
|
7795
|
-
let e = h(
|
|
7868
|
+
function tp() {
|
|
7869
|
+
let e = h($f);
|
|
7796
7870
|
if (!e) throw Error("useConversationContext() requires an ancestor <BccChat> component.");
|
|
7797
7871
|
return e;
|
|
7798
7872
|
}
|
|
7799
|
-
function
|
|
7873
|
+
function np(e, t) {
|
|
7800
7874
|
let n = Object.keys(e);
|
|
7801
7875
|
return n.length === Object.keys(t).length && n.every((n) => t[n] === e[n]);
|
|
7802
7876
|
}
|
|
7803
7877
|
//#endregion
|
|
7804
7878
|
//#region src/composables/chat/useMessagesContext.ts
|
|
7805
|
-
function
|
|
7879
|
+
function rp(e) {
|
|
7806
7880
|
let { chatClient: t, selectedConversation: n, usesPublicContract: r, loadingChat: i } = e, o = a(() => {
|
|
7807
7881
|
let n = t.value?.messages.value ?? [];
|
|
7808
7882
|
return e.getHideDeletedMessages() ? n.filter((e) => !e.isDeleted) : n;
|
|
@@ -7830,18 +7904,18 @@ function Yf(e) {
|
|
|
7830
7904
|
isChatEmpty: a(() => !!n.value && !s.value && o.value.length === 0)
|
|
7831
7905
|
};
|
|
7832
7906
|
}
|
|
7833
|
-
var
|
|
7834
|
-
function
|
|
7835
|
-
E(
|
|
7907
|
+
var ip = Symbol("messagesCtx");
|
|
7908
|
+
function ap(e) {
|
|
7909
|
+
E(ip, e);
|
|
7836
7910
|
}
|
|
7837
|
-
function
|
|
7838
|
-
let e = h(
|
|
7911
|
+
function op() {
|
|
7912
|
+
let e = h(ip);
|
|
7839
7913
|
if (!e) throw Error("useMessagesContext() requires an ancestor <BccChat> component.");
|
|
7840
7914
|
return e;
|
|
7841
7915
|
}
|
|
7842
7916
|
//#endregion
|
|
7843
7917
|
//#region src/composables/useComposerDrafts.ts
|
|
7844
|
-
function
|
|
7918
|
+
function sp(e) {
|
|
7845
7919
|
let t = D(""), n = D(""), r = D(0), i = D(0), a = e.mainComposerRef, o = e.threadComposerRef;
|
|
7846
7920
|
function s() {
|
|
7847
7921
|
t.value = "", r.value += 1;
|
|
@@ -7889,7 +7963,9 @@ function $f(e) {
|
|
|
7889
7963
|
}
|
|
7890
7964
|
async function v(t) {
|
|
7891
7965
|
let n = e.getClient();
|
|
7892
|
-
|
|
7966
|
+
if (!n) return { occurrences: [] };
|
|
7967
|
+
let r = await n.scheduleMessage(t);
|
|
7968
|
+
return r.occurrences.length > 0 && r.occurrences.every((e) => e.success) && (s(), await e.afterSchedule()), r;
|
|
7893
7969
|
}
|
|
7894
7970
|
async function y() {
|
|
7895
7971
|
let t = e.getClient();
|
|
@@ -7929,8 +8005,8 @@ function $f(e) {
|
|
|
7929
8005
|
}
|
|
7930
8006
|
//#endregion
|
|
7931
8007
|
//#region src/composables/chat/useComposerContext.ts
|
|
7932
|
-
function
|
|
7933
|
-
let { chatClient: t } = e, n =
|
|
8008
|
+
function cp(e) {
|
|
8009
|
+
let { chatClient: t } = e, n = sp({
|
|
7934
8010
|
getClient: () => t.value,
|
|
7935
8011
|
getMentionNameByUid: () => e.mentionNameByUid.value,
|
|
7936
8012
|
afterSchedule: e.afterSchedule,
|
|
@@ -7964,18 +8040,18 @@ function ep(e) {
|
|
|
7964
8040
|
sendThreadPoll: n.sendThreadPoll
|
|
7965
8041
|
};
|
|
7966
8042
|
}
|
|
7967
|
-
var
|
|
7968
|
-
function
|
|
7969
|
-
E(
|
|
8043
|
+
var lp = Symbol("composerCtx");
|
|
8044
|
+
function up(e) {
|
|
8045
|
+
E(lp, e);
|
|
7970
8046
|
}
|
|
7971
|
-
function
|
|
7972
|
-
let e = h(
|
|
8047
|
+
function dp() {
|
|
8048
|
+
let e = h(lp);
|
|
7973
8049
|
if (!e) throw Error("useComposerContext() requires an ancestor <BccChat> component.");
|
|
7974
8050
|
return e;
|
|
7975
8051
|
}
|
|
7976
8052
|
//#endregion
|
|
7977
8053
|
//#region src/composables/useMessageInfoDialog.ts
|
|
7978
|
-
function
|
|
8054
|
+
function fp(e) {
|
|
7979
8055
|
let t = D(null), n = D([]), r = D(!1), i = D(null), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = D({}), l = D({}), u = /* @__PURE__ */ new Map();
|
|
7980
8056
|
async function d(t) {
|
|
7981
8057
|
let n = a.value[t.id];
|
|
@@ -8061,8 +8137,8 @@ function ip(e) {
|
|
|
8061
8137
|
}
|
|
8062
8138
|
//#endregion
|
|
8063
8139
|
//#region src/composables/chat/useDialogsContext.ts
|
|
8064
|
-
function
|
|
8065
|
-
let { chatClient: t, selectedConversation: n } = e, r =
|
|
8140
|
+
function pp(e) {
|
|
8141
|
+
let { chatClient: t, selectedConversation: n } = e, r = fp({
|
|
8066
8142
|
getClient: () => t.value,
|
|
8067
8143
|
fetchErrorFallback: e.fetchErrorFallback
|
|
8068
8144
|
}), i = D(e.getInitialScheduledMessagesOpen()), o = a(() => !!t.value?.scheduledMessages.value.length), s = a(() => t.value?.loadingScheduledMessages.value ?? !1), c = a(() => t.value?.scheduledMessages.value ?? []);
|
|
@@ -8134,18 +8210,18 @@ function ap(e) {
|
|
|
8134
8210
|
sendForwardedMessage: y
|
|
8135
8211
|
};
|
|
8136
8212
|
}
|
|
8137
|
-
var
|
|
8138
|
-
function
|
|
8139
|
-
E(
|
|
8213
|
+
var mp = Symbol("dialogsCtx");
|
|
8214
|
+
function hp(e) {
|
|
8215
|
+
E(mp, e);
|
|
8140
8216
|
}
|
|
8141
|
-
function
|
|
8142
|
-
let e = h(
|
|
8217
|
+
function gp() {
|
|
8218
|
+
let e = h(mp);
|
|
8143
8219
|
if (!e) throw Error("useDialogsContext() requires an ancestor <BccChat> component.");
|
|
8144
8220
|
return e;
|
|
8145
8221
|
}
|
|
8146
8222
|
//#endregion
|
|
8147
8223
|
//#region src/composables/useChatActions.ts
|
|
8148
|
-
function
|
|
8224
|
+
function _p({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
8149
8225
|
let i = [];
|
|
8150
8226
|
function a(e, t) {
|
|
8151
8227
|
i.push(r.on(e, t));
|
|
@@ -8186,7 +8262,7 @@ function lp({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
8186
8262
|
let { message: n, optionId: r } = t, i = e.client.value;
|
|
8187
8263
|
i && await i.votePoll(n, r);
|
|
8188
8264
|
}), a("message:openReference", (e) => {
|
|
8189
|
-
|
|
8265
|
+
Bf.scrollToMessage(e);
|
|
8190
8266
|
}), a("message:forward", (e) => {
|
|
8191
8267
|
n.openForwardMessage(e);
|
|
8192
8268
|
}), a("message:togglePin", async (t) => {
|
|
@@ -8205,8 +8281,13 @@ function lp({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
8205
8281
|
let { target: n, input: r } = e;
|
|
8206
8282
|
n === "thread" ? t.sendThreadPoll(r) : t.sendPoll(r);
|
|
8207
8283
|
}), a("composer:schedule", (e) => {
|
|
8208
|
-
let {
|
|
8209
|
-
t.scheduleMessage(
|
|
8284
|
+
let { target: n, input: i } = e;
|
|
8285
|
+
t.scheduleMessage(i).then((e) => {
|
|
8286
|
+
r.emit("composer:scheduleResult", {
|
|
8287
|
+
target: n,
|
|
8288
|
+
result: e
|
|
8289
|
+
});
|
|
8290
|
+
});
|
|
8210
8291
|
}), a("composer:cancelReply", () => {
|
|
8211
8292
|
let t = e.client.value;
|
|
8212
8293
|
t && t.setReplyToMessage(null);
|
|
@@ -8244,8 +8325,8 @@ function lp({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
8244
8325
|
}
|
|
8245
8326
|
//#endregion
|
|
8246
8327
|
//#region src/composables/useChatEventBus.ts
|
|
8247
|
-
var
|
|
8248
|
-
function
|
|
8328
|
+
var vp = Symbol("chatBus");
|
|
8329
|
+
function yp() {
|
|
8249
8330
|
let e = /* @__PURE__ */ new Map();
|
|
8250
8331
|
return {
|
|
8251
8332
|
emit(t, ...n) {
|
|
@@ -8261,21 +8342,21 @@ function dp() {
|
|
|
8261
8342
|
}
|
|
8262
8343
|
};
|
|
8263
8344
|
}
|
|
8264
|
-
function
|
|
8265
|
-
E(
|
|
8345
|
+
function bp(e) {
|
|
8346
|
+
E(vp, e);
|
|
8266
8347
|
}
|
|
8267
|
-
function
|
|
8268
|
-
let e = h(
|
|
8348
|
+
function xp() {
|
|
8349
|
+
let e = h(vp);
|
|
8269
8350
|
if (!e) throw Error("useChatBus() requires an ancestor <BccChat> component.");
|
|
8270
8351
|
return e;
|
|
8271
8352
|
}
|
|
8272
|
-
function
|
|
8353
|
+
function Sp(e, t, n) {
|
|
8273
8354
|
let r = e.on(t, n);
|
|
8274
8355
|
w(r);
|
|
8275
8356
|
}
|
|
8276
8357
|
//#endregion
|
|
8277
8358
|
//#region src/composables/useGroupMemberTracking.ts
|
|
8278
|
-
function
|
|
8359
|
+
function Cp(e) {
|
|
8279
8360
|
let t = D([]), n = `bcc-chat-group-${crypto.randomUUID()}`, r = `bcc-chat-presence-${crypto.randomUUID()}`, i = 0, a;
|
|
8280
8361
|
function o() {
|
|
8281
8362
|
i++, a = void 0, t.value.length !== 0 && (t.value = [], e.onMembersChanged([]));
|
|
@@ -8351,13 +8432,13 @@ function hp(e) {
|
|
|
8351
8432
|
}
|
|
8352
8433
|
//#endregion
|
|
8353
8434
|
//#region src/composables/useMessageNavigation.ts
|
|
8354
|
-
function
|
|
8435
|
+
function wp(e) {
|
|
8355
8436
|
async function t(n, r = !1) {
|
|
8356
|
-
let i = n ??
|
|
8437
|
+
let i = n ?? Bf.scrollToMessageId.value;
|
|
8357
8438
|
if (!i) return;
|
|
8358
8439
|
let a = e.getClient();
|
|
8359
8440
|
if (a && !await a.ensureMessageLoaded(i)) {
|
|
8360
|
-
|
|
8441
|
+
Bf.scrollToMessageId.value === i && (Bf.scrollToMessageId.value = void 0);
|
|
8361
8442
|
return;
|
|
8362
8443
|
}
|
|
8363
8444
|
await v(), await new Promise(requestAnimationFrame);
|
|
@@ -8369,7 +8450,7 @@ function gp(e) {
|
|
|
8369
8450
|
s.scrollTo({
|
|
8370
8451
|
top: d,
|
|
8371
8452
|
behavior: "smooth"
|
|
8372
|
-
}),
|
|
8453
|
+
}), Bf.scrollToMessageId.value === i && (Bf.scrollToMessageId.value = void 0);
|
|
8373
8454
|
}
|
|
8374
8455
|
function n(e) {
|
|
8375
8456
|
t(e);
|
|
@@ -8381,7 +8462,7 @@ function gp(e) {
|
|
|
8381
8462
|
}
|
|
8382
8463
|
//#endregion
|
|
8383
8464
|
//#region src/chat/clipboardFiles.ts
|
|
8384
|
-
var
|
|
8465
|
+
var Tp = /* @__PURE__ */ new Set([
|
|
8385
8466
|
"",
|
|
8386
8467
|
"image.png",
|
|
8387
8468
|
"image.jpeg",
|
|
@@ -8389,7 +8470,7 @@ var _p = /* @__PURE__ */ new Set([
|
|
|
8389
8470
|
"image.gif",
|
|
8390
8471
|
"image.webp",
|
|
8391
8472
|
"blob"
|
|
8392
|
-
]),
|
|
8473
|
+
]), Ep = {
|
|
8393
8474
|
"image/png": "png",
|
|
8394
8475
|
"image/jpeg": "jpg",
|
|
8395
8476
|
"image/jpg": "jpg",
|
|
@@ -8398,18 +8479,18 @@ var _p = /* @__PURE__ */ new Set([
|
|
|
8398
8479
|
"image/bmp": "bmp",
|
|
8399
8480
|
"image/svg+xml": "svg"
|
|
8400
8481
|
};
|
|
8401
|
-
function
|
|
8482
|
+
function Dp(e) {
|
|
8402
8483
|
let t = e.name.trim(), n = t.toLowerCase();
|
|
8403
|
-
return
|
|
8484
|
+
return Tp.has(n) ? `pasted-image.${Ep[e.type] ?? "png"}` : t;
|
|
8404
8485
|
}
|
|
8405
|
-
function
|
|
8486
|
+
function Op(e) {
|
|
8406
8487
|
let t = e.clipboardData?.items;
|
|
8407
8488
|
if (!t) return null;
|
|
8408
8489
|
for (let e of t) {
|
|
8409
8490
|
if (e.kind !== "file" || !e.type.startsWith("image/")) continue;
|
|
8410
8491
|
let t = e.getAsFile();
|
|
8411
8492
|
if (!t) continue;
|
|
8412
|
-
let n =
|
|
8493
|
+
let n = Dp(t);
|
|
8413
8494
|
return n === t.name ? t : new File([t], n, {
|
|
8414
8495
|
type: t.type,
|
|
8415
8496
|
lastModified: t.lastModified
|
|
@@ -8419,7 +8500,7 @@ function bp(e) {
|
|
|
8419
8500
|
}
|
|
8420
8501
|
//#endregion
|
|
8421
8502
|
//#region src/composables/useIsTouchUi.ts
|
|
8422
|
-
function
|
|
8503
|
+
function kp() {
|
|
8423
8504
|
let e = typeof window < "u" ? window.matchMedia("(hover: hover) and (pointer: fine)") : null, t = D(!!e?.matches);
|
|
8424
8505
|
return e?.addEventListener("change", (e) => {
|
|
8425
8506
|
t.value = e.matches;
|
|
@@ -8427,7 +8508,7 @@ function xp() {
|
|
|
8427
8508
|
}
|
|
8428
8509
|
//#endregion
|
|
8429
8510
|
//#region src/composables/useComposerTriggers.ts
|
|
8430
|
-
function
|
|
8511
|
+
function Ap(e) {
|
|
8431
8512
|
return {
|
|
8432
8513
|
id: "mention",
|
|
8433
8514
|
triggerChar: "@",
|
|
@@ -8444,7 +8525,7 @@ function Sp(e) {
|
|
|
8444
8525
|
}
|
|
8445
8526
|
};
|
|
8446
8527
|
}
|
|
8447
|
-
function
|
|
8528
|
+
function jp(e) {
|
|
8448
8529
|
let t = D(null), n = D([]), r = D({
|
|
8449
8530
|
x: 0,
|
|
8450
8531
|
y: 0,
|
|
@@ -8477,7 +8558,7 @@ function Cp(e) {
|
|
|
8477
8558
|
}
|
|
8478
8559
|
for (let a of e.getTriggers()) {
|
|
8479
8560
|
if (!a.enabled()) continue;
|
|
8480
|
-
let e =
|
|
8561
|
+
let e = Mp(r, a.triggerChar);
|
|
8481
8562
|
if (!e) continue;
|
|
8482
8563
|
let c = a.getCandidates(e.query).slice(0, a.maxSuggestions ?? 8);
|
|
8483
8564
|
if (!c.length) {
|
|
@@ -8522,7 +8603,7 @@ function Cp(e) {
|
|
|
8522
8603
|
refreshActiveTrigger: c
|
|
8523
8604
|
};
|
|
8524
8605
|
}
|
|
8525
|
-
function
|
|
8606
|
+
function Mp(e, t) {
|
|
8526
8607
|
let n = window.getSelection();
|
|
8527
8608
|
if (!n || n.rangeCount === 0 || !n.isCollapsed) return null;
|
|
8528
8609
|
let r = n.getRangeAt(0);
|
|
@@ -8533,13 +8614,13 @@ function wp(e, t) {
|
|
|
8533
8614
|
if (o === -1 || o > 0 && !/\s/.test(a[o - 1] ?? "")) return null;
|
|
8534
8615
|
let s = a.slice(o + 1);
|
|
8535
8616
|
if (/\s/.test(s)) return null;
|
|
8536
|
-
let c =
|
|
8617
|
+
let c = Pp(e, o, a.length) ?? Np(r, t);
|
|
8537
8618
|
return c ? {
|
|
8538
8619
|
query: s,
|
|
8539
8620
|
range: c
|
|
8540
8621
|
} : null;
|
|
8541
8622
|
}
|
|
8542
|
-
function
|
|
8623
|
+
function Np(e, t) {
|
|
8543
8624
|
let n = e.endContainer;
|
|
8544
8625
|
n.nodeType !== Node.TEXT_NODE && (n = e.endContainer.childNodes[e.endOffset - 1] ?? e.endContainer.childNodes[0] ?? null);
|
|
8545
8626
|
for (let r = 0; r < 4 && n; r += 1) {
|
|
@@ -8555,7 +8636,7 @@ function Tp(e, t) {
|
|
|
8555
8636
|
}
|
|
8556
8637
|
return null;
|
|
8557
8638
|
}
|
|
8558
|
-
function
|
|
8639
|
+
function Pp(e, t, n) {
|
|
8559
8640
|
let r = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), i = 0, a = null, o = 0, s = null, c = 0;
|
|
8560
8641
|
for (let e = r.nextNode(); e; e = r.nextNode()) {
|
|
8561
8642
|
let r = e.textContent?.length ?? 0, l = i + r;
|
|
@@ -8569,7 +8650,7 @@ function Ep(e, t, n) {
|
|
|
8569
8650
|
let l = document.createRange();
|
|
8570
8651
|
return l.setStart(a, o), l.setEnd(s, c), l;
|
|
8571
8652
|
}
|
|
8572
|
-
function
|
|
8653
|
+
function Fp(e, t) {
|
|
8573
8654
|
e.deleteContents();
|
|
8574
8655
|
let n = document.createElement("span");
|
|
8575
8656
|
n.className = "composer-mention", n.setAttribute("data-mention-uid", t.uid), n.contentEditable = "false", n.textContent = `@${t.displayName}`;
|
|
@@ -8580,22 +8661,22 @@ function Dp(e, t) {
|
|
|
8580
8661
|
}
|
|
8581
8662
|
//#endregion
|
|
8582
8663
|
//#region src/composables/useRichTextComposer.ts
|
|
8583
|
-
var
|
|
8584
|
-
function
|
|
8664
|
+
var Ip = 64;
|
|
8665
|
+
function Lp(e, t, n) {
|
|
8585
8666
|
let r = D(0), i = D(!1), o = D({
|
|
8586
8667
|
x: 0,
|
|
8587
8668
|
y: 0,
|
|
8588
8669
|
placement: "above"
|
|
8589
8670
|
}), s = D(Cc(n.getModelValue())), c = null, l = a(() => {
|
|
8590
8671
|
let e = [...n.extraTriggers ?? []];
|
|
8591
|
-
return n.getMentionCandidates && e.unshift(
|
|
8672
|
+
return n.getMentionCandidates && e.unshift(Ap({
|
|
8592
8673
|
enabled: () => n.mentionsEnabled?.() ?? !0,
|
|
8593
8674
|
getMentionCandidates: () => n.getMentionCandidates?.() ?? [],
|
|
8594
8675
|
insertMention: (e, t) => {
|
|
8595
|
-
|
|
8676
|
+
Fp(t, e), w(), T();
|
|
8596
8677
|
}
|
|
8597
8678
|
})), e;
|
|
8598
|
-
}), { triggerCandidates: u, triggerMenuPosition: d, highlightedTriggerIndex: f, showTriggerMenu: p, hideTriggerMenu: m, handleInput: h, handleKeydown: g, selectTriggerCandidate: _, refreshActiveTrigger: y } =
|
|
8679
|
+
}), { triggerCandidates: u, triggerMenuPosition: d, highlightedTriggerIndex: f, showTriggerMenu: p, hideTriggerMenu: m, handleInput: h, handleKeydown: g, selectTriggerCandidate: _, refreshActiveTrigger: y } = jp({
|
|
8599
8680
|
editorRef: t,
|
|
8600
8681
|
getTriggers: () => l.value,
|
|
8601
8682
|
onChange: () => w()
|
|
@@ -8671,7 +8752,7 @@ function kp(e, t, n) {
|
|
|
8671
8752
|
function ee(e, n) {
|
|
8672
8753
|
let r = t.value, i = e.getBoundingClientRect(), a = r?.getBoundingClientRect(), s = i.width || i.height ? i : a;
|
|
8673
8754
|
if (!s) return;
|
|
8674
|
-
let c = F(), l = c ? 248 : 176, u = c ? 48 : 180, d = c ?
|
|
8755
|
+
let c = F(), l = c ? 248 : 176, u = c ? 48 : 180, d = c ? Ip : 0, f = !c && !!n, p = f ? n.clientX : s.left + s.width / 2, m = f ? n.clientY : s.top, h = f ? n.clientY : s.bottom, g = l / 2 + 8, _ = P(p, g, Math.max(g, window.innerWidth - l / 2 - 8)), v = m - 6 - 8, y = window.innerHeight - h - 6 - 8;
|
|
8675
8756
|
if (!c && (y >= u || y >= v)) {
|
|
8676
8757
|
let e = Math.max(8, window.innerHeight - u - 8);
|
|
8677
8758
|
o.value = {
|
|
@@ -8815,7 +8896,7 @@ function kp(e, t, n) {
|
|
|
8815
8896
|
}
|
|
8816
8897
|
//#endregion
|
|
8817
8898
|
//#region src/components/messages/ComposerActionsPopover.vue?vue&type=script&setup=true&lang.ts
|
|
8818
|
-
var
|
|
8899
|
+
var Rp = ["data-testid", "onClick"], zp = { class: "composer-actions-menu__icon" }, Bp = { class: "composer-actions-menu__icon" }, Vp = /*@__PURE__*/ p({
|
|
8819
8900
|
__name: "ComposerActionsPopover",
|
|
8820
8901
|
emits: ["pickFile", "openPoll"],
|
|
8821
8902
|
setup(e, { expose: t, emit: n }) {
|
|
@@ -8880,18 +8961,18 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8880
8961
|
class: "composer-actions-menu__item",
|
|
8881
8962
|
"data-testid": e.testId,
|
|
8882
8963
|
onClick: (t) => h(e.kind)
|
|
8883
|
-
}, [l("span",
|
|
8964
|
+
}, [l("span", zp, [(T(), o(A(e.icon), { class: "size-5" }))]), l("span", null, M(P(u)(e.label)), 1)], 8, Rp)), 64)), l("button", {
|
|
8884
8965
|
type: "button",
|
|
8885
8966
|
class: "composer-actions-menu__item",
|
|
8886
8967
|
"data-testid": "composer-create-poll",
|
|
8887
8968
|
onClick: g
|
|
8888
|
-
}, [l("span",
|
|
8969
|
+
}, [l("span", Bp, [(T(), o(A(P(he)), { class: "size-5" }))]), l("span", null, M(P(u)("createPoll")), 1)])], 512)), [[L, a.value]]);
|
|
8889
8970
|
}
|
|
8890
|
-
}),
|
|
8971
|
+
}), Hp = (e, t) => {
|
|
8891
8972
|
let n = e.__vccOpts || e;
|
|
8892
8973
|
for (let [e, r] of t) n[e] = r;
|
|
8893
8974
|
return n;
|
|
8894
|
-
},
|
|
8975
|
+
}, Up = /*#__PURE__*/ Hp(Vp, [["__scopeId", "data-v-5e8b1d79"]]), Wp = { class: "border-default flex items-start justify-between gap-2 border-t-1 px-3 py-2" }, Gp = { class: "min-w-0" }, Kp = { class: "body-md text-default mt-0.5 overflow-hidden font-medium text-ellipsis whitespace-nowrap" }, qp = { class: "body-md text-subtle overflow-hidden text-ellipsis whitespace-nowrap" }, Jp = /* @__PURE__ */ p({
|
|
8895
8976
|
__name: "ComposerContextBanner",
|
|
8896
8977
|
props: {
|
|
8897
8978
|
message: {},
|
|
@@ -8900,11 +8981,11 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8900
8981
|
},
|
|
8901
8982
|
emits: ["cancel"],
|
|
8902
8983
|
setup(e, { emit: t }) {
|
|
8903
|
-
let n = e, r = t, { t: i } = J(), o =
|
|
8904
|
-
return (t, n) => (T(), c("div",
|
|
8984
|
+
let n = e, r = t, { t: i } = J(), o = tp(), s = a(() => Jc(n.message, i("message"), o.mentionNameByUid.value));
|
|
8985
|
+
return (t, n) => (T(), c("div", Wp, [l("div", Gp, [
|
|
8905
8986
|
l("p", { class: y(["body-sm font-semibold uppercase", e.variant === "editing" ? "text-information" : "text-success"]) }, M(e.variant === "editing" ? P(i)("editingInContext", { context: e.contextLabel }) : P(i)("replyingInContext", { context: e.contextLabel })), 3),
|
|
8906
|
-
l("p",
|
|
8907
|
-
l("p",
|
|
8987
|
+
l("p", Kp, M(e.message.senderName), 1),
|
|
8988
|
+
l("p", qp, M(s.value), 1)
|
|
8908
8989
|
]), f(P(V), {
|
|
8909
8990
|
icon: P(ve),
|
|
8910
8991
|
text: "",
|
|
@@ -8913,10 +8994,10 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8913
8994
|
onClick: n[0] ||= (e) => r("cancel")
|
|
8914
8995
|
}, null, 8, ["icon"])]));
|
|
8915
8996
|
}
|
|
8916
|
-
}),
|
|
8997
|
+
}), Yp = ["aria-label"], Xp = { class: "format-menu__label" }, Zp = ["aria-label"], Qp = { class: "format-menu__label" }, $p = ["aria-label"], em = { class: "format-menu__label" }, tm = ["aria-label"], nm = {
|
|
8917
8998
|
class: "format-menu__icon",
|
|
8918
8999
|
"aria-hidden": "true"
|
|
8919
|
-
},
|
|
9000
|
+
}, rm = { class: "format-menu__label" }, im = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
8920
9001
|
__name: "ComposerFormatMenu",
|
|
8921
9002
|
props: {
|
|
8922
9003
|
visible: { type: Boolean },
|
|
@@ -8943,7 +9024,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8943
9024
|
}, [a[12] ||= l("span", {
|
|
8944
9025
|
class: "format-menu__icon font-bold",
|
|
8945
9026
|
"aria-hidden": "true"
|
|
8946
|
-
}, "B", -1), l("span",
|
|
9027
|
+
}, "B", -1), l("span", Xp, M(P(r)("bold")), 1)], 40, Yp),
|
|
8947
9028
|
l("button", {
|
|
8948
9029
|
type: "button",
|
|
8949
9030
|
class: "format-menu__item",
|
|
@@ -8954,7 +9035,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8954
9035
|
}, [a[13] ||= l("span", {
|
|
8955
9036
|
class: "format-menu__icon italic",
|
|
8956
9037
|
"aria-hidden": "true"
|
|
8957
|
-
}, "I", -1), l("span",
|
|
9038
|
+
}, "I", -1), l("span", Qp, M(P(r)("italic")), 1)], 40, Zp),
|
|
8958
9039
|
l("button", {
|
|
8959
9040
|
type: "button",
|
|
8960
9041
|
class: "format-menu__item",
|
|
@@ -8965,7 +9046,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8965
9046
|
}, [a[14] ||= l("span", {
|
|
8966
9047
|
class: "format-menu__icon underline",
|
|
8967
9048
|
"aria-hidden": "true"
|
|
8968
|
-
}, "U", -1), l("span",
|
|
9049
|
+
}, "U", -1), l("span", em, M(P(r)("underline")), 1)], 40, $p),
|
|
8969
9050
|
l("button", {
|
|
8970
9051
|
type: "button",
|
|
8971
9052
|
class: "format-menu__item",
|
|
@@ -8973,16 +9054,16 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
8973
9054
|
onPointerdown: a[9] ||= B(() => {}, ["prevent"]),
|
|
8974
9055
|
onMousedown: a[10] ||= B(() => {}, ["prevent"]),
|
|
8975
9056
|
onClick: a[11] ||= (e) => n("link")
|
|
8976
|
-
}, [l("span",
|
|
9057
|
+
}, [l("span", nm, [f(P(Le), { "aria-hidden": "true" })]), l("span", rm, M(P(r)("link")), 1)], 40, tm)
|
|
8977
9058
|
], 6)) : s("", !0)]));
|
|
8978
9059
|
}
|
|
8979
|
-
}), [["__scopeId", "data-v-4151ff5d"]]),
|
|
9060
|
+
}), [["__scopeId", "data-v-4151ff5d"]]), am = { class: "space-y-4" }, om = {
|
|
8980
9061
|
key: 0,
|
|
8981
9062
|
class: "body-md text-subtle truncate"
|
|
8982
|
-
},
|
|
9063
|
+
}, sm = { class: "space-y-2" }, cm = { class: "heading-sm text-subtle block font-medium!" }, lm = {
|
|
8983
9064
|
key: 0,
|
|
8984
9065
|
class: "body-sm text-danger"
|
|
8985
|
-
},
|
|
9066
|
+
}, um = /* @__PURE__ */ p({
|
|
8986
9067
|
__name: "ComposerLinkDialog",
|
|
8987
9068
|
props: {
|
|
8988
9069
|
visible: { type: Boolean },
|
|
@@ -9030,8 +9111,8 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9030
9111
|
"icon",
|
|
9031
9112
|
"disabled"
|
|
9032
9113
|
])]),
|
|
9033
|
-
default: z(() => [l("div",
|
|
9034
|
-
l("label",
|
|
9114
|
+
default: z(() => [l("div", am, [e.selectedText ? (T(), c("p", om, M(e.selectedText), 1)) : s("", !0), l("div", sm, [
|
|
9115
|
+
l("label", cm, M(P(u)("linkUrl")), 1),
|
|
9035
9116
|
f(P(W), {
|
|
9036
9117
|
modelValue: p.value,
|
|
9037
9118
|
"onUpdate:modelValue": n[0] ||= (e) => p.value = e,
|
|
@@ -9051,12 +9132,12 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9051
9132
|
"placeholder",
|
|
9052
9133
|
"onKeydown"
|
|
9053
9134
|
]),
|
|
9054
|
-
g.value ? (T(), c("p",
|
|
9135
|
+
g.value ? (T(), c("p", lm, M(P(u)("invalidLinkUrl")), 1)) : s("", !0)
|
|
9055
9136
|
])])]),
|
|
9056
9137
|
_: 1
|
|
9057
9138
|
}, 8, ["visible", "header"]));
|
|
9058
9139
|
}
|
|
9059
|
-
}),
|
|
9140
|
+
}), dm = { class: "space-y-6" }, fm = { class: "space-y-2" }, pm = { class: "heading-sm text-subtle block font-medium!" }, mm = { class: "space-y-2" }, hm = { class: "heading-sm text-subtle block font-medium!" }, gm = /* @__PURE__ */ p({
|
|
9060
9141
|
__name: "ComposerPollDialog",
|
|
9061
9142
|
props: {
|
|
9062
9143
|
visible: { type: Boolean },
|
|
@@ -9108,13 +9189,13 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9108
9189
|
"icon",
|
|
9109
9190
|
"disabled"
|
|
9110
9191
|
])]),
|
|
9111
|
-
default: z(() => [l("div",
|
|
9192
|
+
default: z(() => [l("div", dm, [l("div", fm, [l("label", pm, M(P(u)("question")), 1), f(P(W), {
|
|
9112
9193
|
modelValue: d.value,
|
|
9113
9194
|
"onUpdate:modelValue": n[0] ||= (e) => d.value = e,
|
|
9114
9195
|
fluid: "",
|
|
9115
9196
|
placeholder: P(u)("pollQuestionPlaceholder")
|
|
9116
|
-
}, null, 8, ["modelValue", "placeholder"])]), l("div",
|
|
9117
|
-
l("label",
|
|
9197
|
+
}, null, 8, ["modelValue", "placeholder"])]), l("div", mm, [
|
|
9198
|
+
l("label", hm, M(P(u)("options")), 1),
|
|
9118
9199
|
(T(!0), c(r, null, O(p.value, (e, t) => (T(), c("div", {
|
|
9119
9200
|
key: t,
|
|
9120
9201
|
class: "center"
|
|
@@ -9149,94 +9230,224 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9149
9230
|
_: 1
|
|
9150
9231
|
}, 8, ["visible", "header"]));
|
|
9151
9232
|
}
|
|
9152
|
-
}),
|
|
9233
|
+
}), _m = 36e5;
|
|
9234
|
+
function vm(e = {}) {
|
|
9235
|
+
let t = e.now ?? (() => /* @__PURE__ */ new Date()), n = e.defaultOffsetMs ?? _m, r = 0;
|
|
9236
|
+
function i(e) {
|
|
9237
|
+
return r += 1, {
|
|
9238
|
+
id: r,
|
|
9239
|
+
date: e.date,
|
|
9240
|
+
time: e.time
|
|
9241
|
+
};
|
|
9242
|
+
}
|
|
9243
|
+
function o() {
|
|
9244
|
+
return i(ql(t().getTime() + n));
|
|
9245
|
+
}
|
|
9246
|
+
let s = D([o()]);
|
|
9247
|
+
function c() {
|
|
9248
|
+
let e = s.value[s.value.length - 1];
|
|
9249
|
+
if (!e || !l(e)) return o();
|
|
9250
|
+
let t = Kl(e.date, e.time);
|
|
9251
|
+
if (!t) return o();
|
|
9252
|
+
let n = new Date(t);
|
|
9253
|
+
return n.setDate(n.getDate() + 1), i(ql(n));
|
|
9254
|
+
}
|
|
9255
|
+
function l(e) {
|
|
9256
|
+
return Gl(e.date) && Wl(e.time);
|
|
9257
|
+
}
|
|
9258
|
+
function u() {
|
|
9259
|
+
s.value = [...s.value, c()];
|
|
9260
|
+
}
|
|
9261
|
+
function d(e) {
|
|
9262
|
+
s.value.length <= 1 || (s.value = s.value.filter((t) => t.id !== e));
|
|
9263
|
+
}
|
|
9264
|
+
let f = a(() => s.value.length > 1), p = a(() => s.value.some((e) => !l(e))), m = a(() => Jl(s.value.map((e) => Kl(e.date, e.time)))), h = a(() => !p.value && m.value.length !== s.value.length), g = a(() => m.value.length > 0 && !p.value && !h.value), _ = D(/* @__PURE__ */ new Map()), v = /* @__PURE__ */ new Set();
|
|
9265
|
+
function y(e) {
|
|
9266
|
+
let t = Kl(e.date, e.time);
|
|
9267
|
+
return t ? _.value.get(t) : void 0;
|
|
9268
|
+
}
|
|
9269
|
+
let b = a(() => m.value.filter((e) => _.value.get(e)?.success !== !0)), x = a(() => s.value.some((e) => y(e) !== void 0)), S = a(() => x.value && b.value.length > 0);
|
|
9270
|
+
function C() {
|
|
9271
|
+
let e = b.value;
|
|
9272
|
+
return v = new Set(e), e;
|
|
9273
|
+
}
|
|
9274
|
+
function w(e) {
|
|
9275
|
+
if (v.size === 0) return !1;
|
|
9276
|
+
let t = new Map(_.value);
|
|
9277
|
+
for (let n of e.occurrences) v.has(n.scheduleDate) && t.set(n.scheduleDate, n);
|
|
9278
|
+
return _.value = t, v = /* @__PURE__ */ new Set(), m.value.length > 0 && m.value.every((e) => t.get(e)?.success === !0);
|
|
9279
|
+
}
|
|
9280
|
+
function T() {
|
|
9281
|
+
r = 0, s.value = [o()], _.value = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Set();
|
|
9282
|
+
}
|
|
9283
|
+
return {
|
|
9284
|
+
occurrences: s,
|
|
9285
|
+
scheduleDates: m,
|
|
9286
|
+
canRemoveOccurrences: f,
|
|
9287
|
+
hasInvalidOccurrence: p,
|
|
9288
|
+
hasDuplicateOccurrences: h,
|
|
9289
|
+
isValid: g,
|
|
9290
|
+
addOccurrence: u,
|
|
9291
|
+
removeOccurrence: d,
|
|
9292
|
+
reset: T,
|
|
9293
|
+
statusFor: y,
|
|
9294
|
+
pendingSubmitDates: b,
|
|
9295
|
+
hasAttempted: x,
|
|
9296
|
+
isRetry: S,
|
|
9297
|
+
beginSubmission: C,
|
|
9298
|
+
applyResult: w
|
|
9299
|
+
};
|
|
9300
|
+
}
|
|
9301
|
+
//#endregion
|
|
9302
|
+
//#region src/components/messages/ComposerScheduleDialog.vue?vue&type=script&setup=true&lang.ts
|
|
9303
|
+
var ym = { class: "w-full space-y-6" }, bm = { class: "w-full space-y-2" }, xm = { class: "heading-sm text-subtle block font-medium!" }, Sm = ["aria-label"], Cm = {
|
|
9304
|
+
key: 0,
|
|
9305
|
+
class: "body-sm text-danger"
|
|
9306
|
+
}, wm = {
|
|
9307
|
+
key: 0,
|
|
9308
|
+
class: "body-sm text-danger"
|
|
9309
|
+
}, Tm = { class: "body-md bg-elevation-surface-sunken-default rounded-lg px-4 py-3" }, Em = /* @__PURE__ */ p({
|
|
9153
9310
|
__name: "ComposerScheduleDialog",
|
|
9154
9311
|
props: {
|
|
9155
9312
|
visible: { type: Boolean },
|
|
9156
9313
|
disabled: { type: Boolean },
|
|
9157
9314
|
contentPreview: {},
|
|
9158
|
-
canSchedule: { type: Boolean }
|
|
9315
|
+
canSchedule: { type: Boolean },
|
|
9316
|
+
result: {},
|
|
9317
|
+
submitting: { type: Boolean }
|
|
9159
9318
|
},
|
|
9160
9319
|
emits: ["update:visible", "schedule"],
|
|
9161
9320
|
setup(e, { expose: t, emit: n }) {
|
|
9162
|
-
let
|
|
9163
|
-
function
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
function m() {
|
|
9171
|
-
let e = d();
|
|
9172
|
-
return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
|
|
9173
|
-
}
|
|
9174
|
-
let h = a(() => /^([01]\d|2[0-3]):([0-5]\d)$/.test(u.value)), g = a(() => !!c.value && h.value && r.canSchedule);
|
|
9175
|
-
function _() {
|
|
9176
|
-
let [e, t, n] = c.value.split("-").map(Number), [r, i] = u.value.split(":").map(Number);
|
|
9177
|
-
return new Date(e, t - 1, n, r, i, 0, 0).toISOString();
|
|
9178
|
-
}
|
|
9179
|
-
function v() {
|
|
9180
|
-
c.value = p(), u.value = m();
|
|
9181
|
-
}
|
|
9182
|
-
function y() {
|
|
9183
|
-
g.value && (i("schedule", { scheduleDate: _() }), i("update:visible", !1), v());
|
|
9321
|
+
let i = e, u = n, { t: d } = J(), { occurrences: p, canRemoveOccurrences: m, hasDuplicateOccurrences: h, isValid: g, addOccurrence: _, removeOccurrence: v, reset: y, statusFor: b, pendingSubmitDates: x, isRetry: S, beginSubmission: C, applyResult: w } = vm(), E = a(() => g.value && i.canSchedule && !i.submitting && x.value.length > 0);
|
|
9322
|
+
function D() {
|
|
9323
|
+
if (!E.value) return;
|
|
9324
|
+
let e = C();
|
|
9325
|
+
u("schedule", {
|
|
9326
|
+
scheduleDate: e[0],
|
|
9327
|
+
scheduleDates: e
|
|
9328
|
+
});
|
|
9184
9329
|
}
|
|
9185
|
-
function
|
|
9186
|
-
|
|
9330
|
+
function k() {
|
|
9331
|
+
u("update:visible", !1), y();
|
|
9187
9332
|
}
|
|
9188
|
-
return
|
|
9333
|
+
return R(() => i.result, (e) => {
|
|
9334
|
+
e && w(e) && (u("update:visible", !1), y());
|
|
9335
|
+
}), t({ reset: y }), (t, n) => (T(), o(P(U), {
|
|
9189
9336
|
visible: e.visible,
|
|
9190
9337
|
modal: "",
|
|
9191
|
-
header: P(
|
|
9338
|
+
header: P(d)("scheduleMessage"),
|
|
9192
9339
|
class: "w-[min(92vw,28rem)]",
|
|
9193
9340
|
draggable: !1,
|
|
9194
|
-
"onUpdate:visible":
|
|
9341
|
+
"onUpdate:visible": k
|
|
9195
9342
|
}, {
|
|
9196
9343
|
footer: z(() => [f(P(V), {
|
|
9197
|
-
label: P(
|
|
9344
|
+
label: P(d)("cancel"),
|
|
9198
9345
|
severity: "secondary",
|
|
9199
|
-
onClick:
|
|
9346
|
+
onClick: k
|
|
9200
9347
|
}, null, 8, ["label"]), f(P(V), {
|
|
9201
|
-
label: P(
|
|
9348
|
+
label: e.submitting ? P(d)("scheduling") : P(S) ? P(x).length > 1 ? P(d)("retryScheduleTimesCount", { count: P(x).length }) : P(d)("retry") : P(p).length > 1 ? P(d)("scheduleTimesCount", { count: P(p).length }) : P(d)("schedule"),
|
|
9202
9349
|
icon: P(ge),
|
|
9203
|
-
disabled:
|
|
9204
|
-
onClick:
|
|
9350
|
+
disabled: i.disabled || !E.value,
|
|
9351
|
+
onClick: D
|
|
9205
9352
|
}, null, 8, [
|
|
9206
9353
|
"label",
|
|
9207
9354
|
"icon",
|
|
9208
9355
|
"disabled"
|
|
9209
9356
|
])]),
|
|
9210
|
-
default: z(() => [l("div",
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9357
|
+
default: z(() => [l("div", ym, [l("div", bm, [
|
|
9358
|
+
l("label", xm, M(P(d)("sendAt")), 1),
|
|
9359
|
+
(T(!0), c(r, null, O(P(p), (t, n) => (T(), c("div", {
|
|
9360
|
+
key: t.id,
|
|
9361
|
+
class: "w-full space-y-1"
|
|
9362
|
+
}, [l("div", {
|
|
9363
|
+
class: "center left w-full gap-2",
|
|
9364
|
+
role: "group",
|
|
9365
|
+
"aria-label": P(d)("scheduleTimeLabel", { count: n + 1 }),
|
|
9366
|
+
"data-testid": "schedule-time-row"
|
|
9367
|
+
}, [
|
|
9368
|
+
f(P(ae), {
|
|
9369
|
+
modelValue: t.date,
|
|
9370
|
+
"onUpdate:modelValue": (e) => t.date = e,
|
|
9371
|
+
class: "w-full flex-1",
|
|
9372
|
+
type: "date",
|
|
9373
|
+
disabled: e.submitting
|
|
9374
|
+
}, null, 8, [
|
|
9375
|
+
"modelValue",
|
|
9376
|
+
"onUpdate:modelValue",
|
|
9377
|
+
"disabled"
|
|
9378
|
+
]),
|
|
9379
|
+
f(P(ae), {
|
|
9380
|
+
modelValue: t.time,
|
|
9381
|
+
"onUpdate:modelValue": (e) => t.time = e,
|
|
9382
|
+
type: "time",
|
|
9383
|
+
inputmode: "numeric",
|
|
9384
|
+
placeholder: "HH:mm",
|
|
9385
|
+
mask: "##:##",
|
|
9386
|
+
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
9387
|
+
"aria-label": "Time (24-hour)",
|
|
9388
|
+
disabled: e.submitting
|
|
9389
|
+
}, null, 8, [
|
|
9390
|
+
"modelValue",
|
|
9391
|
+
"onUpdate:modelValue",
|
|
9392
|
+
"disabled"
|
|
9393
|
+
]),
|
|
9394
|
+
P(b)(t)?.success === !0 ? (T(), o(P(_e), {
|
|
9395
|
+
key: 0,
|
|
9396
|
+
class: "text-success size-5 shrink-0",
|
|
9397
|
+
"aria-label": P(d)("scheduleTimeSucceeded")
|
|
9398
|
+
}, null, 8, ["aria-label"])) : P(b)(t)?.success === !1 ? (T(), o(P(Ee), {
|
|
9399
|
+
key: 1,
|
|
9400
|
+
class: "text-danger size-5 shrink-0",
|
|
9401
|
+
"aria-label": P(d)("scheduleTimeFailed")
|
|
9402
|
+
}, null, 8, ["aria-label"])) : s("", !0),
|
|
9403
|
+
P(m) ? (T(), o(P(V), {
|
|
9404
|
+
key: 2,
|
|
9405
|
+
icon: P(xe),
|
|
9406
|
+
"aria-label": P(d)("removeScheduleTime"),
|
|
9407
|
+
disabled: e.submitting,
|
|
9408
|
+
text: "",
|
|
9409
|
+
rounded: "",
|
|
9410
|
+
severity: "secondary",
|
|
9411
|
+
onClick: (e) => P(v)(t.id)
|
|
9412
|
+
}, null, 8, [
|
|
9413
|
+
"icon",
|
|
9414
|
+
"aria-label",
|
|
9415
|
+
"disabled",
|
|
9416
|
+
"onClick"
|
|
9417
|
+
])) : s("", !0)
|
|
9418
|
+
], 8, Sm), P(b)(t)?.success === !1 ? (T(), c("p", Cm, M(P(b)(t)?.error ?? P(d)("scheduleTimeFailed")), 1)) : s("", !0)]))), 128)),
|
|
9419
|
+
P(h) ? (T(), c("p", wm, M(P(d)("duplicateScheduleTimes")), 1)) : s("", !0),
|
|
9420
|
+
f(P(V), {
|
|
9421
|
+
label: P(d)("addScheduleTime"),
|
|
9422
|
+
icon: P(de),
|
|
9423
|
+
text: "",
|
|
9424
|
+
size: "small",
|
|
9425
|
+
severity: "secondary",
|
|
9426
|
+
disabled: e.submitting,
|
|
9427
|
+
"data-testid": "add-schedule-time",
|
|
9428
|
+
onClick: P(_)
|
|
9429
|
+
}, null, 8, [
|
|
9430
|
+
"label",
|
|
9431
|
+
"icon",
|
|
9432
|
+
"disabled",
|
|
9433
|
+
"onClick"
|
|
9434
|
+
])
|
|
9435
|
+
]), l("div", Tm, M(e.contentPreview), 1)])]),
|
|
9225
9436
|
_: 1
|
|
9226
9437
|
}, 8, ["visible", "header"]));
|
|
9227
9438
|
}
|
|
9228
|
-
}),
|
|
9439
|
+
}), Dm = [
|
|
9229
9440
|
"aria-selected",
|
|
9230
9441
|
"onMouseover",
|
|
9231
9442
|
"onMousedown"
|
|
9232
|
-
],
|
|
9443
|
+
], Om = {
|
|
9233
9444
|
key: 1,
|
|
9234
9445
|
class: "trigger-menu__avatar-fallback",
|
|
9235
9446
|
"aria-hidden": "true"
|
|
9236
|
-
},
|
|
9447
|
+
}, km = { class: "min-w-0" }, Am = { class: "trigger-menu__label" }, jm = {
|
|
9237
9448
|
key: 0,
|
|
9238
9449
|
class: "trigger-menu__subtitle"
|
|
9239
|
-
},
|
|
9450
|
+
}, Mm = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
9240
9451
|
__name: "ComposerTriggerMenu",
|
|
9241
9452
|
props: /*@__PURE__*/ _({
|
|
9242
9453
|
visible: { type: Boolean },
|
|
@@ -9271,18 +9482,18 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9271
9482
|
src: e.avatar,
|
|
9272
9483
|
name: e.label,
|
|
9273
9484
|
size: "sm"
|
|
9274
|
-
}, null, 8, ["src", "name"])) : (T(), c("span",
|
|
9485
|
+
}, null, 8, ["src", "name"])) : (T(), c("span", Om, M(e.label.charAt(0)), 1)), l("span", km, [l("span", Am, M(e.label), 1), e.subtitle ? (T(), c("span", jm, M(e.subtitle), 1)) : s("", !0)])], 42, Dm))), 128))], 38)) : s("", !0)]));
|
|
9275
9486
|
}
|
|
9276
|
-
}), [["__scopeId", "data-v-9cc0f5b0"]]),
|
|
9487
|
+
}), [["__scopeId", "data-v-9cc0f5b0"]]), Nm = ["accept", "disabled"], Pm = { class: "px-1 pb-1.5" }, Fm = {
|
|
9277
9488
|
key: 0,
|
|
9278
9489
|
class: "composer-file-preview"
|
|
9279
|
-
},
|
|
9490
|
+
}, Im = { class: "min-w-0" }, Lm = { class: "heading-sm text-default truncate" }, Rm = { class: "body-sm text-subtle" }, zm = ["data-placeholder"], Bm = {
|
|
9280
9491
|
key: 0,
|
|
9281
9492
|
class: "body-sm text-subtle flex items-center gap-2 px-0.5"
|
|
9282
|
-
},
|
|
9493
|
+
}, Vm = {
|
|
9283
9494
|
key: 2,
|
|
9284
9495
|
class: "ml-auto"
|
|
9285
|
-
},
|
|
9496
|
+
}, Hm = 450, Um = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
9286
9497
|
__name: "MessageComposer",
|
|
9287
9498
|
props: {
|
|
9288
9499
|
modelValue: {},
|
|
@@ -9298,7 +9509,9 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9298
9509
|
mentionCandidates: {},
|
|
9299
9510
|
mentionNameByUid: {},
|
|
9300
9511
|
mentionsEnabled: { type: Boolean },
|
|
9301
|
-
schedulingEnabled: { type: Boolean }
|
|
9512
|
+
schedulingEnabled: { type: Boolean },
|
|
9513
|
+
scheduleResult: {},
|
|
9514
|
+
scheduling: { type: Boolean }
|
|
9302
9515
|
},
|
|
9303
9516
|
emits: [
|
|
9304
9517
|
"update:modelValue",
|
|
@@ -9316,7 +9529,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9316
9529
|
video: "video/*",
|
|
9317
9530
|
audio: "audio/*",
|
|
9318
9531
|
file: "*/*"
|
|
9319
|
-
}, i = e, u = n, d = D(null), p = D(null), m = D(null), h = D("file"), _ = D(!1), b = D(!1), x = D(!1), S = D(""), C = D(""), w = D(!1), { t: E } = J(), { isTouchUI: O } =
|
|
9532
|
+
}, i = e, u = n, d = D(null), p = D(null), m = D(null), h = D("file"), _ = D(!1), b = D(!1), x = D(!1), S = D(""), C = D(""), w = D(!1), { t: E } = J(), { isTouchUI: O } = kp(), k = null, A = D(null), j = D(null), { applyLink: N, applyFormat: F, cancelLink: ee, editorKey: I, formatMenuPosition: L, focusEditor: z, handleContextMenu: te, handleInput: ne, handleKeydown: re, handlePaste: H, hideFormatMenu: U, requestLink: ie, resetEditor: ae, showFormatMenu: W, triggerCandidates: oe, triggerMenuPosition: G, highlightedTriggerIndex: se, showTriggerMenu: le, selectTriggerCandidate: ue } = Lp(A, j, {
|
|
9320
9533
|
getModelValue: () => i.modelValue,
|
|
9321
9534
|
updateModelValue: (e) => u("update:modelValue", e),
|
|
9322
9535
|
submit: () => Ae(),
|
|
@@ -9360,7 +9573,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9360
9573
|
}
|
|
9361
9574
|
function we(e) {
|
|
9362
9575
|
if (i.disabled) return;
|
|
9363
|
-
let t =
|
|
9576
|
+
let t = Op(e);
|
|
9364
9577
|
if (t) {
|
|
9365
9578
|
e.preventDefault(), m.value = t, xe();
|
|
9366
9579
|
return;
|
|
@@ -9414,7 +9627,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9414
9627
|
function Fe(e) {
|
|
9415
9628
|
!i.disabled && ge.value && (e instanceof MouseEvent && e.button !== 0 || (w.value = !1, Pe(), k = setTimeout(() => {
|
|
9416
9629
|
k = null, w.value = !0, b.value = !0;
|
|
9417
|
-
},
|
|
9630
|
+
}, Hm)));
|
|
9418
9631
|
}
|
|
9419
9632
|
function Ie() {
|
|
9420
9633
|
Pe();
|
|
@@ -9438,15 +9651,15 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9438
9651
|
disabled: e.disabled,
|
|
9439
9652
|
onChange: Ce,
|
|
9440
9653
|
onCancel: xe
|
|
9441
|
-
}, null, 40,
|
|
9442
|
-
e.editingMessage ? (T(), o(
|
|
9654
|
+
}, null, 40, Nm),
|
|
9655
|
+
e.editingMessage ? (T(), o(Jp, {
|
|
9443
9656
|
key: 0,
|
|
9444
9657
|
message: e.editingMessage,
|
|
9445
9658
|
variant: "editing",
|
|
9446
9659
|
"context-label": e.contextLabel,
|
|
9447
9660
|
onCancel: n[0] ||= (e) => u("cancelEdit")
|
|
9448
9661
|
}, null, 8, ["message", "context-label"])) : s("", !0),
|
|
9449
|
-
e.replyToMessage ? (T(), o(
|
|
9662
|
+
e.replyToMessage ? (T(), o(Jp, {
|
|
9450
9663
|
key: 1,
|
|
9451
9664
|
message: e.replyToMessage,
|
|
9452
9665
|
variant: "replying",
|
|
@@ -9454,8 +9667,8 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9454
9667
|
"data-testid": "composer-reply-context",
|
|
9455
9668
|
onCancel: n[1] ||= (e) => u("cancelReply")
|
|
9456
9669
|
}, null, 8, ["message", "context-label"])) : s("", !0),
|
|
9457
|
-
l("div",
|
|
9458
|
-
m.value ? (T(), c("div",
|
|
9670
|
+
l("div", Pm, [
|
|
9671
|
+
m.value ? (T(), c("div", Fm, [l("div", Im, [l("p", Lm, M(m.value.name), 1), l("p", Rm, M(m.value.type || pe.value), 1)]), f(P(V), {
|
|
9459
9672
|
icon: P(ve),
|
|
9460
9673
|
text: "",
|
|
9461
9674
|
rounded: "",
|
|
@@ -9467,7 +9680,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9467
9680
|
ref: A,
|
|
9468
9681
|
class: y(["composer-shell", i.compact ? "composer-shell--compact" : "composer-shell--default"])
|
|
9469
9682
|
}, [
|
|
9470
|
-
f(
|
|
9683
|
+
f(Up, {
|
|
9471
9684
|
ref_key: "composerActionsRef",
|
|
9472
9685
|
ref: p,
|
|
9473
9686
|
onPickFile: Se,
|
|
@@ -9504,8 +9717,8 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9504
9717
|
onKeydown: n[6] ||= (...e) => P(re) && P(re)(...e),
|
|
9505
9718
|
onPaste: we,
|
|
9506
9719
|
onContextmenu: n[7] ||= (...e) => P(te) && P(te)(...e)
|
|
9507
|
-
}, null, 42,
|
|
9508
|
-
m.value || e.editingMessage || e.contextLabel || e.offlineMode ? (T(), c("div",
|
|
9720
|
+
}, null, 42, zm)),
|
|
9721
|
+
m.value || e.editingMessage || e.contextLabel || e.offlineMode ? (T(), c("div", Bm, [
|
|
9509
9722
|
e.editingMessage ? (T(), o(P(ce), {
|
|
9510
9723
|
key: 0,
|
|
9511
9724
|
text: P(E)("editing"),
|
|
@@ -9522,7 +9735,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9522
9735
|
size: "sm",
|
|
9523
9736
|
class: "composer-meta-tag"
|
|
9524
9737
|
}, null, 8, ["text"])) : s("", !0),
|
|
9525
|
-
e.offlineMode ? (T(), c("p",
|
|
9738
|
+
e.offlineMode ? (T(), c("p", Vm, M(e.pendingQueueCount ? P(E)("offlineQueued", { count: e.pendingQueueCount }) : P(E)("offline")), 1)) : s("", !0)
|
|
9526
9739
|
])) : s("", !0),
|
|
9527
9740
|
e.showScheduledButton ? (T(), o(P(V), {
|
|
9528
9741
|
key: 1,
|
|
@@ -9562,7 +9775,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9562
9775
|
"icon"
|
|
9563
9776
|
])
|
|
9564
9777
|
], 2),
|
|
9565
|
-
f(
|
|
9778
|
+
f(im, {
|
|
9566
9779
|
visible: P(W),
|
|
9567
9780
|
position: P(L),
|
|
9568
9781
|
onFormat: n[9] ||= (e) => P(F)(e),
|
|
@@ -9572,7 +9785,7 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9572
9785
|
"position",
|
|
9573
9786
|
"onLink"
|
|
9574
9787
|
]),
|
|
9575
|
-
f(
|
|
9788
|
+
f(Mm, {
|
|
9576
9789
|
"highlighted-index": P(se),
|
|
9577
9790
|
"onUpdate:highlightedIndex": n[10] ||= (e) => g(se) ? se.value = e : null,
|
|
9578
9791
|
visible: P(le),
|
|
@@ -9585,13 +9798,13 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9585
9798
|
"position",
|
|
9586
9799
|
"candidates"
|
|
9587
9800
|
]),
|
|
9588
|
-
f(
|
|
9801
|
+
f(gm, {
|
|
9589
9802
|
visible: _.value,
|
|
9590
9803
|
"onUpdate:visible": n[12] ||= (e) => _.value = e,
|
|
9591
9804
|
disabled: e.disabled,
|
|
9592
9805
|
onSend: je
|
|
9593
9806
|
}, null, 8, ["visible", "disabled"]),
|
|
9594
|
-
f(
|
|
9807
|
+
f(um, {
|
|
9595
9808
|
visible: x.value,
|
|
9596
9809
|
"onUpdate:visible": n[13] ||= (e) => x.value = e,
|
|
9597
9810
|
disabled: e.disabled,
|
|
@@ -9605,30 +9818,34 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9605
9818
|
"initial-url",
|
|
9606
9819
|
"selected-text"
|
|
9607
9820
|
]),
|
|
9608
|
-
f(
|
|
9821
|
+
f(Em, {
|
|
9609
9822
|
visible: b.value,
|
|
9610
9823
|
"onUpdate:visible": n[14] ||= (e) => b.value = e,
|
|
9611
9824
|
disabled: e.disabled,
|
|
9612
9825
|
"can-schedule": ge.value,
|
|
9613
9826
|
"content-preview": ye.value,
|
|
9827
|
+
result: e.scheduleResult,
|
|
9828
|
+
submitting: e.scheduling,
|
|
9614
9829
|
onSchedule: Me
|
|
9615
9830
|
}, null, 8, [
|
|
9616
9831
|
"visible",
|
|
9617
9832
|
"disabled",
|
|
9618
9833
|
"can-schedule",
|
|
9619
|
-
"content-preview"
|
|
9834
|
+
"content-preview",
|
|
9835
|
+
"result",
|
|
9836
|
+
"submitting"
|
|
9620
9837
|
])
|
|
9621
9838
|
])
|
|
9622
9839
|
], 2));
|
|
9623
9840
|
}
|
|
9624
|
-
}), [["__scopeId", "data-v-
|
|
9841
|
+
}), [["__scopeId", "data-v-9b244c9b"]]), Wm = {
|
|
9625
9842
|
key: 1,
|
|
9626
9843
|
class: "composer-readonly-notice"
|
|
9627
|
-
},
|
|
9844
|
+
}, Gm = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
9628
9845
|
__name: "ConversationComposer",
|
|
9629
9846
|
props: { target: {} },
|
|
9630
9847
|
setup(e, { expose: t }) {
|
|
9631
|
-
let n = e, { t: r } = J(), i =
|
|
9848
|
+
let n = e, { t: r } = J(), i = tp(), l = op(), u = dp(), d = gp(), f = xp(), p = a(() => n.target === "thread"), m = a({
|
|
9632
9849
|
get: () => p.value ? u.threadDraft.value : u.draft.value,
|
|
9633
9850
|
set: (e) => {
|
|
9634
9851
|
p.value ? u.threadDraft.value = e : u.draft.value = e;
|
|
@@ -9658,26 +9875,29 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9658
9875
|
input: e
|
|
9659
9876
|
});
|
|
9660
9877
|
}
|
|
9661
|
-
|
|
9878
|
+
let E = D(null);
|
|
9879
|
+
function O() {
|
|
9662
9880
|
f.emit("ui:openScheduled");
|
|
9663
9881
|
}
|
|
9664
|
-
function
|
|
9882
|
+
function k() {
|
|
9665
9883
|
f.emit("composer:cancelReply");
|
|
9666
9884
|
}
|
|
9667
|
-
function
|
|
9885
|
+
function A() {
|
|
9668
9886
|
f.emit("composer:cancelEdit");
|
|
9669
9887
|
}
|
|
9670
|
-
let
|
|
9671
|
-
|
|
9672
|
-
|
|
9888
|
+
let j = D(null);
|
|
9889
|
+
Sp(f, "ui:closeComposerActions", () => {
|
|
9890
|
+
j.value?.hideComposerActions();
|
|
9891
|
+
}), Sp(f, "composer:scheduleResult", (e) => {
|
|
9892
|
+
e.target === n.target && (E.value = e.result);
|
|
9673
9893
|
});
|
|
9674
|
-
async function
|
|
9675
|
-
await
|
|
9894
|
+
async function N() {
|
|
9895
|
+
await j.value?.focusEditor();
|
|
9676
9896
|
}
|
|
9677
|
-
return t({ focusEditor:
|
|
9897
|
+
return t({ focusEditor: N }), (e, t) => y.value ? (T(), o(Um, {
|
|
9678
9898
|
key: 0,
|
|
9679
9899
|
ref_key: "composerRef",
|
|
9680
|
-
ref:
|
|
9900
|
+
ref: j,
|
|
9681
9901
|
"model-value": m.value,
|
|
9682
9902
|
disabled: v.value,
|
|
9683
9903
|
"reset-signal": h.value,
|
|
@@ -9691,14 +9911,16 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9691
9911
|
"mention-name-by-uid": P(i).mentionNameByUid.value,
|
|
9692
9912
|
"mentions-enabled": !!P(i).conversation.value && !P(i).isChannel.value,
|
|
9693
9913
|
"scheduling-enabled": P(i).conversation.value?.type !== "user",
|
|
9914
|
+
"schedule-result": E.value,
|
|
9915
|
+
scheduling: P(u).isSchedulingMessage.value,
|
|
9694
9916
|
"onUpdate:modelValue": t[0] ||= (e) => m.value = e,
|
|
9695
9917
|
onSendText: x,
|
|
9696
9918
|
onSendAttachment: S,
|
|
9697
9919
|
onSendPoll: C,
|
|
9698
9920
|
onScheduleMessage: w,
|
|
9699
|
-
onOpenScheduled:
|
|
9700
|
-
onCancelReply:
|
|
9701
|
-
onCancelEdit:
|
|
9921
|
+
onOpenScheduled: O,
|
|
9922
|
+
onCancelReply: k,
|
|
9923
|
+
onCancelEdit: A
|
|
9702
9924
|
}, null, 8, [
|
|
9703
9925
|
"model-value",
|
|
9704
9926
|
"disabled",
|
|
@@ -9712,12 +9934,14 @@ var Ap = ["data-testid", "onClick"], jp = { class: "composer-actions-menu__icon"
|
|
|
9712
9934
|
"mention-candidates",
|
|
9713
9935
|
"mention-name-by-uid",
|
|
9714
9936
|
"mentions-enabled",
|
|
9715
|
-
"scheduling-enabled"
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9937
|
+
"scheduling-enabled",
|
|
9938
|
+
"schedule-result",
|
|
9939
|
+
"scheduling"
|
|
9940
|
+
])) : b.value ? (T(), c("div", Wm, M(p.value ? P(r)("repliesDisabledInChannels") : P(r)("readOnlyChannel")), 1)) : s("", !0);
|
|
9941
|
+
}
|
|
9942
|
+
}), [["__scopeId", "data-v-d6740840"]]), Km = e("Browser", { web: () => import("./web-DSJwqhTK.js").then((e) => new e.BrowserWeb()) }), qm = 1800;
|
|
9943
|
+
function Jm(e) {
|
|
9944
|
+
let n = e.actionMenuRef, r = D(null), i = D(null), a = D({}), o = D({}), { isTouchUI: s } = kp(), c = null;
|
|
9721
9945
|
function l(e) {
|
|
9722
9946
|
return e.kind === "text" && Kc(e.text);
|
|
9723
9947
|
}
|
|
@@ -9770,7 +9994,7 @@ function Im(e) {
|
|
|
9770
9994
|
let n = x(e);
|
|
9771
9995
|
if (n?.url) {
|
|
9772
9996
|
try {
|
|
9773
|
-
if (t.getPlatform() !== "web") await
|
|
9997
|
+
if (t.getPlatform() !== "web") await Km.open({
|
|
9774
9998
|
url: n.url,
|
|
9775
9999
|
windowName: "_self"
|
|
9776
10000
|
});
|
|
@@ -9896,7 +10120,7 @@ function Im(e) {
|
|
|
9896
10120
|
}
|
|
9897
10121
|
i.value = e.id, c && clearTimeout(c), c = setTimeout(() => {
|
|
9898
10122
|
i.value = null;
|
|
9899
|
-
},
|
|
10123
|
+
}, qm), A();
|
|
9900
10124
|
}
|
|
9901
10125
|
function F(t) {
|
|
9902
10126
|
e.canReply() && (e.emit.reply(t), A());
|
|
@@ -10072,8 +10296,8 @@ function Im(e) {
|
|
|
10072
10296
|
}
|
|
10073
10297
|
//#endregion
|
|
10074
10298
|
//#region src/composables/useMessageListScroll.ts
|
|
10075
|
-
var
|
|
10076
|
-
function
|
|
10299
|
+
var Ym = 1, Xm = 2, Zm = 80, Qm = 1800, $m = 4;
|
|
10300
|
+
function eh(e) {
|
|
10077
10301
|
let t = e.threadRef, n = !0, r = 0, i = null, a = null, o = null, s = null;
|
|
10078
10302
|
function c() {
|
|
10079
10303
|
o != null && (cancelAnimationFrame(o), o = null);
|
|
@@ -10111,7 +10335,7 @@ function Hm(e) {
|
|
|
10111
10335
|
expectedScrollTop: t,
|
|
10112
10336
|
timeoutId: setTimeout(() => {
|
|
10113
10337
|
f();
|
|
10114
|
-
},
|
|
10338
|
+
}, Qm)
|
|
10115
10339
|
}, p(e);
|
|
10116
10340
|
}
|
|
10117
10341
|
function h() {
|
|
@@ -10122,9 +10346,9 @@ function Hm(e) {
|
|
|
10122
10346
|
let a = t.value;
|
|
10123
10347
|
if (!a) return;
|
|
10124
10348
|
let o = a.scrollTop;
|
|
10125
|
-
i?.el === a && Math.abs(o - i.expectedScrollTop) >
|
|
10349
|
+
i?.el === a && Math.abs(o - i.expectedScrollTop) > $m && f();
|
|
10126
10350
|
let s = o < r, c = Math.max(0, a.scrollHeight - o - a.clientHeight);
|
|
10127
|
-
s && c >
|
|
10351
|
+
s && c > Ym ? n = !1 : c <= Xm && !n && (n = !0, e.onAtBottom?.()), r = o, a.scrollTop <= Zm && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
|
|
10128
10352
|
}
|
|
10129
10353
|
return R(() => {
|
|
10130
10354
|
let t = e.getMessages();
|
|
@@ -10152,14 +10376,14 @@ function Hm(e) {
|
|
|
10152
10376
|
}
|
|
10153
10377
|
//#endregion
|
|
10154
10378
|
//#region src/composables/useImageZoom.ts
|
|
10155
|
-
var
|
|
10156
|
-
function
|
|
10379
|
+
var th = 1, nh = 4;
|
|
10380
|
+
function rh(e) {
|
|
10157
10381
|
let t = D(1), n = D(0), r = D(0), i = D(!1), a = /* @__PURE__ */ new Map(), o = null, s = 0, c = 0, l = 0, u = 0, d = 0, f = 1, p = 0, m = 0;
|
|
10158
10382
|
function h(e, t, n) {
|
|
10159
10383
|
return Math.min(Math.max(e, t), n);
|
|
10160
10384
|
}
|
|
10161
10385
|
function g(e) {
|
|
10162
|
-
return h(e,
|
|
10386
|
+
return h(e, th, nh);
|
|
10163
10387
|
}
|
|
10164
10388
|
function _(n, r, i = t.value) {
|
|
10165
10389
|
let a = e.viewportRef.value?.clientWidth ?? 0, o = e.viewportRef.value?.clientHeight ?? 0, s = e.imageRef.value?.clientWidth ?? a, c = e.imageRef.value?.clientHeight ?? o, l = s * i, u = c * i, d = Math.max(0, (l - a) / 2), f = Math.max(0, (u - o) / 2);
|
|
@@ -10249,16 +10473,16 @@ function Gm(e) {
|
|
|
10249
10473
|
}
|
|
10250
10474
|
//#endregion
|
|
10251
10475
|
//#region src/components/overlays/FullscreenDialog.vue?vue&type=script&setup=true&lang.ts
|
|
10252
|
-
var
|
|
10476
|
+
var ih = { class: "fullscreen-dialog__header min-w-0 flex-1" }, ah = { class: "heading-sm text-default truncate" }, oh = {
|
|
10253
10477
|
key: 0,
|
|
10254
10478
|
class: "body-sm text-subtle truncate"
|
|
10255
|
-
},
|
|
10479
|
+
}, sh = { class: "w-full" }, ch = {
|
|
10256
10480
|
key: 0,
|
|
10257
10481
|
class: "fullscreen-dialog__actions"
|
|
10258
|
-
},
|
|
10482
|
+
}, lh = {
|
|
10259
10483
|
key: 0,
|
|
10260
10484
|
class: "fullscreen-dialog__footer"
|
|
10261
|
-
},
|
|
10485
|
+
}, uh = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10262
10486
|
__name: "FullscreenDialog",
|
|
10263
10487
|
props: {
|
|
10264
10488
|
open: { type: Boolean },
|
|
@@ -10284,7 +10508,7 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10284
10508
|
pt: { root: { "aria-label": n.title || void 0 } },
|
|
10285
10509
|
"onUpdate:visible": i
|
|
10286
10510
|
}, {
|
|
10287
|
-
header: z(() => [l("div",
|
|
10511
|
+
header: z(() => [l("div", ih, [l("p", ah, M(e.title), 1), e.subtitle ? (T(), c("p", oh, M(e.subtitle), 1)) : s("", !0)])]),
|
|
10288
10512
|
closebutton: z(({ closeCallback: t }) => [f(P(V), {
|
|
10289
10513
|
icon: P(ve),
|
|
10290
10514
|
"aria-label": e.closeAriaLabel || e.closeLabel,
|
|
@@ -10298,7 +10522,7 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10298
10522
|
"aria-label",
|
|
10299
10523
|
"onClick"
|
|
10300
10524
|
])]),
|
|
10301
|
-
default: z(() => [l("div",
|
|
10525
|
+
default: z(() => [l("div", sh, [t.$slots.actions ? (T(), c("div", ch, [k(t.$slots, "actions", {}, void 0, !0)])) : s("", !0), k(t.$slots, "default", {}, void 0, !0)]), t.$slots.footer ? (T(), c("div", lh, [k(t.$slots, "footer", {}, void 0, !0)])) : s("", !0)]),
|
|
10302
10526
|
_: 3
|
|
10303
10527
|
}, 8, [
|
|
10304
10528
|
"visible",
|
|
@@ -10306,23 +10530,23 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10306
10530
|
"pt"
|
|
10307
10531
|
]));
|
|
10308
10532
|
}
|
|
10309
|
-
}), [["__scopeId", "data-v-de874d43"]]),
|
|
10533
|
+
}), [["__scopeId", "data-v-de874d43"]]), dh = ["href"], fh = { class: "media-viewer-shell flex min-h-0 flex-1 items-center justify-center overflow-hidden" }, ph = ["src", "alt"], mh = {
|
|
10310
10534
|
key: 1,
|
|
10311
10535
|
class: "media-viewer-stage media-viewer-stage-video flex w-full items-center justify-center"
|
|
10312
|
-
},
|
|
10536
|
+
}, hh = {
|
|
10313
10537
|
class: "max-h-full w-full bg-black",
|
|
10314
10538
|
controls: "",
|
|
10315
10539
|
playsinline: "",
|
|
10316
10540
|
autoplay: ""
|
|
10317
|
-
},
|
|
10541
|
+
}, gh = ["src", "type"], _h = {
|
|
10318
10542
|
key: 0,
|
|
10319
10543
|
class: "media-viewer-footer flex min-w-0 items-center justify-between gap-3 px-4 py-3 max-md:px-3.5 max-md:py-3"
|
|
10320
|
-
},
|
|
10544
|
+
}, vh = { class: "min-w-0 flex-1" }, yh = { class: "heading-sm text-default truncate" }, bh = { class: "body-sm text-subtle" }, xh = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10321
10545
|
__name: "MediaViewerDialog",
|
|
10322
10546
|
props: { attachment: {} },
|
|
10323
10547
|
emits: ["close"],
|
|
10324
10548
|
setup(e, { emit: t }) {
|
|
10325
|
-
let n = e, i = t, u = D(null), d = D(null), f = a(() => !!n.attachment?.url), p = a(() => n.attachment?.kind === "image"), m = a(() => n.attachment?.kind === "video"), { t: h } = J(), { scale: g, translateX: _, translateY: v, isDragging: b, resetTransform: S, handlePointerDown: C, handlePointerMove: w, handlePointerUp: E, handlePointerCancel: O, handleWheel: k, handleDoubleClick: j } =
|
|
10549
|
+
let n = e, i = t, u = D(null), d = D(null), f = a(() => !!n.attachment?.url), p = a(() => n.attachment?.kind === "image"), m = a(() => n.attachment?.kind === "video"), { t: h } = J(), { scale: g, translateX: _, translateY: v, isDragging: b, resetTransform: S, handlePointerDown: C, handlePointerMove: w, handlePointerUp: E, handlePointerCancel: O, handleWheel: k, handleDoubleClick: j } = rh({
|
|
10326
10550
|
viewportRef: u,
|
|
10327
10551
|
imageRef: d,
|
|
10328
10552
|
isImage: () => p.value
|
|
@@ -10333,7 +10557,7 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10333
10557
|
function N() {
|
|
10334
10558
|
i("close");
|
|
10335
10559
|
}
|
|
10336
|
-
return (t, n) => (T(), o(
|
|
10560
|
+
return (t, n) => (T(), o(uh, {
|
|
10337
10561
|
open: f.value,
|
|
10338
10562
|
title: e.attachment?.name || P(h)("attachment"),
|
|
10339
10563
|
subtitle: e.attachment?.kind || "",
|
|
@@ -10350,9 +10574,9 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10350
10574
|
}, [(T(), o(A(P(Be)), {
|
|
10351
10575
|
class: "size-4",
|
|
10352
10576
|
"aria-hidden": "true"
|
|
10353
|
-
})), l("span", null, M(P(h)("openInNewTab")), 1)], 8,
|
|
10354
|
-
footer: z(() => [e.attachment ? (T(), c("div",
|
|
10355
|
-
default: z(() => [l("div",
|
|
10577
|
+
})), l("span", null, M(P(h)("openInNewTab")), 1)], 8, dh)) : s("", !0)]),
|
|
10578
|
+
footer: z(() => [e.attachment ? (T(), c("div", _h, [l("div", vh, [l("p", yh, M(e.attachment.name), 1), l("p", bh, M(e.attachment.kind), 1)])])) : s("", !0)]),
|
|
10579
|
+
default: z(() => [l("div", fh, [e.attachment?.url ? (T(), c(r, { key: 0 }, [p.value ? (T(), c("div", {
|
|
10356
10580
|
key: 0,
|
|
10357
10581
|
ref_key: "viewportRef",
|
|
10358
10582
|
ref: u,
|
|
@@ -10375,10 +10599,10 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10375
10599
|
transform: `translate3d(${P(_)}px, ${P(v)}px, 0) scale(${P(g)})`,
|
|
10376
10600
|
transformOrigin: "center center"
|
|
10377
10601
|
})
|
|
10378
|
-
}, null, 14,
|
|
10602
|
+
}, null, 14, ph)], 544)) : m.value ? (T(), c("div", mh, [l("video", hh, [l("source", {
|
|
10379
10603
|
src: e.attachment.url,
|
|
10380
10604
|
type: e.attachment.mimeType || void 0
|
|
10381
|
-
}, null, 8,
|
|
10605
|
+
}, null, 8, gh)])])) : s("", !0)], 64)) : s("", !0)])]),
|
|
10382
10606
|
_: 1
|
|
10383
10607
|
}, 8, [
|
|
10384
10608
|
"open",
|
|
@@ -10391,7 +10615,7 @@ var Km = { class: "fullscreen-dialog__header min-w-0 flex-1" }, qm = { class: "h
|
|
|
10391
10615
|
}), [["__scopeId", "data-v-52ad66cb"]]);
|
|
10392
10616
|
//#endregion
|
|
10393
10617
|
//#region src/composables/useAudioPlayer.ts
|
|
10394
|
-
function
|
|
10618
|
+
function Sh(e) {
|
|
10395
10619
|
let t = D(!1), n = D(0), r = D(0), i = D(!1);
|
|
10396
10620
|
function a() {
|
|
10397
10621
|
t.value = !0;
|
|
@@ -10447,19 +10671,19 @@ function uh(e) {
|
|
|
10447
10671
|
}
|
|
10448
10672
|
//#endregion
|
|
10449
10673
|
//#region src/components/messages/AudioStickyPlayer.vue?vue&type=script&setup=true&lang.ts
|
|
10450
|
-
var
|
|
10674
|
+
var Ch = {
|
|
10451
10675
|
key: 0,
|
|
10452
10676
|
class: "audio-sticky-player flex items-center gap-2 px-3 py-2"
|
|
10453
|
-
},
|
|
10677
|
+
}, wh = ["src", "type"], Th = { class: "audio-sticky-player__body min-w-0 flex-1" }, Eh = { class: "body-sm text-default truncate font-medium" }, Dh = { class: "flex items-center gap-2" }, Oh = [
|
|
10454
10678
|
"max",
|
|
10455
10679
|
"value",
|
|
10456
10680
|
"aria-label"
|
|
10457
|
-
],
|
|
10681
|
+
], kh = { class: "body-sm text-subtle shrink-0 tabular-nums" }, Ah = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10458
10682
|
__name: "AudioStickyPlayer",
|
|
10459
10683
|
props: { attachment: {} },
|
|
10460
10684
|
emits: ["close"],
|
|
10461
10685
|
setup(e, { emit: t }) {
|
|
10462
|
-
let n = e, r = t, { t: i } = J(), a = D(null), { isPlaying: o, currentTime: u, duration: d, togglePlay: p, startSeek: m, seek: h, endSeek: g } =
|
|
10686
|
+
let n = e, r = t, { t: i } = J(), a = D(null), { isPlaying: o, currentTime: u, duration: d, togglePlay: p, startSeek: m, seek: h, endSeek: g } = Sh({ audioRef: a });
|
|
10463
10687
|
R(() => n.attachment?.url, () => {
|
|
10464
10688
|
let e = a.value;
|
|
10465
10689
|
e && (e.load(), e.play());
|
|
@@ -10479,7 +10703,7 @@ var dh = {
|
|
|
10479
10703
|
function x(e) {
|
|
10480
10704
|
return !Number.isFinite(e) || e < 0 ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
10481
10705
|
}
|
|
10482
|
-
return (t, n) => e.attachment ? (T(), c("div",
|
|
10706
|
+
return (t, n) => e.attachment ? (T(), c("div", Ch, [
|
|
10483
10707
|
l("audio", {
|
|
10484
10708
|
ref_key: "audioRef",
|
|
10485
10709
|
ref: a,
|
|
@@ -10487,7 +10711,7 @@ var dh = {
|
|
|
10487
10711
|
}, [l("source", {
|
|
10488
10712
|
src: e.attachment.url,
|
|
10489
10713
|
type: e.attachment.mimeType || void 0
|
|
10490
|
-
}, null, 8,
|
|
10714
|
+
}, null, 8, wh)], 512),
|
|
10491
10715
|
f(P(V), {
|
|
10492
10716
|
icon: P(o) ? P(Ve) : P(We),
|
|
10493
10717
|
"aria-label": P(o) ? P(i)("pause") : P(i)("play"),
|
|
@@ -10501,7 +10725,7 @@ var dh = {
|
|
|
10501
10725
|
"aria-label",
|
|
10502
10726
|
"onClick"
|
|
10503
10727
|
]),
|
|
10504
|
-
l("div",
|
|
10728
|
+
l("div", Th, [l("p", Eh, M(e.attachment.name), 1), l("div", Dh, [l("input", {
|
|
10505
10729
|
type: "range",
|
|
10506
10730
|
class: "audio-sticky-player__seek min-w-0 flex-1",
|
|
10507
10731
|
min: "0",
|
|
@@ -10517,7 +10741,7 @@ var dh = {
|
|
|
10517
10741
|
onTouchmove: v,
|
|
10518
10742
|
onTouchend: v,
|
|
10519
10743
|
onChange: n[0] ||= (...e) => P(g) && P(g)(...e)
|
|
10520
|
-
}, null, 40,
|
|
10744
|
+
}, null, 40, Oh), l("span", kh, M(x(P(u))) + " / " + M(x(P(d))), 1)])]),
|
|
10521
10745
|
f(P(V), {
|
|
10522
10746
|
icon: P(ve),
|
|
10523
10747
|
"aria-label": P(i)("close"),
|
|
@@ -10529,7 +10753,7 @@ var dh = {
|
|
|
10529
10753
|
}, null, 8, ["icon", "aria-label"])
|
|
10530
10754
|
])) : s("", !0);
|
|
10531
10755
|
}
|
|
10532
|
-
}), [["__scopeId", "data-v-fc0db029"]]),
|
|
10756
|
+
}), [["__scopeId", "data-v-fc0db029"]]), jh = { class: "date-separator" }, Mh = { class: "date-separator__label" }, Nh = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10533
10757
|
__name: "MessageDateSeparator",
|
|
10534
10758
|
props: { date: {} },
|
|
10535
10759
|
setup(e) {
|
|
@@ -10543,9 +10767,9 @@ var dh = {
|
|
|
10543
10767
|
year: "numeric"
|
|
10544
10768
|
}).format(i);
|
|
10545
10769
|
});
|
|
10546
|
-
return (e, t) => (T(), c("div",
|
|
10770
|
+
return (e, t) => (T(), c("div", jh, [l("span", Mh, M(i.value), 1)]));
|
|
10547
10771
|
}
|
|
10548
|
-
}), [["__scopeId", "data-v-d235376e"]]),
|
|
10772
|
+
}), [["__scopeId", "data-v-d235376e"]]), Ph = e("Haptics", { web: () => import("./web-BXfaCfgZ.js").then((e) => new e.HapticsWeb()) }), Fh = /* @__PURE__ */ p({
|
|
10549
10773
|
__name: "PersonAvatar",
|
|
10550
10774
|
props: {
|
|
10551
10775
|
image: {},
|
|
@@ -10559,22 +10783,22 @@ var dh = {
|
|
|
10559
10783
|
shape: "circle"
|
|
10560
10784
|
}, null, 8, ["image", "label"]));
|
|
10561
10785
|
}
|
|
10562
|
-
}),
|
|
10786
|
+
}), Ih = {
|
|
10563
10787
|
"data-testid": "action-message",
|
|
10564
10788
|
class: "message-action-row border-default bg-elevation-surface-default body-sm text-subtle max-w-4/5 rounded-full border px-3 py-1 text-center"
|
|
10565
|
-
},
|
|
10789
|
+
}, Lh = { class: "message-action-row__text" }, Rh = /* @__PURE__ */ p({
|
|
10566
10790
|
__name: "ActionMessageRow",
|
|
10567
10791
|
props: { text: {} },
|
|
10568
10792
|
setup(e) {
|
|
10569
|
-
return (t, n) => (T(), c("div",
|
|
10793
|
+
return (t, n) => (T(), c("div", Ih, [l("span", Lh, M(e.text), 1)]));
|
|
10570
10794
|
}
|
|
10571
|
-
}),
|
|
10795
|
+
}), zh = ["href"], Bh = {
|
|
10572
10796
|
key: 0,
|
|
10573
10797
|
class: "bg-elevation-surface-hovered aspect-[1.9/1] w-full overflow-hidden"
|
|
10574
|
-
},
|
|
10798
|
+
}, Vh = ["src", "alt"], Hh = { class: "space-y-1.5 px-3 py-3" }, Uh = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, Wh = { class: "heading-sm text-default line-clamp-2" }, Gh = { class: "body-md text-subtle line-clamp-2" }, Kh = {
|
|
10575
10799
|
key: 0,
|
|
10576
10800
|
class: "body-sm text-subtlest"
|
|
10577
|
-
},
|
|
10801
|
+
}, qh = /* @__PURE__ */ p({
|
|
10578
10802
|
__name: "LinkPreviewCard",
|
|
10579
10803
|
props: {
|
|
10580
10804
|
url: {},
|
|
@@ -10641,18 +10865,18 @@ var dh = {
|
|
|
10641
10865
|
target: "_blank",
|
|
10642
10866
|
rel: "noreferrer",
|
|
10643
10867
|
class: y(["bg-elevation-surface-default shadow-raised mt-2 block overflow-hidden rounded-xl border-0 no-underline transition hover:opacity-95", e.isOwn ? "bg-elevation-surface-default text-default" : "bg-elevation-surface-sunken text-default"])
|
|
10644
|
-
}, [n.value?.imageUrl ? (T(), c("div",
|
|
10868
|
+
}, [n.value?.imageUrl ? (T(), c("div", Bh, [l("img", {
|
|
10645
10869
|
src: n.value.imageUrl,
|
|
10646
10870
|
alt: n.value.title || o.value,
|
|
10647
10871
|
class: "h-full w-full object-cover"
|
|
10648
|
-
}, null, 8,
|
|
10649
|
-
l("p",
|
|
10650
|
-
l("p",
|
|
10651
|
-
l("p",
|
|
10652
|
-
r.value && !n.value ? (T(), c("p",
|
|
10653
|
-
])], 10,
|
|
10654
|
-
}
|
|
10655
|
-
}),
|
|
10872
|
+
}, null, 8, Vh)])) : s("", !0), l("div", Hh, [
|
|
10873
|
+
l("p", Uh, M(n.value?.siteName || o.value), 1),
|
|
10874
|
+
l("p", Wh, M(n.value?.title || o.value), 1),
|
|
10875
|
+
l("p", Gh, M(n.value?.description || u.value), 1),
|
|
10876
|
+
r.value && !n.value ? (T(), c("p", Kh, M(P(i)("loadingPreview")), 1)) : s("", !0)
|
|
10877
|
+
])], 10, zh));
|
|
10878
|
+
}
|
|
10879
|
+
}), Jh = { class: "linkified-text" }, Yh = ["innerHTML"], Xh = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10656
10880
|
__name: "LinkifiedText",
|
|
10657
10881
|
props: {
|
|
10658
10882
|
text: {},
|
|
@@ -10671,25 +10895,25 @@ var dh = {
|
|
|
10671
10895
|
let t = e.target;
|
|
10672
10896
|
t.tagName === "A" && d(e, t);
|
|
10673
10897
|
}
|
|
10674
|
-
return (t, n) => (T(), c("div",
|
|
10898
|
+
return (t, n) => (T(), c("div", Jh, [l("div", {
|
|
10675
10899
|
class: y(["rich-text-content", e.textClass]),
|
|
10676
10900
|
onClick: f,
|
|
10677
10901
|
innerHTML: i.value
|
|
10678
|
-
}, null, 10,
|
|
10902
|
+
}, null, 10, Yh), e.showPreview !== !1 && u.value ? (T(), o(qh, {
|
|
10679
10903
|
key: 0,
|
|
10680
10904
|
url: u.value,
|
|
10681
10905
|
"is-own": e.isOwn
|
|
10682
10906
|
}, null, 8, ["url", "is-own"])) : s("", !0)]));
|
|
10683
10907
|
}
|
|
10684
|
-
}), [["__scopeId", "data-v-656b44e8"]]),
|
|
10908
|
+
}), [["__scopeId", "data-v-656b44e8"]]), Zh = { class: "w-full space-y-1" }, Qh = {
|
|
10685
10909
|
class: "attachment-video",
|
|
10686
10910
|
controls: "",
|
|
10687
10911
|
playsinline: "",
|
|
10688
10912
|
preload: "metadata"
|
|
10689
|
-
},
|
|
10913
|
+
}, $h = ["src", "type"], eg = ["onClick"], tg = { class: "inline-flex items-center gap-2 truncate font-medium" }, ng = ["href"], rg = { class: "flex min-w-0 items-center gap-2" }, ig = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, ag = { class: "text-default truncate font-medium" }, og = { class: "body-sm text-subtle shrink-0" }, sg = {
|
|
10690
10914
|
key: 4,
|
|
10691
10915
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm"
|
|
10692
|
-
},
|
|
10916
|
+
}, cg = { class: "flex min-w-0 items-center gap-2" }, lg = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, ug = { class: "text-default truncate font-medium" }, dg = { class: "body-sm text-subtle shrink-0" }, fg = 4 / 3, pg = 16 / 9, mg = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10693
10917
|
__name: "MessageAttachmentList",
|
|
10694
10918
|
props: { message: {} },
|
|
10695
10919
|
emits: ["openMedia"],
|
|
@@ -10744,12 +10968,12 @@ var dh = {
|
|
|
10744
10968
|
return !n || t.localeCompare(n, void 0, { sensitivity: "accent" }) !== 0;
|
|
10745
10969
|
}
|
|
10746
10970
|
function m(e) {
|
|
10747
|
-
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ?
|
|
10971
|
+
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ? pg : fg;
|
|
10748
10972
|
}
|
|
10749
10973
|
function h(e) {
|
|
10750
10974
|
return { aspectRatio: String(m(e)) };
|
|
10751
10975
|
}
|
|
10752
|
-
return (t, u) => (T(), c("div",
|
|
10976
|
+
return (t, u) => (T(), c("div", Zh, [(T(!0), c(r, null, O(e.message.attachments, (t) => (T(), c(r, { key: `${e.message.id}-${t.name}` }, [t.kind === "image" && t.url ? (T(), o(P(ie), {
|
|
10753
10977
|
key: 0,
|
|
10754
10978
|
preview: "",
|
|
10755
10979
|
src: t.url,
|
|
@@ -10769,34 +10993,34 @@ var dh = {
|
|
|
10769
10993
|
key: 1,
|
|
10770
10994
|
class: "attachment-media-bleed bg-elevation-surface-default shadow-raised attachment-media-frame group relative overflow-hidden rounded-xl border-0",
|
|
10771
10995
|
style: x(h(t))
|
|
10772
|
-
}, [l("video",
|
|
10996
|
+
}, [l("video", Qh, [l("source", {
|
|
10773
10997
|
src: t.url,
|
|
10774
10998
|
type: t.mimeType || void 0
|
|
10775
|
-
}, null, 8,
|
|
10999
|
+
}, null, 8, $h)])], 4)) : t.kind === "audio" && t.url ? (T(), c("button", {
|
|
10776
11000
|
key: 2,
|
|
10777
11001
|
type: "button",
|
|
10778
11002
|
class: "flex w-full items-center justify-between gap-3 rounded-2xl px-3 py-2 text-left text-sm transition hover:opacity-90",
|
|
10779
11003
|
onClick: (e) => n("openMedia", t)
|
|
10780
|
-
}, [l("span",
|
|
11004
|
+
}, [l("span", tg, [u[0] ||= l("span", { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 items-center justify-center rounded-full" }, " ♪ ", -1), d(" " + M(P(i)("audioMessage")), 1)])], 8, eg)) : t.url ? (T(), c("a", {
|
|
10781
11005
|
key: 3,
|
|
10782
11006
|
href: t.url,
|
|
10783
11007
|
target: "_blank",
|
|
10784
11008
|
rel: "noreferrer",
|
|
10785
11009
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm no-underline transition hover:opacity-90"
|
|
10786
|
-
}, [l("span",
|
|
11010
|
+
}, [l("span", rg, [l("span", ig, [(T(), o(A(f(t)), {
|
|
10787
11011
|
class: "size-5",
|
|
10788
11012
|
"aria-hidden": "true"
|
|
10789
|
-
}))]), l("span",
|
|
11013
|
+
}))]), l("span", ag, M(t.name), 1)]), l("span", og, M(a(t.size)), 1)], 8, ng)) : (T(), c("div", sg, [l("span", cg, [l("span", lg, [(T(), o(A(f(t)), {
|
|
10790
11014
|
class: "size-5",
|
|
10791
11015
|
"aria-hidden": "true"
|
|
10792
|
-
}))]), l("span",
|
|
11016
|
+
}))]), l("span", ug, M(t.name), 1)]), l("span", dg, M(a(t.size) || P(i)("queued")), 1)]))], 64))), 128)), p(e.message) ? (T(), o(Xh, {
|
|
10793
11017
|
key: 0,
|
|
10794
11018
|
text: e.message.text,
|
|
10795
11019
|
"is-own": e.message.isOwn,
|
|
10796
11020
|
"text-class": "whitespace-normal wrap-break-word body-md text-default"
|
|
10797
11021
|
}, null, 8, ["text", "is-own"])) : s("", !0)]));
|
|
10798
11022
|
}
|
|
10799
|
-
}), [["__scopeId", "data-v-5c0ccf0e"]]),
|
|
11023
|
+
}), [["__scopeId", "data-v-5c0ccf0e"]]), hg = { class: "message-status" }, gg = { key: 0 }, _g = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10800
11024
|
__name: "MessageDeliveryStatus",
|
|
10801
11025
|
props: { message: {} },
|
|
10802
11026
|
setup(e) {
|
|
@@ -10845,8 +11069,8 @@ var dh = {
|
|
|
10845
11069
|
};
|
|
10846
11070
|
}
|
|
10847
11071
|
});
|
|
10848
|
-
return (t, n) => (T(), c("div",
|
|
10849
|
-
e.message.isEdited && e.message.kind !== "poll" ? (T(), c("span",
|
|
11072
|
+
return (t, n) => (T(), c("div", hg, [
|
|
11073
|
+
e.message.isEdited && e.message.kind !== "poll" ? (T(), c("span", gg, M(P(r)("edited")), 1)) : s("", !0),
|
|
10850
11074
|
l("span", null, M(i(e.message.sentAt)), 1),
|
|
10851
11075
|
u.value ? (T(), o(A(u.value.icon), {
|
|
10852
11076
|
key: 1,
|
|
@@ -10861,17 +11085,17 @@ var dh = {
|
|
|
10861
11085
|
])) : s("", !0)
|
|
10862
11086
|
]));
|
|
10863
11087
|
}
|
|
10864
|
-
}), [["__scopeId", "data-v-a6e23274"]]),
|
|
11088
|
+
}), [["__scopeId", "data-v-a6e23274"]]), vg = {
|
|
10865
11089
|
key: 0,
|
|
10866
11090
|
class: "forwarded-label body-sm text-subtle mb-1"
|
|
10867
|
-
},
|
|
11091
|
+
}, yg = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10868
11092
|
__name: "MessageForwardedLabel",
|
|
10869
11093
|
props: { message: {} },
|
|
10870
11094
|
setup(e) {
|
|
10871
11095
|
let { t } = J();
|
|
10872
|
-
return (n, r) => e.message.forwardedFrom ? (T(), c("p",
|
|
11096
|
+
return (n, r) => e.message.forwardedFrom ? (T(), c("p", vg, M(P(t)("forwardedFrom", { name: e.message.forwardedFrom.senderName })), 1)) : s("", !0);
|
|
10873
11097
|
}
|
|
10874
|
-
}), [["__scopeId", "data-v-2227d78f"]]),
|
|
11098
|
+
}), [["__scopeId", "data-v-2227d78f"]]), bg = { class: "mb-1 flex items-start justify-between gap-2" }, xg = { class: "body-sm text-subtlest truncate font-medium!" }, Sg = /* @__PURE__ */ p({
|
|
10875
11099
|
__name: "MessageItemHeader",
|
|
10876
11100
|
props: { message: {} },
|
|
10877
11101
|
setup(e) {
|
|
@@ -10887,7 +11111,7 @@ var dh = {
|
|
|
10887
11111
|
function a() {
|
|
10888
11112
|
return t.message.senderName?.trim() || (t.message.isOwn ? r("you") : r("system"));
|
|
10889
11113
|
}
|
|
10890
|
-
return (t, n) => (T(), c("div",
|
|
11114
|
+
return (t, n) => (T(), c("div", bg, [l("span", xg, M(a()), 1), e.message.scheduled?.scheduleDate ? (T(), o(P(ce), {
|
|
10891
11115
|
key: 0,
|
|
10892
11116
|
text: P(r)("scheduledDateLabel", { date: i(e.message.scheduled.scheduleDate) }),
|
|
10893
11117
|
context: "warn",
|
|
@@ -10896,7 +11120,7 @@ var dh = {
|
|
|
10896
11120
|
class: "shrink-0"
|
|
10897
11121
|
}, null, 8, ["text"])) : s("", !0)]));
|
|
10898
11122
|
}
|
|
10899
|
-
}),
|
|
11123
|
+
}), Cg = ["disabled", "onClick"], wg = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10900
11124
|
__name: "MessageReactionList",
|
|
10901
11125
|
props: {
|
|
10902
11126
|
message: {},
|
|
@@ -10915,9 +11139,9 @@ var dh = {
|
|
|
10915
11139
|
class: y(["message-reaction-list__item rounded-full px-2 py-0.75 leading-none transition", t.reactedByMe ? "reaction-chip-selected" : e.message.isOwn ? "reaction-chip-own" : "reaction-chip-other"]),
|
|
10916
11140
|
disabled: e.disabled,
|
|
10917
11141
|
onClick: (e) => n("toggle", t.emoji)
|
|
10918
|
-
}, M(t.emoji) + " " + M(t.count), 11,
|
|
11142
|
+
}, M(t.emoji) + " " + M(t.count), 11, Cg))), 128))], 2)) : s("", !0);
|
|
10919
11143
|
}
|
|
10920
|
-
}), [["__scopeId", "data-v-c17c8bfd"]]),
|
|
11144
|
+
}), [["__scopeId", "data-v-c17c8bfd"]]), Tg = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, Eg = ["aria-label", "title"], Dg = { class: "message-reactions__thread-count" }, Og = /* @__PURE__ */ p({
|
|
10921
11145
|
__name: "MessageItemReactions",
|
|
10922
11146
|
props: {
|
|
10923
11147
|
message: {},
|
|
@@ -10927,7 +11151,7 @@ var dh = {
|
|
|
10927
11151
|
emits: ["toggleReaction", "openThread"],
|
|
10928
11152
|
setup(e, { emit: t }) {
|
|
10929
11153
|
let n = e, r = t, { t: i } = J(), u = a(() => i("threadReplies", { count: n.message.replyCount })), d = a(() => n.canOpenThread !== !1 && n.message.replyCount > 0);
|
|
10930
|
-
return (t, n) => (T(), c("div",
|
|
11154
|
+
return (t, n) => (T(), c("div", Tg, [f(wg, {
|
|
10931
11155
|
message: e.message,
|
|
10932
11156
|
disabled: e.canReact === !1,
|
|
10933
11157
|
compact: "",
|
|
@@ -10942,21 +11166,21 @@ var dh = {
|
|
|
10942
11166
|
}, [(T(), o(A(P(Ke)), {
|
|
10943
11167
|
class: "size-4",
|
|
10944
11168
|
"aria-hidden": "true"
|
|
10945
|
-
})), l("span",
|
|
11169
|
+
})), l("span", Dg, M(e.message.replyCount), 1)], 8, Eg)) : s("", !0)]));
|
|
10946
11170
|
}
|
|
10947
|
-
}),
|
|
11171
|
+
}), kg = { class: "pinned-label body-sm text-subtle mb-1 flex items-center gap-1 font-medium" }, Ag = /* @__PURE__ */ p({
|
|
10948
11172
|
__name: "MessagePinnedLabel",
|
|
10949
11173
|
setup(e) {
|
|
10950
11174
|
let { t } = J();
|
|
10951
|
-
return (e, n) => (T(), c("p",
|
|
11175
|
+
return (e, n) => (T(), c("p", kg, [f(P(Me), {
|
|
10952
11176
|
class: "pinned-label__icon size-3.5 shrink-0",
|
|
10953
11177
|
"aria-hidden": "true"
|
|
10954
11178
|
}), l("span", null, M(P(t)("pinnedLabel")), 1)]));
|
|
10955
11179
|
}
|
|
10956
|
-
}),
|
|
11180
|
+
}), jg = {
|
|
10957
11181
|
key: 0,
|
|
10958
11182
|
class: ""
|
|
10959
|
-
},
|
|
11183
|
+
}, Mg = { class: "heading-sm text-default" }, Ng = { class: "body-sm text-subtle" }, Pg = { class: "space-y-2 py-3" }, Fg = ["disabled", "onClick"], Ig = { class: "body-md flex items-center justify-between gap-3 px-3 py-1.5" }, Lg = { class: "body-sm text-subtle shrink-0" }, Rg = { class: "bg-alpha-default h-1.5" }, zg = /* @__PURE__ */ p({
|
|
10960
11184
|
__name: "MessagePollContent",
|
|
10961
11185
|
props: {
|
|
10962
11186
|
message: {},
|
|
@@ -10975,36 +11199,36 @@ var dh = {
|
|
|
10975
11199
|
let t = n.currentUserId;
|
|
10976
11200
|
return !(t && n.pendingOptionKey !== `${n.message.id}:${e}` && !n.message.poll.options.some((n) => n.id === e && n.voters.some((e) => e.uid === t)));
|
|
10977
11201
|
}
|
|
10978
|
-
return (t, n) => e.message.poll ? (T(), c("div",
|
|
11202
|
+
return (t, n) => e.message.poll ? (T(), c("div", jg, [l("div", null, [l("h4", Mg, M(e.message.poll.question), 1), l("p", Ng, M(P(a)("voteCount", { count: e.message.poll.totalVotes })), 1)]), l("div", Pg, [(T(!0), c(r, null, O(e.message.poll.options, (t) => (T(), c("button", {
|
|
10979
11203
|
key: t.id,
|
|
10980
11204
|
type: "button",
|
|
10981
11205
|
class: "shadow-raised bg-elevation-surface-raised-default block w-full overflow-hidden rounded-lg text-left",
|
|
10982
11206
|
disabled: u(t.id),
|
|
10983
11207
|
onClick: (e) => i("vote", t.id)
|
|
10984
|
-
}, [l("div",
|
|
11208
|
+
}, [l("div", Ig, [l("span", { class: y(["truncate font-medium", o(t.id) ? "text-success" : ""]) }, M(t.text), 3), l("span", Lg, M(P(a)("voteCount", { count: t.voteCount })), 1)]), l("div", Rg, [l("div", {
|
|
10985
11209
|
class: y(["h-full transition-all", o(t.id) ? "bg-accent-green-subtle-default" : "bg-accent-teal-subtle-default"]),
|
|
10986
11210
|
style: x({ width: `${e.message.poll.totalVotes ? t.voteCount / e.message.poll.totalVotes * 100 : 0}%` })
|
|
10987
|
-
}, null, 6)])], 8,
|
|
11211
|
+
}, null, 6)])], 8, Fg))), 128))])])) : s("", !0);
|
|
10988
11212
|
}
|
|
10989
|
-
}),
|
|
11213
|
+
}), Bg = { class: "heading-xs" }, Vg = { class: "truncate" }, Hg = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
10990
11214
|
__name: "MessageReplyQuote",
|
|
10991
11215
|
props: { message: {} },
|
|
10992
11216
|
emits: ["open"],
|
|
10993
11217
|
setup(e, { emit: t }) {
|
|
10994
|
-
let n = e, r =
|
|
11218
|
+
let n = e, r = tp(), i = a(() => n.message.replyTo ? Yc(n.message.replyTo.text, r.mentionNameByUid.value) : ""), o = t;
|
|
10995
11219
|
return (t, n) => (T(), c("button", {
|
|
10996
11220
|
type: "button",
|
|
10997
11221
|
class: "reply-quote",
|
|
10998
11222
|
onClick: n[0] ||= (e) => o("open")
|
|
10999
|
-
}, [l("p",
|
|
11223
|
+
}, [l("p", Bg, M(e.message.replyTo.senderName), 1), l("p", Vg, M(i.value), 1)]));
|
|
11000
11224
|
}
|
|
11001
|
-
}), [["__scopeId", "data-v-e27c136c"]]),
|
|
11225
|
+
}), [["__scopeId", "data-v-e27c136c"]]), Ug = { class: "space-y-2" }, Wg = /* @__PURE__ */ p({
|
|
11002
11226
|
__name: "MessageTextContent",
|
|
11003
11227
|
props: { message: {} },
|
|
11004
11228
|
emits: ["anchorclick"],
|
|
11005
11229
|
setup(e) {
|
|
11006
|
-
let t =
|
|
11007
|
-
return (t, r) => (T(), c("div",
|
|
11230
|
+
let t = tp(), n = a(() => t.mentionNameByUid.value);
|
|
11231
|
+
return (t, r) => (T(), c("div", Ug, [e.message.translatedText ? (T(), o(Xh, {
|
|
11008
11232
|
key: 0,
|
|
11009
11233
|
text: e.message.translatedText,
|
|
11010
11234
|
"mention-name-by-uid": n.value,
|
|
@@ -11018,7 +11242,7 @@ var dh = {
|
|
|
11018
11242
|
"mention-name-by-uid",
|
|
11019
11243
|
"is-own",
|
|
11020
11244
|
"class"
|
|
11021
|
-
])) : s("", !0), f(
|
|
11245
|
+
])) : s("", !0), f(Xh, {
|
|
11022
11246
|
text: e.message.text,
|
|
11023
11247
|
"mention-name-by-uid": n.value,
|
|
11024
11248
|
"is-own": e.message.isOwn,
|
|
@@ -11031,11 +11255,11 @@ var dh = {
|
|
|
11031
11255
|
"is-own"
|
|
11032
11256
|
])]));
|
|
11033
11257
|
}
|
|
11034
|
-
}),
|
|
11258
|
+
}), Gg = [
|
|
11035
11259
|
"id",
|
|
11036
11260
|
"data-message-id",
|
|
11037
11261
|
"data-message-kind"
|
|
11038
|
-
],
|
|
11262
|
+
], Kg = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, qg = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Jg = 500, Yg = 10, Xg = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11039
11263
|
__name: "MessageItem",
|
|
11040
11264
|
props: {
|
|
11041
11265
|
message: {},
|
|
@@ -11091,13 +11315,13 @@ var dh = {
|
|
|
11091
11315
|
x: t.clientX,
|
|
11092
11316
|
y: t.clientY
|
|
11093
11317
|
}, w(), b = setTimeout(() => {
|
|
11094
|
-
b = null, C = !0,
|
|
11095
|
-
},
|
|
11318
|
+
b = null, C = !0, Ph.impact({ style: n.Medium }), u("tap", e);
|
|
11319
|
+
}, Jg));
|
|
11096
11320
|
}
|
|
11097
11321
|
function O(e) {
|
|
11098
11322
|
if (!S) return;
|
|
11099
11323
|
let t = e.touches[0];
|
|
11100
|
-
t && Math.hypot(t.clientX - S.x, t.clientY - S.y) >
|
|
11324
|
+
t && Math.hypot(t.clientX - S.x, t.clientY - S.y) > Yg && (w(), S = null);
|
|
11101
11325
|
}
|
|
11102
11326
|
function k() {
|
|
11103
11327
|
w(), S = null;
|
|
@@ -11117,12 +11341,12 @@ var dh = {
|
|
|
11117
11341
|
"data-message-id": e.message.id,
|
|
11118
11342
|
"data-message-kind": e.message.kind,
|
|
11119
11343
|
class: y(["message-item group", d.value])
|
|
11120
|
-
}, [e.message.kind === "action" ? (T(), o(
|
|
11344
|
+
}, [e.message.kind === "action" ? (T(), o(Rh, {
|
|
11121
11345
|
key: 0,
|
|
11122
11346
|
text: e.message.text,
|
|
11123
11347
|
class: y(m.value)
|
|
11124
11348
|
}, null, 8, ["text", "class"])) : (T(), c(r, { key: 1 }, [
|
|
11125
|
-
e.canShowSenderAvatar && !e.message.isOwn ? (T(), o(
|
|
11349
|
+
e.canShowSenderAvatar && !e.message.isOwn ? (T(), o(Fh, {
|
|
11126
11350
|
key: 0,
|
|
11127
11351
|
image: e.message.senderAvatar,
|
|
11128
11352
|
name: e.message.senderName,
|
|
@@ -11139,21 +11363,21 @@ var dh = {
|
|
|
11139
11363
|
onTouchend: k,
|
|
11140
11364
|
onTouchcancel: k
|
|
11141
11365
|
}, [
|
|
11142
|
-
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(
|
|
11366
|
+
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(Sg, {
|
|
11143
11367
|
key: 0,
|
|
11144
11368
|
message: e.message
|
|
11145
11369
|
}, null, 8, ["message"])) : s("", !0),
|
|
11146
|
-
e.isPinned ? (T(), o(
|
|
11147
|
-
e.message.forwardedFrom ? (T(), o(
|
|
11370
|
+
e.isPinned ? (T(), o(Ag, { key: 1 })) : s("", !0),
|
|
11371
|
+
e.message.forwardedFrom ? (T(), o(yg, {
|
|
11148
11372
|
key: 2,
|
|
11149
11373
|
message: e.message
|
|
11150
11374
|
}, null, 8, ["message"])) : s("", !0),
|
|
11151
|
-
e.message.replyTo ? (T(), o(
|
|
11375
|
+
e.message.replyTo ? (T(), o(Hg, {
|
|
11152
11376
|
key: 3,
|
|
11153
11377
|
message: e.message,
|
|
11154
11378
|
onOpen: M
|
|
11155
11379
|
}, null, 8, ["message"])) : s("", !0),
|
|
11156
|
-
e.message.kind === "poll" && e.message.poll ? (T(), o(
|
|
11380
|
+
e.message.kind === "poll" && e.message.poll ? (T(), o(zg, {
|
|
11157
11381
|
key: 4,
|
|
11158
11382
|
message: e.message,
|
|
11159
11383
|
"current-user-id": e.currentUserId,
|
|
@@ -11163,16 +11387,16 @@ var dh = {
|
|
|
11163
11387
|
"message",
|
|
11164
11388
|
"current-user-id",
|
|
11165
11389
|
"pending-option-key"
|
|
11166
|
-
])) : e.message.attachments?.length ? (T(), o(
|
|
11390
|
+
])) : e.message.attachments?.length ? (T(), o(mg, {
|
|
11167
11391
|
key: 5,
|
|
11168
11392
|
message: e.message,
|
|
11169
11393
|
onOpenMedia: n[1] ||= (e) => u("openMedia", e)
|
|
11170
|
-
}, null, 8, ["message"])) : (T(), o(
|
|
11394
|
+
}, null, 8, ["message"])) : (T(), o(Wg, {
|
|
11171
11395
|
key: 6,
|
|
11172
11396
|
message: e.message,
|
|
11173
11397
|
onAnchorclick: n[2] ||= (e, n) => t.$emit("anchorclick", e, n)
|
|
11174
11398
|
}, null, 8, ["message"])),
|
|
11175
|
-
l("div",
|
|
11399
|
+
l("div", Kg, [f(Og, {
|
|
11176
11400
|
message: e.message,
|
|
11177
11401
|
"can-react": e.canReact,
|
|
11178
11402
|
"can-open-thread": e.canOpenThread,
|
|
@@ -11182,7 +11406,7 @@ var dh = {
|
|
|
11182
11406
|
"message",
|
|
11183
11407
|
"can-react",
|
|
11184
11408
|
"can-open-thread"
|
|
11185
|
-
]), f(
|
|
11409
|
+
]), f(_g, { message: e.message }, null, 8, ["message"])])
|
|
11186
11410
|
], 34),
|
|
11187
11411
|
e.contextMenuOpen && e.isTouchUi ? (T(), c("div", {
|
|
11188
11412
|
key: 1,
|
|
@@ -11191,21 +11415,21 @@ var dh = {
|
|
|
11191
11415
|
class: "message-bubble-wrapper",
|
|
11192
11416
|
style: x({ top: j.value })
|
|
11193
11417
|
}, [l("div", { class: y(["message-bubble", p.value]) }, [
|
|
11194
|
-
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(
|
|
11418
|
+
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(Sg, {
|
|
11195
11419
|
key: 0,
|
|
11196
11420
|
message: e.message
|
|
11197
11421
|
}, null, 8, ["message"])) : s("", !0),
|
|
11198
|
-
e.isPinned ? (T(), o(
|
|
11199
|
-
e.message.forwardedFrom ? (T(), o(
|
|
11422
|
+
e.isPinned ? (T(), o(Ag, { key: 1 })) : s("", !0),
|
|
11423
|
+
e.message.forwardedFrom ? (T(), o(yg, {
|
|
11200
11424
|
key: 2,
|
|
11201
11425
|
message: e.message
|
|
11202
11426
|
}, null, 8, ["message"])) : s("", !0),
|
|
11203
|
-
e.message.replyTo ? (T(), o(
|
|
11427
|
+
e.message.replyTo ? (T(), o(Hg, {
|
|
11204
11428
|
key: 3,
|
|
11205
11429
|
message: e.message,
|
|
11206
11430
|
onOpen: M
|
|
11207
11431
|
}, null, 8, ["message"])) : s("", !0),
|
|
11208
|
-
e.message.kind === "poll" && e.message.poll ? (T(), o(
|
|
11432
|
+
e.message.kind === "poll" && e.message.poll ? (T(), o(zg, {
|
|
11209
11433
|
key: 4,
|
|
11210
11434
|
message: e.message,
|
|
11211
11435
|
"current-user-id": e.currentUserId,
|
|
@@ -11215,16 +11439,16 @@ var dh = {
|
|
|
11215
11439
|
"message",
|
|
11216
11440
|
"current-user-id",
|
|
11217
11441
|
"pending-option-key"
|
|
11218
|
-
])) : e.message.attachments?.length ? (T(), o(
|
|
11442
|
+
])) : e.message.attachments?.length ? (T(), o(mg, {
|
|
11219
11443
|
key: 5,
|
|
11220
11444
|
message: e.message,
|
|
11221
11445
|
onOpenMedia: n[6] ||= (e) => u("openMedia", e)
|
|
11222
|
-
}, null, 8, ["message"])) : (T(), o(
|
|
11446
|
+
}, null, 8, ["message"])) : (T(), o(Wg, {
|
|
11223
11447
|
key: 6,
|
|
11224
11448
|
message: e.message,
|
|
11225
11449
|
onAnchorclick: n[7] ||= (e, n) => t.$emit("anchorclick", e, n)
|
|
11226
11450
|
}, null, 8, ["message"])),
|
|
11227
|
-
l("div",
|
|
11451
|
+
l("div", qg, [f(Og, {
|
|
11228
11452
|
message: e.message,
|
|
11229
11453
|
"can-react": e.canReact,
|
|
11230
11454
|
"can-open-thread": e.canOpenThread,
|
|
@@ -11234,21 +11458,21 @@ var dh = {
|
|
|
11234
11458
|
"message",
|
|
11235
11459
|
"can-react",
|
|
11236
11460
|
"can-open-thread"
|
|
11237
|
-
]), f(
|
|
11461
|
+
]), f(_g, { message: e.message }, null, 8, ["message"])])
|
|
11238
11462
|
], 2)], 4)], 2)) : s("", !0)
|
|
11239
|
-
], 64))], 10,
|
|
11463
|
+
], 64))], 10, Gg));
|
|
11240
11464
|
}
|
|
11241
|
-
}), [["__scopeId", "data-v-d265fe94"]]),
|
|
11465
|
+
}), [["__scopeId", "data-v-d265fe94"]]), Zg = [
|
|
11242
11466
|
"👍",
|
|
11243
11467
|
"❤️",
|
|
11244
11468
|
"🔥",
|
|
11245
11469
|
"😂",
|
|
11246
11470
|
"🙏",
|
|
11247
11471
|
"🎉"
|
|
11248
|
-
],
|
|
11472
|
+
], Qg = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), $g = { class: "shadow-overlay bg-elevation-surface-raised-default mx-auto flex w-max max-w-full items-center gap-1 rounded-full px-3 py-1" }, e_ = ["disabled", "onClick"], t_ = ["disabled"], n_ = {
|
|
11249
11473
|
key: 0,
|
|
11250
11474
|
class: "bg-elevation-surface-raised-default shadow-overlay m-0 grid grid-cols-6 gap-1 rounded-lg p-1.5"
|
|
11251
|
-
},
|
|
11475
|
+
}, r_ = ["onClick"], i_ = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11252
11476
|
__name: "MessageItemMenuReactions",
|
|
11253
11477
|
props: {
|
|
11254
11478
|
message: {},
|
|
@@ -11260,20 +11484,20 @@ var dh = {
|
|
|
11260
11484
|
R(() => n.message.id, () => {
|
|
11261
11485
|
u.value = !1;
|
|
11262
11486
|
});
|
|
11263
|
-
let d = a(() =>
|
|
11487
|
+
let d = a(() => Qg);
|
|
11264
11488
|
function f(e) {
|
|
11265
11489
|
return (n.message.reactions ?? []).some((t) => t.emoji === e);
|
|
11266
11490
|
}
|
|
11267
11491
|
function p() {
|
|
11268
11492
|
n.canReact && (u.value = !u.value);
|
|
11269
11493
|
}
|
|
11270
|
-
return (t, n) => (T(), c(r, null, [l("div",
|
|
11494
|
+
return (t, n) => (T(), c(r, null, [l("div", $g, [(T(!0), c(r, null, O(P(Zg), (t) => (T(), c("button", {
|
|
11271
11495
|
key: `${e.message.id}-${t}-common`,
|
|
11272
11496
|
type: "button",
|
|
11273
11497
|
class: y(["message-reaction-button", f(t) ? "bg-background-success-default" : "bg-transparent"]),
|
|
11274
11498
|
disabled: !e.canReact,
|
|
11275
11499
|
onClick: (e) => i("react", t)
|
|
11276
|
-
}, M(t), 11,
|
|
11500
|
+
}, M(t), 11, e_))), 128)), l("button", {
|
|
11277
11501
|
type: "button",
|
|
11278
11502
|
class: "message-reaction-more",
|
|
11279
11503
|
disabled: !e.canReact,
|
|
@@ -11281,37 +11505,37 @@ var dh = {
|
|
|
11281
11505
|
}, [(T(), o(A(u.value ? P(Ie) : P(Fe)), {
|
|
11282
11506
|
class: "size-7",
|
|
11283
11507
|
"aria-hidden": "true"
|
|
11284
|
-
}))], 8,
|
|
11508
|
+
}))], 8, t_)]), u.value && e.canReact ? (T(), c("div", n_, [(T(!0), c(r, null, O(d.value, (t) => (T(), c("button", {
|
|
11285
11509
|
key: `${e.message.id}-${t}-extended`,
|
|
11286
11510
|
type: "button",
|
|
11287
11511
|
class: y(["message-expanded-reaction-button", f(t) ? "bg-background-success-default" : "bg-transparent"]),
|
|
11288
11512
|
onClick: (e) => i("react", t)
|
|
11289
|
-
}, M(t), 11,
|
|
11513
|
+
}, M(t), 11, r_))), 128))])) : s("", !0)], 64));
|
|
11290
11514
|
}
|
|
11291
|
-
}), [["__scopeId", "data-v-0a11761a"]]),
|
|
11515
|
+
}), [["__scopeId", "data-v-0a11761a"]]), a_ = { class: "message-action-list" }, o_ = { class: "message-receipt-summary__icon" }, s_ = { class: "message-receipt-summary__label" }, c_ = {
|
|
11292
11516
|
key: 0,
|
|
11293
11517
|
class: "message-receipt-summary__avatars",
|
|
11294
11518
|
"aria-hidden": "true"
|
|
11295
|
-
},
|
|
11519
|
+
}, l_ = { class: "message-receipt-summary__icon" }, u_ = { class: "message-receipt-summary__label" }, d_ = { class: "message-receipt-summary__icon" }, f_ = { class: "message-receipt-summary__label" }, p_ = {
|
|
11296
11520
|
key: 3,
|
|
11297
11521
|
class: "message-action-list__divider",
|
|
11298
11522
|
"aria-hidden": "true"
|
|
11299
|
-
},
|
|
11523
|
+
}, m_ = {
|
|
11300
11524
|
key: 1,
|
|
11301
11525
|
class: "message-action-list message-receipt-panel"
|
|
11302
|
-
},
|
|
11526
|
+
}, h_ = { class: "message-receipt-list" }, g_ = { class: "message-receipt-row__body" }, __ = { class: "message-receipt-row__name" }, v_ = { class: "message-receipt-row__time" }, y_ = {
|
|
11303
11527
|
key: 2,
|
|
11304
11528
|
class: "message-action-list message-receipt-panel"
|
|
11305
|
-
},
|
|
11529
|
+
}, b_ = { class: "message-receipt-list" }, x_ = { class: "message-poll-voters-group__header" }, S_ = { class: "message-poll-voters-group__text" }, C_ = { class: "message-poll-voters-group__count" }, w_ = { class: "message-receipt-row__body" }, T_ = { class: "message-receipt-row__name" }, E_ = {
|
|
11306
11530
|
key: 3,
|
|
11307
11531
|
class: "message-action-list message-receipt-panel"
|
|
11308
|
-
},
|
|
11532
|
+
}, D_ = {
|
|
11309
11533
|
key: 0,
|
|
11310
11534
|
class: "message-receipt-loading"
|
|
11311
|
-
},
|
|
11535
|
+
}, O_ = {
|
|
11312
11536
|
key: 1,
|
|
11313
11537
|
class: "message-receipt-list"
|
|
11314
|
-
},
|
|
11538
|
+
}, k_ = { class: "message-poll-voters-group__header" }, A_ = { class: "message-poll-voters-group__text" }, j_ = { class: "message-poll-voters-group__count" }, M_ = { class: "message-receipt-row__body" }, N_ = { class: "message-receipt-row__name" }, P_ = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11315
11539
|
__name: "MessageItemMenu",
|
|
11316
11540
|
props: {
|
|
11317
11541
|
message: {},
|
|
@@ -11424,18 +11648,18 @@ var dh = {
|
|
|
11424
11648
|
top: `${k.value.top}px`
|
|
11425
11649
|
}),
|
|
11426
11650
|
"data-testid": "message-action-popover-shell"
|
|
11427
|
-
}, [E.value === "actions" ? (T(), c(r, { key: 0 }, [f(
|
|
11651
|
+
}, [E.value === "actions" ? (T(), c(r, { key: 0 }, [f(i_, {
|
|
11428
11652
|
message: e.message,
|
|
11429
11653
|
"can-react": e.canReact,
|
|
11430
11654
|
onReact: n[0] ||= (e) => b("react", e)
|
|
11431
|
-
}, null, 8, ["message", "can-react"]), l("div",
|
|
11655
|
+
}, null, 8, ["message", "can-react"]), l("div", a_, [
|
|
11432
11656
|
e.receiptSummaryAction ? (T(), c("button", {
|
|
11433
11657
|
key: 0,
|
|
11434
11658
|
type: "button",
|
|
11435
11659
|
class: "message-receipt-summary",
|
|
11436
11660
|
onClick: L
|
|
11437
11661
|
}, [
|
|
11438
|
-
l("span",
|
|
11662
|
+
l("span", o_, [e.receiptSummaryAction.loading ? (T(), o(P(se), {
|
|
11439
11663
|
key: 0,
|
|
11440
11664
|
style: {
|
|
11441
11665
|
width: "1rem",
|
|
@@ -11447,8 +11671,8 @@ var dh = {
|
|
|
11447
11671
|
class: "text-success size-4",
|
|
11448
11672
|
"aria-hidden": "true"
|
|
11449
11673
|
}))]),
|
|
11450
|
-
l("span",
|
|
11451
|
-
d.value.length ? (T(), c("span",
|
|
11674
|
+
l("span", s_, M(e.receiptSummaryAction.label), 1),
|
|
11675
|
+
d.value.length ? (T(), c("span", c_, [(T(!0), c(r, null, O(d.value, (e) => (T(), o(Fh, {
|
|
11452
11676
|
key: e.user.uid,
|
|
11453
11677
|
image: e.user.avatar,
|
|
11454
11678
|
name: e.user.name,
|
|
@@ -11460,25 +11684,25 @@ var dh = {
|
|
|
11460
11684
|
type: "button",
|
|
11461
11685
|
class: "message-receipt-summary",
|
|
11462
11686
|
onClick: R
|
|
11463
|
-
}, [l("span",
|
|
11687
|
+
}, [l("span", l_, [f(P($e), {
|
|
11464
11688
|
class: "text-success size-4",
|
|
11465
11689
|
"aria-hidden": "true"
|
|
11466
|
-
})]), l("span",
|
|
11690
|
+
})]), l("span", u_, M(e.pollVotersSummaryAction.label), 1)])) : s("", !0),
|
|
11467
11691
|
e.reactionsSummaryAction ? (T(), c("button", {
|
|
11468
11692
|
key: 2,
|
|
11469
11693
|
type: "button",
|
|
11470
11694
|
class: "message-receipt-summary",
|
|
11471
11695
|
onClick: z
|
|
11472
|
-
}, [l("span",
|
|
11696
|
+
}, [l("span", d_, [f(P(fe), {
|
|
11473
11697
|
class: "text-success size-4",
|
|
11474
11698
|
"aria-hidden": "true"
|
|
11475
|
-
})]), l("span",
|
|
11476
|
-
e.receiptSummaryAction || e.pollVotersSummaryAction || e.reactionsSummaryAction ? (T(), c("div",
|
|
11699
|
+
})]), l("span", f_, M(e.reactionsSummaryAction.label), 1)])) : s("", !0),
|
|
11700
|
+
e.receiptSummaryAction || e.pollVotersSummaryAction || e.reactionsSummaryAction ? (T(), c("div", p_)) : s("", !0),
|
|
11477
11701
|
f(P(oe), {
|
|
11478
11702
|
model: e.actionItems,
|
|
11479
11703
|
class: "message-action-list__menu"
|
|
11480
11704
|
}, null, 8, ["model"])
|
|
11481
|
-
])], 64)) : E.value === "receipts" ? (T(), c("section",
|
|
11705
|
+
])], 64)) : E.value === "receipts" ? (T(), c("section", m_, [
|
|
11482
11706
|
l("button", {
|
|
11483
11707
|
type: "button",
|
|
11484
11708
|
class: "message-receipt-back",
|
|
@@ -11491,18 +11715,18 @@ var dh = {
|
|
|
11491
11715
|
class: "message-action-list__divider",
|
|
11492
11716
|
"aria-hidden": "true"
|
|
11493
11717
|
}, null, -1),
|
|
11494
|
-
l("div",
|
|
11718
|
+
l("div", h_, [(T(!0), c(r, null, O(p.value, (e) => (T(), c("div", {
|
|
11495
11719
|
key: e.user.uid,
|
|
11496
11720
|
class: "message-receipt-row"
|
|
11497
|
-
}, [f(
|
|
11721
|
+
}, [f(Fh, {
|
|
11498
11722
|
image: e.user.avatar,
|
|
11499
11723
|
name: e.user.name,
|
|
11500
11724
|
class: "message-receipt-row__avatar"
|
|
11501
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
11725
|
+
}, null, 8, ["image", "name"]), l("div", g_, [l("p", __, M(e.user.name), 1), l("p", v_, [f(P(Ce), {
|
|
11502
11726
|
class: "message-receipt-row__icon text-success",
|
|
11503
11727
|
"aria-hidden": "true"
|
|
11504
11728
|
}), l("span", null, M(ne(e.timestamp)), 1)])])]))), 128))])
|
|
11505
|
-
])) : E.value === "pollVoters" ? (T(), c("section",
|
|
11729
|
+
])) : E.value === "pollVoters" ? (T(), c("section", y_, [
|
|
11506
11730
|
l("button", {
|
|
11507
11731
|
type: "button",
|
|
11508
11732
|
class: "message-receipt-back",
|
|
@@ -11515,18 +11739,18 @@ var dh = {
|
|
|
11515
11739
|
class: "message-action-list__divider",
|
|
11516
11740
|
"aria-hidden": "true"
|
|
11517
11741
|
}, null, -1),
|
|
11518
|
-
l("div",
|
|
11742
|
+
l("div", b_, [(T(!0), c(r, null, O(m.value, (e) => (T(), c("div", {
|
|
11519
11743
|
key: e.id,
|
|
11520
11744
|
class: "message-poll-voters-group"
|
|
11521
|
-
}, [l("div",
|
|
11745
|
+
}, [l("div", x_, [l("span", S_, M(e.text), 1), l("span", C_, M(P(y)("voteCount", { count: e.voteCount })), 1)]), (T(!0), c(r, null, O(e.voters, (e) => (T(), c("div", {
|
|
11522
11746
|
key: e.uid,
|
|
11523
11747
|
class: "message-receipt-row"
|
|
11524
|
-
}, [f(
|
|
11748
|
+
}, [f(Fh, {
|
|
11525
11749
|
image: e.avatar,
|
|
11526
11750
|
name: e.name,
|
|
11527
11751
|
class: "message-receipt-row__avatar"
|
|
11528
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
11529
|
-
])) : (T(), c("section",
|
|
11752
|
+
}, null, 8, ["image", "name"]), l("div", w_, [l("p", T_, M(e.name), 1)])]))), 128))]))), 128))])
|
|
11753
|
+
])) : (T(), c("section", E_, [
|
|
11530
11754
|
l("button", {
|
|
11531
11755
|
type: "button",
|
|
11532
11756
|
class: "message-receipt-back",
|
|
@@ -11539,32 +11763,32 @@ var dh = {
|
|
|
11539
11763
|
class: "message-action-list__divider",
|
|
11540
11764
|
"aria-hidden": "true"
|
|
11541
11765
|
}, null, -1),
|
|
11542
|
-
e.reactionsSummaryAction?.loading && !h.value.length ? (T(), c("div",
|
|
11766
|
+
e.reactionsSummaryAction?.loading && !h.value.length ? (T(), c("div", D_, [f(P(se), {
|
|
11543
11767
|
style: {
|
|
11544
11768
|
width: "1.25rem",
|
|
11545
11769
|
height: "1.25rem"
|
|
11546
11770
|
},
|
|
11547
11771
|
"stroke-width": "5"
|
|
11548
|
-
})])) : (T(), c("div",
|
|
11772
|
+
})])) : (T(), c("div", O_, [(T(!0), c(r, null, O(g.value, (e) => (T(), c("div", {
|
|
11549
11773
|
key: e.emoji,
|
|
11550
11774
|
class: "message-poll-voters-group"
|
|
11551
|
-
}, [l("div",
|
|
11775
|
+
}, [l("div", k_, [l("span", A_, M(e.emoji), 1), l("span", j_, M(e.reactedBy.length), 1)]), (T(!0), c(r, null, O(e.reactedBy, (e) => (T(), c("div", {
|
|
11552
11776
|
key: e.user.uid,
|
|
11553
11777
|
class: "message-receipt-row"
|
|
11554
|
-
}, [f(
|
|
11778
|
+
}, [f(Fh, {
|
|
11555
11779
|
image: e.user.avatar,
|
|
11556
11780
|
name: e.user.name,
|
|
11557
11781
|
class: "message-receipt-row__avatar"
|
|
11558
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
11782
|
+
}, null, 8, ["image", "name"]), l("div", M_, [l("p", N_, M(e.user.name), 1)])]))), 128))]))), 128))]))
|
|
11559
11783
|
]))], 4)) : s("", !0)]));
|
|
11560
11784
|
}
|
|
11561
|
-
}), [["__scopeId", "data-v-8143e7ac"]]),
|
|
11785
|
+
}), [["__scopeId", "data-v-8143e7ac"]]), F_ = { class: "chat-header border-default bg-elevation-surface-default sticky top-0 z-10 flex items-center justify-between gap-3 border-b px-4 py-3 max-md:px-4 max-md:pb-3 sm:px-5 sm:py-3.5" }, I_ = {
|
|
11562
11786
|
key: 0,
|
|
11563
11787
|
class: "chat-header__identity flex min-w-0 items-center gap-3"
|
|
11564
|
-
},
|
|
11788
|
+
}, L_ = { class: "chat-header__text min-w-0" }, R_ = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, z_ = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, B_ = { key: 0 }, V_ = { key: 1 }, H_ = { class: "chat-header__actions flex items-center gap-2" }, U_ = {
|
|
11565
11789
|
key: 0,
|
|
11566
11790
|
class: "chat-header__tags hidden flex-wrap gap-2 md:flex"
|
|
11567
|
-
},
|
|
11791
|
+
}, W_ = /* @__PURE__ */ p({
|
|
11568
11792
|
__name: "MessageListHeader",
|
|
11569
11793
|
props: {
|
|
11570
11794
|
conversation: {},
|
|
@@ -11572,32 +11796,32 @@ var dh = {
|
|
|
11572
11796
|
},
|
|
11573
11797
|
setup(e) {
|
|
11574
11798
|
let { t } = J();
|
|
11575
|
-
return (n, i) => (T(), c("header",
|
|
11799
|
+
return (n, i) => (T(), c("header", F_, [e.conversation ? (T(), c("div", I_, [f(Fh, {
|
|
11576
11800
|
image: e.conversation.avatar,
|
|
11577
11801
|
name: e.conversation.title,
|
|
11578
11802
|
class: "chat-header__avatar shrink-0"
|
|
11579
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
11803
|
+
}, null, 8, ["image", "name"]), l("div", L_, [l("p", R_, M(e.parentMessage ? P(t)("thread") : e.conversation.title), 1), l("p", z_, [e.parentMessage ? (T(), c("span", B_, M(e.parentMessage.senderName), 1)) : (T(), c("span", V_, [e.conversation.type === "user" ? (T(), c(r, { key: 0 }, [d(M(P(t)("directMessage")), 1)], 64)) : (T(), c(r, { key: 1 }, [d(M(e.conversation.memberCount ? P(t)("members", { count: e.conversation.memberCount }) : P(t)("groupChat")), 1)], 64))]))])])])) : s("", !0), l("div", H_, [e.conversation?.tags?.length ? (T(), c("div", U_, [(T(!0), c(r, null, O(e.conversation.tags.slice(0, 3), (e) => (T(), o(P(ce), {
|
|
11580
11804
|
key: e,
|
|
11581
11805
|
text: e,
|
|
11582
11806
|
context: "secondary",
|
|
11583
11807
|
rounded: ""
|
|
11584
11808
|
}, null, 8, ["text"]))), 128))])) : s("", !0)])]));
|
|
11585
11809
|
}
|
|
11586
|
-
}),
|
|
11810
|
+
}), G_ = {
|
|
11587
11811
|
key: 0,
|
|
11588
11812
|
class: "pinned-bar",
|
|
11589
11813
|
"data-testid": "pinned-messages-bar"
|
|
11590
|
-
},
|
|
11814
|
+
}, K_ = ["title"], q_ = { class: "pinned-bar__text min-w-0" }, J_ = { class: "pinned-bar__headline body-sm text-subtle block truncate font-semibold" }, Y_ = { class: "pinned-bar__preview body-md text-default block truncate" }, X_ = { class: "pinned-bar__sender font-medium" }, Z_ = { class: "pinned-bar__actions flex shrink-0 items-center gap-1" }, Q_ = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11591
11815
|
__name: "PinnedMessagesBar",
|
|
11592
11816
|
setup(e) {
|
|
11593
|
-
let { t } = J(), n =
|
|
11817
|
+
let { t } = J(), n = tp(), r = op(), i = xp(), u = a(() => r.pinnedMessages.value), d = a(() => u.value[0] ?? null), p = a(() => u.value.length > 1), m = a(() => p.value ? t("pinnedMessagesCount", { count: u.value.length }) : t("pinnedMessage")), h = a(() => d.value ? Jc(d.value, t("attachment"), n.mentionNameByUid.value) : "");
|
|
11594
11818
|
function g() {
|
|
11595
11819
|
d.value && i.emit("message:openReference", d.value.id);
|
|
11596
11820
|
}
|
|
11597
11821
|
function _() {
|
|
11598
11822
|
d.value && i.emit("message:unpin", d.value.id);
|
|
11599
11823
|
}
|
|
11600
|
-
return (e, r) => d.value ? (T(), c("div",
|
|
11824
|
+
return (e, r) => d.value ? (T(), c("div", G_, [l("button", {
|
|
11601
11825
|
type: "button",
|
|
11602
11826
|
class: "pinned-bar__summary",
|
|
11603
11827
|
title: P(t)("goToMessage"),
|
|
@@ -11605,11 +11829,11 @@ var dh = {
|
|
|
11605
11829
|
}, [f(P(Me), {
|
|
11606
11830
|
class: "pinned-bar__icon size-4 shrink-0",
|
|
11607
11831
|
"aria-hidden": "true"
|
|
11608
|
-
}), l("span",
|
|
11609
|
-
l("span",
|
|
11832
|
+
}), l("span", q_, [l("span", J_, M(m.value), 1), l("span", Y_, [
|
|
11833
|
+
l("span", X_, M(d.value.senderName), 1),
|
|
11610
11834
|
r[1] ||= l("span", { "aria-hidden": "true" }, ": ", -1),
|
|
11611
11835
|
l("span", null, M(h.value), 1)
|
|
11612
|
-
])])], 8,
|
|
11836
|
+
])])], 8, K_), l("div", Z_, [p.value ? (T(), o(P(V), {
|
|
11613
11837
|
key: 0,
|
|
11614
11838
|
icon: P(Re),
|
|
11615
11839
|
"aria-label": P(t)("pinnedMessages"),
|
|
@@ -11637,16 +11861,16 @@ var dh = {
|
|
|
11637
11861
|
"title"
|
|
11638
11862
|
])) : s("", !0)])])) : s("", !0);
|
|
11639
11863
|
}
|
|
11640
|
-
}), [["__scopeId", "data-v-ed2c3c4c"]]),
|
|
11864
|
+
}), [["__scopeId", "data-v-ed2c3c4c"]]), $_ = {
|
|
11641
11865
|
key: 2,
|
|
11642
11866
|
class: "message-list__empty-state"
|
|
11643
|
-
},
|
|
11867
|
+
}, ev = { class: "space-y-2" }, tv = {
|
|
11644
11868
|
key: 0,
|
|
11645
11869
|
class: "message-list__thread-root"
|
|
11646
|
-
},
|
|
11870
|
+
}, nv = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, rv = { class: "body-md text-default mt-1 line-clamp-2" }, iv = {
|
|
11647
11871
|
key: 1,
|
|
11648
11872
|
class: "surface-default text-subtle rounded-2xl p-5 text-center"
|
|
11649
|
-
},
|
|
11873
|
+
}, av = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11650
11874
|
__name: "MessageList",
|
|
11651
11875
|
props: {
|
|
11652
11876
|
target: {},
|
|
@@ -11657,13 +11881,13 @@ var dh = {
|
|
|
11657
11881
|
},
|
|
11658
11882
|
emits: ["anchorclick"],
|
|
11659
11883
|
setup(e) {
|
|
11660
|
-
let t = e, { t: n } = J(), i =
|
|
11884
|
+
let t = e, { t: n } = J(), i = tp(), u = gp(), d = op(), p = xp(), m = a(() => t.target === "thread"), h = a(() => m.value ? d.threadMessages.value : t.hideGroupActions ? d.messages.value.filter((e) => e.kind !== "action") : d.messages.value), g = a(() => m.value ? d.loadingThreadMessages.value : d.loadingMessages.value), _ = a(() => m.value ? d.activeThreadParentMessage.value : null), v = a(() => !m.value && i.canOpenThread.value), b = a(() => !i.client.value?.offlineMode.value && (m.value ? d.hasOlderThreadMessages.value : d.hasOlderMessages.value)), x = a(() => m.value ? d.loadingOlderThreadMessages.value : d.loadingOlderMessages.value), S = a(() => !m.value && d.pinnedMessages.value.length > 0), C = a(() => m.value ? !0 : d.showDefaultEmptyState.value), w = a(() => {
|
|
11661
11885
|
let e = i.conversation.value;
|
|
11662
11886
|
return e ? _.value ? n("thread") : e.title : "";
|
|
11663
11887
|
}), E = a(() => {
|
|
11664
11888
|
let e = i.conversation.value;
|
|
11665
11889
|
return e ? _.value ? _.value.senderName : e.memberCount ? n("members", { count: e.memberCount }) : n("groupChat") : "";
|
|
11666
|
-
}), A = a(() => i.conversation.value?.memberCount ?? 0), j = D(null), N = D(null), F = D(null), I = a(() => !!_.value), L = a(() => I.value && !t.showHeader), R = a(() =>
|
|
11890
|
+
}), A = a(() => i.conversation.value?.memberCount ?? 0), j = D(null), N = D(null), F = D(null), I = a(() => !!_.value), L = a(() => I.value && !t.showHeader), R = a(() => Zf(i.conversation.value)), z = ee("threadRef"), { handleThreadScroll: te } = eh({
|
|
11667
11891
|
getConversation: () => i.conversation.value,
|
|
11668
11892
|
getParentMessage: () => _.value,
|
|
11669
11893
|
getMessages: () => h.value,
|
|
@@ -11673,7 +11897,7 @@ var dh = {
|
|
|
11673
11897
|
onLoadOlder: () => p.emit("list:loadOlder", { target: t.target }),
|
|
11674
11898
|
onAtBottom: () => p.emit("list:atBottom", { target: t.target }),
|
|
11675
11899
|
threadRef: z
|
|
11676
|
-
}), ne = ee("actionMenuRef"), { activeActionMessage: B, handleMessageContextMenu: re, handleMessageTap: V, resetActionMenuState: H, reactToMessage: U, toggleInlineReaction: ie, getReceiptSummaryAction: ae, getPollVotersSummaryAction: W, loadReactionDetails: oe, getReactionsSummaryAction: G, getActionItems: se, isTouchUI: ce } =
|
|
11900
|
+
}), ne = ee("actionMenuRef"), { activeActionMessage: B, handleMessageContextMenu: re, handleMessageTap: V, resetActionMenuState: H, reactToMessage: U, toggleInlineReaction: ie, getReceiptSummaryAction: ae, getPollVotersSummaryAction: W, loadReactionDetails: oe, getReactionsSummaryAction: G, getActionItems: se, isTouchUI: ce } = Jm({
|
|
11677
11901
|
canUseMessageActions: () => i.canUseMessageActions.value,
|
|
11678
11902
|
canReact: () => i.canReact.value,
|
|
11679
11903
|
canReply: () => i.canReply.value,
|
|
@@ -11759,11 +11983,11 @@ var dh = {
|
|
|
11759
11983
|
title: w.value,
|
|
11760
11984
|
subtitle: E.value,
|
|
11761
11985
|
memberCount: A.value
|
|
11762
|
-
}, () => [f(
|
|
11986
|
+
}, () => [f(W_, {
|
|
11763
11987
|
conversation: P(i).conversation.value,
|
|
11764
11988
|
"parent-message": _.value
|
|
11765
11989
|
}, null, 8, ["conversation", "parent-message"])], !0, 0) : s("", !0),
|
|
11766
|
-
S.value ? (T(), o(
|
|
11990
|
+
S.value ? (T(), o(Q_, { key: 1 })) : s("", !0),
|
|
11767
11991
|
P(i).conversation.value ? (T(), c("div", {
|
|
11768
11992
|
key: 3,
|
|
11769
11993
|
class: y(["message-list__body", L.value || I.value ? "bg-elevation-surface-overlay" : ""])
|
|
@@ -11773,12 +11997,12 @@ var dh = {
|
|
|
11773
11997
|
ref: z,
|
|
11774
11998
|
class: y(["message-list__scroll min-h-0 flex-1", L.value ? "p-0" : I.value ? "px-5 py-4" : "px-2 pt-2 pb-3"]),
|
|
11775
11999
|
onScroll: u[2] ||= (...e) => P(te) && P(te)(...e)
|
|
11776
|
-
}, [l("div",
|
|
11777
|
-
_.value ? (T(), c("div",
|
|
11778
|
-
(T(!0), c(r, null, O(h.value, (e, n) => (T(), c(r, { key: e.id }, [he(n) ? (T(), o(
|
|
12000
|
+
}, [l("div", ev, [
|
|
12001
|
+
_.value ? (T(), c("div", tv, [l("p", nv, M(_.value.senderName), 1), l("p", rv, M(P(Jc)(_.value, P(n)("message"), P(i).mentionNameByUid.value)), 1)])) : s("", !0),
|
|
12002
|
+
(T(!0), c(r, null, O(h.value, (e, n) => (T(), c(r, { key: e.id }, [he(n) ? (T(), o(Nh, {
|
|
11779
12003
|
key: 0,
|
|
11780
12004
|
date: e.sentAt
|
|
11781
|
-
}, null, 8, ["date"])) : s("", !0), f(
|
|
12005
|
+
}, null, 8, ["date"])) : s("", !0), f(Xg, {
|
|
11782
12006
|
message: e,
|
|
11783
12007
|
"current-user-id": P(i).currentUserId.value,
|
|
11784
12008
|
"can-react": P(i).canReact.value,
|
|
@@ -11816,20 +12040,20 @@ var dh = {
|
|
|
11816
12040
|
"onToggleReaction",
|
|
11817
12041
|
"onOpenThread"
|
|
11818
12042
|
])], 64))), 128)),
|
|
11819
|
-
h.value.length === 0 && C.value && !g.value ? (T(), c("div",
|
|
12043
|
+
h.value.length === 0 && C.value && !g.value ? (T(), c("div", iv, M(P(n)("noMessagesYetInThisGroup")), 1)) : s("", !0)
|
|
11820
12044
|
])], 34),
|
|
11821
|
-
f(
|
|
12045
|
+
f(Ah, {
|
|
11822
12046
|
attachment: N.value,
|
|
11823
12047
|
onClose: de
|
|
11824
12048
|
}, null, 8, ["attachment"]),
|
|
11825
12049
|
l("footer", { class: y(["message-list__composer flex shrink-0 flex-col", I.value ? L.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [k(a.$slots, "composer", {}, void 0, !0)], 2)
|
|
11826
|
-
], 2)) : (T(), c("div",
|
|
12050
|
+
], 2)) : (T(), c("div", $_, M(P(n)("selectConversationToStart")), 1))
|
|
11827
12051
|
], 2),
|
|
11828
|
-
f(
|
|
12052
|
+
f(xh, {
|
|
11829
12053
|
attachment: j.value,
|
|
11830
12054
|
onClose: K
|
|
11831
12055
|
}, null, 8, ["attachment"]),
|
|
11832
|
-
f(
|
|
12056
|
+
f(P_, {
|
|
11833
12057
|
ref_key: "actionMenuRef",
|
|
11834
12058
|
ref: ne,
|
|
11835
12059
|
message: P(B),
|
|
@@ -11852,13 +12076,13 @@ var dh = {
|
|
|
11852
12076
|
])
|
|
11853
12077
|
], 64));
|
|
11854
12078
|
}
|
|
11855
|
-
}), [["__scopeId", "data-v-faddbe05"]]),
|
|
12079
|
+
}), [["__scopeId", "data-v-faddbe05"]]), ov = {
|
|
11856
12080
|
key: 0,
|
|
11857
12081
|
class: "flex h-full min-h-64 items-center justify-center"
|
|
11858
|
-
},
|
|
12082
|
+
}, sv = { class: "mb-3" }, cv = { class: "border-default max-h-full flex-1 space-y-1 overflow-y-auto rounded-xl border" }, lv = ["onClick"], uv = { class: "flex items-center gap-3" }, dv = { class: "heading-sm text-default truncate" }, fv = {
|
|
11859
12083
|
key: 0,
|
|
11860
12084
|
class: "conversation-list__empty border-default bg-elevation-surface-sunken-default body-md text-subtle rounded-xl border p-5 text-center"
|
|
11861
|
-
},
|
|
12085
|
+
}, pv = /* @__PURE__ */ p({
|
|
11862
12086
|
__name: "ForwardMessageDialog",
|
|
11863
12087
|
props: {
|
|
11864
12088
|
open: { type: Boolean },
|
|
@@ -11881,33 +12105,33 @@ var dh = {
|
|
|
11881
12105
|
type: e.type
|
|
11882
12106
|
});
|
|
11883
12107
|
}
|
|
11884
|
-
return (t, n) => (T(), o(
|
|
12108
|
+
return (t, n) => (T(), o(uh, {
|
|
11885
12109
|
open: e.open,
|
|
11886
12110
|
title: P(u)("forwardMessage"),
|
|
11887
12111
|
"close-label": P(u)("close"),
|
|
11888
12112
|
onClose: n[1] ||= (e) => i("close")
|
|
11889
12113
|
}, {
|
|
11890
|
-
default: z(() => [e.sending ? (T(), c("div",
|
|
12114
|
+
default: z(() => [e.sending ? (T(), c("div", ov, [f(P(se), {
|
|
11891
12115
|
style: {
|
|
11892
12116
|
width: "2.75rem",
|
|
11893
12117
|
height: "2.75rem"
|
|
11894
12118
|
},
|
|
11895
12119
|
"stroke-width": "6"
|
|
11896
|
-
})])) : (T(), c(r, { key: 1 }, [l("div",
|
|
12120
|
+
})])) : (T(), c(r, { key: 1 }, [l("div", sv, [f(P(W), {
|
|
11897
12121
|
"model-value": d.value,
|
|
11898
12122
|
placeholder: P(u)("searchByGroupName"),
|
|
11899
12123
|
class: "w-full",
|
|
11900
12124
|
"onUpdate:modelValue": n[0] ||= (e) => d.value = String(e)
|
|
11901
|
-
}, null, 8, ["model-value", "placeholder"])]), l("section",
|
|
12125
|
+
}, null, 8, ["model-value", "placeholder"])]), l("section", cv, [(T(!0), c(r, null, O(p.value, (e) => (T(), c("button", {
|
|
11902
12126
|
key: e.id,
|
|
11903
12127
|
type: "button",
|
|
11904
12128
|
class: "hover:bg-elevation-surface-hovered w-full rounded-xl border border-transparent px-4 py-3 text-left transition-colors",
|
|
11905
12129
|
onClick: (t) => m(e)
|
|
11906
|
-
}, [l("div",
|
|
12130
|
+
}, [l("div", uv, [f(Fh, {
|
|
11907
12131
|
image: e.avatar,
|
|
11908
12132
|
name: e.title,
|
|
11909
12133
|
class: "shrink-0"
|
|
11910
|
-
}, null, 8, ["image", "name"]), l("p",
|
|
12134
|
+
}, null, 8, ["image", "name"]), l("p", dv, M(e.title), 1)])], 8, lv))), 128)), p.value.length === 0 ? (T(), c("div", fv, M(P(u)("noMatchingChatsFound")), 1)) : s("", !0)])], 64))]),
|
|
11911
12135
|
_: 1
|
|
11912
12136
|
}, 8, [
|
|
11913
12137
|
"open",
|
|
@@ -11915,13 +12139,13 @@ var dh = {
|
|
|
11915
12139
|
"close-label"
|
|
11916
12140
|
]));
|
|
11917
12141
|
}
|
|
11918
|
-
}),
|
|
12142
|
+
}), mv = { class: "receipt-section" }, hv = {
|
|
11919
12143
|
key: 0,
|
|
11920
12144
|
class: "receipt-section__header"
|
|
11921
|
-
},
|
|
12145
|
+
}, gv = { class: "body-sm text-subtle font-semibold" }, _v = { class: "body-sm text-subtlest" }, vv = {
|
|
11922
12146
|
key: 1,
|
|
11923
12147
|
class: "receipt-section__list"
|
|
11924
|
-
},
|
|
12148
|
+
}, yv = { class: "receipt-section__identity" }, bv = { class: "min-w-0" }, xv = { class: "receipt-section__name heading-sm text-default truncate" }, Sv = { class: "receipt-section__time body-md text-subtle" }, Cv = { class: "truncate" }, wv = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11925
12149
|
__name: "ReceiptSection",
|
|
11926
12150
|
props: {
|
|
11927
12151
|
title: {},
|
|
@@ -11934,34 +12158,34 @@ var dh = {
|
|
|
11934
12158
|
},
|
|
11935
12159
|
setup(e) {
|
|
11936
12160
|
let t = e, n = a(() => String(t.receipts.length));
|
|
11937
|
-
return (t, i) => (T(), c("section",
|
|
12161
|
+
return (t, i) => (T(), c("section", mv, [e.showHeader ? (T(), c("div", hv, [l("p", gv, M(e.title), 1), l("span", _v, M(n.value), 1)])) : s("", !0), e.receipts.length ? (T(), c("div", vv, [(T(!0), c(r, null, O(e.receipts, (t) => (T(), c("div", {
|
|
11938
12162
|
key: `${t.kind}-${t.user.uid}`,
|
|
11939
12163
|
class: "receipt-section__row"
|
|
11940
|
-
}, [l("div",
|
|
12164
|
+
}, [l("div", yv, [f(Fh, {
|
|
11941
12165
|
image: t.user.avatar,
|
|
11942
12166
|
name: t.user.name,
|
|
11943
12167
|
class: "receipt-section__avatar"
|
|
11944
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
12168
|
+
}, null, 8, ["image", "name"]), l("div", bv, [l("p", xv, M(t.user.name), 1), l("p", Sv, [f(P(Ce), {
|
|
11945
12169
|
class: "receipt-section__icon text-success",
|
|
11946
12170
|
"aria-hidden": "true"
|
|
11947
|
-
}), l("span",
|
|
12171
|
+
}), l("span", Cv, M(e.formatDateTime(t.timestamp)), 1)])])])]))), 128))])) : s("", !0)]));
|
|
11948
12172
|
}
|
|
11949
|
-
}), [["__scopeId", "data-v-376a2c51"]]),
|
|
12173
|
+
}), [["__scopeId", "data-v-376a2c51"]]), Tv = {
|
|
11950
12174
|
key: 0,
|
|
11951
12175
|
class: "message-info-dialog-content overflow-y-auto"
|
|
11952
|
-
},
|
|
12176
|
+
}, Ev = {
|
|
11953
12177
|
key: 0,
|
|
11954
12178
|
class: "flex items-center justify-center px-4 py-8 sm:px-6"
|
|
11955
|
-
},
|
|
12179
|
+
}, Dv = {
|
|
11956
12180
|
key: 1,
|
|
11957
12181
|
class: "message-info-error body-md mx-4 rounded-xl px-4 py-3 sm:mx-6"
|
|
11958
|
-
},
|
|
12182
|
+
}, Ov = {
|
|
11959
12183
|
key: 2,
|
|
11960
12184
|
class: "message-info-list"
|
|
11961
|
-
},
|
|
12185
|
+
}, kv = {
|
|
11962
12186
|
key: 1,
|
|
11963
12187
|
class: "message-info-empty body-md text-subtle"
|
|
11964
|
-
},
|
|
12188
|
+
}, Av = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
11965
12189
|
__name: "MessageInfoDialog",
|
|
11966
12190
|
props: {
|
|
11967
12191
|
open: { type: Boolean },
|
|
@@ -11986,25 +12210,25 @@ var dh = {
|
|
|
11986
12210
|
return (t.timestamp?.getTime() ?? 0) - n;
|
|
11987
12211
|
});
|
|
11988
12212
|
}
|
|
11989
|
-
return (t, n) => (T(), o(
|
|
12213
|
+
return (t, n) => (T(), o(uh, {
|
|
11990
12214
|
open: e.open,
|
|
11991
12215
|
title: P(l)("seen"),
|
|
11992
12216
|
"close-label": P(l)("close"),
|
|
11993
12217
|
onClose: n[0] ||= (e) => r("close")
|
|
11994
12218
|
}, {
|
|
11995
|
-
default: z(() => [e.message ? (T(), c("div",
|
|
12219
|
+
default: z(() => [e.message ? (T(), c("div", Tv, [e.loading ? (T(), c("div", Ev, [f(P(se), {
|
|
11996
12220
|
style: {
|
|
11997
12221
|
width: "2.5rem",
|
|
11998
12222
|
height: "2.5rem"
|
|
11999
12223
|
},
|
|
12000
12224
|
"stroke-width": "5"
|
|
12001
|
-
})])) : e.error ? (T(), c("div",
|
|
12225
|
+
})])) : e.error ? (T(), c("div", Dv, M(e.error), 1)) : (T(), c("div", Ov, [u.value.length ? (T(), o(wv, {
|
|
12002
12226
|
key: 0,
|
|
12003
12227
|
title: P(l)("readBy"),
|
|
12004
12228
|
receipts: u.value,
|
|
12005
12229
|
"format-date-time": d,
|
|
12006
12230
|
"show-header": !1
|
|
12007
|
-
}, null, 8, ["title", "receipts"])) : (T(), c("p",
|
|
12231
|
+
}, null, 8, ["title", "receipts"])) : (T(), c("p", kv, M(P(l)("nobodyHasReadThisMessageYet")), 1))]))])) : s("", !0)]),
|
|
12008
12232
|
_: 1
|
|
12009
12233
|
}, 8, [
|
|
12010
12234
|
"open",
|
|
@@ -12012,13 +12236,13 @@ var dh = {
|
|
|
12012
12236
|
"close-label"
|
|
12013
12237
|
]));
|
|
12014
12238
|
}
|
|
12015
|
-
}), [["__scopeId", "data-v-ed86e885"]]),
|
|
12239
|
+
}), [["__scopeId", "data-v-ed86e885"]]), jv = { class: "min-h-0 flex-1 overflow-y-auto" }, Mv = {
|
|
12016
12240
|
key: 0,
|
|
12017
12241
|
class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-40 items-center justify-center rounded-xl px-6 text-center"
|
|
12018
|
-
},
|
|
12242
|
+
}, Nv = {
|
|
12019
12243
|
key: 1,
|
|
12020
12244
|
class: "space-y-3"
|
|
12021
|
-
},
|
|
12245
|
+
}, Pv = { class: "space-y-1" }, Fv = { class: "flex items-center justify-between gap-2" }, Iv = { class: "heading-sm text-default truncate" }, Lv = { class: "body-md text-default wrap-break-word whitespace-pre-wrap" }, Rv = { class: "body-sm text-subtlest" }, zv = { class: "mt-3 flex flex-wrap items-center gap-1" }, Bv = /* @__PURE__ */ p({
|
|
12022
12246
|
__name: "PinnedMessagesDialog",
|
|
12023
12247
|
props: {
|
|
12024
12248
|
open: { type: Boolean },
|
|
@@ -12052,19 +12276,19 @@ var dh = {
|
|
|
12052
12276
|
function h(e) {
|
|
12053
12277
|
i("jump", e.id), i("close");
|
|
12054
12278
|
}
|
|
12055
|
-
return (t, n) => (T(), o(
|
|
12279
|
+
return (t, n) => (T(), o(uh, {
|
|
12056
12280
|
open: e.open,
|
|
12057
12281
|
title: P(u)("pinnedMessages"),
|
|
12058
12282
|
subtitle: e.conversationTitle ?? "",
|
|
12059
12283
|
"close-label": P(u)("close"),
|
|
12060
12284
|
onClose: n[0] ||= (e) => i("close")
|
|
12061
12285
|
}, {
|
|
12062
|
-
default: z(() => [l("div",
|
|
12286
|
+
default: z(() => [l("div", jv, [e.messages.length === 0 ? (T(), c("div", Mv, M(P(u)("noPinnedMessages")), 1)) : (T(), c("div", Nv, [(T(!0), c(r, null, O(e.messages, (t) => (T(), c("article", {
|
|
12063
12287
|
key: t.id,
|
|
12064
12288
|
class: "border-default rounded-lg border px-4 py-3",
|
|
12065
12289
|
"data-testid": "pinned-message-row"
|
|
12066
|
-
}, [l("div",
|
|
12067
|
-
l("div",
|
|
12290
|
+
}, [l("div", Pv, [
|
|
12291
|
+
l("div", Fv, [l("p", Iv, M(t.senderName), 1), P(Mt)(t) ? (T(), o(P(ce), {
|
|
12068
12292
|
key: 0,
|
|
12069
12293
|
text: P(u)("pinnedLabel"),
|
|
12070
12294
|
context: "info",
|
|
@@ -12072,9 +12296,9 @@ var dh = {
|
|
|
12072
12296
|
size: "sm",
|
|
12073
12297
|
class: "shrink-0"
|
|
12074
12298
|
}, null, 8, ["text"])) : s("", !0)]),
|
|
12075
|
-
l("p",
|
|
12076
|
-
l("p",
|
|
12077
|
-
]), l("div",
|
|
12299
|
+
l("p", Lv, M(p(t)), 1),
|
|
12300
|
+
l("p", Rv, M(m(t)) + " · " + M(d(t.pinnedAt)), 1)
|
|
12301
|
+
]), l("div", zv, [f(P(V), {
|
|
12078
12302
|
label: P(u)("goToMessage"),
|
|
12079
12303
|
icon: P(Ge),
|
|
12080
12304
|
severity: "secondary",
|
|
@@ -12104,34 +12328,34 @@ var dh = {
|
|
|
12104
12328
|
"close-label"
|
|
12105
12329
|
]));
|
|
12106
12330
|
}
|
|
12107
|
-
}),
|
|
12331
|
+
}), Vv = { class: "min-h-0 flex-1 overflow-y-auto" }, Hv = {
|
|
12108
12332
|
key: 0,
|
|
12109
12333
|
class: "flex h-full min-h-64 items-center justify-center"
|
|
12110
|
-
},
|
|
12334
|
+
}, Uv = {
|
|
12111
12335
|
key: 1,
|
|
12112
12336
|
class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-64 items-center justify-center rounded-xl px-6 text-center"
|
|
12113
|
-
},
|
|
12337
|
+
}, Wv = {
|
|
12114
12338
|
key: 2,
|
|
12115
12339
|
class: "space-y-3"
|
|
12116
|
-
},
|
|
12340
|
+
}, Gv = { class: "flex flex-wrap items-start justify-between gap-3" }, Kv = { class: "w-full space-y-2" }, qv = { class: "center between gap-2" }, Jv = { class: "" }, Yv = { class: "space-y-1" }, Xv = { class: "heading-sm text-default" }, Zv = {
|
|
12117
12341
|
key: 0,
|
|
12118
12342
|
class: "body-md text-default"
|
|
12119
|
-
},
|
|
12343
|
+
}, Qv = {
|
|
12120
12344
|
key: 1,
|
|
12121
12345
|
class: "body-md text-default wrap-break-word whitespace-pre-wrap"
|
|
12122
|
-
},
|
|
12346
|
+
}, $v = {
|
|
12123
12347
|
key: 0,
|
|
12124
12348
|
class: "max-w-sm"
|
|
12125
|
-
},
|
|
12349
|
+
}, ey = { class: "flex flex-wrap items-center gap-1" }, ty = {
|
|
12126
12350
|
key: 0,
|
|
12127
12351
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3 sm:flex-row sm:items-center"
|
|
12128
|
-
},
|
|
12352
|
+
}, ny = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, ry = { class: "flex items-center gap-2" }, iy = {
|
|
12129
12353
|
key: 1,
|
|
12130
12354
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3"
|
|
12131
|
-
},
|
|
12355
|
+
}, ay = {
|
|
12132
12356
|
key: 0,
|
|
12133
12357
|
class: "relative max-w-sm"
|
|
12134
|
-
},
|
|
12358
|
+
}, oy = { class: "absolute top-2 right-2" }, sy = ["placeholder"], cy = { class: "flex items-center justify-end gap-2" }, ly = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
12135
12359
|
__name: "ScheduledMessagesDialog",
|
|
12136
12360
|
props: {
|
|
12137
12361
|
open: { type: Boolean },
|
|
@@ -12213,24 +12437,24 @@ var dh = {
|
|
|
12213
12437
|
function ne(e) {
|
|
12214
12438
|
u.value === e.id && A(), i("remove", e);
|
|
12215
12439
|
}
|
|
12216
|
-
return (t, n) => (T(), o(
|
|
12440
|
+
return (t, n) => (T(), o(uh, {
|
|
12217
12441
|
open: e.open,
|
|
12218
12442
|
title: P(v)("scheduledMessages"),
|
|
12219
12443
|
subtitle: e.conversationTitle ? P(v)("queuedForConversation", { title: e.conversationTitle }) : P(v)("queuedOutgoingMessagesForThisChat"),
|
|
12220
12444
|
"close-label": P(v)("close"),
|
|
12221
12445
|
onClose: n[3] ||= (e) => i("close")
|
|
12222
12446
|
}, {
|
|
12223
|
-
default: z(() => [l("div",
|
|
12447
|
+
default: z(() => [l("div", Vv, [e.loading ? (T(), c("div", Hv, [f(P(se), {
|
|
12224
12448
|
style: {
|
|
12225
12449
|
width: "2.75rem",
|
|
12226
12450
|
height: "2.75rem"
|
|
12227
12451
|
},
|
|
12228
12452
|
"stroke-width": "6"
|
|
12229
|
-
})])) : y.value.length === 0 ? (T(), c("div",
|
|
12453
|
+
})])) : y.value.length === 0 ? (T(), c("div", Uv, M(P(v)("noScheduledMessagesForConversation")), 1)) : (T(), c("div", Wv, [(T(!0), c(r, null, O(y.value, (e) => (T(), c("article", {
|
|
12230
12454
|
key: e.id,
|
|
12231
12455
|
class: "border-default rounded-lg border px-4 py-3"
|
|
12232
|
-
}, [l("div",
|
|
12233
|
-
l("div",
|
|
12456
|
+
}, [l("div", Gv, [l("div", Kv, [
|
|
12457
|
+
l("div", qv, [l("div", Jv, [e.kind === "poll" ? (T(), o(P(ce), {
|
|
12234
12458
|
key: 0,
|
|
12235
12459
|
text: P(v)("poll"),
|
|
12236
12460
|
context: "info",
|
|
@@ -12251,9 +12475,9 @@ var dh = {
|
|
|
12251
12475
|
size: "small",
|
|
12252
12476
|
onClick: (t) => ne(e)
|
|
12253
12477
|
}, null, 8, ["icon", "onClick"])]),
|
|
12254
|
-
l("div",
|
|
12255
|
-
F(e) && (u.value !== e.id || d.value !== "text") ? (T(), c("div",
|
|
12256
|
-
]), l("div",
|
|
12478
|
+
l("div", Yv, [l("p", Xv, M(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (T(), c("p", Zv, M(e.poll.question), 1)) : (T(), c("p", Qv, M(P(Jc)(e, P(v)("attachment"))), 1))]),
|
|
12479
|
+
F(e) && (u.value !== e.id || d.value !== "text") ? (T(), c("div", $v, [f(mg, { message: j(e) }, null, 8, ["message"])])) : s("", !0)
|
|
12480
|
+
]), l("div", ey, [e.kind === "poll" ? s("", !0) : (T(), o(P(V), {
|
|
12257
12481
|
key: 0,
|
|
12258
12482
|
label: P(v)("edit"),
|
|
12259
12483
|
icon: P(q),
|
|
@@ -12275,7 +12499,7 @@ var dh = {
|
|
|
12275
12499
|
"label",
|
|
12276
12500
|
"icon",
|
|
12277
12501
|
"onClick"
|
|
12278
|
-
])) : s("", !0)])]), u.value === e.id && d.value === "reschedule" ? (T(), c("div",
|
|
12502
|
+
])) : s("", !0)])]), u.value === e.id && d.value === "reschedule" ? (T(), c("div", ty, [l("div", ny, [te(l("input", {
|
|
12279
12503
|
"onUpdate:modelValue": n[0] ||= (e) => m.value = e,
|
|
12280
12504
|
type: "date",
|
|
12281
12505
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
@@ -12287,7 +12511,7 @@ var dh = {
|
|
|
12287
12511
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
12288
12512
|
"aria-label": "Time (24-hour)",
|
|
12289
12513
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
12290
|
-
}, null, 512), [[I, h.value]])]), l("div",
|
|
12514
|
+
}, null, 512), [[I, h.value]])]), l("div", ry, [f(P(V), {
|
|
12291
12515
|
label: P(v)("save"),
|
|
12292
12516
|
size: "small",
|
|
12293
12517
|
disabled: !m.value || !b.value,
|
|
@@ -12301,8 +12525,8 @@ var dh = {
|
|
|
12301
12525
|
size: "small",
|
|
12302
12526
|
text: "",
|
|
12303
12527
|
onClick: A
|
|
12304
|
-
}, null, 8, ["label"])])])) : u.value === e.id && d.value === "text" ? (T(), c("div",
|
|
12305
|
-
F(e) ? (T(), c("div",
|
|
12528
|
+
}, null, 8, ["label"])])])) : u.value === e.id && d.value === "text" ? (T(), c("div", iy, [
|
|
12529
|
+
F(e) ? (T(), c("div", ay, [f(mg, { message: j(e) }, null, 8, ["message"]), l("div", oy, [f(P(V), {
|
|
12306
12530
|
icon: P(ve),
|
|
12307
12531
|
"aria-label": P(v)("remove"),
|
|
12308
12532
|
text: "",
|
|
@@ -12316,8 +12540,8 @@ var dh = {
|
|
|
12316
12540
|
rows: "3",
|
|
12317
12541
|
class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none",
|
|
12318
12542
|
placeholder: P(v)("writeMessage")
|
|
12319
|
-
}, null, 8,
|
|
12320
|
-
l("div",
|
|
12543
|
+
}, null, 8, sy), [[I, g.value]]),
|
|
12544
|
+
l("div", cy, [f(P(V), {
|
|
12321
12545
|
label: P(v)("cancel"),
|
|
12322
12546
|
size: "small",
|
|
12323
12547
|
text: "",
|
|
@@ -12341,7 +12565,7 @@ var dh = {
|
|
|
12341
12565
|
"close-label"
|
|
12342
12566
|
]));
|
|
12343
12567
|
}
|
|
12344
|
-
}), [["__scopeId", "data-v-fc06094b"]]),
|
|
12568
|
+
}), [["__scopeId", "data-v-fc06094b"]]), uy = { class: "chat-status-overlay" }, dy = { class: "chat-status-overlay__card" }, fy = /*#__PURE__*/ Hp(/* @__PURE__ */ p({
|
|
12345
12569
|
__name: "ChatStatusOverlay",
|
|
12346
12570
|
props: {
|
|
12347
12571
|
visible: { type: Boolean },
|
|
@@ -12373,9 +12597,9 @@ var dh = {
|
|
|
12373
12597
|
message: t.messages.connecting,
|
|
12374
12598
|
slotName: "connecting"
|
|
12375
12599
|
} : null);
|
|
12376
|
-
return (e, t) => n.value ? k(e.$slots, n.value.slotName, {}, () => [l("div",
|
|
12600
|
+
return (e, t) => n.value ? k(e.$slots, n.value.slotName, {}, () => [l("div", uy, [l("div", dy, [k(e.$slots, `${n.value.slotName}-content`, {}, () => [l("span", null, M(n.value.message), 1)], !0)])])], !0, 0) : s("", !0);
|
|
12377
12601
|
}
|
|
12378
|
-
}), [["__scopeId", "data-v-8dc85e79"]]),
|
|
12602
|
+
}), [["__scopeId", "data-v-8dc85e79"]]), py = 2e4, my = /* @__PURE__ */ p({
|
|
12379
12603
|
__name: "BccChat",
|
|
12380
12604
|
props: {
|
|
12381
12605
|
client: { default: null },
|
|
@@ -12427,14 +12651,14 @@ var dh = {
|
|
|
12427
12651
|
let o = e, l = n, { t: p } = J(), h = D(null), g = D(!1), _ = D(!1), x = D(!1), C = a(() => o.client ?? $.value ?? null), w = a(() => !!o.chatUid), E = a(() => {
|
|
12428
12652
|
let e = C.value;
|
|
12429
12653
|
return e ? o.chatUid ? e.conversations.value.find((e) => e.targetId === o.chatUid || e.id === o.chatUid) ?? null : e.activeConversation.value : null;
|
|
12430
|
-
}), { groupMembers: O, fetchGroupMembers: A, clearGroupMembers: j } =
|
|
12654
|
+
}), { groupMembers: O, fetchGroupMembers: A, clearGroupMembers: j } = Cp({
|
|
12431
12655
|
getConversationTargetId: () => E.value?.targetId,
|
|
12432
|
-
isChannel: () =>
|
|
12433
|
-
hasJoined: () =>
|
|
12656
|
+
isChannel: () => Hf(E.value),
|
|
12657
|
+
hasJoined: () => Uf(E.value),
|
|
12434
12658
|
onMembersChanged: (e) => {
|
|
12435
12659
|
l("chatMembersFetched", e), C.value?.rememberMentionDisplayNames(e);
|
|
12436
12660
|
}
|
|
12437
|
-
}), N =
|
|
12661
|
+
}), N = Qf({
|
|
12438
12662
|
chatClient: C,
|
|
12439
12663
|
selectedConversation: E,
|
|
12440
12664
|
getPropIsReadOnly: () => o.isReadOnly,
|
|
@@ -12444,39 +12668,39 @@ var dh = {
|
|
|
12444
12668
|
currentUserId: C.value?.currentUser.value?.uid
|
|
12445
12669
|
})
|
|
12446
12670
|
});
|
|
12447
|
-
|
|
12448
|
-
let F =
|
|
12671
|
+
ep(N);
|
|
12672
|
+
let F = rp({
|
|
12449
12673
|
chatClient: C,
|
|
12450
12674
|
selectedConversation: E,
|
|
12451
12675
|
usesPublicContract: w,
|
|
12452
12676
|
loadingChat: _,
|
|
12453
12677
|
getHideDeletedMessages: () => o.hideDeletedMessages
|
|
12454
12678
|
});
|
|
12455
|
-
|
|
12456
|
-
let I = a(() => F.messages.value.length > 0), L =
|
|
12679
|
+
ap(F);
|
|
12680
|
+
let I = a(() => F.messages.value.length > 0), L = pp({
|
|
12457
12681
|
chatClient: C,
|
|
12458
12682
|
selectedConversation: E,
|
|
12459
12683
|
canScheduleMessages: () => !N.isReadOnly.value && E.value?.type !== "user",
|
|
12460
12684
|
getInitialScheduledMessagesOpen: () => !!o.initialScheduledMessagesOpen,
|
|
12461
12685
|
fetchErrorFallback: p("loadMessageReceiptsError")
|
|
12462
12686
|
});
|
|
12463
|
-
|
|
12464
|
-
let te = ee("mainComposerRef"), ne = ee("threadComposerRef"), B =
|
|
12687
|
+
hp(L);
|
|
12688
|
+
let te = ee("mainComposerRef"), ne = ee("threadComposerRef"), B = cp({
|
|
12465
12689
|
chatClient: C,
|
|
12466
12690
|
mentionNameByUid: N.mentionNameByUid,
|
|
12467
12691
|
afterSchedule: () => L.openScheduledMessages(),
|
|
12468
12692
|
mainComposerRef: te,
|
|
12469
12693
|
threadComposerRef: ne
|
|
12470
12694
|
});
|
|
12471
|
-
|
|
12472
|
-
let re =
|
|
12473
|
-
|
|
12695
|
+
up(B);
|
|
12696
|
+
let re = yp();
|
|
12697
|
+
bp(re), _p({
|
|
12474
12698
|
conversation: N,
|
|
12475
12699
|
composer: B,
|
|
12476
12700
|
dialogs: L,
|
|
12477
12701
|
bus: re
|
|
12478
12702
|
});
|
|
12479
|
-
let { scrollToRequestedMessage: V } =
|
|
12703
|
+
let { scrollToRequestedMessage: V } = wp({
|
|
12480
12704
|
chatRootRef: h,
|
|
12481
12705
|
getClient: () => C.value
|
|
12482
12706
|
});
|
|
@@ -12496,8 +12720,8 @@ var dh = {
|
|
|
12496
12720
|
e && l("chatEmpty");
|
|
12497
12721
|
}), R([
|
|
12498
12722
|
() => o.chatUid,
|
|
12499
|
-
() => o.client ? o.client.initialized.value :
|
|
12500
|
-
() => o.client ? o.client.loggedIn.value :
|
|
12723
|
+
() => o.client ? o.client.initialized.value : Bf.initialized.value,
|
|
12724
|
+
() => o.client ? o.client.loggedIn.value : Bf.loggedIn.value,
|
|
12501
12725
|
() => C.value?.conversations.value.length ?? 0
|
|
12502
12726
|
], async ([e, t, n]) => {
|
|
12503
12727
|
w.value && e && t && n && C.value && await U();
|
|
@@ -12510,7 +12734,7 @@ var dh = {
|
|
|
12510
12734
|
() => H.value,
|
|
12511
12735
|
() => F.messages.value.length,
|
|
12512
12736
|
() => F.threadMessages.value.length,
|
|
12513
|
-
() =>
|
|
12737
|
+
() => Bf.scrollToMessageId.value
|
|
12514
12738
|
], async () => {
|
|
12515
12739
|
H.value && await V();
|
|
12516
12740
|
});
|
|
@@ -12547,7 +12771,7 @@ var dh = {
|
|
|
12547
12771
|
}
|
|
12548
12772
|
}
|
|
12549
12773
|
async function ie(e, t) {
|
|
12550
|
-
let n = await
|
|
12774
|
+
let n = await Bf.getGroup(e, !0);
|
|
12551
12775
|
if (!n || typeof n != "object") return null;
|
|
12552
12776
|
let r = String(n.getGuid());
|
|
12553
12777
|
if (!r) return null;
|
|
@@ -12581,7 +12805,7 @@ var dh = {
|
|
|
12581
12805
|
n(), clearTimeout(r), e(t);
|
|
12582
12806
|
}, n = R(H, (e) => {
|
|
12583
12807
|
e && t(!0);
|
|
12584
|
-
}), r = setTimeout(() => t(!1),
|
|
12808
|
+
}), r = setTimeout(() => t(!1), py);
|
|
12585
12809
|
});
|
|
12586
12810
|
}
|
|
12587
12811
|
function se(e) {
|
|
@@ -12607,7 +12831,7 @@ var dh = {
|
|
|
12607
12831
|
_: 1
|
|
12608
12832
|
})], void 0, 0) : s("", !0),
|
|
12609
12833
|
C.value ? (T(), c(r, { key: 1 }, [
|
|
12610
|
-
f(
|
|
12834
|
+
f(av, {
|
|
12611
12835
|
target: "main",
|
|
12612
12836
|
class: y(["min-h-0 flex-1", e.containerClass]),
|
|
12613
12837
|
"hide-group-actions": e.hideGroupActions,
|
|
@@ -12616,7 +12840,7 @@ var dh = {
|
|
|
12616
12840
|
"action-message-row-class": e.actionMessageRowClass,
|
|
12617
12841
|
onAnchorclick: ae
|
|
12618
12842
|
}, u({
|
|
12619
|
-
composer: z(() => [f(
|
|
12843
|
+
composer: z(() => [f(Gm, {
|
|
12620
12844
|
ref_key: "mainComposerRef",
|
|
12621
12845
|
ref: te,
|
|
12622
12846
|
target: "main"
|
|
@@ -12633,7 +12857,7 @@ var dh = {
|
|
|
12633
12857
|
"action-message-class",
|
|
12634
12858
|
"action-message-row-class"
|
|
12635
12859
|
]),
|
|
12636
|
-
f(
|
|
12860
|
+
f(uh, {
|
|
12637
12861
|
open: !!P(F).activeThreadParentMessage.value,
|
|
12638
12862
|
title: P(p)("threadWithCount", { count: P(F).activeThreadParentMessage.value?.replyCount ?? 0 }),
|
|
12639
12863
|
subtitle: E.value?.title ?? "",
|
|
@@ -12641,13 +12865,13 @@ var dh = {
|
|
|
12641
12865
|
"close-aria-label": P(p)("closeThread"),
|
|
12642
12866
|
onClose: n[0] ||= (e) => P(re).emit("ui:closeThread")
|
|
12643
12867
|
}, {
|
|
12644
|
-
default: z(() => [f(
|
|
12868
|
+
default: z(() => [f(av, {
|
|
12645
12869
|
target: "thread",
|
|
12646
12870
|
class: "min-h-0 flex-1",
|
|
12647
12871
|
"action-message-class": e.actionMessageClass,
|
|
12648
12872
|
"action-message-row-class": e.actionMessageRowClass
|
|
12649
12873
|
}, {
|
|
12650
|
-
composer: z(() => [f(
|
|
12874
|
+
composer: z(() => [f(Gm, {
|
|
12651
12875
|
ref_key: "threadComposerRef",
|
|
12652
12876
|
ref: ne,
|
|
12653
12877
|
target: "thread"
|
|
@@ -12662,7 +12886,7 @@ var dh = {
|
|
|
12662
12886
|
"close-label",
|
|
12663
12887
|
"close-aria-label"
|
|
12664
12888
|
]),
|
|
12665
|
-
f(
|
|
12889
|
+
f(ly, {
|
|
12666
12890
|
open: P(L).showScheduledMessages.value,
|
|
12667
12891
|
loading: P(L).loadingScheduledMessages.value,
|
|
12668
12892
|
messages: P(L).scheduledMessages.value,
|
|
@@ -12677,7 +12901,7 @@ var dh = {
|
|
|
12677
12901
|
"messages",
|
|
12678
12902
|
"conversation-title"
|
|
12679
12903
|
]),
|
|
12680
|
-
f(
|
|
12904
|
+
f(Av, {
|
|
12681
12905
|
open: !!P(L).infoMessage.value,
|
|
12682
12906
|
message: P(L).infoMessage.value,
|
|
12683
12907
|
receipts: P(L).infoMessageReceipts.value,
|
|
@@ -12691,7 +12915,7 @@ var dh = {
|
|
|
12691
12915
|
"loading",
|
|
12692
12916
|
"error"
|
|
12693
12917
|
]),
|
|
12694
|
-
f(
|
|
12918
|
+
f(Bv, {
|
|
12695
12919
|
open: P(L).showPinnedMessages.value,
|
|
12696
12920
|
messages: P(F).pinnedMessages.value,
|
|
12697
12921
|
"can-unpin": P(N).canPin.value,
|
|
@@ -12707,7 +12931,7 @@ var dh = {
|
|
|
12707
12931
|
"mention-name-by-uid",
|
|
12708
12932
|
"conversation-title"
|
|
12709
12933
|
]),
|
|
12710
|
-
f(
|
|
12934
|
+
f(pv, {
|
|
12711
12935
|
open: !!P(L).forwardMessageSource.value,
|
|
12712
12936
|
chats: C.value?.conversations.value ?? [],
|
|
12713
12937
|
sending: P(L).sendingForwardMessage.value,
|
|
@@ -12719,7 +12943,7 @@ var dh = {
|
|
|
12719
12943
|
"sending"
|
|
12720
12944
|
])
|
|
12721
12945
|
], 64)) : s("", !0),
|
|
12722
|
-
f(
|
|
12946
|
+
f(fy, {
|
|
12723
12947
|
visible: w.value && (C.value?.offlineMode.value || !C.value?.connected.value || _.value && !I.value || g.value || x.value || P(F).isChatEmpty.value),
|
|
12724
12948
|
"offline-mode": !(!C.value?.offlineMode.value || E.value),
|
|
12725
12949
|
connected: !!(C.value?.connected.value || E.value),
|
|
@@ -12757,6 +12981,6 @@ var dh = {
|
|
|
12757
12981
|
}
|
|
12758
12982
|
});
|
|
12759
12983
|
//#endregion
|
|
12760
|
-
export {
|
|
12984
|
+
export { my as BccChat, my as BccChatMessageList, Vd as LogSeverity, Bf as chat, Bf as default, tu as createChatClient };
|
|
12761
12985
|
|
|
12762
12986
|
//# sourceMappingURL=vue-bcc-chat-ui.js.map
|