@linktr.ee/messaging-react 4.1.0 → 4.1.1-rc-1786771192

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 (54) hide show
  1. package/dist/Card-Be81K6su.cjs +2 -0
  2. package/dist/{Card-415OfRhw.cjs.map → Card-Be81K6su.cjs.map} +1 -1
  3. package/dist/Card-Bxat0g1O.cjs +2 -0
  4. package/dist/Card-Bxat0g1O.cjs.map +1 -0
  5. package/dist/{Card-DaJtDL7m.js → Card-BzvDr-pU.js} +2 -2
  6. package/dist/{Card-DaJtDL7m.js.map → Card-BzvDr-pU.js.map} +1 -1
  7. package/dist/{Card-LPAZ4FjL.js → Card-xYcNcZC_.js} +3 -3
  8. package/dist/Card-xYcNcZC_.js.map +1 -0
  9. package/dist/PurchaseStatusBadge-BmqAQEV9.cjs +2 -0
  10. package/dist/PurchaseStatusBadge-BmqAQEV9.cjs.map +1 -0
  11. package/dist/{LoadingDots-Ct3WmVlT.js → PurchaseStatusBadge-D1RRsubZ.js} +30 -30
  12. package/dist/PurchaseStatusBadge-D1RRsubZ.js.map +1 -0
  13. package/dist/index-CAD8AXBg.cjs +3 -0
  14. package/dist/index-CAD8AXBg.cjs.map +1 -0
  15. package/dist/{index-Cxj0F8aQ.js → index-t0Okjl1p.js} +630 -633
  16. package/dist/index-t0Okjl1p.js.map +1 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/testing.cjs.map +1 -1
  20. package/dist/testing.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/components/AttachmentCard/index.tsx +1 -3
  23. package/src/components/AttachmentCard/utils/icons.ts +2 -2
  24. package/src/components/ChannelActionsMenu/index.tsx +0 -2
  25. package/src/components/CustomMessage/LockedAttachment/components/_shared/LockBadge.tsx +0 -2
  26. package/src/components/CustomMessage/LockedAttachment/index.tsx +0 -1
  27. package/src/components/CustomMessage/MessageTag.tsx +3 -3
  28. package/src/components/CustomMessage/StreamAttachmentMessage.tsx +5 -9
  29. package/src/components/CustomSystemMessage/index.tsx +1 -1
  30. package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +3 -10
  31. package/src/components/MediaMessage/index.tsx +1 -1
  32. package/src/components/MessageAttachment/_shared/triggerDownload.ts +0 -2
  33. package/src/components/MessageAttachment/_shared/useCarousel.ts +0 -2
  34. package/src/components/MessageAttachment/_shared/useViewer.ts +0 -2
  35. package/src/components/MessageAttachment/stories/StoryTable.tsx +1 -1
  36. package/src/stories/mocks.tsx +0 -28
  37. package/src/testing/createMockMessagingClient.ts +4 -8
  38. package/src/testing/createMockStreamChatClient.ts +7 -2
  39. package/src/testing/index.ts +1 -1
  40. package/dist/Card-415OfRhw.cjs +0 -2
  41. package/dist/Card-B5ZGxDcH.cjs +0 -2
  42. package/dist/Card-B5ZGxDcH.cjs.map +0 -1
  43. package/dist/Card-LPAZ4FjL.js.map +0 -1
  44. package/dist/LoadingDots-Ct3WmVlT.js.map +0 -1
  45. package/dist/LoadingDots-D9GGphgM.cjs +0 -2
  46. package/dist/LoadingDots-D9GGphgM.cjs.map +0 -1
  47. package/dist/index-B88BeZjY.cjs +0 -3
  48. package/dist/index-B88BeZjY.cjs.map +0 -1
  49. package/dist/index-Cxj0F8aQ.js.map +0 -1
  50. package/src/components/LinkAttachment/components/Composer/index.ts +0 -2
  51. package/src/components/LinkAttachment/components/Received/index.ts +0 -2
  52. package/src/components/LinkAttachment/components/Sent/index.ts +0 -2
  53. package/src/components/MessageBubble/components/Received/index.ts +0 -1
  54. package/src/components/MessageBubble/components/Sent/index.ts +0 -1
@@ -1,13 +1,13 @@
1
1
  import { jsx as n, jsxs as f, Fragment as K } from "react/jsx-runtime";
2
- import z, { createContext as je, useContext as xe, useCallback as q, useState as B, useRef as H, useEffect as Y, useId as rs, Suspense as is, useMemo as le } from "react";
3
- import { StreamChatService as ls } from "@linktr.ee/messaging-core";
4
- import { StreamChat as os, LinkPreviewsManager as tt } from "stream-chat";
5
- import { Chat as cs, useChannelStateContext as we, useChatContext as He, DateSeparator as ds, useMessageContext as fe, MessageStatus as us, MessageErrorIcon as nt, MessageText as ze, areMessageUIPropsEqual as ms, useMessageReminder as hs, useComponentContext as dn, Attachment as fs, EditMessageModal as gs, MessageBlocked as ps, MessageBouncePrompt as bs, MessageDeleted as vs, MessageIsThreadReplyInChannelButtonIndicator as xs, MessageRepliesCountButton as ws, ReminderNotification as _s, StreamedMessageText as ys, messageHasAttachments as Ns, messageHasReactions as ks, isDateSeparatorMessage as Cs, isMessageBlocked as Ss, isMessageBounced as Es, MessageBounceModal as Is, Poll as Ts, useMessageComposer as As, useStateStore as Rs, MessageInput as Ht, useMessageInputContext as Ls, useMessageComposerHasSendableData as Ms, AttachmentPreviewList as Ds, QuotedMessagePreview as Os, TextareaComposer as Ps, MessageTimestamp as We, AIStates as Xe, useTypingContext as zs, useAIState as Fs, Channel as $s, WithComponents as Bs, Window as Us, MessageList as Vt, ChannelList as js, InfiniteScroll as Hs } from "stream-chat-react";
6
- import { isOfficialChannel as un, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Gt, isAgeSafetySystemType as Gs, resolveRichCardImagePresentation as Ys, selectEnabledFaqs as Ws } from "@linktr.ee/messaging-taxonomy";
2
+ import z, { createContext as je, useContext as xe, useCallback as q, useState as B, useRef as H, useEffect as Y, useId as as, Suspense as rs, useMemo as le } from "react";
3
+ import { StreamChatService as is } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as ls, LinkPreviewsManager as nt } from "stream-chat";
5
+ import { Chat as os, useChannelStateContext as we, useChatContext as He, DateSeparator as cs, useMessageContext as fe, MessageStatus as ds, MessageErrorIcon as st, MessageText as ze, areMessageUIPropsEqual as us, useMessageReminder as ms, useComponentContext as un, Attachment as hs, EditMessageModal as fs, MessageBlocked as gs, MessageBouncePrompt as ps, MessageDeleted as bs, MessageIsThreadReplyInChannelButtonIndicator as vs, MessageRepliesCountButton as xs, ReminderNotification as ws, StreamedMessageText as _s, messageHasAttachments as ys, messageHasReactions as Ns, isDateSeparatorMessage as ks, isMessageBlocked as Cs, isMessageBounced as Ss, MessageBounceModal as Es, Poll as Is, useMessageComposer as Ts, useStateStore as As, MessageInput as Vt, useMessageInputContext as Rs, useMessageComposerHasSendableData as Ls, AttachmentPreviewList as Ms, QuotedMessagePreview as Ds, TextareaComposer as Os, MessageTimestamp as Xe, AIStates as qe, useTypingContext as Ps, useAIState as zs, Channel as Fs, WithComponents as $s, Window as Bs, MessageList as Gt, ChannelList as Us, InfiniteScroll as js } from "stream-chat-react";
6
+ import { isOfficialChannel as mn, OFFICIAL_SENDER_USER_ID as Hs, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Yt, isAgeSafetySystemType as Vs, resolveRichCardImagePresentation as Gs, selectEnabledFaqs as Ys } from "@linktr.ee/messaging-taxonomy";
7
7
  import k from "classnames";
