@linktr.ee/messaging-react 3.6.2-rc-1783307602 → 3.6.2-rc-1783311731

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 (29) hide show
  1. package/dist/{Card-CS_6M9I_.js → Card-0wf8lj5n.js} +2 -2
  2. package/dist/{Card-CS_6M9I_.js.map → Card-0wf8lj5n.js.map} +1 -1
  3. package/dist/{Card-DQGYnsjO.cjs → Card-4UyBK3XO.cjs} +2 -2
  4. package/dist/{Card-DQGYnsjO.cjs.map → Card-4UyBK3XO.cjs.map} +1 -1
  5. package/dist/{Card-Dlb_74PT.cjs → Card-6b4Ws9rn.cjs} +2 -2
  6. package/dist/{Card-Dlb_74PT.cjs.map → Card-6b4Ws9rn.cjs.map} +1 -1
  7. package/dist/{Card-bm6JeM03.cjs → Card-DsQhJjj0.cjs} +2 -2
  8. package/dist/{Card-bm6JeM03.cjs.map → Card-DsQhJjj0.cjs.map} +1 -1
  9. package/dist/{Card-CYD26x1-.js → Card-RZ6C_IkE.js} +3 -3
  10. package/dist/{Card-CYD26x1-.js.map → Card-RZ6C_IkE.js.map} +1 -1
  11. package/dist/{Card-BqePrWk0.js → Card-iGNcxybY.js} +2 -2
  12. package/dist/{Card-BqePrWk0.js.map → Card-iGNcxybY.js.map} +1 -1
  13. package/dist/{LockedThumbnail-DC782hvV.js → LockedThumbnail-Do9udNMm.js} +2 -2
  14. package/dist/{LockedThumbnail-DC782hvV.js.map → LockedThumbnail-Do9udNMm.js.map} +1 -1
  15. package/dist/{LockedThumbnail-C3kgiGFK.cjs → LockedThumbnail-N0pNOO3D.cjs} +2 -2
  16. package/dist/{LockedThumbnail-C3kgiGFK.cjs.map → LockedThumbnail-N0pNOO3D.cjs.map} +1 -1
  17. package/dist/index-B3ZJaqJY.cjs +2 -0
  18. package/dist/index-B3ZJaqJY.cjs.map +1 -0
  19. package/dist/{index-DaF1G1q2.js → index-wFe1UO9t.js} +600 -591
  20. package/dist/index-wFe1UO9t.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +74 -21
  25. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +65 -28
  26. package/src/components/CustomMessage/index.tsx +0 -7
  27. package/dist/index-DaF1G1q2.js.map +0 -1
  28. package/dist/index-eVxxkfK6.cjs +0 -2
  29. package/dist/index-eVxxkfK6.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
