@linktr.ee/messaging-react 3.1.0-rc-1780514752 → 3.1.0

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 (31) hide show
  1. package/dist/{Card-DZVa2CeI.js → Card-BGOWR4lW.js} +2 -2
  2. package/dist/{Card-DZVa2CeI.js.map → Card-BGOWR4lW.js.map} +1 -1
  3. package/dist/{Card-0TLA8XHU.js → Card-BfvsO78k.js} +3 -3
  4. package/dist/{Card-0TLA8XHU.js.map → Card-BfvsO78k.js.map} +1 -1
  5. package/dist/{Card-BaaerKBC.js → Card-BhO5jeP9.js} +2 -2
  6. package/dist/{Card-BaaerKBC.js.map → Card-BhO5jeP9.js.map} +1 -1
  7. package/dist/{Card-Bfxdewx_.cjs → Card-CRJ4l5KM.cjs} +2 -2
  8. package/dist/{Card-Bfxdewx_.cjs.map → Card-CRJ4l5KM.cjs.map} +1 -1
  9. package/dist/{Card-DbdWDBMe.cjs → Card-Cq-cN9n1.cjs} +2 -2
  10. package/dist/{Card-DbdWDBMe.cjs.map → Card-Cq-cN9n1.cjs.map} +1 -1
  11. package/dist/{Card-B-D_LbnV.cjs → Card-NPXVehHb.cjs} +2 -2
  12. package/dist/{Card-B-D_LbnV.cjs.map → Card-NPXVehHb.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-DkwFwgpU.cjs → LockedThumbnail-B8MKBVXz.cjs} +2 -2
  14. package/dist/{LockedThumbnail-DkwFwgpU.cjs.map → LockedThumbnail-B8MKBVXz.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-B4gDHeh7.js → LockedThumbnail-Bu9jNPUi.js} +2 -2
  16. package/dist/{LockedThumbnail-B4gDHeh7.js.map → LockedThumbnail-Bu9jNPUi.js.map} +1 -1
  17. package/dist/{index-BmCc1-F3.js → index-CJEl_fID.js} +503 -506
  18. package/dist/index-CJEl_fID.js.map +1 -0
  19. package/dist/index-D-5Igybf.cjs +2 -0
  20. package/dist/index-D-5Igybf.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +9 -6
  23. package/dist/index.js +1 -1
  24. package/package.json +1 -1
  25. package/src/components/ChannelView.stories.tsx +5 -6
  26. package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +21 -23
  27. package/src/components/CustomMessageInput/index.tsx +42 -24
  28. package/src/types.ts +9 -6
  29. package/dist/index-BmCc1-F3.js.map +0 -1
  30. package/dist/index-Cg-bxSZn.cjs +0 -2
  31. package/dist/index-Cg-bxSZn.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as n, jsxs as h, Fragment as re } from "react/jsx-runtime";
2
- import O, { createContext as Ge, useContext as He, useCallback as H, useState as z, useRef as K, useEffect as J, useMemo as te, Suspense as Ye } from "react";
3
- import { StreamChatService as En } from "@linktr.ee/messaging-core";
4
- import { Chat as In, DateSeparator as Sn, useChannelStateContext as de, useChatContext as qe, areMessageUIPropsEqual as Tn, useMessageReminder as An, useComponentContext as Ut, Attachment as Mn, EditMessageModal as Dn, MessageBlocked as Rn, MessageBouncePrompt as Ln, MessageDeleted as Pn, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as On, ReminderNotification as Fn, StreamedMessageText as $n, messageHasAttachments as Bn, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Un, isMessageBounced as Gn, MessageBounceModal as Hn, MessageText as Mt, Poll as Yn, MessageErrorIcon as qn, useMessageContext as be, useMessageComposer as Wn, useStateStore as Xn, MessageInput as Kn, useMessageInputContext as Jn, useMessageComposerHasSendableData as Zn, AttachmentPreviewList as Qn, QuotedMessagePreview as es, TextareaComposer as ts, MessageTimestamp as Me, AIStates as De, useTypingContext as ns, useAIState as ss, Channel as as, WithComponents as rs, Window as is, MessageList as os, ChannelList as ls } from "stream-chat-react";
5
- import { StarIcon as Fe, XIcon as pe, SpinnerGapIcon as Re, SignOutIcon as cs, ProhibitInsetIcon as Dt, FlagIcon as Gt, FileIcon as Ht, ImageIcon as ds, SpeakerHighIcon as us, VideoCameraIcon as Yt, FileMdIcon as ms, FileTextIcon as hs, FileZipIcon as fs, FilePptIcon as gs, FileCsvIcon as bs, FileXlsIcon as ps, FileDocIcon as vs, FilePdfIcon as xs, CircleNotchIcon as fe, PlayIcon as $e, PauseIcon as ws, LinkIcon as Ns, DownloadSimpleIcon as ge, GiftIcon as _s, ThumbsUpIcon as ys, ThumbsDownIcon as Cs, TrashSimpleIcon as ks, ArrowUpIcon as Es, SparkleIcon as Be, ProhibitIcon as Is, ArrowLeftIcon as Rt, CaretRightIcon as je, DotsThreeIcon as Lt, PencilSimpleIcon as Ss, CaretLeftIcon as Ts } from "@phosphor-icons/react";
1
+ import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
+ import z, { createContext as He, useContext as Se, useCallback as q, useState as O, useRef as K, useEffect as J, useMemo as te, Suspense as Ye } from "react";
3
+ import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
+ import { Chat as Sn, DateSeparator as Tn, useChannelStateContext as de, useChatContext as qe, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Dn, EditMessageModal as Rn, MessageBlocked as Ln, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as Fn, ReminderNotification as $n, StreamedMessageText as Bn, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Un, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Mt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as be, 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 De, AIStates as Re, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs } from "stream-chat-react";
5
+ import { StarIcon as $e, XIcon as pe, SpinnerGapIcon as Le, SignOutIcon as ds, ProhibitInsetIcon as Dt, FlagIcon as Gt, FileIcon as Ht, ImageIcon as us, SpeakerHighIcon as ms, VideoCameraIcon as Yt, FileMdIcon as hs, FileTextIcon as fs, FileZipIcon as gs, FilePptIcon as bs, FileCsvIcon as ps, FileXlsIcon as vs, FileDocIcon as xs, FilePdfIcon as ws, CircleNotchIcon as fe, PlayIcon as Be, PauseIcon as Ns, LinkIcon as _s, DownloadSimpleIcon as ge, GiftIcon as ys, ThumbsUpIcon as Cs, ThumbsDownIcon as ks, TrashSimpleIcon as Es, ArrowUpIcon as Is, SparkleIcon as je, ProhibitIcon as Ss, ArrowLeftIcon as Rt, CaretRightIcon as Ve, DotsThreeIcon as Lt, PencilSimpleIcon as Ts, CaretLeftIcon as As } from "@phosphor-icons/react";
6
6
  import y from "classnames";
