@linktr.ee/messaging-react 3.5.0-rc-1782802201 → 3.5.0-rc-1782803869

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{Card-BN8zZir8.cjs → Card-B-NI0Nwx.cjs} +2 -2
  2. package/dist/{Card-BN8zZir8.cjs.map → Card-B-NI0Nwx.cjs.map} +1 -1
  3. package/dist/{Card-BP5tTT6R.js → Card-BeqtdXsT.js} +3 -3
  4. package/dist/{Card-BP5tTT6R.js.map → Card-BeqtdXsT.js.map} +1 -1
  5. package/dist/{Card-Dc-vSe7n.cjs → Card-CBcRaHQ4.cjs} +2 -2
  6. package/dist/{Card-Dc-vSe7n.cjs.map → Card-CBcRaHQ4.cjs.map} +1 -1
  7. package/dist/{Card-UOf2uGf-.cjs → Card-CDqtjzJk.cjs} +2 -2
  8. package/dist/{Card-UOf2uGf-.cjs.map → Card-CDqtjzJk.cjs.map} +1 -1
  9. package/dist/{Card-B4Pl1YDS.js → Card-CkvECMJq.js} +2 -2
  10. package/dist/{Card-B4Pl1YDS.js.map → Card-CkvECMJq.js.map} +1 -1
  11. package/dist/{Card-BS-w4E4s.js → Card-CyXIorn2.js} +2 -2
  12. package/dist/{Card-BS-w4E4s.js.map → Card-CyXIorn2.js.map} +1 -1
  13. package/dist/{LockedThumbnail-nUEb_HRw.js → LockedThumbnail-CSDhK33t.js} +2 -2
  14. package/dist/{LockedThumbnail-nUEb_HRw.js.map → LockedThumbnail-CSDhK33t.js.map} +1 -1
  15. package/dist/{LockedThumbnail-CUC76ycd.cjs → LockedThumbnail-DoyVJ55j.cjs} +2 -2
  16. package/dist/{LockedThumbnail-CUC76ycd.cjs.map → LockedThumbnail-DoyVJ55j.cjs.map} +1 -1
  17. package/dist/index-CPzRDkJV.cjs +2 -0
  18. package/dist/index-CPzRDkJV.cjs.map +1 -0
  19. package/dist/{index-CghCKfXq.js → index-MMFq_gs5.js} +641 -640
  20. package/dist/index-MMFq_gs5.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/ChannelList/ChannelList.stories.tsx +2 -1
  26. package/src/components/ChannelList/CustomChannelPreview.test.tsx +18 -9
  27. package/src/components/ChannelList/CustomChannelPreview.tsx +4 -3
  28. package/src/types.ts +5 -2
  29. package/dist/index-CghCKfXq.js.map +0 -1
  30. package/dist/index-DPP8cBmP.cjs +0 -2
  31. package/dist/index-DPP8cBmP.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import V, { createContext as We, useContext as _e, useCallback as J, useState as $, useRef as Y, useEffect as K, useId as In, useMemo as re, Suspense as Xe } from "react";
2
+ import G, { createContext as We, useContext as _e, useCallback as Z, useState as O, useRef as Y, useEffect as J, useId as In, useMemo as re, Suspense as Xe } from "react";
3
3
  import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
5
5
  import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as zn, MessageBouncePrompt as On, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as ye, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as $e, AIStates as Fe, useTypingContext as rs, useAIState as is, Channel as ls, WithComponents as os, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
