@linktr.ee/messaging-react 4.3.0 → 4.3.1-rc-1787498296

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.
@@ -2,8 +2,8 @@ import { jsx as s, jsxs as h, Fragment as Y } from "react/jsx-runtime";
2
2
  import L, { createContext as Se, useMemo as re, useContext as he, useCallback as J, useState as $, useRef as j, useEffect as q, useId as Js, Suspense as Qs } from "react";
3
3
  import { StreamChatService as en } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as tn, LinkPreviewsManager as tt } from "stream-chat";
5
- import { Chat as sn, useChannelStateContext as be, useChatContext as Ge, DateSeparator as nn, useMessageContext as fe, MessageStatus as an, MessageErrorIcon as st, MessageText as Be, areMessageUIPropsEqual as rn, useMessageReminder as on, useComponentContext as os, Attachment as ln, EditMessageModal as cn, MessageBlocked as dn, MessageBouncePrompt as un, MessageDeleted as mn, MessageIsThreadReplyInChannelButtonIndicator as hn, MessageRepliesCountButton as fn, ReminderNotification as gn, StreamedMessageText as pn, messageHasAttachments as bn, messageHasReactions as vn, isDateSeparatorMessage as xn, isMessageBlocked as wn, isMessageBounced as _n, MessageBounceModal as yn, Poll as Nn, useMessageComposer as Cn, useStateStore as Sn, MessageInput as $t, useMessageInputContext as kn, useMessageComposerHasSendableData as En, AttachmentPreviewList as In, QuotedMessagePreview as Tn, TextareaComposer as An, MessageTimestamp as qe, AIStates as Ke, useTypingContext as Rn, useAIState as Ln, Channel as Mn, WithComponents as Dn, Window as On, MessageList as Ut, ChannelList as Pn, InfiniteScroll as Fn } from "stream-chat-react";
6
- import { isOfficialChannel as ls, OFFICIAL_SENDER_USER_ID as Bn, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as jt, isAgeSafetySystemType as zn, resolveRichCardImagePresentation as $n, selectEnabledFaqs as Un } from "@linktr.ee/messaging-taxonomy";
5
+ import { Chat as sn, useChannelStateContext as be, useChatContext as Ge, DateSeparator as nn, useMessageContext as fe, MessageStatus as an, MessageErrorIcon as st, MessageText as Fe, areMessageUIPropsEqual as rn, useMessageReminder as on, useComponentContext as os, Attachment as ln, EditMessageModal as cn, MessageBlocked as dn, MessageBouncePrompt as un, MessageDeleted as mn, MessageIsThreadReplyInChannelButtonIndicator as hn, MessageRepliesCountButton as fn, ReminderNotification as gn, StreamedMessageText as pn, messageHasAttachments as bn, messageHasReactions as vn, isDateSeparatorMessage as xn, isMessageBlocked as wn, isMessageBounced as _n, MessageBounceModal as yn, Poll as Nn, useMessageComposer as Cn, useStateStore as Sn, MessageInput as $t, useMessageInputContext as kn, useMessageComposerHasSendableData as En, AttachmentPreviewList as In, QuotedMessagePreview as Tn, TextareaComposer as An, MessageTimestamp as qe, AIStates as Ke, useTypingContext as Rn, useAIState as Ln, Channel as Mn, WithComponents as Dn, Window as On, MessageList as Ut, ChannelList as Pn, InfiniteScroll as Bn } from "stream-chat-react";
6
+ import { isOfficialChannel as ls, OFFICIAL_SENDER_USER_ID as Fn, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as jt, isAgeSafetySystemType as zn, resolveRichCardImagePresentation as $n, selectEnabledFaqs as Un } from "@linktr.ee/messaging-taxonomy";
7
7
  import N from "classnames";
8
8
  import { StarIcon as nt, DotsThreeIcon as jn, SpinnerGapIcon as Oe, SignOutIcon as Hn, ProhibitInsetIcon as Ht, FlagIcon as cs, CurrencyDollarIcon as Vn, CaretRightIcon as ds, ArrowLeftIcon as Gn, GiftIcon as Yn, WarningCircleIcon as Wn, MegaphoneIcon as Xn, ChecksIcon as qn, CircleNotchIcon as ze, FileIcon as us, ImageIcon as Kn, SpeakerHighIcon as Zn, VideoCameraIcon as ms, FileMdIcon as Jn, FileTextIcon as Qn, FileZipIcon as ea, FilePptIcon as ta, FileCsvIcon as sa, FileXlsIcon as na, FileDocIcon as aa, FilePdfIcon as ra, XIcon as rt, PencilSimpleIcon as ia, DownloadSimpleIcon as $e, CaretLeftIcon as oa, PlayIcon as la, TrashSimpleIcon as ca, ArrowUpIcon as da, SparkleIcon as ua, ProhibitIcon as ma } from "@phosphor-icons/react";
