@linktr.ee/messaging-react 3.38.2 → 4.0.0-rc-1786383199

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.
Files changed (32) hide show
  1. package/dist/{Card-2Ms7lBDO.js → Card-B3XsV8Td.js} +2 -2
  2. package/dist/{Card-2Ms7lBDO.js.map → Card-B3XsV8Td.js.map} +1 -1
  3. package/dist/{Card-KwVE3M5j.cjs → Card-DkQdjw4V.cjs} +2 -2
  4. package/dist/{Card-KwVE3M5j.cjs.map → Card-DkQdjw4V.cjs.map} +1 -1
  5. package/dist/index-B1u9TBSD.cjs +3 -0
  6. package/dist/index-B1u9TBSD.cjs.map +1 -0
  7. package/dist/{index-i03XGFsr.js → index-NfAAanC-.js} +372 -371
  8. package/dist/index-NfAAanC-.js.map +1 -0
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.d.ts +18 -13
  11. package/dist/index.js +1 -1
  12. package/dist/testing.d.ts +5 -2
  13. package/package.json +2 -2
  14. package/src/components/{ChannelHeaderRedesign.tsx → ChannelHeader.tsx} +4 -2
  15. package/src/components/{ChannelView.broadcast-name.integration.test.tsx → ChannelView.broadcast-resolution.integration.test.tsx} +11 -9
  16. package/src/components/ChannelView.tsx +15 -15
  17. package/src/components/CustomMessage/BroadcastContext.test.ts +52 -0
  18. package/src/components/CustomMessage/BroadcastContext.ts +101 -0
  19. package/src/components/CustomMessage/CustomMessage.stories.tsx +29 -21
  20. package/src/components/CustomMessage/CustomMessage.test.tsx +49 -20
  21. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +37 -17
  22. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +17 -24
  23. package/src/components/CustomMessage/index.tsx +18 -13
  24. package/src/components/MessagingShell/index.tsx +2 -2
  25. package/src/index.ts +2 -1
  26. package/src/stream-custom-data.ts +5 -2
  27. package/src/types.ts +13 -9
  28. package/dist/index-DzOGH7lG.cjs +0 -3
  29. package/dist/index-DzOGH7lG.cjs.map +0 -1
  30. package/dist/index-i03XGFsr.js.map +0 -1
  31. package/src/components/CustomMessage/BroadcastNameContext.test.ts +0 -43
  32. package/src/components/CustomMessage/BroadcastNameContext.ts +0 -95
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as f, Fragment as J } from "react/jsx-runtime";
2
2
  import z, { createContext as je, useContext as ve, useCallback as Z, useState as $, useRef as j, useEffect as Y, useId as nn, Suspense as an, useMemo as le } from "react";
3
3
  import { StreamChatService as rn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as ln, LinkPreviewsManager as tt } from "stream-chat";
5
- import { Chat as on, useChannelStateContext as xe, useChatContext as He, DateSeparator as cn, useMessageContext as he, MessageStatus as dn, MessageErrorIcon as st, MessageText as ze, areMessageUIPropsEqual as un, useMessageReminder as mn, useComponentContext as cs, Attachment as hn, EditMessageModal as fn, MessageBlocked as gn, MessageBouncePrompt as pn, MessageDeleted as bn, MessageIsThreadReplyInChannelButtonIndicator as vn, MessageRepliesCountButton as xn, ReminderNotification as wn, StreamedMessageText as _n, messageHasAttachments as yn, messageHasReactions as Nn, isDateSeparatorMessage as kn, isMessageBlocked as Cn, isMessageBounced as Sn, MessageBounceModal as En, Poll as In, useMessageComposer as Tn, useStateStore as An, MessageInput as Ht, useMessageInputContext as Ln, useMessageComposerHasSendableData as Rn, AttachmentPreviewList as Mn, QuotedMessagePreview as Dn, TextareaComposer as On, MessageTimestamp as We, AIStates as Xe, useTypingContext as Pn, useAIState as zn, Channel as Fn, WithComponents as Bn, Window as $n, MessageList as Vt, ChannelList as Un, InfiniteScroll as jn } from "stream-chat-react";
5
+ import { Chat as on, useChannelStateContext as xe, useChatContext as He, DateSeparator as cn, useMessageContext as he, MessageStatus as dn, MessageErrorIcon as st, MessageText as ze, areMessageUIPropsEqual as un, useMessageReminder as mn, useComponentContext as cs, Attachment as hn, EditMessageModal as fn, MessageBlocked as gn, MessageBouncePrompt as pn, MessageDeleted as bn, MessageIsThreadReplyInChannelButtonIndicator as vn, MessageRepliesCountButton as xn, ReminderNotification as wn, StreamedMessageText as _n, messageHasAttachments as yn, messageHasReactions as Nn, isDateSeparatorMessage as kn, isMessageBlocked as Cn, isMessageBounced as Sn, MessageBounceModal as En, Poll as In, useMessageComposer as Tn, useStateStore as An, MessageInput as Ht, useMessageInputContext as Ln, useMessageComposerHasSendableData as Rn, AttachmentPreviewList as Mn, QuotedMessagePreview as Dn, TextareaComposer as On, MessageTimestamp as We, AIStates as Xe, useTypingContext as Pn, useAIState as zn, Channel as Bn, WithComponents as Fn, Window as $n, MessageList as Vt, ChannelList as Un, InfiniteScroll as jn } from "stream-chat-react";
6
6
  import k from "classnames";
7
7
  import { StarIcon as nt, DotsThreeIcon as Hn, SpinnerGapIcon as Oe, SignOutIcon as Vn, ProhibitInsetIcon as Gt, FlagIcon as ds, CurrencyDollarIcon as Gn, CaretRightIcon as us, ArrowLeftIcon as Yn, FileIcon as ms, ImageIcon as Wn, SpeakerHighIcon as Xn, VideoCameraIcon as hs, FileMdIcon as qn, FileTextIcon as Kn, FileZipIcon as Zn, FilePptIcon as Jn, FileCsvIcon as Qn, FileXlsIcon as ea, FileDocIcon as ta, FilePdfIcon as sa, CircleNotchIcon as pe, PlayIcon as at, PauseIcon as na, LinkIcon as aa, DownloadSimpleIcon as Ce, GiftIcon as ra, WarningCircleIcon as ia, MegaphoneIcon as la, ChecksIcon as oa, XIcon as it, PencilSimpleIcon as ca, CaretLeftIcon as da, TrashSimpleIcon as ua, ArrowUpIcon as ma, SparkleIcon as ha, ProhibitIcon as fa } from "@phosphor-icons/react";
8
8
  import { isOfficialChannel as ga, OFFICIAL_SENDER_USER_ID as pa, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Yt, isAgeSafetySystemType as ba, resolveRichCardImagePresentation as va, selectEnabledFaqs as xa } from "@linktr.ee/messaging-taxonomy";
