@linktr.ee/messaging-react 3.3.10-rc-1781610191 → 3.3.10-rc-1781645401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{Card-DiSXLhzw.cjs → Card-BmQYVGMq.cjs} +2 -2
  2. package/dist/{Card-DiSXLhzw.cjs.map → Card-BmQYVGMq.cjs.map} +1 -1
  3. package/dist/{Card-giUAe8IB.js → Card-BokhtsDD.js} +2 -2
  4. package/dist/{Card-giUAe8IB.js.map → Card-BokhtsDD.js.map} +1 -1
  5. package/dist/{Card-DndbBigk.js → Card-CG8SMxkM.js} +2 -2
  6. package/dist/{Card-DndbBigk.js.map → Card-CG8SMxkM.js.map} +1 -1
  7. package/dist/{Card-qFB_y7k3.js → Card-DaXkK4uS.js} +3 -3
  8. package/dist/{Card-qFB_y7k3.js.map → Card-DaXkK4uS.js.map} +1 -1
  9. package/dist/{Card-Ch3cTL6G.cjs → Card-qF1fO3J4.cjs} +2 -2
  10. package/dist/{Card-Ch3cTL6G.cjs.map → Card-qF1fO3J4.cjs.map} +1 -1
  11. package/dist/{Card-DezN34Sz.cjs → Card-xNHR_bKY.cjs} +2 -2
  12. package/dist/{Card-DezN34Sz.cjs.map → Card-xNHR_bKY.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-DkdVuMZM.cjs → LockedThumbnail-BZMu174W.cjs} +2 -2
  14. package/dist/{LockedThumbnail-DkdVuMZM.cjs.map → LockedThumbnail-BZMu174W.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-C9Y0oCjv.js → LockedThumbnail-_5g6bxXW.js} +2 -2
  16. package/dist/{LockedThumbnail-C9Y0oCjv.js.map → LockedThumbnail-_5g6bxXW.js.map} +1 -1
  17. package/dist/{index-B_8de68T.cjs → index-3GF2ZDV8.cjs} +2 -2
  18. package/dist/index-3GF2ZDV8.cjs.map +1 -0
  19. package/dist/{index-DGVCJzwy.js → index-XXoPu3F3.js} +436 -404
  20. package/dist/index-XXoPu3F3.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +54 -0
  23. package/dist/index.js +24 -20
  24. package/package.json +1 -1
  25. package/src/index.ts +10 -0
  26. package/src/utils/linkAttachmentFromStream.test.ts +99 -0
  27. package/src/utils/linkAttachmentFromStream.ts +112 -0
  28. package/dist/index-B_8de68T.cjs.map +0 -1
  29. package/dist/index-DGVCJzwy.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
2
- import $, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
3
- import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
- import { Chat as In, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs, InfiniteScroll as ds } from "stream-chat-react";
5
- import { StarIcon as Fe, DotsThreeIcon as us, SpinnerGapIcon as Ce, SignOutIcon as ms, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as hs, SpeakerHighIcon as fs, VideoCameraIcon as Gt, FileMdIcon as gs, FileTextIcon as bs, FileZipIcon as ps, FilePptIcon as vs, FileCsvIcon as xs, FileXlsIcon as ws, FileDocIcon as _s, FilePdfIcon as Ns, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as ys, LinkIcon as Cs, DownloadSimpleIcon as be, GiftIcon as ks, ThumbsUpIcon as Es, ThumbsDownIcon as Ss, TrashSimpleIcon as Is, XIcon as Ae, ArrowUpIcon as Ts, SparkleIcon as Ue, ProhibitIcon as As, ArrowLeftIcon as Mt, PencilSimpleIcon as Ms, CaretLeftIcon as Rs, CaretRightIcon as Ls } from "@phosphor-icons/react";
2
+ import $, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as H, useEffect as Y, useId as Sn, useMemo as ee, Suspense as He } from "react";
3
+ import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
+ import { Chat as Tn, DateSeparator as An, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as Mn, useMessageReminder as Rn, useComponentContext as jt, Attachment as Ln, EditMessageModal as Dn, MessageBlocked as Pn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as $n, MessageRepliesCountButton as Fn, ReminderNotification as Bn, StreamedMessageText as Un, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as qn, MessageText as Tt, Poll as Wn, MessageErrorIcon as Xn, useMessageContext as pe, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Zn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, AttachmentPreviewList as ts, QuotedMessagePreview as ns, TextareaComposer as ss, MessageTimestamp as Le, AIStates as De, useTypingContext as as, useAIState as rs, Channel as is, WithComponents as os, Window as ls, MessageList as cs, ChannelList as ds, InfiniteScroll as us } from "stream-chat-react";
5
+ import { StarIcon as Fe, DotsThreeIcon as ms, SpinnerGapIcon as Ce, SignOutIcon as hs, ProhibitInsetIcon as At, FlagIcon as Vt, FileIcon as Gt, ImageIcon as fs, SpeakerHighIcon as gs, VideoCameraIcon as Ht, FileMdIcon as bs, FileTextIcon as ps, FileZipIcon as vs, FilePptIcon as xs, FileCsvIcon as ws, FileXlsIcon as _s, FileDocIcon as Ns, FilePdfIcon as ys, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as Cs, LinkIcon as ks, DownloadSimpleIcon as be, GiftIcon as Es, ThumbsUpIcon as Ss, ThumbsDownIcon as Is, TrashSimpleIcon as Ts, XIcon as Ae, ArrowUpIcon as As, SparkleIcon as Ue, ProhibitIcon as Ms, ArrowLeftIcon as Mt, PencilSimpleIcon as Rs, CaretLeftIcon as Ls, CaretRightIcon as Ds } from "@phosphor-icons/react";
6
6
  import y from "classnames";
