@linktr.ee/messaging-react 3.14.4-rc-1784697283 → 3.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,8 @@ import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
2
2
  import V, { createContext as dt, useContext as Te, useCallback as Q, useState as U, useRef as G, useEffect as K, useId as qs, useMemo as re, Suspense as Ws } from "react";
3
3
  import { StreamChatService as Xs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Ks, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as Zs, useChannelStateContext as oe, useChatContext as fe, DateSeparator as Js, MessageStatus as Qs, useMessageContext as Ne, MessageErrorIcon as at, MessageText as $e, areMessageUIPropsEqual as en, useMessageReminder as tn, useComponentContext as cs, Attachment as sn, EditMessageModal as nn, MessageBlocked as an, MessageBouncePrompt as rn, MessageDeleted as ln, MessageIsThreadReplyInChannelButtonIndicator as on, MessageRepliesCountButton as cn, ReminderNotification as dn, StreamedMessageText as un, messageHasAttachments as mn, messageHasReactions as hn, isDateSeparatorMessage as fn, isMessageBlocked as gn, isMessageBounced as pn, MessageBounceModal as bn, Poll as vn, useMessageComposer as xn, useStateStore as wn, MessageInput as qt, useMessageInputContext as _n, useMessageComposerHasSendableData as Nn, AttachmentPreviewList as yn, QuotedMessagePreview as kn, TextareaComposer as Cn, MessageTimestamp as Ke, AIStates as Ze, useTypingContext as Sn, useAIState as En, Channel as In, WithComponents as Tn, Window as Mn, MessageList as Wt, ChannelList as An, InfiniteScroll as Rn } from "stream-chat-react";
6
- import { StarIcon as Ie, DotsThreeIcon as Ln, SpinnerGapIcon as Oe, SignOutIcon as Dn, ProhibitInsetIcon as Xt, FlagIcon as ds, ArrowLeftIcon as rt, CurrencyDollarIcon as zn, CaretRightIcon as xe, SparkleIcon as we, FileIcon as us, ImageIcon as On, SpeakerHighIcon as Pn, VideoCameraIcon as ms, FileMdIcon as Fn, FileTextIcon as $n, FileZipIcon as Bn, FilePptIcon as Un, FileCsvIcon as jn, FileXlsIcon as Vn, FileDocIcon as Gn, FilePdfIcon as Hn, CircleNotchIcon as Se, PlayIcon as it, PauseIcon as Yn, LinkIcon as qn, DownloadSimpleIcon as Ee, XIcon as He, CaretLeftIcon as Wn, GiftIcon as Xn, ThumbsUpIcon as Kn, ThumbsDownIcon as Zn, ChecksIcon as Jn, PencilSimpleIcon as Qn, TrashSimpleIcon as ea, ArrowUpIcon as ta, ProhibitIcon as sa } from "@phosphor-icons/react";
5
+ import { Chat as Zs, useChannelStateContext as oe, useChatContext as fe, DateSeparator as Js, MessageStatus as Qs, useMessageContext as Ne, MessageErrorIcon as at, MessageText as $e, areMessageUIPropsEqual as en, useMessageReminder as tn, useComponentContext as cs, Attachment as sn, EditMessageModal as nn, MessageBlocked as an, MessageBouncePrompt as rn, MessageDeleted as ln, MessageIsThreadReplyInChannelButtonIndicator as on, MessageRepliesCountButton as cn, ReminderNotification as dn, StreamedMessageText as un, messageHasAttachments as mn, messageHasReactions as hn, isDateSeparatorMessage as fn, isMessageBlocked as gn, isMessageBounced as pn, MessageBounceModal as bn, Poll as vn, useMessageComposer as xn, useStateStore as _n, MessageInput as qt, useMessageInputContext as wn, useMessageComposerHasSendableData as Nn, AttachmentPreviewList as yn, QuotedMessagePreview as kn, TextareaComposer as Cn, MessageTimestamp as Ke, AIStates as Ze, useTypingContext as Sn, useAIState as En, Channel as In, WithComponents as Tn, Window as Mn, MessageList as Wt, ChannelList as An, InfiniteScroll as Rn } from "stream-chat-react";
6
+ import { StarIcon as Ie, DotsThreeIcon as Ln, SpinnerGapIcon as Oe, SignOutIcon as Dn, ProhibitInsetIcon as Xt, FlagIcon as ds, ArrowLeftIcon as rt, CurrencyDollarIcon as zn, CaretRightIcon as xe, SparkleIcon as _e, FileIcon as us, ImageIcon as On, SpeakerHighIcon as Pn, VideoCameraIcon as ms, FileMdIcon as Fn, FileTextIcon as $n, FileZipIcon as Bn, FilePptIcon as Un, FileCsvIcon as jn, FileXlsIcon as Vn, FileDocIcon as Gn, FilePdfIcon as Hn, CircleNotchIcon as Se, PlayIcon as it, PauseIcon as Yn, LinkIcon as qn, DownloadSimpleIcon as Ee, XIcon as He, CaretLeftIcon as Wn, GiftIcon as Xn, ThumbsUpIcon as Kn, ThumbsDownIcon as Zn, ChecksIcon as Jn, PencilSimpleIcon as Qn, TrashSimpleIcon as ea, ArrowUpIcon as ta, ProhibitIcon as sa } from "@phosphor-icons/react";
7
7
  import S from "classnames";