9
9
  import { MessageActions as ha, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
@@ -20,7 +20,7 @@ const _e = {
20
20
  }), gs = Se(_e), fa = ({ logger: e, children: t }) => {
21
21
  const n = re(() => fs(e), [e]);
22
22
  return /* @__PURE__ */ s(gs.Provider, { value: n, children: t });
23
- }, Fo = () => he(gs), ps = Se({
23
+ }, Bo = () => he(gs), ps = Se({
24
24
  service: null,
25
25
  client: null,
26
26
  isConnected: !1,
@@ -30,7 +30,7 @@ const _e = {
30
30
  refreshConnection: async () => {
31
31
  },
32
32
  debug: !1
33
- }), it = () => he(ps), Bo = ({
33
+ }), it = () => he(ps), Fo = ({
34
34
  children: e,
35
35
  user: t,
36
36
  serviceConfig: n,
@@ -42,8 +42,8 @@ const _e = {
42
42
  }) => {
43
43
  var M, U;
44
44
  const d = J(
45
- (B, ...O) => {
46
- i && console.log(`🔥 [MessagingProvider] ${B}`, ...O);
45
+ (F, ...O) => {
46
+ i && console.log(`🔥 [MessagingProvider] ${F}`, ...O);
47
47
  },
48
48
  [i]
49
49
  );
@@ -53,7 +53,7 @@ const _e = {
53
53
  serviceConfig: !!n,
54
54
  capabilities: Object.keys(r)
55
55
  });
56
- const [u, f] = $(null), [m, g] = $(null), [o, x] = $(!1), [_, b] = $(!1), [v, p] = $(null), y = j(!1), w = j(null), k = j(n);
56
+ const [u, f] = $(null), [m, g] = $(null), [o, x] = $(!1), [w, b] = $(!1), [v, p] = $(null), y = j(!1), _ = j(null), k = j(n);
57
57
  k.current = n;
58
58
  const T = j(i);
59
59
  T.current = i;
@@ -64,9 +64,9 @@ const _e = {
64
64
  apiKey: a,
65
65
  serviceConfig: n,
66
66
  capabilities: r
67
- }), F = j(0);
68
- F.current++, d("📊 RENDER INFO", {
69
- renderCount: F.current,
67
+ }), B = j(0);
68
+ B.current++, d("📊 RENDER INFO", {
69
+ renderCount: B.current,
70
70
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
71
71
  propChanges: {
72
72
  userChanged: D.current.userId !== (t == null ? void 0 : t.id),
@@ -84,20 +84,20 @@ const _e = {
84
84
  !c && a && ((M = R.current) == null ? void 0 : M.apiKey) !== a && (R.current = { apiKey: a, client: new tn(a) });
85
85
  const S = c || (a ? ((U = R.current) == null ? void 0 : U.client) ?? null : null);
86
86
  q(() => {
87
- const B = F.current, O = k.current;
87
+ const F = B.current, O = k.current;
88
88
  if (c) {
89
- w.current = null, f(null), g(null), x(!1), p(null), b(!1);
89
+ _.current = null, f(null), g(null), x(!1), p(null), b(!1);
90
90
  return;
91
91
  }
92
92
  if (!a || !S || !O) {
93
93
  d("⚠️ SERVICE INIT SKIPPED", {
94
- renderCount: B,
94
+ renderCount: F,
95
95
  reason: "Missing apiKey, client, or serviceConfig"
96
96
  });
97
97
  return;
98
98
  }
99
99
  d("🚀 CREATING SERVICE", {
100
- renderCount: B,
100
+ renderCount: F,
101
101
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
102
102
  });
103
103
  const W = new en({
@@ -109,8 +109,8 @@ const _e = {
109
109
  // Resolved, because the service swaps its console defaults out wholesale.
110
110
  ...O.logger || !A.current ? {} : { logger: fs(A.current) }
111
111
  });
112
- w.current = W, f(W), d("✅ SERVICE SET", {
113
- renderCount: B,
112
+ _.current = W, f(W), d("✅ SERVICE SET", {
113
+ renderCount: F,
114
114
  serviceInstance: !!W
115
115
  });
116
116
  }, [a, S, c]);
@@ -164,10 +164,10 @@ const _e = {
164
164
  }
165
165
  })();
166
166
  }, [u, t, d, o, c]), q(() => {
167
- const B = S;
167
+ const F = S;
168
168
  return () => {
169
169
  var O;
170
- B && (I.current = null, (O = w.current) == null || O.disconnectUser().catch(console.error));
170
+ F && (I.current = null, (O = _.current) == null || O.disconnectUser().catch(console.error));
171
171
  };
172
172
  }, [S]);
173
173
  const E = J(async () => {
@@ -182,10 +182,10 @@ const _e = {
182
182
  d("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
183
183
  try {
184
184
  d("🔌 DISCONNECTING FOR REFRESH"), await u.disconnectUser(), d("📞 RECONNECTING FOR REFRESH");
185
- const B = await u.connectUser(t);
186
- g(B), x(!0), p(null), d("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
187
- } catch (B) {
188
- const O = B instanceof Error ? B.message : "Refresh failed";
185
+ const F = await u.connectUser(t);
186
+ g(F), x(!0), p(null), d("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
187
+ } catch (F) {
188
+ const O = F instanceof Error ? F.message : "Refresh failed";
189
189
  p(O), d("❌ CONNECTION REFRESH ERROR", {
190
190
  userId: t.id,
191
191
  error: O
@@ -198,7 +198,7 @@ const _e = {
198
198
  hasService: !!u,
199
199
  hasClient: !!m,
200
200
  isConnected: o,
201
- isLoading: _,
201
+ isLoading: w,
202
202
  hasError: !!v,
203
203
  capabilitiesKeys: Object.keys(r)
204
204
  }), {
@@ -213,7 +213,7 @@ const _e = {
213
213
  // through if the same provider previously attempted an apiKey connect.
214
214
  client: c ?? m,
215
215
  isConnected: c ? !0 : o,
216
- isLoading: c ? !1 : _,
216
+ isLoading: c ? !1 : w,
217
217
  error: c ? null : v,
218
218
  capabilities: r,
219
219
  refreshConnection: E,
@@ -223,7 +223,7 @@ const _e = {
223
223
  m,
224
224
  c,
225
225
  o,
226
- _,
226
+ w,
227
227
  v,
228
228
  r,
229
229
  E,
@@ -231,7 +231,7 @@ const _e = {
231
231
  d
232
232
  ]);
233
233
  return d("🔄 RENDER END", {
234
- renderCount: F.current,
234
+ renderCount: B.current,
235
235
  willRenderChat: !!S,
236
236
  contextValueReady: !!C
237
237
  }), /* @__PURE__ */ s(fa, { logger: l, children: /* @__PURE__ */ s(ps.Provider, { value: C, children: S ? /* @__PURE__ */ s(
@@ -273,7 +273,7 @@ function vs(e, t, n) {
273
273
  const r = a.find(
274
274
  (i) => {
275
275
  var c;
276
- return ((c = i.user) == null ? void 0 : c.id) === Bn;
276
+ return ((c = i.user) == null ? void 0 : c.id) === Fn;
277
277
  }
278
278
  );
279
279
  if (r) return r;
@@ -415,7 +415,7 @@ const ke = ({
415
415
  logLabel: f = "useChannelModerationActions"
416
416
  }) => {
417
417
  var I;
418
- const { service: m, debug: g } = it(), o = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, x = !!(a && n && m && o), [_, b] = $(!1), [v, p] = $(null), [y, w] = $(!1), [k, T] = $(!1), A = x && ((v == null ? void 0 : v.participantId) !== o || (v == null ? void 0 : v.service) !== m);
418
+ const { service: m, debug: g } = it(), o = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, x = !!(a && n && m && o), [w, b] = $(!1), [v, p] = $(null), [y, _] = $(!1), [k, T] = $(!1), A = x && ((v == null ? void 0 : v.participantId) !== o || (v == null ? void 0 : v.service) !== m);
419
419
  return q(() => {
420
420
  if (!x || !m || !o) {
421
421
  b(!1), p(null);
@@ -440,21 +440,21 @@ const ke = ({
440
440
  E = !0;
441
441
  };
442
442
  }, [x, m, o, f]), {
443
- isParticipantBlocked: _,
443
+ isParticipantBlocked: w,
444
444
  isCheckingBlockedStatus: A,
445
445
  isLeaving: y,
446
446
  isUpdatingBlockStatus: k,
447
447
  handleLeaveConversation: async () => {
448
448
  var E;
449
449
  if (!y) {
450
- c == null || c(), g && console.log(`[${f}] Leave conversation`, e.cid), w(!0);
450
+ c == null || c(), g && console.log(`[${f}] Leave conversation`, e.cid), _(!0);
451
451
  try {
452
452
  const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
453
453
  await e.hide(C, !1), r && await r(e), u == null || u();
454
454
  } catch (C) {
455
455
  console.error(`[${f}] Failed to leave conversation`, C);
456
456
  } finally {
457
- w(!1);
457
+ _(!1);
458
458
  }
459
459
  }
460
460
  },
@@ -519,11 +519,11 @@ const ke = ({
519
519
  customChannelActions: f,
520
520
  triggerClassName: m
521
521
  }) => {
522
- const [g, o] = $(!1), x = j(null), _ = Js(), b = J(() => o(!1), []), {
522
+ const [g, o] = $(!1), x = j(null), w = Js(), b = J(() => o(!1), []), {
523
523
  isParticipantBlocked: v,
524
524
  isCheckingBlockedStatus: p,
525
525
  isLeaving: y,
526
- isUpdatingBlockStatus: w,
526
+ isUpdatingBlockStatus: _,
527
527
  handleLeaveConversation: k,
528
528
  handleBlockUser: T,
529
529
  handleUnblockUser: A,
@@ -559,7 +559,7 @@ const ke = ({
559
559
  type: "button",
560
560
  "aria-haspopup": "true",
561
561
  "aria-expanded": g,
562
- "aria-controls": g ? _ : void 0,
562
+ "aria-controls": g ? w : void 0,
563
563
  onClick: () => o((R) => !R),
564
564
  children: [
565
565
  /* @__PURE__ */ s(jn, { className: "size-5 text-black/90" }),
@@ -570,7 +570,7 @@ const ke = ({
570
570
  g && /* @__PURE__ */ s(
571
571
  "div",
572
572
  {
573
- id: _,
573
+ id: w,
574
574
  "aria-label": "Conversation options",
575
575
  className: N(
576
576
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
@@ -600,10 +600,10 @@ const ke = ({
600
600
  xe,
601
601
  {
602
602
  onClick: A,
603
- disabled: w,
604
- "aria-busy": w,
603
+ disabled: _,
604
+ "aria-busy": _,
605
605
  children: [
606
- w ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Ht, { className: "h-5 w-5" }),
606
+ _ ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Ht, { className: "h-5 w-5" }),
607
607
  /* @__PURE__ */ s("span", { children: "Unblock" })
608
608
  ]
609
609
  }
@@ -611,10 +611,10 @@ const ke = ({
611
611
  xe,
612
612
  {
613
613
  onClick: T,
614
- disabled: w,
615
- "aria-busy": w,
614
+ disabled: _,
615
+ "aria-busy": _,
616
616
  children: [
617
- w ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Ht, { className: "h-5 w-5" }),
617
+ _ ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Ht, { className: "h-5 w-5" }),
618
618
  /* @__PURE__ */ s("span", { children: "Block" })
619
619
  ]
620
620
  }
@@ -644,7 +644,7 @@ const ke = ({
644
644
  customChannelActions: g,
645
645
  renderChannelActions: o,
646
646
  showChannelInfo: x = !0,
647
- onParticipantNameClick: _
647
+ onParticipantNameClick: w
648
648
  }) => {
649
649
  var S, I, E, C;
650
650
  const { channel: b } = be(), { client: v } = Ge(), p = L.useMemo(
@@ -657,7 +657,7 @@ const ke = ({
657
657
  );
658
658
  },
659
659
  [(S = b.state) == null ? void 0 : S.members, v == null ? void 0 : v.userID, b.type]
660
- ), y = xs(p == null ? void 0 : p.user), w = (I = p == null ? void 0 : p.user) == null ? void 0 : I.image, k = bs(b), T = Sa((E = b.data) == null ? void 0 : E.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, A = a && k, D = T || A || !!_, F = async () => {
660
+ ), y = xs(p == null ? void 0 : p.user), _ = (I = p == null ? void 0 : p.user) == null ? void 0 : I.image, k = bs(b), T = Sa((E = b.data) == null ? void 0 : E.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, A = a && k, D = T || A || !!w, B = async () => {
661
661
  try {
662
662
  k ? await b.unpin() : await b.pin();
663
663
  } catch (M) {
@@ -672,7 +672,7 @@ const ke = ({
672
672
  {
673
673
  id: ((C = p == null ? void 0 : p.user) == null ? void 0 : C.id) || b.id || "unknown",
674
674
  name: y,
675
- image: w,
675
+ image: _,
676
676
  shape: "circle",
677
677
  size: 48,
678
678
  className: "-mb-2"
@@ -704,7 +704,7 @@ const ke = ({
704
704
  children: /* @__PURE__ */ s(nt, { className: "size-2.5", weight: "fill" })
705
705
  }
706
706
  ) }),
707
- _ && /* @__PURE__ */ s(
707
+ w && /* @__PURE__ */ s(
708
708
  ds,
709
709
  {
710
710
  "aria-hidden": "true",
@@ -739,11 +739,11 @@ const ke = ({
739
739
  children: /* @__PURE__ */ s(Gn, { className: "size-5 text-black/90" })
740
740
  }
741
741
  ) }),
742
- /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: _ ? /* @__PURE__ */ s(
742
+ /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ s(
743
743
  "button",
744
744
  {
745
745
  type: "button",
746
- onClick: _,
746
+ onClick: w,
747
747
  "aria-label": `View details for ${y}`,
748
748
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
749
749
  children: R
@@ -754,7 +754,7 @@ const ke = ({
754
754
  "button",
755
755
  {
756
756
  className: Ze,
757
- onClick: F,
757
+ onClick: B,
758
758
  type: "button",
759
759
  "aria-pressed": k,
760
760
  "aria-label": k ? "Unstar conversation" : "Star conversation",
@@ -815,7 +815,7 @@ const Ta = {
815
815
  function Ra(e) {
816
816
  return he(ys)[e] ?? Aa[e];
817
817
  }
818
- const La = L.lazy(() => import("./Card-BzvDr-pU.js")), Ma = L.lazy(() => import("./Card-DyoGzhhM.js")), Da = () => /* @__PURE__ */ s(
818
+ const La = L.lazy(() => import("./Card-BzvDr-pU.js")), Ma = L.lazy(() => import("./Card-CCVB5WIT.js")), Da = () => /* @__PURE__ */ s(
819
819
  "div",
820
820
  {
821
821
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
@@ -850,10 +850,10 @@ const La = L.lazy(() => import("./Card-BzvDr-pU.js")), Ma = L.lazy(() => import(
850
850
  }, Pa = (e) => {
851
851
  var t;
852
852
  return lt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
853
- }, Fa = (e) => {
853
+ }, Ba = (e) => {
854
854
  var t;
855
855
  return lt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
856
- }, Ba = (e) => {
856
+ }, Fa = (e) => {
857
857
  var t;
858
858
  return Ns(e) && !!((t = e.metadata) != null && t.amount_text);
859
859
  }, Yt = ({
@@ -977,7 +977,7 @@ const La = L.lazy(() => import("./Card-BzvDr-pU.js")), Ma = L.lazy(() => import(
977
977
  }
978
978
  })();
979
979
  return e.id === n;
980
- }, Fe = () => ct() ? /* @__PURE__ */ h(Y, { children: [
980
+ }, Be = () => ct() ? /* @__PURE__ */ h(Y, { children: [
981
981
  /* @__PURE__ */ s(qn, { weight: "bold", "aria-hidden": "true" }),
982
982
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
983
983
  ] }) : null, Ga = () => ct() ? /* @__PURE__ */ h(Y, { children: [
@@ -1040,13 +1040,13 @@ const La = L.lazy(() => import("./Card-BzvDr-pU.js")), Ma = L.lazy(() => import(
1040
1040
  outbound: t,
1041
1041
  onOutboundClick: e
1042
1042
  }
1043
- ) : null, u = Ba(a) ? null : /* @__PURE__ */ s(
1043
+ ) : null, u = Fa(a) ? null : /* @__PURE__ */ s(
1044
1044
  an,
1045
1045
  {
1046
- MessageSentStatus: Fe,
1047
- MessageDeliveredStatus: Fe,
1048
- MessageReadStatus: Fe,
1049
- MessageSendingStatus: Ss(a) ? Fe : Ga
1046
+ MessageSentStatus: Be,
1047
+ MessageDeliveredStatus: Be,
1048
+ MessageReadStatus: Be,
1049
+ MessageSendingStatus: Ss(a) ? Be : Ga
1050
1050
  }
1051
1051
  );
1052
1052
  return d ? /* @__PURE__ */ h("span", { className: "sent-message-status-row", children: [
@@ -1156,10 +1156,10 @@ const er = {
1156
1156
  trailingAction: f,
1157
1157
  isLoading: m = !1
1158
1158
  }) => {
1159
- const g = e === "dark", o = a ?? (g ? r : void 0) ?? "", x = o.trim() !== "", _ = i != null && i.trim() !== "", b = typeof l == "string" ? l.trim() : "", v = b !== "", p = u != null;
1160
- if (!m && !x && !_ && !v && !p)
1159
+ const g = e === "dark", o = a ?? (g ? r : void 0) ?? "", x = o.trim() !== "", w = i != null && i.trim() !== "", b = typeof l == "string" ? l.trim() : "", v = b !== "", p = u != null;
1160
+ if (!m && !x && !w && !v && !p)
1161
1161
  return null;
1162
- const y = g && !a, w = N(
1162
+ const y = g && !a, _ = N(
1163
1163
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
1164
1164
  n == null && (y ? sr : tr[e])
1165
1165
  ), k = N(
@@ -1171,13 +1171,13 @@ const er = {
1171
1171
  n == null && qt[e]
1172
1172
  );
1173
1173
  if (m) {
1174
- const F = N(
1174
+ const B = N(
1175
1175
  "animate-pulse rounded",
1176
1176
  nr[e]
1177
1177
  );
1178
1178
  return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
1179
- /* @__PURE__ */ s("div", { className: N("h-5 w-3/4", F), "aria-hidden": !0 }),
1180
- /* @__PURE__ */ s("div", { className: N("h-4 w-1/2", F), "aria-hidden": !0 })
1179
+ /* @__PURE__ */ s("div", { className: N("h-5 w-3/4", B), "aria-hidden": !0 }),
1180
+ /* @__PURE__ */ s("div", { className: N("h-4 w-1/2", B), "aria-hidden": !0 })
1181
1181
  ] }) });
1182
1182
  }
1183
1183
  const A = n ? { color: n } : void 0, D = c > 1 ? {
@@ -1195,13 +1195,13 @@ const er = {
1195
1195
  /* @__PURE__ */ s(
1196
1196
  "p",
1197
1197
  {
1198
- className: N("min-w-0", w),
1198
+ className: N("min-w-0", _),
1199
1199
  style: A,
1200
1200
  children: o
1201
1201
  }
1202
1202
  )
1203
1203
  ] }),
1204
- _ && /* @__PURE__ */ s("p", { className: T, style: D, children: i }),
1204
+ w && /* @__PURE__ */ s("p", { className: T, style: D, children: i }),
1205
1205
  !p && v && /* @__PURE__ */ s(
1206
1206
  "p",
1207
1207
  {
@@ -1265,7 +1265,7 @@ const er = {
1265
1265
  // tailwind preset — outline-none + a black 2px focus-visible ring
1266
1266
  // with offset, so keyboard users can see the focused card.
1267
1267
  g ? "cursor-pointer no-underline focus-ring" : null
1268
- ), x = f ? { role: "status", "aria-busy": !0, "aria-label": ar } : void 0, _ = d ? { "--accent": d } : void 0, b = c ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: c }) : null;
1268
+ ), x = f ? { role: "status", "aria-busy": !0, "aria-label": ar } : void 0, w = d ? { "--accent": d } : void 0, b = c ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: c }) : null;
1269
1269
  return n ? /* @__PURE__ */ h(
1270
1270
  "a",
1271
1271
  {
@@ -1277,7 +1277,7 @@ const er = {
1277
1277
  "data-testid": m,
1278
1278
  "data-variant": e,
1279
1279
  className: o,
1280
- style: _,
1280
+ style: w,
1281
1281
  ...x,
1282
1282
  children: [
1283
1283
  t,
@@ -1294,7 +1294,7 @@ const er = {
1294
1294
  "data-testid": m,
1295
1295
  "data-variant": e,
1296
1296
  className: N(o, "text-left"),
1297
- style: _,
1297
+ style: w,
1298
1298
  ...x,
1299
1299
  children: [
1300
1300
  t,
@@ -1308,7 +1308,7 @@ const er = {
1308
1308
  "data-testid": m,
1309
1309
  "data-variant": e,
1310
1310
  className: o,
1311
- style: _,
1311
+ style: w,
1312
1312
  ...x,
1313
1313
  children: [
1314
1314
  t,
@@ -1518,7 +1518,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1518
1518
  status: g = "ready",
1519
1519
  onDismiss: o,
1520
1520
  onEditClick: x,
1521
- dismissLabel: _ = "Dismiss attachment"
1521
+ dismissLabel: w = "Dismiss attachment"
1522
1522
  }) => {
1523
1523
  const b = d === "classic", v = Te(i, l), p = Ye({
1524
1524
  variant: "dark",
@@ -1533,14 +1533,14 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1533
1533
  {
1534
1534
  type: "button",
1535
1535
  onClick: o,
1536
- "aria-label": _,
1536
+ "aria-label": w,
1537
1537
  className: N(
1538
1538
  pr,
1539
1539
  !v && br
1540
1540
  ),
1541
1541
  children: /* @__PURE__ */ s(rt, { className: "size-3", weight: "bold" })
1542
1542
  }
1543
- ) : void 0, w = x ? /* @__PURE__ */ s(
1543
+ ) : void 0, _ = x ? /* @__PURE__ */ s(
1544
1544
  "button",
1545
1545
  {
1546
1546
  type: "button",
@@ -1596,7 +1596,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1596
1596
  url: r,
1597
1597
  appIcon: u,
1598
1598
  cta: f,
1599
- trailingAction: w,
1599
+ trailingAction: _,
1600
1600
  isLoading: p.isLoading
1601
1601
  }
1602
1602
  )
@@ -1644,13 +1644,13 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1644
1644
  onClick: g,
1645
1645
  groupPosition: o = "single"
1646
1646
  }) => {
1647
- const x = mt(r, c), _ = dt(a), b = u == null && _ != null && !x ? _ : void 0, v = u == null && !x ? g : void 0, p = m !== "loading" && Te(r, c) ? ht : void 0, y = u && g ? {
1647
+ const x = mt(r, c), w = dt(a), b = u == null && w != null && !x ? w : void 0, v = u == null && !x ? g : void 0, p = m !== "loading" && Te(r, c) ? ht : void 0, y = u && g ? {
1648
1648
  ...u,
1649
1649
  onClick: () => {
1650
1650
  var k;
1651
1651
  g(), (k = u.onClick) == null || k.call(u);
1652
1652
  }
1653
- } : u, w = Ye({
1653
+ } : u, _ = Ye({
1654
1654
  variant: "light",
1655
1655
  accentColor: f,
1656
1656
  status: m,
@@ -1662,7 +1662,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1662
1662
  return /* @__PURE__ */ s(
1663
1663
  ft,
1664
1664
  {
1665
- accentHex: w.accentHex,
1665
+ accentHex: _.accentHex,
1666
1666
  side: "receiver",
1667
1667
  visible: p == null && (o === "single" || o === "end"),
1668
1668
  children: /* @__PURE__ */ h(
@@ -1673,8 +1673,8 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1673
1673
  onClick: v,
1674
1674
  ariaLabel: e ?? "Open attachment preview",
1675
1675
  fixedHeight: l === "featured" && p == null,
1676
- accentHex: w.accentHex,
1677
- busy: w.isLoading,
1676
+ accentHex: _.accentHex,
1677
+ busy: _.isLoading,
1678
1678
  bgClassName: p,
1679
1679
  "data-testid": "link-attachment",
1680
1680
  children: [
@@ -1682,27 +1682,27 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1682
1682
  Ce,
1683
1683
  {
1684
1684
  variant: "light",
1685
- thumbnailUrl: w.thumbnailUrl,
1685
+ thumbnailUrl: _.thumbnailUrl,
1686
1686
  sourceUrl: c,
1687
1687
  title: e,
1688
1688
  mimeType: r,
1689
- isLoading: w.isLoading,
1690
- onImageError: w.onImageError
1689
+ isLoading: _.isLoading,
1690
+ onImageError: _.onImageError
1691
1691
  }
1692
1692
  ),
1693
1693
  /* @__PURE__ */ s(
1694
1694
  ut,
1695
1695
  {
1696
- chinTextColor: w.chinTextColor,
1696
+ chinTextColor: _.chinTextColor,
1697
1697
  variant: "light",
1698
- ctaSurface: w.surface,
1698
+ ctaSurface: _.surface,
1699
1699
  title: e,
1700
1700
  description: t,
1701
1701
  descriptionLines: n,
1702
1702
  url: a,
1703
1703
  appIcon: d,
1704
1704
  cta: y,
1705
- isLoading: w.isLoading
1705
+ isLoading: _.isLoading
1706
1706
  }
1707
1707
  )
1708
1708
  ]
@@ -1727,7 +1727,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1727
1727
  onClick: o,
1728
1728
  groupPosition: x = "single"
1729
1729
  }) => {
1730
- const _ = mt(i, l), b = dt(r), v = f == null && b != null && !_ ? b : void 0, p = f == null && !_ && v != null ? o : void 0, y = g !== "loading" && Te(i, l), w = Ye({
1730
+ const w = mt(i, l), b = dt(r), v = f == null && b != null && !w ? b : void 0, p = f == null && !w && v != null ? o : void 0, y = g !== "loading" && Te(i, l), _ = Ye({
1731
1731
  variant: "dark",
1732
1732
  accentColor: m,
1733
1733
  status: g,
@@ -1739,7 +1739,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1739
1739
  return /* @__PURE__ */ s(
1740
1740
  ft,
1741
1741
  {
1742
- accentHex: w.accentHex,
1742
+ accentHex: _.accentHex,
1743
1743
  side: "sender",
1744
1744
  visible: !y && (x === "single" || x === "end"),
1745
1745
  children: /* @__PURE__ */ h(
@@ -1749,28 +1749,28 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1749
1749
  href: v,
1750
1750
  onClick: p,
1751
1751
  fixedHeight: d === "featured" && !y,
1752
- accentHex: w.accentHex,
1753
- busy: w.isLoading,
1752
+ accentHex: _.accentHex,
1753
+ busy: _.isLoading,
1754
1754
  bgClassName: y ? ht : void 0,
1755
1755
  children: [
1756
1756
  d === "featured" && /* @__PURE__ */ s(
1757
1757
  Ce,
1758
1758
  {
1759
1759
  variant: "dark",
1760
- thumbnailUrl: w.thumbnailUrl,
1760
+ thumbnailUrl: _.thumbnailUrl,
1761
1761
  sourceUrl: l,
1762
1762
  title: e,
1763
1763
  mimeType: i,
1764
- isLoading: w.isLoading,
1765
- onImageError: w.onImageError
1764
+ isLoading: _.isLoading,
1765
+ onImageError: _.onImageError
1766
1766
  }
1767
1767
  ),
1768
1768
  /* @__PURE__ */ s(
1769
1769
  ut,
1770
1770
  {
1771
- chinTextColor: w.chinTextColor,
1771
+ chinTextColor: _.chinTextColor,
1772
1772
  variant: "dark",
1773
- ctaSurface: w.surface,
1773
+ ctaSurface: _.surface,
1774
1774
  title: e,
1775
1775
  placeholderTitle: t,
1776
1776
  description: n,
@@ -1778,7 +1778,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1778
1778
  url: r,
1779
1779
  appIcon: u,
1780
1780
  cta: f,
1781
- isLoading: w.isLoading
1781
+ isLoading: _.isLoading
1782
1782
  }
1783
1783
  )
1784
1784
  ]
@@ -2011,10 +2011,10 @@ function ie(e) {
2011
2011
  const Pr = {
2012
2012
  dark: "text-white/55",
2013
2013
  light: "text-black/65"
2014
- }, Fr = {
2014
+ }, Br = {
2015
2015
  dark: "bg-white/10",
2016
2016
  light: "bg-black/5"
2017
- }, Br = {
2017
+ }, Fr = {
2018
2018
  dark: "text-white/85",
2019
2019
  light: "text-black/85"
2020
2020
  }, As = ({
@@ -2032,11 +2032,11 @@ const Pr = {
2032
2032
  {
2033
2033
  className: N(
2034
2034
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
2035
- Fr[e]
2035
+ Br[e]
2036
2036
  ),
2037
2037
  "aria-hidden": !0,
2038
2038
  children: Is(a, {
2039
- className: N("size-6", Br[e]),
2039
+ className: N("size-6", Fr[e]),
2040
2040
  weight: "regular"
2041
2041
  })
2042
2042
  }
@@ -2147,7 +2147,7 @@ const zr = ({
2147
2147
  };
2148
2148
  if (o.length === 0)
2149
2149
  return null;
2150
- const _ = /* @__PURE__ */ s(
2150
+ const w = /* @__PURE__ */ s(
2151
2151
  "span",
2152
2152
  {
2153
2153
  className: N(
@@ -2172,7 +2172,7 @@ const zr = ({
2172
2172
  item: b,
2173
2173
  index: v,
2174
2174
  onActivate: x,
2175
- trailingAction: g && v === 0 ? /* @__PURE__ */ s(Re, { onClick: f, variant: "inline" }) : _
2175
+ trailingAction: g && v === 0 ? /* @__PURE__ */ s(Re, { onClick: f, variant: "inline" }) : w
2176
2176
  },
2177
2177
  `${b.src}-${v}`
2178
2178
  )) })
@@ -2482,33 +2482,36 @@ const zr = ({
2482
2482
  }) => {
2483
2483
  const i = e.length;
2484
2484
  if (i === 0) return null;
2485
- const c = e.slice(0, Math.min(i, n)), l = i - c.length, d = (f, m, g) => {
2486
- var x;
2487
- const o = N(
2485
+ const c = e.slice(0, Math.min(i, n)), l = i - c.length, d = l > 0 ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2486
+ "+",
2487
+ l
2488
+ ] }) : null, u = (m, g, o) => {
2489
+ var w;
2490
+ const x = N(
2488
2491
  Gr,
2489
2492
  "h-full w-full",
2490
- (x = Yr[c.length]) == null ? void 0 : x[m]
2493
+ (w = Yr[c.length]) == null ? void 0 : w[g]
2491
2494
  );
2492
2495
  return t ? /* @__PURE__ */ h(
2493
2496
  "button",
2494
2497
  {
2495
2498
  type: "button",
2496
- onClick: () => t(m),
2497
- "aria-label": f.ariaLabel ?? `Open media ${m + 1}`,
2498
- className: N(o, "cursor-zoom-in"),
2499
+ onClick: () => t(g),
2500
+ "aria-label": m.ariaLabel ?? `Open media ${g + 1}`,
2501
+ className: N(x, "cursor-zoom-in"),
2499
2502
  children: [
2500
- f.content,
2501
- g
2503
+ m.content,
2504
+ o
2502
2505
  ]
2503
2506
  },
2504
- m
2505
- ) : /* @__PURE__ */ h("div", { className: o, children: [
2506
- f.content,
2507
2507
  g
2508
- ] }, m);
2508
+ ) : /* @__PURE__ */ h("div", { className: x, children: [
2509
+ m.content,
2510
+ o
2511
+ ] }, g);
2509
2512
  };
2510
- let u;
2511
- return a && (u = {
2513
+ let f;
2514
+ return a && (f = {
2512
2515
  aspectRatio: a,
2513
2516
  // Hundredths keep the emitted declaration readable in devtools;
2514
2517
  // the rounding error is well under a device pixel.
@@ -2522,8 +2525,8 @@ const zr = ({
2522
2525
  a ? Xr : "aspect-square w-full",
2523
2526
  r
2524
2527
  ),
2525
- style: u,
2526
- children: d(c[0], 0)
2528
+ style: f,
2529
+ children: u(c[0], 0, d)
2527
2530
  }
2528
2531
  ) : c.length === 2 ? /* @__PURE__ */ s(
2529
2532
  "div",
@@ -2532,7 +2535,13 @@ const zr = ({
2532
2535
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2533
2536
  r
2534
2537
  ),
2535
- children: c.map((f, m) => d(f, m))
2538
+ children: c.map(
2539
+ (m, g) => u(
2540
+ m,
2541
+ g,
2542
+ g === c.length - 1 ? d : null
2543
+ )
2544
+ )
2536
2545
  }
2537
2546
  ) : c.length === 3 ? /* @__PURE__ */ h(
2538
2547
  "div",
@@ -2542,9 +2551,9 @@ const zr = ({
2542
2551
  r
2543
2552
  ),
2544
2553
  children: [
2545
- /* @__PURE__ */ s("div", { className: "row-span-2", children: d(c[0], 0) }),
2546
- d(c[1], 1),
2547
- d(c[2], 2)
2554
+ /* @__PURE__ */ s("div", { className: "row-span-2", children: u(c[0], 0) }),
2555
+ u(c[1], 1),
2556
+ u(c[2], 2, d)
2548
2557
  ]
2549
2558
  }
2550
2559
  ) : /* @__PURE__ */ s(
@@ -2561,15 +2570,12 @@ const zr = ({
2561
2570
  "grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5",
2562
2571
  r
2563
2572
  ),
2564
- children: c.map((f, m) => {
2565
- const g = l > 0 && m === c.length - 1;
2566
- return d(
2567
- f,
2573
+ children: c.map((m, g) => {
2574
+ const o = l > 0 && g === c.length - 1;
2575
+ return u(
2568
2576
  m,
2569
- g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2570
- "+",
2571
- l
2572
- ] }) : null
2577
+ g,
2578
+ o ? d : null
2573
2579
  );
2574
2580
  })
2575
2581
  }
@@ -2671,7 +2677,7 @@ const zr = ({
2671
2677
  imgRef: r,
2672
2678
  onLoad: i
2673
2679
  };
2674
- }, Fs = ({
2680
+ }, Bs = ({
2675
2681
  state: e,
2676
2682
  src: t,
2677
2683
  alt: n,
@@ -2682,7 +2688,7 @@ const zr = ({
2682
2688
  loading: l = "lazy",
2683
2689
  onClick: d
2684
2690
  }) => {
2685
- const u = Zr({ src: t, alt: n, items: r }), f = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: o, closeViewer: x } = Me(d), _ = u.length === 1, b = ei(_ ? u[0] : void 0);
2691
+ const u = Zr({ src: t, alt: n, items: r }), f = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: o, closeViewer: x } = Me(d), w = u.length === 1, b = ei(w ? u[0] : void 0);
2686
2692
  if (u.length === 0)
2687
2693
  return null;
2688
2694
  const v = u.map(
@@ -2691,8 +2697,8 @@ const zr = ({
2691
2697
  index: y,
2692
2698
  totalCount: u.length,
2693
2699
  fallbackLoading: l,
2694
- imgRef: _ ? b.imgRef : void 0,
2695
- onLoad: _ ? b.onLoad : void 0
2700
+ imgRef: w ? b.imgRef : void 0,
2701
+ onLoad: w ? b.onLoad : void 0
2696
2702
  })
2697
2703
  );
2698
2704
  return /* @__PURE__ */ h(
@@ -2702,7 +2708,7 @@ const zr = ({
2702
2708
  text: i,
2703
2709
  groupPosition: c,
2704
2710
  bordered: !1,
2705
- widthClassName: _ ? "w-fit max-w-[min(100%,313px)] sm:max-w-[min(100%,330px)]" : "w-[383px] max-w-full",
2711
+ widthClassName: w ? "w-fit max-w-[min(100%,313px)] sm:max-w-[min(100%,330px)]" : "w-[383px] max-w-full",
2706
2712
  paddingClassName: "p-0.5",
2707
2713
  radiusClassName: "rounded-[20px]",
2708
2714
  "data-testid": "image-attachment",
@@ -2712,7 +2718,7 @@ const zr = ({
2712
2718
  {
2713
2719
  tiles: v,
2714
2720
  onTileActivate: o,
2715
- singleAspectRatio: _ ? b.ratio : void 0
2721
+ singleAspectRatio: w ? b.ratio : void 0
2716
2722
  }
2717
2723
  ) }),
2718
2724
  /* @__PURE__ */ s(
@@ -2727,7 +2733,7 @@ const zr = ({
2727
2733
  ]
2728
2734
  }
2729
2735
  );
2730
- }, ti = (e) => /* @__PURE__ */ s(Jr, { ...e }), si = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "received" }), ai = {
2736
+ }, ti = (e) => /* @__PURE__ */ s(Jr, { ...e }), si = (e) => /* @__PURE__ */ s(Bs, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ s(Bs, { ...e, state: "received" }), ai = {
2731
2737
  Composer: ti,
2732
2738
  Sent: si,
2733
2739
  Received: ni
@@ -2821,7 +2827,7 @@ const zr = ({
2821
2827
  onClick: d,
2822
2828
  onDismiss: u
2823
2829
  }) => {
2824
- const f = Le(e), m = oi({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: o, handleActivate: x, closeViewer: _ } = Me(d), b = e === "composer" && !!u;
2830
+ const f = Le(e), m = oi({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: o, handleActivate: x, closeViewer: w } = Me(d), b = e === "composer" && !!u;
2825
2831
  if (m.length === 0)
2826
2832
  return null;
2827
2833
  const v = m.map((p) => ({
@@ -2837,13 +2843,13 @@ const zr = ({
2837
2843
  "data-testid": "pdf-attachment",
2838
2844
  children: [
2839
2845
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((p, y) => {
2840
- const w = p.filename ?? ie(p.src), k = b && y === 0 ? /* @__PURE__ */ s(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2846
+ const _ = p.filename ?? ie(p.src), k = b && y === 0 ? /* @__PURE__ */ s(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2841
2847
  Ms,
2842
2848
  {
2843
2849
  url: p.src,
2844
- filename: w,
2850
+ filename: _,
2845
2851
  variant: "inline",
2846
- label: `Download ${w}`,
2852
+ label: `Download ${_}`,
2847
2853
  tone: f
2848
2854
  }
2849
2855
  );
@@ -2865,7 +2871,7 @@ const zr = ({
2865
2871
  open: g,
2866
2872
  items: v,
2867
2873
  initialIndex: o,
2868
- onClose: _
2874
+ onClose: w
2869
2875
  }
2870
2876
  )
2871
2877
  ]
@@ -2875,7 +2881,7 @@ const zr = ({
2875
2881
  Composer: ci,
2876
2882
  Sent: di,
2877
2883
  Received: ui
2878
- }, Bs = ({
2884
+ }, Fs = ({
2879
2885
  open: e,
2880
2886
  items: t,
2881
2887
  initialIndex: n = 0,
@@ -2978,7 +2984,7 @@ const zr = ({
2978
2984
  ),
2979
2985
  c ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Re, { onClick: c }) }) : null,
2980
2986
  /* @__PURE__ */ s(
2981
- Bs,
2987
+ Fs,
2982
2988
  {
2983
2989
  open: l,
2984
2990
  items: $s([{ src: e, poster: t, mimeType: n, preload: r }], a),
@@ -2999,7 +3005,7 @@ const zr = ({
2999
3005
  preload: d,
3000
3006
  onClick: u
3001
3007
  }) => {
3002
- const f = gi({ src: t, poster: n, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: o, handleActivate: x, closeViewer: _ } = Me(u);
3008
+ const f = gi({ src: t, poster: n, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: o, handleActivate: x, closeViewer: w } = Me(u);
3003
3009
  if (f.length === 0)
3004
3010
  return null;
3005
3011
  const b = f.map(
@@ -3015,12 +3021,12 @@ const zr = ({
3015
3021
  children: [
3016
3022
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Os, { tiles: b, onTileActivate: x }) }),
3017
3023
  /* @__PURE__ */ s(
3018
- Bs,
3024
+ Fs,
3019
3025
  {
3020
3026
  open: g,
3021
3027
  items: $s(f, r),
3022
3028
  initialIndex: o,
3023
- onClose: _
3029
+ onClose: w
3024
3030
  }
3025
3031
  )
3026
3032
  ]
@@ -3200,10 +3206,10 @@ const Ti = ({
3200
3206
  const i = Ni(r), c = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Qt(l.attachments[0] ?? {}).url : void 0, u = c && _i(c, d) ? void 0 : c;
3201
3207
  let f = 0;
3202
3208
  const m = [], g = u ? "middle" : e, o = e === "single" || e === "end", x = (v, p, y) => {
3203
- const w = t ? at.Sent : at.Received;
3209
+ const _ = t ? at.Sent : at.Received;
3204
3210
  m.push(
3205
3211
  /* @__PURE__ */ s(
3206
- w,
3212
+ _,
3207
3213
  {
3208
3214
  ...Qt(v),
3209
3215
  groupPosition: y ? g : "middle"
@@ -3211,7 +3217,7 @@ const Ti = ({
3211
3217
  p
3212
3218
  )
3213
3219
  );
3214
- }, _ = (v, p) => {
3220
+ }, w = (v, p) => {
3215
3221
  const y = Ci(
3216
3222
  f,
3217
3223
  i,
@@ -3232,16 +3238,16 @@ const Ti = ({
3232
3238
  return r.forEach((v, p) => {
3233
3239
  const y = p === r.length - 1;
3234
3240
  if (v.type === "link") {
3235
- v.attachments.forEach((w, k) => {
3241
+ v.attachments.forEach((_, k) => {
3236
3242
  x(
3237
- w,
3243
+ _,
3238
3244
  `link-${p}-${k}`,
3239
3245
  y && k === v.attachments.length - 1
3240
3246
  );
3241
3247
  });
3242
3248
  return;
3243
3249
  }
3244
- _(v, `media-${p}`);
3250
+ w(v, `media-${p}`);
3245
3251
  }), /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
3246
3252
  /* @__PURE__ */ h(
3247
3253
  "div",
@@ -3267,7 +3273,7 @@ const Ti = ({
3267
3273
  "relative isolate": o
3268
3274
  }),
3269
3275
  children: [
3270
- /* @__PURE__ */ s(Be, { message: n, renderText: a }),
3276
+ /* @__PURE__ */ s(Fe, { message: n, renderText: a }),
3271
3277
  /* @__PURE__ */ s(st, {}),
3272
3278
  o && /* @__PURE__ */ s(je, { side: t ? "me" : "other" })
3273
3279
  ]
@@ -3275,7 +3281,7 @@ const Ti = ({
3275
3281
  ) : null
3276
3282
  ] });
3277
3283
  }, Ai = (e) => {
3278
- var Et, It, Tt, At, Rt, Lt, Mt, Dt, Ot, Pt, Ft;
3284
+ var Et, It, Tt, At, Rt, Lt, Mt, Dt, Ot, Pt, Bt;
3279
3285
  const {
3280
3286
  additionalMessageInputProps: t,
3281
3287
  editing: n,
@@ -3291,17 +3297,17 @@ const Ti = ({
3291
3297
  isMyMessage: g,
3292
3298
  message: o,
3293
3299
  renderText: x,
3294
- threadList: _,
3300
+ threadList: w,
3295
3301
  viewerLanguage: b,
3296
3302
  onOutboundClick: v,
3297
3303
  resolvedOutbound: p
3298
- } = e, { client: y } = Ge("CustomMessage"), { channel: w } = be("CustomMessage"), { isUnlocking: k, onUnlockClick: T, onFetchSource: A, onDownloadClick: D } = Ra("LockedAttachment"), [F, R] = $(!1), S = on(o.id), {
3304
+ } = e, { client: y } = Ge("CustomMessage"), { channel: _ } = be("CustomMessage"), { isUnlocking: k, onUnlockClick: T, onFetchSource: A, onDownloadClick: D } = Ra("LockedAttachment"), [B, R] = $(!1), S = on(o.id), {
3299
3305
  Attachment: I = ln,
3300
3306
  EditMessageModal: E = cn,
3301
3307
  MessageActions: C,
3302
3308
  MessageBlocked: M = dn,
3303
3309
  MessageBouncePrompt: U = un,
3304
- MessageDeleted: B = mn,
3310
+ MessageDeleted: F = mn,
3305
3311
  MessageIsThreadReplyInChannelButtonIndicator: O = hn,
3306
3312
  MessageRepliesCountButton: W = fn,
3307
3313
  ReminderNotification: H = gn,
@@ -3313,8 +3319,8 @@ const Ti = ({
3313
3319
  ), P = re(() => {
3314
3320
  const me = o.attachments ?? [], pe = o.shared_location ? [o.shared_location, ...me] : me;
3315
3321
  if (!Ue(o)) return pe;
3316
- const Bt = pe.filter((zt) => !("type" in zt) || !ot(zt));
3317
- return Bt.length === pe.length ? pe : Bt;
3322
+ const Ft = pe.filter((zt) => !("type" in zt) || !ot(zt));
3323
+ return Ft.length === pe.length ? pe : Ft;
3318
3324
  }, [o]), se = re(
3319
3325
  () => js(P),
3320
3326
  [P]
@@ -3328,10 +3334,10 @@ const Ti = ({
3328
3334
  if (xn(o))
3329
3335
  return null;
3330
3336
  if (o.deleted_at || o.type === "deleted")
3331
- return /* @__PURE__ */ s(B, { message: o });
3337
+ return /* @__PURE__ */ s(F, { message: o });
3332
3338
  if (wn(o))
3333
3339
  return /* @__PURE__ */ s(M, {});
3334
- const ae = !_ && !!o.reply_count, ue = !_ && o.show_in_channel && o.parent_id, le = o.status === "failed" && ((Et = o.error) == null ? void 0 : Et.status) !== 403, _t = _n(o);
3340
+ const ae = !w && !!o.reply_count, ue = !w && o.show_in_channel && o.parent_id, le = o.status === "failed" && ((Et = o.error) == null ? void 0 : Et.status) !== 403, _t = _n(o);
3335
3341
  let ge;
3336
3342
  le ? ge = () => u(o) : _t && (ge = () => R(!0));
3337
3343
  const Z = g(), qs = N(
@@ -3355,7 +3361,7 @@ const Ti = ({
3355
3361
  contentType: "text",
3356
3362
  amountText: (Tt = o.metadata) == null ? void 0 : Tt.amount_text,
3357
3363
  paymentStatus: (At = o.metadata) == null ? void 0 : At.payment_status,
3358
- renderedText: o.text && /* @__PURE__ */ s(Be, { message: V, renderText: x })
3364
+ renderedText: o.text && /* @__PURE__ */ s(Fe, { message: V, renderText: x })
3359
3365
  }, St = {
3360
3366
  contentType: "media",
3361
3367
  title: (Rt = o.metadata) == null ? void 0 : Rt.attachment_title,
@@ -3364,7 +3370,7 @@ const Ti = ({
3364
3370
  amountText: (Dt = o.metadata) == null ? void 0 : Dt.amount_text,
3365
3371
  detail: (Ot = o.metadata) == null ? void 0 : Ot.attachment_detail,
3366
3372
  paymentStatus: (Pt = o.metadata) == null ? void 0 : Pt.payment_status,
3367
- onFetchSource: A ? () => A(o, w) : void 0
3373
+ onFetchSource: A ? () => A(o, _) : void 0
3368
3374
  }, kt = /* @__PURE__ */ h(
3369
3375
  "div",
3370
3376
  {
@@ -3372,7 +3378,7 @@ const Ti = ({
3372
3378
  "relative isolate": de
3373
3379
  }),
3374
3380
  children: [
3375
- /* @__PURE__ */ s(Be, { message: V, renderText: x }),
3381
+ /* @__PURE__ */ s(Fe, { message: V, renderText: x }),
3376
3382
  de && /* @__PURE__ */ s(je, { side: Z ? "me" : "other" })
3377
3383
  ]
3378
3384
  }
@@ -3384,12 +3390,12 @@ const Ti = ({
3384
3390
  additionalMessageInputProps: t
3385
3391
  }
3386
3392
  ),
3387
- F && /* @__PURE__ */ s(
3393
+ B && /* @__PURE__ */ s(
3388
3394
  yn,
3389
3395
  {
3390
3396
  MessageBouncePrompt: U,
3391
3397
  onClose: () => R(!1),
3392
- open: F
3398
+ open: B
3393
3399
  }
3394
3400
  ),
3395
3401
  /* @__PURE__ */ h(
@@ -3432,7 +3438,7 @@ const Ti = ({
3432
3438
  },
3433
3439
  children: yt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
3434
3440
  /* @__PURE__ */ s(Va, { message: o }),
3435
- ((Ft = o.text) == null ? void 0 : Ft.trim()) && kt
3441
+ ((Bt = o.text) == null ? void 0 : Bt.trim()) && kt
3436
3442
  ] }) : Pa(o) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3437
3443
  Z && C && /* @__PURE__ */ s(C, {}),
3438
3444
  Z ? /* @__PURE__ */ s(Pe, { ...Ct, isMine: !0 }) : /* @__PURE__ */ s(
@@ -3441,11 +3447,11 @@ const Ti = ({
3441
3447
  ...Ct,
3442
3448
  isMine: !1,
3443
3449
  isUnlocking: k(o.id),
3444
- onUnlockClick: () => T == null ? void 0 : T(o, w)
3450
+ onUnlockClick: () => T == null ? void 0 : T(o, _)
3445
3451
  }
3446
3452
  ),
3447
3453
  !Z && C && /* @__PURE__ */ s(C, {})
3448
- ] }) }) : Fa(o) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-locked-attachment-wrapper", children: [
3454
+ ] }) }) : Ba(o) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-locked-attachment-wrapper", children: [
3449
3455
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3450
3456
  Z && C && /* @__PURE__ */ s(C, {}),
3451
3457
  Z ? /* @__PURE__ */ s(
@@ -3453,7 +3459,7 @@ const Ti = ({
3453
3459
  {
3454
3460
  ...St,
3455
3461
  isMine: !0,
3456
- onPreviewClick: () => T ? T(o, w) : void 0
3462
+ onPreviewClick: () => T ? T(o, _) : void 0
3457
3463
  }
3458
3464
  ) : /* @__PURE__ */ s(
3459
3465
  Pe,
@@ -3461,8 +3467,8 @@ const Ti = ({
3461
3467
  ...St,
3462
3468
  isMine: !1,
3463
3469
  isUnlocking: k(o.id),
3464
- onUnlockClick: () => T ? T(o, w) : void 0,
3465
- onDownloadClick: () => D ? D(o, w) : void 0
3470
+ onUnlockClick: () => T ? T(o, _) : void 0,
3471
+ onDownloadClick: () => D ? D(o, _) : void 0
3466
3472
  }
3467
3473
  ),
3468
3474
  !Z && C && /* @__PURE__ */ s(C, {})
@@ -3513,7 +3519,7 @@ const Ti = ({
3513
3519
  renderText: x
3514
3520
  }
3515
3521
  ) : /* @__PURE__ */ s(
3516
- Be,
3522
+ Fe,
3517
3523
  {
3518
3524
  message: V,
3519
3525
  renderText: x
@@ -3612,7 +3618,7 @@ const Ti = ({
3612
3618
  linkPreviews: Array.from(e.previews.values()).filter(
3613
3619
  (t) => tt.previewIsLoaded(t) || tt.previewIsLoading(t)
3614
3620
  )
3615
- }), Fi = () => {
3621
+ }), Bi = () => {
3616
3622
  const { linkPreviewsManager: e } = Cn(), { linkPreviews: t } = Sn(
3617
3623
  e.state,
3618
3624
  Pi
@@ -3679,7 +3685,7 @@ const Ti = ({
3679
3685
  );
3680
3686
  }) })
3681
3687
  ) : null;
3682
- }, He = L.createContext(!1), Bi = 200, Uo = () => he(He), zi = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3688
+ }, He = L.createContext(!1), Fi = 200, Uo = () => he(He), zi = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3683
3689
  "button",
3684
3690
  {
3685
3691
  ...n,
@@ -3758,7 +3764,7 @@ const Ti = ({
3758
3764
  children: [
3759
3765
  /* @__PURE__ */ h("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
3760
3766
  /* @__PURE__ */ s(Tn, {}),
3761
- /* @__PURE__ */ s(Fi, {}),
3767
+ /* @__PURE__ */ s(Bi, {}),
3762
3768
  /* @__PURE__ */ s(i, {})
3763
3769
  ] }),
3764
3770
  /* @__PURE__ */ h("div", { className: "messaging-composer-row flex items-start", children: [
@@ -3819,7 +3825,7 @@ const Ti = ({
3819
3825
  o = b;
3820
3826
  const p = Array.from(
3821
3827
  g.querySelectorAll(".str-chat__list")
3822
- ).find((w) => w.scrollHeight > w.clientHeight) ?? null, y = p ? p.scrollHeight - p.scrollTop - p.clientHeight < Bi : !1;
3828
+ ).find((_) => _.scrollHeight > _.clientHeight) ?? null, y = p ? p.scrollHeight - p.scrollTop - p.clientHeight < Fi : !1;
3823
3829
  g.style.setProperty(
3824
3830
  "--messaging-composer-height",
3825
3831
  `${b}px`
@@ -3827,9 +3833,9 @@ const Ti = ({
3827
3833
  };
3828
3834
  if (x(), typeof ResizeObserver > "u")
3829
3835
  return;
3830
- const _ = new ResizeObserver(x);
3831
- return _.observe(m), () => {
3832
- _.disconnect(), g.style.removeProperty("--messaging-composer-height");
3836
+ const w = new ResizeObserver(x);
3837
+ return w.observe(m), () => {
3838
+ w.disconnect(), g.style.removeProperty("--messaging-composer-height");
3833
3839
  };
3834
3840
  }, [d]), a ? d ? /* @__PURE__ */ h(
3835
3841
  "div",
@@ -4023,7 +4029,7 @@ const Ti = ({
4023
4029
  Ke.Generating,
4024
4030
  Ke.ExternalSources
4025
4031
  ]), Ki = ({ threadList: e }) => {
4026
- var x, _;
4032
+ var x, w;
4027
4033
  const { channel: t, channelConfig: n, thread: a } = be(), { client: r } = Ge(), { typing: i = {} } = Rn(), { aiState: c } = Ln(t), l = he(Hs);
4028
4034
  if (!e && l && qi.has(c)) {
4029
4035
  const b = Zi(t, (x = r.user) == null ? void 0 : x.id);
@@ -4052,7 +4058,7 @@ const Ti = ({
4052
4058
  ) : [], m = e ? f : u;
4053
4059
  if (!m.length)
4054
4060
  return null;
4055
- const g = (_ = m[0]) == null ? void 0 : _.user, o = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4061
+ const g = (w = m[0]) == null ? void 0 : w.user, o = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4056
4062
  return /* @__PURE__ */ s(
4057
4063
  as,
4058
4064
  {
@@ -4182,17 +4188,17 @@ const eo = ({
4182
4188
  showReportParticipant: g = !0,
4183
4189
  composerDisabled: o = !1,
4184
4190
  composerDisabledReason: x,
4185
- showStarButton: _ = !1,
4191
+ showStarButton: w = !1,
4186
4192
  renderChannelBanner: b,
4187
4193
  customChannelActions: v,
4188
4194
  renderChannelActions: p,
4189
4195
  renderMessage: y,
4190
- viewerLanguage: w,
4196
+ viewerLanguage: _,
4191
4197
  showChannelInfo: k = !0,
4192
4198
  onParticipantNameClick: T,
4193
4199
  onOutboundClick: A,
4194
4200
  resolveOutbound: D,
4195
- composerInput: F
4201
+ composerInput: B
4196
4202
  }) => {
4197
4203
  const { channel: R, messages: S } = be(), I = j(A);
4198
4204
  q(() => {
@@ -4203,14 +4209,14 @@ const eo = ({
4203
4209
  (X = I.current) == null || X.call(I, H);
4204
4210
  }, []), C = A ? E : void 0, M = Ha(S, D), U = R.state.messages.some(
4205
4211
  (H) => H.type !== "deleted"
4206
- ), B = b ? /* @__PURE__ */ s(L.Fragment, { children: b() }, "lt-channel-banner") : null, O = /* @__PURE__ */ s(
4212
+ ), F = b ? /* @__PURE__ */ s(L.Fragment, { children: b() }, "lt-channel-banner") : null, O = /* @__PURE__ */ s(
4207
4213
  ka,
4208
4214
  {
4209
4215
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4210
4216
  onBack: e,
4211
4217
  showBackButton: t,
4212
4218
  showChannelInfo: k,
4213
- showStarButton: _,
4219
+ showStarButton: w,
4214
4220
  onLeaveConversation: i,
4215
4221
  onBlockParticipant: c,
4216
4222
  showDeleteConversation: l,
@@ -4229,13 +4235,13 @@ const eo = ({
4229
4235
  Li,
4230
4236
  {
4231
4237
  ...H,
4232
- viewerLanguage: w,
4238
+ viewerLanguage: _,
4233
4239
  onOutboundClick: C
4234
4240
  }
4235
4241
  );
4236
4242
  return !y || !X ? K : y(K, X);
4237
4243
  },
4238
- [C, y, w]
4244
+ [C, y, _]
4239
4245
  );
4240
4246
  return /* @__PURE__ */ s(Cs.Provider, { value: M, children: /* @__PURE__ */ s(
4241
4247
  Dn,
@@ -4246,7 +4252,7 @@ const eo = ({
4246
4252
  UnreadMessagesNotification: () => null,
4247
4253
  UnreadMessagesSeparator: () => null
4248
4254
  },
4249
- children: /* @__PURE__ */ s(On, { children: F ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4255
+ children: /* @__PURE__ */ s(On, { children: B ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4250
4256
  /* @__PURE__ */ h(
4251
4257
  "div",
4252
4258
  {
@@ -4254,14 +4260,14 @@ const eo = ({
4254
4260
  children: [
4255
4261
  !U && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ h("div", { className: "str-chat__message-list-scroll", children: [
4256
4262
  O,
4257
- B
4263
+ F
4258
4264
  ] }) }),
4259
4265
  /* @__PURE__ */ s(
4260
4266
  Ut,
4261
4267
  {
4262
4268
  head: U ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4263
4269
  O,
4264
- B
4270
+ F
4265
4271
  ] }) : void 0,
4266
4272
  hideDeletedMessages: !0,
4267
4273
  hideNewMessageSeparator: !1
@@ -4283,7 +4289,7 @@ const eo = ({
4283
4289
  renderFooter: () => a == null ? void 0 : a(R),
4284
4290
  disabled: o,
4285
4291
  disabledReason: x,
4286
- composerInput: F
4292
+ composerInput: B
4287
4293
  },
4288
4294
  "lt-channel-message-input"
4289
4295
  )
@@ -4295,14 +4301,14 @@ const eo = ({
4295
4301
  children: [
4296
4302
  !U && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ h("div", { className: "str-chat__message-list-scroll", children: [
4297
4303
  O,
4298
- B
4304
+ F
4299
4305
  ] }) }),
4300
4306
  /* @__PURE__ */ s(
4301
4307
  Ut,
4302
4308
  {
4303
4309
  head: U ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4304
4310
  O,
4305
- B
4311
+ F
4306
4312
  ] }) : void 0,
4307
4313
  hideDeletedMessages: !0,
4308
4314
  hideNewMessageSeparator: !1
@@ -4322,7 +4328,7 @@ const eo = ({
4322
4328
  renderFooter: () => a == null ? void 0 : a(R),
4323
4329
  disabled: o,
4324
4330
  disabledReason: x,
4325
- composerInput: F
4331
+ composerInput: B
4326
4332
  },
4327
4333
  "lt-channel-message-input"
4328
4334
  )
@@ -4346,17 +4352,17 @@ const eo = ({
4346
4352
  onBlockParticipantClick: g,
4347
4353
  onReportParticipantClick: o,
4348
4354
  showBlockParticipant: x = !0,
4349
- showReportParticipant: _ = !0,
4355
+ showReportParticipant: w = !0,
4350
4356
  composerDisabled: b = !1,
4351
4357
  composerDisabledReason: v,
4352
4358
  dmAgentEnabled: p,
4353
4359
  messageMetadata: y,
4354
- onMessageSent: w,
4360
+ onMessageSent: _,
4355
4361
  showStarButton: k = !1,
4356
4362
  renderChannelBanner: T,
4357
4363
  customChannelActions: A,
4358
4364
  renderChannelActions: D,
4359
- renderMessage: F,
4365
+ renderMessage: B,
4360
4366
  onMessageLinkClick: R,
4361
4367
  sendButton: S,
4362
4368
  attachmentPreviewList: I,
@@ -4364,7 +4370,7 @@ const eo = ({
4364
4370
  showChannelInfo: C = !0,
4365
4371
  onParticipantNameClick: M,
4366
4372
  onOutboundClick: U,
4367
- resolveOutbound: B,
4373
+ resolveOutbound: F,
4368
4374
  composerInput: O
4369
4375
  }) => {
4370
4376
  const W = J(
@@ -4383,9 +4389,9 @@ const eo = ({
4383
4389
  ...te,
4384
4390
  ...P && { skip_push: !0 }
4385
4391
  }, ee = await e.sendMessage(se, V);
4386
- return w == null || w(ee), ee;
4392
+ return _ == null || _(ee), ee;
4387
4393
  },
4388
- [e, p, y, w]
4394
+ [e, p, y, _]
4389
4395
  ), H = j(null);
4390
4396
  q(() => {
4391
4397
  if (!R) return;
@@ -4437,19 +4443,19 @@ const eo = ({
4437
4443
  onBlockParticipantClick: g,
4438
4444
  onReportParticipantClick: o,
4439
4445
  showBlockParticipant: x,
4440
- showReportParticipant: _,
4446
+ showReportParticipant: w,
4441
4447
  composerDisabled: b,
4442
4448
  composerDisabledReason: v,
4443
4449
  showStarButton: k,
4444
4450
  renderChannelBanner: T,
4445
4451
  customChannelActions: A,
4446
4452
  renderChannelActions: D,
4447
- renderMessage: F,
4453
+ renderMessage: B,
4448
4454
  viewerLanguage: E,
4449
4455
  showChannelInfo: C,
4450
4456
  onParticipantNameClick: M,
4451
4457
  onOutboundClick: U,
4452
- resolveOutbound: B,
4458
+ resolveOutbound: F,
4453
4459
  composerInput: O
4454
4460
  }
4455
4461
  )
@@ -4491,25 +4497,25 @@ const jo = ({
4491
4497
  viewerLanguage: g,
4492
4498
  renderChannelBanner: o,
4493
4499
  customChannelActions: x,
4494
- renderChannelActions: _,
4500
+ renderChannelActions: w,
4495
4501
  onParticipantNameClick: b,
4496
4502
  onOutboundClick: v,
4497
4503
  resolveOutbound: p,
4498
4504
  renderMessage: y,
4499
- onMessageLinkClick: w,
4505
+ onMessageLinkClick: _,
4500
4506
  showChannelInfo: k,
4501
4507
  composerInput: T,
4502
4508
  attachmentPreviewList: A
4503
4509
  }) => {
4504
4510
  const {
4505
4511
  client: D,
4506
- isConnected: F,
4512
+ isConnected: B,
4507
4513
  isLoading: R,
4508
4514
  error: S,
4509
4515
  refreshConnection: I,
4510
4516
  service: E,
4511
4517
  debug: C
4512
- } = ga(), [M, U] = $(null), [B, O] = $(null), [W, H] = $(!1), { showDeleteConversation: X = !0 } = e, K = j(c);
4518
+ } = ga(), [M, U] = $(null), [F, O] = $(null), [W, H] = $(!1), { showDeleteConversation: X = !0 } = e, K = j(c);
4513
4519
  K.current = c;
4514
4520
  const G = j(a);
4515
4521
  G.current = a;
@@ -4517,7 +4523,7 @@ const jo = ({
4517
4523
  q(() => {
4518
4524
  Q.current = M;
4519
4525
  }, [M]), q(() => {
4520
- if (!D || !F) return;
4526
+ if (!D || !B) return;
4521
4527
  const V = D.userID;
4522
4528
  if (!V) return;
4523
4529
  const ee = `${V}::${i}`;
@@ -4579,20 +4585,20 @@ const jo = ({
4579
4585
  ), ne(), Q.current || O("Failed to load conversation");
4580
4586
  }
4581
4587
  })();
4582
- }, [i, D, F, E, C]);
4588
+ }, [i, D, B, E, C]);
4583
4589
  const P = j(r);
4584
4590
  P.current = r;
4585
4591
  const se = J(() => {
4586
4592
  var V;
4587
4593
  U(null), H(!0), (V = P.current) == null || V.call(P);
4588
4594
  }, []);
4589
- return R ? /* @__PURE__ */ s(Ve, {}) : S ? /* @__PURE__ */ s(ye, { message: S, onBack: I }) : !F || !D ? /* @__PURE__ */ s(
4595
+ return R ? /* @__PURE__ */ s(Ve, {}) : S ? /* @__PURE__ */ s(ye, { message: S, onBack: I }) : !B || !D ? /* @__PURE__ */ s(
4590
4596
  ye,
4591
4597
  {
4592
4598
  message: "Not connected to messaging service",
4593
4599
  onBack: I
4594
4600
  }
4595
- ) : B ? /* @__PURE__ */ s(ye, { message: B }) : W && !M ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : M ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4601
+ ) : F ? /* @__PURE__ */ s(ye, { message: F }) : W && !M ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : M ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4596
4602
  Vs,
4597
4603
  {
4598
4604
  channel: M,
@@ -4609,12 +4615,12 @@ const jo = ({
4609
4615
  onMessageSent: m,
4610
4616
  viewerLanguage: g,
4611
4617
  customChannelActions: x,
4612
- renderChannelActions: _,
4618
+ renderChannelActions: w,
4613
4619
  onParticipantNameClick: b,
4614
4620
  onOutboundClick: v,
4615
4621
  resolveOutbound: p,
4616
4622
  renderMessage: y,
4617
- onMessageLinkClick: w,
4623
+ onMessageLinkClick: _,
4618
4624
  showChannelInfo: k,
4619
4625
  composerInput: T,
4620
4626
  attachmentPreviewList: A
@@ -4658,7 +4664,7 @@ const Gs = L.createContext({
4658
4664
  });
4659
4665
  }, Ys = L.memo(
4660
4666
  (e) => {
4661
- var D, F, R;
4667
+ var D, B, R;
4662
4668
  const { channel: t, unread: n } = e, {
4663
4669
  selectedChannel: a,
4664
4670
  onChannelSelect: r,
@@ -4687,7 +4693,7 @@ const Gs = L.createContext({
4687
4693
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
4688
4694
  u == null ? void 0 : u.userID,
4689
4695
  t == null ? void 0 : t.type
4690
- ), _ = xs(x == null ? void 0 : x.user), b = (F = x == null ? void 0 : x.user) == null ? void 0 : F.image, v = (() => {
4696
+ ), w = xs(x == null ? void 0 : x.user), b = (B = x == null ? void 0 : x.user) == null ? void 0 : B.image, v = (() => {
4691
4697
  var I;
4692
4698
  const S = (I = t == null ? void 0 : t.state) == null ? void 0 : I.messages;
4693
4699
  if (S != null && S.length) {
@@ -4713,13 +4719,13 @@ const Gs = L.createContext({
4713
4719
  if (S) return S;
4714
4720
  const C = (M = v == null ? void 0 : v.attachments) == null ? void 0 : M[0];
4715
4721
  return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4716
- })(), w = v != null && v.created_at ? ro(new Date(v.created_at)) : "", k = v ? Ue(v) : !1, T = l ? l(v, y) : `${k ? "✨ " : ""}${y}`, A = n ?? 0;
4722
+ })(), _ = v != null && v.created_at ? ro(new Date(v.created_at)) : "", k = v ? Ue(v) : !1, T = l ? l(v, y) : `${k ? "✨ " : ""}${y}`, A = n ?? 0;
4717
4723
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4718
4724
  channelId: t == null ? void 0 : t.id,
4719
4725
  isSelected: f,
4720
- participantName: _,
4726
+ participantName: w,
4721
4727
  unreadCount: A,
4722
- hasTimestamp: !!w
4728
+ hasTimestamp: !!_
4723
4729
  }), /* @__PURE__ */ s(
4724
4730
  "div",
4725
4731
  {
@@ -4740,7 +4746,7 @@ const Gs = L.createContext({
4740
4746
  ke,
4741
4747
  {
4742
4748
  id: ((R = x == null ? void 0 : x.user) == null ? void 0 : R.id) || t.id || "unknown",
4743
- name: _,
4749
+ name: w,
4744
4750
  image: b,
4745
4751
  size: 48,
4746
4752
  starred: m
@@ -4756,11 +4762,11 @@ const Gs = L.createContext({
4756
4762
  ),
4757
4763
  children: [
4758
4764
  m && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
4759
- _
4765
+ w
4760
4766
  ]
4761
4767
  }
4762
4768
  ),
4763
- w && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: w })
4769
+ _ && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
4764
4770
  ] }),
4765
4771
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
4766
4772
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: T }),
@@ -4783,20 +4789,20 @@ const io = { last_message_at: -1 }, oo = L.memo(
4783
4789
  sort: i = io,
4784
4790
  className: c,
4785
4791
  customEmptyStateIndicator: l,
4786
- channelListPaginator: d = Fn,
4792
+ channelListPaginator: d = Bn,
4787
4793
  channelPreview: u,
4788
4794
  renderMessagePreview: f,
4789
4795
  viewerLanguage: m,
4790
4796
  lockChannelOrder: g,
4791
4797
  onMessageNewHandler: o,
4792
4798
  onMessageNew: x,
4793
- onChannelVisible: _,
4799
+ onChannelVisible: w,
4794
4800
  onAddedToChannel: b,
4795
4801
  onChannelUpdated: v
4796
4802
  }) => {
4797
4803
  const p = L.useRef(0);
4798
4804
  p.current++;
4799
- const { debug: y = !1 } = it(), w = L.useCallback(
4805
+ const { debug: y = !1 } = it(), _ = L.useCallback(
4800
4806
  (T) => {
4801
4807
  for (const A of T)
4802
4808
  to(A);
@@ -4841,11 +4847,11 @@ const io = { last_message_at: -1 }, oo = L.memo(
4841
4847
  sort: i,
4842
4848
  options: { limit: 30 },
4843
4849
  allowNewMessagesFromUnfilteredChannels: a,
4844
- channelRenderFilterFn: w,
4850
+ channelRenderFilterFn: _,
4845
4851
  lockChannelOrder: g,
4846
4852
  onMessageNewHandler: o,
4847
4853
  onMessageNew: x,
4848
- onChannelVisible: _,
4854
+ onChannelVisible: w,
4849
4855
  onAddedToChannel: b,
4850
4856
  onChannelUpdated: v,
4851
4857
  Paginator: d,
@@ -4973,7 +4979,7 @@ const lo = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
4973
4979
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
4974
4980
  mo[e]
4975
4981
  ),
4976
- children: l.map(({ src: o, index: x }, _) => /* @__PURE__ */ s(
4982
+ children: l.map(({ src: o, index: x }, w) => /* @__PURE__ */ s(
4977
4983
  "img",
4978
4984
  {
4979
4985
  src: Ee(o) ?? o,
@@ -4984,8 +4990,8 @@ const lo = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
4984
4990
  onError: () => a((b) => ({ ...b, [x]: !0 })),
4985
4991
  className: "absolute left-1/2 top-1/2 w-[62%] aspect-[3/2] rounded-[12px] bg-[#ffffff] object-cover shadow-md",
4986
4992
  style: {
4987
- transform: `translate(-50%, -50%) translateX(${f[_]}px) rotate(${u[_]}deg) scale(${g[_]})`,
4988
- zIndex: m[_]
4993
+ transform: `translate(-50%, -50%) translateX(${f[w]}px) rotate(${u[w]}deg) scale(${g[w]})`,
4994
+ zIndex: m[w]
4989
4995
  }
4990
4996
  },
4991
4997
  `${o}-${x}`
@@ -5217,7 +5223,7 @@ export {
5217
5223
  Ra as B,
5218
5224
  Ji as C,
5219
5225
  ga as D,
5220
- Fo as E,
5226
+ Bo as E,
5221
5227
  Go as F,
5222
5228
  at as L,
5223
5229
  we as M,
@@ -5232,7 +5238,7 @@ export {
5232
5238
  Ie as g,
5233
5239
  Vo as h,
5234
5240
  fa as i,
5235
- Bo as j,
5241
+ Fo as j,
5236
5242
  jo as k,
5237
5243
  Or as l,
5238
5244
  Lr as m,
@@ -5250,4 +5256,4 @@ export {
5250
5256
  xs as y,
5251
5257
  Uo as z
5252
5258
  };
5253
- //# sourceMappingURL=index-Cc8BzIhS.js.map
5259
+ //# sourceMappingURL=index-CSGqkLxv.js.map