6
  import { StarIcon as Ge, DotsThreeIcon as hs, SpinnerGapIcon as Te, SignOutIcon as fs, ProhibitInsetIcon as Pt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as bs, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as _s, FileDocIcon as ys, FilePdfIcon as ks, CircleNotchIcon as we, PlayIcon as He, PauseIcon as Cs, LinkIcon as Es, DownloadSimpleIcon as Ne, GiftIcon as Is, ThumbsUpIcon as Ss, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Pe, ArrowUpIcon as Ms, SparkleIcon as be, ProhibitIcon as Rs, ArrowLeftIcon as zt, CaretRightIcon as ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
- import k from "classnames";
7
+ import C from "classnames";
8
8
  import { MessageActions as Ps, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
9
9
  const Xt = We({
10
10
  service: null,
@@ -24,10 +24,10 @@ const Xt = We({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var M, y;
28
- const l = J(
29
- (I, ...C) => {
30
- i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
27
+ var M, N;
28
+ const l = Z(
29
+ (k, ...E) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${k}`, ...E);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,77 +37,77 @@ const Xt = We({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [N, w] = $(null), p = Y(!1), v = Y(null), A = Y(s);
41
- A.current = s;
40
+ const [o, d] = O(null), [u, g] = O(null), [m, f] = O(!1), [c, w] = O(!1), [_, p] = O(null), b = Y(!1), v = Y(null), y = Y(s);
41
+ y.current = s;
42
42
  const T = Y(i);
43
43
  T.current = i;
44
- const E = Y({
44
+ const I = Y({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), O = Y(0);
50
- O.current++, l("📊 RENDER INFO", {
51
- renderCount: O.current,
49
+ }), D = Y(0);
50
+ D.current++, l("📊 RENDER INFO", {
51
+ renderCount: D.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: E.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: E.current.apiKey !== a,
56
- serviceConfigChanged: E.current.serviceConfig !== s,
57
- capabilitiesChanged: E.current.capabilities !== r
54
+ userChanged: I.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: I.current.apiKey !== a,
56
+ serviceConfigChanged: I.current.serviceConfig !== s,
57
+ capabilitiesChanged: I.current.capabilities !== r
58
58
  }
59
- }), E.current = {
59
+ }), I.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const R = Y(null);
66
- a && ((M = R.current) == null ? void 0 : M.apiKey) !== a && (R.current = { apiKey: a, client: new Tn(a) });
67
- const L = a ? ((y = R.current) == null ? void 0 : y.client) ?? null : null;
68
- K(() => {
69
- const I = O.current, C = A.current;
70
- if (!a || !L || !C) {
65
+ const P = Y(null);
66
+ a && ((M = P.current) == null ? void 0 : M.apiKey) !== a && (P.current = { apiKey: a, client: new Tn(a) });
67
+ const L = a ? ((N = P.current) == null ? void 0 : N.client) ?? null : null;
68
+ J(() => {
69
+ const k = D.current, E = y.current;
70
+ if (!a || !L || !E) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: I,
72
+ renderCount: k,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  l("🚀 CREATING SERVICE", {
78
- renderCount: I,
78
+ renderCount: k,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const z = new Sn({
82
- ...C,
81
+ const $ = new Sn({
82
+ ...E,
83
83
  apiKey: a,
84
84
  debug: T.current,
85
85
  client: L
86
86
  });
87
- v.current = z, d(z), l("✅ SERVICE SET", {
88
- renderCount: I,
89
- serviceInstance: !!z
87
+ v.current = $, d($), l("✅ SERVICE SET", {
88
+ renderCount: k,
89
+ serviceInstance: !!$
90
90
  });
91
91
  }, [a, L]);
92
- const B = Y(null);
93
- K(() => {
94
- var C, z;
92
+ const F = Y(null);
93
+ J(() => {
94
+ var E, $;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: p.current,
99
+ isConnecting: b.current,
100
100
  isConnected: m,
101
101
  dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
102
  }), !o || !t) {
103
103
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (p.current) {
106
+ if (b.current) {
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((C = B.current) == null ? void 0 : C.serviceId) === o && ((z = B.current) == null ? void 0 : z.userId) === t.id) {
110
+ if (((E = F.current) == null ? void 0 : E.serviceId) === o && (($ = F.current) == null ? void 0 : $.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,35 +115,35 @@ const Xt = We({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), w(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), p(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const D = await o.connectUser(t);
122
- g(D), f(!0), B.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const A = await o.connectUser(t);
122
+ g(A), f(!0), F.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: D.userID
124
+ clientId: A.userID
125
125
  });
126
- } catch (D) {
127
- const j = D instanceof Error ? D.message : "Connection failed";
128
- w(j), l("❌ USER CONNECTION ERROR", {
126
+ } catch (A) {
127
+ const j = A instanceof Error ? A.message : "Connection failed";
128
+ p(j), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: j
131
131
  });
132
132
  } finally {
133
- b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ w(!1), b.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: m
136
136
  });
137
137
  }
138
138
  })();
139
- }, [o, t, l, m]), K(() => {
140
- const I = L;
139
+ }, [o, t, l, m]), J(() => {
140
+ const k = L;
141
141
  return () => {
142
- var C;
143
- I && (B.current = null, (C = v.current) == null || C.disconnectUser().catch(console.error));
142
+ var E;
143
+ k && (F.current = null, (E = v.current) == null || E.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [L]);
146
- const P = J(async () => {
146
+ const z = Z(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
149
149
  hasUser: !!t
@@ -151,52 +151,52 @@ const Xt = We({
151
151
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
- const I = await o.connectUser(t);
158
- g(I), f(!0), w(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (I) {
160
- const C = I instanceof Error ? I.message : "Refresh failed";
161
- w(C), l("❌ CONNECTION REFRESH ERROR", {
157
+ const k = await o.connectUser(t);
158
+ g(k), f(!0), p(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (k) {
160
+ const E = k instanceof Error ? k.message : "Refresh failed";
161
+ p(E), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: C
163
+ error: E
164
164
  });
165
165
  } finally {
166
- b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [o, t, l]), _ = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [o, t, l]), R = G.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!u,
171
171
  isConnected: m,
172
172
  isLoading: c,
173
- hasError: !!N,
173
+ hasError: !!_,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: o,
177
177
  client: u,
178
178
  isConnected: m,
179
179
  isLoading: c,
180
- error: N,
180
+ error: _,
181
181
  capabilities: r,
182
- refreshConnection: P,
182
+ refreshConnection: z,
183
183
  debug: i
184
184
  }), [
185
185
  o,
186
186
  u,
187
187
  m,
188
188
  c,
189
- N,
189
+ _,
190
190
  r,
191
- P,
191
+ z,
192
192
  i,
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: O.current,
196
+ renderCount: D.current,
197
197
  willRenderChat: !!L,
198
- contextValueReady: !!_
199
- }), /* @__PURE__ */ n(Xt.Provider, { value: _, children: L ? /* @__PURE__ */ n(
198
+ contextValueReady: !!R
199
+ }), /* @__PURE__ */ n(Xt.Provider, { value: R, children: L ? /* @__PURE__ */ n(
200
200
  An,
201
201
  {
202
202
  client: L,
@@ -208,10 +208,10 @@ const Xt = We({
208
208
  ) : e });
209
209
  }, zs = () => Je(), Kt = (e) => {
210
210
  var a, r;
211
- const [t, s] = $(
211
+ const [t, s] = O(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
- return K(() => {
214
+ return J(() => {
215
215
  var l;
216
216
  if (!e) {
217
217
  s(!1);
@@ -299,7 +299,7 @@ const ne = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: k(
302
+ className: C(
303
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
304
304
  u
305
305
  ),
@@ -309,7 +309,7 @@ const ne = ({
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: k(
312
+ className: C(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -331,7 +331,7 @@ const ne = ({
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: k(
334
+ className: C(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
@@ -364,72 +364,72 @@ const ne = ({
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
366
  var M;
367
- const { service: m, debug: f } = Je(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, b = !!(a && s && m && c), [N, w] = $(!1), [p, v] = $(null), [A, T] = $(!1), [E, O] = $(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
368
- return K(() => {
369
- if (!b || !m || !c) {
370
- w(!1), v(null);
367
+ const { service: m, debug: f } = Je(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, w = !!(a && s && m && c), [_, p] = O(!1), [b, v] = O(null), [y, T] = O(!1), [I, D] = O(!1), P = w && ((b == null ? void 0 : b.participantId) !== c || (b == null ? void 0 : b.service) !== m);
368
+ return J(() => {
369
+ if (!w || !m || !c) {
370
+ p(!1), v(null);
371
371
  return;
372
372
  }
373
- let y = !1;
373
+ let N = !1;
374
374
  return (async () => {
375
375
  try {
376
- const I = await m.getBlockedUsers();
377
- if (y) return;
378
- w(
379
- I.some(
380
- (C) => C.blocked_user_id === c
376
+ const k = await m.getBlockedUsers();
377
+ if (N) return;
378
+ p(
379
+ k.some(
380
+ (E) => E.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (I) {
384
- y || console.error(`[${g}] Failed to check blocked status:`, I);
383
+ } catch (k) {
384
+ N || console.error(`[${g}] Failed to check blocked status:`, k);
385
385
  } finally {
386
- y || v({ participantId: c, service: m });
386
+ N || v({ participantId: c, service: m });
387
387
  }
388
388
  })(), () => {
389
- y = !0;
389
+ N = !0;
390
390
  };
391
- }, [b, m, c, g]), {
392
- isParticipantBlocked: N,
393
- isCheckingBlockedStatus: R,
394
- isLeaving: A,
395
- isUpdatingBlockStatus: E,
391
+ }, [w, m, c, g]), {
392
+ isParticipantBlocked: _,
393
+ isCheckingBlockedStatus: P,
394
+ isLeaving: y,
395
+ isUpdatingBlockStatus: I,
396
396
  handleLeaveConversation: async () => {
397
- var y;
398
- if (!A) {
397
+ var N;
398
+ if (!y) {
399
399
  l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
400
400
  try {
401
- const I = ((y = e._client) == null ? void 0 : y.userID) ?? null;
402
- await e.hide(I, !1), r && await r(e), u == null || u();
403
- } catch (I) {
404
- console.error(`[${g}] Failed to leave conversation`, I);
401
+ const k = ((N = e._client) == null ? void 0 : N.userID) ?? null;
402
+ await e.hide(k, !1), r && await r(e), u == null || u();
403
+ } catch (k) {
404
+ console.error(`[${g}] Failed to leave conversation`, k);
405
405
  } finally {
406
406
  T(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var y, I, C;
412
- if (!(E || !m)) {
413
- o == null || o(), f && console.log(`[${g}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
411
+ var N, k, E;
412
+ if (!(I || !m)) {
413
+ o == null || o(), f && console.log(`[${g}] Block member`, (N = t == null ? void 0 : t.user) == null ? void 0 : N.id), D(!0);
414
414
  try {
415
- await m.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
416
- } catch (z) {
417
- console.error(`[${g}] Failed to block member`, z);
415
+ await m.blockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), u == null || u();
416
+ } catch ($) {
417
+ console.error(`[${g}] Failed to block member`, $);
418
418
  } finally {
419
- O(!1);
419
+ D(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var y, I, C;
425
- if (!(E || !m)) {
426
- o == null || o(), f && console.log(`[${g}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
424
+ var N, k, E;
425
+ if (!(I || !m)) {
426
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (N = t == null ? void 0 : t.user) == null ? void 0 : N.id), D(!0);
427
427
  try {
428
- await m.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
429
- } catch (z) {
430
- console.error(`[${g}] Failed to unblock member`, z);
428
+ await m.unBlockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), u == null || u();
429
+ } catch ($) {
430
+ console.error(`[${g}] Failed to unblock member`, $);
431
431
  } finally {
432
- O(!1);
432
+ D(!1);
433
433
  }
434
434
  }
435
435
  },
@@ -446,7 +446,7 @@ const ne = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: k(
449
+ className: C(
450
450
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
451
451
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
452
452
  t
@@ -468,14 +468,14 @@ const ne = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: m
470
470
  }) => {
471
- const [f, c] = $(!1), b = Y(null), N = In(), w = J(() => c(!1), []), {
472
- isParticipantBlocked: p,
471
+ const [f, c] = O(!1), w = Y(null), _ = In(), p = Z(() => c(!1), []), {
472
+ isParticipantBlocked: b,
473
473
  isCheckingBlockedStatus: v,
474
- isLeaving: A,
474
+ isLeaving: y,
475
475
  isUpdatingBlockStatus: T,
476
- handleLeaveConversation: E,
477
- handleBlockUser: O,
478
- handleUnblockUser: R,
476
+ handleLeaveConversation: I,
477
+ handleBlockUser: D,
478
+ handleUnblockUser: P,
479
479
  handleReportUser: L
480
480
  } = js({
481
481
  channel: e,
@@ -487,20 +487,20 @@ const ne = ({
487
487
  onDeleteConversationClick: o,
488
488
  onBlockParticipantClick: d,
489
489
  onReportParticipantClick: u,
490
- onActionComplete: w,
490
+ onActionComplete: p,
491
491
  logLabel: "ChannelActionsMenu"
492
492
  });
493
- return K(() => {
493
+ return J(() => {
494
494
  if (!f) return;
495
- const P = (M) => {
496
- b.current && !b.current.contains(M.target) && c(!1);
497
- }, _ = (M) => {
495
+ const z = (M) => {
496
+ w.current && !w.current.contains(M.target) && c(!1);
497
+ }, R = (M) => {
498
498
  M.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", P), document.addEventListener("keydown", _), () => {
501
- document.removeEventListener("mousedown", P), document.removeEventListener("keydown", _);
500
+ return document.addEventListener("mousedown", z), document.addEventListener("keydown", R), () => {
501
+ document.removeEventListener("mousedown", z), document.removeEventListener("keydown", R);
502
502
  };
503
- }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
503
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: w, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
505
505
  "button",
506
506
  {
@@ -508,8 +508,8 @@ const ne = ({
508
508
  type: "button",
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
- "aria-controls": f ? N : void 0,
512
- onClick: () => c((P) => !P),
511
+ "aria-controls": f ? _ : void 0,
512
+ onClick: () => c((z) => !z),
513
513
  children: [
514
514
  /* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
515
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -519,9 +519,9 @@ const ne = ({
519
519
  f && /* @__PURE__ */ n(
520
520
  "div",
521
521
  {
522
- id: N,
522
+ id: _,
523
523
  "aria-label": "Conversation options",
524
- className: k(
524
+ className: C(
525
525
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
526
526
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
527
527
  ),
@@ -529,11 +529,11 @@ const ne = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  pe,
531
531
  {
532
- onClick: E,
533
- disabled: A,
534
- "aria-busy": A,
532
+ onClick: I,
533
+ disabled: y,
534
+ "aria-busy": y,
535
535
  children: [
536
- A ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
536
+ y ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
537
537
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
538
538
  ]
539
539
  }
@@ -545,10 +545,10 @@ const ne = ({
545
545
  /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
- ) : p ? /* @__PURE__ */ h(
548
+ ) : b ? /* @__PURE__ */ h(
549
549
  pe,
550
550
  {
551
- onClick: R,
551
+ onClick: P,
552
552
  disabled: T,
553
553
  "aria-busy": T,
554
554
  children: [
@@ -559,7 +559,7 @@ const ne = ({
559
559
  ) : /* @__PURE__ */ h(
560
560
  pe,
561
561
  {
562
- onClick: O,
562
+ onClick: D,
563
563
  disabled: T,
564
564
  "aria-busy": T,
565
565
  children: [
@@ -585,7 +585,7 @@ function Hs(e) {
585
585
  const { channel: t } = de(), { client: s } = Ke("useMessageVote"), a = re(
586
586
  () => Gs(e.own_reactions),
587
587
  [e.own_reactions]
588
- ), r = J(async () => {
588
+ ), r = Z(async () => {
589
589
  if (s != null && s.userID)
590
590
  try {
591
591
  a === "up" ? await t.deleteReaction(e.id, Ye) : await t.sendReaction(
@@ -595,7 +595,7 @@ function Hs(e) {
595
595
  );
596
596
  } catch {
597
597
  }
598
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = J(async () => {
598
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = Z(async () => {
599
599
  if (s != null && s.userID)
600
600
  try {
601
601
  a === "down" ? await t.deleteReaction(e.id, qe) : await t.sendReaction(
@@ -619,7 +619,7 @@ function Zt({
619
619
  const s = e == null ? void 0 : e.text, a = Ys(t);
620
620
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
621
621
  }
622
- const qs = V.lazy(() => import("./Card-BS-w4E4s.js")), Ws = V.lazy(() => import("./Card-B4Pl1YDS.js")), Xs = V.lazy(() => import("./Card-BP5tTT6R.js")), Ze = () => /* @__PURE__ */ n(
622
+ const qs = G.lazy(() => import("./Card-CyXIorn2.js")), Ws = G.lazy(() => import("./Card-CkvECMJq.js")), Xs = G.lazy(() => import("./Card-BeqtdXsT.js")), Ze = () => /* @__PURE__ */ n(
623
623
  "div",
624
624
  {
625
625
  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)]",
@@ -665,7 +665,7 @@ function na(e) {
665
665
  return t !== "document" ? ea[t] : ta[tn(e)];
666
666
  }
667
667
  function ce(e, t) {
668
- return V.createElement(na(e), t);
668
+ return G.createElement(na(e), t);
669
669
  }
670
670
  const sa = (e) => {
671
671
  var t, s;
@@ -682,9 +682,9 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: u
684
684
  }) => {
685
- const g = ie(t), m = Y(null), f = Y(null), c = Y(null), b = Y(r), [N, w] = $(a), [p, v] = $(0), [A, T] = $(!1), [E, O] = $(!1), [R, L] = $(!1), [B, P] = $(!1), [_, M] = $(!0), [y, I] = $(null), C = J(() => {
686
- L(!1), w(!0);
687
- }, []), z = J((x) => {
685
+ const g = ie(t), m = Y(null), f = Y(null), c = Y(null), w = Y(r), [_, p] = O(a), [b, v] = O(0), [y, T] = O(!1), [I, D] = O(!1), [P, L] = O(!1), [F, z] = O(!1), [R, M] = O(!0), [N, k] = O(null), E = Z(() => {
686
+ L(!1), p(!0);
687
+ }, []), $ = Z((x) => {
688
688
  const S = f.current;
689
689
  if (!S) return 0;
690
690
  const U = S.getBoundingClientRect();
@@ -692,56 +692,56 @@ const sa = (e) => {
692
692
  0,
693
693
  Math.min(1, (sa(x) - U.left) / U.width)
694
694
  );
695
- }, []), D = J((x) => {
695
+ }, []), A = Z((x) => {
696
696
  const S = m.current;
697
697
  S && S.duration && (S.currentTime = x * S.duration);
698
698
  }, []), j = (x) => {
699
699
  x.stopPropagation(), T(!0);
700
- const S = z(x);
701
- v(S), D(S);
700
+ const S = $(x);
701
+ v(S), A(S);
702
702
  };
703
- K(() => {
704
- r !== void 0 && r !== b.current && (b.current = r, w(r));
705
- }, [r]), K(() => {
706
- if (!N) {
703
+ J(() => {
704
+ r !== void 0 && r !== w.current && (w.current = r, p(r));
705
+ }, [r]), J(() => {
706
+ if (!_) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
710
  const x = () => {
711
711
  const S = m.current;
712
- S && S.duration && !A && v(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
712
+ S && S.duration && !y && v(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
713
713
  };
714
714
  return c.current = requestAnimationFrame(x), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [N, A]), K(() => {
717
+ }, [_, y]), J(() => {
718
718
  const x = m.current;
719
- x && (N ? x.play().catch((S) => {
720
- w(!1), L(!0);
719
+ x && (_ ? x.play().catch((S) => {
720
+ p(!1), L(!0);
721
721
  }) : x.pause());
722
- }, [N]), K(() => {
723
- if (!A) return;
724
- const x = (U) => v(z(U)), S = (U) => {
725
- T(!1), D(z(U));
722
+ }, [_]), J(() => {
723
+ if (!y) return;
724
+ const x = (U) => v($(U)), S = (U) => {
725
+ T(!1), A($(U));
726
726
  };
727
727
  return window.addEventListener("mousemove", x), window.addEventListener("mouseup", S), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", S), () => {
728
728
  window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", S);
729
729
  };
730
- }, [A, z, D]);
731
- const Z = y ? { aspectRatio: String(y) } : void 0, Q = y ? "" : " aspect-video", G = Math.round(p * 100);
730
+ }, [y, $, A]);
731
+ const Q = N ? { aspectRatio: String(N) } : void 0, X = N ? "" : " aspect-video", V = Math.round(b * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
738
- style: Z,
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${X}`,
738
+ style: Q,
739
739
  onClick: (x) => {
740
740
  if (u) {
741
741
  u(x);
742
742
  return;
743
743
  }
744
- R || l && w((S) => !S);
744
+ P || l && p((S) => !S);
745
745
  },
746
746
  onKeyDown: (x) => {
747
747
  if (!(x.key !== "Enter" && x.key !== " ")) {
@@ -749,11 +749,11 @@ const sa = (e) => {
749
749
  u(x);
750
750
  return;
751
751
  }
752
- R || l && w((S) => !S);
752
+ P || l && p((S) => !S);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || _) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || R) && /* @__PURE__ */ n(
757
757
  "img",
758
758
  {
759
759
  src: s,
@@ -761,7 +761,7 @@ const sa = (e) => {
761
761
  className: "absolute inset-0 h-full w-full object-cover"
762
762
  }
763
763
  ),
764
- !s && (g === "audio" || _) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
@@ -773,14 +773,14 @@ const sa = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => P(!0),
776
+ onLoadStart: () => z(!0),
777
777
  onCanPlay: () => {
778
- P(!1), M(!1);
778
+ z(!1), M(!1);
779
779
  },
780
- onWaiting: () => P(!0),
780
+ onWaiting: () => z(!0),
781
781
  onPlay: () => L(!1),
782
782
  onEnded: () => {
783
- i || (w(!1), v(0));
783
+ i || (p(!1), v(0));
784
784
  },
785
785
  children: /* @__PURE__ */ n("track", { kind: "captions" })
786
786
  }
@@ -793,30 +793,30 @@ const sa = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => P(!0),
796
+ onLoadStart: () => z(!0),
797
797
  onCanPlay: () => {
798
- P(!1), M(!1);
798
+ z(!1), M(!1);
799
799
  },
800
- onWaiting: () => P(!0),
800
+ onWaiting: () => z(!0),
801
801
  onPlay: () => L(!1),
802
802
  onLoadedMetadata: () => {
803
803
  const x = m.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && I(x.videoWidth / x.videoHeight);
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && k(x.videoWidth / x.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
- i || (w(!1), v(0));
807
+ i || (p(!1), v(0));
808
808
  },
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- B && !R && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ F && !P && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
813
  we,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
817
817
  }
818
818
  ) }),
819
- R && !l && /* @__PURE__ */ n(
819
+ P && !l && /* @__PURE__ */ n(
820
820
  "div",
821
821
  {
822
822
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -824,10 +824,10 @@ const sa = (e) => {
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
826
  onClick: (x) => {
827
- x.stopPropagation(), C();
827
+ x.stopPropagation(), E();
828
828
  },
829
829
  onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), C());
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), E());
831
831
  },
832
832
  children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(He, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
@@ -837,7 +837,7 @@ const sa = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": G,
840
+ "aria-valuenow": V,
841
841
  "aria-valuemin": 0,
842
842
  "aria-valuemax": 100,
843
843
  tabIndex: 0,
@@ -847,13 +847,13 @@ const sa = (e) => {
847
847
  onTouchStart: j,
848
848
  onClick: (x) => x.stopPropagation(),
849
849
  onKeyDown: (x) => {
850
- x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
850
+ x.key === "ArrowRight" && A(Math.min(1, b + 0.05)), x.key === "ArrowLeft" && A(Math.max(0, b - 0.05));
851
851
  },
852
852
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
853
853
  "div",
854
854
  {
855
855
  className: "h-full rounded-full bg-white",
856
- style: { width: `${G}%` }
856
+ style: { width: `${V}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -864,11 +864,11 @@ const sa = (e) => {
864
864
  {
865
865
  type: "button",
866
866
  onClick: (x) => {
867
- x.stopPropagation(), w((S) => !S);
867
+ x.stopPropagation(), p((S) => !S);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
- "aria-label": N ? "Pause" : "Play",
871
- children: N ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
870
+ "aria-label": _ ? "Pause" : "Play",
871
+ children: _ ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
872
872
  }
873
873
  ),
874
874
  /* @__PURE__ */ h(
@@ -876,7 +876,7 @@ const sa = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": G,
879
+ "aria-valuenow": V,
880
880
  "aria-valuemin": 0,
881
881
  "aria-valuemax": 100,
882
882
  tabIndex: 0,
@@ -885,21 +885,21 @@ const sa = (e) => {
885
885
  onMouseDown: j,
886
886
  onTouchStart: j,
887
887
  onClick: (x) => x.stopPropagation(),
888
- onMouseEnter: () => O(!0),
889
- onMouseLeave: () => O(!1),
888
+ onMouseEnter: () => D(!0),
889
+ onMouseLeave: () => D(!1),
890
890
  onKeyDown: (x) => {
891
- x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
891
+ x.key === "ArrowRight" && A(Math.min(1, b + 0.05)), x.key === "ArrowLeft" && A(Math.max(0, b - 0.05));
892
892
  },
893
893
  children: [
894
894
  /* @__PURE__ */ n(
895
895
  "div",
896
896
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${E || A ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${I || y ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
901
901
  className: "h-full rounded-full bg-white",
902
- style: { width: `${G}%` }
902
+ style: { width: `${V}%` }
903
903
  }
904
904
  )
905
905
  }
@@ -907,8 +907,8 @@ const sa = (e) => {
907
907
  /* @__PURE__ */ n(
908
908
  "div",
909
909
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${E || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${G}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${I || y ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${V}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -927,7 +927,7 @@ const sa = (e) => {
927
927
  mediaPlayerProps: i,
928
928
  containedImage: l = !1
929
929
  }) => {
930
- const o = ie(e), [d, u] = $(!1);
930
+ const o = ie(e), [d, u] = O(!1);
931
931
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
932
932
  aa,
933
933
  {
@@ -1012,13 +1012,13 @@ const sa = (e) => {
1012
1012
  rootRef: g,
1013
1013
  "data-testid": m
1014
1014
  }) => {
1015
- const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
1015
+ const f = e === "dark", c = f ? s ?? a : s ?? "", w = f && !s;
1016
1016
  return /* @__PURE__ */ h(
1017
1017
  "div",
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": m,
1021
- className: k(
1021
+ className: C(
1022
1022
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1023
1023
  f ? "bg-[#121110]" : "bg-white"
1024
1024
  ),
@@ -1030,17 +1030,17 @@ const sa = (e) => {
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: k("mb-0.5 truncate text-base font-medium", {
1033
+ className: C("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
- "text-white/30": f && b,
1036
- "text-white": f && !b
1035
+ "text-white/30": f && w,
1036
+ "text-white": f && !w
1037
1037
  }),
1038
1038
  children: c
1039
1039
  }
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
1042
  ce(r, {
1043
- className: k(
1043
+ className: C(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,7 +1049,7 @@ const sa = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: k(
1052
+ className: C(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
@@ -1086,7 +1086,7 @@ function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
1088
  const et = ({ attachment: e, isMyMessage: t }) => {
1089
- 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, u = /* @__PURE__ */ h(V.Fragment, { children: [
1089
+ 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, u = /* @__PURE__ */ h(G.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1132,7 +1132,7 @@ const ma = ({
1132
1132
  url: e,
1133
1133
  filename: t
1134
1134
  }) => {
1135
- const [s, a] = $(!1);
1135
+ const [s, a] = O(!1);
1136
1136
  return /* @__PURE__ */ n(
1137
1137
  "button",
1138
1138
  {
@@ -1148,7 +1148,7 @@ const ma = ({
1148
1148
  },
1149
1149
  disabled: s,
1150
1150
  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",
1151
- children: s ? /* @__PURE__ */ n(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(V.Fragment, { children: [
1151
+ children: s ? /* @__PURE__ */ n(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(G.Fragment, { children: [
1152
1152
  /* @__PURE__ */ n(Ne, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
@@ -1156,15 +1156,15 @@ const ma = ({
1156
1156
  );
1157
1157
  };
1158
1158
  function nt(e) {
1159
- var m, f, c, b;
1159
+ var m, f, c, w;
1160
1160
  const t = (m = e.attachments) == null ? void 0 : m.find(
1161
- (N) => N.type === "video" && N.asset_url
1161
+ (_) => _.type === "video" && _.asset_url
1162
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
- (N) => N.type === "image" && N.image_url
1163
+ (_) => _.type === "image" && _.image_url
1164
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
- (N) => N.type === "audio" && N.asset_url
1166
- ), r = (b = e.attachments) == null ? void 0 : b.find(
1167
- (N) => N.type === "file" && N.asset_url
1165
+ (_) => _.type === "audio" && _.asset_url
1166
+ ), r = (w = e.attachments) == null ? void 0 : w.find(
1167
+ (_) => _.type === "file" && _.asset_url
1168
1168
  ), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
1169
  if (!l) return null;
1170
1170
  const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
@@ -1336,10 +1336,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1336
1336
  if (r) {
1337
1337
  const f = (m = e.metadata) == null ? void 0 : m.amount_text;
1338
1338
  if (!f) return null;
1339
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1339
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", w = t ? `${f} tip` : `Delivered with ${f} tip`;
1340
1340
  return /* @__PURE__ */ h("div", { className: c, children: [
1341
1341
  /* @__PURE__ */ n(Is, { size: t ? 14 : 12 }),
1342
- /* @__PURE__ */ n("span", { children: b })
1342
+ /* @__PURE__ */ n("span", { children: w })
1343
1343
  ] });
1344
1344
  }
1345
1345
  const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: k("message-vote-button focus-ring", {
1366
+ className: C("message-vote-button focus-ring", {
1367
1367
  "message-vote-button--selected": e === "up"
1368
1368
  }),
1369
1369
  onClick: t,
@@ -1377,7 +1377,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
- className: k("message-vote-button focus-ring", {
1380
+ className: C("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1403,43 +1403,43 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1403
1403
  isMessageAIGenerated: m,
1404
1404
  isMyMessage: f,
1405
1405
  message: c,
1406
- renderText: b,
1407
- threadList: N,
1408
- viewerLanguage: w
1409
- } = e, { client: p } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: E, onDownloadClick: O } = va("LockedAttachment"), [R, L] = $(!1), B = Ln(c.id), { selected: P, voteUp: _, voteDown: M } = Hs(c), {
1410
- Attachment: y = Dn,
1411
- EditMessageModal: I = Pn,
1412
- MessageActions: C,
1413
- MessageBlocked: z = zn,
1414
- MessageBouncePrompt: D = On,
1406
+ renderText: w,
1407
+ threadList: _,
1408
+ viewerLanguage: p
1409
+ } = e, { client: b } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: y, onUnlockClick: T, onFetchSource: I, onDownloadClick: D } = va("LockedAttachment"), [P, L] = O(!1), F = Ln(c.id), { selected: z, voteUp: R, voteDown: M } = Hs(c), {
1410
+ Attachment: N = Dn,
1411
+ EditMessageModal: k = Pn,
1412
+ MessageActions: E,
1413
+ MessageBlocked: $ = zn,
1414
+ MessageBouncePrompt: A = On,
1415
1415
  MessageDeleted: j = $n,
1416
- MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
1417
- MessageRepliesCountButton: Q = Bn,
1418
- ReminderNotification: G = Un,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: Q = Fn,
1417
+ MessageRepliesCountButton: X = Bn,
1418
+ ReminderNotification: V = Un,
1419
1419
  StreamedMessageText: x = jn,
1420
1420
  PinIndicator: S
1421
1421
  } = Gt("CustomMessage"), U = Vn(c), H = Gn(c), q = re(
1422
1422
  () => m == null ? void 0 : m(c),
1423
1423
  [m, c]
1424
- ), F = re(() => {
1424
+ ), B = re(() => {
1425
1425
  const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
1426
1426
  if (!Me(c)) return Se;
1427
1427
  const Mt = Se.filter((Rt) => !("type" in Rt) || !rn(Rt));
1428
1428
  return Mt.length === Se.length ? Se : Mt;
1429
1429
  }, [c]), W = re(() => {
1430
- const ge = Zt({ message: c, viewerLanguage: w });
1430
+ const ge = Zt({ message: c, viewerLanguage: p });
1431
1431
  return ge === c.text ? c : { ...c, text: ge };
1432
- }, [c, w]);
1432
+ }, [c, p]);
1433
1433
  if (Hn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
1436
  return /* @__PURE__ */ n(j, { message: c });
1437
1437
  if (Yn(c))
1438
- return /* @__PURE__ */ n(z, {});
1439
- const X = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
1438
+ return /* @__PURE__ */ n($, {});
1439
+ const K = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
1440
1440
  let ee;
1441
1441
  me ? ee = () => u(c) : he && (ee = () => L(!0));
1442
- const te = f(), le = k(
1442
+ const te = f(), le = C(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
@@ -1451,25 +1451,25 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
1452
  "str-chat__message--with-reactions": H,
1453
1453
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((vt = c == null ? void 0 : c.error) == null ? void 0 : vt.status) !== 403,
1454
- "str-chat__message-with-thread-link": X || ue,
1454
+ "str-chat__message-with-thread-link": K || ue,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
1457
  "str-chat__virtual-message__wrapper--group": l
1458
1458
  }
1459
- ), ht = c.poll_id && p.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(F != null && F.length && !c.quoted_message), pt = fe && te && Oe;
1459
+ ), ht = c.poll_id && b.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(B != null && B.length && !c.quoted_message), pt = fe && te && Oe;
1460
1460
  return /* @__PURE__ */ h(se, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- I,
1462
+ k,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- R && /* @__PURE__ */ n(
1467
+ P && /* @__PURE__ */ n(
1468
1468
  Wn,
1469
1469
  {
1470
- MessageBouncePrompt: D,
1470
+ MessageBouncePrompt: A,
1471
1471
  onClose: () => L(!1),
1472
- open: R
1472
+ open: P
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
@@ -1480,7 +1480,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1480
1480
  "data-dd-privacy": "mask",
1481
1481
  children: [
1482
1482
  S && /* @__PURE__ */ n(S, {}),
1483
- !!B && /* @__PURE__ */ n(G, { reminder: B }),
1483
+ !!F && /* @__PURE__ */ n(V, { reminder: F }),
1484
1484
  c.user && /* @__PURE__ */ n(
1485
1485
  ne,
1486
1486
  {
@@ -1496,7 +1496,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1496
1496
  /* @__PURE__ */ n(
1497
1497
  "div",
1498
1498
  {
1499
- className: k("str-chat__message-inner", {
1499
+ className: C("str-chat__message-inner", {
1500
1500
  "str-chat__simple-message--error-failed": me || he
1501
1501
  }),
1502
1502
  "data-testid": "message-inner",
@@ -1512,7 +1512,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1512
1512
  },
1513
1513
  children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1514
1514
  te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1515
- C && /* @__PURE__ */ n(C, {}),
1515
+ E && /* @__PURE__ */ n(E, {}),
1516
1516
  /* @__PURE__ */ n(
1517
1517
  Bt.Sent,
1518
1518
  {
@@ -1523,7 +1523,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1523
1523
  detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1524
1524
  paymentStatus: (kt = c.metadata) == null ? void 0 : kt.payment_status,
1525
1525
  onPreviewClick: () => T == null ? void 0 : T(c, v),
1526
- onFetchSource: async () => await (E == null ? void 0 : E(c, v))
1526
+ onFetchSource: async () => await (I == null ? void 0 : I(c, v))
1527
1527
  }
1528
1528
  )
1529
1529
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1536,19 +1536,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1536
1536
  amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
1537
1537
  detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1538
1538
  paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1539
- isUnlocking: A(c.id),
1539
+ isUnlocking: y(c.id),
1540
1540
  onUnlockClick: () => T == null ? void 0 : T(c, v),
1541
- onFetchSource: async () => await (E == null ? void 0 : E(c, v)),
1542
- onDownloadClick: () => O == null ? void 0 : O(c, v)
1541
+ onFetchSource: async () => await (I == null ? void 0 : I(c, v)),
1542
+ onDownloadClick: () => D == null ? void 0 : D(c, v)
1543
1543
  }
1544
1544
  ),
1545
- C && /* @__PURE__ */ n(C, {})
1545
+ E && /* @__PURE__ */ n(E, {})
1546
1546
  ] }),
1547
1547
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1548
1548
  Dt,
1549
1549
  {
1550
1550
  message: W,
1551
- renderText: b
1551
+ renderText: w
1552
1552
  }
1553
1553
  ) })
1554
1554
  ] }) : ft ? (
@@ -1564,24 +1564,24 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1564
1564
  }
1565
1565
  ),
1566
1566
  ht && /* @__PURE__ */ n(Xn, { poll: ht }),
1567
- F != null && F.length && !c.quoted_message ? /* @__PURE__ */ n(
1568
- y,
1567
+ B != null && B.length && !c.quoted_message ? /* @__PURE__ */ n(
1568
+ N,
1569
1569
  {
1570
1570
  actionHandler: o,
1571
- attachments: F
1571
+ attachments: B
1572
1572
  }
1573
1573
  ) : null,
1574
1574
  q ? /* @__PURE__ */ n(
1575
1575
  x,
1576
1576
  {
1577
1577
  message: W,
1578
- renderText: b
1578
+ renderText: w
1579
1579
  }
1580
1580
  ) : /* @__PURE__ */ n(
1581
1581
  Dt,
1582
1582
  {
1583
1583
  message: W,
1584
- renderText: b
1584
+ renderText: w
1585
1585
  }
1586
1586
  ),
1587
1587
  /* @__PURE__ */ n(Kn, {})
@@ -1600,26 +1600,26 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1600
1600
  s && fe && /* @__PURE__ */ n(
1601
1601
  ka,
1602
1602
  {
1603
- selected: P,
1604
- onVoteUp: _,
1603
+ selected: z,
1604
+ onVoteUp: R,
1605
1605
  onVoteDown: M
1606
1606
  }
1607
1607
  )
1608
1608
  ] }),
1609
- X && /* @__PURE__ */ n(
1610
- Q,
1609
+ K && /* @__PURE__ */ n(
1610
+ X,
1611
1611
  {
1612
1612
  onClick: d,
1613
1613
  reply_count: c.reply_count
1614
1614
  }
1615
1615
  ),
1616
- ue && /* @__PURE__ */ n(Z, {})
1616
+ ue && /* @__PURE__ */ n(Q, {})
1617
1617
  ]
1618
1618
  },
1619
1619
  c.id
1620
1620
  )
1621
1621
  ] });
1622
- }, Ea = V.memo(
1622
+ }, Ea = G.memo(
1623
1623
  Ca,
1624
1624
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1625
1625
  ), Ia = (e) => {
@@ -1721,7 +1721,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1721
1721
  },
1722
1722
  r.og_scrape_url
1723
1723
  )) }) : null;
1724
- }, st = V.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
+ }, st = G.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1725
1725
  "button",
1726
1726
  {
1727
1727
  ...s,
@@ -1928,16 +1928,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1928
1928
  Fe.Generating,
1929
1929
  Fe.ExternalSources
1930
1930
  ]), qa = ({ threadList: e }) => {
1931
- var b, N;
1931
+ var w, _;
1932
1932
  const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = _e(un);
1933
1933
  if (!e && o && Ya.has(l)) {
1934
- const w = Wa(t, (b = r.user) == null ? void 0 : b.id);
1934
+ const p = Wa(t, (w = r.user) == null ? void 0 : w.id);
1935
1935
  return /* @__PURE__ */ n(
1936
1936
  Vt,
1937
1937
  {
1938
- avatarId: (w == null ? void 0 : w.id) ?? "ai-agent",
1939
- avatarName: (w == null ? void 0 : w.name) ?? (w == null ? void 0 : w.id) ?? "Agent",
1940
- avatarImage: w == null ? void 0 : w.image,
1938
+ avatarId: (p == null ? void 0 : p.id) ?? "ai-agent",
1939
+ avatarName: (p == null ? void 0 : p.name) ?? (p == null ? void 0 : p.id) ?? "Agent",
1940
+ avatarImage: p == null ? void 0 : p.image,
1941
1941
  testId: "typing-indicator-ai"
1942
1942
  }
1943
1943
  );
@@ -1945,19 +1945,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1945
1945
  if ((s == null ? void 0 : s.typing_events) === !1)
1946
1946
  return null;
1947
1947
  const u = e ? [] : Object.values(i).filter(
1948
- ({ parent_id: w, user: p }) => {
1948
+ ({ parent_id: p, user: b }) => {
1949
1949
  var v;
1950
- return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
1950
+ return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && !p;
1951
1951
  }
1952
1952
  ), g = e ? Object.values(i).filter(
1953
- ({ parent_id: w, user: p }) => {
1953
+ ({ parent_id: p, user: b }) => {
1954
1954
  var v;
1955
- return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
1955
+ return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && p === (a == null ? void 0 : a.id);
1956
1956
  }
1957
1957
  ) : [], m = e ? g : u;
1958
1958
  if (!m.length)
1959
1959
  return null;
1960
- const f = (N = m[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1960
+ const f = (_ = m[0]) == null ? void 0 : _.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1961
1961
  return /* @__PURE__ */ n(
1962
1962
  Vt,
1963
1963
  {
@@ -2023,7 +2023,7 @@ function Wa(e, t) {
2023
2023
  const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2024
2024
  "div",
2025
2025
  {
2026
- className: k("flex items-center justify-center h-full", e),
2026
+ className: C("flex items-center justify-center h-full", e),
2027
2027
  children: [
2028
2028
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2029
2029
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2063,7 +2063,7 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2063
2063
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2064
2064
  ]
2065
2065
  }
2066
- ), Re = V.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2066
+ ), Re = G.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2067
2067
  /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2068
2068
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2069
2069
  ] }) }));
@@ -2083,29 +2083,29 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2083
2083
  onReportParticipantClick: m,
2084
2084
  customChannelActions: f,
2085
2085
  renderChannelActions: c,
2086
- showChannelInfo: b = !0,
2087
- onParticipantNameClick: N,
2088
- renderHeaderTitleBadges: w
2086
+ showChannelInfo: w = !0,
2087
+ onParticipantNameClick: _,
2088
+ renderHeaderTitleBadges: p
2089
2089
  }) => {
2090
- var _, M, y, I, C, z, D;
2091
- const { channel: p } = de(), v = V.useMemo(() => {
2092
- var Q, G;
2093
- const j = (Q = p._client) == null ? void 0 : Q.userID;
2094
- return j ? Object.values(((G = p.state) == null ? void 0 : G.members) || {}).find(
2090
+ var R, M, N, k, E, $, A;
2091
+ const { channel: b } = de(), v = G.useMemo(() => {
2092
+ var X, V;
2093
+ const j = (X = b._client) == null ? void 0 : X.userID;
2094
+ return j ? Object.values(((V = b.state) == null ? void 0 : V.members) || {}).find(
2095
2095
  (x) => {
2096
2096
  var S;
2097
2097
  return ((S = x.user) == null ? void 0 : S.id) && x.user.id !== j;
2098
2098
  }
2099
2099
  ) : void 0;
2100
- }, [(_ = p._client) == null ? void 0 : _.userID, (M = p.state) == null ? void 0 : M.members]), A = Jt(v == null ? void 0 : v.user), T = (y = v == null ? void 0 : v.user) == null ? void 0 : y.image, E = Kt(p), O = w == null ? void 0 : w({
2101
- channel: p,
2100
+ }, [(R = b._client) == null ? void 0 : R.userID, (M = b.state) == null ? void 0 : M.members]), y = Jt(v == null ? void 0 : v.user), T = (N = v == null ? void 0 : v.user) == null ? void 0 : N.image, I = Kt(b), D = p == null ? void 0 : p({
2101
+ channel: b,
2102
2102
  participant: v
2103
- }), R = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", B = /* @__PURE__ */ h(se, { children: [
2104
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2105
- O && /* @__PURE__ */ n("span", { className: "shrink-0", children: O })
2106
- ] }), P = async () => {
2103
+ }), P = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", F = /* @__PURE__ */ h(se, { children: [
2104
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: y }),
2105
+ D && /* @__PURE__ */ n("span", { className: "shrink-0", children: D })
2106
+ ] }), z = async () => {
2107
2107
  try {
2108
- E ? await p.unpin() : await p.pin();
2108
+ I ? await b.unpin() : await b.pin();
2109
2109
  } catch (j) {
2110
2110
  console.error(
2111
2111
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -2118,7 +2118,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2118
2118
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2119
2119
  "button",
2120
2120
  {
2121
- className: k(
2121
+ className: C(
2122
2122
  oe,
2123
2123
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2124
2124
  ),
@@ -2134,30 +2134,30 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2134
2134
  {
2135
2135
  className: "flex flex-col gap-1 items-center",
2136
2136
  "data-dd-privacy": "mask",
2137
- children: N ? /* @__PURE__ */ h(
2137
+ children: _ ? /* @__PURE__ */ h(
2138
2138
  "button",
2139
2139
  {
2140
2140
  type: "button",
2141
- onClick: N,
2142
- "aria-label": `View details for ${A}`,
2143
- className: k(
2144
- R,
2141
+ onClick: _,
2142
+ "aria-label": `View details for ${y}`,
2143
+ className: C(
2144
+ P,
2145
2145
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2146
2146
  ),
2147
2147
  children: [
2148
2148
  /* @__PURE__ */ n(
2149
2149
  ne,
2150
2150
  {
2151
- id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || p.id || "unknown",
2152
- name: A,
2151
+ id: ((k = v == null ? void 0 : v.user) == null ? void 0 : k.id) || b.id || "unknown",
2152
+ name: y,
2153
2153
  image: T,
2154
- starred: s && E,
2154
+ starred: s && I,
2155
2155
  dmAgentEnabled: a,
2156
2156
  size: 48
2157
2157
  }
2158
2158
  ),
2159
2159
  /* @__PURE__ */ h("span", { className: "flex max-w-full items-center gap-0.5", children: [
2160
- B,
2160
+ F,
2161
2161
  /* @__PURE__ */ n(ve, { className: "size-3 shrink-0", weight: "bold" })
2162
2162
  ] }),
2163
2163
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
@@ -2166,20 +2166,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2166
2166
  ] })
2167
2167
  ]
2168
2168
  }
2169
- ) : /* @__PURE__ */ h("div", { className: R, children: [
2169
+ ) : /* @__PURE__ */ h("div", { className: P, children: [
2170
2170
  /* @__PURE__ */ n(
2171
2171
  ne,
2172
2172
  {
2173
- id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || p.id || "unknown",
2174
- name: A,
2173
+ id: ((E = v == null ? void 0 : v.user) == null ? void 0 : E.id) || b.id || "unknown",
2174
+ name: y,
2175
2175
  image: T,
2176
- starred: s && E,
2176
+ starred: s && I,
2177
2177
  dmAgentEnabled: a,
2178
2178
  size: 48
2179
2179
  }
2180
2180
  ),
2181
2181
  /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
2182
- B,
2182
+ F,
2183
2183
  /* @__PURE__ */ n(
2184
2184
  ve,
2185
2185
  {
@@ -2200,25 +2200,25 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2200
2200
  "button",
2201
2201
  {
2202
2202
  className: oe,
2203
- onClick: P,
2203
+ onClick: z,
2204
2204
  type: "button",
2205
- "aria-label": E ? "Unstar conversation" : "Star conversation",
2205
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
2206
2206
  children: /* @__PURE__ */ n(
2207
2207
  Ge,
2208
2208
  {
2209
- className: k("size-5", {
2210
- "text-yellow-600": E,
2211
- "text-black/90": !E
2209
+ className: C("size-5", {
2210
+ "text-yellow-600": I,
2211
+ "text-black/90": !I
2212
2212
  }),
2213
- weight: E ? "duotone" : "regular"
2213
+ weight: I ? "duotone" : "regular"
2214
2214
  }
2215
2215
  )
2216
2216
  }
2217
2217
  ),
2218
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2218
+ w && (c !== void 0 ? c : /* @__PURE__ */ n(
2219
2219
  Ft,
2220
2220
  {
2221
- channel: p,
2221
+ channel: b,
2222
2222
  participant: v,
2223
2223
  showDeleteConversation: l,
2224
2224
  showBlockParticipant: o,
@@ -2229,7 +2229,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2229
2229
  onBlockParticipantClick: g,
2230
2230
  onReportParticipantClick: m,
2231
2231
  customChannelActions: f,
2232
- triggerClassName: k(oe, "bg-[#F1F0EE]")
2232
+ triggerClassName: C(oe, "bg-[#F1F0EE]")
2233
2233
  }
2234
2234
  ))
2235
2235
  ] })
@@ -2239,7 +2239,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2239
2239
  t && e && /* @__PURE__ */ n(
2240
2240
  "button",
2241
2241
  {
2242
- className: k(
2242
+ className: C(
2243
2243
  oe,
2244
2244
  "messaging-channel-view-back-button-desktop"
2245
2245
  ),
@@ -2249,13 +2249,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2249
2249
  children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2250
2250
  }
2251
2251
  ),
2252
- N ? /* @__PURE__ */ h(
2252
+ _ ? /* @__PURE__ */ h(
2253
2253
  "button",
2254
2254
  {
2255
2255
  type: "button",
2256
- onClick: N,
2257
- "aria-label": `View details for ${A}`,
2258
- className: k(
2256
+ onClick: _,
2257
+ "aria-label": `View details for ${y}`,
2258
+ className: C(
2259
2259
  L,
2260
2260
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2261
2261
  ),
@@ -2263,17 +2263,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2263
2263
  /* @__PURE__ */ n(
2264
2264
  ne,
2265
2265
  {
2266
- id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || p.id || "unknown",
2267
- name: A,
2266
+ id: (($ = v == null ? void 0 : v.user) == null ? void 0 : $.id) || b.id || "unknown",
2267
+ name: y,
2268
2268
  image: T,
2269
- starred: s && E,
2269
+ starred: s && I,
2270
2270
  dmAgentEnabled: a,
2271
2271
  size: 48
2272
2272
  }
2273
2273
  ),
2274
2274
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2275
2275
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2276
- B,
2276
+ F,
2277
2277
  /* @__PURE__ */ n(ve, { className: "size-4 shrink-0", weight: "bold" })
2278
2278
  ] }),
2279
2279
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
@@ -2287,17 +2287,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2287
2287
  /* @__PURE__ */ n(
2288
2288
  ne,
2289
2289
  {
2290
- id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || p.id || "unknown",
2291
- name: A,
2290
+ id: ((A = v == null ? void 0 : v.user) == null ? void 0 : A.id) || b.id || "unknown",
2291
+ name: y,
2292
2292
  image: T,
2293
- starred: s && E,
2293
+ starred: s && I,
2294
2294
  dmAgentEnabled: a,
2295
2295
  size: 48
2296
2296
  }
2297
2297
  ),
2298
2298
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2299
2299
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2300
- B,
2300
+ F,
2301
2301
  /* @__PURE__ */ n(
2302
2302
  ve,
2303
2303
  {
@@ -2318,25 +2318,25 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2318
2318
  "button",
2319
2319
  {
2320
2320
  className: oe,
2321
- onClick: P,
2321
+ onClick: z,
2322
2322
  type: "button",
2323
- "aria-label": E ? "Unstar conversation" : "Star conversation",
2323
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
2324
2324
  children: /* @__PURE__ */ n(
2325
2325
  Ge,
2326
2326
  {
2327
- className: k("size-6", {
2328
- "text-yellow-600": E,
2329
- "text-black/90": !E
2327
+ className: C("size-6", {
2328
+ "text-yellow-600": I,
2329
+ "text-black/90": !I
2330
2330
  }),
2331
- weight: E ? "duotone" : "regular"
2331
+ weight: I ? "duotone" : "regular"
2332
2332
  }
2333
2333
  )
2334
2334
  }
2335
2335
  ),
2336
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2336
+ w && (c !== void 0 ? c : /* @__PURE__ */ n(
2337
2337
  Ft,
2338
2338
  {
2339
- channel: p,
2339
+ channel: b,
2340
2340
  participant: v,
2341
2341
  showDeleteConversation: l,
2342
2342
  showBlockParticipant: o,
@@ -2368,56 +2368,56 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2368
2368
  showBlockParticipant: m = !0,
2369
2369
  showReportParticipant: f = !0,
2370
2370
  composerDisabled: c = !1,
2371
- composerDisabledReason: b,
2372
- showStarButton: N = !1,
2373
- chatbotVotingEnabled: w = !1,
2374
- renderChannelBanner: p,
2371
+ composerDisabledReason: w,
2372
+ showStarButton: _ = !1,
2373
+ chatbotVotingEnabled: p = !1,
2374
+ renderChannelBanner: b,
2375
2375
  renderHeaderTitleBadges: v,
2376
- customChannelActions: A,
2376
+ customChannelActions: y,
2377
2377
  renderChannelActions: T,
2378
- renderMessage: E,
2379
- dmAgentEnabled: O = !1,
2380
- viewerLanguage: R,
2378
+ renderMessage: I,
2379
+ dmAgentEnabled: D = !1,
2380
+ viewerLanguage: P,
2381
2381
  showChannelInfo: L = !0,
2382
- onParticipantNameClick: B,
2383
- composerInput: P
2382
+ onParticipantNameClick: F,
2383
+ composerInput: z
2384
2384
  }) => {
2385
- var j, Z, Q, G, x, S;
2386
- const { channel: _ } = de(), M = V.useMemo(() => {
2387
- var q, F;
2388
- const U = (q = _._client) == null ? void 0 : q.userID;
2389
- return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find(
2385
+ var j, Q, X, V, x, S;
2386
+ const { channel: R } = de(), M = G.useMemo(() => {
2387
+ var q, B;
2388
+ const U = (q = R._client) == null ? void 0 : q.userID;
2389
+ return U ? Object.values(((B = R.state) == null ? void 0 : B.members) || {}).find(
2390
2390
  (W) => {
2391
- var X;
2392
- return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
2391
+ var K;
2392
+ return ((K = W.user) == null ? void 0 : K.id) && W.user.id !== U;
2393
2393
  }
2394
2394
  ) : void 0;
2395
- }, [(j = _._client) == null ? void 0 : j.userID, (Z = _.state) == null ? void 0 : Z.members]), y = V.useMemo(() => {
2396
- var q, F;
2397
- const U = (q = _._client) == null ? void 0 : q.userID;
2398
- return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find((W) => {
2399
- var X;
2400
- return ((X = W.user) == null ? void 0 : X.id) === U;
2395
+ }, [(j = R._client) == null ? void 0 : j.userID, (Q = R.state) == null ? void 0 : Q.members]), N = G.useMemo(() => {
2396
+ var q, B;
2397
+ const U = (q = R._client) == null ? void 0 : q.userID;
2398
+ return U ? Object.values(((B = R.state) == null ? void 0 : B.members) || {}).find((W) => {
2399
+ var K;
2400
+ return ((K = W.user) == null ? void 0 : K.id) === U;
2401
2401
  }) : void 0;
2402
- }, [(Q = _._client) == null ? void 0 : Q.userID, (G = _.state) == null ? void 0 : G.members]), I = ((x = y == null ? void 0 : y.user) == null ? void 0 : x.is_account) ?? (y == null ? void 0 : y.is_account), C = ((S = M == null ? void 0 : M.user) == null ? void 0 : S.is_account) ?? (M == null ? void 0 : M.is_account), z = O && I === !1 && C === !0, D = J(
2402
+ }, [(X = R._client) == null ? void 0 : X.userID, (V = R.state) == null ? void 0 : V.members]), k = ((x = N == null ? void 0 : N.user) == null ? void 0 : x.is_account) ?? (N == null ? void 0 : N.is_account), E = ((S = M == null ? void 0 : M.user) == null ? void 0 : S.is_account) ?? (M == null ? void 0 : M.is_account), $ = D && k === !1 && E === !0, A = Z(
2403
2403
  (U) => {
2404
2404
  const { message: H } = ye("ChannelView"), q = /* @__PURE__ */ n(
2405
2405
  Ia,
2406
2406
  {
2407
2407
  ...U,
2408
- chatbotVotingEnabled: w,
2409
- viewerLanguage: R
2408
+ chatbotVotingEnabled: p,
2409
+ viewerLanguage: P
2410
2410
  }
2411
2411
  );
2412
- return !E || !H ? q : E(q, H);
2412
+ return !I || !H ? q : I(q, H);
2413
2413
  },
2414
- [w, E, R]
2414
+ [p, I, P]
2415
2415
  );
2416
2416
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2417
2417
  os,
2418
2418
  {
2419
2419
  overrides: {
2420
- Message: D,
2420
+ Message: A,
2421
2421
  MessageActions: Aa
2422
2422
  },
2423
2423
  children: /* @__PURE__ */ h(cs, { children: [
@@ -2427,8 +2427,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2427
2427
  onBack: e,
2428
2428
  showBackButton: t,
2429
2429
  showChannelInfo: L,
2430
- showStarButton: N,
2431
- dmAgentEnabled: z,
2430
+ showStarButton: _,
2431
+ dmAgentEnabled: $,
2432
2432
  onLeaveConversation: i,
2433
2433
  onBlockParticipant: l,
2434
2434
  showDeleteConversation: o,
@@ -2437,13 +2437,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2437
2437
  onDeleteConversationClick: d,
2438
2438
  onBlockParticipantClick: u,
2439
2439
  onReportParticipantClick: g,
2440
- customChannelActions: A,
2440
+ customChannelActions: y,
2441
2441
  renderChannelActions: T,
2442
- onParticipantNameClick: B,
2442
+ onParticipantNameClick: F,
2443
2443
  renderHeaderTitleBadges: v
2444
2444
  }
2445
2445
  ) }, "lt-channel-header"),
2446
- p ? /* @__PURE__ */ n(V.Fragment, { children: p() }, "lt-channel-banner") : null,
2446
+ b ? /* @__PURE__ */ n(G.Fragment, { children: b() }, "lt-channel-banner") : null,
2447
2447
  /* @__PURE__ */ n(
2448
2448
  "div",
2449
2449
  {
@@ -2452,24 +2452,24 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2452
2452
  },
2453
2453
  "lt-channel-message-list"
2454
2454
  ),
2455
- r ? /* @__PURE__ */ n(V.Fragment, { children: r(_) }, "lt-channel-conversation-footer") : null,
2455
+ r ? /* @__PURE__ */ n(G.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
2456
2456
  /* @__PURE__ */ n(
2457
2457
  za,
2458
2458
  {
2459
2459
  ...s && {
2460
- renderActions: () => s == null ? void 0 : s(_)
2460
+ renderActions: () => s == null ? void 0 : s(R)
2461
2461
  },
2462
- renderFooter: () => a == null ? void 0 : a(_),
2462
+ renderFooter: () => a == null ? void 0 : a(R),
2463
2463
  disabled: c,
2464
- disabledReason: b,
2465
- composerInput: P
2464
+ disabledReason: w,
2465
+ composerInput: z
2466
2466
  },
2467
2467
  "lt-channel-message-input"
2468
2468
  )
2469
2469
  ] })
2470
2470
  }
2471
2471
  ) });
2472
- }, mn = V.memo(
2472
+ }, mn = G.memo(
2473
2473
  ({
2474
2474
  channel: e,
2475
2475
  onBack: t,
@@ -2485,64 +2485,64 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2485
2485
  onDeleteConversationClick: m,
2486
2486
  onBlockParticipantClick: f,
2487
2487
  onReportParticipantClick: c,
2488
- showBlockParticipant: b = !0,
2489
- showReportParticipant: N = !0,
2490
- composerDisabled: w = !1,
2491
- composerDisabledReason: p,
2488
+ showBlockParticipant: w = !0,
2489
+ showReportParticipant: _ = !0,
2490
+ composerDisabled: p = !1,
2491
+ composerDisabledReason: b,
2492
2492
  dmAgentEnabled: v,
2493
- messageMetadata: A,
2493
+ messageMetadata: y,
2494
2494
  onMessageSent: T,
2495
- showStarButton: E = !1,
2496
- chatbotVotingEnabled: O = !1,
2497
- renderChannelBanner: R,
2495
+ showStarButton: I = !1,
2496
+ chatbotVotingEnabled: D = !1,
2497
+ renderChannelBanner: P,
2498
2498
  renderHeaderTitleBadges: L,
2499
- customChannelActions: B,
2500
- renderChannelActions: P,
2501
- renderMessage: _,
2499
+ customChannelActions: F,
2500
+ renderChannelActions: z,
2501
+ renderMessage: R,
2502
2502
  onMessageLinkClick: M,
2503
- sendButton: y,
2504
- attachmentPreviewList: I,
2505
- viewerLanguage: C,
2506
- showChannelInfo: z = !0,
2507
- onParticipantNameClick: D,
2503
+ sendButton: N,
2504
+ attachmentPreviewList: k,
2505
+ viewerLanguage: E,
2506
+ showChannelInfo: $ = !0,
2507
+ onParticipantNameClick: A,
2508
2508
  composerInput: j
2509
2509
  }) => {
2510
- const Z = J(
2511
- async (G, x, S) => {
2512
- var X;
2513
- const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, H = v && !U, q = {
2510
+ const Q = Z(
2511
+ async (V, x, S) => {
2512
+ var K;
2513
+ const U = ((K = e.data) == null ? void 0 : K.chatbot_paused) === !0, H = v && !U, q = {
2514
2514
  ...x,
2515
2515
  ...H && { silent: !0 },
2516
- ...A && {
2516
+ ...y && {
2517
2517
  metadata: {
2518
2518
  ...x.metadata ?? {},
2519
- ...A
2519
+ ...y
2520
2520
  }
2521
2521
  }
2522
- }, F = {
2522
+ }, B = {
2523
2523
  ...S,
2524
2524
  ...H && { skip_push: !0 }
2525
- }, W = await e.sendMessage(q, F);
2525
+ }, W = await e.sendMessage(q, B);
2526
2526
  return T == null || T(W), W;
2527
2527
  },
2528
- [e, v, A, T]
2529
- ), Q = Y(null);
2530
- return K(() => {
2528
+ [e, v, y, T]
2529
+ ), X = Y(null);
2530
+ return J(() => {
2531
2531
  if (!M) return;
2532
- const G = Q.current;
2533
- if (!G) return;
2532
+ const V = X.current;
2533
+ if (!V) return;
2534
2534
  const x = (S) => {
2535
2535
  const U = S.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
2536
2536
  if (!q) return;
2537
- const F = H == null ? void 0 : H.closest("[data-message-id]"), W = F == null ? void 0 : F.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2538
- M(q, X);
2537
+ const B = H == null ? void 0 : H.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), K = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2538
+ M(q, K);
2539
2539
  };
2540
- return G.addEventListener("click", x), () => G.removeEventListener("click", x);
2540
+ return V.addEventListener("click", x), () => V.removeEventListener("click", x);
2541
2541
  }, [M, e]), /* @__PURE__ */ n(
2542
2542
  "div",
2543
2543
  {
2544
- ref: Q,
2545
- className: k(
2544
+ ref: X,
2545
+ className: C(
2546
2546
  "messaging-channel-view h-full flex flex-col",
2547
2547
  d
2548
2548
  ),
@@ -2555,9 +2555,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2555
2555
  LoadingIndicator: Re,
2556
2556
  DateSeparator: Vs,
2557
2557
  TypingIndicator: qa,
2558
- doSendMessageRequest: Z,
2559
- ...y ? { SendButton: y } : {},
2560
- ...I ? { AttachmentPreviewList: I } : {},
2558
+ doSendMessageRequest: Q,
2559
+ ...N ? { SendButton: N } : {},
2560
+ ...k ? { AttachmentPreviewList: k } : {},
2561
2561
  children: /* @__PURE__ */ n(
2562
2562
  Za,
2563
2563
  {
@@ -2573,21 +2573,21 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2573
2573
  onDeleteConversationClick: m,
2574
2574
  onBlockParticipantClick: f,
2575
2575
  onReportParticipantClick: c,
2576
- showBlockParticipant: b,
2577
- showReportParticipant: N,
2578
- composerDisabled: w,
2579
- composerDisabledReason: p,
2580
- showStarButton: E,
2576
+ showBlockParticipant: w,
2577
+ showReportParticipant: _,
2578
+ composerDisabled: p,
2579
+ composerDisabledReason: b,
2580
+ showStarButton: I,
2581
2581
  dmAgentEnabled: v,
2582
- chatbotVotingEnabled: O,
2583
- renderChannelBanner: R,
2582
+ chatbotVotingEnabled: D,
2583
+ renderChannelBanner: P,
2584
2584
  renderHeaderTitleBadges: L,
2585
- customChannelActions: B,
2586
- renderChannelActions: P,
2587
- renderMessage: _,
2588
- viewerLanguage: C,
2589
- showChannelInfo: z,
2590
- onParticipantNameClick: D,
2585
+ customChannelActions: F,
2586
+ renderChannelActions: z,
2587
+ renderMessage: R,
2588
+ viewerLanguage: E,
2589
+ showChannelInfo: $,
2590
+ onParticipantNameClick: A,
2591
2591
  composerInput: j
2592
2592
  }
2593
2593
  )
@@ -2598,7 +2598,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2598
2598
  }
2599
2599
  );
2600
2600
  mn.displayName = "ChannelView";
2601
- const xe = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2601
+ const xe = G.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2602
2602
  /* @__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: "⚠️" }) }),
2603
2603
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2604
2604
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2628,66 +2628,66 @@ const Ei = ({
2628
2628
  onMessageSent: m,
2629
2629
  chatbotVotingEnabled: f = !1,
2630
2630
  viewerLanguage: c,
2631
- renderHeaderTitleBadges: b,
2632
- renderChannelBanner: N,
2633
- customChannelActions: w,
2634
- renderChannelActions: p,
2631
+ renderHeaderTitleBadges: w,
2632
+ renderChannelBanner: _,
2633
+ customChannelActions: p,
2634
+ renderChannelActions: b,
2635
2635
  onParticipantNameClick: v,
2636
- renderMessage: A,
2636
+ renderMessage: y,
2637
2637
  onMessageLinkClick: T,
2638
- showChannelInfo: E,
2639
- composerInput: O
2638
+ showChannelInfo: I,
2639
+ composerInput: D
2640
2640
  }) => {
2641
2641
  const {
2642
- client: R,
2642
+ client: P,
2643
2643
  isConnected: L,
2644
- isLoading: B,
2645
- error: P,
2646
- refreshConnection: _,
2644
+ isLoading: F,
2645
+ error: z,
2646
+ refreshConnection: R,
2647
2647
  service: M,
2648
- debug: y
2649
- } = zs(), [I, C] = $(null), [z, D] = $(null), [j, Z] = $(!1), { showDeleteConversation: Q = !0 } = e, G = Y(l);
2650
- G.current = l;
2648
+ debug: N
2649
+ } = zs(), [k, E] = O(null), [$, A] = O(null), [j, Q] = O(!1), { showDeleteConversation: X = !0 } = e, V = Y(l);
2650
+ V.current = l;
2651
2651
  const x = Y(a);
2652
2652
  x.current = a;
2653
2653
  const S = Y(null), U = Y(null);
2654
- K(() => {
2655
- U.current = I;
2656
- }, [I]), K(() => {
2657
- if (!R || !L) return;
2658
- const F = R.userID;
2659
- if (!F) return;
2660
- const W = `${F}::${i}`;
2654
+ J(() => {
2655
+ U.current = k;
2656
+ }, [k]), J(() => {
2657
+ if (!P || !L) return;
2658
+ const B = P.userID;
2659
+ if (!B) return;
2660
+ const W = `${B}::${i}`;
2661
2661
  if (S.current === W) return;
2662
2662
  S.current = W;
2663
- const X = () => {
2663
+ const K = () => {
2664
2664
  S.current === W && (S.current = null);
2665
2665
  };
2666
2666
  (async () => {
2667
2667
  var me, he;
2668
2668
  try {
2669
- y && console.log(
2669
+ N && console.log(
2670
2670
  "[MessagingShell] Loading initial conversation with:",
2671
2671
  i
2672
2672
  );
2673
- const ee = await R.queryChannels(
2673
+ const ee = await P.queryChannels(
2674
2674
  {
2675
2675
  type: "messaging",
2676
- members: { $eq: [F, i] }
2676
+ members: { $eq: [B, i] }
2677
2677
  },
2678
2678
  {},
2679
2679
  { limit: 1 }
2680
2680
  );
2681
2681
  if (ee.length > 0) {
2682
- C(ee[0]), D(null), (me = x.current) == null || me.call(x, ee[0]), y && console.log(
2682
+ E(ee[0]), A(null), (me = x.current) == null || me.call(x, ee[0]), N && console.log(
2683
2683
  "[MessagingShell] Initial conversation loaded:",
2684
2684
  ee[0].id
2685
2685
  );
2686
2686
  return;
2687
2687
  }
2688
- const te = G.current;
2688
+ const te = V.current;
2689
2689
  if (!te || !M) {
2690
- X(), D("No conversation found with this account"), y && console.log(
2690
+ K(), A("No conversation found with this account"), N && console.log(
2691
2691
  "[MessagingShell] No conversation found for:",
2692
2692
  i
2693
2693
  );
@@ -2699,7 +2699,7 @@ const Ei = ({
2699
2699
  name: te.name,
2700
2700
  phone: te.phone
2701
2701
  });
2702
- C(le), D(null), (he = x.current) == null || he.call(x, le), y && console.log(
2702
+ E(le), A(null), (he = x.current) == null || he.call(x, le), N && console.log(
2703
2703
  "[MessagingShell] Channel created and loaded:",
2704
2704
  le.id
2705
2705
  );
@@ -2707,55 +2707,55 @@ const Ei = ({
2707
2707
  console.error(
2708
2708
  "[MessagingShell] Failed to create conversation:",
2709
2709
  le
2710
- ), X(), D("Failed to create conversation");
2710
+ ), K(), A("Failed to create conversation");
2711
2711
  }
2712
2712
  } catch (ee) {
2713
2713
  console.error(
2714
2714
  "[MessagingShell] Failed to load initial conversation:",
2715
2715
  ee
2716
- ), X(), U.current || D("Failed to load conversation");
2716
+ ), K(), U.current || A("Failed to load conversation");
2717
2717
  }
2718
2718
  })();
2719
- }, [i, R, L, M, y]);
2719
+ }, [i, P, L, M, N]);
2720
2720
  const H = Y(r);
2721
2721
  H.current = r;
2722
- const q = J(() => {
2723
- var F;
2724
- C(null), Z(!0), (F = H.current) == null || F.call(H);
2722
+ const q = Z(() => {
2723
+ var B;
2724
+ E(null), Q(!0), (B = H.current) == null || B.call(H);
2725
2725
  }, []);
2726
- return B ? /* @__PURE__ */ n(Re, {}) : P ? /* @__PURE__ */ n(xe, { message: P, onBack: _ }) : !L || !R ? /* @__PURE__ */ n(
2726
+ return F ? /* @__PURE__ */ n(Re, {}) : z ? /* @__PURE__ */ n(xe, { message: z, onBack: R }) : !L || !P ? /* @__PURE__ */ n(
2727
2727
  xe,
2728
2728
  {
2729
2729
  message: "Not connected to messaging service",
2730
- onBack: _
2730
+ onBack: R
2731
2731
  }
2732
- ) : z ? /* @__PURE__ */ n(xe, { message: z }) : j && !I ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : I ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2732
+ ) : $ ? /* @__PURE__ */ n(xe, { message: $ }) : j && !k ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : k ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2733
2733
  mn,
2734
2734
  {
2735
- channel: I,
2735
+ channel: k,
2736
2736
  renderMessageInputActions: t,
2737
2737
  renderConversationFooter: s,
2738
- renderChannelBanner: N,
2738
+ renderChannelBanner: _,
2739
2739
  onLeaveConversation: q,
2740
2740
  onBlockParticipant: q,
2741
2741
  CustomChannelEmptyState: o,
2742
- showDeleteConversation: Q,
2742
+ showDeleteConversation: X,
2743
2743
  onBlockParticipantClick: d,
2744
2744
  onReportParticipantClick: u,
2745
2745
  dmAgentEnabled: g,
2746
2746
  onMessageSent: m,
2747
2747
  chatbotVotingEnabled: f,
2748
2748
  viewerLanguage: c,
2749
- renderHeaderTitleBadges: b,
2750
- customChannelActions: w,
2751
- renderChannelActions: p,
2749
+ renderHeaderTitleBadges: w,
2750
+ customChannelActions: p,
2751
+ renderChannelActions: b,
2752
2752
  onParticipantNameClick: v,
2753
- renderMessage: A,
2753
+ renderMessage: y,
2754
2754
  onMessageLinkClick: T,
2755
- showChannelInfo: E,
2756
- composerInput: O
2755
+ showChannelInfo: I,
2756
+ composerInput: D
2757
2757
  },
2758
- I.id
2758
+ k.id
2759
2759
  ) }) }) : /* @__PURE__ */ n(Re, {});
2760
2760
  };
2761
2761
  function Qa(e) {
@@ -2764,7 +2764,7 @@ function Qa(e) {
2764
2764
  for (const s of t)
2765
2765
  e.state.addMessageSorted(s.message);
2766
2766
  }
2767
- const hn = V.createContext({
2767
+ const hn = G.createContext({
2768
2768
  selectedChannel: void 0,
2769
2769
  onChannelSelect: () => {
2770
2770
  },
@@ -2772,7 +2772,7 @@ const hn = V.createContext({
2772
2772
  renderMessagePreview: void 0,
2773
2773
  channelPreview: void 0,
2774
2774
  viewerLanguage: void 0
2775
- }), er = hn.Provider, tr = () => V.useContext(hn), nr = (e, t) => {
2775
+ }), er = hn.Provider, tr = () => G.useContext(hn), nr = (e, t) => {
2776
2776
  const s = new Date(
2777
2777
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2778
2778
  ), r = new Date(
@@ -2793,76 +2793,77 @@ const hn = V.createContext({
2793
2793
  day: "numeric",
2794
2794
  year: "2-digit"
2795
2795
  });
2796
- }, fn = V.memo(
2796
+ }, fn = G.memo(
2797
2797
  (e) => {
2798
- var L, B, P;
2799
- const { channel: t, unread: s } = e, {
2800
- selectedChannel: a,
2801
- onChannelSelect: r,
2802
- debug: i,
2803
- channelPreview: l,
2804
- renderMessagePreview: o,
2805
- viewerLanguage: d
2806
- } = tr(), u = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), g = Kt(t);
2807
- if (l)
2798
+ var z, R, M;
2799
+ const { active: t, channel: s, unread: a, ...r } = e, {
2800
+ selectedChannel: i,
2801
+ onChannelSelect: l,
2802
+ debug: o,
2803
+ channelPreview: d,
2804
+ renderMessagePreview: u,
2805
+ viewerLanguage: g
2806
+ } = tr(), m = (i == null ? void 0 : i.id) === (s == null ? void 0 : s.id), f = Kt(s);
2807
+ if (d)
2808
2808
  return /* @__PURE__ */ n(
2809
- l,
2809
+ d,
2810
2810
  {
2811
- ...e,
2812
- isSelected: u,
2813
- selectedChannel: a,
2814
- onChannelSelect: r
2811
+ ...r,
2812
+ channel: s,
2813
+ selectedChannel: i,
2814
+ onChannelSelect: l,
2815
+ viewerLanguage: g
2815
2816
  }
2816
2817
  );
2817
- const m = () => {
2818
- t && r(t);
2819
- }, f = (_) => {
2820
- const M = _.key === "Enter" || _.key === " ", y = _.repeat;
2821
- !M || y || (_.preventDefault(), m());
2822
- }, b = Object.values(((L = t == null ? void 0 : t.state) == null ? void 0 : L.members) || {}).find(
2823
- (_) => {
2824
- var M, y;
2825
- return ((M = _.user) == null ? void 0 : M.id) && _.user.id !== ((y = t == null ? void 0 : t._client) == null ? void 0 : y.userID);
2818
+ const c = () => {
2819
+ s && l(s);
2820
+ }, w = (N) => {
2821
+ const k = N.key === "Enter" || N.key === " ", E = N.repeat;
2822
+ !k || E || (N.preventDefault(), c());
2823
+ }, p = Object.values(((z = s == null ? void 0 : s.state) == null ? void 0 : z.members) || {}).find(
2824
+ (N) => {
2825
+ var k, E;
2826
+ return ((k = N.user) == null ? void 0 : k.id) && N.user.id !== ((E = s == null ? void 0 : s._client) == null ? void 0 : E.userID);
2826
2827
  }
2827
- ), N = Jt(b == null ? void 0 : b.user), w = (B = b == null ? void 0 : b.user) == null ? void 0 : B.image, p = (() => {
2828
- var M;
2829
- const _ = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
2830
- if (_ != null && _.length) {
2831
- for (let y = _.length - 1; y >= 0; y--)
2832
- if (_[y].type !== "system") return _[y];
2828
+ ), b = Jt(p == null ? void 0 : p.user), v = (R = p == null ? void 0 : p.user) == null ? void 0 : R.image, y = (() => {
2829
+ var k;
2830
+ const N = (k = s == null ? void 0 : s.state) == null ? void 0 : k.messages;
2831
+ if (N != null && N.length) {
2832
+ for (let E = N.length - 1; E >= 0; E--)
2833
+ if (N[E].type !== "system") return N[E];
2833
2834
  }
2834
- })(), A = (() => {
2835
- var z, D, j, Z;
2836
- const _ = Zt({
2837
- message: p,
2838
- viewerLanguage: d
2835
+ })(), I = (() => {
2836
+ var j, Q, X, V;
2837
+ const N = Zt({
2838
+ message: y,
2839
+ viewerLanguage: g
2839
2840
  });
2840
- if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2841
- if (((D = p == null ? void 0 : p.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2842
- if (((j = p == null ? void 0 : p.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
2843
- return _ ? `📎 ${_}` : "📎 Sent an attachment";
2844
- if (_) return _;
2845
- const C = (Z = p == null ? void 0 : p.attachments) == null ? void 0 : Z[0];
2846
- return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2847
- })(), T = p != null && p.created_at ? sr(new Date(p.created_at)) : "", E = p ? Me(p) : !1, O = o ? o(p, A) : `${E ? "✨ " : ""}${A}`, R = s ?? 0;
2848
- return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2849
- channelId: t == null ? void 0 : t.id,
2850
- isSelected: u,
2851
- participantName: N,
2852
- unreadCount: R,
2853
- hasTimestamp: !!T
2841
+ if (((j = y == null ? void 0 : y.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2842
+ if (((Q = y == null ? void 0 : y.metadata) == null ? void 0 : Q.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2843
+ if (((X = y == null ? void 0 : y.metadata) == null ? void 0 : X.custom_type) === "MESSAGE_ATTACHMENT")
2844
+ return N ? `📎 ${N}` : "📎 Sent an attachment";
2845
+ if (N) return N;
2846
+ const A = (V = y == null ? void 0 : y.attachments) == null ? void 0 : V[0];
2847
+ 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";
2848
+ })(), D = y != null && y.created_at ? sr(new Date(y.created_at)) : "", P = y ? Me(y) : !1, L = u ? u(y, I) : `${P ? "✨ " : ""}${I}`, F = a ?? 0;
2849
+ return o && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2850
+ channelId: s == null ? void 0 : s.id,
2851
+ isSelected: m,
2852
+ participantName: b,
2853
+ unreadCount: F,
2854
+ hasTimestamp: !!D
2854
2855
  }), /* @__PURE__ */ n(
2855
2856
  "div",
2856
2857
  {
2857
2858
  role: "button",
2858
2859
  tabIndex: 0,
2859
- onClick: m,
2860
- onKeyDown: f,
2861
- className: k(
2860
+ onClick: c,
2861
+ onKeyDown: w,
2862
+ className: C(
2862
2863
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2863
2864
  {
2864
- "bg-black/[0.04]": u,
2865
- "hover:bg-black/[0.02]": !u
2865
+ "bg-black/[0.04]": m,
2866
+ "hover:bg-black/[0.02]": !m
2866
2867
  }
2867
2868
  ),
2868
2869
  "data-dd-privacy": "mask",
@@ -2870,11 +2871,11 @@ const hn = V.createContext({
2870
2871
  /* @__PURE__ */ n(
2871
2872
  ne,
2872
2873
  {
2873
- id: ((P = b == null ? void 0 : b.user) == null ? void 0 : P.id) || t.id || "unknown",
2874
- name: N,
2875
- image: w,
2874
+ id: ((M = p == null ? void 0 : p.user) == null ? void 0 : M.id) || s.id || "unknown",
2875
+ name: b,
2876
+ image: v,
2876
2877
  size: 48,
2877
- starred: g
2878
+ starred: f
2878
2879
  }
2879
2880
  ),
2880
2881
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2882,20 +2883,20 @@ const hn = V.createContext({
2882
2883
  /* @__PURE__ */ h(
2883
2884
  "h3",
2884
2885
  {
2885
- className: k(
2886
+ className: C(
2886
2887
  "text-sm font-medium truncate text-[#191918]"
2887
2888
  ),
2888
2889
  children: [
2889
- g && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2890
- N
2890
+ f && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2891
+ b
2891
2892
  ]
2892
2893
  }
2893
2894
  ),
2894
- T && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: T })
2895
+ D && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: D })
2895
2896
  ] }),
2896
2897
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2897
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: O }),
2898
- R > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: R > 99 ? "99+" : R })
2898
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: L }),
2899
+ F > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: F > 99 ? "99+" : F })
2899
2900
  ] })
2900
2901
  ] })
2901
2902
  ] })
@@ -2904,7 +2905,7 @@ const hn = V.createContext({
2904
2905
  }
2905
2906
  );
2906
2907
  fn.displayName = "CustomChannelPreview";
2907
- const ar = { last_message_at: -1 }, rr = V.memo(
2908
+ const ar = { last_message_at: -1 }, rr = G.memo(
2908
2909
  ({
2909
2910
  onChannelSelect: e,
2910
2911
  selectedChannel: t,
@@ -2918,13 +2919,13 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2918
2919
  renderMessagePreview: u,
2919
2920
  viewerLanguage: g
2920
2921
  }) => {
2921
- const m = V.useRef(0);
2922
+ const m = G.useRef(0);
2922
2923
  m.current++;
2923
- const { debug: f = !1 } = Je(), c = V.useCallback(
2924
- (N) => {
2925
- for (const w of N)
2926
- Qa(w);
2927
- return r ? r(N) : N;
2924
+ const { debug: f = !1 } = Je(), c = G.useCallback(
2925
+ (_) => {
2926
+ for (const p of _)
2927
+ Qa(p);
2928
+ return r ? r(_) : _;
2928
2929
  },
2929
2930
  [r]
2930
2931
  );
@@ -2933,7 +2934,7 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2933
2934
  selectedChannelId: t == null ? void 0 : t.id,
2934
2935
  filters: s
2935
2936
  });
2936
- const b = V.useMemo(
2937
+ const w = G.useMemo(
2937
2938
  () => ({
2938
2939
  selectedChannel: t,
2939
2940
  onChannelSelect: e,
@@ -2954,11 +2955,11 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2954
2955
  return /* @__PURE__ */ n(
2955
2956
  "div",
2956
2957
  {
2957
- className: k(
2958
+ className: C(
2958
2959
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2959
2960
  l
2960
2961
  ),
2961
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: b, children: /* @__PURE__ */ n(
2962
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: w, children: /* @__PURE__ */ n(
2962
2963
  us,
2963
2964
  {
2964
2965
  filters: s,
@@ -2993,7 +2994,7 @@ const or = {
2993
2994
  dark: "bg-white text-[#121110] hover:bg-white/90",
2994
2995
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2995
2996
  }, cr = ({ variant: e, cta: t }) => {
2996
- const s = k(
2997
+ const s = C(
2997
2998
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2998
2999
  or[e]
2999
3000
  ), a = at(t.href);
@@ -3038,12 +3039,12 @@ const or = {
3038
3039
  cta: l,
3039
3040
  trailingAction: o
3040
3041
  }) => {
3041
- const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
3042
- if (!g && !m && !c && !b) return null;
3043
- const w = k(
3042
+ const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", w = l != null;
3043
+ if (!g && !m && !c && !w) return null;
3044
+ const p = C(
3044
3045
  "truncate text-base font-medium leading-6",
3045
3046
  d && !t ? ur : dr[e]
3046
- ), p = k(
3047
+ ), b = C(
3047
3048
  "truncate text-xs leading-4",
3048
3049
  mr[e]
3049
3050
  );
@@ -3053,17 +3054,17 @@ const or = {
3053
3054
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
3054
3055
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3055
3056
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
3056
- /* @__PURE__ */ n("p", { className: k("min-w-0", w), children: u })
3057
+ /* @__PURE__ */ n("p", { className: C("min-w-0", p), children: u })
3057
3058
  ] }),
3058
- m && /* @__PURE__ */ n("p", { className: p, children: a })
3059
+ m && /* @__PURE__ */ n("p", { className: b, children: a })
3059
3060
  ] }),
3060
- !b && c && /* @__PURE__ */ n("p", { className: p, children: f })
3061
+ !w && c && /* @__PURE__ */ n("p", { className: b, children: f })
3061
3062
  ] }),
3062
3063
  o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3063
3064
  ] }),
3064
3065
  l && /* @__PURE__ */ n(cr, { variant: e, cta: l })
3065
3066
  ] });
3066
- }, hr = k(
3067
+ }, hr = C(
3067
3068
  "relative block w-[280px] select-none overflow-hidden rounded-md",
3068
3069
  // 1px hairline border that sits flush with the card chrome — matches
3069
3070
  // the messaging design system's "small border around link attachments"
@@ -3081,7 +3082,7 @@ const or = {
3081
3082
  bgClassName: o,
3082
3083
  "data-testid": d
3083
3084
  }) => {
3084
- const u = s != null || a != null, g = k(
3085
+ const u = s != null || a != null, g = C(
3085
3086
  hr,
3086
3087
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3087
3088
  // `focus-ring` is a design-system utility from the component-library
@@ -3112,7 +3113,7 @@ const or = {
3112
3113
  onClick: a,
3113
3114
  "aria-label": r,
3114
3115
  "data-testid": d,
3115
- className: k(g, "text-left"),
3116
+ className: C(g, "text-left"),
3116
3117
  children: [
3117
3118
  t,
3118
3119
  m
@@ -3162,7 +3163,7 @@ const or = {
3162
3163
  ) }) : /* @__PURE__ */ h(
3163
3164
  "div",
3164
3165
  {
3165
- className: k(
3166
+ className: C(
3166
3167
  "relative h-[180px] w-full overflow-hidden",
3167
3168
  d && "bg-black"
3168
3169
  ),
@@ -3189,7 +3190,7 @@ const or = {
3189
3190
  ) : /* @__PURE__ */ n(
3190
3191
  "div",
3191
3192
  {
3192
- className: k(
3193
+ className: C(
3193
3194
  "flex h-full w-full items-center justify-center",
3194
3195
  fr[e]
3195
3196
  ),
@@ -3218,7 +3219,7 @@ const or = {
3218
3219
  onDismiss: g,
3219
3220
  onEditClick: m
3220
3221
  }) => {
3221
- const f = o === "classic", c = ze(r, l), b = g ? /* @__PURE__ */ n(
3222
+ const f = o === "classic", c = ze(r, l), w = g ? /* @__PURE__ */ n(
3222
3223
  "button",
3223
3224
  {
3224
3225
  type: "button",
@@ -3227,7 +3228,7 @@ const or = {
3227
3228
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3228
3229
  children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
3229
3230
  }
3230
- ) : void 0, N = m ? /* @__PURE__ */ n(
3231
+ ) : void 0, _ = m ? /* @__PURE__ */ n(
3231
3232
  "button",
3232
3233
  {
3233
3234
  type: "button",
@@ -3247,12 +3248,12 @@ const or = {
3247
3248
  mimeType: r
3248
3249
  }
3249
3250
  ) }),
3250
- b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3251
+ w && /* @__PURE__ */ n("div", { className: "shrink-0", children: w })
3251
3252
  ] }) }) : /* @__PURE__ */ h(
3252
3253
  Le,
3253
3254
  {
3254
3255
  variant: "dark",
3255
- topRight: f ? b : void 0,
3256
+ topRight: f ? w : void 0,
3256
3257
  children: [
3257
3258
  !f && /* @__PURE__ */ n(
3258
3259
  De,
@@ -3262,7 +3263,7 @@ const or = {
3262
3263
  sourceUrl: l,
3263
3264
  title: e,
3264
3265
  mimeType: r,
3265
- topRight: b
3266
+ topRight: w
3266
3267
  }
3267
3268
  ),
3268
3269
  /* @__PURE__ */ n(
@@ -3275,7 +3276,7 @@ const or = {
3275
3276
  url: a,
3276
3277
  appIcon: d,
3277
3278
  cta: u,
3278
- trailingAction: N
3279
+ trailingAction: _
3279
3280
  }
3280
3281
  )
3281
3282
  ]
@@ -3293,11 +3294,11 @@ const or = {
3293
3294
  cta: d,
3294
3295
  onClick: u
3295
3296
  }) => {
3296
- const g = gn(a, i), m = at(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? it : void 0, N = d && u ? {
3297
+ const g = gn(a, i), m = at(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, w = ze(a, i) ? it : void 0, _ = d && u ? {
3297
3298
  ...d,
3298
3299
  onClick: () => {
3299
- var w;
3300
- u(), (w = d.onClick) == null || w.call(d);
3300
+ var p;
3301
+ u(), (p = d.onClick) == null || p.call(d);
3301
3302
  }
3302
3303
  } : d;
3303
3304
  return /* @__PURE__ */ h(
@@ -3307,7 +3308,7 @@ const or = {
3307
3308
  href: f,
3308
3309
  onClick: c,
3309
3310
  ariaLabel: e ?? "Open attachment preview",
3310
- bgClassName: b,
3311
+ bgClassName: w,
3311
3312
  "data-testid": "link-attachment",
3312
3313
  children: [
3313
3314
  l === "featured" && /* @__PURE__ */ n(
@@ -3328,7 +3329,7 @@ const or = {
3328
3329
  description: t,
3329
3330
  url: s,
3330
3331
  appIcon: o,
3331
- cta: N
3332
+ cta: _
3332
3333
  }
3333
3334
  )
3334
3335
  ]
@@ -3347,13 +3348,13 @@ const or = {
3347
3348
  cta: u,
3348
3349
  onClick: g
3349
3350
  }) => {
3350
- const m = gn(r, l), f = at(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3351
+ const m = gn(r, l), f = at(a), c = u == null && f != null && !m ? f : void 0, w = u == null && !m && c != null ? g : void 0;
3351
3352
  return /* @__PURE__ */ h(
3352
3353
  Le,
3353
3354
  {
3354
3355
  variant: "dark",
3355
3356
  href: c,
3356
- onClick: b,
3357
+ onClick: w,
3357
3358
  bgClassName: ze(r, l) ? it : void 0,
3358
3359
  children: [
3359
3360
  o === "featured" && /* @__PURE__ */ n(
@@ -3422,7 +3423,7 @@ const or = {
3422
3423
  {
3423
3424
  "data-testid": l,
3424
3425
  "data-group-position": a,
3425
- className: k(
3426
+ className: C(
3426
3427
  // 280px-wide bubble — matches the mobile chat attachment width
3427
3428
  // and keeps the document / image / audio bubbles visually
3428
3429
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3442,7 +3443,7 @@ const or = {
3442
3443
  o ? /* @__PURE__ */ n(
3443
3444
  "p",
3444
3445
  {
3445
- className: k(
3446
+ className: C(
3446
3447
  // No `text-*` / `font-*` overrides here — caption inherits
3447
3448
  // the same font family + size as `.str-chat__message-text`
3448
3449
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3471,7 +3472,7 @@ const or = {
3471
3472
  a.stopPropagation(), e();
3472
3473
  },
3473
3474
  "aria-label": s,
3474
- className: k(
3475
+ className: C(
3475
3476
  "flex size-6 items-center justify-center rounded-full text-white",
3476
3477
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3477
3478
  ),
@@ -3520,7 +3521,7 @@ const or = {
3520
3521
  text: i,
3521
3522
  groupPosition: l,
3522
3523
  "data-testid": "audio-attachment",
3523
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
3524
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, w) => /* @__PURE__ */ n(
3524
3525
  Cr,
3525
3526
  {
3526
3527
  item: c,
@@ -3528,10 +3529,10 @@ const or = {
3528
3529
  trailingAction: (
3529
3530
  // Composer only supports a single attachment, so the
3530
3531
  // dismiss control sits on the only player.
3531
- g && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3532
+ g && w === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3532
3533
  )
3533
3534
  },
3534
- `${c.src}-${b}`
3535
+ `${c.src}-${w}`
3535
3536
  )) })
3536
3537
  }
3537
3538
  );
@@ -3605,13 +3606,13 @@ const Dr = {
3605
3606
  const d = s ?? t ?? "File", u = Lr(a, t, r), g = /* @__PURE__ */ n(
3606
3607
  "div",
3607
3608
  {
3608
- className: k(
3609
+ className: C(
3609
3610
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3610
3611
  Pr[e]
3611
3612
  ),
3612
3613
  "aria-hidden": !0,
3613
3614
  children: ce(a, {
3614
- className: k("size-6", zr[e]),
3615
+ className: C("size-6", zr[e]),
3615
3616
  weight: "regular"
3616
3617
  })
3617
3618
  }
@@ -3620,7 +3621,7 @@ const Dr = {
3620
3621
  u ? /* @__PURE__ */ n(
3621
3622
  "p",
3622
3623
  {
3623
- className: k(
3624
+ className: C(
3624
3625
  "truncate text-xs leading-4",
3625
3626
  Dr[e]
3626
3627
  ),
@@ -3633,7 +3634,7 @@ const Dr = {
3633
3634
  type: "button",
3634
3635
  onClick: i,
3635
3636
  "aria-label": l,
3636
- className: k(
3637
+ className: C(
3637
3638
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3638
3639
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3639
3640
  ),
@@ -3713,19 +3714,19 @@ const Or = ({
3713
3714
  mimeType: r,
3714
3715
  title: i,
3715
3716
  items: l
3716
- }), b = (w) => {
3717
- if ((u == null ? void 0 : u(w)) === !1) return;
3718
- const p = c[w];
3719
- if (!p) return;
3720
- const v = p.filename ?? ae(p.src);
3721
- bn(p.src, v);
3717
+ }), w = (p) => {
3718
+ if ((u == null ? void 0 : u(p)) === !1) return;
3719
+ const b = c[p];
3720
+ if (!b) return;
3721
+ const v = b.filename ?? ae(b.src);
3722
+ bn(b.src, v);
3722
3723
  };
3723
3724
  if (c.length === 0)
3724
3725
  return null;
3725
- const N = /* @__PURE__ */ n(
3726
+ const _ = /* @__PURE__ */ n(
3726
3727
  "span",
3727
3728
  {
3728
- className: k(
3729
+ className: C(
3729
3730
  "flex size-8 items-center justify-center rounded-full",
3730
3731
  m === "dark" ? "text-white/70" : "text-black/70"
3731
3732
  ),
@@ -3740,16 +3741,16 @@ const Or = ({
3740
3741
  text: o,
3741
3742
  groupPosition: d,
3742
3743
  "data-testid": "file-attachment",
3743
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, p) => /* @__PURE__ */ n(
3744
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((p, b) => /* @__PURE__ */ n(
3744
3745
  $r,
3745
3746
  {
3746
3747
  variant: m,
3747
- item: w,
3748
- index: p,
3749
- onActivate: b,
3750
- trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
3748
+ item: p,
3749
+ index: b,
3750
+ onActivate: w,
3751
+ trailingAction: f && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : _
3751
3752
  },
3752
- `${w.src}-${p}`
3753
+ `${p.src}-${b}`
3753
3754
  )) })
3754
3755
  }
3755
3756
  );
@@ -3792,7 +3793,7 @@ const Or = ({
3792
3793
  tone: i = "dark",
3793
3794
  onTriggered: l
3794
3795
  }) => {
3795
- const [o, d] = $(!1), u = J(
3796
+ const [o, d] = O(!1), u = Z(
3796
3797
  (c) => {
3797
3798
  c.stopPropagation(), !o && (d(!0), bn(e, t).catch(() => {
3798
3799
  }).finally(() => {
@@ -3800,7 +3801,7 @@ const Or = ({
3800
3801
  }));
3801
3802
  },
3802
3803
  [o, e, t, l]
3803
- ), g = r ?? s !== "pill", f = { className: k(
3804
+ ), g = r ?? s !== "pill", f = { className: C(
3804
3805
  s === "pill" ? "size-4" : "size-5",
3805
3806
  "shrink-0"
3806
3807
  ), weight: "bold" };
@@ -3811,7 +3812,7 @@ const Or = ({
3811
3812
  onClick: u,
3812
3813
  disabled: o,
3813
3814
  "aria-label": a,
3814
- className: k(
3815
+ className: C(
3815
3816
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3816
3817
  {
3817
3818
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3851,7 +3852,7 @@ const Or = ({
3851
3852
  onClick: u,
3852
3853
  disabled: o,
3853
3854
  "aria-label": g ? a : void 0,
3854
- className: k(
3855
+ className: C(
3855
3856
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
3856
3857
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3857
3858
  ),
@@ -3873,18 +3874,18 @@ const Or = ({
3873
3874
  initialIndex: t,
3874
3875
  open: s
3875
3876
  }) => {
3876
- const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3877
- K(() => {
3877
+ const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3878
+ J(() => {
3878
3879
  s && i(Ve(t, 0, Math.max(e - 1, 0)));
3879
- }, [s, t, e]), K(() => {
3880
+ }, [s, t, e]), J(() => {
3880
3881
  i((d) => Ve(d, 0, Math.max(e - 1, 0)));
3881
3882
  }, [e]);
3882
- const l = J(() => {
3883
+ const l = Z(() => {
3883
3884
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3884
- }, [e]), o = J(() => {
3885
+ }, [e]), o = Z(() => {
3885
3886
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3886
3887
  }, [e]);
3887
- return K(() => {
3888
+ return J(() => {
3888
3889
  if (!s || e <= 1) return;
3889
3890
  const d = (u) => {
3890
3891
  if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
@@ -3903,7 +3904,7 @@ const Or = ({
3903
3904
  "data-testid": l
3904
3905
  }) => {
3905
3906
  const o = Y(null), d = Y(null);
3906
- return K(() => {
3907
+ return J(() => {
3907
3908
  var f;
3908
3909
  const m = o.current;
3909
3910
  if (m) {
@@ -4048,14 +4049,14 @@ const Or = ({
4048
4049
  const r = e.length;
4049
4050
  if (r === 0) return null;
4050
4051
  const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, g) => {
4051
- const m = k(Vr, "h-full w-full");
4052
+ const m = C(Vr, "h-full w-full");
4052
4053
  return t ? /* @__PURE__ */ h(
4053
4054
  "button",
4054
4055
  {
4055
4056
  type: "button",
4056
4057
  onClick: () => t(u),
4057
4058
  "aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
4058
- className: k(m, "cursor-zoom-in"),
4059
+ className: C(m, "cursor-zoom-in"),
4059
4060
  children: [
4060
4061
  d.content,
4061
4062
  g
@@ -4067,10 +4068,10 @@ const Or = ({
4067
4068
  g
4068
4069
  ] }, u);
4069
4070
  };
4070
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4071
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4071
4072
  "div",
4072
4073
  {
4073
- className: k(
4074
+ className: C(
4074
4075
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
4075
4076
  a
4076
4077
  ),
@@ -4079,7 +4080,7 @@ const Or = ({
4079
4080
  ) : i.length === 3 ? /* @__PURE__ */ h(
4080
4081
  "div",
4081
4082
  {
4082
- className: k(
4083
+ className: C(
4083
4084
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4084
4085
  a
4085
4086
  ),
@@ -4092,7 +4093,7 @@ const Or = ({
4092
4093
  ) : /* @__PURE__ */ n(
4093
4094
  "div",
4094
4095
  {
4095
- className: k(
4096
+ className: C(
4096
4097
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4097
4098
  a
4098
4099
  ),
@@ -4110,12 +4111,12 @@ const Or = ({
4110
4111
  }
4111
4112
  );
4112
4113
  }, Ie = (e) => {
4113
- const [t, s] = $(!1), [a, r] = $(0), i = J(
4114
+ const [t, s] = O(!1), [a, r] = O(0), i = Z(
4114
4115
  (o) => {
4115
4116
  (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4116
4117
  },
4117
4118
  [e]
4118
- ), l = J(() => s(!1), []);
4119
+ ), l = Z(() => s(!1), []);
4119
4120
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4120
4121
  }, Gr = (e, t, s, a) => ({
4121
4122
  ariaLabel: `Open image ${t + 1} of ${s}`,
@@ -4187,13 +4188,13 @@ const Or = ({
4187
4188
  loading: o = "lazy",
4188
4189
  onClick: d
4189
4190
  }) => {
4190
- const u = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Ie(
4191
+ const u = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: w } = Ie(
4191
4192
  d
4192
4193
  );
4193
4194
  if (u.length === 0)
4194
4195
  return null;
4195
- const N = u.map(
4196
- (w, p) => Gr(w, p, u.length, o)
4196
+ const _ = u.map(
4197
+ (p, b) => Gr(p, b, u.length, o)
4197
4198
  );
4198
4199
  return /* @__PURE__ */ h(
4199
4200
  ke,
@@ -4203,14 +4204,14 @@ const Or = ({
4203
4204
  groupPosition: l,
4204
4205
  "data-testid": "image-attachment",
4205
4206
  children: [
4206
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: N, onTileActivate: c }) }),
4207
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: _, onTileActivate: c }) }),
4207
4208
  /* @__PURE__ */ n(
4208
4209
  xn,
4209
4210
  {
4210
4211
  open: m,
4211
4212
  items: Nn(u, a),
4212
4213
  initialIndex: f,
4213
- onClose: b
4214
+ onClose: w
4214
4215
  }
4215
4216
  )
4216
4217
  ]
@@ -4310,12 +4311,12 @@ const Or = ({
4310
4311
  onClick: d,
4311
4312
  onDismiss: u
4312
4313
  }) => {
4313
- const g = Ee(e), m = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4314
+ const g = Ee(e), m = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: _ } = Ie(
4314
4315
  d
4315
- ), w = e === "composer" && !!u;
4316
+ ), p = e === "composer" && !!u;
4316
4317
  if (m.length === 0)
4317
4318
  return null;
4318
- const p = m.map((v) => ({
4319
+ const b = m.map((v) => ({
4319
4320
  src: v.src,
4320
4321
  filename: v.filename ?? ae(v.src)
4321
4322
  }));
@@ -4327,8 +4328,8 @@ const Or = ({
4327
4328
  groupPosition: o,
4328
4329
  "data-testid": "pdf-attachment",
4329
4330
  children: [
4330
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((v, A) => {
4331
- const T = v.filename ?? ae(v.src), E = w && A === 0 ? /* @__PURE__ */ n(Ce, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4331
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((v, y) => {
4332
+ const T = v.filename ?? ae(v.src), I = p && y === 0 ? /* @__PURE__ */ n(Ce, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4332
4333
  vn,
4333
4334
  {
4334
4335
  url: v.src,
@@ -4343,20 +4344,20 @@ const Or = ({
4343
4344
  {
4344
4345
  variant: g,
4345
4346
  item: v,
4346
- index: A,
4347
- onActivate: b,
4348
- trailingAction: E
4347
+ index: y,
4348
+ onActivate: w,
4349
+ trailingAction: I
4349
4350
  },
4350
- `${v.src}-${A}`
4351
+ `${v.src}-${y}`
4351
4352
  );
4352
4353
  }) }),
4353
4354
  /* @__PURE__ */ n(
4354
4355
  Jr,
4355
4356
  {
4356
4357
  open: f,
4357
- items: p,
4358
+ items: b,
4358
4359
  initialIndex: c,
4359
- onClose: N
4360
+ onClose: _
4360
4361
  }
4361
4362
  )
4362
4363
  ]
@@ -4495,13 +4496,13 @@ const Or = ({
4495
4496
  preload: d,
4496
4497
  onClick: u
4497
4498
  }) => {
4498
- const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4499
+ const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: _ } = Ie(
4499
4500
  u
4500
4501
  );
4501
4502
  if (g.length === 0)
4502
4503
  return null;
4503
- const w = g.map(
4504
- (p, v) => ii(p, v, g.length)
4504
+ const p = g.map(
4505
+ (b, v) => ii(b, v, g.length)
4505
4506
  );
4506
4507
  return /* @__PURE__ */ h(
4507
4508
  ke,
@@ -4514,8 +4515,8 @@ const Or = ({
4514
4515
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4515
4516
  wn,
4516
4517
  {
4517
- tiles: w,
4518
- onTileActivate: b,
4518
+ tiles: p,
4519
+ onTileActivate: w,
4519
4520
  className: "overflow-hidden rounded-md"
4520
4521
  }
4521
4522
  ) }),
@@ -4525,7 +4526,7 @@ const Or = ({
4525
4526
  open: f,
4526
4527
  items: Cn(g, r),
4527
4528
  initialIndex: c,
4528
- onClose: N
4529
+ onClose: _
4529
4530
  }
4530
4531
  )
4531
4532
  ]
@@ -4553,7 +4554,7 @@ const Or = ({
4553
4554
  onClick: t,
4554
4555
  disabled: s,
4555
4556
  style: { backgroundColor: "#E6E5E3" },
4556
- className: k(
4557
+ className: C(
4557
4558
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4558
4559
  {
4559
4560
  "hover:brightness-95 active:brightness-90": !s,
@@ -4641,4 +4642,4 @@ export {
4641
4642
  Jt as y,
4642
4643
  Ci as z
4643
4644
  };
4644
- //# sourceMappingURL=index-CghCKfXq.js.map
4645
+ //# sourceMappingURL=index-MMFq_gs5.js.map