7
- import { MessageActions as Ds, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
7
+ import { MessageActions as Ps, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Rt } from "stream-chat";
9
- const Yt = Ge({
9
+ const qt = Ge({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Yt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), qe = () => Te(Yt), _i = ({
19
+ }), qe = () => Te(qt), yi = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -80,7 +80,7 @@ const Yt = Ge({
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
81
  serviceConfigChanged: x.current.serviceConfig !== s
82
82
  });
83
- const T = new Sn({
83
+ const T = new In({
84
84
  ...s,
85
85
  apiKey: a,
86
86
  debug: i
@@ -207,8 +207,8 @@ const Yt = Ge({
207
207
  renderCount: S.current,
208
208
  willRenderChat: !!(m && u),
209
209
  contextValueReady: !!D
210
- }), /* @__PURE__ */ n(Yt.Provider, { value: D, children: m && u ? /* @__PURE__ */ n(
211
- In,
210
+ }), /* @__PURE__ */ n(qt.Provider, { value: D, children: m && u ? /* @__PURE__ */ n(
211
+ Tn,
212
212
  {
213
213
  client: m,
214
214
  customClasses: {
@@ -217,7 +217,7 @@ const Yt = Ge({
217
217
  children: e
218
218
  }
219
219
  ) : e });
220
- }, Ps = () => qe(), qt = (e) => {
220
+ }, Os = () => qe(), Wt = (e) => {
221
221
  var a, r;
222
222
  const [t, s] = P(
223
223
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -239,15 +239,15 @@ const Yt = Ge({
239
239
  e.off("member.updated", i);
240
240
  };
241
241
  }, [e]), t;
242
- }, Os = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
243
- function zs(e) {
244
- return Os.test(e.trim());
242
+ }, zs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
243
+ function $s(e) {
244
+ return zs.test(e.trim());
245
245
  }
246
246
  function Lt(e, t) {
247
247
  const s = e == null ? void 0 : e.trim();
248
- return !s || t && s === t ? !1 : !zs(s);
248
+ return !s || t && s === t ? !1 : !$s(s);
249
249
  }
250
- function Wt(e) {
250
+ function Xt(e) {
251
251
  return Lt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Lt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
252
252
  }
253
253
  const Dt = [
@@ -278,7 +278,7 @@ const Dt = [
278
278
  "🍈"
279
279
  // Melon
280
280
  ];
281
- function $s(e) {
281
+ function Fs(e) {
282
282
  let t = 0;
283
283
  for (let s = 0; s < e.length; s++) {
284
284
  const a = e.charCodeAt(s);
@@ -286,8 +286,8 @@ function $s(e) {
286
286
  }
287
287
  return Math.abs(t);
288
288
  }
289
- function Fs(e) {
290
- const s = $s(e) % Dt.length;
289
+ function Bs(e) {
290
+ const s = Fs(e) % Dt.length;
291
291
  return Dt[s];
292
292
  }
293
293
  const ae = ({
@@ -299,7 +299,7 @@ const ae = ({
299
299
  shape: i = "squircle",
300
300
  dmAgentEnabled: o = !1
301
301
  }) => {
302
- const l = Fs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
302
+ const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
303
303
  "img",
304
304
  {
305
305
  src: t,
@@ -361,7 +361,7 @@ const ae = ({
361
361
  ]
362
362
  }
363
363
  );
364
- }, Bs = "https://linktr.ee/s/about/trust-center/report", Us = ({
364
+ }, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
365
365
  channel: e,
366
366
  participant: t,
367
367
  showBlockParticipant: s = !0,
@@ -445,7 +445,7 @@ const ae = ({
445
445
  }
446
446
  },
447
447
  handleReportUser: () => {
448
- d == null || d(), m == null || m(), window.open(Bs, "_blank", "noopener,noreferrer");
448
+ d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
449
449
  }
450
450
  };
451
451
  }, he = ({
@@ -479,7 +479,7 @@ const ae = ({
479
479
  customChannelActions: b,
480
480
  triggerClassName: u
481
481
  }) => {
482
- const [f, c] = P(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
482
+ const [f, c] = P(!1), g = H(null), p = Sn(), v = W(() => c(!1), []), {
483
483
  isParticipantBlocked: _,
484
484
  isCheckingBlockedStatus: x,
485
485
  isLeaving: S,
@@ -488,7 +488,7 @@ const ae = ({
488
488
  handleBlockUser: D,
489
489
  handleUnblockUser: k,
490
490
  handleReportUser: T
491
- } = Us({
491
+ } = js({
492
492
  channel: e,
493
493
  participant: t,
494
494
  showBlockParticipant: a,
@@ -522,7 +522,7 @@ const ae = ({
522
522
  "aria-controls": f ? p : void 0,
523
523
  onClick: () => c((I) => !I),
524
524
  children: [
525
- /* @__PURE__ */ n(us, { className: "size-5 text-black/90" }),
525
+ /* @__PURE__ */ n(ms, { className: "size-5 text-black/90" }),
526
526
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
527
527
  ]
528
528
  }
@@ -544,7 +544,7 @@ const ae = ({
544
544
  disabled: S,
545
545
  "aria-busy": S,
546
546
  children: [
547
- S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ms, { className: "h-5 w-5" }),
547
+ S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
548
548
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
549
549
  ]
550
550
  }
@@ -580,7 +580,7 @@ const ae = ({
580
580
  }
581
581
  ) }),
582
582
  r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(he, { variant: "danger", onClick: T, children: [
583
- /* @__PURE__ */ n(jt, { className: "h-5 w-5" }),
583
+ /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
584
584
  /* @__PURE__ */ n("span", { children: "Report" })
585
585
  ] }) }),
586
586
  b
@@ -588,13 +588,13 @@ const ae = ({
588
588
  }
589
589
  )
590
590
  ] });
591
- }, js = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
592
- function Vs(e) {
591
+ }, Vs = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
592
+ function Gs(e) {
593
593
  return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
594
594
  }
595
- function Gs(e) {
595
+ function Hs(e) {
596
596
  const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ee(
597
- () => Vs(e.own_reactions),
597
+ () => Gs(e.own_reactions),
598
598
  [e.own_reactions]
599
599
  ), r = W(async () => {
600
600
  if (s != null && s.userID)
@@ -619,24 +619,24 @@ function Gs(e) {
619
619
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
620
620
  return { selected: a, voteUp: r, voteDown: i };
621
621
  }
622
- function Hs(e) {
622
+ function Ys(e) {
623
623
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
624
624
  }
625
- function Xt({
625
+ function Kt({
626
626
  message: e,
627
627
  viewerLanguage: t
628
628
  }) {
629
629
  var r;
630
- const s = e == null ? void 0 : e.text, a = Hs(t);
630
+ const s = e == null ? void 0 : e.text, a = Ys(t);
631
631
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
632
632
  }
633
- const Ys = $.lazy(() => import("./Card-giUAe8IB.js")), qs = $.lazy(() => import("./Card-DndbBigk.js")), Ws = $.lazy(() => import("./Card-qFB_y7k3.js")), We = () => /* @__PURE__ */ n(
633
+ const qs = $.lazy(() => import("./Card-BokhtsDD.js")), Ws = $.lazy(() => import("./Card-CG8SMxkM.js")), Xs = $.lazy(() => import("./Card-DaXkK4uS.js")), We = () => /* @__PURE__ */ n(
634
634
  "div",
635
635
  {
636
636
  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)]",
637
637
  "aria-hidden": !0
638
638
  }
639
- ), Xs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Ks = Kt, Js = Jt, Ot = { Composer: Xs, Sent: Kt, Received: Jt, Creator: Ks, Visitor: Js }, Zs = [
639
+ ), Ks = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Jt, Zs = Zt, Ot = { Composer: Ks, Sent: Jt, Received: Zt, Creator: Js, Visitor: Zs }, Qs = [
640
640
  [/pdf/, "pdf"],
641
641
  [/wordprocessingml|msword|\.doc/, "doc"],
642
642
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -649,39 +649,39 @@ const Ys = $.lazy(() => import("./Card-giUAe8IB.js")), qs = $.lazy(() => import(
649
649
  function ne(e) {
650
650
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
651
651
  }
652
- function Zt(e) {
653
- const t = Zs.find(
652
+ function Qt(e) {
653
+ const t = Qs.find(
654
654
  ([s]) => s.test(e)
655
655
  );
656
656
  return t ? t[1] : "generic";
657
657
  }
658
- const Qs = {
659
- video: Gt,
660
- audio: fs,
661
- image: hs,
662
- document: Vt
663
- }, ea = {
664
- pdf: Ns,
665
- doc: _s,
666
- xls: ws,
667
- csv: xs,
668
- ppt: vs,
669
- zip: ps,
670
- text: bs,
671
- markdown: gs,
672
- generic: Vt
658
+ const ea = {
659
+ video: Ht,
660
+ audio: gs,
661
+ image: fs,
662
+ document: Gt
663
+ }, ta = {
664
+ pdf: ys,
665
+ doc: Ns,
666
+ xls: _s,
667
+ csv: ws,
668
+ ppt: xs,
669
+ zip: vs,
670
+ text: ps,
671
+ markdown: bs,
672
+ generic: Gt
673
673
  };
674
- function ta(e) {
674
+ function na(e) {
675
675
  const t = ne(e);
676
- return t !== "document" ? Qs[t] : ea[Zt(e)];
676
+ return t !== "document" ? ea[t] : ta[Qt(e)];
677
677
  }
678
678
  function le(e, t) {
679
- return $.createElement(ta(e), t);
679
+ return $.createElement(na(e), t);
680
680
  }
681
- const na = (e) => {
681
+ const sa = (e) => {
682
682
  var t, s;
683
683
  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;
684
- }, sa = ({
684
+ }, aa = ({
685
685
  source: e,
686
686
  mimeType: t,
687
687
  poster: s,
@@ -701,7 +701,7 @@ const na = (e) => {
701
701
  const j = C.getBoundingClientRect();
702
702
  return Math.max(
703
703
  0,
704
- Math.min(1, (na(w) - j.left) / j.width)
704
+ Math.min(1, (sa(w) - j.left) / j.width)
705
705
  );
706
706
  }, []), B = W((w) => {
707
707
  const C = u.current;
@@ -879,7 +879,7 @@ const na = (e) => {
879
879
  },
880
880
  className: "shrink-0 text-white",
881
881
  "aria-label": p ? "Pause" : "Play",
882
- children: p ? /* @__PURE__ */ n(ys, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
882
+ children: p ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
883
883
  }
884
884
  ),
885
885
  /* @__PURE__ */ h(
@@ -929,7 +929,7 @@ const na = (e) => {
929
929
  ]
930
930
  }
931
931
  );
932
- }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", aa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
932
+ }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
933
933
  mimeType: e,
934
934
  sourceUrl: t,
935
935
  thumbnailUrl: s,
@@ -940,7 +940,7 @@ const na = (e) => {
940
940
  }) => {
941
941
  const l = ne(e), [d, m] = P(!1);
942
942
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
943
- sa,
943
+ aa,
944
944
  {
945
945
  source: t,
946
946
  mimeType: e,
@@ -991,7 +991,7 @@ const na = (e) => {
991
991
  weight: "regular"
992
992
  })
993
993
  }
994
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${aa(r)}`, children: /* @__PURE__ */ n(
994
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
995
995
  "img",
996
996
  {
997
997
  src: s,
@@ -1009,7 +1009,7 @@ const na = (e) => {
1009
1009
  })
1010
1010
  }
1011
1011
  );
1012
- }, en = ({
1012
+ }, tn = ({
1013
1013
  variant: e,
1014
1014
  thumbnail: t,
1015
1015
  title: s,
@@ -1075,25 +1075,25 @@ const na = (e) => {
1075
1075
  }
1076
1076
  );
1077
1077
  };
1078
- function tn(e) {
1078
+ function nn(e) {
1079
1079
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1080
1080
  }
1081
1081
  function Xe(e) {
1082
1082
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1083
1083
  }
1084
- function ra(e) {
1084
+ function ia(e) {
1085
1085
  return e ? "bg-white/10" : "bg-black/5";
1086
1086
  }
1087
- function ia(e) {
1087
+ function oa(e) {
1088
1088
  return e ? "text-white" : "text-black";
1089
1089
  }
1090
- function oa(e) {
1090
+ function la(e) {
1091
1091
  return e ? "text-white/55" : "text-black/55";
1092
1092
  }
1093
- function la(e) {
1093
+ function ca(e) {
1094
1094
  return e ? "text-white/40" : "text-black/40";
1095
1095
  }
1096
- function ca(e) {
1096
+ function da(e) {
1097
1097
  return e ? "text-white/20" : "text-black/20";
1098
1098
  }
1099
1099
  const Ke = ({ attachment: e, isMyMessage: t }) => {
@@ -1108,26 +1108,26 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
1108
1108
  ) : /* @__PURE__ */ n(
1109
1109
  "div",
1110
1110
  {
1111
- className: `aspect-video w-full rounded-[20px] ${ra(t)} flex items-center justify-center`,
1112
- children: /* @__PURE__ */ n(Cs, { className: `size-12 ${ca(t)}` })
1111
+ className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
1112
+ children: /* @__PURE__ */ n(ks, { className: `size-12 ${da(t)}` })
1113
1113
  }
1114
1114
  ) }),
1115
1115
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1116
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ia(t)}`, children: s }),
1117
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${oa(t)}`, children: a }),
1118
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${la(t)}`, children: d })
1116
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${oa(t)}`, children: s }),
1117
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${la(t)}`, children: a }),
1118
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1119
1119
  ] })
1120
1120
  ] });
1121
1121
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
1122
1122
  };
1123
- function nn(e) {
1123
+ function sn(e) {
1124
1124
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1125
1125
  }
1126
1126
  function Je(e) {
1127
1127
  var t;
1128
- return (t = e.attachments) == null ? void 0 : t.find(nn);
1128
+ return (t = e.attachments) == null ? void 0 : t.find(sn);
1129
1129
  }
1130
- async function da(e, t) {
1130
+ async function ua(e, t) {
1131
1131
  let s;
1132
1132
  try {
1133
1133
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1139,7 +1139,7 @@ async function da(e, t) {
1139
1139
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1140
1140
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1141
1141
  }
1142
- const ua = ({
1142
+ const ma = ({
1143
1143
  url: e,
1144
1144
  filename: t
1145
1145
  }) => {
@@ -1151,7 +1151,7 @@ const ua = ({
1151
1151
  onClick: (i) => {
1152
1152
  i.stopPropagation();
1153
1153
  const o = window.open("", "_blank", "noopener,noreferrer");
1154
- a(!0), da(e, t).then(() => {
1154
+ a(!0), ua(e, t).then(() => {
1155
1155
  o == null || o.close();
1156
1156
  }).catch(() => {
1157
1157
  o && (o.location.href = e);
@@ -1187,16 +1187,16 @@ function Ze(e) {
1187
1187
  thumbnailUrl: b
1188
1188
  };
1189
1189
  }
1190
- const sn = ({
1190
+ const an = ({
1191
1191
  resolvedUrl: e,
1192
1192
  resolvedType: t,
1193
1193
  title: s,
1194
1194
  fileSize: a,
1195
1195
  thumbnailUrl: r
1196
1196
  }) => {
1197
- const i = a !== void 0 ? tn(a) : void 0;
1197
+ const i = a !== void 0 ? nn(a) : void 0;
1198
1198
  return /* @__PURE__ */ n(
1199
- en,
1199
+ tn,
1200
1200
  {
1201
1201
  variant: "dark",
1202
1202
  title: s,
@@ -1204,7 +1204,7 @@ const sn = ({
1204
1204
  mimeType: t,
1205
1205
  detail: i,
1206
1206
  thumbnail: /* @__PURE__ */ n(
1207
- Qt,
1207
+ en,
1208
1208
  {
1209
1209
  mimeType: t,
1210
1210
  sourceUrl: e,
@@ -1215,23 +1215,23 @@ const sn = ({
1215
1215
  )
1216
1216
  }
1217
1217
  );
1218
- }, an = ({
1218
+ }, rn = ({
1219
1219
  resolvedUrl: e,
1220
1220
  resolvedType: t,
1221
1221
  title: s,
1222
1222
  fileSize: a,
1223
1223
  thumbnailUrl: r
1224
1224
  }) => {
1225
- const i = ne(t), o = a !== void 0 ? tn(a) : void 0;
1225
+ const i = ne(t), o = a !== void 0 ? nn(a) : void 0;
1226
1226
  return /* @__PURE__ */ n(
1227
- en,
1227
+ tn,
1228
1228
  {
1229
1229
  variant: "light",
1230
1230
  title: s,
1231
1231
  mimeType: t,
1232
1232
  detail: o,
1233
1233
  thumbnail: /* @__PURE__ */ n(
1234
- Qt,
1234
+ en,
1235
1235
  {
1236
1236
  mimeType: t,
1237
1237
  sourceUrl: e,
@@ -1241,10 +1241,10 @@ const sn = ({
1241
1241
  containedImage: i === "image" || i === "document"
1242
1242
  }
1243
1243
  ),
1244
- action: /* @__PURE__ */ n(ua, { url: e, filename: s })
1244
+ action: /* @__PURE__ */ n(ma, { url: e, filename: s })
1245
1245
  }
1246
1246
  );
1247
- }, ma = ({
1247
+ }, ha = ({
1248
1248
  message: e,
1249
1249
  isMyMessage: t = !1
1250
1250
  }) => {
@@ -1269,40 +1269,40 @@ const sn = ({
1269
1269
  {
1270
1270
  className: "str-chat__message-bubble",
1271
1271
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1272
- children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
1272
+ children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(an, { ...a }) : /* @__PURE__ */ n(rn, { ...a })
1273
1273
  }
1274
1274
  ) })
1275
1275
  }
1276
1276
  )
1277
1277
  ] });
1278
- }, ha = ({
1278
+ }, fa = ({
1279
1279
  message: e
1280
1280
  }) => {
1281
1281
  const t = Je(e);
1282
1282
  if (t)
1283
1283
  return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
1284
1284
  const s = Ze(e);
1285
- return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
1286
- }, fa = ({
1285
+ return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1286
+ }, ga = ({
1287
1287
  message: e
1288
1288
  }) => {
1289
1289
  const t = Je(e);
1290
1290
  if (t)
1291
1291
  return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
1292
1292
  const s = Ze(e);
1293
- return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1294
- }, Ni = Object.assign(ma, {
1295
- Creator: ha,
1296
- Visitor: fa
1297
- }), ga = {
1293
+ return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
1294
+ }, Ci = Object.assign(ha, {
1295
+ Creator: fa,
1296
+ Visitor: ga
1297
+ }), ba = {
1298
1298
  isUnlocking: () => !1
1299
- }, ba = {
1300
- LockedAttachment: ga
1301
- }, rn = Ge({}), yi = rn.Provider;
1302
- function pa(e) {
1303
- return Te(rn)[e] ?? ba[e];
1299
+ }, pa = {
1300
+ LockedAttachment: ba
1301
+ }, on = Ge({}), ki = on.Provider;
1302
+ function va(e) {
1303
+ return Te(on)[e] ?? pa[e];
1304
1304
  }
1305
- const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1305
+ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1306
1306
  "svg",
1307
1307
  {
1308
1308
  width: e,
@@ -1319,21 +1319,21 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1319
1319
  }
1320
1320
  )
1321
1321
  }
1322
- ), xa = (e) => {
1322
+ ), wa = (e) => {
1323
1323
  var t;
1324
1324
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1325
- }, wa = (e) => {
1325
+ }, _a = (e) => {
1326
1326
  var t;
1327
1327
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1328
1328
  }, ke = (e) => {
1329
1329
  var t;
1330
1330
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1331
- }, _a = (e) => {
1331
+ }, Na = (e) => {
1332
1332
  var t;
1333
1333
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1334
- }, on = (e) => xa(e) || wa(e), Na = (e) => {
1334
+ }, ln = (e) => wa(e) || _a(e), ya = (e) => {
1335
1335
  var t;
1336
- return on(e) && !((t = e.text) != null && t.trim());
1336
+ return ln(e) && !((t = e.text) != null && t.trim());
1337
1337
  }, Pe = ({
1338
1338
  message: e,
1339
1339
  standalone: t = !1,
@@ -1341,7 +1341,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1341
1341
  hasAttachment: a = !1
1342
1342
  }) => {
1343
1343
  var u;
1344
- const r = on(e), i = ke(e);
1344
+ const r = ln(e), i = ke(e);
1345
1345
  if (!r && !i)
1346
1346
  return null;
1347
1347
  if (r) {
@@ -1349,7 +1349,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1349
1349
  if (!f) return null;
1350
1350
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", g = t ? `${f} tip` : `Delivered with ${f} tip`;
1351
1351
  return /* @__PURE__ */ h("div", { className: c, children: [
1352
- /* @__PURE__ */ n(ks, { size: t ? 14 : 12 }),
1352
+ /* @__PURE__ */ n(Es, { size: t ? 14 : 12 }),
1353
1353
  /* @__PURE__ */ n("span", { children: g })
1354
1354
  ] });
1355
1355
  }
@@ -1357,7 +1357,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1357
1357
  "message-chatbot-indicator",
1358
1358
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1359
1359
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1360
- ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(va, { size: o ? 12 : 15 }) });
1360
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
1361
1361
  return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(te, { children: [
1362
1362
  m,
1363
1363
  b
@@ -1365,7 +1365,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1365
1365
  b,
1366
1366
  m
1367
1367
  ] }) });
1368
- }, ya = ({
1368
+ }, Ca = ({
1369
1369
  selected: e,
1370
1370
  onVoteUp: t,
1371
1371
  onVoteDown: s
@@ -1381,7 +1381,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1381
1381
  "aria-label": "Good response",
1382
1382
  "aria-pressed": e === "up",
1383
1383
  "data-tooltip": "Good response",
1384
- children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "up" ? "fill" : "regular" })
1384
+ children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "up" ? "fill" : "regular" })
1385
1385
  }
1386
1386
  ),
1387
1387
  /* @__PURE__ */ n(
@@ -1395,10 +1395,10 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1395
1395
  "aria-label": "Bad response",
1396
1396
  "aria-pressed": e === "down",
1397
1397
  "data-tooltip": "Bad response",
1398
- children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "down" ? "fill" : "regular" })
1398
+ children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "down" ? "fill" : "regular" })
1399
1399
  }
1400
1400
  )
1401
- ] }), Ca = (e) => {
1401
+ ] }), ka = (e) => {
1402
1402
  var ht, ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et;
1403
1403
  const {
1404
1404
  additionalMessageInputProps: t,
@@ -1417,40 +1417,40 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1417
1417
  renderText: g,
1418
1418
  threadList: p,
1419
1419
  viewerLanguage: v
1420
- } = e, { client: _ } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: S, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = pa("LockedAttachment"), [k, T] = P(!1), N = Mn(c.id), { selected: I, voteUp: R, voteDown: F } = Gs(c), {
1421
- Attachment: A = Rn,
1422
- EditMessageModal: L = Ln,
1420
+ } = e, { client: _ } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: S, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = va("LockedAttachment"), [k, T] = P(!1), N = Rn(c.id), { selected: I, voteUp: R, voteDown: F } = Hs(c), {
1421
+ Attachment: A = Ln,
1422
+ EditMessageModal: L = Dn,
1423
1423
  MessageActions: z,
1424
- MessageBlocked: V = Dn,
1425
- MessageBouncePrompt: B = Pn,
1426
- MessageDeleted: U = On,
1427
- MessageIsThreadReplyInChannelButtonIndicator: X = zn,
1428
- MessageRepliesCountButton: G = $n,
1429
- ReminderNotification: O = Fn,
1430
- StreamedMessageText: w = Bn,
1424
+ MessageBlocked: V = Pn,
1425
+ MessageBouncePrompt: B = On,
1426
+ MessageDeleted: U = zn,
1427
+ MessageIsThreadReplyInChannelButtonIndicator: X = $n,
1428
+ MessageRepliesCountButton: G = Fn,
1429
+ ReminderNotification: O = Bn,
1430
+ StreamedMessageText: w = Un,
1431
1431
  PinIndicator: C
1432
- } = Ut("CustomMessage"), j = Un(c), q = jn(c), Ne = ee(
1432
+ } = jt("CustomMessage"), j = jn(c), q = Vn(c), Ne = ee(
1433
1433
  () => u == null ? void 0 : u(c),
1434
1434
  [u, c]
1435
1435
  ), K = ee(() => {
1436
1436
  const me = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...me] : me;
1437
1437
  if (!ke(c)) return ye;
1438
- const St = ye.filter((It) => !("type" in It) || !nn(It));
1438
+ const St = ye.filter((It) => !("type" in It) || !sn(It));
1439
1439
  return St.length === ye.length ? ye : St;
1440
1440
  }, [c]), re = ee(() => {
1441
- const me = Xt({ message: c, viewerLanguage: v });
1441
+ const me = Kt({ message: c, viewerLanguage: v });
1442
1442
  return me === c.text ? c : { ...c, text: me };
1443
1443
  }, [c, v]);
1444
- if (Vn(c))
1444
+ if (Gn(c))
1445
1445
  return null;
1446
1446
  if (c.deleted_at || c.type === "deleted")
1447
1447
  return /* @__PURE__ */ n(U, { message: c });
1448
- if (Gn(c))
1448
+ if (Hn(c))
1449
1449
  return /* @__PURE__ */ n(V, {});
1450
- const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Hn(c);
1450
+ const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Yn(c);
1451
1451
  let ie;
1452
1452
  Q ? ie = () => m(c) : lt && (ie = () => T(!0));
1453
- const de = f(), kn = y(
1453
+ const de = f(), En = y(
1454
1454
  "str-chat__message str-chat__message-simple",
1455
1455
  `str-chat__message--${c.type}`,
1456
1456
  `str-chat__message--${c.status}`,
@@ -1467,7 +1467,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1467
1467
  "str-chat__virtual-message__wrapper--first": i,
1468
1468
  "str-chat__virtual-message__wrapper--group": o
1469
1469
  }
1470
- ), ct = c.poll_id && _.polls.fromState(c.poll_id), dt = Na(c), ue = ke(c), ut = _a(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
1470
+ ), ct = c.poll_id && _.polls.fromState(c.poll_id), dt = ya(c), ue = ke(c), ut = Na(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
1471
1471
  return /* @__PURE__ */ h(te, { children: [
1472
1472
  a && /* @__PURE__ */ n(
1473
1473
  L,
@@ -1476,7 +1476,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1476
1476
  }
1477
1477
  ),
1478
1478
  k && /* @__PURE__ */ n(
1479
- Yn,
1479
+ qn,
1480
1480
  {
1481
1481
  MessageBouncePrompt: B,
1482
1482
  onClose: () => T(!1),
@@ -1486,7 +1486,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1486
1486
  /* @__PURE__ */ h(
1487
1487
  "div",
1488
1488
  {
1489
- className: kn,
1489
+ className: En,
1490
1490
  "data-message-id": c.id,
1491
1491
  children: [
1492
1492
  C && /* @__PURE__ */ n(C, {}),
@@ -1573,7 +1573,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1573
1573
  isMyMessage: de
1574
1574
  }
1575
1575
  ),
1576
- ct && /* @__PURE__ */ n(qn, { poll: ct }),
1576
+ ct && /* @__PURE__ */ n(Wn, { poll: ct }),
1577
1577
  K != null && K.length && !c.quoted_message ? /* @__PURE__ */ n(
1578
1578
  A,
1579
1579
  {
@@ -1594,7 +1594,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1594
1594
  renderText: g
1595
1595
  }
1596
1596
  ),
1597
- /* @__PURE__ */ n(Wn, {})
1597
+ /* @__PURE__ */ n(Xn, {})
1598
1598
  ] }) })
1599
1599
  }
1600
1600
  ),
@@ -1608,7 +1608,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1608
1608
  }
1609
1609
  ),
1610
1610
  s && ue && /* @__PURE__ */ n(
1611
- ya,
1611
+ Ca,
1612
1612
  {
1613
1613
  selected: I,
1614
1614
  onVoteUp: R,
@@ -1629,50 +1629,50 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1629
1629
  c.id
1630
1630
  )
1631
1631
  ] });
1632
- }, ka = $.memo(
1633
- Ca,
1634
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1635
- ), Ea = (e) => {
1632
+ }, Ea = $.memo(
1633
+ ka,
1634
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1635
+ ), Sa = (e) => {
1636
1636
  const t = pe("CustomMessage");
1637
- return /* @__PURE__ */ n(ka, { ...t, ...e });
1638
- }, Sa = () => {
1637
+ return /* @__PURE__ */ n(Ea, { ...t, ...e });
1638
+ }, Ia = () => {
1639
1639
  var s;
1640
1640
  const { handleDelete: e, message: t } = pe("CustomMessageActions");
1641
1641
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1642
- Ht,
1642
+ Yt,
1643
1643
  {
1644
1644
  onClick: e,
1645
1645
  "aria-label": "Delete",
1646
1646
  title: "Delete",
1647
1647
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1648
- children: /* @__PURE__ */ n(Is, { size: 16, weight: "light", "aria-hidden": !0 })
1648
+ children: /* @__PURE__ */ n(Ts, { size: 16, weight: "light", "aria-hidden": !0 })
1649
1649
  }
1650
1650
  );
1651
- }, Ia = () => {
1651
+ }, Ta = () => {
1652
1652
  const { handleFlag: e } = pe("CustomMessageActions");
1653
1653
  return /* @__PURE__ */ n(
1654
- Ht,
1654
+ Yt,
1655
1655
  {
1656
1656
  onClick: e,
1657
1657
  "aria-label": "Report",
1658
1658
  title: "Report",
1659
1659
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1660
- children: /* @__PURE__ */ n(jt, { size: 16, weight: "light", "aria-hidden": !0 })
1660
+ children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
1661
1661
  }
1662
1662
  );
1663
- }, Ta = () => {
1663
+ }, Aa = () => {
1664
1664
  var t;
1665
1665
  const { message: e } = pe("CustomMessageActions");
1666
1666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1667
- Ds,
1667
+ Ps,
1668
1668
  {
1669
1669
  messageActionSet: [
1670
- { Component: Sa, placement: "quick", type: "delete" },
1671
- { Component: Ia, placement: "quick", type: "flag" }
1670
+ { Component: Ia, placement: "quick", type: "delete" },
1671
+ { Component: Ta, placement: "quick", type: "flag" }
1672
1672
  ]
1673
1673
  }
1674
1674
  );
1675
- }, Aa = ({
1675
+ }, Ma = ({
1676
1676
  link: e,
1677
1677
  onDismiss: t
1678
1678
  }) => {
@@ -1712,26 +1712,26 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1712
1712
  ]
1713
1713
  }
1714
1714
  );
1715
- }, Ma = (e) => ({
1715
+ }, Ra = (e) => ({
1716
1716
  linkPreviews: Array.from(e.previews.values()).filter(
1717
1717
  (t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
1718
1718
  )
1719
- }), Ra = () => {
1720
- const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
1719
+ }), La = () => {
1720
+ const { linkPreviewsManager: e } = Kn(), { linkPreviews: t } = Jn(
1721
1721
  e.state,
1722
- Ma
1722
+ Ra
1723
1723
  ), s = (r) => {
1724
1724
  e.dismissPreview(r);
1725
1725
  };
1726
1726
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1727
- Aa,
1727
+ Ma,
1728
1728
  {
1729
1729
  link: r,
1730
1730
  onDismiss: s
1731
1731
  },
1732
1732
  r.og_scrape_url
1733
1733
  )) }) : null;
1734
- }, ln = $.createContext(!1), La = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1734
+ }, cn = $.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1735
1735
  "button",
1736
1736
  {
1737
1737
  ...s,
@@ -1739,20 +1739,20 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1739
1739
  "aria-label": "Send",
1740
1740
  disabled: t,
1741
1741
  onClick: e,
1742
- children: /* @__PURE__ */ n(Ts, { weight: "bold", className: "size-4" })
1742
+ children: /* @__PURE__ */ n(As, { weight: "bold", className: "size-4" })
1743
1743
  }
1744
- ), Da = () => {
1745
- const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
1746
- SendButton: r = La,
1747
- AttachmentPreviewList: i = es
1748
- } = Ut("CustomMessageInput");
1744
+ ), Pa = () => {
1745
+ const e = Te(cn), { handleSubmit: t } = Qn(), s = es(), a = e || !s, {
1746
+ SendButton: r = Da,
1747
+ AttachmentPreviewList: i = ts
1748
+ } = jt("CustomMessageInput");
1749
1749
  return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
1750
- /* @__PURE__ */ n(ts, {}),
1751
- /* @__PURE__ */ n(Ra, {}),
1750
+ /* @__PURE__ */ n(ns, {}),
1751
+ /* @__PURE__ */ n(La, {}),
1752
1752
  /* @__PURE__ */ n(i, {}),
1753
1753
  /* @__PURE__ */ h("div", { className: "flex", children: [
1754
1754
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1755
- ns,
1755
+ ss,
1756
1756
  {
1757
1757
  "aria-disabled": e || void 0,
1758
1758
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -1775,7 +1775,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1775
1775
  )
1776
1776
  ] })
1777
1777
  ] });
1778
- }, Pa = ({
1778
+ }, Oa = ({
1779
1779
  renderActions: e,
1780
1780
  renderFooter: t,
1781
1781
  disabled: s = !1,
@@ -1795,23 +1795,23 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1795
1795
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1796
1796
  children: [
1797
1797
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1798
- /* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
1798
+ /* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Zn, { Input: Pa }) })
1799
1799
  ]
1800
1800
  }
1801
1801
  ),
1802
1802
  t == null ? void 0 : t()
1803
1803
  ] });
1804
- }, Oa = [
1804
+ }, za = [
1805
1805
  "SYSTEM_DM_AGENT_PAUSED",
1806
1806
  "SYSTEM_DM_AGENT_RESUMED"
1807
- ], za = {
1807
+ ], $a = {
1808
1808
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1809
1809
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1810
- }, $a = [
1810
+ }, Fa = [
1811
1811
  "SYSTEM_AGE_SAFETY_BLOCKED"
1812
- ], Fa = {
1812
+ ], Ba = {
1813
1813
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1814
- }, Oe = "age safety guidelines.", Ba = "https://linktr.ee/s/about/contact", $t = (e) => Oa.includes(e), Ua = (e) => $a.includes(e), ja = (e) => {
1814
+ }, Oe = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", $t = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1815
1815
  var a;
1816
1816
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1817
1817
  if ($t(t))
@@ -1819,7 +1819,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1819
1819
  kind: "dm-agent",
1820
1820
  type: t
1821
1821
  };
1822
- if (Ua(t))
1822
+ if (ja(t))
1823
1823
  return {
1824
1824
  kind: "age-safety",
1825
1825
  type: t
@@ -1830,7 +1830,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1830
1830
  kind: "dm-agent",
1831
1831
  type: s
1832
1832
  };
1833
- }, Va = (e) => {
1833
+ }, Ga = (e) => {
1834
1834
  const t = e.indexOf(Oe);
1835
1835
  if (t === -1)
1836
1836
  return e;
@@ -1840,7 +1840,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1840
1840
  /* @__PURE__ */ n(
1841
1841
  "a",
1842
1842
  {
1843
- href: Ba,
1843
+ href: Ua,
1844
1844
  target: "_blank",
1845
1845
  rel: "noopener noreferrer",
1846
1846
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -1849,13 +1849,13 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1849
1849
  ),
1850
1850
  e.slice(s)
1851
1851
  ] });
1852
- }, Ga = (e) => {
1852
+ }, Ha = (e) => {
1853
1853
  var a, r;
1854
- const t = e.message.hide_date === !0, s = ja(
1854
+ const t = e.message.hide_date === !0, s = Va(
1855
1855
  e.message
1856
1856
  );
1857
1857
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1858
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || za[s.type];
1858
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
1859
1859
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1860
1860
  /* @__PURE__ */ h(
1861
1861
  "div",
@@ -1881,7 +1881,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1881
1881
  ] });
1882
1882
  }