8
8
  import { MessageActions as na, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
9
9
  const fs = dt({
@@ -38,7 +38,7 @@ const fs = dt({
38
38
  serviceConfig: !!n,
39
39
  capabilities: Object.keys(r)
40
40
  });
41
- const [d, m] = U(null), [g, h] = U(null), [f, c] = U(!1), [b, x] = U(!1), [v, p] = U(null), w = G(!1), _ = G(null), y = G(n);
41
+ const [d, m] = U(null), [g, h] = U(null), [f, c] = U(!1), [b, x] = U(!1), [v, p] = U(null), _ = G(!1), w = G(null), y = G(n);
42
42
  y.current = n;
43
43
  const z = G(i);
44
44
  z.current = i;
@@ -69,7 +69,7 @@ const fs = dt({
69
69
  K(() => {
70
70
  const M = R.current, P = y.current;
71
71
  if (o) {
72
- _.current = null, m(null), h(null), c(!1), p(null), x(!1);
72
+ w.current = null, m(null), h(null), c(!1), p(null), x(!1);
73
73
  return;
74
74
  }
75
75
  if (!a || !D || !P) {
@@ -89,7 +89,7 @@ const fs = dt({
89
89
  debug: z.current,
90
90
  client: D
91
91
  });
92
- _.current = $, m($), l("✅ SERVICE SET", {
92
+ w.current = $, m($), l("✅ SERVICE SET", {
93
93
  renderCount: M,
94
94
  serviceInstance: !!$
95
95
  });
@@ -101,7 +101,7 @@ const fs = dt({
101
101
  hasService: !!d,
102
102
  hasUser: !!t,
103
103
  userId: t == null ? void 0 : t.id,
104
- isConnecting: w.current,
104
+ isConnecting: _.current,
105
105
  isConnected: f,
106
106
  dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
107
107
  }), o)
@@ -110,7 +110,7 @@ const fs = dt({
110
110
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
111
111
  return;
112
112
  }
113
- if (w.current) {
113
+ if (_.current) {
114
114
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
115
115
  return;
116
116
  }
@@ -122,7 +122,7 @@ const fs = dt({
122
122
  return;
123
123
  }
124
124
  (async () => {
125
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, x(!0), p(null);
125
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, x(!0), p(null);
126
126
  try {
127
127
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
128
128
  const j = await d.connectUser(t);
@@ -137,7 +137,7 @@ const fs = dt({
137
137
  error: Z
138
138
  });
139
139
  } finally {
140
- x(!1), w.current = !1, l("🔄 USER CONNECTION FINISHED", {
140
+ x(!1), _.current = !1, l("🔄 USER CONNECTION FINISHED", {
141
141
  userId: t.id,
142
142
  isConnected: f
143
143
  });
@@ -147,7 +147,7 @@ const fs = dt({
147
147
  const M = D;
148
148
  return () => {
149
149
  var P;
150
- M && (L.current = null, (P = _.current) == null || P.disconnectUser().catch(console.error));
150
+ M && (L.current = null, (P = w.current) == null || P.disconnectUser().catch(console.error));
151
151
  };
152
152
  }, [D]);
153
153
  const k = Q(async () => {
@@ -408,10 +408,10 @@ const ne = ({
408
408
  logLabel: g = "useChannelModerationActions"
409
409
  }) => {
410
410
  var I;
411
- const { service: h, debug: f } = ut(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [x, v] = U(!1), [p, w] = U(null), [_, y] = U(!1), [z, E] = U(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
411
+ const { service: h, debug: f } = ut(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [x, v] = U(!1), [p, _] = U(null), [w, y] = U(!1), [z, E] = U(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
412
412
  return K(() => {
413
413
  if (!b || !h || !c) {
414
- v(!1), w(null);
414
+ v(!1), _(null);
415
415
  return;
416
416
  }
417
417
  let C = !1;
@@ -427,7 +427,7 @@ const ne = ({
427
427
  } catch (T) {
428
428
  C || console.error(`[${g}] Failed to check blocked status:`, T);
429
429
  } finally {
430
- C || w({ participantId: c, service: h });
430
+ C || _({ participantId: c, service: h });
431
431
  }
432
432
  })(), () => {
433
433
  C = !0;
@@ -435,11 +435,11 @@ const ne = ({
435
435
  }, [b, h, c, g]), {
436
436
  isParticipantBlocked: x,
437
437
  isCheckingBlockedStatus: R,
438
- isLeaving: _,
438
+ isLeaving: w,
439
439
  isUpdatingBlockStatus: z,
440
440
  handleLeaveConversation: async () => {
441
441
  var C;
442
- if (!_) {
442
+ if (!w) {
443
443
  o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), y(!0);
444
444
  try {
445
445
  const T = ((C = e._client) == null ? void 0 : C.userID) ?? null;
@@ -514,8 +514,8 @@ const ne = ({
514
514
  }) => {
515
515
  const [f, c] = U(!1), b = G(null), x = qs(), v = Q(() => c(!1), []), {
516
516
  isParticipantBlocked: p,
517
- isCheckingBlockedStatus: w,
518
- isLeaving: _,
517
+ isCheckingBlockedStatus: _,
518
+ isLeaving: w,
519
519
  isUpdatingBlockStatus: y,
520
520
  handleLeaveConversation: z,
521
521
  handleBlockUser: E,
@@ -574,15 +574,15 @@ const ne = ({
574
574
  ye,
575
575
  {
576
576
  onClick: z,
577
- disabled: _,
578
- "aria-busy": _,
577
+ disabled: w,
578
+ "aria-busy": w,
579
579
  children: [
580
- _ ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Dn, { className: "h-5 w-5" }),
580
+ w ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Dn, { className: "h-5 w-5" }),
581
581
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
582
582
  ]
583
583
  }
584
584
  ) }),
585
- a && /* @__PURE__ */ s("li", { children: w ? (
585
+ a && /* @__PURE__ */ s("li", { children: _ ? (
586
586
  // Block status not yet resolved — show a disabled placeholder
587
587
  // so a premature click can't act on a stale block state.
588
588
  /* @__PURE__ */ u(ye, { disabled: !0, "aria-busy": !0, children: [
@@ -641,17 +641,17 @@ const ne = ({
641
641
  onParticipantNameClick: v
642
642
  }) => {
643
643
  var D, L, k, I;
644
- const { channel: p } = oe(), { client: w } = fe(), _ = V.useMemo(
644
+ const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
645
645
  () => {
646
646
  var C;
647
647
  return Ye(
648
648
  (C = p.state) == null ? void 0 : C.members,
649
- w == null ? void 0 : w.userID,
649
+ _ == null ? void 0 : _.userID,
650
650
  p.type
651
651
  );
652
652
  },
653
- [(D = p.state) == null ? void 0 : D.members, w == null ? void 0 : w.userID, p.type]
654
- ), y = ht(_ == null ? void 0 : _.user), z = (L = _ == null ? void 0 : _.user) == null ? void 0 : L.image, E = mt(p), R = pa((k = p.data) == null ? void 0 : k.customer_tag) && (_ == null ? void 0 : _.is_follower) === !0, F = async () => {
653
+ [(D = p.state) == null ? void 0 : D.members, _ == null ? void 0 : _.userID, p.type]
654
+ ), y = ht(w == null ? void 0 : w.user), z = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, E = mt(p), R = pa((k = p.data) == null ? void 0 : k.customer_tag) && (w == null ? void 0 : w.is_follower) === !0, F = async () => {
655
655
  try {
656
656
  E ? await p.unpin() : await p.pin();
657
657
  } catch (C) {
@@ -694,7 +694,7 @@ const ne = ({
694
694
  /* @__PURE__ */ s(
695
695
  ne,
696
696
  {
697
- id: ((I = _ == null ? void 0 : _.user) == null ? void 0 : I.id) || p.id || "unknown",
697
+ id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || p.id || "unknown",
698
698
  name: y,
699
699
  image: z,
700
700
  dmAgentEnabled: r,
@@ -734,7 +734,7 @@ const ne = ({
734
734
  ] })
735
735
  ] }),
736
736
  r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
737
- /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
737
+ /* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
738
738
  /* @__PURE__ */ s("span", { children: ga })
739
739
  ] })
740
740
  ] })
@@ -766,7 +766,7 @@ const ne = ({
766
766
  lt,
767
767
  {
768
768
  channel: p,
769
- participant: _,
769
+ participant: w,
770
770
  showDeleteConversation: l,
771
771
  showBlockParticipant: d,
772
772
  showReportParticipant: m,
@@ -787,7 +787,7 @@ const ne = ({
787
787
  function xa(e) {
788
788
  return e != null && e.length ? e.some((t) => t.type === ct) ? "down" : e.some((t) => t.type === ot) ? "up" : null : null;
789
789
  }
790
- function wa(e) {
790
+ function _a(e) {
791
791
  const { channel: t } = oe(), { client: n } = fe("useMessageVote"), a = re(
792
792
  () => xa(e.own_reactions),
793
793
  [e.own_reactions]
@@ -814,7 +814,7 @@ function wa(e) {
814
814
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
815
815
  return { selected: a, voteUp: r, voteDown: i };
816
816
  }
817
- function _a(e) {
817
+ function wa(e) {
818
818
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
819
819
  }
820
820
  function ps({
@@ -822,7 +822,7 @@ function ps({
822
822
  viewerLanguage: t
823
823
  }) {
824
824
  var r;
825
- const n = e == null ? void 0 : e.text, a = _a(t);
825
+ const n = e == null ? void 0 : e.text, a = wa(t);
826
826
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
827
827
  }
828
828
  const Na = ["linktr.ee"], Jt = "messaging-attachment-v1_0";
@@ -885,7 +885,7 @@ function Ia(e) {
885
885
  const t = ce(e);
886
886
  return t !== "document" ? Sa[t] : Ea[bs(e)];
887
887
  }
888
- function _e(e, t) {
888
+ function we(e, t) {
889
889
  return V.createElement(Ia(e), t);
890
890
  }
891
891
  const Ta = (e) => {
@@ -903,7 +903,7 @@ const Ta = (e) => {
903
903
  muted: d = !1,
904
904
  onContainerClick: m
905
905
  }) => {
906
- const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [x, v] = U(a), [p, w] = U(0), [_, y] = U(!1), [z, E] = U(!1), [R, F] = U(!1), [D, L] = U(!1), [k, I] = U(!0), [C, T] = U(null), M = Q(() => {
906
+ const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [x, v] = U(a), [p, _] = U(0), [w, y] = U(!1), [z, E] = U(!1), [R, F] = U(!1), [D, L] = U(!1), [k, I] = U(!0), [C, T] = U(null), M = Q(() => {
907
907
  F(!1), v(!0);
908
908
  }, []), P = Q((N) => {
909
909
  const A = f.current;
@@ -919,7 +919,7 @@ const Ta = (e) => {
919
919
  }, []), j = (N) => {
920
920
  N.stopPropagation(), y(!0);
921
921
  const A = P(N);
922
- w(A), $(A);
922
+ _(A), $(A);
923
923
  };
924
924
  K(() => {
925
925
  r !== void 0 && r !== b.current && (b.current = r, v(r));
@@ -930,25 +930,25 @@ const Ta = (e) => {
930
930
  }
931
931
  const N = () => {
932
932
  const A = h.current;
933
- A && A.duration && !_ && w(A.currentTime / A.duration), c.current = requestAnimationFrame(N);
933
+ A && A.duration && !w && _(A.currentTime / A.duration), c.current = requestAnimationFrame(N);
934
934
  };
935
935
  return c.current = requestAnimationFrame(N), () => {
936
936
  c.current !== null && cancelAnimationFrame(c.current);
937
937
  };
938
- }, [x, _]), K(() => {
938
+ }, [x, w]), K(() => {
939
939
  const N = h.current;
940
940
  N && (x ? N.play().catch((A) => {
941
941
  v(!1), F(!0);
942
942
  }) : N.pause());
943
943
  }, [x]), K(() => {
944
- if (!_) return;
945
- const N = (H) => w(P(H)), A = (H) => {
944
+ if (!w) return;
945
+ const N = (H) => _(P(H)), A = (H) => {
946
946
  y(!1), $(P(H));
947
947
  };
948
948
  return window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", A), () => {
949
949
  window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", A);
950
950
  };
951
- }, [_, P, $]);
951
+ }, [w, P, $]);
952
952
  const Z = C ? { aspectRatio: String(C) } : void 0, ee = C ? "" : " aspect-video", X = Math.round(p * 100);
953
953
  return /* @__PURE__ */ u(
954
954
  "div",
@@ -982,7 +982,7 @@ const Ta = (e) => {
982
982
  className: "absolute inset-0 h-full w-full object-cover"
983
983
  }
984
984
  ),
985
- !n && (g === "audio" || k) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: _e(t, {
985
+ !n && (g === "audio" || k) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
986
986
  className: "size-12 text-black/20",
987
987
  weight: "regular"
988
988
  }) }),
@@ -1001,7 +1001,7 @@ const Ta = (e) => {
1001
1001
  onWaiting: () => L(!0),
1002
1002
  onPlay: () => F(!1),
1003
1003
  onEnded: () => {
1004
- i || (v(!1), w(0));
1004
+ i || (v(!1), _(0));
1005
1005
  },
1006
1006
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1007
1007
  }
@@ -1025,7 +1025,7 @@ const Ta = (e) => {
1025
1025
  N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && T(N.videoWidth / N.videoHeight);
1026
1026
  },
1027
1027
  onEnded: () => {
1028
- i || (v(!1), w(0));
1028
+ i || (v(!1), _(0));
1029
1029
  },
1030
1030
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1031
1031
  }
@@ -1115,7 +1115,7 @@ const Ta = (e) => {
1115
1115
  /* @__PURE__ */ s(
1116
1116
  "div",
1117
1117
  {
1118
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${z || _ ? "h-1.5" : "h-1"}`,
1118
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${z || w ? "h-1.5" : "h-1"}`,
1119
1119
  children: /* @__PURE__ */ s(
1120
1120
  "div",
1121
1121
  {
@@ -1128,7 +1128,7 @@ const Ta = (e) => {
1128
1128
  /* @__PURE__ */ s(
1129
1129
  "div",
1130
1130
  {
1131
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${z || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1131
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${z || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1132
1132
  style: { left: `${X}%` }
1133
1133
  }
1134
1134
  )
@@ -1196,7 +1196,7 @@ const Ta = (e) => {
1196
1196
  "div",
1197
1197
  {
1198
1198
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1199
- children: _e(e, {
1199
+ children: we(e, {
1200
1200
  className: Qt(r),
1201
1201
  weight: "regular"
1202
1202
  })
@@ -1213,7 +1213,7 @@ const Ta = (e) => {
1213
1213
  "div",
1214
1214
  {
1215
1215
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1216
- children: _e(e, {
1216
+ children: we(e, {
1217
1217
  className: Qt(r),
1218
1218
  weight: "regular"
1219
1219
  })
@@ -1260,7 +1260,7 @@ const Ta = (e) => {
1260
1260
  }
1261
1261
  ),
1262
1262
  /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
1263
- _e(r, {
1263
+ we(r, {
1264
1264
  className: S(
1265
1265
  "size-5 shrink-0",
1266
1266
  f ? "text-white/55" : "text-black/55"
@@ -1285,7 +1285,7 @@ const Ta = (e) => {
1285
1285
  }
1286
1286
  );
1287
1287
  };
1288
- function ws(e) {
1288
+ function _s(e) {
1289
1289
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1290
1290
  }
1291
1291
  function ft(e) {
@@ -1330,12 +1330,12 @@ const gt = ({ attachment: e, isMyMessage: t }) => {
1330
1330
  ] });
1331
1331
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
1332
1332
  };
1333
- function _s(e) {
1333
+ function ws(e) {
1334
1334
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1335
1335
  }
1336
1336
  function pt(e) {
1337
1337
  var t;
1338
- return (t = e.attachments) == null ? void 0 : t.find(_s);
1338
+ return (t = e.attachments) == null ? void 0 : t.find(ws);
1339
1339
  }
1340
1340
  async function Pa(e, t) {
1341
1341
  let n;
@@ -1404,7 +1404,7 @@ const Ns = ({
1404
1404
  fileSize: a,
1405
1405
  thumbnailUrl: r
1406
1406
  }) => {
1407
- const i = a !== void 0 ? ws(a) : void 0;
1407
+ const i = a !== void 0 ? _s(a) : void 0;
1408
1408
  return /* @__PURE__ */ s(
1409
1409
  xs,
1410
1410
  {
@@ -1432,7 +1432,7 @@ const Ns = ({
1432
1432
  fileSize: a,
1433
1433
  thumbnailUrl: r
1434
1434
  }) => {
1435
- const i = ce(t), o = a !== void 0 ? ws(a) : void 0;
1435
+ const i = ce(t), o = a !== void 0 ? _s(a) : void 0;
1436
1436
  return /* @__PURE__ */ s(
1437
1437
  xs,
1438
1438
  {
@@ -1730,7 +1730,7 @@ const ar = {
1730
1730
  rr[e]
1731
1731
  ),
1732
1732
  "aria-hidden": !0,
1733
- children: _e(a, {
1733
+ children: we(a, {
1734
1734
  className: S("size-6", ir[e]),
1735
1735
  weight: "regular"
1736
1736
  })
@@ -1837,8 +1837,8 @@ const lr = ({
1837
1837
  if ((m == null ? void 0 : m(v)) === !1) return;
1838
1838
  const p = c[v];
1839
1839
  if (!p) return;
1840
- const w = p.filename ?? ie(p.src);
1841
- Cs(p.src, w);
1840
+ const _ = p.filename ?? ie(p.src);
1841
+ Cs(p.src, _);
1842
1842
  };
1843
1843
  if (c.length === 0)
1844
1844
  return null;
@@ -1877,7 +1877,7 @@ const lr = ({
1877
1877
  Composer: cr,
1878
1878
  Sent: dr,
1879
1879
  Received: ur
1880
- }, wt = ({
1880
+ }, _t = ({
1881
1881
  onPrev: e,
1882
1882
  onNext: t,
1883
1883
  prevLabel: n = "Previous",
@@ -1988,7 +1988,7 @@ const lr = ({
1988
1988
  ]
1989
1989
  }
1990
1990
  );
1991
- }, Qe = (e, t, n) => Math.min(Math.max(e, t), n), _t = ({
1991
+ }, Qe = (e, t, n) => Math.min(Math.max(e, t), n), wt = ({
1992
1992
  length: e,
1993
1993
  initialIndex: t,
1994
1994
  open: n
@@ -2109,7 +2109,7 @@ const lr = ({
2109
2109
  initialIndex: n = 0,
2110
2110
  onClose: a
2111
2111
  }) => {
2112
- const { index: r, prev: i, next: o } = _t({
2112
+ const { index: r, prev: i, next: o } = wt({
2113
2113
  length: t.length,
2114
2114
  initialIndex: n,
2115
2115
  open: e
@@ -2148,7 +2148,7 @@ const lr = ({
2148
2148
  `${r}:${l.src}`
2149
2149
  ),
2150
2150
  t.length > 1 ? /* @__PURE__ */ s(
2151
- wt,
2151
+ _t,
2152
2152
  {
2153
2153
  onPrev: i,
2154
2154
  onNext: o,
@@ -2336,17 +2336,17 @@ const lr = ({
2336
2336
  ]
2337
2337
  }
2338
2338
  );
2339
- }, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), wr = {
2339
+ }, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), _r = {
2340
2340
  Composer: br,
2341
2341
  Sent: vr,
2342
2342
  Received: xr
2343
- }, _r = ({
2343
+ }, wr = ({
2344
2344
  open: e,
2345
2345
  items: t,
2346
2346
  initialIndex: n = 0,
2347
2347
  onClose: a
2348
2348
  }) => {
2349
- const { index: r, prev: i, next: o } = _t({
2349
+ const { index: r, prev: i, next: o } = wt({
2350
2350
  length: t.length,
2351
2351
  initialIndex: n,
2352
2352
  open: e
@@ -2377,7 +2377,7 @@ const lr = ({
2377
2377
  `${r}:${l.src}`
2378
2378
  ),
2379
2379
  t.length > 1 ? /* @__PURE__ */ s(
2380
- wt,
2380
+ _t,
2381
2381
  {
2382
2382
  onPrev: i,
2383
2383
  onNext: o,
@@ -2435,9 +2435,9 @@ const lr = ({
2435
2435
  ), v = e === "composer" && !!m;
2436
2436
  if (h.length === 0)
2437
2437
  return null;
2438
- const p = h.map((w) => ({
2439
- src: w.src,
2440
- filename: w.filename ?? ie(w.src)
2438
+ const p = h.map((_) => ({
2439
+ src: _.src,
2440
+ filename: _.filename ?? ie(_.src)
2441
2441
  }));
2442
2442
  return /* @__PURE__ */ u(
2443
2443
  Me,
@@ -2447,11 +2447,11 @@ const lr = ({
2447
2447
  groupPosition: l,
2448
2448
  "data-testid": "pdf-attachment",
2449
2449
  children: [
2450
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((w, _) => {
2451
- const y = w.filename ?? ie(w.src), z = v && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2450
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
2451
+ const y = _.filename ?? ie(_.src), z = v && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2452
2452
  Ss,
2453
2453
  {
2454
- url: w.src,
2454
+ url: _.src,
2455
2455
  filename: y,
2456
2456
  variant: "inline",
2457
2457
  label: `Download ${y}`,
@@ -2462,16 +2462,16 @@ const lr = ({
2462
2462
  kr,
2463
2463
  {
2464
2464
  variant: g,
2465
- item: w,
2466
- index: _,
2465
+ item: _,
2466
+ index: w,
2467
2467
  onActivate: b,
2468
2468
  trailingAction: z
2469
2469
  },
2470
- `${w.src}-${_}`
2470
+ `${_.src}-${w}`
2471
2471
  );
2472
2472
  }) }),
2473
2473
  /* @__PURE__ */ s(
2474
- _r,
2474
+ wr,
2475
2475
  {
2476
2476
  open: f,
2477
2477
  items: p,
@@ -2492,7 +2492,7 @@ const lr = ({
2492
2492
  initialIndex: n = 0,
2493
2493
  onClose: a
2494
2494
  }) => {
2495
- const { index: r, prev: i, next: o } = _t({
2495
+ const { index: r, prev: i, next: o } = wt({
2496
2496
  length: t.length,
2497
2497
  initialIndex: n,
2498
2498
  open: e
@@ -2525,7 +2525,7 @@ const lr = ({
2525
2525
  `${r}:${l.src}`
2526
2526
  ),
2527
2527
  t.length > 1 ? /* @__PURE__ */ s(
2528
- wt,
2528
+ _t,
2529
2529
  {
2530
2530
  onPrev: i,
2531
2531
  onNext: o,
@@ -2621,7 +2621,7 @@ const lr = ({
2621
2621
  if (g.length === 0)
2622
2622
  return null;
2623
2623
  const v = g.map(
2624
- (p, w) => Mr(p, w, g.length)
2624
+ (p, _) => Mr(p, _, g.length)
2625
2625
  );
2626
2626
  return /* @__PURE__ */ u(
2627
2627
  Me,
@@ -2656,7 +2656,7 @@ const lr = ({
2656
2656
  Sent: Dr,
2657
2657
  Received: zr
2658
2658
  }, ke = {
2659
- Image: wr,
2659
+ Image: _r,
2660
2660
  Video: Or,
2661
2661
  Audio: Qa,
2662
2662
  Pdf: Ir,
@@ -2669,7 +2669,7 @@ const lr = ({
2669
2669
  function $r(e) {
2670
2670
  return Te(zs)[e] ?? Fr[e];
2671
2671
  }
2672
- const Br = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-AUQr0rQ8.js")), jr = () => /* @__PURE__ */ s(
2672
+ const Br = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-CZq9t0G_.js")), jr = () => /* @__PURE__ */ s(
2673
2673
  "div",
2674
2674
  {
2675
2675
  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)]",
@@ -3014,7 +3014,7 @@ const ei = {
3014
3014
  "flex h-full w-full items-center justify-center",
3015
3015
  ii[e]
3016
3016
  ),
3017
- children: _e(r, {
3017
+ children: we(r, {
3018
3018
  className: li[e],
3019
3019
  weight: "regular"
3020
3020
  })
@@ -3431,8 +3431,8 @@ const vi = ({
3431
3431
  };
3432
3432
  return r.forEach((x, v) => {
3433
3433
  if (x.type === "link") {
3434
- x.attachments.forEach((p, w) => {
3435
- f(p, `link-${v}-${w}`);
3434
+ x.attachments.forEach((p, _) => {
3435
+ f(p, `link-${v}-${_}`);
3436
3436
  });
3437
3437
  return;
3438
3438
  }
@@ -3485,7 +3485,7 @@ const vi = ({
3485
3485
  renderText: b,
3486
3486
  threadList: x,
3487
3487
  viewerLanguage: v
3488
- } = e, { client: p } = fe("CustomMessage"), { channel: w } = oe("CustomMessage"), { isUnlocking: _, onUnlockClick: y, onFetchSource: z, onDownloadClick: E } = $r("LockedAttachment"), [R, F] = U(!1), D = tn(c.id), { selected: L, voteUp: k, voteDown: I } = wa(c), {
3488
+ } = e, { client: p } = fe("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: y, onFetchSource: z, onDownloadClick: E } = $r("LockedAttachment"), [R, F] = U(!1), D = tn(c.id), { selected: L, voteUp: k, voteDown: I } = _a(c), {
3489
3489
  Attachment: C = sn,
3490
3490
  EditMessageModal: T = nn,
3491
3491
  MessageActions: M,
@@ -3503,7 +3503,7 @@ const vi = ({
3503
3503
  ), B = re(() => {
3504
3504
  const me = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...me] : me;
3505
3505
  if (!Be(c)) return be;
3506
- const Gt = be.filter((Ht) => !("type" in Ht) || !_s(Ht));
3506
+ const Gt = be.filter((Ht) => !("type" in Ht) || !ws(Ht));
3507
3507
  return Gt.length === be.length ? be : Gt;
3508
3508
  }, [c]), W = re(
3509
3509
  () => Fs(B),
@@ -3558,7 +3558,7 @@ const vi = ({
3558
3558
  amountText: (Ut = c.metadata) == null ? void 0 : Ut.amount_text,
3559
3559
  detail: (jt = c.metadata) == null ? void 0 : jt.attachment_detail,
3560
3560
  paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3561
- onFetchSource: z ? () => z(c, w) : void 0
3561
+ onFetchSource: z ? () => z(c, _) : void 0
3562
3562
  };
3563
3563
  return /* @__PURE__ */ u(te, { children: [
3564
3564
  a && /* @__PURE__ */ s(
@@ -3626,8 +3626,8 @@ const vi = ({
3626
3626
  {
3627
3627
  ...Rt,
3628
3628
  isMine: !1,
3629
- isUnlocking: _(c.id),
3630
- onUnlockClick: () => y == null ? void 0 : y(c, w)
3629
+ isUnlocking: w(c.id),
3630
+ onUnlockClick: () => y == null ? void 0 : y(c, _)
3631
3631
  }
3632
3632
  ),
3633
3633
  !se && M && /* @__PURE__ */ s(M, {})
@@ -3639,16 +3639,16 @@ const vi = ({
3639
3639
  {
3640
3640
  ...Lt,
3641
3641
  isMine: !0,
3642
- onPreviewClick: () => y ? y(c, w) : void 0
3642
+ onPreviewClick: () => y ? y(c, _) : void 0
3643
3643
  }
3644
3644
  ) : /* @__PURE__ */ s(
3645
3645
  Pe,
3646
3646
  {
3647
3647
  ...Lt,
3648
3648
  isMine: !1,
3649
- isUnlocking: _(c.id),
3650
- onUnlockClick: () => y ? y(c, w) : void 0,
3651
- onDownloadClick: () => E ? E(c, w) : void 0
3649
+ isUnlocking: w(c.id),
3650
+ onUnlockClick: () => y ? y(c, _) : void 0,
3651
+ onDownloadClick: () => E ? E(c, _) : void 0
3652
3652
  }
3653
3653
  ),
3654
3654
  !se && M && /* @__PURE__ */ s(M, {})
@@ -3741,12 +3741,12 @@ const vi = ({
3741
3741
  c.id
3742
3742
  )
3743
3743
  ] });
3744
- }, wi = V.memo(
3744
+ }, _i = V.memo(
3745
3745
  xi,
3746
3746
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : en(e, t)
3747
- ), _i = (e) => {
3747
+ ), wi = (e) => {
3748
3748
  const t = Ne("CustomMessage");
3749
- return /* @__PURE__ */ s(wi, { ...t, ...e });
3749
+ return /* @__PURE__ */ s(_i, { ...t, ...e });
3750
3750
  }, Ni = () => {
3751
3751
  var n;
3752
3752
  const { handleDelete: e, message: t } = Ne("CustomMessageActions");
@@ -3829,7 +3829,7 @@ const vi = ({
3829
3829
  (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3830
3830
  )
3831
3831
  }), Ei = () => {
3832
- const { linkPreviewsManager: e } = xn(), { linkPreviews: t } = wn(
3832
+ const { linkPreviewsManager: e } = xn(), { linkPreviews: t } = _n(
3833
3833
  e.state,
3834
3834
  Si
3835
3835
  ), n = (r) => {
@@ -3857,7 +3857,7 @@ const vi = ({
3857
3857
  children: /* @__PURE__ */ s(ta, { weight: "bold", className: "size-4" })
3858
3858
  }
3859
3859
  ), as = () => {
3860
- const e = Te(Ve), { handleSubmit: t } = _n(), n = Nn(), a = e || !n, {
3860
+ const e = Te(Ve), { handleSubmit: t } = wn(), n = Nn(), a = e || !n, {
3861
3861
  SendButton: r = Ti,
3862
3862
  AttachmentPreviewList: i = yn
3863
3863
  } = cs("CustomMessageInput");
@@ -3870,55 +3870,39 @@ const vi = ({
3870
3870
  // content height and the squeeze never reaches the preview list. Stream's
3871
3871
  // <MessageInput> renders its Input directly (context providers only, no
3872
3872
  // wrapper element), so this is a direct flex item of that row.
3873
- //
3874
- // The container itself carries no padding of its own: it used to (p-2),
3875
- // but that inset now lives on the textarea as padding instead, so the
3876
- // textarea's actual (clickable) box is as large as the container — save
3877
- // for the small margin and the send button on the right (MES-1325).
3878
- // Visually nothing moves; the container ends up exactly the size of the
3879
- // textarea + send button row it contains.
3880
- //
3881
- // Some hosts portal staged-media thumbnails (e.g. ComposerPendingMediaPortal,
3882
- // see this component's stories) straight into `.central-container` rather
3883
- // than through this React tree, bypassing the two wrappers below. The
3884
- // `[&>:not(...)]:p-2` variant restores the container's old inset for any
3885
- // such foreign direct child, without re-adding it to our own wrappers.
3886
3873
  /* @__PURE__ */ u(
3887
3874
  "div",
3888
3875
  {
3889
- className: "central-container flex min-h-0 flex-col min-w-0 w-full self-stretch bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)] [&>:not(.messaging-composer-previews):not(.messaging-composer-row)]:p-2",
3876
+ className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
3890
3877
  "data-dd-privacy": "mask",
3891
3878
  children: [
3892
- /* @__PURE__ */ u("div", { className: "messaging-composer-previews empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2", children: [
3893
- /* @__PURE__ */ s(kn, {}),
3894
- /* @__PURE__ */ s(Ei, {}),
3895
- /* @__PURE__ */ s(i, {})
3896
- ] }),
3897
- /* @__PURE__ */ u("div", { className: "messaging-composer-row flex shrink-0 items-start", children: [
3898
- /* @__PURE__ */ s(
3879
+ /* @__PURE__ */ s(kn, {}),
3880
+ /* @__PURE__ */ s(Ei, {}),
3881
+ /* @__PURE__ */ s(i, {}),
3882
+ /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3883
+ /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3899
3884
  Cn,
3900
3885
  {
3901
3886
  "aria-disabled": e || void 0,
3902
- containerClassName: "min-w-0 flex-1 leading-[0]",
3903
- className: "w-full resize-none bg-transparent py-3.5 pl-4 pr-4 outline-none leading-5 placeholder:text-black/30 text-sm",
3887
+ className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
3904
3888
  autoFocus: !e,
3905
3889
  enterKeyHint: "send",
3906
3890
  maxRows: 4,
3907
3891
  readOnly: e,
3908
3892
  tabIndex: e ? -1 : void 0
3909
3893
  }
3910
- ),
3911
- /* @__PURE__ */ s("div", { className: "mt-auto mb-2 mr-2 shrink-0", children: /* @__PURE__ */ s(
3894
+ ) }),
3895
+ /* @__PURE__ */ s(
3912
3896
  r,
3913
3897
  {
3914
3898
  sendMessage: t,
3915
3899
  "aria-label": "Send",
3916
- className: "str-chat__send-button relative flex justify-center items-center rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring before:absolute before:-inset-2 before:content-['']",
3900
+ className: "str-chat__send-button mt-auto flex justify-center items-center flex-shrink-0 rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring",
3917
3901
  "data-testid": "send-button",
3918
3902
  disabled: a,
3919
3903
  type: "button"
3920
3904
  }
3921
- ) })
3905
+ )
3922
3906
  ] })
3923
3907
  ]
3924
3908
  }
@@ -3944,13 +3928,13 @@ const vi = ({
3944
3928
  const b = () => {
3945
3929
  const v = h.offsetHeight, p = v > c;
3946
3930
  c = v;
3947
- const w = Array.from(
3931
+ const _ = Array.from(
3948
3932
  f.querySelectorAll(".str-chat__list")
3949
- ).find((y) => y.scrollHeight > y.clientHeight) ?? null, _ = w ? w.scrollHeight - w.scrollTop - w.clientHeight < Ii : !1;
3933
+ ).find((y) => y.scrollHeight > y.clientHeight) ?? null, w = _ ? _.scrollHeight - _.scrollTop - _.clientHeight < Ii : !1;
3950
3934
  f.style.setProperty(
3951
3935
  "--messaging-composer-height",
3952
3936
  `${v}px`
3953
- ), p && _ && w && (w.scrollTop = w.scrollHeight);
3937
+ ), p && w && _ && (_.scrollTop = _.scrollHeight);
3954
3938
  };
3955
3939
  if (b(), typeof ResizeObserver > "u")
3956
3940
  return;
@@ -4102,7 +4086,7 @@ const vi = ({
4102
4086
  "data-dm-agent-system-type": n.type,
4103
4087
  children: [
4104
4088
  /* @__PURE__ */ s(
4105
- we,
4089
+ _e,
4106
4090
  {
4107
4091
  size: 16,
4108
4092
  weight: "regular",
@@ -4185,13 +4169,13 @@ const vi = ({
4185
4169
  return null;
4186
4170
  const m = e ? [] : Object.values(i).filter(
4187
4171
  ({ parent_id: v, user: p }) => {
4188
- var w;
4189
- return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && !v;
4172
+ var _;
4173
+ return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && !v;
4190
4174
  }
4191
4175
  ), g = e ? Object.values(i).filter(
4192
4176
  ({ parent_id: v, user: p }) => {
4193
- var w;
4194
- return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && v === (a == null ? void 0 : a.id);
4177
+ var _;
4178
+ return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && v === (a == null ? void 0 : a.id);
4195
4179
  }
4196
4180
  ) : [], h = e ? g : m;
4197
4181
  if (!h.length)
@@ -4327,19 +4311,19 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4327
4311
  renderHeaderTitleBadges: v
4328
4312
  }) => {
4329
4313
  var I, C, T, M, P, $;
4330
- const { channel: p } = oe(), { client: w } = fe(), _ = V.useMemo(
4314
+ const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
4331
4315
  () => {
4332
4316
  var j;
4333
4317
  return Ye(
4334
4318
  (j = p.state) == null ? void 0 : j.members,
4335
- w == null ? void 0 : w.userID,
4319
+ _ == null ? void 0 : _.userID,
4336
4320
  p.type
4337
4321
  );
4338
4322
  },
4339
- [(I = p.state) == null ? void 0 : I.members, w == null ? void 0 : w.userID, p.type]
4340
- ), y = ht(_ == null ? void 0 : _.user), z = (C = _ == null ? void 0 : _.user) == null ? void 0 : C.image, E = mt(p), R = v == null ? void 0 : v({
4323
+ [(I = p.state) == null ? void 0 : I.members, _ == null ? void 0 : _.userID, p.type]
4324
+ ), y = ht(w == null ? void 0 : w.user), z = (C = w == null ? void 0 : w.user) == null ? void 0 : C.image, E = mt(p), R = v == null ? void 0 : v({
4341
4325
  channel: p,
4342
- participant: _
4326
+ participant: w
4343
4327
  }), F = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", D = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(te, { children: [
4344
4328
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: y }),
4345
4329
  R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
@@ -4388,7 +4372,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4388
4372
  /* @__PURE__ */ s(
4389
4373
  ne,
4390
4374
  {
4391
- id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || p.id || "unknown",
4375
+ id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || p.id || "unknown",
4392
4376
  name: y,
4393
4377
  image: z,
4394
4378
  starred: n && E,
@@ -4401,7 +4385,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4401
4385
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0", weight: "bold" })
4402
4386
  ] }),
4403
4387
  a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4404
- /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4388
+ /* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
4405
4389
  /* @__PURE__ */ s("span", { children: Fe })
4406
4390
  ] })
4407
4391
  ]
@@ -4410,7 +4394,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4410
4394
  /* @__PURE__ */ s(
4411
4395
  ne,
4412
4396
  {
4413
- id: ((M = _ == null ? void 0 : _.user) == null ? void 0 : M.id) || p.id || "unknown",
4397
+ id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || p.id || "unknown",
4414
4398
  name: y,
4415
4399
  image: z,
4416
4400
  starred: n && E,
@@ -4429,7 +4413,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4429
4413
  )
4430
4414
  ] }),
4431
4415
  a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4432
- /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4416
+ /* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
4433
4417
  /* @__PURE__ */ s("span", { children: Fe })
4434
4418
  ] })
4435
4419
  ] })
@@ -4459,7 +4443,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4459
4443
  lt,
4460
4444
  {
4461
4445
  channel: p,
4462
- participant: _,
4446
+ participant: w,
4463
4447
  showDeleteConversation: o,
4464
4448
  showBlockParticipant: l,
4465
4449
  showReportParticipant: d,
@@ -4503,7 +4487,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4503
4487
  /* @__PURE__ */ s(
4504
4488
  ne,
4505
4489
  {
4506
- id: ((P = _ == null ? void 0 : _.user) == null ? void 0 : P.id) || p.id || "unknown",
4490
+ id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || p.id || "unknown",
4507
4491
  name: y,
4508
4492
  image: z,
4509
4493
  starred: n && E,
@@ -4517,7 +4501,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4517
4501
  /* @__PURE__ */ s(xe, { className: "size-4 shrink-0", weight: "bold" })
4518
4502
  ] }),
4519
4503
  a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4520
- /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4504
+ /* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
4521
4505
  /* @__PURE__ */ s("span", { className: "truncate", children: Fe })
4522
4506
  ] })
4523
4507
  ] })
@@ -4527,7 +4511,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4527
4511
  /* @__PURE__ */ s(
4528
4512
  ne,
4529
4513
  {
4530
- id: (($ = _ == null ? void 0 : _.user) == null ? void 0 : $.id) || p.id || "unknown",
4514
+ id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || p.id || "unknown",
4531
4515
  name: y,
4532
4516
  image: z,
4533
4517
  starred: n && E,
@@ -4547,7 +4531,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4547
4531
  )
4548
4532
  ] }),
4549
4533
  a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4550
- /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4534
+ /* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
4551
4535
  /* @__PURE__ */ s("span", { className: "truncate", children: Fe })
4552
4536
  ] })
4553
4537
  ] })
@@ -4577,7 +4561,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4577
4561
  lt,
4578
4562
  {
4579
4563
  channel: p,
4580
- participant: _,
4564
+ participant: w,
4581
4565
  showDeleteConversation: o,
4582
4566
  showBlockParticipant: l,
4583
4567
  showReportParticipant: d,
@@ -4612,8 +4596,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4612
4596
  showStarButton: x = !1,
4613
4597
  chatbotVotingEnabled: v = !1,
4614
4598
  renderChannelBanner: p,
4615
- renderHeaderTitleBadges: w,
4616
- customChannelActions: _,
4599
+ renderHeaderTitleBadges: _,
4600
+ customChannelActions: w,
4617
4601
  renderChannelActions: y,
4618
4602
  renderMessage: z,
4619
4603
  dmAgentEnabled: E = !1,
@@ -4659,14 +4643,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4659
4643
  onDeleteConversationClick: d,
4660
4644
  onBlockParticipantClick: m,
4661
4645
  onReportParticipantClick: g,
4662
- customChannelActions: _,
4646
+ customChannelActions: w,
4663
4647
  renderChannelActions: y,
4664
4648
  onParticipantNameClick: D
4665
4649
  }
4666
4650
  ) : null, X = Q(
4667
4651
  (Y) => {
4668
4652
  const { message: B } = Ne("ChannelView"), W = /* @__PURE__ */ s(
4669
- _i,
4653
+ wi,
4670
4654
  {
4671
4655
  ...Y,
4672
4656
  chatbotVotingEnabled: v,
@@ -4704,9 +4688,9 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4704
4688
  onDeleteConversationClick: d,
4705
4689
  onBlockParticipantClick: m,
4706
4690
  onReportParticipantClick: g,
4707
- customChannelActions: _,
4691
+ customChannelActions: w,
4708
4692
  renderChannelActions: y,
4709
- renderHeaderTitleBadges: w
4693
+ renderHeaderTitleBadges: _
4710
4694
  }
4711
4695
  ) }, "lt-channel-header"),
4712
4696
  Z
@@ -4815,8 +4799,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4815
4799
  showReportParticipant: x = !0,
4816
4800
  composerDisabled: v = !1,
4817
4801
  composerDisabledReason: p,
4818
- dmAgentEnabled: w,
4819
- messageMetadata: _,
4802
+ dmAgentEnabled: _,
4803
+ messageMetadata: w,
4820
4804
  onMessageSent: y,
4821
4805
  showStarButton: z = !1,
4822
4806
  chatbotVotingEnabled: E = !1,
@@ -4836,13 +4820,13 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4836
4820
  const Z = Q(
4837
4821
  async (X, N, A) => {
4838
4822
  var J;
4839
- const H = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, q = w && !H, Y = {
4823
+ const H = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, q = _ && !H, Y = {
4840
4824
  ...N,
4841
4825
  ...q && { silent: !0 },
4842
- ..._ && {
4826
+ ...w && {
4843
4827
  metadata: {
4844
4828
  ...N.metadata ?? {},
4845
- ..._
4829
+ ...w
4846
4830
  }
4847
4831
  }
4848
4832
  }, B = {
@@ -4851,7 +4835,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4851
4835
  }, W = await e.sendMessage(Y, B);
4852
4836
  return y == null || y(W), W;
4853
4837
  },
4854
- [e, w, _, y]
4838
+ [e, _, w, y]
4855
4839
  ), ee = G(null);
4856
4840
  return K(() => {
4857
4841
  if (!I) return;
@@ -4872,7 +4856,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4872
4856
  "messaging-channel-view h-full flex flex-col",
4873
4857
  d
4874
4858
  ),
4875
- children: /* @__PURE__ */ s($s.Provider, { value: w ?? !1, children: /* @__PURE__ */ s(
4859
+ children: /* @__PURE__ */ s($s.Provider, { value: _ ?? !1, children: /* @__PURE__ */ s(
4876
4860
  In,
4877
4861
  {
4878
4862
  channel: e,
@@ -4904,7 +4888,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4904
4888
  composerDisabled: v,
4905
4889
  composerDisabledReason: p,
4906
4890
  showStarButton: z,
4907
- dmAgentEnabled: w,
4891
+ dmAgentEnabled: _,
4908
4892
  chatbotVotingEnabled: E,
4909
4893
  renderChannelBanner: R,
4910
4894
  renderHeaderTitleBadges: F,
@@ -4939,7 +4923,7 @@ const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4939
4923
  )
4940
4924
  ] }) }));
4941
4925
  Ce.displayName = "ErrorState";
4942
- const wl = ({
4926
+ const _l = ({
4943
4927
  capabilities: e = {},
4944
4928
  renderMessageInputActions: t,
4945
4929
  renderConversationFooter: n,
@@ -4958,8 +4942,8 @@ const wl = ({
4958
4942
  renderChannelBanner: x,
4959
4943
  customChannelActions: v,
4960
4944
  renderChannelActions: p,
4961
- onParticipantNameClick: w,
4962
- renderMessage: _,
4945
+ onParticipantNameClick: _,
4946
+ renderMessage: w,
4963
4947
  onMessageLinkClick: y,
4964
4948
  showChannelInfo: z,
4965
4949
  composerInput: E
@@ -5075,8 +5059,8 @@ const wl = ({
5075
5059
  renderHeaderTitleBadges: b,
5076
5060
  customChannelActions: v,
5077
5061
  renderChannelActions: p,
5078
- onParticipantNameClick: w,
5079
- renderMessage: _,
5062
+ onParticipantNameClick: _,
5063
+ renderMessage: w,
5080
5064
  onMessageLinkClick: y,
5081
5065
  showChannelInfo: z,
5082
5066
  composerInput: E
@@ -5114,9 +5098,9 @@ const Us = V.createContext({
5114
5098
  hour: "numeric",
5115
5099
  minute: "2-digit",
5116
5100
  hour12: !0
5117
- }) : a === 1 ? "Yesterday" : a < 7 ? `${a}d` : a < 28 ? `${Math.floor(a / 7)}w` : e.toLocaleDateString("en-US", {
5118
- month: "numeric",
5101
+ }) : a === 1 ? "Yesterday" : a < 7 ? `${a}d` : a < 28 ? `${Math.floor(a / 7)}w` : e.toLocaleDateString(void 0, {
5119
5102
  day: "numeric",
5103
+ month: "short",
5120
5104
  year: "2-digit"
5121
5105
  });
5122
5106
  }, js = V.memo(
@@ -5157,7 +5141,7 @@ const Us = V.createContext({
5157
5141
  for (let C = k.length - 1; C >= 0; C--)
5158
5142
  if (k[C].type !== "system") return k[C];
5159
5143
  }
5160
- })(), _ = (() => {
5144
+ })(), w = (() => {
5161
5145
  var M;
5162
5146
  const k = ps({
5163
5147
  message: p,
@@ -5176,7 +5160,7 @@ const Us = V.createContext({
5176
5160
  if (k) return k;
5177
5161
  const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
5178
5162
  return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5179
- })(), y = p != null && p.created_at ? Qi(new Date(p.created_at)) : "", z = p ? Be(p) : !1, E = l ? l(p, _) : `${z ? "✨ " : ""}${_}`, R = n ?? 0;
5163
+ })(), y = p != null && p.created_at ? Qi(new Date(p.created_at)) : "", z = p ? Be(p) : !1, E = l ? l(p, w) : `${z ? "✨ " : ""}${w}`, R = n ?? 0;
5180
5164
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5181
5165
  channelId: t == null ? void 0 : t.id,
5182
5166
  isSelected: g,
@@ -5257,9 +5241,9 @@ const el = { last_message_at: -1 }, tl = V.memo(
5257
5241
  onAddedToChannel: v,
5258
5242
  onChannelUpdated: p
5259
5243
  }) => {
5260
- const w = V.useRef(0);
5261
- w.current++;
5262
- const { debug: _ = !1 } = ut(), y = V.useCallback(
5244
+ const _ = V.useRef(0);
5245
+ _.current++;
5246
+ const { debug: w = !1 } = ut(), y = V.useCallback(
5263
5247
  (E) => {
5264
5248
  for (const R of E)
5265
5249
  Xi(R);
@@ -5267,8 +5251,8 @@ const el = { last_message_at: -1 }, tl = V.memo(
5267
5251
  },
5268
5252
  [r]
5269
5253
  );
5270
- _ && console.log("📺 [ChannelList] 🔄 RENDER START", {
5271
- renderCount: w.current,
5254
+ w && console.log("📺 [ChannelList] 🔄 RENDER START", {
5255
+ renderCount: _.current,
5272
5256
  selectedChannelId: t == null ? void 0 : t.id,
5273
5257
  filters: n
5274
5258
  });
@@ -5276,7 +5260,7 @@ const el = { last_message_at: -1 }, tl = V.memo(
5276
5260
  () => ({
5277
5261
  selectedChannel: t,
5278
5262
  onChannelSelect: e,
5279
- debug: _,
5263
+ debug: w,
5280
5264
  channelPreview: m,
5281
5265
  renderMessagePreview: g,
5282
5266
  viewerLanguage: h
@@ -5284,7 +5268,7 @@ const el = { last_message_at: -1 }, tl = V.memo(
5284
5268
  [
5285
5269
  t,
5286
5270
  e,
5287
- _,
5271
+ w,
5288
5272
  m,
5289
5273
  g,
5290
5274
  h
@@ -5389,7 +5373,7 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5389
5373
  header: n,
5390
5374
  className: a
5391
5375
  }
5392
- ), il = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Vs, { variant: "sent", text: e, tail: t, className: n }), _l = {
5376
+ ), il = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Vs, { variant: "sent", text: e, tail: t, className: n }), wl = {
5393
5377
  Sent: il,
5394
5378
  Received: rl
5395
5379
  }, ll = ({
@@ -5464,7 +5448,7 @@ export {
5464
5448
  xl as E,
5465
5449
  Nl as F,
5466
5450
  $r as G,
5467
- wa as H,
5451
+ _a as H,
5468
5452
  aa as I,
5469
5453
  es as L,
5470
5454
  bl as M,
@@ -5477,22 +5461,22 @@ export {
5477
5461
  ce as g,
5478
5462
  Pe as h,
5479
5463
  ke as i,
5480
- _l as j,
5464
+ wl as j,
5481
5465
  Xr as k,
5482
5466
  pl as l,
5483
- wl as m,
5467
+ _l as m,
5484
5468
  nr as n,
5485
5469
  he as o,
5486
5470
  er as p,
5487
5471
  Qi as q,
5488
- _e as r,
5472
+ we as r,
5489
5473
  sr as s,
5490
5474
  ps as t,
5491
- _s as u,
5475
+ ws as u,
5492
5476
  oa as v,
5493
5477
  qa as w,
5494
- _a as x,
5478
+ wa as x,
5495
5479
  Ye as y,
5496
5480
  pt as z
5497
5481
  };
5498
- //# sourceMappingURL=index-DlSpSy1_.js.map
5482
+ //# sourceMappingURL=index-BiiMPaUs.js.map