@linktr.ee/messaging-react 2.4.1 → 2.4.2

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 (34) hide show
  1. package/dist/{Card-Ct_Vj2M-.js → Card-B8CGfnPN.js} +3 -3
  2. package/dist/{Card-Ct_Vj2M-.js.map → Card-B8CGfnPN.js.map} +1 -1
  3. package/dist/{Card-D0hMivle.cjs → Card-BFTHMj8n.cjs} +2 -2
  4. package/dist/{Card-D0hMivle.cjs.map → Card-BFTHMj8n.cjs.map} +1 -1
  5. package/dist/{Card-C3jo2jEu.cjs → Card-CwFkVePn.cjs} +2 -2
  6. package/dist/{Card-C3jo2jEu.cjs.map → Card-CwFkVePn.cjs.map} +1 -1
  7. package/dist/{Card-CwnMzWRr.js → Card-D8Z8WnS6.js} +2 -2
  8. package/dist/{Card-CwnMzWRr.js.map → Card-D8Z8WnS6.js.map} +1 -1
  9. package/dist/{Card-d7-NkNG3.cjs → Card-sogfIdhf.cjs} +2 -2
  10. package/dist/{Card-d7-NkNG3.cjs.map → Card-sogfIdhf.cjs.map} +1 -1
  11. package/dist/{Card-DNlAktyj.js → Card-tGCMHgKp.js} +2 -2
  12. package/dist/{Card-DNlAktyj.js.map → Card-tGCMHgKp.js.map} +1 -1
  13. package/dist/{LockedThumbnail-B11obbIY.cjs → LockedThumbnail-DLtrbU8H.cjs} +2 -2
  14. package/dist/{LockedThumbnail-B11obbIY.cjs.map → LockedThumbnail-DLtrbU8H.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-CY115EyU.js → LockedThumbnail-WG8CysWx.js} +2 -2
  16. package/dist/{LockedThumbnail-CY115EyU.js.map → LockedThumbnail-WG8CysWx.js.map} +1 -1
  17. package/dist/{index-CeHWbIiy.js → index-C541s_4h.js} +595 -588
  18. package/dist/index-C541s_4h.js.map +1 -0
  19. package/dist/index-DYLdOjSj.cjs +2 -0
  20. package/dist/index-DYLdOjSj.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +17 -2
  23. package/dist/index.js +1 -1
  24. package/package.json +1 -1
  25. package/src/components/ChannelView.test.tsx +58 -2
  26. package/src/components/ChannelView.tsx +10 -3
  27. package/src/components/CustomMessage/index.tsx +1 -1
  28. package/src/components/LinkAttachment/LinkAttachment.test.tsx +35 -1
  29. package/src/components/LinkAttachment/components/Sent/Card.tsx +66 -25
  30. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +4 -3
  31. package/src/types.ts +8 -2
  32. package/dist/index-CBceLyrt.cjs +0 -2
  33. package/dist/index-CBceLyrt.cjs.map +0 -1
  34. package/dist/index-CeHWbIiy.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as n, jsxs as m, Fragment as ie } from "react/jsx-runtime";
2
2
  import y from "classnames";
