@bcc-code/vue-bcc-chat-ui 7.1.53 → 7.1.54
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/vue-bcc-chat-ui.js +580 -571
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -4434,7 +4434,7 @@ function _c({ environment: e }) {
|
|
|
4434
4434
|
muid: a,
|
|
4435
4435
|
deliveryState: "sending"
|
|
4436
4436
|
}));
|
|
4437
|
-
let e = new H.TextMessage(n.targetId, r,
|
|
4437
|
+
let e = new H.TextMessage(n.targetId, r, zc(n));
|
|
4438
4438
|
e.setMuid?.(a), Object.keys(o).length > 0 && e.setMetadata?.(o), i && e.setParentMessageId?.(Number(i));
|
|
4439
4439
|
let t = await H.sendMessage(e);
|
|
4440
4440
|
Tt(F(t, _.value?.uid)), _t(t), await bt(t), D.value = null;
|
|
@@ -4456,7 +4456,7 @@ function _c({ environment: e }) {
|
|
|
4456
4456
|
u.value = !0, g.value = null;
|
|
4457
4457
|
try {
|
|
4458
4458
|
let t;
|
|
4459
|
-
e.kind === "text" ? t = new H.TextMessage(n.targetId, r,
|
|
4459
|
+
e.kind === "text" ? t = new H.TextMessage(n.targetId, r, zc(n)) : (t = new H.MediaMessage(n.targetId, e.source?.getAttachment?.()?.getFileUrl?.() ?? e.source?.getAttachment?.()?.getUrl?.() ?? e.attachments[0]?.url ?? "", e.source?.getType?.() ?? e.type ?? e.kind, zc(n)), t.setCaption(r)), t.setId(Number(e.id));
|
|
4460
4460
|
let i = await H.editMessage(t);
|
|
4461
4461
|
Tt(F(i, _.value?.uid)), _t(i), O.value = null;
|
|
4462
4462
|
} catch (e) {
|
|
@@ -4470,7 +4470,7 @@ function _c({ environment: e }) {
|
|
|
4470
4470
|
if (u.value) return;
|
|
4471
4471
|
let n = I.value;
|
|
4472
4472
|
if (!n) return;
|
|
4473
|
-
let r = E.value?.id, i = crypto.randomUUID(), a = Ic(It(D.value, t), i), o =
|
|
4473
|
+
let r = E.value?.id, i = crypto.randomUUID(), a = Ic(It(D.value, t), i), o = Uc(e.file);
|
|
4474
4474
|
u.value = !0, g.value = null;
|
|
4475
4475
|
try {
|
|
4476
4476
|
if (m.value) {
|
|
@@ -4484,7 +4484,7 @@ function _c({ environment: e }) {
|
|
|
4484
4484
|
attachments: [{
|
|
4485
4485
|
kind: o,
|
|
4486
4486
|
name: e.file.name,
|
|
4487
|
-
mimeType:
|
|
4487
|
+
mimeType: Qc(e.file) || void 0,
|
|
4488
4488
|
size: e.file.size
|
|
4489
4489
|
}],
|
|
4490
4490
|
metadata: a,
|
|
@@ -4492,7 +4492,7 @@ function _c({ environment: e }) {
|
|
|
4492
4492
|
muid: i,
|
|
4493
4493
|
deliveryState: "sending"
|
|
4494
4494
|
}));
|
|
4495
|
-
let t = new H.MediaMessage(n.targetId, e.file, o,
|
|
4495
|
+
let t = new H.MediaMessage(n.targetId, e.file, o, zc(n));
|
|
4496
4496
|
t.setMuid?.(i), Object.keys(a).length > 0 && t.setMetadata?.(a), r && t.setParentMessageId?.(Number(r)), e.caption?.trim() && t.setCaption?.(e.caption.trim());
|
|
4497
4497
|
let s = await H.sendMediaMessage(t);
|
|
4498
4498
|
Tt(F(s, _.value?.uid)), _t(s), await bt(s), D.value = null;
|
|
@@ -4657,6 +4657,10 @@ function _c({ environment: e }) {
|
|
|
4657
4657
|
x.value = o;
|
|
4658
4658
|
} catch (e) {
|
|
4659
4659
|
if (r !== fe) return;
|
|
4660
|
+
if (Rc(e)) {
|
|
4661
|
+
x.value = [];
|
|
4662
|
+
return;
|
|
4663
|
+
}
|
|
4660
4664
|
throw g.value = Z(e, vt("loadScheduledMessagesError")), e;
|
|
4661
4665
|
} finally {
|
|
4662
4666
|
r === fe && (l.value = !1);
|
|
@@ -4668,7 +4672,7 @@ function _c({ environment: e }) {
|
|
|
4668
4672
|
if (n) {
|
|
4669
4673
|
d.value = !0, g.value = null;
|
|
4670
4674
|
try {
|
|
4671
|
-
e.file ? await
|
|
4675
|
+
e.file ? await Hc(n, e, t) : await Vc(n, e, t), await Ge(n.targetId);
|
|
4672
4676
|
} catch (e) {
|
|
4673
4677
|
throw g.value = Z(e, "Unable to schedule the message."), e;
|
|
4674
4678
|
} finally {
|
|
@@ -4710,7 +4714,7 @@ function _c({ environment: e }) {
|
|
|
4710
4714
|
async function Ze(e) {
|
|
4711
4715
|
d.value = !0, g.value = null;
|
|
4712
4716
|
try {
|
|
4713
|
-
let t =
|
|
4717
|
+
let t = Bc(), n = await fetch(`${G().chatApiBaseUrl}/chats/rescheduleMessage`, {
|
|
4714
4718
|
method: "POST",
|
|
4715
4719
|
headers: {
|
|
4716
4720
|
"Content-Type": "application/json",
|
|
@@ -5145,7 +5149,7 @@ function _c({ environment: e }) {
|
|
|
5145
5149
|
muid: e.muid,
|
|
5146
5150
|
conversationId: e.conversation.id,
|
|
5147
5151
|
senderId: _.value?.uid ?? "me",
|
|
5148
|
-
senderName:
|
|
5152
|
+
senderName: qc(_.value, e.metadata),
|
|
5149
5153
|
senderAvatar: _.value?.avatar,
|
|
5150
5154
|
text: e.text,
|
|
5151
5155
|
kind: e.kind,
|
|
@@ -5255,14 +5259,14 @@ function _c({ environment: e }) {
|
|
|
5255
5259
|
});
|
|
5256
5260
|
}
|
|
5257
5261
|
async function Ut(e, t, n, r, i) {
|
|
5258
|
-
let a =
|
|
5262
|
+
let a = Uc(t.file), o = Ft({
|
|
5259
5263
|
conversation: e,
|
|
5260
5264
|
kind: a,
|
|
5261
5265
|
text: t.caption?.trim() ?? "",
|
|
5262
5266
|
attachments: [{
|
|
5263
5267
|
kind: a,
|
|
5264
5268
|
name: t.file.name,
|
|
5265
|
-
mimeType:
|
|
5269
|
+
mimeType: Qc(t.file) || void 0,
|
|
5266
5270
|
size: t.file.size
|
|
5267
5271
|
}],
|
|
5268
5272
|
metadata: n,
|
|
@@ -5279,7 +5283,7 @@ function _c({ environment: e }) {
|
|
|
5279
5283
|
attachment: {
|
|
5280
5284
|
kind: a,
|
|
5281
5285
|
name: t.file.name,
|
|
5282
|
-
type:
|
|
5286
|
+
type: Qc(t.file),
|
|
5283
5287
|
size: t.file.size,
|
|
5284
5288
|
caption: t.caption?.trim() || void 0
|
|
5285
5289
|
},
|
|
@@ -5475,14 +5479,14 @@ function bc(e, t) {
|
|
|
5475
5479
|
};
|
|
5476
5480
|
}
|
|
5477
5481
|
function xc(e, t) {
|
|
5478
|
-
let n = e.getSender?.(), r = n?.getUid?.() ?? "system", i = !!e.getDeletedAt?.(), a =
|
|
5482
|
+
let n = e.getSender?.(), r = n?.getUid?.() ?? "system", i = !!e.getDeletedAt?.(), a = nl(e), o = fl(e), s = i ? [] : al(e, a), c = i ? void 0 : ul(e), l = vl(e), u = e.getQuotedMessage?.() ?? e.getReplyMessage?.() ?? e.getParentMessage?.();
|
|
5479
5483
|
return {
|
|
5480
5484
|
id: String(e.getId?.() ?? `${e.getMuid?.() ?? crypto.randomUUID()}`),
|
|
5481
5485
|
muid: e.getMuid?.() ? String(e.getMuid()) : void 0,
|
|
5482
5486
|
conversationId: e.getConversationId(),
|
|
5483
5487
|
senderId: r,
|
|
5484
|
-
senderName:
|
|
5485
|
-
senderAvatar:
|
|
5488
|
+
senderName: Jc(n, l),
|
|
5489
|
+
senderAvatar: Yc(e, n),
|
|
5486
5490
|
text: Oc(e, t),
|
|
5487
5491
|
kind: a,
|
|
5488
5492
|
sentAt: /* @__PURE__ */ new Date((e.getSentAt?.() ?? 0) * 1e3),
|
|
@@ -5495,10 +5499,10 @@ function xc(e, t) {
|
|
|
5495
5499
|
poll: c,
|
|
5496
5500
|
scheduled: o,
|
|
5497
5501
|
translatedText: i ? void 0 : typeof l?.translated_message == "string" ? l.translated_message : void 0,
|
|
5498
|
-
replyTo:
|
|
5499
|
-
parentMessageId:
|
|
5500
|
-
replyCount:
|
|
5501
|
-
reactions:
|
|
5502
|
+
replyTo: ml(l ?? {}, u),
|
|
5503
|
+
parentMessageId: pl(e),
|
|
5504
|
+
replyCount: hl(e),
|
|
5505
|
+
reactions: _l(e),
|
|
5502
5506
|
receipts: Tc(e),
|
|
5503
5507
|
deliveryState: "sent",
|
|
5504
5508
|
metadata: l,
|
|
@@ -5542,32 +5546,32 @@ function Ec(e) {
|
|
|
5542
5546
|
}
|
|
5543
5547
|
function Dc(e, t) {
|
|
5544
5548
|
if (e.getDeletedAt?.()) return "Message removed";
|
|
5545
|
-
let n = e.getType?.(), r = e.getCategory?.(), i =
|
|
5546
|
-
if (String(r).toLowerCase() === "action") return
|
|
5549
|
+
let n = e.getType?.(), r = e.getCategory?.(), i = ul(e);
|
|
5550
|
+
if (String(r).toLowerCase() === "action") return $c(e);
|
|
5547
5551
|
if (i) return `Poll: ${i.question}`;
|
|
5548
5552
|
if (n === H.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
|
|
5549
5553
|
let t = Qs(e.getText());
|
|
5550
5554
|
if (t) return t;
|
|
5551
5555
|
}
|
|
5552
|
-
if (String(r).toLowerCase() === "message" &&
|
|
5553
|
-
let t =
|
|
5556
|
+
if (String(r).toLowerCase() === "message" && rl(n)) {
|
|
5557
|
+
let t = al(e, nl(e))[0];
|
|
5554
5558
|
return e.getCaption?.()?.trim?.() || Js(t ? [t] : [], "Sent an attachment");
|
|
5555
5559
|
}
|
|
5556
5560
|
return e.getSender?.()?.getUid?.() === t ? vt("youSentAMessage") : vt("unsupportedMessageType");
|
|
5557
5561
|
}
|
|
5558
5562
|
function Oc(e, t) {
|
|
5559
5563
|
if (e.getDeletedAt?.()) return "Message removed";
|
|
5560
|
-
let n = e.getType?.(), r = e.getCategory?.(), i =
|
|
5561
|
-
if (String(r).toLowerCase() === "action") return
|
|
5564
|
+
let n = e.getType?.(), r = e.getCategory?.(), i = ul(e);
|
|
5565
|
+
if (String(r).toLowerCase() === "action") return $c(e);
|
|
5562
5566
|
if (i) return `Poll: ${i.question}`;
|
|
5563
5567
|
if (n === H.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
|
|
5564
5568
|
let t = Ys(e.getText?.());
|
|
5565
5569
|
if (Zs(t)) return t;
|
|
5566
5570
|
}
|
|
5567
|
-
if (String(r).toLowerCase() === "message" &&
|
|
5571
|
+
if (String(r).toLowerCase() === "message" && rl(n)) {
|
|
5568
5572
|
let t = Ys(e.getCaption?.());
|
|
5569
5573
|
if (Zs(t)) return t;
|
|
5570
|
-
let n =
|
|
5574
|
+
let n = al(e, nl(e))[0];
|
|
5571
5575
|
return Js(n ? [n] : [], "Sent an attachment");
|
|
5572
5576
|
}
|
|
5573
5577
|
return e.getSender?.()?.getUid?.() === t ? vt("youSentAMessage") : vt("unsupportedMessageType");
|
|
@@ -5615,17 +5619,22 @@ function Z(e, t) {
|
|
|
5615
5619
|
}), e instanceof Error && e.message ? e.message : t;
|
|
5616
5620
|
}
|
|
5617
5621
|
function Rc(e) {
|
|
5622
|
+
if (!e || typeof e != "object") return !1;
|
|
5623
|
+
let t = e;
|
|
5624
|
+
return t.code === "ERR_GUID_NOT_FOUND" || t.status === 404 || t.statusCode === 404;
|
|
5625
|
+
}
|
|
5626
|
+
function zc(e) {
|
|
5618
5627
|
return e.type === "group" ? H.RECEIVER_TYPE.GROUP : H.RECEIVER_TYPE.USER;
|
|
5619
5628
|
}
|
|
5620
|
-
function
|
|
5629
|
+
function Bc() {
|
|
5621
5630
|
let e = qe();
|
|
5622
5631
|
if (!e) throw Error("Missing access token.");
|
|
5623
5632
|
return e;
|
|
5624
5633
|
}
|
|
5625
|
-
async function
|
|
5634
|
+
async function Vc(e, t, n) {
|
|
5626
5635
|
let r = t.text?.trim();
|
|
5627
5636
|
if (!r) return;
|
|
5628
|
-
let i =
|
|
5637
|
+
let i = Bc(), a = await fetch(`${G().chatApiBaseUrl}/chats/scheduledMessages`, {
|
|
5629
5638
|
method: "POST",
|
|
5630
5639
|
headers: {
|
|
5631
5640
|
"Content-Type": "application/json",
|
|
@@ -5643,11 +5652,11 @@ async function Bc(e, t, n) {
|
|
|
5643
5652
|
});
|
|
5644
5653
|
if (!a.ok) throw Error(`Scheduling failed with status ${a.status}.`);
|
|
5645
5654
|
}
|
|
5646
|
-
async function
|
|
5655
|
+
async function Hc(e, t, n) {
|
|
5647
5656
|
if (!t.file) return;
|
|
5648
|
-
let r =
|
|
5657
|
+
let r = Bc(), i = Ye()?.token;
|
|
5649
5658
|
if (!i) throw Error("Missing CometChat auth token.");
|
|
5650
|
-
let a =
|
|
5659
|
+
let a = Wc(t.file), o = t.caption?.trim() ?? "", s = Gc(e, t.file, a, o, t.scheduleDate, n), c = await fetch(`${G().chatApiBaseUrl}/chats/scheduledMediaMessages`, {
|
|
5651
5660
|
method: "POST",
|
|
5652
5661
|
headers: {
|
|
5653
5662
|
Accept: "multipart/form-data",
|
|
@@ -5658,24 +5667,24 @@ async function Vc(e, t, n) {
|
|
|
5658
5667
|
});
|
|
5659
5668
|
if (!c.ok) throw Error(`Scheduling failed with status ${c.status}.`);
|
|
5660
5669
|
}
|
|
5661
|
-
function
|
|
5662
|
-
let t =
|
|
5670
|
+
function Uc(e) {
|
|
5671
|
+
let t = Qc(e);
|
|
5663
5672
|
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
|
|
5664
5673
|
}
|
|
5665
|
-
function
|
|
5666
|
-
let t =
|
|
5674
|
+
function Wc(e) {
|
|
5675
|
+
let t = Uc(e);
|
|
5667
5676
|
if (t === "file") throw Error("Scheduled attachments currently support images, video, and audio only.");
|
|
5668
5677
|
return t;
|
|
5669
5678
|
}
|
|
5670
|
-
function
|
|
5671
|
-
let o = new H.MediaMessage(e.targetId, t, n,
|
|
5679
|
+
function Gc(e, t, n, r, i, a) {
|
|
5680
|
+
let o = new H.MediaMessage(e.targetId, t, n, zc(e));
|
|
5672
5681
|
return o.setSentAt(Math.floor(Date.now() / 1e3)), o.setMuid(globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${t.name}`), r && o.setCaption(r), o.setMetadata({
|
|
5673
5682
|
scheduleDate: i,
|
|
5674
5683
|
file: t,
|
|
5675
5684
|
...a?.senderDisplayName?.trim() ? { senderDisplayName: a.senderDisplayName.trim() } : {}
|
|
5676
|
-
}), o.setTags([e.targetId]),
|
|
5685
|
+
}), o.setTags([e.targetId]), Kc(o);
|
|
5677
5686
|
}
|
|
5678
|
-
function
|
|
5687
|
+
function Kc(e) {
|
|
5679
5688
|
let t = new FormData();
|
|
5680
5689
|
return Object.keys(e).forEach((n) => {
|
|
5681
5690
|
let r = e[n];
|
|
@@ -5692,33 +5701,33 @@ function Gc(e) {
|
|
|
5692
5701
|
}
|
|
5693
5702
|
}), t;
|
|
5694
5703
|
}
|
|
5695
|
-
function
|
|
5704
|
+
function qc(e, t) {
|
|
5696
5705
|
let n = t.senderDisplayName;
|
|
5697
5706
|
return typeof n == "string" && n.trim() ? n.trim() : e?.name ?? "You";
|
|
5698
5707
|
}
|
|
5699
|
-
function
|
|
5708
|
+
function Jc(e, t) {
|
|
5700
5709
|
let n = t?.senderDisplayName;
|
|
5701
5710
|
return typeof n == "string" && n.trim() ? n.trim() : e?.getName?.() ?? "System";
|
|
5702
5711
|
}
|
|
5703
|
-
function Jc(e, t) {
|
|
5704
|
-
return $e(Xc(t)) || (Yc(e, "sender") ?? void 0);
|
|
5705
|
-
}
|
|
5706
5712
|
function Yc(e, t) {
|
|
5707
|
-
|
|
5708
|
-
|
|
5713
|
+
return $e(Zc(t)) || (Xc(e, "sender") ?? void 0);
|
|
5714
|
+
}
|
|
5715
|
+
function Xc(e, t) {
|
|
5716
|
+
let n = gl(e)?.entities?.[t]?.entity;
|
|
5717
|
+
return $e(Zc(n));
|
|
5709
5718
|
}
|
|
5710
|
-
function
|
|
5719
|
+
function Zc(e) {
|
|
5711
5720
|
if (!e || typeof e != "object") return e;
|
|
5712
5721
|
let t = e;
|
|
5713
5722
|
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));
|
|
5714
5723
|
}
|
|
5715
|
-
function Zc(e) {
|
|
5716
|
-
return e.type.trim().toLowerCase() || el(e.name);
|
|
5717
|
-
}
|
|
5718
5724
|
function Qc(e) {
|
|
5719
|
-
|
|
5725
|
+
return e.type.trim().toLowerCase() || tl(e.name);
|
|
5726
|
+
}
|
|
5727
|
+
function $c(e) {
|
|
5728
|
+
let t = String(e.getType?.() ?? "").toLowerCase(), n = gl(e), r = String(n?.action ?? "").toLowerCase();
|
|
5720
5729
|
if (t === "groupmember") {
|
|
5721
|
-
let e =
|
|
5730
|
+
let e = el(n, "on");
|
|
5722
5731
|
if (!e) return "";
|
|
5723
5732
|
switch (r) {
|
|
5724
5733
|
case "added": return `${e} added to conversation`;
|
|
@@ -5735,7 +5744,7 @@ function Qc(e) {
|
|
|
5735
5744
|
}
|
|
5736
5745
|
return "";
|
|
5737
5746
|
}
|
|
5738
|
-
function
|
|
5747
|
+
function el(e, t) {
|
|
5739
5748
|
let n = e?.entities?.[t]?.entity;
|
|
5740
5749
|
if (n && typeof n == "object") {
|
|
5741
5750
|
let e = n.name ?? n.uid ?? n.guid;
|
|
@@ -5743,7 +5752,7 @@ function $c(e, t) {
|
|
|
5743
5752
|
}
|
|
5744
5753
|
return "";
|
|
5745
5754
|
}
|
|
5746
|
-
function
|
|
5755
|
+
function tl(e) {
|
|
5747
5756
|
switch (e.split(".").pop()?.toLowerCase() ?? "") {
|
|
5748
5757
|
case "png": return "image/png";
|
|
5749
5758
|
case "jpg":
|
|
@@ -5757,11 +5766,11 @@ function el(e) {
|
|
|
5757
5766
|
default: return "";
|
|
5758
5767
|
}
|
|
5759
5768
|
}
|
|
5760
|
-
function
|
|
5769
|
+
function nl(e) {
|
|
5761
5770
|
let t = String(e.getType?.() ?? "text").toLowerCase(), n = String(e.getCategory?.() ?? "message").toLowerCase();
|
|
5762
|
-
return
|
|
5771
|
+
return ul(e) || t === "poll" ? "poll" : n === "action" ? "action" : t === "image" || t === "video" || t === "audio" || t === "file" ? t : t === "text" ? "text" : rl(t) ? il(e) : "unsupported";
|
|
5763
5772
|
}
|
|
5764
|
-
function
|
|
5773
|
+
function rl(e) {
|
|
5765
5774
|
return [
|
|
5766
5775
|
"media",
|
|
5767
5776
|
"image",
|
|
@@ -5770,14 +5779,14 @@ function nl(e) {
|
|
|
5770
5779
|
"file"
|
|
5771
5780
|
].includes(String(e).toLowerCase());
|
|
5772
5781
|
}
|
|
5773
|
-
function
|
|
5782
|
+
function il(e) {
|
|
5774
5783
|
let t = e.getAttachment?.()?.getMimeType?.() ?? e.getAttachment?.()?.getType?.() ?? e.getData?.()?.attachments?.[0]?.mimeType ?? "";
|
|
5775
5784
|
return String(t).startsWith("image/") ? "image" : String(t).startsWith("video/") ? "video" : String(t).startsWith("audio/") ? "audio" : "file";
|
|
5776
5785
|
}
|
|
5777
|
-
function
|
|
5778
|
-
let n = e.getAttachment?.(), r =
|
|
5786
|
+
function al(e, t) {
|
|
5787
|
+
let n = e.getAttachment?.(), r = gl(e), i = r?.attachments?.[0] ?? null;
|
|
5779
5788
|
if (!n && !i && !r?.url) return [];
|
|
5780
|
-
let a = t === "image" || t === "video" || t === "audio" || t === "file" ? t :
|
|
5789
|
+
let a = t === "image" || t === "video" || t === "audio" || t === "file" ? t : il(e), o = ol(e, n, i);
|
|
5781
5790
|
return [{
|
|
5782
5791
|
kind: a,
|
|
5783
5792
|
name: n?.getName?.() ?? i?.name ?? i?.fileName ?? "Attachment",
|
|
@@ -5789,8 +5798,8 @@ function il(e, t) {
|
|
|
5789
5798
|
height: o?.height
|
|
5790
5799
|
}];
|
|
5791
5800
|
}
|
|
5792
|
-
function
|
|
5793
|
-
let r =
|
|
5801
|
+
function ol(e, t, n) {
|
|
5802
|
+
let r = cl({
|
|
5794
5803
|
width: t?.getWidth?.() ?? t?.getImageWidth?.() ?? t?.getVideoWidth?.() ?? t?.width,
|
|
5795
5804
|
height: t?.getHeight?.() ?? t?.getImageHeight?.() ?? t?.getVideoHeight?.() ?? t?.height
|
|
5796
5805
|
});
|
|
@@ -5804,13 +5813,13 @@ function al(e, t, n) {
|
|
|
5804
5813
|
e.getMetadata?.()
|
|
5805
5814
|
];
|
|
5806
5815
|
for (let e of i) {
|
|
5807
|
-
let t =
|
|
5816
|
+
let t = sl(e);
|
|
5808
5817
|
if (t) return t;
|
|
5809
5818
|
}
|
|
5810
5819
|
}
|
|
5811
|
-
function
|
|
5820
|
+
function sl(e) {
|
|
5812
5821
|
if (!e || typeof e != "object") return;
|
|
5813
|
-
let t =
|
|
5822
|
+
let t = cl(e);
|
|
5814
5823
|
if (t) return t;
|
|
5815
5824
|
for (let t of [
|
|
5816
5825
|
"dimensions",
|
|
@@ -5821,27 +5830,27 @@ function ol(e) {
|
|
|
5821
5830
|
"video",
|
|
5822
5831
|
"thumbnail"
|
|
5823
5832
|
]) {
|
|
5824
|
-
let n =
|
|
5833
|
+
let n = cl(e[t]);
|
|
5825
5834
|
if (n) return n;
|
|
5826
5835
|
}
|
|
5827
5836
|
}
|
|
5828
|
-
function
|
|
5837
|
+
function cl(e) {
|
|
5829
5838
|
if (!e || typeof e != "object") return;
|
|
5830
|
-
let t =
|
|
5839
|
+
let t = ll(e.width ?? e.w ?? e.imageWidth ?? e.videoWidth ?? e.naturalWidth), n = ll(e.height ?? e.h ?? e.imageHeight ?? e.videoHeight ?? e.naturalHeight);
|
|
5831
5840
|
if (!(!t || !n)) return {
|
|
5832
5841
|
width: t,
|
|
5833
5842
|
height: n
|
|
5834
5843
|
};
|
|
5835
5844
|
}
|
|
5836
|
-
function
|
|
5845
|
+
function ll(e) {
|
|
5837
5846
|
if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
5838
5847
|
if (typeof e == "string") {
|
|
5839
5848
|
let t = Number(e);
|
|
5840
5849
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
5841
5850
|
}
|
|
5842
5851
|
}
|
|
5843
|
-
function
|
|
5844
|
-
let t = String(e.getType?.() ?? "").toLowerCase(), n = e.getCustomData?.() ?? e.getData?.()?.customData, r =
|
|
5852
|
+
function ul(e) {
|
|
5853
|
+
let t = String(e.getType?.() ?? "").toLowerCase(), n = e.getCustomData?.() ?? e.getData?.()?.customData, r = dl(e);
|
|
5845
5854
|
if (t !== "poll" && !r) return;
|
|
5846
5855
|
if (r) {
|
|
5847
5856
|
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(new Set([...Object.keys(t), ...Object.keys(n)])).sort((e, t) => Number(e) - Number(t));
|
|
@@ -5876,8 +5885,8 @@ function ll(e) {
|
|
|
5876
5885
|
allowsMultipleAnswers: !!n.allowsMultipleAnswers
|
|
5877
5886
|
};
|
|
5878
5887
|
}
|
|
5879
|
-
function
|
|
5880
|
-
let t =
|
|
5888
|
+
function dl(e) {
|
|
5889
|
+
let t = vl(e), n = t?.["@injected"];
|
|
5881
5890
|
if (n && typeof n == "object") {
|
|
5882
5891
|
let e = n.extensions;
|
|
5883
5892
|
if (e && typeof e == "object") {
|
|
@@ -5891,8 +5900,8 @@ function ul(e) {
|
|
|
5891
5900
|
if (e && typeof e == "object") return e;
|
|
5892
5901
|
}
|
|
5893
5902
|
}
|
|
5894
|
-
function
|
|
5895
|
-
let t =
|
|
5903
|
+
function fl(e) {
|
|
5904
|
+
let t = vl(e), n = t?.scheduleDate, r = t?.originalChatUid, i = e.getMuid?.(), a = Number(e.getId?.() ?? 0) || void 0;
|
|
5896
5905
|
if (!(!n && !r && !i && !a)) return {
|
|
5897
5906
|
scheduleDate: typeof n == "string" || typeof n == "number" ? new Date(n) : void 0,
|
|
5898
5907
|
originalChatUid: r ? String(r) : void 0,
|
|
@@ -5900,11 +5909,11 @@ function dl(e) {
|
|
|
5900
5909
|
messageId: a
|
|
5901
5910
|
};
|
|
5902
5911
|
}
|
|
5903
|
-
function
|
|
5912
|
+
function pl(e) {
|
|
5904
5913
|
let t = e.getParentMessageId?.() ?? e.parentMessageId ?? void 0;
|
|
5905
5914
|
if (!(t == null || t === 0)) return String(t);
|
|
5906
5915
|
}
|
|
5907
|
-
function
|
|
5916
|
+
function ml(e, t) {
|
|
5908
5917
|
let n = e.replyPreview;
|
|
5909
5918
|
if (n && typeof n == "object") {
|
|
5910
5919
|
let t = n;
|
|
@@ -5919,7 +5928,7 @@ function pl(e, t) {
|
|
|
5919
5928
|
messageId: String(t.getId?.() ?? e.replyToMessageId ?? ""),
|
|
5920
5929
|
senderName: String(t.getSender?.()?.getName?.() ?? "Message"),
|
|
5921
5930
|
text: t.getText?.() ?? Dc(t),
|
|
5922
|
-
kind:
|
|
5931
|
+
kind: nl(t)
|
|
5923
5932
|
};
|
|
5924
5933
|
if (e.replyToMessageId) return {
|
|
5925
5934
|
messageId: String(e.replyToMessageId),
|
|
@@ -5928,28 +5937,28 @@ function pl(e, t) {
|
|
|
5928
5937
|
kind: "text"
|
|
5929
5938
|
};
|
|
5930
5939
|
}
|
|
5931
|
-
function
|
|
5940
|
+
function hl(e) {
|
|
5932
5941
|
let t = e.getReplyCount?.() ?? e.replyCount ?? e.getThreadMessageCount?.() ?? e.getRepliesCount?.() ?? 0;
|
|
5933
5942
|
return Number.isFinite(t) ? Number(t) : 0;
|
|
5934
5943
|
}
|
|
5935
|
-
function
|
|
5944
|
+
function gl(e) {
|
|
5936
5945
|
let t = e.getData?.() ?? e.data;
|
|
5937
5946
|
if (t && typeof t == "object") return t;
|
|
5938
5947
|
}
|
|
5939
|
-
function
|
|
5948
|
+
function _l(e) {
|
|
5940
5949
|
return (Array.isArray(e.getReactions?.()) ? e.getReactions?.() : []).map((e) => ({
|
|
5941
5950
|
emoji: String(e.getReaction?.() ?? e.reaction ?? ""),
|
|
5942
5951
|
count: Number(e.getCount?.() ?? e.count ?? 0),
|
|
5943
5952
|
reactedByMe: !!(e.getReactedByMe?.() ?? e.reactedByMe ?? !1)
|
|
5944
5953
|
}));
|
|
5945
5954
|
}
|
|
5946
|
-
function
|
|
5955
|
+
function vl(e) {
|
|
5947
5956
|
let t = e.getMetadata?.() ?? e.getData?.()?.metadata;
|
|
5948
5957
|
if (t && typeof t == "object") return t;
|
|
5949
5958
|
}
|
|
5950
5959
|
//#endregion
|
|
5951
5960
|
//#region src/chat/data.ts
|
|
5952
|
-
function
|
|
5961
|
+
function yl(e, t) {
|
|
5953
5962
|
let n = t?.value?.getMetadata?.() ?? {};
|
|
5954
5963
|
if (!e?.getSender?.() || n.isChannel) return "";
|
|
5955
5964
|
let r = e?.getData?.()?.entities?.receiver?.entity?.scope, i = e?.getReceiver?.()?.getMetadata?.() ?? {};
|
|
@@ -5957,27 +5966,27 @@ function vl(e, t) {
|
|
|
5957
5966
|
let a = i.systemDisplayName;
|
|
5958
5967
|
return e?.getData?.()?.metadata?.senderDisplayName && (r == "moderator" || r === void 0) ? e.getData().metadata.senderDisplayName : a && (e instanceof H.Action || r == "admin") ? a : e?.getSender?.()?.getName?.();
|
|
5959
5968
|
}
|
|
5960
|
-
function
|
|
5969
|
+
function bl(e, t = 25, n) {
|
|
5961
5970
|
let r = e.trim();
|
|
5962
5971
|
if (!r || !n) return;
|
|
5963
|
-
let i =
|
|
5972
|
+
let i = Al();
|
|
5964
5973
|
if (!i) return;
|
|
5965
5974
|
let a = new cc(i), o = r.toLowerCase(), s = a.getSearchableConversations(), c = new Map(s.map((e) => [e.id, e.targetId]));
|
|
5966
5975
|
return {
|
|
5967
5976
|
conversations: s.map((e) => ({
|
|
5968
5977
|
conversation: e,
|
|
5969
|
-
matches:
|
|
5978
|
+
matches: Pl(e.title, o)
|
|
5970
5979
|
})).filter((e) => e.matches.length > 0).slice(0, t),
|
|
5971
5980
|
messages: a.getAllMessages().filter((e) => !e.parentMessageId && e.category === "message").map((e) => ({
|
|
5972
5981
|
message: {
|
|
5973
5982
|
...e,
|
|
5974
5983
|
conversationId: c.get(e.conversationId) ?? e.conversationId
|
|
5975
5984
|
},
|
|
5976
|
-
matches:
|
|
5985
|
+
matches: Pl(e.text, o)
|
|
5977
5986
|
})).filter((e) => e.matches.length > 0).slice(0, t)
|
|
5978
5987
|
};
|
|
5979
5988
|
}
|
|
5980
|
-
async function
|
|
5989
|
+
async function xl(e) {
|
|
5981
5990
|
let t = new H.GroupMembersRequestBuilder(e).setLimit(50).build(), n = !0, r = [];
|
|
5982
5991
|
try {
|
|
5983
5992
|
for (; n;) {
|
|
@@ -5995,68 +6004,68 @@ async function bl(e) {
|
|
|
5995
6004
|
}
|
|
5996
6005
|
return r;
|
|
5997
6006
|
}
|
|
5998
|
-
async function
|
|
5999
|
-
await
|
|
6000
|
-
let t = await
|
|
6001
|
-
return
|
|
6007
|
+
async function Sl(e) {
|
|
6008
|
+
await Ml("failed to get muted setting. User not logged in");
|
|
6009
|
+
let t = await Nl(`${G().chatApiBaseUrl}/chats/${e}/settings/${(await H.getLoggedinUser())?.getUid?.()}`, { method: "GET" });
|
|
6010
|
+
return kl()?.storeParticipantSettings({
|
|
6002
6011
|
chatUid: e,
|
|
6003
6012
|
mutedUntil: t.mutedUntil,
|
|
6004
6013
|
lastUpdated: Date.now()
|
|
6005
6014
|
}), t.mutedUntil;
|
|
6006
6015
|
}
|
|
6007
|
-
async function
|
|
6008
|
-
await
|
|
6009
|
-
let n = await
|
|
6016
|
+
async function Cl(e, t) {
|
|
6017
|
+
await Ml("failed to mute chat. User not logged in");
|
|
6018
|
+
let n = await Nl(`${G().chatApiBaseUrl}/chats/${e}/settings/${(await H.getLoggedinUser())?.getUid?.()}`, {
|
|
6010
6019
|
method: "PATCH",
|
|
6011
6020
|
body: JSON.stringify({ mutedUntil: t })
|
|
6012
6021
|
});
|
|
6013
|
-
return
|
|
6022
|
+
return kl()?.storeParticipantSettings({
|
|
6014
6023
|
chatUid: e,
|
|
6015
6024
|
mutedUntil: n.mutedUntil,
|
|
6016
6025
|
lastUpdated: Date.now()
|
|
6017
6026
|
}), n.mutedUntil;
|
|
6018
6027
|
}
|
|
6019
|
-
async function
|
|
6020
|
-
return await
|
|
6028
|
+
async function wl() {
|
|
6029
|
+
return await Ml("failed to get muted all setting. User not logged in"), Nl(`${G().chatApiBaseUrl}/person/settings`, { method: "GET" });
|
|
6021
6030
|
}
|
|
6022
|
-
async function
|
|
6023
|
-
return await
|
|
6031
|
+
async function Tl(e) {
|
|
6032
|
+
return await Ml("failed to update person settings. User not logged in"), Nl(`${G().chatApiBaseUrl}/person/settings`, {
|
|
6024
6033
|
method: "PATCH",
|
|
6025
6034
|
body: JSON.stringify(e)
|
|
6026
6035
|
});
|
|
6027
6036
|
}
|
|
6028
|
-
async function
|
|
6029
|
-
return (await
|
|
6037
|
+
async function El(e) {
|
|
6038
|
+
return (await Tl({ mutedAll: e })).mutedAll;
|
|
6030
6039
|
}
|
|
6031
|
-
async function
|
|
6032
|
-
let { mutedAll: e } = await
|
|
6033
|
-
return
|
|
6040
|
+
async function Dl() {
|
|
6041
|
+
let { mutedAll: e } = await wl();
|
|
6042
|
+
return El(!e);
|
|
6034
6043
|
}
|
|
6035
|
-
function
|
|
6044
|
+
function Ol(e, t, n) {
|
|
6036
6045
|
let r = n ? new Date(n) : null;
|
|
6037
6046
|
return e.map((e) => e.targetId !== t && e.id !== t ? e : {
|
|
6038
6047
|
...e,
|
|
6039
6048
|
muteSettings: r
|
|
6040
6049
|
});
|
|
6041
6050
|
}
|
|
6042
|
-
function
|
|
6043
|
-
if (!
|
|
6044
|
-
let e =
|
|
6051
|
+
function kl() {
|
|
6052
|
+
if (!jl()) return null;
|
|
6053
|
+
let e = Al();
|
|
6045
6054
|
return e ? new cc(e) : null;
|
|
6046
6055
|
}
|
|
6047
|
-
function
|
|
6056
|
+
function Al() {
|
|
6048
6057
|
let e = lt();
|
|
6049
6058
|
return e ? `bcc-chat:${G().appId}:${e}` : null;
|
|
6050
6059
|
}
|
|
6051
|
-
function
|
|
6060
|
+
function jl() {
|
|
6052
6061
|
return H.__bccCompatLoggedInUser ?? null;
|
|
6053
6062
|
}
|
|
6054
|
-
async function
|
|
6063
|
+
async function Ml(e) {
|
|
6055
6064
|
let t = await H.getLoggedinUser();
|
|
6056
6065
|
if (H.__bccCompatLoggedInUser = t ?? null, !t?.getUid?.()) throw Error(e);
|
|
6057
6066
|
return t;
|
|
6058
6067
|
}
|
|
6059
|
-
async function
|
|
6068
|
+
async function Nl(e, t) {
|
|
6060
6069
|
let n = qe();
|
|
6061
6070
|
if (!n) throw Error("Missing access token.");
|
|
6062
6071
|
let r = await fetch(e, {
|
|
@@ -6069,7 +6078,7 @@ async function Ml(e, t) {
|
|
|
6069
6078
|
if (!r.ok) throw Error(`Request failed with status ${r.status}`);
|
|
6070
6079
|
return await r.json();
|
|
6071
6080
|
}
|
|
6072
|
-
function
|
|
6081
|
+
function Pl(e, t) {
|
|
6073
6082
|
if (!e) return [];
|
|
6074
6083
|
let n = e.toLowerCase(), r = [], i = 0;
|
|
6075
6084
|
for (; i < n.length;) {
|
|
@@ -6087,7 +6096,7 @@ function Nl(e, t) {
|
|
|
6087
6096
|
var Q = O(null);
|
|
6088
6097
|
//#endregion
|
|
6089
6098
|
//#region src/chat/theme.ts
|
|
6090
|
-
function
|
|
6099
|
+
function Fl(e) {
|
|
6091
6100
|
let t = { palette: {
|
|
6092
6101
|
mode: e,
|
|
6093
6102
|
setMode(e) {
|
|
@@ -6096,17 +6105,17 @@ function Pl(e) {
|
|
|
6096
6105
|
} };
|
|
6097
6106
|
return t;
|
|
6098
6107
|
}
|
|
6099
|
-
var
|
|
6100
|
-
function
|
|
6101
|
-
|
|
6108
|
+
var Il = w(Fl("light"));
|
|
6109
|
+
function Ll(e) {
|
|
6110
|
+
Il.value.palette.setMode(e);
|
|
6102
6111
|
}
|
|
6103
6112
|
//#endregion
|
|
6104
6113
|
//#region src/chat/types.ts
|
|
6105
|
-
var
|
|
6114
|
+
var Rl = /* @__PURE__ */ function(e) {
|
|
6106
6115
|
return e.DEBUG = "Debug", e.INFO = "Info", e.WARN = "Warn", e.ERROR = "Error", e;
|
|
6107
|
-
}({}),
|
|
6108
|
-
function
|
|
6109
|
-
|
|
6116
|
+
}({}), zl = w(!1), Bl = w(null), Vl = w("light"), Hl = w(void 0), Ul = w(void 0), Wl = w(void 0), Gl = /* @__PURE__ */ new Set(), Kl = w({}), ql = /* @__PURE__ */ new Set(), Jl;
|
|
6117
|
+
function Yl(e, t, n) {
|
|
6118
|
+
Wl.value?.({
|
|
6110
6119
|
logUid: crypto.randomUUID(),
|
|
6111
6120
|
message: t,
|
|
6112
6121
|
severity: e,
|
|
@@ -6114,17 +6123,17 @@ function Jl(e, t, n) {
|
|
|
6114
6123
|
userMetadata: n
|
|
6115
6124
|
});
|
|
6116
6125
|
}
|
|
6117
|
-
function Yl(e) {
|
|
6118
|
-
Bl.value = e, Il(e), !(typeof document > "u") && document.documentElement.classList.toggle("dark", e === "dark");
|
|
6119
|
-
}
|
|
6120
6126
|
function Xl(e) {
|
|
6121
|
-
|
|
6122
|
-
|
|
6127
|
+
Vl.value = e, Ll(e), !(typeof document > "u") && document.documentElement.classList.toggle("dark", e === "dark");
|
|
6128
|
+
}
|
|
6129
|
+
function Zl(e) {
|
|
6130
|
+
if (Q.value && !e && !Bl.value) return Q.value;
|
|
6131
|
+
let t = e ?? Bl.value;
|
|
6123
6132
|
if (!t) throw Error("Environment has not been set yet. Call app.use(chat, { environment: ... }) first.");
|
|
6124
|
-
return (!Q.value ||
|
|
6133
|
+
return (!Q.value || Bl.value !== t) && (Bl.value = t, He(t), Q.value = _c({ environment: t })), Q.value;
|
|
6125
6134
|
}
|
|
6126
|
-
var
|
|
6127
|
-
function
|
|
6135
|
+
var Ql = n(() => Q.value?.currentUser.value?.uid);
|
|
6136
|
+
function $l(e) {
|
|
6128
6137
|
if (Array.isArray(e)) return e;
|
|
6129
6138
|
if (e && typeof e == "object") {
|
|
6130
6139
|
let t = e.data;
|
|
@@ -6132,30 +6141,30 @@ function Ql(e) {
|
|
|
6132
6141
|
}
|
|
6133
6142
|
return [];
|
|
6134
6143
|
}
|
|
6135
|
-
async function
|
|
6136
|
-
if (!
|
|
6137
|
-
|
|
6144
|
+
async function eu(e) {
|
|
6145
|
+
if (!ql.has(e)) {
|
|
6146
|
+
ql.add(e);
|
|
6138
6147
|
try {
|
|
6139
6148
|
let t = await H.getMessageReceipts(e);
|
|
6140
|
-
|
|
6141
|
-
...
|
|
6142
|
-
[e]:
|
|
6149
|
+
Kl.value = {
|
|
6150
|
+
...Kl.value,
|
|
6151
|
+
[e]: $l(t)
|
|
6143
6152
|
};
|
|
6144
6153
|
} catch {
|
|
6145
|
-
|
|
6146
|
-
...
|
|
6154
|
+
Kl.value = {
|
|
6155
|
+
...Kl.value,
|
|
6147
6156
|
[e]: []
|
|
6148
6157
|
};
|
|
6149
6158
|
} finally {
|
|
6150
|
-
|
|
6159
|
+
ql.delete(e);
|
|
6151
6160
|
}
|
|
6152
6161
|
}
|
|
6153
6162
|
}
|
|
6154
|
-
async function
|
|
6163
|
+
async function tu(e, t) {
|
|
6155
6164
|
let n = e.lastMessage, r = n ? void 0 : e.source?.getLastMessage?.();
|
|
6156
6165
|
if (!(r || n)) return;
|
|
6157
6166
|
let i = n?.senderId ?? r?.getSender?.()?.getUid?.() ?? "", a = String(n?.id ?? r?.getId?.() ?? ""), o = !!(t && i && t === i && a);
|
|
6158
|
-
return o && a &&
|
|
6167
|
+
return o && a && Kl.value[a] === void 0 && !ql.has(a) && await eu(a), {
|
|
6159
6168
|
text: e.subtitle,
|
|
6160
6169
|
type: n?.type ?? r?.getType?.() ?? "text",
|
|
6161
6170
|
senderUid: i,
|
|
@@ -6163,10 +6172,10 @@ async function eu(e, t) {
|
|
|
6163
6172
|
sentAt: n?.sentAt ?? /* @__PURE__ */ new Date((r?.getSentAt?.() ?? 0) * 1e3),
|
|
6164
6173
|
sentByCurrentUser: o,
|
|
6165
6174
|
readAt: r?.getReadAt?.() ? /* @__PURE__ */ new Date(r.getReadAt() * 1e3) : void 0,
|
|
6166
|
-
messageReceipts: o ?
|
|
6175
|
+
messageReceipts: o ? Kl.value[a] : void 0
|
|
6167
6176
|
};
|
|
6168
6177
|
}
|
|
6169
|
-
var
|
|
6178
|
+
var nu = n(() => Q.value?.connected.value ?? !1), ru = n(() => zl.value && !nu.value), iu = n(() => Q.value?.loggedIn.value ?? !1), au = {
|
|
6170
6179
|
onlineMode: n({
|
|
6171
6180
|
get: () => Q.value?.offlineMode.value ? "offline" : "online",
|
|
6172
6181
|
set: (e) => {
|
|
@@ -6174,78 +6183,78 @@ var tu = n(() => Q.value?.connected.value ?? !1), nu = n(() => Rl.value && !tu.v
|
|
|
6174
6183
|
}
|
|
6175
6184
|
}),
|
|
6176
6185
|
onlineStatus: n(() => Q.value ? Q.value.offlineMode.value || !Q.value.connected.value ? "offline" : "online" : "offline")
|
|
6177
|
-
},
|
|
6178
|
-
F([() => Q.value?.conversations.value, () =>
|
|
6186
|
+
}, ou = w([]), su = "";
|
|
6187
|
+
F([() => Q.value?.conversations.value, () => Ql.value], async () => {
|
|
6179
6188
|
let e = crypto.randomUUID();
|
|
6180
|
-
|
|
6181
|
-
let t =
|
|
6182
|
-
if (await new Promise((e) => setTimeout(e, 100)),
|
|
6189
|
+
su = e;
|
|
6190
|
+
let t = Ql.value;
|
|
6191
|
+
if (await new Promise((e) => setTimeout(e, 100)), su !== e) return;
|
|
6183
6192
|
let n = await Promise.all((Q.value?.conversations?.value ?? []).map(async (e) => ({
|
|
6184
6193
|
chatUid: e.targetId,
|
|
6185
6194
|
name: e.title,
|
|
6186
6195
|
unreadMessageCount: e.unreadCount,
|
|
6187
|
-
lastMessage: await
|
|
6196
|
+
lastMessage: await tu(e, t),
|
|
6188
6197
|
membersCount: e.memberCount ?? 0,
|
|
6189
6198
|
tags: [...e.tags],
|
|
6190
6199
|
muteSettings: e.muteSettings ?? null,
|
|
6191
6200
|
hasJoined: e.hasJoined ?? !0
|
|
6192
6201
|
})));
|
|
6193
|
-
|
|
6194
|
-
}), F(() =>
|
|
6195
|
-
|
|
6202
|
+
su === e && (ou.value = n);
|
|
6203
|
+
}), F(() => Ql.value, () => {
|
|
6204
|
+
Kl.value = {}, ql.clear();
|
|
6196
6205
|
});
|
|
6197
|
-
async function
|
|
6198
|
-
|
|
6206
|
+
async function cu(e, t) {
|
|
6207
|
+
Wl.value = t.loggerCallback, _t(t.language ?? "en"), Xl(t.themeMode);
|
|
6199
6208
|
let n = e.config.globalProperties.$primevue;
|
|
6200
|
-
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.component("BccChat",
|
|
6201
|
-
let r =
|
|
6202
|
-
|
|
6209
|
+
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.component("BccChat", Th), e.provide("theme", { theme: Il });
|
|
6210
|
+
let r = Zl(t.environment);
|
|
6211
|
+
Yl(Rl.INFO, "Initializing chat", {
|
|
6203
6212
|
environment: t.environment,
|
|
6204
6213
|
language: pt.value,
|
|
6205
6214
|
themeMode: t.themeMode
|
|
6206
|
-
}), await r.init(),
|
|
6207
|
-
e ? await
|
|
6208
|
-
}, { immediate: !0 }) : t.accessToken && await
|
|
6215
|
+
}), await r.init(), zl.value = !0, Jl?.(), p(t.accessToken) ? Jl = F(t.accessToken, async (e) => {
|
|
6216
|
+
e ? await lu(e) : await uu();
|
|
6217
|
+
}, { immediate: !0 }) : t.accessToken && await lu(t.accessToken), Yl(Rl.INFO, "Chat initialized", { environment: G().appId });
|
|
6209
6218
|
}
|
|
6210
|
-
async function
|
|
6211
|
-
if (!e) return
|
|
6212
|
-
let t =
|
|
6213
|
-
|
|
6219
|
+
async function lu(e) {
|
|
6220
|
+
if (!e) return uu();
|
|
6221
|
+
let t = Zl();
|
|
6222
|
+
Yl(Rl.INFO, "Signing in to chat"), await t.login(e);
|
|
6214
6223
|
}
|
|
6215
|
-
async function
|
|
6216
|
-
Q.value && (
|
|
6224
|
+
async function uu() {
|
|
6225
|
+
Q.value && (Yl(Rl.INFO, "Signing out from chat"), await Q.value.logout());
|
|
6217
6226
|
}
|
|
6218
|
-
async function
|
|
6227
|
+
async function du(e) {
|
|
6219
6228
|
let t = e ?? "default";
|
|
6220
|
-
|
|
6221
|
-
let n =
|
|
6222
|
-
await n.init(), await n.connectRealtime(), await
|
|
6229
|
+
Gl.add(t);
|
|
6230
|
+
let n = Zl();
|
|
6231
|
+
await n.init(), await n.connectRealtime(), await bu();
|
|
6223
6232
|
}
|
|
6224
|
-
async function
|
|
6233
|
+
async function fu(e) {
|
|
6225
6234
|
if (!Q.value) return;
|
|
6226
6235
|
let t = e ?? "default";
|
|
6227
|
-
|
|
6228
|
-
}
|
|
6229
|
-
async function fu() {
|
|
6230
|
-
Wl.clear(), Q.value && (await Q.value.disconnectRealtime(), Q.value.closeThread());
|
|
6236
|
+
Gl.delete(t), !(Gl.size > 0) && (await Q.value.disconnectRealtime(), Q.value.closeThread());
|
|
6231
6237
|
}
|
|
6232
|
-
function pu(
|
|
6233
|
-
|
|
6238
|
+
async function pu() {
|
|
6239
|
+
Gl.clear(), Q.value && (await Q.value.disconnectRealtime(), Q.value.closeThread());
|
|
6234
6240
|
}
|
|
6235
6241
|
function mu(e) {
|
|
6236
|
-
|
|
6242
|
+
Hl.value = e;
|
|
6237
6243
|
}
|
|
6238
6244
|
function hu(e) {
|
|
6239
|
-
|
|
6245
|
+
_t(e);
|
|
6240
6246
|
}
|
|
6241
6247
|
function gu(e) {
|
|
6242
|
-
|
|
6248
|
+
Xl(e);
|
|
6243
6249
|
}
|
|
6244
6250
|
function _u(e) {
|
|
6245
|
-
|
|
6251
|
+
return e ? lu(e) : uu();
|
|
6252
|
+
}
|
|
6253
|
+
function vu(e) {
|
|
6254
|
+
Zl(e);
|
|
6246
6255
|
}
|
|
6247
|
-
async function
|
|
6248
|
-
if (!
|
|
6256
|
+
async function yu(e, t = !1) {
|
|
6257
|
+
if (!iu.value) return null;
|
|
6249
6258
|
try {
|
|
6250
6259
|
return await H.getGroup(e);
|
|
6251
6260
|
} catch (e) {
|
|
@@ -6254,123 +6263,123 @@ async function vu(e, t = !1) {
|
|
|
6254
6263
|
return null;
|
|
6255
6264
|
}
|
|
6256
6265
|
}
|
|
6257
|
-
async function
|
|
6258
|
-
return Q.value ? (await Q.value.fetchConversations(),
|
|
6266
|
+
async function bu() {
|
|
6267
|
+
return Q.value ? (await Q.value.fetchConversations(), ou.value) : [];
|
|
6259
6268
|
}
|
|
6260
|
-
async function
|
|
6269
|
+
async function xu(e) {
|
|
6261
6270
|
if (!Q.value) return;
|
|
6262
6271
|
let t = Q.value.conversations.value.find((t) => t.targetId === e || t.id === e);
|
|
6263
6272
|
t && (t.unreadCount = 0);
|
|
6264
6273
|
}
|
|
6265
|
-
async function
|
|
6274
|
+
async function Su(e) {
|
|
6266
6275
|
try {
|
|
6267
|
-
return
|
|
6276
|
+
return iu.value && (await H.getOnlineGroupMemberCount([e]))[e] || 0;
|
|
6268
6277
|
} catch {
|
|
6269
6278
|
return 0;
|
|
6270
6279
|
}
|
|
6271
6280
|
}
|
|
6272
|
-
async function
|
|
6273
|
-
let n = await
|
|
6274
|
-
return Q.value && (Q.value.conversations.value =
|
|
6275
|
-
}
|
|
6276
|
-
async function
|
|
6277
|
-
let t = await
|
|
6278
|
-
return Q.value && (Q.value.conversations.value =
|
|
6279
|
-
}
|
|
6280
|
-
function
|
|
6281
|
-
|
|
6282
|
-
}
|
|
6283
|
-
var
|
|
6284
|
-
install:
|
|
6285
|
-
setGetChatMessagesCallback:
|
|
6286
|
-
initialized:
|
|
6287
|
-
connected:
|
|
6288
|
-
connecting:
|
|
6289
|
-
loggedIn:
|
|
6290
|
-
userChats:
|
|
6291
|
-
userUid:
|
|
6292
|
-
connect:
|
|
6293
|
-
disconnect:
|
|
6294
|
-
disconnectAll:
|
|
6295
|
-
setAccessToken:
|
|
6296
|
-
login:
|
|
6297
|
-
logout:
|
|
6298
|
-
setCurrentEnvironment:
|
|
6281
|
+
async function Cu(e, t) {
|
|
6282
|
+
let n = await Cl(e, t);
|
|
6283
|
+
return Q.value && (Q.value.conversations.value = Ol(Q.value.conversations.value, e, n)), n;
|
|
6284
|
+
}
|
|
6285
|
+
async function wu(e) {
|
|
6286
|
+
let t = await Sl(e);
|
|
6287
|
+
return Q.value && (Q.value.conversations.value = Ol(Q.value.conversations.value, e, t)), t;
|
|
6288
|
+
}
|
|
6289
|
+
function Tu(e) {
|
|
6290
|
+
Ul.value = e;
|
|
6291
|
+
}
|
|
6292
|
+
var Eu = {
|
|
6293
|
+
install: cu,
|
|
6294
|
+
setGetChatMessagesCallback: mu,
|
|
6295
|
+
initialized: zl,
|
|
6296
|
+
connected: nu,
|
|
6297
|
+
connecting: ru,
|
|
6298
|
+
loggedIn: iu,
|
|
6299
|
+
userChats: ou,
|
|
6300
|
+
userUid: Ql,
|
|
6301
|
+
connect: du,
|
|
6302
|
+
disconnect: fu,
|
|
6303
|
+
disconnectAll: pu,
|
|
6304
|
+
setAccessToken: _u,
|
|
6305
|
+
login: lu,
|
|
6306
|
+
logout: uu,
|
|
6307
|
+
setCurrentEnvironment: vu,
|
|
6299
6308
|
getCurrentEnvironment: G,
|
|
6300
|
-
setThemeMode:
|
|
6301
|
-
setLanguage:
|
|
6302
|
-
getGroup:
|
|
6303
|
-
getChatMembersInfo:
|
|
6304
|
-
getUserChats:
|
|
6305
|
-
clearChatCount:
|
|
6309
|
+
setThemeMode: gu,
|
|
6310
|
+
setLanguage: hu,
|
|
6311
|
+
getGroup: yu,
|
|
6312
|
+
getChatMembersInfo: xl,
|
|
6313
|
+
getUserChats: bu,
|
|
6314
|
+
clearChatCount: xu,
|
|
6306
6315
|
refreshVisibleMessages: () => Q.value?.refreshVisibleMessages(),
|
|
6307
|
-
getChatOnlineCount:
|
|
6308
|
-
searchChat: (e, t = 25) =>
|
|
6309
|
-
getSenderDisplayName:
|
|
6316
|
+
getChatOnlineCount: Su,
|
|
6317
|
+
searchChat: (e, t = 25) => bl(e, t, Q.value?.currentUser.value?.uid),
|
|
6318
|
+
getSenderDisplayName: yl,
|
|
6310
6319
|
getMessageTextPreview: nc,
|
|
6311
6320
|
proxyImage: et,
|
|
6312
|
-
getMutedUntil:
|
|
6313
|
-
muteChat:
|
|
6314
|
-
getMyChatSettings:
|
|
6315
|
-
updateMyChatSettings:
|
|
6316
|
-
setMuteAll:
|
|
6317
|
-
toggleMuteAll:
|
|
6321
|
+
getMutedUntil: wu,
|
|
6322
|
+
muteChat: Cu,
|
|
6323
|
+
getMyChatSettings: wl,
|
|
6324
|
+
updateMyChatSettings: Tl,
|
|
6325
|
+
setMuteAll: El,
|
|
6326
|
+
toggleMuteAll: Dl,
|
|
6318
6327
|
toMarkdownHtml: Rs,
|
|
6319
6328
|
retrieveCcToken: Xe,
|
|
6320
|
-
getChatMessages:
|
|
6321
|
-
scrollToMessageId:
|
|
6322
|
-
scrollToMessage:
|
|
6323
|
-
connectivity:
|
|
6324
|
-
onlineMode:
|
|
6325
|
-
onlineStatus:
|
|
6326
|
-
theme:
|
|
6327
|
-
themeMode:
|
|
6329
|
+
getChatMessages: Hl,
|
|
6330
|
+
scrollToMessageId: Ul,
|
|
6331
|
+
scrollToMessage: Tu,
|
|
6332
|
+
connectivity: au,
|
|
6333
|
+
onlineMode: au.onlineMode,
|
|
6334
|
+
onlineStatus: au.onlineStatus,
|
|
6335
|
+
theme: Il,
|
|
6336
|
+
themeMode: Vl,
|
|
6328
6337
|
language: pt
|
|
6329
6338
|
};
|
|
6330
6339
|
//#endregion
|
|
6331
6340
|
//#region src/chat/conversationState.ts
|
|
6332
|
-
function Eu(e) {
|
|
6333
|
-
return e?.source?.getConversationWith?.();
|
|
6334
|
-
}
|
|
6335
6341
|
function Du(e) {
|
|
6336
|
-
return
|
|
6342
|
+
return e?.source?.getConversationWith?.();
|
|
6337
6343
|
}
|
|
6338
6344
|
function Ou(e) {
|
|
6339
|
-
return
|
|
6345
|
+
return !!Du(e)?.getMetadata?.()?.isChannel;
|
|
6340
6346
|
}
|
|
6341
6347
|
function ku(e) {
|
|
6342
|
-
|
|
6343
|
-
return typeof t == "string" ? t : void 0;
|
|
6348
|
+
return Du(e)?.getHasJoined?.() ?? !1;
|
|
6344
6349
|
}
|
|
6345
6350
|
function Au(e) {
|
|
6346
|
-
|
|
6351
|
+
let t = Du(e)?.getScope?.();
|
|
6352
|
+
return typeof t == "string" ? t : void 0;
|
|
6347
6353
|
}
|
|
6348
6354
|
function ju(e) {
|
|
6349
|
-
return
|
|
6355
|
+
return Ou(e) && (!ku(e) || Au(e) === "participant");
|
|
6350
6356
|
}
|
|
6351
6357
|
function Mu(e) {
|
|
6352
|
-
return
|
|
6358
|
+
return Ou(e) ? ku(e) : !0;
|
|
6353
6359
|
}
|
|
6354
6360
|
function Nu(e) {
|
|
6355
|
-
return
|
|
6361
|
+
return Ou(e) ? ku(e) : !0;
|
|
6356
6362
|
}
|
|
6357
6363
|
function Pu(e) {
|
|
6358
|
-
return
|
|
6364
|
+
return Ou(e) ? ku(e) && Au(e) !== "participant" : !0;
|
|
6359
6365
|
}
|
|
6360
6366
|
function Fu(e) {
|
|
6361
|
-
return
|
|
6367
|
+
return !Ou(e);
|
|
6368
|
+
}
|
|
6369
|
+
function Iu(e) {
|
|
6370
|
+
return e?.type === "user" ? !0 : Ou(e) ? !1 : ku(e);
|
|
6362
6371
|
}
|
|
6363
|
-
function
|
|
6372
|
+
function Lu(e, t) {
|
|
6364
6373
|
let n = t?.trim();
|
|
6365
|
-
if (!(!n ||
|
|
6374
|
+
if (!(!n || Au(e) !== "moderator")) return { senderDisplayName: n };
|
|
6366
6375
|
}
|
|
6367
6376
|
//#endregion
|
|
6368
6377
|
//#region src/composables/chat/useConversationContext.ts
|
|
6369
|
-
function
|
|
6370
|
-
let { chatClient: t, selectedConversation: r } = e, i = n(() => t.value?.currentUser.value?.uid), a = n(() =>
|
|
6378
|
+
function Ru(e) {
|
|
6379
|
+
let { chatClient: t, selectedConversation: r } = e, i = n(() => t.value?.currentUser.value?.uid), a = n(() => Mu(r.value)), o = n(() => Nu(r.value)), s = n(() => Pu(r.value)), c = n(() => Fu(r.value)), l = n(() => {
|
|
6371
6380
|
let t = e.getPropIsReadOnly();
|
|
6372
|
-
return t === void 0 ?
|
|
6373
|
-
}), u = n(() =>
|
|
6381
|
+
return t === void 0 ? ju(r.value) : t;
|
|
6382
|
+
}), u = n(() => Ou(r.value)), d = n(() => e.getPropSendOptions() ?? Lu(r.value, e.getSenderDisplayName())), f = n(() => {
|
|
6374
6383
|
let t = r.value, n = i.value, a = e.getMentionCandidates();
|
|
6375
6384
|
return t ? t.type === "user" ? !t.targetId || t.targetId === n ? [] : [{
|
|
6376
6385
|
uid: t.targetId,
|
|
@@ -6393,18 +6402,18 @@ function Lu(e) {
|
|
|
6393
6402
|
mentionNameByUid: n(() => Ht(Dt(f.value), t.value?.mentionDisplayNamesByUid.value ?? {}))
|
|
6394
6403
|
};
|
|
6395
6404
|
}
|
|
6396
|
-
var
|
|
6397
|
-
function
|
|
6398
|
-
C(
|
|
6405
|
+
var zu = Symbol("conversationCtx");
|
|
6406
|
+
function Bu(e) {
|
|
6407
|
+
C(zu, e);
|
|
6399
6408
|
}
|
|
6400
|
-
function
|
|
6401
|
-
let e = f(
|
|
6409
|
+
function Vu() {
|
|
6410
|
+
let e = f(zu);
|
|
6402
6411
|
if (!e) throw Error("useConversationContext() requires an ancestor <BccChat> component.");
|
|
6403
6412
|
return e;
|
|
6404
6413
|
}
|
|
6405
6414
|
//#endregion
|
|
6406
6415
|
//#region src/composables/chat/useMessagesContext.ts
|
|
6407
|
-
function
|
|
6416
|
+
function Hu(e) {
|
|
6408
6417
|
let { chatClient: t, selectedConversation: r, usesPublicContract: i, loadingChat: a } = e, o = n(() => {
|
|
6409
6418
|
let n = e.getPropMessages() ?? t.value?.messages.value ?? [];
|
|
6410
6419
|
return e.getHideDeletedMessages() ? n.filter((e) => !e.isDeleted) : n;
|
|
@@ -6435,18 +6444,18 @@ function Vu(e) {
|
|
|
6435
6444
|
isChatEmpty: n(() => !!r.value && !s.value && o.value.length === 0)
|
|
6436
6445
|
};
|
|
6437
6446
|
}
|
|
6438
|
-
var
|
|
6439
|
-
function
|
|
6440
|
-
C(
|
|
6447
|
+
var Uu = Symbol("messagesCtx");
|
|
6448
|
+
function Wu(e) {
|
|
6449
|
+
C(Uu, e);
|
|
6441
6450
|
}
|
|
6442
|
-
function
|
|
6443
|
-
let e = f(
|
|
6451
|
+
function Gu() {
|
|
6452
|
+
let e = f(Uu);
|
|
6444
6453
|
if (!e) throw Error("useMessagesContext() requires an ancestor <BccChat> component.");
|
|
6445
6454
|
return e;
|
|
6446
6455
|
}
|
|
6447
6456
|
//#endregion
|
|
6448
6457
|
//#region src/composables/useComposerDrafts.ts
|
|
6449
|
-
function
|
|
6458
|
+
function Ku(e) {
|
|
6450
6459
|
let t = w(""), n = w(""), r = w(0), i = w(0), a = e.mainComposerRef, o = e.threadComposerRef;
|
|
6451
6460
|
function s() {
|
|
6452
6461
|
t.value = "", r.value += 1;
|
|
@@ -6534,8 +6543,8 @@ function Gu(e) {
|
|
|
6534
6543
|
}
|
|
6535
6544
|
//#endregion
|
|
6536
6545
|
//#region src/composables/chat/useComposerContext.ts
|
|
6537
|
-
function
|
|
6538
|
-
let { chatClient: t } = e, r =
|
|
6546
|
+
function qu(e) {
|
|
6547
|
+
let { chatClient: t } = e, r = Ku({
|
|
6539
6548
|
getClient: () => t.value,
|
|
6540
6549
|
getSendOptions: () => e.sendOptions.value,
|
|
6541
6550
|
getMentionNameByUid: () => e.mentionNameByUid.value,
|
|
@@ -6570,18 +6579,18 @@ function Ku(e) {
|
|
|
6570
6579
|
sendThreadPoll: r.sendThreadPoll
|
|
6571
6580
|
};
|
|
6572
6581
|
}
|
|
6573
|
-
var
|
|
6574
|
-
function
|
|
6575
|
-
C(
|
|
6582
|
+
var Ju = Symbol("composerCtx");
|
|
6583
|
+
function Yu(e) {
|
|
6584
|
+
C(Ju, e);
|
|
6576
6585
|
}
|
|
6577
|
-
function
|
|
6578
|
-
let e = f(
|
|
6586
|
+
function Xu() {
|
|
6587
|
+
let e = f(Ju);
|
|
6579
6588
|
if (!e) throw Error("useComposerContext() requires an ancestor <BccChat> component.");
|
|
6580
6589
|
return e;
|
|
6581
6590
|
}
|
|
6582
6591
|
//#endregion
|
|
6583
6592
|
//#region src/composables/useMessageInfoDialog.ts
|
|
6584
|
-
function
|
|
6593
|
+
function Zu(e) {
|
|
6585
6594
|
let t = w(null), n = w([]), r = w(!1), i = w(null);
|
|
6586
6595
|
async function a(a) {
|
|
6587
6596
|
let o = e.getClient();
|
|
@@ -6610,8 +6619,8 @@ function Xu(e) {
|
|
|
6610
6619
|
}
|
|
6611
6620
|
//#endregion
|
|
6612
6621
|
//#region src/composables/chat/useDialogsContext.ts
|
|
6613
|
-
function
|
|
6614
|
-
let { chatClient: t, selectedConversation: r } = e, i =
|
|
6622
|
+
function Qu(e) {
|
|
6623
|
+
let { chatClient: t, selectedConversation: r } = e, i = Zu({
|
|
6615
6624
|
getClient: () => t.value,
|
|
6616
6625
|
fetchErrorFallback: e.fetchErrorFallback
|
|
6617
6626
|
}), a = w(e.getInitialScheduledMessagesOpen()), o = n(() => !!t.value?.scheduledMessages.value.length), s = n(() => t.value?.loadingScheduledMessages.value ?? !1), c = n(() => t.value?.scheduledMessages.value ?? []);
|
|
@@ -6640,18 +6649,18 @@ function Zu(e) {
|
|
|
6640
6649
|
refreshScheduledMessages: u
|
|
6641
6650
|
};
|
|
6642
6651
|
}
|
|
6643
|
-
var
|
|
6644
|
-
function
|
|
6645
|
-
C(
|
|
6652
|
+
var $u = Symbol("dialogsCtx");
|
|
6653
|
+
function ed(e) {
|
|
6654
|
+
C($u, e);
|
|
6646
6655
|
}
|
|
6647
|
-
function
|
|
6648
|
-
let e = f(
|
|
6656
|
+
function td() {
|
|
6657
|
+
let e = f($u);
|
|
6649
6658
|
if (!e) throw Error("useDialogsContext() requires an ancestor <BccChat> component.");
|
|
6650
6659
|
return e;
|
|
6651
6660
|
}
|
|
6652
6661
|
//#endregion
|
|
6653
6662
|
//#region src/composables/useChatActions.ts
|
|
6654
|
-
function
|
|
6663
|
+
function nd({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
6655
6664
|
let i = [];
|
|
6656
6665
|
function a(e, t) {
|
|
6657
6666
|
i.push(r.on(e, t));
|
|
@@ -6692,7 +6701,7 @@ function td({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
6692
6701
|
let { message: n, optionId: r } = t, i = e.client.value;
|
|
6693
6702
|
i && await i.votePoll(n, r);
|
|
6694
6703
|
}), a("message:openReference", (e) => {
|
|
6695
|
-
|
|
6704
|
+
Eu.scrollToMessage(e);
|
|
6696
6705
|
}), a("composer:send", (e) => {
|
|
6697
6706
|
let { target: n } = e;
|
|
6698
6707
|
n === "thread" ? t.sendThreadMessage() : t.sendMessage();
|
|
@@ -6737,8 +6746,8 @@ function td({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
6737
6746
|
}
|
|
6738
6747
|
//#endregion
|
|
6739
6748
|
//#region src/composables/useChatEventBus.ts
|
|
6740
|
-
var
|
|
6741
|
-
function
|
|
6749
|
+
var rd = Symbol("chatBus");
|
|
6750
|
+
function id() {
|
|
6742
6751
|
let e = /* @__PURE__ */ new Map();
|
|
6743
6752
|
return {
|
|
6744
6753
|
emit(t, ...n) {
|
|
@@ -6754,20 +6763,20 @@ function rd() {
|
|
|
6754
6763
|
}
|
|
6755
6764
|
};
|
|
6756
6765
|
}
|
|
6757
|
-
function
|
|
6758
|
-
C(
|
|
6766
|
+
function ad(e) {
|
|
6767
|
+
C(rd, e);
|
|
6759
6768
|
}
|
|
6760
|
-
function
|
|
6761
|
-
let e = f(
|
|
6769
|
+
function od() {
|
|
6770
|
+
let e = f(rd);
|
|
6762
6771
|
if (!e) throw Error("useChatBus() requires an ancestor <BccChat> component.");
|
|
6763
6772
|
return e;
|
|
6764
6773
|
}
|
|
6765
|
-
function
|
|
6774
|
+
function sd(e, t, n) {
|
|
6766
6775
|
x(e.on(t, n));
|
|
6767
6776
|
}
|
|
6768
6777
|
//#endregion
|
|
6769
6778
|
//#region src/composables/useGroupMemberTracking.ts
|
|
6770
|
-
function
|
|
6779
|
+
function cd(e) {
|
|
6771
6780
|
let t = w([]), n = `bcc-chat-group-${crypto.randomUUID()}`;
|
|
6772
6781
|
async function r(n) {
|
|
6773
6782
|
if (e.isChannel() || !e.hasJoined()) {
|
|
@@ -6832,13 +6841,13 @@ function sd(e) {
|
|
|
6832
6841
|
}
|
|
6833
6842
|
//#endregion
|
|
6834
6843
|
//#region src/composables/useMessageNavigation.ts
|
|
6835
|
-
function
|
|
6844
|
+
function ld(e) {
|
|
6836
6845
|
async function t(n, r) {
|
|
6837
|
-
let i = n ??
|
|
6846
|
+
let i = n ?? Eu.scrollToMessageId.value;
|
|
6838
6847
|
if (!i) return;
|
|
6839
6848
|
let a = e.getClient();
|
|
6840
6849
|
if (a && !await a.ensureMessageLoaded(i)) {
|
|
6841
|
-
|
|
6850
|
+
Eu.scrollToMessageId.value === i && (Eu.scrollToMessageId.value = void 0);
|
|
6842
6851
|
return;
|
|
6843
6852
|
}
|
|
6844
6853
|
await h();
|
|
@@ -6851,7 +6860,7 @@ function cd(e) {
|
|
|
6851
6860
|
s.scrollTo({
|
|
6852
6861
|
top: d,
|
|
6853
6862
|
behavior: "smooth"
|
|
6854
|
-
}),
|
|
6863
|
+
}), Eu.scrollToMessageId.value === i && (Eu.scrollToMessageId.value = void 0);
|
|
6855
6864
|
}
|
|
6856
6865
|
function n(e) {
|
|
6857
6866
|
t(e, 0);
|
|
@@ -6863,7 +6872,7 @@ function cd(e) {
|
|
|
6863
6872
|
}
|
|
6864
6873
|
//#endregion
|
|
6865
6874
|
//#region src/chat/clipboardFiles.ts
|
|
6866
|
-
var
|
|
6875
|
+
var ud = new Set([
|
|
6867
6876
|
"",
|
|
6868
6877
|
"image.png",
|
|
6869
6878
|
"image.jpeg",
|
|
@@ -6871,7 +6880,7 @@ var ld = new Set([
|
|
|
6871
6880
|
"image.gif",
|
|
6872
6881
|
"image.webp",
|
|
6873
6882
|
"blob"
|
|
6874
|
-
]),
|
|
6883
|
+
]), dd = {
|
|
6875
6884
|
"image/png": "png",
|
|
6876
6885
|
"image/jpeg": "jpg",
|
|
6877
6886
|
"image/jpg": "jpg",
|
|
@@ -6880,18 +6889,18 @@ var ld = new Set([
|
|
|
6880
6889
|
"image/bmp": "bmp",
|
|
6881
6890
|
"image/svg+xml": "svg"
|
|
6882
6891
|
};
|
|
6883
|
-
function
|
|
6892
|
+
function fd(e) {
|
|
6884
6893
|
let t = e.name.trim(), n = t.toLowerCase();
|
|
6885
|
-
return
|
|
6894
|
+
return ud.has(n) ? `pasted-image.${dd[e.type] ?? "png"}` : t;
|
|
6886
6895
|
}
|
|
6887
|
-
function
|
|
6896
|
+
function pd(e) {
|
|
6888
6897
|
let t = e.clipboardData?.items;
|
|
6889
6898
|
if (!t) return null;
|
|
6890
6899
|
for (let e of t) {
|
|
6891
6900
|
if (e.kind !== "file" || !e.type.startsWith("image/")) continue;
|
|
6892
6901
|
let t = e.getAsFile();
|
|
6893
6902
|
if (!t) continue;
|
|
6894
|
-
let n =
|
|
6903
|
+
let n = fd(t);
|
|
6895
6904
|
return n === t.name ? t : new File([t], n, {
|
|
6896
6905
|
type: t.type,
|
|
6897
6906
|
lastModified: t.lastModified
|
|
@@ -6901,7 +6910,7 @@ function fd(e) {
|
|
|
6901
6910
|
}
|
|
6902
6911
|
//#endregion
|
|
6903
6912
|
//#region src/composables/useComposerTriggers.ts
|
|
6904
|
-
function
|
|
6913
|
+
function md(e) {
|
|
6905
6914
|
return {
|
|
6906
6915
|
id: "mention",
|
|
6907
6916
|
triggerChar: "@",
|
|
@@ -6918,7 +6927,7 @@ function pd(e) {
|
|
|
6918
6927
|
}
|
|
6919
6928
|
};
|
|
6920
6929
|
}
|
|
6921
|
-
function
|
|
6930
|
+
function hd(e) {
|
|
6922
6931
|
let t = w(null), r = w([]), i = w({
|
|
6923
6932
|
x: 0,
|
|
6924
6933
|
y: 0,
|
|
@@ -6951,7 +6960,7 @@ function md(e) {
|
|
|
6951
6960
|
}
|
|
6952
6961
|
for (let i of e.getTriggers()) {
|
|
6953
6962
|
if (!i.enabled()) continue;
|
|
6954
|
-
let e =
|
|
6963
|
+
let e = gd(n, i.triggerChar);
|
|
6955
6964
|
if (!e) continue;
|
|
6956
6965
|
let c = i.getCandidates(e.query).slice(0, i.maxSuggestions ?? 8);
|
|
6957
6966
|
if (!c.length) {
|
|
@@ -6996,7 +7005,7 @@ function md(e) {
|
|
|
6996
7005
|
refreshActiveTrigger: c
|
|
6997
7006
|
};
|
|
6998
7007
|
}
|
|
6999
|
-
function
|
|
7008
|
+
function gd(e, t) {
|
|
7000
7009
|
let n = window.getSelection();
|
|
7001
7010
|
if (!n || n.rangeCount === 0 || !n.isCollapsed) return null;
|
|
7002
7011
|
let r = n.getRangeAt(0);
|
|
@@ -7007,13 +7016,13 @@ function hd(e, t) {
|
|
|
7007
7016
|
if (o === -1 || o > 0 && !/\s/.test(a[o - 1] ?? "")) return null;
|
|
7008
7017
|
let s = a.slice(o + 1);
|
|
7009
7018
|
if (/\s/.test(s)) return null;
|
|
7010
|
-
let c =
|
|
7019
|
+
let c = vd(e, o, a.length) ?? _d(r, t);
|
|
7011
7020
|
return c ? {
|
|
7012
7021
|
query: s,
|
|
7013
7022
|
range: c
|
|
7014
7023
|
} : null;
|
|
7015
7024
|
}
|
|
7016
|
-
function
|
|
7025
|
+
function _d(e, t) {
|
|
7017
7026
|
let n = e.endContainer;
|
|
7018
7027
|
n.nodeType !== Node.TEXT_NODE && (n = e.endContainer.childNodes[e.endOffset - 1] ?? e.endContainer.childNodes[0] ?? null);
|
|
7019
7028
|
for (let r = 0; r < 4 && n; r += 1) {
|
|
@@ -7029,7 +7038,7 @@ function gd(e, t) {
|
|
|
7029
7038
|
}
|
|
7030
7039
|
return null;
|
|
7031
7040
|
}
|
|
7032
|
-
function
|
|
7041
|
+
function vd(e, t, n) {
|
|
7033
7042
|
let r = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), i = 0, a = null, o = 0, s = null, c = 0;
|
|
7034
7043
|
for (let e = r.nextNode(); e; e = r.nextNode()) {
|
|
7035
7044
|
let r = e.textContent?.length ?? 0, l = i + r;
|
|
@@ -7043,7 +7052,7 @@ function _d(e, t, n) {
|
|
|
7043
7052
|
let l = document.createRange();
|
|
7044
7053
|
return l.setStart(a, o), l.setEnd(s, c), l;
|
|
7045
7054
|
}
|
|
7046
|
-
function
|
|
7055
|
+
function yd(e, t) {
|
|
7047
7056
|
e.deleteContents();
|
|
7048
7057
|
let n = document.createElement("span");
|
|
7049
7058
|
n.className = "composer-mention", n.setAttribute("data-mention-uid", t.uid), n.contentEditable = "false", n.textContent = `@${t.displayName}`;
|
|
@@ -7054,20 +7063,20 @@ function vd(e, t) {
|
|
|
7054
7063
|
}
|
|
7055
7064
|
//#endregion
|
|
7056
7065
|
//#region src/composables/useRichTextComposer.ts
|
|
7057
|
-
function
|
|
7066
|
+
function bd(e, t, r, i) {
|
|
7058
7067
|
let a = w(null), o = w(0), s = w(!1), c = w({
|
|
7059
7068
|
x: 0,
|
|
7060
7069
|
y: 0
|
|
7061
7070
|
}), l = w(Fs(i.getModelValue())), u = n(() => {
|
|
7062
7071
|
let e = [...i.extraTriggers ?? []];
|
|
7063
|
-
return i.getMentionCandidates && e.unshift(
|
|
7072
|
+
return i.getMentionCandidates && e.unshift(md({
|
|
7064
7073
|
enabled: () => i.mentionsEnabled?.() ?? !0,
|
|
7065
7074
|
getMentionCandidates: () => i.getMentionCandidates?.() ?? [],
|
|
7066
7075
|
insertMention: (e, t) => {
|
|
7067
|
-
|
|
7076
|
+
yd(t, e), E(), D();
|
|
7068
7077
|
}
|
|
7069
7078
|
})), e;
|
|
7070
|
-
}), { triggerCandidates: d, triggerMenuPosition: f, highlightedTriggerIndex: p, showTriggerMenu: m, hideTriggerMenu: g, handleInput: _, handleKeydown: v, selectTriggerCandidate: x, refreshActiveTrigger: S } =
|
|
7079
|
+
}), { triggerCandidates: d, triggerMenuPosition: f, highlightedTriggerIndex: p, showTriggerMenu: m, hideTriggerMenu: g, handleInput: _, handleKeydown: v, selectTriggerCandidate: x, refreshActiveTrigger: S } = hd({
|
|
7071
7080
|
editorRef: t,
|
|
7072
7081
|
getTriggers: () => u.value,
|
|
7073
7082
|
onChange: () => E()
|
|
@@ -7206,7 +7215,7 @@ function yd(e, t, r, i) {
|
|
|
7206
7215
|
}
|
|
7207
7216
|
//#endregion
|
|
7208
7217
|
//#region src/components/messages/ComposerActionsPopover.vue?vue&type=script&setup=true&lang.ts
|
|
7209
|
-
var
|
|
7218
|
+
var xd = ["data-testid", "onClick"], Sd = { class: "composer-actions-menu__icon" }, Cd = { class: "composer-actions-menu__icon" }, wd = /* @__PURE__ */ u({
|
|
7210
7219
|
__name: "ComposerActionsPopover",
|
|
7211
7220
|
emits: ["pickFile", "openPoll"],
|
|
7212
7221
|
setup(t, { expose: n, emit: i }) {
|
|
@@ -7271,18 +7280,18 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7271
7280
|
class: "composer-actions-menu__item",
|
|
7272
7281
|
"data-testid": e.testId,
|
|
7273
7282
|
onClick: (t) => h(e.kind)
|
|
7274
|
-
}, [o("span",
|
|
7283
|
+
}, [o("span", Sd, [(S(), r(D(e.icon), { class: "size-5" }))]), o("span", null, k(j(u)(e.label)), 1)], 8, xd)), 64)), o("button", {
|
|
7275
7284
|
type: "button",
|
|
7276
7285
|
class: "composer-actions-menu__item",
|
|
7277
7286
|
"data-testid": "composer-create-poll",
|
|
7278
7287
|
onClick: g
|
|
7279
|
-
}, [o("span",
|
|
7288
|
+
}, [o("span", Cd, [(S(), r(D(j(le)), { class: "size-5" }))]), o("span", null, k(j(u)("createPoll")), 1)])], 512)), [[P, c.value]]);
|
|
7280
7289
|
}
|
|
7281
7290
|
}), $ = (e, t) => {
|
|
7282
7291
|
let n = e.__vccOpts || e;
|
|
7283
7292
|
for (let [e, r] of t) n[e] = r;
|
|
7284
7293
|
return n;
|
|
7285
|
-
},
|
|
7294
|
+
}, Td = /* @__PURE__ */ $(wd, [["__scopeId", "data-v-5e8b1d79"]]), Ed = { class: "border-default flex items-start justify-between gap-2 border-t-1 px-3 py-2" }, Dd = { class: "min-w-0" }, Od = { class: "body-md text-default mt-0.5 overflow-hidden font-medium text-ellipsis whitespace-nowrap" }, kd = { class: "body-md text-subtle overflow-hidden text-ellipsis whitespace-nowrap" }, Ad = /* @__PURE__ */ u({
|
|
7286
7295
|
__name: "ComposerContextBanner",
|
|
7287
7296
|
props: {
|
|
7288
7297
|
message: {},
|
|
@@ -7291,11 +7300,11 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7291
7300
|
},
|
|
7292
7301
|
emits: ["cancel"],
|
|
7293
7302
|
setup(e, { emit: t }) {
|
|
7294
|
-
let r = e, i = t, { t: s } = K(), c =
|
|
7295
|
-
return (t, n) => (S(), a("div",
|
|
7303
|
+
let r = e, i = t, { t: s } = K(), c = Vu(), u = n(() => $s(r.message, s("message"), c.mentionNameByUid.value));
|
|
7304
|
+
return (t, n) => (S(), a("div", Ed, [o("div", Dd, [
|
|
7296
7305
|
o("p", { class: g(["body-sm font-semibold uppercase", e.variant === "editing" ? "text-information" : "text-success"]) }, k(e.variant === "editing" ? j(s)("editingInContext", { context: e.contextLabel }) : j(s)("replyingInContext", { context: e.contextLabel })), 3),
|
|
7297
|
-
o("p",
|
|
7298
|
-
o("p",
|
|
7306
|
+
o("p", Od, k(e.message.senderName), 1),
|
|
7307
|
+
o("p", kd, k(u.value), 1)
|
|
7299
7308
|
]), l(j(z), {
|
|
7300
7309
|
icon: j(fe),
|
|
7301
7310
|
text: "",
|
|
@@ -7304,7 +7313,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7304
7313
|
onClick: n[0] ||= (e) => i("cancel")
|
|
7305
7314
|
}, null, 8, ["icon"])]));
|
|
7306
7315
|
}
|
|
7307
|
-
}),
|
|
7316
|
+
}), jd = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
7308
7317
|
__name: "ComposerFormatMenu",
|
|
7309
7318
|
props: {
|
|
7310
7319
|
visible: { type: Boolean },
|
|
@@ -7341,7 +7350,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7341
7350
|
}, [s[8] ||= o("span", { class: "format-menu__icon underline" }, "U", -1), o("span", null, k(j(r)("underline")), 1)], 32)
|
|
7342
7351
|
], 4)) : i("", !0);
|
|
7343
7352
|
}
|
|
7344
|
-
}), [["__scopeId", "data-v-c9a1b3d8"]]),
|
|
7353
|
+
}), [["__scopeId", "data-v-c9a1b3d8"]]), Md = { class: "space-y-6" }, Nd = { class: "space-y-2" }, Pd = { class: "heading-sm text-subtle block font-medium!" }, Fd = { class: "space-y-2" }, Id = { class: "heading-sm text-subtle block font-medium!" }, Ld = /* @__PURE__ */ u({
|
|
7345
7354
|
__name: "ComposerPollDialog",
|
|
7346
7355
|
props: {
|
|
7347
7356
|
visible: { type: Boolean },
|
|
@@ -7393,13 +7402,13 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7393
7402
|
"icon",
|
|
7394
7403
|
"disabled"
|
|
7395
7404
|
])]),
|
|
7396
|
-
default: I(() => [o("div",
|
|
7405
|
+
default: I(() => [o("div", Md, [o("div", Nd, [o("label", Pd, k(j(d)("question")), 1), l(j(ie), {
|
|
7397
7406
|
modelValue: f.value,
|
|
7398
7407
|
"onUpdate:modelValue": i[0] ||= (e) => f.value = e,
|
|
7399
7408
|
fluid: "",
|
|
7400
7409
|
placeholder: j(d)("pollQuestionPlaceholder")
|
|
7401
|
-
}, null, 8, ["modelValue", "placeholder"])]), o("div",
|
|
7402
|
-
o("label",
|
|
7410
|
+
}, null, 8, ["modelValue", "placeholder"])]), o("div", Fd, [
|
|
7411
|
+
o("label", Id, k(j(d)("options")), 1),
|
|
7403
7412
|
(S(!0), a(e, null, T(p.value, (e, t) => (S(), a("div", {
|
|
7404
7413
|
key: t,
|
|
7405
7414
|
class: "center"
|
|
@@ -7434,7 +7443,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7434
7443
|
_: 1
|
|
7435
7444
|
}, 8, ["visible", "header"]));
|
|
7436
7445
|
}
|
|
7437
|
-
}),
|
|
7446
|
+
}), Rd = { class: "w-full space-y-6" }, zd = { class: "w-full space-y-2" }, Bd = { class: "heading-sm text-subtle block font-medium!" }, Vd = { class: "center left w-full gap-2" }, Hd = { class: "body-md bg-elevation-surface-sunken-default rounded-lg px-4 py-3" }, Ud = /* @__PURE__ */ u({
|
|
7438
7447
|
__name: "ComposerScheduleDialog",
|
|
7439
7448
|
props: {
|
|
7440
7449
|
visible: { type: Boolean },
|
|
@@ -7492,7 +7501,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7492
7501
|
"icon",
|
|
7493
7502
|
"disabled"
|
|
7494
7503
|
])]),
|
|
7495
|
-
default: I(() => [o("div",
|
|
7504
|
+
default: I(() => [o("div", Rd, [o("div", zd, [o("label", Bd, k(j(c)("sendAt")), 1), o("div", Vd, [l(j(re), {
|
|
7496
7505
|
modelValue: u.value,
|
|
7497
7506
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
7498
7507
|
class: "w-full flex-1",
|
|
@@ -7506,22 +7515,22 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7506
7515
|
mask: "##:##",
|
|
7507
7516
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
7508
7517
|
"aria-label": "Time (24-hour)"
|
|
7509
|
-
}, null, 8, ["modelValue"])])]), o("div",
|
|
7518
|
+
}, null, 8, ["modelValue"])])]), o("div", Hd, k(e.contentPreview), 1)])]),
|
|
7510
7519
|
_: 1
|
|
7511
7520
|
}, 8, ["visible", "header"]));
|
|
7512
7521
|
}
|
|
7513
|
-
}),
|
|
7522
|
+
}), Wd = [
|
|
7514
7523
|
"aria-selected",
|
|
7515
7524
|
"onMouseover",
|
|
7516
7525
|
"onMousedown"
|
|
7517
|
-
],
|
|
7526
|
+
], Gd = {
|
|
7518
7527
|
key: 1,
|
|
7519
7528
|
class: "trigger-menu__avatar-fallback",
|
|
7520
7529
|
"aria-hidden": "true"
|
|
7521
|
-
},
|
|
7530
|
+
}, Kd = { class: "min-w-0" }, qd = { class: "trigger-menu__label" }, Jd = {
|
|
7522
7531
|
key: 0,
|
|
7523
7532
|
class: "trigger-menu__subtitle"
|
|
7524
|
-
},
|
|
7533
|
+
}, Yd = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
7525
7534
|
__name: "ComposerTriggerMenu",
|
|
7526
7535
|
props: /* @__PURE__ */ m({
|
|
7527
7536
|
visible: { type: Boolean },
|
|
@@ -7556,18 +7565,18 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7556
7565
|
src: e.avatar,
|
|
7557
7566
|
name: e.label,
|
|
7558
7567
|
size: "sm"
|
|
7559
|
-
}, null, 8, ["src", "name"])) : (S(), a("span",
|
|
7568
|
+
}, null, 8, ["src", "name"])) : (S(), a("span", Gd, k(e.label.charAt(0)), 1)), o("span", Kd, [o("span", qd, k(e.label), 1), e.subtitle ? (S(), a("span", Jd, k(e.subtitle), 1)) : i("", !0)])], 42, Wd))), 128))], 38)) : i("", !0);
|
|
7560
7569
|
}
|
|
7561
|
-
}), [["__scopeId", "data-v-3f395457"]]),
|
|
7570
|
+
}), [["__scopeId", "data-v-3f395457"]]), Xd = ["accept", "disabled"], Zd = { class: "px-1 pb-1.5" }, Qd = {
|
|
7562
7571
|
key: 0,
|
|
7563
7572
|
class: "composer-file-preview"
|
|
7564
|
-
},
|
|
7573
|
+
}, $d = { class: "min-w-0" }, ef = { class: "heading-sm text-default truncate" }, tf = { class: "body-sm text-subtle" }, nf = ["data-placeholder"], rf = {
|
|
7565
7574
|
key: 0,
|
|
7566
7575
|
class: "body-sm text-subtle flex items-center gap-2 px-0.5"
|
|
7567
|
-
},
|
|
7576
|
+
}, af = {
|
|
7568
7577
|
key: 2,
|
|
7569
7578
|
class: "ml-auto"
|
|
7570
|
-
},
|
|
7579
|
+
}, of = 450, sf = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
7571
7580
|
__name: "MessageComposer",
|
|
7572
7581
|
props: {
|
|
7573
7582
|
modelValue: {},
|
|
@@ -7600,7 +7609,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7600
7609
|
video: "video/*",
|
|
7601
7610
|
audio: "audio/*",
|
|
7602
7611
|
file: "*/*"
|
|
7603
|
-
}, u = e, d = s, f = w(null), m = w(null), _ = w(null), v = w("file"), y = w(!1), b = w(!1), x = w(!1), { t: C } = K(), T = null, E = w(null), D = w(null), O = w(null), { applyFormat: A, editorKey: M, formatMenuPosition: N, focusEditor: ee, handleContextMenu: P, handleInput: I, handleKeydown: te, handlePaste: R, hideFormatMenu: ne, resetEditor: B, showFormatMenu: re, triggerCandidates: ie, triggerMenuPosition: ae, highlightedTriggerIndex: oe, showTriggerMenu: se, selectTriggerCandidate: H } =
|
|
7612
|
+
}, u = e, d = s, f = w(null), m = w(null), _ = w(null), v = w("file"), y = w(!1), b = w(!1), x = w(!1), { t: C } = K(), T = null, E = w(null), D = w(null), O = w(null), { applyFormat: A, editorKey: M, formatMenuPosition: N, focusEditor: ee, handleContextMenu: P, handleInput: I, handleKeydown: te, handlePaste: R, hideFormatMenu: ne, resetEditor: B, showFormatMenu: re, triggerCandidates: ie, triggerMenuPosition: ae, highlightedTriggerIndex: oe, showTriggerMenu: se, selectTriggerCandidate: H } = bd(E, D, O, {
|
|
7604
7613
|
getModelValue: () => u.modelValue,
|
|
7605
7614
|
updateModelValue: (e) => d("update:modelValue", e),
|
|
7606
7615
|
submit: () => Te(),
|
|
@@ -7641,7 +7650,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7641
7650
|
}
|
|
7642
7651
|
function Se(e) {
|
|
7643
7652
|
if (u.disabled) return;
|
|
7644
|
-
let t =
|
|
7653
|
+
let t = pd(e);
|
|
7645
7654
|
if (t) {
|
|
7646
7655
|
e.preventDefault(), _.value = t, ye();
|
|
7647
7656
|
return;
|
|
@@ -7686,7 +7695,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7686
7695
|
function Ae(e) {
|
|
7687
7696
|
u.disabled || !he.value || e instanceof MouseEvent && e.button !== 0 || (x.value = !1, ke(), T = setTimeout(() => {
|
|
7688
7697
|
T = null, x.value = !0, b.value = !0;
|
|
7689
|
-
},
|
|
7698
|
+
}, of));
|
|
7690
7699
|
}
|
|
7691
7700
|
function je() {
|
|
7692
7701
|
ke();
|
|
@@ -7710,15 +7719,15 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7710
7719
|
disabled: e.disabled,
|
|
7711
7720
|
onChange: xe,
|
|
7712
7721
|
onCancel: ye
|
|
7713
|
-
}, null, 40,
|
|
7714
|
-
e.editingMessage ? (S(), r(
|
|
7722
|
+
}, null, 40, Xd),
|
|
7723
|
+
e.editingMessage ? (S(), r(Ad, {
|
|
7715
7724
|
key: 0,
|
|
7716
7725
|
message: e.editingMessage,
|
|
7717
7726
|
variant: "editing",
|
|
7718
7727
|
"context-label": e.contextLabel,
|
|
7719
7728
|
onCancel: n[0] ||= (e) => d("cancelEdit")
|
|
7720
7729
|
}, null, 8, ["message", "context-label"])) : i("", !0),
|
|
7721
|
-
e.replyToMessage ? (S(), r(
|
|
7730
|
+
e.replyToMessage ? (S(), r(Ad, {
|
|
7722
7731
|
key: 1,
|
|
7723
7732
|
message: e.replyToMessage,
|
|
7724
7733
|
variant: "replying",
|
|
@@ -7726,8 +7735,8 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7726
7735
|
"data-testid": "composer-reply-context",
|
|
7727
7736
|
onCancel: n[1] ||= (e) => d("cancelReply")
|
|
7728
7737
|
}, null, 8, ["message", "context-label"])) : i("", !0),
|
|
7729
|
-
o("div",
|
|
7730
|
-
_.value ? (S(), a("div",
|
|
7738
|
+
o("div", Zd, [
|
|
7739
|
+
_.value ? (S(), a("div", Qd, [o("div", $d, [o("p", ef, k(_.value.name), 1), o("p", tf, k(_.value.type || ue.value), 1)]), l(j(z), {
|
|
7731
7740
|
icon: j(fe),
|
|
7732
7741
|
text: "",
|
|
7733
7742
|
rounded: "",
|
|
@@ -7739,7 +7748,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7739
7748
|
ref: E,
|
|
7740
7749
|
class: g(["composer-shell", u.compact ? "composer-shell--compact" : "composer-shell--default"])
|
|
7741
7750
|
}, [
|
|
7742
|
-
l(
|
|
7751
|
+
l(Td, {
|
|
7743
7752
|
ref_key: "composerActionsRef",
|
|
7744
7753
|
ref: m,
|
|
7745
7754
|
onPickFile: be,
|
|
@@ -7776,8 +7785,8 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7776
7785
|
onKeydown: n[6] ||= (...e) => j(te) && j(te)(...e),
|
|
7777
7786
|
onPaste: Se,
|
|
7778
7787
|
onContextmenu: n[7] ||= (...e) => j(P) && j(P)(...e)
|
|
7779
|
-
}, null, 42,
|
|
7780
|
-
_.value || e.editingMessage || e.contextLabel || e.offlineMode ? (S(), a("div",
|
|
7788
|
+
}, null, 42, nf)),
|
|
7789
|
+
_.value || e.editingMessage || e.contextLabel || e.offlineMode ? (S(), a("div", rf, [
|
|
7781
7790
|
e.editingMessage ? (S(), r(j(V), {
|
|
7782
7791
|
key: 0,
|
|
7783
7792
|
text: j(C)("editing"),
|
|
@@ -7794,7 +7803,7 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7794
7803
|
size: "sm",
|
|
7795
7804
|
class: "composer-meta-tag"
|
|
7796
7805
|
}, null, 8, ["text"])) : i("", !0),
|
|
7797
|
-
e.offlineMode ? (S(), a("p",
|
|
7806
|
+
e.offlineMode ? (S(), a("p", af, k(e.pendingQueueCount ? j(C)("offlineQueued", { count: e.pendingQueueCount }) : j(C)("offline")), 1)) : i("", !0)
|
|
7798
7807
|
])) : i("", !0),
|
|
7799
7808
|
e.showScheduledButton ? (S(), r(j(z), {
|
|
7800
7809
|
key: 1,
|
|
@@ -7834,12 +7843,12 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7834
7843
|
"icon"
|
|
7835
7844
|
])
|
|
7836
7845
|
], 2),
|
|
7837
|
-
l(
|
|
7846
|
+
l(jd, {
|
|
7838
7847
|
visible: j(re),
|
|
7839
7848
|
position: j(N),
|
|
7840
7849
|
onFormat: n[9] ||= (e) => j(A)(e)
|
|
7841
7850
|
}, null, 8, ["visible", "position"]),
|
|
7842
|
-
l(
|
|
7851
|
+
l(Yd, {
|
|
7843
7852
|
ref_key: "triggerMenuRef",
|
|
7844
7853
|
ref: O,
|
|
7845
7854
|
"highlighted-index": j(oe),
|
|
@@ -7854,13 +7863,13 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7854
7863
|
"position",
|
|
7855
7864
|
"candidates"
|
|
7856
7865
|
]),
|
|
7857
|
-
l(
|
|
7866
|
+
l(Ld, {
|
|
7858
7867
|
visible: y.value,
|
|
7859
7868
|
"onUpdate:visible": n[12] ||= (e) => y.value = e,
|
|
7860
7869
|
disabled: e.disabled,
|
|
7861
7870
|
onSend: Ee
|
|
7862
7871
|
}, null, 8, ["visible", "disabled"]),
|
|
7863
|
-
l(
|
|
7872
|
+
l(Ud, {
|
|
7864
7873
|
visible: b.value,
|
|
7865
7874
|
"onUpdate:visible": n[13] ||= (e) => b.value = e,
|
|
7866
7875
|
disabled: e.disabled,
|
|
@@ -7876,14 +7885,14 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7876
7885
|
])
|
|
7877
7886
|
], 2));
|
|
7878
7887
|
}
|
|
7879
|
-
}), [["__scopeId", "data-v-9df579a2"]]),
|
|
7888
|
+
}), [["__scopeId", "data-v-9df579a2"]]), cf = {
|
|
7880
7889
|
key: 1,
|
|
7881
7890
|
class: "composer-readonly-notice"
|
|
7882
|
-
},
|
|
7891
|
+
}, lf = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
7883
7892
|
__name: "ConversationComposer",
|
|
7884
7893
|
props: { target: {} },
|
|
7885
7894
|
setup(e, { expose: t }) {
|
|
7886
|
-
let o = e, { t: s } = K(), c =
|
|
7895
|
+
let o = e, { t: s } = K(), c = Vu(), l = Gu(), u = Xu(), d = td(), f = od(), p = n(() => o.target === "thread"), m = n({
|
|
7887
7896
|
get: () => p.value ? u.threadDraft.value : u.draft.value,
|
|
7888
7897
|
set: (e) => {
|
|
7889
7898
|
p.value ? u.threadDraft.value = e : u.draft.value = e;
|
|
@@ -7923,13 +7932,13 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7923
7932
|
f.emit("composer:cancelEdit");
|
|
7924
7933
|
}
|
|
7925
7934
|
let M = w(null);
|
|
7926
|
-
|
|
7935
|
+
sd(f, "ui:closeComposerActions", () => {
|
|
7927
7936
|
M.value?.hideComposerActions();
|
|
7928
7937
|
});
|
|
7929
7938
|
async function N() {
|
|
7930
7939
|
await M.value?.focusEditor();
|
|
7931
7940
|
}
|
|
7932
|
-
return t({ focusEditor: N }), (e, t) => y.value ? (S(), r(
|
|
7941
|
+
return t({ focusEditor: N }), (e, t) => y.value ? (S(), r(sf, {
|
|
7933
7942
|
key: 0,
|
|
7934
7943
|
ref_key: "composerRef",
|
|
7935
7944
|
ref: M,
|
|
@@ -7966,10 +7975,10 @@ var bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon"
|
|
|
7966
7975
|
"mention-candidates",
|
|
7967
7976
|
"mention-name-by-uid",
|
|
7968
7977
|
"mentions-enabled"
|
|
7969
|
-
])) : b.value ? (S(), a("div",
|
|
7978
|
+
])) : b.value ? (S(), a("div", cf, k(p.value ? j(s)("repliesDisabledInChannels") : j(s)("readOnlyChannel")), 1)) : i("", !0);
|
|
7970
7979
|
}
|
|
7971
|
-
}), [["__scopeId", "data-v-84a9e2b1"]]),
|
|
7972
|
-
function
|
|
7980
|
+
}), [["__scopeId", "data-v-84a9e2b1"]]), uf = 1800;
|
|
7981
|
+
function df(e) {
|
|
7973
7982
|
let t = e.actionMenuRef, r = w(null), i = w(null), a = typeof window < "u" ? window.matchMedia("(hover: hover) and (pointer: fine)") : null, o = w(!!a?.matches);
|
|
7974
7983
|
a?.addEventListener("change", (e) => {
|
|
7975
7984
|
o.value = e.matches;
|
|
@@ -8109,7 +8118,7 @@ function uf(e) {
|
|
|
8109
8118
|
}
|
|
8110
8119
|
i.value = e.id, s && clearTimeout(s), s = setTimeout(() => {
|
|
8111
8120
|
i.value = null;
|
|
8112
|
-
},
|
|
8121
|
+
}, uf), x();
|
|
8113
8122
|
}
|
|
8114
8123
|
function D(t) {
|
|
8115
8124
|
e.canReply() && (e.emit.reply(t), x());
|
|
@@ -8198,8 +8207,8 @@ function uf(e) {
|
|
|
8198
8207
|
}
|
|
8199
8208
|
//#endregion
|
|
8200
8209
|
//#region src/composables/useMessageListScroll.ts
|
|
8201
|
-
var
|
|
8202
|
-
function
|
|
8210
|
+
var ff = 1, pf = 2, mf = 80, hf = 1800, gf = 4;
|
|
8211
|
+
function _f(e) {
|
|
8203
8212
|
let t = e.threadRef, n = !0, r = 0, i = null, a = null, o = null, s = null;
|
|
8204
8213
|
function c() {
|
|
8205
8214
|
o != null && (cancelAnimationFrame(o), o = null);
|
|
@@ -8241,7 +8250,7 @@ function gf(e) {
|
|
|
8241
8250
|
resizeObserver: o,
|
|
8242
8251
|
timeoutId: setTimeout(() => {
|
|
8243
8252
|
f();
|
|
8244
|
-
},
|
|
8253
|
+
}, hf)
|
|
8245
8254
|
}, a(), o.observe(e);
|
|
8246
8255
|
}
|
|
8247
8256
|
function m() {
|
|
@@ -8252,9 +8261,9 @@ function gf(e) {
|
|
|
8252
8261
|
let a = t.value;
|
|
8253
8262
|
if (!a) return;
|
|
8254
8263
|
let o = a.scrollTop;
|
|
8255
|
-
i?.el === a && Math.abs(o - i.expectedScrollTop) >
|
|
8264
|
+
i?.el === a && Math.abs(o - i.expectedScrollTop) > gf && f();
|
|
8256
8265
|
let s = o < r, c = Math.max(0, a.scrollHeight - o - a.clientHeight);
|
|
8257
|
-
s && c >
|
|
8266
|
+
s && c > ff ? n = !1 : c <= pf && (n = !0), r = o, a.scrollTop <= mf && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
|
|
8258
8267
|
}
|
|
8259
8268
|
return F(() => {
|
|
8260
8269
|
let t = e.getMessages();
|
|
@@ -8282,14 +8291,14 @@ function gf(e) {
|
|
|
8282
8291
|
}
|
|
8283
8292
|
//#endregion
|
|
8284
8293
|
//#region src/composables/useImageZoom.ts
|
|
8285
|
-
var
|
|
8286
|
-
function
|
|
8294
|
+
var vf = 1, yf = 4;
|
|
8295
|
+
function bf(e) {
|
|
8287
8296
|
let t = w(1), n = w(0), r = w(0), i = w(!1), a = /* @__PURE__ */ new Map(), o = null, s = 0, c = 0, l = 0, u = 0, d = 0, f = 1, p = 0, m = 0;
|
|
8288
8297
|
function h(e, t, n) {
|
|
8289
8298
|
return Math.min(Math.max(e, t), n);
|
|
8290
8299
|
}
|
|
8291
8300
|
function g(e) {
|
|
8292
|
-
return h(e,
|
|
8301
|
+
return h(e, vf, yf);
|
|
8293
8302
|
}
|
|
8294
8303
|
function _(n, r, i = t.value) {
|
|
8295
8304
|
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);
|
|
@@ -8379,10 +8388,10 @@ function yf(e) {
|
|
|
8379
8388
|
}
|
|
8380
8389
|
//#endregion
|
|
8381
8390
|
//#region src/components/overlays/FullscreenDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8382
|
-
var
|
|
8391
|
+
var xf = { class: "w-full" }, Sf = {
|
|
8383
8392
|
key: 0,
|
|
8384
8393
|
class: "fullscreen-dialog__footer"
|
|
8385
|
-
},
|
|
8394
|
+
}, Cf = /* @__PURE__ */ u({
|
|
8386
8395
|
__name: "FullscreenDialog",
|
|
8387
8396
|
props: {
|
|
8388
8397
|
open: { type: Boolean },
|
|
@@ -8407,34 +8416,34 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8407
8416
|
closable: !0,
|
|
8408
8417
|
"onUpdate:visible": s
|
|
8409
8418
|
}, {
|
|
8410
|
-
default: I(() => [o("div",
|
|
8419
|
+
default: I(() => [o("div", xf, [E(t.$slots, "default")]), t.$slots.footer ? (S(), a("div", Sf, [E(t.$slots, "footer")])) : i("", !0)]),
|
|
8411
8420
|
_: 3
|
|
8412
8421
|
}, 8, ["visible", "header"]));
|
|
8413
8422
|
}
|
|
8414
|
-
}),
|
|
8423
|
+
}), wf = ["href"], Tf = { class: "media-viewer-shell flex min-h-0 flex-1 items-center justify-center overflow-hidden" }, Ef = ["src", "alt"], Df = {
|
|
8415
8424
|
key: 1,
|
|
8416
8425
|
class: "media-viewer-stage media-viewer-stage-video flex w-full items-center justify-center"
|
|
8417
|
-
},
|
|
8426
|
+
}, Of = {
|
|
8418
8427
|
class: "max-h-full w-full bg-black",
|
|
8419
8428
|
controls: "",
|
|
8420
8429
|
playsinline: "",
|
|
8421
8430
|
autoplay: ""
|
|
8422
|
-
},
|
|
8431
|
+
}, kf = ["src", "type"], Af = {
|
|
8423
8432
|
key: 2,
|
|
8424
8433
|
class: "media-viewer-stage media-viewer-audio-stage flex w-full items-center justify-center px-5 py-6"
|
|
8425
|
-
},
|
|
8434
|
+
}, jf = {
|
|
8426
8435
|
class: "w-full",
|
|
8427
8436
|
controls: "",
|
|
8428
8437
|
autoplay: ""
|
|
8429
|
-
},
|
|
8438
|
+
}, Mf = ["src", "type"], Nf = {
|
|
8430
8439
|
key: 0,
|
|
8431
8440
|
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"
|
|
8432
|
-
},
|
|
8441
|
+
}, Pf = { class: "min-w-0 flex-1" }, Ff = { class: "heading-sm text-default truncate" }, If = { class: "body-sm text-subtle" }, Lf = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8433
8442
|
__name: "MediaViewerDialog",
|
|
8434
8443
|
props: { attachment: {} },
|
|
8435
8444
|
emits: ["close"],
|
|
8436
8445
|
setup(t, { emit: s }) {
|
|
8437
|
-
let c = t, l = s, u = w(null), d = w(null), f = n(() => !!c.attachment?.url), p = n(() => c.attachment?.kind === "image"), m = n(() => c.attachment?.kind === "video"), h = n(() => c.attachment?.kind === "audio"), { t: _ } = K(), { scale: y, translateX: b, translateY: x, isDragging: C, resetTransform: T, handlePointerDown: E, handlePointerMove: O, handlePointerUp: A, handlePointerCancel: M, handleWheel: N, handleDoubleClick: ee } =
|
|
8446
|
+
let c = t, l = s, u = w(null), d = w(null), f = n(() => !!c.attachment?.url), p = n(() => c.attachment?.kind === "image"), m = n(() => c.attachment?.kind === "video"), h = n(() => c.attachment?.kind === "audio"), { t: _ } = K(), { scale: y, translateX: b, translateY: x, isDragging: C, resetTransform: T, handlePointerDown: E, handlePointerMove: O, handlePointerUp: A, handlePointerCancel: M, handleWheel: N, handleDoubleClick: ee } = bf({
|
|
8438
8447
|
viewportRef: u,
|
|
8439
8448
|
imageRef: d,
|
|
8440
8449
|
isImage: () => p.value
|
|
@@ -8445,7 +8454,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8445
8454
|
function P() {
|
|
8446
8455
|
l("close");
|
|
8447
8456
|
}
|
|
8448
|
-
return (n, s) => (S(), r(
|
|
8457
|
+
return (n, s) => (S(), r(Cf, {
|
|
8449
8458
|
open: f.value,
|
|
8450
8459
|
title: t.attachment?.name || j(_)("attachment"),
|
|
8451
8460
|
subtitle: t.attachment?.kind || "",
|
|
@@ -8462,9 +8471,9 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8462
8471
|
}, [(S(), r(D(j(ke)), {
|
|
8463
8472
|
class: "size-4",
|
|
8464
8473
|
"aria-hidden": "true"
|
|
8465
|
-
})), o("span", null, k(j(_)("openInNewTab")), 1)], 8,
|
|
8466
|
-
footer: I(() => [t.attachment ? (S(), a("div",
|
|
8467
|
-
default: I(() => [o("div",
|
|
8474
|
+
})), o("span", null, k(j(_)("openInNewTab")), 1)], 8, wf)) : i("", !0)]),
|
|
8475
|
+
footer: I(() => [t.attachment ? (S(), a("div", Nf, [o("div", Pf, [o("p", Ff, k(t.attachment.name), 1), o("p", If, k(t.attachment.kind), 1)])])) : i("", !0)]),
|
|
8476
|
+
default: I(() => [o("div", Tf, [t.attachment?.url ? (S(), a(e, { key: 0 }, [p.value ? (S(), a("div", {
|
|
8468
8477
|
key: 0,
|
|
8469
8478
|
ref_key: "viewportRef",
|
|
8470
8479
|
ref: u,
|
|
@@ -8487,13 +8496,13 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8487
8496
|
transform: `translate3d(${j(b)}px, ${j(x)}px, 0) scale(${j(y)})`,
|
|
8488
8497
|
transformOrigin: "center center"
|
|
8489
8498
|
})
|
|
8490
|
-
}, null, 14,
|
|
8499
|
+
}, null, 14, Ef)], 544)) : m.value ? (S(), a("div", Df, [o("video", Of, [o("source", {
|
|
8491
8500
|
src: t.attachment.url,
|
|
8492
8501
|
type: t.attachment.mimeType || void 0
|
|
8493
|
-
}, null, 8,
|
|
8502
|
+
}, null, 8, kf)])])) : h.value ? (S(), a("div", Af, [o("audio", jf, [o("source", {
|
|
8494
8503
|
src: t.attachment.url,
|
|
8495
8504
|
type: t.attachment.mimeType || void 0
|
|
8496
|
-
}, null, 8,
|
|
8505
|
+
}, null, 8, Mf)])])) : i("", !0)], 64)) : i("", !0)])]),
|
|
8497
8506
|
_: 1
|
|
8498
8507
|
}, 8, [
|
|
8499
8508
|
"open",
|
|
@@ -8503,7 +8512,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8503
8512
|
"close-aria-label"
|
|
8504
8513
|
]));
|
|
8505
8514
|
}
|
|
8506
|
-
}), [["__scopeId", "data-v-0e82cfd0"]]),
|
|
8515
|
+
}), [["__scopeId", "data-v-0e82cfd0"]]), Rf = { class: "date-separator" }, zf = { class: "date-separator__label" }, Bf = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8507
8516
|
__name: "MessageDateSeparator",
|
|
8508
8517
|
props: { date: {} },
|
|
8509
8518
|
setup(e) {
|
|
@@ -8517,24 +8526,24 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8517
8526
|
year: "numeric"
|
|
8518
8527
|
}).format(n);
|
|
8519
8528
|
});
|
|
8520
|
-
return (e, t) => (S(), a("div",
|
|
8529
|
+
return (e, t) => (S(), a("div", Rf, [o("span", zf, k(s.value), 1)]));
|
|
8521
8530
|
}
|
|
8522
|
-
}), [["__scopeId", "data-v-49e72d67"]]),
|
|
8531
|
+
}), [["__scopeId", "data-v-49e72d67"]]), Vf = {
|
|
8523
8532
|
"data-testid": "action-message",
|
|
8524
8533
|
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"
|
|
8525
|
-
},
|
|
8534
|
+
}, Hf = { class: "message-action-row__text" }, Uf = /* @__PURE__ */ u({
|
|
8526
8535
|
__name: "ActionMessageRow",
|
|
8527
8536
|
props: { text: {} },
|
|
8528
8537
|
setup(e) {
|
|
8529
|
-
return (t, n) => (S(), a("div",
|
|
8538
|
+
return (t, n) => (S(), a("div", Vf, [o("span", Hf, k(e.text), 1)]));
|
|
8530
8539
|
}
|
|
8531
|
-
}),
|
|
8540
|
+
}), Wf = ["href"], Gf = {
|
|
8532
8541
|
key: 0,
|
|
8533
8542
|
class: "bg-elevation-surface-hovered aspect-[1.9/1] w-full overflow-hidden"
|
|
8534
|
-
},
|
|
8543
|
+
}, Kf = ["src", "alt"], qf = { class: "space-y-1.5 px-3 py-3" }, Jf = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, Yf = { class: "heading-sm text-default line-clamp-2" }, Xf = { class: "body-md text-subtle line-clamp-2" }, Zf = {
|
|
8535
8544
|
key: 0,
|
|
8536
8545
|
class: "body-sm text-subtlest"
|
|
8537
|
-
},
|
|
8546
|
+
}, Qf = /* @__PURE__ */ u({
|
|
8538
8547
|
__name: "LinkPreviewCard",
|
|
8539
8548
|
props: {
|
|
8540
8549
|
url: {},
|
|
@@ -8601,18 +8610,18 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8601
8610
|
target: "_blank",
|
|
8602
8611
|
rel: "noreferrer",
|
|
8603
8612
|
class: g(["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"])
|
|
8604
|
-
}, [r.value?.imageUrl ? (S(), a("div",
|
|
8613
|
+
}, [r.value?.imageUrl ? (S(), a("div", Gf, [o("img", {
|
|
8605
8614
|
src: r.value.imageUrl,
|
|
8606
8615
|
alt: r.value.title || l.value,
|
|
8607
8616
|
class: "h-full w-full object-cover"
|
|
8608
|
-
}, null, 8,
|
|
8609
|
-
o("p",
|
|
8610
|
-
o("p",
|
|
8611
|
-
o("p",
|
|
8612
|
-
s.value && !r.value ? (S(), a("p",
|
|
8613
|
-
])], 10,
|
|
8614
|
-
}
|
|
8615
|
-
}),
|
|
8617
|
+
}, null, 8, Kf)])) : i("", !0), o("div", qf, [
|
|
8618
|
+
o("p", Jf, k(r.value?.siteName || l.value), 1),
|
|
8619
|
+
o("p", Yf, k(r.value?.title || l.value), 1),
|
|
8620
|
+
o("p", Xf, k(r.value?.description || u.value), 1),
|
|
8621
|
+
s.value && !r.value ? (S(), a("p", Zf, k(j(c)("loadingPreview")), 1)) : i("", !0)
|
|
8622
|
+
])], 10, Wf));
|
|
8623
|
+
}
|
|
8624
|
+
}), $f = { class: "linkified-text" }, ep = ["innerHTML"], tp = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8616
8625
|
__name: "LinkifiedText",
|
|
8617
8626
|
props: {
|
|
8618
8627
|
text: {},
|
|
@@ -8631,25 +8640,25 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8631
8640
|
let t = e.target;
|
|
8632
8641
|
t.tagName === "A" && d(e, t);
|
|
8633
8642
|
}
|
|
8634
|
-
return (t, n) => (S(), a("div",
|
|
8643
|
+
return (t, n) => (S(), a("div", $f, [o("div", {
|
|
8635
8644
|
class: g(["rich-text-content", e.textClass]),
|
|
8636
8645
|
onClick: f,
|
|
8637
8646
|
innerHTML: l.value
|
|
8638
|
-
}, null, 10,
|
|
8647
|
+
}, null, 10, ep), e.showPreview !== !1 && u.value ? (S(), r(Qf, {
|
|
8639
8648
|
key: 0,
|
|
8640
8649
|
url: u.value,
|
|
8641
8650
|
"is-own": e.isOwn
|
|
8642
8651
|
}, null, 8, ["url", "is-own"])) : i("", !0)]));
|
|
8643
8652
|
}
|
|
8644
|
-
}), [["__scopeId", "data-v-656b44e8"]]),
|
|
8653
|
+
}), [["__scopeId", "data-v-656b44e8"]]), np = { class: "w-full space-y-1" }, rp = {
|
|
8645
8654
|
class: "attachment-video",
|
|
8646
8655
|
controls: "",
|
|
8647
8656
|
playsinline: "",
|
|
8648
8657
|
preload: "metadata"
|
|
8649
|
-
},
|
|
8658
|
+
}, ip = ["src", "type"], ap = ["onClick"], op = { class: "inline-flex items-center gap-2 truncate font-medium" }, sp = ["href"], cp = { class: "flex min-w-0 items-center gap-2" }, lp = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, up = { class: "text-default truncate font-medium" }, dp = { class: "body-sm text-subtle shrink-0" }, fp = {
|
|
8650
8659
|
key: 4,
|
|
8651
8660
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm"
|
|
8652
|
-
},
|
|
8661
|
+
}, pp = { class: "flex min-w-0 items-center gap-2" }, mp = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, hp = { class: "text-default truncate font-medium" }, gp = { class: "body-sm text-subtle shrink-0" }, _p = 4 / 3, vp = 16 / 9, yp = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8653
8662
|
__name: "MessageAttachmentList",
|
|
8654
8663
|
props: { message: {} },
|
|
8655
8664
|
emits: ["openMedia"],
|
|
@@ -8704,12 +8713,12 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8704
8713
|
return n ? t.localeCompare(n, void 0, { sensitivity: "accent" }) !== 0 : !0;
|
|
8705
8714
|
}
|
|
8706
8715
|
function m(e) {
|
|
8707
|
-
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ?
|
|
8716
|
+
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ? vp : _p;
|
|
8708
8717
|
}
|
|
8709
8718
|
function h(e) {
|
|
8710
8719
|
return { aspectRatio: String(m(e)) };
|
|
8711
8720
|
}
|
|
8712
|
-
return (n, d) => (S(), a("div",
|
|
8721
|
+
return (n, d) => (S(), a("div", np, [(S(!0), a(e, null, T(t.message.attachments, (n) => (S(), a(e, { key: `${t.message.id}-${n.name}` }, [n.kind === "image" && n.url ? (S(), r(j(B), {
|
|
8713
8722
|
key: 0,
|
|
8714
8723
|
preview: "",
|
|
8715
8724
|
src: n.url,
|
|
@@ -8729,34 +8738,34 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8729
8738
|
key: 1,
|
|
8730
8739
|
class: "attachment-media-bleed bg-elevation-surface-default shadow-raised attachment-media-frame group relative overflow-hidden rounded-xl border-0",
|
|
8731
8740
|
style: v(h(n))
|
|
8732
|
-
}, [o("video",
|
|
8741
|
+
}, [o("video", rp, [o("source", {
|
|
8733
8742
|
src: n.url,
|
|
8734
8743
|
type: n.mimeType || void 0
|
|
8735
|
-
}, null, 8,
|
|
8744
|
+
}, null, 8, ip)])], 4)) : n.kind === "audio" && n.url ? (S(), a("button", {
|
|
8736
8745
|
key: 2,
|
|
8737
8746
|
type: "button",
|
|
8738
8747
|
class: "flex w-full items-center justify-between gap-3 rounded-2xl px-3 py-2 text-left text-sm transition hover:opacity-90",
|
|
8739
8748
|
onClick: (e) => s("openMedia", n)
|
|
8740
|
-
}, [o("span",
|
|
8749
|
+
}, [o("span", op, [d[0] ||= o("span", { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 items-center justify-center rounded-full" }, " ♪ ", -1), c(" " + k(j(l)("audioMessage")), 1)])], 8, ap)) : n.url ? (S(), a("a", {
|
|
8741
8750
|
key: 3,
|
|
8742
8751
|
href: n.url,
|
|
8743
8752
|
target: "_blank",
|
|
8744
8753
|
rel: "noreferrer",
|
|
8745
8754
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm no-underline transition hover:opacity-90"
|
|
8746
|
-
}, [o("span",
|
|
8755
|
+
}, [o("span", cp, [o("span", lp, [(S(), r(D(f(n)), {
|
|
8747
8756
|
class: "size-5",
|
|
8748
8757
|
"aria-hidden": "true"
|
|
8749
|
-
}))]), o("span",
|
|
8758
|
+
}))]), o("span", up, k(n.name), 1)]), o("span", dp, k(u(n.size)), 1)], 8, sp)) : (S(), a("div", fp, [o("span", pp, [o("span", mp, [(S(), r(D(f(n)), {
|
|
8750
8759
|
class: "size-5",
|
|
8751
8760
|
"aria-hidden": "true"
|
|
8752
|
-
}))]), o("span",
|
|
8761
|
+
}))]), o("span", hp, k(n.name), 1)]), o("span", gp, k(u(n.size) || j(l)("queued")), 1)]))], 64))), 128)), p(t.message) ? (S(), r(tp, {
|
|
8753
8762
|
key: 0,
|
|
8754
8763
|
text: t.message.text,
|
|
8755
8764
|
"is-own": t.message.isOwn,
|
|
8756
8765
|
"text-class": "whitespace-normal wrap-break-word body-md text-default"
|
|
8757
8766
|
}, null, 8, ["text", "is-own"])) : i("", !0)]));
|
|
8758
8767
|
}
|
|
8759
|
-
}), [["__scopeId", "data-v-5c0ccf0e"]]),
|
|
8768
|
+
}), [["__scopeId", "data-v-5c0ccf0e"]]), bp = { class: "message-status" }, xp = { key: 0 }, Sp = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8760
8769
|
__name: "MessageDeliveryStatus",
|
|
8761
8770
|
props: { message: {} },
|
|
8762
8771
|
setup(e) {
|
|
@@ -8805,8 +8814,8 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8805
8814
|
};
|
|
8806
8815
|
}
|
|
8807
8816
|
});
|
|
8808
|
-
return (t, n) => (S(), a("div",
|
|
8809
|
-
e.message.isEdited && e.message.kind !== "poll" ? (S(), a("span",
|
|
8817
|
+
return (t, n) => (S(), a("div", bp, [
|
|
8818
|
+
e.message.isEdited && e.message.kind !== "poll" ? (S(), a("span", xp, k(j(c)("edited")), 1)) : i("", !0),
|
|
8810
8819
|
o("span", null, k(l(e.message.sentAt)), 1),
|
|
8811
8820
|
u.value ? (S(), r(D(u.value.icon), {
|
|
8812
8821
|
key: 1,
|
|
@@ -8821,7 +8830,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8821
8830
|
])) : i("", !0)
|
|
8822
8831
|
]));
|
|
8823
8832
|
}
|
|
8824
|
-
}), [["__scopeId", "data-v-ff4e9daa"]]),
|
|
8833
|
+
}), [["__scopeId", "data-v-ff4e9daa"]]), Cp = { class: "mb-1 flex items-start justify-between gap-2" }, wp = { class: "body-sm text-subtlest truncate font-medium!" }, Tp = /* @__PURE__ */ u({
|
|
8825
8834
|
__name: "MessageItemHeader",
|
|
8826
8835
|
props: { message: {} },
|
|
8827
8836
|
setup(e) {
|
|
@@ -8837,7 +8846,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8837
8846
|
function l() {
|
|
8838
8847
|
return t.message.senderName?.trim() || (t.message.isOwn ? s("you") : s("system"));
|
|
8839
8848
|
}
|
|
8840
|
-
return (t, n) => (S(), a("div",
|
|
8849
|
+
return (t, n) => (S(), a("div", Cp, [o("span", wp, k(l()), 1), e.message.scheduled?.scheduleDate ? (S(), r(j(V), {
|
|
8841
8850
|
key: 0,
|
|
8842
8851
|
text: j(s)("scheduledDateLabel", { date: c(e.message.scheduled.scheduleDate) }),
|
|
8843
8852
|
context: "warn",
|
|
@@ -8846,7 +8855,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8846
8855
|
class: "shrink-0"
|
|
8847
8856
|
}, null, 8, ["text"])) : i("", !0)]));
|
|
8848
8857
|
}
|
|
8849
|
-
}),
|
|
8858
|
+
}), Ep = ["disabled", "onClick"], Dp = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8850
8859
|
__name: "MessageReactionList",
|
|
8851
8860
|
props: {
|
|
8852
8861
|
message: {},
|
|
@@ -8865,9 +8874,9 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8865
8874
|
class: g(["message-reaction-list__item rounded-full px-2 py-0.75 leading-none transition", e.reactedByMe ? "reaction-chip-selected" : t.message.isOwn ? "reaction-chip-own" : "reaction-chip-other"]),
|
|
8866
8875
|
disabled: t.disabled,
|
|
8867
8876
|
onClick: (t) => r("toggle", e.emoji)
|
|
8868
|
-
}, k(e.emoji) + " " + k(e.count), 11,
|
|
8877
|
+
}, k(e.emoji) + " " + k(e.count), 11, Ep))), 128))], 2)) : i("", !0);
|
|
8869
8878
|
}
|
|
8870
|
-
}), [["__scopeId", "data-v-c17c8bfd"]]),
|
|
8879
|
+
}), [["__scopeId", "data-v-c17c8bfd"]]), Op = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, kp = ["aria-label", "title"], Ap = { class: "message-reactions__thread-count" }, jp = /* @__PURE__ */ u({
|
|
8871
8880
|
__name: "MessageItemReactions",
|
|
8872
8881
|
props: {
|
|
8873
8882
|
message: {},
|
|
@@ -8877,7 +8886,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8877
8886
|
emits: ["toggleReaction", "openThread"],
|
|
8878
8887
|
setup(e, { emit: t }) {
|
|
8879
8888
|
let s = e, c = t, { t: u } = K(), d = n(() => u("threadReplies", { count: s.message.replyCount })), f = n(() => s.canOpenThread !== !1 && s.message.replyCount > 0);
|
|
8880
|
-
return (t, n) => (S(), a("div",
|
|
8889
|
+
return (t, n) => (S(), a("div", Op, [l(Dp, {
|
|
8881
8890
|
message: e.message,
|
|
8882
8891
|
disabled: e.canReact === !1,
|
|
8883
8892
|
compact: "",
|
|
@@ -8892,12 +8901,12 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8892
8901
|
}, [(S(), r(D(j(Me)), {
|
|
8893
8902
|
class: "size-4",
|
|
8894
8903
|
"aria-hidden": "true"
|
|
8895
|
-
})), o("span",
|
|
8904
|
+
})), o("span", Ap, k(e.message.replyCount), 1)], 8, kp)) : i("", !0)]));
|
|
8896
8905
|
}
|
|
8897
|
-
}),
|
|
8906
|
+
}), Mp = {
|
|
8898
8907
|
key: 0,
|
|
8899
8908
|
class: ""
|
|
8900
|
-
},
|
|
8909
|
+
}, Np = { class: "heading-sm text-default" }, Pp = { class: "body-sm text-subtle" }, Fp = { class: "space-y-2 py-3" }, Ip = ["disabled", "onClick"], Lp = { class: "body-md flex items-center justify-between gap-3 px-3 py-1.5" }, Rp = { class: "body-sm text-subtle shrink-0" }, zp = { class: "bg-alpha-default h-1.5" }, Bp = /* @__PURE__ */ u({
|
|
8901
8910
|
__name: "MessagePollContent",
|
|
8902
8911
|
props: {
|
|
8903
8912
|
message: {},
|
|
@@ -8916,36 +8925,36 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8916
8925
|
let t = r.currentUserId;
|
|
8917
8926
|
return !!(!t || r.pendingOptionKey === `${r.message.id}:${e}` || r.message.poll.options.some((n) => n.id === e && n.voters.includes(t)));
|
|
8918
8927
|
}
|
|
8919
|
-
return (n, r) => t.message.poll ? (S(), a("div",
|
|
8928
|
+
return (n, r) => t.message.poll ? (S(), a("div", Mp, [o("div", null, [o("h4", Np, k(t.message.poll.question), 1), o("p", Pp, k(j(c)("voteCount", { count: t.message.poll.totalVotes })), 1)]), o("div", Fp, [(S(!0), a(e, null, T(t.message.poll.options, (e) => (S(), a("button", {
|
|
8920
8929
|
key: e.id,
|
|
8921
8930
|
type: "button",
|
|
8922
8931
|
class: "shadow-raised bg-elevation-surface-raised-default block w-full overflow-hidden rounded-lg text-left",
|
|
8923
8932
|
disabled: u(e.id),
|
|
8924
8933
|
onClick: (t) => s("vote", e.id)
|
|
8925
|
-
}, [o("div",
|
|
8934
|
+
}, [o("div", Lp, [o("span", { class: g(["truncate font-medium", l(e.id) ? "text-success" : ""]) }, k(e.text), 3), o("span", Rp, k(j(c)("voteCount", { count: e.voteCount })), 1)]), o("div", zp, [o("div", {
|
|
8926
8935
|
class: g(["h-full transition-all", l(e.id) ? "bg-accent-green-subtle-default" : "bg-accent-teal-subtle-default"]),
|
|
8927
8936
|
style: v({ width: `${t.message.poll.totalVotes ? e.voteCount / t.message.poll.totalVotes * 100 : 0}%` })
|
|
8928
|
-
}, null, 6)])], 8,
|
|
8937
|
+
}, null, 6)])], 8, Ip))), 128))])])) : i("", !0);
|
|
8929
8938
|
}
|
|
8930
|
-
}),
|
|
8939
|
+
}), Vp = { class: "heading-xs" }, Hp = { class: "truncate" }, Up = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8931
8940
|
__name: "MessageReplyQuote",
|
|
8932
8941
|
props: { message: {} },
|
|
8933
8942
|
emits: ["open"],
|
|
8934
8943
|
setup(e, { emit: t }) {
|
|
8935
|
-
let r = e, i =
|
|
8944
|
+
let r = e, i = Vu(), s = n(() => r.message.replyTo ? ec(r.message.replyTo.text, i.mentionNameByUid.value) : ""), c = t;
|
|
8936
8945
|
return (t, n) => (S(), a("button", {
|
|
8937
8946
|
type: "button",
|
|
8938
8947
|
class: "reply-quote",
|
|
8939
8948
|
onClick: n[0] ||= (e) => c("open")
|
|
8940
|
-
}, [o("p",
|
|
8949
|
+
}, [o("p", Vp, k(e.message.replyTo.senderName), 1), o("p", Hp, k(s.value), 1)]));
|
|
8941
8950
|
}
|
|
8942
|
-
}), [["__scopeId", "data-v-e27c136c"]]),
|
|
8951
|
+
}), [["__scopeId", "data-v-e27c136c"]]), Wp = { class: "space-y-2" }, Gp = /* @__PURE__ */ u({
|
|
8943
8952
|
__name: "MessageTextContent",
|
|
8944
8953
|
props: { message: {} },
|
|
8945
8954
|
emits: ["anchorclick"],
|
|
8946
8955
|
setup(e) {
|
|
8947
|
-
let t =
|
|
8948
|
-
return (t, n) => (S(), a("div",
|
|
8956
|
+
let t = Vu(), o = n(() => t.mentionNameByUid.value);
|
|
8957
|
+
return (t, n) => (S(), a("div", Wp, [e.message.translatedText ? (S(), r(tp, {
|
|
8949
8958
|
key: 0,
|
|
8950
8959
|
text: e.message.translatedText,
|
|
8951
8960
|
"mention-name-by-uid": o.value,
|
|
@@ -8959,7 +8968,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8959
8968
|
"mention-name-by-uid",
|
|
8960
8969
|
"is-own",
|
|
8961
8970
|
"class"
|
|
8962
|
-
])) : i("", !0), l(
|
|
8971
|
+
])) : i("", !0), l(tp, {
|
|
8963
8972
|
text: e.message.text,
|
|
8964
8973
|
"mention-name-by-uid": o.value,
|
|
8965
8974
|
"is-own": e.message.isOwn,
|
|
@@ -8972,11 +8981,11 @@ var bf = { class: "w-full" }, xf = {
|
|
|
8972
8981
|
"is-own"
|
|
8973
8982
|
])]));
|
|
8974
8983
|
}
|
|
8975
|
-
}),
|
|
8984
|
+
}), Kp = [
|
|
8976
8985
|
"id",
|
|
8977
8986
|
"data-message-id",
|
|
8978
8987
|
"data-message-kind"
|
|
8979
|
-
],
|
|
8988
|
+
], qp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Jp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Yp = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
8980
8989
|
__name: "MessageItem",
|
|
8981
8990
|
props: {
|
|
8982
8991
|
message: {},
|
|
@@ -9029,7 +9038,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9029
9038
|
"data-message-id": t.message.id,
|
|
9030
9039
|
"data-message-kind": t.message.kind,
|
|
9031
9040
|
class: g(["message-item group", d.value])
|
|
9032
|
-
}, [t.message.kind === "action" ? (S(), r(
|
|
9041
|
+
}, [t.message.kind === "action" ? (S(), r(Uf, {
|
|
9033
9042
|
key: 0,
|
|
9034
9043
|
text: t.message.text,
|
|
9035
9044
|
class: g(p.value)
|
|
@@ -9048,16 +9057,16 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9048
9057
|
onContextmenu: _,
|
|
9049
9058
|
onClick: y
|
|
9050
9059
|
}, [
|
|
9051
|
-
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(
|
|
9060
|
+
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(Tp, {
|
|
9052
9061
|
key: 0,
|
|
9053
9062
|
message: t.message
|
|
9054
9063
|
}, null, 8, ["message"])) : i("", !0),
|
|
9055
|
-
t.message.replyTo ? (S(), r(
|
|
9064
|
+
t.message.replyTo ? (S(), r(Up, {
|
|
9056
9065
|
key: 1,
|
|
9057
9066
|
message: t.message,
|
|
9058
9067
|
onOpen: C
|
|
9059
9068
|
}, null, 8, ["message"])) : i("", !0),
|
|
9060
|
-
t.message.kind === "poll" && t.message.poll ? (S(), r(
|
|
9069
|
+
t.message.kind === "poll" && t.message.poll ? (S(), r(Bp, {
|
|
9061
9070
|
key: 2,
|
|
9062
9071
|
message: t.message,
|
|
9063
9072
|
"current-user-id": t.currentUserId,
|
|
@@ -9067,16 +9076,16 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9067
9076
|
"message",
|
|
9068
9077
|
"current-user-id",
|
|
9069
9078
|
"pending-option-key"
|
|
9070
|
-
])) : t.message.attachments?.length ? (S(), r(
|
|
9079
|
+
])) : t.message.attachments?.length ? (S(), r(yp, {
|
|
9071
9080
|
key: 3,
|
|
9072
9081
|
message: t.message,
|
|
9073
9082
|
onOpenMedia: s[1] ||= (e) => u("openMedia", e)
|
|
9074
|
-
}, null, 8, ["message"])) : (S(), r(
|
|
9083
|
+
}, null, 8, ["message"])) : (S(), r(Gp, {
|
|
9075
9084
|
key: 4,
|
|
9076
9085
|
message: t.message,
|
|
9077
9086
|
onAnchorclick: s[2] ||= (e, t) => n.$emit("anchorclick", e, t)
|
|
9078
9087
|
}, null, 8, ["message"])),
|
|
9079
|
-
o("div",
|
|
9088
|
+
o("div", qp, [l(jp, {
|
|
9080
9089
|
message: t.message,
|
|
9081
9090
|
"can-react": t.canReact,
|
|
9082
9091
|
"can-open-thread": t.canOpenThread,
|
|
@@ -9086,7 +9095,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9086
9095
|
"message",
|
|
9087
9096
|
"can-react",
|
|
9088
9097
|
"can-open-thread"
|
|
9089
|
-
]), l(
|
|
9098
|
+
]), l(Sp, { message: t.message }, null, 8, ["message"])])
|
|
9090
9099
|
], 34),
|
|
9091
9100
|
t.contextMenuOpen && t.isTouchUi ? (S(), a("div", {
|
|
9092
9101
|
key: 1,
|
|
@@ -9095,16 +9104,16 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9095
9104
|
class: "message-bubble-wrapper",
|
|
9096
9105
|
style: v({ top: x.value })
|
|
9097
9106
|
}, [o("div", { class: g(["message-bubble", f.value]) }, [
|
|
9098
|
-
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(
|
|
9107
|
+
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(Tp, {
|
|
9099
9108
|
key: 0,
|
|
9100
9109
|
message: t.message
|
|
9101
9110
|
}, null, 8, ["message"])) : i("", !0),
|
|
9102
|
-
t.message.replyTo ? (S(), r(
|
|
9111
|
+
t.message.replyTo ? (S(), r(Up, {
|
|
9103
9112
|
key: 1,
|
|
9104
9113
|
message: t.message,
|
|
9105
9114
|
onOpen: C
|
|
9106
9115
|
}, null, 8, ["message"])) : i("", !0),
|
|
9107
|
-
t.message.kind === "poll" && t.message.poll ? (S(), r(
|
|
9116
|
+
t.message.kind === "poll" && t.message.poll ? (S(), r(Bp, {
|
|
9108
9117
|
key: 2,
|
|
9109
9118
|
message: t.message,
|
|
9110
9119
|
"current-user-id": t.currentUserId,
|
|
@@ -9114,16 +9123,16 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9114
9123
|
"message",
|
|
9115
9124
|
"current-user-id",
|
|
9116
9125
|
"pending-option-key"
|
|
9117
|
-
])) : t.message.attachments?.length ? (S(), r(
|
|
9126
|
+
])) : t.message.attachments?.length ? (S(), r(yp, {
|
|
9118
9127
|
key: 3,
|
|
9119
9128
|
message: t.message,
|
|
9120
9129
|
onOpenMedia: s[6] ||= (e) => u("openMedia", e)
|
|
9121
|
-
}, null, 8, ["message"])) : (S(), r(
|
|
9130
|
+
}, null, 8, ["message"])) : (S(), r(Gp, {
|
|
9122
9131
|
key: 4,
|
|
9123
9132
|
message: t.message,
|
|
9124
9133
|
onAnchorclick: s[7] ||= (e, t) => n.$emit("anchorclick", e, t)
|
|
9125
9134
|
}, null, 8, ["message"])),
|
|
9126
|
-
o("div",
|
|
9135
|
+
o("div", Jp, [l(jp, {
|
|
9127
9136
|
message: t.message,
|
|
9128
9137
|
"can-react": t.canReact,
|
|
9129
9138
|
"can-open-thread": t.canOpenThread,
|
|
@@ -9133,21 +9142,21 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9133
9142
|
"message",
|
|
9134
9143
|
"can-react",
|
|
9135
9144
|
"can-open-thread"
|
|
9136
|
-
]), l(
|
|
9145
|
+
]), l(Sp, { message: t.message }, null, 8, ["message"])])
|
|
9137
9146
|
], 2)], 4)], 2)) : i("", !0)
|
|
9138
|
-
], 64))], 10,
|
|
9147
|
+
], 64))], 10, Kp));
|
|
9139
9148
|
}
|
|
9140
|
-
}), [["__scopeId", "data-v-02761d2e"]]),
|
|
9149
|
+
}), [["__scopeId", "data-v-02761d2e"]]), Xp = [
|
|
9141
9150
|
"👍",
|
|
9142
9151
|
"❤️",
|
|
9143
9152
|
"🔥",
|
|
9144
9153
|
"😂",
|
|
9145
9154
|
"🙏",
|
|
9146
9155
|
"🎉"
|
|
9147
|
-
],
|
|
9156
|
+
], Zp = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), Qp = { 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" }, $p = ["disabled", "onClick"], em = ["disabled"], tm = {
|
|
9148
9157
|
key: 0,
|
|
9149
9158
|
class: "bg-elevation-surface-raised-default shadow-overlay m-0 grid grid-cols-6 gap-1 rounded-lg p-1.5"
|
|
9150
|
-
},
|
|
9159
|
+
}, nm = ["onClick"], rm = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9151
9160
|
__name: "MessageItemMenuReactions",
|
|
9152
9161
|
props: {
|
|
9153
9162
|
message: {},
|
|
@@ -9159,20 +9168,20 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9159
9168
|
F(() => c.message.id, () => {
|
|
9160
9169
|
u.value = !1;
|
|
9161
9170
|
});
|
|
9162
|
-
let d = n(() =>
|
|
9171
|
+
let d = n(() => Zp);
|
|
9163
9172
|
function f(e) {
|
|
9164
9173
|
return (c.message.reactions ?? []).some((t) => t.emoji === e);
|
|
9165
9174
|
}
|
|
9166
9175
|
function p() {
|
|
9167
9176
|
c.canReact && (u.value = !u.value);
|
|
9168
9177
|
}
|
|
9169
|
-
return (n, s) => (S(), a(e, null, [o("div",
|
|
9178
|
+
return (n, s) => (S(), a(e, null, [o("div", Qp, [(S(!0), a(e, null, T(j(Xp), (e) => (S(), a("button", {
|
|
9170
9179
|
key: `${t.message.id}-${e}-common`,
|
|
9171
9180
|
type: "button",
|
|
9172
9181
|
class: g(["message-reaction-button", f(e) ? "bg-background-success-default" : "bg-transparent"]),
|
|
9173
9182
|
disabled: !t.canReact,
|
|
9174
9183
|
onClick: (t) => l("react", e)
|
|
9175
|
-
}, k(e), 11,
|
|
9184
|
+
}, k(e), 11, $p))), 128)), o("button", {
|
|
9176
9185
|
type: "button",
|
|
9177
9186
|
class: "message-reaction-more",
|
|
9178
9187
|
disabled: !t.canReact,
|
|
@@ -9180,14 +9189,14 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9180
9189
|
}, [(S(), r(D(u.value ? j(De) : j(Ee)), {
|
|
9181
9190
|
class: "size-7",
|
|
9182
9191
|
"aria-hidden": "true"
|
|
9183
|
-
}))], 8,
|
|
9192
|
+
}))], 8, em)]), u.value && t.canReact ? (S(), a("div", tm, [(S(!0), a(e, null, T(d.value, (e) => (S(), a("button", {
|
|
9184
9193
|
key: `${t.message.id}-${e}-extended`,
|
|
9185
9194
|
type: "button",
|
|
9186
9195
|
class: g(["message-expanded-reaction-button", f(e) ? "bg-background-success-default" : "bg-transparent"]),
|
|
9187
9196
|
onClick: (t) => l("react", e)
|
|
9188
|
-
}, k(e), 11,
|
|
9197
|
+
}, k(e), 11, nm))), 128))])) : i("", !0)], 64));
|
|
9189
9198
|
}
|
|
9190
|
-
}), [["__scopeId", "data-v-0a11761a"]]),
|
|
9199
|
+
}), [["__scopeId", "data-v-0a11761a"]]), im = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9191
9200
|
__name: "MessageItemMenu",
|
|
9192
9201
|
props: {
|
|
9193
9202
|
message: {},
|
|
@@ -9263,19 +9272,19 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9263
9272
|
top: `${f.value.top}px`
|
|
9264
9273
|
}),
|
|
9265
9274
|
"data-testid": "message-action-popover-shell"
|
|
9266
|
-
}, [l(
|
|
9275
|
+
}, [l(rm, {
|
|
9267
9276
|
message: e.message,
|
|
9268
9277
|
"can-react": e.canReact,
|
|
9269
9278
|
onReact: o[0] ||= (e) => c("react", e)
|
|
9270
9279
|
}, null, 8, ["message", "can-react"]), l(j(ae), { model: e.actionItems }, null, 8, ["model"])], 4)) : i("", !0)]));
|
|
9271
9280
|
}
|
|
9272
|
-
}), [["__scopeId", "data-v-589e4087"]]),
|
|
9281
|
+
}), [["__scopeId", "data-v-589e4087"]]), am = { 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" }, om = {
|
|
9273
9282
|
key: 0,
|
|
9274
9283
|
class: "chat-header__identity flex min-w-0 items-center gap-3"
|
|
9275
|
-
},
|
|
9284
|
+
}, sm = { class: "chat-header__text min-w-0" }, cm = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, lm = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, um = { key: 0 }, dm = { key: 1 }, fm = { class: "chat-header__actions flex items-center gap-2" }, pm = {
|
|
9276
9285
|
key: 0,
|
|
9277
9286
|
class: "chat-header__tags hidden flex-wrap gap-2 md:flex"
|
|
9278
|
-
},
|
|
9287
|
+
}, mm = /* @__PURE__ */ u({
|
|
9279
9288
|
__name: "MessageListHeader",
|
|
9280
9289
|
props: {
|
|
9281
9290
|
conversation: {},
|
|
@@ -9283,28 +9292,28 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9283
9292
|
},
|
|
9284
9293
|
setup(t) {
|
|
9285
9294
|
let { t: n } = K();
|
|
9286
|
-
return (s, c) => (S(), a("header",
|
|
9295
|
+
return (s, c) => (S(), a("header", am, [t.conversation ? (S(), a("div", om, [l(j(R), {
|
|
9287
9296
|
image: t.conversation.avatar,
|
|
9288
9297
|
label: t.conversation.avatar ? void 0 : t.conversation.title.slice(0, 1).toUpperCase(),
|
|
9289
9298
|
shape: "circle",
|
|
9290
9299
|
class: "chat-header__avatar shrink-0"
|
|
9291
|
-
}, null, 8, ["image", "label"]), o("div",
|
|
9300
|
+
}, null, 8, ["image", "label"]), o("div", sm, [o("p", cm, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", lm, [t.parentMessage ? (S(), a("span", um, k(t.parentMessage.senderName), 1)) : (S(), a("span", dm, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", fm, [t.conversation?.tags?.length ? (S(), a("div", pm, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(V), {
|
|
9292
9301
|
key: e,
|
|
9293
9302
|
text: e,
|
|
9294
9303
|
context: "secondary",
|
|
9295
9304
|
rounded: ""
|
|
9296
9305
|
}, null, 8, ["text"]))), 128))])) : i("", !0)])]));
|
|
9297
9306
|
}
|
|
9298
|
-
}),
|
|
9307
|
+
}), hm = {
|
|
9299
9308
|
key: 1,
|
|
9300
9309
|
class: "message-list__empty-state"
|
|
9301
|
-
},
|
|
9310
|
+
}, gm = { class: "space-y-2" }, _m = {
|
|
9302
9311
|
key: 0,
|
|
9303
9312
|
class: "message-list__thread-root"
|
|
9304
|
-
},
|
|
9313
|
+
}, vm = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, ym = { class: "body-md text-default mt-1 line-clamp-2" }, bm = {
|
|
9305
9314
|
key: 1,
|
|
9306
9315
|
class: "surface-default text-subtle rounded-2xl p-5 text-center"
|
|
9307
|
-
},
|
|
9316
|
+
}, xm = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9308
9317
|
__name: "MessageList",
|
|
9309
9318
|
props: {
|
|
9310
9319
|
target: {},
|
|
@@ -9315,13 +9324,13 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9315
9324
|
},
|
|
9316
9325
|
emits: ["anchorclick"],
|
|
9317
9326
|
setup(t) {
|
|
9318
|
-
let s = t, { t: c } = K(), u =
|
|
9327
|
+
let s = t, { t: c } = K(), u = Vu(), d = Gu(), f = od(), p = n(() => s.target === "thread"), m = n(() => p.value ? d.threadMessages.value : s.hideGroupActions ? d.messages.value.filter((e) => e.kind !== "action") : d.messages.value), h = n(() => p.value ? d.loadingThreadMessages.value : d.loadingMessages.value), _ = n(() => p.value ? d.activeThreadParentMessage.value : null), v = n(() => p.value ? !1 : u.canOpenThread.value), y = n(() => s.showHeader ?? !p.value), b = n(() => p.value ? d.hasOlderThreadMessages.value : d.hasOlderMessages.value), x = n(() => p.value ? d.loadingOlderThreadMessages.value : d.loadingOlderMessages.value), C = n(() => p.value ? !0 : d.showDefaultEmptyState.value), D = n(() => {
|
|
9319
9328
|
let e = u.conversation.value;
|
|
9320
9329
|
return e ? _.value ? c("thread") : e.title : "";
|
|
9321
9330
|
}), O = n(() => {
|
|
9322
9331
|
let e = u.conversation.value;
|
|
9323
9332
|
return e ? _.value ? _.value.senderName : e.memberCount ? c("members", { count: e.memberCount }) : c("groupChat") : "";
|
|
9324
|
-
}), A = n(() => u.conversation.value?.memberCount ?? 0), M = w(null), ee = w(null), P = n(() => !!_.value), F = n(() => P.value && !y.value), I = n(() =>
|
|
9333
|
+
}), A = n(() => u.conversation.value?.memberCount ?? 0), M = w(null), ee = w(null), P = n(() => !!_.value), F = n(() => P.value && !y.value), I = n(() => Iu(u.conversation.value)), te = N("threadRef"), { handleThreadScroll: L } = _f({
|
|
9325
9334
|
getConversation: () => u.conversation.value,
|
|
9326
9335
|
getParentMessage: () => _.value,
|
|
9327
9336
|
getMessages: () => m.value,
|
|
@@ -9330,7 +9339,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9330
9339
|
canLoadOlder: () => b.value,
|
|
9331
9340
|
onLoadOlder: () => f.emit("list:loadOlder", { target: s.target }),
|
|
9332
9341
|
threadRef: te
|
|
9333
|
-
}), R = N("actionMenuRef"), { activeActionMessage: z, handleMessageContextMenu: ne, handleMessageTap: B, resetActionMenuState: re, reactToMessage: ie, toggleInlineReaction: ae, getActionItems: oe, isTouchUI: se } =
|
|
9342
|
+
}), R = N("actionMenuRef"), { activeActionMessage: z, handleMessageContextMenu: ne, handleMessageTap: B, resetActionMenuState: re, reactToMessage: ie, toggleInlineReaction: ae, getActionItems: oe, isTouchUI: se } = df({
|
|
9334
9343
|
canUseMessageActions: () => u.canUseMessageActions.value,
|
|
9335
9344
|
canReact: () => u.canReact.value,
|
|
9336
9345
|
canReply: () => u.canReply.value,
|
|
@@ -9397,7 +9406,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9397
9406
|
title: D.value,
|
|
9398
9407
|
subtitle: O.value,
|
|
9399
9408
|
memberCount: A.value
|
|
9400
|
-
}, () => [l(
|
|
9409
|
+
}, () => [l(mm, {
|
|
9401
9410
|
conversation: j(u).conversation.value,
|
|
9402
9411
|
"parent-message": _.value
|
|
9403
9412
|
}, null, 8, ["conversation", "parent-message"])], !0) : i("", !0), j(u).conversation.value ? (S(), a("div", {
|
|
@@ -9408,12 +9417,12 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9408
9417
|
ref: te,
|
|
9409
9418
|
class: g(["message-list__scroll min-h-0 flex-1", F.value ? "p-0" : P.value ? "px-5 py-4" : "px-2 pt-2 pb-3"]),
|
|
9410
9419
|
onScroll: n[2] ||= (...e) => j(L) && j(L)(...e)
|
|
9411
|
-
}, [o("div",
|
|
9412
|
-
_.value ? (S(), a("div",
|
|
9413
|
-
(S(!0), a(e, null, T(m.value, (o, c) => (S(), a(e, { key: o.id }, [de(c) ? (S(), r(
|
|
9420
|
+
}, [o("div", gm, [
|
|
9421
|
+
_.value ? (S(), a("div", _m, [o("p", vm, k(_.value.senderName), 1), o("p", ym, k(j($s)(_.value, j(c)("message"), j(u).mentionNameByUid.value)), 1)])) : i("", !0),
|
|
9422
|
+
(S(!0), a(e, null, T(m.value, (o, c) => (S(), a(e, { key: o.id }, [de(c) ? (S(), r(Bf, {
|
|
9414
9423
|
key: 0,
|
|
9415
9424
|
date: o.sentAt
|
|
9416
|
-
}, null, 8, ["date"])) : i("", !0), l(
|
|
9425
|
+
}, null, 8, ["date"])) : i("", !0), l(Yp, {
|
|
9417
9426
|
message: o,
|
|
9418
9427
|
"current-user-id": j(u).currentUserId.value,
|
|
9419
9428
|
"can-react": j(u).canReact.value,
|
|
@@ -9449,13 +9458,13 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9449
9458
|
"onToggleReaction",
|
|
9450
9459
|
"onOpenThread"
|
|
9451
9460
|
])], 64))), 128)),
|
|
9452
|
-
m.value.length === 0 && C.value && !h.value ? (S(), a("div",
|
|
9453
|
-
])], 34), o("footer", { class: g(["message-list__composer flex shrink-0 flex-col", P.value ? F.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [E(t.$slots, "composer", {}, void 0, !0)], 2)], 2)) : (S(), a("div",
|
|
9454
|
-
l(
|
|
9461
|
+
m.value.length === 0 && C.value && !h.value ? (S(), a("div", bm, k(j(c)("noMessagesYetInThisGroup")), 1)) : i("", !0)
|
|
9462
|
+
])], 34), o("footer", { class: g(["message-list__composer flex shrink-0 flex-col", P.value ? F.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [E(t.$slots, "composer", {}, void 0, !0)], 2)], 2)) : (S(), a("div", hm, k(j(c)("selectConversationToStart")), 1))], 2),
|
|
9463
|
+
l(Lf, {
|
|
9455
9464
|
attachment: M.value,
|
|
9456
9465
|
onClose: U
|
|
9457
9466
|
}, null, 8, ["attachment"]),
|
|
9458
|
-
l(
|
|
9467
|
+
l(im, {
|
|
9459
9468
|
ref_key: "actionMenuRef",
|
|
9460
9469
|
ref: R,
|
|
9461
9470
|
message: j(z),
|
|
@@ -9471,13 +9480,13 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9471
9480
|
])
|
|
9472
9481
|
], 64));
|
|
9473
9482
|
}
|
|
9474
|
-
}), [["__scopeId", "data-v-5df7d69f"]]),
|
|
9483
|
+
}), [["__scopeId", "data-v-5df7d69f"]]), Sm = { class: "receipt-section" }, Cm = { class: "receipt-section__header" }, wm = { class: "heading-sm text-default" }, Tm = { class: "body-sm text-subtlest" }, Em = {
|
|
9475
9484
|
key: 0,
|
|
9476
9485
|
class: "space-y-2"
|
|
9477
|
-
},
|
|
9486
|
+
}, Dm = { class: "flex min-w-0 items-center gap-3" }, Om = { class: "min-w-0" }, km = { class: "heading-sm text-default truncate" }, Am = { class: "body-sm text-subtle truncate" }, jm = { class: "body-sm text-subtle shrink-0" }, Mm = {
|
|
9478
9487
|
key: 1,
|
|
9479
9488
|
class: "receipt-section__empty"
|
|
9480
|
-
},
|
|
9489
|
+
}, Nm = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9481
9490
|
__name: "ReceiptSection",
|
|
9482
9491
|
props: {
|
|
9483
9492
|
title: {},
|
|
@@ -9486,29 +9495,29 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9486
9495
|
formatDateTime: { type: Function }
|
|
9487
9496
|
},
|
|
9488
9497
|
setup(t) {
|
|
9489
|
-
return (n, r) => (S(), a("section",
|
|
9498
|
+
return (n, r) => (S(), a("section", Sm, [o("div", Cm, [o("p", wm, k(t.title), 1), o("span", Tm, k(t.receipts.length), 1)]), t.receipts.length ? (S(), a("div", Em, [(S(!0), a(e, null, T(t.receipts, (e) => (S(), a("div", {
|
|
9490
9499
|
key: `${e.kind}-${e.user.uid}`,
|
|
9491
9500
|
class: "receipt-section__row"
|
|
9492
|
-
}, [o("div",
|
|
9501
|
+
}, [o("div", Dm, [l(j(R), {
|
|
9493
9502
|
image: e.user.avatar,
|
|
9494
9503
|
label: e.user.avatar ? void 0 : e.user.name.slice(0, 1).toUpperCase(),
|
|
9495
9504
|
shape: "circle",
|
|
9496
9505
|
class: "shrink-0"
|
|
9497
|
-
}, null, 8, ["image", "label"]), o("div",
|
|
9506
|
+
}, null, 8, ["image", "label"]), o("div", Om, [o("p", km, k(e.user.name), 1), o("p", Am, k(e.user.uid), 1)])]), o("p", jm, k(t.formatDateTime(e.timestamp)), 1)]))), 128))])) : (S(), a("div", Mm, k(t.emptyLabel), 1))]));
|
|
9498
9507
|
}
|
|
9499
|
-
}), [["__scopeId", "data-v-2b2f0a3e"]]),
|
|
9508
|
+
}), [["__scopeId", "data-v-2b2f0a3e"]]), Pm = {
|
|
9500
9509
|
key: 0,
|
|
9501
9510
|
class: "message-info-dialog-content space-y-5 overflow-y-auto"
|
|
9502
|
-
},
|
|
9511
|
+
}, Fm = { class: "message-info-summary px-4 py-4 sm:px-6 sm:py-5" }, Im = { class: "body-md text-default wrap-break-word whitespace-pre-wrap" }, Lm = { class: "mt-4 grid gap-3 sm:grid-cols-3" }, Rm = { class: "message-info-metric px-3 py-3" }, zm = { class: "body-sm text-subtlest font-semibold uppercase" }, Bm = { class: "heading-sm text-default mt-1" }, Vm = { class: "message-info-metric px-3 py-3" }, Hm = { class: "flex items-center gap-2" }, Um = { class: "body-sm text-subtlest font-semibold uppercase" }, Wm = { class: "heading-sm text-default mt-1" }, Gm = { class: "message-info-metric px-3 py-3" }, Km = { class: "flex items-center gap-2" }, qm = { class: "body-sm text-subtlest font-semibold uppercase" }, Jm = { class: "heading-sm text-default mt-1" }, Ym = {
|
|
9503
9512
|
key: 0,
|
|
9504
9513
|
class: "flex items-center justify-center px-4 py-8 sm:px-6"
|
|
9505
|
-
},
|
|
9514
|
+
}, Xm = {
|
|
9506
9515
|
key: 1,
|
|
9507
9516
|
class: "message-info-error body-md mx-4 rounded-xl px-4 py-3 sm:mx-6"
|
|
9508
|
-
},
|
|
9517
|
+
}, Zm = {
|
|
9509
9518
|
key: 2,
|
|
9510
9519
|
class: "space-y-4 pb-4 sm:pb-5"
|
|
9511
|
-
},
|
|
9520
|
+
}, Qm = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9512
9521
|
__name: "MessageInfoDialog",
|
|
9513
9522
|
props: {
|
|
9514
9523
|
open: { type: Boolean },
|
|
@@ -9519,7 +9528,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9519
9528
|
},
|
|
9520
9529
|
emits: ["close"],
|
|
9521
9530
|
setup(e, { emit: t }) {
|
|
9522
|
-
let s = e, c = t, { locale: u, t: d } = K(), f =
|
|
9531
|
+
let s = e, c = t, { locale: u, t: d } = K(), f = Vu(), p = n(() => s.receipts.filter((e) => e.kind === "delivered")), m = n(() => s.receipts.filter((e) => e.kind === "read")), h = n(() => s.receipts.filter((e) => e.kind === "delivered" || e.kind === "read"));
|
|
9523
9532
|
function g(e) {
|
|
9524
9533
|
return e ? new Intl.DateTimeFormat(u.value, {
|
|
9525
9534
|
dateStyle: "medium",
|
|
@@ -9530,34 +9539,34 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9530
9539
|
function _(e, t) {
|
|
9531
9540
|
return e ? g(e) : d(t > 0 ? "someRecipients" : "notYet");
|
|
9532
9541
|
}
|
|
9533
|
-
return (t, n) => (S(), r(
|
|
9542
|
+
return (t, n) => (S(), r(Cf, {
|
|
9534
9543
|
open: e.open,
|
|
9535
9544
|
title: j(d)("messageInfo"),
|
|
9536
9545
|
subtitle: j(d)("deliveryAndReadDetails"),
|
|
9537
9546
|
"close-label": j(d)("close"),
|
|
9538
9547
|
onClose: n[0] ||= (e) => c("close")
|
|
9539
9548
|
}, {
|
|
9540
|
-
default: I(() => [e.message ? (S(), a("div",
|
|
9541
|
-
o("div",
|
|
9542
|
-
o("div",
|
|
9549
|
+
default: I(() => [e.message ? (S(), a("div", Pm, [o("div", Fm, [o("p", Im, k(j($s)(e.message, j(d)("message"), j(f).mentionNameByUid.value)), 1), o("div", Lm, [
|
|
9550
|
+
o("div", Rm, [o("p", zm, k(j(d)("sent")), 1), o("p", Bm, k(g(e.message.sentAt)), 1)]),
|
|
9551
|
+
o("div", Vm, [o("div", Hm, [o("p", Um, k(j(d)("deliveredToAll")), 1), h.value.length ? (S(), r(j(V), {
|
|
9543
9552
|
key: 0,
|
|
9544
9553
|
text: String(h.value.length),
|
|
9545
9554
|
context: "secondary",
|
|
9546
9555
|
rounded: ""
|
|
9547
|
-
}, null, 8, ["text"])) : i("", !0)]), o("p",
|
|
9548
|
-
o("div",
|
|
9556
|
+
}, null, 8, ["text"])) : i("", !0)]), o("p", Wm, k(_(e.message.receipts.deliveredAt, h.value.length)), 1)]),
|
|
9557
|
+
o("div", Gm, [o("div", Km, [o("p", qm, k(j(d)("readByAll")), 1), m.value.length ? (S(), r(j(V), {
|
|
9549
9558
|
key: 0,
|
|
9550
9559
|
text: String(m.value.length),
|
|
9551
9560
|
context: "success",
|
|
9552
9561
|
rounded: ""
|
|
9553
|
-
}, null, 8, ["text"])) : i("", !0)]), o("p",
|
|
9554
|
-
])]), e.loading ? (S(), a("div",
|
|
9562
|
+
}, null, 8, ["text"])) : i("", !0)]), o("p", Jm, k(_(e.message.receipts.readAt, m.value.length)), 1)])
|
|
9563
|
+
])]), e.loading ? (S(), a("div", Ym, [l(j(se), {
|
|
9555
9564
|
style: {
|
|
9556
9565
|
width: "2.5rem",
|
|
9557
9566
|
height: "2.5rem"
|
|
9558
9567
|
},
|
|
9559
9568
|
"stroke-width": "5"
|
|
9560
|
-
})])) : e.error ? (S(), a("div",
|
|
9569
|
+
})])) : e.error ? (S(), a("div", Xm, k(e.error), 1)) : (S(), a("div", Zm, [l(Nm, {
|
|
9561
9570
|
title: j(d)("readBy"),
|
|
9562
9571
|
receipts: m.value,
|
|
9563
9572
|
"empty-label": j(d)("nobodyHasReadThisMessageYet"),
|
|
@@ -9566,7 +9575,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9566
9575
|
"title",
|
|
9567
9576
|
"receipts",
|
|
9568
9577
|
"empty-label"
|
|
9569
|
-
]), l(
|
|
9578
|
+
]), l(Nm, {
|
|
9570
9579
|
title: j(d)("deliveredNotYetRead"),
|
|
9571
9580
|
receipts: p.value,
|
|
9572
9581
|
"empty-label": j(d)("noRecipientsDeliveredStageYet"),
|
|
@@ -9584,34 +9593,34 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9584
9593
|
"close-label"
|
|
9585
9594
|
]));
|
|
9586
9595
|
}
|
|
9587
|
-
}), [["__scopeId", "data-v-30ce65f1"]]),
|
|
9596
|
+
}), [["__scopeId", "data-v-30ce65f1"]]), $m = { class: "min-h-0 flex-1 overflow-y-auto" }, eh = {
|
|
9588
9597
|
key: 0,
|
|
9589
9598
|
class: "flex h-full min-h-64 items-center justify-center"
|
|
9590
|
-
},
|
|
9599
|
+
}, th = {
|
|
9591
9600
|
key: 1,
|
|
9592
9601
|
class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-64 items-center justify-center rounded-xl px-6 text-center"
|
|
9593
|
-
},
|
|
9602
|
+
}, nh = {
|
|
9594
9603
|
key: 2,
|
|
9595
9604
|
class: "space-y-3"
|
|
9596
|
-
},
|
|
9605
|
+
}, rh = { class: "flex flex-wrap items-start justify-between gap-3" }, ih = { class: "w-full space-y-2" }, ah = { class: "center between gap-2" }, oh = { class: "" }, sh = { class: "space-y-1" }, ch = { class: "heading-sm text-default" }, lh = {
|
|
9597
9606
|
key: 0,
|
|
9598
9607
|
class: "body-md text-default"
|
|
9599
|
-
},
|
|
9608
|
+
}, uh = {
|
|
9600
9609
|
key: 1,
|
|
9601
9610
|
class: "body-md text-default wrap-break-word whitespace-pre-wrap"
|
|
9602
|
-
},
|
|
9611
|
+
}, dh = {
|
|
9603
9612
|
key: 0,
|
|
9604
9613
|
class: "max-w-sm"
|
|
9605
|
-
},
|
|
9614
|
+
}, fh = { class: "flex flex-wrap items-center gap-1" }, ph = {
|
|
9606
9615
|
key: 0,
|
|
9607
9616
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3 sm:flex-row sm:items-center"
|
|
9608
|
-
},
|
|
9617
|
+
}, mh = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, hh = { class: "flex items-center gap-2" }, gh = {
|
|
9609
9618
|
key: 1,
|
|
9610
9619
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3"
|
|
9611
|
-
},
|
|
9620
|
+
}, _h = {
|
|
9612
9621
|
key: 0,
|
|
9613
9622
|
class: "relative max-w-sm"
|
|
9614
|
-
},
|
|
9623
|
+
}, vh = { class: "absolute top-2 right-2" }, yh = ["placeholder"], bh = { class: "flex items-center justify-end gap-2" }, xh = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9615
9624
|
__name: "ScheduledMessagesDialog",
|
|
9616
9625
|
props: {
|
|
9617
9626
|
open: { type: Boolean },
|
|
@@ -9693,24 +9702,24 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9693
9702
|
function B(e) {
|
|
9694
9703
|
d.value === e.id && M(), u("remove", e);
|
|
9695
9704
|
}
|
|
9696
|
-
return (n, s) => (S(), r(
|
|
9705
|
+
return (n, s) => (S(), r(Cf, {
|
|
9697
9706
|
open: t.open,
|
|
9698
9707
|
title: j(v)("scheduledMessages"),
|
|
9699
9708
|
subtitle: t.conversationTitle ? j(v)("queuedForConversation", { title: t.conversationTitle }) : j(v)("queuedOutgoingMessagesForThisChat"),
|
|
9700
9709
|
"close-label": j(v)("close"),
|
|
9701
9710
|
onClose: s[3] ||= (e) => u("close")
|
|
9702
9711
|
}, {
|
|
9703
|
-
default: I(() => [o("div",
|
|
9712
|
+
default: I(() => [o("div", $m, [t.loading ? (S(), a("div", eh, [l(j(se), {
|
|
9704
9713
|
style: {
|
|
9705
9714
|
width: "2.75rem",
|
|
9706
9715
|
height: "2.75rem"
|
|
9707
9716
|
},
|
|
9708
9717
|
"stroke-width": "6"
|
|
9709
|
-
})])) : y.value.length === 0 ? (S(), a("div",
|
|
9718
|
+
})])) : y.value.length === 0 ? (S(), a("div", th, k(j(v)("noScheduledMessagesForConversation")), 1)) : (S(), a("div", nh, [(S(!0), a(e, null, T(y.value, (e) => (S(), a("article", {
|
|
9710
9719
|
key: e.id,
|
|
9711
9720
|
class: "border-default rounded-lg border px-4 py-3"
|
|
9712
|
-
}, [o("div",
|
|
9713
|
-
o("div",
|
|
9721
|
+
}, [o("div", rh, [o("div", ih, [
|
|
9722
|
+
o("div", ah, [o("div", oh, [e.kind === "poll" ? (S(), r(j(V), {
|
|
9714
9723
|
key: 0,
|
|
9715
9724
|
text: j(v)("poll"),
|
|
9716
9725
|
context: "info",
|
|
@@ -9731,9 +9740,9 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9731
9740
|
size: "small",
|
|
9732
9741
|
onClick: (t) => B(e)
|
|
9733
9742
|
}, null, 8, ["icon", "onClick"])]),
|
|
9734
|
-
o("div",
|
|
9735
|
-
L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div",
|
|
9736
|
-
]), o("div",
|
|
9743
|
+
o("div", sh, [o("p", ch, k(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (S(), a("p", lh, k(e.poll.question), 1)) : (S(), a("p", uh, k(j($s)(e, j(v)("attachment"))), 1))]),
|
|
9744
|
+
L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", dh, [l(yp, { message: N(e) }, null, 8, ["message"])])) : i("", !0)
|
|
9745
|
+
]), o("div", fh, [e.kind === "poll" ? i("", !0) : (S(), r(j(z), {
|
|
9737
9746
|
key: 0,
|
|
9738
9747
|
label: j(v)("edit"),
|
|
9739
9748
|
icon: j(ye),
|
|
@@ -9755,7 +9764,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9755
9764
|
"label",
|
|
9756
9765
|
"icon",
|
|
9757
9766
|
"onClick"
|
|
9758
|
-
])) : i("", !0)])]), d.value === e.id && f.value === "reschedule" ? (S(), a("div",
|
|
9767
|
+
])) : i("", !0)])]), d.value === e.id && f.value === "reschedule" ? (S(), a("div", ph, [o("div", mh, [te(o("input", {
|
|
9759
9768
|
"onUpdate:modelValue": s[0] ||= (e) => m.value = e,
|
|
9760
9769
|
type: "date",
|
|
9761
9770
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
@@ -9767,7 +9776,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9767
9776
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
9768
9777
|
"aria-label": "Time (24-hour)",
|
|
9769
9778
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
9770
|
-
}, null, 512), [[ee, h.value]])]), o("div",
|
|
9779
|
+
}, null, 512), [[ee, h.value]])]), o("div", hh, [l(j(z), {
|
|
9771
9780
|
label: j(v)("save"),
|
|
9772
9781
|
size: "small",
|
|
9773
9782
|
disabled: !m.value || !b.value,
|
|
@@ -9781,8 +9790,8 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9781
9790
|
size: "small",
|
|
9782
9791
|
text: "",
|
|
9783
9792
|
onClick: M
|
|
9784
|
-
}, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div",
|
|
9785
|
-
L(e) ? (S(), a("div",
|
|
9793
|
+
}, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div", gh, [
|
|
9794
|
+
L(e) ? (S(), a("div", _h, [l(yp, { message: N(e) }, null, 8, ["message"]), o("div", vh, [l(j(z), {
|
|
9786
9795
|
icon: j(fe),
|
|
9787
9796
|
"aria-label": j(v)("remove"),
|
|
9788
9797
|
text: "",
|
|
@@ -9796,8 +9805,8 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9796
9805
|
rows: "3",
|
|
9797
9806
|
class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none",
|
|
9798
9807
|
placeholder: j(v)("writeMessage")
|
|
9799
|
-
}, null, 8,
|
|
9800
|
-
o("div",
|
|
9808
|
+
}, null, 8, yh), [[ee, g.value]]),
|
|
9809
|
+
o("div", bh, [l(j(z), {
|
|
9801
9810
|
label: j(v)("cancel"),
|
|
9802
9811
|
size: "small",
|
|
9803
9812
|
text: "",
|
|
@@ -9821,7 +9830,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9821
9830
|
"close-label"
|
|
9822
9831
|
]));
|
|
9823
9832
|
}
|
|
9824
|
-
}), [["__scopeId", "data-v-0bb2dc95"]]),
|
|
9833
|
+
}), [["__scopeId", "data-v-0bb2dc95"]]), Sh = { class: "chat-status-overlay" }, Ch = { class: "chat-status-overlay__card" }, wh = /* @__PURE__ */ $(/* @__PURE__ */ u({
|
|
9825
9834
|
__name: "ChatStatusOverlay",
|
|
9826
9835
|
props: {
|
|
9827
9836
|
visible: { type: Boolean },
|
|
@@ -9854,9 +9863,9 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9854
9863
|
message: t.messages.connecting,
|
|
9855
9864
|
slotName: "connecting"
|
|
9856
9865
|
} : null);
|
|
9857
|
-
return (e, t) => r.value ? E(e.$slots, r.value.slotName, { key: 0 }, () => [o("div",
|
|
9866
|
+
return (e, t) => r.value ? E(e.$slots, r.value.slotName, { key: 0 }, () => [o("div", Sh, [o("div", Ch, [E(e.$slots, `${r.value.slotName}-content`, {}, () => [o("span", null, k(r.value.message), 1)], !0)])])], !0) : i("", !0);
|
|
9858
9867
|
}
|
|
9859
|
-
}), [["__scopeId", "data-v-7749aec9"]]),
|
|
9868
|
+
}), [["__scopeId", "data-v-7749aec9"]]), Th = /* @__PURE__ */ u({
|
|
9860
9869
|
__name: "BccChat",
|
|
9861
9870
|
props: {
|
|
9862
9871
|
client: { default: null },
|
|
@@ -9924,14 +9933,14 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9924
9933
|
if (f.conversation !== void 0) return f.conversation;
|
|
9925
9934
|
let e = T.value;
|
|
9926
9935
|
return e ? f.chatUid ? e.conversations.value.find((e) => e.targetId === f.chatUid || e.id === f.chatUid) ?? null : e.activeConversation.value : null;
|
|
9927
|
-
}), { groupMembers: A, fetchGroupMembers: M } =
|
|
9936
|
+
}), { groupMembers: A, fetchGroupMembers: M } = cd({
|
|
9928
9937
|
getConversationTargetId: () => O.value?.targetId,
|
|
9929
|
-
isChannel: () =>
|
|
9930
|
-
hasJoined: () =>
|
|
9938
|
+
isChannel: () => Ou(O.value),
|
|
9939
|
+
hasJoined: () => ku(O.value),
|
|
9931
9940
|
onMembersChanged: (e) => {
|
|
9932
9941
|
p("chatMembersFetched", e), T.value?.rememberMentionDisplayNames(e);
|
|
9933
9942
|
}
|
|
9934
|
-
}), ee =
|
|
9943
|
+
}), ee = Ru({
|
|
9935
9944
|
chatClient: T,
|
|
9936
9945
|
selectedConversation: O,
|
|
9937
9946
|
getPropIsReadOnly: () => f.isReadOnly,
|
|
@@ -9943,8 +9952,8 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9943
9952
|
currentUserId: T.value?.currentUser.value?.uid
|
|
9944
9953
|
})
|
|
9945
9954
|
});
|
|
9946
|
-
|
|
9947
|
-
let P =
|
|
9955
|
+
Bu(ee);
|
|
9956
|
+
let P = Hu({
|
|
9948
9957
|
chatClient: T,
|
|
9949
9958
|
selectedConversation: O,
|
|
9950
9959
|
usesPublicContract: D,
|
|
@@ -9956,16 +9965,16 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9956
9965
|
getPropShowDefaultEmptyState: () => f.showDefaultEmptyState,
|
|
9957
9966
|
getHideDeletedMessages: () => f.hideDeletedMessages
|
|
9958
9967
|
});
|
|
9959
|
-
|
|
9960
|
-
let te = n(() => P.messages.value.length > 0), L = n(() => f.showHeader ?? f.showMessageHeader), R =
|
|
9968
|
+
Wu(P);
|
|
9969
|
+
let te = n(() => P.messages.value.length > 0), L = n(() => f.showHeader ?? f.showMessageHeader), R = Qu({
|
|
9961
9970
|
chatClient: T,
|
|
9962
9971
|
selectedConversation: O,
|
|
9963
9972
|
canScheduleMessages: () => !ee.isReadOnly.value,
|
|
9964
9973
|
getInitialScheduledMessagesOpen: () => !!f.initialScheduledMessagesOpen,
|
|
9965
9974
|
fetchErrorFallback: m("loadMessageReceiptsError")
|
|
9966
9975
|
});
|
|
9967
|
-
|
|
9968
|
-
let z = N("mainComposerRef"), ne = N("threadComposerRef"), B =
|
|
9976
|
+
ed(R);
|
|
9977
|
+
let z = N("mainComposerRef"), ne = N("threadComposerRef"), B = qu({
|
|
9969
9978
|
chatClient: T,
|
|
9970
9979
|
sendOptions: ee.sendOptions,
|
|
9971
9980
|
mentionNameByUid: ee.mentionNameByUid,
|
|
@@ -9973,15 +9982,15 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9973
9982
|
mainComposerRef: z,
|
|
9974
9983
|
threadComposerRef: ne
|
|
9975
9984
|
});
|
|
9976
|
-
|
|
9977
|
-
let re =
|
|
9978
|
-
|
|
9985
|
+
Yu(B);
|
|
9986
|
+
let re = id();
|
|
9987
|
+
ad(re), nd({
|
|
9979
9988
|
conversation: ee,
|
|
9980
9989
|
composer: B,
|
|
9981
9990
|
dialogs: R,
|
|
9982
9991
|
bus: re
|
|
9983
9992
|
});
|
|
9984
|
-
let { scrollToRequestedMessage: ie } =
|
|
9993
|
+
let { scrollToRequestedMessage: ie } = ld({
|
|
9985
9994
|
chatRootRef: h,
|
|
9986
9995
|
getClient: () => T.value
|
|
9987
9996
|
});
|
|
@@ -9992,22 +10001,22 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9992
10001
|
}, { immediate: !0 }), F(() => O.value?.id, () => {
|
|
9993
10002
|
B.resetMainComposer(), B.resetThreadComposer(), R.showScheduledMessages.value = !1, R.closeMessageInfo();
|
|
9994
10003
|
}), F(() => f.chatMessageGetter, (e) => {
|
|
9995
|
-
|
|
10004
|
+
Eu.setGetChatMessagesCallback(e);
|
|
9996
10005
|
}, { immediate: !0 }), F(() => f.language, (e) => {
|
|
9997
10006
|
e && _t(e);
|
|
9998
10007
|
}, { immediate: !0 }), F(P.isChatEmpty, (e) => {
|
|
9999
10008
|
e && p("chatEmpty");
|
|
10000
10009
|
}), F([
|
|
10001
10010
|
() => f.chatUid,
|
|
10002
|
-
() => f.client ? f.client.initialized.value :
|
|
10003
|
-
() => f.client ? f.client.loggedIn.value :
|
|
10011
|
+
() => f.client ? f.client.initialized.value : Eu.initialized.value,
|
|
10012
|
+
() => f.client ? f.client.loggedIn.value : Eu.loggedIn.value,
|
|
10004
10013
|
() => T.value?.conversations.value.length ?? 0
|
|
10005
10014
|
], async ([e, t, n]) => {
|
|
10006
10015
|
!D.value || !e || !t || !n || !T.value || await ae();
|
|
10007
10016
|
}, { immediate: !0 }), F([
|
|
10008
10017
|
() => P.messages.value.length,
|
|
10009
10018
|
() => P.threadMessages.value.length,
|
|
10010
|
-
() =>
|
|
10019
|
+
() => Eu.scrollToMessageId.value
|
|
10011
10020
|
], async () => {
|
|
10012
10021
|
await ie();
|
|
10013
10022
|
});
|
|
@@ -10039,7 +10048,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10039
10048
|
}
|
|
10040
10049
|
}
|
|
10041
10050
|
async function se(e, t) {
|
|
10042
|
-
let n = await
|
|
10051
|
+
let n = await Eu.getGroup(e, !0);
|
|
10043
10052
|
if (!n || typeof n != "object") return null;
|
|
10044
10053
|
let r = String(n.getGuid());
|
|
10045
10054
|
if (!r) return null;
|
|
@@ -10092,7 +10101,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10092
10101
|
_: 1
|
|
10093
10102
|
})]) : i("", !0),
|
|
10094
10103
|
T.value ? (S(), a(e, { key: 1 }, [
|
|
10095
|
-
l(
|
|
10104
|
+
l(xm, {
|
|
10096
10105
|
target: "main",
|
|
10097
10106
|
class: g(["h-full", t.containerClass]),
|
|
10098
10107
|
"hide-group-actions": t.hideGroupActions,
|
|
@@ -10101,7 +10110,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10101
10110
|
"action-message-row-class": t.actionMessageRowClass,
|
|
10102
10111
|
onAnchorclick: V
|
|
10103
10112
|
}, s({
|
|
10104
|
-
composer: I(() => [l(
|
|
10113
|
+
composer: I(() => [l(lf, {
|
|
10105
10114
|
ref_key: "mainComposerRef",
|
|
10106
10115
|
ref: z,
|
|
10107
10116
|
target: "main"
|
|
@@ -10118,7 +10127,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10118
10127
|
"action-message-class",
|
|
10119
10128
|
"action-message-row-class"
|
|
10120
10129
|
]),
|
|
10121
|
-
l(
|
|
10130
|
+
l(Cf, {
|
|
10122
10131
|
open: !!j(P).activeThreadParentMessage.value,
|
|
10123
10132
|
title: j(m)("threadWithCount", { count: j(P).activeThreadParentMessage.value?.replyCount ?? 0 }),
|
|
10124
10133
|
subtitle: O.value?.title ?? "",
|
|
@@ -10126,13 +10135,13 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10126
10135
|
"close-aria-label": j(m)("closeThread"),
|
|
10127
10136
|
onClose: r[0] ||= (e) => j(re).emit("ui:closeThread")
|
|
10128
10137
|
}, {
|
|
10129
|
-
default: I(() => [l(
|
|
10138
|
+
default: I(() => [l(xm, {
|
|
10130
10139
|
target: "thread",
|
|
10131
10140
|
class: "min-h-0 flex-1",
|
|
10132
10141
|
"action-message-class": t.actionMessageClass,
|
|
10133
10142
|
"action-message-row-class": t.actionMessageRowClass
|
|
10134
10143
|
}, {
|
|
10135
|
-
composer: I(() => [l(
|
|
10144
|
+
composer: I(() => [l(lf, {
|
|
10136
10145
|
ref_key: "threadComposerRef",
|
|
10137
10146
|
ref: ne,
|
|
10138
10147
|
target: "thread"
|
|
@@ -10147,7 +10156,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10147
10156
|
"close-label",
|
|
10148
10157
|
"close-aria-label"
|
|
10149
10158
|
]),
|
|
10150
|
-
l(
|
|
10159
|
+
l(xh, {
|
|
10151
10160
|
open: j(R).showScheduledMessages.value,
|
|
10152
10161
|
loading: j(R).loadingScheduledMessages.value,
|
|
10153
10162
|
messages: j(R).scheduledMessages.value,
|
|
@@ -10162,7 +10171,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10162
10171
|
"messages",
|
|
10163
10172
|
"conversation-title"
|
|
10164
10173
|
]),
|
|
10165
|
-
l(
|
|
10174
|
+
l(Qm, {
|
|
10166
10175
|
open: !!j(R).infoMessage.value,
|
|
10167
10176
|
message: j(R).infoMessage.value,
|
|
10168
10177
|
receipts: j(R).infoMessageReceipts.value,
|
|
@@ -10177,7 +10186,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10177
10186
|
"error"
|
|
10178
10187
|
])
|
|
10179
10188
|
], 64)) : i("", !0),
|
|
10180
|
-
l(
|
|
10189
|
+
l(wh, {
|
|
10181
10190
|
visible: D.value && (T.value?.offlineMode.value || !T.value?.connected.value || x.value && !te.value || v.value || C.value || t.displayNoMessagesText && j(P).isChatEmpty.value),
|
|
10182
10191
|
"offline-mode": !!(T.value?.offlineMode.value && !O.value),
|
|
10183
10192
|
connected: !!(T.value?.connected.value || O.value),
|
|
@@ -10217,6 +10226,6 @@ var bf = { class: "w-full" }, xf = {
|
|
|
10217
10226
|
}
|
|
10218
10227
|
});
|
|
10219
10228
|
//#endregion
|
|
10220
|
-
export {
|
|
10229
|
+
export { Th as BccChat, Th as BccChatMessageList, Rl as LogSeverity, Eu as chat, Eu as default, _c as createChatClient };
|
|
10221
10230
|
|
|
10222
10231
|
//# sourceMappingURL=vue-bcc-chat-ui.js.map
|