7
- import { MessageActions as As, DefaultDropdownActionButton as qt } from "stream-chat-react/experimental";
7
+ import { MessageActions as Ms, DefaultDropdownActionButton as qt } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Pt } from "stream-chat";
9
- const Wt = Ge({
9
+ const Wt = He({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Wt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), We = () => He(Wt), vi = ({
19
+ }), We = () => Se(Wt), xi = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,7 +24,7 @@ const Wt = Ge({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- const o = H(
27
+ const o = q(
28
28
  (I, ...C) => {
29
29
  i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
30
30
  },
@@ -36,7 +36,7 @@ const Wt = Ge({
36
36
  serviceConfig: !!s,
37
37
  capabilities: Object.keys(r)
38
38
  });
39
- const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [N, v] = z(null), x = K(!1), w = K({
39
+ const [l, d] = O(null), [m, g] = O(null), [u, f] = O(!1), [c, b] = O(!1), [N, v] = O(null), x = K(!1), w = K({
40
40
  userId: t == null ? void 0 : t.id,
41
41
  apiKey: a,
42
42
  serviceConfig: s,
@@ -80,7 +80,7 @@ const Wt = Ge({
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
81
  serviceConfigChanged: w.current.serviceConfig !== s
82
82
  });
83
- const C = new En({
83
+ const C = new In({
84
84
  ...s,
85
85
  apiKey: a,
86
86
  debug: i
@@ -154,7 +154,7 @@ const Wt = Ge({
154
154
  isConnected: u
155
155
  });
156
156
  }), [l, u, o]);
157
- const S = H(async () => {
157
+ const S = q(async () => {
158
158
  if (o("🔄 REFRESH CONNECTION CALLED", {
159
159
  hasService: !!l,
160
160
  hasUser: !!t
@@ -176,7 +176,7 @@ const Wt = Ge({
176
176
  } finally {
177
177
  b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
178
178
  }
179
- }, [l, t, o]), L = O.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [l, t, o]), L = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!l,
181
181
  hasClient: !!m,
182
182
  isConnected: u,
@@ -208,7 +208,7 @@ const Wt = Ge({
208
208
  willRenderChat: !!(m && u),
209
209
  contextValueReady: !!L
210
210
  }), /* @__PURE__ */ n(Wt.Provider, { value: L, children: m && u ? /* @__PURE__ */ n(
211
- In,
211
+ Sn,
212
212
  {
213
213
  client: m,
214
214
  customClasses: {
@@ -217,9 +217,9 @@ const Wt = Ge({
217
217
  children: e
218
218
  }
219
219
  ) : e });
220
- }, Ms = () => We(), Xt = (e) => {
220
+ }, Ds = () => We(), Xt = (e) => {
221
221
  var a, r;
222
- const [t, s] = z(
222
+ const [t, s] = O(
223
223
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
224
224
  );
225
225
  return J(() => {
@@ -239,18 +239,18 @@ const Wt = Ge({
239
239
  e.off("member.updated", i);
240
240
  };
241
241
  }, [e]), t;
242
- }, Ds = /^[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 Rs(e) {
244
- return Ds.test(e.trim());
242
+ }, Rs = /^[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 Ls(e) {
244
+ return Rs.test(e.trim());
245
245
  }
246
- function zt(e, t) {
246
+ function Ot(e, t) {
247
247
  const s = e == null ? void 0 : e.trim();
248
- return !s || t && s === t ? !1 : !Rs(s);
248
+ return !s || t && s === t ? !1 : !Ls(s);
249
249
  }
250
- function Se(e) {
251
- return zt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : zt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
250
+ function Te(e) {
251
+ return Ot(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ot(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
252
252
  }
253
- const Ot = [
253
+ const zt = [
254
254
  "🍎",
255
255
  // Apple
256
256
  "🍌",
@@ -278,7 +278,7 @@ const Ot = [
278
278
  "🍈"
279
279
  // Melon
280
280
  ];
281
- function Ls(e) {
281
+ function Ps(e) {
282
282
  let t = 0;
283
283
  for (let s = 0; s < e.length; s++) {
284
284
  const a = e.charCodeAt(s);
@@ -286,11 +286,11 @@ function Ls(e) {
286
286
  }
287
287
  return Math.abs(t);
288
288
  }
289
- function Ps(e) {
290
- const s = Ls(e) % Ot.length;
291
- return Ot[s];
289
+ function Os(e) {
290
+ const s = Ps(e) % zt.length;
291
+ return zt[s];
292
292
  }
293
- const ne = ({
293
+ const se = ({
294
294
  id: e,
295
295
  image: t,
296
296
  size: s = 40,
@@ -299,7 +299,7 @@ const ne = ({
299
299
  shape: i = "squircle",
300
300
  dmAgentEnabled: o = !1
301
301
  }) => {
302
- const l = Ps(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
302
+ const l = Os(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
303
303
  borderRadius: "33%",
304
304
  cornerShape: "superellipse(1.3)"
305
305
  }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
@@ -338,7 +338,7 @@ const ne = ({
338
338
  {
339
339
  "aria-hidden": "true",
340
340
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
341
- children: /* @__PURE__ */ n(Fe, { className: "size-3 text-yellow-600", weight: "duotone" })
341
+ children: /* @__PURE__ */ n($e, { className: "size-3 text-yellow-600", weight: "duotone" })
342
342
  }
343
343
  ),
344
344
  /* @__PURE__ */ n(
@@ -403,10 +403,10 @@ function zs({ label: e, className: t, children: s, ...a }) {
403
403
  }
404
404
  );
405
405
  }
406
- function Os({ onClick: e }) {
406
+ function Fs({ onClick: e }) {
407
407
  return /* @__PURE__ */ n(zs, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(pe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
408
408
  }
409
- const Fs = ({
409
+ const $s = ({
410
410
  dialogRef: e,
411
411
  onClose: t,
412
412
  participant: s,
@@ -424,8 +424,8 @@ const Fs = ({
424
424
  customProfileContent: b,
425
425
  customChannelActions: N
426
426
  }) => {
427
- var B, Y, W, $;
428
- const { service: v, debug: x } = We(), [w, M] = z(!1), [A, S] = z(!1), [L, I] = z(!1), C = H(async () => {
427
+ var B, H, W, $;
428
+ const { service: v, debug: x } = We(), [w, M] = O(!1), [A, S] = O(!1), [L, I] = O(!1), C = q(async () => {
429
429
  var p;
430
430
  if (!(!m || !v || !((p = s == null ? void 0 : s.user) != null && p.id)))
431
431
  try {
@@ -491,7 +491,7 @@ const Fs = ({
491
491
  );
492
492
  };
493
493
  if (!s) return null;
494
- const F = a ?? Se(s.user), X = (Y = s.user) == null ? void 0 : Y.image, U = (W = s.user) == null ? void 0 : W.username, G = U ? `linktr.ee/${U}` : void 0, P = (($ = s.user) == null ? void 0 : $.id) || "unknown";
494
+ const F = a ?? Te(s.user), X = (H = s.user) == null ? void 0 : H.image, U = (W = s.user) == null ? void 0 : W.username, G = U ? `linktr.ee/${U}` : void 0, P = (($ = s.user) == null ? void 0 : $.id) || "unknown";
495
495
  return (
496
496
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
497
497
  /* @__PURE__ */ n(
@@ -506,7 +506,7 @@ const Fs = ({
506
506
  children: /* @__PURE__ */ h("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
507
507
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
508
508
  /* @__PURE__ */ n("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
509
- /* @__PURE__ */ n(Os, { onClick: t })
509
+ /* @__PURE__ */ n(Fs, { onClick: t })
510
510
  ] }),
511
511
  /* @__PURE__ */ h("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
512
512
  /* @__PURE__ */ h(
@@ -517,7 +517,7 @@ const Fs = ({
517
517
  children: [
518
518
  /* @__PURE__ */ h("div", { className: "flex items-center gap-3 w-full", children: [
519
519
  /* @__PURE__ */ n(
520
- ne,
520
+ se,
521
521
  {
522
522
  id: P,
523
523
  name: F,
@@ -557,7 +557,7 @@ const Fs = ({
557
557
  disabled: A,
558
558
  "aria-busy": A,
559
559
  children: [
560
- A ? /* @__PURE__ */ n(Re, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(cs, { className: "h-5 w-5" }),
560
+ A ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ds, { className: "h-5 w-5" }),
561
561
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
562
562
  ]
563
563
  }
@@ -569,7 +569,7 @@ const Fs = ({
569
569
  disabled: L,
570
570
  "aria-busy": L,
571
571
  children: [
572
- L ? /* @__PURE__ */ n(Re, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
572
+ L ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
573
573
  /* @__PURE__ */ n("span", { children: "Unblock" })
574
574
  ]
575
575
  }
@@ -580,7 +580,7 @@ const Fs = ({
580
580
  disabled: L,
581
581
  "aria-busy": L,
582
582
  children: [
583
- L ? /* @__PURE__ */ n(Re, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
583
+ L ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
584
584
  /* @__PURE__ */ n("span", { children: "Block" })
585
585
  ]
586
586
  }
@@ -596,30 +596,30 @@ const Fs = ({
596
596
  }
597
597
  )
598
598
  );
599
- }, $s = (e) => /* @__PURE__ */ n(Sn, { ...e, position: "center" }), Ve = "vote_up", Ue = "vote_down";
600
- function Bs(e) {
601
- return e != null && e.length ? e.some((t) => t.type === Ue) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
602
- }
599
+ }, Bs = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), Ue = "vote_up", Ge = "vote_down";
603
600
  function js(e) {
601
+ return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ue) ? "up" : null : null;
602
+ }
603
+ function Vs(e) {
604
604
  const { channel: t } = de(), { client: s } = qe("useMessageVote"), a = te(
605
- () => Bs(e.own_reactions),
605
+ () => js(e.own_reactions),
606
606
  [e.own_reactions]
607
- ), r = H(async () => {
607
+ ), r = q(async () => {
608
608
  if (s != null && s.userID)
609
609
  try {
610
- a === "up" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
610
+ a === "up" ? await t.deleteReaction(e.id, Ue) : await t.sendReaction(
611
611
  e.id,
612
- { type: Ve },
612
+ { type: Ue },
613
613
  { enforce_unique: !0, skip_push: !0 }
614
614
  );
615
615
  } catch {
616
616
  }
617
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = H(async () => {
617
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = q(async () => {
618
618
  if (s != null && s.userID)
619
619
  try {
620
- a === "down" ? await t.deleteReaction(e.id, Ue) : await t.sendReaction(
620
+ a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
621
621
  e.id,
622
- { type: Ue },
622
+ { type: Ge },
623
623
  { enforce_unique: !0, skip_push: !0 }
624
624
  );
625
625
  } catch {
@@ -627,7 +627,7 @@ function js(e) {
627
627
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
628
628
  return { selected: a, voteUp: r, voteDown: i };
629
629
  }
630
- function Vs(e) {
630
+ function Us(e) {
631
631
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
632
632
  }
633
633
  function Kt({
@@ -635,16 +635,16 @@ function Kt({
635
635
  viewerLanguage: t
636
636
  }) {
637
637
  var r;
638
- const s = e == null ? void 0 : e.text, a = Vs(t);
638
+ const s = e == null ? void 0 : e.text, a = Us(t);
639
639
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
640
640
  }
641
- const Us = O.lazy(() => import("./Card-DZVa2CeI.js")), Gs = O.lazy(() => import("./Card-BaaerKBC.js")), Hs = O.lazy(() => import("./Card-0TLA8XHU.js")), Xe = () => /* @__PURE__ */ n(
641
+ const Gs = z.lazy(() => import("./Card-BGOWR4lW.js")), Hs = z.lazy(() => import("./Card-BhO5jeP9.js")), Ys = z.lazy(() => import("./Card-BfvsO78k.js")), Xe = () => /* @__PURE__ */ n(
642
642
  "div",
643
643
  {
644
644
  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)]",
645
645
  "aria-hidden": !0
646
646
  }
647
- ), Ys = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Us, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), qs = Jt, Ws = Zt, Ft = { Composer: Ys, Sent: Jt, Received: Zt, Creator: qs, Visitor: Ws }, Xs = [
647
+ ), qs = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Ws = Jt, Xs = Zt, Ft = { Composer: qs, Sent: Jt, Received: Zt, Creator: Ws, Visitor: Xs }, Ks = [
648
648
  [/pdf/, "pdf"],
649
649
  [/wordprocessingml|msword|\.doc/, "doc"],
650
650
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -654,42 +654,42 @@ const Us = O.lazy(() => import("./Card-DZVa2CeI.js")), Gs = O.lazy(() => import(
654
654
  [/plain|rtf/, "text"],
655
655
  [/markdown/, "markdown"]
656
656
  ];
657
- function se(e) {
657
+ function ae(e) {
658
658
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
659
659
  }
660
660
  function Qt(e) {
661
- const t = Xs.find(
661
+ const t = Ks.find(
662
662
  ([s]) => s.test(e)
663
663
  );
664
664
  return t ? t[1] : "generic";
665
665
  }
666
- const Ks = {
666
+ const Js = {
667
667
  video: Yt,
668
- audio: us,
669
- image: ds,
668
+ audio: ms,
669
+ image: us,
670
670
  document: Ht
671
- }, Js = {
672
- pdf: xs,
673
- doc: vs,
674
- xls: ps,
675
- csv: bs,
676
- ppt: gs,
677
- zip: fs,
678
- text: hs,
679
- markdown: ms,
671
+ }, Zs = {
672
+ pdf: ws,
673
+ doc: xs,
674
+ xls: vs,
675
+ csv: ps,
676
+ ppt: bs,
677
+ zip: gs,
678
+ text: fs,
679
+ markdown: hs,
680
680
  generic: Ht
681
681
  };
682
- function Zs(e) {
683
- const t = se(e);
684
- return t !== "document" ? Ks[t] : Js[Qt(e)];
682
+ function Qs(e) {
683
+ const t = ae(e);
684
+ return t !== "document" ? Js[t] : Zs[Qt(e)];
685
685
  }
686
686
  function ce(e, t) {
687
- return O.createElement(Zs(e), t);
687
+ return z.createElement(Qs(e), t);
688
688
  }
689
- const Qs = (e) => {
689
+ const ea = (e) => {
690
690
  var t, s;
691
691
  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;
692
- }, ea = ({
692
+ }, ta = ({
693
693
  source: e,
694
694
  mimeType: t,
695
695
  poster: s,
@@ -701,17 +701,17 @@ const Qs = (e) => {
701
701
  muted: d = !1,
702
702
  onContainerClick: m
703
703
  }) => {
704
- const g = se(t), u = K(null), f = K(null), c = K(null), b = K(r), [N, v] = z(a), [x, w] = z(0), [M, A] = z(!1), [S, L] = z(!1), [I, C] = z(!1), [k, E] = z(!1), [D, V] = z(!0), [F, X] = z(null), U = H(() => {
704
+ const g = ae(t), u = K(null), f = K(null), c = K(null), b = K(r), [N, v] = O(a), [x, w] = O(0), [M, A] = O(!1), [S, L] = O(!1), [I, C] = O(!1), [k, E] = O(!1), [D, V] = O(!0), [F, X] = O(null), U = q(() => {
705
705
  C(!1), v(!0);
706
- }, []), G = H((p) => {
706
+ }, []), G = q((p) => {
707
707
  const _ = f.current;
708
708
  if (!_) return 0;
709
709
  const R = _.getBoundingClientRect();
710
710
  return Math.max(
711
711
  0,
712
- Math.min(1, (Qs(p) - R.left) / R.width)
712
+ Math.min(1, (ea(p) - R.left) / R.width)
713
713
  );
714
- }, []), P = H((p) => {
714
+ }, []), P = q((p) => {
715
715
  const _ = u.current;
716
716
  _ && _.duration && (_.currentTime = p * _.duration);
717
717
  }, []), B = (p) => {
@@ -747,14 +747,14 @@ const Qs = (e) => {
747
747
  window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", _), window.removeEventListener("touchmove", p), window.removeEventListener("touchend", _);
748
748
  };
749
749
  }, [M, G, P]);
750
- const Y = F ? { aspectRatio: String(F) } : void 0, W = F ? "" : " aspect-video", $ = Math.round(x * 100);
750
+ const H = F ? { aspectRatio: String(F) } : void 0, W = F ? "" : " aspect-video", $ = Math.round(x * 100);
751
751
  return /* @__PURE__ */ h(
752
752
  "div",
753
753
  {
754
754
  role: "button",
755
755
  tabIndex: 0,
756
756
  className: `relative cursor-pointer overflow-hidden bg-black ${W}`,
757
- style: Y,
757
+ style: H,
758
758
  onClick: (p) => {
759
759
  if (m) {
760
760
  m(p);
@@ -848,7 +848,7 @@ const Qs = (e) => {
848
848
  onKeyDown: (p) => {
849
849
  p.key !== "Enter" && p.key !== " " || (p.preventDefault(), p.stopPropagation(), U());
850
850
  },
851
- children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n($e, { className: "size-9 translate-x-0.5", weight: "fill" }) })
851
+ children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
852
852
  }
853
853
  ),
854
854
  l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
@@ -887,7 +887,7 @@ const Qs = (e) => {
887
887
  },
888
888
  className: "shrink-0 text-white",
889
889
  "aria-label": N ? "Pause" : "Play",
890
- children: N ? /* @__PURE__ */ n(ws, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n($e, { className: "size-5 translate-x-px", weight: "fill" })
890
+ children: N ? /* @__PURE__ */ n(Ns, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
891
891
  }
892
892
  ),
893
893
  /* @__PURE__ */ h(
@@ -937,7 +937,7 @@ const Qs = (e) => {
937
937
  ]
938
938
  }
939
939
  );
940
- }, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ta = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
940
+ }, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", na = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
941
941
  mimeType: e,
942
942
  sourceUrl: t,
943
943
  thumbnailUrl: s,
@@ -946,9 +946,9 @@ const Qs = (e) => {
946
946
  mediaPlayerProps: i,
947
947
  containedImage: o = !1
948
948
  }) => {
949
- const l = se(e), [d, m] = z(!1);
949
+ const l = ae(e), [d, m] = O(!1);
950
950
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
951
- ea,
951
+ ta,
952
952
  {
953
953
  source: t,
954
954
  mimeType: e,
@@ -999,7 +999,7 @@ const Qs = (e) => {
999
999
  weight: "regular"
1000
1000
  })
1001
1001
  }
1002
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ta(r)}`, children: /* @__PURE__ */ n(
1002
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${na(r)}`, children: /* @__PURE__ */ n(
1003
1003
  "img",
1004
1004
  {
1005
1005
  src: s,
@@ -1089,23 +1089,23 @@ function nn(e) {
1089
1089
  function Ke(e) {
1090
1090
  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)]`;
1091
1091
  }
1092
- function na(e) {
1092
+ function sa(e) {
1093
1093
  return e ? "bg-white/10" : "bg-black/5";
1094
1094
  }
1095
- function sa(e) {
1095
+ function aa(e) {
1096
1096
  return e ? "text-white" : "text-black";
1097
1097
  }
1098
- function aa(e) {
1098
+ function ra(e) {
1099
1099
  return e ? "text-white/55" : "text-black/55";
1100
1100
  }
1101
- function ra(e) {
1101
+ function ia(e) {
1102
1102
  return e ? "text-white/40" : "text-black/40";
1103
1103
  }
1104
- function ia(e) {
1104
+ function oa(e) {
1105
1105
  return e ? "text-white/20" : "text-black/20";
1106
1106
  }
1107
1107
  const Je = ({ attachment: e, isMyMessage: t }) => {
1108
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(O.Fragment, { children: [
1108
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(z.Fragment, { children: [
1109
1109
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1110
1110
  "img",
1111
1111
  {
@@ -1116,14 +1116,14 @@ const Je = ({ attachment: e, isMyMessage: t }) => {
1116
1116
  ) : /* @__PURE__ */ n(
1117
1117
  "div",
1118
1118
  {
1119
- className: `aspect-video w-full rounded-[20px] ${na(t)} flex items-center justify-center`,
1120
- children: /* @__PURE__ */ n(Ns, { className: `size-12 ${ia(t)}` })
1119
+ className: `aspect-video w-full rounded-[20px] ${sa(t)} flex items-center justify-center`,
1120
+ children: /* @__PURE__ */ n(_s, { className: `size-12 ${oa(t)}` })
1121
1121
  }
1122
1122
  ) }),
1123
1123
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1124
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${sa(t)}`, children: s }),
1125
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${aa(t)}`, children: a }),
1126
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ra(t)}`, children: d })
1124
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${aa(t)}`, children: s }),
1125
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ra(t)}`, children: a }),
1126
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ia(t)}`, children: d })
1127
1127
  ] })
1128
1128
  ] });
1129
1129
  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 });
@@ -1135,7 +1135,7 @@ function Ze(e) {
1135
1135
  var t;
1136
1136
  return (t = e.attachments) == null ? void 0 : t.find(sn);
1137
1137
  }
1138
- async function oa(e, t) {
1138
+ async function la(e, t) {
1139
1139
  let s;
1140
1140
  try {
1141
1141
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1147,11 +1147,11 @@ async function oa(e, t) {
1147
1147
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1148
1148
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1149
1149
  }
1150
- const la = ({
1150
+ const ca = ({
1151
1151
  url: e,
1152
1152
  filename: t
1153
1153
  }) => {
1154
- const [s, a] = z(!1);
1154
+ const [s, a] = O(!1);
1155
1155
  return /* @__PURE__ */ n(
1156
1156
  "button",
1157
1157
  {
@@ -1159,7 +1159,7 @@ const la = ({
1159
1159
  onClick: (i) => {
1160
1160
  i.stopPropagation();
1161
1161
  const o = window.open("", "_blank", "noopener,noreferrer");
1162
- a(!0), oa(e, t).then(() => {
1162
+ a(!0), la(e, t).then(() => {
1163
1163
  o == null || o.close();
1164
1164
  }).catch(() => {
1165
1165
  o && (o.location.href = e);
@@ -1167,7 +1167,7 @@ const la = ({
1167
1167
  },
1168
1168
  disabled: s,
1169
1169
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1170
- children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(O.Fragment, { children: [
1170
+ children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(z.Fragment, { children: [
1171
1171
  /* @__PURE__ */ n(ge, { className: "size-4 text-white", weight: "bold" }),
1172
1172
  "Download"
1173
1173
  ] })
@@ -1230,7 +1230,7 @@ const an = ({
1230
1230
  fileSize: a,
1231
1231
  thumbnailUrl: r
1232
1232
  }) => {
1233
- const i = se(t), o = a !== void 0 ? nn(a) : void 0;
1233
+ const i = ae(t), o = a !== void 0 ? nn(a) : void 0;
1234
1234
  return /* @__PURE__ */ n(
1235
1235
  tn,
1236
1236
  {
@@ -1249,17 +1249,17 @@ const an = ({
1249
1249
  containedImage: i === "image" || i === "document"
1250
1250
  }
1251
1251
  ),
1252
- action: /* @__PURE__ */ n(la, { url: e, filename: s })
1252
+ action: /* @__PURE__ */ n(ca, { url: e, filename: s })
1253
1253
  }
1254
1254
  );
1255
- }, ca = ({
1255
+ }, da = ({
1256
1256
  message: e,
1257
1257
  isMyMessage: t = !1
1258
1258
  }) => {
1259
1259
  const s = Ze(e), a = Qe(e);
1260
1260
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1261
1261
  !t && e.user && /* @__PURE__ */ n(
1262
- ne,
1262
+ se,
1263
1263
  {
1264
1264
  className: "str-chat__avatar str-chat__message-sender-avatar",
1265
1265
  id: e.user.id,
@@ -1283,7 +1283,7 @@ const an = ({
1283
1283
  }
1284
1284
  )
1285
1285
  ] });
1286
- }, da = ({
1286
+ }, ua = ({
1287
1287
  message: e
1288
1288
  }) => {
1289
1289
  const t = Ze(e);
@@ -1291,7 +1291,7 @@ const an = ({
1291
1291
  return /* @__PURE__ */ n("div", { className: Ke(!0), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !0 }) });
1292
1292
  const s = Qe(e);
1293
1293
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1294
- }, ua = ({
1294
+ }, ma = ({
1295
1295
  message: e
1296
1296
  }) => {
1297
1297
  const t = Ze(e);
@@ -1299,18 +1299,18 @@ const an = ({
1299
1299
  return /* @__PURE__ */ n("div", { className: Ke(!1), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !1 }) });
1300
1300
  const s = Qe(e);
1301
1301
  return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
1302
- }, xi = Object.assign(ca, {
1303
- Creator: da,
1304
- Visitor: ua
1305
- }), ma = {
1302
+ }, wi = Object.assign(da, {
1303
+ Creator: ua,
1304
+ Visitor: ma
1305
+ }), ha = {
1306
1306
  isUnlocking: () => !1
1307
- }, ha = {
1308
- LockedAttachment: ma
1309
- }, on = Ge({}), wi = on.Provider;
1310
- function fa(e) {
1311
- return He(on)[e] ?? ha[e];
1307
+ }, fa = {
1308
+ LockedAttachment: ha
1309
+ }, on = He({}), Ni = on.Provider;
1310
+ function ga(e) {
1311
+ return Se(on)[e] ?? fa[e];
1312
1312
  }
1313
- const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1313
+ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1314
1314
  "svg",
1315
1315
  {
1316
1316
  width: e,
@@ -1327,22 +1327,22 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1327
1327
  }
1328
1328
  )
1329
1329
  }
1330
- ), ba = (e) => {
1330
+ ), pa = (e) => {
1331
1331
  var t;
1332
1332
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1333
- }, pa = (e) => {
1333
+ }, va = (e) => {
1334
1334
  var t;
1335
1335
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1336
1336
  }, Ce = (e) => {
1337
1337
  var t;
1338
1338
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1339
- }, va = (e) => {
1339
+ }, xa = (e) => {
1340
1340
  var t;
1341
1341
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1342
- }, ln = (e) => ba(e) || pa(e), xa = (e) => {
1342
+ }, ln = (e) => pa(e) || va(e), wa = (e) => {
1343
1343
  var t;
1344
1344
  return ln(e) && !((t = e.text) != null && t.trim());
1345
- }, Le = ({
1345
+ }, Pe = ({
1346
1346
  message: e,
1347
1347
  standalone: t = !1,
1348
1348
  isMyMessage: s = !1,
@@ -1357,7 +1357,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1357
1357
  if (!f) return null;
1358
1358
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1359
1359
  return /* @__PURE__ */ h("div", { className: c, children: [
1360
- /* @__PURE__ */ n(_s, { size: t ? 14 : 12 }),
1360
+ /* @__PURE__ */ n(ys, { size: t ? 14 : 12 }),
1361
1361
  /* @__PURE__ */ n("span", { children: b })
1362
1362
  ] });
1363
1363
  }
@@ -1365,15 +1365,15 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1365
1365
  "message-chatbot-indicator",
1366
1366
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1367
1367
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1368
- ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(ga, { size: o ? 12 : 15 }) });
1369
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(re, { children: [
1368
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(ba, { size: o ? 12 : 15 }) });
1369
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
1370
1370
  m,
1371
1371
  g
1372
- ] }) : /* @__PURE__ */ h(re, { children: [
1372
+ ] }) : /* @__PURE__ */ h(ne, { children: [
1373
1373
  g,
1374
1374
  m
1375
1375
  ] }) });
1376
- }, wa = ({
1376
+ }, Na = ({
1377
1377
  selected: e,
1378
1378
  onVoteUp: t,
1379
1379
  onVoteDown: s
@@ -1389,7 +1389,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1389
1389
  "aria-label": "Good response",
1390
1390
  "aria-pressed": e === "up",
1391
1391
  "data-tooltip": "Good response",
1392
- children: /* @__PURE__ */ n(ys, { size: 16, weight: e === "up" ? "fill" : "regular" })
1392
+ children: /* @__PURE__ */ n(Cs, { size: 16, weight: e === "up" ? "fill" : "regular" })
1393
1393
  }
1394
1394
  ),
1395
1395
  /* @__PURE__ */ n(
@@ -1403,10 +1403,10 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1403
1403
  "aria-label": "Bad response",
1404
1404
  "aria-pressed": e === "down",
1405
1405
  "data-tooltip": "Bad response",
1406
- children: /* @__PURE__ */ n(Cs, { size: 16, weight: e === "down" ? "fill" : "regular" })
1406
+ children: /* @__PURE__ */ n(ks, { size: 16, weight: e === "down" ? "fill" : "regular" })
1407
1407
  }
1408
1408
  )
1409
- ] }), Na = (e) => {
1409
+ ] }), _a = (e) => {
1410
1410
  var gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et, It, St;
1411
1411
  const {
1412
1412
  additionalMessageInputProps: t,
@@ -1425,22 +1425,22 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1425
1425
  renderText: b,
1426
1426
  threadList: N,
1427
1427
  viewerLanguage: v
1428
- } = e, { client: x } = qe("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking: M, onUnlockClick: A, onFetchSource: S, onDownloadClick: L } = fa("LockedAttachment"), [I, C] = z(!1), k = An(c.id), { selected: E, voteUp: D, voteDown: V } = js(c), {
1429
- Attachment: F = Mn,
1430
- EditMessageModal: X = Dn,
1428
+ } = e, { client: x } = qe("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking: M, onUnlockClick: A, onFetchSource: S, onDownloadClick: L } = ga("LockedAttachment"), [I, C] = O(!1), k = Mn(c.id), { selected: E, voteUp: D, voteDown: V } = Vs(c), {
1429
+ Attachment: F = Dn,
1430
+ EditMessageModal: X = Rn,
1431
1431
  MessageActions: U,
1432
- MessageBlocked: G = Rn,
1433
- MessageBouncePrompt: P = Ln,
1434
- MessageDeleted: B = Pn,
1435
- MessageIsThreadReplyInChannelButtonIndicator: Y = zn,
1436
- MessageRepliesCountButton: W = On,
1437
- ReminderNotification: $ = Fn,
1438
- StreamedMessageText: p = $n,
1432
+ MessageBlocked: G = Ln,
1433
+ MessageBouncePrompt: P = Pn,
1434
+ MessageDeleted: B = On,
1435
+ MessageIsThreadReplyInChannelButtonIndicator: H = zn,
1436
+ MessageRepliesCountButton: W = Fn,
1437
+ ReminderNotification: $ = $n,
1438
+ StreamedMessageText: p = Bn,
1439
1439
  PinIndicator: _
1440
- } = Ut("CustomMessage"), R = Bn(c), T = jn(c), j = te(
1440
+ } = Ut("CustomMessage"), R = jn(c), T = Vn(c), j = te(
1441
1441
  () => u == null ? void 0 : u(c),
1442
1442
  [u, c]
1443
- ), q = te(() => {
1443
+ ), Y = te(() => {
1444
1444
  const me = c.attachments ?? [], _e = c.shared_location ? [c.shared_location, ...me] : me;
1445
1445
  if (!Ce(c)) return _e;
1446
1446
  const Tt = _e.filter((At) => !("type" in At) || !sn(At));
@@ -1449,16 +1449,16 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1449
1449
  const me = Kt({ message: c, viewerLanguage: v });
1450
1450
  return me === c.text ? c : { ...c, text: me };
1451
1451
  }, [c, v]);
1452
- if (Vn(c))
1452
+ if (Un(c))
1453
1453
  return null;
1454
1454
  if (c.deleted_at || c.type === "deleted")
1455
1455
  return /* @__PURE__ */ n(B, { message: c });
1456
- if (Un(c))
1456
+ if (Gn(c))
1457
1457
  return /* @__PURE__ */ n(G, {});
1458
- const ae = !N && !!c.reply_count, ee = !N && c.show_in_channel && c.parent_id, ct = c.status === "failed" && ((gt = c.error) == null ? void 0 : gt.status) !== 403, dt = Gn(c);
1458
+ const re = !N && !!c.reply_count, ee = !N && c.show_in_channel && c.parent_id, ct = c.status === "failed" && ((gt = c.error) == null ? void 0 : gt.status) !== 403, dt = Hn(c);
1459
1459
  let ie;
1460
1460
  ct ? ie = () => m(c) : dt && (ie = () => C(!0));
1461
- const ue = f(), kn = y(
1461
+ const ue = f(), En = y(
1462
1462
  "str-chat__message str-chat__message-simple",
1463
1463
  `str-chat__message--${c.type}`,
1464
1464
  `str-chat__message--${c.status}`,
@@ -1470,13 +1470,13 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1470
1470
  "str-chat__message--pinned pinned-message": c.pinned,
1471
1471
  "str-chat__message--with-reactions": T,
1472
1472
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((bt = c == null ? void 0 : c.error) == null ? void 0 : bt.status) !== 403,
1473
- "str-chat__message-with-thread-link": ae || ee,
1473
+ "str-chat__message-with-thread-link": re || ee,
1474
1474
  "str-chat__virtual-message__wrapper--end": r,
1475
1475
  "str-chat__virtual-message__wrapper--first": i,
1476
1476
  "str-chat__virtual-message__wrapper--group": o
1477
1477
  }
1478
- ), ut = c.poll_id && x.polls.fromState(c.poll_id), mt = xa(c), oe = Ce(c), ht = va(c), Ae = !!(q != null && q.length && !c.quoted_message), ft = oe && ue && Ae;
1479
- return /* @__PURE__ */ h(re, { children: [
1478
+ ), ut = c.poll_id && x.polls.fromState(c.poll_id), mt = wa(c), oe = Ce(c), ht = xa(c), Me = !!(Y != null && Y.length && !c.quoted_message), ft = oe && ue && Me;
1479
+ return /* @__PURE__ */ h(ne, { children: [
1480
1480
  a && /* @__PURE__ */ n(
1481
1481
  X,
1482
1482
  {
@@ -1484,7 +1484,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1484
1484
  }
1485
1485
  ),
1486
1486
  I && /* @__PURE__ */ n(
1487
- Hn,
1487
+ Yn,
1488
1488
  {
1489
1489
  MessageBouncePrompt: P,
1490
1490
  onClose: () => C(!1),
@@ -1494,13 +1494,13 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1494
1494
  /* @__PURE__ */ h(
1495
1495
  "div",
1496
1496
  {
1497
- className: kn,
1497
+ className: En,
1498
1498
  "data-message-id": c.id,
1499
1499
  children: [
1500
1500
  _ && /* @__PURE__ */ n(_, {}),
1501
1501
  !!k && /* @__PURE__ */ n($, { reminder: k }),
1502
1502
  c.user && /* @__PURE__ */ n(
1503
- ne,
1503
+ se,
1504
1504
  {
1505
1505
  className: "str-chat__avatar str-chat__message-sender-avatar",
1506
1506
  id: c.user.id,
@@ -1571,22 +1571,22 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1571
1571
  ) })
1572
1572
  ] }) : mt ? (
1573
1573
  /* Tip-only messages render as a standalone bubble */
1574
- /* @__PURE__ */ n(Le, { message: c, standalone: !0 })
1574
+ /* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
1575
1575
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1576
1576
  oe && !ft && /* @__PURE__ */ n(
1577
- Le,
1577
+ Pe,
1578
1578
  {
1579
1579
  message: c,
1580
- hasAttachment: Ae,
1580
+ hasAttachment: Me,
1581
1581
  isMyMessage: ue
1582
1582
  }
1583
1583
  ),
1584
- ut && /* @__PURE__ */ n(Yn, { poll: ut }),
1585
- q != null && q.length && !c.quoted_message ? /* @__PURE__ */ n(
1584
+ ut && /* @__PURE__ */ n(qn, { poll: ut }),
1585
+ Y != null && Y.length && !c.quoted_message ? /* @__PURE__ */ n(
1586
1586
  F,
1587
1587
  {
1588
1588
  actionHandler: l,
1589
- attachments: q
1589
+ attachments: Y
1590
1590
  }
1591
1591
  ) : null,
1592
1592
  j ? /* @__PURE__ */ n(
@@ -1602,21 +1602,21 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1602
1602
  renderText: b
1603
1603
  }
1604
1604
  ),
1605
- /* @__PURE__ */ n(qn, {})
1605
+ /* @__PURE__ */ n(Wn, {})
1606
1606
  ] }) })
1607
1607
  }
1608
1608
  ),
1609
1609
  !ht && !mt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1610
1610
  (!oe || ft) && /* @__PURE__ */ n(
1611
- Le,
1611
+ Pe,
1612
1612
  {
1613
1613
  message: c,
1614
- hasAttachment: Ae,
1614
+ hasAttachment: Me,
1615
1615
  isMyMessage: ue
1616
1616
  }
1617
1617
  ),
1618
1618
  s && oe && /* @__PURE__ */ n(
1619
- wa,
1619
+ Na,
1620
1620
  {
1621
1621
  selected: E,
1622
1622
  onVoteUp: D,
@@ -1624,26 +1624,26 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1624
1624
  }
1625
1625
  )
1626
1626
  ] }),
1627
- ae && /* @__PURE__ */ n(
1627
+ re && /* @__PURE__ */ n(
1628
1628
  W,
1629
1629
  {
1630
1630
  onClick: d,
1631
1631
  reply_count: c.reply_count
1632
1632
  }
1633
1633
  ),
1634
- ee && /* @__PURE__ */ n(Y, {})
1634
+ ee && /* @__PURE__ */ n(H, {})
1635
1635
  ]
1636
1636
  },
1637
1637
  c.id
1638
1638
  )
1639
1639
  ] });
1640
- }, _a = O.memo(
1641
- Na,
1642
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Tn(e, t)
1643
- ), ya = (e) => {
1640
+ }, ya = z.memo(
1641
+ _a,
1642
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1643
+ ), Ca = (e) => {
1644
1644
  const t = be("CustomMessage");
1645
- return /* @__PURE__ */ n(_a, { ...t, ...e });
1646
- }, Ca = () => {
1645
+ return /* @__PURE__ */ n(ya, { ...t, ...e });
1646
+ }, ka = () => {
1647
1647
  var s;
1648
1648
  const { handleDelete: e, message: t } = be("CustomMessageActions");
1649
1649
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
@@ -1653,10 +1653,10 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1653
1653
  "aria-label": "Delete",
1654
1654
  title: "Delete",
1655
1655
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1656
- children: /* @__PURE__ */ n(ks, { size: 16, weight: "light", "aria-hidden": !0 })
1656
+ children: /* @__PURE__ */ n(Es, { size: 16, weight: "light", "aria-hidden": !0 })
1657
1657
  }
1658
1658
  );
1659
- }, ka = () => {
1659
+ }, Ea = () => {
1660
1660
  const { handleFlag: e } = be("CustomMessageActions");
1661
1661
  return /* @__PURE__ */ n(
1662
1662
  qt,
@@ -1668,23 +1668,23 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1668
1668
  children: /* @__PURE__ */ n(Gt, { size: 16, weight: "light", "aria-hidden": !0 })
1669
1669
  }
1670
1670
  );
1671
- }, Ea = () => {
1671
+ }, Ia = () => {
1672
1672
  var t;
1673
1673
  const { message: e } = be("CustomMessageActions");
1674
1674
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1675
- As,
1675
+ Ms,
1676
1676
  {
1677
1677
  messageActionSet: [
1678
- { Component: Ca, placement: "quick", type: "delete" },
1679
- { Component: ka, placement: "quick", type: "flag" }
1678
+ { Component: ka, placement: "quick", type: "delete" },
1679
+ { Component: Ea, placement: "quick", type: "flag" }
1680
1680
  ]
1681
1681
  }
1682
1682
  );
1683
- }, Ia = (e) => ({
1683
+ }, Sa = (e) => ({
1684
1684
  linkPreviews: Array.from(e.previews.values()).filter(
1685
1685
  (t) => Pt.previewIsLoaded(t) || Pt.previewIsLoading(t)
1686
1686
  )
1687
- }), Sa = ({
1687
+ }), Ta = ({
1688
1688
  link: e,
1689
1689
  onDismiss: t
1690
1690
  }) => {
@@ -1724,22 +1724,22 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1724
1724
  ]
1725
1725
  }
1726
1726
  );
1727
- }, Ta = () => {
1728
- const { linkPreviewsManager: e } = Wn(), { linkPreviews: t } = Xn(
1727
+ }, Aa = () => {
1728
+ const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
1729
1729
  e.state,
1730
- Ia
1730
+ Sa
1731
1731
  ), s = (r) => {
1732
1732
  e.dismissPreview(r);
1733
1733
  };
1734
1734
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1735
- Sa,
1735
+ Ta,
1736
1736
  {
1737
1737
  link: r,
1738
1738
  onDismiss: s
1739
1739
  },
1740
1740
  r.og_scrape_url
1741
1741
  )) }) : null;
1742
- }, Aa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1742
+ }, cn = z.createContext(!1), Ma = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1743
1743
  "button",
1744
1744
  {
1745
1745
  ...s,
@@ -1747,22 +1747,20 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1747
1747
  "aria-label": "Send",
1748
1748
  disabled: t,
1749
1749
  onClick: e,
1750
- children: /* @__PURE__ */ n(Es, { weight: "bold", className: "size-4" })
1750
+ children: /* @__PURE__ */ n(Is, { weight: "bold", className: "size-4" })
1751
1751
  }
1752
- ), Ma = ({
1753
- disabled: e = !1
1754
- }) => {
1755
- const { handleSubmit: t } = Jn(), s = Zn(), a = e || !s, {
1756
- SendButton: r = Aa,
1757
- AttachmentPreviewList: i = Qn
1752
+ ), Da = () => {
1753
+ const e = Se(cn), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
1754
+ SendButton: r = Ma,
1755
+ AttachmentPreviewList: i = es
1758
1756
  } = Ut("CustomMessageInput");
1759
1757
  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: [
1760
- /* @__PURE__ */ n(es, {}),
1761
- /* @__PURE__ */ n(Ta, {}),
1758
+ /* @__PURE__ */ n(ts, {}),
1759
+ /* @__PURE__ */ n(Aa, {}),
1762
1760
  /* @__PURE__ */ n(i, {}),
1763
1761
  /* @__PURE__ */ h("div", { className: "flex", children: [
1764
1762
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1765
- ts,
1763
+ ns,
1766
1764
  {
1767
1765
  "aria-disabled": e || void 0,
1768
1766
  className: "w-full resize-none outline-none leading-6",
@@ -1785,44 +1783,43 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1785
1783
  )
1786
1784
  ] })
1787
1785
  ] });
1788
- }, Da = ({
1786
+ }, Ra = ({
1789
1787
  renderActions: e,
1790
1788
  renderFooter: t,
1791
1789
  disabled: s = !1,
1792
1790
  disabledReason: a
1793
1791
  }) => {
1794
- var d;
1795
- const { channel: r } = de(), o = ((d = r == null ? void 0 : r.data) == null ? void 0 : d.frozen) === !0 || s, l = H(
1796
- () => /* @__PURE__ */ n(Ma, { disabled: o }),
1797
- [o]
1798
- );
1799
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
1792
+ var o;
1793
+ const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1794
+ return s ? /* @__PURE__ */ h(ne, { children: [
1795
+ /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1796
+ t == null ? void 0 : t()
1797
+ ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
1800
1798
  /* @__PURE__ */ h(
1801
1799
  "div",
1802
1800
  {
1803
- inert: o ? "" : void 0,
1804
- "aria-disabled": o || void 0,
1801
+ inert: i ? "" : void 0,
1802
+ "aria-disabled": i || void 0,
1805
1803
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1806
1804
  children: [
1807
1805
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1808
- /* @__PURE__ */ n(Kn, { Input: l })
1806
+ /* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
1809
1807
  ]
1810
1808
  }
1811
1809
  ),
1812
- o && a ? /* @__PURE__ */ n("p", { className: "message-input-disabled-reason px-2 text-center text-sm text-black/55", children: a }) : null,
1813
1810
  t == null ? void 0 : t()
1814
1811
  ] });
1815
- }, Ra = [
1812
+ }, La = [
1816
1813
  "SYSTEM_DM_AGENT_PAUSED",
1817
1814
  "SYSTEM_DM_AGENT_RESUMED"
1818
- ], La = {
1815
+ ], Pa = {
1819
1816
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1820
1817
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1821
- }, Pa = [
1818
+ }, Oa = [
1822
1819
  "SYSTEM_AGE_SAFETY_BLOCKED"
1823
1820
  ], za = {
1824
1821
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1825
- }, Pe = "age safety guidelines.", Oa = "https://linktr.ee/s/about/contact", Bt = (e) => Ra.includes(e), Fa = (e) => Pa.includes(e), $a = (e) => {
1822
+ }, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", Bt = (e) => La.includes(e), $a = (e) => Oa.includes(e), Ba = (e) => {
1826
1823
  var a;
1827
1824
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1828
1825
  if (Bt(t))
@@ -1830,7 +1827,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1830
1827
  kind: "dm-agent",
1831
1828
  type: t
1832
1829
  };
1833
- if (Fa(t))
1830
+ if ($a(t))
1834
1831
  return {
1835
1832
  kind: "age-safety",
1836
1833
  type: t
@@ -1841,32 +1838,32 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1841
1838
  kind: "dm-agent",
1842
1839
  type: s
1843
1840
  };
1844
- }, Ba = (e) => {
1845
- const t = e.indexOf(Pe);
1841
+ }, ja = (e) => {
1842
+ const t = e.indexOf(Oe);
1846
1843
  if (t === -1)
1847
1844
  return e;
1848
- const s = t + Pe.length;
1849
- return /* @__PURE__ */ h(re, { children: [
1845
+ const s = t + Oe.length;
1846
+ return /* @__PURE__ */ h(ne, { children: [
1850
1847
  e.slice(0, t),
1851
1848
  /* @__PURE__ */ n(
1852
1849
  "a",
1853
1850
  {
1854
- href: Oa,
1851
+ href: Fa,
1855
1852
  target: "_blank",
1856
1853
  rel: "noopener noreferrer",
1857
1854
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1858
- children: Pe
1855
+ children: Oe
1859
1856
  }
1860
1857
  ),
1861
1858
  e.slice(s)
1862
1859
  ] });
1863
- }, ja = (e) => {
1860
+ }, Va = (e) => {
1864
1861
  var a, r;
1865
- const t = e.message.hide_date === !0, s = $a(
1862
+ const t = e.message.hide_date === !0, s = Ba(
1866
1863
  e.message
1867
1864
  );
1868
1865
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1869
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || La[s.type];
1866
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Pa[s.type];
1870
1867
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1871
1868
  /* @__PURE__ */ h(
1872
1869
  "div",
@@ -1876,7 +1873,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1876
1873
  "data-dm-agent-system-type": s.type,
1877
1874
  children: [
1878
1875
  /* @__PURE__ */ n(
1879
- Be,
1876
+ je,
1880
1877
  {
1881
1878
  size: 16,
1882
1879
  weight: "regular",
@@ -1888,7 +1885,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1888
1885
  ]
1889
1886
  }
1890
1887
  ),
1891
- !t && /* @__PURE__ */ n(Me, { message: e.message })
1888
+ !t && /* @__PURE__ */ n(De, { message: e.message })
1892
1889
  ] });
1893
1890
  }
1894
1891
  if ((s == null ? void 0 : s.kind) === "age-safety") {
@@ -1902,7 +1899,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1902
1899
  "data-age-safety-system-type": s.type,
1903
1900
  children: [
1904
1901
  /* @__PURE__ */ n(
1905
- Is,
1902
+ Ss,
1906
1903
  {
1907
1904
  size: 24,
1908
1905
  weight: "duotone",
@@ -1911,11 +1908,11 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1911
1908
  "data-testid": "age-safety-system-message-icon"
1912
1909
  }
1913
1910
  ),
1914
- /* @__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: Ba(i) }) })
1911
+ /* @__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: ja(i) }) })
1915
1912
  ]
1916
1913
  }
1917
1914
  ),
1918
- !t && /* @__PURE__ */ n(Me, { message: e.message })
1915
+ !t && /* @__PURE__ */ n(De, { message: e.message })
1919
1916
  ] });
1920
1917
  }
1921
1918
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1924,9 +1921,9 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1924
1921
  /* @__PURE__ */ n("p", { children: e.message.text }),
1925
1922
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1926
1923
  ] }),
1927
- !t && /* @__PURE__ */ n(Me, { message: e.message })
1924
+ !t && /* @__PURE__ */ n(De, { message: e.message })
1928
1925
  ] });
1929
- }, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1926
+ }, dn = He(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1930
1927
  "animateTransform",
1931
1928
  {
1932
1929
  attributeName: "transform",
@@ -1936,15 +1933,15 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1936
1933
  begin: `${120 * t}ms`,
1937
1934
  repeatCount: "indefinite"
1938
1935
  }
1939
- ) }), Va = /* @__PURE__ */ new Set([
1940
- De.Thinking,
1941
- De.Generating,
1942
- De.ExternalSources
1943
- ]), Ua = ({ threadList: e }) => {
1936
+ ) }), Ua = /* @__PURE__ */ new Set([
1937
+ Re.Thinking,
1938
+ Re.Generating,
1939
+ Re.ExternalSources
1940
+ ]), Ga = ({ threadList: e }) => {
1944
1941
  var b, N;
1945
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } = ns(), { aiState: o } = ss(t), l = He(cn);
1946
- if (!e && l && Va.has(o)) {
1947
- const v = Ga(t, (b = r.user) == null ? void 0 : b.id);
1942
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Se(dn);
1943
+ if (!e && l && Ua.has(o)) {
1944
+ const v = Ha(t, (b = r.user) == null ? void 0 : b.id);
1948
1945
  return /* @__PURE__ */ n(
1949
1946
  jt,
1950
1947
  {
@@ -1993,7 +1990,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
1993
1990
  style: { insetInlineStart: 0, insetInlineEnd: "auto" },
1994
1991
  children: [
1995
1992
  /* @__PURE__ */ n("div", { className: "shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ n(
1996
- ne,
1993
+ se,
1997
1994
  {
1998
1995
  id: e,
1999
1996
  name: t,
@@ -2021,7 +2018,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
2021
2018
  ]
2022
2019
  }
2023
2020
  );
2024
- function Ga(e, t) {
2021
+ function Ha(e, t) {
2025
2022
  var a;
2026
2023
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2027
2024
  for (const r of Object.values(s)) {
@@ -2030,7 +2027,7 @@ function Ga(e, t) {
2030
2027
  return i;
2031
2028
  }
2032
2029
  }
2033
- const Ha = () => null, Ya = ({ className: e, message: t }) => /* @__PURE__ */ h(
2030
+ const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2034
2031
  "div",
2035
2032
  {
2036
2033
  className: y("flex items-center justify-center h-full", e),
@@ -2073,12 +2070,12 @@ const Ha = () => null, Ya = ({ className: e, message: t }) => /* @__PURE__ */ h(
2073
2070
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2074
2071
  ]
2075
2072
  }
2076
- ), ke = O.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2077
- /* @__PURE__ */ n(Ya, { className: "w-6 h-6" }),
2073
+ ), ke = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2074
+ /* @__PURE__ */ n(qa, { className: "w-6 h-6" }),
2078
2075
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2079
2076
  ] }) }));
2080
2077
  ke.displayName = "LoadingState";
2081
- const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", qa = ({
2078
+ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", Wa = ({
2082
2079
  onBack: e,
2083
2080
  showBackButton: t,
2084
2081
  onShowInfo: s,
@@ -2087,7 +2084,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2087
2084
  dmAgentEnabled: i = !1
2088
2085
  }) => {
2089
2086
  var f, c, b, N, v;
2090
- const { channel: o } = de(), l = O.useMemo(() => {
2087
+ const { channel: o } = de(), l = z.useMemo(() => {
2091
2088
  var M, A;
2092
2089
  const x = (M = o._client) == null ? void 0 : M.userID;
2093
2090
  return x ? Object.values(((A = o.state) == null ? void 0 : A.members) || {}).find(
@@ -2096,7 +2093,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2096
2093
  return ((L = S.user) == null ? void 0 : L.id) && S.user.id !== x;
2097
2094
  }
2098
2095
  ) : void 0;
2099
- }, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Se(l == null ? void 0 : l.user), m = (b = l == null ? void 0 : l.user) == null ? void 0 : b.image, g = Xt(o), u = async () => {
2096
+ }, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (b = l == null ? void 0 : l.user) == null ? void 0 : b.image, g = Xt(o), u = async () => {
2100
2097
  try {
2101
2098
  g ? await o.unpin() : await o.pin();
2102
2099
  } catch (x) {
@@ -2124,7 +2121,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2124
2121
  ) }),
2125
2122
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2126
2123
  /* @__PURE__ */ n(
2127
- ne,
2124
+ se,
2128
2125
  {
2129
2126
  id: ((N = l == null ? void 0 : l.user) == null ? void 0 : N.id) || o.id || "unknown",
2130
2127
  name: d,
@@ -2143,12 +2140,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2143
2140
  "aria-label": `View info for ${d}`,
2144
2141
  children: [
2145
2142
  d,
2146
- /* @__PURE__ */ n(je, { className: "size-3 shrink-0" })
2143
+ /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0" })
2147
2144
  ]
2148
2145
  }
2149
2146
  ),
2150
2147
  i && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2151
- /* @__PURE__ */ n(Be, { className: "size-3 shrink-0 text-black/55" }),
2148
+ /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2152
2149
  /* @__PURE__ */ n("span", { children: Vt })
2153
2150
  ] })
2154
2151
  ] }),
@@ -2161,7 +2158,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2161
2158
  type: "button",
2162
2159
  "aria-label": g ? "Unstar conversation" : "Star conversation",
2163
2160
  children: /* @__PURE__ */ n(
2164
- Fe,
2161
+ $e,
2165
2162
  {
2166
2163
  className: y("size-5", {
2167
2164
  "text-yellow-600": g,
@@ -2200,7 +2197,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2200
2197
  }
2201
2198
  ),
2202
2199
  /* @__PURE__ */ n(
2203
- ne,
2200
+ se,
2204
2201
  {
2205
2202
  id: ((v = l == null ? void 0 : l.user) == null ? void 0 : v.id) || o.id || "unknown",
2206
2203
  name: d,
@@ -2220,12 +2217,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2220
2217
  "aria-label": `View info for ${d}`,
2221
2218
  children: [
2222
2219
  /* @__PURE__ */ n("span", { className: "truncate", children: d }),
2223
- /* @__PURE__ */ n(je, { className: "size-4 shrink-0" })
2220
+ /* @__PURE__ */ n(Ve, { className: "size-4 shrink-0" })
2224
2221
  ]
2225
2222
  }
2226
2223
  ) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: d }),
2227
2224
  i && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2228
- /* @__PURE__ */ n(Be, { className: "size-3 shrink-0 text-black/55" }),
2225
+ /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2229
2226
  /* @__PURE__ */ n("span", { className: "truncate", children: Vt })
2230
2227
  ] })
2231
2228
  ] })
@@ -2239,7 +2236,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2239
2236
  type: "button",
2240
2237
  "aria-label": g ? "Unstar conversation" : "Star conversation",
2241
2238
  children: /* @__PURE__ */ n(
2242
- Fe,
2239
+ $e,
2243
2240
  {
2244
2241
  className: y("size-5", {
2245
2242
  "text-yellow-600": g,
@@ -2263,7 +2260,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2263
2260
  ] })
2264
2261
  ] })
2265
2262
  ] });
2266
- }, Wa = ({
2263
+ }, Xa = ({
2267
2264
  onBack: e,
2268
2265
  showBackButton: t,
2269
2266
  renderMessageInputActions: s,
@@ -2289,61 +2286,61 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2289
2286
  dmAgentEnabled: L = !1,
2290
2287
  viewerLanguage: I
2291
2288
  }) => {
2292
- var Y, W, $, p, _, R;
2293
- const { channel: C } = de(), k = K(null), E = O.useMemo(() => {
2294
- var q, Z;
2295
- const T = (q = C._client) == null ? void 0 : q.userID;
2289
+ var H, W, $, p, _, R;
2290
+ const { channel: C } = de(), k = K(null), E = z.useMemo(() => {
2291
+ var Y, Z;
2292
+ const T = (Y = C._client) == null ? void 0 : Y.userID;
2296
2293
  return T ? Object.values(((Z = C.state) == null ? void 0 : Z.members) || {}).find(
2297
- (ae) => {
2294
+ (re) => {
2298
2295
  var ee;
2299
- return ((ee = ae.user) == null ? void 0 : ee.id) && ae.user.id !== T;
2296
+ return ((ee = re.user) == null ? void 0 : ee.id) && re.user.id !== T;
2300
2297
  }
2301
2298
  ) : void 0;
2302
- }, [(Y = C._client) == null ? void 0 : Y.userID, (W = C.state) == null ? void 0 : W.members]), D = O.useMemo(() => {
2303
- var q, Z;
2304
- const T = (q = C._client) == null ? void 0 : q.userID;
2305
- return T ? Object.values(((Z = C.state) == null ? void 0 : Z.members) || {}).find((ae) => {
2299
+ }, [(H = C._client) == null ? void 0 : H.userID, (W = C.state) == null ? void 0 : W.members]), D = z.useMemo(() => {
2300
+ var Y, Z;
2301
+ const T = (Y = C._client) == null ? void 0 : Y.userID;
2302
+ return T ? Object.values(((Z = C.state) == null ? void 0 : Z.members) || {}).find((re) => {
2306
2303
  var ee;
2307
- return ((ee = ae.user) == null ? void 0 : ee.id) === T;
2304
+ return ((ee = re.user) == null ? void 0 : ee.id) === T;
2308
2305
  }) : void 0;
2309
- }, [($ = C._client) == null ? void 0 : $.userID, (p = C.state) == null ? void 0 : p.members]), V = ((_ = D == null ? void 0 : D.user) == null ? void 0 : _.is_account) ?? (D == null ? void 0 : D.is_account), F = ((R = E == null ? void 0 : E.user) == null ? void 0 : R.is_account) ?? (E == null ? void 0 : E.is_account), X = L && V === !1 && F === !0, U = O.useMemo(() => {
2306
+ }, [($ = C._client) == null ? void 0 : $.userID, (p = C.state) == null ? void 0 : p.members]), V = ((_ = D == null ? void 0 : D.user) == null ? void 0 : _.is_account) ?? (D == null ? void 0 : D.is_account), F = ((R = E == null ? void 0 : E.user) == null ? void 0 : R.is_account) ?? (E == null ? void 0 : E.is_account), X = L && V === !1 && F === !0, U = z.useMemo(() => {
2310
2307
  if (!c) return;
2311
2308
  const T = C.data ?? {};
2312
2309
  if (T.followerStatus)
2313
2310
  return String(T.followerStatus);
2314
2311
  if (T.isFollower !== void 0)
2315
2312
  return T.isFollower ? "Subscribed to you" : "Not subscribed";
2316
- }, [C.data, c]), G = H(() => {
2313
+ }, [C.data, c]), G = q(() => {
2317
2314
  var T;
2318
2315
  (T = k.current) == null || T.showModal();
2319
- }, []), P = H(() => {
2316
+ }, []), P = q(() => {
2320
2317
  var T;
2321
2318
  (T = k.current) == null || T.close();
2322
- }, []), B = H(
2319
+ }, []), B = q(
2323
2320
  (T) => {
2324
- const { message: j } = be("ChannelView"), q = /* @__PURE__ */ n(
2325
- ya,
2321
+ const { message: j } = be("ChannelView"), Y = /* @__PURE__ */ n(
2322
+ Ca,
2326
2323
  {
2327
2324
  ...T,
2328
2325
  chatbotVotingEnabled: x,
2329
2326
  viewerLanguage: I
2330
2327
  }
2331
2328
  );
2332
- return !S || !j ? q : S(q, j);
2329
+ return !S || !j ? Y : S(Y, j);
2333
2330
  },
2334
2331
  [x, S, I]
2335
2332
  );
2336
- return /* @__PURE__ */ h(re, { children: [
2333
+ return /* @__PURE__ */ h(ne, { children: [
2337
2334
  /* @__PURE__ */ n(
2338
- rs,
2335
+ is,
2339
2336
  {
2340
2337
  overrides: {
2341
2338
  Message: B,
2342
- MessageActions: Ea
2339
+ MessageActions: Ia
2343
2340
  },
2344
- children: /* @__PURE__ */ h(is, { children: [
2341
+ children: /* @__PURE__ */ h(os, { children: [
2345
2342
  /* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(
2346
- qa,
2343
+ Wa,
2347
2344
  {
2348
2345
  onBack: e,
2349
2346
  showBackButton: t,
@@ -2353,13 +2350,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2353
2350
  dmAgentEnabled: X
2354
2351
  }
2355
2352
  ) }, "lt-channel-header"),
2356
- w ? /* @__PURE__ */ n(O.Fragment, { children: w() }, "lt-channel-banner") : null,
2353
+ w ? /* @__PURE__ */ n(z.Fragment, { children: w() }, "lt-channel-banner") : null,
2357
2354
  /* @__PURE__ */ n(
2358
2355
  "div",
2359
2356
  {
2360
2357
  className: "flex-1 overflow-hidden relative",
2361
2358
  children: /* @__PURE__ */ n(
2362
- os,
2359
+ ls,
2363
2360
  {
2364
2361
  hideDeletedMessages: !0,
2365
2362
  hideNewMessageSeparator: !1
@@ -2368,9 +2365,9 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2368
2365
  },
2369
2366
  "lt-channel-message-list"
2370
2367
  ),
2371
- r ? /* @__PURE__ */ n(O.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
2368
+ r ? /* @__PURE__ */ n(z.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
2372
2369
  /* @__PURE__ */ n(
2373
- Da,
2370
+ Ra,
2374
2371
  {
2375
2372
  renderActions: () => s == null ? void 0 : s(C),
2376
2373
  renderFooter: () => a == null ? void 0 : a(C),
@@ -2383,12 +2380,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2383
2380
  }
2384
2381
  ),
2385
2382
  /* @__PURE__ */ n(
2386
- Fs,
2383
+ $s,
2387
2384
  {
2388
2385
  dialogRef: k,
2389
2386
  onClose: P,
2390
2387
  participant: E,
2391
- participantDisplayName: Se(E == null ? void 0 : E.user),
2388
+ participantDisplayName: Te(E == null ? void 0 : E.user),
2392
2389
  channel: C,
2393
2390
  followerStatusLabel: U,
2394
2391
  onLeaveConversation: i,
@@ -2404,7 +2401,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2404
2401
  }
2405
2402
  )
2406
2403
  ] });
2407
- }, dn = O.memo(
2404
+ }, un = z.memo(
2408
2405
  ({
2409
2406
  channel: e,
2410
2407
  onBack: t,
@@ -2415,7 +2412,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2415
2412
  onLeaveConversation: o,
2416
2413
  onBlockParticipant: l,
2417
2414
  className: d,
2418
- CustomChannelEmptyState: m = Ha,
2415
+ CustomChannelEmptyState: m = Ya,
2419
2416
  showDeleteConversation: g = !0,
2420
2417
  onDeleteConversationClick: u,
2421
2418
  onBlockParticipantClick: f,
@@ -2439,15 +2436,15 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2439
2436
  attachmentPreviewList: X,
2440
2437
  viewerLanguage: U
2441
2438
  }) => {
2442
- const G = H(
2443
- async (B, Y, W) => {
2439
+ const G = q(
2440
+ async (B, H, W) => {
2444
2441
  var j;
2445
2442
  const $ = ((j = e.data) == null ? void 0 : j.chatbot_paused) === !0, p = M && !$, _ = {
2446
- ...Y,
2443
+ ...H,
2447
2444
  ...p && { silent: !0 },
2448
2445
  ...A && {
2449
2446
  metadata: {
2450
- ...Y.metadata ?? {},
2447
+ ...H.metadata ?? {},
2451
2448
  ...A
2452
2449
  }
2453
2450
  }
@@ -2463,13 +2460,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2463
2460
  if (!V) return;
2464
2461
  const B = P.current;
2465
2462
  if (!B) return;
2466
- const Y = (W) => {
2463
+ const H = (W) => {
2467
2464
  const $ = W.target, p = $ == null ? void 0 : $.closest("a[href]"), _ = p == null ? void 0 : p.getAttribute("href");
2468
2465
  if (!_) return;
2469
- const R = p == null ? void 0 : p.closest("[data-message-id]"), T = R == null ? void 0 : R.getAttribute("data-message-id"), j = T ? e.state.messages.find((q) => q.id === T) : void 0;
2466
+ const R = p == null ? void 0 : p.closest("[data-message-id]"), T = R == null ? void 0 : R.getAttribute("data-message-id"), j = T ? e.state.messages.find((Y) => Y.id === T) : void 0;
2470
2467
  V(_, j);
2471
2468
  };
2472
- return B.addEventListener("click", Y), () => B.removeEventListener("click", Y);
2469
+ return B.addEventListener("click", H), () => B.removeEventListener("click", H);
2473
2470
  }, [V, e]), /* @__PURE__ */ n(
2474
2471
  "div",
2475
2472
  {
@@ -2478,20 +2475,20 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2478
2475
  "messaging-channel-view h-full flex flex-col",
2479
2476
  d
2480
2477
  ),
2481
- children: /* @__PURE__ */ n(cn.Provider, { value: M ?? !1, children: /* @__PURE__ */ n(
2482
- as,
2478
+ children: /* @__PURE__ */ n(dn.Provider, { value: M ?? !1, children: /* @__PURE__ */ n(
2479
+ rs,
2483
2480
  {
2484
2481
  channel: e,
2485
- MessageSystem: ja,
2482
+ MessageSystem: Va,
2486
2483
  EmptyStateIndicator: m,
2487
2484
  LoadingIndicator: ke,
2488
- DateSeparator: $s,
2489
- TypingIndicator: Ua,
2485
+ DateSeparator: Bs,
2486
+ TypingIndicator: Ga,
2490
2487
  doSendMessageRequest: G,
2491
2488
  ...F ? { SendButton: F } : {},
2492
2489
  ...X ? { AttachmentPreviewList: X } : {},
2493
2490
  children: /* @__PURE__ */ n(
2494
- Wa,
2491
+ Xa,
2495
2492
  {
2496
2493
  onBack: t,
2497
2494
  showBackButton: s,
@@ -2526,8 +2523,8 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2526
2523
  );
2527
2524
  }
2528
2525
  );
2529
- dn.displayName = "ChannelView";
2530
- const he = O.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: [
2526
+ un.displayName = "ChannelView";
2527
+ const he = z.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: [
2531
2528
  /* @__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: "⚠️" }) }),
2532
2529
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2533
2530
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2542,7 +2539,7 @@ const he = O.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2542
2539
  )
2543
2540
  ] }) }));
2544
2541
  he.displayName = "ErrorState";
2545
- const Ni = ({
2542
+ const _i = ({
2546
2543
  capabilities: e = {},
2547
2544
  renderMessageInputActions: t,
2548
2545
  renderConversationFooter: s,
@@ -2570,7 +2567,7 @@ const Ni = ({
2570
2567
  refreshConnection: L,
2571
2568
  service: I,
2572
2569
  debug: C
2573
- } = Ms(), [k, E] = z(null), [D, V] = z(null), [F, X] = z(!1), { showDeleteConversation: U = !0 } = e, G = K(o);
2570
+ } = Ds(), [k, E] = O(null), [D, V] = O(null), [F, X] = O(!1), { showDeleteConversation: U = !0 } = e, G = K(o);
2574
2571
  G.current = o;
2575
2572
  const P = K(a);
2576
2573
  P.current = a, J(() => {
@@ -2633,7 +2630,7 @@ const Ni = ({
2633
2630
  }, [i, w, M, I, C]);
2634
2631
  const B = K(r);
2635
2632
  B.current = r;
2636
- const Y = H(() => {
2633
+ const H = q(() => {
2637
2634
  var W;
2638
2635
  E(null), X(!0), (W = B.current) == null || W.call(B);
2639
2636
  }, []);
@@ -2644,14 +2641,14 @@ const Ni = ({
2644
2641
  onBack: L
2645
2642
  }
2646
2643
  ) : D ? /* @__PURE__ */ n(he, { message: D }) : F && !k ? /* @__PURE__ */ n(he, { message: "Conversation ended" }) : k ? /* @__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(
2647
- dn,
2644
+ un,
2648
2645
  {
2649
2646
  channel: k,
2650
2647
  renderMessageInputActions: t,
2651
2648
  renderConversationFooter: s,
2652
2649
  renderChannelBanner: b,
2653
- onLeaveConversation: Y,
2654
- onBlockParticipant: Y,
2650
+ onLeaveConversation: H,
2651
+ onBlockParticipant: H,
2655
2652
  CustomChannelEmptyState: l,
2656
2653
  showDeleteConversation: U,
2657
2654
  onBlockParticipantClick: d,
@@ -2667,31 +2664,31 @@ const Ni = ({
2667
2664
  k.id
2668
2665
  ) }) }) : /* @__PURE__ */ n(ke, {});
2669
2666
  };
2670
- function Xa(e) {
2667
+ function Ka(e) {
2671
2668
  const t = e.state.pending_messages;
2672
2669
  if (t != null && t.length)
2673
2670
  for (const s of t)
2674
2671
  e.state.addMessageSorted(s.message);
2675
2672
  }
2676
- const un = O.createContext({
2673
+ const mn = z.createContext({
2677
2674
  selectedChannel: void 0,
2678
2675
  onChannelSelect: () => {
2679
2676
  },
2680
2677
  debug: !1,
2681
2678
  renderMessagePreview: void 0,
2682
2679
  viewerLanguage: void 0
2683
- }), Ka = un.Provider, Ja = () => O.useContext(un), Za = (e, t) => {
2680
+ }), Ja = mn.Provider, Za = () => z.useContext(mn), Qa = (e, t) => {
2684
2681
  const s = new Date(
2685
2682
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2686
2683
  ), r = new Date(
2687
2684
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2688
2685
  ).getTime() - s.getTime();
2689
2686
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2690
- }, Qa = (e) => {
2687
+ }, er = (e) => {
2691
2688
  const t = /* @__PURE__ */ new Date();
2692
2689
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2693
2690
  return "Just now";
2694
- const a = Za(e, t);
2691
+ const a = Qa(e, t);
2695
2692
  return a === 0 ? e.toLocaleTimeString([], {
2696
2693
  hour: "numeric",
2697
2694
  minute: "2-digit",
@@ -2701,7 +2698,7 @@ const un = O.createContext({
2701
2698
  day: "numeric",
2702
2699
  year: "2-digit"
2703
2700
  });
2704
- }, mn = O.memo(
2701
+ }, hn = z.memo(
2705
2702
  ({ channel: e, unread: t }) => {
2706
2703
  var L, I, C;
2707
2704
  const {
@@ -2710,7 +2707,7 @@ const un = O.createContext({
2710
2707
  debug: r,
2711
2708
  renderMessagePreview: i,
2712
2709
  viewerLanguage: o
2713
- } = Ja(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2710
+ } = Za(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2714
2711
  e && a(e);
2715
2712
  }, m = (k) => {
2716
2713
  const E = k.key === "Enter" || k.key === " ", D = k.repeat;
@@ -2720,7 +2717,7 @@ const un = O.createContext({
2720
2717
  var E, D;
2721
2718
  return ((E = k.user) == null ? void 0 : E.id) && k.user.id !== ((D = e == null ? void 0 : e._client) == null ? void 0 : D.userID);
2722
2719
  }
2723
- ), f = Se(u == null ? void 0 : u.user), c = (I = u == null ? void 0 : u.user) == null ? void 0 : I.image, b = (() => {
2720
+ ), f = Te(u == null ? void 0 : u.user), c = (I = u == null ? void 0 : u.user) == null ? void 0 : I.image, b = (() => {
2724
2721
  var E;
2725
2722
  const k = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2726
2723
  if (k != null && k.length) {
@@ -2739,7 +2736,7 @@ const un = O.createContext({
2739
2736
  if (k) return k;
2740
2737
  const F = (P = b == null ? void 0 : b.attachments) == null ? void 0 : P[0];
2741
2738
  return F ? F.og_scrape_url ? F.og_scrape_url : F.type === "image" ? "📷 Sent an image" : F.type === "video" ? "🎥 Sent a video" : F.type === "audio" ? "🎵 Sent audio" : F.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2742
- })(), x = b != null && b.created_at ? Qa(new Date(b.created_at)) : "", w = b ? Ce(b) : !1, M = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, A = Xt(e), S = t ?? 0;
2739
+ })(), x = b != null && b.created_at ? er(new Date(b.created_at)) : "", w = b ? Ce(b) : !1, M = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, A = Xt(e), S = t ?? 0;
2743
2740
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2744
2741
  channelId: e == null ? void 0 : e.id,
2745
2742
  isSelected: l,
@@ -2762,7 +2759,7 @@ const un = O.createContext({
2762
2759
  ),
2763
2760
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-3", children: [
2764
2761
  /* @__PURE__ */ n(
2765
- ne,
2762
+ se,
2766
2763
  {
2767
2764
  id: ((C = u == null ? void 0 : u.user) == null ? void 0 : C.id) || e.id || "unknown",
2768
2765
  name: f,
@@ -2799,26 +2796,26 @@ const un = O.createContext({
2799
2796
  );
2800
2797
  }
2801
2798
  );
2802
- mn.displayName = "CustomChannelPreview";
2803
- const er = { last_message_at: -1 }, tr = O.memo(
2799
+ hn.displayName = "CustomChannelPreview";
2800
+ const tr = { last_message_at: -1 }, nr = z.memo(
2804
2801
  ({
2805
2802
  onChannelSelect: e,
2806
2803
  selectedChannel: t,
2807
2804
  filters: s,
2808
2805
  allowNewMessagesFromUnfilteredChannels: a = !1,
2809
2806
  channelRenderFilterFn: r,
2810
- sort: i = er,
2807
+ sort: i = tr,
2811
2808
  className: o,
2812
2809
  customEmptyStateIndicator: l,
2813
2810
  renderMessagePreview: d,
2814
2811
  viewerLanguage: m
2815
2812
  }) => {
2816
- const g = O.useRef(0);
2813
+ const g = z.useRef(0);
2817
2814
  g.current++;
2818
- const { debug: u = !1 } = We(), f = O.useCallback(
2815
+ const { debug: u = !1 } = We(), f = z.useCallback(
2819
2816
  (b) => {
2820
2817
  for (const N of b)
2821
- Xa(N);
2818
+ Ka(N);
2822
2819
  return r ? r(b) : b;
2823
2820
  },
2824
2821
  [r]
@@ -2828,7 +2825,7 @@ const er = { last_message_at: -1 }, tr = O.memo(
2828
2825
  selectedChannelId: t == null ? void 0 : t.id,
2829
2826
  filters: s
2830
2827
  });
2831
- const c = O.useMemo(
2828
+ const c = z.useMemo(
2832
2829
  () => ({
2833
2830
  selectedChannel: t,
2834
2831
  onChannelSelect: e,
@@ -2851,15 +2848,15 @@ const er = { last_message_at: -1 }, tr = O.memo(
2851
2848
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2852
2849
  o
2853
2850
  ),
2854
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Ka, { value: c, children: /* @__PURE__ */ n(
2855
- ls,
2851
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Ja, { value: c, children: /* @__PURE__ */ n(
2852
+ cs,
2856
2853
  {
2857
2854
  filters: s,
2858
2855
  sort: i,
2859
2856
  options: { limit: 30 },
2860
2857
  allowNewMessagesFromUnfilteredChannels: a,
2861
2858
  channelRenderFilterFn: f,
2862
- Preview: mn,
2859
+ Preview: hn,
2863
2860
  EmptyStateIndicator: l
2864
2861
  },
2865
2862
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -2868,26 +2865,26 @@ const er = { last_message_at: -1 }, tr = O.memo(
2868
2865
  );
2869
2866
  }
2870
2867
  );
2871
- tr.displayName = "ChannelList";
2872
- const nr = /^([a-z][a-z0-9+.-]*):/i, sr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2868
+ nr.displayName = "ChannelList";
2869
+ const sr = /^([a-z][a-z0-9+.-]*):/i, ar = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2873
2870
  function et(e) {
2874
2871
  if (typeof e != "string") return;
2875
2872
  const t = e.trim();
2876
2873
  if (t === "") return;
2877
- const s = nr.exec(t);
2874
+ const s = sr.exec(t);
2878
2875
  if (s) {
2879
2876
  const a = s[1].toLowerCase();
2880
- return sr.has(a) ? t : void 0;
2877
+ return ar.has(a) ? t : void 0;
2881
2878
  }
2882
2879
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2883
2880
  }
2884
- const ar = {
2881
+ const rr = {
2885
2882
  dark: "bg-white text-[#121110] hover:bg-white/90",
2886
2883
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2887
- }, rr = ({ variant: e, cta: t }) => {
2884
+ }, ir = ({ variant: e, cta: t }) => {
2888
2885
  const s = y(
2889
2886
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2890
- ar[e]
2887
+ rr[e]
2891
2888
  ), a = et(t.href);
2892
2889
  return a ? /* @__PURE__ */ n(
2893
2890
  "a",
@@ -2914,10 +2911,10 @@ const ar = {
2914
2911
  children: t.label
2915
2912
  }
2916
2913
  );
2917
- }, ir = {
2914
+ }, or = {
2918
2915
  dark: "text-white",
2919
2916
  light: "text-black/90"
2920
- }, or = "text-white/30", lr = {
2917
+ }, lr = "text-white/30", cr = {
2921
2918
  dark: "text-white/55",
2922
2919
  light: "text-black/55"
2923
2920
  }, tt = ({
@@ -2934,10 +2931,10 @@ const ar = {
2934
2931
  if (!g && !u && !c && !b) return null;
2935
2932
  const v = y(
2936
2933
  "truncate text-base font-medium leading-6",
2937
- d && !t ? or : ir[e]
2934
+ d && !t ? lr : or[e]
2938
2935
  ), x = y(
2939
2936
  "truncate text-xs leading-4",
2940
- lr[e]
2937
+ cr[e]
2941
2938
  );
2942
2939
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2943
2940
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2953,9 +2950,9 @@ const ar = {
2953
2950
  ] }),
2954
2951
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2955
2952
  ] }),
2956
- o && /* @__PURE__ */ n(rr, { variant: e, cta: o })
2953
+ o && /* @__PURE__ */ n(ir, { variant: e, cta: o })
2957
2954
  ] });
2958
- }, cr = y(
2955
+ }, dr = y(
2959
2956
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2960
2957
  // 1px hairline border that sits flush with the card chrome — matches
2961
2958
  // the messaging design system's "small border around link attachments"
@@ -2974,7 +2971,7 @@ const ar = {
2974
2971
  "data-testid": d
2975
2972
  }) => {
2976
2973
  const m = s != null || a != null, g = y(
2977
- cr,
2974
+ dr,
2978
2975
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2979
2976
  // `focus-ring` is a design-system utility from the component-library
2980
2977
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -3022,15 +3019,15 @@ const ar = {
3022
3019
  ]
3023
3020
  }
3024
3021
  );
3025
- }, dr = {
3022
+ }, ur = {
3026
3023
  dark: "bg-white/10",
3027
3024
  light: "bg-black/5"
3028
- }, ur = {
3025
+ }, mr = {
3029
3026
  dark: "size-16 text-white/25",
3030
3027
  light: "size-16 text-black/25"
3031
- }, Te = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
3028
+ }, Ae = (e, t) => !!t && !!e && ae(e) === "audio", fn = (e, t) => {
3032
3029
  if (!t || !e) return !1;
3033
- const s = se(e);
3030
+ const s = ae(e);
3034
3031
  return s === "video" || s === "audio";
3035
3032
  }, nt = "bg-[#F2F3F4]", Ie = ({
3036
3033
  variant: e,
@@ -3041,8 +3038,8 @@ const ar = {
3041
3038
  topLeft: i,
3042
3039
  topRight: o
3043
3040
  }) => {
3044
- const l = se(r), d = !!s && l === "video";
3045
- return Te(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3041
+ const l = ae(r), d = !!s && l === "video";
3042
+ return Ae(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3046
3043
  "audio",
3047
3044
  {
3048
3045
  src: s,
@@ -3083,10 +3080,10 @@ const ar = {
3083
3080
  {
3084
3081
  className: y(
3085
3082
  "flex h-full w-full items-center justify-center",
3086
- dr[e]
3083
+ ur[e]
3087
3084
  ),
3088
3085
  children: ce(r, {
3089
- className: ur[e],
3086
+ className: mr[e],
3090
3087
  weight: "regular"
3091
3088
  })
3092
3089
  }
@@ -3096,7 +3093,7 @@ const ar = {
3096
3093
  ]
3097
3094
  }
3098
3095
  );
3099
- }, mr = ({
3096
+ }, hr = ({
3100
3097
  title: e,
3101
3098
  placeholderTitle: t,
3102
3099
  description: s,
@@ -3110,7 +3107,7 @@ const ar = {
3110
3107
  onDismiss: g,
3111
3108
  onEditClick: u
3112
3109
  }) => {
3113
- const f = l === "classic", c = Te(r, o), b = g ? /* @__PURE__ */ n(
3110
+ const f = l === "classic", c = Ae(r, o), b = g ? /* @__PURE__ */ n(
3114
3111
  "button",
3115
3112
  {
3116
3113
  type: "button",
@@ -3126,7 +3123,7 @@ const ar = {
3126
3123
  onClick: u,
3127
3124
  "aria-label": "Edit attachment",
3128
3125
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3129
- children: /* @__PURE__ */ n(Ss, { className: "size-5", weight: "regular" })
3126
+ children: /* @__PURE__ */ n(Ts, { className: "size-5", weight: "regular" })
3130
3127
  }
3131
3128
  ) : void 0;
3132
3129
  return c ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: nt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3173,7 +3170,7 @@ const ar = {
3173
3170
  ]
3174
3171
  }
3175
3172
  );
3176
- }, hr = ({
3173
+ }, fr = ({
3177
3174
  title: e,
3178
3175
  description: t,
3179
3176
  url: s,
@@ -3185,7 +3182,7 @@ const ar = {
3185
3182
  cta: d,
3186
3183
  onClick: m
3187
3184
  }) => {
3188
- const g = hn(a, i), u = et(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Te(a, i) ? nt : void 0, N = d && m ? {
3185
+ const g = fn(a, i), u = et(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Ae(a, i) ? nt : void 0, N = d && m ? {
3189
3186
  ...d,
3190
3187
  onClick: () => {
3191
3188
  var v;
@@ -3226,7 +3223,7 @@ const ar = {
3226
3223
  ]
3227
3224
  }
3228
3225
  );
3229
- }, fr = ({
3226
+ }, gr = ({
3230
3227
  title: e,
3231
3228
  placeholderTitle: t,
3232
3229
  description: s,
@@ -3239,14 +3236,14 @@ const ar = {
3239
3236
  cta: m,
3240
3237
  onClick: g
3241
3238
  }) => {
3242
- const u = hn(r, o), f = et(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3239
+ const u = fn(r, o), f = et(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3243
3240
  return /* @__PURE__ */ h(
3244
3241
  Ee,
3245
3242
  {
3246
3243
  variant: "dark",
3247
3244
  href: c,
3248
3245
  onClick: b,
3249
- bgClassName: Te(r, o) ? nt : void 0,
3246
+ bgClassName: Ae(r, o) ? nt : void 0,
3250
3247
  children: [
3251
3248
  l === "featured" && /* @__PURE__ */ n(
3252
3249
  Ie,
@@ -3273,20 +3270,20 @@ const ar = {
3273
3270
  ]
3274
3271
  }
3275
3272
  );
3276
- }, _i = {
3277
- Composer: mr,
3278
- Sent: fr,
3279
- Received: hr
3280
- }, gr = {
3273
+ }, yi = {
3274
+ Composer: hr,
3275
+ Sent: gr,
3276
+ Received: fr
3277
+ }, br = {
3281
3278
  dark: "bg-[#121110]",
3282
3279
  light: "bg-[#e9eaed]"
3283
- }, br = {
3280
+ }, pr = {
3284
3281
  dark: "text-white",
3285
3282
  light: "text-[#080707]"
3286
- }, pr = {
3283
+ }, vr = {
3287
3284
  dark: "border-white/[0.08]",
3288
3285
  light: "border-black/[0.08]"
3289
- }, vr = (e) => e === "dark" ? "sender" : "receiver", xr = {
3286
+ }, xr = (e) => e === "dark" ? "sender" : "receiver", wr = {
3290
3287
  sender: {
3291
3288
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3292
3289
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3308,7 +3305,7 @@ const ar = {
3308
3305
  children: i,
3309
3306
  "data-testid": o
3310
3307
  }) => {
3311
- const l = t != null && t !== "", d = xr[vr(e)][a];
3308
+ const l = t != null && t !== "", d = wr[xr(e)][a];
3312
3309
  return /* @__PURE__ */ h(
3313
3310
  "div",
3314
3311
  {
@@ -3323,10 +3320,10 @@ const ar = {
3323
3320
  // as the surrounding `CustomMessage` text bubbles.
3324
3321
  "relative w-[280px] overflow-hidden px-2 py-2",
3325
3322
  d,
3326
- gr[e],
3327
3323
  br[e],
3324
+ pr[e],
3328
3325
  s && "border",
3329
- s && pr[e],
3326
+ s && vr[e],
3330
3327
  r
3331
3328
  ),
3332
3329
  children: [
@@ -3369,16 +3366,16 @@ const ar = {
3369
3366
  ),
3370
3367
  children: /* @__PURE__ */ n(pe, { className: "size-3", weight: "bold" })
3371
3368
  }
3372
- ), we = (e) => e === "received" ? "light" : "dark", yi = ({
3369
+ ), we = (e) => e === "received" ? "light" : "dark", Ci = ({
3373
3370
  firstOfGroup: e,
3374
3371
  endOfGroup: t,
3375
3372
  groupedByUser: s
3376
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", wr = ({
3373
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Nr = ({
3377
3374
  src: e,
3378
3375
  mimeType: t,
3379
3376
  filename: s,
3380
3377
  items: a
3381
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Nr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3378
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], _r = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3382
3379
  /* @__PURE__ */ n(
3383
3380
  "audio",
3384
3381
  {
@@ -3401,7 +3398,7 @@ const ar = {
3401
3398
  preload: l,
3402
3399
  onDismiss: d
3403
3400
  }) => {
3404
- const m = we(e), g = e === "composer" && !!d, u = wr({ src: t, mimeType: s, filename: a, items: r });
3401
+ const m = we(e), g = e === "composer" && !!d, u = Nr({ src: t, mimeType: s, filename: a, items: r });
3405
3402
  if (u.length === 0)
3406
3403
  return null;
3407
3404
  const f = l ?? (u.length > 1 ? "none" : "metadata");
@@ -3413,7 +3410,7 @@ const ar = {
3413
3410
  groupPosition: o,
3414
3411
  "data-testid": "audio-attachment",
3415
3412
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
3416
- Nr,
3413
+ _r,
3417
3414
  {
3418
3415
  item: c,
3419
3416
  preload: f,
@@ -3427,15 +3424,15 @@ const ar = {
3427
3424
  )) })
3428
3425
  }
3429
3426
  );
3430
- }, _r = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), yr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Cr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), kr = {
3431
- Composer: _r,
3432
- Sent: yr,
3433
- Received: Cr
3427
+ }, yr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), kr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Er = {
3428
+ Composer: yr,
3429
+ Sent: Cr,
3430
+ Received: kr
3434
3431
  };
3435
- function Er(e) {
3432
+ function Ir(e) {
3436
3433
  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`;
3437
3434
  }
3438
- const Ir = {
3435
+ const Sr = {
3439
3436
  pdf: "PDF",
3440
3437
  doc: "DOC",
3441
3438
  xls: "XLS",
@@ -3445,7 +3442,7 @@ const Ir = {
3445
3442
  text: "TXT",
3446
3443
  markdown: "MD"
3447
3444
  };
3448
- function Sr(e, t) {
3445
+ function Tr(e, t) {
3449
3446
  if (t) {
3450
3447
  const r = t.lastIndexOf(".");
3451
3448
  if (r > 0 && r < t.length - 1) {
@@ -3454,8 +3451,8 @@ function Sr(e, t) {
3454
3451
  }
3455
3452
  }
3456
3453
  if (!e) return;
3457
- if (se(e) === "document") {
3458
- const r = Qt(e), i = Ir[r];
3454
+ if (ae(e) === "document") {
3455
+ const r = Qt(e), i = Sr[r];
3459
3456
  if (i) return i;
3460
3457
  if (e === "application/octet-stream") return;
3461
3458
  }
@@ -3463,8 +3460,8 @@ function Sr(e, t) {
3463
3460
  if (!(!a || a === "*"))
3464
3461
  return a.toUpperCase();
3465
3462
  }
3466
- function Tr(e, t, s) {
3467
- const a = Sr(e, t), r = typeof s == "number" && s > 0 ? Er(s) : void 0;
3463
+ function Ar(e, t, s) {
3464
+ const a = Tr(e, t), r = typeof s == "number" && s > 0 ? Ir(s) : void 0;
3468
3465
  return [a, r].filter(Boolean).join(" · ") || void 0;
3469
3466
  }
3470
3467
  function Q(e) {
@@ -3475,16 +3472,16 @@ function Q(e) {
3475
3472
  return "download";
3476
3473
  }
3477
3474
  }
3478
- const Ar = {
3475
+ const Mr = {
3479
3476
  dark: "text-white/55",
3480
3477
  light: "text-black/65"
3481
- }, Mr = {
3478
+ }, Dr = {
3482
3479
  dark: "bg-white/10",
3483
3480
  light: "bg-black/5"
3484
- }, Dr = {
3481
+ }, Rr = {
3485
3482
  dark: "text-white/85",
3486
3483
  light: "text-black/85"
3487
- }, fn = ({
3484
+ }, gn = ({
3488
3485
  variant: e,
3489
3486
  filename: t,
3490
3487
  title: s,
@@ -3494,16 +3491,16 @@ const Ar = {
3494
3491
  activateLabel: o,
3495
3492
  trailingAction: l
3496
3493
  }) => {
3497
- const d = s ?? t ?? "File", m = Tr(a, t, r), g = /* @__PURE__ */ n(
3494
+ const d = s ?? t ?? "File", m = Ar(a, t, r), g = /* @__PURE__ */ n(
3498
3495
  "div",
3499
3496
  {
3500
3497
  className: y(
3501
3498
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3502
- Mr[e]
3499
+ Dr[e]
3503
3500
  ),
3504
3501
  "aria-hidden": !0,
3505
3502
  children: ce(a, {
3506
- className: y("size-6", Dr[e]),
3503
+ className: y("size-6", Rr[e]),
3507
3504
  weight: "regular"
3508
3505
  })
3509
3506
  }
@@ -3514,7 +3511,7 @@ const Ar = {
3514
3511
  {
3515
3512
  className: y(
3516
3513
  "truncate text-xs leading-4",
3517
- Ar[e]
3514
+ Mr[e]
3518
3515
  ),
3519
3516
  children: m
3520
3517
  }
@@ -3534,7 +3531,7 @@ const Ar = {
3534
3531
  u
3535
3532
  ]
3536
3533
  }
3537
- ) : /* @__PURE__ */ h(re, { children: [
3534
+ ) : /* @__PURE__ */ h(ne, { children: [
3538
3535
  g,
3539
3536
  u
3540
3537
  ] });
@@ -3543,7 +3540,7 @@ const Ar = {
3543
3540
  l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3544
3541
  ] });
3545
3542
  };
3546
- async function gn(e, t) {
3543
+ async function bn(e, t) {
3547
3544
  const s = t ?? Q(e);
3548
3545
  try {
3549
3546
  const a = await fetch(e, { mode: "cors" });
@@ -3557,14 +3554,14 @@ async function gn(e, t) {
3557
3554
  }
3558
3555
  }
3559
3556
  }
3560
- const Rr = ({
3557
+ const Lr = ({
3561
3558
  src: e,
3562
3559
  filename: t,
3563
3560
  fileSize: s,
3564
3561
  mimeType: a,
3565
3562
  title: r,
3566
3563
  items: i
3567
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Lr = ({
3564
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Pr = ({
3568
3565
  variant: e,
3569
3566
  item: t,
3570
3567
  index: s,
@@ -3573,7 +3570,7 @@ const Rr = ({
3573
3570
  }) => {
3574
3571
  const i = t.filename ?? Q(t.src);
3575
3572
  return /* @__PURE__ */ n(
3576
- fn,
3573
+ gn,
3577
3574
  {
3578
3575
  variant: e,
3579
3576
  filename: i,
@@ -3598,7 +3595,7 @@ const Rr = ({
3598
3595
  onClick: m,
3599
3596
  onDismiss: g
3600
3597
  }) => {
3601
- const u = we(e), f = e === "composer" && !!g, c = Rr({
3598
+ const u = we(e), f = e === "composer" && !!g, c = Lr({
3602
3599
  src: t,
3603
3600
  filename: s,
3604
3601
  fileSize: a,
@@ -3610,7 +3607,7 @@ const Rr = ({
3610
3607
  const x = c[v];
3611
3608
  if (!x) return;
3612
3609
  const w = x.filename ?? Q(x.src);
3613
- gn(x.src, w);
3610
+ bn(x.src, w);
3614
3611
  };
3615
3612
  if (c.length === 0)
3616
3613
  return null;
@@ -3633,7 +3630,7 @@ const Rr = ({
3633
3630
  groupPosition: d,
3634
3631
  "data-testid": "file-attachment",
3635
3632
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
3636
- Lr,
3633
+ Pr,
3637
3634
  {
3638
3635
  variant: u,
3639
3636
  item: v,
@@ -3645,16 +3642,16 @@ const Rr = ({
3645
3642
  )) })
3646
3643
  }
3647
3644
  );
3648
- }, Pr = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), zr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Or = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Fr = {
3649
- Composer: Pr,
3645
+ }, Or = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), zr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), $r = {
3646
+ Composer: Or,
3650
3647
  Sent: zr,
3651
- Received: Or
3648
+ Received: Fr
3652
3649
  }, rt = ({
3653
3650
  onPrev: e,
3654
3651
  onNext: t,
3655
3652
  prevLabel: s = "Previous",
3656
3653
  nextLabel: a = "Next"
3657
- }) => /* @__PURE__ */ h(re, { children: [
3654
+ }) => /* @__PURE__ */ h(ne, { children: [
3658
3655
  /* @__PURE__ */ n(
3659
3656
  "button",
3660
3657
  {
@@ -3662,7 +3659,7 @@ const Rr = ({
3662
3659
  onClick: e,
3663
3660
  "aria-label": s,
3664
3661
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3665
- children: /* @__PURE__ */ n(Ts, { size: 20, weight: "bold", "aria-hidden": !0 })
3662
+ children: /* @__PURE__ */ n(As, { size: 20, weight: "bold", "aria-hidden": !0 })
3666
3663
  }
3667
3664
  ),
3668
3665
  /* @__PURE__ */ n(
@@ -3672,10 +3669,10 @@ const Rr = ({
3672
3669
  onClick: t,
3673
3670
  "aria-label": a,
3674
3671
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3675
- children: /* @__PURE__ */ n(je, { size: 20, weight: "bold", "aria-hidden": !0 })
3672
+ children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3676
3673
  }
3677
3674
  )
3678
- ] }), bn = ({
3675
+ ] }), pn = ({
3679
3676
  url: e,
3680
3677
  filename: t,
3681
3678
  variant: s = "pill",
@@ -3684,9 +3681,9 @@ const Rr = ({
3684
3681
  tone: i = "dark",
3685
3682
  onTriggered: o
3686
3683
  }) => {
3687
- const [l, d] = z(!1), m = H(
3684
+ const [l, d] = O(!1), m = q(
3688
3685
  (c) => {
3689
- c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3686
+ c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3690
3687
  }).finally(() => {
3691
3688
  d(!1), o == null || o();
3692
3689
  }));
@@ -3760,20 +3757,20 @@ const Rr = ({
3760
3757
  ]
3761
3758
  }
3762
3759
  );
3763
- }, Oe = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
3760
+ }, Fe = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
3764
3761
  length: e,
3765
3762
  initialIndex: t,
3766
3763
  open: s
3767
3764
  }) => {
3768
- const a = Oe(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3765
+ const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3769
3766
  J(() => {
3770
- s && i(Oe(t, 0, Math.max(e - 1, 0)));
3767
+ s && i(Fe(t, 0, Math.max(e - 1, 0)));
3771
3768
  }, [s, t, e]), J(() => {
3772
- i((d) => Oe(d, 0, Math.max(e - 1, 0)));
3769
+ i((d) => Fe(d, 0, Math.max(e - 1, 0)));
3773
3770
  }, [e]);
3774
- const o = H(() => {
3771
+ const o = q(() => {
3775
3772
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3776
- }, [e]), l = H(() => {
3773
+ }, [e]), l = q(() => {
3777
3774
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3778
3775
  }, [e]);
3779
3776
  return J(() => {
@@ -3875,7 +3872,7 @@ const Rr = ({
3875
3872
  ]
3876
3873
  }
3877
3874
  );
3878
- }, pn = ({
3875
+ }, vn = ({
3879
3876
  open: e,
3880
3877
  items: t,
3881
3878
  initialIndex: s = 0,
@@ -3897,7 +3894,7 @@ const Rr = ({
3897
3894
  ariaLabel: d,
3898
3895
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
3899
3896
  actions: /* @__PURE__ */ n(
3900
- bn,
3897
+ pn,
3901
3898
  {
3902
3899
  url: l.src,
3903
3900
  filename: d,
@@ -3931,7 +3928,7 @@ const Rr = ({
3931
3928
  ]
3932
3929
  }
3933
3930
  ) : null;
3934
- }, $r = "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 = ({
3931
+ }, Br = "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 = ({
3935
3932
  tiles: e,
3936
3933
  onTileActivate: t,
3937
3934
  maxVisible: s = 4,
@@ -3940,7 +3937,7 @@ const Rr = ({
3940
3937
  const r = e.length;
3941
3938
  if (r === 0) return null;
3942
3939
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3943
- const u = y($r, "h-full w-full");
3940
+ const u = y(Br, "h-full w-full");
3944
3941
  return t ? /* @__PURE__ */ h(
3945
3942
  "button",
3946
3943
  {
@@ -4002,14 +3999,14 @@ const Rr = ({
4002
3999
  }
4003
4000
  );
4004
4001
  }, Ne = (e) => {
4005
- const [t, s] = z(!1), [a, r] = z(0), i = H(
4002
+ const [t, s] = O(!1), [a, r] = O(0), i = q(
4006
4003
  (l) => {
4007
4004
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4008
4005
  },
4009
4006
  [e]
4010
- ), o = H(() => s(!1), []);
4007
+ ), o = q(() => s(!1), []);
4011
4008
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4012
- }, Br = (e, t, s, a) => ({
4009
+ }, jr = (e, t, s, a) => ({
4013
4010
  ariaLabel: `Open image ${t + 1} of ${s}`,
4014
4011
  content: /* @__PURE__ */ n(
4015
4012
  "img",
@@ -4024,15 +4021,15 @@ const Rr = ({
4024
4021
  className: "absolute inset-0 size-full rounded-md object-cover"
4025
4022
  }
4026
4023
  )
4027
- }), jr = ({
4024
+ }), Vr = ({
4028
4025
  src: e,
4029
4026
  alt: t,
4030
4027
  items: s
4031
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], xn = (e, t) => e.map((s, a) => ({
4028
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
4032
4029
  src: s.src,
4033
4030
  alt: s.alt,
4034
4031
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4035
- })), Vr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4032
+ })), Ur = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4036
4033
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
4037
4034
  r
4038
4035
  );
@@ -4059,16 +4056,16 @@ const Rr = ({
4059
4056
  ),
4060
4057
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
4061
4058
  /* @__PURE__ */ n(
4062
- pn,
4059
+ vn,
4063
4060
  {
4064
4061
  open: o,
4065
- items: xn([{ src: e, alt: t }], s),
4062
+ items: wn([{ src: e, alt: t }], s),
4066
4063
  initialIndex: l,
4067
4064
  onClose: m
4068
4065
  }
4069
4066
  )
4070
4067
  ] });
4071
- }, wn = ({
4068
+ }, Nn = ({
4072
4069
  state: e,
4073
4070
  src: t,
4074
4071
  alt: s,
@@ -4079,13 +4076,13 @@ const Rr = ({
4079
4076
  loading: l = "lazy",
4080
4077
  onClick: d
4081
4078
  }) => {
4082
- const m = jr({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = Ne(
4079
+ const m = Vr({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = Ne(
4083
4080
  d
4084
4081
  );
4085
4082
  if (m.length === 0)
4086
4083
  return null;
4087
4084
  const N = m.map(
4088
- (v, x) => Br(v, x, m.length, l)
4085
+ (v, x) => jr(v, x, m.length, l)
4089
4086
  );
4090
4087
  return /* @__PURE__ */ h(
4091
4088
  ve,
@@ -4095,12 +4092,12 @@ const Rr = ({
4095
4092
  groupPosition: o,
4096
4093
  "data-testid": "image-attachment",
4097
4094
  children: [
4098
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: N, onTileActivate: c }) }),
4095
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: N, onTileActivate: c }) }),
4099
4096
  /* @__PURE__ */ n(
4100
- pn,
4097
+ vn,
4101
4098
  {
4102
4099
  open: u,
4103
- items: xn(m, a),
4100
+ items: wn(m, a),
4104
4101
  initialIndex: f,
4105
4102
  onClose: b
4106
4103
  }
@@ -4108,11 +4105,11 @@ const Rr = ({
4108
4105
  ]
4109
4106
  }
4110
4107
  );
4111
- }, Ur = (e) => /* @__PURE__ */ n(Vr, { ...e }), Gr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Hr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Yr = {
4112
- Composer: Ur,
4113
- Sent: Gr,
4114
- Received: Hr
4115
- }, qr = ({
4108
+ }, Gr = (e) => /* @__PURE__ */ n(Ur, { ...e }), Hr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), qr = {
4109
+ Composer: Gr,
4110
+ Sent: Hr,
4111
+ Received: Yr
4112
+ }, Wr = ({
4116
4113
  open: e,
4117
4114
  items: t,
4118
4115
  initialIndex: s = 0,
@@ -4126,7 +4123,7 @@ const Rr = ({
4126
4123
  () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "document"),
4127
4124
  [l]
4128
4125
  ), m = te(
4129
- () => l ? Wr(l.src) : void 0,
4126
+ () => l ? Xr(l.src) : void 0,
4130
4127
  [l]
4131
4128
  );
4132
4129
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4160,16 +4157,16 @@ const Rr = ({
4160
4157
  ]
4161
4158
  }
4162
4159
  );
4163
- }, Wr = (e) => {
4160
+ }, Xr = (e) => {
4164
4161
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4165
4162
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4166
- }, Xr = ({
4163
+ }, Kr = ({
4167
4164
  src: e,
4168
4165
  filename: t,
4169
4166
  fileSize: s,
4170
4167
  title: a,
4171
4168
  items: r
4172
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Kr = ({
4169
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Jr = ({
4173
4170
  variant: e,
4174
4171
  item: t,
4175
4172
  index: s,
@@ -4178,7 +4175,7 @@ const Rr = ({
4178
4175
  }) => {
4179
4176
  const i = t.filename ?? Q(t.src);
4180
4177
  return /* @__PURE__ */ n(
4181
- fn,
4178
+ gn,
4182
4179
  {
4183
4180
  variant: e,
4184
4181
  filename: i,
@@ -4202,7 +4199,7 @@ const Rr = ({
4202
4199
  onClick: d,
4203
4200
  onDismiss: m
4204
4201
  }) => {
4205
- const g = we(e), u = Xr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ne(
4202
+ const g = we(e), u = Kr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ne(
4206
4203
  d
4207
4204
  ), v = e === "composer" && !!m;
4208
4205
  if (u.length === 0)
@@ -4221,7 +4218,7 @@ const Rr = ({
4221
4218
  children: [
4222
4219
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, M) => {
4223
4220
  const A = w.filename ?? Q(w.src), S = v && M === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4224
- bn,
4221
+ pn,
4225
4222
  {
4226
4223
  url: w.src,
4227
4224
  filename: A,
@@ -4231,7 +4228,7 @@ const Rr = ({
4231
4228
  }
4232
4229
  );
4233
4230
  return /* @__PURE__ */ n(
4234
- Kr,
4231
+ Jr,
4235
4232
  {
4236
4233
  variant: g,
4237
4234
  item: w,
@@ -4243,7 +4240,7 @@ const Rr = ({
4243
4240
  );
4244
4241
  }) }),
4245
4242
  /* @__PURE__ */ n(
4246
- qr,
4243
+ Wr,
4247
4244
  {
4248
4245
  open: f,
4249
4246
  items: x,
@@ -4254,11 +4251,11 @@ const Rr = ({
4254
4251
  ]
4255
4252
  }
4256
4253
  );
4257
- }, Jr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Zr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Qr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ei = {
4258
- Composer: Jr,
4259
- Sent: Zr,
4260
- Received: Qr
4261
- }, Nn = ({
4254
+ }, Zr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Qr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ti = {
4255
+ Composer: Zr,
4256
+ Sent: Qr,
4257
+ Received: ei
4258
+ }, _n = ({
4262
4259
  open: e,
4263
4260
  items: t,
4264
4261
  initialIndex: s = 0,
@@ -4308,7 +4305,7 @@ const Rr = ({
4308
4305
  ]
4309
4306
  }
4310
4307
  ) : null;
4311
- }, ti = () => /* @__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($e, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
4308
+ }, ni = () => /* @__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 = ({
4312
4309
  item: e,
4313
4310
  index: t
4314
4311
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4330,23 +4327,23 @@ const Rr = ({
4330
4327
  "aria-hidden": !0
4331
4328
  }
4332
4329
  ) }),
4333
- /* @__PURE__ */ n(ti, {})
4334
- ] }), ni = (e, t, s) => ({
4330
+ /* @__PURE__ */ n(ni, {})
4331
+ ] }), si = (e, t, s) => ({
4335
4332
  ariaLabel: `Play video ${t + 1} of ${s}`,
4336
- content: /* @__PURE__ */ n(_n, { item: e, index: t })
4337
- }), si = ({
4333
+ content: /* @__PURE__ */ n(yn, { item: e, index: t })
4334
+ }), ai = ({
4338
4335
  src: e,
4339
4336
  poster: t,
4340
4337
  mimeType: s,
4341
4338
  preload: a,
4342
4339
  items: r
4343
- }) => 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) => ({
4340
+ }) => 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) => ({
4344
4341
  src: s.src,
4345
4342
  poster: s.poster,
4346
4343
  mimeType: s.mimeType,
4347
4344
  preload: s.preload,
4348
4345
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4349
- })), ai = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4346
+ })), ri = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4350
4347
  const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ne(
4351
4348
  i
4352
4349
  );
@@ -4358,15 +4355,15 @@ const Rr = ({
4358
4355
  onClick: () => m(0),
4359
4356
  "aria-label": "Play video",
4360
4357
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4361
- children: /* @__PURE__ */ n(_n, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4358
+ children: /* @__PURE__ */ n(yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4362
4359
  }
4363
4360
  ),
4364
4361
  o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
4365
4362
  /* @__PURE__ */ n(
4366
- Nn,
4363
+ _n,
4367
4364
  {
4368
4365
  open: l,
4369
- items: yn(
4366
+ items: Cn(
4370
4367
  [{ src: e, poster: t, mimeType: s, preload: r }],
4371
4368
  a
4372
4369
  ),
@@ -4375,7 +4372,7 @@ const Rr = ({
4375
4372
  }
4376
4373
  )
4377
4374
  ] });
4378
- }, Cn = ({
4375
+ }, kn = ({
4379
4376
  state: e,
4380
4377
  src: t,
4381
4378
  poster: s,
@@ -4387,13 +4384,13 @@ const Rr = ({
4387
4384
  preload: d,
4388
4385
  onClick: m
4389
4386
  }) => {
4390
- const g = si({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ne(
4387
+ const g = ai({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ne(
4391
4388
  m
4392
4389
  );
4393
4390
  if (g.length === 0)
4394
4391
  return null;
4395
4392
  const v = g.map(
4396
- (x, w) => ni(x, w, g.length)
4393
+ (x, w) => si(x, w, g.length)
4397
4394
  );
4398
4395
  return /* @__PURE__ */ h(
4399
4396
  ve,
@@ -4404,7 +4401,7 @@ const Rr = ({
4404
4401
  "data-testid": "video-attachment",
4405
4402
  children: [
4406
4403
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4407
- vn,
4404
+ xn,
4408
4405
  {
4409
4406
  tiles: v,
4410
4407
  onTileActivate: b,
@@ -4412,10 +4409,10 @@ const Rr = ({
4412
4409
  }
4413
4410
  ) }),
4414
4411
  /* @__PURE__ */ n(
4415
- Nn,
4412
+ _n,
4416
4413
  {
4417
4414
  open: f,
4418
- items: yn(g, r),
4415
+ items: Cn(g, r),
4419
4416
  initialIndex: c,
4420
4417
  onClose: N
4421
4418
  }
@@ -4423,17 +4420,17 @@ const Rr = ({
4423
4420
  ]
4424
4421
  }
4425
4422
  );
4426
- }, ri = (e) => /* @__PURE__ */ n(ai, { ...e }), ii = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), oi = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), li = {
4427
- Composer: ri,
4428
- Sent: ii,
4429
- Received: oi
4430
- }, Ci = {
4431
- Image: Yr,
4432
- Video: li,
4433
- Audio: kr,
4434
- Pdf: ei,
4435
- File: Fr
4436
- }, ci = ({
4423
+ }, ii = (e) => /* @__PURE__ */ n(ri, { ...e }), oi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), ci = {
4424
+ Composer: ii,
4425
+ Sent: oi,
4426
+ Received: li
4427
+ }, ki = {
4428
+ Image: qr,
4429
+ Video: ci,
4430
+ Audio: Er,
4431
+ Pdf: ti,
4432
+ File: $r
4433
+ }, di = ({
4437
4434
  question: e,
4438
4435
  onClick: t,
4439
4436
  loading: s = !1,
@@ -4455,7 +4452,7 @@ const Rr = ({
4455
4452
  ),
4456
4453
  children: e
4457
4454
  }
4458
- ), ki = ({
4455
+ ), Ei = ({
4459
4456
  faqs: e,
4460
4457
  onFaqClick: t,
4461
4458
  loadingFaqId: s,
@@ -4467,7 +4464,7 @@ const Rr = ({
4467
4464
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4468
4465
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4469
4466
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4470
- ne,
4467
+ se,
4471
4468
  {
4472
4469
  id: o || "account",
4473
4470
  name: o || "Account",
@@ -4484,7 +4481,7 @@ const Rr = ({
4484
4481
  children: [
4485
4482
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4486
4483
  l.map((d) => /* @__PURE__ */ n(
4487
- ci,
4484
+ di,
4488
4485
  {
4489
4486
  question: d.question,
4490
4487
  onClick: () => t(d.id),
@@ -4499,37 +4496,37 @@ const Rr = ({
4499
4496
  };
4500
4497
  export {
4501
4498
  en as A,
4502
- js as B,
4503
- Ha as C,
4504
- Ms as D,
4505
- ki as F,
4506
- _i as L,
4507
- xi as M,
4499
+ Vs as B,
4500
+ Ya as C,
4501
+ Ds as D,
4502
+ Ei as F,
4503
+ yi as L,
4504
+ wi as M,
4508
4505
  ye as a,
4509
- ne as b,
4510
- tr as c,
4511
- dn as d,
4512
- wi as e,
4513
- ci as f,
4514
- se as g,
4506
+ se as b,
4507
+ nr as c,
4508
+ un as d,
4509
+ Ni as e,
4510
+ di as f,
4511
+ ae as g,
4515
4512
  Ft as h,
4516
- Ci as i,
4517
- wa as j,
4518
- vi as k,
4519
- Ni as l,
4520
- Tr as m,
4521
- Er as n,
4522
- Qa as o,
4523
- Sr as p,
4513
+ ki as i,
4514
+ Na as j,
4515
+ xi as k,
4516
+ _i as l,
4517
+ Ar as m,
4518
+ Ir as n,
4519
+ er as o,
4520
+ Tr as p,
4524
4521
  Kt as q,
4525
4522
  ce as r,
4526
4523
  sn as s,
4527
- Rs as t,
4528
- yi as u,
4529
- Vs as v,
4524
+ Ls as t,
4525
+ Ci as u,
4526
+ Us as v,
4530
4527
  Ze as w,
4531
4528
  Qe as x,
4532
- Se as y,
4533
- fa as z
4529
+ Te as y,
4530
+ ga as z
4534
4531
  };
4535
- //# sourceMappingURL=index-BmCc1-F3.js.map
4532
+ //# sourceMappingURL=index-CJEl_fID.js.map