1883
1883
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1884
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Fa[s.type];
1884
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
1885
1885
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1886
1886
  /* @__PURE__ */ h(
1887
1887
  "div",
@@ -1891,7 +1891,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1891
1891
  "data-age-safety-system-type": s.type,
1892
1892
  children: [
1893
1893
  /* @__PURE__ */ n(
1894
- As,
1894
+ Ms,
1895
1895
  {
1896
1896
  size: 24,
1897
1897
  weight: "duotone",
@@ -1900,7 +1900,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1900
1900
  "data-testid": "age-safety-system-message-icon"
1901
1901
  }
1902
1902
  ),
1903
- /* @__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: Va(i) }) })
1903
+ /* @__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: Ga(i) }) })
1904
1904
  ]
1905
1905
  }
1906
1906
  ),
@@ -1915,7 +1915,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1915
1915
  ] }),
1916
1916
  !t && /* @__PURE__ */ n(Le, { message: e.message })
1917
1917
  ] });
1918
- }, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1918
+ }, dn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1919
1919
  "animateTransform",
1920
1920
  {
1921
1921
  attributeName: "transform",
@@ -1925,15 +1925,15 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1925
1925
  begin: `${120 * t}ms`,
1926
1926
  repeatCount: "indefinite"
1927
1927
  }