- import U, { createContext as at, useContext as Ee, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as ae, Suspense as rt } from "react";
3
- import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Hs, LinkPreviewsManager as Ht } from "stream-chat";
5
- import { Chat as Ys, useChannelStateContext as ue, useChatContext as me, DateSeparator as qs, MessageStatus as Ws, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as rs, Attachment as Js, EditMessageModal as Zs, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, MessageText as Yt, MessageErrorIcon as qt, Poll as hn, useMessageContext as Ie, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as Sn, MessageList as En, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
6
- import { StarIcon as Se, DotsThreeIcon as An, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Wt, FlagIcon as is, ArrowLeftIcon as Qe, CurrencyDollarIcon as Rn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as ls, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as os, FileMdIcon as zn, FileTextIcon as Pn, FileZipIcon as Fn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as jn, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, ChecksIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
2
+ import U, { createContext as rt, useContext as Ie, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Gs, useMemo as se, Suspense as it } from "react";
3
+ import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
+ import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as jn, FileXlsIcon as Bn, FileDocIcon as Un, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as ea, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
9
- const ds = at({
8
+ import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
+ const us = rt({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const ds = at({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), it = () => Ee(ds), dl = ({
19
+ }), lt = () => Ie(us), dl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -62,12 +62,12 @@ const ds = at({
62
62
  serviceConfig: n,
63
63
  capabilities: r
64
64
  };
65
- const D = G(null);
66
- a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Hs(a) });
67
- const L = a ? ((E = D.current) == null ? void 0 : E.client) ?? null : null;
65
+ const L = G(null);
66
+ a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
67
+ const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
68
68
  K(() => {
69
69
  const C = M.current, I = N.current;
70
- if (!a || !L || !I) {
70
+ if (!a || !D || !I) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
@@ -78,17 +78,17 @@ const ds = at({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Gs({
81
+ const $ = new Hs({
82
82
  ...I,
83
83
  apiKey: a,
84
84
  debug: S.current,
85
- client: L
85
+ client: D
86
86
  });
87
87
  x.current = $, d($), l("✅ SERVICE SET", {
88
88
  renderCount: C,
89
89
  serviceInstance: !!$
90
90
  });
91
- }, [a, L]);
91
+ }, [a, D]);
92
92
  const O = G(null);
93
93
  K(() => {
94
94
  var I, $;
@@ -137,12 +137,12 @@ const ds = at({
137
137
  }
138
138
  })();
139
139
  }, [o, t, l, h]), K(() => {
140
- const C = L;
140
+ const C = D;
141
141
  return () => {
142
142
  var I;
143
143
  C && (O.current = null, (I = x.current) == null || I.disconnectUser().catch(console.error));
144
144
  };
145
- }, [L]);
145
+ }, [D]);
146
146
  const z = J(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
@@ -194,19 +194,19 @@ const ds = at({
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
196
  renderCount: M.current,
197
- willRenderChat: !!L,
197
+ willRenderChat: !!D,
198
198
  contextValueReady: !!y
199
- }), /* @__PURE__ */ s(ds.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
- Ys,
199
+ }), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
200
+ qs,
201
201
  {
202
- client: L,
202
+ client: D,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, ta = () => it(), lt = (e) => {
209
+ }, sa = () => lt(), ot = (e) => {
210
210
  var a, r;
211
211
  const [t, n] = B(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -228,14 +228,14 @@ const ds = at({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, sa = "linktree-official", na = "linktree-official-sender";
231
+ }, na = "linktree-official", aa = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === sa) {
234
+ if (n === na) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === na;
238
+ return ((l = i.user) == null ? void 0 : l.id) === aa;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,18 +247,18 @@ function Ue(e, t, n) {
247
247
  }
248
248
  );
249
249
  }
250
- const aa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
- function ra(e) {
252
- return aa.test(e.trim());
250
+ const ra = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
+ function ia(e) {
252
+ return ra.test(e.trim());
253
253
  }
254
- function Xt(e, t) {
254
+ function Kt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !ra(n);
256
+ return !n || t && n === t ? !1 : !ia(n);
257
257
  }
258
- function ot(e) {
259
- return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
258
+ function ct(e) {
259
+ return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
260
260
  }
261
- const Kt = [
261
+ const Jt = [
262
262
  { emoji: "🍎", bgColor: "#FFD1DD" },
263
263
  // Apple
264
264
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -286,7 +286,7 @@ const Kt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function ia(e) {
289
+ function la(e) {
290
290
  let t = 0;
291
291
  for (let n = 0; n < e.length; n++) {
292
292
  const a = e.charCodeAt(n);
@@ -294,16 +294,16 @@ function ia(e) {
294
294
  }
295
295
  return Math.abs(t);
296
296
  }
297
- function us(e) {
298
- return Kt[ia(e) % Kt.length];
299
- }
300
- function la(e) {
301
- return us(e).emoji;
297
+ function ms(e) {
298
+ return Jt[la(e) % Jt.length];
302
299
  }
303
300
  function oa(e) {
304
- return us(e).bgColor;
301
+ return ms(e).emoji;
302
+ }
303
+ function ca(e) {
304
+ return ms(e).bgColor;
305
305
  }
306
- const se = ({
306
+ const ne = ({
307
307
  id: e,
308
308
  image: t,
309
309
  size: n = 40,
@@ -312,7 +312,7 @@ const se = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
315
- const o = la(e), d = oa(e), u = 0.45, h = 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" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
315
+ const o = oa(e), d = ca(e), u = 0.45, h = 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" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -350,7 +350,7 @@ const se = ({
350
350
  {
351
351
  "aria-hidden": "true",
352
352
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
353
- children: /* @__PURE__ */ s(Se, { className: "size-3 text-yellow-600", weight: "duotone" })
353
+ children: /* @__PURE__ */ s(Ee, { className: "size-3 text-yellow-600", weight: "duotone" })
354
354
  }
355
355
  ),
356
356
  /* @__PURE__ */ s(
@@ -376,7 +376,7 @@ const se = ({
376
376
  ]
377
377
  }
378
378
  );
379
- }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
379
+ }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -390,7 +390,7 @@ const se = ({
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
392
  var A;
393
- const { service: h, debug: g } = it(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, S] = B(!1), [T, M] = B(!1), D = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
393
+ const { service: h, debug: g } = lt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, S] = B(!1), [T, M] = B(!1), L = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
394
394
  return K(() => {
395
395
  if (!v || !h || !c) {
396
396
  b(!1), x(null);
@@ -416,7 +416,7 @@ const se = ({
416
416
  };
417
417
  }, [v, h, c, p]), {
418
418
  isParticipantBlocked: w,
419
- isCheckingBlockedStatus: D,
419
+ isCheckingBlockedStatus: L,
420
420
  isLeaving: N,
421
421
  isUpdatingBlockStatus: T,
422
422
  handleLeaveConversation: async () => {
@@ -460,10 +460,10 @@ const se = ({
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, _e = ({
466
+ }, Ne = ({
467
467
  variant: e = "default",
468
468
  className: t,
469
469
  children: n,
@@ -480,7 +480,7 @@ const se = ({
480
480
  ...a,
481
481
  children: n
482
482
  }
483
- ), tt = ({
483
+ ), st = ({
484
484
  channel: e,
485
485
  participant: t,
486
486
  showDeleteConversation: n = !0,
@@ -494,16 +494,16 @@ const se = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, c] = B(!1), v = G(null), w = Vs(), b = J(() => c(!1), []), {
497
+ const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
498
498
  isParticipantBlocked: f,
499
499
  isCheckingBlockedStatus: x,
500
500
  isLeaving: N,
501
501
  isUpdatingBlockStatus: S,
502
502
  handleLeaveConversation: T,
503
503
  handleBlockUser: M,
504
- handleUnblockUser: D,
505
- handleReportUser: L
506
- } = da({
504
+ handleUnblockUser: L,
505
+ handleReportUser: D
506
+ } = ua({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
@@ -537,7 +537,7 @@ const se = ({
537
537
  "aria-controls": g ? w : void 0,
538
538
  onClick: () => c((z) => !z),
539
539
  children: [
540
- /* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
541
541
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
542
542
  ]
543
543
  }
@@ -553,13 +553,13 @@ const se = ({
553
553
  ),
554
554
  children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
555
555
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
556
- _e,
556
+ Ne,
557
557
  {
558
558
  onClick: T,
559
559
  disabled: N,
560
560
  "aria-busy": N,
561
561
  children: [
562
- N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
562
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
@@ -567,35 +567,35 @@ const se = ({
567
567
  a && /* @__PURE__ */ s("li", { children: x ? (
568
568
  // Block status not yet resolved — show a disabled placeholder
569
569
  // so a premature click can't act on a stale block state.
570
- /* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
571
571
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ s("span", { children: "Block" })
573
573
  ] })
574
574
  ) : f ? /* @__PURE__ */ m(
575
- _e,
575
+ Ne,
576
576
  {
577
- onClick: D,
577
+ onClick: L,
578
578
  disabled: S,
579
579
  "aria-busy": S,
580
580
  children: [
581
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
581
+ S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
- _e,
586
+ Ne,
587
587
  {
588
588
  onClick: M,
589
589
  disabled: S,
590
590
  "aria-busy": S,
591
591
  children: [
592
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
592
+ S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
593
593
  /* @__PURE__ */ s("span", { children: "Block" })
594
594
  ]
595
595
  }
596
596
  ) }),
597
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: L, children: [
598
- /* @__PURE__ */ s(is, { className: "h-5 w-5" }),
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: D, children: [
598
+ /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ s("span", { children: "Report" })
600
600
  ] }) }),
601
601
  p
@@ -603,10 +603,10 @@ const se = ({
603
603
  }
604
604
  )
605
605
  ] });
606
- }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (e) => {
606
+ }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
609
- }, ga = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
609
+ }, pa = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: n = !1,
@@ -624,8 +624,8 @@ const se = ({
624
624
  showChannelInfo: v = !0,
625
625
  onParticipantNameClick: w
626
626
  }) => {
627
- var L, O, z;
628
- const { channel: b } = ue(), { client: f } = me(), x = U.useMemo(
627
+ var D, O, z;
628
+ const { channel: b } = le(), { client: f } = oe(), x = U.useMemo(
629
629
  () => {
630
630
  var y;
631
631
  return Ue(
@@ -634,8 +634,8 @@ const se = ({
634
634
  b.type
635
635
  );
636
636
  },
637
- [(L = b.state) == null ? void 0 : L.members, f == null ? void 0 : f.userID, b.type]
638
- ), N = ot(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = lt(b), M = fa(x), D = async () => {
637
+ [(D = b.state) == null ? void 0 : D.members, f == null ? void 0 : f.userID, b.type]
638
+ ), N = ct(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = ot(b), M = ga(x), L = async () => {
639
639
  try {
640
640
  T ? await b.unpin() : await b.pin();
641
641
  } catch (y) {
@@ -657,7 +657,7 @@ const se = ({
657
657
  }),
658
658
  type: "button",
659
659
  "aria-label": "Back to conversations",
660
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
660
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
661
661
  }
662
662
  ) }),
663
663
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
@@ -669,7 +669,7 @@ const se = ({
669
669
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
670
670
  children: [
671
671
  /* @__PURE__ */ s(
672
- se,
672
+ ne,
673
673
  {
674
674
  id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
675
  name: N,
@@ -689,7 +689,7 @@ const se = ({
689
689
  {
690
690
  "aria-label": "Paid customer",
691
691
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
692
- children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
695
  n && T && /* @__PURE__ */ s(
@@ -697,7 +697,7 @@ const se = ({
697
697
  {
698
698
  "aria-label": "Starred conversation",
699
699
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
700
- children: /* @__PURE__ */ s(Se, { className: "size-2.5", weight: "fill" })
700
+ children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
701
701
  }
702
702
  ),
703
703
  /* @__PURE__ */ s(
@@ -712,7 +712,7 @@ const se = ({
712
712
  ] }),
713
713
  a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
714
714
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
715
- /* @__PURE__ */ s("span", { children: ma })
715
+ /* @__PURE__ */ s("span", { children: ha })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -723,12 +723,12 @@ const se = ({
723
723
  "button",
724
724
  {
725
725
  className: We,
726
- onClick: D,
726
+ onClick: L,
727
727
  type: "button",
728
728
  "aria-pressed": T,
729
729
  "aria-label": T ? "Unstar conversation" : "Star conversation",
730
730
  children: /* @__PURE__ */ s(
731
- Se,
731
+ Ee,
732
732
  {
733
733
  className: k("size-5", {
734
734
  "text-[#FFD60A]": T,
@@ -740,7 +740,7 @@ const se = ({
740
740
  }
741
741
  ),
742
742
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
743
- tt,
743
+ st,
744
744
  {
745
745
  channel: b,
746
746
  participant: x,
@@ -758,20 +758,20 @@ const se = ({
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, pa = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
- function ba(e) {
763
- return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
- }
761
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
765
762
  function va(e) {
766
- const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
- () => ba(e.own_reactions),
763
+ return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
764
+ }
765
+ function xa(e) {
766
+ const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
767
+ () => va(e.own_reactions),
768
768
  [e.own_reactions]
769
769
  ), r = J(async () => {
770
770
  if (n != null && n.userID)
771
771
  try {
772
- a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
772
+ a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
773
773
  e.id,
774
- { type: st },
774
+ { type: nt },
775
775
  { enforce_unique: !0, skip_push: !0 }
776
776
  );
777
777
  } catch {
@@ -779,9 +779,9 @@ function va(e) {
779
779
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
780
780
  if (n != null && n.userID)
781
781
  try {
782
- a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
782
+ a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
783
783
  e.id,
784
- { type: nt },
784
+ { type: at },
785
785
  { enforce_unique: !0, skip_push: !0 }
786
786
  );
787
787
  } catch {
@@ -789,24 +789,24 @@ function va(e) {
789
789
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
790
790
  return { selected: a, voteUp: r, voteDown: i };
791
791
  }
792
- function xa(e) {
792
+ function wa(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
- function ms({
795
+ function hs({
796
796
  message: e,
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = xa(t);
800
+ const n = e == null ? void 0 : e.text, a = wa(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const wa = U.lazy(() => import("./Card-BqePrWk0.js")), _a = U.lazy(() => import("./Card-CS_6M9I_.js")), Na = U.lazy(() => import("./Card-CYD26x1-.js")), ct = () => /* @__PURE__ */ s(
803
+ const _a = U.lazy(() => import("./Card-iGNcxybY.js")), Na = U.lazy(() => import("./Card-0wf8lj5n.js")), ya = U.lazy(() => import("./Card-RZ6C_IkE.js")), dt = () => /* @__PURE__ */ s(
804
804
  "div",
805
805
  {
806
806
  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)]",
807
807
  "aria-hidden": !0
808
808
  }
809
- ), ya = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), hs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), ka = hs, Ca = fs, Jt = { Composer: ya, Sent: hs, Received: fs, Creator: ka, Visitor: Ca }, Sa = [
809
+ ), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -816,42 +816,42 @@ const wa = U.lazy(() => import("./Card-BqePrWk0.js")), _a = U.lazy(() => import(
816
816
  [/plain|rtf/, "text"],
817
817
  [/markdown/, "markdown"]
818
818
  ];
819
- function le(e) {
819
+ function ce(e) {
820
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
821
821
  }
822
- function gs(e) {
823
- const t = Sa.find(
822
+ function ps(e) {
823
+ const t = Ea.find(
824
824
  ([n]) => n.test(e)
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Ea = {
829
- video: os,
830
- audio: Dn,
828
+ const Ia = {
829
+ video: cs,
830
+ audio: zn,
831
831
  image: Ln,
832
- document: ls
833
- }, Ia = {
834
- pdf: Un,
835
- doc: Bn,
836
- xls: jn,
837
- csv: $n,
838
- ppt: On,
839
- zip: Fn,
840
- text: Pn,
841
- markdown: zn,
842
- generic: ls
832
+ document: os
833
+ }, Ta = {
834
+ pdf: Vn,
835
+ doc: Un,
836
+ xls: Bn,
837
+ csv: jn,
838
+ ppt: $n,
839
+ zip: On,
840
+ text: Fn,
841
+ markdown: Pn,
842
+ generic: os
843
843
  };
844
- function Ta(e) {
845
- const t = le(e);
846
- return t !== "document" ? Ea[t] : Ia[gs(e)];
844
+ function Aa(e) {
845
+ const t = ce(e);
846
+ return t !== "document" ? Ia[t] : Ta[ps(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Ta(e), t);
849
+ return U.createElement(Aa(e), t);
850
850
  }
851
- const Aa = (e) => {
851
+ const Ma = (e) => {
852
852
  var t, n;
853
853
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
854
- }, Ma = ({
854
+ }, Ra = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -863,15 +863,15 @@ const Aa = (e) => {
863
863
  muted: d = !1,
864
864
  onContainerClick: u
865
865
  }) => {
866
- const p = le(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, S] = B(!1), [T, M] = B(!1), [D, L] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
867
- L(!1), b(!0);
866
+ const p = ce(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, S] = B(!1), [T, M] = B(!1), [L, D] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
867
+ D(!1), b(!0);
868
868
  }, []), $ = J((_) => {
869
869
  const R = g.current;
870
870
  if (!R) return 0;
871
871
  const H = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Aa(_) - H.left) / H.width)
874
+ Math.min(1, (Ma(_) - H.left) / H.width)
875
875
  );
876
876
  }, []), F = J((_) => {
877
877
  const R = h.current;
@@ -898,7 +898,7 @@ const Aa = (e) => {
898
898
  }, [w, N]), K(() => {
899
899
  const _ = h.current;
900
900
  _ && (w ? _.play().catch((R) => {
901
- b(!1), L(!0);
901
+ b(!1), D(!0);
902
902
  }) : _.pause());
903
903
  }, [w]), K(() => {
904
904
  if (!N) return;
@@ -922,7 +922,7 @@ const Aa = (e) => {
922
922
  u(_);
923
923
  return;
924
924
  }
925
- D || l && b((R) => !R);
925
+ L || l && b((R) => !R);
926
926
  },
927
927
  onKeyDown: (_) => {
928
928
  if (!(_.key !== "Enter" && _.key !== " ")) {
@@ -930,7 +930,7 @@ const Aa = (e) => {
930
930
  u(_);
931
931
  return;
932
932
  }
933
- D || l && b((R) => !R);
933
+ L || l && b((R) => !R);
934
934
  }
935
935
  },
936
936
  children: [
@@ -959,7 +959,7 @@ const Aa = (e) => {
959
959
  z(!1), A(!1);
960
960
  },
961
961
  onWaiting: () => z(!0),
962
- onPlay: () => L(!1),
962
+ onPlay: () => D(!1),
963
963
  onEnded: () => {
964
964
  i || (b(!1), x(0));
965
965
  },
@@ -979,7 +979,7 @@ const Aa = (e) => {
979
979
  z(!1), A(!1);
980
980
  },
981
981
  onWaiting: () => z(!0),
982
- onPlay: () => L(!1),
982
+ onPlay: () => D(!1),
983
983
  onLoadedMetadata: () => {
984
984
  const _ = h.current;
985
985
  _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && C(_.videoWidth / _.videoHeight);
@@ -990,14 +990,14 @@ const Aa = (e) => {
990
990
  children: /* @__PURE__ */ s("track", { kind: "captions" })
991
991
  }
992
992
  ) }),
993
- O && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
- ke,
993
+ O && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
+ Ce,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
998
998
  }
999
999
  ) }),
1000
- D && !l && /* @__PURE__ */ s(
1000
+ L && !l && /* @__PURE__ */ s(
1001
1001
  "div",
1002
1002
  {
1003
1003
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -1010,7 +1010,7 @@ const Aa = (e) => {
1010
1010
  onKeyDown: (_) => {
1011
1011
  _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
1012
1012
  },
1013
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1014
1014
  }
1015
1015
  ),
1016
1016
  o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1049,7 +1049,7 @@ const Aa = (e) => {
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1099,7 +1099,7 @@ const Aa = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
1102
- }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ps = ({
1102
+ }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1108,9 +1108,9 @@ const Aa = (e) => {
1108
1108
  mediaPlayerProps: i,
1109
1109
  containedImage: l = !1
1110
1110
  }) => {
1111
- const o = le(e), [d, u] = B(!1);
1111
+ const o = ce(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Ma,
1113
+ Ra,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1157,11 +1157,11 @@ const Aa = (e) => {
1157
1157
  {
1158
1158
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1159
1159
  children: we(e, {
1160
- className: Zt(r),
1160
+ className: Qt(r),
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1174,12 +1174,12 @@ const Aa = (e) => {
1174
1174
  {
1175
1175
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1176
1176
  children: we(e, {
1177
- className: Zt(r),
1177
+ className: Qt(r),
1178
1178
  weight: "regular"
1179
1179
  })
1180
1180
  }
1181
1181
  );
1182
- }, bs = ({
1182
+ }, vs = ({
1183
1183
  variant: e,
1184
1184
  thumbnail: t,
1185
1185
  title: n,
@@ -1245,28 +1245,28 @@ const Aa = (e) => {
1245
1245
  }
1246
1246
  );
1247
1247
  };
1248
- function vs(e) {
1248
+ function xs(e) {
1249
1249
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1250
1250
  }
1251
- function dt(e) {
1251
+ function ut(e) {
1252
1252
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1253
1253
  }
1254
1254
  function La(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function Da(e) {
1257
+ function za(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function za(e) {
1260
+ function Pa(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function Pa(e) {
1263
+ function Fa(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
- function Fa(e) {
1266
+ function Oa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const ut = ({ attachment: e, isMyMessage: t }) => {
1269
+ const mt = ({ attachment: e, isMyMessage: t }) => {
1270
1270
  const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
1271
1271
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1272
1272
  "img",
@@ -1279,25 +1279,25 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1279
1279
  "div",
1280
1280
  {
1281
1281
  className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Fa(t)}` })
1282
+ children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1283
1283
  }
1284
1284
  ) }),
1285
1285
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1286
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Da(t)}`, children: n }),
1287
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${za(t)}`, children: a }),
1288
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
1286
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1287
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
1289
1289
  ] })
1290
1290
  ] });
1291
1291
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
1292
1292
  };
1293
- function xs(e) {
1293
+ function ws(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
- function mt(e) {
1296
+ function ht(e) {
1297
1297
  var t;
1298
- return (t = e.attachments) == null ? void 0 : t.find(xs);
1298
+ return (t = e.attachments) == null ? void 0 : t.find(ws);
1299
1299
  }
1300
- async function Oa(e, t) {
1300
+ async function $a(e, t) {
1301
1301
  let n;
1302
1302
  try {
1303
1303
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1309,7 +1309,7 @@ async function Oa(e, t) {
1309
1309
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1310
1310
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1311
1311
  }
1312
- const $a = ({
1312
+ const ja = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const $a = ({
1321
1321
  onClick: (i) => {
1322
1322
  i.stopPropagation();
1323
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1324
- a(!0), Oa(e, t).then(() => {
1324
+ a(!0), $a(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1329,14 +1329,14 @@ const $a = ({
1329
1329
  },
1330
1330
  disabled: n,
1331
1331
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1332
- children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
- /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1332
+ children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
+ /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1334
1334
  "Download"
1335
1335
  ] })
1336
1336
  }
1337
1337
  );
1338
1338
  };
1339
- function ht(e) {
1339
+ function ft(e) {
1340
1340
  var h, g, c, v;
1341
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1342
1342
  (w) => w.type === "video" && w.asset_url
@@ -1357,16 +1357,16 @@ function ht(e) {
1357
1357
  thumbnailUrl: p
1358
1358
  };
1359
1359
  }
1360
- const ws = ({
1360
+ const _s = ({
1361
1361
  resolvedUrl: e,
1362
1362
  resolvedType: t,
1363
1363
  title: n,
1364
1364
  fileSize: a,
1365
1365
  thumbnailUrl: r
1366
1366
  }) => {
1367
- const i = a !== void 0 ? vs(a) : void 0;
1367
+ const i = a !== void 0 ? xs(a) : void 0;
1368
1368
  return /* @__PURE__ */ s(
1369
- bs,
1369
+ vs,
1370
1370
  {
1371
1371
  variant: "dark",
1372
1372
  title: n,
@@ -1374,7 +1374,7 @@ const ws = ({
1374
1374
  mimeType: t,
1375
1375
  detail: i,
1376
1376
  thumbnail: /* @__PURE__ */ s(
1377
- ps,
1377
+ bs,
1378
1378
  {
1379
1379
  mimeType: t,
1380
1380
  sourceUrl: e,
@@ -1385,23 +1385,23 @@ const ws = ({
1385
1385
  )
1386
1386
  }
1387
1387
  );
1388
- }, _s = ({
1388
+ }, Ns = ({
1389
1389
  resolvedUrl: e,
1390
1390
  resolvedType: t,
1391
1391
  title: n,
1392
1392
  fileSize: a,
1393
1393
  thumbnailUrl: r
1394
1394
  }) => {
1395
- const i = le(t), l = a !== void 0 ? vs(a) : void 0;
1395
+ const i = ce(t), l = a !== void 0 ? xs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
- bs,
1397
+ vs,
1398
1398
  {
1399
1399
  variant: "light",
1400
1400
  title: n,
1401
1401
  mimeType: t,
1402
1402
  detail: l,
1403
1403
  thumbnail: /* @__PURE__ */ s(
1404
- ps,
1404
+ bs,
1405
1405
  {
1406
1406
  mimeType: t,
1407
1407
  sourceUrl: e,
@@ -1411,17 +1411,17 @@ const ws = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s($a, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s(ja, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, ja = ({
1417
+ }, Ba = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
- const n = mt(e), a = ht(e);
1421
+ const n = ht(e), a = ft(e);
1422
1422
  return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1423
1423
  !t && e.user && /* @__PURE__ */ s(
1424
- se,
1424
+ ne,
1425
1425
  {
1426
1426
  className: "str-chat__avatar str-chat__message-sender-avatar",
1427
1427
  id: e.user.id,
@@ -1439,41 +1439,41 @@ const ws = ({
1439
1439
  {
1440
1440
  className: "str-chat__message-bubble",
1441
1441
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1442
- children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ws, { ...a }) : /* @__PURE__ */ s(_s, { ...a })
1442
+ children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, Ba = ({
1448
+ }, Ua = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
- const t = mt(e);
1451
+ const t = ht(e);
1452
1452
  if (t)
1453
- return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1454
- const n = ht(e);
1455
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ws, { ...n }) }) : null;
1456
- }, Ua = ({
1453
+ return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1454
+ const n = ft(e);
1455
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1456
+ }, Va = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
- const t = mt(e);
1459
+ const t = ht(e);
1460
1460
  if (t)
1461
- return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1462
- const n = ht(e);
1463
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1464
- }, ul = Object.assign(ja, {
1465
- Creator: Ba,
1466
- Visitor: Ua
1467
- }), Va = {
1461
+ return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1462
+ const n = ft(e);
1463
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1464
+ }, ul = Object.assign(Ba, {
1465
+ Creator: Ua,
1466
+ Visitor: Va
1467
+ }), Ga = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Ga = {
1470
+ }, Ha = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ha = {
1473
+ }, Ya = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
1476
+ }, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
1477
1477
  sender: {
1478
1478
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1479
1479
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1495,7 +1495,7 @@ const ws = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = qa[Ya(e)][a];
1498
+ const o = t != null && t !== "", d = Wa[qa(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const ws = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
- Va[e],
1514
1513
  Ga[e],
1514
+ Ha[e],
1515
1515
  n && "border",
1516
- n && Ha[e],
1516
+ n && Ya[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const ws = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
1564
1564
  src: e,
1565
1565
  mimeType: t,
1566
1566
  filename: n,
1567
1567
  items: a
1568
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ka = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1568
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1569
1569
  /* @__PURE__ */ s(
1570
1570
  "audio",
1571
1571
  {
@@ -1577,7 +1577,7 @@ const ws = ({
1577
1577
  }
1578
1578
  ),
1579
1579
  n ?? null
1580
- ] }), ft = ({
1580
+ ] }), gt = ({
1581
1581
  state: e,
1582
1582
  src: t,
1583
1583
  mimeType: n,
@@ -1588,7 +1588,7 @@ const ws = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1592
1592
  if (h.length === 0)
1593
1593
  return null;
1594
1594
  const g = o ?? (h.length > 1 ? "none" : "metadata");
@@ -1600,7 +1600,7 @@ const ws = ({
1600
1600
  groupPosition: l,
1601
1601
  "data-testid": "audio-attachment",
1602
1602
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1603
- Ka,
1603
+ Ja,
1604
1604
  {
1605
1605
  item: c,
1606
1606
  preload: g,
@@ -1614,15 +1614,15 @@ const ws = ({
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
1617
- }, Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Qa = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), er = {
1618
- Composer: Ja,
1619
- Sent: Za,
1620
- Received: Qa
1617
+ }, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
1618
+ Composer: Za,
1619
+ Sent: Qa,
1620
+ Received: er
1621
1621
  };
1622
- function tr(e) {
1622
+ function sr(e) {
1623
1623
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
1624
1624
  }
1625
- const sr = {
1625
+ const nr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const sr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function nr(e, t) {
1635
+ function ar(e, t) {
1636
1636
  if (t) {
1637
1637
  const r = t.lastIndexOf(".");
1638
1638
  if (r > 0 && r < t.length - 1) {
@@ -1641,8 +1641,8 @@ function nr(e, t) {
1641
1641
  }
1642
1642
  }
1643
1643
  if (!e) return;
1644
- if (le(e) === "document") {
1645
- const r = gs(e), i = sr[r];
1644
+ if (ce(e) === "document") {
1645
+ const r = ps(e), i = nr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function nr(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function ar(e, t, n) {
1654
- const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
1653
+ function rr(e, t, n) {
1654
+ const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
1655
1655
  return [a, r].filter(Boolean).join(" · ") || void 0;
1656
1656
  }
1657
1657
  function re(e) {
@@ -1662,16 +1662,16 @@ function re(e) {
1662
1662
  return "download";
1663
1663
  }
1664
1664
  }
1665
- const rr = {
1665
+ const ir = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, ir = {
1668
+ }, lr = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, lr = {
1671
+ }, or = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
- }, Ns = ({
1674
+ }, ys = ({
1675
1675
  variant: e,
1676
1676
  filename: t,
1677
1677
  title: n,
@@ -1681,16 +1681,16 @@ const rr = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
1685
1685
  "div",
1686
1686
  {
1687
1687
  className: k(
1688
1688
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1689
- ir[e]
1689
+ lr[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", lr[e]),
1693
+ className: k("size-6", or[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,7 +1701,7 @@ const rr = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- rr[e]
1704
+ ir[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
@@ -1730,7 +1730,7 @@ const rr = {
1730
1730
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1731
1731
  ] });
1732
1732
  };
1733
- async function ys(e, t) {
1733
+ async function ks(e, t) {
1734
1734
  const n = t ?? re(e);
1735
1735
  try {
1736
1736
  const a = await fetch(e, { mode: "cors" });
@@ -1744,14 +1744,14 @@ async function ys(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const or = ({
1747
+ const cr = ({
1748
1748
  src: e,
1749
1749
  filename: t,
1750
1750
  fileSize: n,
1751
1751
  mimeType: a,
1752
1752
  title: r,
1753
1753
  items: i
1754
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], cr = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1760,7 +1760,7 @@ const or = ({
1760
1760
  }) => {
1761
1761
  const i = t.filename ?? re(t.src);
1762
1762
  return /* @__PURE__ */ s(
1763
- Ns,
1763
+ ys,
1764
1764
  {
1765
1765
  variant: e,
1766
1766
  filename: i,
@@ -1772,7 +1772,7 @@ const or = ({
1772
1772
  trailingAction: r
1773
1773
  }
1774
1774
  );
1775
- }, gt = ({
1775
+ }, pt = ({
1776
1776
  state: e,
1777
1777
  src: t,
1778
1778
  filename: n,
@@ -1785,7 +1785,7 @@ const or = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), g = e === "composer" && !!p, c = or({
1788
+ const h = Me(e), g = e === "composer" && !!p, c = cr({
1789
1789
  src: t,
1790
1790
  filename: n,
1791
1791
  fileSize: a,
@@ -1797,7 +1797,7 @@ const or = ({
1797
1797
  const f = c[b];
1798
1798
  if (!f) return;
1799
1799
  const x = f.filename ?? re(f.src);
1800
- ys(f.src, x);
1800
+ ks(f.src, x);
1801
1801
  };
1802
1802
  if (c.length === 0)
1803
1803
  return null;
@@ -1809,7 +1809,7 @@ const or = ({
1809
1809
  h === "dark" ? "text-white/70" : "text-black/70"
1810
1810
  ),
1811
1811
  "aria-hidden": !0,
1812
- children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
1812
+ children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
1813
1813
  }
1814
1814
  );
1815
1815
  return /* @__PURE__ */ s(
@@ -1820,7 +1820,7 @@ const or = ({
1820
1820
  groupPosition: d,
1821
1821
  "data-testid": "file-attachment",
1822
1822
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
1823
- cr,
1823
+ dr,
1824
1824
  {
1825
1825
  variant: h,
1826
1826
  item: b,
@@ -1832,11 +1832,11 @@ const or = ({
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
1835
- }, dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), hr = {
1836
- Composer: dr,
1837
- Sent: ur,
1838
- Received: mr
1839
- }, pt = ({
1835
+ }, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
1836
+ Composer: ur,
1837
+ Sent: mr,
1838
+ Received: hr
1839
+ }, bt = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
1842
1842
  prevLabel: n = "Previous",
@@ -1849,7 +1849,7 @@ const or = ({
1849
1849
  onClick: e,
1850
1850
  "aria-label": n,
1851
1851
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1852
- children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1862,7 +1862,7 @@ const or = ({
1862
1862
  children: /* @__PURE__ */ s(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
1863
1863
  }
1864
1864
  )
1865
- ] }), ks = ({
1865
+ ] }), Cs = ({
1866
1866
  url: e,
1867
1867
  filename: t,
1868
1868
  variant: n = "pill",
@@ -1873,7 +1873,7 @@ const or = ({
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
1875
  (c) => {
1876
- c.stopPropagation(), !o && (d(!0), ys(e, t).catch(() => {
1876
+ c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
@@ -1898,14 +1898,14 @@ const or = ({
1898
1898
  }[i]
1899
1899
  ),
1900
1900
  children: o ? /* @__PURE__ */ s(
1901
- ke,
1901
+ Ce,
1902
1902
  {
1903
1903
  className: "size-4 animate-spin",
1904
1904
  weight: "bold",
1905
1905
  "aria-hidden": !0
1906
1906
  }
1907
1907
  ) : /* @__PURE__ */ s(
1908
- Ce,
1908
+ Se,
1909
1909
  {
1910
1910
  className: "size-5 shrink-0",
1911
1911
  weight: "bold",
@@ -1921,7 +1921,7 @@ const or = ({
1921
1921
  disabled: o,
1922
1922
  "aria-label": a,
1923
1923
  className: "mes-media-viewer__action",
1924
- children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
1924
+ children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
1925
  }
1926
1926
  ) : /* @__PURE__ */ m(
1927
1927
  "button",
@@ -1936,18 +1936,18 @@ const or = ({
1936
1936
  ),
1937
1937
  children: [
1938
1938
  o ? /* @__PURE__ */ s(
1939
- ke,
1939
+ Ce,
1940
1940
  {
1941
1941
  className: "size-4 animate-spin",
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Ce, { ...g, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1946
1946
  p ? null : a
1947
1947
  ]
1948
1948
  }
1949
1949
  );
1950
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
1950
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1951
1951
  length: e,
1952
1952
  initialIndex: t,
1953
1953
  open: n
@@ -1972,7 +1972,7 @@ const or = ({
1972
1972
  };
1973
1973
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1974
1974
  }, [n, e, l, o]), { index: r, prev: l, next: o };
1975
- }, vt = ({
1975
+ }, xt = ({
1976
1976
  open: e,
1977
1977
  onClose: t,
1978
1978
  ariaLabel: n,
@@ -2062,29 +2062,29 @@ const or = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Cs = ({
2065
+ }, Ss = ({
2066
2066
  open: e,
2067
2067
  items: t,
2068
2068
  initialIndex: n = 0,
2069
2069
  onClose: a
2070
2070
  }) => {
2071
- const { index: r, prev: i, next: l } = bt({
2071
+ const { index: r, prev: i, next: l } = vt({
2072
2072
  length: t.length,
2073
2073
  initialIndex: n,
2074
2074
  open: e
2075
- }), o = t[r], d = ae(
2075
+ }), o = t[r], d = se(
2076
2076
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
2077
2077
  [o]
2078
2078
  );
2079
2079
  return o ? /* @__PURE__ */ m(
2080
- vt,
2080
+ xt,
2081
2081
  {
2082
2082
  open: e,
2083
2083
  onClose: a,
2084
2084
  ariaLabel: d,
2085
2085
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2086
2086
  actions: /* @__PURE__ */ s(
2087
- ks,
2087
+ Cs,
2088
2088
  {
2089
2089
  url: o.src,
2090
2090
  filename: d,
@@ -2107,7 +2107,7 @@ const or = ({
2107
2107
  `${r}:${o.src}`
2108
2108
  ),
2109
2109
  t.length > 1 ? /* @__PURE__ */ s(
2110
- pt,
2110
+ bt,
2111
2111
  {
2112
2112
  onPrev: i,
2113
2113
  onNext: l,
@@ -2118,7 +2118,7 @@ const or = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
2121
- }, fr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Ss = ({
2121
+ }, gr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Es = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const or = ({
2127
2127
  const r = e.length;
2128
2128
  if (r === 0) return null;
2129
2129
  const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
2130
- const h = k(fr, "h-full w-full");
2130
+ const h = k(gr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const or = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, gr = (e, t, n, a) => ({
2199
+ }, pr = (e, t, n, a) => ({
2200
2200
  ariaLabel: `Open image ${t + 1} of ${n}`,
2201
2201
  content: /* @__PURE__ */ s(
2202
2202
  "img",
@@ -2211,15 +2211,15 @@ const or = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), pr = ({
2214
+ }), br = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
2218
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Es = (e, t) => e.map((n, a) => ({
2218
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Is = (e, t) => e.map((n, a) => ({
2219
2219
  src: n.src,
2220
2220
  alt: n.alt,
2221
2221
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2222
- })), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2223
2223
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
2224
2224
  r
2225
2225
  );
@@ -2246,16 +2246,16 @@ const or = ({
2246
2246
  ),
2247
2247
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
2248
2248
  /* @__PURE__ */ s(
2249
- Cs,
2249
+ Ss,
2250
2250
  {
2251
2251
  open: l,
2252
- items: Es([{ src: e, alt: t }], n),
2252
+ items: Is([{ src: e, alt: t }], n),
2253
2253
  initialIndex: o,
2254
2254
  onClose: u
2255
2255
  }
2256
2256
  )
2257
2257
  ] });
2258
- }, Is = ({
2258
+ }, Ts = ({
2259
2259
  state: e,
2260
2260
  src: t,
2261
2261
  alt: n,
@@ -2266,13 +2266,13 @@ const or = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2269
+ const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2270
2270
  d
2271
2271
  );
2272
2272
  if (u.length === 0)
2273
2273
  return null;
2274
2274
  const w = u.map(
2275
- (b, f) => gr(b, f, u.length, o)
2275
+ (b, f) => pr(b, f, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2282,12 +2282,12 @@ const or = ({
2282
2282
  groupPosition: l,
2283
2283
  "data-testid": "image-attachment",
2284
2284
  children: [
2285
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: c }) }),
2285
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Cs,
2287
+ Ss,
2288
2288
  {
2289
2289
  open: h,
2290
- items: Es(u, a),
2290
+ items: Is(u, a),
2291
2291
  initialIndex: g,
2292
2292
  onClose: v
2293
2293
  }
@@ -2295,29 +2295,29 @@ const or = ({
2295
2295
  ]
2296
2296
  }
2297
2297
  );
2298
- }, vr = (e) => /* @__PURE__ */ s(br, { ...e }), xr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), _r = {
2299
- Composer: vr,
2300
- Sent: xr,
2301
- Received: wr
2302
- }, Nr = ({
2298
+ }, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Nr = {
2299
+ Composer: xr,
2300
+ Sent: wr,
2301
+ Received: _r
2302
+ }, yr = ({
2303
2303
  open: e,
2304
2304
  items: t,
2305
2305
  initialIndex: n = 0,
2306
2306
  onClose: a
2307
2307
  }) => {
2308
- const { index: r, prev: i, next: l } = bt({
2308
+ const { index: r, prev: i, next: l } = vt({
2309
2309
  length: t.length,
2310
2310
  initialIndex: n,
2311
2311
  open: e
2312
- }), o = t[r], d = ae(
2312
+ }), o = t[r], d = se(
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
- ), u = ae(
2316
- () => o ? yr(o.src) : void 0,
2315
+ ), u = se(
2316
+ () => o ? kr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
2320
- vt,
2320
+ xt,
2321
2321
  {
2322
2322
  open: e,
2323
2323
  onClose: a,
@@ -2336,7 +2336,7 @@ const or = ({
2336
2336
  `${r}:${o.src}`
2337
2337
  ),
2338
2338
  t.length > 1 ? /* @__PURE__ */ s(
2339
- pt,
2339
+ bt,
2340
2340
  {
2341
2341
  onPrev: i,
2342
2342
  onNext: l,
@@ -2347,16 +2347,16 @@ const or = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, yr = (e) => {
2350
+ }, kr = (e) => {
2351
2351
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2352
2352
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2353
- }, kr = ({
2353
+ }, Cr = ({
2354
2354
  src: e,
2355
2355
  filename: t,
2356
2356
  fileSize: n,
2357
2357
  title: a,
2358
2358
  items: r
2359
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Cr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2365,7 +2365,7 @@ const or = ({
2365
2365
  }) => {
2366
2366
  const i = t.filename ?? re(t.src);
2367
2367
  return /* @__PURE__ */ s(
2368
- Ns,
2368
+ ys,
2369
2369
  {
2370
2370
  variant: e,
2371
2371
  filename: i,
@@ -2377,7 +2377,7 @@ const or = ({
2377
2377
  trailingAction: r
2378
2378
  }
2379
2379
  );
2380
- }, xt = ({
2380
+ }, wt = ({
2381
2381
  state: e,
2382
2382
  src: t,
2383
2383
  filename: n,
@@ -2389,7 +2389,7 @@ const or = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = kr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2392
+ const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2393
2393
  d
2394
2394
  ), b = e === "composer" && !!u;
2395
2395
  if (h.length === 0)
@@ -2408,7 +2408,7 @@ const or = ({
2408
2408
  children: [
2409
2409
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
2410
  const S = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
- ks,
2411
+ Cs,
2412
2412
  {
2413
2413
  url: x.src,
2414
2414
  filename: S,
@@ -2418,7 +2418,7 @@ const or = ({
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- Cr,
2421
+ Sr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
@@ -2430,7 +2430,7 @@ const or = ({
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- Nr,
2433
+ yr,
2434
2434
  {
2435
2435
  open: g,
2436
2436
  items: f,
@@ -2441,26 +2441,26 @@ const or = ({
2441
2441
  ]
2442
2442
  }
2443
2443
  );
2444
- }, Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Tr = {
2445
- Composer: Sr,
2446
- Sent: Er,
2447
- Received: Ir
2448
- }, Ts = ({
2444
+ }, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
2445
+ Composer: Er,
2446
+ Sent: Ir,
2447
+ Received: Tr
2448
+ }, As = ({
2449
2449
  open: e,
2450
2450
  items: t,
2451
2451
  initialIndex: n = 0,
2452
2452
  onClose: a
2453
2453
  }) => {
2454
- const { index: r, prev: i, next: l } = bt({
2454
+ const { index: r, prev: i, next: l } = vt({
2455
2455
  length: t.length,
2456
2456
  initialIndex: n,
2457
2457
  open: e
2458
- }), o = t[r], d = ae(
2458
+ }), o = t[r], d = se(
2459
2459
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
2460
2460
  [o]
2461
2461
  );
2462
2462
  return o ? /* @__PURE__ */ m(
2463
- vt,
2463
+ xt,
2464
2464
  {
2465
2465
  open: e,
2466
2466
  onClose: a,
@@ -2484,7 +2484,7 @@ const or = ({
2484
2484
  `${r}:${o.src}`
2485
2485
  ),
2486
2486
  t.length > 1 ? /* @__PURE__ */ s(
2487
- pt,
2487
+ bt,
2488
2488
  {
2489
2489
  onPrev: i,
2490
2490
  onNext: l,
@@ -2495,7 +2495,7 @@ const or = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
2498
- }, Ar = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), As = ({
2498
+ }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(tt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2499
2499
  item: e,
2500
2500
  index: t
2501
2501
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2510,24 +2510,24 @@ const or = ({
2510
2510
  className: "absolute inset-0 size-full rounded-md object-cover"
2511
2511
  }
2512
2512
  ) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
2513
- os,
2513
+ cs,
2514
2514
  {
2515
2515
  className: "size-16 rounded-md text-white/30",
2516
2516
  weight: "regular",
2517
2517
  "aria-hidden": !0
2518
2518
  }
2519
2519
  ) }),
2520
- /* @__PURE__ */ s(Ar, {})
2521
- ] }), Mr = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Mr, {})
2521
+ ] }), Rr = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
- content: /* @__PURE__ */ s(As, { item: e, index: t })
2524
- }), Rr = ({
2523
+ content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
+ }), Dr = ({
2525
2525
  src: e,
2526
2526
  poster: t,
2527
2527
  mimeType: n,
2528
2528
  preload: a,
2529
2529
  items: r
2530
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Ms = (e, t) => e.map((n, a) => ({
2530
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Rs = (e, t) => e.map((n, a) => ({
2531
2531
  src: n.src,
2532
2532
  poster: n.poster,
2533
2533
  mimeType: n.mimeType,
@@ -2545,15 +2545,15 @@ const or = ({
2545
2545
  onClick: () => u(0),
2546
2546
  "aria-label": "Play video",
2547
2547
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2548
- children: /* @__PURE__ */ s(As, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2548
+ children: /* @__PURE__ */ s(Ms, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2549
2549
  }
2550
2550
  ),
2551
2551
  l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: l }) }) : null,
2552
2552
  /* @__PURE__ */ s(
2553
- Ts,
2553
+ As,
2554
2554
  {
2555
2555
  open: o,
2556
- items: Ms(
2556
+ items: Rs(
2557
2557
  [{ src: e, poster: t, mimeType: n, preload: r }],
2558
2558
  a
2559
2559
  ),
@@ -2562,7 +2562,7 @@ const or = ({
2562
2562
  }
2563
2563
  )
2564
2564
  ] });
2565
- }, Rs = ({
2565
+ }, Ds = ({
2566
2566
  state: e,
2567
2567
  src: t,
2568
2568
  poster: n,
@@ -2574,13 +2574,13 @@ const or = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Rr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2577
+ const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2578
2578
  u
2579
2579
  );
2580
2580
  if (p.length === 0)
2581
2581
  return null;
2582
2582
  const b = p.map(
2583
- (f, x) => Mr(f, x, p.length)
2583
+ (f, x) => Rr(f, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2591,7 +2591,7 @@ const or = ({
2591
2591
  "data-testid": "video-attachment",
2592
2592
  children: [
2593
2593
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2594
- Ss,
2594
+ Es,
2595
2595
  {
2596
2596
  tiles: b,
2597
2597
  onTileActivate: v,
@@ -2599,10 +2599,10 @@ const or = ({
2599
2599
  }
2600
2600
  ) }),
2601
2601
  /* @__PURE__ */ s(
2602
- Ts,
2602
+ As,
2603
2603
  {
2604
2604
  open: g,
2605
- items: Ms(p, r),
2605
+ items: Rs(p, r),
2606
2606
  initialIndex: c,
2607
2607
  onClose: w
2608
2608
  }
@@ -2610,25 +2610,25 @@ const or = ({
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "received" }), Fr = {
2614
- Composer: Dr,
2615
- Sent: zr,
2616
- Received: Pr
2617
- }, Ne = {
2618
- Image: _r,
2619
- Video: Fr,
2620
- Audio: er,
2621
- Pdf: Tr,
2622
- File: hr
2623
- }, Or = {
2624
- isUnlocking: () => !1
2613
+ }, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
2614
+ Composer: zr,
2615
+ Sent: Pr,
2616
+ Received: Fr
2617
+ }, ye = {
2618
+ Image: Nr,
2619
+ Video: Or,
2620
+ Audio: tr,
2621
+ Pdf: Ar,
2622
+ File: fr
2625
2623
  }, $r = {
2626
- LockedAttachment: Or
2627
- }, Ls = at({}), ml = Ls.Provider;
2628
- function jr(e) {
2629
- return Ee(Ls)[e] ?? $r[e];
2624
+ isUnlocking: () => !1
2625
+ }, jr = {
2626
+ LockedAttachment: $r
2627
+ }, Ls = rt({}), ml = Ls.Provider;
2628
+ function Br(e) {
2629
+ return Ie(Ls)[e] ?? jr[e];
2630
2630
  }
2631
- const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2631
+ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2632
2632
  "svg",
2633
2633
  {
2634
2634
  width: e,
@@ -2645,21 +2645,21 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2645
  }
2646
2646
  )
2647
2647
  }
2648
- ), Ur = (e) => {
2648
+ ), Vr = (e) => {
2649
2649
  var t;
2650
2650
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2651
- }, Vr = (e) => {
2651
+ }, Gr = (e) => {
2652
2652
  var t;
2653
2653
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2654
2654
  }, Fe = (e) => {
2655
2655
  var t;
2656
2656
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2657
- }, Gr = (e) => {
2657
+ }, Hr = (e) => {
2658
2658
  var t;
2659
2659
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2660
- }, Ds = (e) => Ur(e) || Vr(e), Hr = (e) => {
2660
+ }, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
2661
2661
  var t;
2662
- return Ds(e) && !((t = e.text) != null && t.trim());
2662
+ return zs(e) && !((t = e.text) != null && t.trim());
2663
2663
  }, Ke = ({
2664
2664
  message: e,
2665
2665
  standalone: t = !1,
@@ -2667,7 +2667,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2667
2667
  hasAttachment: a = !1
2668
2668
  }) => {
2669
2669
  var h;
2670
- const r = Ds(e), i = Fe(e);
2670
+ const r = zs(e), i = Fe(e);
2671
2671
  if (!r && !i)
2672
2672
  return null;
2673
2673
  if (r) {
@@ -2675,7 +2675,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2675
2675
  if (!g) return null;
2676
2676
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
2677
  return /* @__PURE__ */ m("div", { className: c, children: [
2678
- /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2678
+ /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2679
2679
  /* @__PURE__ */ s("span", { children: v })
2680
2680
  ] });
2681
2681
  }
@@ -2683,7 +2683,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2683
2683
  "message-chatbot-indicator",
2684
2684
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2685
2685
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2686
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Br, { size: l ? 12 : 15 }) });
2686
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
2687
2687
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
2688
2688
  u,
2689
2689
  p
@@ -2691,7 +2691,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2691
2691
  p,
2692
2692
  u
2693
2693
  ] }) });
2694
- }, Yr = ({
2694
+ }, qr = ({
2695
2695
  selected: e,
2696
2696
  onVoteUp: t,
2697
2697
  onVoteDown: n
@@ -2707,7 +2707,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2707
2707
  "aria-label": "Good response",
2708
2708
  "aria-pressed": e === "up",
2709
2709
  "data-tooltip": "Good response",
2710
- children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2710
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2711
2711
  }
2712
2712
  ),
2713
2713
  /* @__PURE__ */ s(
@@ -2721,20 +2721,32 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2721
2721
  "aria-label": "Bad response",
2722
2722
  "aria-pressed": e === "down",
2723
2723
  "data-tooltip": "Bad response",
2724
- children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2724
+ children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2725
2725
  }
2726
2726
  )
2727
- ] }), qr = () => /* @__PURE__ */ m(ee, { children: [
2728
- /* @__PURE__ */ s(Xn, { weight: "bold", "aria-hidden": "true" }),
2729
- /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2730
- ] }), Wr = () => null, Xr = () => /* @__PURE__ */ s(
2731
- Ws,
2727
+ ] }), Je = () => {
2728
+ var i;
2729
+ const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
2730
+ var l;
2731
+ if (!(!a || !t)) {
2732
+ for (let o = t.length - 1; o >= 0; o -= 1)
2733
+ if (((l = t[o].user) == null ? void 0 : l.id) === a) return t[o].id;
2734
+ }
2735
+ }, [t, a]);
2736
+ return e.id !== r ? null : /* @__PURE__ */ m(ee, { children: [
2737
+ /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2738
+ /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2739
+ ] });
2740
+ }, Wr = () => null, Xr = () => /* @__PURE__ */ s(
2741
+ Xs,
2732
2742
  {
2733
- MessageSentStatus: qr,
2743
+ MessageSentStatus: Je,
2744
+ MessageDeliveredStatus: Je,
2745
+ MessageReadStatus: Je,
2734
2746
  MessageSendingStatus: Wr
2735
2747
  }
2736
2748
  ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2737
- function wt(e) {
2749
+ function _t(e) {
2738
2750
  if (typeof e != "string") return;
2739
2751
  const t = e.trim();
2740
2752
  if (t === "") return;
@@ -2752,7 +2764,7 @@ const Zr = {
2752
2764
  const n = k(
2753
2765
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2754
2766
  Zr[e]
2755
- ), a = wt(t.href);
2767
+ ), a = _t(t.href);
2756
2768
  return a ? /* @__PURE__ */ s(
2757
2769
  "a",
2758
2770
  {
@@ -2784,7 +2796,7 @@ const Zr = {
2784
2796
  }, ti = "text-white/30", si = {
2785
2797
  dark: "text-white/55",
2786
2798
  light: "text-black/55"
2787
- }, _t = ({
2799
+ }, Nt = ({
2788
2800
  variant: e,
2789
2801
  title: t,
2790
2802
  placeholderTitle: n,
@@ -2892,11 +2904,11 @@ const Zr = {
2892
2904
  }, ri = {
2893
2905
  dark: "size-16 text-white/25",
2894
2906
  light: "size-16 text-black/25"
2895
- }, Ve = (e, t) => !!t && !!e && le(e) === "audio", Nt = (e, t) => {
2907
+ }, Ve = (e, t) => !!t && !!e && ce(e) === "audio", yt = (e, t) => {
2896
2908
  if (!t || !e) return !1;
2897
- const n = le(e);
2909
+ const n = ce(e);
2898
2910
  return n === "video" || n === "audio";
2899
- }, yt = "bg-[#F2F3F4]", $e = ({
2911
+ }, kt = "bg-[#F2F3F4]", $e = ({
2900
2912
  variant: e,
2901
2913
  thumbnailUrl: t,
2902
2914
  sourceUrl: n,
@@ -2905,7 +2917,7 @@ const Zr = {
2905
2917
  topLeft: i,
2906
2918
  topRight: l
2907
2919
  }) => {
2908
- const o = le(r), d = !!n && o === "video";
2920
+ const o = ce(r), d = !!n && o === "video";
2909
2921
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2910
2922
  "audio",
2911
2923
  {
@@ -2990,10 +3002,10 @@ const Zr = {
2990
3002
  onClick: h,
2991
3003
  "aria-label": "Edit attachment",
2992
3004
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2993
- children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3005
+ children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
2994
3006
  }
2995
3007
  ) : void 0;
2996
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3008
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
2997
3009
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
2998
3010
  $e,
2999
3011
  {
@@ -3022,7 +3034,7 @@ const Zr = {
3022
3034
  }
3023
3035
  ),
3024
3036
  /* @__PURE__ */ s(
3025
- _t,
3037
+ Nt,
3026
3038
  {
3027
3039
  variant: "dark",
3028
3040
  title: e,
@@ -3049,7 +3061,7 @@ const Zr = {
3049
3061
  cta: d,
3050
3062
  onClick: u
3051
3063
  }) => {
3052
- const p = Nt(a, i), h = wt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? yt : void 0, w = d && u ? {
3064
+ const p = yt(a, i), h = _t(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
3053
3065
  ...d,
3054
3066
  onClick: () => {
3055
3067
  var b;
@@ -3077,7 +3089,7 @@ const Zr = {
3077
3089
  }
3078
3090
  ),
3079
3091
  /* @__PURE__ */ s(
3080
- _t,
3092
+ Nt,
3081
3093
  {
3082
3094
  variant: "light",
3083
3095
  title: e,
@@ -3103,14 +3115,14 @@ const Zr = {
3103
3115
  cta: u,
3104
3116
  onClick: p
3105
3117
  }) => {
3106
- const h = Nt(r, l), g = wt(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3118
+ const h = yt(r, l), g = _t(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3107
3119
  return /* @__PURE__ */ m(
3108
3120
  Oe,
3109
3121
  {
3110
3122
  variant: "dark",
3111
3123
  href: c,
3112
3124
  onClick: v,
3113
- bgClassName: Ve(r, l) ? yt : void 0,
3125
+ bgClassName: Ve(r, l) ? kt : void 0,
3114
3126
  children: [
3115
3127
  o === "featured" && /* @__PURE__ */ s(
3116
3128
  $e,
@@ -3123,7 +3135,7 @@ const Zr = {
3123
3135
  }
3124
3136
  ),
3125
3137
  /* @__PURE__ */ s(
3126
- _t,
3138
+ Nt,
3127
3139
  {
3128
3140
  variant: "dark",
3129
3141
  title: e,
@@ -3137,7 +3149,7 @@ const Zr = {
3137
3149
  ]
3138
3150
  }
3139
3151
  );
3140
- }, Qt = {
3152
+ }, es = {
3141
3153
  Composer: ii,
3142
3154
  Sent: oi,
3143
3155
  Received: li
@@ -3146,13 +3158,13 @@ function P(e) {
3146
3158
  const t = e == null ? void 0 : e.trim();
3147
3159
  return t || void 0;
3148
3160
  }
3149
- function es(e) {
3161
+ function ts(e) {
3150
3162
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3151
3163
  }
3152
3164
  function ui(e, t) {
3153
3165
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3154
3166
  return !1;
3155
- const n = es(e), a = es(t);
3167
+ const n = ts(e), a = ts(t);
3156
3168
  if (n === a)
3157
3169
  return !0;
3158
3170
  if (!n.includes(a))
@@ -3160,7 +3172,7 @@ function ui(e, t) {
3160
3172
  const r = n.split(a).join("");
3161
3173
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3162
3174
  }
3163
- function ts(e) {
3175
+ function ss(e) {
3164
3176
  const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
3165
3177
  return {
3166
3178
  title: P(e.title),
@@ -3170,19 +3182,19 @@ function ts(e) {
3170
3182
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3171
3183
  // native video/audio player in the hero instead of a static thumbnail.
3172
3184
  sourceUrl: a,
3173
- layout: n || Nt(r, a) ? "featured" : "classic",
3185
+ layout: n || yt(r, a) ? "featured" : "classic",
3174
3186
  mimeType: r
3175
3187
  };
3176
3188
  }
3177
3189
  function mi(e) {
3178
3190
  var t;
3179
- return zs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3191
+ return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3180
3192
  }
3181
- function zs(e) {
3193
+ function Ps(e) {
3182
3194
  const t = P(e.og_scrape_url);
3183
3195
  return e.type === "link" || !!t && !e.asset_url;
3184
3196
  }
3185
- function Ps(e) {
3197
+ function Fs(e) {
3186
3198
  if (!(e != null && e.length)) return [];
3187
3199
  const t = [], n = (r, i) => {
3188
3200
  const l = t[t.length - 1];
@@ -3200,7 +3212,7 @@ function Ps(e) {
3200
3212
  t.push({ type: "link", attachments: [r] });
3201
3213
  };
3202
3214
  for (const r of e) {
3203
- if (zs(r)) {
3215
+ if (Ps(r)) {
3204
3216
  a(r);
3205
3217
  continue;
3206
3218
  }
@@ -3221,21 +3233,21 @@ function fi(e) {
3221
3233
  function gi(e, t, n) {
3222
3234
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3223
3235
  }
3224
- function ss(e) {
3236
+ function ns(e) {
3225
3237
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3226
3238
  }
3227
3239
  function pi(e) {
3228
3240
  switch (e) {
3229
3241
  case "image":
3230
- return Ne.Image;
3242
+ return ye.Image;
3231
3243
  case "video":
3232
- return Ne.Video;
3244
+ return ye.Video;
3233
3245
  case "audio":
3234
- return Ne.Audio;
3246
+ return ye.Audio;
3235
3247
  case "pdf":
3236
- return Ne.Pdf;
3248
+ return ye.Pdf;
3237
3249
  default:
3238
- return Ne.File;
3250
+ return ye.File;
3239
3251
  }
3240
3252
  }
3241
3253
  function bi(e, t) {
@@ -3244,7 +3256,7 @@ function bi(e, t) {
3244
3256
  case "image":
3245
3257
  return {
3246
3258
  items: t.map((a) => ({
3247
- src: ss(a),
3259
+ src: ns(a),
3248
3260
  alt: P(a.title)
3249
3261
  }))
3250
3262
  };
@@ -3295,7 +3307,7 @@ function bi(e, t) {
3295
3307
  switch (e) {
3296
3308
  case "image":
3297
3309
  return {
3298
- src: ss(n),
3310
+ src: ns(n),
3299
3311
  alt: P(n.title)
3300
3312
  };
3301
3313
  case "video":
@@ -3344,17 +3356,17 @@ const xi = ({
3344
3356
  message: n
3345
3357
  }) => {
3346
3358
  var w;
3347
- const a = Ps(n.attachments);
3359
+ const a = Fs(n.attachments);
3348
3360
  if (a.length === 0) return null;
3349
- const r = hi(a), i = fi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ts(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
3361
+ const r = hi(a), i = fi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
3350
3362
  let p = 0, h = 0;
3351
3363
  const g = [], c = (b, f) => {
3352
3364
  const x = p === r - 1;
3353
3365
  p += 1;
3354
- const N = t ? Qt.Sent : Qt.Received;
3366
+ const N = t ? es.Sent : es.Received;
3355
3367
  g.push(
3356
3368
  /* @__PURE__ */ m(U.Fragment, { children: [
3357
- /* @__PURE__ */ s(N, { ...ts(b) }),
3369
+ /* @__PURE__ */ s(N, { ...ss(b) }),
3358
3370
  x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3359
3371
  ] }, f)
3360
3372
  );
@@ -3387,7 +3399,7 @@ const xi = ({
3387
3399
  v(b, `media-${f}`);
3388
3400
  }), /* @__PURE__ */ s(ee, { children: g });
3389
3401
  }, wi = (e) => {
3390
- var Tt, At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut;
3402
+ var At, Mt, Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3391
3403
  const {
3392
3404
  additionalMessageInputProps: t,
3393
3405
  chatbotVotingEnabled: n,
@@ -3405,52 +3417,52 @@ const xi = ({
3405
3417
  renderText: v,
3406
3418
  threadList: w,
3407
3419
  viewerLanguage: b
3408
- } = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = jr("LockedAttachment"), [D, L] = B(!1), O = Ks(c.id), { selected: z, voteUp: y, voteDown: A } = va(c), {
3409
- Attachment: E = Js,
3410
- EditMessageModal: C = Zs,
3420
+ } = e, { client: f } = oe("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = Br("LockedAttachment"), [L, D] = B(!1), O = Js(c.id), { selected: z, voteUp: y, voteDown: A } = xa(c), {
3421
+ Attachment: E = Zs,
3422
+ EditMessageModal: C = Qs,
3411
3423
  MessageActions: I,
3412
- MessageBlocked: $ = Qs,
3413
- MessageBouncePrompt: F = en,
3414
- MessageDeleted: V = tn,
3415
- MessageIsThreadReplyInChannelButtonIndicator: Q = sn,
3416
- MessageRepliesCountButton: te = nn,
3417
- ReminderNotification: X = an,
3418
- StreamedMessageText: _ = rn,
3424
+ MessageBlocked: $ = en,
3425
+ MessageBouncePrompt: F = tn,
3426
+ MessageDeleted: V = sn,
3427
+ MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3428
+ MessageRepliesCountButton: te = an,
3429
+ ReminderNotification: X = rn,
3430
+ StreamedMessageText: _ = ln,
3419
3431
  PinIndicator: R
3420
- } = rs("CustomMessage"), H = ln(c), q = on(c), Y = ae(
3432
+ } = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
3421
3433
  () => h == null ? void 0 : h(c),
3422
3434
  [h, c]
3423
- ), j = ae(() => {
3424
- const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3435
+ ), j = se(() => {
3436
+ const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
3425
3437
  if (!Fe(c)) return pe;
3426
- const Vt = pe.filter((Gt) => !("type" in Gt) || !xs(Gt));
3427
- return Vt.length === pe.length ? pe : Vt;
3428
- }, [c]), W = ae(
3429
- () => Ps(j),
3438
+ const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3439
+ return Gt.length === pe.length ? pe : Gt;
3440
+ }, [c]), W = se(
3441
+ () => Fs(j),
3430
3442
  [j]
3431
- ), Z = ae(() => {
3432
- const de = ms({ message: c, viewerLanguage: b });
3433
- return de === c.text ? c : { ...c, text: de };
3434
- }, [c, b]), oe = W.length > 0, Le = W.reduce(
3435
- (de, pe) => de + pe.attachments.length,
3443
+ ), Z = se(() => {
3444
+ const me = hs({ message: c, viewerLanguage: b });
3445
+ return me === c.text ? c : { ...c, text: me };
3446
+ }, [c, b]), de = W.length > 0, De = W.reduce(
3447
+ (me, pe) => me + pe.attachments.length,
3436
3448
  0
3437
- ) === ((j == null ? void 0 : j.length) ?? 0), De = Wa(
3449
+ ) === ((j == null ? void 0 : j.length) ?? 0), Le = Xa(
3438
3450
  {
3439
3451
  endOfGroup: r,
3440
3452
  firstOfGroup: i,
3441
3453
  groupedByUser: l
3442
3454
  }
3443
3455
  );
3444
- if (cn(c))
3456
+ if (dn(c))
3445
3457
  return null;
3446
3458
  if (c.deleted_at || c.type === "deleted")
3447
3459
  return /* @__PURE__ */ s(V, { message: c });
3448
- if (dn(c))
3460
+ if (un(c))
3449
3461
  return /* @__PURE__ */ s($, {});
3450
- const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Tt = c.error) == null ? void 0 : Tt.status) !== 403, Ct = un(c);
3462
+ const ae = !w && !!c.reply_count, ue = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3451
3463
  let he;
3452
- ie ? he = () => u(c) : Ct && (he = () => L(!0));
3453
- const fe = g(), Bs = k(
3464
+ ie ? he = () => u(c) : St && (he = () => D(!0));
3465
+ const fe = g(), Us = k(
3454
3466
  "str-chat__message str-chat__message-simple",
3455
3467
  `str-chat__message--${c.type}`,
3456
3468
  `str-chat__message--${c.status}`,
@@ -3461,13 +3473,13 @@ const xi = ({
3461
3473
  "str-chat__message--highlighted": p,
3462
3474
  "str-chat__message--pinned pinned-message": c.pinned,
3463
3475
  "str-chat__message--with-reactions": q,
3464
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((At = c == null ? void 0 : c.error) == null ? void 0 : At.status) !== 403,
3465
- "str-chat__message-with-thread-link": ne || ce,
3476
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3477
+ "str-chat__message-with-thread-link": ae || ue,
3466
3478
  "str-chat__virtual-message__wrapper--end": r,
3467
3479
  "str-chat__virtual-message__wrapper--first": i,
3468
3480
  "str-chat__virtual-message__wrapper--group": l
3469
3481
  }
3470
- ), Ge = c.poll_id && f.polls.fromState(c.poll_id), St = Hr(c), ge = Fe(c), Et = Gr(c), He = !!(j != null && j.length && !c.quoted_message), It = ge && fe && He, Us = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
3482
+ ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
3471
3483
  return /* @__PURE__ */ m(ee, { children: [
3472
3484
  a && /* @__PURE__ */ s(
3473
3485
  C,
@@ -3475,25 +3487,25 @@ const xi = ({
3475
3487
  additionalMessageInputProps: t
3476
3488
  }
3477
3489
  ),
3478
- D && /* @__PURE__ */ s(
3479
- mn,
3490
+ L && /* @__PURE__ */ s(
3491
+ hn,
3480
3492
  {
3481
3493
  MessageBouncePrompt: F,
3482
- onClose: () => L(!1),
3483
- open: D
3494
+ onClose: () => D(!1),
3495
+ open: L
3484
3496
  }
3485
3497
  ),
3486
3498
  /* @__PURE__ */ m(
3487
3499
  "div",
3488
3500
  {
3489
- className: Bs,
3501
+ className: Us,
3490
3502
  "data-message-id": c.id,
3491
3503
  "data-dd-privacy": "mask",
3492
3504
  children: [
3493
3505
  R && /* @__PURE__ */ s(R, {}),
3494
3506
  !!O && /* @__PURE__ */ s(X, { reminder: O }),
3495
3507
  c.user && /* @__PURE__ */ s(
3496
- se,
3508
+ ne,
3497
3509
  {
3498
3510
  className: "str-chat__avatar str-chat__message-sender-avatar",
3499
3511
  id: c.user.id,
@@ -3508,7 +3520,7 @@ const xi = ({
3508
3520
  "div",
3509
3521
  {
3510
3522
  className: k("str-chat__message-inner", {
3511
- "str-chat__simple-message--error-failed": ie || Ct
3523
+ "str-chat__simple-message--error-failed": ie || St
3512
3524
  }),
3513
3525
  "data-testid": "message-inner",
3514
3526
  onClick: he,
@@ -3521,32 +3533,32 @@ const xi = ({
3521
3533
  marginInlineEnd: 0,
3522
3534
  marginInlineStart: 0
3523
3535
  },
3524
- children: Et ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3536
+ children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3525
3537
  fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3526
3538
  I && /* @__PURE__ */ s(I, {}),
3527
3539
  /* @__PURE__ */ s(
3528
- Jt.Sent,
3540
+ Zt.Sent,
3529
3541
  {
3530
- title: (Mt = c.metadata) == null ? void 0 : Mt.attachment_title,
3531
- mimeType: (Rt = c.metadata) == null ? void 0 : Rt.attachment_mime_type,
3542
+ title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3543
+ mimeType: (Dt = c.metadata) == null ? void 0 : Dt.attachment_mime_type,
3532
3544
  thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3533
- amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
3534
- detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
3535
- paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
3545
+ amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3546
+ detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3547
+ paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3536
3548
  onPreviewClick: () => S == null ? void 0 : S(c, x),
3537
3549
  onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3538
3550
  }
3539
3551
  )
3540
3552
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3541
3553
  /* @__PURE__ */ s(
3542
- Jt.Received,
3554
+ Zt.Received,
3543
3555
  {
3544
- title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
3545
- mimeType: (Ot = c.metadata) == null ? void 0 : Ot.attachment_mime_type,
3546
- thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
3547
- amountText: (jt = c.metadata) == null ? void 0 : jt.amount_text,
3548
- detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
3549
- paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
3556
+ title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
3557
+ mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
3558
+ thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
3559
+ amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
3560
+ detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
3561
+ paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3550
3562
  isUnlocking: N(c.id),
3551
3563
  onUnlockClick: () => S == null ? void 0 : S(c, x),
3552
3564
  onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
@@ -3556,16 +3568,16 @@ const xi = ({
3556
3568
  I && /* @__PURE__ */ s(I, {})
3557
3569
  ] }),
3558
3570
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3559
- Yt,
3571
+ qt,
3560
3572
  {
3561
3573
  message: Z,
3562
3574
  renderText: v
3563
3575
  }
3564
3576
  ) })
3565
- ] }) : St ? (
3577
+ ] }) : Et ? (
3566
3578
  /* Tip-only messages render as a standalone bubble */
3567
3579
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3568
- ) : Us ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3580
+ ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3569
3581
  "div",
3570
3582
  {
3571
3583
  className: "str-chat__message-bubble",
@@ -3579,7 +3591,7 @@ const xi = ({
3579
3591
  /* @__PURE__ */ s(
3580
3592
  xi,
3581
3593
  {
3582
- groupPosition: De,
3594
+ groupPosition: Le,
3583
3595
  isMyMessage: fe,
3584
3596
  message: {
3585
3597
  attachments: j,
@@ -3587,11 +3599,11 @@ const xi = ({
3587
3599
  }
3588
3600
  }
3589
3601
  ),
3590
- /* @__PURE__ */ s(qt, {})
3602
+ /* @__PURE__ */ s(Wt, {})
3591
3603
  ]
3592
3604
  }
3593
3605
  ) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3594
- ge && !It && /* @__PURE__ */ s(
3606
+ ge && !Tt && /* @__PURE__ */ s(
3595
3607
  Ke,
3596
3608
  {
3597
3609
  message: c,
@@ -3599,7 +3611,7 @@ const xi = ({
3599
3611
  isMyMessage: fe
3600
3612
  }
3601
3613
  ),
3602
- Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
3614
+ Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3603
3615
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3604
3616
  E,
3605
3617
  {
@@ -3614,18 +3626,18 @@ const xi = ({
3614
3626
  renderText: v
3615
3627
  }
3616
3628
  ) : /* @__PURE__ */ s(
3617
- Yt,
3629
+ qt,
3618
3630
  {
3619
3631
  message: Z,
3620
3632
  renderText: v
3621
3633
  }
3622
3634
  ),
3623
- /* @__PURE__ */ s(qt, {})
3635
+ /* @__PURE__ */ s(Wt, {})
3624
3636
  ] }) })
3625
3637
  }
3626
3638
  ),
3627
- !Et && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3628
- (!ge || It) && /* @__PURE__ */ s(
3639
+ !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3640
+ (!ge || Tt) && /* @__PURE__ */ s(
3629
3641
  Ke,
3630
3642
  {
3631
3643
  message: c,
@@ -3634,7 +3646,7 @@ const xi = ({
3634
3646
  }
3635
3647
  ),
3636
3648
  n && ge && /* @__PURE__ */ s(
3637
- Yr,
3649
+ qr,
3638
3650
  {
3639
3651
  selected: z,
3640
3652
  onVoteUp: y,
@@ -3643,14 +3655,14 @@ const xi = ({
3643
3655
  )
3644
3656
  ] }),
3645
3657
  /* @__PURE__ */ s(Xr, {}),
3646
- ne && /* @__PURE__ */ s(
3658
+ ae && /* @__PURE__ */ s(
3647
3659
  te,
3648
3660
  {
3649
3661
  onClick: d,
3650
3662
  reply_count: c.reply_count
3651
3663
  }
3652
3664
  ),
3653
- ce && /* @__PURE__ */ s(Q, {})
3665
+ ue && /* @__PURE__ */ s(Q, {})
3654
3666
  ]
3655
3667
  },
3656
3668
  c.id
@@ -3658,43 +3670,40 @@ const xi = ({
3658
3670
  ] });
3659
3671
  }, _i = U.memo(
3660
3672
  wi,
3661
- (e, t) => {
3662
- var n, a;
3663
- return e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || ((n = e.lastOwnMessage) == null ? void 0 : n.id) !== ((a = t.lastOwnMessage) == null ? void 0 : a.id) ? !1 : Xs(e, t);
3664
- }
3673
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3665
3674
  ), Ni = (e) => {
3666
- const t = Ie("CustomMessage");
3675
+ const t = _e("CustomMessage");
3667
3676
  return /* @__PURE__ */ s(_i, { ...t, ...e });
3668
3677
  }, yi = () => {
3669
3678
  var n;
3670
- const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3679
+ const { handleDelete: e, message: t } = _e("CustomMessageActions");
3671
3680
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3672
- cs,
3681
+ ds,
3673
3682
  {
3674
3683
  onClick: e,
3675
3684
  "aria-label": "Delete",
3676
3685
  title: "Delete",
3677
3686
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3678
- children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3687
+ children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3679
3688
  }
3680
3689
  );
3681
3690
  }, ki = () => {
3682
- const { handleFlag: e } = Ie("CustomMessageActions");
3691
+ const { handleFlag: e } = _e("CustomMessageActions");
3683
3692
  return /* @__PURE__ */ s(
3684
- cs,
3693
+ ds,
3685
3694
  {
3686
3695
  onClick: e,
3687
3696
  "aria-label": "Report",
3688
3697
  title: "Report",
3689
3698
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3690
- children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
3699
+ children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3691
3700
  }
3692
3701
  );
3693
3702
  }, Ci = () => {
3694
3703
  var t;
3695
- const { message: e } = Ie("CustomMessageActions");
3704
+ const { message: e } = _e("CustomMessageActions");
3696
3705
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3697
- ea,
3706
+ ta,
3698
3707
  {
3699
3708
  messageActionSet: [
3700
3709
  { Component: yi, placement: "quick", type: "delete" },
@@ -3744,10 +3753,10 @@ const xi = ({
3744
3753
  );
3745
3754
  }, Ei = (e) => ({
3746
3755
  linkPreviews: Array.from(e.previews.values()).filter(
3747
- (t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
3756
+ (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3748
3757
  )
3749
3758
  }), Ii = () => {
3750
- const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3759
+ const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3751
3760
  e.state,
3752
3761
  Ei
3753
3762
  ), n = (r) => {
@@ -3764,7 +3773,7 @@ const xi = ({
3764
3773
  // fixed-height hero would spill out of the collapsed card box.
3765
3774
  /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3766
3775
  ) : null;
3767
- }, kt = U.createContext(!1), hl = () => Ee(kt), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3776
+ }, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3768
3777
  "button",
3769
3778
  {
3770
3779
  ...n,
@@ -3772,13 +3781,13 @@ const xi = ({
3772
3781
  "aria-label": "Send",
3773
3782
  disabled: t,
3774
3783
  onClick: e,
3775
- children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3784
+ children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3776
3785
  }
3777
3786
  ), Ai = () => {
3778
- const e = Ee(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3787
+ const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3779
3788
  SendButton: r = Ti,
3780
- AttachmentPreviewList: i = xn
3781
- } = rs("CustomMessageInput");
3789
+ AttachmentPreviewList: i = wn
3790
+ } = is("CustomMessageInput");
3782
3791
  return (
3783
3792
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
3784
3793
  // preview list inside is the scrollable region); the textarea + send row
@@ -3794,12 +3803,12 @@ const xi = ({
3794
3803
  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)]",
3795
3804
  "data-dd-privacy": "mask",
3796
3805
  children: [
3797
- /* @__PURE__ */ s(wn, {}),
3806
+ /* @__PURE__ */ s(_n, {}),
3798
3807
  /* @__PURE__ */ s(Ii, {}),
3799
3808
  /* @__PURE__ */ s(i, {}),
3800
3809
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3801
3810
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3802
- _n,
3811
+ Nn,
3803
3812
  {
3804
3813
  "aria-disabled": e || void 0,
3805
3814
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3833,7 +3842,7 @@ const xi = ({
3833
3842
  composerInput: r
3834
3843
  }) => {
3835
3844
  var o;
3836
- const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3845
+ const { channel: i } = le(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3837
3846
  return n ? /* @__PURE__ */ m(ee, { children: [
3838
3847
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3839
3848
  t == null ? void 0 : t()
@@ -3846,7 +3855,7 @@ const xi = ({
3846
3855
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3847
3856
  children: [
3848
3857
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3849
- /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ai }) })
3858
+ /* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3850
3859
  ]
3851
3860
  }
3852
3861
  ),
@@ -3855,17 +3864,17 @@ const xi = ({
3855
3864
  }, Ri = [
3856
3865
  "SYSTEM_DM_AGENT_PAUSED",
3857
3866
  "SYSTEM_DM_AGENT_RESUMED"
3858
- ], Li = {
3867
+ ], Di = {
3859
3868
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3860
3869
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3861
- }, Di = [
3870
+ }, Li = [
3862
3871
  "SYSTEM_AGE_SAFETY_BLOCKED"
3863
3872
  ], zi = {
3864
3873
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3865
- }, Je = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", ns = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
3874
+ }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Li.includes(e), Oi = (e) => {
3866
3875
  var a;
3867
3876
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3868
- if (ns(t))
3877
+ if (as(t))
3869
3878
  return {
3870
3879
  kind: "dm-agent",
3871
3880
  type: t
@@ -3876,16 +3885,16 @@ const xi = ({
3876
3885
  type: t
3877
3886
  };
3878
3887
  const n = e.dm_agent_system_type;
3879
- if (ns(n))
3888
+ if (as(n))
3880
3889
  return {
3881
3890
  kind: "dm-agent",
3882
3891
  type: n
3883
3892
  };
3884
3893
  }, $i = (e) => {
3885
- const t = e.indexOf(Je);
3894
+ const t = e.indexOf(Ze);
3886
3895
  if (t === -1)
3887
3896
  return e;
3888
- const n = t + Je.length;
3897
+ const n = t + Ze.length;
3889
3898
  return /* @__PURE__ */ m(ee, { children: [
3890
3899
  e.slice(0, t),
3891
3900
  /* @__PURE__ */ s(
@@ -3895,7 +3904,7 @@ const xi = ({
3895
3904
  target: "_blank",
3896
3905
  rel: "noopener noreferrer",
3897
3906
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
3898
- children: Je
3907
+ children: Ze
3899
3908
  }
3900
3909
  ),
3901
3910
  e.slice(n)
@@ -3906,7 +3915,7 @@ const xi = ({
3906
3915
  e.message
3907
3916
  );
3908
3917
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3909
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Li[n.type];
3918
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Di[n.type];
3910
3919
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3911
3920
  /* @__PURE__ */ m(
3912
3921
  "div",
@@ -3942,7 +3951,7 @@ const xi = ({
3942
3951
  "data-age-safety-system-type": n.type,
3943
3952
  children: [
3944
3953
  /* @__PURE__ */ s(
3945
- Qn,
3954
+ ea,
3946
3955
  {
3947
3956
  size: 24,
3948
3957
  weight: "duotone",
@@ -3966,7 +3975,7 @@ const xi = ({
3966
3975
  ] }),
3967
3976
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3968
3977
  ] });
3969
- }, Fs = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3978
+ }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3970
3979
  "animateTransform",
3971
3980
  {
3972
3981
  attributeName: "transform",
@@ -3982,11 +3991,11 @@ const xi = ({
3982
3991
  qe.ExternalSources
3983
3992
  ]), Ui = ({ threadList: e }) => {
3984
3993
  var v, w;
3985
- const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Ee(Fs);
3994
+ const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
3986
3995
  if (!e && o && Bi.has(l)) {
3987
3996
  const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
3988
3997
  return /* @__PURE__ */ s(
3989
- as,
3998
+ rs,
3990
3999
  {
3991
4000
  avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
3992
4001
  avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
@@ -4012,7 +4021,7 @@ const xi = ({
4012
4021
  return null;
4013
4022
  const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4014
4023
  return /* @__PURE__ */ s(
4015
- as,
4024
+ rs,
4016
4025
  {
4017
4026
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4018
4027
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4020,7 +4029,7 @@ const xi = ({
4020
4029
  testId: "typing-indicator"
4021
4030
  }
4022
4031
  );
4023
- }, as = ({
4032
+ }, rs = ({
4024
4033
  avatarId: e,
4025
4034
  avatarName: t,
4026
4035
  avatarImage: n,
@@ -4035,7 +4044,7 @@ const xi = ({
4035
4044
  },
4036
4045
  children: /* @__PURE__ */ m("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4037
4046
  /* @__PURE__ */ s(
4038
- se,
4047
+ ne,
4039
4048
  {
4040
4049
  className: "str-chat__avatar str-chat__message-sender-avatar",
4041
4050
  id: e,
@@ -4055,9 +4064,9 @@ const xi = ({
4055
4064
  height: "13",
4056
4065
  overflow: "visible",
4057
4066
  children: [
4058
- /* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
4059
- /* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
4060
- /* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
4067
+ /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4068
+ /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4069
+ /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4061
4070
  ]
4062
4071
  }
4063
4072
  ) }) }) }) }) })
@@ -4141,7 +4150,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4141
4150
  renderHeaderTitleBadges: b
4142
4151
  }) => {
4143
4152
  var A, E, C, I, $, F;
4144
- const { channel: f } = ue(), { client: x } = me(), N = U.useMemo(
4153
+ const { channel: f } = le(), { client: x } = oe(), N = U.useMemo(
4145
4154
  () => {
4146
4155
  var V;
4147
4156
  return Ue(
@@ -4151,12 +4160,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4151
4160
  );
4152
4161
  },
4153
4162
  [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4154
- ), S = ot(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = lt(f), D = b == null ? void 0 : b({
4163
+ ), S = ct(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = ot(f), L = b == null ? void 0 : b({
4155
4164
  channel: f,
4156
4165
  participant: N
4157
- }), L = "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", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(ee, { children: [
4166
+ }), D = "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", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(ee, { children: [
4158
4167
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
4159
- D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4168
+ L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4160
4169
  ] }), y = async () => {
4161
4170
  try {
4162
4171
  M ? await f.unpin() : await f.pin();
@@ -4180,7 +4189,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4180
4189
  }),
4181
4190
  type: "button",
4182
4191
  "aria-label": "Back to conversations",
4183
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4192
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4184
4193
  }
4185
4194
  ) }),
4186
4195
  /* @__PURE__ */ s(
@@ -4195,12 +4204,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4195
4204
  onClick: w,
4196
4205
  "aria-label": `View details for ${S}`,
4197
4206
  className: k(
4198
- L,
4207
+ D,
4199
4208
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4200
4209
  ),
4201
4210
  children: [
4202
4211
  /* @__PURE__ */ s(
4203
- se,
4212
+ ne,
4204
4213
  {
4205
4214
  id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
4206
4215
  name: S,
@@ -4220,9 +4229,9 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4220
4229
  ] })
4221
4230
  ]
4222
4231
  }
4223
- ) : /* @__PURE__ */ m("div", { className: L, children: [
4232
+ ) : /* @__PURE__ */ m("div", { className: D, children: [
4224
4233
  /* @__PURE__ */ s(
4225
- se,
4234
+ ne,
4226
4235
  {
4227
4236
  id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
4228
4237
  name: S,
@@ -4258,7 +4267,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4258
4267
  type: "button",
4259
4268
  "aria-label": M ? "Unstar conversation" : "Star conversation",
4260
4269
  children: /* @__PURE__ */ s(
4261
- Se,
4270
+ Ee,
4262
4271
  {
4263
4272
  className: k("size-5", {
4264
4273
  "text-yellow-600": M,
@@ -4270,7 +4279,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4270
4279
  }
4271
4280
  ),
4272
4281
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
4273
- tt,
4282
+ st,
4274
4283
  {
4275
4284
  channel: f,
4276
4285
  participant: N,
@@ -4300,7 +4309,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4300
4309
  type: "button",
4301
4310
  onClick: e,
4302
4311
  "aria-label": "Back to conversations",
4303
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4312
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4304
4313
  }
4305
4314
  ),
4306
4315
  w ? /* @__PURE__ */ m(
@@ -4315,7 +4324,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4315
4324
  ),
4316
4325
  children: [
4317
4326
  /* @__PURE__ */ s(
4318
- se,
4327
+ ne,
4319
4328
  {
4320
4329
  id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
4321
4330
  name: S,
@@ -4339,7 +4348,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4339
4348
  }
4340
4349
  ) : /* @__PURE__ */ m("div", { className: O, children: [
4341
4350
  /* @__PURE__ */ s(
4342
- se,
4351
+ ne,
4343
4352
  {
4344
4353
  id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
4345
4354
  name: S,
@@ -4376,7 +4385,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4376
4385
  type: "button",
4377
4386
  "aria-label": M ? "Unstar conversation" : "Star conversation",
4378
4387
  children: /* @__PURE__ */ s(
4379
- Se,
4388
+ Ee,
4380
4389
  {
4381
4390
  className: k("size-6", {
4382
4391
  "text-yellow-600": M,
@@ -4388,7 +4397,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4388
4397
  }
4389
4398
  ),
4390
4399
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
4391
- tt,
4400
+ st,
4392
4401
  {
4393
4402
  channel: f,
4394
4403
  participant: N,
@@ -4431,13 +4440,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4431
4440
  renderChannelActions: S,
4432
4441
  renderMessage: T,
4433
4442
  dmAgentEnabled: M = !1,
4434
- viewerLanguage: D,
4435
- showChannelInfo: L = !0,
4443
+ viewerLanguage: L,
4444
+ showChannelInfo: D = !0,
4436
4445
  onParticipantNameClick: O,
4437
4446
  composerInput: z
4438
4447
  }) => {
4439
4448
  var _, R, H, q;
4440
- const { channel: y } = ue(), { client: A } = me(), E = U.useMemo(
4449
+ const { channel: y } = le(), { client: A } = oe(), E = U.useMemo(
4441
4450
  () => {
4442
4451
  var Y;
4443
4452
  return Ue(
@@ -4451,17 +4460,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4451
4460
  var W;
4452
4461
  const Y = A == null ? void 0 : A.userID;
4453
4462
  return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Z) => {
4454
- var oe;
4455
- return ((oe = Z.user) == null ? void 0 : oe.id) === Y;
4463
+ var de;
4464
+ return ((de = Z.user) == null ? void 0 : de.id) === Y;
4456
4465
  }) : void 0;
4457
4466
  }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = E == null ? void 0 : E.user) == null ? void 0 : q.is_account) ?? (E == null ? void 0 : E.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4458
4467
  (Y) => Y.type !== "deleted"
4459
4468
  ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
4460
- ga,
4469
+ pa,
4461
4470
  {
4462
4471
  onBack: e,
4463
4472
  showBackButton: t,
4464
- showChannelInfo: L,
4473
+ showChannelInfo: D,
4465
4474
  showStarButton: w,
4466
4475
  dmAgentEnabled: F,
4467
4476
  onLeaveConversation: i,
@@ -4478,33 +4487,33 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4478
4487
  }
4479
4488
  ) : null, X = J(
4480
4489
  (Y) => {
4481
- const { message: j } = Ie("ChannelView"), W = /* @__PURE__ */ s(
4490
+ const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
4482
4491
  Ni,
4483
4492
  {
4484
4493
  ...Y,
4485
4494
  chatbotVotingEnabled: b,
4486
- viewerLanguage: D
4495
+ viewerLanguage: L
4487
4496
  }
4488
4497
  );
4489
4498
  return !T || !j ? W : T(W, j);
4490
4499
  },
4491
- [b, T, D]
4500
+ [b, T, L]
4492
4501
  );
4493
4502
  return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4494
- Cn,
4503
+ Sn,
4495
4504
  {
4496
4505
  overrides: {
4497
4506
  Message: X,
4498
4507
  MessageActions: Ci
4499
4508
  },
4500
- children: /* @__PURE__ */ m(Sn, { children: [
4509
+ children: /* @__PURE__ */ m(En, { children: [
4501
4510
  !O && /* @__PURE__ */ m(ee, { children: [
4502
4511
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4503
4512
  Yi,
4504
4513
  {
4505
4514
  onBack: e,
4506
4515
  showBackButton: t,
4507
- showChannelInfo: L,
4516
+ showChannelInfo: D,
4508
4517
  showStarButton: w,
4509
4518
  dmAgentEnabled: F,
4510
4519
  onLeaveConversation: i,
@@ -4531,7 +4540,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4531
4540
  {
4532
4541
  className: "flex-1 overflow-hidden relative",
4533
4542
  children: /* @__PURE__ */ s(
4534
- En,
4543
+ In,
4535
4544
  {
4536
4545
  head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4537
4546
  te,
@@ -4561,7 +4570,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4561
4570
  ] })
4562
4571
  }
4563
4572
  ) });
4564
- }, Os = U.memo(
4573
+ }, $s = U.memo(
4565
4574
  ({
4566
4575
  channel: e,
4567
4576
  onBack: t,
@@ -4586,8 +4595,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4586
4595
  onMessageSent: S,
4587
4596
  showStarButton: T = !1,
4588
4597
  chatbotVotingEnabled: M = !1,
4589
- renderChannelBanner: D,
4590
- renderHeaderTitleBadges: L,
4598
+ renderChannelBanner: L,
4599
+ renderHeaderTitleBadges: D,
4591
4600
  customChannelActions: O,
4592
4601
  renderChannelActions: z,
4593
4602
  renderMessage: y,
@@ -4626,7 +4635,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4626
4635
  const _ = (R) => {
4627
4636
  const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4628
4637
  if (!Y) return;
4629
- const j = q == null ? void 0 : q.closest("[data-message-id]"), W = j == null ? void 0 : j.getAttribute("data-message-id"), Z = W ? e.state.messages.find((oe) => oe.id === W) : void 0;
4638
+ const j = q == null ? void 0 : q.closest("[data-message-id]"), W = j == null ? void 0 : j.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
4630
4639
  A(Y, Z);
4631
4640
  };
4632
4641
  return X.addEventListener("click", _), () => X.removeEventListener("click", _);
@@ -4638,14 +4647,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4638
4647
  "messaging-channel-view h-full flex flex-col",
4639
4648
  d
4640
4649
  ),
4641
- children: /* @__PURE__ */ s(Fs.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4642
- kn,
4650
+ children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4651
+ Cn,
4643
4652
  {
4644
4653
  channel: e,
4645
4654
  MessageSystem: ji,
4646
4655
  EmptyStateIndicator: u,
4647
4656
  LoadingIndicator: je,
4648
- DateSeparator: pa,
4657
+ DateSeparator: ba,
4649
4658
  TypingIndicator: Ui,
4650
4659
  doSendMessageRequest: Q,
4651
4660
  ...E ? { SendButton: E } : {},
@@ -4672,8 +4681,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4672
4681
  showStarButton: T,
4673
4682
  dmAgentEnabled: x,
4674
4683
  chatbotVotingEnabled: M,
4675
- renderChannelBanner: D,
4676
- renderHeaderTitleBadges: L,
4684
+ renderChannelBanner: L,
4685
+ renderHeaderTitleBadges: D,
4677
4686
  customChannelActions: O,
4678
4687
  renderChannelActions: z,
4679
4688
  renderMessage: y,
@@ -4689,8 +4698,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4689
4698
  );
4690
4699
  }
4691
4700
  );
4692
- Os.displayName = "ChannelView";
4693
- const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4701
+ $s.displayName = "ChannelView";
4702
+ const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4694
4703
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4695
4704
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4696
4705
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4704,7 +4713,7 @@ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4704
4713
  }
4705
4714
  )
4706
4715
  ] }) }));
4707
- ye.displayName = "ErrorState";
4716
+ ke.displayName = "ErrorState";
4708
4717
  const fl = ({
4709
4718
  capabilities: e = {},
4710
4719
  renderMessageInputActions: t,
@@ -4731,14 +4740,14 @@ const fl = ({
4731
4740
  composerInput: M
4732
4741
  }) => {
4733
4742
  const {
4734
- client: D,
4735
- isConnected: L,
4743
+ client: L,
4744
+ isConnected: D,
4736
4745
  isLoading: O,
4737
4746
  error: z,
4738
4747
  refreshConnection: y,
4739
4748
  service: A,
4740
4749
  debug: E
4741
- } = ta(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4750
+ } = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4742
4751
  X.current = l;
4743
4752
  const _ = G(a);
4744
4753
  _.current = a;
@@ -4746,8 +4755,8 @@ const fl = ({
4746
4755
  K(() => {
4747
4756
  H.current = C;
4748
4757
  }, [C]), K(() => {
4749
- if (!D || !L) return;
4750
- const j = D.userID;
4758
+ if (!L || !D) return;
4759
+ const j = L.userID;
4751
4760
  if (!j) return;
4752
4761
  const W = `${j}::${i}`;
4753
4762
  if (R.current === W) return;
@@ -4756,13 +4765,13 @@ const fl = ({
4756
4765
  R.current === W && (R.current = null);
4757
4766
  };
4758
4767
  (async () => {
4759
- var Le, De;
4768
+ var De, Le;
4760
4769
  try {
4761
4770
  E && console.log(
4762
4771
  "[MessagingShell] Loading initial conversation with:",
4763
4772
  i
4764
4773
  );
4765
- const ne = await D.queryChannels(
4774
+ const ae = await L.queryChannels(
4766
4775
  {
4767
4776
  type: "messaging",
4768
4777
  members: { $eq: [j, i] }
@@ -4770,15 +4779,15 @@ const fl = ({
4770
4779
  {},
4771
4780
  { limit: 1 }
4772
4781
  );
4773
- if (ne.length > 0) {
4774
- I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]), E && console.log(
4782
+ if (ae.length > 0) {
4783
+ I(ae[0]), F(null), (De = _.current) == null || De.call(_, ae[0]), E && console.log(
4775
4784
  "[MessagingShell] Initial conversation loaded:",
4776
- ne[0].id
4785
+ ae[0].id
4777
4786
  );
4778
4787
  return;
4779
4788
  }
4780
- const ce = X.current;
4781
- if (!ce || !A) {
4789
+ const ue = X.current;
4790
+ if (!ue || !A) {
4782
4791
  Z(), F("No conversation found with this account"), E && console.log(
4783
4792
  "[MessagingShell] No conversation found for:",
4784
4793
  i
@@ -4787,11 +4796,11 @@ const fl = ({
4787
4796
  }
4788
4797
  try {
4789
4798
  const ie = await A.startChannelWithParticipant({
4790
- id: ce.id,
4791
- name: ce.name,
4792
- phone: ce.phone
4799
+ id: ue.id,
4800
+ name: ue.name,
4801
+ phone: ue.phone
4793
4802
  });
4794
- I(ie), F(null), (De = _.current) == null || De.call(_, ie), E && console.log(
4803
+ I(ie), F(null), (Le = _.current) == null || Le.call(_, ie), E && console.log(
4795
4804
  "[MessagingShell] Channel created and loaded:",
4796
4805
  ie.id
4797
4806
  );
@@ -4801,28 +4810,28 @@ const fl = ({
4801
4810
  ie
4802
4811
  ), Z(), F("Failed to create conversation");
4803
4812
  }
4804
- } catch (ne) {
4813
+ } catch (ae) {
4805
4814
  console.error(
4806
4815
  "[MessagingShell] Failed to load initial conversation:",
4807
- ne
4816
+ ae
4808
4817
  ), Z(), H.current || F("Failed to load conversation");
4809
4818
  }
4810
4819
  })();
4811
- }, [i, D, L, A, E]);
4820
+ }, [i, L, D, A, E]);
4812
4821
  const q = G(r);
4813
4822
  q.current = r;
4814
4823
  const Y = J(() => {
4815
4824
  var j;
4816
4825
  I(null), Q(!0), (j = q.current) == null || j.call(q);
4817
4826
  }, []);
4818
- return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4819
- ye,
4827
+ return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4828
+ ke,
4820
4829
  {
4821
4830
  message: "Not connected to messaging service",
4822
4831
  onBack: y
4823
4832
  }
4824
- ) : $ ? /* @__PURE__ */ s(ye, { message: $ }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4825
- Os,
4833
+ ) : $ ? /* @__PURE__ */ s(ke, { message: $ }) : V && !C ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4834
+ $s,
4826
4835
  {
4827
4836
  channel: C,
4828
4837
  renderMessageInputActions: t,
@@ -4856,7 +4865,7 @@ function Wi(e) {
4856
4865
  for (const n of t)
4857
4866
  e.state.addMessageSorted(n.message);
4858
4867
  }
4859
- const $s = U.createContext({
4868
+ const js = U.createContext({
4860
4869
  selectedChannel: void 0,
4861
4870
  onChannelSelect: () => {
4862
4871
  },
@@ -4864,7 +4873,7 @@ const $s = U.createContext({
4864
4873
  renderMessagePreview: void 0,
4865
4874
  channelPreview: void 0,
4866
4875
  viewerLanguage: void 0
4867
- }), Xi = $s.Provider, Ki = () => U.useContext($s), Ji = (e, t) => {
4876
+ }), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
4868
4877
  const n = new Date(
4869
4878
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4870
4879
  ), r = new Date(
@@ -4885,9 +4894,9 @@ const $s = U.createContext({
4885
4894
  day: "numeric",
4886
4895
  year: "2-digit"
4887
4896
  });
4888
- }, js = U.memo(
4897
+ }, Bs = U.memo(
4889
4898
  (e) => {
4890
- var L, O, z;
4899
+ var D, O, z;
4891
4900
  const { channel: t, unread: n } = e, {
4892
4901
  selectedChannel: a,
4893
4902
  onChannelSelect: r,
@@ -4895,7 +4904,7 @@ const $s = U.createContext({
4895
4904
  channelPreview: l,
4896
4905
  renderMessagePreview: o,
4897
4906
  viewerLanguage: d
4898
- } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4907
+ } = Ki(), { client: u } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4899
4908
  if (l)
4900
4909
  return /* @__PURE__ */ s(
4901
4910
  l,
@@ -4913,10 +4922,10 @@ const $s = U.createContext({
4913
4922
  const A = y.key === "Enter" || y.key === " ", E = y.repeat;
4914
4923
  !A || E || (y.preventDefault(), g());
4915
4924
  }, v = Ue(
4916
- (L = t == null ? void 0 : t.state) == null ? void 0 : L.members,
4925
+ (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
4917
4926
  u == null ? void 0 : u.userID,
4918
4927
  t == null ? void 0 : t.type
4919
- ), w = ot(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4928
+ ), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4920
4929
  var A;
4921
4930
  const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4922
4931
  if (y != null && y.length) {
@@ -4925,7 +4934,7 @@ const $s = U.createContext({
4925
4934
  }
4926
4935
  })(), N = (() => {
4927
4936
  var $, F, V, Q;
4928
- const y = ms({
4937
+ const y = hs({
4929
4938
  message: f,
4930
4939
  viewerLanguage: d
4931
4940
  });
@@ -4936,12 +4945,12 @@ const $s = U.createContext({
4936
4945
  if (y) return y;
4937
4946
  const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
4938
4947
  return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4939
- })(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
4948
+ })(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
4940
4949
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4941
4950
  channelId: t == null ? void 0 : t.id,
4942
4951
  isSelected: p,
4943
4952
  participantName: w,
4944
- unreadCount: D,
4953
+ unreadCount: L,
4945
4954
  hasTimestamp: !!S
4946
4955
  }), /* @__PURE__ */ s(
4947
4956
  "div",
@@ -4960,7 +4969,7 @@ const $s = U.createContext({
4960
4969
  "data-dd-privacy": "mask",
4961
4970
  children: /* @__PURE__ */ m("div", { className: "flex items-start gap-4", children: [
4962
4971
  /* @__PURE__ */ s(
4963
- se,
4972
+ ne,
4964
4973
  {
4965
4974
  id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
4966
4975
  name: w,
@@ -4987,7 +4996,7 @@ const $s = U.createContext({
4987
4996
  ] }),
4988
4997
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
4989
4998
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
4990
- D > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: D > 99 ? "99+" : D })
4999
+ L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
4991
5000
  ] })
4992
5001
  ] })
4993
5002
  ] })
@@ -4995,7 +5004,7 @@ const $s = U.createContext({
4995
5004
  );
4996
5005
  }
4997
5006
  );
4998
- js.displayName = "CustomChannelPreview";
5007
+ Bs.displayName = "CustomChannelPreview";
4999
5008
  const Qi = { last_message_at: -1 }, el = U.memo(
5000
5009
  ({
5001
5010
  onChannelSelect: e,
@@ -5006,14 +5015,14 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5006
5015
  sort: i = Qi,
5007
5016
  className: l,
5008
5017
  customEmptyStateIndicator: o,
5009
- channelListPaginator: d = Tn,
5018
+ channelListPaginator: d = An,
5010
5019
  channelPreview: u,
5011
5020
  renderMessagePreview: p,
5012
5021
  viewerLanguage: h
5013
5022
  }) => {
5014
5023
  const g = U.useRef(0);
5015
5024
  g.current++;
5016
- const { debug: c = !1 } = it(), v = U.useCallback(
5025
+ const { debug: c = !1 } = lt(), v = U.useCallback(
5017
5026
  (b) => {
5018
5027
  for (const f of b)
5019
5028
  Wi(f);
@@ -5052,7 +5061,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5052
5061
  l
5053
5062
  ),
5054
5063
  children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5055
- In,
5064
+ Tn,
5056
5065
  {
5057
5066
  filters: n,
5058
5067
  sort: i,
@@ -5060,7 +5069,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5060
5069
  allowNewMessagesFromUnfilteredChannels: a,
5061
5070
  channelRenderFilterFn: v,
5062
5071
  Paginator: d,
5063
- Preview: js,
5072
+ Preview: Bs,
5064
5073
  EmptyStateIndicator: o
5065
5074
  },
5066
5075
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5104,7 +5113,7 @@ const tl = ({
5104
5113
  const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
5105
5114
  return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ m("div", { className: "flex gap-3 items-end", children: [
5106
5115
  (i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5107
- se,
5116
+ ne,
5108
5117
  {
5109
5118
  id: l || "account",
5110
5119
  name: l || "Account",
@@ -5135,40 +5144,40 @@ const tl = ({
5135
5144
  ] }) });
5136
5145
  };
5137
5146
  export {
5138
- ps as A,
5147
+ bs as A,
5139
5148
  hl as B,
5140
5149
  Gi as C,
5141
- jr as D,
5142
- va as E,
5150
+ Br as D,
5151
+ xa as E,
5143
5152
  gl as F,
5144
- ta as G,
5145
- Qt as L,
5153
+ sa as G,
5154
+ es as L,
5146
5155
  ul as M,
5147
- _e as a,
5148
- se as b,
5156
+ Ne as a,
5157
+ ne as b,
5149
5158
  el as c,
5150
- Os as d,
5159
+ $s as d,
5151
5160
  ml as e,
5152
5161
  tl as f,
5153
- le as g,
5154
- Jt as h,
5155
- Ne as i,
5156
- Yr as j,
5162
+ ce as g,
5163
+ Zt as h,
5164
+ ye as i,
5165
+ qr as j,
5157
5166
  dl as k,
5158
5167
  fl as l,
5159
- ar as m,
5160
- tr as n,
5168
+ rr as m,
5169
+ sr as n,
5161
5170
  Zi as o,
5162
- nr as p,
5163
- ms as q,
5171
+ ar as p,
5172
+ hs as q,
5164
5173
  we as r,
5165
- xs as s,
5166
- ra as t,
5167
- Wa as u,
5168
- xa as v,
5174
+ ws as s,
5175
+ ia as t,
5176
+ Xa as u,
5177
+ wa as v,
5169
5178
  Ue as w,
5170
- mt as x,
5171
- ht as y,
5172
- ot as z
5179
+ ht as x,
5180
+ ft as y,
5181
+ ct as z
5173
5182
  };
5174
- //# sourceMappingURL=index-DaF1G1q2.js.map
5183
+ //# sourceMappingURL=index-wFe1UO9t.js.map