8
- import { StarIcon as st, DotsThreeIcon as Xs, SpinnerGapIcon as Oe, SignOutIcon as qs, ProhibitInsetIcon as Yt, FlagIcon as mn, CurrencyDollarIcon as Ks, CaretRightIcon as hn, ArrowLeftIcon as Zs, FileIcon as fn, ImageIcon as Js, SpeakerHighIcon as Qs, VideoCameraIcon as gn, FileMdIcon as ea, FileTextIcon as ta, FileZipIcon as na, FilePptIcon as sa, FileCsvIcon as aa, FileXlsIcon as ra, FileDocIcon as ia, FilePdfIcon as la, CircleNotchIcon as be, PlayIcon as at, PauseIcon as oa, LinkIcon as ca, DownloadSimpleIcon as Se, GiftIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, XIcon as it, PencilSimpleIcon as fa, CaretLeftIcon as ga, TrashSimpleIcon as pa, ArrowUpIcon as ba, SparkleIcon as va, ProhibitIcon as xa } from "@phosphor-icons/react";
9
- import { MessageActions as wa, DefaultDropdownActionButton as pn } from "stream-chat-react/experimental";
10
- const bn = je({
8
+ import { StarIcon as at, DotsThreeIcon as Ws, SpinnerGapIcon as Oe, SignOutIcon as Xs, ProhibitInsetIcon as Wt, FlagIcon as hn, CurrencyDollarIcon as qs, CaretRightIcon as fn, ArrowLeftIcon as Ks, FileIcon as gn, ImageIcon as Zs, SpeakerHighIcon as Js, VideoCameraIcon as pn, FileMdIcon as Qs, FileTextIcon as ea, FileZipIcon as ta, FilePptIcon as na, FileCsvIcon as sa, FileXlsIcon as aa, FileDocIcon as ra, FilePdfIcon as ia, CircleNotchIcon as be, PlayIcon as rt, PauseIcon as la, LinkIcon as oa, DownloadSimpleIcon as Se, GiftIcon as ca, WarningCircleIcon as da, MegaphoneIcon as ua, ChecksIcon as ma, XIcon as lt, PencilSimpleIcon as ha, CaretLeftIcon as fa, TrashSimpleIcon as ga, ArrowUpIcon as pa, SparkleIcon as ba, ProhibitIcon as va } from "@phosphor-icons/react";
9
+ import { MessageActions as xa, DefaultDropdownActionButton as bn } from "stream-chat-react/experimental";
10
+ const vn = je({
11
11
  service: null,
12
12
  client: null,
13
13
  isConnected: !1,
@@ -17,7 +17,7 @@ const bn = je({
17
17
  refreshConnection: async () => {
18
18
  },
19
19
  debug: !1
20
- }), lt = () => xe(bn), eo = ({
20
+ }), ot = () => xe(vn), Ql = ({
21
21
  children: e,
22
22
  user: t,
23
23
  serviceConfig: s,
@@ -65,7 +65,7 @@ const bn = je({
65
65
  capabilities: r
66
66
  };
67
67
  const $ = H(null);
68
- !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new os(a) });
68
+ !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new ls(a) });
69
69
  const F = o || (a ? ((C = $.current) == null ? void 0 : C.client) ?? null : null);
70
70
  Y(() => {
71
71
  const A = E.current, P = _.current;
@@ -84,7 +84,7 @@ const bn = je({
84
84
  renderCount: A,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
- const U = new ls({
87
+ const U = new is({
88
88
  ...P,
89
89
  apiKey: a,
90
90
  debug: T.current,
@@ -215,8 +215,8 @@ const bn = je({
215
215
  renderCount: E.current,
216
216
  willRenderChat: !!F,
217
217
  contextValueReady: !!D
218
- }), /* @__PURE__ */ n(bn.Provider, { value: D, children: F ? /* @__PURE__ */ n(
219
- cs,
218
+ }), /* @__PURE__ */ n(vn.Provider, { value: D, children: F ? /* @__PURE__ */ n(
219
+ os,
220
220
  {
221
221
  client: F,
222
222
  customClasses: {
@@ -225,7 +225,7 @@ const bn = je({
225
225
  children: e
226
226
  }
227
227
  ) : e });
228
- }, _a = () => lt(), vn = (e) => {
228
+ }, wa = () => ot(), xn = (e) => {
229
229
  var a, r;
230
230
  const [t, s] = B(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -248,13 +248,13 @@ const bn = je({
248
248
  };
249
249
  }, [e]), t;
250
250
  };
251
- function xn(e, t, s) {
251
+ function wn(e, t, s) {
252
252
  const a = Object.values(e || {});
253
- if (un(s)) {
253
+ if (mn(s)) {
254
254
  const r = a.find(
255
255
  (i) => {
256
256
  var o;
257
- return ((o = i.user) == null ? void 0 : o.id) === Vs;
257
+ return ((o = i.user) == null ? void 0 : o.id) === Hs;
258
258
  }
259
259
  );
260
260
  if (r) return r;
@@ -266,18 +266,18 @@ function xn(e, t, s) {
266
266
  }
267
267
  );
268
268
  }
269
- const ya = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
270
- function Na(e) {
271
- return ya.test(e.trim());
269
+ const _a = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
270
+ function ya(e) {
271
+ return _a.test(e.trim());
272
272
  }
273
- function Wt(e, t) {
273
+ function Xt(e, t) {
274
274
  const s = e == null ? void 0 : e.trim();
275
- return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Na(s);
275
+ return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !ya(s);
276
276
  }
277
- function wn(e) {
278
- return Wt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Wt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
277
+ function _n(e) {
278
+ 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";
279
279
  }
280
- const Xt = [
280
+ const qt = [
281
281
  { emoji: "🍎", bgColor: "#FFD1DD" },
282
282
  // Apple
283
283
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -305,7 +305,7 @@ const Xt = [
305
305
  { emoji: "🍈", bgColor: "#D9F7E1" }
306
306
  // Melon
307
307
  ];
308
- function ka(e) {
308
+ function Na(e) {
309
309
  let t = 0;
310
310
  for (let s = 0; s < e.length; s++) {
311
311
  const a = e.charCodeAt(s);
@@ -313,14 +313,14 @@ function ka(e) {
313
313
  }
314
314
  return Math.abs(t);
315
315
  }
316
- function _n(e) {
317
- return Xt[ka(e) % Xt.length];
316
+ function yn(e) {
317
+ return qt[Na(e) % qt.length];
318
318
  }
319
- function Ca(e) {
320
- return _n(e).emoji;
319
+ function ka(e) {
320
+ return yn(e).emoji;
321
321
  }
322
- function Sa(e) {
323
- return _n(e).bgColor;
322
+ function Ca(e) {
323
+ return yn(e).bgColor;
324
324
  }
325
325
  const _e = ({
326
326
  id: e,
@@ -331,7 +331,7 @@ const _e = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: o = !1
333
333
  }) => {
334
- const l = Ca(e), d = Sa(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
334
+ const l = ka(e), d = Ca(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
335
335
  "div",
336
336
  {
337
337
  "aria-hidden": "true",
@@ -359,7 +359,7 @@ const _e = ({
359
359
  {
360
360
  "aria-hidden": "true",
361
361
  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)]",
362
- children: /* @__PURE__ */ n(st, { className: "size-3 text-yellow-600", weight: "duotone" })
362
+ children: /* @__PURE__ */ n(at, { className: "size-3 text-yellow-600", weight: "duotone" })
363
363
  }
364
364
  ),
365
365
  /* @__PURE__ */ n(
@@ -382,7 +382,7 @@ const _e = ({
382
382
  ]
383
383
  }
384
384
  );
385
- }, Ea = "https://linktr.ee/s/about/trust-center/report", Ia = ({
385
+ }, Sa = "https://linktr.ee/s/about/trust-center/report", Ea = ({
386
386
  channel: e,
387
387
  participant: t,
388
388
  showBlockParticipant: s = !0,
@@ -396,7 +396,7 @@ const _e = ({
396
396
  logLabel: h = "useChannelModerationActions"
397
397
  }) => {
398
398
  var D;
399
- const { service: m, debug: g } = lt(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, p = !!(a && s && m && c), [w, v] = B(!1), [x, b] = B(null), [N, _] = B(!1), [T, L] = B(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
399
+ const { service: m, debug: g } = ot(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, p = !!(a && s && m && c), [w, v] = B(!1), [x, b] = B(null), [N, _] = B(!1), [T, L] = B(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
400
400
  return Y(() => {
401
401
  if (!p || !m || !c) {
402
402
  v(!1), b(null);
@@ -466,7 +466,7 @@ const _e = ({
466
466
  }
467
467
  },
468
468
  handleReportUser: () => {
469
- d == null || d(), u == null || u(), window.open(Ea, "_blank", "noopener,noreferrer");
469
+ d == null || d(), u == null || u(), window.open(Sa, "_blank", "noopener,noreferrer");
470
470
  }
471
471
  };
472
472
  }, Ne = ({
@@ -486,7 +486,7 @@ const _e = ({
486
486
  ...a,
487
487
  children: s
488
488
  }
489
- ), Ta = ({
489
+ ), Ia = ({
490
490
  channel: e,
491
491
  participant: t,
492
492
  showDeleteConversation: s = !0,
@@ -500,7 +500,7 @@ const _e = ({
500
500
  customChannelActions: h,
501
501
  triggerClassName: m
502
502
  }) => {
503
- const [g, c] = B(!1), p = H(null), w = rs(), v = q(() => c(!1), []), {
503
+ const [g, c] = B(!1), p = H(null), w = as(), v = q(() => c(!1), []), {
504
504
  isParticipantBlocked: x,
505
505
  isCheckingBlockedStatus: b,
506
506
  isLeaving: N,
@@ -509,7 +509,7 @@ const _e = ({
509
509
  handleBlockUser: L,
510
510
  handleUnblockUser: E,
511
511
  handleReportUser: $
512
- } = Ia({
512
+ } = Ea({
513
513
  channel: e,
514
514
  participant: t,
515
515
  showBlockParticipant: a,
@@ -543,7 +543,7 @@ const _e = ({
543
543
  "aria-controls": g ? w : void 0,
544
544
  onClick: () => c((R) => !R),
545
545
  children: [
546
- /* @__PURE__ */ n(Xs, { className: "size-5 text-black/90" }),
546
+ /* @__PURE__ */ n(Ws, { className: "size-5 text-black/90" }),
547
547
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
548
548
  ]
549
549
  }
@@ -565,7 +565,7 @@ const _e = ({
565
565
  disabled: N,
566
566
  "aria-busy": N,
567
567
  children: [
568
- N ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(qs, { className: "h-5 w-5" }),
568
+ N ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Xs, { className: "h-5 w-5" }),
569
569
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
570
570
  ]
571
571
  }
@@ -584,7 +584,7 @@ const _e = ({
584
584
  disabled: _,
585
585
  "aria-busy": _,
586
586
  children: [
587
- _ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Yt, { className: "h-5 w-5" }),
587
+ _ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Wt, { className: "h-5 w-5" }),
588
588
  /* @__PURE__ */ n("span", { children: "Unblock" })
589
589
  ]
590
590
  }
@@ -595,13 +595,13 @@ const _e = ({
595
595
  disabled: _,
596
596
  "aria-busy": _,
597
597
  children: [
598
- _ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Yt, { className: "h-5 w-5" }),
598
+ _ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Wt, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ n("span", { children: "Block" })
600
600
  ]
601
601
  }
602
602
  ) }),
603
603
  r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: $, children: [
604
- /* @__PURE__ */ n(mn, { className: "h-5 w-5" }),
604
+ /* @__PURE__ */ n(hn, { className: "h-5 w-5" }),
605
605
  /* @__PURE__ */ n("span", { children: "Report" })
606
606
  ] }) }),
607
607
  h
@@ -609,7 +609,7 @@ const _e = ({
609
609
  }
610
610
  )
611
611
  ] });
612
- }, qe = "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", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
612
+ }, Ke = "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", Ta = "CUSTOMER_PAID", Aa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ta, Ra = ({
613
613
  className: e,
614
614
  onBack: t,
615
615
  showBackButton: s,
@@ -631,14 +631,14 @@ const _e = ({
631
631
  const { channel: v } = we(), { client: x } = He(), b = z.useMemo(
632
632
  () => {
633
633
  var A;
634
- return xn(
634
+ return wn(
635
635
  (A = v.state) == null ? void 0 : A.members,
636
636
  x == null ? void 0 : x.userID,
637
637
  v.type
638
638
  );
639
639
  },
640
640
  [(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
641
- ), N = wn(b == null ? void 0 : b.user), _ = (D = b == null ? void 0 : b.user) == null ? void 0 : D.image, T = vn(v), L = Ra((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, $ = L || E || !!w, F = async () => {
641
+ ), N = _n(b == null ? void 0 : b.user), _ = (D = b == null ? void 0 : b.user) == null ? void 0 : D.image, T = xn(v), L = Aa((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, $ = L || E || !!w, F = async () => {
642
642
  try {
643
643
  T ? await v.unpin() : await v.pin();
644
644
  } catch (A) {
@@ -674,7 +674,7 @@ const _e = ({
674
674
  {
675
675
  "aria-label": "Paid customer",
676
676
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
677
- children: /* @__PURE__ */ n(Ks, { className: "size-2.5", weight: "bold" })
677
+ children: /* @__PURE__ */ n(qs, { className: "size-2.5", weight: "bold" })
678
678
  }
679
679
  ),
680
680
  E && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
@@ -682,11 +682,11 @@ const _e = ({
682
682
  {
683
683
  "aria-label": "Starred conversation",
684
684
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
685
- children: /* @__PURE__ */ n(st, { className: "size-2.5", weight: "fill" })
685
+ children: /* @__PURE__ */ n(at, { className: "size-2.5", weight: "fill" })
686
686
  }
687
687
  ) }),
688
688
  w && /* @__PURE__ */ n(
689
- hn,
689
+ fn,
690
690
  {
691
691
  "aria-hidden": "true",
692
692
  className: "size-4 shrink-0 text-black/65",
@@ -710,14 +710,14 @@ const _e = ({
710
710
  "button",
711
711
  {
712
712
  className: k(
713
- qe,
713
+ Ke,
714
714
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
715
715
  ),
716
716
  onClick: t || (() => {
717
717
  }),
718
718
  type: "button",
719
719
  "aria-label": "Back to conversations",
720
- children: /* @__PURE__ */ n(Zs, { className: "size-5 text-black/90" })
720
+ children: /* @__PURE__ */ n(Ks, { className: "size-5 text-black/90" })
721
721
  }
722
722
  ) }),
723
723
  /* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
@@ -734,13 +734,13 @@ const _e = ({
734
734
  a && /* @__PURE__ */ n(
735
735
  "button",
736
736
  {
737
- className: qe,
737
+ className: Ke,
738
738
  onClick: F,
739
739
  type: "button",
740
740
  "aria-pressed": T,
741
741
  "aria-label": T ? "Unstar conversation" : "Star conversation",
742
742
  children: /* @__PURE__ */ n(
743
- st,
743
+ at,
744
744
  {
745
745
  className: k("size-5", {
746
746
  "text-[#FFD60A]": T,
@@ -752,7 +752,7 @@ const _e = ({
752
752
  }
753
753
  ),
754
754
  p && (c !== void 0 ? c : /* @__PURE__ */ n(
755
- Ta,
755
+ Ia,
756
756
  {
757
757
  channel: v,
758
758
  participant: b,
@@ -765,47 +765,47 @@ const _e = ({
765
765
  onBlockParticipantClick: h,
766
766
  onReportParticipantClick: m,
767
767
  customChannelActions: g,
768
- triggerClassName: qe
768
+ triggerClassName: Ke
769
769
  }
770
770
  ))
771
771
  ] })
772
772
  ] })
773
773
  }
774
774
  );
775
- }, Ma = (e) => /* @__PURE__ */ n(ds, { ...e, position: "center" });
776
- function Da(e) {
775
+ }, La = (e) => /* @__PURE__ */ n(cs, { ...e, position: "center" });
776
+ function Ma(e) {
777
777
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
778
778
  }
779
- function yn({
779
+ function Nn({
780
780
  message: e,
781
781
  viewerLanguage: t
782
782
  }) {
783
783
  var r;
784
- const s = e == null ? void 0 : e.text, a = Da(t);
784
+ const s = e == null ? void 0 : e.text, a = Ma(t);
785
785
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
786
786
  }
787
- const Oa = ["linktr.ee"], qt = "messaging-attachment-v1_0";
788
- function Pa(e) {
787
+ const Da = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
788
+ function Oa(e) {
789
789
  try {
790
790
  return new URL(e).hostname.toLowerCase();
791
791
  } catch {
792
792
  return null;
793
793
  }
794
794
  }
795
- function za(e) {
796
- return Oa.some(
795
+ function Pa(e) {
796
+ return Da.some(
797
797
  (t) => e === t || e.endsWith(`.${t}`)
798
798
  );
799
799
  }
800
800
  function ce(e) {
801
801
  const t = e == null ? void 0 : e.trim();
802
802
  if (!t) return;
803
- const s = Pa(t);
804
- if (!s || !za(s)) return t;
803
+ const s = Oa(t);
804
+ if (!s || !Pa(s)) return t;
805
805
  const a = new URL(t);
806
- return a.searchParams.get("io") === "true" && a.searchParams.get("size") === qt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", qt), a.toString());
806
+ return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Kt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Kt), a.toString());
807
807
  }
808
- const Fa = [
808
+ const za = [
809
809
  [/pdf/, "pdf"],
810
810
  [/wordprocessingml|msword|\.doc/, "doc"],
811
811
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -818,39 +818,39 @@ const Fa = [
818
818
  function de(e) {
819
819
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
820
820
  }
821
- function Nn(e) {
822
- const t = Fa.find(
821
+ function kn(e) {
822
+ const t = za.find(
823
823
  ([s]) => s.test(e)
824
824
  );
825
825
  return t ? t[1] : "generic";
826
826
  }
827
- const $a = {
828
- video: gn,
829
- audio: Qs,
830
- image: Js,
831
- document: fn
832
- }, Ba = {
833
- pdf: la,
834
- doc: ia,
835
- xls: ra,
836
- csv: aa,
837
- ppt: sa,
838
- zip: na,
839
- text: ta,
840
- markdown: ea,
841
- generic: fn
827
+ const Fa = {
828
+ video: pn,
829
+ audio: Js,
830
+ image: Zs,
831
+ document: gn
832
+ }, $a = {
833
+ pdf: ia,
834
+ doc: ra,
835
+ xls: aa,
836
+ csv: sa,
837
+ ppt: na,
838
+ zip: ta,
839
+ text: ea,
840
+ markdown: Qs,
841
+ generic: gn
842
842
  };
843
- function Ua(e) {
843
+ function Ba(e) {
844
844
  const t = de(e);
845
- return t !== "document" ? $a[t] : Ba[Nn(e)];
845
+ return t !== "document" ? Fa[t] : $a[kn(e)];
846
846
  }
847
847
  function ve(e, t) {
848
- return z.createElement(Ua(e), t);
848
+ return z.createElement(Ba(e), t);
849
849
  }
850
- const ja = (e) => {
850
+ const Ua = (e) => {
851
851
  var t, s;
852
852
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
853
- }, Ha = ({
853
+ }, ja = ({
854
854
  source: e,
855
855
  mimeType: t,
856
856
  poster: s,
@@ -870,7 +870,7 @@ const ja = (e) => {
870
870
  const W = M.getBoundingClientRect();
871
871
  return Math.max(
872
872
  0,
873
- Math.min(1, (ja(y) - W.left) / W.width)
873
+ Math.min(1, (Ua(y) - W.left) / W.width)
874
874
  );
875
875
  }, []), U = q((y) => {
876
876
  const M = m.current;
@@ -1009,7 +1009,7 @@ const ja = (e) => {
1009
1009
  onKeyDown: (y) => {
1010
1010
  y.key !== "Enter" && y.key !== " " || (y.preventDefault(), y.stopPropagation(), A());
1011
1011
  },
1012
- children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(at, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1012
+ children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
1013
  }
1014
1014
  ),
1015
1015
  l && !o && /* @__PURE__ */ n("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__ */ n(
@@ -1048,7 +1048,7 @@ const ja = (e) => {
1048
1048
  },
1049
1049
  className: "shrink-0 text-white",
1050
1050
  "aria-label": w ? "Pause" : "Play",
1051
- children: w ? /* @__PURE__ */ n(oa, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(at, { className: "size-5 translate-x-px", weight: "fill" })
1051
+ children: w ? /* @__PURE__ */ n(la, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
1052
1052
  }
1053
1053
  ),
1054
1054
  /* @__PURE__ */ f(
@@ -1098,7 +1098,7 @@ const ja = (e) => {
1098
1098
  ]
1099
1099
  }
1100
1100
  );
1101
- }, Kt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Va = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", kn = ({
1101
+ }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ha = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Cn = ({
1102
1102
  mimeType: e,
1103
1103
  sourceUrl: t,
1104
1104
  thumbnailUrl: s,
@@ -1109,7 +1109,7 @@ const ja = (e) => {
1109
1109
  }) => {
1110
1110
  const l = de(e), [d, u] = B(!1), h = ce(t), m = ce(s);
1111
1111
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
1112
- Ha,
1112
+ ja,
1113
1113
  {
1114
1114
  source: t,
1115
1115
  mimeType: e,
@@ -1156,11 +1156,11 @@ const ja = (e) => {
1156
1156
  {
1157
1157
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1158
1158
  children: ve(e, {
1159
- className: Kt(r),
1159
+ className: Zt(r),
1160
1160
  weight: "regular"
1161
1161
  })
1162
1162
  }
1163
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${Va(r)}`, children: /* @__PURE__ */ n(
1163
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${Ha(r)}`, children: /* @__PURE__ */ n(
1164
1164
  "img",
1165
1165
  {
1166
1166
  src: m ?? s,
@@ -1173,12 +1173,12 @@ const ja = (e) => {
1173
1173
  {
1174
1174
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1175
1175
  children: ve(e, {
1176
- className: Kt(r),
1176
+ className: Zt(r),
1177
1177
  weight: "regular"
1178
1178
  })
1179
1179
  }
1180
1180
  );
1181
- }, Cn = ({
1181
+ }, Sn = ({
1182
1182
  variant: e,
1183
1183
  thumbnail: t,
1184
1184
  title: s,
@@ -1244,28 +1244,28 @@ const ja = (e) => {
1244
1244
  }
1245
1245
  );
1246
1246
  };
1247
- function Sn(e) {
1247
+ function En(e) {
1248
1248
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1249
1249
  }
1250
- function ot(e) {
1250
+ function ct(e) {
1251
1251
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1252
1252
  }
1253
- function Ga(e) {
1253
+ function Va(e) {
1254
1254
  return e ? "bg-white/10" : "bg-black/5";
1255
1255
  }
1256
- function Ya(e) {
1256
+ function Ga(e) {
1257
1257
  return e ? "text-white" : "text-black";
1258
1258
  }
1259
- function Wa(e) {
1259
+ function Ya(e) {
1260
1260
  return e ? "text-white/55" : "text-black/55";
1261
1261
  }
1262
- function Xa(e) {
1262
+ function Wa(e) {
1263
1263
  return e ? "text-white/40" : "text-black/40";
1264
1264
  }
1265
- function qa(e) {
1265
+ function Xa(e) {
1266
1266
  return e ? "text-white/20" : "text-black/20";
1267
1267
  }
1268
- const ct = ({ attachment: e, isMyMessage: t }) => {
1268
+ const dt = ({ attachment: e, isMyMessage: t }) => {
1269
1269
  const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ f(z.Fragment, { children: [
1270
1270
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1271
1271
  "img",
@@ -1277,29 +1277,29 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
1277
1277
  ) : /* @__PURE__ */ n(
1278
1278
  "div",
1279
1279
  {
1280
- className: `aspect-video w-full rounded-[20px] ${Ga(t)} flex items-center justify-center`,
1281
- children: /* @__PURE__ */ n(ca, { className: `size-12 ${qa(t)}` })
1280
+ className: `aspect-video w-full rounded-[20px] ${Va(t)} flex items-center justify-center`,
1281
+ children: /* @__PURE__ */ n(oa, { className: `size-12 ${Xa(t)}` })
1282
1282
  }
1283
1283
  ) }),
1284
1284
  /* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
1285
1285
  s && /* @__PURE__ */ n(
1286
1286
  "p",
1287
1287
  {
1288
- className: `truncate text-[14px] font-medium leading-5 ${Ya(t)}`,
1288
+ className: `truncate text-[14px] font-medium leading-5 ${Ga(t)}`,
1289
1289
  children: s
1290
1290
  }
1291
1291
  ),
1292
1292
  a && /* @__PURE__ */ n(
1293
1293
  "p",
1294
1294
  {
1295
- className: `truncate text-[12px] leading-4 ${Wa(t)}`,
1295
+ className: `truncate text-[12px] leading-4 ${Ya(t)}`,
1296
1296
  children: a
1297
1297
  }
1298
1298
  ),
1299
1299
  d && /* @__PURE__ */ n(
1300
1300
  "p",
1301
1301
  {
1302
- className: `mt-1 truncate text-[12px] leading-4 ${Xa(t)}`,
1302
+ className: `mt-1 truncate text-[12px] leading-4 ${Wa(t)}`,
1303
1303
  children: d
1304
1304
  }
1305
1305
  )
@@ -1316,14 +1316,15 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
1316
1316
  }
1317
1317
  ) : /* @__PURE__ */ n("div", { className: "block", children: u });
1318
1318
  };
1319
- function En(e) {
1320
- return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1319
+ function Ve(e) {
1320
+ var t;
1321
+ return e.type === "link" || !!((t = e.og_scrape_url) != null && t.trim()) && !e.asset_url;
1321
1322
  }
1322
- function dt(e) {
1323
+ function ut(e) {
1323
1324
  var t;
1324
- return (t = e.attachments) == null ? void 0 : t.find(En);
1325
+ return (t = e.attachments) == null ? void 0 : t.find(Ve);
1325
1326
  }
1326
- async function Ka(e, t) {
1327
+ async function qa(e, t) {
1327
1328
  let s;
1328
1329
  try {
1329
1330
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1335,7 +1336,7 @@ async function Ka(e, t) {
1335
1336
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1336
1337
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1337
1338
  }
1338
- const Za = ({
1339
+ const Ka = ({
1339
1340
  url: e,
1340
1341
  filename: t
1341
1342
  }) => {
@@ -1347,7 +1348,7 @@ const Za = ({
1347
1348
  onClick: (i) => {
1348
1349
  i.stopPropagation();
1349
1350
  const o = window.open("", "_blank", "noopener,noreferrer");
1350
- a(!0), Ka(e, t).then(() => {
1351
+ a(!0), qa(e, t).then(() => {
1351
1352
  o == null || o.close();
1352
1353
  }).catch(() => {
1353
1354
  o && (o.location.href = e);
@@ -1368,7 +1369,7 @@ const Za = ({
1368
1369
  }
1369
1370
  );
1370
1371
  };
1371
- function ut(e) {
1372
+ function mt(e) {
1372
1373
  var m, g, c, p;
1373
1374
  const t = (m = e.attachments) == null ? void 0 : m.find(
1374
1375
  (w) => w.type === "video" && w.asset_url
@@ -1396,9 +1397,9 @@ const In = ({
1396
1397
  fileSize: a,
1397
1398
  thumbnailUrl: r
1398
1399
  }) => {
1399
- const i = a !== void 0 ? Sn(a) : void 0;
1400
+ const i = a !== void 0 ? En(a) : void 0;
1400
1401
  return /* @__PURE__ */ n(
1401
- Cn,
1402
+ Sn,
1402
1403
  {
1403
1404
  variant: "dark",
1404
1405
  title: s,
@@ -1406,7 +1407,7 @@ const In = ({
1406
1407
  mimeType: t,
1407
1408
  detail: i,
1408
1409
  thumbnail: /* @__PURE__ */ n(
1409
- kn,
1410
+ Cn,
1410
1411
  {
1411
1412
  mimeType: t,
1412
1413
  sourceUrl: e,
@@ -1424,16 +1425,16 @@ const In = ({
1424
1425
  fileSize: a,
1425
1426
  thumbnailUrl: r
1426
1427
  }) => {
1427
- const i = de(t), o = a !== void 0 ? Sn(a) : void 0;
1428
+ const i = de(t), o = a !== void 0 ? En(a) : void 0;
1428
1429
  return /* @__PURE__ */ n(
1429
- Cn,
1430
+ Sn,
1430
1431
  {
1431
1432
  variant: "light",
1432
1433
  title: s,
1433
1434
  mimeType: t,
1434
1435
  detail: o,
1435
1436
  thumbnail: /* @__PURE__ */ n(
1436
- kn,
1437
+ Cn,
1437
1438
  {
1438
1439
  mimeType: t,
1439
1440
  sourceUrl: e,
@@ -1443,14 +1444,14 @@ const In = ({
1443
1444
  containedImage: i === "image" || i === "document"
1444
1445
  }
1445
1446
  ),
1446
- action: /* @__PURE__ */ n(Za, { url: e, filename: s })
1447
+ action: /* @__PURE__ */ n(Ka, { url: e, filename: s })
1447
1448
  }
1448
1449
  );
1449
- }, Ja = ({
1450
+ }, Za = ({
1450
1451
  message: e,
1451
1452
  isMyMessage: t = !1
1452
1453
  }) => {
1453
- const s = dt(e), a = ut(e);
1454
+ const s = ut(e), a = mt(e);
1454
1455
  return !s && !a ? null : /* @__PURE__ */ f("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: [
1455
1456
  !t && e.user && /* @__PURE__ */ n(
1456
1457
  _e,
@@ -1477,8 +1478,8 @@ const In = ({
1477
1478
  overflow: "visible",
1478
1479
  background: "transparent"
1479
1480
  },
1480
- children: s ? /* @__PURE__ */ n("div", { className: ot(t), children: /* @__PURE__ */ n(
1481
- ct,
1481
+ children: s ? /* @__PURE__ */ n("div", { className: ct(t), children: /* @__PURE__ */ n(
1482
+ dt,
1482
1483
  {
1483
1484
  attachment: s,
1484
1485
  isMyMessage: t
@@ -1489,40 +1490,40 @@ const In = ({
1489
1490
  }
1490
1491
  )
1491
1492
  ] });
1492
- }, Qa = ({
1493
+ }, Ja = ({
1493
1494
  message: e
1494
1495
  }) => {
1495
- const t = dt(e);
1496
+ const t = ut(e);
1496
1497
  if (t)
1497
- return /* @__PURE__ */ n("div", { className: ot(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ct, { attachment: t, isMyMessage: !0 }) });
1498
- const s = ut(e);
1498
+ return /* @__PURE__ */ n("div", { className: ct(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !0 }) });
1499
+ const s = mt(e);
1499
1500
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(In, { ...s }) }) : null;
1500
- }, er = ({
1501
+ }, Qa = ({
1501
1502
  message: e
1502
1503
  }) => {
1503
- const t = dt(e);
1504
+ const t = ut(e);
1504
1505
  if (t)
1505
- return /* @__PURE__ */ n("div", { className: ot(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ct, { attachment: t, isMyMessage: !1 }) });
1506
- const s = ut(e);
1506
+ return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
1507
+ const s = mt(e);
1507
1508
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Tn, { ...s }) }) : null;
1508
- }, to = Object.assign(Ja, {
1509
- Creator: Qa,
1510
- Visitor: er
1511
- }), tr = {
1509
+ }, eo = Object.assign(Za, {
1510
+ Creator: Ja,
1511
+ Visitor: Qa
1512
+ }), er = {
1512
1513
  isUnlocking: () => !1
1513
- }, nr = {
1514
- LockedAttachment: tr
1515
- }, An = je({}), no = An.Provider;
1516
- function sr(e) {
1517
- return xe(An)[e] ?? nr[e];
1514
+ }, tr = {
1515
+ LockedAttachment: er
1516
+ }, An = je({}), to = An.Provider;
1517
+ function nr(e) {
1518
+ return xe(An)[e] ?? tr[e];
1518
1519
  }
1519
- const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import("./Card-LPAZ4FjL.js")), ir = () => /* @__PURE__ */ n(
1520
+ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import("./Card-xYcNcZC_.js")), rr = () => /* @__PURE__ */ n(
1520
1521
  "div",
1521
1522
  {
1522
1523
  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)]",
1523
1524
  "aria-hidden": !0
1524
1525
  }
1525
- ), Pe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }), lr = ({ size: e = 15 }) => /* @__PURE__ */ n(
1526
+ ), Pe = (e) => /* @__PURE__ */ n(rs, { fallback: /* @__PURE__ */ n(rr, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(sr, { ...e }) : /* @__PURE__ */ n(ar, { ...e }) }), ir = ({ size: e = 15 }) => /* @__PURE__ */ n(
1526
1527
  "svg",
1527
1528
  {
1528
1529
  width: e,
@@ -1539,7 +1540,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1539
1540
  }
1540
1541
  )
1541
1542
  }
1542
- ), or = (e) => {
1543
+ ), lr = (e) => {
1543
1544
  var t;
1544
1545
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.TIP;
1545
1546
  }, Rn = (e) => {
@@ -1548,19 +1549,19 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1548
1549
  }, Fe = (e) => {
1549
1550
  var t;
1550
1551
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.CHATBOT;
1551
- }, mt = (e) => {
1552
+ }, ht = (e) => {
1552
1553
  var t;
1553
1554
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.ATTACHMENT;
1554
- }, cr = (e) => {
1555
+ }, or = (e) => {
1555
1556
  var t;
1556
- return mt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
1557
- }, dr = (e) => {
1557
+ return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
1558
+ }, cr = (e) => {
1558
1559
  var t;
1559
- return mt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1560
- }, Ln = (e) => or(e) || Rn(e), ur = (e) => {
1560
+ return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1561
+ }, Ln = (e) => lr(e) || Rn(e), dr = (e) => {
1561
1562
  var t;
1562
1563
  return Ln(e) && !((t = e.text) != null && t.trim());
1563
- }, Ke = ({
1564
+ }, Ze = ({
1564
1565
  message: e,
1565
1566
  standalone: t = !1,
1566
1567
  isMyMessage: s = !1,
@@ -1575,11 +1576,11 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1575
1576
  if (!c) return null;
1576
1577
  const p = t ? "message-tip-standalone inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[18px] text-[14px] font-medium text-[#016e1a] bg-[#dbf0e0]" : "message-tag--tip inline-flex items-center gap-1 text-[12px] leading-[2] font-medium text-[#016630]", w = Rn(e) ? "message" : "tip", v = t ? `${c} ${w}` : `Delivered with ${c} ${w}`;
1577
1578
  return /* @__PURE__ */ f("div", { className: p, children: [
1578
- /* @__PURE__ */ n(da, { size: t ? 14 : 12 }),
1579
+ /* @__PURE__ */ n(ca, { size: t ? 14 : 12 }),
1579
1580
  /* @__PURE__ */ n("span", { children: v })
1580
1581
  ] });
1581
1582
  }
1582
- const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(lr, { size: o ? 12 : 15 }) });
1583
+ const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(ir, { size: o ? 12 : 15 }) });
1583
1584
  return /* @__PURE__ */ n(
1584
1585
  "div",
1585
1586
  {
@@ -1594,7 +1595,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1594
1595
  ] })
1595
1596
  }
1596
1597
  );
1597
- }, Zt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, mr = {
1598
+ }, Jt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, ur = {
1598
1599
  me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
1599
1600
  other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
1600
1601
  }, $e = ({ side: e }) => /* @__PURE__ */ n(
@@ -1607,24 +1608,24 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1607
1608
  insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
1608
1609
  transform: e === "other" ? "scaleX(-1)" : void 0,
1609
1610
  transformOrigin: "center",
1610
- backgroundColor: mr[e],
1611
- WebkitMask: Zt,
1612
- mask: Zt
1611
+ backgroundColor: ur[e],
1612
+ WebkitMask: Jt,
1613
+ mask: Jt
1613
1614
  }
1614
1615
  }
1615
1616
  ), Mn = je(
1616
1617
  void 0
1617
- ), hr = (e) => {
1618
+ ), mr = (e) => {
1618
1619
  var s;
1619
1620
  const t = (s = e.metadata) == null ? void 0 : s.outbound_id;
1620
1621
  return typeof t == "string" ? t : void 0;
1621
- }, fr = (e, t) => {
1622
+ }, hr = (e, t) => {
1622
1623
  if (!t || !(e != null && e.length))
1623
1624
  return;
1624
1625
  const s = /* @__PURE__ */ new Set();
1625
1626
  let a;
1626
1627
  for (const r of e) {
1627
- const i = hr(r);
1628
+ const i = mr(r);
1628
1629
  if (!i || s.has(i))
1629
1630
  continue;
1630
1631
  s.add(i);
@@ -1635,7 +1636,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1635
1636
  });
1636
1637
  }
1637
1638
  return a;
1638
- }, gr = (e, t) => {
1639
+ }, fr = (e, t) => {
1639
1640
  if (e === t)
1640
1641
  return !0;
1641
1642
  if (!e || !t)
@@ -1647,10 +1648,10 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1647
1648
  return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((o = t[r]) == null ? void 0 : o.name);
1648
1649
  }
1649
1650
  );
1650
- }, pr = (e, t) => {
1651
- const s = fr(e, t), [a, r] = B(s);
1652
- return gr(a, s) ? a : (r(s), s);
1653
- }, ht = () => {
1651
+ }, gr = (e, t) => {
1652
+ const s = hr(e, t), [a, r] = B(s);
1653
+ return fr(a, s) ? a : (r(s), s);
1654
+ }, ft = () => {
1654
1655
  const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = we("SentMessageDeliveryStatus"), s = (() => {
1655
1656
  if (t)
1656
1657
  for (let a = t.length - 1; a >= 0; a -= 1) {
@@ -1660,10 +1661,10 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1660
1661
  }
1661
1662
  })();
1662
1663
  return e.id === s;
1663
- }, Ze = () => ht() ? /* @__PURE__ */ f(K, { children: [
1664
- /* @__PURE__ */ n(ha, { weight: "bold", "aria-hidden": "true" }),
1664
+ }, Je = () => ft() ? /* @__PURE__ */ f(K, { children: [
1665
+ /* @__PURE__ */ n(ma, { weight: "bold", "aria-hidden": "true" }),
1665
1666
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
1666
- ] }) : null, br = () => ht() ? /* @__PURE__ */ f(K, { children: [
1667
+ ] }) : null, pr = () => ft() ? /* @__PURE__ */ f(K, { children: [
1667
1668
  /* @__PURE__ */ n(
1668
1669
  be,
1669
1670
  {
@@ -1673,12 +1674,12 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1673
1674
  }
1674
1675
  ),
1675
1676
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
1676
- ] }) : null, vr = ({
1677
+ ] }) : null, br = ({
1677
1678
  outbound: e,
1678
1679
  onOutboundClick: t
1679
1680
  }) => {
1680
1681
  const s = e.name || "Broadcast", r = /* @__PURE__ */ f(K, { children: [
1681
- /* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ma, { weight: "fill" }) }),
1682
+ /* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ua, { weight: "fill" }) }),
1682
1683
  /* @__PURE__ */ n(
1683
1684
  "span",
1684
1685
  {
@@ -1700,36 +1701,36 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1700
1701
  children: r
1701
1702
  }
1702
1703
  ) : r;
1703
- }, xr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
1704
- /* @__PURE__ */ n(ua, { weight: "bold", "aria-hidden": "true" }),
1704
+ }, vr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
1705
+ /* @__PURE__ */ n(da, { weight: "bold", "aria-hidden": "true" }),
1705
1706
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
1706
- ] }), wr = ({
1707
+ ] }), xr = ({
1707
1708
  onOutboundClick: e,
1708
1709
  resolvedOutbound: t
1709
1710
  }) => {
1710
1711
  var h;
1711
1712
  const { isMyMessage: s, message: a, threadList: r } = fe(
1712
1713
  "SentMessageDeliveryStatus"
1713
- ), i = s(), o = ht();
1714
+ ), i = s(), o = ft();
1714
1715
  if (r)
1715
1716
  return null;
1716
1717
  if (a.status === "failed" && i && a.type !== "error")
1717
- return /* @__PURE__ */ n(xr, {});
1718
+ return /* @__PURE__ */ n(vr, {});
1718
1719
  if (!i)
1719
1720
  return null;
1720
1721
  const l = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && l && t ? /* @__PURE__ */ n(
1721
- vr,
1722
+ br,
1722
1723
  {
1723
1724
  outbound: t,
1724
1725
  onOutboundClick: e
1725
1726
  }
1726
1727
  ) : null, u = /* @__PURE__ */ n(
1727
- us,
1728
+ ds,
1728
1729
  {
1729
- MessageSentStatus: Ze,
1730
- MessageDeliveredStatus: Ze,
1731
- MessageReadStatus: Ze,
1732
- MessageSendingStatus: br
1730
+ MessageSentStatus: Je,
1731
+ MessageDeliveredStatus: Je,
1732
+ MessageReadStatus: Je,
1733
+ MessageSendingStatus: pr
1733
1734
  }
1734
1735
  );
1735
1736
  return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
@@ -1737,19 +1738,19 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1737
1738
  o && /* @__PURE__ */ n("span", { className: "sent-message-outbound-separator", "aria-hidden": "true", children: "•" }),
1738
1739
  d
1739
1740
  ] }) : u;
1740
- }, _r = /^([a-z][a-z0-9+.-]*):/i, yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
1741
- function ft(e) {
1741
+ }, wr = /^([a-z][a-z0-9+.-]*):/i, _r = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
1742
+ function gt(e) {
1742
1743
  if (typeof e != "string") return;
1743
1744
  const t = e.trim();
1744
1745
  if (t === "") return;
1745
- const s = _r.exec(t);
1746
+ const s = wr.exec(t);
1746
1747
  if (s) {
1747
1748
  const a = s[1].toLowerCase();
1748
- return yr.has(a) ? t : void 0;
1749
+ return _r.has(a) ? t : void 0;
1749
1750
  }
1750
1751
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
1751
1752
  }
1752
- const Nr = {
1753
+ const yr = {
1753
1754
  dark: {
1754
1755
  primary: "bg-white text-[#121110] hover:bg-white/90",
1755
1756
  secondary: "bg-white/15 text-white hover:bg-white/25"
@@ -1768,8 +1769,8 @@ const Nr = {
1768
1769
  "inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
1769
1770
  s ? "w-full" : "min-w-0",
1770
1771
  !a && "mt-2",
1771
- Nr[e][r]
1772
- ), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = ft(t.href);
1772
+ yr[e][r]
1773
+ ), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = gt(t.href);
1773
1774
  return l ? /* @__PURE__ */ n(
1774
1775
  "a",
1775
1776
  {
@@ -1795,16 +1796,16 @@ const Nr = {
1795
1796
  children: o
1796
1797
  }
1797
1798
  );
1798
- }, kr = {
1799
+ }, Nr = {
1799
1800
  dark: "text-white",
1800
1801
  light: "text-black/90"
1801
- }, Cr = "text-white/30", Jt = {
1802
+ }, kr = "text-white/30", Qt = {
1802
1803
  dark: "text-white/55",
1803
1804
  light: "text-black/55"
1804
- }, Sr = {
1805
+ }, Cr = {
1805
1806
  dark: "bg-white/25",
1806
1807
  light: "bg-black/15"
1807
- }, gt = ({
1808
+ }, pt = ({
1808
1809
  variant: e,
1809
1810
  ctaSurface: t,
1810
1811
  chinTextColor: s,
@@ -1823,19 +1824,19 @@ const Nr = {
1823
1824
  return null;
1824
1825
  const N = g && !a, _ = k(
1825
1826
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
1826
- s == null && (N ? Cr : kr[e])
1827
+ s == null && (N ? kr : Nr[e])
1827
1828
  ), T = k(
1828
1829
  "truncate text-[12px] leading-4 tracking-[0.24px]",
1829
- s == null && Jt[e]
1830
+ s == null && Qt[e]
1830
1831
  ), L = k(
1831
1832
  "text-[12px] leading-4 tracking-[0.24px]",
1832
1833
  o <= 1 && "truncate",
1833
- s == null && Jt[e]
1834
+ s == null && Qt[e]
1834
1835
  );
1835
1836
  if (m) {
1836
1837
  const F = k(
1837
1838
  "animate-pulse rounded",
1838
- Sr[e]
1839
+ Cr[e]
1839
1840
  );
1840
1841
  return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
1841
1842
  /* @__PURE__ */ n("div", { className: k("h-5 w-3/4", F), "aria-hidden": !0 }),
@@ -1870,7 +1871,7 @@ const Nr = {
1870
1871
  ] }),
1871
1872
  u && /* @__PURE__ */ n(Dn, { variant: t ?? e, cta: u })
1872
1873
  ] });
1873
- }, Er = "Loading link preview", Ir = k(
1874
+ }, Sr = "Loading link preview", Er = k(
1874
1875
  // Width is a channel-scoped token: default 290px, but a read-only surface with no
1875
1876
  // composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
1876
1877
  // content column (see ChannelView). Consumers that don't set the var keep 290px.
@@ -1880,7 +1881,7 @@ const Nr = {
1880
1881
  // 20px corners — no token exists for it in the component-library preset,
1881
1882
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
1882
1883
  "rounded-[20px]"
1883
- ), Tr = "flex h-[250px] flex-col", Ee = ({
1884
+ ), Ir = "flex h-[250px] flex-col", Ee = ({
1884
1885
  variant: e,
1885
1886
  children: t,
1886
1887
  href: s,
@@ -1896,8 +1897,8 @@ const Nr = {
1896
1897
  }) => {
1897
1898
  const g = s != null || a != null, c = k(
1898
1899
  "messaging-link-card",
1899
- Ir,
1900
- u ? Tr : "block",
1900
+ Er,
1901
+ u ? Ir : "block",
1901
1902
  // The plain fallback fill, kept underneath the `--accent` derivation: the
1902
1903
  // `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
1903
1904
  // this single class, so a published accent paints over it and an unset one
@@ -1919,7 +1920,7 @@ const Nr = {
1919
1920
  // tailwind preset — outline-none + a black 2px focus-visible ring
1920
1921
  // with offset, so keyboard users can see the focused card.
1921
1922
  g ? "cursor-pointer no-underline focus-ring" : null
1922
- ), p = h ? { role: "status", "aria-busy": !0, "aria-label": Er } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
1923
+ ), p = h ? { role: "status", "aria-busy": !0, "aria-label": Sr } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
1923
1924
  return s ? /* @__PURE__ */ f(
1924
1925
  "a",
1925
1926
  {
@@ -1970,17 +1971,17 @@ const Nr = {
1970
1971
  ]
1971
1972
  }
1972
1973
  );
1973
- }, Qt = {
1974
+ }, en = {
1974
1975
  dark: "bg-white/10",
1975
1976
  light: "bg-black/5"
1976
- }, Ar = {
1977
+ }, Tr = {
1977
1978
  dark: "size-16 text-white/25",
1978
1979
  light: "size-16 text-black/25"
1979
- }, Te = (e, t) => !!t && !!e && de(e) === "audio", pt = (e, t) => {
1980
+ }, Te = (e, t) => !!t && !!e && de(e) === "audio", bt = (e, t) => {
1980
1981
  if (!t || !e) return !1;
1981
1982
  const s = de(e);
1982
1983
  return s === "video" || s === "audio";
1983
- }, bt = "bg-[#F2F3F4]", Ie = ({
1984
+ }, vt = "bg-[#F2F3F4]", Ie = ({
1984
1985
  variant: e,
1985
1986
  thumbnailUrl: t,
1986
1987
  sourceUrl: s,
@@ -2023,7 +2024,7 @@ const Nr = {
2023
2024
  {
2024
2025
  className: k(
2025
2026
  "h-full w-full animate-pulse",
2026
- Qt[e]
2027
+ en[e]
2027
2028
  ),
2028
2029
  "aria-hidden": !0
2029
2030
  }
@@ -2067,10 +2068,10 @@ const Nr = {
2067
2068
  {
2068
2069
  className: k(
2069
2070
  "flex h-full w-full items-center justify-center",
2070
- Qt[e]
2071
+ en[e]
2071
2072
  ),
2072
2073
  children: ve(r, {
2073
- className: Ar[e],
2074
+ className: Tr[e],
2074
2075
  weight: "regular"
2075
2076
  })
2076
2077
  }
@@ -2080,16 +2081,16 @@ const Nr = {
2080
2081
  ]
2081
2082
  }
2082
2083
  );
2083
- }, Rr = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2084
- function Lr(e) {
2084
+ }, Ar = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2085
+ function Rr(e) {
2085
2086
  const t = e.trim();
2086
2087
  return t.startsWith("#") ? t : `#${t}`;
2087
2088
  }
2088
- const Mr = "#FFFFFF", On = "#040403", Dr = {
2089
- dark: Mr,
2089
+ const Lr = "#FFFFFF", On = "#040403", Mr = {
2090
+ dark: Lr,
2090
2091
  light: On
2091
2092
  };
2092
- function Ve({
2093
+ function Ge({
2093
2094
  variant: e,
2094
2095
  accentColor: t,
2095
2096
  status: s = "ready",
@@ -2104,7 +2105,7 @@ function Ve({
2104
2105
  }, [r]);
2105
2106
  const u = z.useCallback(() => {
2106
2107
  d(!0);
2107
- }, []), h = Te(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Rr.test(t.trim()) ? Lr(t) : void 0, p = h ? On : Dr[e];
2108
+ }, []), h = Te(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Ar.test(t.trim()) ? Rr(t) : void 0, p = h ? On : Mr[e];
2108
2109
  return {
2109
2110
  thumbnailUrl: l ? void 0 : r,
2110
2111
  accentHex: c,
@@ -2114,7 +2115,7 @@ function Ve({
2114
2115
  onImageError: u
2115
2116
  };
2116
2117
  }
2117
- const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Pr = "relative before:absolute before:-inset-[10px] before:content-['']", zr = ({
2118
+ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Or = "relative before:absolute before:-inset-[10px] before:content-['']", Pr = ({
2118
2119
  title: e,
2119
2120
  placeholderTitle: t,
2120
2121
  description: s,
@@ -2132,7 +2133,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2132
2133
  onEditClick: p,
2133
2134
  dismissLabel: w = "Dismiss attachment"
2134
2135
  }) => {
2135
- const v = d === "classic", x = Te(i, l), b = Ve({
2136
+ const v = d === "classic", x = Te(i, l), b = Ge({
2136
2137
  variant: "dark",
2137
2138
  accentColor: m,
2138
2139
  status: g,
@@ -2147,10 +2148,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2147
2148
  onClick: c,
2148
2149
  "aria-label": w,
2149
2150
  className: k(
2150
- Or,
2151
- !x && Pr
2151
+ Dr,
2152
+ !x && Or
2152
2153
  ),
2153
- children: /* @__PURE__ */ n(it, { className: "size-3", weight: "bold" })
2154
+ children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
2154
2155
  }
2155
2156
  ) : void 0, _ = p ? /* @__PURE__ */ n(
2156
2157
  "button",
@@ -2159,10 +2160,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2159
2160
  onClick: p,
2160
2161
  "aria-label": "Edit attachment",
2161
2162
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2162
- children: /* @__PURE__ */ n(fa, { className: "size-5", weight: "regular" })
2163
+ children: /* @__PURE__ */ n(ha, { className: "size-5", weight: "regular" })
2163
2164
  }
2164
2165
  ) : void 0;
2165
- return x && !b.isLoading ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: bt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
2166
+ return x && !b.isLoading ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
2166
2167
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
2167
2168
  Ie,
2168
2169
  {
@@ -2196,7 +2197,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2196
2197
  }
2197
2198
  ),
2198
2199
  /* @__PURE__ */ n(
2199
- gt,
2200
+ pt,
2200
2201
  {
2201
2202
  chinTextColor: b.chinTextColor,
2202
2203
  variant: "dark",
@@ -2215,7 +2216,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2215
2216
  ]
2216
2217
  }
2217
2218
  );
2218
- }, vt = ({
2219
+ }, xt = ({
2219
2220
  accentHex: e,
2220
2221
  side: t,
2221
2222
  visible: s,
@@ -2240,7 +2241,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2240
2241
  }
2241
2242
  )
2242
2243
  ] })
2243
- ) : /* @__PURE__ */ n(K, { children: a }), Fr = ({
2244
+ ) : /* @__PURE__ */ n(K, { children: a }), zr = ({
2244
2245
  title: e,
2245
2246
  description: t,
2246
2247
  descriptionLines: s,
@@ -2256,13 +2257,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2256
2257
  onClick: g,
2257
2258
  groupPosition: c = "single"
2258
2259
  }) => {
2259
- const p = pt(r, o), w = ft(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, o) ? bt : void 0, N = u && g ? {
2260
+ const p = bt(r, o), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, o) ? vt : void 0, N = u && g ? {
2260
2261
  ...u,
2261
2262
  onClick: () => {
2262
2263
  var T;
2263
2264
  g(), (T = u.onClick) == null || T.call(u);
2264
2265
  }
2265
- } : u, _ = Ve({
2266
+ } : u, _ = Ge({
2266
2267
  variant: "light",
2267
2268
  accentColor: h,
2268
2269
  status: m,
@@ -2272,7 +2273,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2272
2273
  sourceUrl: o
2273
2274
  });
2274
2275
  return /* @__PURE__ */ n(
2275
- vt,
2276
+ xt,
2276
2277
  {
2277
2278
  accentHex: _.accentHex,
2278
2279
  side: "receiver",
@@ -2303,7 +2304,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2303
2304
  }
2304
2305
  ),
2305
2306
  /* @__PURE__ */ n(
2306
- gt,
2307
+ pt,
2307
2308
  {
2308
2309
  chinTextColor: _.chinTextColor,
2309
2310
  variant: "light",
@@ -2322,7 +2323,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2322
2323
  )
2323
2324
  }
2324
2325
  );
2325
- }, $r = ({
2326
+ }, Fr = ({
2326
2327
  title: e,
2327
2328
  placeholderTitle: t,
2328
2329
  description: s,
@@ -2339,7 +2340,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2339
2340
  onClick: c,
2340
2341
  groupPosition: p = "single"
2341
2342
  }) => {
2342
- const w = pt(i, l), v = ft(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, N = g !== "loading" && Te(i, l), _ = Ve({
2343
+ const w = bt(i, l), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, N = g !== "loading" && Te(i, l), _ = Ge({
2343
2344
  variant: "dark",
2344
2345
  accentColor: m,
2345
2346
  status: g,
@@ -2349,7 +2350,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2349
2350
  sourceUrl: l
2350
2351
  });
2351
2352
  return /* @__PURE__ */ n(
2352
- vt,
2353
+ xt,
2353
2354
  {
2354
2355
  accentHex: _.accentHex,
2355
2356
  side: "sender",
@@ -2363,7 +2364,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2363
2364
  fixedHeight: d === "featured" && !N,
2364
2365
  accentHex: _.accentHex,
2365
2366
  busy: _.isLoading,
2366
- bgClassName: N ? bt : void 0,
2367
+ bgClassName: N ? vt : void 0,
2367
2368
  children: [
2368
2369
  d === "featured" && /* @__PURE__ */ n(
2369
2370
  Ie,
@@ -2378,7 +2379,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2378
2379
  }
2379
2380
  ),
2380
2381
  /* @__PURE__ */ n(
2381
- gt,
2382
+ pt,
2382
2383
  {
2383
2384
  chinTextColor: _.chinTextColor,
2384
2385
  variant: "dark",
@@ -2398,20 +2399,20 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2398
2399
  )
2399
2400
  }
2400
2401
  );
2401
- }, rt = {
2402
- Composer: zr,
2403
- Sent: $r,
2404
- Received: Fr
2405
- }, Br = {
2402
+ }, it = {
2403
+ Composer: Pr,
2404
+ Sent: Fr,
2405
+ Received: zr
2406
+ }, $r = {
2406
2407
  dark: "bg-[#1e2330]",
2407
2408
  light: "bg-[#f2f1ef]"
2408
- }, Ur = {
2409
+ }, Br = {
2409
2410
  dark: "text-white",
2410
2411
  light: "text-[#000000]"
2411
- }, jr = {
2412
+ }, Ur = {
2412
2413
  dark: "border-white/[0.08]",
2413
2414
  light: "border-black/[0.08]"
2414
- }, Hr = (e) => e === "dark" ? "sender" : "receiver", Vr = {
2415
+ }, jr = (e) => e === "dark" ? "sender" : "receiver", Hr = {
2415
2416
  sender: {
2416
2417
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
2417
2418
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -2436,7 +2437,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2436
2437
  children: d,
2437
2438
  "data-testid": u
2438
2439
  }) => {
2439
- const h = t != null && t !== "", m = o ?? Vr[Hr(e)][a];
2440
+ const h = t != null && t !== "", m = o ?? Hr[jr(e)][a];
2440
2441
  return /* @__PURE__ */ f(
2441
2442
  "div",
2442
2443
  {
@@ -2465,10 +2466,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2465
2466
  // there is no ambiguity to resolve.
2466
2467
  h && "pb-0",
2467
2468
  m,
2469
+ $r[e],
2468
2470
  Br[e],
2469
- Ur[e],
2470
2471
  s && "border",
2471
- s && jr[e],
2472
+ s && Ur[e],
2472
2473
  l
2473
2474
  ),
2474
2475
  children: [
@@ -2512,18 +2513,18 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2512
2513
  "flex size-6 items-center justify-center rounded-full text-white",
2513
2514
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
2514
2515
  ),
2515
- children: /* @__PURE__ */ n(it, { className: "size-3", weight: "bold" })
2516
+ children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
2516
2517
  }
2517
- ), Le = (e) => e === "received" ? "light" : "dark", so = ({
2518
+ ), Le = (e) => e === "received" ? "light" : "dark", no = ({
2518
2519
  firstOfGroup: e,
2519
2520
  endOfGroup: t,
2520
2521
  groupedByUser: s
2521
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Gr = ({
2522
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Vr = ({
2522
2523
  src: e,
2523
2524
  mimeType: t,
2524
2525
  filename: s,
2525
2526
  items: a
2526
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Yr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
2527
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Gr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
2527
2528
  /* @__PURE__ */ n(
2528
2529
  "audio",
2529
2530
  {
@@ -2535,7 +2536,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2535
2536
  }
2536
2537
  ),
2537
2538
  s ?? null
2538
- ] }), xt = ({
2539
+ ] }), wt = ({
2539
2540
  state: e,
2540
2541
  src: t,
2541
2542
  mimeType: s,
@@ -2546,7 +2547,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2546
2547
  preload: l,
2547
2548
  onDismiss: d
2548
2549
  }) => {
2549
- const u = Le(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: s, filename: a, items: r });
2550
+ const u = Le(e), h = e === "composer" && !!d, m = Vr({ src: t, mimeType: s, filename: a, items: r });
2550
2551
  if (m.length === 0)
2551
2552
  return null;
2552
2553
  const g = l ?? (m.length > 1 ? "none" : "metadata");
@@ -2558,7 +2559,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2558
2559
  groupPosition: o,
2559
2560
  "data-testid": "audio-attachment",
2560
2561
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, p) => /* @__PURE__ */ n(
2561
- Yr,
2562
+ Gr,
2562
2563
  {
2563
2564
  item: c,
2564
2565
  preload: g,
@@ -2572,15 +2573,15 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2572
2573
  )) })
2573
2574
  }
2574
2575
  );
2575
- }, Wr = (e) => /* @__PURE__ */ n(xt, { ...e, state: "composer" }), Xr = (e) => /* @__PURE__ */ n(xt, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ n(xt, { ...e, state: "received" }), Kr = {
2576
- Composer: Wr,
2577
- Sent: Xr,
2578
- Received: qr
2576
+ }, Yr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), qr = {
2577
+ Composer: Yr,
2578
+ Sent: Wr,
2579
+ Received: Xr
2579
2580
  };
2580
- function Zr(e) {
2581
+ function Kr(e) {
2581
2582
  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`;
2582
2583
  }
2583
- const Jr = {
2584
+ const Zr = {
2584
2585
  pdf: "PDF",
2585
2586
  doc: "DOC",
2586
2587
  xls: "XLS",
@@ -2590,7 +2591,7 @@ const Jr = {
2590
2591
  text: "TXT",
2591
2592
  markdown: "MD"
2592
2593
  };
2593
- function Qr(e, t) {
2594
+ function Jr(e, t) {
2594
2595
  if (t) {
2595
2596
  const r = t.lastIndexOf(".");
2596
2597
  if (r > 0 && r < t.length - 1) {
@@ -2600,7 +2601,7 @@ function Qr(e, t) {
2600
2601
  }
2601
2602
  if (!e) return;
2602
2603
  if (de(e) === "document") {
2603
- const r = Nn(e), i = Jr[r];
2604
+ const r = kn(e), i = Zr[r];
2604
2605
  if (i) return i;
2605
2606
  if (e === "application/octet-stream") return;
2606
2607
  }
@@ -2608,8 +2609,8 @@ function Qr(e, t) {
2608
2609
  if (!(!a || a === "*"))
2609
2610
  return a.toUpperCase();
2610
2611
  }
2611
- function ei(e, t, s) {
2612
- const a = Qr(e, t), r = typeof s == "number" && s > 0 ? Zr(s) : void 0;
2612
+ function Qr(e, t, s) {
2613
+ const a = Jr(e, t), r = typeof s == "number" && s > 0 ? Kr(s) : void 0;
2613
2614
  return [a, r].filter(Boolean).join(" · ") || void 0;
2614
2615
  }
2615
2616
  function re(e) {
@@ -2620,13 +2621,13 @@ function re(e) {
2620
2621
  return "download";
2621
2622
  }
2622
2623
  }
2623
- const ti = {
2624
+ const ei = {
2624
2625
  dark: "text-white/55",
2625
2626
  light: "text-black/65"
2626
- }, ni = {
2627
+ }, ti = {
2627
2628
  dark: "bg-white/10",
2628
2629
  light: "bg-black/5"
2629
- }, si = {
2630
+ }, ni = {
2630
2631
  dark: "text-white/85",
2631
2632
  light: "text-black/85"
2632
2633
  }, Pn = ({
@@ -2639,16 +2640,16 @@ const ti = {
2639
2640
  activateLabel: o,
2640
2641
  trailingAction: l
2641
2642
  }) => {
2642
- const d = s ?? t ?? "File", u = ei(a, t, r), h = /* @__PURE__ */ n(
2643
+ const d = s ?? t ?? "File", u = Qr(a, t, r), h = /* @__PURE__ */ n(
2643
2644
  "div",
2644
2645
  {
2645
2646
  className: k(
2646
2647
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
2647
- ni[e]
2648
+ ti[e]
2648
2649
  ),
2649
2650
  "aria-hidden": !0,
2650
2651
  children: ve(a, {
2651
- className: k("size-6", si[e]),
2652
+ className: k("size-6", ni[e]),
2652
2653
  weight: "regular"
2653
2654
  })
2654
2655
  }
@@ -2659,7 +2660,7 @@ const ti = {
2659
2660
  {
2660
2661
  className: k(
2661
2662
  "truncate text-xs leading-4",
2662
- ti[e]
2663
+ ei[e]
2663
2664
  ),
2664
2665
  children: u
2665
2666
  }
@@ -2702,14 +2703,14 @@ async function zn(e, t) {
2702
2703
  }
2703
2704
  }
2704
2705
  }
2705
- const ai = ({
2706
+ const si = ({
2706
2707
  src: e,
2707
2708
  filename: t,
2708
2709
  fileSize: s,
2709
2710
  mimeType: a,
2710
2711
  title: r,
2711
2712
  items: i
2712
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], ri = ({
2713
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], ai = ({
2713
2714
  variant: e,
2714
2715
  item: t,
2715
2716
  index: s,
@@ -2730,7 +2731,7 @@ const ai = ({
2730
2731
  trailingAction: r
2731
2732
  }
2732
2733
  );
2733
- }, wt = ({
2734
+ }, _t = ({
2734
2735
  state: e,
2735
2736
  src: t,
2736
2737
  filename: s,
@@ -2743,7 +2744,7 @@ const ai = ({
2743
2744
  onClick: u,
2744
2745
  onDismiss: h
2745
2746
  }) => {
2746
- const m = Le(e), g = e === "composer" && !!h, c = ai({
2747
+ const m = Le(e), g = e === "composer" && !!h, c = si({
2747
2748
  src: t,
2748
2749
  filename: s,
2749
2750
  fileSize: a,
@@ -2778,7 +2779,7 @@ const ai = ({
2778
2779
  groupPosition: d,
2779
2780
  "data-testid": "file-attachment",
2780
2781
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
2781
- ri,
2782
+ ai,
2782
2783
  {
2783
2784
  variant: m,
2784
2785
  item: v,
@@ -2790,11 +2791,11 @@ const ai = ({
2790
2791
  )) })
2791
2792
  }
2792
2793
  );
2793
- }, ii = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), li = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), oi = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), ci = {
2794
- Composer: ii,
2795
- Sent: li,
2796
- Received: oi
2797
- }, Fn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", en = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", _t = ({
2794
+ }, ri = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), oi = {
2795
+ Composer: ri,
2796
+ Sent: ii,
2797
+ Received: li
2798
+ }, Fn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
2798
2799
  onPrev: e,
2799
2800
  onNext: t,
2800
2801
  prevLabel: s = "Previous",
@@ -2806,8 +2807,8 @@ const ai = ({
2806
2807
  type: "button",
2807
2808
  onClick: e,
2808
2809
  "aria-label": s,
2809
- className: `${en} left-4`,
2810
- children: /* @__PURE__ */ n(ga, { size: 20, weight: "bold", "aria-hidden": !0 })
2810
+ className: `${tn} left-4`,
2811
+ children: /* @__PURE__ */ n(fa, { size: 20, weight: "bold", "aria-hidden": !0 })
2811
2812
  }
2812
2813
  ),
2813
2814
  /* @__PURE__ */ n(
@@ -2816,8 +2817,8 @@ const ai = ({
2816
2817
  type: "button",
2817
2818
  onClick: t,
2818
2819
  "aria-label": a,
2819
- className: `${en} right-4`,
2820
- children: /* @__PURE__ */ n(hn, { size: 20, weight: "bold", "aria-hidden": !0 })
2820
+ className: `${tn} right-4`,
2821
+ children: /* @__PURE__ */ n(fn, { size: 20, weight: "bold", "aria-hidden": !0 })
2821
2822
  }
2822
2823
  )
2823
2824
  ] }), $n = ({
@@ -2905,16 +2906,16 @@ const ai = ({
2905
2906
  ]
2906
2907
  }
2907
2908
  );
2908
- }, Je = (e, t, s) => Math.min(Math.max(e, t), s), yt = ({
2909
+ }, Qe = (e, t, s) => Math.min(Math.max(e, t), s), Nt = ({
2909
2910
  length: e,
2910
2911
  initialIndex: t,
2911
2912
  open: s
2912
2913
  }) => {
2913
- const a = Je(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2914
+ const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2914
2915
  Y(() => {
2915
- s && i(Je(t, 0, Math.max(e - 1, 0)));
2916
+ s && i(Qe(t, 0, Math.max(e - 1, 0)));
2916
2917
  }, [s, t, e]), Y(() => {
2917
- i((d) => Je(d, 0, Math.max(e - 1, 0)));
2918
+ i((d) => Qe(d, 0, Math.max(e - 1, 0)));
2918
2919
  }, [e]);
2919
2920
  const o = q(() => {
2920
2921
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
@@ -2930,7 +2931,7 @@ const ai = ({
2930
2931
  };
2931
2932
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2932
2933
  }, [s, e, o, l]), { index: r, prev: o, next: l };
2933
- }, Nt = ({
2934
+ }, kt = ({
2934
2935
  open: e,
2935
2936
  onClose: t,
2936
2937
  ariaLabel: s,
@@ -3011,7 +3012,7 @@ const ai = ({
3011
3012
  onClick: t,
3012
3013
  "aria-label": "Close viewer",
3013
3014
  className: Fn,
3014
- children: /* @__PURE__ */ n(it, { size: 20, weight: "bold", "aria-hidden": !0 })
3015
+ children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
3015
3016
  }
3016
3017
  )
3017
3018
  ] })
@@ -3026,7 +3027,7 @@ const ai = ({
3026
3027
  initialIndex: s = 0,
3027
3028
  onClose: a
3028
3029
  }) => {
3029
- const { index: r, prev: i, next: o } = yt({
3030
+ const { index: r, prev: i, next: o } = Nt({
3030
3031
  length: t.length,
3031
3032
  initialIndex: s,
3032
3033
  open: e
@@ -3035,7 +3036,7 @@ const ai = ({
3035
3036
  [l]
3036
3037
  );
3037
3038
  return l ? /* @__PURE__ */ f(
3038
- Nt,
3039
+ kt,
3039
3040
  {
3040
3041
  open: e,
3041
3042
  onClose: a,
@@ -3064,7 +3065,7 @@ const ai = ({
3064
3065
  `${r}:${l.src}`
3065
3066
  ) : null,
3066
3067
  t.length > 1 ? /* @__PURE__ */ n(
3067
- _t,
3068
+ yt,
3068
3069
  {
3069
3070
  onPrev: i,
3070
3071
  onNext: o,
@@ -3075,7 +3076,7 @@ const ai = ({
3075
3076
  ]
3076
3077
  }
3077
3078
  ) : null;
3078
- }, di = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", ui = {
3079
+ }, ci = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", di = {
3079
3080
  1: ["rounded-[18px]"],
3080
3081
  2: ["rounded-l-[18px]", "rounded-r-[18px]"],
3081
3082
  3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
@@ -3085,7 +3086,7 @@ const ai = ({
3085
3086
  "rounded-bl-[18px]",
3086
3087
  "rounded-br-[18px]"
3087
3088
  ]
3088
- }, mi = "--mes-single-width-cap", hi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", fi = 436, Un = ({
3089
+ }, ui = "--mes-single-width-cap", mi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", hi = 436, Un = ({
3089
3090
  tiles: e,
3090
3091
  onTileActivate: t,
3091
3092
  maxVisible: s = 4,
@@ -3097,9 +3098,9 @@ const ai = ({
3097
3098
  const o = e.slice(0, Math.min(i, s)), l = i - o.length, d = (h, m, g) => {
3098
3099
  var p;
3099
3100
  const c = k(
3100
- di,
3101
+ ci,
3101
3102
  "h-full w-full",
3102
- (p = ui[o.length]) == null ? void 0 : p[m]
3103
+ (p = di[o.length]) == null ? void 0 : p[m]
3103
3104
  );
3104
3105
  return t ? /* @__PURE__ */ f(
3105
3106
  "button",
@@ -3124,14 +3125,14 @@ const ai = ({
3124
3125
  aspectRatio: a,
3125
3126
  // Hundredths keep the emitted declaration readable in devtools;
3126
3127
  // the rounding error is well under a device pixel.
3127
- width: `min(var(${mi}), ${Math.round(fi * a * 100) / 100}px)`,
3128
+ width: `min(var(${ui}), ${Math.round(hi * a * 100) / 100}px)`,
3128
3129
  // Only bites in a container narrower than the width cap.
3129
3130
  maxWidth: "100%"
3130
3131
  }), o.length === 1 ? /* @__PURE__ */ n(
3131
3132
  "div",
3132
3133
  {
3133
3134
  className: k(
3134
- a ? hi : "aspect-square w-full",
3135
+ a ? mi : "aspect-square w-full",
3135
3136
  r
3136
3137
  ),
3137
3138
  style: u,
@@ -3194,7 +3195,7 @@ const ai = ({
3194
3195
  [e]
3195
3196
  ), o = q(() => s(!1), []);
3196
3197
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3197
- }, gi = ({
3198
+ }, fi = ({
3198
3199
  item: e,
3199
3200
  index: t,
3200
3201
  totalCount: s,
@@ -3222,7 +3223,7 @@ const ai = ({
3222
3223
  }
3223
3224
  )
3224
3225
  )
3225
- }), pi = ({
3226
+ }), gi = ({
3226
3227
  src: e,
3227
3228
  alt: t,
3228
3229
  items: s
@@ -3230,7 +3231,7 @@ const ai = ({
3230
3231
  src: s.src,
3231
3232
  alt: s.alt,
3232
3233
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3233
- })), bi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3234
+ })), pi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3234
3235
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Me(r);
3235
3236
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3236
3237
  /* @__PURE__ */ n(
@@ -3264,7 +3265,7 @@ const ai = ({
3264
3265
  }
3265
3266
  )
3266
3267
  ] });
3267
- }, vi = 326 / 246, xi = (e) => {
3268
+ }, bi = 326 / 246, vi = (e) => {
3268
3269
  const t = e == null ? void 0 : e.src, [s, a] = z.useState(), r = z.useCallback(
3269
3270
  (d) => {
3270
3271
  if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
@@ -3279,7 +3280,7 @@ const ai = ({
3279
3280
  [r]
3280
3281
  ), o = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, l = s && s.src === t ? s.ratio : void 0;
3281
3282
  return {
3282
- ratio: o ?? l ?? vi,
3283
+ ratio: o ?? l ?? bi,
3283
3284
  imgRef: r,
3284
3285
  onLoad: i
3285
3286
  };
@@ -3294,11 +3295,11 @@ const ai = ({
3294
3295
  loading: l = "lazy",
3295
3296
  onClick: d
3296
3297
  }) => {
3297
- const u = pi({ src: t, alt: s, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Me(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
3298
+ const u = gi({ src: t, alt: s, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Me(d), w = u.length === 1, v = vi(w ? u[0] : void 0);
3298
3299
  if (u.length === 0)
3299
3300
  return null;
3300
3301
  const x = u.map(
3301
- (b, N) => gi({
3302
+ (b, N) => fi({
3302
3303
  item: b,
3303
3304
  index: N,
3304
3305
  totalCount: u.length,
@@ -3339,17 +3340,17 @@ const ai = ({
3339
3340
  ]
3340
3341
  }
3341
3342
  );
3342
- }, wi = (e) => /* @__PURE__ */ n(bi, { ...e }), _i = (e) => /* @__PURE__ */ n(Hn, { ...e, state: "sent" }), yi = (e) => /* @__PURE__ */ n(Hn, { ...e, state: "received" }), Ni = {
3343
- Composer: wi,
3344
- Sent: _i,
3345
- Received: yi
3346
- }, ki = ({
3343
+ }, xi = (e) => /* @__PURE__ */ n(pi, { ...e }), wi = (e) => /* @__PURE__ */ n(Hn, { ...e, state: "sent" }), _i = (e) => /* @__PURE__ */ n(Hn, { ...e, state: "received" }), yi = {
3344
+ Composer: xi,
3345
+ Sent: wi,
3346
+ Received: _i
3347
+ }, Ni = ({
3347
3348
  open: e,
3348
3349
  items: t,
3349
3350
  initialIndex: s = 0,
3350
3351
  onClose: a
3351
3352
  }) => {
3352
- const { index: r, prev: i, next: o } = yt({
3353
+ const { index: r, prev: i, next: o } = Nt({
3353
3354
  length: t.length,
3354
3355
  initialIndex: s,
3355
3356
  open: e
@@ -3357,11 +3358,11 @@ const ai = ({
3357
3358
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
3358
3359
  [l]
3359
3360
  ), u = le(
3360
- () => l ? Ci(l.src) : void 0,
3361
+ () => l ? ki(l.src) : void 0,
3361
3362
  [l]
3362
3363
  );
3363
3364
  return !l || !u ? null : /* @__PURE__ */ f(
3364
- Nt,
3365
+ kt,
3365
3366
  {
3366
3367
  open: e,
3367
3368
  onClose: a,
@@ -3380,7 +3381,7 @@ const ai = ({
3380
3381
  `${r}:${l.src}`
3381
3382
  ),
3382
3383
  t.length > 1 ? /* @__PURE__ */ n(
3383
- _t,
3384
+ yt,
3384
3385
  {
3385
3386
  onPrev: i,
3386
3387
  onNext: o,
@@ -3391,16 +3392,16 @@ const ai = ({
3391
3392
  ]
3392
3393
  }
3393
3394
  );
3394
- }, Ci = (e) => {
3395
+ }, ki = (e) => {
3395
3396
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
3396
3397
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
3397
- }, Si = ({
3398
+ }, Ci = ({
3398
3399
  src: e,
3399
3400
  filename: t,
3400
3401
  fileSize: s,
3401
3402
  title: a,
3402
3403
  items: r
3403
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Ei = ({
3404
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Si = ({
3404
3405
  variant: e,
3405
3406
  item: t,
3406
3407
  index: s,
@@ -3421,7 +3422,7 @@ const ai = ({
3421
3422
  trailingAction: r
3422
3423
  }
3423
3424
  );
3424
- }, kt = ({
3425
+ }, Ct = ({
3425
3426
  state: e,
3426
3427
  src: t,
3427
3428
  filename: s,
@@ -3433,7 +3434,7 @@ const ai = ({
3433
3434
  onClick: d,
3434
3435
  onDismiss: u
3435
3436
  }) => {
3436
- const h = Le(e), m = Si({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(d), v = e === "composer" && !!u;
3437
+ const h = Le(e), m = Ci({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(d), v = e === "composer" && !!u;
3437
3438
  if (m.length === 0)
3438
3439
  return null;
3439
3440
  const x = m.map((b) => ({
@@ -3460,7 +3461,7 @@ const ai = ({
3460
3461
  }
3461
3462
  );
3462
3463
  return /* @__PURE__ */ n(
3463
- Ei,
3464
+ Si,
3464
3465
  {
3465
3466
  variant: h,
3466
3467
  item: b,
@@ -3472,7 +3473,7 @@ const ai = ({
3472
3473
  );
3473
3474
  }) }),
3474
3475
  /* @__PURE__ */ n(
3475
- ki,
3476
+ Ni,
3476
3477
  {
3477
3478
  open: g,
3478
3479
  items: x,
@@ -3483,17 +3484,17 @@ const ai = ({
3483
3484
  ]
3484
3485
  }
3485
3486
  );
3486
- }, Ii = (e) => /* @__PURE__ */ n(kt, { ...e, state: "composer" }), Ti = (e) => /* @__PURE__ */ n(kt, { ...e, state: "sent" }), Ai = (e) => /* @__PURE__ */ n(kt, { ...e, state: "received" }), Ri = {
3487
- Composer: Ii,
3488
- Sent: Ti,
3489
- Received: Ai
3487
+ }, Ei = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "composer" }), Ii = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "sent" }), Ti = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "received" }), Ai = {
3488
+ Composer: Ei,
3489
+ Sent: Ii,
3490
+ Received: Ti
3490
3491
  }, Vn = ({
3491
3492
  open: e,
3492
3493
  items: t,
3493
3494
  initialIndex: s = 0,
3494
3495
  onClose: a
3495
3496
  }) => {
3496
- const { index: r, prev: i, next: o } = yt({
3497
+ const { index: r, prev: i, next: o } = Nt({
3497
3498
  length: t.length,
3498
3499
  initialIndex: s,
3499
3500
  open: e
@@ -3502,7 +3503,7 @@ const ai = ({
3502
3503
  [l]
3503
3504
  );
3504
3505
  return l ? /* @__PURE__ */ f(
3505
- Nt,
3506
+ kt,
3506
3507
  {
3507
3508
  open: e,
3508
3509
  onClose: a,
@@ -3526,7 +3527,7 @@ const ai = ({
3526
3527
  `${r}:${l.src}`
3527
3528
  ),
3528
3529
  t.length > 1 ? /* @__PURE__ */ n(
3529
- _t,
3530
+ yt,
3530
3531
  {
3531
3532
  onPrev: i,
3532
3533
  onNext: o,
@@ -3537,7 +3538,7 @@ const ai = ({
3537
3538
  ]
3538
3539
  }
3539
3540
  ) : null;
3540
- }, Li = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Gn = ({
3541
+ }, Ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Gn = ({
3541
3542
  item: e,
3542
3543
  index: t
3543
3544
  }) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -3552,18 +3553,18 @@ const ai = ({
3552
3553
  className: "absolute inset-0 size-full object-cover"
3553
3554
  }
3554
3555
  ) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
3555
- gn,
3556
+ pn,
3556
3557
  {
3557
3558
  className: "size-16 text-white/30",
3558
3559
  weight: "regular",
3559
3560
  "aria-hidden": !0
3560
3561
  }
3561
3562
  ) }),
3562
- /* @__PURE__ */ n(Li, {})
3563
- ] }), Mi = (e, t, s) => ({
3563
+ /* @__PURE__ */ n(Ri, {})
3564
+ ] }), Li = (e, t, s) => ({
3564
3565
  ariaLabel: `Play video ${t + 1} of ${s}`,
3565
3566
  content: /* @__PURE__ */ n(Gn, { item: e, index: t })
3566
- }), Di = ({
3567
+ }), Mi = ({
3567
3568
  src: e,
3568
3569
  poster: t,
3569
3570
  mimeType: s,
@@ -3575,7 +3576,7 @@ const ai = ({
3575
3576
  mimeType: s.mimeType,
3576
3577
  preload: s.preload,
3577
3578
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3578
- })), Oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
3579
+ })), Di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
3579
3580
  const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Me(i);
3580
3581
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3581
3582
  /* @__PURE__ */ n(
@@ -3611,11 +3612,11 @@ const ai = ({
3611
3612
  preload: d,
3612
3613
  onClick: u
3613
3614
  }) => {
3614
- const h = Di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(u);
3615
+ const h = Mi({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(u);
3615
3616
  if (h.length === 0)
3616
3617
  return null;
3617
3618
  const v = h.map(
3618
- (x, b) => Mi(x, b, h.length)
3619
+ (x, b) => Li(x, b, h.length)
3619
3620
  );
3620
3621
  return /* @__PURE__ */ f(
3621
3622
  Ae,
@@ -3638,28 +3639,28 @@ const ai = ({
3638
3639
  ]
3639
3640
  }
3640
3641
  );
3641
- }, Pi = (e) => /* @__PURE__ */ n(Oi, { ...e }), zi = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "sent" }), Fi = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "received" }), $i = {
3642
- Composer: Pi,
3643
- Sent: zi,
3644
- Received: Fi
3642
+ }, Oi = (e) => /* @__PURE__ */ n(Di, { ...e }), Pi = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "sent" }), zi = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "received" }), Fi = {
3643
+ Composer: Oi,
3644
+ Sent: Pi,
3645
+ Received: zi
3645
3646
  }, ke = {
3646
- Image: Ni,
3647
- Video: $i,
3648
- Audio: Kr,
3649
- Pdf: Ri,
3650
- File: ci
3647
+ Image: yi,
3648
+ Video: Fi,
3649
+ Audio: qr,
3650
+ Pdf: Ai,
3651
+ File: oi
3651
3652
  };
3652
3653
  function O(e) {
3653
3654
  const t = e == null ? void 0 : e.trim();
3654
3655
  return t || void 0;
3655
3656
  }
3656
- function tn(e) {
3657
+ function nn(e) {
3657
3658
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3658
3659
  }
3659
- function Bi(e, t) {
3660
+ function $i(e, t) {
3660
3661
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3661
3662
  return !1;
3662
- const s = tn(e), a = tn(t);
3663
+ const s = nn(e), a = nn(t);
3663
3664
  if (s === a)
3664
3665
  return !0;
3665
3666
  if (!s.includes(a))
@@ -3667,7 +3668,7 @@ function Bi(e, t) {
3667
3668
  const r = s.split(a).join("");
3668
3669
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3669
3670
  }
3670
- function nn(e) {
3671
+ function sn(e) {
3671
3672
  const t = O(e.og_scrape_url) ?? O(e.title_link), s = O(e.image_url) ?? O(e.thumb_url), a = O(e.asset_url), r = O(e.mime_type);
3672
3673
  return {
3673
3674
  title: O(e.title),
@@ -3677,7 +3678,7 @@ function nn(e) {
3677
3678
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3678
3679
  // native video/audio player in the hero instead of a static thumbnail.
3679
3680
  sourceUrl: a,
3680
- layout: s || pt(r, a) ? "featured" : "classic",
3681
+ layout: s || bt(r, a) ? "featured" : "classic",
3681
3682
  mimeType: r,
3682
3683
  // Dominant colour of the image, resolved by the sender at stage time and
3683
3684
  // persisted on the attachment (`stream-custom-data.ts`), so every viewer
@@ -3689,15 +3690,11 @@ function nn(e) {
3689
3690
  status: "ready"
3690
3691
  };
3691
3692
  }
3692
- function Ui(e) {
3693
+ function Bi(e) {
3693
3694
  var t;
3694
- return Xn(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;
3695
+ return Ve(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;
3695
3696
  }
3696
3697
  function Xn(e) {
3697
- const t = O(e.og_scrape_url);
3698
- return e.type === "link" || !!t && !e.asset_url;
3699
- }
3700
- function qn(e) {
3701
3698
  if (!(e != null && e.length)) return [];
3702
3699
  const t = [], s = (r, i) => {
3703
3700
  const o = t[t.length - 1];
@@ -3715,25 +3712,25 @@ function qn(e) {
3715
3712
  t.push({ type: "link", attachments: [r] });
3716
3713
  };
3717
3714
  for (const r of e) {
3718
- if (Xn(r)) {
3715
+ if (Ve(r)) {
3719
3716
  a(r);
3720
3717
  continue;
3721
3718
  }
3722
- const i = Ui(r);
3719
+ const i = Bi(r);
3723
3720
  i && s(i, r);
3724
3721
  }
3725
3722
  return t;
3726
3723
  }
3727
- function ji(e) {
3724
+ function Ui(e) {
3728
3725
  return e.filter((t) => t.type === "media").length;
3729
3726
  }
3730
- function Hi(e, t, s) {
3727
+ function ji(e, t, s) {
3731
3728
  return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3732
3729
  }
3733
- function sn(e) {
3730
+ function an(e) {
3734
3731
  return O(e.image_url) ?? O(e.asset_url) ?? "";
3735
3732
  }
3736
- function Vi(e) {
3733
+ function Hi(e) {
3737
3734
  switch (e) {
3738
3735
  case "image":
3739
3736
  return ke.Image;
@@ -3747,13 +3744,13 @@ function Vi(e) {
3747
3744
  return ke.File;
3748
3745
  }
3749
3746
  }
3750
- function Gi(e, t) {
3747
+ function Vi(e, t) {
3751
3748
  if (t.length > 1)
3752
3749
  switch (e) {
3753
3750
  case "image":
3754
3751
  return {
3755
3752
  items: t.map((a) => ({
3756
- src: sn(a),
3753
+ src: an(a),
3757
3754
  alt: O(a.title)
3758
3755
  }))
3759
3756
  };
@@ -3798,7 +3795,7 @@ function Gi(e, t) {
3798
3795
  switch (e) {
3799
3796
  case "image":
3800
3797
  return {
3801
- src: sn(s),
3798
+ src: an(s),
3802
3799
  alt: O(s.title)
3803
3800
  };
3804
3801
  case "video":
@@ -3830,49 +3827,49 @@ function Gi(e, t) {
3830
3827
  };
3831
3828
  }
3832
3829
  }
3833
- function Yi({
3830
+ function Gi({
3834
3831
  groupPosition: e,
3835
3832
  isMyMessage: t,
3836
3833
  segment: s
3837
3834
  }) {
3838
- const a = Vi(s.kind), r = {
3839
- ...Gi(s.kind, s.attachments),
3835
+ const a = Hi(s.kind), r = {
3836
+ ...Vi(s.kind, s.attachments),
3840
3837
  groupPosition: e
3841
3838
  };
3842
3839
  return t ? /* @__PURE__ */ n(a.Sent, { ...r }) : /* @__PURE__ */ n(a.Received, { ...r });
3843
3840
  }
3844
- const Wi = ({
3841
+ const Yi = ({
3845
3842
  groupPosition: e,
3846
3843
  isMyMessage: t,
3847
3844
  message: s,
3848
3845
  renderText: a
3849
3846
  }) => {
3850
3847
  var v;
3851
- const r = qn(s.attachments);
3848
+ const r = Xn(s.attachments);
3852
3849
  if (r.length === 0) return null;
3853
- const i = ji(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? nn(l.attachments[0] ?? {}).url : void 0, u = o && Bi(o, d) ? void 0 : o;
3850
+ const i = Ui(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? sn(l.attachments[0] ?? {}).url : void 0, u = o && $i(o, d) ? void 0 : o;
3854
3851
  let h = 0;
3855
3852
  const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, N) => {
3856
- const _ = t ? rt.Sent : rt.Received;
3853
+ const _ = t ? it.Sent : it.Received;
3857
3854
  m.push(
3858
3855
  /* @__PURE__ */ n(
3859
3856
  _,
3860
3857
  {
3861
- ...nn(x),
3858
+ ...sn(x),
3862
3859
  groupPosition: N ? g : "middle"
3863
3860
  },
3864
3861
  b
3865
3862
  )
3866
3863
  );
3867
3864
  }, w = (x, b) => {
3868
- const N = Hi(
3865
+ const N = ji(
3869
3866
  h,
3870
3867
  i,
3871
3868
  e
3872
3869
  );
3873
3870
  h += 1, m.push(
3874
3871
  /* @__PURE__ */ n(
3875
- Yi,
3872
+ Gi,
3876
3873
  {
3877
3874
  groupPosition: N,
3878
3875
  isMyMessage: t,
@@ -3909,7 +3906,7 @@ const Wi = ({
3909
3906
  },
3910
3907
  children: [
3911
3908
  m,
3912
- !u && /* @__PURE__ */ n(nt, {})
3909
+ !u && /* @__PURE__ */ n(st, {})
3913
3910
  ]
3914
3911
  }
3915
3912
  ),
@@ -3921,14 +3918,14 @@ const Wi = ({
3921
3918
  }),
3922
3919
  children: [
3923
3920
  /* @__PURE__ */ n(ze, { message: s, renderText: a }),
3924
- /* @__PURE__ */ n(nt, {}),
3921
+ /* @__PURE__ */ n(st, {}),
3925
3922
  c && /* @__PURE__ */ n($e, { side: t ? "me" : "other" })
3926
3923
  ]
3927
3924
  }
3928
3925
  ) : null
3929
3926
  ] });
3930
- }, Xi = (e) => {
3931
- var Rt, Lt, Mt, Dt, Ot, Pt, zt, Ft, $t, Bt;
3927
+ }, Wi = (e) => {
3928
+ var Lt, Mt, Dt, Ot, Pt, zt, Ft, $t, Bt, Ut;
3932
3929
  const {
3933
3930
  additionalMessageInputProps: t,
3934
3931
  editing: s,
@@ -3948,46 +3945,46 @@ const Wi = ({
3948
3945
  viewerLanguage: v,
3949
3946
  onOutboundClick: x,
3950
3947
  resolvedOutbound: b
3951
- } = e, { client: N } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } = sr("LockedAttachment"), [F, R] = B(!1), I = hs(c.id), {
3952
- Attachment: D = fs,
3953
- EditMessageModal: S = gs,
3948
+ } = e, { client: N } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } = nr("LockedAttachment"), [F, R] = B(!1), I = ms(c.id), {
3949
+ Attachment: D = hs,
3950
+ EditMessageModal: S = fs,
3954
3951
  MessageActions: C,
3955
- MessageBlocked: A = ps,
3956
- MessageBouncePrompt: P = bs,
3957
- MessageDeleted: U = vs,
3958
- MessageIsThreadReplyInChannelButtonIndicator: V = xs,
3959
- MessageRepliesCountButton: te = ws,
3960
- ReminderNotification: Z = _s,
3961
- StreamedMessageText: G = ys,
3952
+ MessageBlocked: A = gs,
3953
+ MessageBouncePrompt: P = ps,
3954
+ MessageDeleted: U = bs,
3955
+ MessageIsThreadReplyInChannelButtonIndicator: V = vs,
3956
+ MessageRepliesCountButton: te = xs,
3957
+ ReminderNotification: Z = ws,
3958
+ StreamedMessageText: G = _s,
3962
3959
  PinIndicator: y
3963
- } = dn("CustomMessage"), M = Ns(c), W = ks(c), Q = le(
3960
+ } = un("CustomMessage"), M = ys(c), W = Ns(c), Q = le(
3964
3961
  () => m == null ? void 0 : m(c),
3965
3962
  [m, c]
3966
3963
  ), j = le(() => {
3967
3964
  const he = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...he] : he;
3968
3965
  if (!Fe(c)) return pe;
3969
- const Ut = pe.filter((jt) => !("type" in jt) || !En(jt));
3970
- return Ut.length === pe.length ? pe : Ut;
3966
+ const jt = pe.filter((Ht) => !("type" in Ht) || !Ve(Ht));
3967
+ return jt.length === pe.length ? pe : jt;
3971
3968
  }, [c]), J = le(
3972
- () => qn(j),
3969
+ () => Xn(j),
3973
3970
  [j]
3974
3971
  ), X = le(() => {
3975
- const he = yn({ message: c, viewerLanguage: v });
3972
+ const he = Nn({ message: c, viewerLanguage: v });
3976
3973
  return he === c.text ? c : { ...c, text: he };
3977
3974
  }, [c, v]), ne = J.length > 0, ue = J.reduce(
3978
3975
  (he, pe) => he + pe.attachments.length,
3979
3976
  0
3980
3977
  ) === ((j == null ? void 0 : j.length) ?? 0), ae = (i == null ? void 0 : i[0]) ?? "", De = ae === "top" ? "first" : ae === "middle" ? "middle" : ae === "bottom" ? "end" : "single", se = ae === "single" || ae === "bottom";
3981
- if (Cs(c))
3978
+ if (ks(c))
3982
3979
  return null;
3983
3980
  if (c.deleted_at || c.type === "deleted")
3984
3981
  return /* @__PURE__ */ n(U, { message: c });
3985
- if (Ss(c))
3982
+ if (Cs(c))
3986
3983
  return /* @__PURE__ */ n(A, {});
3987
- const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, St = Es(c);
3984
+ const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Ss(c);
3988
3985
  let ge;
3989
- Ct ? ge = () => u(c) : St && (ge = () => R(!0));
3990
- const ee = g(), ns = k(
3986
+ St ? ge = () => u(c) : Et && (ge = () => R(!0));
3987
+ const ee = g(), ts = k(
3991
3988
  "str-chat__message str-chat__message-simple",
3992
3989
  `str-chat__message--${c.type}`,
3993
3990
  `str-chat__message--${c.status}`,
@@ -3998,25 +3995,25 @@ const Wi = ({
3998
3995
  "str-chat__message--highlighted": h,
3999
3996
  "str-chat__message--pinned pinned-message": c.pinned,
4000
3997
  "str-chat__message--with-reactions": W,
4001
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Lt = c == null ? void 0 : c.error) == null ? void 0 : Lt.status) !== 403,
3998
+ "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,
4002
3999
  "str-chat__message-with-thread-link": me || ie,
4003
4000
  "str-chat__virtual-message__wrapper--end": a,
4004
4001
  "str-chat__virtual-message__wrapper--first": r,
4005
4002
  "str-chat__virtual-message__wrapper--group": o
4006
4003
  }
4007
- ), Ge = c.poll_id && N.polls.fromState(c.poll_id), Et = ur(c), ye = Fe(c), ss = mt(c), Ye = !!(j != null && j.length && !c.quoted_message), It = ye && ee && Ye, as = ne && ue && !c.quoted_message && !Ge && !Q && !ye, Tt = {
4004
+ ), Ye = c.poll_id && N.polls.fromState(c.poll_id), It = dr(c), ye = Fe(c), ns = ht(c), We = !!(j != null && j.length && !c.quoted_message), Tt = ye && ee && We, ss = ne && ue && !c.quoted_message && !Ye && !Q && !ye, At = {
4008
4005
  contentType: "text",
4009
- amountText: (Mt = c.metadata) == null ? void 0 : Mt.amount_text,
4010
- paymentStatus: (Dt = c.metadata) == null ? void 0 : Dt.payment_status,
4006
+ amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
4007
+ paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
4011
4008
  renderedText: c.text && /* @__PURE__ */ n(ze, { message: X, renderText: p })
4012
- }, At = {
4009
+ }, Rt = {
4013
4010
  contentType: "media",
4014
- title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
4015
- mimeType: (Pt = c.metadata) == null ? void 0 : Pt.attachment_mime_type,
4016
- thumbnailUrl: (zt = c.metadata) == null ? void 0 : zt.attachment_thumbnail,
4017
- amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
4018
- detail: ($t = c.metadata) == null ? void 0 : $t.attachment_detail,
4019
- paymentStatus: (Bt = c.metadata) == null ? void 0 : Bt.payment_status,
4011
+ title: (Pt = c.metadata) == null ? void 0 : Pt.attachment_title,
4012
+ mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
4013
+ thumbnailUrl: (Ft = c.metadata) == null ? void 0 : Ft.attachment_thumbnail,
4014
+ amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
4015
+ detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
4016
+ paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
4020
4017
  onFetchSource: E ? () => E(c, _) : void 0
4021
4018
  };
4022
4019
  return /* @__PURE__ */ f(K, { children: [
@@ -4027,7 +4024,7 @@ const Wi = ({
4027
4024
  }
4028
4025
  ),
4029
4026
  F && /* @__PURE__ */ n(
4030
- Is,
4027
+ Es,
4031
4028
  {
4032
4029
  MessageBouncePrompt: P,
4033
4030
  onClose: () => R(!1),
@@ -4037,7 +4034,7 @@ const Wi = ({
4037
4034
  /* @__PURE__ */ f(
4038
4035
  "div",
4039
4036
  {
4040
- className: ns,
4037
+ className: ts,
4041
4038
  "data-message-id": c.id,
4042
4039
  "data-dd-privacy": "mask",
4043
4040
  children: [
@@ -4059,7 +4056,7 @@ const Wi = ({
4059
4056
  "div",
4060
4057
  {
4061
4058
  className: k("str-chat__message-inner", {
4062
- "str-chat__simple-message--error-failed": Ct || St
4059
+ "str-chat__simple-message--error-failed": St || Et
4063
4060
  }),
4064
4061
  "data-testid": "message-inner",
4065
4062
  onClick: ge,
@@ -4072,32 +4069,32 @@ const Wi = ({
4072
4069
  marginInlineEnd: 0,
4073
4070
  marginInlineStart: 0
4074
4071
  },
4075
- children: Et ? /* @__PURE__ */ n(Ke, { message: c, standalone: !0 }) : cr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4072
+ children: It ? /* @__PURE__ */ n(Ze, { message: c, standalone: !0 }) : or(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4076
4073
  ee && C && /* @__PURE__ */ n(C, {}),
4077
- ee ? /* @__PURE__ */ n(Pe, { ...Tt, isMine: !0 }) : /* @__PURE__ */ n(
4074
+ ee ? /* @__PURE__ */ n(Pe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
4078
4075
  Pe,
4079
4076
  {
4080
- ...Tt,
4077
+ ...At,
4081
4078
  isMine: !1,
4082
4079
  isUnlocking: T(c.id),
4083
4080
  onUnlockClick: () => L == null ? void 0 : L(c, _)
4084
4081
  }
4085
4082
  ),
4086
4083
  !ee && C && /* @__PURE__ */ n(C, {})
4087
- ] }) }) : dr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
4084
+ ] }) }) : cr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
4088
4085
  /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4089
4086
  ee && C && /* @__PURE__ */ n(C, {}),
4090
4087
  ee ? /* @__PURE__ */ n(
4091
4088
  Pe,
4092
4089
  {
4093
- ...At,
4090
+ ...Rt,
4094
4091
  isMine: !0,
4095
4092
  onPreviewClick: () => L ? L(c, _) : void 0
4096
4093
  }
4097
4094
  ) : /* @__PURE__ */ n(
4098
4095
  Pe,
4099
4096
  {
4100
- ...At,
4097
+ ...Rt,
4101
4098
  isMine: !1,
4102
4099
  isUnlocking: T(c.id),
4103
4100
  onUnlockClick: () => L ? L(c, _) : void 0,
@@ -4124,8 +4121,8 @@ const Wi = ({
4124
4121
  ]
4125
4122
  }
4126
4123
  )
4127
- ] }) : as ? /* @__PURE__ */ n(
4128
- Wi,
4124
+ ] }) : ss ? /* @__PURE__ */ n(
4125
+ Yi,
4129
4126
  {
4130
4127
  groupPosition: De,
4131
4128
  isMyMessage: ee,
@@ -4146,15 +4143,15 @@ const Wi = ({
4146
4143
  "relative isolate": se
4147
4144
  }),
4148
4145
  children: [
4149
- ye && !It && /* @__PURE__ */ n(
4150
- Ke,
4146
+ ye && !Tt && /* @__PURE__ */ n(
4147
+ Ze,
4151
4148
  {
4152
4149
  message: c,
4153
- hasAttachment: Ye,
4150
+ hasAttachment: We,
4154
4151
  isMyMessage: ee
4155
4152
  }
4156
4153
  ),
4157
- Ge && /* @__PURE__ */ n(Ts, { poll: Ge }),
4154
+ Ye && /* @__PURE__ */ n(Is, { poll: Ye }),
4158
4155
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
4159
4156
  D,
4160
4157
  {
@@ -4175,23 +4172,23 @@ const Wi = ({
4175
4172
  renderText: p
4176
4173
  }
4177
4174
  ),
4178
- /* @__PURE__ */ n(nt, {}),
4175
+ /* @__PURE__ */ n(st, {}),
4179
4176
  se && /* @__PURE__ */ n($e, { side: ee ? "me" : "other" })
4180
4177
  ]
4181
4178
  }
4182
4179
  ) })
4183
4180
  }
4184
4181
  ),
4185
- !ss && !Et && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!ye || It) && /* @__PURE__ */ n(
4186
- Ke,
4182
+ !ns && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!ye || Tt) && /* @__PURE__ */ n(
4183
+ Ze,
4187
4184
  {
4188
4185
  message: c,
4189
- hasAttachment: Ye,
4186
+ hasAttachment: We,
4190
4187
  isMyMessage: ee
4191
4188
  }
4192
4189
  ) }),
4193
4190
  /* @__PURE__ */ n(
4194
- wr,
4191
+ xr,
4195
4192
  {
4196
4193
  onOutboundClick: x,
4197
4194
  resolvedOutbound: b
@@ -4210,68 +4207,68 @@ const Wi = ({
4210
4207
  c.id
4211
4208
  )
4212
4209
  ] });
4213
- }, qi = z.memo(
4214
- Xi,
4210
+ }, Xi = z.memo(
4211
+ Wi,
4215
4212
  (e, t) => {
4216
4213
  var s, a, r, i;
4217
- return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ms(e, t);
4214
+ return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : us(e, t);
4218
4215
  }
4219
- ), Ki = (e) => {
4216
+ ), qi = (e) => {
4220
4217
  var i;
4221
4218
  const t = fe("CustomMessage"), s = xe(Mn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4222
4219
  return /* @__PURE__ */ n(
4223
- qi,
4220
+ Xi,
4224
4221
  {
4225
4222
  ...t,
4226
4223
  ...e,
4227
4224
  resolvedOutbound: r
4228
4225
  }
4229
4226
  );
4230
- }, Zi = () => {
4227
+ }, Ki = () => {
4231
4228
  var s;
4232
4229
  const { handleDelete: e, message: t } = fe("CustomMessageActions");
4233
4230
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
4234
- pn,
4231
+ bn,
4235
4232
  {
4236
4233
  onClick: e,
4237
4234
  "aria-label": "Delete",
4238
4235
  title: "Delete",
4239
4236
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4240
- children: /* @__PURE__ */ n(pa, { size: 16, weight: "light", "aria-hidden": !0 })
4237
+ children: /* @__PURE__ */ n(ga, { size: 16, weight: "light", "aria-hidden": !0 })
4241
4238
  }
4242
4239
  );
4243
- }, Ji = () => {
4240
+ }, Zi = () => {
4244
4241
  const { handleFlag: e } = fe("CustomMessageActions");
4245
4242
  return /* @__PURE__ */ n(
4246
- pn,
4243
+ bn,
4247
4244
  {
4248
4245
  onClick: e,
4249
4246
  "aria-label": "Report",
4250
4247
  title: "Report",
4251
4248
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4252
- children: /* @__PURE__ */ n(mn, { size: 16, weight: "light", "aria-hidden": !0 })
4249
+ children: /* @__PURE__ */ n(hn, { size: 16, weight: "light", "aria-hidden": !0 })
4253
4250
  }
4254
4251
  );
4255
- }, Qi = () => {
4252
+ }, Ji = () => {
4256
4253
  var t;
4257
4254
  const { message: e } = fe("CustomMessageActions");
4258
4255
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== oe.ATTACHMENT ? null : /* @__PURE__ */ n(
4259
- wa,
4256
+ xa,
4260
4257
  {
4261
4258
  messageActionSet: [
4262
- { Component: Zi, placement: "quick", type: "delete" },
4263
- { Component: Ji, placement: "quick", type: "flag" }
4259
+ { Component: Ki, placement: "quick", type: "delete" },
4260
+ { Component: Zi, placement: "quick", type: "flag" }
4264
4261
  ]
4265
4262
  }
4266
4263
  );
4267
- }, el = (e) => ({
4264
+ }, Qi = (e) => ({
4268
4265
  linkPreviews: Array.from(e.previews.values()).filter(
4269
- (t) => tt.previewIsLoaded(t) || tt.previewIsLoading(t)
4266
+ (t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
4270
4267
  )
4271
- }), tl = () => {
4272
- const { linkPreviewsManager: e } = As(), { linkPreviews: t } = Rs(
4268
+ }), el = () => {
4269
+ const { linkPreviewsManager: e } = Ts(), { linkPreviews: t } = As(
4273
4270
  e.state,
4274
- el
4271
+ Qi
4275
4272
  ), s = (r) => {
4276
4273
  e.dismissPreview(r);
4277
4274
  };
@@ -4320,9 +4317,9 @@ const Wi = ({
4320
4317
  // edge lands ~6px past the fold, reachable by scrolling. That residue
4321
4318
  // belongs to whoever owns the mobile layout contract, not to this component.
4322
4319
  /* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2", children: t.map((r) => {
4323
- const i = tt.previewIsLoading(r);
4320
+ const i = nt.previewIsLoading(r);
4324
4321
  return /* @__PURE__ */ n(
4325
- rt.Composer,
4322
+ it.Composer,
4326
4323
  {
4327
4324
  title: r.title,
4328
4325
  url: r.og_scrape_url,
@@ -4335,7 +4332,7 @@ const Wi = ({
4335
4332
  );
4336
4333
  }) })
4337
4334
  ) : null;
4338
- }, Be = z.createContext(!1), nl = 200, ao = () => xe(Be), sl = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
4335
+ }, Be = z.createContext(!1), tl = 200, so = () => xe(Be), nl = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
4339
4336
  "button",
4340
4337
  {
4341
4338
  ...s,
@@ -4344,13 +4341,13 @@ const Wi = ({
4344
4341
  disabled: t,
4345
4342
  onPointerDown: (a) => a.preventDefault(),
4346
4343
  onClick: e,
4347
- children: /* @__PURE__ */ n(ba, { weight: "bold", className: "size-4" })
4344
+ children: /* @__PURE__ */ n(pa, { weight: "bold", className: "size-4" })
4348
4345
  }
4349
- ), an = () => {
4350
- const e = xe(Be), { handleSubmit: t } = Ls(), s = Ms(), a = e || !s, {
4351
- SendButton: r = sl,
4352
- AttachmentPreviewList: i = Ds
4353
- } = dn("CustomMessageInput"), o = z.useRef(null);
4346
+ ), rn = () => {
4347
+ const e = xe(Be), { handleSubmit: t } = Rs(), s = Ls(), a = e || !s, {
4348
+ SendButton: r = nl,
4349
+ AttachmentPreviewList: i = Ms
4350
+ } = un("CustomMessageInput"), o = z.useRef(null);
4354
4351
  return z.useEffect(() => {
4355
4352
  const l = o.current;
4356
4353
  if (!l || typeof ResizeObserver > "u")
@@ -4413,13 +4410,13 @@ const Wi = ({
4413
4410
  "data-dd-privacy": "mask",
4414
4411
  children: [
4415
4412
  /* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
4416
- /* @__PURE__ */ n(Os, {}),
4417
- /* @__PURE__ */ n(tl, {}),
4413
+ /* @__PURE__ */ n(Ds, {}),
4414
+ /* @__PURE__ */ n(el, {}),
4418
4415
  /* @__PURE__ */ n(i, {})
4419
4416
  ] }),
4420
4417
  /* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
4421
4418
  /* @__PURE__ */ n(
4422
- Ps,
4419
+ Os,
4423
4420
  {
4424
4421
  "aria-disabled": e || void 0,
4425
4422
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4446,7 +4443,7 @@ const Wi = ({
4446
4443
  ]
4447
4444
  }
4448
4445
  );
4449
- }, rn = ({
4446
+ }, ln = ({
4450
4447
  renderActions: e,
4451
4448
  renderHeader: t,
4452
4449
  renderFooter: s,
@@ -4468,7 +4465,7 @@ const Wi = ({
4468
4465
  c = v;
4469
4466
  const b = Array.from(
4470
4467
  g.querySelectorAll(".str-chat__list")
4471
- ).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < nl : !1;
4468
+ ).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < tl : !1;
4472
4469
  g.style.setProperty(
4473
4470
  "--messaging-composer-height",
4474
4471
  `${v}px`
@@ -4530,7 +4527,7 @@ const Wi = ({
4530
4527
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4531
4528
  children: [
4532
4529
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4533
- /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Ht, { Input: i ?? an }) })
4530
+ /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: i ?? rn }) })
4534
4531
  ]
4535
4532
  }
4536
4533
  ),
@@ -4549,67 +4546,67 @@ const Wi = ({
4549
4546
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4550
4547
  children: [
4551
4548
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4552
- /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Ht, { Input: an }) })
4549
+ /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: rn }) })
4553
4550
  ]
4554
4551
  }
4555
4552
  ),
4556
4553
  s == null ? void 0 : s()
4557
4554
  ] });
4558
- }, al = {
4555
+ }, sl = {
4559
4556
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
4560
4557
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4561
- }, rl = ["SYSTEM_AGE_SAFETY_BLOCKED"], il = {
4558
+ }, al = ["SYSTEM_AGE_SAFETY_BLOCKED"], rl = {
4562
4559
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4563
- }, Qe = "age safety guidelines.", ll = "https://linktr.ee/s/about/contact", ol = (e) => rl.includes(
4560
+ }, et = "age safety guidelines.", il = "https://linktr.ee/s/about/contact", ll = (e) => al.includes(
4564
4561
  e
4565
- ), cl = (e) => {
4562
+ ), ol = (e) => {
4566
4563
  var t;
4567
- return ol((t = e.metadata) == null ? void 0 : t.custom_type);
4568
- }, dl = (e) => {
4564
+ return ll((t = e.metadata) == null ? void 0 : t.custom_type);
4565
+ }, cl = (e) => {
4569
4566
  var a;
4570
4567
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
4571
- if (Gt(t))
4568
+ if (Yt(t))
4572
4569
  return {
4573
4570
  kind: "dm-agent",
4574
4571
  type: t
4575
4572
  };
4576
- if (Gs(t))
4573
+ if (Vs(t))
4577
4574
  return {
4578
4575
  kind: "age-safety",
4579
4576
  type: t
4580
4577
  };
4581
4578
  const s = e.dm_agent_system_type;
4582
- if (Gt(s))
4579
+ if (Yt(s))
4583
4580
  return {
4584
4581
  kind: "dm-agent",
4585
4582
  type: s
4586
4583
  };
4587
- }, ul = (e) => {
4588
- const t = e.indexOf(Qe);
4584
+ }, dl = (e) => {
4585
+ const t = e.indexOf(et);
4589
4586
  if (t === -1)
4590
4587
  return e;
4591
- const s = t + Qe.length;
4588
+ const s = t + et.length;
4592
4589
  return /* @__PURE__ */ f(K, { children: [
4593
4590
  e.slice(0, t),
4594
4591
  /* @__PURE__ */ n(
4595
4592
  "a",
4596
4593
  {
4597
- href: ll,
4594
+ href: il,
4598
4595
  target: "_blank",
4599
4596
  rel: "noopener noreferrer",
4600
4597
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
4601
- children: Qe
4598
+ children: et
4602
4599
  }
4603
4600
  ),
4604
4601
  e.slice(s)
4605
4602
  ] });
4606
- }, ml = (e) => {
4603
+ }, ul = (e) => {
4607
4604
  var a, r;
4608
- const t = !cl(e.message), s = dl(
4605
+ const t = !ol(e.message), s = cl(
4609
4606
  e.message
4610
4607
  );
4611
4608
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
4612
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || al[s.type];
4609
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || sl[s.type];
4613
4610
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4614
4611
  /* @__PURE__ */ f(
4615
4612
  "div",
@@ -4619,7 +4616,7 @@ const Wi = ({
4619
4616
  "data-dm-agent-system-type": s.type,
4620
4617
  children: [
4621
4618
  /* @__PURE__ */ n(
4622
- va,
4619
+ ba,
4623
4620
  {
4624
4621
  size: 16,
4625
4622
  weight: "regular",
@@ -4631,11 +4628,11 @@ const Wi = ({
4631
4628
  ]
4632
4629
  }
4633
4630
  ),
4634
- !t && /* @__PURE__ */ n(We, { message: e.message })
4631
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4635
4632
  ] });
4636
4633
  }
4637
4634
  if ((s == null ? void 0 : s.kind) === "age-safety") {
4638
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || il[s.type];
4635
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || rl[s.type];
4639
4636
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4640
4637
  /* @__PURE__ */ f(
4641
4638
  "div",
@@ -4645,7 +4642,7 @@ const Wi = ({
4645
4642
  "data-age-safety-system-type": s.type,
4646
4643
  children: [
4647
4644
  /* @__PURE__ */ n(
4648
- xa,
4645
+ va,
4649
4646
  {
4650
4647
  size: 24,
4651
4648
  weight: "duotone",
@@ -4654,11 +4651,11 @@ const Wi = ({
4654
4651
  "data-testid": "age-safety-system-message-icon"
4655
4652
  }
4656
4653
  ),
4657
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: ul(i) }) })
4654
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: dl(i) }) })
4658
4655
  ]
4659
4656
  }
4660
4657
  ),
4661
- !t && /* @__PURE__ */ n(We, { message: e.message })
4658
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4662
4659
  ] });
4663
4660
  }
4664
4661
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -4667,9 +4664,9 @@ const Wi = ({
4667
4664
  /* @__PURE__ */ n("p", { children: e.message.text }),
4668
4665
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
4669
4666
  ] }),
4670
- !t && /* @__PURE__ */ n(We, { message: e.message })
4667
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4671
4668
  ] });
4672
- }, Kn = je(!1), et = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4669
+ }, qn = je(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4673
4670
  "animateTransform",
4674
4671
  {
4675
4672
  attributeName: "transform",
@@ -4679,17 +4676,17 @@ const Wi = ({
4679
4676
  begin: `${120 * t}ms`,
4680
4677
  repeatCount: "indefinite"
4681
4678
  }
4682
- ) }), hl = /* @__PURE__ */ new Set([
4683
- Xe.Thinking,
4684
- Xe.Generating,
4685
- Xe.ExternalSources
4686
- ]), fl = ({ threadList: e }) => {
4679
+ ) }), ml = /* @__PURE__ */ new Set([
4680
+ qe.Thinking,
4681
+ qe.Generating,
4682
+ qe.ExternalSources
4683
+ ]), hl = ({ threadList: e }) => {
4687
4684
  var p, w;
4688
- const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } = zs(), { aiState: o } = Fs(t), l = xe(Kn);
4689
- if (!e && l && hl.has(o)) {
4690
- const v = gl(t, (p = r.user) == null ? void 0 : p.id);
4685
+ const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } = Ps(), { aiState: o } = zs(t), l = xe(qn);
4686
+ if (!e && l && ml.has(o)) {
4687
+ const v = fl(t, (p = r.user) == null ? void 0 : p.id);
4691
4688
  return /* @__PURE__ */ n(
4692
- ln,
4689
+ on,
4693
4690
  {
4694
4691
  avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
4695
4692
  avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
@@ -4715,7 +4712,7 @@ const Wi = ({
4715
4712
  return null;
4716
4713
  const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4717
4714
  return /* @__PURE__ */ n(
4718
- ln,
4715
+ on,
4719
4716
  {
4720
4717
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4721
4718
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4723,7 +4720,7 @@ const Wi = ({
4723
4720
  testId: "typing-indicator"
4724
4721
  }
4725
4722
  );
4726
- }, ln = ({
4723
+ }, on = ({
4727
4724
  avatarId: e,
4728
4725
  avatarName: t,
4729
4726
  avatarImage: s,
@@ -4759,9 +4756,9 @@ const Wi = ({
4759
4756
  height: "13",
4760
4757
  overflow: "visible",
4761
4758
  children: [
4762
- /* @__PURE__ */ n(et, { cx: "4", index: 0 }),
4763
- /* @__PURE__ */ n(et, { cx: "16", index: 1 }),
4764
- /* @__PURE__ */ n(et, { cx: "28", index: 2 })
4759
+ /* @__PURE__ */ n(tt, { cx: "4", index: 0 }),
4760
+ /* @__PURE__ */ n(tt, { cx: "16", index: 1 }),
4761
+ /* @__PURE__ */ n(tt, { cx: "28", index: 2 })
4765
4762
  ]
4766
4763
  }
4767
4764
  ) }) }),
@@ -4770,7 +4767,7 @@ const Wi = ({
4770
4767
  ] })
4771
4768
  }
4772
4769
  );
4773
- function gl(e, t) {
4770
+ function fl(e, t) {
4774
4771
  var a;
4775
4772
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4776
4773
  for (const r of Object.values(s)) {
@@ -4779,7 +4776,7 @@ function gl(e, t) {
4779
4776
  return i;
4780
4777
  }
4781
4778
  }
4782
- const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4779
+ const gl = () => null, pl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4783
4780
  "div",
4784
4781
  {
4785
4782
  className: k("flex items-center justify-center h-full", e),
@@ -4823,11 +4820,11 @@ const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4823
4820
  ]
4824
4821
  }
4825
4822
  ), Ue = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
4826
- /* @__PURE__ */ n(bl, { className: "w-6 h-6" }),
4823
+ /* @__PURE__ */ n(pl, { className: "w-6 h-6" }),
4827
4824
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
4828
4825
  ] }) }));
4829
4826
  Ue.displayName = "LoadingState";
4830
- const vl = ({
4827
+ const bl = ({
4831
4828
  onBack: e,
4832
4829
  showBackButton: t,
4833
4830
  renderMessageInputActions: s,
@@ -4862,10 +4859,10 @@ const vl = ({
4862
4859
  const S = q((Z) => {
4863
4860
  var G;
4864
4861
  (G = D.current) == null || G.call(D, Z);
4865
- }, []), C = E ? S : void 0, A = pr(I, $), P = R.state.messages.some(
4862
+ }, []), C = E ? S : void 0, A = gr(I, $), P = R.state.messages.some(
4866
4863
  (Z) => Z.type !== "deleted"
4867
4864
  ), U = v ? /* @__PURE__ */ n(z.Fragment, { children: v() }, "lt-channel-banner") : null, V = /* @__PURE__ */ n(
4868
- La,
4865
+ Ra,
4869
4866
  {
4870
4867
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4871
4868
  onBack: e,
@@ -4887,7 +4884,7 @@ const vl = ({
4887
4884
  ), te = q(
4888
4885
  (Z) => {
4889
4886
  const { message: G } = fe("ChannelView"), y = /* @__PURE__ */ n(
4890
- Ki,
4887
+ qi,
4891
4888
  {
4892
4889
  ...Z,
4893
4890
  viewerLanguage: _,
@@ -4899,15 +4896,15 @@ const vl = ({
4899
4896
  [C, N, _]
4900
4897
  );
4901
4898
  return /* @__PURE__ */ n(Mn.Provider, { value: A, children: /* @__PURE__ */ n(
4902
- Bs,
4899
+ $s,
4903
4900
  {
4904
4901
  overrides: {
4905
4902
  Message: te,
4906
- MessageActions: Qi,
4903
+ MessageActions: Ji,
4907
4904
  UnreadMessagesNotification: () => null,
4908
4905
  UnreadMessagesSeparator: () => null
4909
4906
  },
4910
- children: /* @__PURE__ */ n(Us, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4907
+ children: /* @__PURE__ */ n(Bs, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4911
4908
  /* @__PURE__ */ f(
4912
4909
  "div",
4913
4910
  {
@@ -4918,7 +4915,7 @@ const vl = ({
4918
4915
  U
4919
4916
  ] }) }),
4920
4917
  /* @__PURE__ */ n(
4921
- Vt,
4918
+ Gt,
4922
4919
  {
4923
4920
  head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4924
4921
  V,
@@ -4933,7 +4930,7 @@ const vl = ({
4933
4930
  "lt-channel-message-list"
4934
4931
  ),
4935
4932
  /* @__PURE__ */ n(
4936
- rn,
4933
+ ln,
4937
4934
  {
4938
4935
  ...s && {
4939
4936
  renderActions: () => s == null ? void 0 : s(R)
@@ -4959,7 +4956,7 @@ const vl = ({
4959
4956
  U
4960
4957
  ] }) }),
4961
4958
  /* @__PURE__ */ n(
4962
- Vt,
4959
+ Gt,
4963
4960
  {
4964
4961
  head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4965
4962
  V,
@@ -4975,7 +4972,7 @@ const vl = ({
4975
4972
  ),
4976
4973
  r ? /* @__PURE__ */ n(z.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
4977
4974
  /* @__PURE__ */ n(
4978
- rn,
4975
+ ln,
4979
4976
  {
4980
4977
  ...s && {
4981
4978
  renderActions: () => s == null ? void 0 : s(R)
@@ -4990,7 +4987,7 @@ const vl = ({
4990
4987
  ] }) })
4991
4988
  }
4992
4989
  ) });
4993
- }, Zn = z.memo(
4990
+ }, Kn = z.memo(
4994
4991
  ({
4995
4992
  channel: e,
4996
4993
  onBack: t,
@@ -5001,7 +4998,7 @@ const vl = ({
5001
4998
  onLeaveConversation: o,
5002
4999
  onBlockParticipant: l,
5003
5000
  className: d,
5004
- CustomChannelEmptyState: u = pl,
5001
+ CustomChannelEmptyState: u = gl,
5005
5002
  showDeleteConversation: h = !0,
5006
5003
  onDeleteConversationClick: m,
5007
5004
  onBlockParticipantClick: g,
@@ -5060,7 +5057,7 @@ const vl = ({
5060
5057
  };
5061
5058
  return y.addEventListener("click", M), () => y.removeEventListener("click", M);
5062
5059
  }, [R, e]);
5063
- const G = un(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
5060
+ const G = mn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
5064
5061
  return /* @__PURE__ */ n(
5065
5062
  "div",
5066
5063
  {
@@ -5070,20 +5067,20 @@ const vl = ({
5070
5067
  d
5071
5068
  ),
5072
5069
  style: G,
5073
- children: /* @__PURE__ */ n(Kn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
5074
- $s,
5070
+ children: /* @__PURE__ */ n(qn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
5071
+ Fs,
5075
5072
  {
5076
5073
  channel: e,
5077
- MessageSystem: ml,
5074
+ MessageSystem: ul,
5078
5075
  EmptyStateIndicator: u,
5079
5076
  LoadingIndicator: Ue,
5080
- DateSeparator: Ma,
5081
- TypingIndicator: fl,
5077
+ DateSeparator: La,
5078
+ TypingIndicator: hl,
5082
5079
  doSendMessageRequest: te,
5083
5080
  ...I ? { SendButton: I } : {},
5084
5081
  ...D ? { AttachmentPreviewList: D } : {},
5085
5082
  children: /* @__PURE__ */ n(
5086
- vl,
5083
+ bl,
5087
5084
  {
5088
5085
  onBack: t,
5089
5086
  showBackButton: s,
@@ -5120,7 +5117,7 @@ const vl = ({
5120
5117
  );
5121
5118
  }
5122
5119
  );
5123
- Zn.displayName = "ChannelView";
5120
+ Kn.displayName = "ChannelView";
5124
5121
  const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5125
5122
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
5126
5123
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -5136,7 +5133,7 @@ const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
5136
5133
  )
5137
5134
  ] }) }));
5138
5135
  Ce.displayName = "ErrorState";
5139
- const ro = ({
5136
+ const ao = ({
5140
5137
  capabilities: e = {},
5141
5138
  renderMessageInputActions: t,
5142
5139
  renderConversationFooter: s,
@@ -5169,7 +5166,7 @@ const ro = ({
5169
5166
  refreshConnection: I,
5170
5167
  service: D,
5171
5168
  debug: S
5172
- } = _a(), [C, A] = B(null), [P, U] = B(null), [V, te] = B(!1), { showDeleteConversation: Z = !0 } = e, G = H(o);
5169
+ } = wa(), [C, A] = B(null), [P, U] = B(null), [V, te] = B(!1), { showDeleteConversation: Z = !0 } = e, G = H(o);
5173
5170
  G.current = o;
5174
5171
  const y = H(a);
5175
5172
  y.current = a;
@@ -5253,7 +5250,7 @@ const ro = ({
5253
5250
  onBack: I
5254
5251
  }
5255
5252
  ) : P ? /* @__PURE__ */ n(Ce, { message: P }) : V && !C ? /* @__PURE__ */ n(Ce, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
5256
- Zn,
5253
+ Kn,
5257
5254
  {
5258
5255
  channel: C,
5259
5256
  renderMessageInputActions: t,
@@ -5281,13 +5278,13 @@ const ro = ({
5281
5278
  C.id
5282
5279
  ) }) }) : /* @__PURE__ */ n(Ue, {});
5283
5280
  };
5284
- function xl(e) {
5281
+ function vl(e) {
5285
5282
  const t = e.state.pending_messages;
5286
5283
  if (t != null && t.length)
5287
5284
  for (const s of t)
5288
5285
  e.state.addMessageSorted(s.message);
5289
5286
  }
5290
- const Jn = z.createContext({
5287
+ const Zn = z.createContext({
5291
5288
  selectedChannel: void 0,
5292
5289
  onChannelSelect: () => {
5293
5290
  },
@@ -5295,14 +5292,14 @@ const Jn = z.createContext({
5295
5292
  renderMessagePreview: void 0,
5296
5293
  channelPreview: void 0,
5297
5294
  viewerLanguage: void 0
5298
- }), wl = Jn.Provider, _l = () => z.useContext(Jn), yl = (e, t) => {
5295
+ }), xl = Zn.Provider, wl = () => z.useContext(Zn), _l = (e, t) => {
5299
5296
  const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
5300
5297
  return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
5301
- }, Nl = (e) => {
5298
+ }, yl = (e) => {
5302
5299
  const t = /* @__PURE__ */ new Date();
5303
5300
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
5304
5301
  return "Just now";
5305
- const a = yl(e, t);
5302
+ const a = _l(e, t);
5306
5303
  return a === 0 ? e.toLocaleTimeString([], {
5307
5304
  hour: "numeric",
5308
5305
  minute: "2-digit",
@@ -5315,7 +5312,7 @@ const Jn = z.createContext({
5315
5312
  day: "numeric",
5316
5313
  year: "numeric"
5317
5314
  });
5318
- }, Qn = z.memo(
5315
+ }, Jn = z.memo(
5319
5316
  (e) => {
5320
5317
  var $, F, R;
5321
5318
  const { channel: t, unread: s } = e, {
@@ -5325,7 +5322,7 @@ const Jn = z.createContext({
5325
5322
  channelPreview: o,
5326
5323
  renderMessagePreview: l,
5327
5324
  viewerLanguage: d
5328
- } = _l(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = vn(t);
5325
+ } = wl(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = xn(t);
5329
5326
  if (o)
5330
5327
  return /* @__PURE__ */ n(
5331
5328
  o,
@@ -5342,11 +5339,11 @@ const Jn = z.createContext({
5342
5339
  }, c = (I) => {
5343
5340
  const D = I.key === "Enter" || I.key === " ", S = I.repeat;
5344
5341
  !D || S || (I.preventDefault(), g());
5345
- }, p = xn(
5342
+ }, p = wn(
5346
5343
  ($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
5347
5344
  u == null ? void 0 : u.userID,
5348
5345
  t == null ? void 0 : t.type
5349
- ), w = wn(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
5346
+ ), w = _n(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
5350
5347
  var D;
5351
5348
  const I = (D = t == null ? void 0 : t.state) == null ? void 0 : D.messages;
5352
5349
  if (I != null && I.length) {
@@ -5355,7 +5352,7 @@ const Jn = z.createContext({
5355
5352
  }
5356
5353
  })(), N = (() => {
5357
5354
  var A;
5358
- const I = yn({
5355
+ const I = Nn({
5359
5356
  message: x,
5360
5357
  viewerLanguage: d
5361
5358
  }), { custom_type: D, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
@@ -5372,7 +5369,7 @@ const Jn = z.createContext({
5372
5369
  if (I) return I;
5373
5370
  const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
5374
5371
  return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5375
- })(), _ = x != null && x.created_at ? Nl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, L = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = s ?? 0;
5372
+ })(), _ = x != null && x.created_at ? yl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, L = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = s ?? 0;
5376
5373
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5377
5374
  channelId: t == null ? void 0 : t.id,
5378
5375
  isSelected: h,
@@ -5431,18 +5428,18 @@ const Jn = z.createContext({
5431
5428
  );
5432
5429
  }
5433
5430
  );
5434
- Qn.displayName = "CustomChannelPreview";
5435
- const kl = { last_message_at: -1 }, Cl = z.memo(
5431
+ Jn.displayName = "CustomChannelPreview";
5432
+ const Nl = { last_message_at: -1 }, kl = z.memo(
5436
5433
  ({
5437
5434
  onChannelSelect: e,
5438
5435
  selectedChannel: t,
5439
5436
  filters: s,
5440
5437
  allowNewMessagesFromUnfilteredChannels: a = !1,
5441
5438
  channelRenderFilterFn: r,
5442
- sort: i = kl,
5439
+ sort: i = Nl,
5443
5440
  className: o,
5444
5441
  customEmptyStateIndicator: l,
5445
- channelListPaginator: d = Hs,
5442
+ channelListPaginator: d = js,
5446
5443
  channelPreview: u,
5447
5444
  renderMessagePreview: h,
5448
5445
  viewerLanguage: m,
@@ -5455,10 +5452,10 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5455
5452
  }) => {
5456
5453
  const b = z.useRef(0);
5457
5454
  b.current++;
5458
- const { debug: N = !1 } = lt(), _ = z.useCallback(
5455
+ const { debug: N = !1 } = ot(), _ = z.useCallback(
5459
5456
  (L) => {
5460
5457
  for (const E of L)
5461
- xl(E);
5458
+ vl(E);
5462
5459
  return r ? r(L) : L;
5463
5460
  },
5464
5461
  [r]
@@ -5493,8 +5490,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5493
5490
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5494
5491
  o
5495
5492
  ),
5496
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(wl, { value: T, children: /* @__PURE__ */ n(
5497
- js,
5493
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(xl, { value: T, children: /* @__PURE__ */ n(
5494
+ Us,
5498
5495
  {
5499
5496
  filters: s,
5500
5497
  sort: i,
@@ -5508,7 +5505,7 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5508
5505
  onAddedToChannel: v,
5509
5506
  onChannelUpdated: x,
5510
5507
  Paginator: d,
5511
- Preview: Qn,
5508
+ Preview: Jn,
5512
5509
  EmptyStateIndicator: l
5513
5510
  },
5514
5511
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -5517,8 +5514,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5517
5514
  );
5518
5515
  }
5519
5516
  );
5520
- Cl.displayName = "ChannelList";
5521
- const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", El = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", on = ({ surface: e, actions: t, layout: s }) => {
5517
+ kl.displayName = "ChannelList";
5518
+ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", Sl = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", cn = ({ surface: e, actions: t, layout: s }) => {
5522
5519
  if (t == null || t.length === 0) return null;
5523
5520
  const a = s === "stacked";
5524
5521
  return /* @__PURE__ */ n(
@@ -5544,7 +5541,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5544
5541
  ))
5545
5542
  }
5546
5543
  );
5547
- }, Il = ({
5544
+ }, El = ({
5548
5545
  ctaSurface: e,
5549
5546
  chinTextColor: t,
5550
5547
  title: s,
@@ -5568,7 +5565,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5568
5565
  /* @__PURE__ */ n(
5569
5566
  "p",
5570
5567
  {
5571
- className: k("min-w-0", Sl),
5568
+ className: k("min-w-0", Cl),
5572
5569
  style: h,
5573
5570
  children: s
5574
5571
  }
@@ -5578,7 +5575,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5578
5575
  "p",
5579
5576
  {
5580
5577
  className: k(
5581
- El,
5578
+ Sl,
5582
5579
  r > 1 && "whitespace-pre-line",
5583
5580
  r <= 1 && "truncate"
5584
5581
  ),
@@ -5589,11 +5586,11 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5589
5586
  ] });
5590
5587
  return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
5591
5588
  c,
5592
- /* @__PURE__ */ n(on, { surface: e, actions: o, layout: "row" })
5589
+ /* @__PURE__ */ n(cn, { surface: e, actions: o, layout: "row" })
5593
5590
  ] }) : /* @__PURE__ */ f(K, { children: [
5594
5591
  c,
5595
5592
  /* @__PURE__ */ n(
5596
- on,
5593
+ cn,
5597
5594
  {
5598
5595
  surface: e,
5599
5596
  actions: o,
@@ -5601,36 +5598,36 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5601
5598
  }
5602
5599
  )
5603
5600
  ] }) });
5604
- }, Tl = {
5601
+ }, Il = {
5605
5602
  dark: "bg-white/[0.06]",
5606
5603
  light: "bg-black/[0.04]"
5607
- }, Al = {
5604
+ }, Tl = {
5608
5605
  1: [0],
5609
5606
  2: [-10, 10],
5610
5607
  3: [-13, 0, 13]
5611
- }, Rl = {
5608
+ }, Al = {
5612
5609
  1: [0],
5613
5610
  2: [-26, 26],
5614
5611
  3: [-40, 0, 40]
5615
- }, Ll = {
5612
+ }, Rl = {
5616
5613
  1: [0],
5617
5614
  2: [0, 1],
5618
5615
  3: [1, 3, 2]
5619
- }, Ml = {
5616
+ }, Ll = {
5620
5617
  1: [1],
5621
5618
  2: [1, 1],
5622
5619
  3: [1, 1.08, 1]
5623
- }, Dl = ({ variant: e, images: t }) => {
5620
+ }, Ml = ({ variant: e, images: t }) => {
5624
5621
  const [s, a] = z.useState({}), r = t.join(`
5625
5622
  `), [i, o] = z.useState(r);
5626
5623
  r !== i && (o(r), a({}));
5627
- const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Al[d], h = Rl[d], m = Ll[d], g = Ml[d];
5624
+ const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Tl[d], h = Al[d], m = Rl[d], g = Ll[d];
5628
5625
  return /* @__PURE__ */ n(
5629
5626
  "div",
5630
5627
  {
5631
5628
  className: k(
5632
5629
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
5633
- Tl[e]
5630
+ Il[e]
5634
5631
  ),
5635
5632
  children: l.map(({ src: c, index: p }, w) => /* @__PURE__ */ n(
5636
5633
  "img",
@@ -5651,14 +5648,14 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5651
5648
  ))
5652
5649
  }
5653
5650
  );
5654
- }, Ol = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Pl = ({
5651
+ }, Dl = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Ol = ({
5655
5652
  variant: e,
5656
5653
  presentation: t,
5657
5654
  images: s,
5658
5655
  title: a,
5659
5656
  heroUrl: r,
5660
5657
  onHeroError: i
5661
- }) => /* @__PURE__ */ n("div", { className: Ol, children: t === "fan" ? /* @__PURE__ */ n(Dl, { variant: e, images: s }) : (
5658
+ }) => /* @__PURE__ */ n("div", { className: Dl, children: t === "fan" ? /* @__PURE__ */ n(Ml, { variant: e, images: s }) : (
5662
5659
  // `heroUrl` is the palette-tracked source: it becomes `undefined` when the
5663
5660
  // hero image errors, so `CardThumbnail` falls through to its placeholder.
5664
5661
  // Do NOT `?? images[0]` here — that would re-instate the failed URL.
@@ -5672,7 +5669,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5672
5669
  onImageError: i
5673
5670
  }
5674
5671
  )
5675
- ) }), es = ({
5672
+ ) }), Qn = ({
5676
5673
  variant: e,
5677
5674
  title: t,
5678
5675
  subtitle: s,
@@ -5684,17 +5681,17 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5684
5681
  accentColor: d,
5685
5682
  groupPosition: u = "single"
5686
5683
  }) => {
5687
- const h = Ys({
5684
+ const h = Gs({
5688
5685
  imagePresentation: i,
5689
5686
  images: r
5690
- }), m = r.length > 0, g = m && h === "hero", c = Ve({
5687
+ }), m = r.length > 0, g = m && h === "hero", c = Ge({
5691
5688
  variant: e,
5692
5689
  accentColor: d,
5693
5690
  layout: "featured",
5694
5691
  thumbnailUrl: g ? r[0] : void 0
5695
5692
  }), p = u === "single" || u === "end";
5696
5693
  return /* @__PURE__ */ n(
5697
- vt,
5694
+ xt,
5698
5695
  {
5699
5696
  accentHex: c.accentHex,
5700
5697
  side: e === "dark" ? "sender" : "receiver",
@@ -5707,7 +5704,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5707
5704
  "data-testid": "rich-card",
5708
5705
  children: [
5709
5706
  m && /* @__PURE__ */ n(
5710
- Pl,
5707
+ Ol,
5711
5708
  {
5712
5709
  variant: e,
5713
5710
  presentation: h,
@@ -5718,7 +5715,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5718
5715
  }
5719
5716
  ),
5720
5717
  /* @__PURE__ */ n(
5721
- Il,
5718
+ El,
5722
5719
  {
5723
5720
  ctaSurface: c.surface,
5724
5721
  chinTextColor: c.chinTextColor,
@@ -5734,13 +5731,13 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5734
5731
  )
5735
5732
  }
5736
5733
  );
5737
- }, zl = (e) => /* @__PURE__ */ n(es, { ...e, variant: "dark" }), Fl = (e) => /* @__PURE__ */ n(es, { ...e, variant: "light" }), io = {
5738
- Sent: zl,
5739
- Received: Fl
5740
- }, cn = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, $l = {
5734
+ }, Pl = (e) => /* @__PURE__ */ n(Qn, { ...e, variant: "dark" }), zl = (e) => /* @__PURE__ */ n(Qn, { ...e, variant: "light" }), ro = {
5735
+ Sent: Pl,
5736
+ Received: zl
5737
+ }, dn = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Fl = {
5741
5738
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5742
5739
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5743
- }, Bl = ({ variant: e }) => /* @__PURE__ */ n(
5740
+ }, $l = ({ variant: e }) => /* @__PURE__ */ n(
5744
5741
  "span",
5745
5742
  {
5746
5743
  "aria-hidden": "true",
@@ -5750,12 +5747,12 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5750
5747
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5751
5748
  transform: e === "received" ? "scaleX(-1)" : void 0,
5752
5749
  transformOrigin: "center",
5753
- backgroundColor: $l[e],
5754
- WebkitMask: cn,
5755
- mask: cn
5750
+ backgroundColor: Fl[e],
5751
+ WebkitMask: dn,
5752
+ mask: dn
5756
5753
  }
5757
5754
  }
5758
- ), Ul = {
5755
+ ), Bl = {
5759
5756
  sent: {
5760
5757
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5761
5758
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5764,7 +5761,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5764
5761
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5765
5762
  color: "var(--str-chat__message-bubble-color, #000000)"
5766
5763
  }
5767
- }, ts = ({
5764
+ }, es = ({
5768
5765
  variant: e,
5769
5766
  text: t,
5770
5767
  tail: s = !0,
@@ -5780,23 +5777,23 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5780
5777
  r
5781
5778
  ),
5782
5779
  style: {
5783
- ...Ul[e],
5780
+ ...Bl[e],
5784
5781
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5785
5782
  isolation: "isolate"
5786
5783
  },
5787
5784
  children: [
5788
5785
  a != null && /* @__PURE__ */ n("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5789
5786
  /* @__PURE__ */ n("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
5790
- s && /* @__PURE__ */ n(Bl, { variant: e })
5787
+ s && /* @__PURE__ */ n($l, { variant: e })
5791
5788
  ]
5792
5789
  }
5793
- ), jl = ({
5790
+ ), Ul = ({
5794
5791
  text: e,
5795
5792
  tail: t,
5796
5793
  header: s,
5797
5794
  className: a
5798
5795
  }) => /* @__PURE__ */ n(
5799
- ts,
5796
+ es,
5800
5797
  {
5801
5798
  variant: "received",
5802
5799
  text: e,
@@ -5804,10 +5801,10 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5804
5801
  header: s,
5805
5802
  className: a
5806
5803
  }
5807
- ), Hl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(ts, { variant: "sent", text: e, tail: t, className: s }), lo = {
5808
- Sent: Hl,
5809
- Received: jl
5810
- }, Vl = ({
5804
+ ), jl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(es, { variant: "sent", text: e, tail: t, className: s }), io = {
5805
+ Sent: jl,
5806
+ Received: Ul
5807
+ }, Hl = ({
5811
5808
  question: e,
5812
5809
  onClick: t,
5813
5810
  loading: s = !1,
@@ -5829,7 +5826,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5829
5826
  ),
5830
5827
  children: e
5831
5828
  }
5832
- ), oo = ({
5829
+ ), lo = ({
5833
5830
  faqs: e,
5834
5831
  onFaqClick: t,
5835
5832
  loadingFaqId: s,
@@ -5838,7 +5835,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5838
5835
  avatarImage: i,
5839
5836
  avatarName: o
5840
5837
  }) => {
5841
- const l = Ws(e);
5838
+ const l = Ys(e);
5842
5839
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
5843
5840
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
5844
5841
  _e,
@@ -5858,7 +5855,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5858
5855
  children: [
5859
5856
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
5860
5857
  l.map((d) => /* @__PURE__ */ n(
5861
- Vl,
5858
+ Hl,
5862
5859
  {
5863
5860
  question: d.question,
5864
5861
  onClick: () => t(d.id),
@@ -5872,41 +5869,41 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5872
5869
  ] }) });
5873
5870
  };
5874
5871
  export {
5875
- kn as A,
5876
- wn as B,
5877
- pl as C,
5878
- ao as D,
5879
- sr as E,
5880
- oo as F,
5881
- _a as G,
5882
- rt as L,
5883
- to as M,
5884
- io as R,
5872
+ Cn as A,
5873
+ _n as B,
5874
+ gl as C,
5875
+ so as D,
5876
+ nr as E,
5877
+ lo as F,
5878
+ wa as G,
5879
+ it as L,
5880
+ eo as M,
5881
+ ro as R,
5885
5882
  Ne as a,
5886
5883
  _e as b,
5887
- Cl as c,
5888
- Zn as d,
5889
- no as e,
5890
- Vl as f,
5884
+ kl as c,
5885
+ Kn as d,
5886
+ to as e,
5887
+ Hl as f,
5891
5888
  de as g,
5892
5889
  Pe as h,
5893
5890
  ke as i,
5894
- lo as j,
5895
- eo as k,
5896
- ro as l,
5897
- ei as m,
5898
- Zr as n,
5891
+ io as j,
5892
+ Ql as k,
5893
+ ao as l,
5894
+ Qr as m,
5895
+ Kr as n,
5899
5896
  ce as o,
5900
- Nl as p,
5901
- Qr as q,
5897
+ yl as p,
5898
+ Jr as q,
5902
5899
  ve as r,
5903
- yn as s,
5904
- En as t,
5905
- Na as u,
5906
- so as v,
5907
- Da as w,
5908
- xn as x,
5909
- dt as y,
5910
- ut as z
5900
+ Nn as s,
5901
+ Ve as t,
5902
+ ya as u,
5903
+ no as v,
5904
+ Ma as w,
5905
+ wn as x,
5906
+ ut as y,
5907
+ mt as z
5911
5908
  };
5912
- //# sourceMappingURL=index-Cxj0F8aQ.js.map
5909
+ //# sourceMappingURL=index-t0Okjl1p.js.map