1928
- ) }), Ha = /* @__PURE__ */ new Set([
1928
+ ) }), Ya = /* @__PURE__ */ new Set([
1929
1929
  De.Thinking,
1930
1930
  De.Generating,
1931
1931
  De.ExternalSources
1932
- ]), Ya = ({ threadList: e }) => {
1932
+ ]), qa = ({ threadList: e }) => {
1933
1933
  var g, p;
1934
- const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(cn);
1935
- if (!e && l && Ha.has(o)) {
1936
- const v = qa(t, (g = r.user) == null ? void 0 : g.id);
1934
+ const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = as(), { aiState: o } = rs(t), l = Te(dn);
1935
+ if (!e && l && Ya.has(o)) {
1936
+ const v = Wa(t, (g = r.user) == null ? void 0 : g.id);
1937
1937
  return /* @__PURE__ */ n(
1938
1938
  Ft,
1939
1939
  {
@@ -2013,7 +2013,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
2013
2013
  ] })
2014
2014
  }
2015
2015
  );
2016
- function qa(e, t) {
2016
+ function Wa(e, t) {
2017
2017
  var a;
2018
2018
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2019
2019
  for (const r of Object.values(s)) {
@@ -2022,7 +2022,7 @@ function qa(e, t) {
2022
2022
  return i;
2023
2023
  }
2024
2024
  }
2025
- const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2025
+ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2026
2026
  "div",
2027
2027
  {
2028
2028
  className: y("flex items-center justify-center h-full", e),
@@ -2066,11 +2066,11 @@ const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2066
2066
  ]
2067
2067
  }
2068
2068
  ), Ee = $.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2069
- /* @__PURE__ */ n(Xa, { className: "w-6 h-6" }),
2069
+ /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2070
2070
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2071
2071
  ] }) }));
2072
2072
  Ee.displayName = "LoadingState";
2073
- const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ka = ({
2073
+ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ja = ({
2074
2074
  onBack: e,
2075
2075
  showBackButton: t,
2076
2076
  showStarButton: s = !1,
@@ -2096,7 +2096,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2096
2096
  return ((L = A.user) == null ? void 0 : L.id) && A.user.id !== N;
2097
2097
  }
2098
2098
  ) : void 0;
2099
- }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = qt(g), S = async () => {
2099
+ }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Xt(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = Wt(g), S = async () => {
2100
2100
  try {
2101
2101
  x ? await g.unpin() : await g.pin();
2102
2102
  } catch (N) {
@@ -2253,7 +2253,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2253
2253
  ] })
2254
2254
  ] })