3
- import P, { createContext as Ze, useContext as Ke, useCallback as U, useState as z, useRef as Z, useEffect as X, useMemo as re, Suspense as Je } from "react";
4
- import { StreamChatService as En } from "@linktr.ee/messaging-core";
5
- import { Chat as In, ChannelList as Sn, DateSeparator as Tn, useChannelStateContext as me, useChatContext as Qe, areMessageUIPropsEqual as Mn, useMessageReminder as An, useComponentContext as Vt, Attachment as Dn, EditMessageModal as Rn, MessageBlocked as Ln, MessageBouncePrompt as Fn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as Pn, ReminderNotification as Bn, StreamedMessageText as $n, messageHasAttachments as jn, messageHasReactions as Un, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as At, Poll as Wn, MessageErrorIcon as qn, useMessageContext as Le, useTranslationContext as Xn, useMessageComposer as Zn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, SimpleAttachmentSelector as ts, QuotedMessagePreview as ns, AttachmentPreviewList as ss, TextareaComposer as as, MessageTimestamp as ze, AIStates as Pe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds } from "stream-chat-react";
6
- import { StarIcon as Ge, GiftIcon as us, XIcon as xe, SpinnerGapIcon as Be, SignOutIcon as ms, ProhibitInsetIcon as Dt, FlagIcon as hs, FileIcon as Gt, ImageIcon as fs, SpeakerHighIcon as gs, VideoCameraIcon as Ht, FileMdIcon as bs, FileTextIcon as ps, FileZipIcon as vs, FilePptIcon as xs, FileCsvIcon as ws, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as _s, CircleNotchIcon as pe, PlayIcon as He, PauseIcon as Cs, LinkIcon as ks, DownloadSimpleIcon as ve, ThumbsUpIcon as Es, ThumbsDownIcon as Is, ArrowUpIcon as Ss, SparkleIcon as Ye, ProhibitIcon as Ts, ArrowLeftIcon as Rt, CaretRightIcon as We, DotsThreeIcon as Lt, PencilSimpleIcon as Ms, CaretLeftIcon as As } from "@phosphor-icons/react";
7
- import { MessageActions as Ds, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
8
- import { LinkPreviewsManager as Ft } from "stream-chat";
9
- const Wt = Ze({
3
+ import B, { createContext as Ze, useContext as Ke, useCallback as U, useState as z, useRef as Z, useEffect as X, useMemo as re, Suspense as Je } from "react";
4
+ import { StreamChatService as In } from "@linktr.ee/messaging-core";
5
+ import { Chat as Sn, ChannelList as Tn, DateSeparator as Mn, useChannelStateContext as me, useChatContext as Qe, areMessageUIPropsEqual as An, useMessageReminder as Dn, useComponentContext as Gt, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Fn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as Pn, MessageRepliesCountButton as Bn, ReminderNotification as $n, StreamedMessageText as jn, messageHasAttachments as Un, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as Wn, MessageText as Dt, Poll as qn, MessageErrorIcon as Xn, useMessageContext as Le, useTranslationContext as Zn, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, SimpleAttachmentSelector as ns, QuotedMessagePreview as ss, AttachmentPreviewList as as, TextareaComposer as rs, MessageTimestamp as ze, AIStates as Pe, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us } from "stream-chat-react";
6
+ import { StarIcon as Ge, GiftIcon as ms, XIcon as xe, SpinnerGapIcon as Be, SignOutIcon as hs, ProhibitInsetIcon as Rt, FlagIcon as fs, FileIcon as Ht, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Yt, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as ys, FileDocIcon as _s, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as He, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, ThumbsUpIcon as Is, ThumbsDownIcon as Ss, ArrowUpIcon as Ts, SparkleIcon as Ye, ProhibitIcon as Ms, ArrowLeftIcon as Lt, CaretRightIcon as We, DotsThreeIcon as Ft, PencilSimpleIcon as As, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
+ import { MessageActions as Rs, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
8
+ import { LinkPreviewsManager as Ot } from "stream-chat";
9
+ const qt = Ze({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Wt = Ze({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), et = () => Ke(Wt), yi = ({
19
+ }), et = () => Ke(qt), yi = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -25,8 +25,8 @@ const Wt = Ze({
25
25
  debug: i = !1
26
26
  }) => {
27
27
  const l = U(
28
- (T, ...F) => {
29
- i && console.log(`🔥 [MessagingProvider] ${T}`, ...F);
28
+ (T, ...O) => {
29
+ i && console.log(`🔥 [MessagingProvider] ${T}`, ...O);
30
30
  },
31
31
  [i]
32
32
  );
@@ -80,24 +80,24 @@ const Wt = Ze({
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
81
  serviceConfigChanged: w.current.serviceConfig !== s
82
82
  });
83
- const F = new En({
83
+ const O = new In({
84
84
  ...s,
85
85
  apiKey: a,
86
86
  debug: i
87
87
  });
88
- return d(F), l("✅ SERVICE SET", {
88
+ return d(O), l("✅ SERVICE SET", {
89
89
  renderCount: T,
90
- serviceInstance: !!F
90
+ serviceInstance: !!O
91
91
  }), () => {
92
92
  l("🧹 SERVICE CLEANUP", {
93
93
  renderCount: T,
94
94
  reason: "Effect cleanup"
95
- }), F.disconnectUser().catch(console.error);
95
+ }), O.disconnectUser().catch(console.error);
96
96
  };
97
97
  }, [a, s, i, l]);
98
98
  const I = Z(null);
99
99
  X(() => {
100
- var F, M;
100
+ var O, M;
101
101
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!o,
103
103
  hasUser: !!t,
@@ -113,7 +113,7 @@ const Wt = Ze({
113
113
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
114
114
  return;
115
115
  }
116
- if (((F = I.current) == null ? void 0 : F.serviceId) === o && ((M = I.current) == null ? void 0 : M.userId) === t.id) {
116
+ if (((O = I.current) == null ? void 0 : O.serviceId) === o && ((M = I.current) == null ? void 0 : M.userId) === t.id) {
117
117
  l(
118
118
  "⚠️ USER CONNECTION SKIPPED",
119
119
  "Already connected this user with this service"
@@ -124,13 +124,13 @@ const Wt = Ze({
124
124
  l("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, b(!0), v(null);
125
125
  try {
126
126
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
127
- const R = await o.connectUser(t);
128
- g(R), f(!0), I.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
127
+ const L = await o.connectUser(t);
128
+ g(L), f(!0), I.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
129
  userId: t.id,
130
- clientId: R.userID
130
+ clientId: L.userID
131
131
  });
132
- } catch (R) {
133
- const A = R instanceof Error ? R.message : "Connection failed";
132
+ } catch (L) {
133
+ const A = L instanceof Error ? L.message : "Connection failed";
134
134
  v(A), l("❌ USER CONNECTION ERROR", {
135
135
  userId: t.id,
136
136
  error: A
@@ -168,15 +168,15 @@ const Wt = Ze({
168
168
  const T = await o.connectUser(t);
169
169
  g(T), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
170
  } catch (T) {
171
- const F = T instanceof Error ? T.message : "Refresh failed";
172
- v(F), l("❌ CONNECTION REFRESH ERROR", {
171
+ const O = T instanceof Error ? T.message : "Refresh failed";
172
+ v(O), l("❌ CONNECTION REFRESH ERROR", {
173
173
  userId: t.id,
174
- error: F
174
+ error: O
175
175
  });
176
176
  } finally {
177
177
  b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
178
178
  }
179
- }, [o, t, l]), D = P.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [o, t, l]), R = B.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!o,
181
181
  hasClient: !!h,
182
182
  isConnected: u,
@@ -206,9 +206,9 @@ const Wt = Ze({
206
206
  return l("🔄 RENDER END", {
207
207
  renderCount: E.current,
208
208
  willRenderChat: !!(h && u),
209
- contextValueReady: !!D
210
- }), /* @__PURE__ */ n(Wt.Provider, { value: D, children: h && u ? /* @__PURE__ */ n(
211
- In,
209
+ contextValueReady: !!R
210
+ }), /* @__PURE__ */ n(qt.Provider, { value: R, children: h && u ? /* @__PURE__ */ n(
211
+ Sn,
212
212
  {
213
213
  client: h,
214
214
  customClasses: {
@@ -217,21 +217,21 @@ const Wt = Ze({
217
217
  children: e
218
218
  }
219
219
  ) : e });
220
- }, Rs = () => et();
221
- function Ls(e) {
220
+ }, Ls = () => et();
221
+ function Fs(e) {
222
222
  const t = e.state.pending_messages;
223
223
  if (t != null && t.length)
224
224
  for (const s of t)
225
225
  e.state.addMessageSorted(s.message);
226
226
  }
227
- const qt = P.createContext({
227
+ const Xt = B.createContext({
228
228
  selectedChannel: void 0,
229
229
  onChannelSelect: () => {
230
230
  },
231
231
  debug: !1,
232
232
  renderMessagePreview: void 0,
233
233
  viewerLanguage: void 0
234
- }), Fs = qt.Provider, Os = () => P.useContext(qt), Xt = (e) => {
234
+ }), Os = Xt.Provider, zs = () => B.useContext(Xt), Zt = (e) => {
235
235
  var a, r;
236
236
  const [t, s] = z(
237
237
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -253,18 +253,18 @@ const qt = P.createContext({
253
253
  e.off("member.updated", i);
254
254
  };
255
255
  }, [e]), t;
256
- }, zs = (e, t) => {
256
+ }, Ps = (e, t) => {
257
257
  const s = new Date(
258
258
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
259
259
  ), r = new Date(
260
260
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
261
261
  ).getTime() - s.getTime();
262
262
  return Math.floor(r / (1e3 * 60 * 60 * 24));
263
- }, Ps = (e) => {
263
+ }, Bs = (e) => {
264
264
  const t = /* @__PURE__ */ new Date();
265
265
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
266
266
  return "Just now";
267
- const a = zs(e, t);
267
+ const a = Ps(e, t);
268
268
  return a === 0 ? e.toLocaleTimeString([], {
269
269
  hour: "numeric",
270
270
  minute: "2-digit",
@@ -275,29 +275,29 @@ const qt = P.createContext({
275
275
  year: "2-digit"
276
276
  });
277
277
  };
278
- function Bs(e) {
278
+ function $s(e) {
279
279
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
280
280
  }
281
- function Zt({
281
+ function Kt({
282
282
  message: e,
283
283
  viewerLanguage: t
284
284
  }) {
285
285
  var r;
286
- const s = e == null ? void 0 : e.text, a = Bs(t);
286
+ const s = e == null ? void 0 : e.text, a = $s(t);
287
287
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
288
288
  }
289
- const $s = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
290
- function js(e) {
291
- return $s.test(e.trim());
289
+ const js = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
290
+ function Us(e) {
291
+ return js.test(e.trim());
292
292
  }
293
- function Ot(e, t) {
293
+ function zt(e, t) {
294
294
  const s = e == null ? void 0 : e.trim();
295
- return !s || t && s === t ? !1 : !js(s);
295
+ return !s || t && s === t ? !1 : !Us(s);
296
296
  }
297
297
  function tt(e) {
298
- 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";
298
+ 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";
299
299
  }
300
- const zt = [
300
+ const Pt = [
301
301
  "🍎",
302
302
  // Apple
303
303
  "🍌",
@@ -325,7 +325,7 @@ const zt = [
325
325
  "🍈"
326
326
  // Melon
327
327
  ];
328
- function Us(e) {
328
+ function Vs(e) {
329
329
  let t = 0;
330
330
  for (let s = 0; s < e.length; s++) {
331
331
  const a = e.charCodeAt(s);
@@ -333,9 +333,9 @@ function Us(e) {
333
333
  }
334
334
  return Math.abs(t);
335
335
  }
336
- function Vs(e) {
337
- const s = Us(e) % zt.length;
338
- return zt[s];
336
+ function Gs(e) {
337
+ const s = Vs(e) % Pt.length;
338
+ return Pt[s];
339
339
  }
340
340
  const oe = ({
341
341
  id: e,
@@ -346,7 +346,7 @@ const oe = ({
346
346
  shape: i = "squircle",
347
347
  dmAgentEnabled: l = !1
348
348
  }) => {
349
- const o = Vs(e), h = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
349
+ const o = Gs(e), h = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
350
350
  borderRadius: "33%",
351
351
  cornerShape: "superellipse(1.3)"
352
352
  }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
@@ -411,7 +411,7 @@ const oe = ({
411
411
  ]
412
412
  }
413
413
  );
414
- }, Gs = ({ size: e = 15 }) => /* @__PURE__ */ n(
414
+ }, Hs = ({ size: e = 15 }) => /* @__PURE__ */ n(
415
415
  "svg",
416
416
  {
417
417
  width: e,
@@ -428,21 +428,21 @@ const oe = ({
428
428
  }
429
429
  )
430
430
  }
431
- ), Hs = (e) => {
431
+ ), Ys = (e) => {
432
432
  var t;
433
433
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
434
- }, Ys = (e) => {
434
+ }, Ws = (e) => {
435
435
  var t;
436
436
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
437
437
  }, Me = (e) => {
438
438
  var t;
439
439
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
440
- }, Ws = (e) => {
440
+ }, qs = (e) => {
441
441
  var t;
442
442
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
443
- }, Kt = (e) => Hs(e) || Ys(e), qs = (e) => {
443
+ }, Jt = (e) => Ys(e) || Ws(e), Xs = (e) => {
444
444
  var t;
445
- return Kt(e) && !((t = e.text) != null && t.trim());
445
+ return Jt(e) && !((t = e.text) != null && t.trim());
446
446
  }, $e = ({
447
447
  message: e,
448
448
  standalone: t = !1,
@@ -450,7 +450,7 @@ const oe = ({
450
450
  hasAttachment: a = !1
451
451
  }) => {
452
452
  var u;
453
- const r = Kt(e), i = Me(e);
453
+ const r = Jt(e), i = Me(e);
454
454
  if (!r && !i)
455
455
  return null;
456
456
  if (r) {
@@ -458,7 +458,7 @@ const oe = ({
458
458
  if (!f) return null;
459
459
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
460
460
  return /* @__PURE__ */ m("div", { className: c, children: [
461
- /* @__PURE__ */ n(us, { size: t ? 14 : 12 }),
461
+ /* @__PURE__ */ n(ms, { size: t ? 14 : 12 }),
462
462
  /* @__PURE__ */ n("span", { children: b })
463
463
  ] });
464
464
  }
@@ -466,7 +466,7 @@ const oe = ({
466
466
  "message-chatbot-indicator",
467
467
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
468
468
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
469
- ].join(" "), h = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(Gs, { size: l ? 12 : 15 }) });
469
+ ].join(" "), h = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(Hs, { size: l ? 12 : 15 }) });
470
470
  return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ m(ie, { children: [
471
471
  h,
472
472
  g
@@ -474,43 +474,43 @@ const oe = ({
474
474
  g,
475
475
  h
476
476
  ] }) });
477
- }, Jt = P.memo(
477
+ }, Qt = B.memo(
478
478
  ({ channel: e, unread: t }) => {
479
- var D, T, F;
479
+ var R, T, O;
480
480
  const {
481
481
  selectedChannel: s,
482
482
  onChannelSelect: a,
483
483
  debug: r,
484
484
  renderMessagePreview: i,
485
485
  viewerLanguage: l
486
- } = Os(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
486
+ } = zs(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
487
487
  e && a(e);
488
488
  }, h = (M) => {
489
- const R = M.key === "Enter" || M.key === " ", A = M.repeat;
490
- !R || A || (M.preventDefault(), d());
491
- }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
489
+ const L = M.key === "Enter" || M.key === " ", A = M.repeat;
490
+ !L || A || (M.preventDefault(), d());
491
+ }, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
492
492
  (M) => {
493
- var R, A;
494
- return ((R = M.user) == null ? void 0 : R.id) && M.user.id !== ((A = e == null ? void 0 : e._client) == null ? void 0 : A.userID);
493
+ var L, A;
494
+ return ((L = M.user) == null ? void 0 : L.id) && M.user.id !== ((A = e == null ? void 0 : e._client) == null ? void 0 : A.userID);
495
495
  }
496
496
  ), f = tt(u == null ? void 0 : u.user), c = (T = u == null ? void 0 : u.user) == null ? void 0 : T.image, b = (() => {
497
- var R;
498
- const M = (R = e == null ? void 0 : e.state) == null ? void 0 : R.messages;
497
+ var L;
498
+ const M = (L = e == null ? void 0 : e.state) == null ? void 0 : L.messages;
499
499
  if (M != null && M.length) {
500
500
  for (let A = M.length - 1; A >= 0; A--)
501
501
  if (M[A].type !== "system") return M[A];
502
502
  }
503
503
  })(), v = (() => {
504
- var G, k;
505
- const M = Zt({
504
+ var H, k;
505
+ const M = Kt({
506
506
  message: b,
507
507
  viewerLanguage: l
508
508
  });
509
509
  if (M) return M;
510
- if (((G = b == null ? void 0 : b.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_TIP") return "💵 Sent a tip";
510
+ if (((H = b == null ? void 0 : b.metadata) == null ? void 0 : H.custom_type) === "MESSAGE_TIP") return "💵 Sent a tip";
511
511
  const A = (k = b == null ? void 0 : b.attachments) == null ? void 0 : k[0];
512
512
  return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
513
- })(), N = b != null && b.created_at ? Ps(new Date(b.created_at)) : "", w = b ? Me(b) : !1, E = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, I = Xt(e), S = t ?? 0;
513
+ })(), N = b != null && b.created_at ? Bs(new Date(b.created_at)) : "", w = b ? Me(b) : !1, E = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, I = Zt(e), S = t ?? 0;
514
514
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
515
515
  channelId: e == null ? void 0 : e.id,
516
516
  isSelected: o,
@@ -535,7 +535,7 @@ const oe = ({
535
535
  /* @__PURE__ */ n(
536
536
  oe,
537
537
  {
538
- id: ((F = u == null ? void 0 : u.user) == null ? void 0 : F.id) || e.id || "unknown",
538
+ id: ((O = u == null ? void 0 : u.user) == null ? void 0 : O.id) || e.id || "unknown",
539
539
  name: f,
540
540
  image: c,
541
541
  size: 44,
@@ -570,8 +570,8 @@ const oe = ({
570
570
  );
571
571
  }
572
572
  );
573
- Jt.displayName = "CustomChannelPreview";
574
- const Xs = { last_message_at: -1 }, Qt = P.memo(
573
+ Qt.displayName = "CustomChannelPreview";
574
+ const Zs = { last_message_at: -1 }, en = B.memo(
575
575
  ({
576
576
  onChannelSelect: e,
577
577
  selectedChannel: t,
@@ -580,18 +580,18 @@ const Xs = { last_message_at: -1 }, Qt = P.memo(
580
580
  onMessageNew: r,
581
581
  onAddedToChannel: i,
582
582
  channelRenderFilterFn: l,
583
- sort: o = Xs,
583
+ sort: o = Zs,
584
584
  className: d,
585
585
  customEmptyStateIndicator: h,
586
586
  renderMessagePreview: g,
587
587
  viewerLanguage: u
588
588
  }) => {
589
- const f = P.useRef(0);
589
+ const f = B.useRef(0);
590
590
  f.current++;
591
- const { debug: c = !1 } = et(), b = P.useCallback(
591
+ const { debug: c = !1 } = et(), b = B.useCallback(
592
592
  (v) => {
593
593
  for (const N of v)
594
- Ls(N);
594
+ Fs(N);
595
595
  return l ? l(v) : v;
596
596
  },
597
597
  [l]
@@ -601,7 +601,7 @@ const Xs = { last_message_at: -1 }, Qt = P.memo(
601
601
  selectedChannelId: t == null ? void 0 : t.id,
602
602
  filters: s
603
603
  });
604
- const x = P.useMemo(
604
+ const x = B.useMemo(
605
605
  () => ({
606
606
  selectedChannel: t,
607
607
  onChannelSelect: e,
@@ -624,8 +624,8 @@ const Xs = { last_message_at: -1 }, Qt = P.memo(
624
624
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
625
625
  d
626
626
  ),
627
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Fs, { value: x, children: /* @__PURE__ */ n(
628
- Sn,
627
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Os, { value: x, children: /* @__PURE__ */ n(
628
+ Tn,
629
629
  {
630
630
  filters: s,
631
631
  sort: o,
@@ -634,7 +634,7 @@ const Xs = { last_message_at: -1 }, Qt = P.memo(
634
634
  onMessageNew: r,
635
635
  onAddedToChannel: i,
636
636
  channelRenderFilterFn: b,
637
- Preview: Jt,
637
+ Preview: Qt,
638
638
  EmptyStateIndicator: h
639
639
  },
640
640
  `${JSON.stringify(s)}:${JSON.stringify(o)}`
@@ -643,7 +643,7 @@ const Xs = { last_message_at: -1 }, Qt = P.memo(
643
643
  );
644
644
  }
645
645
  );
646
- Qt.displayName = "ChannelList";
646
+ en.displayName = "ChannelList";
647
647
  const Se = ({
648
648
  variant: e = "default",
649
649
  className: t,
@@ -662,7 +662,7 @@ const Se = ({
662
662
  children: s
663
663
  }
664
664
  );
665
- function Zs({ label: e, className: t, children: s, ...a }) {
665
+ function Ks({ label: e, className: t, children: s, ...a }) {
666
666
  return /* @__PURE__ */ m(
667
667
  "button",
668
668
  {
@@ -683,10 +683,10 @@ function Zs({ label: e, className: t, children: s, ...a }) {
683
683
  }
684
684
  );
685
685
  }
686
- function Ks({ onClick: e }) {
687
- return /* @__PURE__ */ n(Zs, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(xe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
686
+ function Js({ onClick: e }) {
687
+ return /* @__PURE__ */ n(Ks, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(xe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
688
688
  }
689
- const Js = ({
689
+ const Qs = ({
690
690
  dialogRef: e,
691
691
  onClose: t,
692
692
  participant: s,
@@ -702,47 +702,47 @@ const Js = ({
702
702
  customProfileContent: f,
703
703
  customChannelActions: c
704
704
  }) => {
705
- var V, $, L, Y;
706
- const { service: b, debug: x } = et(), [v, N] = z(!1), [w, E] = z(!1), [I, S] = z(!1), D = U(async () => {
705
+ var V, P, F, G;
706
+ const { service: b, debug: x } = et(), [v, N] = z(!1), [w, E] = z(!1), [I, S] = z(!1), R = U(async () => {
707
707
  var _;
708
708
  if (!(!b || !((_ = s == null ? void 0 : s.user) != null && _.id)))
709
709
  try {
710
710
  const p = (await b.getBlockedUsers()).some(
711
711
  (C) => {
712
- var H;
713
- return C.blocked_user_id === ((H = s == null ? void 0 : s.user) == null ? void 0 : H.id);
712
+ var Y;
713
+ return C.blocked_user_id === ((Y = s == null ? void 0 : s.user) == null ? void 0 : Y.id);
714
714
  }
715
715
  );
716
716
  N(p);
717
- } catch (O) {
717
+ } catch (D) {
718
718
  console.error(
719
719
  "[ChannelInfoDialog] Failed to check blocked status:",
720
- O
720
+ D
721
721
  );
722
722
  }
723
723
  }, [b, (V = s == null ? void 0 : s.user) == null ? void 0 : V.id]);
724
724
  X(() => {
725
- D();
726
- }, [D]);
725
+ R();
726
+ }, [R]);
727
727
  const T = async () => {
728
728
  var _;
729
729
  if (!w) {
730
730
  h == null || h(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), E(!0);
731
731
  try {
732
- const O = ((_ = r._client) == null ? void 0 : _.userID) ?? null;
733
- await r.hide(O, !1), l && await l(r), t();
734
- } catch (O) {
735
- console.error("[ChannelInfoDialog] Failed to leave conversation", O);
732
+ const D = ((_ = r._client) == null ? void 0 : _.userID) ?? null;
733
+ await r.hide(D, !1), l && await l(r), t();
734
+ } catch (D) {
735
+ console.error("[ChannelInfoDialog] Failed to leave conversation", D);
736
736
  } finally {
737
737
  E(!1);
738
738
  }
739
739
  }
740
- }, F = async () => {
741
- var _, O, p;
740
+ }, O = async () => {
741
+ var _, D, p;
742
742
  if (!(I || !b)) {
743
743
  g == null || g(), x && console.log("[ChannelInfoDialog] Block member", (_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), S(!0);
744
744
  try {
745
- await b.blockUser((O = s == null ? void 0 : s.user) == null ? void 0 : O.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
745
+ await b.blockUser((D = s == null ? void 0 : s.user) == null ? void 0 : D.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
746
746
  } catch (C) {
747
747
  console.error("[ChannelInfoDialog] Failed to block member", C);
748
748
  } finally {
@@ -750,18 +750,18 @@ const Js = ({
750
750
  }
751
751
  }
752
752
  }, M = async () => {
753
- var _, O, p;
753
+ var _, D, p;
754
754
  if (!(I || !b)) {
755
755
  g == null || g(), x && console.log("[ChannelInfoDialog] Unblock member", (_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), S(!0);
756
756
  try {
757
- await b.unBlockUser((O = s == null ? void 0 : s.user) == null ? void 0 : O.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
757
+ await b.unBlockUser((D = s == null ? void 0 : s.user) == null ? void 0 : D.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
758
758
  } catch (C) {
759
759
  console.error("[ChannelInfoDialog] Failed to unblock member", C);
760
760
  } finally {
761
761
  S(!1);
762
762
  }
763
763
  }
764
- }, R = () => {
764
+ }, L = () => {
765
765
  u == null || u(), t(), window.open(
766
766
  "https://linktr.ee/s/about/trust-center/report",
767
767
  "_blank",
@@ -769,7 +769,7 @@ const Js = ({
769
769
  );
770
770
  };
771
771
  if (!s) return null;
772
- const A = a ?? tt(s.user), G = ($ = s.user) == null ? void 0 : $.image, k = (L = s.user) == null ? void 0 : L.username, j = k ? `linktr.ee/${k}` : void 0, W = ((Y = s.user) == null ? void 0 : Y.id) || "unknown";
772
+ const A = a ?? tt(s.user), H = (P = s.user) == null ? void 0 : P.image, k = (F = s.user) == null ? void 0 : F.username, j = k ? `linktr.ee/${k}` : void 0, W = ((G = s.user) == null ? void 0 : G.id) || "unknown";
773
773
  return (
774
774
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
775
775
  /* @__PURE__ */ n(
@@ -784,7 +784,7 @@ const Js = ({
784
784
  children: /* @__PURE__ */ m("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: [
785
785
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
786
786
  /* @__PURE__ */ n("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
787
- /* @__PURE__ */ n(Ks, { onClick: t })
787
+ /* @__PURE__ */ n(Js, { onClick: t })
788
788
  ] }),
789
789
  /* @__PURE__ */ m("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
790
790
  /* @__PURE__ */ m(
@@ -799,7 +799,7 @@ const Js = ({
799
799
  {
800
800
  id: W,
801
801
  name: A,
802
- image: G,
802
+ image: H,
803
803
  size: 88,
804
804
  shape: "circle"
805
805
  }
@@ -835,7 +835,7 @@ const Js = ({
835
835
  disabled: w,
836
836
  "aria-busy": w,
837
837
  children: [
838
- w ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ms, { className: "h-5 w-5" }),
838
+ w ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
839
839
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
840
840
  ]
841
841
  }
@@ -847,24 +847,24 @@ const Js = ({
847
847
  disabled: I,
848
848
  "aria-busy": I,
849
849
  children: [
850
- I ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
850
+ I ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
851
851
  /* @__PURE__ */ n("span", { children: "Unblock" })
852
852
  ]
853
853
  }
854
854
  ) : /* @__PURE__ */ m(
855
855
  Se,
856
856
  {
857
- onClick: F,
857
+ onClick: O,
858
858
  disabled: I,
859
859
  "aria-busy": I,
860
860
  children: [
861
- I ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
861
+ I ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
862
862
  /* @__PURE__ */ n("span", { children: "Block" })
863
863
  ]
864
864
  }
865
865
  ) }),
866
- /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(Se, { variant: "danger", onClick: R, children: [
867
- /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
866
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(Se, { variant: "danger", onClick: L, children: [
867
+ /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
868
868
  /* @__PURE__ */ n("span", { children: "Report" })
869
869
  ] }) }),
870
870
  c
@@ -874,13 +874,13 @@ const Js = ({
874
874
  }
875
875
  )
876
876
  );
877
- }, Qs = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), qe = "vote_up", Xe = "vote_down";
878
- function ea(e) {
877
+ }, ea = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), qe = "vote_up", Xe = "vote_down";
878
+ function ta(e) {
879
879
  return e != null && e.length ? e.some((t) => t.type === Xe) ? "down" : e.some((t) => t.type === qe) ? "up" : null : null;
880
880
  }
881
- function ta(e) {
881
+ function na(e) {
882
882
  const { channel: t } = me(), { client: s } = Qe("useMessageVote"), a = re(
883
- () => ea(e.own_reactions),
883
+ () => ta(e.own_reactions),
884
884
  [e.own_reactions]
885
885
  ), r = U(async () => {
886
886
  if (s != null && s.userID)
@@ -905,13 +905,13 @@ function ta(e) {
905
905
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
906
906
  return { selected: a, voteUp: r, voteDown: i };
907
907
  }
908
- const na = P.lazy(() => import("./Card-DNlAktyj.js")), sa = P.lazy(() => import("./Card-CwnMzWRr.js")), aa = P.lazy(() => import("./Card-Ct_Vj2M-.js")), nt = () => /* @__PURE__ */ n(
908
+ const sa = B.lazy(() => import("./Card-tGCMHgKp.js")), aa = B.lazy(() => import("./Card-D8Z8WnS6.js")), ra = B.lazy(() => import("./Card-B8CGfnPN.js")), nt = () => /* @__PURE__ */ n(
909
909
  "div",
910
910
  {
911
911
  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)]",
912
912
  "aria-hidden": !0
913
913
  }
914
- ), ra = (e) => /* @__PURE__ */ n(Je, { fallback: /* @__PURE__ */ n(nt, {}), children: /* @__PURE__ */ n(na, { ...e }) }), en = (e) => /* @__PURE__ */ n(Je, { fallback: /* @__PURE__ */ n(nt, {}), children: /* @__PURE__ */ n(sa, { ...e }) }), tn = (e) => /* @__PURE__ */ n(Je, { fallback: /* @__PURE__ */ n(nt, {}), children: /* @__PURE__ */ n(aa, { ...e }) }), ia = en, oa = tn, Pt = { Composer: ra, Sent: en, Received: tn, Creator: ia, Visitor: oa }, la = [
914
+ ), ia = (e) => /* @__PURE__ */ n(Je, { fallback: /* @__PURE__ */ n(nt, {}), children: /* @__PURE__ */ n(sa, { ...e }) }), tn = (e) => /* @__PURE__ */ n(Je, { fallback: /* @__PURE__ */ n(nt, {}), children: /* @__PURE__ */ n(aa, { ...e }) }), nn = (e) => /* @__PURE__ */ n(Je, { fallback: /* @__PURE__ */ n(nt, {}), children: /* @__PURE__ */ n(ra, { ...e }) }), oa = tn, la = nn, Bt = { Composer: ia, Sent: tn, Received: nn, Creator: oa, Visitor: la }, ca = [
915
915
  [/pdf/, "pdf"],
916
916
  [/wordprocessingml|msword|\.doc/, "doc"],
917
917
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -924,39 +924,39 @@ const na = P.lazy(() => import("./Card-DNlAktyj.js")), sa = P.lazy(() => import(
924
924
  function le(e) {
925
925
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
926
926
  }
927
- function nn(e) {
928
- const t = la.find(
927
+ function sn(e) {
928
+ const t = ca.find(
929
929
  ([s]) => s.test(e)
930
930
  );
931
931
  return t ? t[1] : "generic";
932
932
  }
933
- const ca = {
934
- video: Ht,
935
- audio: gs,
936
- image: fs,
937
- document: Gt
938
- }, da = {
939
- pdf: _s,
940
- doc: ys,
941
- xls: Ns,
942
- csv: ws,
943
- ppt: xs,
944
- zip: vs,
945
- text: ps,
946
- markdown: bs,
947
- generic: Gt
933
+ const da = {
934
+ video: Yt,
935
+ audio: bs,
936
+ image: gs,
937
+ document: Ht
938
+ }, ua = {
939
+ pdf: Cs,
940
+ doc: _s,
941
+ xls: ys,
942
+ csv: Ns,
943
+ ppt: ws,
944
+ zip: xs,
945
+ text: vs,
946
+ markdown: ps,
947
+ generic: Ht
948
948
  };
949
- function ua(e) {
949
+ function ma(e) {
950
950
  const t = le(e);
951
- return t !== "document" ? ca[t] : da[nn(e)];
951
+ return t !== "document" ? da[t] : ua[sn(e)];
952
952
  }
953
953
  function ge(e, t) {
954
- return P.createElement(ua(e), t);
954
+ return B.createElement(ma(e), t);
955
955
  }
956
- const ma = (e) => {
956
+ const ha = (e) => {
957
957
  var t, s;
958
958
  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;
959
- }, ha = ({
959
+ }, fa = ({
960
960
  source: e,
961
961
  mimeType: t,
962
962
  poster: s,
@@ -968,23 +968,23 @@ const ma = (e) => {
968
968
  muted: d = !1,
969
969
  onContainerClick: h
970
970
  }) => {
971
- const g = le(t), u = Z(null), f = Z(null), c = Z(null), b = Z(r), [x, v] = z(a), [N, w] = z(0), [E, I] = z(!1), [S, D] = z(!1), [T, F] = z(!1), [M, R] = z(!1), [A, G] = z(!0), [k, j] = z(null), W = U(() => {
972
- F(!1), v(!0);
971
+ const g = le(t), u = Z(null), f = Z(null), c = Z(null), b = Z(r), [x, v] = z(a), [N, w] = z(0), [E, I] = z(!1), [S, R] = z(!1), [T, O] = z(!1), [M, L] = z(!1), [A, H] = z(!0), [k, j] = z(null), W = U(() => {
972
+ O(!1), v(!0);
973
973
  }, []), V = U((p) => {
974
974
  const C = f.current;
975
975
  if (!C) return 0;
976
- const H = C.getBoundingClientRect();
976
+ const Y = C.getBoundingClientRect();
977
977
  return Math.max(
978
978
  0,
979
- Math.min(1, (ma(p) - H.left) / H.width)
979
+ Math.min(1, (ha(p) - Y.left) / Y.width)
980
980
  );
981
- }, []), $ = U((p) => {
981
+ }, []), P = U((p) => {
982
982
  const C = u.current;
983
983
  C && C.duration && (C.currentTime = p * C.duration);
984
- }, []), L = (p) => {
984
+ }, []), F = (p) => {
985
985
  p.stopPropagation(), I(!0);
986
986
  const C = V(p);
987
- w(C), $(C);
987
+ w(C), P(C);
988
988
  };
989
989
  X(() => {
990
990
  r !== void 0 && r !== b.current && (b.current = r, v(r));
@@ -1003,25 +1003,25 @@ const ma = (e) => {
1003
1003
  }, [x, E]), X(() => {
1004
1004
  const p = u.current;
1005
1005
  p && (x ? p.play().catch((C) => {
1006
- v(!1), F(!0);
1006
+ v(!1), O(!0);
1007
1007
  }) : p.pause());
1008
1008
  }, [x]), X(() => {
1009
1009
  if (!E) return;
1010
- const p = (H) => w(V(H)), C = (H) => {
1011
- I(!1), $(V(H));
1010
+ const p = (Y) => w(V(Y)), C = (Y) => {
1011
+ I(!1), P(V(Y));
1012
1012
  };
1013
1013
  return window.addEventListener("mousemove", p), window.addEventListener("mouseup", C), window.addEventListener("touchmove", p, { passive: !0 }), window.addEventListener("touchend", C), () => {
1014
1014
  window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", p), window.removeEventListener("touchend", C);
1015
1015
  };
1016
- }, [E, V, $]);
1017
- const Y = k ? { aspectRatio: String(k) } : void 0, _ = k ? "" : " aspect-video", O = Math.round(N * 100);
1016
+ }, [E, V, P]);
1017
+ const G = k ? { aspectRatio: String(k) } : void 0, _ = k ? "" : " aspect-video", D = Math.round(N * 100);
1018
1018
  return /* @__PURE__ */ m(
1019
1019
  "div",
1020
1020
  {
1021
1021
  role: "button",
1022
1022
  tabIndex: 0,
1023
1023
  className: `relative cursor-pointer overflow-hidden bg-black ${_}`,
1024
- style: Y,
1024
+ style: G,
1025
1025
  onClick: (p) => {
1026
1026
  if (h) {
1027
1027
  h(p);
@@ -1059,12 +1059,12 @@ const ma = (e) => {
1059
1059
  loop: i,
1060
1060
  muted: d,
1061
1061
  style: { width: "100%", height: "100%" },
1062
- onLoadStart: () => R(!0),
1062
+ onLoadStart: () => L(!0),
1063
1063
  onCanPlay: () => {
1064
- R(!1), G(!1);
1064
+ L(!1), H(!1);
1065
1065
  },
1066
- onWaiting: () => R(!0),
1067
- onPlay: () => F(!1),
1066
+ onWaiting: () => L(!0),
1067
+ onPlay: () => O(!1),
1068
1068
  onEnded: () => {
1069
1069
  i || (v(!1), w(0));
1070
1070
  },
@@ -1079,12 +1079,12 @@ const ma = (e) => {
1079
1079
  muted: d,
1080
1080
  playsInline: !0,
1081
1081
  style: { width: "100%", height: "100%" },
1082
- onLoadStart: () => R(!0),
1082
+ onLoadStart: () => L(!0),
1083
1083
  onCanPlay: () => {
1084
- R(!1), G(!1);
1084
+ L(!1), H(!1);
1085
1085
  },
1086
- onWaiting: () => R(!0),
1087
- onPlay: () => F(!1),
1086
+ onWaiting: () => L(!0),
1087
+ onPlay: () => O(!1),
1088
1088
  onLoadedMetadata: () => {
1089
1089
  const p = u.current;
1090
1090
  p instanceof HTMLVideoElement && p.videoWidth && p.videoHeight && j(p.videoWidth / p.videoHeight);
@@ -1123,23 +1123,23 @@ const ma = (e) => {
1123
1123
  {
1124
1124
  role: "slider",
1125
1125
  "aria-label": "Playback position",
1126
- "aria-valuenow": O,
1126
+ "aria-valuenow": D,
1127
1127
  "aria-valuemin": 0,
1128
1128
  "aria-valuemax": 100,
1129
1129
  tabIndex: 0,
1130
1130
  ref: f,
1131
1131
  className: "relative flex h-4 w-full cursor-pointer items-center",
1132
- onMouseDown: L,
1133
- onTouchStart: L,
1132
+ onMouseDown: F,
1133
+ onTouchStart: F,
1134
1134
  onClick: (p) => p.stopPropagation(),
1135
1135
  onKeyDown: (p) => {
1136
- p.key === "ArrowRight" && $(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && $(Math.max(0, N - 0.05));
1136
+ p.key === "ArrowRight" && P(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && P(Math.max(0, N - 0.05));
1137
1137
  },
1138
1138
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
1139
1139
  "div",
1140
1140
  {
1141
1141
  className: "h-full rounded-full bg-white",
1142
- style: { width: `${O}%` }
1142
+ style: { width: `${D}%` }
1143
1143
  }
1144
1144
  ) })
1145
1145
  }
@@ -1154,7 +1154,7 @@ const ma = (e) => {
1154
1154
  },
1155
1155
  className: "shrink-0 text-white",
1156
1156
  "aria-label": x ? "Pause" : "Play",
1157
- children: x ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
1157
+ children: x ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
1158
1158
  }
1159
1159
  ),
1160
1160
  /* @__PURE__ */ m(
@@ -1162,19 +1162,19 @@ const ma = (e) => {
1162
1162
  {
1163
1163
  role: "slider",
1164
1164
  "aria-label": "Playback position",
1165
- "aria-valuenow": O,
1165
+ "aria-valuenow": D,
1166
1166
  "aria-valuemin": 0,
1167
1167
  "aria-valuemax": 100,
1168
1168
  tabIndex: 0,
1169
1169
  ref: f,
1170
1170
  className: "relative flex h-4 w-full cursor-pointer items-center",
1171
- onMouseDown: L,
1172
- onTouchStart: L,
1171
+ onMouseDown: F,
1172
+ onTouchStart: F,
1173
1173
  onClick: (p) => p.stopPropagation(),
1174
- onMouseEnter: () => D(!0),
1175
- onMouseLeave: () => D(!1),
1174
+ onMouseEnter: () => R(!0),
1175
+ onMouseLeave: () => R(!1),
1176
1176
  onKeyDown: (p) => {
1177
- p.key === "ArrowRight" && $(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && $(Math.max(0, N - 0.05));
1177
+ p.key === "ArrowRight" && P(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && P(Math.max(0, N - 0.05));
1178
1178
  },
1179
1179
  children: [
1180
1180
  /* @__PURE__ */ n(
@@ -1185,7 +1185,7 @@ const ma = (e) => {
1185
1185
  "div",
1186
1186
  {
1187
1187
  className: "h-full rounded-full bg-white",
1188
- style: { width: `${O}%` }
1188
+ style: { width: `${D}%` }
1189
1189
  }
1190
1190
  )
1191
1191
  }
@@ -1194,7 +1194,7 @@ const ma = (e) => {
1194
1194
  "div",
1195
1195
  {
1196
1196
  className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || E ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1197
- style: { left: `${O}%` }
1197
+ style: { left: `${D}%` }
1198
1198
  }
1199
1199
  )
1200
1200
  ]
@@ -1204,7 +1204,7 @@ const ma = (e) => {
1204
1204
  ]
1205
1205
  }
1206
1206
  );
1207
- }, Bt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", fa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", sn = ({
1207
+ }, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ga = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", an = ({
1208
1208
  mimeType: e,
1209
1209
  sourceUrl: t,
1210
1210
  thumbnailUrl: s,
@@ -1215,7 +1215,7 @@ const ma = (e) => {
1215
1215
  }) => {
1216
1216
  const o = le(e), [d, h] = z(!1);
1217
1217
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
1218
- ha,
1218
+ fa,
1219
1219
  {
1220
1220
  source: t,
1221
1221
  mimeType: e,
@@ -1262,11 +1262,11 @@ const ma = (e) => {
1262
1262
  {
1263
1263
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1264
1264
  children: ge(e, {
1265
- className: Bt(r),
1265
+ className: $t(r),
1266
1266
  weight: "regular"
1267
1267
  })
1268
1268
  }
1269
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${fa(r)}`, children: /* @__PURE__ */ n(
1269
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ga(r)}`, children: /* @__PURE__ */ n(
1270
1270
  "img",
1271
1271
  {
1272
1272
  src: s,
@@ -1279,12 +1279,12 @@ const ma = (e) => {
1279
1279
  {
1280
1280
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1281
1281
  children: ge(e, {
1282
- className: Bt(r),
1282
+ className: $t(r),
1283
1283
  weight: "regular"
1284
1284
  })
1285
1285
  }
1286
1286
  );
1287
- }, an = ({
1287
+ }, rn = ({
1288
1288
  variant: e,
1289
1289
  thumbnail: t,
1290
1290
  title: s,
@@ -1350,29 +1350,29 @@ const ma = (e) => {
1350
1350
  }
1351
1351
  );
1352
1352
  };
1353
- function rn(e) {
1353
+ function on(e) {
1354
1354
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1355
1355
  }
1356
1356
  function st(e) {
1357
1357
  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)]`;
1358
1358
  }
1359
- function ga(e) {
1359
+ function ba(e) {
1360
1360
  return e ? "bg-white/10" : "bg-black/5";
1361
1361
  }
1362
- function ba(e) {
1362
+ function pa(e) {
1363
1363
  return e ? "text-white" : "text-black";
1364
1364
  }
1365
- function pa(e) {
1365
+ function va(e) {
1366
1366
  return e ? "text-white/55" : "text-black/55";
1367
1367
  }
1368
- function va(e) {
1368
+ function xa(e) {
1369
1369
  return e ? "text-white/40" : "text-black/40";
1370
1370
  }
1371
- function xa(e) {
1371
+ function wa(e) {
1372
1372
  return e ? "text-white/20" : "text-black/20";
1373
1373
  }
1374
1374
  const at = ({ attachment: e, isMyMessage: t }) => {
1375
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, h = /* @__PURE__ */ m(P.Fragment, { children: [
1375
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, h = /* @__PURE__ */ m(B.Fragment, { children: [
1376
1376
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1377
1377
  "img",
1378
1378
  {
@@ -1383,26 +1383,26 @@ const at = ({ attachment: e, isMyMessage: t }) => {
1383
1383
  ) : /* @__PURE__ */ n(
1384
1384
  "div",
1385
1385
  {
1386
- className: `aspect-video w-full rounded-[20px] ${ga(t)} flex items-center justify-center`,
1387
- children: /* @__PURE__ */ n(ks, { className: `size-12 ${xa(t)}` })
1386
+ className: `aspect-video w-full rounded-[20px] ${ba(t)} flex items-center justify-center`,
1387
+ children: /* @__PURE__ */ n(Es, { className: `size-12 ${wa(t)}` })
1388
1388
  }
1389
1389
  ) }),
1390
1390
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1391
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ba(t)}`, children: s }),
1392
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${pa(t)}`, children: a }),
1393
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${va(t)}`, children: d })
1391
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${pa(t)}`, children: s }),
1392
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${va(t)}`, children: a }),
1393
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${xa(t)}`, children: d })
1394
1394
  ] })
1395
1395
  ] });
1396
1396
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: h }) : /* @__PURE__ */ n("div", { className: "block", children: h });
1397
1397
  };
1398
- function on(e) {
1398
+ function ln(e) {
1399
1399
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1400
1400
  }
1401
1401
  function rt(e) {
1402
1402
  var t;
1403
- return (t = e.attachments) == null ? void 0 : t.find(on);
1403
+ return (t = e.attachments) == null ? void 0 : t.find(ln);
1404
1404
  }
1405
- async function wa(e, t) {
1405
+ async function Na(e, t) {
1406
1406
  let s;
1407
1407
  try {
1408
1408
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1414,7 +1414,7 @@ async function wa(e, t) {
1414
1414
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1415
1415
  l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1416
1416
  }
1417
- const Na = ({
1417
+ const ya = ({
1418
1418
  url: e,
1419
1419
  filename: t
1420
1420
  }) => {
@@ -1426,7 +1426,7 @@ const Na = ({
1426
1426
  onClick: (i) => {
1427
1427
  i.stopPropagation();
1428
1428
  const l = window.open("", "_blank", "noopener,noreferrer");
1429
- a(!0), wa(e, t).then(() => {
1429
+ a(!0), Na(e, t).then(() => {
1430
1430
  l == null || l.close();
1431
1431
  }).catch(() => {
1432
1432
  l && (l.location.href = e);
@@ -1434,7 +1434,7 @@ const Na = ({
1434
1434
  },
1435
1435
  disabled: s,
1436
1436
  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",
1437
- children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(P.Fragment, { children: [
1437
+ children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(B.Fragment, { children: [
1438
1438
  /* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
1439
1439
  "Download"
1440
1440
  ] })
@@ -1462,16 +1462,16 @@ function it(e) {
1462
1462
  thumbnailUrl: g
1463
1463
  };
1464
1464
  }
1465
- const ln = ({
1465
+ const cn = ({
1466
1466
  resolvedUrl: e,
1467
1467
  resolvedType: t,
1468
1468
  title: s,
1469
1469
  fileSize: a,
1470
1470
  thumbnailUrl: r
1471
1471
  }) => {
1472
- const i = a !== void 0 ? rn(a) : void 0;
1472
+ const i = a !== void 0 ? on(a) : void 0;
1473
1473
  return /* @__PURE__ */ n(
1474
- an,
1474
+ rn,
1475
1475
  {
1476
1476
  variant: "dark",
1477
1477
  title: s,
@@ -1479,7 +1479,7 @@ const ln = ({
1479
1479
  mimeType: t,
1480
1480
  detail: i,
1481
1481
  thumbnail: /* @__PURE__ */ n(
1482
- sn,
1482
+ an,
1483
1483
  {
1484
1484
  mimeType: t,
1485
1485
  sourceUrl: e,
@@ -1490,23 +1490,23 @@ const ln = ({
1490
1490
  )
1491
1491
  }
1492
1492
  );
1493
- }, cn = ({
1493
+ }, dn = ({
1494
1494
  resolvedUrl: e,
1495
1495
  resolvedType: t,
1496
1496
  title: s,
1497
1497
  fileSize: a,
1498
1498
  thumbnailUrl: r
1499
1499
  }) => {
1500
- const i = le(t), l = a !== void 0 ? rn(a) : void 0;
1500
+ const i = le(t), l = a !== void 0 ? on(a) : void 0;
1501
1501
  return /* @__PURE__ */ n(
1502
- an,
1502
+ rn,
1503
1503
  {
1504
1504
  variant: "light",
1505
1505
  title: s,
1506
1506
  mimeType: t,
1507
1507
  detail: l,
1508
1508
  thumbnail: /* @__PURE__ */ n(
1509
- sn,
1509
+ an,
1510
1510
  {
1511
1511
  mimeType: t,
1512
1512
  sourceUrl: e,
@@ -1516,10 +1516,10 @@ const ln = ({
1516
1516
  containedImage: i === "image" || i === "document"
1517
1517
  }
1518
1518
  ),
1519
- action: /* @__PURE__ */ n(Na, { url: e, filename: s })
1519
+ action: /* @__PURE__ */ n(ya, { url: e, filename: s })
1520
1520
  }
1521
1521
  );
1522
- }, ya = ({
1522
+ }, _a = ({
1523
1523
  message: e,
1524
1524
  isMyMessage: t = !1
1525
1525
  }) => {
@@ -1544,40 +1544,40 @@ const ln = ({
1544
1544
  {
1545
1545
  className: "str-chat__message-bubble",
1546
1546
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1547
- children: s ? /* @__PURE__ */ n("div", { className: st(t), children: /* @__PURE__ */ n(at, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(ln, { ...a }) : /* @__PURE__ */ n(cn, { ...a })
1547
+ children: s ? /* @__PURE__ */ n("div", { className: st(t), children: /* @__PURE__ */ n(at, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(cn, { ...a }) : /* @__PURE__ */ n(dn, { ...a })
1548
1548
  }
1549
1549
  ) })
1550
1550
  }
1551
1551
  )
1552
1552
  ] });
1553
- }, _a = ({
1553
+ }, Ca = ({
1554
1554
  message: e
1555
1555
  }) => {
1556
1556
  const t = rt(e);
1557
1557
  if (t)
1558
1558
  return /* @__PURE__ */ n("div", { className: st(!0), children: /* @__PURE__ */ n(at, { attachment: t, isMyMessage: !0 }) });
1559
1559
  const s = it(e);
1560
- return s ? /* @__PURE__ */ n(ln, { ...s }) : null;
1561
- }, Ca = ({
1560
+ return s ? /* @__PURE__ */ n(cn, { ...s }) : null;
1561
+ }, ka = ({
1562
1562
  message: e
1563
1563
  }) => {
1564
1564
  const t = rt(e);
1565
1565
  if (t)
1566
1566
  return /* @__PURE__ */ n("div", { className: st(!1), children: /* @__PURE__ */ n(at, { attachment: t, isMyMessage: !1 }) });
1567
1567
  const s = it(e);
1568
- return s ? /* @__PURE__ */ n(cn, { ...s }) : null;
1569
- }, _i = Object.assign(ya, {
1570
- Creator: _a,
1571
- Visitor: Ca
1572
- }), ka = {
1568
+ return s ? /* @__PURE__ */ n(dn, { ...s }) : null;
1569
+ }, _i = Object.assign(_a, {
1570
+ Creator: Ca,
1571
+ Visitor: ka
1572
+ }), Ea = {
1573
1573
  isUnlocking: () => !1
1574
- }, Ea = {
1575
- LockedAttachment: ka
1576
- }, dn = Ze({}), Ci = dn.Provider;
1577
- function Ia(e) {
1578
- return Ke(dn)[e] ?? Ea[e];
1574
+ }, Ia = {
1575
+ LockedAttachment: Ea
1576
+ }, un = Ze({}), Ci = un.Provider;
1577
+ function Sa(e) {
1578
+ return Ke(un)[e] ?? Ia[e];
1579
1579
  }
1580
- const Sa = ({
1580
+ const Ta = ({
1581
1581
  selected: e,
1582
1582
  onVoteUp: t,
1583
1583
  onVoteDown: s
@@ -1593,7 +1593,7 @@ const Sa = ({
1593
1593
  "aria-label": "Good response",
1594
1594
  "aria-pressed": e === "up",
1595
1595
  "data-tooltip": "Good response",
1596
- children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "up" ? "fill" : "regular" })
1596
+ children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "up" ? "fill" : "regular" })
1597
1597
  }
1598
1598
  ),
1599
1599
  /* @__PURE__ */ n(
@@ -1607,11 +1607,11 @@ const Sa = ({
1607
1607
  "aria-label": "Bad response",
1608
1608
  "aria-pressed": e === "down",
1609
1609
  "data-tooltip": "Bad response",
1610
- children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "down" ? "fill" : "regular" })
1610
+ children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "down" ? "fill" : "regular" })
1611
1611
  }
1612
1612
  )
1613
- ] }), Ta = (e) => {
1614
- var gt, bt, pt, vt, xt, wt, Nt, yt, _t, Ct, kt, Et, It, St;
1613
+ ] }), Ma = (e) => {
1614
+ var bt, pt, vt, xt, wt, Nt, yt, _t, Ct, kt, Et, It, St, Tt;
1615
1615
  const {
1616
1616
  additionalMessageInputProps: t,
1617
1617
  chatbotVotingEnabled: s,
@@ -1629,39 +1629,39 @@ const Sa = ({
1629
1629
  renderText: b,
1630
1630
  threadList: x,
1631
1631
  viewerLanguage: v
1632
- } = e, { client: N } = Qe("CustomMessage"), { channel: w } = me("CustomMessage"), { isUnlocking: E, onUnlockClick: I, onFetchSource: S, onDownloadClick: D } = Ia("LockedAttachment"), [T, F] = z(!1), M = An(c.id), { selected: R, voteUp: A, voteDown: G } = ta(c), {
1633
- Attachment: k = Dn,
1634
- EditMessageModal: j = Rn,
1632
+ } = e, { client: N } = Qe("CustomMessage"), { channel: w } = me("CustomMessage"), { isUnlocking: E, onUnlockClick: I, onFetchSource: S, onDownloadClick: R } = Sa("LockedAttachment"), [T, O] = z(!1), M = Dn(c.id), { selected: L, voteUp: A, voteDown: H } = na(c), {
1633
+ Attachment: k = Rn,
1634
+ EditMessageModal: j = Ln,
1635
1635
  MessageActions: W,
1636
- MessageBlocked: V = Ln,
1637
- MessageBouncePrompt: $ = Fn,
1638
- MessageDeleted: L = On,
1639
- MessageIsThreadReplyInChannelButtonIndicator: Y = zn,
1640
- MessageRepliesCountButton: _ = Pn,
1641
- ReminderNotification: O = Bn,
1642
- StreamedMessageText: p = $n,
1636
+ MessageBlocked: V = Fn,
1637
+ MessageBouncePrompt: P = On,
1638
+ MessageDeleted: F = zn,
1639
+ MessageIsThreadReplyInChannelButtonIndicator: G = Pn,
1640
+ MessageRepliesCountButton: _ = Bn,
1641
+ ReminderNotification: D = $n,
1642
+ StreamedMessageText: p = jn,
1643
1643
  PinIndicator: C
1644
- } = Vt("CustomMessage"), H = jn(c), q = Un(c), he = re(
1644
+ } = Gt("CustomMessage"), Y = Un(c), q = Vn(c), he = re(
1645
1645
  () => u == null ? void 0 : u(c),
1646
1646
  [u, c]
1647
1647
  ), J = re(() => {
1648
1648
  const be = c.attachments ?? [], Ie = c.shared_location ? [c.shared_location, ...be] : be;
1649
1649
  if (!Me(c)) return Ie;
1650
- const Tt = Ie.filter((Mt) => !("type" in Mt) || !on(Mt));
1651
- return Tt.length === Ie.length ? Ie : Tt;
1650
+ const Mt = Ie.filter((At) => !("type" in At) || !ln(At));
1651
+ return Mt.length === Ie.length ? Ie : Mt;
1652
1652
  }, [c]), ee = re(() => {
1653
- const be = Zt({ message: c, viewerLanguage: v });
1653
+ const be = Kt({ message: c, viewerLanguage: v });
1654
1654
  return be === c.text ? c : { ...c, text: be };
1655
1655
  }, [c, v]);
1656
- if (Vn(c))
1656
+ if (Gn(c))
1657
1657
  return null;
1658
1658
  if (c.deleted_at || c.type === "deleted")
1659
- return /* @__PURE__ */ n(L, { message: c });
1660
- if (Gn(c))
1659
+ return /* @__PURE__ */ n(F, { message: c });
1660
+ if (Hn(c))
1661
1661
  return /* @__PURE__ */ n(V, {});
1662
- const Ce = !x && !!c.reply_count, ke = !x && c.show_in_channel && c.parent_id, ce = c.status === "failed" && ((gt = c.error) == null ? void 0 : gt.status) !== 403, te = Hn(c);
1662
+ const Ce = !x && !!c.reply_count, ke = !x && c.show_in_channel && c.parent_id, ce = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, te = Yn(c);
1663
1663
  let se;
1664
- ce ? se = () => h(c) : te && (se = () => F(!0));
1664
+ ce ? se = () => h(c) : te && (se = () => O(!0));
1665
1665
  const de = f(), Oe = y(
1666
1666
  "str-chat__message str-chat__message-simple",
1667
1667
  `str-chat__message--${c.type}`,
@@ -1669,17 +1669,17 @@ const Sa = ({
1669
1669
  de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1670
1670
  c.text ? "str-chat__message--has-text" : "has-no-text",
1671
1671
  {
1672
- "str-chat__message--has-attachment": H,
1672
+ "str-chat__message--has-attachment": Y,
1673
1673
  "str-chat__message--highlighted": g,
1674
1674
  "str-chat__message--pinned pinned-message": c.pinned,
1675
1675
  "str-chat__message--with-reactions": q,
1676
- "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,
1676
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((pt = c == null ? void 0 : c.error) == null ? void 0 : pt.status) !== 403,
1677
1677
  "str-chat__message-with-thread-link": Ce || ke,
1678
1678
  "str-chat__virtual-message__wrapper--end": r,
1679
1679
  "str-chat__virtual-message__wrapper--first": i,
1680
1680
  "str-chat__virtual-message__wrapper--group": l
1681
1681
  }
1682
- ), Ee = c.poll_id && N.polls.fromState(c.poll_id), ue = qs(c), B = Me(c), K = Ws(c), Q = !!(J != null && J.length && !c.quoted_message), ae = B && de && Q;
1682
+ ), Ee = c.poll_id && N.polls.fromState(c.poll_id), ue = Xs(c), $ = Me(c), K = qs(c), Q = !!(J != null && J.length && !c.quoted_message), ae = $ && de && Q;
1683
1683
  return /* @__PURE__ */ m(ie, { children: [
1684
1684
  a && /* @__PURE__ */ n(
1685
1685
  j,
@@ -1688,16 +1688,16 @@ const Sa = ({
1688
1688
  }
1689
1689
  ),
1690
1690
  T && /* @__PURE__ */ n(
1691
- Yn,
1691
+ Wn,
1692
1692
  {
1693
- MessageBouncePrompt: $,
1694
- onClose: () => F(!1),
1693
+ MessageBouncePrompt: P,
1694
+ onClose: () => O(!1),
1695
1695
  open: T
1696
1696
  }
1697
1697
  ),
1698
- /* @__PURE__ */ m("div", { className: Oe, children: [
1698
+ /* @__PURE__ */ m("div", { className: Oe, "data-message-id": c.id, children: [
1699
1699
  C && /* @__PURE__ */ n(C, {}),
1700
- !!M && /* @__PURE__ */ n(O, { reminder: M }),
1700
+ !!M && /* @__PURE__ */ n(D, { reminder: M }),
1701
1701
  c.user && /* @__PURE__ */ n(
1702
1702
  oe,
1703
1703
  {
@@ -1705,9 +1705,9 @@ const Sa = ({
1705
1705
  id: c.user.id,
1706
1706
  image: c.user.image,
1707
1707
  name: c.user.name || c.user.id,
1708
- size: B ? 24 : 28,
1708
+ size: $ ? 24 : 28,
1709
1709
  shape: "circle",
1710
- dmAgentEnabled: B
1710
+ dmAgentEnabled: $
1711
1711
  }
1712
1712
  ),
1713
1713
  /* @__PURE__ */ m(
@@ -1730,34 +1730,34 @@ const Sa = ({
1730
1730
  children: [
1731
1731
  K ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
1732
1732
  de ? /* @__PURE__ */ n(
1733
- Pt.Sent,
1733
+ Bt.Sent,
1734
1734
  {
1735
- title: (pt = c.metadata) == null ? void 0 : pt.attachment_title,
1736
- mimeType: (vt = c.metadata) == null ? void 0 : vt.attachment_mime_type,
1737
- thumbnailUrl: (xt = c.metadata) == null ? void 0 : xt.attachment_thumbnail,
1738
- amountText: (wt = c.metadata) == null ? void 0 : wt.amount_text,
1739
- detail: (Nt = c.metadata) == null ? void 0 : Nt.attachment_detail,
1740
- paymentStatus: (yt = c.metadata) == null ? void 0 : yt.payment_status,
1735
+ title: (vt = c.metadata) == null ? void 0 : vt.attachment_title,
1736
+ mimeType: (xt = c.metadata) == null ? void 0 : xt.attachment_mime_type,
1737
+ thumbnailUrl: (wt = c.metadata) == null ? void 0 : wt.attachment_thumbnail,
1738
+ amountText: (Nt = c.metadata) == null ? void 0 : Nt.amount_text,
1739
+ detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1740
+ paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1741
1741
  onPreviewClick: () => I == null ? void 0 : I(c, w),
1742
1742
  onFetchSource: async () => await (S == null ? void 0 : S(c, w))
1743
1743
  }
1744
1744
  ) : /* @__PURE__ */ n(
1745
- Pt.Received,
1745
+ Bt.Received,
1746
1746
  {
1747
- title: (_t = c.metadata) == null ? void 0 : _t.attachment_title,
1748
- mimeType: (Ct = c.metadata) == null ? void 0 : Ct.attachment_mime_type,
1749
- thumbnailUrl: (kt = c.metadata) == null ? void 0 : kt.attachment_thumbnail,
1750
- amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
1751
- detail: (It = c.metadata) == null ? void 0 : It.attachment_detail,
1752
- paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
1747
+ title: (Ct = c.metadata) == null ? void 0 : Ct.attachment_title,
1748
+ mimeType: (kt = c.metadata) == null ? void 0 : kt.attachment_mime_type,
1749
+ thumbnailUrl: (Et = c.metadata) == null ? void 0 : Et.attachment_thumbnail,
1750
+ amountText: (It = c.metadata) == null ? void 0 : It.amount_text,
1751
+ detail: (St = c.metadata) == null ? void 0 : St.attachment_detail,
1752
+ paymentStatus: (Tt = c.metadata) == null ? void 0 : Tt.payment_status,
1753
1753
  isUnlocking: E(c.id),
1754
1754
  onUnlockClick: () => I == null ? void 0 : I(c, w),
1755
1755
  onFetchSource: async () => await (S == null ? void 0 : S(c, w)),
1756
- onDownloadClick: () => D == null ? void 0 : D(c, w)
1756
+ onDownloadClick: () => R == null ? void 0 : R(c, w)
1757
1757
  }
1758
1758
  ),
1759
1759
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1760
- At,
1760
+ Dt,
1761
1761
  {
1762
1762
  message: ee,
1763
1763
  renderText: b
@@ -1767,7 +1767,7 @@ const Sa = ({
1767
1767
  /* Tip-only messages render as a standalone bubble */
1768
1768
  /* @__PURE__ */ n($e, { message: c, standalone: !0 })
1769
1769
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
1770
- B && !ae && /* @__PURE__ */ n(
1770
+ $ && !ae && /* @__PURE__ */ n(
1771
1771
  $e,
1772
1772
  {
1773
1773
  message: c,
@@ -1775,7 +1775,7 @@ const Sa = ({
1775
1775
  isMyMessage: de
1776
1776
  }
1777
1777
  ),
1778
- Ee && /* @__PURE__ */ n(Wn, { poll: Ee }),
1778
+ Ee && /* @__PURE__ */ n(qn, { poll: Ee }),
1779
1779
  J != null && J.length && !c.quoted_message ? /* @__PURE__ */ n(
1780
1780
  k,
1781
1781
  {
@@ -1790,20 +1790,20 @@ const Sa = ({
1790
1790
  renderText: b
1791
1791
  }
1792
1792
  ) : /* @__PURE__ */ n(
1793
- At,
1793
+ Dt,
1794
1794
  {
1795
1795
  message: ee,
1796
1796
  renderText: b
1797
1797
  }
1798
1798
  ),
1799
- /* @__PURE__ */ n(qn, {})
1799
+ /* @__PURE__ */ n(Xn, {})
1800
1800
  ] }) }),
1801
1801
  W && /* @__PURE__ */ n(W, {})
1802
1802
  ]
1803
1803
  }
1804
1804
  ),
1805
1805
  !K && !ue && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
1806
- (!B || ae) && /* @__PURE__ */ n(
1806
+ (!$ || ae) && /* @__PURE__ */ n(
1807
1807
  $e,
1808
1808
  {
1809
1809
  message: c,
@@ -1811,12 +1811,12 @@ const Sa = ({
1811
1811
  isMyMessage: de
1812
1812
  }
1813
1813
  ),
1814
- s && B && /* @__PURE__ */ n(
1815
- Sa,
1814
+ s && $ && /* @__PURE__ */ n(
1815
+ Ta,
1816
1816
  {
1817
- selected: R,
1817
+ selected: L,
1818
1818
  onVoteUp: A,
1819
- onVoteDown: G
1819
+ onVoteDown: H
1820
1820
  }
1821
1821
  )
1822
1822
  ] }),
@@ -1827,29 +1827,29 @@ const Sa = ({
1827
1827
  reply_count: c.reply_count
1828
1828
  }
1829
1829
  ),
1830
- ke && /* @__PURE__ */ n(Y, {})
1830
+ ke && /* @__PURE__ */ n(G, {})
1831
1831
  ] }, c.id)
1832
1832
  ] });
1833
- }, Ma = P.memo(
1834
- Ta,
1835
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1836
- ), Aa = (e) => {
1833
+ }, Aa = B.memo(
1834
+ Ma,
1835
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1836
+ ), Da = (e) => {
1837
1837
  const t = Le("CustomMessage");
1838
- return /* @__PURE__ */ n(Ma, { ...t, ...e });
1839
- }, Da = () => {
1840
- const { handleDelete: e } = Le("CustomMessageActions"), { t } = Xn("CustomMessageActions");
1841
- return /* @__PURE__ */ n(Yt, { onClick: e, children: t("Delete") });
1838
+ return /* @__PURE__ */ n(Aa, { ...t, ...e });
1842
1839
  }, Ra = () => {
1840
+ const { handleDelete: e } = Le("CustomMessageActions"), { t } = Zn("CustomMessageActions");
1841
+ return /* @__PURE__ */ n(Wt, { onClick: e, children: t("Delete") });
1842
+ }, La = () => {
1843
1843
  const { handleFlag: e } = Le("CustomMessageActions");
1844
- return /* @__PURE__ */ n(Yt, { onClick: e, children: "Report" });
1845
- }, La = [
1846
- { Component: Da, placement: "dropdown", type: "delete" },
1847
- { Component: Ra, placement: "dropdown", type: "flag" }
1848
- ], Fa = () => /* @__PURE__ */ n(Ds, { messageActionSet: La }), Oa = (e) => ({
1844
+ return /* @__PURE__ */ n(Wt, { onClick: e, children: "Report" });
1845
+ }, Fa = [
1846
+ { Component: Ra, placement: "dropdown", type: "delete" },
1847
+ { Component: La, placement: "dropdown", type: "flag" }
1848
+ ], Oa = () => /* @__PURE__ */ n(Rs, { messageActionSet: Fa }), za = (e) => ({
1849
1849
  linkPreviews: Array.from(e.previews.values()).filter(
1850
- (t) => Ft.previewIsLoaded(t) || Ft.previewIsLoading(t)
1850
+ (t) => Ot.previewIsLoaded(t) || Ot.previewIsLoading(t)
1851
1851
  )
1852
- }), za = ({
1852
+ }), Pa = ({
1853
1853
  link: e,
1854
1854
  onDismiss: t
1855
1855
  }) => {
@@ -1889,22 +1889,22 @@ const Sa = ({
1889
1889
  ]
1890
1890
  }
1891
1891
  );
1892
- }, Pa = () => {
1893
- const { linkPreviewsManager: e } = Zn(), { linkPreviews: t } = Kn(
1892
+ }, Ba = () => {
1893
+ const { linkPreviewsManager: e } = Kn(), { linkPreviews: t } = Jn(
1894
1894
  e.state,
1895
- Oa
1895
+ za
1896
1896
  ), s = (r) => {
1897
1897
  e.dismissPreview(r);
1898
1898
  };
1899
1899
  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(
1900
- za,
1900
+ Pa,
1901
1901
  {
1902
1902
  link: r,
1903
1903
  onDismiss: s
1904
1904
  },
1905
1905
  r.og_scrape_url
1906
1906
  )) }) : null;
1907
- }, Ba = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1907
+ }, $a = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1908
1908
  "button",
1909
1909
  {
1910
1910
  ...s,
@@ -1912,20 +1912,20 @@ const Sa = ({
1912
1912
  "aria-label": "Send",
1913
1913
  disabled: t,
1914
1914
  onClick: e,
1915
- children: /* @__PURE__ */ n(Ss, { weight: "bold", className: "size-4" })
1915
+ children: /* @__PURE__ */ n(Ts, { weight: "bold", className: "size-4" })
1916
1916
  }
1917
- ), $a = () => {
1917
+ ), ja = () => {
1918
1918
  var o;
1919
- const { channel: e } = me(), t = ((o = e == null ? void 0 : e.data) == null ? void 0 : o.frozen) === !0, { handleSubmit: s } = Qn(), { SendButton: a } = Vt("CustomMessageInput"), r = a ?? Ba, i = es();
1919
+ const { channel: e } = me(), t = ((o = e == null ? void 0 : e.data) == null ? void 0 : o.frozen) === !0, { handleSubmit: s } = es(), { SendButton: a } = Gt("CustomMessageInput"), r = a ?? $a, i = ts();
1920
1920
  return /* @__PURE__ */ m(ie, { children: [
1921
- /* @__PURE__ */ n("div", { className: "left-container", children: /* @__PURE__ */ n(ts, {}) }),
1921
+ /* @__PURE__ */ n("div", { className: "left-container", children: /* @__PURE__ */ n(ns, {}) }),
1922
1922
  /* @__PURE__ */ m("div", { className: "central-container 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: [
1923
- /* @__PURE__ */ n(ns, {}),
1924
- /* @__PURE__ */ n(Pa, {}),
1925
1923
  /* @__PURE__ */ n(ss, {}),
1924
+ /* @__PURE__ */ n(Ba, {}),
1925
+ /* @__PURE__ */ n(as, {}),
1926
1926
  /* @__PURE__ */ m("div", { className: "flex", children: [
1927
1927
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1928
- as,
1928
+ rs,
1929
1929
  {
1930
1930
  "aria-disabled": t || void 0,
1931
1931
  className: "w-full resize-none outline-none leading-6",
@@ -1949,7 +1949,7 @@ const Sa = ({
1949
1949
  ] })
1950
1950
  ] })
1951
1951
  ] });
1952
- }, ja = ({
1952
+ }, Ua = ({
1953
1953
  renderActions: e
1954
1954
  }) => {
1955
1955
  var a;
@@ -1962,40 +1962,40 @@ const Sa = ({
1962
1962
  className: "message-input flex items-center gap-2 p-4 aria-disabled:opacity-40",
1963
1963
  children: [
1964
1964
  e == null ? void 0 : e(),
1965
- /* @__PURE__ */ n(Jn, { Input: $a })
1965
+ /* @__PURE__ */ n(Qn, { Input: ja })
1966
1966
  ]
1967
1967
  }
1968
1968
  );
1969
- }, Ua = [
1969
+ }, Va = [
1970
1970
  "SYSTEM_DM_AGENT_PAUSED",
1971
1971
  "SYSTEM_DM_AGENT_RESUMED"
1972
- ], Va = {
1972
+ ], Ga = {
1973
1973
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1974
1974
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1975
- }, Ga = [
1975
+ }, Ha = [
1976
1976
  "SYSTEM_AGE_SAFETY_BLOCKED"
1977
- ], Ha = {
1977
+ ], Ya = {
1978
1978
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1979
- }, je = "age safety guidelines.", Ya = "https://linktr.ee/s/about/contact", $t = (e) => Ua.includes(e), Wa = (e) => Ga.includes(e), qa = (e) => {
1979
+ }, je = "age safety guidelines.", Wa = "https://linktr.ee/s/about/contact", jt = (e) => Va.includes(e), qa = (e) => Ha.includes(e), Xa = (e) => {
1980
1980
  var a;
1981
1981
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1982
- if ($t(t))
1982
+ if (jt(t))
1983
1983
  return {
1984
1984
  kind: "dm-agent",
1985
1985
  type: t
1986
1986
  };
1987
- if (Wa(t))
1987
+ if (qa(t))
1988
1988
  return {
1989
1989
  kind: "age-safety",
1990
1990
  type: t
1991
1991
  };
1992
1992
  const s = e.dm_agent_system_type;
1993
- if ($t(s))
1993
+ if (jt(s))
1994
1994
  return {
1995
1995
  kind: "dm-agent",
1996
1996
  type: s
1997
1997
  };
1998
- }, Xa = (e) => {
1998
+ }, Za = (e) => {
1999
1999
  const t = e.indexOf(je);
2000
2000
  if (t === -1)
2001
2001
  return e;
@@ -2005,7 +2005,7 @@ const Sa = ({
2005
2005
  /* @__PURE__ */ n(
2006
2006
  "a",
2007
2007
  {
2008
- href: Ya,
2008
+ href: Wa,
2009
2009
  target: "_blank",
2010
2010
  rel: "noopener noreferrer",
2011
2011
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -2014,13 +2014,13 @@ const Sa = ({
2014
2014
  ),
2015
2015
  e.slice(s)
2016
2016
  ] });
2017
- }, Za = (e) => {
2017
+ }, Ka = (e) => {
2018
2018
  var a, r;
2019
- const t = e.message.hide_date === !0, s = qa(
2019
+ const t = e.message.hide_date === !0, s = Xa(
2020
2020
  e.message
2021
2021
  );
2022
2022
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
2023
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Va[s.type];
2023
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ga[s.type];
2024
2024
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
2025
2025
  /* @__PURE__ */ m(
2026
2026
  "div",
@@ -2046,7 +2046,7 @@ const Sa = ({
2046
2046
  ] });
2047
2047
  }
2048
2048
  if ((s == null ? void 0 : s.kind) === "age-safety") {
2049
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ha[s.type];
2049
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ya[s.type];
2050
2050
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
2051
2051
  /* @__PURE__ */ m(
2052
2052
  "div",
@@ -2056,7 +2056,7 @@ const Sa = ({
2056
2056
  "data-age-safety-system-type": s.type,
2057
2057
  children: [
2058
2058
  /* @__PURE__ */ n(
2059
- Ts,
2059
+ Ms,
2060
2060
  {
2061
2061
  size: 24,
2062
2062
  weight: "duotone",
@@ -2065,7 +2065,7 @@ const Sa = ({
2065
2065
  "data-testid": "age-safety-system-message-icon"
2066
2066
  }
2067
2067
  ),
2068
- /* @__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: Xa(i) }) })
2068
+ /* @__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: Za(i) }) })
2069
2069
  ]
2070
2070
  }
2071
2071
  ),
@@ -2080,7 +2080,7 @@ const Sa = ({
2080
2080
  ] }),
2081
2081
  !t && /* @__PURE__ */ n(ze, { message: e.message })
2082
2082
  ] });
2083
- }, un = Ze(!1), Ue = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
2083
+ }, mn = Ze(!1), Ue = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
2084
2084
  "animateTransform",
2085
2085
  {
2086
2086
  attributeName: "transform",
@@ -2090,17 +2090,17 @@ const Sa = ({
2090
2090
  begin: `${120 * t}ms`,
2091
2091
  repeatCount: "indefinite"
2092
2092
  }
2093
- ) }), Ka = /* @__PURE__ */ new Set([
2093
+ ) }), Ja = /* @__PURE__ */ new Set([
2094
2094
  Pe.Thinking,
2095
2095
  Pe.Generating,
2096
2096
  Pe.ExternalSources
2097
- ]), Ja = ({ threadList: e }) => {
2097
+ ]), Qa = ({ threadList: e }) => {
2098
2098
  var b, x;
2099
- const { channel: t, channelConfig: s, thread: a } = me(), { client: r } = Qe(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = Ke(un);
2100
- if (!e && o && Ka.has(l)) {
2101
- const v = Qa(t, (b = r.user) == null ? void 0 : b.id);
2099
+ const { channel: t, channelConfig: s, thread: a } = me(), { client: r } = Qe(), { typing: i = {} } = is(), { aiState: l } = os(t), o = Ke(mn);
2100
+ if (!e && o && Ja.has(l)) {
2101
+ const v = er(t, (b = r.user) == null ? void 0 : b.id);
2102
2102
  return /* @__PURE__ */ n(
2103
- jt,
2103
+ Ut,
2104
2104
  {
2105
2105
  avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
2106
2106
  avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
@@ -2126,7 +2126,7 @@ const Sa = ({
2126
2126
  return null;
2127
2127
  const f = (x = u[0]) == null ? void 0 : x.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
2128
2128
  return /* @__PURE__ */ n(
2129
- jt,
2129
+ Ut,
2130
2130
  {
2131
2131
  avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
2132
2132
  avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
@@ -2134,7 +2134,7 @@ const Sa = ({
2134
2134
  testId: "typing-indicator"
2135
2135
  }
2136
2136
  );
2137
- }, jt = ({
2137
+ }, Ut = ({
2138
2138
  avatarId: e,
2139
2139
  avatarName: t,
2140
2140
  avatarImage: s,
@@ -2175,7 +2175,7 @@ const Sa = ({
2175
2175
  ]
2176
2176
  }
2177
2177
  );
2178
- function Qa(e, t) {
2178
+ function er(e, t) {
2179
2179
  var a;
2180
2180
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2181
2181
  for (const r of Object.values(s)) {
@@ -2184,7 +2184,7 @@ function Qa(e, t) {
2184
2184
  return i;
2185
2185
  }
2186
2186
  }
2187
- const er = () => null, tr = ({ className: e, message: t }) => /* @__PURE__ */ m(
2187
+ const tr = () => null, nr = ({ className: e, message: t }) => /* @__PURE__ */ m(
2188
2188
  "div",
2189
2189
  {
2190
2190
  className: y("flex items-center justify-center h-full", e),
@@ -2227,12 +2227,12 @@ const er = () => null, tr = ({ className: e, message: t }) => /* @__PURE__ */ m(
2227
2227
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2228
2228
  ]
2229
2229
  }
2230
- ), Ae = P.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
2231
- /* @__PURE__ */ n(tr, { className: "w-6 h-6" }),
2230
+ ), Ae = B.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
2231
+ /* @__PURE__ */ n(nr, { className: "w-6 h-6" }),
2232
2232
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2233
2233
  ] }) }));
2234
2234
  Ae.displayName = "LoadingState";
2235
- const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", nr = ({
2235
+ const fe = "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", sr = ({
2236
2236
  onBack: e,
2237
2237
  showBackButton: t,
2238
2238
  onShowInfo: s,
@@ -2242,16 +2242,16 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2242
2242
  getParticipantDisplayName: l
2243
2243
  }) => {
2244
2244
  var c, b, x, v, N;
2245
- const { channel: o } = me(), d = P.useMemo(() => {
2245
+ const { channel: o } = me(), d = B.useMemo(() => {
2246
2246
  var I, S;
2247
2247
  const w = (I = o._client) == null ? void 0 : I.userID;
2248
2248
  return w ? Object.values(((S = o.state) == null ? void 0 : S.members) || {}).find(
2249
- (D) => {
2249
+ (R) => {
2250
2250
  var T;
2251
- return ((T = D.user) == null ? void 0 : T.id) && D.user.id !== w;
2251
+ return ((T = R.user) == null ? void 0 : T.id) && R.user.id !== w;
2252
2252
  }
2253
2253
  ) : void 0;
2254
- }, [(c = o._client) == null ? void 0 : c.userID, (b = o.state) == null ? void 0 : b.members]), h = l(d), g = (x = d == null ? void 0 : d.user) == null ? void 0 : x.image, u = Xt(o), f = async () => {
2254
+ }, [(c = o._client) == null ? void 0 : c.userID, (b = o.state) == null ? void 0 : b.members]), h = l(d), g = (x = d == null ? void 0 : d.user) == null ? void 0 : x.image, u = Zt(o), f = async () => {
2255
2255
  try {
2256
2256
  u ? await o.unpin() : await o.pin();
2257
2257
  } catch (w) {
@@ -2271,7 +2271,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2271
2271
  }),
2272
2272
  type: "button",
2273
2273
  "aria-label": "Back to conversations",
2274
- children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
2274
+ children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
2275
2275
  }
2276
2276
  ) }),
2277
2277
  /* @__PURE__ */ m("div", { className: "flex flex-col gap-1 items-center", children: [
@@ -2301,7 +2301,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2301
2301
  ),
2302
2302
  i && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2303
2303
  /* @__PURE__ */ n(Ye, { className: "size-3 shrink-0 text-black/55" }),
2304
- /* @__PURE__ */ n("span", { children: Ut })
2304
+ /* @__PURE__ */ n("span", { children: Vt })
2305
2305
  ] })
2306
2306
  ] }),
2307
2307
  /* @__PURE__ */ m("div", { className: "flex justify-end items-center gap-2", children: [
@@ -2331,7 +2331,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2331
2331
  onClick: s,
2332
2332
  type: "button",
2333
2333
  "aria-label": "Show info",
2334
- children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
2334
+ children: /* @__PURE__ */ n(Ft, { className: "size-5 text-black/90" })
2335
2335
  }
2336
2336
  )
2337
2337
  ] })
@@ -2345,7 +2345,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2345
2345
  onClick: e,
2346
2346
  className: fe,
2347
2347
  "aria-label": "Back to conversations",
2348
- children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
2348
+ children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
2349
2349
  }
2350
2350
  ),
2351
2351
  /* @__PURE__ */ n(
@@ -2375,7 +2375,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2375
2375
  ) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: h }),
2376
2376
  i && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2377
2377
  /* @__PURE__ */ n(Ye, { className: "size-3 shrink-0 text-black/55" }),
2378
- /* @__PURE__ */ n("span", { className: "truncate", children: Ut })
2378
+ /* @__PURE__ */ n("span", { className: "truncate", children: Vt })
2379
2379
  ] })
2380
2380
  ] })
2381
2381
  ] }),
@@ -2406,13 +2406,13 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2406
2406
  onClick: s,
2407
2407
  type: "button",
2408
2408
  "aria-label": "Show info",
2409
- children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
2409
+ children: /* @__PURE__ */ n(Ft, { className: "size-5 text-black/90" })
2410
2410
  }
2411
2411
  )
2412
2412
  ] })
2413
2413
  ] })
2414
2414
  ] });
2415
- }, sr = ({
2415
+ }, ar = ({
2416
2416
  onBack: e,
2417
2417
  showBackButton: t,
2418
2418
  renderMessageInputActions: s,
@@ -2433,24 +2433,24 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2433
2433
  viewerLanguage: N,
2434
2434
  getParticipantDisplayName: w
2435
2435
  }) => {
2436
- var j, W, V, $, L, Y;
2437
- const { channel: E } = me(), I = Z(null), S = P.useMemo(() => {
2436
+ var j, W, V, P, F, G;
2437
+ const { channel: E } = me(), I = Z(null), S = B.useMemo(() => {
2438
2438
  var p, C;
2439
2439
  const _ = (p = E._client) == null ? void 0 : p.userID;
2440
2440
  return _ ? Object.values(((C = E.state) == null ? void 0 : C.members) || {}).find(
2441
- (H) => {
2441
+ (Y) => {
2442
2442
  var q;
2443
- return ((q = H.user) == null ? void 0 : q.id) && H.user.id !== _;
2443
+ return ((q = Y.user) == null ? void 0 : q.id) && Y.user.id !== _;
2444
2444
  }
2445
2445
  ) : void 0;
2446
- }, [(j = E._client) == null ? void 0 : j.userID, (W = E.state) == null ? void 0 : W.members]), D = P.useMemo(() => {
2446
+ }, [(j = E._client) == null ? void 0 : j.userID, (W = E.state) == null ? void 0 : W.members]), R = B.useMemo(() => {
2447
2447
  var p, C;
2448
2448
  const _ = (p = E._client) == null ? void 0 : p.userID;
2449
- return _ ? Object.values(((C = E.state) == null ? void 0 : C.members) || {}).find((H) => {
2449
+ return _ ? Object.values(((C = E.state) == null ? void 0 : C.members) || {}).find((Y) => {
2450
2450
  var q;
2451
- return ((q = H.user) == null ? void 0 : q.id) === _;
2451
+ return ((q = Y.user) == null ? void 0 : q.id) === _;
2452
2452
  }) : void 0;
2453
- }, [(V = E._client) == null ? void 0 : V.userID, ($ = E.state) == null ? void 0 : $.members]), T = ((L = D == null ? void 0 : D.user) == null ? void 0 : L.is_account) ?? (D == null ? void 0 : D.is_account), F = ((Y = S == null ? void 0 : S.user) == null ? void 0 : Y.is_account) ?? (S == null ? void 0 : S.is_account), M = v && T === !1 && F === !0, R = P.useMemo(() => {
2453
+ }, [(V = E._client) == null ? void 0 : V.userID, (P = E.state) == null ? void 0 : P.members]), T = ((F = R == null ? void 0 : R.user) == null ? void 0 : F.is_account) ?? (R == null ? void 0 : R.is_account), O = ((G = S == null ? void 0 : S.user) == null ? void 0 : G.is_account) ?? (S == null ? void 0 : S.is_account), M = v && T === !1 && O === !0, L = B.useMemo(() => {
2454
2454
  const _ = E.data ?? {};
2455
2455
  if (_.followerStatus)
2456
2456
  return String(_.followerStatus);
@@ -2459,34 +2459,34 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2459
2459
  }, [E.data]), A = U(() => {
2460
2460
  var _;
2461
2461
  (_ = I.current) == null || _.showModal();
2462
- }, []), G = U(() => {
2462
+ }, []), H = U(() => {
2463
2463
  var _;
2464
2464
  (_ = I.current) == null || _.close();
2465
2465
  }, []), k = U(
2466
2466
  (_) => {
2467
- const { message: O } = Le("ChannelView"), p = /* @__PURE__ */ n(
2468
- Aa,
2467
+ const { message: D } = Le("ChannelView"), p = /* @__PURE__ */ n(
2468
+ Da,
2469
2469
  {
2470
2470
  ..._,
2471
2471
  chatbotVotingEnabled: u,
2472
2472
  viewerLanguage: N
2473
2473
  }
2474
2474
  );
2475
- return !x || !O ? p : x(p, O);
2475
+ return !x || !D ? p : x(p, D);
2476
2476
  },
2477
2477
  [u, x, N]
2478
2478
  );
2479
2479
  return /* @__PURE__ */ m(ie, { children: [
2480
2480
  /* @__PURE__ */ n(
2481
- ls,
2481
+ cs,
2482
2482
  {
2483
2483
  overrides: {
2484
2484
  Message: k,
2485
- MessageActions: Fa
2485
+ MessageActions: Oa
2486
2486
  },
2487
- children: /* @__PURE__ */ m(cs, { children: [
2487
+ children: /* @__PURE__ */ m(ds, { children: [
2488
2488
  /* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(
2489
- nr,
2489
+ sr,
2490
2490
  {
2491
2491
  onBack: e,
2492
2492
  showBackButton: t,
@@ -2497,13 +2497,13 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2497
2497
  getParticipantDisplayName: w
2498
2498
  }
2499
2499
  ) }, "lt-channel-header"),
2500
- f ? /* @__PURE__ */ n(P.Fragment, { children: f() }, "lt-channel-banner") : null,
2500
+ f ? /* @__PURE__ */ n(B.Fragment, { children: f() }, "lt-channel-banner") : null,
2501
2501
  /* @__PURE__ */ n(
2502
2502
  "div",
2503
2503
  {
2504
2504
  className: "flex-1 overflow-hidden relative",
2505
2505
  children: /* @__PURE__ */ n(
2506
- ds,
2506
+ us,
2507
2507
  {
2508
2508
  hideDeletedMessages: !0,
2509
2509
  hideNewMessageSeparator: !1
@@ -2512,9 +2512,9 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2512
2512
  },
2513
2513
  "lt-channel-message-list"
2514
2514
  ),
2515
- a ? /* @__PURE__ */ n(P.Fragment, { children: a(E) }, "lt-channel-conversation-footer") : null,
2515
+ a ? /* @__PURE__ */ n(B.Fragment, { children: a(E) }, "lt-channel-conversation-footer") : null,
2516
2516
  /* @__PURE__ */ n(
2517
- ja,
2517
+ Ua,
2518
2518
  {
2519
2519
  renderActions: () => s == null ? void 0 : s(E)
2520
2520
  },
@@ -2524,14 +2524,14 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2524
2524
  }
2525
2525
  ),
2526
2526
  /* @__PURE__ */ n(
2527
- Js,
2527
+ Qs,
2528
2528
  {
2529
2529
  dialogRef: I,
2530
- onClose: G,
2530
+ onClose: H,
2531
2531
  participant: S,
2532
2532
  participantDisplayName: w(S),
2533
2533
  channel: E,
2534
- followerStatusLabel: R,
2534
+ followerStatusLabel: L,
2535
2535
  onLeaveConversation: r,
2536
2536
  onBlockParticipant: i,
2537
2537
  showDeleteConversation: l,
@@ -2543,7 +2543,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2543
2543
  }
2544
2544
  )
2545
2545
  ] });
2546
- }, mn = P.memo(
2546
+ }, hn = B.memo(
2547
2547
  ({
2548
2548
  channel: e,
2549
2549
  onBack: t,
@@ -2553,7 +2553,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2553
2553
  onLeaveConversation: i,
2554
2554
  onBlockParticipant: l,
2555
2555
  className: o,
2556
- CustomChannelEmptyState: d = er,
2556
+ CustomChannelEmptyState: d = tr,
2557
2557
  showDeleteConversation: h = !0,
2558
2558
  onDeleteConversationClick: g,
2559
2559
  onBlockParticipantClick: u,
@@ -2567,65 +2567,66 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2567
2567
  customProfileContent: E,
2568
2568
  customChannelActions: I,
2569
2569
  renderMessage: S,
2570
- onMessageLinkClick: D,
2570
+ onMessageLinkClick: R,
2571
2571
  sendButton: T,
2572
- viewerLanguage: F,
2572
+ viewerLanguage: O,
2573
2573
  getParticipantDisplayName: M
2574
2574
  }) => {
2575
- const R = U(
2575
+ const L = U(
2576
2576
  (k) => (M == null ? void 0 : M(k)) ?? tt(k == null ? void 0 : k.user),
2577
2577
  [M]
2578
2578
  ), A = U(
2579
2579
  async (k, j, W) => {
2580
- var O;
2581
- const V = ((O = e.data) == null ? void 0 : O.chatbot_paused) === !0, $ = c && !V, L = {
2580
+ var D;
2581
+ const V = ((D = e.data) == null ? void 0 : D.chatbot_paused) === !0, P = c && !V, F = {
2582
2582
  ...j,
2583
- ...$ && { silent: !0 },
2583
+ ...P && { silent: !0 },
2584
2584
  ...b && {
2585
2585
  metadata: {
2586
2586
  ...j.metadata ?? {},
2587
2587
  ...b
2588
2588
  }
2589
2589
  }
2590
- }, Y = {
2590
+ }, G = {
2591
2591
  ...W,
2592
- ...$ && { skip_push: !0 }
2593
- }, _ = await e.sendMessage(L, Y);
2592
+ ...P && { skip_push: !0 }
2593
+ }, _ = await e.sendMessage(F, G);
2594
2594
  return x == null || x(_), _;
2595
2595
  },
2596
2596
  [e, c, b, x]
2597
- ), G = Z(null);
2597
+ ), H = Z(null);
2598
2598
  return X(() => {
2599
- if (!D) return;
2600
- const k = G.current;
2599
+ if (!R) return;
2600
+ const k = H.current;
2601
2601
  if (!k) return;
2602
2602
  const j = (W) => {
2603
- var L;
2604
- const V = (L = W.target) == null ? void 0 : L.closest("a[href]"), $ = V == null ? void 0 : V.getAttribute("href");
2605
- $ && D($);
2603
+ const V = W.target, P = V == null ? void 0 : V.closest("a[href]"), F = P == null ? void 0 : P.getAttribute("href");
2604
+ if (!F) return;
2605
+ const G = P == null ? void 0 : P.closest("[data-message-id]"), _ = G == null ? void 0 : G.getAttribute("data-message-id"), D = _ ? e.state.messages.find((p) => p.id === _) : void 0;
2606
+ R(F, D);
2606
2607
  };
2607
2608
  return k.addEventListener("click", j), () => k.removeEventListener("click", j);
2608
- }, [D]), /* @__PURE__ */ n(
2609
+ }, [R, e]), /* @__PURE__ */ n(
2609
2610
  "div",
2610
2611
  {
2611
- ref: G,
2612
+ ref: H,
2612
2613
  className: y(
2613
2614
  "messaging-channel-view h-full flex flex-col",
2614
2615
  o
2615
2616
  ),
2616
- children: /* @__PURE__ */ n(un.Provider, { value: c ?? !1, children: /* @__PURE__ */ n(
2617
- os,
2617
+ children: /* @__PURE__ */ n(mn.Provider, { value: c ?? !1, children: /* @__PURE__ */ n(
2618
+ ls,
2618
2619
  {
2619
2620
  channel: e,
2620
- MessageSystem: Za,
2621
+ MessageSystem: Ka,
2621
2622
  EmptyStateIndicator: d,
2622
2623
  LoadingIndicator: Ae,
2623
- DateSeparator: Qs,
2624
- TypingIndicator: Ja,
2624
+ DateSeparator: ea,
2625
+ TypingIndicator: Qa,
2625
2626
  doSendMessageRequest: A,
2626
2627
  ...T ? { SendButton: T } : {},
2627
2628
  children: /* @__PURE__ */ n(
2628
- sr,
2629
+ ar,
2629
2630
  {
2630
2631
  onBack: t,
2631
2632
  showBackButton: s,
@@ -2645,8 +2646,8 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2645
2646
  customProfileContent: E,
2646
2647
  customChannelActions: I,
2647
2648
  renderMessage: S,
2648
- viewerLanguage: F,
2649
- getParticipantDisplayName: R
2649
+ viewerLanguage: O,
2650
+ getParticipantDisplayName: L
2650
2651
  }
2651
2652
  )
2652
2653
  }
@@ -2655,8 +2656,8 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2655
2656
  );
2656
2657
  }
2657
2658
  );
2658
- mn.displayName = "ChannelView";
2659
- const ar = ({ className: e }) => /* @__PURE__ */ m(
2659
+ hn.displayName = "ChannelView";
2660
+ const rr = ({ className: e }) => /* @__PURE__ */ m(
2660
2661
  "svg",
2661
2662
  {
2662
2663
  width: "140",
@@ -2790,17 +2791,17 @@ const ar = ({ className: e }) => /* @__PURE__ */ m(
2790
2791
  ] })
2791
2792
  ]
2792
2793
  }
2793
- ), hn = P.memo(
2794
+ ), fn = B.memo(
2794
2795
  ({ hasChannels: e, channelsLoaded: t }) => /* @__PURE__ */ n("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
2795
- /* @__PURE__ */ n(ar, {}),
2796
+ /* @__PURE__ */ n(rr, {}),
2796
2797
  t && !e && /* @__PURE__ */ m("div", { className: "mt-8", children: [
2797
2798
  /* @__PURE__ */ n("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
2798
2799
  /* @__PURE__ */ n("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
2799
2800
  ] })
2800
2801
  ] }) })
2801
2802
  );
2802
- hn.displayName = "EmptyState";
2803
- const Te = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
2803
+ fn.displayName = "EmptyState";
2804
+ const Te = B.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
2804
2805
  /* @__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: "⚠️" }) }),
2805
2806
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2806
2807
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2838,29 +2839,29 @@ const ki = ({
2838
2839
  chatbotVotingEnabled: E = !1,
2839
2840
  viewerLanguage: I,
2840
2841
  renderMessagePreview: S,
2841
- renderChannelBanner: D,
2842
+ renderChannelBanner: R,
2842
2843
  customProfileContent: T,
2843
- customChannelActions: F,
2844
+ customChannelActions: O,
2844
2845
  renderMessage: M,
2845
- onMessageLinkClick: R,
2846
+ onMessageLinkClick: L,
2846
2847
  sendButton: A
2847
2848
  }) => {
2848
2849
  const {
2849
- service: G,
2850
+ service: H,
2850
2851
  client: k,
2851
2852
  isConnected: j,
2852
2853
  isLoading: W,
2853
2854
  error: V,
2854
- refreshConnection: $,
2855
- debug: L
2856
- } = Rs(), [Y, _] = z(null), [O, p] = z(!1), [C, H] = z(!1), [q, he] = z(!1), [J, ee] = z(null), { showDeleteConversation: Ce = !0 } = e, ke = P.useMemo(() => {
2857
- const B = k == null ? void 0 : k.userID;
2855
+ refreshConnection: P,
2856
+ debug: F
2857
+ } = Ls(), [G, _] = z(null), [D, p] = z(!1), [C, Y] = z(!1), [q, he] = z(!1), [J, ee] = z(null), { showDeleteConversation: Ce = !0 } = e, ke = B.useMemo(() => {
2858
+ const $ = k == null ? void 0 : k.userID;
2858
2859
  return {
2859
2860
  ...{
2860
2861
  type: "messaging",
2861
2862
  last_message_at: { $exists: !0 },
2862
- ...B && {
2863
- members: { $in: [B] },
2863
+ ...$ && {
2864
+ members: { $in: [$] },
2864
2865
  hidden: !1
2865
2866
  }
2866
2867
  },
@@ -2868,36 +2869,36 @@ const ki = ({
2868
2869
  };
2869
2870
  }, [h, k == null ? void 0 : k.userID]), ce = Z(null), te = U(async () => {
2870
2871
  if (!k || !j) return;
2871
- const B = k.userID;
2872
- if (B)
2872
+ const $ = k.userID;
2873
+ if ($)
2873
2874
  try {
2874
- L && console.log("[MessagingShell] Syncing channels for user:", B);
2875
+ F && console.log("[MessagingShell] Syncing channels for user:", $);
2875
2876
  const K = await k.queryChannels(
2876
2877
  {
2877
2878
  type: "messaging",
2878
- members: { $in: [B] }
2879
+ members: { $in: [$] }
2879
2880
  },
2880
2881
  {},
2881
2882
  { limit: 100 }
2882
2883
  );
2883
- p(K.length > 0), H(!0), ce.current = B, L && console.log("[MessagingShell] Channels synced successfully:", {
2884
+ p(K.length > 0), Y(!0), ce.current = $, F && console.log("[MessagingShell] Channels synced successfully:", {
2884
2885
  channelCount: K.length
2885
2886
  });
2886
2887
  } catch (K) {
2887
2888
  console.error("[MessagingShell] Failed to sync channels:", K);
2888
2889
  }
2889
- }, [k, j, L]);
2890
+ }, [k, j, F]);
2890
2891
  X(() => {
2891
2892
  if (!k || !j) return;
2892
- const B = k.userID;
2893
- B && ce.current !== B && te();
2893
+ const $ = k.userID;
2894
+ $ && ce.current !== $ && te();
2894
2895
  }, [k, j, te]), X(() => {
2895
2896
  if (!i || !k || !j) return;
2896
2897
  (async () => {
2897
2898
  const K = k.userID;
2898
2899
  if (K)
2899
2900
  try {
2900
- L && console.log(
2901
+ F && console.log(
2901
2902
  "[MessagingShell] Loading initial conversation with:",
2902
2903
  i
2903
2904
  );
@@ -2910,22 +2911,22 @@ const ki = ({
2910
2911
  { limit: 1 }
2911
2912
  );
2912
2913
  if (Q.length > 0)
2913
- _(Q[0]), he(!0), ee(null), r && r(Q[0]), L && console.log(
2914
+ _(Q[0]), he(!0), ee(null), r && r(Q[0]), F && console.log(
2914
2915
  "[MessagingShell] Initial conversation loaded:",
2915
2916
  Q[0].id
2916
2917
  );
2917
- else if (l && G) {
2918
- L && console.log(
2918
+ else if (l && H) {
2919
+ F && console.log(
2919
2920
  "[MessagingShell] No conversation found, creating one for:",
2920
2921
  l
2921
2922
  );
2922
2923
  try {
2923
- const ae = await G.startChannelWithParticipant({
2924
+ const ae = await H.startChannelWithParticipant({
2924
2925
  id: l.id,
2925
2926
  name: l.name,
2926
2927
  phone: l.phone
2927
2928
  });
2928
- _(ae), he(!0), ee(null), r && r(ae), L && console.log(
2929
+ _(ae), he(!0), ee(null), r && r(ae), F && console.log(
2929
2930
  "[MessagingShell] Channel created and loaded:",
2930
2931
  ae.id
2931
2932
  );
@@ -2938,7 +2939,7 @@ const ki = ({
2938
2939
  } else
2939
2940
  ee(
2940
2941
  "No conversation found with this account"
2941
- ), L && console.log(
2942
+ ), F && console.log(
2942
2943
  "[MessagingShell] No conversation found for:",
2943
2944
  i
2944
2945
  );
@@ -2954,33 +2955,33 @@ const ki = ({
2954
2955
  l,
2955
2956
  k,
2956
2957
  j,
2957
- G,
2958
- L,
2958
+ H,
2959
+ F,
2959
2960
  r
2960
2961
  ]);
2961
2962
  const se = U(
2962
- (B) => {
2963
- _(B), r == null || r(B);
2963
+ ($) => {
2964
+ _($), r == null || r($);
2964
2965
  },
2965
2966
  [r]
2966
2967
  ), de = U(() => {
2967
2968
  q || _(null);
2968
2969
  }, [q]), Oe = U(
2969
- async (B) => {
2970
- L && console.log("[MessagingShell] Leaving conversation:", B.id), _(null), he(!1), ce.current = null, await te();
2970
+ async ($) => {
2971
+ F && console.log("[MessagingShell] Leaving conversation:", $.id), _(null), he(!1), ce.current = null, await te();
2971
2972
  },
2972
- [te, L]
2973
+ [te, F]
2973
2974
  ), Ee = U(
2974
- async (B) => {
2975
- L && console.log("[MessagingShell] Blocking participant:", B), _(null), he(!1), ce.current = null, await te();
2975
+ async ($) => {
2976
+ F && console.log("[MessagingShell] Blocking participant:", $), _(null), he(!1), ce.current = null, await te();
2976
2977
  },
2977
- [te, L]
2978
- ), ue = !!Y;
2979
- return W ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Ae, {}) }) : V ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Te, { message: V, onBack: $ }) }) : !j || !k ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(
2978
+ [te, F]
2979
+ ), ue = !!G;
2980
+ return W ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Ae, {}) }) : V ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Te, { message: V, onBack: P }) }) : !j || !k ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(
2980
2981
  Te,
2981
2982
  {
2982
2983
  message: "Not connected to messaging service",
2983
- onBack: $
2984
+ onBack: P
2984
2985
  }
2985
2986
  ) }) : J ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Te, { message: J }) }) : /* @__PURE__ */ n(
2986
2987
  "div",
@@ -3004,10 +3005,10 @@ const ki = ({
3004
3005
  }
3005
3006
  ),
3006
3007
  children: /* @__PURE__ */ n(
3007
- Qt,
3008
+ en,
3008
3009
  {
3009
3010
  onChannelSelect: se,
3010
- selectedChannel: Y || void 0,
3011
+ selectedChannel: G || void 0,
3011
3012
  filters: ke,
3012
3013
  channelRenderFilterFn: g,
3013
3014
  customEmptyStateIndicator: u,
@@ -3029,15 +3030,15 @@ const ki = ({
3029
3030
  "hidden lg:flex": !q && !ue && !i
3030
3031
  }
3031
3032
  ),
3032
- children: Y ? /* @__PURE__ */ n("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ n(
3033
- mn,
3033
+ children: G ? /* @__PURE__ */ n("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ n(
3034
+ hn,
3034
3035
  {
3035
- channel: Y,
3036
+ channel: G,
3036
3037
  onBack: de,
3037
3038
  showBackButton: !q,
3038
3039
  renderMessageInputActions: s,
3039
3040
  renderConversationFooter: a,
3040
- renderChannelBanner: D,
3041
+ renderChannelBanner: R,
3041
3042
  onLeaveConversation: Oe,
3042
3043
  onBlockParticipant: Ee,
3043
3044
  CustomChannelEmptyState: o,
@@ -3052,19 +3053,19 @@ const ki = ({
3052
3053
  chatbotVotingEnabled: E,
3053
3054
  viewerLanguage: I,
3054
3055
  customProfileContent: T,
3055
- customChannelActions: F,
3056
+ customChannelActions: O,
3056
3057
  renderMessage: M,
3057
- onMessageLinkClick: R,
3058
+ onMessageLinkClick: L,
3058
3059
  sendButton: A
3059
3060
  },
3060
- Y.id
3061
+ G.id
3061
3062
  ) }) : i ? (
3062
3063
  // Show loading while creating/loading direct conversation channel
3063
3064
  /* @__PURE__ */ n(Ae, {})
3064
3065
  ) : /* @__PURE__ */ n(
3065
- hn,
3066
+ fn,
3066
3067
  {
3067
- hasChannels: O,
3068
+ hasChannels: D,
3068
3069
  channelsLoaded: C
3069
3070
  }
3070
3071
  )
@@ -3073,26 +3074,26 @@ const ki = ({
3073
3074
  ] })
3074
3075
  }
3075
3076
  );
3076
- }, rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3077
- function fn(e) {
3077
+ }, ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3078
+ function ot(e) {
3078
3079
  if (typeof e != "string") return;
3079
3080
  const t = e.trim();
3080
3081
  if (t === "") return;
3081
- const s = rr.exec(t);
3082
+ const s = ir.exec(t);
3082
3083
  if (s) {
3083
3084
  const a = s[1].toLowerCase();
3084
- return ir.has(a) ? t : void 0;
3085
+ return or.has(a) ? t : void 0;
3085
3086
  }
3086
3087
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
3087
3088
  }
3088
- const or = {
3089
+ const lr = {
3089
3090
  dark: "bg-white text-[#121110] hover:bg-white/90",
3090
3091
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
3091
- }, lr = ({ variant: e, cta: t }) => {
3092
+ }, cr = ({ variant: e, cta: t }) => {
3092
3093
  const s = y(
3093
3094
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3094
- or[e]
3095
- ), a = fn(t.href);
3095
+ lr[e]
3096
+ ), a = ot(t.href);
3096
3097
  return a ? /* @__PURE__ */ n(
3097
3098
  "a",
3098
3099
  {
@@ -3118,13 +3119,13 @@ const or = {
3118
3119
  children: t.label
3119
3120
  }
3120
3121
  );
3121
- }, cr = {
3122
+ }, dr = {
3122
3123
  dark: "text-white",
3123
3124
  light: "text-black/90"
3124
- }, dr = "text-white/30", ur = {
3125
+ }, ur = "text-white/30", mr = {
3125
3126
  dark: "text-white/55",
3126
3127
  light: "text-black/55"
3127
- }, ot = ({
3128
+ }, lt = ({
3128
3129
  variant: e,
3129
3130
  title: t,
3130
3131
  placeholderTitle: s,
@@ -3138,10 +3139,10 @@ const or = {
3138
3139
  if (!g && !u && !c && !b) return null;
3139
3140
  const v = y(
3140
3141
  "truncate text-base font-medium leading-6",
3141
- d && !t ? dr : cr[e]
3142
+ d && !t ? ur : dr[e]
3142
3143
  ), N = y(
3143
3144
  "truncate text-xs leading-4",
3144
- ur[e]
3145
+ mr[e]
3145
3146
  );
3146
3147
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
3147
3148
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
@@ -3157,9 +3158,9 @@ const or = {
3157
3158
  ] }),
3158
3159
  o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3159
3160
  ] }),
3160
- l && /* @__PURE__ */ n(lr, { variant: e, cta: l })
3161
+ l && /* @__PURE__ */ n(cr, { variant: e, cta: l })
3161
3162
  ] });
3162
- }, mr = y(
3163
+ }, hr = y(
3163
3164
  "relative block w-[280px] select-none overflow-hidden rounded-md",
3164
3165
  // 1px hairline border that sits flush with the card chrome — matches
3165
3166
  // the messaging design system's "small border around link attachments"
@@ -3178,7 +3179,7 @@ const or = {
3178
3179
  "data-testid": d
3179
3180
  }) => {
3180
3181
  const h = s != null || a != null, g = y(
3181
- mr,
3182
+ hr,
3182
3183
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3183
3184
  // `focus-ring` is a design-system utility from the component-library
3184
3185
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -3226,17 +3227,17 @@ const or = {
3226
3227
  ]
3227
3228
  }
3228
3229
  );
3229
- }, hr = {
3230
+ }, fr = {
3230
3231
  dark: "bg-white/10",
3231
3232
  light: "bg-black/5"
3232
- }, fr = {
3233
+ }, gr = {
3233
3234
  dark: "size-16 text-white/25",
3234
3235
  light: "size-16 text-black/25"
3235
- }, Fe = (e, t) => !!t && !!e && le(e) === "audio", gr = (e, t) => {
3236
+ }, Fe = (e, t) => !!t && !!e && le(e) === "audio", gn = (e, t) => {
3236
3237
  if (!t || !e) return !1;
3237
3238
  const s = le(e);
3238
3239
  return s === "video" || s === "audio";
3239
- }, lt = "bg-[#F2F3F4]", Re = ({
3240
+ }, ct = "bg-[#F2F3F4]", Re = ({
3240
3241
  variant: e,
3241
3242
  thumbnailUrl: t,
3242
3243
  sourceUrl: s,
@@ -3287,10 +3288,10 @@ const or = {
3287
3288
  {
3288
3289
  className: y(
3289
3290
  "flex h-full w-full items-center justify-center",
3290
- hr[e]
3291
+ fr[e]
3291
3292
  ),
3292
3293
  children: ge(r, {
3293
- className: fr[e],
3294
+ className: gr[e],
3294
3295
  weight: "regular"
3295
3296
  })
3296
3297
  }
@@ -3330,10 +3331,10 @@ const or = {
3330
3331
  onClick: u,
3331
3332
  "aria-label": "Edit attachment",
3332
3333
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3333
- children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
3334
+ children: /* @__PURE__ */ n(As, { className: "size-5", weight: "regular" })
3334
3335
  }
3335
3336
  ) : void 0;
3336
- return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: lt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3337
+ return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: ct, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3337
3338
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3338
3339
  Re,
3339
3340
  {
@@ -3362,7 +3363,7 @@ const or = {
3362
3363
  }
3363
3364
  ),
3364
3365
  /* @__PURE__ */ n(
3365
- ot,
3366
+ lt,
3366
3367
  {
3367
3368
  variant: "dark",
3368
3369
  title: e,
@@ -3389,7 +3390,7 @@ const or = {
3389
3390
  cta: d,
3390
3391
  onClick: h
3391
3392
  }) => {
3392
- const g = gr(a, i), u = fn(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? h : void 0, b = Fe(a, i) ? lt : void 0, x = d && h ? {
3393
+ const g = gn(a, i), u = ot(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? h : void 0, b = Fe(a, i) ? ct : void 0, x = d && h ? {
3393
3394
  ...d,
3394
3395
  onClick: () => {
3395
3396
  var v;
@@ -3417,7 +3418,7 @@ const or = {
3417
3418
  }
3418
3419
  ),
3419
3420
  /* @__PURE__ */ n(
3420
- ot,
3421
+ lt,
3421
3422
  {
3422
3423
  variant: "light",
3423
3424
  title: e,
@@ -3440,38 +3441,44 @@ const or = {
3440
3441
  sourceUrl: l,
3441
3442
  layout: o = "featured",
3442
3443
  appIcon: d,
3443
- cta: h
3444
- }) => /* @__PURE__ */ m(
3445
- De,
3446
- {
3447
- variant: "dark",
3448
- bgClassName: Fe(r, l) ? lt : void 0,
3449
- children: [
3450
- o === "featured" && /* @__PURE__ */ n(
3451
- Re,
3452
- {
3453
- variant: "dark",
3454
- thumbnailUrl: i,
3455
- sourceUrl: l,
3456
- title: e,
3457
- mimeType: r
3458
- }
3459
- ),
3460
- /* @__PURE__ */ n(
3461
- ot,
3462
- {
3463
- variant: "dark",
3464
- title: e,
3465
- placeholderTitle: t,
3466
- description: s,
3467
- url: a,
3468
- appIcon: d,
3469
- cta: h
3470
- }
3471
- )
3472
- ]
3473
- }
3474
- ), Ei = {
3444
+ cta: h,
3445
+ onClick: g
3446
+ }) => {
3447
+ const u = gn(r, l), f = ot(a), c = h == null && f != null && !u ? f : void 0, b = h == null && !u && c != null ? g : void 0;
3448
+ return /* @__PURE__ */ m(
3449
+ De,
3450
+ {
3451
+ variant: "dark",
3452
+ href: c,
3453
+ onClick: b,
3454
+ bgClassName: Fe(r, l) ? ct : void 0,
3455
+ children: [
3456
+ o === "featured" && /* @__PURE__ */ n(
3457
+ Re,
3458
+ {
3459
+ variant: "dark",
3460
+ thumbnailUrl: i,
3461
+ sourceUrl: l,
3462
+ title: e,
3463
+ mimeType: r
3464
+ }
3465
+ ),
3466
+ /* @__PURE__ */ n(
3467
+ lt,
3468
+ {
3469
+ variant: "dark",
3470
+ title: e,
3471
+ placeholderTitle: t,
3472
+ description: s,
3473
+ url: a,
3474
+ appIcon: d,
3475
+ cta: h
3476
+ }
3477
+ )
3478
+ ]
3479
+ }
3480
+ );
3481
+ }, Ei = {
3475
3482
  Composer: br,
3476
3483
  Sent: vr,
3477
3484
  Received: pr
@@ -3588,7 +3595,7 @@ const or = {
3588
3595
  }
3589
3596
  ),
3590
3597
  s ?? null
3591
- ] }), ct = ({
3598
+ ] }), dt = ({
3592
3599
  state: e,
3593
3600
  src: t,
3594
3601
  mimeType: s,
@@ -3625,7 +3632,7 @@ const or = {
3625
3632
  )) })
3626
3633
  }
3627
3634
  );
3628
- }, Er = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), Tr = {
3635
+ }, Er = (e) => /* @__PURE__ */ n(dt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ n(dt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(dt, { ...e, state: "received" }), Tr = {
3629
3636
  Composer: Er,
3630
3637
  Sent: Ir,
3631
3638
  Received: Sr
@@ -3653,7 +3660,7 @@ function Dr(e, t) {
3653
3660
  }
3654
3661
  if (!e) return;
3655
3662
  if (le(e) === "document") {
3656
- const r = nn(e), i = Ar[r];
3663
+ const r = sn(e), i = Ar[r];
3657
3664
  if (i) return i;
3658
3665
  if (e === "application/octet-stream") return;
3659
3666
  }
@@ -3682,7 +3689,7 @@ const Lr = {
3682
3689
  }, Or = {
3683
3690
  dark: "text-white/85",
3684
3691
  light: "text-black/85"
3685
- }, gn = ({
3692
+ }, bn = ({
3686
3693
  variant: e,
3687
3694
  filename: t,
3688
3695
  title: s,
@@ -3741,7 +3748,7 @@ const Lr = {
3741
3748
  o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3742
3749
  ] });
3743
3750
  };
3744
- async function bn(e, t) {
3751
+ async function pn(e, t) {
3745
3752
  const s = t ?? ne(e);
3746
3753
  try {
3747
3754
  const a = await fetch(e, { mode: "cors" });
@@ -3771,7 +3778,7 @@ const zr = ({
3771
3778
  }) => {
3772
3779
  const i = t.filename ?? ne(t.src);
3773
3780
  return /* @__PURE__ */ n(
3774
- gn,
3781
+ bn,
3775
3782
  {
3776
3783
  variant: e,
3777
3784
  filename: i,
@@ -3783,7 +3790,7 @@ const zr = ({
3783
3790
  trailingAction: r
3784
3791
  }
3785
3792
  );
3786
- }, dt = ({
3793
+ }, ut = ({
3787
3794
  state: e,
3788
3795
  src: t,
3789
3796
  filename: s,
@@ -3808,7 +3815,7 @@ const zr = ({
3808
3815
  const N = c[v];
3809
3816
  if (!N) return;
3810
3817
  const w = N.filename ?? ne(N.src);
3811
- bn(N.src, w);
3818
+ pn(N.src, w);
3812
3819
  };
3813
3820
  if (c.length === 0)
3814
3821
  return null;
@@ -3843,11 +3850,11 @@ const zr = ({
3843
3850
  )) })
3844
3851
  }
3845
3852
  );
3846
- }, Br = (e) => /* @__PURE__ */ n(dt, { ...e, state: "composer" }), $r = (e) => /* @__PURE__ */ n(dt, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ n(dt, { ...e, state: "received" }), Ur = {
3853
+ }, Br = (e) => /* @__PURE__ */ n(ut, { ...e, state: "composer" }), $r = (e) => /* @__PURE__ */ n(ut, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ n(ut, { ...e, state: "received" }), Ur = {
3847
3854
  Composer: Br,
3848
3855
  Sent: $r,
3849
3856
  Received: jr
3850
- }, ut = ({
3857
+ }, mt = ({
3851
3858
  onPrev: e,
3852
3859
  onNext: t,
3853
3860
  prevLabel: s = "Previous",
@@ -3860,7 +3867,7 @@ const zr = ({
3860
3867
  onClick: e,
3861
3868
  "aria-label": s,
3862
3869
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3863
- children: /* @__PURE__ */ n(As, { size: 20, weight: "bold", "aria-hidden": !0 })
3870
+ children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3864
3871
  }
3865
3872
  ),
3866
3873
  /* @__PURE__ */ n(
@@ -3873,7 +3880,7 @@ const zr = ({
3873
3880
  children: /* @__PURE__ */ n(We, { size: 20, weight: "bold", "aria-hidden": !0 })
3874
3881
  }
3875
3882
  )
3876
- ] }), pn = ({
3883
+ ] }), vn = ({
3877
3884
  url: e,
3878
3885
  filename: t,
3879
3886
  variant: s = "pill",
@@ -3884,7 +3891,7 @@ const zr = ({
3884
3891
  }) => {
3885
3892
  const [o, d] = z(!1), h = U(
3886
3893
  (c) => {
3887
- c.stopPropagation(), !o && (d(!0), bn(e, t).catch(() => {
3894
+ c.stopPropagation(), !o && (d(!0), pn(e, t).catch(() => {
3888
3895
  }).finally(() => {
3889
3896
  d(!1), l == null || l();
3890
3897
  }));
@@ -3958,7 +3965,7 @@ const zr = ({
3958
3965
  ]
3959
3966
  }
3960
3967
  );
3961
- }, Ve = (e, t, s) => Math.min(Math.max(e, t), s), mt = ({
3968
+ }, Ve = (e, t, s) => Math.min(Math.max(e, t), s), ht = ({
3962
3969
  length: e,
3963
3970
  initialIndex: t,
3964
3971
  open: s
@@ -3983,7 +3990,7 @@ const zr = ({
3983
3990
  };
3984
3991
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3985
3992
  }, [s, e, l, o]), { index: r, prev: l, next: o };
3986
- }, ht = ({
3993
+ }, ft = ({
3987
3994
  open: e,
3988
3995
  onClose: t,
3989
3996
  ariaLabel: s,
@@ -4073,13 +4080,13 @@ const zr = ({
4073
4080
  ]
4074
4081
  }
4075
4082
  );
4076
- }, vn = ({
4083
+ }, xn = ({
4077
4084
  open: e,
4078
4085
  items: t,
4079
4086
  initialIndex: s = 0,
4080
4087
  onClose: a
4081
4088
  }) => {
4082
- const { index: r, prev: i, next: l } = mt({
4089
+ const { index: r, prev: i, next: l } = ht({
4083
4090
  length: t.length,
4084
4091
  initialIndex: s,
4085
4092
  open: e
@@ -4088,14 +4095,14 @@ const zr = ({
4088
4095
  [o]
4089
4096
  );
4090
4097
  return o ? /* @__PURE__ */ m(
4091
- ht,
4098
+ ft,
4092
4099
  {
4093
4100
  open: e,
4094
4101
  onClose: a,
4095
4102
  ariaLabel: d,
4096
4103
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
4097
4104
  actions: /* @__PURE__ */ n(
4098
- pn,
4105
+ vn,
4099
4106
  {
4100
4107
  url: o.src,
4101
4108
  filename: d,
@@ -4118,7 +4125,7 @@ const zr = ({
4118
4125
  `${r}:${o.src}`
4119
4126
  ),
4120
4127
  t.length > 1 ? /* @__PURE__ */ n(
4121
- ut,
4128
+ mt,
4122
4129
  {
4123
4130
  onPrev: i,
4124
4131
  onNext: l,
@@ -4129,7 +4136,7 @@ const zr = ({
4129
4136
  ]
4130
4137
  }
4131
4138
  ) : null;
4132
- }, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
4139
+ }, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", wn = ({
4133
4140
  tiles: e,
4134
4141
  onTileActivate: t,
4135
4142
  maxVisible: s = 4,
@@ -4226,7 +4233,7 @@ const zr = ({
4226
4233
  src: e,
4227
4234
  alt: t,
4228
4235
  items: s
4229
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
4236
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Nn = (e, t) => e.map((s, a) => ({
4230
4237
  src: s.src,
4231
4238
  alt: s.alt,
4232
4239
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
@@ -4257,16 +4264,16 @@ const zr = ({
4257
4264
  ),
4258
4265
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ne, { onClick: i }) }) : null,
4259
4266
  /* @__PURE__ */ n(
4260
- vn,
4267
+ xn,
4261
4268
  {
4262
4269
  open: l,
4263
- items: wn([{ src: e, alt: t }], s),
4270
+ items: Nn([{ src: e, alt: t }], s),
4264
4271
  initialIndex: o,
4265
4272
  onClose: h
4266
4273
  }
4267
4274
  )
4268
4275
  ] });
4269
- }, Nn = ({
4276
+ }, yn = ({
4270
4277
  state: e,
4271
4278
  src: t,
4272
4279
  alt: s,
@@ -4293,12 +4300,12 @@ const zr = ({
4293
4300
  groupPosition: l,
4294
4301
  "data-testid": "image-attachment",
4295
4302
  children: [
4296
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: x, onTileActivate: c }) }),
4303
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: x, onTileActivate: c }) }),
4297
4304
  /* @__PURE__ */ n(
4298
- vn,
4305
+ xn,
4299
4306
  {
4300
4307
  open: u,
4301
- items: wn(h, a),
4308
+ items: Nn(h, a),
4302
4309
  initialIndex: f,
4303
4310
  onClose: b
4304
4311
  }
@@ -4306,7 +4313,7 @@ const zr = ({
4306
4313
  ]
4307
4314
  }
4308
4315
  );
4309
- }, Wr = (e) => /* @__PURE__ */ n(Yr, { ...e }), qr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), Zr = {
4316
+ }, Wr = (e) => /* @__PURE__ */ n(Yr, { ...e }), qr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "received" }), Zr = {
4310
4317
  Composer: Wr,
4311
4318
  Sent: qr,
4312
4319
  Received: Xr
@@ -4316,7 +4323,7 @@ const zr = ({
4316
4323
  initialIndex: s = 0,
4317
4324
  onClose: a
4318
4325
  }) => {
4319
- const { index: r, prev: i, next: l } = mt({
4326
+ const { index: r, prev: i, next: l } = ht({
4320
4327
  length: t.length,
4321
4328
  initialIndex: s,
4322
4329
  open: e
@@ -4328,7 +4335,7 @@ const zr = ({
4328
4335
  [o]
4329
4336
  );
4330
4337
  return !o || !h ? null : /* @__PURE__ */ m(
4331
- ht,
4338
+ ft,
4332
4339
  {
4333
4340
  open: e,
4334
4341
  onClose: a,
@@ -4347,7 +4354,7 @@ const zr = ({
4347
4354
  `${r}:${o.src}`
4348
4355
  ),
4349
4356
  t.length > 1 ? /* @__PURE__ */ n(
4350
- ut,
4357
+ mt,
4351
4358
  {
4352
4359
  onPrev: i,
4353
4360
  onNext: l,
@@ -4376,7 +4383,7 @@ const zr = ({
4376
4383
  }) => {
4377
4384
  const i = t.filename ?? ne(t.src);
4378
4385
  return /* @__PURE__ */ n(
4379
- gn,
4386
+ bn,
4380
4387
  {
4381
4388
  variant: e,
4382
4389
  filename: i,
@@ -4388,7 +4395,7 @@ const zr = ({
4388
4395
  trailingAction: r
4389
4396
  }
4390
4397
  );
4391
- }, ft = ({
4398
+ }, gt = ({
4392
4399
  state: e,
4393
4400
  src: t,
4394
4401
  filename: s,
@@ -4419,7 +4426,7 @@ const zr = ({
4419
4426
  children: [
4420
4427
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, E) => {
4421
4428
  const I = w.filename ?? ne(w.src), S = v && E === 0 ? /* @__PURE__ */ n(Ne, { onClick: h, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4422
- pn,
4429
+ vn,
4423
4430
  {
4424
4431
  url: w.src,
4425
4432
  filename: I,
@@ -4452,17 +4459,17 @@ const zr = ({
4452
4459
  ]
4453
4460
  }
4454
4461
  );
4455
- }, ti = (e) => /* @__PURE__ */ n(ft, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ft, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ft, { ...e, state: "received" }), ai = {
4462
+ }, ti = (e) => /* @__PURE__ */ n(gt, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(gt, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(gt, { ...e, state: "received" }), ai = {
4456
4463
  Composer: ti,
4457
4464
  Sent: ni,
4458
4465
  Received: si
4459
- }, yn = ({
4466
+ }, _n = ({
4460
4467
  open: e,
4461
4468
  items: t,
4462
4469
  initialIndex: s = 0,
4463
4470
  onClose: a
4464
4471
  }) => {
4465
- const { index: r, prev: i, next: l } = mt({
4472
+ const { index: r, prev: i, next: l } = ht({
4466
4473
  length: t.length,
4467
4474
  initialIndex: s,
4468
4475
  open: e
@@ -4471,7 +4478,7 @@ const zr = ({
4471
4478
  [o]
4472
4479
  );
4473
4480
  return o ? /* @__PURE__ */ m(
4474
- ht,
4481
+ ft,
4475
4482
  {
4476
4483
  open: e,
4477
4484
  onClose: a,
@@ -4495,7 +4502,7 @@ const zr = ({
4495
4502
  `${r}:${o.src}`
4496
4503
  ),
4497
4504
  t.length > 1 ? /* @__PURE__ */ n(
4498
- ut,
4505
+ mt,
4499
4506
  {
4500
4507
  onPrev: i,
4501
4508
  onNext: l,
@@ -4506,7 +4513,7 @@ const zr = ({
4506
4513
  ]
4507
4514
  }
4508
4515
  ) : null;
4509
- }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(He, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
4516
+ }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(He, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4510
4517
  item: e,
4511
4518
  index: t
4512
4519
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4521,7 +4528,7 @@ const zr = ({
4521
4528
  className: "absolute inset-0 size-full rounded-md object-cover"
4522
4529
  }
4523
4530
  ) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
4524
- Ht,
4531
+ Yt,
4525
4532
  {
4526
4533
  className: "size-16 rounded-md text-white/30",
4527
4534
  weight: "regular",
@@ -4531,14 +4538,14 @@ const zr = ({
4531
4538
  /* @__PURE__ */ n(ri, {})
4532
4539
  ] }), ii = (e, t, s) => ({
4533
4540
  ariaLabel: `Play video ${t + 1} of ${s}`,
4534
- content: /* @__PURE__ */ n(_n, { item: e, index: t })
4541
+ content: /* @__PURE__ */ n(Cn, { item: e, index: t })
4535
4542
  }), oi = ({
4536
4543
  src: e,
4537
4544
  poster: t,
4538
4545
  mimeType: s,
4539
4546
  preload: a,
4540
4547
  items: r
4541
- }) => 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) => ({
4548
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], kn = (e, t) => e.map((s, a) => ({
4542
4549
  src: s.src,
4543
4550
  poster: s.poster,
4544
4551
  mimeType: s.mimeType,
@@ -4556,15 +4563,15 @@ const zr = ({
4556
4563
  onClick: () => h(0),
4557
4564
  "aria-label": "Play video",
4558
4565
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4559
- children: /* @__PURE__ */ n(_n, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4566
+ children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4560
4567
  }
4561
4568
  ),
4562
4569
  l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ne, { onClick: l }) }) : null,
4563
4570
  /* @__PURE__ */ n(
4564
- yn,
4571
+ _n,
4565
4572
  {
4566
4573
  open: o,
4567
- items: Cn(
4574
+ items: kn(
4568
4575
  [{ src: e, poster: t, mimeType: s, preload: r }],
4569
4576
  a
4570
4577
  ),
@@ -4573,7 +4580,7 @@ const zr = ({
4573
4580
  }
4574
4581
  )
4575
4582
  ] });
4576
- }, kn = ({
4583
+ }, En = ({
4577
4584
  state: e,
4578
4585
  src: t,
4579
4586
  poster: s,
@@ -4602,7 +4609,7 @@ const zr = ({
4602
4609
  "data-testid": "video-attachment",
4603
4610
  children: [
4604
4611
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4605
- xn,
4612
+ wn,
4606
4613
  {
4607
4614
  tiles: v,
4608
4615
  onTileActivate: b,
@@ -4610,10 +4617,10 @@ const zr = ({
4610
4617
  }
4611
4618
  ) }),
4612
4619
  /* @__PURE__ */ n(
4613
- yn,
4620
+ _n,
4614
4621
  {
4615
4622
  open: f,
4616
- items: Cn(g, r),
4623
+ items: kn(g, r),
4617
4624
  initialIndex: c,
4618
4625
  onClose: x
4619
4626
  }
@@ -4621,7 +4628,7 @@ const zr = ({
4621
4628
  ]
4622
4629
  }
4623
4630
  );
4624
- }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
4631
+ }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(En, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(En, { ...e, state: "received" }), mi = {
4625
4632
  Composer: ci,
4626
4633
  Sent: di,
4627
4634
  Received: ui
@@ -4696,38 +4703,38 @@ const zr = ({
4696
4703
  ] }) });
4697
4704
  };
4698
4705
  export {
4699
- sn as A,
4700
- ta as B,
4701
- er as C,
4702
- Rs as D,
4706
+ an as A,
4707
+ na as B,
4708
+ tr as C,
4709
+ Ls as D,
4703
4710
  Ti as F,
4704
4711
  Ei as L,
4705
4712
  _i as M,
4706
4713
  Se as a,
4707
4714
  oe as b,
4708
- Qt as c,
4709
- mn as d,
4715
+ en as c,
4716
+ hn as d,
4710
4717
  Ci as e,
4711
4718
  hi as f,
4712
4719
  le as g,
4713
- Pt as h,
4720
+ Bt as h,
4714
4721
  Si as i,
4715
- Sa as j,
4722
+ Ta as j,
4716
4723
  yi as k,
4717
4724
  ki as l,
4718
4725
  Rr as m,
4719
4726
  Mr as n,
4720
- Ps as o,
4727
+ Bs as o,
4721
4728
  Dr as p,
4722
- Zt as q,
4729
+ Kt as q,
4723
4730
  ge as r,
4724
- on as s,
4725
- js as t,
4731
+ ln as s,
4732
+ Us as t,
4726
4733
  Ii as u,
4727
- Bs as v,
4734
+ $s as v,
4728
4735
  rt as w,
4729
4736
  it as x,
4730
4737
  tt as y,
4731
- Ia as z
4738
+ Sa as z
4732
4739
  };
4733
- //# sourceMappingURL=index-CeHWbIiy.js.map
4740
+ //# sourceMappingURL=index-C541s_4h.js.map