@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.
@@ -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, Rc(n));
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, Rc(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, Rc(n)), t.setCaption(r)), t.setId(Number(e.id));
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 = Hc(e.file);
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: Zc(e.file) || void 0,
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, Rc(n));
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 Vc(n, e, t) : await Bc(n, e, t), await Ge(n.targetId);
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 = zc(), n = await fetch(`${G().chatApiBaseUrl}/chats/rescheduleMessage`, {
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: Kc(_.value, e.metadata),
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 = Hc(t.file), o = Ft({
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: Zc(t.file) || void 0,
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: Zc(t.file),
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 = tl(e), o = dl(e), s = i ? [] : il(e, a), c = i ? void 0 : ll(e), l = _l(e), u = e.getQuotedMessage?.() ?? e.getReplyMessage?.() ?? e.getParentMessage?.();
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: qc(n, l),
5485
- senderAvatar: Jc(e, n),
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: pl(l ?? {}, u),
5499
- parentMessageId: fl(e),
5500
- replyCount: ml(e),
5501
- reactions: gl(e),
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 = ll(e);
5546
- if (String(r).toLowerCase() === "action") return Qc(e);
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" && nl(n)) {
5553
- let t = il(e, tl(e))[0];
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 = ll(e);
5561
- if (String(r).toLowerCase() === "action") return Qc(e);
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" && nl(n)) {
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 = il(e, tl(e))[0];
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 zc() {
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 Bc(e, t, n) {
5634
+ async function Vc(e, t, n) {
5626
5635
  let r = t.text?.trim();
5627
5636
  if (!r) return;
5628
- let i = zc(), a = await fetch(`${G().chatApiBaseUrl}/chats/scheduledMessages`, {
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 Vc(e, t, n) {
5655
+ async function Hc(e, t, n) {
5647
5656
  if (!t.file) return;
5648
- let r = zc(), i = Ye()?.token;
5657
+ let r = Bc(), i = Ye()?.token;
5649
5658
  if (!i) throw Error("Missing CometChat auth token.");
5650
- let a = Uc(t.file), o = t.caption?.trim() ?? "", s = Wc(e, t.file, a, o, t.scheduleDate, n), c = await fetch(`${G().chatApiBaseUrl}/chats/scheduledMediaMessages`, {
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 Hc(e) {
5662
- let t = Zc(e);
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 Uc(e) {
5666
- let t = Hc(e);
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 Wc(e, t, n, r, i, a) {
5671
- let o = new H.MediaMessage(e.targetId, t, n, Rc(e));
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]), Gc(o);
5685
+ }), o.setTags([e.targetId]), Kc(o);
5677
5686
  }
5678
- function Gc(e) {
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 Kc(e, t) {
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 qc(e, t) {
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
- let n = hl(e)?.entities?.[t]?.entity;
5708
- return $e(Xc(n));
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 Xc(e) {
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
- let t = String(e.getType?.() ?? "").toLowerCase(), n = hl(e), r = String(n?.action ?? "").toLowerCase();
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 = $c(n, "on");
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 $c(e, t) {
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 el(e) {
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 tl(e) {
5769
+ function nl(e) {
5761
5770
  let t = String(e.getType?.() ?? "text").toLowerCase(), n = String(e.getCategory?.() ?? "message").toLowerCase();
5762
- return ll(e) || t === "poll" ? "poll" : n === "action" ? "action" : t === "image" || t === "video" || t === "audio" || t === "file" ? t : t === "text" ? "text" : nl(t) ? rl(e) : "unsupported";
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 nl(e) {
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 rl(e) {
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 il(e, t) {
5778
- let n = e.getAttachment?.(), r = hl(e), i = r?.attachments?.[0] ?? null;
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 : rl(e), o = al(e, n, i);
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 al(e, t, n) {
5793
- let r = sl({
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 = ol(e);
5816
+ let t = sl(e);
5808
5817
  if (t) return t;
5809
5818
  }
5810
5819
  }
5811
- function ol(e) {
5820
+ function sl(e) {
5812
5821
  if (!e || typeof e != "object") return;
5813
- let t = sl(e);
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 = sl(e[t]);
5833
+ let n = cl(e[t]);
5825
5834
  if (n) return n;
5826
5835
  }
5827
5836
  }
5828
- function sl(e) {
5837
+ function cl(e) {
5829
5838
  if (!e || typeof e != "object") return;
5830
- let t = cl(e.width ?? e.w ?? e.imageWidth ?? e.videoWidth ?? e.naturalWidth), n = cl(e.height ?? e.h ?? e.imageHeight ?? e.videoHeight ?? e.naturalHeight);
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 cl(e) {
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 ll(e) {
5844
- let t = String(e.getType?.() ?? "").toLowerCase(), n = e.getCustomData?.() ?? e.getData?.()?.customData, r = ul(e);
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 ul(e) {
5880
- let t = _l(e), n = t?.["@injected"];
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 dl(e) {
5895
- let t = _l(e), n = t?.scheduleDate, r = t?.originalChatUid, i = e.getMuid?.(), a = Number(e.getId?.() ?? 0) || void 0;
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 fl(e) {
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 pl(e, t) {
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: tl(t)
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 ml(e) {
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 hl(e) {
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 gl(e) {
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 _l(e) {
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 vl(e, t) {
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 yl(e, t = 25, n) {
5969
+ function bl(e, t = 25, n) {
5961
5970
  let r = e.trim();
5962
5971
  if (!r || !n) return;
5963
- let i = kl();
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: Nl(e.title, o)
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: Nl(e.text, o)
5985
+ matches: Pl(e.text, o)
5977
5986
  })).filter((e) => e.matches.length > 0).slice(0, t)
5978
5987
  };
5979
5988
  }
5980
- async function bl(e) {
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 xl(e) {
5999
- await jl("failed to get muted setting. User not logged in");
6000
- let t = await Ml(`${G().chatApiBaseUrl}/chats/${e}/settings/${(await H.getLoggedinUser())?.getUid?.()}`, { method: "GET" });
6001
- return Ol()?.storeParticipantSettings({
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 Sl(e, t) {
6008
- await jl("failed to mute chat. User not logged in");
6009
- let n = await Ml(`${G().chatApiBaseUrl}/chats/${e}/settings/${(await H.getLoggedinUser())?.getUid?.()}`, {
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 Ol()?.storeParticipantSettings({
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 Cl() {
6020
- return await jl("failed to get muted all setting. User not logged in"), Ml(`${G().chatApiBaseUrl}/person/settings`, { method: "GET" });
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 wl(e) {
6023
- return await jl("failed to update person settings. User not logged in"), Ml(`${G().chatApiBaseUrl}/person/settings`, {
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 Tl(e) {
6029
- return (await wl({ mutedAll: e })).mutedAll;
6037
+ async function El(e) {
6038
+ return (await Tl({ mutedAll: e })).mutedAll;
6030
6039
  }
6031
- async function El() {
6032
- let { mutedAll: e } = await Cl();
6033
- return Tl(!e);
6040
+ async function Dl() {
6041
+ let { mutedAll: e } = await wl();
6042
+ return El(!e);
6034
6043
  }
6035
- function Dl(e, t, n) {
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 Ol() {
6043
- if (!Al()) return null;
6044
- let e = kl();
6051
+ function kl() {
6052
+ if (!jl()) return null;
6053
+ let e = Al();
6045
6054
  return e ? new cc(e) : null;
6046
6055
  }
6047
- function kl() {
6056
+ function Al() {
6048
6057
  let e = lt();
6049
6058
  return e ? `bcc-chat:${G().appId}:${e}` : null;
6050
6059
  }
6051
- function Al() {
6060
+ function jl() {
6052
6061
  return H.__bccCompatLoggedInUser ?? null;
6053
6062
  }
6054
- async function jl(e) {
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 Ml(e, t) {
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 Nl(e, t) {
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 Pl(e) {
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 Fl = w(Pl("light"));
6100
- function Il(e) {
6101
- Fl.value.palette.setMode(e);
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 Ll = /* @__PURE__ */ function(e) {
6114
+ var Rl = /* @__PURE__ */ function(e) {
6106
6115
  return e.DEBUG = "Debug", e.INFO = "Info", e.WARN = "Warn", e.ERROR = "Error", e;
6107
- }({}), Rl = w(!1), zl = w(null), Bl = w("light"), Vl = w(void 0), Hl = w(void 0), Ul = w(void 0), Wl = /* @__PURE__ */ new Set(), Gl = w({}), Kl = /* @__PURE__ */ new Set(), ql;
6108
- function Jl(e, t, n) {
6109
- Ul.value?.({
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
- if (Q.value && !e && !zl.value) return Q.value;
6122
- let t = e ?? zl.value;
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 || zl.value !== t) && (zl.value = t, He(t), Q.value = _c({ environment: t })), 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 Zl = n(() => Q.value?.currentUser.value?.uid);
6127
- function Ql(e) {
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 $l(e) {
6136
- if (!Kl.has(e)) {
6137
- Kl.add(e);
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
- Gl.value = {
6141
- ...Gl.value,
6142
- [e]: Ql(t)
6149
+ Kl.value = {
6150
+ ...Kl.value,
6151
+ [e]: $l(t)
6143
6152
  };
6144
6153
  } catch {
6145
- Gl.value = {
6146
- ...Gl.value,
6154
+ Kl.value = {
6155
+ ...Kl.value,
6147
6156
  [e]: []
6148
6157
  };
6149
6158
  } finally {
6150
- Kl.delete(e);
6159
+ ql.delete(e);
6151
6160
  }
6152
6161
  }
6153
6162
  }
6154
- async function eu(e, t) {
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 && Gl.value[a] === void 0 && !Kl.has(a) && await $l(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 ? Gl.value[a] : void 0
6175
+ messageReceipts: o ? Kl.value[a] : void 0
6167
6176
  };
6168
6177
  }
6169
- var tu = n(() => Q.value?.connected.value ?? !1), nu = n(() => Rl.value && !tu.value), ru = n(() => Q.value?.loggedIn.value ?? !1), iu = {
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
- }, au = w([]), ou = "";
6178
- F([() => Q.value?.conversations.value, () => Zl.value], async () => {
6186
+ }, ou = w([]), su = "";
6187
+ F([() => Q.value?.conversations.value, () => Ql.value], async () => {
6179
6188
  let e = crypto.randomUUID();
6180
- ou = e;
6181
- let t = Zl.value;
6182
- if (await new Promise((e) => setTimeout(e, 100)), ou !== e) return;
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 eu(e, t),
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
- ou === e && (au.value = n);
6194
- }), F(() => Zl.value, () => {
6195
- Gl.value = {}, Kl.clear();
6202
+ su === e && (ou.value = n);
6203
+ }), F(() => Ql.value, () => {
6204
+ Kl.value = {}, ql.clear();
6196
6205
  });
6197
- async function su(e, t) {
6198
- Ul.value = t.loggerCallback, _t(t.language ?? "en"), Yl(t.themeMode);
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", wh), e.provide("theme", { theme: Fl });
6201
- let r = Xl(t.environment);
6202
- Jl(Ll.INFO, "Initializing chat", {
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(), Rl.value = !0, ql?.(), p(t.accessToken) ? ql = F(t.accessToken, async (e) => {
6207
- e ? await cu(e) : await lu();
6208
- }, { immediate: !0 }) : t.accessToken && await cu(t.accessToken), Jl(Ll.INFO, "Chat initialized", { environment: G().appId });
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 cu(e) {
6211
- if (!e) return lu();
6212
- let t = Xl();
6213
- Jl(Ll.INFO, "Signing in to chat"), await t.login(e);
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 lu() {
6216
- Q.value && (Jl(Ll.INFO, "Signing out from chat"), await Q.value.logout());
6224
+ async function uu() {
6225
+ Q.value && (Yl(Rl.INFO, "Signing out from chat"), await Q.value.logout());
6217
6226
  }
6218
- async function uu(e) {
6227
+ async function du(e) {
6219
6228
  let t = e ?? "default";
6220
- Wl.add(t);
6221
- let n = Xl();
6222
- await n.init(), await n.connectRealtime(), await yu();
6229
+ Gl.add(t);
6230
+ let n = Zl();
6231
+ await n.init(), await n.connectRealtime(), await bu();
6223
6232
  }
6224
- async function du(e) {
6233
+ async function fu(e) {
6225
6234
  if (!Q.value) return;
6226
6235
  let t = e ?? "default";
6227
- Wl.delete(t), !(Wl.size > 0) && (await Q.value.disconnectRealtime(), Q.value.closeThread());
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(e) {
6233
- Vl.value = e;
6238
+ async function pu() {
6239
+ Gl.clear(), Q.value && (await Q.value.disconnectRealtime(), Q.value.closeThread());
6234
6240
  }
6235
6241
  function mu(e) {
6236
- _t(e);
6242
+ Hl.value = e;
6237
6243
  }
6238
6244
  function hu(e) {
6239
- Yl(e);
6245
+ _t(e);
6240
6246
  }
6241
6247
  function gu(e) {
6242
- return e ? cu(e) : lu();
6248
+ Xl(e);
6243
6249
  }
6244
6250
  function _u(e) {
6245
- Xl(e);
6251
+ return e ? lu(e) : uu();
6252
+ }
6253
+ function vu(e) {
6254
+ Zl(e);
6246
6255
  }
6247
- async function vu(e, t = !1) {
6248
- if (!ru.value) return null;
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 yu() {
6258
- return Q.value ? (await Q.value.fetchConversations(), au.value) : [];
6266
+ async function bu() {
6267
+ return Q.value ? (await Q.value.fetchConversations(), ou.value) : [];
6259
6268
  }
6260
- async function bu(e) {
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 xu(e) {
6274
+ async function Su(e) {
6266
6275
  try {
6267
- return ru.value && (await H.getOnlineGroupMemberCount([e]))[e] || 0;
6276
+ return iu.value && (await H.getOnlineGroupMemberCount([e]))[e] || 0;
6268
6277
  } catch {
6269
6278
  return 0;
6270
6279
  }
6271
6280
  }
6272
- async function Su(e, t) {
6273
- let n = await Sl(e, t);
6274
- return Q.value && (Q.value.conversations.value = Dl(Q.value.conversations.value, e, n)), n;
6275
- }
6276
- async function Cu(e) {
6277
- let t = await xl(e);
6278
- return Q.value && (Q.value.conversations.value = Dl(Q.value.conversations.value, e, t)), t;
6279
- }
6280
- function wu(e) {
6281
- Hl.value = e;
6282
- }
6283
- var Tu = {
6284
- install: su,
6285
- setGetChatMessagesCallback: pu,
6286
- initialized: Rl,
6287
- connected: tu,
6288
- connecting: nu,
6289
- loggedIn: ru,
6290
- userChats: au,
6291
- userUid: Zl,
6292
- connect: uu,
6293
- disconnect: du,
6294
- disconnectAll: fu,
6295
- setAccessToken: gu,
6296
- login: cu,
6297
- logout: lu,
6298
- setCurrentEnvironment: _u,
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: hu,
6301
- setLanguage: mu,
6302
- getGroup: vu,
6303
- getChatMembersInfo: bl,
6304
- getUserChats: yu,
6305
- clearChatCount: bu,
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: xu,
6308
- searchChat: (e, t = 25) => yl(e, t, Q.value?.currentUser.value?.uid),
6309
- getSenderDisplayName: vl,
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: Cu,
6313
- muteChat: Su,
6314
- getMyChatSettings: Cl,
6315
- updateMyChatSettings: wl,
6316
- setMuteAll: Tl,
6317
- toggleMuteAll: El,
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: Vl,
6321
- scrollToMessageId: Hl,
6322
- scrollToMessage: wu,
6323
- connectivity: iu,
6324
- onlineMode: iu.onlineMode,
6325
- onlineStatus: iu.onlineStatus,
6326
- theme: Fl,
6327
- themeMode: Bl,
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 !!Eu(e)?.getMetadata?.()?.isChannel;
6342
+ return e?.source?.getConversationWith?.();
6337
6343
  }
6338
6344
  function Ou(e) {
6339
- return Eu(e)?.getHasJoined?.() ?? !1;
6345
+ return !!Du(e)?.getMetadata?.()?.isChannel;
6340
6346
  }
6341
6347
  function ku(e) {
6342
- let t = Eu(e)?.getScope?.();
6343
- return typeof t == "string" ? t : void 0;
6348
+ return Du(e)?.getHasJoined?.() ?? !1;
6344
6349
  }
6345
6350
  function Au(e) {
6346
- return Du(e) && (!Ou(e) || ku(e) === "participant");
6351
+ let t = Du(e)?.getScope?.();
6352
+ return typeof t == "string" ? t : void 0;
6347
6353
  }
6348
6354
  function ju(e) {
6349
- return Du(e) ? Ou(e) : !0;
6355
+ return Ou(e) && (!ku(e) || Au(e) === "participant");
6350
6356
  }
6351
6357
  function Mu(e) {
6352
- return Du(e) ? Ou(e) : !0;
6358
+ return Ou(e) ? ku(e) : !0;
6353
6359
  }
6354
6360
  function Nu(e) {
6355
- return Du(e) ? Ou(e) && ku(e) !== "participant" : !0;
6361
+ return Ou(e) ? ku(e) : !0;
6356
6362
  }
6357
6363
  function Pu(e) {
6358
- return !Du(e);
6364
+ return Ou(e) ? ku(e) && Au(e) !== "participant" : !0;
6359
6365
  }
6360
6366
  function Fu(e) {
6361
- return e?.type === "user" ? !0 : Du(e) ? !1 : Ou(e);
6367
+ return !Ou(e);
6368
+ }
6369
+ function Iu(e) {
6370
+ return e?.type === "user" ? !0 : Ou(e) ? !1 : ku(e);
6362
6371
  }
6363
- function Iu(e, t) {
6372
+ function Lu(e, t) {
6364
6373
  let n = t?.trim();
6365
- if (!(!n || ku(e) !== "moderator")) return { senderDisplayName: 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 Lu(e) {
6370
- let { chatClient: t, selectedConversation: r } = e, i = n(() => t.value?.currentUser.value?.uid), a = n(() => ju(r.value)), o = n(() => Mu(r.value)), s = n(() => Nu(r.value)), c = n(() => Pu(r.value)), l = 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 ? Au(r.value) : t;
6373
- }), u = n(() => Du(r.value)), d = n(() => e.getPropSendOptions() ?? Iu(r.value, e.getSenderDisplayName())), f = 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 Ru = Symbol("conversationCtx");
6397
- function zu(e) {
6398
- C(Ru, e);
6405
+ var zu = Symbol("conversationCtx");
6406
+ function Bu(e) {
6407
+ C(zu, e);
6399
6408
  }
6400
- function Bu() {
6401
- let e = f(Ru);
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 Vu(e) {
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 Hu = Symbol("messagesCtx");
6439
- function Uu(e) {
6440
- C(Hu, e);
6447
+ var Uu = Symbol("messagesCtx");
6448
+ function Wu(e) {
6449
+ C(Uu, e);
6441
6450
  }
6442
- function Wu() {
6443
- let e = f(Hu);
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 Gu(e) {
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 Ku(e) {
6538
- let { chatClient: t } = e, r = Gu({
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 qu = Symbol("composerCtx");
6574
- function Ju(e) {
6575
- C(qu, e);
6582
+ var Ju = Symbol("composerCtx");
6583
+ function Yu(e) {
6584
+ C(Ju, e);
6576
6585
  }
6577
- function Yu() {
6578
- let e = f(qu);
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 Xu(e) {
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 Zu(e) {
6614
- let { chatClient: t, selectedConversation: r } = e, i = Xu({
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 Qu = Symbol("dialogsCtx");
6644
- function $u(e) {
6645
- C(Qu, e);
6652
+ var $u = Symbol("dialogsCtx");
6653
+ function ed(e) {
6654
+ C($u, e);
6646
6655
  }
6647
- function ed() {
6648
- let e = f(Qu);
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 td({ conversation: e, composer: t, dialogs: n, bus: r }) {
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
- Tu.scrollToMessage(e);
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 nd = Symbol("chatBus");
6741
- function rd() {
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 id(e) {
6758
- C(nd, e);
6766
+ function ad(e) {
6767
+ C(rd, e);
6759
6768
  }
6760
- function ad() {
6761
- let e = f(nd);
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 od(e, t, n) {
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 sd(e) {
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 cd(e) {
6844
+ function ld(e) {
6836
6845
  async function t(n, r) {
6837
- let i = n ?? Tu.scrollToMessageId.value;
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
- Tu.scrollToMessageId.value === i && (Tu.scrollToMessageId.value = void 0);
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
- }), Tu.scrollToMessageId.value === i && (Tu.scrollToMessageId.value = void 0);
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 ld = new Set([
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
- ]), ud = {
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 dd(e) {
6892
+ function fd(e) {
6884
6893
  let t = e.name.trim(), n = t.toLowerCase();
6885
- return ld.has(n) ? `pasted-image.${ud[e.type] ?? "png"}` : t;
6894
+ return ud.has(n) ? `pasted-image.${dd[e.type] ?? "png"}` : t;
6886
6895
  }
6887
- function fd(e) {
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 = dd(t);
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 pd(e) {
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 md(e) {
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 = hd(n, i.triggerChar);
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 hd(e, t) {
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 = _d(e, o, a.length) ?? gd(r, t);
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 gd(e, t) {
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 _d(e, t, n) {
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 vd(e, t) {
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 yd(e, t, r, i) {
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(pd({
7072
+ return i.getMentionCandidates && e.unshift(md({
7064
7073
  enabled: () => i.mentionsEnabled?.() ?? !0,
7065
7074
  getMentionCandidates: () => i.getMentionCandidates?.() ?? [],
7066
7075
  insertMention: (e, t) => {
7067
- vd(t, e), E(), D();
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 } = md({
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 bd = ["data-testid", "onClick"], xd = { class: "composer-actions-menu__icon" }, Sd = { class: "composer-actions-menu__icon" }, Cd = /* @__PURE__ */ u({
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", xd, [(S(), r(D(e.icon), { class: "size-5" }))]), o("span", null, k(j(u)(e.label)), 1)], 8, bd)), 64)), o("button", {
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", Sd, [(S(), r(D(j(le)), { class: "size-5" }))]), o("span", null, k(j(u)("createPoll")), 1)])], 512)), [[P, c.value]]);
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
- }, wd = /* @__PURE__ */ $(Cd, [["__scopeId", "data-v-5e8b1d79"]]), Td = { class: "border-default flex items-start justify-between gap-2 border-t-1 px-3 py-2" }, Ed = { class: "min-w-0" }, Dd = { class: "body-md text-default mt-0.5 overflow-hidden font-medium text-ellipsis whitespace-nowrap" }, Od = { class: "body-md text-subtle overflow-hidden text-ellipsis whitespace-nowrap" }, kd = /* @__PURE__ */ u({
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 = Bu(), u = n(() => $s(r.message, s("message"), c.mentionNameByUid.value));
7295
- return (t, n) => (S(), a("div", Td, [o("div", Ed, [
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", Dd, k(e.message.senderName), 1),
7298
- o("p", Od, k(u.value), 1)
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
- }), Ad = /* @__PURE__ */ $(/* @__PURE__ */ u({
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"]]), jd = { class: "space-y-6" }, Md = { class: "space-y-2" }, Nd = { class: "heading-sm text-subtle block font-medium!" }, Pd = { class: "space-y-2" }, Fd = { class: "heading-sm text-subtle block font-medium!" }, Id = /* @__PURE__ */ u({
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", jd, [o("div", Md, [o("label", Nd, k(j(d)("question")), 1), l(j(ie), {
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", Pd, [
7402
- o("label", Fd, k(j(d)("options")), 1),
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
- }), Ld = { class: "w-full space-y-6" }, Rd = { class: "w-full space-y-2" }, zd = { class: "heading-sm text-subtle block font-medium!" }, Bd = { class: "center left w-full gap-2" }, Vd = { class: "body-md bg-elevation-surface-sunken-default rounded-lg px-4 py-3" }, Hd = /* @__PURE__ */ u({
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", Ld, [o("div", Rd, [o("label", zd, k(j(c)("sendAt")), 1), o("div", Bd, [l(j(re), {
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", Vd, k(e.contentPreview), 1)])]),
7518
+ }, null, 8, ["modelValue"])])]), o("div", Hd, k(e.contentPreview), 1)])]),
7510
7519
  _: 1
7511
7520
  }, 8, ["visible", "header"]));
7512
7521
  }
7513
- }), Ud = [
7522
+ }), Wd = [
7514
7523
  "aria-selected",
7515
7524
  "onMouseover",
7516
7525
  "onMousedown"
7517
- ], Wd = {
7526
+ ], Gd = {
7518
7527
  key: 1,
7519
7528
  class: "trigger-menu__avatar-fallback",
7520
7529
  "aria-hidden": "true"
7521
- }, Gd = { class: "min-w-0" }, Kd = { class: "trigger-menu__label" }, qd = {
7530
+ }, Kd = { class: "min-w-0" }, qd = { class: "trigger-menu__label" }, Jd = {
7522
7531
  key: 0,
7523
7532
  class: "trigger-menu__subtitle"
7524
- }, Jd = /* @__PURE__ */ $(/* @__PURE__ */ u({
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", Wd, k(e.label.charAt(0)), 1)), o("span", Gd, [o("span", Kd, k(e.label), 1), e.subtitle ? (S(), a("span", qd, k(e.subtitle), 1)) : i("", !0)])], 42, Ud))), 128))], 38)) : i("", !0);
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"]]), Yd = ["accept", "disabled"], Xd = { class: "px-1 pb-1.5" }, Zd = {
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
- }, Qd = { class: "min-w-0" }, $d = { class: "heading-sm text-default truncate" }, ef = { class: "body-sm text-subtle" }, tf = ["data-placeholder"], nf = {
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
- }, rf = {
7576
+ }, af = {
7568
7577
  key: 2,
7569
7578
  class: "ml-auto"
7570
- }, af = 450, of = /* @__PURE__ */ $(/* @__PURE__ */ u({
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 } = yd(E, D, O, {
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 = fd(e);
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
- }, af));
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, Yd),
7714
- e.editingMessage ? (S(), r(kd, {
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(kd, {
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", Xd, [
7730
- _.value ? (S(), a("div", Zd, [o("div", Qd, [o("p", $d, k(_.value.name), 1), o("p", ef, k(_.value.type || ue.value), 1)]), l(j(z), {
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(wd, {
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, tf)),
7780
- _.value || e.editingMessage || e.contextLabel || e.offlineMode ? (S(), a("div", nf, [
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", rf, k(e.pendingQueueCount ? j(C)("offlineQueued", { count: e.pendingQueueCount }) : j(C)("offline")), 1)) : i("", !0)
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(Ad, {
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(Jd, {
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(Id, {
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(Hd, {
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"]]), sf = {
7888
+ }), [["__scopeId", "data-v-9df579a2"]]), cf = {
7880
7889
  key: 1,
7881
7890
  class: "composer-readonly-notice"
7882
- }, cf = /* @__PURE__ */ $(/* @__PURE__ */ u({
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 = Bu(), l = Wu(), u = Yu(), d = ed(), f = ad(), p = n(() => o.target === "thread"), m = n({
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
- od(f, "ui:closeComposerActions", () => {
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(of, {
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", sf, k(p.value ? j(s)("repliesDisabledInChannels") : j(s)("readOnlyChannel")), 1)) : i("", !0);
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"]]), lf = 1800;
7972
- function uf(e) {
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
- }, lf), x();
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 df = 1, ff = 2, pf = 80, mf = 1800, hf = 4;
8202
- function gf(e) {
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
- }, mf)
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) > hf && f();
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 > df ? n = !1 : c <= ff && (n = !0), r = o, a.scrollTop <= pf && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
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 _f = 1, vf = 4;
8286
- function yf(e) {
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, _f, vf);
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 bf = { class: "w-full" }, xf = {
8391
+ var xf = { class: "w-full" }, Sf = {
8383
8392
  key: 0,
8384
8393
  class: "fullscreen-dialog__footer"
8385
- }, Sf = /* @__PURE__ */ u({
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", bf, [E(t.$slots, "default")]), t.$slots.footer ? (S(), a("div", xf, [E(t.$slots, "footer")])) : i("", !0)]),
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
- }), Cf = ["href"], wf = { class: "media-viewer-shell flex min-h-0 flex-1 items-center justify-center overflow-hidden" }, Tf = ["src", "alt"], Ef = {
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
- }, Df = {
8426
+ }, Of = {
8418
8427
  class: "max-h-full w-full bg-black",
8419
8428
  controls: "",
8420
8429
  playsinline: "",
8421
8430
  autoplay: ""
8422
- }, Of = ["src", "type"], kf = {
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
- }, Af = {
8434
+ }, jf = {
8426
8435
  class: "w-full",
8427
8436
  controls: "",
8428
8437
  autoplay: ""
8429
- }, jf = ["src", "type"], Mf = {
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
- }, Nf = { class: "min-w-0 flex-1" }, Pf = { class: "heading-sm text-default truncate" }, Ff = { class: "body-sm text-subtle" }, If = /* @__PURE__ */ $(/* @__PURE__ */ u({
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 } = yf({
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(Sf, {
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, Cf)) : i("", !0)]),
8466
- footer: I(() => [t.attachment ? (S(), a("div", Mf, [o("div", Nf, [o("p", Pf, k(t.attachment.name), 1), o("p", Ff, k(t.attachment.kind), 1)])])) : i("", !0)]),
8467
- default: I(() => [o("div", wf, [t.attachment?.url ? (S(), a(e, { key: 0 }, [p.value ? (S(), a("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, Tf)], 544)) : m.value ? (S(), a("div", Ef, [o("video", Df, [o("source", {
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, Of)])])) : h.value ? (S(), a("div", kf, [o("audio", Af, [o("source", {
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, jf)])])) : i("", !0)], 64)) : i("", !0)])]),
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"]]), Lf = { class: "date-separator" }, Rf = { class: "date-separator__label" }, zf = /* @__PURE__ */ $(/* @__PURE__ */ u({
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", Lf, [o("span", Rf, k(s.value), 1)]));
8529
+ return (e, t) => (S(), a("div", Rf, [o("span", zf, k(s.value), 1)]));
8521
8530
  }
8522
- }), [["__scopeId", "data-v-49e72d67"]]), Bf = {
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
- }, Vf = { class: "message-action-row__text" }, Hf = /* @__PURE__ */ u({
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", Bf, [o("span", Vf, k(e.text), 1)]));
8538
+ return (t, n) => (S(), a("div", Vf, [o("span", Hf, k(e.text), 1)]));
8530
8539
  }
8531
- }), Uf = ["href"], Wf = {
8540
+ }), Wf = ["href"], Gf = {
8532
8541
  key: 0,
8533
8542
  class: "bg-elevation-surface-hovered aspect-[1.9/1] w-full overflow-hidden"
8534
- }, Gf = ["src", "alt"], Kf = { class: "space-y-1.5 px-3 py-3" }, qf = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, Jf = { class: "heading-sm text-default line-clamp-2" }, Yf = { class: "body-md text-subtle line-clamp-2" }, Xf = {
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
- }, Zf = /* @__PURE__ */ u({
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", Wf, [o("img", {
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, Gf)])) : i("", !0), o("div", Kf, [
8609
- o("p", qf, k(r.value?.siteName || l.value), 1),
8610
- o("p", Jf, k(r.value?.title || l.value), 1),
8611
- o("p", Yf, k(r.value?.description || u.value), 1),
8612
- s.value && !r.value ? (S(), a("p", Xf, k(j(c)("loadingPreview")), 1)) : i("", !0)
8613
- ])], 10, Uf));
8614
- }
8615
- }), Qf = { class: "linkified-text" }, $f = ["innerHTML"], ep = /* @__PURE__ */ $(/* @__PURE__ */ u({
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", Qf, [o("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, $f), e.showPreview !== !1 && u.value ? (S(), r(Zf, {
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"]]), tp = { class: "w-full space-y-1" }, np = {
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
- }, rp = ["src", "type"], ip = ["onClick"], ap = { class: "inline-flex items-center gap-2 truncate font-medium" }, op = ["href"], sp = { class: "flex min-w-0 items-center gap-2" }, cp = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, lp = { class: "text-default truncate font-medium" }, up = { class: "body-sm text-subtle shrink-0" }, dp = {
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
- }, fp = { class: "flex min-w-0 items-center gap-2" }, pp = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, mp = { class: "text-default truncate font-medium" }, hp = { class: "body-sm text-subtle shrink-0" }, gp = 4 / 3, _p = 16 / 9, vp = /* @__PURE__ */ $(/* @__PURE__ */ u({
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" ? _p : gp;
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", tp, [(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), {
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", np, [o("source", {
8741
+ }, [o("video", rp, [o("source", {
8733
8742
  src: n.url,
8734
8743
  type: n.mimeType || void 0
8735
- }, null, 8, rp)])], 4)) : n.kind === "audio" && n.url ? (S(), a("button", {
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", ap, [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, ip)) : n.url ? (S(), a("a", {
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", sp, [o("span", cp, [(S(), r(D(f(n)), {
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", lp, k(n.name), 1)]), o("span", up, k(u(n.size)), 1)], 8, op)) : (S(), a("div", dp, [o("span", fp, [o("span", pp, [(S(), r(D(f(n)), {
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", mp, k(n.name), 1)]), o("span", hp, k(u(n.size) || j(l)("queued")), 1)]))], 64))), 128)), p(t.message) ? (S(), r(ep, {
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"]]), yp = { class: "message-status" }, bp = { key: 0 }, xp = /* @__PURE__ */ $(/* @__PURE__ */ u({
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", yp, [
8809
- e.message.isEdited && e.message.kind !== "poll" ? (S(), a("span", bp, k(j(c)("edited")), 1)) : i("", !0),
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"]]), Sp = { class: "mb-1 flex items-start justify-between gap-2" }, Cp = { class: "body-sm text-subtlest truncate font-medium!" }, wp = /* @__PURE__ */ u({
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", Sp, [o("span", Cp, k(l()), 1), e.message.scheduled?.scheduleDate ? (S(), r(j(V), {
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
- }), Tp = ["disabled", "onClick"], Ep = /* @__PURE__ */ $(/* @__PURE__ */ u({
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, Tp))), 128))], 2)) : i("", !0);
8877
+ }, k(e.emoji) + " " + k(e.count), 11, Ep))), 128))], 2)) : i("", !0);
8869
8878
  }
8870
- }), [["__scopeId", "data-v-c17c8bfd"]]), Dp = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, Op = ["aria-label", "title"], kp = { class: "message-reactions__thread-count" }, Ap = /* @__PURE__ */ u({
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", Dp, [l(Ep, {
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", kp, k(e.message.replyCount), 1)], 8, Op)) : i("", !0)]));
8904
+ })), o("span", Ap, k(e.message.replyCount), 1)], 8, kp)) : i("", !0)]));
8896
8905
  }
8897
- }), jp = {
8906
+ }), Mp = {
8898
8907
  key: 0,
8899
8908
  class: ""
8900
- }, Mp = { class: "heading-sm text-default" }, Np = { class: "body-sm text-subtle" }, Pp = { class: "space-y-2 py-3" }, Fp = ["disabled", "onClick"], Ip = { class: "body-md flex items-center justify-between gap-3 px-3 py-1.5" }, Lp = { class: "body-sm text-subtle shrink-0" }, Rp = { class: "bg-alpha-default h-1.5" }, zp = /* @__PURE__ */ u({
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", jp, [o("div", null, [o("h4", Mp, k(t.message.poll.question), 1), o("p", Np, k(j(c)("voteCount", { count: t.message.poll.totalVotes })), 1)]), o("div", Pp, [(S(!0), a(e, null, T(t.message.poll.options, (e) => (S(), a("button", {
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", Ip, [o("span", { class: g(["truncate font-medium", l(e.id) ? "text-success" : ""]) }, k(e.text), 3), o("span", Lp, k(j(c)("voteCount", { count: e.voteCount })), 1)]), o("div", Rp, [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, Fp))), 128))])])) : i("", !0);
8937
+ }, null, 6)])], 8, Ip))), 128))])])) : i("", !0);
8929
8938
  }
8930
- }), Bp = { class: "heading-xs" }, Vp = { class: "truncate" }, Hp = /* @__PURE__ */ $(/* @__PURE__ */ u({
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 = Bu(), s = n(() => r.message.replyTo ? ec(r.message.replyTo.text, i.mentionNameByUid.value) : ""), c = t;
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", Bp, k(e.message.replyTo.senderName), 1), o("p", Vp, k(s.value), 1)]));
8949
+ }, [o("p", Vp, k(e.message.replyTo.senderName), 1), o("p", Hp, k(s.value), 1)]));
8941
8950
  }
8942
- }), [["__scopeId", "data-v-e27c136c"]]), Up = { class: "space-y-2" }, Wp = /* @__PURE__ */ u({
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 = Bu(), o = n(() => t.mentionNameByUid.value);
8948
- return (t, n) => (S(), a("div", Up, [e.message.translatedText ? (S(), r(ep, {
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(ep, {
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
- }), Gp = [
8984
+ }), Kp = [
8976
8985
  "id",
8977
8986
  "data-message-id",
8978
8987
  "data-message-kind"
8979
- ], Kp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, qp = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, Jp = /* @__PURE__ */ $(/* @__PURE__ */ u({
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(Hf, {
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(wp, {
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(Hp, {
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(zp, {
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(vp, {
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(Wp, {
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", Kp, [l(Ap, {
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(xp, { message: t.message }, null, 8, ["message"])])
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(wp, {
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(Hp, {
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(zp, {
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(vp, {
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(Wp, {
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", qp, [l(Ap, {
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(xp, { message: t.message }, null, 8, ["message"])])
9145
+ ]), l(Sp, { message: t.message }, null, 8, ["message"])])
9137
9146
  ], 2)], 4)], 2)) : i("", !0)
9138
- ], 64))], 10, Gp));
9147
+ ], 64))], 10, Kp));
9139
9148
  }
9140
- }), [["__scopeId", "data-v-02761d2e"]]), Yp = [
9149
+ }), [["__scopeId", "data-v-02761d2e"]]), Xp = [
9141
9150
  "👍",
9142
9151
  "❤️",
9143
9152
  "🔥",
9144
9153
  "😂",
9145
9154
  "🙏",
9146
9155
  "🎉"
9147
- ], Xp = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), Zp = { 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" }, Qp = ["disabled", "onClick"], $p = ["disabled"], em = {
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
- }, tm = ["onClick"], nm = /* @__PURE__ */ $(/* @__PURE__ */ u({
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(() => Xp);
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", Zp, [(S(!0), a(e, null, T(j(Yp), (e) => (S(), a("button", {
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, Qp))), 128)), o("button", {
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, $p)]), u.value && t.canReact ? (S(), a("div", em, [(S(!0), a(e, null, T(d.value, (e) => (S(), a("button", {
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, tm))), 128))])) : i("", !0)], 64));
9197
+ }, k(e), 11, nm))), 128))])) : i("", !0)], 64));
9189
9198
  }
9190
- }), [["__scopeId", "data-v-0a11761a"]]), rm = /* @__PURE__ */ $(/* @__PURE__ */ u({
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(nm, {
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"]]), im = { 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" }, am = {
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
- }, om = { class: "chat-header__text min-w-0" }, sm = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, cm = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, lm = { key: 0 }, um = { key: 1 }, dm = { class: "chat-header__actions flex items-center gap-2" }, fm = {
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
- }, pm = /* @__PURE__ */ u({
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", im, [t.conversation ? (S(), a("div", am, [l(j(R), {
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", om, [o("p", sm, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", cm, [t.parentMessage ? (S(), a("span", lm, k(t.parentMessage.senderName), 1)) : (S(), a("span", um, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", dm, [t.conversation?.tags?.length ? (S(), a("div", fm, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(V), {
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
- }), mm = {
9307
+ }), hm = {
9299
9308
  key: 1,
9300
9309
  class: "message-list__empty-state"
9301
- }, hm = { class: "space-y-2" }, gm = {
9310
+ }, gm = { class: "space-y-2" }, _m = {
9302
9311
  key: 0,
9303
9312
  class: "message-list__thread-root"
9304
- }, _m = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, vm = { class: "body-md text-default mt-1 line-clamp-2" }, ym = {
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
- }, bm = /* @__PURE__ */ $(/* @__PURE__ */ u({
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 = Bu(), d = Wu(), f = ad(), 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(() => {
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(() => Fu(u.conversation.value)), te = N("threadRef"), { handleThreadScroll: L } = gf({
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 } = uf({
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(pm, {
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", hm, [
9412
- _.value ? (S(), a("div", gm, [o("p", _m, k(_.value.senderName), 1), o("p", vm, k(j($s)(_.value, j(c)("message"), j(u).mentionNameByUid.value)), 1)])) : i("", !0),
9413
- (S(!0), a(e, null, T(m.value, (o, c) => (S(), a(e, { key: o.id }, [de(c) ? (S(), r(zf, {
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(Jp, {
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", ym, k(j(c)("noMessagesYetInThisGroup")), 1)) : i("", !0)
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", mm, k(j(c)("selectConversationToStart")), 1))], 2),
9454
- l(If, {
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(rm, {
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"]]), xm = { class: "receipt-section" }, Sm = { class: "receipt-section__header" }, Cm = { class: "heading-sm text-default" }, wm = { class: "body-sm text-subtlest" }, Tm = {
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
- }, Em = { class: "flex min-w-0 items-center gap-3" }, Dm = { class: "min-w-0" }, Om = { class: "heading-sm text-default truncate" }, km = { class: "body-sm text-subtle truncate" }, Am = { class: "body-sm text-subtle shrink-0" }, jm = {
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
- }, Mm = /* @__PURE__ */ $(/* @__PURE__ */ u({
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", xm, [o("div", Sm, [o("p", Cm, k(t.title), 1), o("span", wm, k(t.receipts.length), 1)]), t.receipts.length ? (S(), a("div", Tm, [(S(!0), a(e, null, T(t.receipts, (e) => (S(), a("div", {
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", Em, [l(j(R), {
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", Dm, [o("p", Om, k(e.user.name), 1), o("p", km, k(e.user.uid), 1)])]), o("p", Am, k(t.formatDateTime(e.timestamp)), 1)]))), 128))])) : (S(), a("div", jm, k(t.emptyLabel), 1))]));
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"]]), Nm = {
9508
+ }), [["__scopeId", "data-v-2b2f0a3e"]]), Pm = {
9500
9509
  key: 0,
9501
9510
  class: "message-info-dialog-content space-y-5 overflow-y-auto"
9502
- }, Pm = { class: "message-info-summary px-4 py-4 sm:px-6 sm:py-5" }, Fm = { class: "body-md text-default wrap-break-word whitespace-pre-wrap" }, Im = { class: "mt-4 grid gap-3 sm:grid-cols-3" }, Lm = { class: "message-info-metric px-3 py-3" }, Rm = { class: "body-sm text-subtlest font-semibold uppercase" }, zm = { class: "heading-sm text-default mt-1" }, Bm = { class: "message-info-metric px-3 py-3" }, Vm = { class: "flex items-center gap-2" }, Hm = { class: "body-sm text-subtlest font-semibold uppercase" }, Um = { class: "heading-sm text-default mt-1" }, Wm = { class: "message-info-metric px-3 py-3" }, Gm = { class: "flex items-center gap-2" }, Km = { class: "body-sm text-subtlest font-semibold uppercase" }, qm = { class: "heading-sm text-default mt-1" }, Jm = {
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
- }, Ym = {
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
- }, Xm = {
9517
+ }, Zm = {
9509
9518
  key: 2,
9510
9519
  class: "space-y-4 pb-4 sm:pb-5"
9511
- }, Zm = /* @__PURE__ */ $(/* @__PURE__ */ u({
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 = Bu(), 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"));
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(Sf, {
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", Nm, [o("div", Pm, [o("p", Fm, k(j($s)(e.message, j(d)("message"), j(f).mentionNameByUid.value)), 1), o("div", Im, [
9541
- o("div", Lm, [o("p", Rm, k(j(d)("sent")), 1), o("p", zm, k(g(e.message.sentAt)), 1)]),
9542
- o("div", Bm, [o("div", Vm, [o("p", Hm, k(j(d)("deliveredToAll")), 1), h.value.length ? (S(), r(j(V), {
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", Um, k(_(e.message.receipts.deliveredAt, h.value.length)), 1)]),
9548
- o("div", Wm, [o("div", Gm, [o("p", Km, k(j(d)("readByAll")), 1), m.value.length ? (S(), r(j(V), {
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", qm, k(_(e.message.receipts.readAt, m.value.length)), 1)])
9554
- ])]), e.loading ? (S(), a("div", Jm, [l(j(se), {
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", Ym, k(e.error), 1)) : (S(), a("div", Xm, [l(Mm, {
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(Mm, {
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"]]), Qm = { class: "min-h-0 flex-1 overflow-y-auto" }, $m = {
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
- }, eh = {
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
- }, th = {
9602
+ }, nh = {
9594
9603
  key: 2,
9595
9604
  class: "space-y-3"
9596
- }, nh = { class: "flex flex-wrap items-start justify-between gap-3" }, rh = { class: "w-full space-y-2" }, ih = { class: "center between gap-2" }, ah = { class: "" }, oh = { class: "space-y-1" }, sh = { class: "heading-sm text-default" }, ch = {
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
- }, lh = {
9608
+ }, uh = {
9600
9609
  key: 1,
9601
9610
  class: "body-md text-default wrap-break-word whitespace-pre-wrap"
9602
- }, uh = {
9611
+ }, dh = {
9603
9612
  key: 0,
9604
9613
  class: "max-w-sm"
9605
- }, dh = { class: "flex flex-wrap items-center gap-1" }, fh = {
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
- }, ph = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, mh = { class: "flex items-center gap-2" }, hh = {
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
- }, gh = {
9620
+ }, _h = {
9612
9621
  key: 0,
9613
9622
  class: "relative max-w-sm"
9614
- }, _h = { class: "absolute top-2 right-2" }, vh = ["placeholder"], yh = { class: "flex items-center justify-end gap-2" }, bh = /* @__PURE__ */ $(/* @__PURE__ */ u({
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(Sf, {
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", Qm, [t.loading ? (S(), a("div", $m, [l(j(se), {
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", eh, k(j(v)("noScheduledMessagesForConversation")), 1)) : (S(), a("div", th, [(S(!0), a(e, null, T(y.value, (e) => (S(), a("article", {
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", nh, [o("div", rh, [
9713
- o("div", ih, [o("div", ah, [e.kind === "poll" ? (S(), r(j(V), {
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", oh, [o("p", sh, k(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (S(), a("p", ch, k(e.poll.question), 1)) : (S(), a("p", lh, k(j($s)(e, j(v)("attachment"))), 1))]),
9735
- L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", uh, [l(vp, { message: N(e) }, null, 8, ["message"])])) : i("", !0)
9736
- ]), o("div", dh, [e.kind === "poll" ? i("", !0) : (S(), r(j(z), {
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", fh, [o("div", ph, [te(o("input", {
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", mh, [l(j(z), {
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", hh, [
9785
- L(e) ? (S(), a("div", gh, [l(vp, { message: N(e) }, null, 8, ["message"]), o("div", _h, [l(j(z), {
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, vh), [[ee, g.value]]),
9800
- o("div", yh, [l(j(z), {
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"]]), xh = { class: "chat-status-overlay" }, Sh = { class: "chat-status-overlay__card" }, Ch = /* @__PURE__ */ $(/* @__PURE__ */ u({
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", xh, [o("div", Sh, [E(e.$slots, `${r.value.slotName}-content`, {}, () => [o("span", null, k(r.value.message), 1)], !0)])])], !0) : i("", !0);
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"]]), wh = /* @__PURE__ */ u({
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 } = sd({
9936
+ }), { groupMembers: A, fetchGroupMembers: M } = cd({
9928
9937
  getConversationTargetId: () => O.value?.targetId,
9929
- isChannel: () => Du(O.value),
9930
- hasJoined: () => Ou(O.value),
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 = Lu({
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
- zu(ee);
9947
- let P = Vu({
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
- Uu(P);
9960
- let te = n(() => P.messages.value.length > 0), L = n(() => f.showHeader ?? f.showMessageHeader), R = Zu({
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
- $u(R);
9968
- let z = N("mainComposerRef"), ne = N("threadComposerRef"), B = Ku({
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
- Ju(B);
9977
- let re = rd();
9978
- id(re), td({
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 } = cd({
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
- Tu.setGetChatMessagesCallback(e);
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 : Tu.initialized.value,
10003
- () => f.client ? f.client.loggedIn.value : Tu.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
- () => Tu.scrollToMessageId.value
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 Tu.getGroup(e, !0);
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(bm, {
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(cf, {
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(Sf, {
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(bm, {
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(cf, {
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(bh, {
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(Zm, {
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(Ch, {
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 { wh as BccChat, wh as BccChatMessageList, Ll as LogSeverity, Tu as chat, Tu as default, _c as createChatClient };
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