2255
2255
  ] });
2256
- }, Ja = ({
2256
+ }, Za = ({
2257
2257
  onBack: e,
2258
2258
  showBackButton: t,
2259
2259
  renderMessageInputActions: s,
@@ -2298,7 +2298,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2298
2298
  }, [(V = k._client) == null ? void 0 : V.userID, (B = k.state) == null ? void 0 : B.members]), I = ((U = N == null ? void 0 : N.user) == null ? void 0 : U.is_account) ?? (N == null ? void 0 : N.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), F = E && I === !1 && R === !0, A = W(
2299
2299
  (G) => {
2300
2300
  const { message: O } = pe("ChannelView"), w = /* @__PURE__ */ n(
2301
- Ea,
2301
+ Sa,
2302
2302
  {
2303
2303
  ...G,
2304
2304
  chatbotVotingEnabled: v,
@@ -2310,15 +2310,15 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2310
2310
  [v, S, M]
2311
2311
  );
2312
2312
  return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
2313
- is,
2313
+ os,
2314
2314
  {
2315
2315
  overrides: {
2316
2316
  Message: A,
2317
- MessageActions: Ta
2317
+ MessageActions: Aa
2318
2318
  },
2319
- children: /* @__PURE__ */ h(os, { children: [
2319
+ children: /* @__PURE__ */ h(ls, { children: [
2320
2320
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2321
- Ka,
2321
+ Ja,
2322
2322
  {
2323
2323
  onBack: e,
2324
2324
  showBackButton: t,
@@ -2341,13 +2341,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2341
2341
  "div",
2342
2342
  {
2343
2343
  className: "flex-1 overflow-hidden relative",
2344
- children: /* @__PURE__ */ n(ls, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2344
+ children: /* @__PURE__ */ n(cs, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2345
2345
  },
2346
2346
  "lt-channel-message-list"
2347
2347
  ),
2348
2348
  r ? /* @__PURE__ */ n($.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
2349
2349
  /* @__PURE__ */ n(
2350
- Pa,
2350
+ Oa,
2351
2351
  {
2352
2352
  ...s && {
2353
2353
  renderActions: () => s == null ? void 0 : s(k)
@@ -2361,7 +2361,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2361
2361
  ] })
2362
2362
  }
2363
2363
  ) });
2364
- }, dn = $.memo(
2364
+ }, un = $.memo(
2365
2365
  ({
2366
2366
  channel: e,
2367
2367
  onBack: t,
@@ -2372,7 +2372,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2372
2372
  onLeaveConversation: o,
2373
2373
  onBlockParticipant: l,
2374
2374
  className: d,
2375
- CustomChannelEmptyState: m = Wa,
2375
+ CustomChannelEmptyState: m = Xa,
2376
2376
  showDeleteConversation: b = !0,
2377
2377
  onDeleteConversationClick: u,
2378
2378
  onBlockParticipantClick: f,
@@ -2434,20 +2434,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2434
2434
  "messaging-channel-view h-full flex flex-col",
2435
2435
  d
2436
2436
  ),
2437
- children: /* @__PURE__ */ n(cn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
2438
- rs,
2437
+ children: /* @__PURE__ */ n(dn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
2438
+ is,
2439
2439
  {
2440
2440
  channel: e,
2441
- MessageSystem: Ga,
2441
+ MessageSystem: Ha,
2442
2442
  EmptyStateIndicator: m,
2443
2443
  LoadingIndicator: Ee,
2444
- DateSeparator: js,
2445
- TypingIndicator: Ya,
2444
+ DateSeparator: Vs,
2445
+ TypingIndicator: qa,
2446
2446
  doSendMessageRequest: z,
2447
2447
  ...R ? { SendButton: R } : {},
2448
2448
  ...F ? { AttachmentPreviewList: F } : {},
2449
2449
  children: /* @__PURE__ */ n(
2450
- Ja,
2450
+ Za,
2451
2451
  {
2452
2452
  onBack: t,
2453
2453
  showBackButton: s,
@@ -2481,7 +2481,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2481
2481
  );
2482
2482
  }
2483
2483
  );
2484
- dn.displayName = "ChannelView";
2484
+ un.displayName = "ChannelView";
2485
2485
  const fe = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2486
2486
  /* @__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: "⚠️" }) }),
2487
2487
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -2497,7 +2497,7 @@ const fe = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2497
2497
  )
2498
2498
  ] }) }));
2499
2499
  fe.displayName = "ErrorState";
2500
- const Ci = ({
2500
+ const Ei = ({
2501
2501
  capabilities: e = {},
2502
2502
  renderMessageInputActions: t,
2503
2503
  renderConversationFooter: s,
@@ -2526,7 +2526,7 @@ const Ci = ({
2526
2526
  refreshConnection: k,
2527
2527
  service: T,
2528
2528
  debug: N
2529
- } = Ps(), [I, R] = P(null), [F, A] = P(null), [L, z] = P(!1), { showDeleteConversation: V = !0 } = e, B = H(o);
2529
+ } = Os(), [I, R] = P(null), [F, A] = P(null), [L, z] = P(!1), { showDeleteConversation: V = !0 } = e, B = H(o);
2530
2530
  B.current = o;
2531
2531
  const U = H(a);
2532
2532
  U.current = a;
@@ -2610,7 +2610,7 @@ const Ci = ({
2610
2610
  onBack: k
2611
2611
  }
2612
2612
  ) : F ? /* @__PURE__ */ n(fe, { message: F }) : L && !I ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : I ? /* @__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(
2613
- dn,
2613
+ un,
2614
2614
  {
2615
2615
  channel: I,
2616
2616
  renderMessageInputActions: t,
@@ -2634,31 +2634,31 @@ const Ci = ({
2634
2634
  I.id
2635
2635
  ) }) }) : /* @__PURE__ */ n(Ee, {});
2636
2636
  };
2637
- function Za(e) {
2637
+ function Qa(e) {
2638
2638
  const t = e.state.pending_messages;
2639
2639
  if (t != null && t.length)
2640
2640
  for (const s of t)
2641
2641
  e.state.addMessageSorted(s.message);
2642
2642
  }
2643
- const un = $.createContext({
2643
+ const mn = $.createContext({
2644
2644
  selectedChannel: void 0,
2645
2645
  onChannelSelect: () => {
2646
2646
  },
2647
2647
  debug: !1,
2648
2648
  renderMessagePreview: void 0,
2649
2649
  viewerLanguage: void 0
2650
- }), Qa = un.Provider, er = () => $.useContext(un), tr = (e, t) => {
2650
+ }), er = mn.Provider, tr = () => $.useContext(mn), nr = (e, t) => {
2651
2651
  const s = new Date(
2652
2652
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2653
2653
  ), r = new Date(
2654
2654
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2655
2655
  ).getTime() - s.getTime();
2656
2656
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2657
- }, nr = (e) => {
2657
+ }, sr = (e) => {
2658
2658
  const t = /* @__PURE__ */ new Date();
2659
2659
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2660
2660
  return "Just now";
2661
- const a = tr(e, t);
2661
+ const a = nr(e, t);
2662
2662
  return a === 0 ? e.toLocaleTimeString([], {
2663
2663
  hour: "numeric",
2664
2664
  minute: "2-digit",
@@ -2668,7 +2668,7 @@ const un = $.createContext({
2668
2668
  day: "numeric",
2669
2669
  year: "2-digit"
2670
2670
  });
2671
- }, mn = $.memo(
2671
+ }, hn = $.memo(
2672
2672
  ({ channel: e, unread: t }) => {
2673
2673
  var D, k, T;
2674
2674
  const {
@@ -2677,7 +2677,7 @@ const un = $.createContext({
2677
2677
  debug: r,
2678
2678
  renderMessagePreview: i,
2679
2679
  viewerLanguage: o
2680
- } = er(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2680
+ } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2681
2681
  e && a(e);
2682
2682
  }, m = (N) => {
2683
2683
  const I = N.key === "Enter" || N.key === " ", R = N.repeat;
@@ -2687,7 +2687,7 @@ const un = $.createContext({
2687
2687
  var I, R;
2688
2688
  return ((I = N.user) == null ? void 0 : I.id) && N.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
2689
2689
  }
2690
- ), f = Wt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
2690
+ ), f = Xt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
2691
2691
  var I;
2692
2692
  const N = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
2693
2693
  if (N != null && N.length) {
@@ -2696,7 +2696,7 @@ const un = $.createContext({
2696
2696
  }
2697
2697
  })(), v = (() => {
2698
2698
  var L, z, V, B;
2699
- const N = Xt({
2699
+ const N = Kt({
2700
2700
  message: g,
2701
2701
  viewerLanguage: o
2702
2702
  });
@@ -2706,7 +2706,7 @@ const un = $.createContext({
2706
2706
  if (N) return N;
2707
2707
  const A = (B = g == null ? void 0 : g.attachments) == null ? void 0 : B[0];
2708
2708
  return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2709
- })(), _ = g != null && g.created_at ? nr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, S = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
2709
+ })(), _ = g != null && g.created_at ? sr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, S = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = Wt(e), M = t ?? 0;
2710
2710
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2711
2711
  channelId: e == null ? void 0 : e.id,
2712
2712
  isSelected: l,
@@ -2764,15 +2764,15 @@ const un = $.createContext({
2764
2764
  );
2765
2765
  }
2766
2766
  );
2767
- mn.displayName = "CustomChannelPreview";
2768
- const sr = { last_message_at: -1 }, ar = $.memo(
2767
+ hn.displayName = "CustomChannelPreview";
2768
+ const ar = { last_message_at: -1 }, rr = $.memo(
2769
2769
  ({
2770
2770
  onChannelSelect: e,
2771
2771
  selectedChannel: t,
2772
2772
  filters: s,
2773
2773
  allowNewMessagesFromUnfilteredChannels: a = !1,
2774
2774
  channelRenderFilterFn: r,
2775
- sort: i = sr,
2775
+ sort: i = ar,
2776
2776
  className: o,
2777
2777
  customEmptyStateIndicator: l,
2778
2778
  renderMessagePreview: d,
@@ -2783,7 +2783,7 @@ const sr = { last_message_at: -1 }, ar = $.memo(
2783
2783
  const { debug: u = !1 } = qe(), f = $.useCallback(
2784
2784
  (g) => {
2785
2785
  for (const p of g)
2786
- Za(p);
2786
+ Qa(p);
2787
2787
  return r ? r(g) : g;
2788
2788
  },
2789
2789
  [r]
@@ -2816,16 +2816,16 @@ const sr = { last_message_at: -1 }, ar = $.memo(
2816
2816
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2817
2817
  o
2818
2818
  ),
2819
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Qa, { value: c, children: /* @__PURE__ */ n(
2820
- cs,
2819
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
2820
+ ds,
2821
2821
  {
2822
2822
  filters: s,
2823
2823
  sort: i,
2824
2824
  options: { limit: 30 },
2825
2825
  allowNewMessagesFromUnfilteredChannels: a,
2826
2826
  channelRenderFilterFn: f,
2827
- Paginator: ds,
2828
- Preview: mn,
2827
+ Paginator: us,
2828
+ Preview: hn,
2829
2829
  EmptyStateIndicator: l
2830
2830
  },
2831
2831
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -2834,26 +2834,26 @@ const sr = { last_message_at: -1 }, ar = $.memo(
2834
2834
  );
2835
2835
  }
2836
2836
  );
2837
- ar.displayName = "ChannelList";
2838
- const rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2837
+ rr.displayName = "ChannelList";
2838
+ const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2839
2839
  function Qe(e) {
2840
2840
  if (typeof e != "string") return;
2841
2841
  const t = e.trim();
2842
2842
  if (t === "") return;
2843
- const s = rr.exec(t);
2843
+ const s = ir.exec(t);
2844
2844
  if (s) {
2845
2845
  const a = s[1].toLowerCase();
2846
- return ir.has(a) ? t : void 0;
2846
+ return or.has(a) ? t : void 0;
2847
2847
  }
2848
2848
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2849
2849
  }
2850
- const or = {
2850
+ const lr = {
2851
2851
  dark: "bg-white text-[#121110] hover:bg-white/90",
2852
2852
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2853
- }, lr = ({ variant: e, cta: t }) => {
2853
+ }, cr = ({ variant: e, cta: t }) => {
2854
2854
  const s = y(
2855
2855
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2856
- or[e]
2856
+ lr[e]
2857
2857
  ), a = Qe(t.href);
2858
2858
  return a ? /* @__PURE__ */ n(
2859
2859
  "a",
@@ -2880,10 +2880,10 @@ const or = {
2880
2880
  children: t.label
2881
2881
  }
2882
2882
  );
2883
- }, cr = {
2883
+ }, dr = {
2884
2884
  dark: "text-white",
2885
2885
  light: "text-black/90"
2886
- }, dr = "text-white/30", ur = {
2886
+ }, ur = "text-white/30", mr = {
2887
2887
  dark: "text-white/55",
2888
2888
  light: "text-black/55"
2889
2889
  }, et = ({
@@ -2900,10 +2900,10 @@ const or = {
2900
2900
  if (!b && !u && !c && !g) return null;
2901
2901
  const v = y(
2902
2902
  "truncate text-base font-medium leading-6",
2903
- d && !t ? dr : cr[e]
2903
+ d && !t ? ur : dr[e]
2904
2904
  ), _ = y(
2905
2905
  "truncate text-xs leading-4",
2906
- ur[e]
2906
+ mr[e]
2907
2907
  );
2908
2908
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2909
2909
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2919,9 +2919,9 @@ const or = {
2919
2919
  ] }),
2920
2920
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2921
2921
  ] }),
2922
- o && /* @__PURE__ */ n(lr, { variant: e, cta: o })
2922
+ o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
2923
2923
  ] });
2924
- }, mr = y(
2924
+ }, hr = y(
2925
2925
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2926
2926
  // 1px hairline border that sits flush with the card chrome — matches
2927
2927
  // the messaging design system's "small border around link attachments"
@@ -2940,7 +2940,7 @@ const or = {
2940
2940
  "data-testid": d
2941
2941
  }) => {
2942
2942
  const m = s != null || a != null, b = y(
2943
- mr,
2943
+ hr,
2944
2944
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2945
2945
  // `focus-ring` is a design-system utility from the component-library
2946
2946
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2988,13 +2988,13 @@ const or = {
2988
2988
  ]
2989
2989
  }
2990
2990
  );
2991
- }, hr = {
2991
+ }, fr = {
2992
2992
  dark: "bg-white/10",
2993
2993
  light: "bg-black/5"
2994
- }, fr = {
2994
+ }, gr = {
2995
2995
  dark: "size-16 text-white/25",
2996
2996
  light: "size-16 text-black/25"
2997
- }, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
2997
+ }, Me = (e, t) => !!t && !!e && ne(e) === "audio", fn = (e, t) => {
2998
2998
  if (!t || !e) return !1;
2999
2999
  const s = ne(e);
3000
3000
  return s === "video" || s === "audio";
@@ -3049,10 +3049,10 @@ const or = {
3049
3049
  {
3050
3050
  className: y(
3051
3051
  "flex h-full w-full items-center justify-center",
3052
- hr[e]
3052
+ fr[e]
3053
3053
  ),
3054
3054
  children: le(r, {
3055
- className: fr[e],
3055
+ className: gr[e],
3056
3056
  weight: "regular"
3057
3057
  })
3058
3058
  }
@@ -3062,7 +3062,7 @@ const or = {
3062
3062
  ]
3063
3063
  }
3064
3064
  );
3065
- }, gr = ({
3065
+ }, br = ({
3066
3066
  title: e,
3067
3067
  placeholderTitle: t,
3068
3068
  description: s,
@@ -3092,7 +3092,7 @@ const or = {
3092
3092
  onClick: u,
3093
3093
  "aria-label": "Edit attachment",
3094
3094
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3095
- children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
3095
+ children: /* @__PURE__ */ n(Rs, { className: "size-5", weight: "regular" })
3096
3096
  }
3097
3097
  ) : void 0;
3098
3098
  return c ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3139,7 +3139,7 @@ const or = {
3139
3139
  ]
3140
3140
  }
3141
3141
  );
3142
- }, br = ({
3142
+ }, pr = ({
3143
3143
  title: e,
3144
3144
  description: t,
3145
3145
  url: s,
@@ -3151,7 +3151,7 @@ const or = {
3151
3151
  cta: d,
3152
3152
  onClick: m
3153
3153
  }) => {
3154
- const b = hn(a, i), u = Qe(s), f = d == null && u != null && !b ? u : void 0, c = d == null && !b ? m : void 0, g = Me(a, i) ? tt : void 0, p = d && m ? {
3154
+ const b = fn(a, i), u = Qe(s), f = d == null && u != null && !b ? u : void 0, c = d == null && !b ? m : void 0, g = Me(a, i) ? tt : void 0, p = d && m ? {
3155
3155
  ...d,
3156
3156
  onClick: () => {
3157
3157
  var v;
@@ -3192,7 +3192,7 @@ const or = {
3192
3192
  ]
3193
3193
  }
3194
3194
  );
3195
- }, pr = ({
3195
+ }, vr = ({
3196
3196
  title: e,
3197
3197
  placeholderTitle: t,
3198
3198
  description: s,
@@ -3205,7 +3205,7 @@ const or = {
3205
3205
  cta: m,
3206
3206
  onClick: b
3207
3207
  }) => {
3208
- const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, g = m == null && !u && c != null ? b : void 0;
3208
+ const u = fn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, g = m == null && !u && c != null ? b : void 0;
3209
3209
  return /* @__PURE__ */ h(
3210
3210
  Se,
3211
3211
  {
@@ -3239,20 +3239,20 @@ const or = {
3239
3239
  ]
3240
3240
  }
3241
3241
  );
3242
- }, ki = {
3243
- Composer: gr,
3244
- Sent: pr,
3245
- Received: br
3246
- }, vr = {
3242
+ }, Si = {
3243
+ Composer: br,
3244
+ Sent: vr,
3245
+ Received: pr
3246
+ }, xr = {
3247
3247
  dark: "bg-[#121110]",
3248
3248
  light: "bg-[#e9eaed]"
3249
- }, xr = {
3249
+ }, wr = {
3250
3250
  dark: "text-white",
3251
3251
  light: "text-[#080707]"
3252
- }, wr = {
3252
+ }, _r = {
3253
3253
  dark: "border-white/[0.08]",
3254
3254
  light: "border-black/[0.08]"
3255
- }, _r = (e) => e === "dark" ? "sender" : "receiver", Nr = {
3255
+ }, Nr = (e) => e === "dark" ? "sender" : "receiver", yr = {
3256
3256
  sender: {
3257
3257
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3258
3258
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3274,7 +3274,7 @@ const or = {
3274
3274
  children: i,
3275
3275
  "data-testid": o
3276
3276
  }) => {
3277
- const l = t != null && t !== "", d = Nr[_r(e)][a];
3277
+ const l = t != null && t !== "", d = yr[Nr(e)][a];
3278
3278
  return /* @__PURE__ */ h(
3279
3279
  "div",
3280
3280
  {
@@ -3289,10 +3289,10 @@ const or = {
3289
3289
  // as the surrounding `CustomMessage` text bubbles.
3290
3290
  "relative w-[280px] overflow-hidden px-2 py-2",
3291
3291
  d,
3292
- vr[e],
3293
3292
  xr[e],
3293
+ wr[e],
3294
3294
  s && "border",
3295
- s && wr[e],
3295
+ s && _r[e],
3296
3296
  r
3297
3297
  ),
3298
3298
  children: [
@@ -3335,16 +3335,16 @@ const or = {
3335
3335
  ),
3336
3336
  children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3337
3337
  }
3338
- ), we = (e) => e === "received" ? "light" : "dark", Ei = ({
3338
+ ), we = (e) => e === "received" ? "light" : "dark", Ii = ({
3339
3339
  firstOfGroup: e,
3340
3340
  endOfGroup: t,
3341
3341
  groupedByUser: s
3342
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", yr = ({
3342
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Cr = ({
3343
3343
  src: e,
3344
3344
  mimeType: t,
3345
3345
  filename: s,
3346
3346
  items: a
3347
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3347
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], kr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3348
3348
  /* @__PURE__ */ n(
3349
3349
  "audio",
3350
3350
  {
@@ -3367,7 +3367,7 @@ const or = {
3367
3367
  preload: l,
3368
3368
  onDismiss: d
3369
3369
  }) => {
3370
- const m = we(e), b = e === "composer" && !!d, u = yr({ src: t, mimeType: s, filename: a, items: r });
3370
+ const m = we(e), b = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3371
3371
  if (u.length === 0)
3372
3372
  return null;
3373
3373
  const f = l ?? (u.length > 1 ? "none" : "metadata");
@@ -3379,7 +3379,7 @@ const or = {
3379
3379
  groupPosition: o,
3380
3380
  "data-testid": "audio-attachment",
3381
3381
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
3382
- Cr,
3382
+ kr,
3383
3383
  {
3384
3384
  item: c,
3385
3385
  preload: f,
@@ -3393,15 +3393,15 @@ const or = {
3393
3393
  )) })
3394
3394
  }
3395
3395
  );
3396
- }, kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Ir = {
3397
- Composer: kr,
3398
- Sent: Er,
3399
- Received: Sr
3396
+ }, Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Tr = {
3397
+ Composer: Er,
3398
+ Sent: Sr,
3399
+ Received: Ir
3400
3400
  };
3401
- function Tr(e) {
3401
+ function Ar(e) {
3402
3402
  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`;
3403
3403
  }
3404
- const Ar = {
3404
+ const Mr = {
3405
3405
  pdf: "PDF",
3406
3406
  doc: "DOC",
3407
3407
  xls: "XLS",
@@ -3411,7 +3411,7 @@ const Ar = {
3411
3411
  text: "TXT",
3412
3412
  markdown: "MD"
3413
3413
  };
3414
- function Mr(e, t) {
3414
+ function Rr(e, t) {
3415
3415
  if (t) {
3416
3416
  const r = t.lastIndexOf(".");
3417
3417
  if (r > 0 && r < t.length - 1) {
@@ -3421,7 +3421,7 @@ function Mr(e, t) {
3421
3421
  }
3422
3422
  if (!e) return;
3423
3423
  if (ne(e) === "document") {
3424
- const r = Zt(e), i = Ar[r];
3424
+ const r = Qt(e), i = Mr[r];
3425
3425
  if (i) return i;
3426
3426
  if (e === "application/octet-stream") return;
3427
3427
  }
@@ -3429,8 +3429,8 @@ function Mr(e, t) {
3429
3429
  if (!(!a || a === "*"))
3430
3430
  return a.toUpperCase();
3431
3431
  }
3432
- function Rr(e, t, s) {
3433
- const a = Mr(e, t), r = typeof s == "number" && s > 0 ? Tr(s) : void 0;
3432
+ function Lr(e, t, s) {
3433
+ const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3434
3434
  return [a, r].filter(Boolean).join(" · ") || void 0;
3435
3435
  }
3436
3436
  function Z(e) {
@@ -3441,16 +3441,16 @@ function Z(e) {
3441
3441
  return "download";
3442
3442
  }
3443
3443
  }
3444
- const Lr = {
3444
+ const Dr = {
3445
3445
  dark: "text-white/55",
3446
3446
  light: "text-black/65"
3447
- }, Dr = {
3447
+ }, Pr = {
3448
3448
  dark: "bg-white/10",
3449
3449
  light: "bg-black/5"
3450
- }, Pr = {
3450
+ }, Or = {
3451
3451
  dark: "text-white/85",
3452
3452
  light: "text-black/85"
3453
- }, fn = ({
3453
+ }, gn = ({
3454
3454
  variant: e,
3455
3455
  filename: t,
3456
3456
  title: s,
@@ -3460,16 +3460,16 @@ const Lr = {
3460
3460
  activateLabel: o,
3461
3461
  trailingAction: l
3462
3462
  }) => {
3463
- const d = s ?? t ?? "File", m = Rr(a, t, r), b = /* @__PURE__ */ n(
3463
+ const d = s ?? t ?? "File", m = Lr(a, t, r), b = /* @__PURE__ */ n(
3464
3464
  "div",
3465
3465
  {
3466
3466
  className: y(
3467
3467
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3468
- Dr[e]
3468
+ Pr[e]
3469
3469
  ),
3470
3470
  "aria-hidden": !0,
3471
3471
  children: le(a, {
3472
- className: y("size-6", Pr[e]),
3472
+ className: y("size-6", Or[e]),
3473
3473
  weight: "regular"
3474
3474
  })
3475
3475
  }
@@ -3480,7 +3480,7 @@ const Lr = {
3480
3480
  {
3481
3481
  className: y(
3482
3482
  "truncate text-xs leading-4",
3483
- Lr[e]
3483
+ Dr[e]
3484
3484
  ),
3485
3485
  children: m
3486
3486
  }
@@ -3509,7 +3509,7 @@ const Lr = {
3509
3509
  l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3510
3510
  ] });
3511
3511
  };
3512
- async function gn(e, t) {
3512
+ async function bn(e, t) {
3513
3513
  const s = t ?? Z(e);
3514
3514
  try {
3515
3515
  const a = await fetch(e, { mode: "cors" });
@@ -3523,14 +3523,14 @@ async function gn(e, t) {
3523
3523
  }
3524
3524
  }
3525
3525
  }
3526
- const Or = ({
3526
+ const zr = ({
3527
3527
  src: e,
3528
3528
  filename: t,
3529
3529
  fileSize: s,
3530
3530
  mimeType: a,
3531
3531
  title: r,
3532
3532
  items: i
3533
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], zr = ({
3533
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
3534
3534
  variant: e,
3535
3535
  item: t,
3536
3536
  index: s,
@@ -3539,7 +3539,7 @@ const Or = ({
3539
3539
  }) => {
3540
3540
  const i = t.filename ?? Z(t.src);
3541
3541
  return /* @__PURE__ */ n(
3542
- fn,
3542
+ gn,
3543
3543
  {
3544
3544
  variant: e,
3545
3545
  filename: i,
@@ -3564,7 +3564,7 @@ const Or = ({
3564
3564
  onClick: m,
3565
3565
  onDismiss: b
3566
3566
  }) => {
3567
- const u = we(e), f = e === "composer" && !!b, c = Or({
3567
+ const u = we(e), f = e === "composer" && !!b, c = zr({
3568
3568
  src: t,
3569
3569
  filename: s,
3570
3570
  fileSize: a,
@@ -3576,7 +3576,7 @@ const Or = ({
3576
3576
  const _ = c[v];
3577
3577
  if (!_) return;
3578
3578
  const x = _.filename ?? Z(_.src);
3579
- gn(_.src, x);
3579
+ bn(_.src, x);
3580
3580
  };
3581
3581
  if (c.length === 0)
3582
3582
  return null;
@@ -3599,7 +3599,7 @@ const Or = ({
3599
3599
  groupPosition: d,
3600
3600
  "data-testid": "file-attachment",
3601
3601
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, _) => /* @__PURE__ */ n(
3602
- zr,
3602
+ $r,
3603
3603
  {
3604
3604
  variant: u,
3605
3605
  item: v,
@@ -3611,10 +3611,10 @@ const Or = ({
3611
3611
  )) })
3612
3612
  }
3613
3613
  );
3614
- }, $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Ur = {
3615
- Composer: $r,
3616
- Sent: Fr,
3617
- Received: Br
3614
+ }, Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), jr = {
3615
+ Composer: Fr,
3616
+ Sent: Br,
3617
+ Received: Ur
3618
3618
  }, at = ({
3619
3619
  onPrev: e,
3620
3620
  onNext: t,
@@ -3628,7 +3628,7 @@ const Or = ({
3628
3628
  onClick: e,
3629
3629
  "aria-label": s,
3630
3630
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3631
- children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
3631
+ children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
3632
3632
  }
3633
3633
  ),
3634
3634
  /* @__PURE__ */ n(
@@ -3638,10 +3638,10 @@ const Or = ({
3638
3638
  onClick: t,
3639
3639
  "aria-label": a,
3640
3640
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3641
- children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
3641
+ children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3642
3642
  }
3643
3643
  )
3644
- ] }), bn = ({
3644
+ ] }), pn = ({
3645
3645
  url: e,
3646
3646
  filename: t,
3647
3647
  variant: s = "pill",
@@ -3652,7 +3652,7 @@ const Or = ({
3652
3652
  }) => {
3653
3653
  const [l, d] = P(!1), m = W(
3654
3654
  (c) => {
3655
- c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3655
+ c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3656
3656
  }).finally(() => {
3657
3657
  d(!1), o == null || o();
3658
3658
  }));
@@ -3841,7 +3841,7 @@ const Or = ({
3841
3841
  ]
3842
3842
  }
3843
3843
  );
3844
- }, pn = ({
3844
+ }, vn = ({
3845
3845
  open: e,
3846
3846
  items: t,
3847
3847
  initialIndex: s = 0,
@@ -3863,7 +3863,7 @@ const Or = ({
3863
3863
  ariaLabel: d,
3864
3864
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
3865
3865
  actions: /* @__PURE__ */ n(
3866
- bn,
3866
+ pn,
3867
3867
  {
3868
3868
  url: l.src,
3869
3869
  filename: d,
@@ -3897,7 +3897,7 @@ const Or = ({
3897
3897
  ]
3898
3898
  }
3899
3899
  ) : null;
3900
- }, jr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
3900
+ }, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
3901
3901
  tiles: e,
3902
3902
  onTileActivate: t,
3903
3903
  maxVisible: s = 4,
@@ -3906,7 +3906,7 @@ const Or = ({
3906
3906
  const r = e.length;
3907
3907
  if (r === 0) return null;
3908
3908
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
3909
- const u = y(jr, "h-full w-full");
3909
+ const u = y(Vr, "h-full w-full");
3910
3910
  return t ? /* @__PURE__ */ h(
3911
3911
  "button",
3912
3912
  {
@@ -3975,7 +3975,7 @@ const Or = ({
3975
3975
  [e]
3976
3976
  ), o = W(() => s(!1), []);
3977
3977
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3978
- }, Vr = (e, t, s, a) => ({
3978
+ }, Gr = (e, t, s, a) => ({
3979
3979
  ariaLabel: `Open image ${t + 1} of ${s}`,
3980
3980
  content: /* @__PURE__ */ n(
3981
3981
  "img",
@@ -3990,15 +3990,15 @@ const Or = ({
3990
3990
  className: "absolute inset-0 size-full rounded-md object-cover"
3991
3991
  }
3992
3992
  )
3993
- }), Gr = ({
3993
+ }), Hr = ({
3994
3994
  src: e,
3995
3995
  alt: t,
3996
3996
  items: s
3997
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], xn = (e, t) => e.map((s, a) => ({
3997
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
3998
3998
  src: s.src,
3999
3999
  alt: s.alt,
4000
4000
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4001
- })), Hr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4001
+ })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4002
4002
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
4003
4003
  r
4004
4004
  );
@@ -4025,16 +4025,16 @@ const Or = ({
4025
4025
  ),
4026
4026
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
4027
4027
  /* @__PURE__ */ n(
4028
- pn,
4028
+ vn,
4029
4029
  {
4030
4030
  open: o,
4031
- items: xn([{ src: e, alt: t }], s),
4031
+ items: wn([{ src: e, alt: t }], s),
4032
4032
  initialIndex: l,
4033
4033
  onClose: m
4034
4034
  }
4035
4035
  )
4036
4036
  ] });
4037
- }, wn = ({
4037
+ }, _n = ({
4038
4038
  state: e,
4039
4039
  src: t,
4040
4040
  alt: s,
@@ -4045,13 +4045,13 @@ const Or = ({
4045
4045
  loading: l = "lazy",
4046
4046
  onClick: d
4047
4047
  }) => {
4048
- const m = Gr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
4048
+ const m = Hr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
4049
4049
  d
4050
4050
  );
4051
4051
  if (m.length === 0)
4052
4052
  return null;
4053
4053
  const p = m.map(
4054
- (v, _) => Vr(v, _, m.length, l)
4054
+ (v, _) => Gr(v, _, m.length, l)
4055
4055
  );
4056
4056
  return /* @__PURE__ */ h(
4057
4057
  ve,
@@ -4061,12 +4061,12 @@ const Or = ({
4061
4061
  groupPosition: o,
4062
4062
  "data-testid": "image-attachment",
4063
4063
  children: [
4064
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: p, onTileActivate: c }) }),
4064
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: p, onTileActivate: c }) }),
4065
4065
  /* @__PURE__ */ n(
4066
- pn,
4066
+ vn,
4067
4067
  {
4068
4068
  open: u,
4069
- items: xn(m, a),
4069
+ items: wn(m, a),
4070
4070
  initialIndex: f,
4071
4071
  onClose: g
4072
4072
  }
@@ -4074,11 +4074,11 @@ const Or = ({
4074
4074
  ]
4075
4075
  }
4076
4076
  );
4077
- }, Yr = (e) => /* @__PURE__ */ n(Hr, { ...e }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Wr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Xr = {
4078
- Composer: Yr,
4079
- Sent: qr,
4080
- Received: Wr
4081
- }, Kr = ({
4077
+ }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
4078
+ Composer: qr,
4079
+ Sent: Wr,
4080
+ Received: Xr
4081
+ }, Jr = ({
4082
4082
  open: e,
4083
4083
  items: t,
4084
4084
  initialIndex: s = 0,
@@ -4092,7 +4092,7 @@ const Or = ({
4092
4092
  () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
4093
4093
  [l]
4094
4094
  ), m = ee(
4095
- () => l ? Jr(l.src) : void 0,
4095
+ () => l ? Zr(l.src) : void 0,
4096
4096
  [l]
4097
4097
  );
4098
4098
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4126,16 +4126,16 @@ const Or = ({
4126
4126
  ]
4127
4127
  }
4128
4128
  );
4129
- }, Jr = (e) => {
4129
+ }, Zr = (e) => {
4130
4130
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4131
4131
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4132
- }, Zr = ({
4132
+ }, Qr = ({
4133
4133
  src: e,
4134
4134
  filename: t,
4135
4135
  fileSize: s,
4136
4136
  title: a,
4137
4137
  items: r
4138
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Qr = ({
4138
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
4139
4139
  variant: e,
4140
4140
  item: t,
4141
4141
  index: s,
@@ -4144,7 +4144,7 @@ const Or = ({
4144
4144
  }) => {
4145
4145
  const i = t.filename ?? Z(t.src);
4146
4146
  return /* @__PURE__ */ n(
4147
- fn,
4147
+ gn,
4148
4148
  {
4149
4149
  variant: e,
4150
4150
  filename: i,
@@ -4168,7 +4168,7 @@ const Or = ({
4168
4168
  onClick: d,
4169
4169
  onDismiss: m
4170
4170
  }) => {
4171
- const b = we(e), u = Zr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4171
+ const b = we(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4172
4172
  d
4173
4173
  ), v = e === "composer" && !!m;
4174
4174
  if (u.length === 0)
@@ -4187,7 +4187,7 @@ const Or = ({
4187
4187
  children: [
4188
4188
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, S) => {
4189
4189
  const E = x.filename ?? Z(x.src), M = v && S === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4190
- bn,
4190
+ pn,
4191
4191
  {
4192
4192
  url: x.src,
4193
4193
  filename: E,
@@ -4197,7 +4197,7 @@ const Or = ({
4197
4197
  }
4198
4198
  );
4199
4199
  return /* @__PURE__ */ n(
4200
- Qr,
4200
+ ei,
4201
4201
  {
4202
4202
  variant: b,
4203
4203
  item: x,
@@ -4209,7 +4209,7 @@ const Or = ({
4209
4209
  );
4210
4210
  }) }),
4211
4211
  /* @__PURE__ */ n(
4212
- Kr,
4212
+ Jr,
4213
4213
  {
4214
4214
  open: f,
4215
4215
  items: _,
@@ -4220,11 +4220,11 @@ const Or = ({
4220
4220
  ]
4221
4221
  }
4222
4222
  );
4223
- }, ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), si = {
4224
- Composer: ei,
4225
- Sent: ti,
4226
- Received: ni
4227
- }, _n = ({
4223
+ }, ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ai = {
4224
+ Composer: ti,
4225
+ Sent: ni,
4226
+ Received: si
4227
+ }, Nn = ({
4228
4228
  open: e,
4229
4229
  items: t,
4230
4230
  initialIndex: s = 0,
@@ -4274,7 +4274,7 @@ const Or = ({
4274
4274
  ]
4275
4275
  }
4276
4276
  ) : null;
4277
- }, ai = () => /* @__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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
4277
+ }, 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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
4278
4278
  item: e,
4279
4279
  index: t
4280
4280
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4289,30 +4289,30 @@ const Or = ({
4289
4289
  className: "absolute inset-0 size-full rounded-md object-cover"
4290
4290
  }
4291
4291
  ) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
4292
- Gt,
4292
+ Ht,
4293
4293
  {
4294
4294
  className: "size-16 rounded-md text-white/30",
4295
4295
  weight: "regular",
4296
4296
  "aria-hidden": !0
4297
4297
  }
4298
4298
  ) }),
4299
- /* @__PURE__ */ n(ai, {})
4300
- ] }), ri = (e, t, s) => ({
4299
+ /* @__PURE__ */ n(ri, {})
4300
+ ] }), ii = (e, t, s) => ({
4301
4301
  ariaLabel: `Play video ${t + 1} of ${s}`,
4302
- content: /* @__PURE__ */ n(Nn, { item: e, index: t })
4303
- }), ii = ({
4302
+ content: /* @__PURE__ */ n(yn, { item: e, index: t })
4303
+ }), oi = ({
4304
4304
  src: e,
4305
4305
  poster: t,
4306
4306
  mimeType: s,
4307
4307
  preload: a,
4308
4308
  items: r
4309
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], yn = (e, t) => e.map((s, a) => ({
4309
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Cn = (e, t) => e.map((s, a) => ({
4310
4310
  src: s.src,
4311
4311
  poster: s.poster,
4312
4312
  mimeType: s.mimeType,
4313
4313
  preload: s.preload,
4314
4314
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4315
- })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4315
+ })), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4316
4316
  const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = _e(
4317
4317
  i
4318
4318
  );
@@ -4324,15 +4324,15 @@ const Or = ({
4324
4324
  onClick: () => m(0),
4325
4325
  "aria-label": "Play video",
4326
4326
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4327
- children: /* @__PURE__ */ n(Nn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4327
+ children: /* @__PURE__ */ n(yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4328
4328
  }
4329
4329
  ),
4330
4330
  o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
4331
4331
  /* @__PURE__ */ n(
4332
- _n,
4332
+ Nn,
4333
4333
  {
4334
4334
  open: l,
4335
- items: yn(
4335
+ items: Cn(
4336
4336
  [{ src: e, poster: t, mimeType: s, preload: r }],
4337
4337
  a
4338
4338
  ),
@@ -4341,7 +4341,7 @@ const Or = ({
4341
4341
  }
4342
4342
  )
4343
4343
  ] });
4344
- }, Cn = ({
4344
+ }, kn = ({
4345
4345
  state: e,
4346
4346
  src: t,
4347
4347
  poster: s,
@@ -4353,13 +4353,13 @@ const Or = ({
4353
4353
  preload: d,
4354
4354
  onClick: m
4355
4355
  }) => {
4356
- const b = ii({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4356
+ const b = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4357
4357
  m
4358
4358
  );
4359
4359
  if (b.length === 0)
4360
4360
  return null;
4361
4361
  const v = b.map(
4362
- (_, x) => ri(_, x, b.length)
4362
+ (_, x) => ii(_, x, b.length)
4363
4363
  );
4364
4364
  return /* @__PURE__ */ h(
4365
4365
  ve,
@@ -4370,7 +4370,7 @@ const Or = ({
4370
4370
  "data-testid": "video-attachment",
4371
4371
  children: [
4372
4372
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4373
- vn,
4373
+ xn,
4374
4374
  {
4375
4375
  tiles: v,
4376
4376
  onTileActivate: g,
@@ -4378,10 +4378,10 @@ const Or = ({
4378
4378
  }
4379
4379
  ) }),
4380
4380
  /* @__PURE__ */ n(
4381
- _n,
4381
+ Nn,
4382
4382
  {
4383
4383
  open: f,
4384
- items: yn(b, r),
4384
+ items: Cn(b, r),
4385
4385
  initialIndex: c,
4386
4386
  onClose: p
4387
4387
  }
@@ -4389,17 +4389,17 @@ const Or = ({
4389
4389
  ]
4390
4390
  }
4391
4391
  );
4392
- }, li = (e) => /* @__PURE__ */ n(oi, { ...e }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ui = {
4393
- Composer: li,
4394
- Sent: ci,
4395
- Received: di
4396
- }, Si = {
4397
- Image: Xr,
4398
- Video: ui,
4399
- Audio: Ir,
4400
- Pdf: si,
4401
- File: Ur
4402
- }, mi = ({
4392
+ }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
4393
+ Composer: ci,
4394
+ Sent: di,
4395
+ Received: ui
4396
+ }, Ti = {
4397
+ Image: Kr,
4398
+ Video: mi,
4399
+ Audio: Tr,
4400
+ Pdf: ai,
4401
+ File: jr
4402
+ }, hi = ({
4403
4403
  question: e,
4404
4404
  onClick: t,
4405
4405
  loading: s = !1,
@@ -4421,7 +4421,7 @@ const Or = ({
4421
4421
  ),
4422
4422
  children: e
4423
4423
  }
4424
- ), Ii = ({
4424
+ ), Ai = ({
4425
4425
  faqs: e,
4426
4426
  onFaqClick: t,
4427
4427
  loadingFaqId: s,
@@ -4450,7 +4450,7 @@ const Or = ({
4450
4450
  children: [
4451
4451
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4452
4452
  l.map((d) => /* @__PURE__ */ n(
4453
- mi,
4453
+ hi,
4454
4454
  {
4455
4455
  question: d.question,
4456
4456
  onClick: () => t(d.id),
@@ -4463,39 +4463,71 @@ const Or = ({
4463
4463
  )
4464
4464
  ] }) });
4465
4465
  };
4466
+ function fi(e) {
4467
+ const t = e, s = [t.og_scrape_url, t.title_link].find(
4468
+ (a) => typeof a == "string"
4469
+ );
4470
+ return s && s.trim() !== "" ? s : void 0;
4471
+ }
4472
+ function Mi(e, t) {
4473
+ const s = e, a = s.image_url ?? s.thumb_url, r = (t != null && t.resolveThumbnailUrl ? t.resolveThumbnailUrl(a) : a) || void 0;
4474
+ return {
4475
+ title: s.title,
4476
+ description: s.text,
4477
+ url: fi(e),
4478
+ thumbnailUrl: r,
4479
+ mimeType: s.mime_type,
4480
+ layout: r ? "featured" : "classic"
4481
+ };
4482
+ }
4483
+ function Ut(e) {
4484
+ return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
4485
+ }
4486
+ function Ri(e, t) {
4487
+ if (!(e != null && e.trim()) || !(t != null && t.trim())) return !1;
4488
+ const s = Ut(e), a = Ut(t);
4489
+ if (s === a) return !0;
4490
+ if (!s.includes(a)) return !1;
4491
+ const r = s.split(a).join("");
4492
+ return !/[\p{L}\p{N}]/u.test(r);
4493
+ }
4466
4494
  export {
4467
- Qt as A,
4468
- Gs as B,
4469
- Wa as C,
4470
- Ps as D,
4471
- Ii as F,
4472
- ki as L,
4473
- Ni as M,
4495
+ en as A,
4496
+ Ze as B,
4497
+ Xa as C,
4498
+ Xt as D,
4499
+ fi as E,
4500
+ Ai as F,
4501
+ va as G,
4502
+ Hs as H,
4503
+ Os as I,
4504
+ Si as L,
4505
+ Ci as M,
4474
4506
  he as a,
4475
4507
  ae as b,
4476
- ar as c,
4477
- dn as d,
4478
- yi as e,
4479
- mi as f,
4508
+ rr as c,
4509
+ un as d,
4510
+ ki as e,
4511
+ hi as f,
4480
4512
  ne as g,
4481
4513
  Ot as h,
4482
- Si as i,
4483
- ya as j,
4484
- _i as k,
4485
- Ci as l,
4486
- Rr as m,
4487
- Tr as n,
4488
- nr as o,
4489
- Mr as p,
4490
- Xt as q,
4514
+ Ti as i,
4515
+ Ca as j,
4516
+ yi as k,
4517
+ Ei as l,
4518
+ Lr as m,
4519
+ Ri as n,
4520
+ Ar as o,
4521
+ sr as p,
4522
+ Rr as q,
4491
4523
  le as r,
4492
- nn as s,
4493
- zs as t,
4494
- Ei as u,
4495
- Hs as v,
4496
- Je as w,
4497
- Ze as x,
4498
- Wt as y,
4499
- pa as z
4524
+ Kt as s,
4525
+ sn as t,
4526
+ $s as u,
4527
+ Mi as v,
4528
+ Ii as w,
4529
+ Ys as x,
4530
+ Ut as y,
4531
+ Je as z
4500
4532
  };
4501
- //# sourceMappingURL=index-DGVCJzwy.js.map
4533
+ //# sourceMappingURL=index-XXoPu3F3.js.map