@@ -39,7 +39,7 @@ const gs = je({
39
39
  serviceConfig: !!n,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, m] = $(null), [h, u] = $(null), [g, c] = $(!1), [p, w] = $(!1), [v, x] = $(null), b = j(!1), N = j(null), _ = j(n);
42
+ const [d, u] = $(null), [h, m] = $(null), [g, c] = $(!1), [p, w] = $(!1), [v, x] = $(null), b = j(!1), N = j(null), _ = j(n);
43
43
  _.current = n;
44
44
  const T = j(i);
45
45
  T.current = i;
@@ -64,16 +64,16 @@ const gs = je({
64
64
  serviceConfig: n,
65
65
  capabilities: r
66
66
  };
67
- const B = j(null);
68
- !o && a && ((S = B.current) == null ? void 0 : S.apiKey) !== a && (B.current = { apiKey: a, client: new ln(a) });
69
- const F = o || (a ? ((C = B.current) == null ? void 0 : C.client) ?? null : null);
67
+ const F = j(null);
68
+ !o && a && ((S = F.current) == null ? void 0 : S.apiKey) !== a && (F.current = { apiKey: a, client: new ln(a) });
69
+ const B = o || (a ? ((C = F.current) == null ? void 0 : C.client) ?? null : null);
70
70
  Y(() => {
71
71
  const A = E.current, P = _.current;
72
72
  if (o) {
73
- N.current = null, m(null), u(null), c(!1), x(null), w(!1);
73
+ N.current = null, u(null), m(null), c(!1), x(null), w(!1);
74
74
  return;
75
75
  }
76
- if (!a || !F || !P) {
76
+ if (!a || !B || !P) {
77
77
  l("⚠️ SERVICE INIT SKIPPED", {
78
78
  renderCount: A,
79
79
  reason: "Missing apiKey, client, or serviceConfig"
@@ -88,13 +88,13 @@ const gs = je({
88
88
  ...P,
89
89
  apiKey: a,
90
90
  debug: T.current,
91
- client: F
91
+ client: B
92
92
  });
93
- N.current = U, m(U), l("✅ SERVICE SET", {
93
+ N.current = U, u(U), l("✅ SERVICE SET", {
94
94
  renderCount: A,
95
95
  serviceInstance: !!U
96
96
  });
97
- }, [a, F, o]);
97
+ }, [a, B, o]);
98
98
  const L = j(null);
99
99
  Y(() => {
100
100
  var P, U;
@@ -127,7 +127,7 @@ const gs = je({
127
127
  try {
128
128
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
129
  const H = await d.connectUser(t);
130
- u(H), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
130
+ m(H), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
131
131
  userId: t.id,
132
132
  clientId: H.userID
133
133
  });
@@ -145,12 +145,12 @@ const gs = je({
145
145
  }
146
146
  })();
147
147
  }, [d, t, l, g, o]), Y(() => {
148
- const A = F;
148
+ const A = B;
149
149
  return () => {
150
150
  var P;
151
151
  A && (L.current = null, (P = N.current) == null || P.disconnectUser().catch(console.error));
152
152
  };
153
- }, [F]);
153
+ }, [B]);
154
154
  const I = Z(async () => {
155
155
  if (l("🔄 REFRESH CONNECTION CALLED", {
156
156
  hasService: !!d,
@@ -164,7 +164,7 @@ const gs = je({
164
164
  try {
165
165
  l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
166
166
  const A = await d.connectUser(t);
167
- u(A), c(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
+ m(A), c(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
168
  } catch (A) {
169
169
  const P = A instanceof Error ? A.message : "Refresh failed";
170
170
  x(P), l("❌ CONNECTION REFRESH ERROR", {
@@ -213,12 +213,12 @@ const gs = je({
213
213
  ]);
214
214
  return l("🔄 RENDER END", {
215
215
  renderCount: E.current,
216
- willRenderChat: !!F,
216
+ willRenderChat: !!B,
217
217
  contextValueReady: !!M
218
- }), /* @__PURE__ */ s(gs.Provider, { value: M, children: F ? /* @__PURE__ */ s(
218
+ }), /* @__PURE__ */ s(gs.Provider, { value: M, children: B ? /* @__PURE__ */ s(
219
219
  on,
220
220
  {
221
- client: F,
221
+ client: B,
222
222
  customClasses: {
223
223
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
224
224
  },
@@ -331,14 +331,14 @@ const we = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: o = !1
333
333
  }) => {
334
- const l = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ s(
334
+ const l = Ca(e), d = Sa(e), u = 0.45, m = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ s(
335
335
  "div",
336
336
  {
337
337
  "aria-hidden": "true",
338
338
  className: k(
339
339
  "avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
340
340
  ),
341
- style: { fontSize: u, lineHeight: 1 },
341
+ style: { fontSize: m, lineHeight: 1 },
342
342
  children: l
343
343
  }
344
344
  ) });
@@ -392,20 +392,20 @@ const we = ({
392
392
  onDeleteConversationClick: o,
393
393
  onBlockParticipantClick: l,
394
394
  onReportParticipantClick: d,
395
- onActionComplete: m,
395
+ onActionComplete: u,
396
396
  logLabel: h = "useChannelModerationActions"
397
397
  }) => {
398
398
  var M;
399
- const { service: u, debug: g } = lt(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && n && u && c), [w, v] = $(!1), [x, b] = $(null), [N, _] = $(!1), [T, R] = $(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== u);
399
+ const { service: m, debug: g } = lt(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && n && m && c), [w, v] = $(!1), [x, b] = $(null), [N, _] = $(!1), [T, R] = $(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
400
400
  return Y(() => {
401
- if (!p || !u || !c) {
401
+ if (!p || !m || !c) {
402
402
  v(!1), b(null);
403
403
  return;
404
404
  }
405
405
  let S = !1;
406
406
  return (async () => {
407
407
  try {
408
- const C = await u.getBlockedUsers();
408
+ const C = await m.getBlockedUsers();
409
409
  if (S) return;
410
410
  v(
411
411
  C.some(
@@ -415,12 +415,12 @@ const we = ({
415
415
  } catch (C) {
416
416
  S || console.error(`[${h}] Failed to check blocked status:`, C);
417
417
  } finally {
418
- S || b({ participantId: c, service: u });
418
+ S || b({ participantId: c, service: m });
419
419
  }
420
420
  })(), () => {
421
421
  S = !0;
422
422
  };
423
- }, [p, u, c, h]), {
423
+ }, [p, m, c, h]), {
424
424
  isParticipantBlocked: w,
425
425
  isCheckingBlockedStatus: E,
426
426
  isLeaving: N,
@@ -431,7 +431,7 @@ const we = ({
431
431
  o == null || o(), g && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
432
432
  try {
433
433
  const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
434
- await e.hide(C, !1), r && await r(e), m == null || m();
434
+ await e.hide(C, !1), r && await r(e), u == null || u();
435
435
  } catch (C) {
436
436
  console.error(`[${h}] Failed to leave conversation`, C);
437
437
  } finally {
@@ -441,10 +441,10 @@ const we = ({
441
441
  },
442
442
  handleBlockUser: async () => {
443
443
  var S, C, A;
444
- if (!(T || !u)) {
444
+ if (!(T || !m)) {
445
445
  l == null || l(), g && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
446
446
  try {
447
- await u.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
447
+ await m.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), u == null || u();
448
448
  } catch (P) {
449
449
  console.error(`[${h}] Failed to block member`, P);
450
450
  } finally {
@@ -454,10 +454,10 @@ const we = ({
454
454
  },
455
455
  handleUnblockUser: async () => {
456
456
  var S, C, A;
457
- if (!(T || !u)) {
457
+ if (!(T || !m)) {
458
458
  l == null || l(), g && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
459
459
  try {
460
- await u.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
460
+ await m.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), u == null || u();
461
461
  } catch (P) {
462
462
  console.error(`[${h}] Failed to unblock member`, P);
463
463
  } finally {
@@ -466,7 +466,7 @@ const we = ({
466
466
  }
467
467
  },
468
468
  handleReportUser: () => {
469
- d == null || d(), m == null || m(), window.open(Ea, "_blank", "noopener,noreferrer");
469
+ d == null || d(), u == null || u(), window.open(Ea, "_blank", "noopener,noreferrer");
470
470
  }
471
471
  };
472
472
  }, ye = ({
@@ -496,9 +496,9 @@ const we = ({
496
496
  onBlockParticipant: o,
497
497
  onDeleteConversationClick: l,
498
498
  onBlockParticipantClick: d,
499
- onReportParticipantClick: m,
499
+ onReportParticipantClick: u,
500
500
  customChannelActions: h,
501
- triggerClassName: u
501
+ triggerClassName: m
502
502
  }) => {
503
503
  const [g, c] = $(!1), p = j(null), w = nn(), v = Z(() => c(!1), []), {
504
504
  isParticipantBlocked: x,
@@ -508,7 +508,7 @@ const we = ({
508
508
  handleLeaveConversation: T,
509
509
  handleBlockUser: R,
510
510
  handleUnblockUser: E,
511
- handleReportUser: B
511
+ handleReportUser: F
512
512
  } = Ia({
513
513
  channel: e,
514
514
  participant: t,
@@ -518,7 +518,7 @@ const we = ({
518
518
  onBlockParticipant: o,
519
519
  onDeleteConversationClick: l,
520
520
  onBlockParticipantClick: d,
521
- onReportParticipantClick: m,
521
+ onReportParticipantClick: u,
522
522
  onActionComplete: v,
523
523
  logLabel: "ChannelActionsMenu"
524
524
  });
@@ -536,7 +536,7 @@ const we = ({
536
536
  /* @__PURE__ */ f(
537
537
  "button",
538
538
  {
539
- className: u,
539
+ className: m,
540
540
  type: "button",
541
541
  "aria-haspopup": "true",
542
542
  "aria-expanded": g,
@@ -600,7 +600,7 @@ const we = ({
600
600
  ]
601
601
  }
602
602
  ) }),
603
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ f(ye, { variant: "danger", onClick: B, children: [
603
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ f(ye, { variant: "danger", onClick: F, children: [
604
604
  /* @__PURE__ */ s(ds, { className: "h-5 w-5" }),
605
605
  /* @__PURE__ */ s("span", { children: "Report" })
606
606
  ] }) }),
@@ -619,9 +619,9 @@ const we = ({
619
619
  showDeleteConversation: o = !0,
620
620
  showBlockParticipant: l = !0,
621
621
  showReportParticipant: d = !0,
622
- onDeleteConversationClick: m,
622
+ onDeleteConversationClick: u,
623
623
  onBlockParticipantClick: h,
624
- onReportParticipantClick: u,
624
+ onReportParticipantClick: m,
625
625
  customChannelActions: g,
626
626
  renderChannelActions: c,
627
627
  showChannelInfo: p = !0,
@@ -638,7 +638,7 @@ const we = ({
638
638
  );
639
639
  },
640
640
  [(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
641
- ), N = vs(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = ps(v), R = La((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, B = R || E || !!w, F = async () => {
641
+ ), N = vs(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = ps(v), R = La((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, F = R || E || !!w, B = async () => {
642
642
  try {
643
643
  T ? await v.unpin() : await v.pin();
644
644
  } catch (A) {
@@ -664,11 +664,11 @@ const we = ({
664
664
  {
665
665
  className: k(
666
666
  "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
667
- B ? "pl-3 pr-2" : "px-3"
667
+ F ? "pl-3 pr-2" : "px-3"
668
668
  ),
669
669
  children: /* @__PURE__ */ f("span", { className: "flex max-w-full items-center justify-center", children: [
670
670
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
671
- B && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
671
+ F && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
672
672
  R && /* @__PURE__ */ s(
673
673
  "span",
674
674
  {
@@ -735,7 +735,7 @@ const we = ({
735
735
  "button",
736
736
  {
737
737
  className: qe,
738
- onClick: F,
738
+ onClick: B,
739
739
  type: "button",
740
740
  "aria-pressed": T,
741
741
  "aria-label": T ? "Unstar conversation" : "Star conversation",
@@ -761,9 +761,9 @@ const we = ({
761
761
  showReportParticipant: d,
762
762
  onLeaveConversation: r,
763
763
  onBlockParticipant: i,
764
- onDeleteConversationClick: m,
764
+ onDeleteConversationClick: u,
765
765
  onBlockParticipantClick: h,
766
- onReportParticipantClick: u,
766
+ onReportParticipantClick: m,
767
767
  customChannelActions: g,
768
768
  triggerClassName: qe
769
769
  }
@@ -805,7 +805,7 @@ function ce(e) {
805
805
  const a = new URL(t);
806
806
  return a.searchParams.get("io") === "true" && a.searchParams.get("size") === qt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", qt), a.toString());
807
807
  }
808
- const Fa = [
808
+ const Ba = [
809
809
  [/pdf/, "pdf"],
810
810
  [/wordprocessingml|msword|\.doc/, "doc"],
811
811
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -819,12 +819,12 @@ function de(e) {
819
819
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
820
820
  }
821
821
  function _s(e) {
822
- const t = Fa.find(
822
+ const t = Ba.find(
823
823
  ([n]) => n.test(e)
824
824
  );
825
825
  return t ? t[1] : "generic";
826
826
  }
827
- const Ba = {
827
+ const Fa = {
828
828
  video: hs,
829
829
  audio: Xn,
830
830
  image: Wn,
@@ -842,7 +842,7 @@ const Ba = {
842
842
  };
843
843
  function Ua(e) {
844
844
  const t = de(e);
845
- return t !== "document" ? Ba[t] : $a[_s(e)];
845
+ return t !== "document" ? Fa[t] : $a[_s(e)];
846
846
  }
847
847
  function be(e, t) {
848
848
  return z.createElement(Ua(e), t);
@@ -860,10 +860,10 @@ const ja = (e) => {
860
860
  controls: o = !0,
861
861
  showProgress: l = !1,
862
862
  muted: d = !1,
863
- onContainerClick: m
863
+ onContainerClick: u
864
864
  }) => {
865
- const h = de(t), u = j(null), g = j(null), c = j(null), p = j(r), [w, v] = $(a), [x, b] = $(0), [N, _] = $(!1), [T, R] = $(!1), [E, B] = $(!1), [F, L] = $(!1), [I, M] = $(!0), [S, C] = $(null), A = Z(() => {
866
- B(!1), v(!0);
865
+ const h = de(t), m = j(null), g = j(null), c = j(null), p = j(r), [w, v] = $(a), [x, b] = $(0), [N, _] = $(!1), [T, R] = $(!1), [E, F] = $(!1), [B, L] = $(!1), [I, M] = $(!0), [S, C] = $(null), A = Z(() => {
866
+ F(!1), v(!0);
867
867
  }, []), P = Z((y) => {
868
868
  const D = g.current;
869
869
  if (!D) return 0;
@@ -873,7 +873,7 @@ const ja = (e) => {
873
873
  Math.min(1, (ja(y) - W.left) / W.width)
874
874
  );
875
875
  }, []), U = Z((y) => {
876
- const D = u.current;
876
+ const D = m.current;
877
877
  D && D.duration && (D.currentTime = y * D.duration);
878
878
  }, []), H = (y) => {
879
879
  y.stopPropagation(), _(!0);
@@ -888,16 +888,16 @@ const ja = (e) => {
888
888
  return;
889
889
  }
890
890
  const y = () => {
891
- const D = u.current;
891
+ const D = m.current;
892
892
  D && D.duration && !N && b(D.currentTime / D.duration), c.current = requestAnimationFrame(y);
893
893
  };
894
894
  return c.current = requestAnimationFrame(y), () => {
895
895
  c.current !== null && cancelAnimationFrame(c.current);
896
896
  };
897
897
  }, [w, N]), Y(() => {
898
- const y = u.current;
898
+ const y = m.current;
899
899
  y && (w ? y.play().catch((D) => {
900
- v(!1), B(!0);
900
+ v(!1), F(!0);
901
901
  }) : y.pause());
902
902
  }, [w]), Y(() => {
903
903
  if (!N) return;
@@ -917,16 +917,16 @@ const ja = (e) => {
917
917
  className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
918
918
  style: te,
919
919
  onClick: (y) => {
920
- if (m) {
921
- m(y);
920
+ if (u) {
921
+ u(y);
922
922
  return;
923
923
  }
924
924
  E || o && v((D) => !D);
925
925
  },
926
926
  onKeyDown: (y) => {
927
927
  if (!(y.key !== "Enter" && y.key !== " ")) {
928
- if (y.preventDefault(), m) {
929
- m(y);
928
+ if (y.preventDefault(), u) {
929
+ u(y);
930
930
  return;
931
931
  }
932
932
  E || o && v((D) => !D);
@@ -948,7 +948,7 @@ const ja = (e) => {
948
948
  /* @__PURE__ */ s("div", { className: "absolute inset-0", children: h === "audio" ? /* @__PURE__ */ s(
949
949
  "audio",
950
950
  {
951
- ref: u,
951
+ ref: m,
952
952
  src: e,
953
953
  loop: i,
954
954
  muted: d,
@@ -958,7 +958,7 @@ const ja = (e) => {
958
958
  L(!1), M(!1);
959
959
  },
960
960
  onWaiting: () => L(!0),
961
- onPlay: () => B(!1),
961
+ onPlay: () => F(!1),
962
962
  onEnded: () => {
963
963
  i || (v(!1), b(0));
964
964
  },
@@ -967,7 +967,7 @@ const ja = (e) => {
967
967
  ) : /* @__PURE__ */ s(
968
968
  "video",
969
969
  {
970
- ref: u,
970
+ ref: m,
971
971
  src: e,
972
972
  loop: i,
973
973
  muted: d,
@@ -978,9 +978,9 @@ const ja = (e) => {
978
978
  L(!1), M(!1);
979
979
  },
980
980
  onWaiting: () => L(!0),
981
- onPlay: () => B(!1),
981
+ onPlay: () => F(!1),
982
982
  onLoadedMetadata: () => {
983
- const y = u.current;
983
+ const y = m.current;
984
984
  y instanceof HTMLVideoElement && y.videoWidth && y.videoHeight && C(y.videoWidth / y.videoHeight);
985
985
  },
986
986
  onEnded: () => {
@@ -989,7 +989,7 @@ const ja = (e) => {
989
989
  children: /* @__PURE__ */ s("track", { kind: "captions" })
990
990
  }
991
991
  ) }),
992
- F && !E && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
992
+ B && !E && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
993
993
  pe,
994
994
  {
995
995
  className: "size-8 animate-spin text-white/80",
@@ -1107,13 +1107,13 @@ const ja = (e) => {
1107
1107
  mediaPlayerProps: i,
1108
1108
  containedImage: o = !1
1109
1109
  }) => {
1110
- const l = de(e), [d, m] = $(!1), h = ce(t), u = ce(n);
1110
+ const l = de(e), [d, u] = $(!1), h = ce(t), m = ce(n);
1111
1111
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1112
1112
  Ha,
1113
1113
  {
1114
1114
  source: t,
1115
1115
  mimeType: e,
1116
- poster: u,
1116
+ poster: m,
1117
1117
  controls: !0,
1118
1118
  ...i
1119
1119
  }
@@ -1124,7 +1124,7 @@ const ja = (e) => {
1124
1124
  alt: a ?? "",
1125
1125
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1126
1126
  draggable: !1,
1127
- onLoad: () => m(!0)
1127
+ onLoad: () => u(!0)
1128
1128
  }
1129
1129
  ) }) : /* @__PURE__ */ s(
1130
1130
  "img",
@@ -1137,16 +1137,16 @@ const ja = (e) => {
1137
1137
  ) : t && l === "document" ? n ? o ? /* @__PURE__ */ s("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ s(
1138
1138
  "img",
1139
1139
  {
1140
- src: u ?? n,
1140
+ src: m ?? n,
1141
1141
  alt: a ?? "",
1142
1142
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1143
1143
  draggable: !1,
1144
- onLoad: () => m(!0)
1144
+ onLoad: () => u(!0)
1145
1145
  }
1146
1146
  ) }) : /* @__PURE__ */ s(
1147
1147
  "img",
1148
1148
  {
1149
- src: u ?? n,
1149
+ src: m ?? n,
1150
1150
  alt: "",
1151
1151
  className: "block w-full",
1152
1152
  draggable: !1
@@ -1163,7 +1163,7 @@ const ja = (e) => {
1163
1163
  ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Va(r)}`, children: /* @__PURE__ */ s(
1164
1164
  "img",
1165
1165
  {
1166
- src: u ?? n,
1166
+ src: m ?? n,
1167
1167
  alt: a ?? "",
1168
1168
  draggable: !1,
1169
1169
  className: "absolute inset-0 h-full w-full object-cover"
@@ -1188,23 +1188,23 @@ const ja = (e) => {
1188
1188
  statusBadge: o,
1189
1189
  action: l,
1190
1190
  topLeft: d,
1191
- topRight: m,
1191
+ topRight: u,
1192
1192
  rootRef: h,
1193
- "data-testid": u
1193
+ "data-testid": m
1194
1194
  }) => {
1195
1195
  const g = e === "dark", c = g ? n ?? a : n ?? "", p = g && !n;
1196
1196
  return /* @__PURE__ */ f(
1197
1197
  "div",
1198
1198
  {
1199
1199
  ref: h,
1200
- "data-testid": u,
1200
+ "data-testid": m,
1201
1201
  className: k(
1202
1202
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1203
1203
  g ? "bg-[#1e2330]" : "bg-white"
1204
1204
  ),
1205
1205
  children: [
1206
1206
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1207
- m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
1207
+ u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1208
1208
  t,
1209
1209
  /* @__PURE__ */ f("div", { className: "px-4 pb-3 pt-3", children: [
1210
1210
  c.trim() !== "" && /* @__PURE__ */ s(
@@ -1266,7 +1266,7 @@ function qa(e) {
1266
1266
  return e ? "text-white/20" : "text-black/20";
1267
1267
  }
1268
1268
  const ct = ({ attachment: e, isMyMessage: t }) => {
1269
- const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ f(z.Fragment, { children: [
1269
+ const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ f(z.Fragment, { children: [
1270
1270
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1271
1271
  "img",
1272
1272
  {
@@ -1312,9 +1312,9 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
1312
1312
  target: "_blank",
1313
1313
  rel: "noopener noreferrer",
1314
1314
  className: "block no-underline",
1315
- children: m
1315
+ children: u
1316
1316
  }
1317
- ) : /* @__PURE__ */ s("div", { className: "block", children: m });
1317
+ ) : /* @__PURE__ */ s("div", { className: "block", children: u });
1318
1318
  };
1319
1319
  function Cs(e) {
1320
1320
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
@@ -1369,8 +1369,8 @@ const Za = ({
1369
1369
  );
1370
1370
  };
1371
1371
  function ut(e) {
1372
- var u, g, c, p;
1373
- const t = (u = e.attachments) == null ? void 0 : u.find(
1372
+ var m, g, c, p;
1373
+ const t = (m = e.attachments) == null ? void 0 : m.find(
1374
1374
  (w) => w.type === "video" && w.asset_url
1375
1375
  ), n = (g = e.attachments) == null ? void 0 : g.find(
1376
1376
  (w) => w.type === "image" && w.image_url
@@ -1380,12 +1380,12 @@ function ut(e) {
1380
1380
  (w) => w.type === "file" && w.asset_url
1381
1381
  ), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1382
1382
  if (!o) return null;
1383
- const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, h = t == null ? void 0 : t.thumb_url;
1383
+ const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, h = t == null ? void 0 : t.thumb_url;
1384
1384
  return {
1385
1385
  resolvedUrl: o,
1386
1386
  resolvedType: l,
1387
1387
  title: d,
1388
- fileSize: m,
1388
+ fileSize: u,
1389
1389
  thumbnailUrl: h
1390
1390
  };
1391
1391
  }
@@ -1510,7 +1510,7 @@ const Ss = ({
1510
1510
  Visitor: er
1511
1511
  }), Is = je(void 0), tr = (e) => {
1512
1512
  var n;
1513
- const t = (n = e.metadata) == null ? void 0 : n.broadcast_id;
1513
+ const t = (n = e.metadata) == null ? void 0 : n.outbound_id;
1514
1514
  return typeof t == "string" ? t : void 0;
1515
1515
  }, sr = (e, t) => {
1516
1516
  if (!t || !(e != null && e.length))
@@ -1532,7 +1532,12 @@ const Ss = ({
1532
1532
  if (!e || !t)
1533
1533
  return !1;
1534
1534
  const n = Object.keys(e), a = Object.keys(t);
1535
- return n.length !== a.length ? !1 : n.every((r) => e[r] === t[r]);
1535
+ return n.length !== a.length ? !1 : n.every(
1536
+ (r) => {
1537
+ var i, o;
1538
+ return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((o = t[r]) == null ? void 0 : o.name);
1539
+ }
1540
+ );
1536
1541
  }, ar = (e, t) => {
1537
1542
  const n = sr(e, t), [a, r] = $(n);
1538
1543
  return nr(a, n) ? a : (r(n), n);
@@ -1544,7 +1549,7 @@ const Ss = ({
1544
1549
  function lr(e) {
1545
1550
  return ve(Ts)[e] ?? ir[e];
1546
1551
  }
1547
- const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import("./Card-2Ms7lBDO.js")), dr = () => /* @__PURE__ */ s(
1552
+ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import("./Card-B3XsV8Td.js")), dr = () => /* @__PURE__ */ s(
1548
1553
  "div",
1549
1554
  {
1550
1555
  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)]",
@@ -1573,7 +1578,7 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1573
1578
  }, As = (e) => {
1574
1579
  var t;
1575
1580
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.PAID;
1576
- }, Fe = (e) => {
1581
+ }, Be = (e) => {
1577
1582
  var t;
1578
1583
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.CHATBOT;
1579
1584
  }, mt = (e) => {
@@ -1595,7 +1600,7 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1595
1600
  hasAttachment: a = !1
1596
1601
  }) => {
1597
1602
  var g;
1598
- const r = Ls(e), i = Fe(e);
1603
+ const r = Ls(e), i = Be(e);
1599
1604
  if (!r && !i)
1600
1605
  return null;
1601
1606
  if (r) {
@@ -1607,17 +1612,17 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1607
1612
  /* @__PURE__ */ s("span", { children: v })
1608
1613
  ] });
1609
1614
  }
1610
- const o = n && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", m = o ? "justify-end gap-2 text-black/30" : n ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ s("span", { className: "text-left", children: l }), u = /* @__PURE__ */ s("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ s(ur, { size: o ? 12 : 15 }) });
1615
+ const o = n && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : n ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ s("span", { className: "text-left", children: l }), m = /* @__PURE__ */ s("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ s(ur, { size: o ? 12 : 15 }) });
1611
1616
  return /* @__PURE__ */ s(
1612
1617
  "div",
1613
1618
  {
1614
- className: `${d} ${m}`,
1619
+ className: `${d} ${u}`,
1615
1620
  "data-testid": "message-chatbot-indicator",
1616
1621
  children: n && !o ? /* @__PURE__ */ f(J, { children: [
1617
1622
  h,
1618
- u
1623
+ m
1619
1624
  ] }) : /* @__PURE__ */ f(J, { children: [
1620
- u,
1625
+ m,
1621
1626
  h
1622
1627
  ] })
1623
1628
  }
@@ -1625,7 +1630,7 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1625
1630
  }, Zt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, pr = {
1626
1631
  me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
1627
1632
  other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
1628
- }, Be = ({ side: e }) => /* @__PURE__ */ s(
1633
+ }, Fe = ({ side: e }) => /* @__PURE__ */ s(
1629
1634
  "span",
1630
1635
  {
1631
1636
  "aria-hidden": "true",
@@ -1664,45 +1669,40 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1664
1669
  ),
1665
1670
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
1666
1671
  ] }) : null, vr = ({
1667
- broadcastId: e,
1668
- broadcastName: t,
1669
- resolvedBroadcastName: n,
1670
- onBroadcastClick: a
1672
+ broadcast: e,
1673
+ onBroadcastClick: t
1671
1674
  }) => {
1672
- const r = n || t, i = r || "Broadcast", l = /* @__PURE__ */ f(J, { children: [
1675
+ const n = e.name || "Broadcast", r = /* @__PURE__ */ f(J, { children: [
1673
1676
  /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(la, { weight: "fill" }) }),
1674
1677
  /* @__PURE__ */ s(
1675
1678
  "span",
1676
1679
  {
1677
1680
  className: k("sent-message-broadcast-name", {
1678
- "underline [text-decoration-skip-ink:auto]": !!a
1681
+ "underline [text-decoration-skip-ink:auto]": !!t
1679
1682
  }),
1680
1683
  "data-testid": "sent-message-broadcast-status",
1681
- children: i
1684
+ children: n
1682
1685
  }
1683
1686
  )
1684
1687
  ] });
1685
- return a ? /* @__PURE__ */ s(
1688
+ return t ? /* @__PURE__ */ s(
1686
1689
  "button",
1687
1690
  {
1688
1691
  type: "button",
1689
1692
  className: "inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-inherit [font:inherit]",
1690
- "aria-label": `View broadcast ${i}`,
1691
- onClick: () => a({
1692
- id: e,
1693
- ...r ? { name: r } : {}
1694
- }),
1695
- children: l
1693
+ "aria-label": `View broadcast ${n}`,
1694
+ onClick: () => t(e),
1695
+ children: r
1696
1696
  }
1697
- ) : l;
1697
+ ) : r;
1698
1698
  }, xr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
1699
1699
  /* @__PURE__ */ s(ia, { weight: "bold", "aria-hidden": "true" }),
1700
1700
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
1701
1701
  ] }), wr = ({
1702
1702
  onBroadcastClick: e,
1703
- resolvedBroadcastName: t
1703
+ resolvedBroadcast: t
1704
1704
  }) => {
1705
- var u, g;
1705
+ var h;
1706
1706
  const { isMyMessage: n, message: a, threadList: r } = he(
1707
1707
  "SentMessageDeliveryStatus"
1708
1708
  ), i = n(), o = ht();
@@ -1712,15 +1712,13 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1712
1712
  return /* @__PURE__ */ s(xr, {});
1713
1713
  if (!i)
1714
1714
  return null;
1715
- const l = (u = a.metadata) == null ? void 0 : u.broadcast_id, d = (g = a.metadata) == null ? void 0 : g.broadcast_name, m = a.status !== "sending" && a.status !== "failed" && l ? /* @__PURE__ */ s(
1715
+ const l = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && l && t ? /* @__PURE__ */ s(
1716
1716
  vr,
1717
1717
  {
1718
- broadcastId: l,
1719
- broadcastName: d,
1720
- resolvedBroadcastName: t,
1718
+ broadcast: t,
1721
1719
  onBroadcastClick: e
1722
1720
  }
1723
- ) : null, h = /* @__PURE__ */ s(
1721
+ ) : null, u = /* @__PURE__ */ s(
1724
1722
  dn,
1725
1723
  {
1726
1724
  MessageSentStatus: Ze,
@@ -1729,11 +1727,11 @@ const or = z.lazy(() => import("./Card-DaJtDL7m.js")), cr = z.lazy(() => import(
1729
1727
  MessageSendingStatus: br
1730
1728
  }
1731
1729
  );
1732
- return m ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
1733
- h,
1730
+ return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
1731
+ u,
1734
1732
  o && /* @__PURE__ */ s("span", { className: "sent-message-broadcast-separator", "aria-hidden": "true", children: "•" }),
1735
- m
1736
- ] }) : h;
1733
+ d
1734
+ ] }) : u;
1737
1735
  }, _r = /^([a-z][a-z0-9+.-]*):/i, yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
1738
1736
  function ft(e) {
1739
1737
  if (typeof e != "string") return;
@@ -1774,8 +1772,8 @@ const Nr = {
1774
1772
  target: "_blank",
1775
1773
  rel: "noopener noreferrer",
1776
1774
  onClick: (d) => {
1777
- var m;
1778
- d.stopPropagation(), (m = t.onClick) == null || m.call(t);
1775
+ var u;
1776
+ d.stopPropagation(), (u = t.onClick) == null || u.call(t);
1779
1777
  },
1780
1778
  className: `${i} no-underline`,
1781
1779
  children: o
@@ -1785,8 +1783,8 @@ const Nr = {
1785
1783
  {
1786
1784
  type: "button",
1787
1785
  onClick: (d) => {
1788
- var m;
1789
- d.stopPropagation(), (m = t.onClick) == null || m.call(t);
1786
+ var u;
1787
+ d.stopPropagation(), (u = t.onClick) == null || u.call(t);
1790
1788
  },
1791
1789
  className: i,
1792
1790
  children: o
@@ -1811,12 +1809,12 @@ const Nr = {
1811
1809
  descriptionLines: o = 1,
1812
1810
  url: l,
1813
1811
  appIcon: d,
1814
- cta: m,
1812
+ cta: u,
1815
1813
  trailingAction: h,
1816
- isLoading: u = !1
1814
+ isLoading: m = !1
1817
1815
  }) => {
1818
- const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", p = c.trim() !== "", w = i != null && i.trim() !== "", v = typeof l == "string" ? l.trim() : "", x = v !== "", b = m != null;
1819
- if (!u && !p && !w && !x && !b)
1816
+ const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", p = c.trim() !== "", w = i != null && i.trim() !== "", v = typeof l == "string" ? l.trim() : "", x = v !== "", b = u != null;
1817
+ if (!m && !p && !w && !x && !b)
1820
1818
  return null;
1821
1819
  const N = g && !a, _ = k(
1822
1820
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
@@ -1829,17 +1827,17 @@ const Nr = {
1829
1827
  o <= 1 && "truncate",
1830
1828
  n == null && Jt[e]
1831
1829
  );
1832
- if (u) {
1833
- const F = k(
1830
+ if (m) {
1831
+ const B = k(
1834
1832
  "animate-pulse rounded",
1835
1833
  Sr[e]
1836
1834
  );
1837
1835
  return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
1838
- /* @__PURE__ */ s("div", { className: k("h-5 w-3/4", F), "aria-hidden": !0 }),
1839
- /* @__PURE__ */ s("div", { className: k("h-4 w-1/2", F), "aria-hidden": !0 })
1836
+ /* @__PURE__ */ s("div", { className: k("h-5 w-3/4", B), "aria-hidden": !0 }),
1837
+ /* @__PURE__ */ s("div", { className: k("h-4 w-1/2", B), "aria-hidden": !0 })
1840
1838
  ] }) });
1841
1839
  }
1842
- const E = n ? { color: n } : void 0, B = o > 1 ? {
1840
+ const E = n ? { color: n } : void 0, F = o > 1 ? {
1843
1841
  ...E,
1844
1842
  display: "-webkit-box",
1845
1843
  WebkitBoxOrient: "vertical",
@@ -1860,12 +1858,12 @@ const Nr = {
1860
1858
  }
1861
1859
  )
1862
1860
  ] }),
1863
- w && /* @__PURE__ */ s("p", { className: R, style: B, children: i }),
1861
+ w && /* @__PURE__ */ s("p", { className: R, style: F, children: i }),
1864
1862
  !b && x && /* @__PURE__ */ s("p", { className: T, style: E, children: v })
1865
1863
  ] }),
1866
1864
  h && /* @__PURE__ */ s("div", { className: "shrink-0", children: h })
1867
1865
  ] }),
1868
- m && /* @__PURE__ */ s(Rs, { variant: t ?? e, cta: m })
1866
+ u && /* @__PURE__ */ s(Rs, { variant: t ?? e, cta: u })
1869
1867
  ] });
1870
1868
  }, Er = "Loading link preview", Ir = k(
1871
1869
  "relative w-[290px] select-none overflow-hidden",
@@ -1882,14 +1880,14 @@ const Nr = {
1882
1880
  topRight: o,
1883
1881
  bgClassName: l,
1884
1882
  accentHex: d,
1885
- fixedHeight: m = !1,
1883
+ fixedHeight: u = !1,
1886
1884
  busy: h = !1,
1887
- "data-testid": u
1885
+ "data-testid": m
1888
1886
  }) => {
1889
1887
  const g = n != null || a != null, c = k(
1890
1888
  "messaging-link-card",
1891
1889
  Ir,
1892
- m ? Tr : "block",
1890
+ u ? Tr : "block",
1893
1891
  // The plain fallback fill, kept underneath the `--accent` derivation: the
1894
1892
  // `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
1895
1893
  // this single class, so a published accent paints over it and an unset one
@@ -1920,7 +1918,7 @@ const Nr = {
1920
1918
  target: "_blank",
1921
1919
  rel: "noopener noreferrer",
1922
1920
  onClick: a,
1923
- "data-testid": u,
1921
+ "data-testid": m,
1924
1922
  "data-variant": e,
1925
1923
  className: c,
1926
1924
  style: w,
@@ -1937,7 +1935,7 @@ const Nr = {
1937
1935
  type: "button",
1938
1936
  onClick: a,
1939
1937
  "aria-label": r,
1940
- "data-testid": u,
1938
+ "data-testid": m,
1941
1939
  "data-variant": e,
1942
1940
  className: k(c, "text-left"),
1943
1941
  style: w,
@@ -1951,7 +1949,7 @@ const Nr = {
1951
1949
  "div",
1952
1950
  {
1953
1951
  ref: i,
1954
- "data-testid": u,
1952
+ "data-testid": m,
1955
1953
  "data-variant": e,
1956
1954
  className: c,
1957
1955
  style: w,
@@ -1983,7 +1981,7 @@ const Nr = {
1983
1981
  isLoading: l = !1,
1984
1982
  onImageError: d
1985
1983
  }) => {
1986
- const m = de(r), h = !!n && m === "video", u = ce(t);
1984
+ const u = de(r), h = !!n && u === "video", m = ce(t);
1987
1985
  return !l && Ie(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
1988
1986
  "audio",
1989
1987
  {
@@ -2025,7 +2023,7 @@ const Nr = {
2025
2023
  "video",
2026
2024
  {
2027
2025
  src: n,
2028
- poster: u,
2026
+ poster: m,
2029
2027
  controls: !0,
2030
2028
  playsInline: !0,
2031
2029
  preload: "metadata",
@@ -2033,10 +2031,10 @@ const Nr = {
2033
2031
  children: /* @__PURE__ */ s("track", { kind: "captions" })
2034
2032
  }
2035
2033
  ),
2036
- u && d ? /* @__PURE__ */ s(
2034
+ m && d ? /* @__PURE__ */ s(
2037
2035
  "img",
2038
2036
  {
2039
- src: u,
2037
+ src: m,
2040
2038
  alt: "",
2041
2039
  "aria-hidden": !0,
2042
2040
  onError: d,
@@ -2046,7 +2044,7 @@ const Nr = {
2046
2044
  ] }) : t ? /* @__PURE__ */ s(
2047
2045
  "img",
2048
2046
  {
2049
- src: u ?? t,
2047
+ src: m ?? t,
2050
2048
  alt: a ?? "",
2051
2049
  draggable: !1,
2052
2050
  loading: "lazy",
@@ -2094,7 +2092,7 @@ function Ve({
2094
2092
  z.useEffect(() => {
2095
2093
  d(!1);
2096
2094
  }, [r]);
2097
- const m = z.useCallback(() => {
2095
+ const u = z.useCallback(() => {
2098
2096
  d(!0);
2099
2097
  }, []), h = Ie(i, o), c = a === "featured" && !!r && !h && !l && n === "ready" && t != null && Lr.test(t.trim()) ? Rr(t) : void 0, p = h ? Ms : Dr[e];
2100
2098
  return {
@@ -2103,7 +2101,7 @@ function Ve({
2103
2101
  chinTextColor: p,
2104
2102
  surface: h ? "light" : e,
2105
2103
  isLoading: n === "loading",
2106
- onImageError: m
2104
+ onImageError: u
2107
2105
  };
2108
2106
  }
2109
2107
  const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Pr = "relative before:absolute before:-inset-[10px] before:content-['']", zr = ({
@@ -2116,9 +2114,9 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2116
2114
  thumbnailUrl: o,
2117
2115
  sourceUrl: l,
2118
2116
  layout: d = "featured",
2119
- appIcon: m,
2117
+ appIcon: u,
2120
2118
  cta: h,
2121
- accentColor: u,
2119
+ accentColor: m,
2122
2120
  status: g = "ready",
2123
2121
  onDismiss: c,
2124
2122
  onEditClick: p,
@@ -2126,7 +2124,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2126
2124
  }) => {
2127
2125
  const v = d === "classic", x = Ie(i, l), b = Ve({
2128
2126
  variant: "dark",
2129
- accentColor: u,
2127
+ accentColor: m,
2130
2128
  status: g,
2131
2129
  layout: d,
2132
2130
  thumbnailUrl: o,
@@ -2198,7 +2196,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2198
2196
  description: n,
2199
2197
  descriptionLines: a,
2200
2198
  url: r,
2201
- appIcon: m,
2199
+ appIcon: u,
2202
2200
  cta: h,
2203
2201
  trailingAction: _,
2204
2202
  isLoading: b.isLoading
@@ -2232,7 +2230,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2232
2230
  }
2233
2231
  )
2234
2232
  ] })
2235
- ) : /* @__PURE__ */ s(J, { children: a }), Fr = ({
2233
+ ) : /* @__PURE__ */ s(J, { children: a }), Br = ({
2236
2234
  title: e,
2237
2235
  description: t,
2238
2236
  descriptionLines: n,
@@ -2242,22 +2240,22 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2242
2240
  sourceUrl: o,
2243
2241
  layout: l = "featured",
2244
2242
  appIcon: d,
2245
- cta: m,
2243
+ cta: u,
2246
2244
  accentColor: h,
2247
- status: u = "ready",
2245
+ status: m = "ready",
2248
2246
  onClick: g,
2249
2247
  groupPosition: c = "single"
2250
2248
  }) => {
2251
- const p = pt(r, o), w = ft(a), v = m == null && w != null && !p ? w : void 0, x = m == null && !p ? g : void 0, b = u !== "loading" && Ie(r, o) ? bt : void 0, N = m && g ? {
2252
- ...m,
2249
+ const p = pt(r, o), w = ft(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Ie(r, o) ? bt : void 0, N = u && g ? {
2250
+ ...u,
2253
2251
  onClick: () => {
2254
2252
  var T;
2255
- g(), (T = m.onClick) == null || T.call(m);
2253
+ g(), (T = u.onClick) == null || T.call(u);
2256
2254
  }
2257
- } : m, _ = Ve({
2255
+ } : u, _ = Ve({
2258
2256
  variant: "light",
2259
2257
  accentColor: h,
2260
- status: u,
2258
+ status: m,
2261
2259
  layout: l,
2262
2260
  thumbnailUrl: i,
2263
2261
  mimeType: r,
@@ -2314,7 +2312,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2314
2312
  )
2315
2313
  }
2316
2314
  );
2317
- }, Br = ({
2315
+ }, Fr = ({
2318
2316
  title: e,
2319
2317
  placeholderTitle: t,
2320
2318
  description: n,
@@ -2324,16 +2322,16 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2324
2322
  thumbnailUrl: o,
2325
2323
  sourceUrl: l,
2326
2324
  layout: d = "featured",
2327
- appIcon: m,
2325
+ appIcon: u,
2328
2326
  cta: h,
2329
- accentColor: u,
2327
+ accentColor: m,
2330
2328
  status: g = "ready",
2331
2329
  onClick: c,
2332
2330
  groupPosition: p = "single"
2333
2331
  }) => {
2334
2332
  const w = pt(i, l), v = ft(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, N = g !== "loading" && Ie(i, l), _ = Ve({
2335
2333
  variant: "dark",
2336
- accentColor: u,
2334
+ accentColor: m,
2337
2335
  status: g,
2338
2336
  layout: d,
2339
2337
  thumbnailUrl: o,
@@ -2380,7 +2378,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2380
2378
  description: n,
2381
2379
  descriptionLines: a,
2382
2380
  url: r,
2383
- appIcon: m,
2381
+ appIcon: u,
2384
2382
  cta: h,
2385
2383
  isLoading: _.isLoading
2386
2384
  }
@@ -2392,8 +2390,8 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2392
2390
  );
2393
2391
  }, rt = {
2394
2392
  Composer: zr,
2395
- Sent: Br,
2396
- Received: Fr
2393
+ Sent: Fr,
2394
+ Received: Br
2397
2395
  }, $r = {
2398
2396
  dark: "bg-[#1e2330]",
2399
2397
  light: "bg-[#f2f1ef]"
@@ -2426,13 +2424,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2426
2424
  radiusClassName: o,
2427
2425
  className: l,
2428
2426
  children: d,
2429
- "data-testid": m
2427
+ "data-testid": u
2430
2428
  }) => {
2431
- const h = t != null && t !== "", u = o ?? Vr[Hr(e)][a];
2429
+ const h = t != null && t !== "", m = o ?? Vr[Hr(e)][a];
2432
2430
  return /* @__PURE__ */ f(
2433
2431
  "div",
2434
2432
  {
2435
- "data-testid": m,
2433
+ "data-testid": u,
2436
2434
  "data-group-position": a,
2437
2435
  className: k(
2438
2436
  // Defaults describe a 280px-wide document / audio / link
@@ -2456,7 +2454,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2456
2454
  // plugin — unlike the same-utility `rounded-*` clash above,
2457
2455
  // there is no ambiguity to resolve.
2458
2456
  h && "pb-0",
2459
- u,
2457
+ m,
2460
2458
  $r[e],
2461
2459
  Ur[e],
2462
2460
  n && "border",
@@ -2538,18 +2536,18 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2538
2536
  preload: l,
2539
2537
  onDismiss: d
2540
2538
  }) => {
2541
- const m = Le(e), h = e === "composer" && !!d, u = Gr({ src: t, mimeType: n, filename: a, items: r });
2542
- if (u.length === 0)
2539
+ const u = Le(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: n, filename: a, items: r });
2540
+ if (m.length === 0)
2543
2541
  return null;
2544
- const g = l ?? (u.length > 1 ? "none" : "metadata");
2542
+ const g = l ?? (m.length > 1 ? "none" : "metadata");
2545
2543
  return /* @__PURE__ */ s(
2546
2544
  Te,
2547
2545
  {
2548
- variant: m,
2546
+ variant: u,
2549
2547
  text: i,
2550
2548
  groupPosition: o,
2551
2549
  "data-testid": "audio-attachment",
2552
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ s(
2550
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((c, p) => /* @__PURE__ */ s(
2553
2551
  Yr,
2554
2552
  {
2555
2553
  item: c,
@@ -2631,7 +2629,7 @@ const ti = {
2631
2629
  activateLabel: o,
2632
2630
  trailingAction: l
2633
2631
  }) => {
2634
- const d = n ?? t ?? "File", m = ei(a, t, r), h = /* @__PURE__ */ s(
2632
+ const d = n ?? t ?? "File", u = ei(a, t, r), h = /* @__PURE__ */ s(
2635
2633
  "div",
2636
2634
  {
2637
2635
  className: k(
@@ -2644,16 +2642,16 @@ const ti = {
2644
2642
  weight: "regular"
2645
2643
  })
2646
2644
  }
2647
- ), u = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
2645
+ ), m = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
2648
2646
  /* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
2649
- m ? /* @__PURE__ */ s(
2647
+ u ? /* @__PURE__ */ s(
2650
2648
  "p",
2651
2649
  {
2652
2650
  className: k(
2653
2651
  "truncate text-xs leading-4",
2654
2652
  ti[e]
2655
2653
  ),
2656
- children: m
2654
+ children: u
2657
2655
  }
2658
2656
  ) : null
2659
2657
  ] }), g = i ? /* @__PURE__ */ f(
@@ -2668,12 +2666,12 @@ const ti = {
2668
2666
  ),
2669
2667
  children: [
2670
2668
  h,
2671
- u
2669
+ m
2672
2670
  ]
2673
2671
  }
2674
2672
  ) : /* @__PURE__ */ f(J, { children: [
2675
2673
  h,
2676
- u
2674
+ m
2677
2675
  ] });
2678
2676
  return /* @__PURE__ */ f("div", { className: "flex items-center gap-3 px-3 py-2", children: [
2679
2677
  g,
@@ -2732,10 +2730,10 @@ const ai = ({
2732
2730
  items: o,
2733
2731
  text: l,
2734
2732
  groupPosition: d,
2735
- onClick: m,
2733
+ onClick: u,
2736
2734
  onDismiss: h
2737
2735
  }) => {
2738
- const u = Le(e), g = e === "composer" && !!h, c = ai({
2736
+ const m = Le(e), g = e === "composer" && !!h, c = ai({
2739
2737
  src: t,
2740
2738
  filename: n,
2741
2739
  fileSize: a,
@@ -2743,7 +2741,7 @@ const ai = ({
2743
2741
  title: i,
2744
2742
  items: o
2745
2743
  }), p = (v) => {
2746
- if ((m == null ? void 0 : m(v)) === !1) return;
2744
+ if ((u == null ? void 0 : u(v)) === !1) return;
2747
2745
  const x = c[v];
2748
2746
  if (!x) return;
2749
2747
  const b = x.filename ?? ae(x.src);
@@ -2756,7 +2754,7 @@ const ai = ({
2756
2754
  {
2757
2755
  className: k(
2758
2756
  "flex size-8 items-center justify-center rounded-full",
2759
- u === "dark" ? "text-white/70" : "text-black/70"
2757
+ m === "dark" ? "text-white/70" : "text-black/70"
2760
2758
  ),
2761
2759
  "aria-hidden": !0,
2762
2760
  children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
@@ -2765,14 +2763,14 @@ const ai = ({
2765
2763
  return /* @__PURE__ */ s(
2766
2764
  Te,
2767
2765
  {
2768
- variant: u,
2766
+ variant: m,
2769
2767
  text: l,
2770
2768
  groupPosition: d,
2771
2769
  "data-testid": "file-attachment",
2772
2770
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ s(
2773
2771
  ri,
2774
2772
  {
2775
- variant: u,
2773
+ variant: m,
2776
2774
  item: v,
2777
2775
  index: x,
2778
2776
  onActivate: p,
@@ -2821,7 +2819,7 @@ const ai = ({
2821
2819
  tone: i = "dark",
2822
2820
  onTriggered: o
2823
2821
  }) => {
2824
- const [l, d] = $(!1), m = Z(
2822
+ const [l, d] = $(!1), u = Z(
2825
2823
  (c) => {
2826
2824
  c.stopPropagation(), !l && (d(!0), Os(e, t).catch(() => {
2827
2825
  }).finally(() => {
@@ -2837,7 +2835,7 @@ const ai = ({
2837
2835
  "button",
2838
2836
  {
2839
2837
  type: "button",
2840
- onClick: m,
2838
+ onClick: u,
2841
2839
  disabled: l,
2842
2840
  "aria-label": a,
2843
2841
  className: k(
@@ -2867,7 +2865,7 @@ const ai = ({
2867
2865
  "button",
2868
2866
  {
2869
2867
  type: "button",
2870
- onClick: m,
2868
+ onClick: u,
2871
2869
  disabled: l,
2872
2870
  "aria-label": a,
2873
2871
  className: Ps,
@@ -2877,7 +2875,7 @@ const ai = ({
2877
2875
  "button",
2878
2876
  {
2879
2877
  type: "button",
2880
- onClick: m,
2878
+ onClick: u,
2881
2879
  disabled: l,
2882
2880
  "aria-label": h ? a : void 0,
2883
2881
  className: k(
@@ -2915,10 +2913,10 @@ const ai = ({
2915
2913
  }, [e]);
2916
2914
  return Y(() => {
2917
2915
  if (!n || e <= 1) return;
2918
- const d = (m) => {
2919
- if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
2916
+ const d = (u) => {
2917
+ if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
2920
2918
  const h = document.activeElement;
2921
- h && (h.tagName === "VIDEO" || h.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
2919
+ h && (h.tagName === "VIDEO" || h.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? o() : l());
2922
2920
  };
2923
2921
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2924
2922
  }, [n, e, o, l]), { index: r, prev: o, next: l };
@@ -2934,41 +2932,41 @@ const ai = ({
2934
2932
  const l = j(null), d = j(null);
2935
2933
  return Y(() => {
2936
2934
  var g;
2937
- const u = l.current;
2938
- if (u) {
2935
+ const m = l.current;
2936
+ if (m) {
2939
2937
  if (e) {
2940
- if (!u.open)
2941
- if (typeof u.showModal == "function")
2938
+ if (!m.open)
2939
+ if (typeof m.showModal == "function")
2942
2940
  try {
2943
- u.showModal();
2941
+ m.showModal();
2944
2942
  } catch {
2945
- u.setAttribute("open", "");
2943
+ m.setAttribute("open", "");
2946
2944
  }
2947
2945
  else
2948
- u.setAttribute("open", "");
2946
+ m.setAttribute("open", "");
2949
2947
  const c = typeof document < "u" ? document.activeElement : null;
2950
2948
  return (g = d.current) == null || g.focus(), () => {
2951
- if (u.open)
2952
- if (typeof u.close == "function")
2949
+ if (m.open)
2950
+ if (typeof m.close == "function")
2953
2951
  try {
2954
- u.close();
2952
+ m.close();
2955
2953
  } catch {
2956
- u.removeAttribute("open");
2954
+ m.removeAttribute("open");
2957
2955
  }
2958
2956
  else
2959
- u.removeAttribute("open");
2957
+ m.removeAttribute("open");
2960
2958
  c && document.body.contains(c) && c.focus();
2961
2959
  };
2962
2960
  }
2963
- if (u.open)
2964
- if (typeof u.close == "function")
2961
+ if (m.open)
2962
+ if (typeof m.close == "function")
2965
2963
  try {
2966
- u.close();
2964
+ m.close();
2967
2965
  } catch {
2968
- u.removeAttribute("open");
2966
+ m.removeAttribute("open");
2969
2967
  }
2970
2968
  else
2971
- u.removeAttribute("open");
2969
+ m.removeAttribute("open");
2972
2970
  }
2973
2971
  }, [e]), // The native `<dialog>` element ships its own keyboard dismissal
2974
2972
  // (Escape, handled by the platform and surfaced through `onClose`),
@@ -2987,8 +2985,8 @@ const ai = ({
2987
2985
  onClose: () => {
2988
2986
  t();
2989
2987
  },
2990
- onClick: (u) => {
2991
- u.target === l.current && t();
2988
+ onClick: (m) => {
2989
+ m.target === l.current && t();
2992
2990
  },
2993
2991
  children: [
2994
2992
  /* @__PURE__ */ f("div", { className: "pointer-events-none absolute inset-x-3 top-3 z-[1] flex items-center justify-between gap-3", children: [
@@ -3012,7 +3010,7 @@ const ai = ({
3012
3010
  ]
3013
3011
  }
3014
3012
  );
3015
- }, Fs = ({
3013
+ }, Bs = ({
3016
3014
  open: e,
3017
3015
  items: t,
3018
3016
  initialIndex: n = 0,
@@ -3077,7 +3075,7 @@ const ai = ({
3077
3075
  "rounded-bl-[18px]",
3078
3076
  "rounded-br-[18px]"
3079
3077
  ]
3080
- }, mi = "--mes-single-width-cap", hi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", fi = 436, Bs = ({
3078
+ }, mi = "--mes-single-width-cap", hi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", fi = 436, Fs = ({
3081
3079
  tiles: e,
3082
3080
  onTileActivate: t,
3083
3081
  maxVisible: n = 4,
@@ -3086,33 +3084,33 @@ const ai = ({
3086
3084
  }) => {
3087
3085
  const i = e.length;
3088
3086
  if (i === 0) return null;
3089
- const o = e.slice(0, Math.min(i, n)), l = i - o.length, d = (h, u, g) => {
3087
+ const o = e.slice(0, Math.min(i, n)), l = i - o.length, d = (h, m, g) => {
3090
3088
  var p;
3091
3089
  const c = k(
3092
3090
  di,
3093
3091
  "h-full w-full",
3094
- (p = ui[o.length]) == null ? void 0 : p[u]
3092
+ (p = ui[o.length]) == null ? void 0 : p[m]
3095
3093
  );
3096
3094
  return t ? /* @__PURE__ */ f(
3097
3095
  "button",
3098
3096
  {
3099
3097
  type: "button",
3100
- onClick: () => t(u),
3101
- "aria-label": h.ariaLabel ?? `Open media ${u + 1}`,
3098
+ onClick: () => t(m),
3099
+ "aria-label": h.ariaLabel ?? `Open media ${m + 1}`,
3102
3100
  className: k(c, "cursor-zoom-in"),
3103
3101
  children: [
3104
3102
  h.content,
3105
3103
  g
3106
3104
  ]
3107
3105
  },
3108
- u
3106
+ m
3109
3107
  ) : /* @__PURE__ */ f("div", { className: c, children: [
3110
3108
  h.content,
3111
3109
  g
3112
- ] }, u);
3110
+ ] }, m);
3113
3111
  };
3114
- let m;
3115
- return a && (m = {
3112
+ let u;
3113
+ return a && (u = {
3116
3114
  aspectRatio: a,
3117
3115
  // Hundredths keep the emitted declaration readable in devtools;
3118
3116
  // the rounding error is well under a device pixel.
@@ -3126,7 +3124,7 @@ const ai = ({
3126
3124
  a ? hi : "aspect-square w-full",
3127
3125
  r
3128
3126
  ),
3129
- style: m,
3127
+ style: u,
3130
3128
  children: d(o[0], 0)
3131
3129
  }
3132
3130
  ) : o.length === 2 ? /* @__PURE__ */ s(
@@ -3136,7 +3134,7 @@ const ai = ({
3136
3134
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3137
3135
  r
3138
3136
  ),
3139
- children: o.map((h, u) => d(h, u))
3137
+ children: o.map((h, m) => d(h, m))
3140
3138
  }
3141
3139
  ) : o.length === 3 ? /* @__PURE__ */ f(
3142
3140
  "div",
@@ -3165,11 +3163,11 @@ const ai = ({
3165
3163
  "grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5",
3166
3164
  r
3167
3165
  ),
3168
- children: o.map((h, u) => {
3169
- const g = l > 0 && u === o.length - 1;
3166
+ children: o.map((h, m) => {
3167
+ const g = l > 0 && m === o.length - 1;
3170
3168
  return d(
3171
3169
  h,
3172
- u,
3170
+ m,
3173
3171
  g ? /* @__PURE__ */ f("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
3174
3172
  "+",
3175
3173
  l
@@ -3223,7 +3221,7 @@ const ai = ({
3223
3221
  alt: n.alt,
3224
3222
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3225
3223
  })), bi = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3226
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Re(r);
3224
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Re(r);
3227
3225
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3228
3226
  /* @__PURE__ */ s(
3229
3227
  "button",
@@ -3247,12 +3245,12 @@ const ai = ({
3247
3245
  ),
3248
3246
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
3249
3247
  /* @__PURE__ */ s(
3250
- Fs,
3248
+ Bs,
3251
3249
  {
3252
3250
  open: o,
3253
3251
  items: $s([{ src: e, alt: t }], n),
3254
3252
  initialIndex: l,
3255
- onClose: m
3253
+ onClose: u
3256
3254
  }
3257
3255
  )
3258
3256
  ] });
@@ -3260,9 +3258,9 @@ const ai = ({
3260
3258
  const t = e == null ? void 0 : e.src, [n, a] = z.useState(), r = z.useCallback(
3261
3259
  (d) => {
3262
3260
  if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
3263
- const m = d.naturalWidth / d.naturalHeight;
3261
+ const u = d.naturalWidth / d.naturalHeight;
3264
3262
  a(
3265
- (h) => h && h.src === t && h.ratio === m ? h : { src: t, ratio: m }
3263
+ (h) => h && h.src === t && h.ratio === u ? h : { src: t, ratio: u }
3266
3264
  );
3267
3265
  },
3268
3266
  [t]
@@ -3286,14 +3284,14 @@ const ai = ({
3286
3284
  loading: l = "lazy",
3287
3285
  onClick: d
3288
3286
  }) => {
3289
- const m = pi({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: p } = Re(d), w = m.length === 1, v = xi(w ? m[0] : void 0);
3290
- if (m.length === 0)
3287
+ const u = pi({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Re(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
3288
+ if (u.length === 0)
3291
3289
  return null;
3292
- const x = m.map(
3290
+ const x = u.map(
3293
3291
  (b, N) => gi({
3294
3292
  item: b,
3295
3293
  index: N,
3296
- totalCount: m.length,
3294
+ totalCount: u.length,
3297
3295
  fallbackLoading: l,
3298
3296
  imgRef: w ? v.imgRef : void 0,
3299
3297
  onLoad: w ? v.onLoad : void 0
@@ -3312,7 +3310,7 @@ const ai = ({
3312
3310
  "data-testid": "image-attachment",
3313
3311
  children: [
3314
3312
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
3315
- Bs,
3313
+ Fs,
3316
3314
  {
3317
3315
  tiles: x,
3318
3316
  onTileActivate: c,
@@ -3320,10 +3318,10 @@ const ai = ({
3320
3318
  }
3321
3319
  ) }),
3322
3320
  /* @__PURE__ */ s(
3323
- Fs,
3321
+ Bs,
3324
3322
  {
3325
- open: u,
3326
- items: $s(m, a),
3323
+ open: m,
3324
+ items: $s(u, a),
3327
3325
  initialIndex: g,
3328
3326
  onClose: p
3329
3327
  }
@@ -3348,11 +3346,11 @@ const ai = ({
3348
3346
  }), l = t[r], d = le(
3349
3347
  () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
3350
3348
  [l]
3351
- ), m = le(
3349
+ ), u = le(
3352
3350
  () => l ? Ci(l.src) : void 0,
3353
3351
  [l]
3354
3352
  );
3355
- return !l || !m ? null : /* @__PURE__ */ f(
3353
+ return !l || !u ? null : /* @__PURE__ */ f(
3356
3354
  Nt,
3357
3355
  {
3358
3356
  open: e,
@@ -3364,7 +3362,7 @@ const ai = ({
3364
3362
  /* @__PURE__ */ s(
3365
3363
  "iframe",
3366
3364
  {
3367
- src: m,
3365
+ src: u,
3368
3366
  title: d,
3369
3367
  className: "block h-[calc(100dvh-128px)] w-[min(96vw,1400px)] border-0 bg-white",
3370
3368
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
@@ -3423,12 +3421,12 @@ const ai = ({
3423
3421
  text: o,
3424
3422
  groupPosition: l,
3425
3423
  onClick: d,
3426
- onDismiss: m
3424
+ onDismiss: u
3427
3425
  }) => {
3428
- const h = Le(e), u = Si({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Re(d), v = e === "composer" && !!m;
3429
- if (u.length === 0)
3426
+ const h = Le(e), m = Si({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Re(d), v = e === "composer" && !!u;
3427
+ if (m.length === 0)
3430
3428
  return null;
3431
- const x = u.map((b) => ({
3429
+ const x = m.map((b) => ({
3432
3430
  src: b.src,
3433
3431
  filename: b.filename ?? ae(b.src)
3434
3432
  }));
@@ -3440,8 +3438,8 @@ const ai = ({
3440
3438
  groupPosition: l,
3441
3439
  "data-testid": "pdf-attachment",
3442
3440
  children: [
3443
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((b, N) => {
3444
- const _ = b.filename ?? ae(b.src), T = v && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
3441
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((b, N) => {
3442
+ const _ = b.filename ?? ae(b.src), T = v && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
3445
3443
  zs,
3446
3444
  {
3447
3445
  url: b.src,
@@ -3568,13 +3566,13 @@ const ai = ({
3568
3566
  preload: n.preload,
3569
3567
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3570
3568
  })), Oi = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
3571
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: h } = Re(i);
3569
+ const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Re(i);
3572
3570
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3573
3571
  /* @__PURE__ */ s(
3574
3572
  "button",
3575
3573
  {
3576
3574
  type: "button",
3577
- onClick: () => m(0),
3575
+ onClick: () => u(0),
3578
3576
  "aria-label": "Play video",
3579
3577
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
3580
3578
  children: /* @__PURE__ */ s(Hs, { item: { src: e, poster: t, mimeType: n }, index: 0 })
@@ -3601,9 +3599,9 @@ const ai = ({
3601
3599
  text: o,
3602
3600
  groupPosition: l,
3603
3601
  preload: d,
3604
- onClick: m
3602
+ onClick: u
3605
3603
  }) => {
3606
- const h = Di({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Re(m);
3604
+ const h = Di({ src: t, poster: n, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Re(u);
3607
3605
  if (h.length === 0)
3608
3606
  return null;
3609
3607
  const v = h.map(
@@ -3612,12 +3610,12 @@ const ai = ({
3612
3610
  return /* @__PURE__ */ f(
3613
3611
  Te,
3614
3612
  {
3615
- variant: u,
3613
+ variant: m,
3616
3614
  text: o,
3617
3615
  groupPosition: l,
3618
3616
  "data-testid": "video-attachment",
3619
3617
  children: [
3620
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Bs, { tiles: v, onTileActivate: p }) }),
3618
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Fs, { tiles: v, onTileActivate: p }) }),
3621
3619
  /* @__PURE__ */ s(
3622
3620
  js,
3623
3621
  {
@@ -3630,13 +3628,13 @@ const ai = ({
3630
3628
  ]
3631
3629
  }
3632
3630
  );
3633
- }, Pi = (e) => /* @__PURE__ */ s(Oi, { ...e }), zi = (e) => /* @__PURE__ */ s(Gs, { ...e, state: "sent" }), Fi = (e) => /* @__PURE__ */ s(Gs, { ...e, state: "received" }), Bi = {
3631
+ }, Pi = (e) => /* @__PURE__ */ s(Oi, { ...e }), zi = (e) => /* @__PURE__ */ s(Gs, { ...e, state: "sent" }), Bi = (e) => /* @__PURE__ */ s(Gs, { ...e, state: "received" }), Fi = {
3634
3632
  Composer: Pi,
3635
3633
  Sent: zi,
3636
- Received: Fi
3634
+ Received: Bi
3637
3635
  }, Ne = {
3638
3636
  Image: Ni,
3639
- Video: Bi,
3637
+ Video: Fi,
3640
3638
  Audio: Kr,
3641
3639
  Pdf: Li,
3642
3640
  File: ci
@@ -3842,11 +3840,11 @@ const Wi = ({
3842
3840
  var v;
3843
3841
  const r = Ws(n.attachments);
3844
3842
  if (r.length === 0) return null;
3845
- const i = ji(r), o = (v = n.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, m = o && $i(o, d) ? void 0 : o;
3843
+ const i = ji(r), o = (v = n.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, u = o && $i(o, d) ? void 0 : o;
3846
3844
  let h = 0;
3847
- const u = [], g = m ? "middle" : e, c = e === "single" || e === "end", p = (x, b, N) => {
3845
+ const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, N) => {
3848
3846
  const _ = t ? rt.Sent : rt.Received;
3849
- u.push(
3847
+ m.push(
3850
3848
  /* @__PURE__ */ s(
3851
3849
  _,
3852
3850
  {
@@ -3862,7 +3860,7 @@ const Wi = ({
3862
3860
  i,
3863
3861
  e
3864
3862
  );
3865
- h += 1, u.push(
3863
+ h += 1, m.push(
3866
3864
  /* @__PURE__ */ s(
3867
3865
  Yi,
3868
3866
  {
@@ -3900,12 +3898,12 @@ const Wi = ({
3900
3898
  padding: 0
3901
3899
  },
3902
3900
  children: [
3903
- u,
3904
- !m && /* @__PURE__ */ s(st, {})
3901
+ m,
3902
+ !u && /* @__PURE__ */ s(st, {})
3905
3903
  ]
3906
3904
  }
3907
3905
  ),
3908
- m ? /* @__PURE__ */ f(
3906
+ u ? /* @__PURE__ */ f(
3909
3907
  "div",
3910
3908
  {
3911
3909
  className: k("str-chat__message-bubble", {
@@ -3914,13 +3912,13 @@ const Wi = ({
3914
3912
  children: [
3915
3913
  /* @__PURE__ */ s(ze, { message: n, renderText: a }),
3916
3914
  /* @__PURE__ */ s(st, {}),
3917
- c && /* @__PURE__ */ s(Be, { side: t ? "me" : "other" })
3915
+ c && /* @__PURE__ */ s(Fe, { side: t ? "me" : "other" })
3918
3916
  ]
3919
3917
  }
3920
3918
  ) : null
3921
3919
  ] });
3922
3920
  }, Xi = (e) => {
3923
- var Lt, Rt, Mt, Dt, Ot, Pt, zt, Ft, Bt, $t;
3921
+ var Lt, Rt, Mt, Dt, Ot, Pt, zt, Bt, Ft, $t;
3924
3922
  const {
3925
3923
  additionalMessageInputProps: t,
3926
3924
  editing: n,
@@ -3930,17 +3928,17 @@ const Wi = ({
3930
3928
  groupedByUser: o,
3931
3929
  handleAction: l,
3932
3930
  handleOpenThread: d,
3933
- handleRetry: m,
3931
+ handleRetry: u,
3934
3932
  highlighted: h,
3935
- isMessageAIGenerated: u,
3933
+ isMessageAIGenerated: m,
3936
3934
  isMyMessage: g,
3937
3935
  message: c,
3938
3936
  renderText: p,
3939
3937
  threadList: w,
3940
3938
  viewerLanguage: v,
3941
3939
  onBroadcastClick: x,
3942
- resolvedBroadcastName: b
3943
- } = e, { client: N } = He("CustomMessage"), { channel: _ } = xe("CustomMessage"), { isUnlocking: T, onUnlockClick: R, onFetchSource: E, onDownloadClick: B } = lr("LockedAttachment"), [F, L] = $(!1), I = mn(c.id), {
3940
+ resolvedBroadcast: b
3941
+ } = e, { client: N } = He("CustomMessage"), { channel: _ } = xe("CustomMessage"), { isUnlocking: T, onUnlockClick: R, onFetchSource: E, onDownloadClick: F } = lr("LockedAttachment"), [B, L] = $(!1), I = mn(c.id), {
3944
3942
  Attachment: M = hn,
3945
3943
  EditMessageModal: S = fn,
3946
3944
  MessageActions: C,
@@ -3953,11 +3951,11 @@ const Wi = ({
3953
3951
  StreamedMessageText: V = _n,
3954
3952
  PinIndicator: y
3955
3953
  } = cs("CustomMessage"), D = yn(c), W = Nn(c), X = le(
3956
- () => u == null ? void 0 : u(c),
3957
- [u, c]
3954
+ () => m == null ? void 0 : m(c),
3955
+ [m, c]
3958
3956
  ), G = le(() => {
3959
3957
  const me = c.attachments ?? [], ge = c.shared_location ? [c.shared_location, ...me] : me;
3960
- if (!Fe(c)) return ge;
3958
+ if (!Be(c)) return ge;
3961
3959
  const Ut = ge.filter((jt) => !("type" in jt) || !Cs(jt));
3962
3960
  return Ut.length === ge.length ? ge : Ut;
3963
3961
  }, [c]), q = le(
@@ -3978,7 +3976,7 @@ const Wi = ({
3978
3976
  return /* @__PURE__ */ s(A, {});
3979
3977
  const ue = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, St = Sn(c);
3980
3978
  let fe;
3981
- Ct ? fe = () => m(c) : St && (fe = () => L(!0));
3979
+ Ct ? fe = () => u(c) : St && (fe = () => L(!0));
3982
3980
  const ee = g(), en = k(
3983
3981
  "str-chat__message str-chat__message-simple",
3984
3982
  `str-chat__message--${c.type}`,
@@ -3996,7 +3994,7 @@ const Wi = ({
3996
3994
  "str-chat__virtual-message__wrapper--first": r,
3997
3995
  "str-chat__virtual-message__wrapper--group": o
3998
3996
  }
3999
- ), Ge = c.poll_id && N.polls.fromState(c.poll_id), Et = gr(c), _e = Fe(c), tn = mt(c), Ye = !!(G != null && G.length && !c.quoted_message), It = _e && ee && Ye, sn = ne && Me && !c.quoted_message && !Ge && !X && !_e, Tt = {
3997
+ ), Ge = c.poll_id && N.polls.fromState(c.poll_id), Et = gr(c), _e = Be(c), tn = mt(c), Ye = !!(G != null && G.length && !c.quoted_message), It = _e && ee && Ye, sn = ne && Me && !c.quoted_message && !Ge && !X && !_e, Tt = {
4000
3998
  contentType: "text",
4001
3999
  amountText: (Mt = c.metadata) == null ? void 0 : Mt.amount_text,
4002
4000
  paymentStatus: (Dt = c.metadata) == null ? void 0 : Dt.payment_status,
@@ -4006,8 +4004,8 @@ const Wi = ({
4006
4004
  title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
4007
4005
  mimeType: (Pt = c.metadata) == null ? void 0 : Pt.attachment_mime_type,
4008
4006
  thumbnailUrl: (zt = c.metadata) == null ? void 0 : zt.attachment_thumbnail,
4009
- amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
4010
- detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
4007
+ amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
4008
+ detail: (Ft = c.metadata) == null ? void 0 : Ft.attachment_detail,
4011
4009
  paymentStatus: ($t = c.metadata) == null ? void 0 : $t.payment_status,
4012
4010
  onFetchSource: E ? () => E(c, _) : void 0
4013
4011
  };
@@ -4018,12 +4016,12 @@ const Wi = ({
4018
4016
  additionalMessageInputProps: t
4019
4017
  }
4020
4018
  ),
4021
- F && /* @__PURE__ */ s(
4019
+ B && /* @__PURE__ */ s(
4022
4020
  En,
4023
4021
  {
4024
4022
  MessageBouncePrompt: P,
4025
4023
  onClose: () => L(!1),
4026
- open: F
4024
+ open: B
4027
4025
  }
4028
4026
  ),
4029
4027
  /* @__PURE__ */ f(
@@ -4093,7 +4091,7 @@ const Wi = ({
4093
4091
  isMine: !1,
4094
4092
  isUnlocking: T(c.id),
4095
4093
  onUnlockClick: () => R ? R(c, _) : void 0,
4096
- onDownloadClick: () => B ? B(c, _) : void 0
4094
+ onDownloadClick: () => F ? F(c, _) : void 0
4097
4095
  }
4098
4096
  ),
4099
4097
  !ee && C && /* @__PURE__ */ s(C, {})
@@ -4112,7 +4110,7 @@ const Wi = ({
4112
4110
  renderText: p
4113
4111
  }
4114
4112
  ),
4115
- se && /* @__PURE__ */ s(Be, { side: ee ? "me" : "other" })
4113
+ se && /* @__PURE__ */ s(Fe, { side: ee ? "me" : "other" })
4116
4114
  ]
4117
4115
  }
4118
4116
  )
@@ -4168,7 +4166,7 @@ const Wi = ({
4168
4166
  }
4169
4167
  ),
4170
4168
  /* @__PURE__ */ s(st, {}),
4171
- se && /* @__PURE__ */ s(Be, { side: ee ? "me" : "other" })
4169
+ se && /* @__PURE__ */ s(Fe, { side: ee ? "me" : "other" })
4172
4170
  ]
4173
4171
  }
4174
4172
  ) })
@@ -4186,7 +4184,7 @@ const Wi = ({
4186
4184
  wr,
4187
4185
  {
4188
4186
  onBroadcastClick: x,
4189
- resolvedBroadcastName: b
4187
+ resolvedBroadcast: b
4190
4188
  }
4191
4189
  ),
4192
4190
  ue && /* @__PURE__ */ s(
@@ -4204,16 +4202,19 @@ const Wi = ({
4204
4202
  ] });
4205
4203
  }, qi = z.memo(
4206
4204
  Xi,
4207
- (e, t) => e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || e.resolvedBroadcastName !== t.resolvedBroadcastName ? !1 : un(e, t)
4205
+ (e, t) => {
4206
+ var n, a, r, i;
4207
+ return e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || ((n = e.resolvedBroadcast) == null ? void 0 : n.id) !== ((a = t.resolvedBroadcast) == null ? void 0 : a.id) || ((r = e.resolvedBroadcast) == null ? void 0 : r.name) !== ((i = t.resolvedBroadcast) == null ? void 0 : i.name) ? !1 : un(e, t);
4208
+ }
4208
4209
  ), Ki = (e) => {
4209
4210
  var i;
4210
- const t = he("CustomMessage"), n = ve(Is), a = (i = t.message.metadata) == null ? void 0 : i.broadcast_id, r = typeof a == "string" ? n == null ? void 0 : n[a] : void 0;
4211
+ const t = he("CustomMessage"), n = ve(Is), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? n == null ? void 0 : n[a] : void 0;
4211
4212
  return /* @__PURE__ */ s(
4212
4213
  qi,
4213
4214
  {
4214
4215
  ...t,
4215
4216
  ...e,
4216
- resolvedBroadcastName: r
4217
+ resolvedBroadcast: r
4217
4218
  }
4218
4219
  );
4219
4220
  }, Zi = () => {
@@ -4352,11 +4353,11 @@ const Wi = ({
4352
4353
  const l = o.current;
4353
4354
  if (!l)
4354
4355
  return;
4355
- const d = (m) => {
4356
- var u;
4357
- Array.from(((u = m.clipboardData) == null ? void 0 : u.items) ?? []).some(
4356
+ const d = (u) => {
4357
+ var m;
4358
+ Array.from(((m = u.clipboardData) == null ? void 0 : m.items) ?? []).some(
4358
4359
  (g) => g.kind === "file"
4359
- ) || m.stopPropagation();
4360
+ ) || u.stopPropagation();
4360
4361
  };
4361
4362
  return l.addEventListener("paste", d), () => l.removeEventListener("paste", d);
4362
4363
  }, []), // This card is the composer's ONE scroll container: staged previews and the
@@ -4444,16 +4445,16 @@ const Wi = ({
4444
4445
  composerInput: i
4445
4446
  }) => {
4446
4447
  var h;
4447
- const { channel: o } = xe(), l = ((h = o == null ? void 0 : o.data) == null ? void 0 : h.frozen) === !0, d = !!i, m = z.useRef(null);
4448
+ const { channel: o } = xe(), l = ((h = o == null ? void 0 : o.data) == null ? void 0 : h.frozen) === !0, d = !!i, u = z.useRef(null);
4448
4449
  return z.useEffect(() => {
4449
4450
  if (!d)
4450
4451
  return;
4451
- const u = m.current, g = u == null ? void 0 : u.parentElement;
4452
- if (!u || !g)
4452
+ const m = u.current, g = m == null ? void 0 : m.parentElement;
4453
+ if (!m || !g)
4453
4454
  return;
4454
- let c = u.offsetHeight;
4455
+ let c = m.offsetHeight;
4455
4456
  const p = () => {
4456
- const v = u.offsetHeight, x = v > c;
4457
+ const v = m.offsetHeight, x = v > c;
4457
4458
  c = v;
4458
4459
  const b = Array.from(
4459
4460
  g.querySelectorAll(".str-chat__list")
@@ -4466,13 +4467,13 @@ const Wi = ({
4466
4467
  if (p(), typeof ResizeObserver > "u")
4467
4468
  return;
4468
4469
  const w = new ResizeObserver(p);
4469
- return w.observe(u), () => {
4470
+ return w.observe(m), () => {
4470
4471
  w.disconnect(), g.style.removeProperty("--messaging-composer-height");
4471
4472
  };
4472
4473
  }, [d]), a ? d ? /* @__PURE__ */ f(
4473
4474
  "div",
4474
4475
  {
4475
- ref: m,
4476
+ ref: u,
4476
4477
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
4477
4478
  children: [
4478
4479
  /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
@@ -4497,7 +4498,7 @@ const Wi = ({
4497
4498
  ] }) : d ? /* @__PURE__ */ f(
4498
4499
  "div",
4499
4500
  {
4500
- ref: m,
4501
+ ref: u,
4501
4502
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
4502
4503
  children: [
4503
4504
  /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
@@ -4689,7 +4690,7 @@ const Wi = ({
4689
4690
  }
4690
4691
  if ((n == null ? void 0 : n.typing_events) === !1)
4691
4692
  return null;
4692
- const m = e ? [] : Object.values(i).filter(
4693
+ const u = e ? [] : Object.values(i).filter(
4693
4694
  ({ parent_id: v, user: x }) => {
4694
4695
  var b;
4695
4696
  return (x == null ? void 0 : x.id) !== ((b = r.user) == null ? void 0 : b.id) && !v;
@@ -4699,10 +4700,10 @@ const Wi = ({
4699
4700
  var b;
4700
4701
  return (x == null ? void 0 : x.id) !== ((b = r.user) == null ? void 0 : b.id) && v === (a == null ? void 0 : a.id);
4701
4702
  }
4702
- ) : [], u = e ? h : m;
4703
- if (!u.length)
4703
+ ) : [], m = e ? h : u;
4704
+ if (!m.length)
4704
4705
  return null;
4705
- const g = (w = u[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4706
+ const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4706
4707
  return /* @__PURE__ */ s(
4707
4708
  is,
4708
4709
  {
@@ -4754,7 +4755,7 @@ const Wi = ({
4754
4755
  ]
4755
4756
  }
4756
4757
  ) }) }),
4757
- /* @__PURE__ */ s(Be, { side: "other" })
4758
+ /* @__PURE__ */ s(Fe, { side: "other" })
4758
4759
  ] }) }) })
4759
4760
  ] })
4760
4761
  }
@@ -4826,9 +4827,9 @@ const vl = ({
4826
4827
  onBlockParticipant: o,
4827
4828
  showDeleteConversation: l = !0,
4828
4829
  onDeleteConversationClick: d,
4829
- onBlockParticipantClick: m,
4830
+ onBlockParticipantClick: u,
4830
4831
  onReportParticipantClick: h,
4831
- showBlockParticipant: u = !0,
4832
+ showBlockParticipant: m = !0,
4832
4833
  showReportParticipant: g = !0,
4833
4834
  composerDisabled: c = !1,
4834
4835
  composerDisabledReason: p,
@@ -4841,8 +4842,8 @@ const vl = ({
4841
4842
  showChannelInfo: T = !0,
4842
4843
  onParticipantNameClick: R,
4843
4844
  onBroadcastClick: E,
4844
- resolveBroadcastName: B,
4845
- composerInput: F
4845
+ resolveBroadcast: F,
4846
+ composerInput: B
4846
4847
  }) => {
4847
4848
  const { channel: L, messages: I } = xe(), M = j(E);
4848
4849
  Y(() => {
@@ -4853,7 +4854,7 @@ const vl = ({
4853
4854
  (V = M.current) == null || V.call(M, Q);
4854
4855
  }, []), C = E ? S : void 0, A = ar(
4855
4856
  I,
4856
- B
4857
+ F
4857
4858
  ), P = L.state.messages.some(
4858
4859
  (Q) => Q.type !== "deleted"
4859
4860
  ), U = v ? /* @__PURE__ */ s(z.Fragment, { children: v() }, "lt-channel-banner") : null, H = /* @__PURE__ */ s(
@@ -4867,10 +4868,10 @@ const vl = ({
4867
4868
  onLeaveConversation: i,
4868
4869
  onBlockParticipant: o,
4869
4870
  showDeleteConversation: l,
4870
- showBlockParticipant: u,
4871
+ showBlockParticipant: m,
4871
4872
  showReportParticipant: g,
4872
4873
  onDeleteConversationClick: d,
4873
- onBlockParticipantClick: m,
4874
+ onBlockParticipantClick: u,
4874
4875
  onReportParticipantClick: h,
4875
4876
  customChannelActions: x,
4876
4877
  renderChannelActions: b,
@@ -4891,7 +4892,7 @@ const vl = ({
4891
4892
  [C, N, _]
4892
4893
  );
4893
4894
  return /* @__PURE__ */ s(Is.Provider, { value: A, children: /* @__PURE__ */ s(
4894
- Bn,
4895
+ Fn,
4895
4896
  {
4896
4897
  overrides: {
4897
4898
  Message: te,
@@ -4899,7 +4900,7 @@ const vl = ({
4899
4900
  UnreadMessagesNotification: () => null,
4900
4901
  UnreadMessagesSeparator: () => null
4901
4902
  },
4902
- children: /* @__PURE__ */ s($n, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4903
+ children: /* @__PURE__ */ s($n, { children: B ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4903
4904
  /* @__PURE__ */ f(
4904
4905
  "div",
4905
4906
  {
@@ -4936,7 +4937,7 @@ const vl = ({
4936
4937
  renderFooter: () => a == null ? void 0 : a(L),
4937
4938
  disabled: c,
4938
4939
  disabledReason: p,
4939
- composerInput: F
4940
+ composerInput: B
4940
4941
  },
4941
4942
  "lt-channel-message-input"
4942
4943
  )
@@ -4975,7 +4976,7 @@ const vl = ({
4975
4976
  renderFooter: () => a == null ? void 0 : a(L),
4976
4977
  disabled: c,
4977
4978
  disabledReason: p,
4978
- composerInput: F
4979
+ composerInput: B
4979
4980
  },
4980
4981
  "lt-channel-message-input"
4981
4982
  )
@@ -4993,9 +4994,9 @@ const vl = ({
4993
4994
  onLeaveConversation: o,
4994
4995
  onBlockParticipant: l,
4995
4996
  className: d,
4996
- CustomChannelEmptyState: m = pl,
4997
+ CustomChannelEmptyState: u = pl,
4997
4998
  showDeleteConversation: h = !0,
4998
- onDeleteConversationClick: u,
4999
+ onDeleteConversationClick: m,
4999
5000
  onBlockParticipantClick: g,
5000
5001
  onReportParticipantClick: c,
5001
5002
  showBlockParticipant: p = !0,
@@ -5008,8 +5009,8 @@ const vl = ({
5008
5009
  showStarButton: T = !1,
5009
5010
  renderChannelBanner: R,
5010
5011
  customChannelActions: E,
5011
- renderChannelActions: B,
5012
- renderMessage: F,
5012
+ renderChannelActions: F,
5013
+ renderMessage: B,
5013
5014
  onMessageLinkClick: L,
5014
5015
  sendButton: I,
5015
5016
  attachmentPreviewList: M,
@@ -5017,7 +5018,7 @@ const vl = ({
5017
5018
  showChannelInfo: C = !0,
5018
5019
  onParticipantNameClick: A,
5019
5020
  onBroadcastClick: P,
5020
- resolveBroadcastName: U,
5021
+ resolveBroadcast: U,
5021
5022
  composerInput: H
5022
5023
  }) => {
5023
5024
  const te = Z(
@@ -5060,11 +5061,11 @@ const vl = ({
5060
5061
  d
5061
5062
  ),
5062
5063
  children: /* @__PURE__ */ s(Xs.Provider, { value: b ?? !1, children: /* @__PURE__ */ s(
5063
- Fn,
5064
+ Bn,
5064
5065
  {
5065
5066
  channel: e,
5066
5067
  MessageSystem: ml,
5067
- EmptyStateIndicator: m,
5068
+ EmptyStateIndicator: u,
5068
5069
  LoadingIndicator: Ue,
5069
5070
  DateSeparator: Ma,
5070
5071
  TypingIndicator: fl,
@@ -5081,9 +5082,9 @@ const vl = ({
5081
5082
  renderConversationFooter: i,
5082
5083
  onLeaveConversation: o,
5083
5084
  onBlockParticipant: l,
5084
- CustomChannelEmptyState: m,
5085
+ CustomChannelEmptyState: u,
5085
5086
  showDeleteConversation: h,
5086
- onDeleteConversationClick: u,
5087
+ onDeleteConversationClick: m,
5087
5088
  onBlockParticipantClick: g,
5088
5089
  onReportParticipantClick: c,
5089
5090
  showBlockParticipant: p,
@@ -5093,13 +5094,13 @@ const vl = ({
5093
5094
  showStarButton: T,
5094
5095
  renderChannelBanner: R,
5095
5096
  customChannelActions: E,
5096
- renderChannelActions: B,
5097
- renderMessage: F,
5097
+ renderChannelActions: F,
5098
+ renderMessage: B,
5098
5099
  viewerLanguage: S,
5099
5100
  showChannelInfo: C,
5100
5101
  onParticipantNameClick: A,
5101
5102
  onBroadcastClick: P,
5102
- resolveBroadcastName: U,
5103
+ resolveBroadcast: U,
5103
5104
  composerInput: H
5104
5105
  }
5105
5106
  )
@@ -5135,16 +5136,16 @@ const ro = ({
5135
5136
  initialParticipantData: o,
5136
5137
  CustomChannelEmptyState: l,
5137
5138
  onBlockParticipantClick: d,
5138
- onReportParticipantClick: m,
5139
+ onReportParticipantClick: u,
5139
5140
  dmAgentEnabled: h,
5140
- onMessageSent: u,
5141
+ onMessageSent: m,
5141
5142
  viewerLanguage: g,
5142
5143
  renderChannelBanner: c,
5143
5144
  customChannelActions: p,
5144
5145
  renderChannelActions: w,
5145
5146
  onParticipantNameClick: v,
5146
5147
  onBroadcastClick: x,
5147
- resolveBroadcastName: b,
5148
+ resolveBroadcast: b,
5148
5149
  renderMessage: N,
5149
5150
  onMessageLinkClick: _,
5150
5151
  showChannelInfo: T,
@@ -5152,8 +5153,8 @@ const ro = ({
5152
5153
  }) => {
5153
5154
  const {
5154
5155
  client: E,
5155
- isConnected: B,
5156
- isLoading: F,
5156
+ isConnected: F,
5157
+ isLoading: B,
5157
5158
  error: L,
5158
5159
  refreshConnection: I,
5159
5160
  service: M,
@@ -5166,7 +5167,7 @@ const ro = ({
5166
5167
  Y(() => {
5167
5168
  W.current = C;
5168
5169
  }, [C]), Y(() => {
5169
- if (!E || !B) return;
5170
+ if (!E || !F) return;
5170
5171
  const q = E.userID;
5171
5172
  if (!q) return;
5172
5173
  const K = `${q}::${i}`;
@@ -5228,14 +5229,14 @@ const ro = ({
5228
5229
  ), ne(), W.current || U("Failed to load conversation");
5229
5230
  }
5230
5231
  })();
5231
- }, [i, E, B, M, S]);
5232
+ }, [i, E, F, M, S]);
5232
5233
  const X = j(r);
5233
5234
  X.current = r;
5234
5235
  const G = Z(() => {
5235
5236
  var q;
5236
5237
  A(null), te(!0), (q = X.current) == null || q.call(X);
5237
5238
  }, []);
5238
- return F ? /* @__PURE__ */ s(Ue, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: I }) : !B || !E ? /* @__PURE__ */ s(
5239
+ return B ? /* @__PURE__ */ s(Ue, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: I }) : !F || !E ? /* @__PURE__ */ s(
5239
5240
  ke,
5240
5241
  {
5241
5242
  message: "Not connected to messaging service",
@@ -5253,15 +5254,15 @@ const ro = ({
5253
5254
  CustomChannelEmptyState: l,
5254
5255
  showDeleteConversation: Q,
5255
5256
  onBlockParticipantClick: d,
5256
- onReportParticipantClick: m,
5257
+ onReportParticipantClick: u,
5257
5258
  dmAgentEnabled: h,
5258
- onMessageSent: u,
5259
+ onMessageSent: m,
5259
5260
  viewerLanguage: g,
5260
5261
  customChannelActions: p,
5261
5262
  renderChannelActions: w,
5262
5263
  onParticipantNameClick: v,
5263
5264
  onBroadcastClick: x,
5264
- resolveBroadcastName: b,
5265
+ resolveBroadcast: b,
5265
5266
  renderMessage: N,
5266
5267
  onMessageLinkClick: _,
5267
5268
  showChannelInfo: T,
@@ -5306,7 +5307,7 @@ const Ks = z.createContext({
5306
5307
  });
5307
5308
  }, Zs = z.memo(
5308
5309
  (e) => {
5309
- var B, F, L;
5310
+ var F, B, L;
5310
5311
  const { channel: t, unread: n } = e, {
5311
5312
  selectedChannel: a,
5312
5313
  onChannelSelect: r,
@@ -5314,7 +5315,7 @@ const Ks = z.createContext({
5314
5315
  channelPreview: o,
5315
5316
  renderMessagePreview: l,
5316
5317
  viewerLanguage: d
5317
- } = _l(), { client: m } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = ps(t);
5318
+ } = _l(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = ps(t);
5318
5319
  if (o)
5319
5320
  return /* @__PURE__ */ s(
5320
5321
  o,
@@ -5332,10 +5333,10 @@ const Ks = z.createContext({
5332
5333
  const M = I.key === "Enter" || I.key === " ", S = I.repeat;
5333
5334
  !M || S || (I.preventDefault(), g());
5334
5335
  }, p = bs(
5335
- (B = t == null ? void 0 : t.state) == null ? void 0 : B.members,
5336
- m == null ? void 0 : m.userID,
5336
+ (F = t == null ? void 0 : t.state) == null ? void 0 : F.members,
5337
+ u == null ? void 0 : u.userID,
5337
5338
  t == null ? void 0 : t.type
5338
- ), w = vs(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
5339
+ ), w = vs(p == null ? void 0 : p.user), v = (B = p == null ? void 0 : p.user) == null ? void 0 : B.image, x = (() => {
5339
5340
  var M;
5340
5341
  const I = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
5341
5342
  if (I != null && I.length) {
@@ -5361,7 +5362,7 @@ const Ks = z.createContext({
5361
5362
  if (I) return I;
5362
5363
  const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
5363
5364
  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";
5364
- })(), _ = x != null && x.created_at ? Nl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, R = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = n ?? 0;
5365
+ })(), _ = x != null && x.created_at ? Nl(new Date(x.created_at)) : "", T = x ? Be(x) : !1, R = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = n ?? 0;
5365
5366
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5366
5367
  channelId: t == null ? void 0 : t.id,
5367
5368
  isSelected: h,
@@ -5391,7 +5392,7 @@ const Ks = z.createContext({
5391
5392
  name: w,
5392
5393
  image: v,
5393
5394
  size: 48,
5394
- starred: u
5395
+ starred: m
5395
5396
  }
5396
5397
  ),
5397
5398
  /* @__PURE__ */ f("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -5403,7 +5404,7 @@ const Ks = z.createContext({
5403
5404
  "text-sm font-medium truncate text-[#191918]"
5404
5405
  ),
5405
5406
  children: [
5406
- u && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
5407
+ m && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
5407
5408
  w
5408
5409
  ]
5409
5410
  }
@@ -5432,9 +5433,9 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5432
5433
  className: o,
5433
5434
  customEmptyStateIndicator: l,
5434
5435
  channelListPaginator: d = jn,
5435
- channelPreview: m,
5436
+ channelPreview: u,
5436
5437
  renderMessagePreview: h,
5437
- viewerLanguage: u,
5438
+ viewerLanguage: m,
5438
5439
  lockChannelOrder: g,
5439
5440
  onMessageNewHandler: c,
5440
5441
  onMessageNew: p,
@@ -5462,17 +5463,17 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5462
5463
  selectedChannel: t,
5463
5464
  onChannelSelect: e,
5464
5465
  debug: N,
5465
- channelPreview: m,
5466
+ channelPreview: u,
5466
5467
  renderMessagePreview: h,
5467
- viewerLanguage: u
5468
+ viewerLanguage: m
5468
5469
  }),
5469
5470
  [
5470
5471
  t,
5471
5472
  e,
5472
5473
  N,
5473
- m,
5474
+ u,
5474
5475
  h,
5475
- u
5476
+ m
5476
5477
  ]
5477
5478
  );
5478
5479
  return /* @__PURE__ */ s(
@@ -5543,15 +5544,15 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5543
5544
  actions: o
5544
5545
  }) => {
5545
5546
  var p;
5546
- const l = n != null && n.trim() !== "", d = a != null && a.trim() !== "", m = o != null && o.length > 0;
5547
- if (!l && !d && !m) return null;
5548
- const h = { color: t }, u = r > 1 ? {
5547
+ const l = n != null && n.trim() !== "", d = a != null && a.trim() !== "", u = o != null && o.length > 0;
5548
+ if (!l && !d && !u) return null;
5549
+ const h = { color: t }, m = r > 1 ? {
5549
5550
  ...h,
5550
5551
  display: "-webkit-box",
5551
5552
  WebkitBoxOrient: "vertical",
5552
5553
  WebkitLineClamp: r,
5553
5554
  overflow: "hidden"
5554
- } : h, g = m && (((p = o == null ? void 0 : o[0]) == null ? void 0 : p.variant) ?? "primary") === "secondary", c = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
5555
+ } : h, g = u && (((p = o == null ? void 0 : o[0]) == null ? void 0 : p.variant) ?? "primary") === "secondary", c = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
5555
5556
  l && /* @__PURE__ */ f("div", { className: "flex min-w-0 items-center gap-2", children: [
5556
5557
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
5557
5558
  /* @__PURE__ */ s(
@@ -5570,7 +5571,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5570
5571
  El,
5571
5572
  r <= 1 && "truncate"
5572
5573
  ),
5573
- style: u,
5574
+ style: m,
5574
5575
  children: a
5575
5576
  }
5576
5577
  )
@@ -5612,7 +5613,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5612
5613
  const [n, a] = z.useState({}), r = t.join(`
5613
5614
  `), [i, o] = z.useState(r);
5614
5615
  r !== i && (o(r), a({}));
5615
- const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !n[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, m = Al[d], h = Ll[d], u = Rl[d], g = Ml[d];
5616
+ const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !n[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Al[d], h = Ll[d], m = Rl[d], g = Ml[d];
5616
5617
  return /* @__PURE__ */ s(
5617
5618
  "div",
5618
5619
  {
@@ -5631,8 +5632,8 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5631
5632
  onError: () => a((v) => ({ ...v, [p]: !0 })),
5632
5633
  className: "absolute left-1/2 top-1/2 h-[74%] w-[66%] rounded-[12px] object-cover shadow-lg",
5633
5634
  style: {
5634
- transform: `translate(-50%, -50%) translateX(${h[w]}px) rotate(${m[w]}deg) scale(${g[w]})`,
5635
- zIndex: u[w]
5635
+ transform: `translate(-50%, -50%) translateX(${h[w]}px) rotate(${u[w]}deg) scale(${g[w]})`,
5636
+ zIndex: m[w]
5636
5637
  }
5637
5638
  },
5638
5639
  `${c}-${p}`
@@ -5670,17 +5671,17 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5670
5671
  actions: o,
5671
5672
  appIcon: l,
5672
5673
  accentColor: d,
5673
- groupPosition: m = "single"
5674
+ groupPosition: u = "single"
5674
5675
  }) => {
5675
5676
  const h = va({
5676
5677
  imagePresentation: i,
5677
5678
  images: r
5678
- }), u = r.length > 0, g = u && h === "hero", c = Ve({
5679
+ }), m = r.length > 0, g = m && h === "hero", c = Ve({
5679
5680
  variant: e,
5680
5681
  accentColor: d,
5681
5682
  layout: "featured",
5682
5683
  thumbnailUrl: g ? r[0] : void 0
5683
- }), p = m === "single" || m === "end";
5684
+ }), p = u === "single" || u === "end";
5684
5685
  return /* @__PURE__ */ s(
5685
5686
  vt,
5686
5687
  {
@@ -5694,7 +5695,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5694
5695
  accentHex: c.accentHex,
5695
5696
  "data-testid": "rich-card",
5696
5697
  children: [
5697
- u && /* @__PURE__ */ s(
5698
+ m && /* @__PURE__ */ s(
5698
5699
  Pl,
5699
5700
  {
5700
5701
  variant: e,
@@ -5722,10 +5723,10 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5722
5723
  )
5723
5724
  }
5724
5725
  );
5725
- }, zl = (e) => /* @__PURE__ */ s(Js, { ...e, variant: "dark" }), Fl = (e) => /* @__PURE__ */ s(Js, { ...e, variant: "light" }), io = {
5726
+ }, zl = (e) => /* @__PURE__ */ s(Js, { ...e, variant: "dark" }), Bl = (e) => /* @__PURE__ */ s(Js, { ...e, variant: "light" }), io = {
5726
5727
  Sent: zl,
5727
- Received: Fl
5728
- }, os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Bl = {
5728
+ Received: Bl
5729
+ }, os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Fl = {
5729
5730
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5730
5731
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5731
5732
  }, $l = ({ variant: e }) => /* @__PURE__ */ s(
@@ -5738,7 +5739,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", E
5738
5739
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5739
5740
  transform: e === "received" ? "scaleX(-1)" : void 0,
5740
5741
  transformOrigin: "center",
5741
- backgroundColor: Bl[e],
5742
+ backgroundColor: Fl[e],
5742
5743
  WebkitMask: os,
5743
5744
  mask: os
5744
5745
  }
@@ -5897,4 +5898,4 @@ export {
5897
5898
  dt as y,
5898
5899
  ut as z
5899
5900
  };
5900
- //# sourceMappingURL=index-i03XGFsr.js.map
5901
+ //# sourceMappingURL=index-NfAAanC-.js.map