@linktr.ee/messaging-react 3.1.3 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{Card-CqeFyk7l.cjs → Card-B5TCecD6.cjs} +2 -2
  2. package/dist/{Card-CqeFyk7l.cjs.map → Card-B5TCecD6.cjs.map} +1 -1
  3. package/dist/{Card-BHF-XfHG.cjs → Card-CO089n1e.cjs} +2 -2
  4. package/dist/{Card-BHF-XfHG.cjs.map → Card-CO089n1e.cjs.map} +1 -1
  5. package/dist/{Card-Ctub3AU9.js → Card-DQYLHbDI.js} +2 -2
  6. package/dist/{Card-Ctub3AU9.js.map → Card-DQYLHbDI.js.map} +1 -1
  7. package/dist/{Card-RHd97_iq.js → Card-DTaHgygz.js} +2 -2
  8. package/dist/{Card-RHd97_iq.js.map → Card-DTaHgygz.js.map} +1 -1
  9. package/dist/{Card-DvoK42pX.cjs → Card-aO1qZWDU.cjs} +2 -2
  10. package/dist/{Card-DvoK42pX.cjs.map → Card-aO1qZWDU.cjs.map} +1 -1
  11. package/dist/{Card-VEde2Hfe.js → Card-bdnjL_4d.js} +3 -3
  12. package/dist/{Card-VEde2Hfe.js.map → Card-bdnjL_4d.js.map} +1 -1
  13. package/dist/{LockedThumbnail-BPMP5yZP.cjs → LockedThumbnail-CWVybsBb.cjs} +2 -2
  14. package/dist/{LockedThumbnail-BPMP5yZP.cjs.map → LockedThumbnail-CWVybsBb.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-BADzjHNM.js → LockedThumbnail-nsFA3DjA.js} +2 -2
  16. package/dist/{LockedThumbnail-BADzjHNM.js.map → LockedThumbnail-nsFA3DjA.js.map} +1 -1
  17. package/dist/index-BO2VfA-M.cjs +2 -0
  18. package/dist/index-BO2VfA-M.cjs.map +1 -0
  19. package/dist/{index-CnOvDQIp.js → index-DJKFVBkP.js} +839 -834
  20. package/dist/index-DJKFVBkP.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +9 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +4 -3
  25. package/src/components/ChannelView.test.tsx +31 -0
  26. package/src/components/ChannelView.tsx +41 -30
  27. package/src/components/MessagingShell/index.tsx +2 -0
  28. package/src/types.ts +10 -0
  29. package/dist/index-BQf4WkPC.cjs +0 -2
  30. package/dist/index-BQf4WkPC.cjs.map +0 -1
  31. package/dist/index-CnOvDQIp.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import z, { createContext as Ge, useContext as Se, useCallback as q, useState as O, useRef as X, useEffect as J, useMemo as ne, Suspense as He } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
2
+ import z, { createContext as He, useContext as Te, useCallback as W, useState as O, useRef as K, useEffect as J, useMemo as se, Suspense as Ye } from "react";
3
3
  import { StreamChatService as En } from "@linktr.ee/messaging-core";
4
- import { Chat as In, DateSeparator as Sn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as Tn, useMessageReminder as An, useComponentContext as Ut, Attachment as Mn, EditMessageModal as Dn, MessageBlocked as Rn, MessageBouncePrompt as Ln, MessageDeleted as Pn, MessageIsThreadReplyInChannelButtonIndicator as On, MessageRepliesCountButton as zn, ReminderNotification as Fn, StreamedMessageText as $n, messageHasAttachments as Bn, messageHasReactions as jn, isDateSeparatorMessage as Un, isMessageBlocked as Vn, isMessageBounced as Gn, MessageBounceModal as Hn, MessageText as At, Poll as Yn, MessageErrorIcon as qn, useMessageContext as be, useMessageComposer as Wn, useStateStore as Xn, MessageInput as Kn, useMessageInputContext as Jn, useMessageComposerHasSendableData as Zn, AttachmentPreviewList as Qn, QuotedMessagePreview as es, TextareaComposer as ts, MessageTimestamp as De, AIStates as Re, useTypingContext as ns, useAIState as ss, Channel as as, WithComponents as rs, Window as is, MessageList as os, ChannelList as ls } from "stream-chat-react";
5
- import { StarIcon as $e, XIcon as pe, SpinnerGapIcon as Le, SignOutIcon as cs, ProhibitInsetIcon as Mt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as ds, SpeakerHighIcon as us, VideoCameraIcon as Ht, FileMdIcon as ms, FileTextIcon as hs, FileZipIcon as fs, FilePptIcon as gs, FileCsvIcon as bs, FileXlsIcon as ps, FileDocIcon as vs, FilePdfIcon as xs, CircleNotchIcon as fe, PlayIcon as Be, PauseIcon as ws, LinkIcon as Ns, DownloadSimpleIcon as ge, GiftIcon as _s, ThumbsUpIcon as ys, ThumbsDownIcon as Cs, TrashSimpleIcon as ks, ArrowUpIcon as Es, SparkleIcon as je, ProhibitIcon as Is, ArrowLeftIcon as Dt, DotsThreeIcon as Rt, PencilSimpleIcon as Ss, CaretLeftIcon as Ts, CaretRightIcon as As } from "@phosphor-icons/react";
6
- import y from "classnames";
4
+ import { Chat as In, DateSeparator as Sn, useChannelStateContext as de, useChatContext as qe, areMessageUIPropsEqual as Tn, useMessageReminder as An, useComponentContext as Ut, Attachment as Mn, EditMessageModal as Dn, MessageBlocked as Rn, MessageBouncePrompt as Ln, MessageDeleted as Pn, MessageIsThreadReplyInChannelButtonIndicator as On, MessageRepliesCountButton as zn, ReminderNotification as Fn, StreamedMessageText as $n, messageHasAttachments as Bn, messageHasReactions as jn, isDateSeparatorMessage as Un, isMessageBlocked as Vn, isMessageBounced as Gn, MessageBounceModal as Hn, MessageText as At, Poll as Yn, MessageErrorIcon as qn, useMessageContext as pe, useMessageComposer as Wn, useStateStore as Xn, MessageInput as Kn, useMessageInputContext as Jn, useMessageComposerHasSendableData as Zn, AttachmentPreviewList as Qn, QuotedMessagePreview as es, TextareaComposer as ts, MessageTimestamp as Re, AIStates as Le, useTypingContext as ns, useAIState as ss, Channel as as, WithComponents as rs, Window as is, MessageList as os, ChannelList as ls } from "stream-chat-react";
5
+ import { StarIcon as Be, XIcon as ve, SpinnerGapIcon as Pe, SignOutIcon as cs, ProhibitInsetIcon as Mt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as ds, SpeakerHighIcon as us, VideoCameraIcon as Ht, FileMdIcon as ms, FileTextIcon as hs, FileZipIcon as fs, FilePptIcon as gs, FileCsvIcon as bs, FileXlsIcon as ps, FileDocIcon as vs, FilePdfIcon as xs, CircleNotchIcon as ge, PlayIcon as je, PauseIcon as ws, LinkIcon as Ns, DownloadSimpleIcon as be, GiftIcon as _s, ThumbsUpIcon as ys, ThumbsDownIcon as Cs, TrashSimpleIcon as ks, ArrowUpIcon as Es, SparkleIcon as Ue, ProhibitIcon as Is, ArrowLeftIcon as Dt, DotsThreeIcon as Rt, PencilSimpleIcon as Ss, CaretLeftIcon as Ts, CaretRightIcon as As } from "@phosphor-icons/react";
6
+ import C from "classnames";
7
7
  import { MessageActions as Ms, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Lt } from "stream-chat";
9
- const qt = Ge({
9
+ const qt = He({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const qt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), qe = () => Se(qt), xi = ({
19
+ }), We = () => Te(qt), xi = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,9 +24,9 @@ const qt = Ge({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- const o = q(
28
- (I, ...C) => {
29
- i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
27
+ const o = W(
28
+ (T, ...M) => {
29
+ i && console.log(`🔥 [MessagingProvider] ${T}`, ...M);
30
30
  },
31
31
  [i]
32
32
  );
@@ -36,84 +36,84 @@ const qt = Ge({
36
36
  serviceConfig: !!s,
37
37
  capabilities: Object.keys(r)
38
38
  });
39
- const [l, d] = O(null), [m, g] = O(null), [u, f] = O(!1), [c, p] = O(!1), [N, v] = O(null), x = X(!1), w = X({
39
+ const [l, d] = O(null), [m, g] = O(null), [u, f] = O(!1), [c, b] = O(!1), [_, v] = O(null), w = K(!1), y = K({
40
40
  userId: t == null ? void 0 : t.id,
41
41
  apiKey: a,
42
42
  serviceConfig: s,
43
43
  capabilities: r
44
- }), A = X(0);
45
- A.current++, o("📊 RENDER INFO", {
46
- renderCount: A.current,
44
+ }), S = K(0);
45
+ S.current++, o("📊 RENDER INFO", {
46
+ renderCount: S.current,
47
47
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
48
48
  propChanges: {
49
- userChanged: w.current.userId !== (t == null ? void 0 : t.id),
50
- apiKeyChanged: w.current.apiKey !== a,
51
- serviceConfigChanged: w.current.serviceConfig !== s,
52
- capabilitiesChanged: w.current.capabilities !== r
49
+ userChanged: y.current.userId !== (t == null ? void 0 : t.id),
50
+ apiKeyChanged: y.current.apiKey !== a,
51
+ serviceConfigChanged: y.current.serviceConfig !== s,
52
+ capabilitiesChanged: y.current.capabilities !== r
53
53
  }
54
- }), w.current = {
54
+ }), y.current = {
55
55
  userId: t == null ? void 0 : t.id,
56
56
  apiKey: a,
57
57
  serviceConfig: s,
58
58
  capabilities: r
59
59
  }, J(() => {
60
- const I = A.current;
60
+ const T = S.current;
61
61
  if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
62
- renderCount: I,
62
+ renderCount: T,
63
63
  apiKey: !!a,
64
64
  serviceConfig: !!s,
65
65
  dependencies: {
66
66
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
67
67
  serviceConfigRef: s,
68
- serviceConfigStable: w.current.serviceConfig === s,
69
- apiKeyStable: w.current.apiKey === a
68
+ serviceConfigStable: y.current.serviceConfig === s,
69
+ apiKeyStable: y.current.apiKey === a
70
70
  }
71
71
  }), !a || !s) {
72
72
  o("⚠️ SERVICE INIT SKIPPED", {
73
- renderCount: I,
73
+ renderCount: T,
74
74
  reason: "Missing apiKey or serviceConfig"
75
75
  });
76
76
  return;
77
77
  }
78
78
  o("🚀 CREATING NEW SERVICE", {
79
- renderCount: I,
79
+ renderCount: T,
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
- serviceConfigChanged: w.current.serviceConfig !== s
81
+ serviceConfigChanged: y.current.serviceConfig !== s
82
82
  });
83
- const C = new En({
83
+ const M = new En({
84
84
  ...s,
85
85
  apiKey: a,
86
86
  debug: i
87
87
  });
88
- return d(C), o("✅ SERVICE SET", {
89
- renderCount: I,
90
- serviceInstance: !!C
88
+ return d(M), o("✅ SERVICE SET", {
89
+ renderCount: T,
90
+ serviceInstance: !!M
91
91
  }), () => {
92
92
  o("🧹 SERVICE CLEANUP", {
93
- renderCount: I,
93
+ renderCount: T,
94
94
  reason: "Effect cleanup"
95
- }), C.disconnectUser().catch(console.error);
95
+ }), M.disconnectUser().catch(console.error);
96
96
  };
97
97
  }, [a, s, i, o]);
98
- const T = X(null);
98
+ const k = K(null);
99
99
  J(() => {
100
- var C, k;
100
+ var M, N;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!l,
103
103
  hasUser: !!t,
104
104
  userId: t == null ? void 0 : t.id,
105
- isConnecting: x.current,
105
+ isConnecting: w.current,
106
106
  isConnected: u,
107
107
  dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
108
108
  }), !l || !t) {
109
109
  o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
110
110
  return;
111
111
  }
112
- if (x.current) {
112
+ if (w.current) {
113
113
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
114
114
  return;
115
115
  }
116
- if (((C = T.current) == null ? void 0 : C.serviceId) === l && ((k = T.current) == null ? void 0 : k.userId) === t.id) {
116
+ if (((M = k.current) == null ? void 0 : M.serviceId) === l && ((N = k.current) == null ? void 0 : N.userId) === t.id) {
117
117
  o(
118
118
  "⚠️ USER CONNECTION SKIPPED",
119
119
  "Already connected this user with this service"
@@ -121,22 +121,22 @@ const qt = Ge({
121
121
  return;
122
122
  }
123
123
  (async () => {
124
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0, p(!0), v(null);
124
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, b(!0), v(null);
125
125
  try {
126
126
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
127
127
  const E = await l.connectUser(t);
128
- g(E), f(!0), T.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
128
+ g(E), f(!0), k.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
129
129
  userId: t.id,
130
130
  clientId: E.userID
131
131
  });
132
132
  } catch (E) {
133
- const D = E instanceof Error ? E.message : "Connection failed";
134
- v(D), o("❌ USER CONNECTION ERROR", {
133
+ const I = E instanceof Error ? E.message : "Connection failed";
134
+ v(I), o("❌ USER CONNECTION ERROR", {
135
135
  userId: t.id,
136
- error: D
136
+ error: I
137
137
  });
138
138
  } finally {
139
- p(!1), x.current = !1, o("🔄 USER CONNECTION FINISHED", {
139
+ b(!1), w.current = !1, o("🔄 USER CONNECTION FINISHED", {
140
140
  userId: t.id,
141
141
  isConnected: u
142
142
  });
@@ -149,12 +149,12 @@ const qt = Ge({
149
149
  l && u ? (o(
150
150
  "🧹 CLEANUP EFFECT TRIGGERED",
151
151
  "Cleaning up connection on unmount"
152
- ), T.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
152
+ ), k.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
153
153
  hasService: !!l,
154
154
  isConnected: u
155
155
  });
156
156
  }), [l, u, o]);
157
- const S = q(async () => {
157
+ const A = W(async () => {
158
158
  if (o("🔄 REFRESH CONNECTION CALLED", {
159
159
  hasService: !!l,
160
160
  hasUser: !!t
@@ -162,52 +162,52 @@ const qt = Ge({
162
162
  o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
163
163
  return;
164
164
  }
165
- o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), p(!0);
165
+ o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
166
166
  try {
167
167
  o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
168
- const I = await l.connectUser(t);
169
- g(I), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
- } catch (I) {
171
- const C = I instanceof Error ? I.message : "Refresh failed";
172
- v(C), o("❌ CONNECTION REFRESH ERROR", {
168
+ const T = await l.connectUser(t);
169
+ g(T), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
+ } catch (T) {
171
+ const M = T instanceof Error ? T.message : "Refresh failed";
172
+ v(M), o("❌ CONNECTION REFRESH ERROR", {
173
173
  userId: t.id,
174
- error: C
174
+ error: M
175
175
  });
176
176
  } finally {
177
- p(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
177
+ b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
178
178
  }
179
- }, [l, t, o]), R = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [l, t, o]), D = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!l,
181
181
  hasClient: !!m,
182
182
  isConnected: u,
183
183
  isLoading: c,
184
- hasError: !!N,
184
+ hasError: !!_,
185
185
  capabilitiesKeys: Object.keys(r)
186
186
  }), {
187
187
  service: l,
188
188
  client: m,
189
189
  isConnected: u,
190
190
  isLoading: c,
191
- error: N,
191
+ error: _,
192
192
  capabilities: r,
193
- refreshConnection: S,
193
+ refreshConnection: A,
194
194
  debug: i
195
195
  }), [
196
196
  l,
197
197
  m,
198
198
  u,
199
199
  c,
200
- N,
200
+ _,
201
201
  r,
202
- S,
202
+ A,
203
203
  i,
204
204
  o
205
205
  ]);
206
206
  return o("🔄 RENDER END", {
207
- renderCount: A.current,
207
+ renderCount: S.current,
208
208
  willRenderChat: !!(m && u),
209
- contextValueReady: !!R
210
- }), /* @__PURE__ */ n(qt.Provider, { value: R, children: m && u ? /* @__PURE__ */ n(
209
+ contextValueReady: !!D
210
+ }), /* @__PURE__ */ n(qt.Provider, { value: D, children: m && u ? /* @__PURE__ */ n(
211
211
  In,
212
212
  {
213
213
  client: m,
@@ -217,7 +217,7 @@ const qt = Ge({
217
217
  children: e
218
218
  }
219
219
  ) : e });
220
- }, Ds = () => qe(), Wt = (e) => {
220
+ }, Ds = () => We(), Wt = (e) => {
221
221
  var a, r;
222
222
  const [t, s] = O(
223
223
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -247,7 +247,7 @@ function Pt(e, t) {
247
247
  const s = e == null ? void 0 : e.trim();
248
248
  return !s || t && s === t ? !1 : !Ls(s);
249
249
  }
250
- function Te(e) {
250
+ function Ae(e) {
251
251
  return Pt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Pt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
252
252
  }
253
253
  const Ot = [
@@ -290,7 +290,7 @@ function Os(e) {
290
290
  const s = Ps(e) % Ot.length;
291
291
  return Ot[s];
292
292
  }
293
- const ae = ({
293
+ const re = ({
294
294
  id: e,
295
295
  image: t,
296
296
  size: s = 40,
@@ -310,7 +310,7 @@ const ae = ({
310
310
  "div",
311
311
  {
312
312
  "aria-hidden": "true",
313
- className: y(
313
+ className: C(
314
314
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
315
315
  m
316
316
  ),
@@ -320,7 +320,7 @@ const ae = ({
320
320
  return /* @__PURE__ */ h(
321
321
  "div",
322
322
  {
323
- className: y(
323
+ className: C(
324
324
  "relative flex-shrink-0 !bg-transparent",
325
325
  a
326
326
  ),
@@ -335,14 +335,14 @@ const ae = ({
335
335
  {
336
336
  "aria-hidden": "true",
337
337
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
338
- children: /* @__PURE__ */ n($e, { className: "size-3 text-yellow-600", weight: "duotone" })
338
+ children: /* @__PURE__ */ n(Be, { className: "size-3 text-yellow-600", weight: "duotone" })
339
339
  }
340
340
  ),
341
341
  /* @__PURE__ */ n(
342
342
  "div",
343
343
  {
344
344
  "data-testid": "avatar-ring",
345
- className: y(
345
+ className: C(
346
346
  "h-full w-full",
347
347
  "bg-transparent"
348
348
  ),
@@ -361,7 +361,7 @@ const ae = ({
361
361
  ]
362
362
  }
363
363
  );
364
- }, ye = ({
364
+ }, Ce = ({
365
365
  variant: e = "default",
366
366
  className: t,
367
367
  children: s,
@@ -370,7 +370,7 @@ const ae = ({
370
370
  "button",
371
371
  {
372
372
  type: "button",
373
- className: y(
373
+ className: C(
374
374
  "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",
375
375
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
376
376
  t
@@ -384,7 +384,7 @@ function zs({ label: e, className: t, children: s, ...a }) {
384
384
  "button",
385
385
  {
386
386
  type: "button",
387
- className: y(
387
+ className: C(
388
388
  "inline-flex items-center justify-center rounded-full transition-colors focus-ring p-2",
389
389
  {
390
390
  "cursor-not-allowed opacity-50": a.disabled,
@@ -401,7 +401,7 @@ function zs({ label: e, className: t, children: s, ...a }) {
401
401
  );
402
402
  }
403
403
  function Fs({ onClick: e }) {
404
- return /* @__PURE__ */ n(zs, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(pe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
404
+ return /* @__PURE__ */ n(zs, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(ve, { className: "h-5 w-5 text-stone", weight: "bold" }) });
405
405
  }
406
406
  const $s = ({
407
407
  dialogRef: e,
@@ -418,69 +418,69 @@ const $s = ({
418
418
  onDeleteConversationClick: u,
419
419
  onBlockParticipantClick: f,
420
420
  onReportParticipantClick: c,
421
- customProfileContent: p,
422
- customChannelActions: N
421
+ customProfileContent: b,
422
+ customChannelActions: _
423
423
  }) => {
424
- var B, H, Y, $;
425
- const { service: v, debug: x } = qe(), [w, A] = O(!1), [T, S] = O(!1), [R, I] = O(!1), C = q(async () => {
426
- var b;
427
- if (!(!m || !v || !((b = s == null ? void 0 : s.user) != null && b.id)))
424
+ var F, Y, q, $;
425
+ const { service: v, debug: w } = We(), [y, S] = O(!1), [k, A] = O(!1), [D, T] = O(!1), M = W(async () => {
426
+ var p;
427
+ if (!(!m || !v || !((p = s == null ? void 0 : s.user) != null && p.id)))
428
428
  try {
429
429
  const L = (await v.getBlockedUsers()).some(
430
- (M) => {
431
- var W;
432
- return M.blocked_user_id === ((W = s == null ? void 0 : s.user) == null ? void 0 : W.id);
430
+ (U) => {
431
+ var R;
432
+ return U.blocked_user_id === ((R = s == null ? void 0 : s.user) == null ? void 0 : R.id);
433
433
  }
434
434
  );
435
- A(L);
436
- } catch (_) {
435
+ S(L);
436
+ } catch (x) {
437
437
  console.error(
438
438
  "[ChannelInfoDialog] Failed to check blocked status:",
439
- _
439
+ x
440
440
  );
441
441
  }
442
- }, [v, (B = s == null ? void 0 : s.user) == null ? void 0 : B.id, m]);
442
+ }, [v, (F = s == null ? void 0 : s.user) == null ? void 0 : F.id, m]);
443
443
  J(() => {
444
- C();
445
- }, [C]);
446
- const k = async () => {
447
- var b;
448
- if (!T) {
449
- u == null || u(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), S(!0);
444
+ M();
445
+ }, [M]);
446
+ const N = async () => {
447
+ var p;
448
+ if (!k) {
449
+ u == null || u(), w && console.log("[ChannelInfoDialog] Leave conversation", r.cid), A(!0);
450
450
  try {
451
- const _ = ((b = r._client) == null ? void 0 : b.userID) ?? null;
452
- await r.hide(_, !1), o && await o(r), t();
453
- } catch (_) {
454
- console.error("[ChannelInfoDialog] Failed to leave conversation", _);
451
+ const x = ((p = r._client) == null ? void 0 : p.userID) ?? null;
452
+ await r.hide(x, !1), o && await o(r), t();
453
+ } catch (x) {
454
+ console.error("[ChannelInfoDialog] Failed to leave conversation", x);
455
455
  } finally {
456
- S(!1);
456
+ A(!1);
457
457
  }
458
458
  }
459
459
  }, E = async () => {
460
- var b, _, L;
461
- if (!(R || !v)) {
462
- f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), I(!0);
460
+ var p, x, L;
461
+ if (!(D || !v)) {
462
+ f == null || f(), w && console.log("[ChannelInfoDialog] Block member", (p = s == null ? void 0 : s.user) == null ? void 0 : p.id), T(!0);
463
463
  try {
464
- await v.blockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
465
- } catch (M) {
466
- console.error("[ChannelInfoDialog] Failed to block member", M);
464
+ await v.blockUser((x = s == null ? void 0 : s.user) == null ? void 0 : x.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
465
+ } catch (U) {
466
+ console.error("[ChannelInfoDialog] Failed to block member", U);
467
467
  } finally {
468
- I(!1);
468
+ T(!1);
469
469
  }
470
470
  }
471
- }, D = async () => {
472
- var b, _, L;
473
- if (!(R || !v)) {
474
- f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), I(!0);
471
+ }, I = async () => {
472
+ var p, x, L;
473
+ if (!(D || !v)) {
474
+ f == null || f(), w && console.log("[ChannelInfoDialog] Unblock member", (p = s == null ? void 0 : s.user) == null ? void 0 : p.id), T(!0);
475
475
  try {
476
- await v.unBlockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
477
- } catch (M) {
478
- console.error("[ChannelInfoDialog] Failed to unblock member", M);
476
+ await v.unBlockUser((x = s == null ? void 0 : s.user) == null ? void 0 : x.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
477
+ } catch (U) {
478
+ console.error("[ChannelInfoDialog] Failed to unblock member", U);
479
479
  } finally {
480
- I(!1);
480
+ T(!1);
481
481
  }
482
482
  }
483
- }, U = () => {
483
+ }, B = () => {
484
484
  c == null || c(), t(), window.open(
485
485
  "https://linktr.ee/s/about/trust-center/report",
486
486
  "_blank",
@@ -488,7 +488,7 @@ const $s = ({
488
488
  );
489
489
  };
490
490
  if (!s) return null;
491
- const F = a ?? Te(s.user), Z = (H = s.user) == null ? void 0 : H.image, V = (Y = s.user) == null ? void 0 : Y.username, G = V ? `linktr.ee/${V}` : void 0, P = (($ = s.user) == null ? void 0 : $.id) || "unknown";
491
+ const P = a ?? Ae(s.user), Z = (Y = s.user) == null ? void 0 : Y.image, G = (q = s.user) == null ? void 0 : q.username, H = G ? `linktr.ee/${G}` : void 0, j = (($ = s.user) == null ? void 0 : $.id) || "unknown";
492
492
  return (
493
493
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
494
494
  /* @__PURE__ */ n(
@@ -497,8 +497,8 @@ const $s = ({
497
497
  ref: e,
498
498
  className: "mes-dialog group",
499
499
  onClose: t,
500
- onClick: (b) => {
501
- b.target === e.current && t();
500
+ onClick: (p) => {
501
+ p.target === e.current && t();
502
502
  },
503
503
  children: /* @__PURE__ */ h("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
504
504
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
@@ -514,19 +514,19 @@ const $s = ({
514
514
  children: [
515
515
  /* @__PURE__ */ h("div", { className: "flex items-center gap-3 w-full", children: [
516
516
  /* @__PURE__ */ n(
517
- ae,
517
+ re,
518
518
  {
519
- id: P,
520
- name: F,
519
+ id: j,
520
+ name: P,
521
521
  image: Z,
522
522
  size: 88,
523
523
  shape: "circle"
524
524
  }
525
525
  ),
526
526
  /* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 flex-1", children: [
527
- /* @__PURE__ */ n("p", { className: "truncate text-base font-semibold text-charcoal", children: F }),
528
- G && /* @__PURE__ */ n("p", { className: "truncate text-sm text-[#00000055]", children: G }),
529
- i && !p && /* @__PURE__ */ n(
527
+ /* @__PURE__ */ n("p", { className: "truncate text-base font-semibold text-charcoal", children: P }),
528
+ H && /* @__PURE__ */ n("p", { className: "truncate text-sm text-[#00000055]", children: H }),
529
+ i && !b && /* @__PURE__ */ n(
530
530
  "span",
531
531
  {
532
532
  className: "mt-1 rounded-full text-xs font-normal w-fit",
@@ -542,81 +542,81 @@ const $s = ({
542
542
  )
543
543
  ] })
544
544
  ] }),
545
- p && /* @__PURE__ */ n("div", { className: "w-full", children: p })
545
+ b && /* @__PURE__ */ n("div", { className: "w-full", children: b })
546
546
  ]
547
547
  }
548
548
  ),
549
549
  /* @__PURE__ */ h("ul", { className: "flex flex-col gap-2 mt-2", children: [
550
550
  d && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
551
- ye,
551
+ Ce,
552
552
  {
553
- onClick: k,
554
- disabled: T,
555
- "aria-busy": T,
553
+ onClick: N,
554
+ disabled: k,
555
+ "aria-busy": k,
556
556
  children: [
557
- T ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(cs, { className: "h-5 w-5" }),
557
+ k ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(cs, { className: "h-5 w-5" }),
558
558
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
559
559
  ]
560
560
  }
561
561
  ) }),
562
- m && /* @__PURE__ */ n("li", { children: w ? /* @__PURE__ */ h(
563
- ye,
562
+ m && /* @__PURE__ */ n("li", { children: y ? /* @__PURE__ */ h(
563
+ Ce,
564
564
  {
565
- onClick: D,
566
- disabled: R,
567
- "aria-busy": R,
565
+ onClick: I,
566
+ disabled: D,
567
+ "aria-busy": D,
568
568
  children: [
569
- R ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
569
+ D ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
570
570
  /* @__PURE__ */ n("span", { children: "Unblock" })
571
571
  ]
572
572
  }
573
573
  ) : /* @__PURE__ */ h(
574
- ye,
574
+ Ce,
575
575
  {
576
576
  onClick: E,
577
- disabled: R,
578
- "aria-busy": R,
577
+ disabled: D,
578
+ "aria-busy": D,
579
579
  children: [
580
- R ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
580
+ D ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
581
581
  /* @__PURE__ */ n("span", { children: "Block" })
582
582
  ]
583
583
  }
584
584
  ) }),
585
- g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ye, { variant: "danger", onClick: U, children: [
585
+ g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(Ce, { variant: "danger", onClick: B, children: [
586
586
  /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
587
587
  /* @__PURE__ */ n("span", { children: "Report" })
588
588
  ] }) }),
589
- N
589
+ _
590
590
  ] })
591
591
  ] })
592
592
  ] })
593
593
  }
594
594
  )
595
595
  );
596
- }, Bs = (e) => /* @__PURE__ */ n(Sn, { ...e, position: "center" }), Ue = "vote_up", Ve = "vote_down";
596
+ }, Bs = (e) => /* @__PURE__ */ n(Sn, { ...e, position: "center" }), Ve = "vote_up", Ge = "vote_down";
597
597
  function js(e) {
598
- return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === Ue) ? "up" : null : null;
598
+ return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
599
599
  }
600
600
  function Us(e) {
601
- const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ne(
601
+ const { channel: t } = de(), { client: s } = qe("useMessageVote"), a = se(
602
602
  () => js(e.own_reactions),
603
603
  [e.own_reactions]
604
- ), r = q(async () => {
604
+ ), r = W(async () => {
605
605
  if (s != null && s.userID)
606
606
  try {
607
- a === "up" ? await t.deleteReaction(e.id, Ue) : await t.sendReaction(
607
+ a === "up" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
608
608
  e.id,
609
- { type: Ue },
609
+ { type: Ve },
610
610
  { enforce_unique: !0, skip_push: !0 }
611
611
  );
612
612
  } catch {
613
613
  }
614
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = q(async () => {
614
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = W(async () => {
615
615
  if (s != null && s.userID)
616
616
  try {
617
- a === "down" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
617
+ a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
618
618
  e.id,
619
- { type: Ve },
619
+ { type: Ge },
620
620
  { enforce_unique: !0, skip_push: !0 }
621
621
  );
622
622
  } catch {
@@ -635,13 +635,13 @@ function Xt({
635
635
  const s = e == null ? void 0 : e.text, a = Vs(t);
636
636
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
637
637
  }
638
- const Gs = z.lazy(() => import("./Card-Ctub3AU9.js")), Hs = z.lazy(() => import("./Card-RHd97_iq.js")), Ys = z.lazy(() => import("./Card-VEde2Hfe.js")), We = () => /* @__PURE__ */ n(
638
+ const Gs = z.lazy(() => import("./Card-DQYLHbDI.js")), Hs = z.lazy(() => import("./Card-DTaHgygz.js")), Ys = z.lazy(() => import("./Card-bdnjL_4d.js")), Xe = () => /* @__PURE__ */ n(
639
639
  "div",
640
640
  {
641
641
  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)]",
642
642
  "aria-hidden": !0
643
643
  }
644
- ), qs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Ws = Kt, Xs = Jt, zt = { Composer: qs, Sent: Kt, Received: Jt, Creator: Ws, Visitor: Xs }, Ks = [
644
+ ), qs = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Ws = Kt, Xs = Jt, zt = { Composer: qs, Sent: Kt, Received: Jt, Creator: Ws, Visitor: Xs }, Ks = [
645
645
  [/pdf/, "pdf"],
646
646
  [/wordprocessingml|msword|\.doc/, "doc"],
647
647
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -651,7 +651,7 @@ const Gs = z.lazy(() => import("./Card-Ctub3AU9.js")), Hs = z.lazy(() => import(
651
651
  [/plain|rtf/, "text"],
652
652
  [/markdown/, "markdown"]
653
653
  ];
654
- function re(e) {
654
+ function ie(e) {
655
655
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
656
656
  }
657
657
  function Zt(e) {
@@ -677,10 +677,10 @@ const Js = {
677
677
  generic: Gt
678
678
  };
679
679
  function Qs(e) {
680
- const t = re(e);
680
+ const t = ie(e);
681
681
  return t !== "document" ? Js[t] : Zs[Zt(e)];
682
682
  }
683
- function le(e, t) {
683
+ function ce(e, t) {
684
684
  return z.createElement(Qs(e), t);
685
685
  }
686
686
  const ea = (e) => {
@@ -698,78 +698,78 @@ const ea = (e) => {
698
698
  muted: d = !1,
699
699
  onContainerClick: m
700
700
  }) => {
701
- const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] = O(a), [x, w] = O(0), [A, T] = O(!1), [S, R] = O(!1), [I, C] = O(!1), [k, E] = O(!1), [D, U] = O(!0), [F, Z] = O(null), V = q(() => {
702
- C(!1), v(!0);
703
- }, []), G = q((b) => {
704
- const _ = f.current;
705
- if (!_) return 0;
706
- const L = _.getBoundingClientRect();
701
+ const g = ie(t), u = K(null), f = K(null), c = K(null), b = K(r), [_, v] = O(a), [w, y] = O(0), [S, k] = O(!1), [A, D] = O(!1), [T, M] = O(!1), [N, E] = O(!1), [I, B] = O(!0), [P, Z] = O(null), G = W(() => {
702
+ M(!1), v(!0);
703
+ }, []), H = W((p) => {
704
+ const x = f.current;
705
+ if (!x) return 0;
706
+ const L = x.getBoundingClientRect();
707
707
  return Math.max(
708
708
  0,
709
- Math.min(1, (ea(b) - L.left) / L.width)
709
+ Math.min(1, (ea(p) - L.left) / L.width)
710
710
  );
711
- }, []), P = q((b) => {
712
- const _ = u.current;
713
- _ && _.duration && (_.currentTime = b * _.duration);
714
- }, []), B = (b) => {
715
- b.stopPropagation(), T(!0);
716
- const _ = G(b);
717
- w(_), P(_);
711
+ }, []), j = W((p) => {
712
+ const x = u.current;
713
+ x && x.duration && (x.currentTime = p * x.duration);
714
+ }, []), F = (p) => {
715
+ p.stopPropagation(), k(!0);
716
+ const x = H(p);
717
+ y(x), j(x);
718
718
  };
719
719
  J(() => {
720
- r !== void 0 && r !== p.current && (p.current = r, v(r));
720
+ r !== void 0 && r !== b.current && (b.current = r, v(r));
721
721
  }, [r]), J(() => {
722
- if (!N) {
722
+ if (!_) {
723
723
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
724
724
  return;
725
725
  }
726
- const b = () => {
727
- const _ = u.current;
728
- _ && _.duration && !A && w(_.currentTime / _.duration), c.current = requestAnimationFrame(b);
726
+ const p = () => {
727
+ const x = u.current;
728
+ x && x.duration && !S && y(x.currentTime / x.duration), c.current = requestAnimationFrame(p);
729
729
  };
730
- return c.current = requestAnimationFrame(b), () => {
730
+ return c.current = requestAnimationFrame(p), () => {
731
731
  c.current !== null && cancelAnimationFrame(c.current);
732
732
  };
733
- }, [N, A]), J(() => {
734
- const b = u.current;
735
- b && (N ? b.play().catch((_) => {
736
- v(!1), C(!0);
737
- }) : b.pause());
738
- }, [N]), J(() => {
739
- if (!A) return;
740
- const b = (L) => w(G(L)), _ = (L) => {
741
- T(!1), P(G(L));
733
+ }, [_, S]), J(() => {
734
+ const p = u.current;
735
+ p && (_ ? p.play().catch((x) => {
736
+ v(!1), M(!0);
737
+ }) : p.pause());
738
+ }, [_]), J(() => {
739
+ if (!S) return;
740
+ const p = (L) => y(H(L)), x = (L) => {
741
+ k(!1), j(H(L));
742
742
  };
743
- return window.addEventListener("mousemove", b), window.addEventListener("mouseup", _), window.addEventListener("touchmove", b, { passive: !0 }), window.addEventListener("touchend", _), () => {
744
- window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", _), window.removeEventListener("touchmove", b), window.removeEventListener("touchend", _);
743
+ return window.addEventListener("mousemove", p), window.addEventListener("mouseup", x), window.addEventListener("touchmove", p, { passive: !0 }), window.addEventListener("touchend", x), () => {
744
+ window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", x), window.removeEventListener("touchmove", p), window.removeEventListener("touchend", x);
745
745
  };
746
- }, [A, G, P]);
747
- const H = F ? { aspectRatio: String(F) } : void 0, Y = F ? "" : " aspect-video", $ = Math.round(x * 100);
746
+ }, [S, H, j]);
747
+ const Y = P ? { aspectRatio: String(P) } : void 0, q = P ? "" : " aspect-video", $ = Math.round(w * 100);
748
748
  return /* @__PURE__ */ h(
749
749
  "div",
750
750
  {
751
751
  role: "button",
752
752
  tabIndex: 0,
753
- className: `relative cursor-pointer overflow-hidden bg-black ${Y}`,
754
- style: H,
755
- onClick: (b) => {
753
+ className: `relative cursor-pointer overflow-hidden bg-black ${q}`,
754
+ style: Y,
755
+ onClick: (p) => {
756
756
  if (m) {
757
- m(b);
757
+ m(p);
758
758
  return;
759
759
  }
760
- I || o && v((_) => !_);
760
+ T || o && v((x) => !x);
761
761
  },
762
- onKeyDown: (b) => {
763
- if (!(b.key !== "Enter" && b.key !== " ")) {
764
- if (b.preventDefault(), m) {
765
- m(b);
762
+ onKeyDown: (p) => {
763
+ if (!(p.key !== "Enter" && p.key !== " ")) {
764
+ if (p.preventDefault(), m) {
765
+ m(p);
766
766
  return;
767
767
  }
768
- I || o && v((_) => !_);
768
+ T || o && v((x) => !x);
769
769
  }
770
770
  },
771
771
  children: [
772
- s && (g === "audio" || D) && /* @__PURE__ */ n(
772
+ s && (g === "audio" || I) && /* @__PURE__ */ n(
773
773
  "img",
774
774
  {
775
775
  src: s,
@@ -777,7 +777,7 @@ const ea = (e) => {
777
777
  className: "absolute inset-0 h-full w-full object-cover"
778
778
  }
779
779
  ),
780
- !s && (g === "audio" || D) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
780
+ !s && (g === "audio" || I) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
781
781
  className: "size-12 text-black/20",
782
782
  weight: "regular"
783
783
  }) }),
@@ -791,12 +791,12 @@ const ea = (e) => {
791
791
  style: { width: "100%", height: "100%" },
792
792
  onLoadStart: () => E(!0),
793
793
  onCanPlay: () => {
794
- E(!1), U(!1);
794
+ E(!1), B(!1);
795
795
  },
796
796
  onWaiting: () => E(!0),
797
- onPlay: () => C(!1),
797
+ onPlay: () => M(!1),
798
798
  onEnded: () => {
799
- i || (v(!1), w(0));
799
+ i || (v(!1), y(0));
800
800
  },
801
801
  children: /* @__PURE__ */ n("track", { kind: "captions" })
802
802
  }
@@ -811,41 +811,41 @@ const ea = (e) => {
811
811
  style: { width: "100%", height: "100%" },
812
812
  onLoadStart: () => E(!0),
813
813
  onCanPlay: () => {
814
- E(!1), U(!1);
814
+ E(!1), B(!1);
815
815
  },
816
816
  onWaiting: () => E(!0),
817
- onPlay: () => C(!1),
817
+ onPlay: () => M(!1),
818
818
  onLoadedMetadata: () => {
819
- const b = u.current;
820
- b instanceof HTMLVideoElement && b.videoWidth && b.videoHeight && Z(b.videoWidth / b.videoHeight);
819
+ const p = u.current;
820
+ p instanceof HTMLVideoElement && p.videoWidth && p.videoHeight && Z(p.videoWidth / p.videoHeight);
821
821
  },
822
822
  onEnded: () => {
823
- i || (v(!1), w(0));
823
+ i || (v(!1), y(0));
824
824
  },
825
825
  children: /* @__PURE__ */ n("track", { kind: "captions" })
826
826
  }
827
827
  ) }),
828
- k && !I && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
829
- fe,
828
+ N && !T && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
829
+ ge,
830
830
  {
831
831
  className: "size-8 animate-spin text-white/80",
832
832
  weight: "bold"
833
833
  }
834
834
  ) }),
835
- I && !o && /* @__PURE__ */ n(
835
+ T && !o && /* @__PURE__ */ n(
836
836
  "div",
837
837
  {
838
838
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
839
839
  role: "button",
840
840
  tabIndex: 0,
841
841
  "aria-label": "Play preview",
842
- onClick: (b) => {
843
- b.stopPropagation(), V();
842
+ onClick: (p) => {
843
+ p.stopPropagation(), G();
844
844
  },
845
- onKeyDown: (b) => {
846
- b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(), V());
845
+ onKeyDown: (p) => {
846
+ p.key !== "Enter" && p.key !== " " || (p.preventDefault(), p.stopPropagation(), G());
847
847
  },
848
- children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
848
+ 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(je, { className: "size-9 translate-x-0.5", weight: "fill" }) })
849
849
  }
850
850
  ),
851
851
  l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
@@ -859,11 +859,11 @@ const ea = (e) => {
859
859
  tabIndex: 0,
860
860
  ref: f,
861
861
  className: "relative flex h-4 w-full cursor-pointer items-center",
862
- onMouseDown: B,
863
- onTouchStart: B,
864
- onClick: (b) => b.stopPropagation(),
865
- onKeyDown: (b) => {
866
- b.key === "ArrowRight" && P(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && P(Math.max(0, x - 0.05));
862
+ onMouseDown: F,
863
+ onTouchStart: F,
864
+ onClick: (p) => p.stopPropagation(),
865
+ onKeyDown: (p) => {
866
+ p.key === "ArrowRight" && j(Math.min(1, w + 0.05)), p.key === "ArrowLeft" && j(Math.max(0, w - 0.05));
867
867
  },
868
868
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
869
869
  "div",
@@ -879,12 +879,12 @@ const ea = (e) => {
879
879
  "button",
880
880
  {
881
881
  type: "button",
882
- onClick: (b) => {
883
- b.stopPropagation(), v((_) => !_);
882
+ onClick: (p) => {
883
+ p.stopPropagation(), v((x) => !x);
884
884
  },
885
885
  className: "shrink-0 text-white",
886
- "aria-label": N ? "Pause" : "Play",
887
- children: N ? /* @__PURE__ */ n(ws, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
886
+ "aria-label": _ ? "Pause" : "Play",
887
+ children: _ ? /* @__PURE__ */ n(ws, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(je, { className: "size-5 translate-x-px", weight: "fill" })
888
888
  }
889
889
  ),
890
890
  /* @__PURE__ */ h(
@@ -898,19 +898,19 @@ const ea = (e) => {
898
898
  tabIndex: 0,
899
899
  ref: f,
900
900
  className: "relative flex h-4 w-full cursor-pointer items-center",
901
- onMouseDown: B,
902
- onTouchStart: B,
903
- onClick: (b) => b.stopPropagation(),
904
- onMouseEnter: () => R(!0),
905
- onMouseLeave: () => R(!1),
906
- onKeyDown: (b) => {
907
- b.key === "ArrowRight" && P(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && P(Math.max(0, x - 0.05));
901
+ onMouseDown: F,
902
+ onTouchStart: F,
903
+ onClick: (p) => p.stopPropagation(),
904
+ onMouseEnter: () => D(!0),
905
+ onMouseLeave: () => D(!1),
906
+ onKeyDown: (p) => {
907
+ p.key === "ArrowRight" && j(Math.min(1, w + 0.05)), p.key === "ArrowLeft" && j(Math.max(0, w - 0.05));
908
908
  },
909
909
  children: [
910
910
  /* @__PURE__ */ n(
911
911
  "div",
912
912
  {
913
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || A ? "h-1.5" : "h-1"}`,
913
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${A || S ? "h-1.5" : "h-1"}`,
914
914
  children: /* @__PURE__ */ n(
915
915
  "div",
916
916
  {
@@ -923,7 +923,7 @@ const ea = (e) => {
923
923
  /* @__PURE__ */ n(
924
924
  "div",
925
925
  {
926
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
926
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${A || S ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
927
927
  style: { left: `${$}%` }
928
928
  }
929
929
  )
@@ -943,7 +943,7 @@ const ea = (e) => {
943
943
  mediaPlayerProps: i,
944
944
  containedImage: o = !1
945
945
  }) => {
946
- const l = re(e), [d, m] = O(!1);
946
+ const l = ie(e), [d, m] = O(!1);
947
947
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
948
948
  ta,
949
949
  {
@@ -991,7 +991,7 @@ const ea = (e) => {
991
991
  "div",
992
992
  {
993
993
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
994
- children: le(e, {
994
+ children: ce(e, {
995
995
  className: Ft(r),
996
996
  weight: "regular"
997
997
  })
@@ -1008,7 +1008,7 @@ const ea = (e) => {
1008
1008
  "div",
1009
1009
  {
1010
1010
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1011
- children: le(e, {
1011
+ children: ce(e, {
1012
1012
  className: Ft(r),
1013
1013
  weight: "regular"
1014
1014
  })
@@ -1028,13 +1028,13 @@ const ea = (e) => {
1028
1028
  rootRef: g,
1029
1029
  "data-testid": u
1030
1030
  }) => {
1031
- const f = e === "dark", c = f ? s ?? a : s ?? "", p = f && !s;
1031
+ const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
1032
1032
  return /* @__PURE__ */ h(
1033
1033
  "div",
1034
1034
  {
1035
1035
  ref: g,
1036
1036
  "data-testid": u,
1037
- className: y(
1037
+ className: C(
1038
1038
  "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)]",
1039
1039
  f ? "bg-[#121110]" : "bg-white"
1040
1040
  ),
@@ -1046,17 +1046,17 @@ const ea = (e) => {
1046
1046
  c.trim() !== "" && /* @__PURE__ */ n(
1047
1047
  "p",
1048
1048
  {
1049
- className: y("mb-0.5 truncate text-base font-medium", {
1049
+ className: C("mb-0.5 truncate text-base font-medium", {
1050
1050
  "text-black": !f,
1051
- "text-white/30": f && p,
1052
- "text-white": f && !p
1051
+ "text-white/30": f && b,
1052
+ "text-white": f && !b
1053
1053
  }),
1054
1054
  children: c
1055
1055
  }
1056
1056
  ),
1057
1057
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1058
- le(r, {
1059
- className: y(
1058
+ ce(r, {
1059
+ className: C(
1060
1060
  "size-5 shrink-0",
1061
1061
  f ? "text-white/55" : "text-black/55"
1062
1062
  ),
@@ -1065,7 +1065,7 @@ const ea = (e) => {
1065
1065
  i != null && i !== "" && /* @__PURE__ */ n(
1066
1066
  "span",
1067
1067
  {
1068
- className: y(
1068
+ className: C(
1069
1069
  "text-xs font-medium",
1070
1070
  f ? "text-white/55" : "text-black/55"
1071
1071
  ),
@@ -1083,7 +1083,7 @@ const ea = (e) => {
1083
1083
  function tn(e) {
1084
1084
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1085
1085
  }
1086
- function Xe(e) {
1086
+ function Ke(e) {
1087
1087
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1088
1088
  }
1089
1089
  function sa(e) {
@@ -1101,7 +1101,7 @@ function ia(e) {
1101
1101
  function oa(e) {
1102
1102
  return e ? "text-white/20" : "text-black/20";
1103
1103
  }
1104
- const Ke = ({ attachment: e, isMyMessage: t }) => {
1104
+ const Je = ({ attachment: e, isMyMessage: t }) => {
1105
1105
  const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(z.Fragment, { children: [
1106
1106
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1107
1107
  "img",
@@ -1128,7 +1128,7 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
1128
1128
  function nn(e) {
1129
1129
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1130
1130
  }
1131
- function Je(e) {
1131
+ function Ze(e) {
1132
1132
  var t;
1133
1133
  return (t = e.attachments) == null ? void 0 : t.find(nn);
1134
1134
  }
@@ -1164,23 +1164,23 @@ const ca = ({
1164
1164
  },
1165
1165
  disabled: s,
1166
1166
  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",
1167
- children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(z.Fragment, { children: [
1168
- /* @__PURE__ */ n(ge, { className: "size-4 text-white", weight: "bold" }),
1167
+ children: s ? /* @__PURE__ */ n(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(z.Fragment, { children: [
1168
+ /* @__PURE__ */ n(be, { className: "size-4 text-white", weight: "bold" }),
1169
1169
  "Download"
1170
1170
  ] })
1171
1171
  }
1172
1172
  );
1173
1173
  };
1174
- function Ze(e) {
1175
- var u, f, c, p;
1174
+ function Qe(e) {
1175
+ var u, f, c, b;
1176
1176
  const t = (u = e.attachments) == null ? void 0 : u.find(
1177
- (N) => N.type === "video" && N.asset_url
1177
+ (_) => _.type === "video" && _.asset_url
1178
1178
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1179
- (N) => N.type === "image" && N.image_url
1179
+ (_) => _.type === "image" && _.image_url
1180
1180
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1181
- (N) => N.type === "audio" && N.asset_url
1182
- ), r = (p = e.attachments) == null ? void 0 : p.find(
1183
- (N) => N.type === "file" && N.asset_url
1181
+ (_) => _.type === "audio" && _.asset_url
1182
+ ), r = (b = e.attachments) == null ? void 0 : b.find(
1183
+ (_) => _.type === "file" && _.asset_url
1184
1184
  ), i = t ?? s ?? a ?? r, o = (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);
1185
1185
  if (!o) return null;
1186
1186
  const l = (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, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
@@ -1227,7 +1227,7 @@ const sn = ({
1227
1227
  fileSize: a,
1228
1228
  thumbnailUrl: r
1229
1229
  }) => {
1230
- const i = re(t), o = a !== void 0 ? tn(a) : void 0;
1230
+ const i = ie(t), o = a !== void 0 ? tn(a) : void 0;
1231
1231
  return /* @__PURE__ */ n(
1232
1232
  en,
1233
1233
  {
@@ -1253,10 +1253,10 @@ const sn = ({
1253
1253
  message: e,
1254
1254
  isMyMessage: t = !1
1255
1255
  }) => {
1256
- const s = Je(e), a = Ze(e);
1256
+ const s = Ze(e), a = Qe(e);
1257
1257
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1258
1258
  !t && e.user && /* @__PURE__ */ n(
1259
- ae,
1259
+ re,
1260
1260
  {
1261
1261
  className: "str-chat__avatar str-chat__message-sender-avatar",
1262
1262
  id: e.user.id,
@@ -1274,7 +1274,7 @@ const sn = ({
1274
1274
  {
1275
1275
  className: "str-chat__message-bubble",
1276
1276
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1277
- children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
1277
+ children: s ? /* @__PURE__ */ n("div", { className: Ke(t), children: /* @__PURE__ */ n(Je, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
1278
1278
  }
1279
1279
  ) })
1280
1280
  }
@@ -1283,18 +1283,18 @@ const sn = ({
1283
1283
  }, ua = ({
1284
1284
  message: e
1285
1285
  }) => {
1286
- const t = Je(e);
1286
+ const t = Ze(e);
1287
1287
  if (t)
1288
- return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
1289
- const s = Ze(e);
1288
+ return /* @__PURE__ */ n("div", { className: Ke(!0), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !0 }) });
1289
+ const s = Qe(e);
1290
1290
  return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
1291
1291
  }, ma = ({
1292
1292
  message: e
1293
1293
  }) => {
1294
- const t = Je(e);
1294
+ const t = Ze(e);
1295
1295
  if (t)
1296
- return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
1297
- const s = Ze(e);
1296
+ return /* @__PURE__ */ n("div", { className: Ke(!1), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !1 }) });
1297
+ const s = Qe(e);
1298
1298
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1299
1299
  }, wi = Object.assign(da, {
1300
1300
  Creator: ua,
@@ -1303,9 +1303,9 @@ const sn = ({
1303
1303
  isUnlocking: () => !1
1304
1304
  }, fa = {
1305
1305
  LockedAttachment: ha
1306
- }, rn = Ge({}), Ni = rn.Provider;
1306
+ }, rn = He({}), Ni = rn.Provider;
1307
1307
  function ga(e) {
1308
- return Se(rn)[e] ?? fa[e];
1308
+ return Te(rn)[e] ?? fa[e];
1309
1309
  }
1310
1310
  const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1311
1311
  "svg",
@@ -1330,7 +1330,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1330
1330
  }, va = (e) => {
1331
1331
  var t;
1332
1332
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1333
- }, Ce = (e) => {
1333
+ }, ke = (e) => {
1334
1334
  var t;
1335
1335
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1336
1336
  }, xa = (e) => {
@@ -1339,23 +1339,23 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1339
1339
  }, on = (e) => pa(e) || va(e), wa = (e) => {
1340
1340
  var t;
1341
1341
  return on(e) && !((t = e.text) != null && t.trim());
1342
- }, Pe = ({
1342
+ }, Oe = ({
1343
1343
  message: e,
1344
1344
  standalone: t = !1,
1345
1345
  isMyMessage: s = !1,
1346
1346
  hasAttachment: a = !1
1347
1347
  }) => {
1348
1348
  var u;
1349
- const r = on(e), i = Ce(e);
1349
+ const r = on(e), i = ke(e);
1350
1350
  if (!r && !i)
1351
1351
  return null;
1352
1352
  if (r) {
1353
1353
  const f = (u = e.metadata) == null ? void 0 : u.amount_text;
1354
1354
  if (!f) return null;
1355
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
1355
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1356
1356
  return /* @__PURE__ */ h("div", { className: c, children: [
1357
1357
  /* @__PURE__ */ n(_s, { size: t ? 14 : 12 }),
1358
- /* @__PURE__ */ n("span", { children: p })
1358
+ /* @__PURE__ */ n("span", { children: b })
1359
1359
  ] });
1360
1360
  }
1361
1361
  const o = s && a, l = o ? "Sent with AI" : "Sent with DM Agent", d = [
@@ -1363,10 +1363,10 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1364
1364
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1365
1365
  ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(ba, { size: o ? 12 : 15 }) });
1366
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1366
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ae, { children: [
1367
1367
  m,
1368
1368
  g
1369
- ] }) : /* @__PURE__ */ h(se, { children: [
1369
+ ] }) : /* @__PURE__ */ h(ae, { children: [
1370
1370
  g,
1371
1371
  m
1372
1372
  ] }) });
@@ -1379,7 +1379,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1379
1379
  "button",
1380
1380
  {
1381
1381
  type: "button",
1382
- className: y("message-vote-button focus-ring", {
1382
+ className: C("message-vote-button focus-ring", {
1383
1383
  "message-vote-button--selected": e === "up"
1384
1384
  }),
1385
1385
  onClick: t,
@@ -1393,7 +1393,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1393
1393
  "button",
1394
1394
  {
1395
1395
  type: "button",
1396
- className: y("message-vote-button focus-ring", {
1396
+ className: C("message-vote-button focus-ring", {
1397
1397
  "message-vote-button--selected": e === "down"
1398
1398
  }),
1399
1399
  onClick: s,
@@ -1419,73 +1419,73 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1419
1419
  isMessageAIGenerated: u,
1420
1420
  isMyMessage: f,
1421
1421
  message: c,
1422
- renderText: p,
1423
- threadList: N,
1422
+ renderText: b,
1423
+ threadList: _,
1424
1424
  viewerLanguage: v
1425
- } = e, { client: x } = Ye("CustomMessage"), { channel: w } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: S, onDownloadClick: R } = ga("LockedAttachment"), [I, C] = O(!1), k = An(c.id), { selected: E, voteUp: D, voteDown: U } = Us(c), {
1426
- Attachment: F = Mn,
1425
+ } = e, { client: w } = qe("CustomMessage"), { channel: y } = de("CustomMessage"), { isUnlocking: S, onUnlockClick: k, onFetchSource: A, onDownloadClick: D } = ga("LockedAttachment"), [T, M] = O(!1), N = An(c.id), { selected: E, voteUp: I, voteDown: B } = Us(c), {
1426
+ Attachment: P = Mn,
1427
1427
  EditMessageModal: Z = Dn,
1428
- MessageActions: V,
1429
- MessageBlocked: G = Rn,
1430
- MessageBouncePrompt: P = Ln,
1431
- MessageDeleted: B = Pn,
1432
- MessageIsThreadReplyInChannelButtonIndicator: H = On,
1433
- MessageRepliesCountButton: Y = zn,
1428
+ MessageActions: G,
1429
+ MessageBlocked: H = Rn,
1430
+ MessageBouncePrompt: j = Ln,
1431
+ MessageDeleted: F = Pn,
1432
+ MessageIsThreadReplyInChannelButtonIndicator: Y = On,
1433
+ MessageRepliesCountButton: q = zn,
1434
1434
  ReminderNotification: $ = Fn,
1435
- StreamedMessageText: b = $n,
1436
- PinIndicator: _
1437
- } = Ut("CustomMessage"), L = Bn(c), M = jn(c), W = ne(
1435
+ StreamedMessageText: p = $n,
1436
+ PinIndicator: x
1437
+ } = Ut("CustomMessage"), L = Bn(c), U = jn(c), R = se(
1438
1438
  () => u == null ? void 0 : u(c),
1439
1439
  [u, c]
1440
- ), j = ne(() => {
1441
- const me = c.attachments ?? [], _e = c.shared_location ? [c.shared_location, ...me] : me;
1442
- if (!Ce(c)) return _e;
1443
- const St = _e.filter((Tt) => !("type" in Tt) || !nn(Tt));
1444
- return St.length === _e.length ? _e : St;
1445
- }, [c]), K = ne(() => {
1446
- const me = Xt({ message: c, viewerLanguage: v });
1447
- return me === c.text ? c : { ...c, text: me };
1440
+ ), V = se(() => {
1441
+ const he = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...he] : he;
1442
+ if (!ke(c)) return ye;
1443
+ const St = ye.filter((Tt) => !("type" in Tt) || !nn(Tt));
1444
+ return St.length === ye.length ? ye : St;
1445
+ }, [c]), X = se(() => {
1446
+ const he = Xt({ message: c, viewerLanguage: v });
1447
+ return he === c.text ? c : { ...c, text: he };
1448
1448
  }, [c, v]);
1449
1449
  if (Un(c))
1450
1450
  return null;
1451
1451
  if (c.deleted_at || c.type === "deleted")
1452
- return /* @__PURE__ */ n(B, { message: c });
1452
+ return /* @__PURE__ */ n(F, { message: c });
1453
1453
  if (Vn(c))
1454
- return /* @__PURE__ */ n(G, {});
1455
- const ee = !N && !!c.reply_count, Q = !N && c.show_in_channel && c.parent_id, lt = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ct = Gn(c);
1456
- let ie;
1457
- lt ? ie = () => m(c) : ct && (ie = () => C(!0));
1458
- const de = f(), kn = y(
1454
+ return /* @__PURE__ */ n(H, {});
1455
+ const Q = !_ && !!c.reply_count, te = !_ && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ct = Gn(c);
1456
+ let oe;
1457
+ ee ? oe = () => m(c) : ct && (oe = () => M(!0));
1458
+ const ue = f(), kn = C(
1459
1459
  "str-chat__message str-chat__message-simple",
1460
1460
  `str-chat__message--${c.type}`,
1461
1461
  `str-chat__message--${c.status}`,
1462
- de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1462
+ ue ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1463
1463
  c.text ? "str-chat__message--has-text" : "has-no-text",
1464
1464
  {
1465
1465
  "str-chat__message--has-attachment": L,
1466
1466
  "str-chat__message--highlighted": g,
1467
1467
  "str-chat__message--pinned pinned-message": c.pinned,
1468
- "str-chat__message--with-reactions": M,
1468
+ "str-chat__message--with-reactions": U,
1469
1469
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
1470
- "str-chat__message-with-thread-link": ee || Q,
1470
+ "str-chat__message-with-thread-link": Q || te,
1471
1471
  "str-chat__virtual-message__wrapper--end": r,
1472
1472
  "str-chat__virtual-message__wrapper--first": i,
1473
1473
  "str-chat__virtual-message__wrapper--group": o
1474
1474
  }
1475
- ), dt = c.poll_id && x.polls.fromState(c.poll_id), ut = wa(c), ue = Ce(c), mt = xa(c), Me = !!(j != null && j.length && !c.quoted_message), ht = ue && de && Me;
1476
- return /* @__PURE__ */ h(se, { children: [
1475
+ ), dt = c.poll_id && w.polls.fromState(c.poll_id), ut = wa(c), me = ke(c), mt = xa(c), De = !!(V != null && V.length && !c.quoted_message), ht = me && ue && De;
1476
+ return /* @__PURE__ */ h(ae, { children: [
1477
1477
  a && /* @__PURE__ */ n(
1478
1478
  Z,
1479
1479
  {
1480
1480
  additionalMessageInputProps: t
1481
1481
  }
1482
1482
  ),
1483
- I && /* @__PURE__ */ n(
1483
+ T && /* @__PURE__ */ n(
1484
1484
  Hn,
1485
1485
  {
1486
- MessageBouncePrompt: P,
1487
- onClose: () => C(!1),
1488
- open: I
1486
+ MessageBouncePrompt: j,
1487
+ onClose: () => M(!1),
1488
+ open: T
1489
1489
  }
1490
1490
  ),
1491
1491
  /* @__PURE__ */ h(
@@ -1494,10 +1494,10 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1494
1494
  className: kn,
1495
1495
  "data-message-id": c.id,
1496
1496
  children: [
1497
- _ && /* @__PURE__ */ n(_, {}),
1498
- !!k && /* @__PURE__ */ n($, { reminder: k }),
1497
+ x && /* @__PURE__ */ n(x, {}),
1498
+ !!N && /* @__PURE__ */ n($, { reminder: N }),
1499
1499
  c.user && /* @__PURE__ */ n(
1500
- ae,
1500
+ re,
1501
1501
  {
1502
1502
  className: "str-chat__avatar str-chat__message-sender-avatar",
1503
1503
  id: c.user.id,
@@ -1505,20 +1505,20 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1505
1505
  name: c.user.name || c.user.id,
1506
1506
  size: 24,
1507
1507
  shape: "circle",
1508
- dmAgentEnabled: ue
1508
+ dmAgentEnabled: me
1509
1509
  }
1510
1510
  ),
1511
1511
  /* @__PURE__ */ n(
1512
1512
  "div",
1513
1513
  {
1514
- className: y("str-chat__message-inner", {
1515
- "str-chat__simple-message--error-failed": lt || ct
1514
+ className: C("str-chat__message-inner", {
1515
+ "str-chat__simple-message--error-failed": ee || ct
1516
1516
  }),
1517
1517
  "data-testid": "message-inner",
1518
- onClick: ie,
1519
- onKeyDown: ie,
1520
- role: ie ? "button" : void 0,
1521
- tabIndex: ie ? 0 : void 0,
1518
+ onClick: oe,
1519
+ onKeyDown: oe,
1520
+ role: oe ? "button" : void 0,
1521
+ tabIndex: oe ? 0 : void 0,
1522
1522
  style: {
1523
1523
  // Force margins to 0 to prevent hover layout shift
1524
1524
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
@@ -1526,8 +1526,8 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1526
1526
  marginInlineStart: 0
1527
1527
  },
1528
1528
  children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1529
- de ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1530
- V && /* @__PURE__ */ n(V, {}),
1529
+ ue ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1530
+ G && /* @__PURE__ */ n(G, {}),
1531
1531
  /* @__PURE__ */ n(
1532
1532
  zt.Sent,
1533
1533
  {
@@ -1537,8 +1537,8 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1537
1537
  amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
1538
1538
  detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
1539
1539
  paymentStatus: (Nt = c.metadata) == null ? void 0 : Nt.payment_status,
1540
- onPreviewClick: () => T == null ? void 0 : T(c, w),
1541
- onFetchSource: async () => await (S == null ? void 0 : S(c, w))
1540
+ onPreviewClick: () => k == null ? void 0 : k(c, y),
1541
+ onFetchSource: async () => await (A == null ? void 0 : A(c, y))
1542
1542
  }
1543
1543
  )
1544
1544
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1551,52 +1551,52 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1551
1551
  amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
1552
1552
  detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
1553
1553
  paymentStatus: (It = c.metadata) == null ? void 0 : It.payment_status,
1554
- isUnlocking: A(c.id),
1555
- onUnlockClick: () => T == null ? void 0 : T(c, w),
1556
- onFetchSource: async () => await (S == null ? void 0 : S(c, w)),
1557
- onDownloadClick: () => R == null ? void 0 : R(c, w)
1554
+ isUnlocking: S(c.id),
1555
+ onUnlockClick: () => k == null ? void 0 : k(c, y),
1556
+ onFetchSource: async () => await (A == null ? void 0 : A(c, y)),
1557
+ onDownloadClick: () => D == null ? void 0 : D(c, y)
1558
1558
  }
1559
1559
  ),
1560
- V && /* @__PURE__ */ n(V, {})
1560
+ G && /* @__PURE__ */ n(G, {})
1561
1561
  ] }),
1562
1562
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1563
1563
  At,
1564
1564
  {
1565
- message: K,
1566
- renderText: p
1565
+ message: X,
1566
+ renderText: b
1567
1567
  }
1568
1568
  ) })
1569
1569
  ] }) : ut ? (
1570
1570
  /* Tip-only messages render as a standalone bubble */
1571
- /* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
1571
+ /* @__PURE__ */ n(Oe, { message: c, standalone: !0 })
1572
1572
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1573
- ue && !ht && /* @__PURE__ */ n(
1574
- Pe,
1573
+ me && !ht && /* @__PURE__ */ n(
1574
+ Oe,
1575
1575
  {
1576
1576
  message: c,
1577
- hasAttachment: Me,
1578
- isMyMessage: de
1577
+ hasAttachment: De,
1578
+ isMyMessage: ue
1579
1579
  }
1580
1580
  ),
1581
1581
  dt && /* @__PURE__ */ n(Yn, { poll: dt }),
1582
- j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
1583
- F,
1582
+ V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
1583
+ P,
1584
1584
  {
1585
1585
  actionHandler: l,
1586
- attachments: j
1586
+ attachments: V
1587
1587
  }
1588
1588
  ) : null,
1589
- W ? /* @__PURE__ */ n(
1590
- b,
1589
+ R ? /* @__PURE__ */ n(
1590
+ p,
1591
1591
  {
1592
- message: K,
1593
- renderText: p
1592
+ message: X,
1593
+ renderText: b
1594
1594
  }
1595
1595
  ) : /* @__PURE__ */ n(
1596
1596
  At,
1597
1597
  {
1598
- message: K,
1599
- renderText: p
1598
+ message: X,
1599
+ renderText: b
1600
1600
  }
1601
1601
  ),
1602
1602
  /* @__PURE__ */ n(qn, {})
@@ -1604,31 +1604,31 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1604
1604
  }
1605
1605
  ),
1606
1606
  !mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1607
- (!ue || ht) && /* @__PURE__ */ n(
1608
- Pe,
1607
+ (!me || ht) && /* @__PURE__ */ n(
1608
+ Oe,
1609
1609
  {
1610
1610
  message: c,
1611
- hasAttachment: Me,
1612
- isMyMessage: de
1611
+ hasAttachment: De,
1612
+ isMyMessage: ue
1613
1613
  }
1614
1614
  ),
1615
- s && ue && /* @__PURE__ */ n(
1615
+ s && me && /* @__PURE__ */ n(
1616
1616
  Na,
1617
1617
  {
1618
1618
  selected: E,
1619
- onVoteUp: D,
1620
- onVoteDown: U
1619
+ onVoteUp: I,
1620
+ onVoteDown: B
1621
1621
  }
1622
1622
  )
1623
1623
  ] }),
1624
- ee && /* @__PURE__ */ n(
1625
- Y,
1624
+ Q && /* @__PURE__ */ n(
1625
+ q,
1626
1626
  {
1627
1627
  onClick: d,
1628
1628
  reply_count: c.reply_count
1629
1629
  }
1630
1630
  ),
1631
- Q && /* @__PURE__ */ n(H, {})
1631
+ te && /* @__PURE__ */ n(Y, {})
1632
1632
  ]
1633
1633
  },
1634
1634
  c.id
@@ -1638,11 +1638,11 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1638
1638
  _a,
1639
1639
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Tn(e, t)
1640
1640
  ), Ca = (e) => {
1641
- const t = be("CustomMessage");
1641
+ const t = pe("CustomMessage");
1642
1642
  return /* @__PURE__ */ n(ya, { ...t, ...e });
1643
1643
  }, ka = () => {
1644
1644
  var s;
1645
- const { handleDelete: e, message: t } = be("CustomMessageActions");
1645
+ const { handleDelete: e, message: t } = pe("CustomMessageActions");
1646
1646
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1647
1647
  Yt,
1648
1648
  {
@@ -1654,7 +1654,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1654
1654
  }
1655
1655
  );
1656
1656
  }, Ea = () => {
1657
- const { handleFlag: e } = be("CustomMessageActions");
1657
+ const { handleFlag: e } = pe("CustomMessageActions");
1658
1658
  return /* @__PURE__ */ n(
1659
1659
  Yt,
1660
1660
  {
@@ -1667,7 +1667,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1667
1667
  );
1668
1668
  }, Ia = () => {
1669
1669
  var t;
1670
- const { message: e } = be("CustomMessageActions");
1670
+ const { message: e } = pe("CustomMessageActions");
1671
1671
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1672
1672
  Ms,
1673
1673
  {
@@ -1711,7 +1711,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1711
1711
  },
1712
1712
  className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
1713
1713
  "aria-label": "Close link preview",
1714
- children: /* @__PURE__ */ n(pe, { className: "size-4 text-black/90" })
1714
+ children: /* @__PURE__ */ n(ve, { className: "size-4 text-black/90" })
1715
1715
  }
1716
1716
  ),
1717
1717
  /* @__PURE__ */ h("div", { className: "p-2", children: [
@@ -1747,7 +1747,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1747
1747
  children: /* @__PURE__ */ n(Es, { weight: "bold", className: "size-4" })
1748
1748
  }
1749
1749
  ), Da = () => {
1750
- const e = Se(ln), { handleSubmit: t } = Jn(), s = Zn(), a = e || !s, {
1750
+ const e = Te(ln), { handleSubmit: t } = Jn(), s = Zn(), a = e || !s, {
1751
1751
  SendButton: r = Ma,
1752
1752
  AttachmentPreviewList: i = Qn
1753
1753
  } = Ut("CustomMessageInput");
@@ -1787,8 +1787,8 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1787
1787
  disabledReason: a
1788
1788
  }) => {
1789
1789
  var o;
1790
- const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1791
- return s ? /* @__PURE__ */ h(se, { children: [
1790
+ const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1791
+ return s ? /* @__PURE__ */ h(ae, { children: [
1792
1792
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1793
1793
  t == null ? void 0 : t()
1794
1794
  ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -1816,7 +1816,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1816
1816
  "SYSTEM_AGE_SAFETY_BLOCKED"
1817
1817
  ], za = {
1818
1818
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1819
- }, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", $t = (e) => La.includes(e), $a = (e) => Oa.includes(e), Ba = (e) => {
1819
+ }, ze = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", $t = (e) => La.includes(e), $a = (e) => Oa.includes(e), Ba = (e) => {
1820
1820
  var a;
1821
1821
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1822
1822
  if ($t(t))
@@ -1836,11 +1836,11 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1836
1836
  type: s
1837
1837
  };
1838
1838
  }, ja = (e) => {
1839
- const t = e.indexOf(Oe);
1839
+ const t = e.indexOf(ze);
1840
1840
  if (t === -1)
1841
1841
  return e;
1842
- const s = t + Oe.length;
1843
- return /* @__PURE__ */ h(se, { children: [
1842
+ const s = t + ze.length;
1843
+ return /* @__PURE__ */ h(ae, { children: [
1844
1844
  e.slice(0, t),
1845
1845
  /* @__PURE__ */ n(
1846
1846
  "a",
@@ -1849,7 +1849,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1849
1849
  target: "_blank",
1850
1850
  rel: "noopener noreferrer",
1851
1851
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1852
- children: Oe
1852
+ children: ze
1853
1853
  }
1854
1854
  ),
1855
1855
  e.slice(s)
@@ -1870,7 +1870,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1870
1870
  "data-dm-agent-system-type": s.type,
1871
1871
  children: [
1872
1872
  /* @__PURE__ */ n(
1873
- je,
1873
+ Ue,
1874
1874
  {
1875
1875
  size: 16,
1876
1876
  weight: "regular",
@@ -1882,7 +1882,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1882
1882
  ]
1883
1883
  }
1884
1884
  ),
1885
- !t && /* @__PURE__ */ n(De, { message: e.message })
1885
+ !t && /* @__PURE__ */ n(Re, { message: e.message })
1886
1886
  ] });
1887
1887
  }
1888
1888
  if ((s == null ? void 0 : s.kind) === "age-safety") {
@@ -1909,7 +1909,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1909
1909
  ]
1910
1910
  }
1911
1911
  ),
1912
- !t && /* @__PURE__ */ n(De, { message: e.message })
1912
+ !t && /* @__PURE__ */ n(Re, { message: e.message })
1913
1913
  ] });
1914
1914
  }
1915
1915
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1918,9 +1918,9 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1918
1918
  /* @__PURE__ */ n("p", { children: e.message.text }),
1919
1919
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1920
1920
  ] }),
1921
- !t && /* @__PURE__ */ n(De, { message: e.message })
1921
+ !t && /* @__PURE__ */ n(Re, { message: e.message })
1922
1922
  ] });
1923
- }, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1923
+ }, cn = He(!1), Fe = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1924
1924
  "animateTransform",
1925
1925
  {
1926
1926
  attributeName: "transform",
@@ -1931,14 +1931,14 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1931
1931
  repeatCount: "indefinite"
1932
1932
  }
1933
1933
  ) }), Va = /* @__PURE__ */ new Set([
1934
- Re.Thinking,
1935
- Re.Generating,
1936
- Re.ExternalSources
1934
+ Le.Thinking,
1935
+ Le.Generating,
1936
+ Le.ExternalSources
1937
1937
  ]), Ga = ({ threadList: e }) => {
1938
- var p, N;
1939
- const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ns(), { aiState: o } = ss(t), l = Se(cn);
1938
+ var b, _;
1939
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } = ns(), { aiState: o } = ss(t), l = Te(cn);
1940
1940
  if (!e && l && Va.has(o)) {
1941
- const v = Ha(t, (p = r.user) == null ? void 0 : p.id);
1941
+ const v = Ha(t, (b = r.user) == null ? void 0 : b.id);
1942
1942
  return /* @__PURE__ */ n(
1943
1943
  Bt,
1944
1944
  {
@@ -1952,19 +1952,19 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1952
1952
  if ((s == null ? void 0 : s.typing_events) === !1)
1953
1953
  return null;
1954
1954
  const m = e ? [] : Object.values(i).filter(
1955
- ({ parent_id: v, user: x }) => {
1956
- var w;
1957
- return (x == null ? void 0 : x.id) !== ((w = r.user) == null ? void 0 : w.id) && !v;
1955
+ ({ parent_id: v, user: w }) => {
1956
+ var y;
1957
+ return (w == null ? void 0 : w.id) !== ((y = r.user) == null ? void 0 : y.id) && !v;
1958
1958
  }
1959
1959
  ), g = e ? Object.values(i).filter(
1960
- ({ parent_id: v, user: x }) => {
1961
- var w;
1962
- return (x == null ? void 0 : x.id) !== ((w = r.user) == null ? void 0 : w.id) && v === (a == null ? void 0 : a.id);
1960
+ ({ parent_id: v, user: w }) => {
1961
+ var y;
1962
+ return (w == null ? void 0 : w.id) !== ((y = r.user) == null ? void 0 : y.id) && v === (a == null ? void 0 : a.id);
1963
1963
  }
1964
1964
  ) : [], u = e ? g : m;
1965
1965
  if (!u.length)
1966
1966
  return null;
1967
- const f = (N = u[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1967
+ const f = (_ = u[0]) == null ? void 0 : _.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1968
1968
  return /* @__PURE__ */ n(
1969
1969
  Bt,
1970
1970
  {
@@ -1987,7 +1987,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
1987
1987
  style: { insetInlineStart: 0, insetInlineEnd: "auto" },
1988
1988
  children: [
1989
1989
  /* @__PURE__ */ n("div", { className: "shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ n(
1990
- ae,
1990
+ re,
1991
1991
  {
1992
1992
  id: e,
1993
1993
  name: t,
@@ -2006,9 +2006,9 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
2006
2006
  height: "8",
2007
2007
  overflow: "visible",
2008
2008
  children: [
2009
- /* @__PURE__ */ n(ze, { cx: "4", index: 0 }),
2010
- /* @__PURE__ */ n(ze, { cx: "16", index: 1 }),
2011
- /* @__PURE__ */ n(ze, { cx: "28", index: 2 })
2009
+ /* @__PURE__ */ n(Fe, { cx: "4", index: 0 }),
2010
+ /* @__PURE__ */ n(Fe, { cx: "16", index: 1 }),
2011
+ /* @__PURE__ */ n(Fe, { cx: "28", index: 2 })
2012
2012
  ]
2013
2013
  }
2014
2014
  ) })
@@ -2027,7 +2027,7 @@ function Ha(e, t) {
2027
2027
  const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2028
2028
  "div",
2029
2029
  {
2030
- className: y("flex items-center justify-center h-full", e),
2030
+ className: C("flex items-center justify-center h-full", e),
2031
2031
  children: [
2032
2032
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2033
2033
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2067,12 +2067,12 @@ const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2067
2067
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2068
2068
  ]
2069
2069
  }
2070
- ), ke = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2070
+ ), Ee = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2071
2071
  /* @__PURE__ */ n(qa, { className: "w-6 h-6" }),
2072
2072
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2073
2073
  ] }) }));
2074
- ke.displayName = "LoadingState";
2075
- const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", jt = "Replies instantly with AI assistant", Wa = ({
2074
+ Ee.displayName = "LoadingState";
2075
+ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", jt = "Replies instantly with AI assistant", Wa = ({
2076
2076
  onBack: e,
2077
2077
  showBackButton: t,
2078
2078
  onShowInfo: s,
@@ -2080,23 +2080,23 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2080
2080
  showStarButton: r = !1,
2081
2081
  dmAgentEnabled: i = !1
2082
2082
  }) => {
2083
- var f, c, p, N, v;
2084
- const { channel: o } = ce(), l = z.useMemo(() => {
2085
- var A, T;
2086
- const x = (A = o._client) == null ? void 0 : A.userID;
2087
- return x ? Object.values(((T = o.state) == null ? void 0 : T.members) || {}).find(
2088
- (S) => {
2089
- var R;
2090
- return ((R = S.user) == null ? void 0 : R.id) && S.user.id !== x;
2083
+ var f, c, b, _, v;
2084
+ const { channel: o } = de(), l = z.useMemo(() => {
2085
+ var S, k;
2086
+ const w = (S = o._client) == null ? void 0 : S.userID;
2087
+ return w ? Object.values(((k = o.state) == null ? void 0 : k.members) || {}).find(
2088
+ (A) => {
2089
+ var D;
2090
+ return ((D = A.user) == null ? void 0 : D.id) && A.user.id !== w;
2091
2091
  }
2092
2092
  ) : void 0;
2093
- }, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (p = l == null ? void 0 : l.user) == null ? void 0 : p.image, g = Wt(o), u = async () => {
2093
+ }, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Ae(l == null ? void 0 : l.user), m = (b = l == null ? void 0 : l.user) == null ? void 0 : b.image, g = Wt(o), u = async () => {
2094
2094
  try {
2095
2095
  g ? await o.unpin() : await o.pin();
2096
- } catch (x) {
2096
+ } catch (w) {
2097
2097
  console.error(
2098
2098
  "[CustomChannelHeader] Failed to update pinned status:",
2099
- x
2099
+ w
2100
2100
  );
2101
2101
  }
2102
2102
  };
@@ -2105,8 +2105,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2105
2105
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2106
2106
  "button",
2107
2107
  {
2108
- className: y(
2109
- oe,
2108
+ className: C(
2109
+ le,
2110
2110
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2111
2111
  ),
2112
2112
  onClick: e || (() => {
@@ -2118,9 +2118,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2118
2118
  ) }),
2119
2119
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2120
2120
  /* @__PURE__ */ n(
2121
- ae,
2121
+ re,
2122
2122
  {
2123
- id: ((N = l == null ? void 0 : l.user) == null ? void 0 : N.id) || o.id || "unknown",
2123
+ id: ((_ = l == null ? void 0 : l.user) == null ? void 0 : _.id) || o.id || "unknown",
2124
2124
  name: d,
2125
2125
  image: m,
2126
2126
  starred: r && g,
@@ -2130,7 +2130,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2130
2130
  ),
2131
2131
  /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: d }),
2132
2132
  i && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2133
- /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2133
+ /* @__PURE__ */ n(Ue, { className: "size-3 shrink-0 text-black/55" }),
2134
2134
  /* @__PURE__ */ n("span", { children: jt })
2135
2135
  ] })
2136
2136
  ] }),
@@ -2138,14 +2138,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2138
2138
  r && /* @__PURE__ */ n(
2139
2139
  "button",
2140
2140
  {
2141
- className: oe,
2141
+ className: le,
2142
2142
  onClick: u,
2143
2143
  type: "button",
2144
2144
  "aria-label": g ? "Unstar conversation" : "Star conversation",
2145
2145
  children: /* @__PURE__ */ n(
2146
- $e,
2146
+ Be,
2147
2147
  {
2148
- className: y("size-5", {
2148
+ className: C("size-5", {
2149
2149
  "text-yellow-600": g,
2150
2150
  "text-black/90": !g
2151
2151
  }),
@@ -2154,10 +2154,10 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2154
2154
  )
2155
2155
  }
2156
2156
  ),
2157
- /* @__PURE__ */ n(
2157
+ a && /* @__PURE__ */ n(
2158
2158
  "button",
2159
2159
  {
2160
- className: y(oe, "bg-[#F1F0EE]"),
2160
+ className: C(le, "bg-[#F1F0EE]"),
2161
2161
  onClick: s,
2162
2162
  type: "button",
2163
2163
  "aria-label": "Show info",
@@ -2171,8 +2171,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2171
2171
  t && e && /* @__PURE__ */ n(
2172
2172
  "button",
2173
2173
  {
2174
- className: y(
2175
- oe,
2174
+ className: C(
2175
+ le,
2176
2176
  "messaging-channel-view-back-button-desktop"
2177
2177
  ),
2178
2178
  type: "button",
@@ -2182,7 +2182,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2182
2182
  }
2183
2183
  ),
2184
2184
  /* @__PURE__ */ n(
2185
- ae,
2185
+ re,
2186
2186
  {
2187
2187
  id: ((v = l == null ? void 0 : l.user) == null ? void 0 : v.id) || o.id || "unknown",
2188
2188
  name: d,
@@ -2204,7 +2204,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2204
2204
  }
2205
2205
  ) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: d }),
2206
2206
  i && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2207
- /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2207
+ /* @__PURE__ */ n(Ue, { className: "size-3 shrink-0 text-black/55" }),
2208
2208
  /* @__PURE__ */ n("span", { className: "truncate", children: jt })
2209
2209
  ] })
2210
2210
  ] })
@@ -2213,14 +2213,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2213
2213
  r && /* @__PURE__ */ n(
2214
2214
  "button",
2215
2215
  {
2216
- className: oe,
2216
+ className: le,
2217
2217
  onClick: u,
2218
2218
  type: "button",
2219
2219
  "aria-label": g ? "Unstar conversation" : "Star conversation",
2220
2220
  children: /* @__PURE__ */ n(
2221
- $e,
2221
+ Be,
2222
2222
  {
2223
- className: y("size-6", {
2223
+ className: C("size-6", {
2224
2224
  "text-yellow-600": g,
2225
2225
  "text-black/90": !g
2226
2226
  }),
@@ -2232,7 +2232,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2232
2232
  a && s && /* @__PURE__ */ n(
2233
2233
  "button",
2234
2234
  {
2235
- className: oe,
2235
+ className: le,
2236
2236
  onClick: s,
2237
2237
  type: "button",
2238
2238
  "aria-label": "Show info",
@@ -2257,67 +2257,68 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2257
2257
  showBlockParticipant: u = !0,
2258
2258
  showReportParticipant: f = !0,
2259
2259
  showFollowerStatus: c = !0,
2260
- composerDisabled: p = !1,
2261
- composerDisabledReason: N,
2260
+ composerDisabled: b = !1,
2261
+ composerDisabledReason: _,
2262
2262
  showStarButton: v = !1,
2263
- chatbotVotingEnabled: x = !1,
2264
- renderChannelBanner: w,
2265
- customProfileContent: A,
2266
- customChannelActions: T,
2267
- renderMessage: S,
2268
- dmAgentEnabled: R = !1,
2269
- viewerLanguage: I
2263
+ chatbotVotingEnabled: w = !1,
2264
+ renderChannelBanner: y,
2265
+ customProfileContent: S,
2266
+ customChannelActions: k,
2267
+ renderMessage: A,
2268
+ dmAgentEnabled: D = !1,
2269
+ viewerLanguage: T,
2270
+ showChannelInfo: M = !0
2270
2271
  }) => {
2271
- var H, Y, $, b, _, L;
2272
- const { channel: C } = ce(), k = X(null), E = z.useMemo(() => {
2273
- var j, K;
2274
- const M = (j = C._client) == null ? void 0 : j.userID;
2275
- return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find(
2276
- (ee) => {
2277
- var Q;
2278
- return ((Q = ee.user) == null ? void 0 : Q.id) && ee.user.id !== M;
2272
+ var q, $, p, x, L, U;
2273
+ const { channel: N } = de(), E = K(null), I = z.useMemo(() => {
2274
+ var X, Q;
2275
+ const R = (X = N._client) == null ? void 0 : X.userID;
2276
+ return R ? Object.values(((Q = N.state) == null ? void 0 : Q.members) || {}).find(
2277
+ (te) => {
2278
+ var ee;
2279
+ return ((ee = te.user) == null ? void 0 : ee.id) && te.user.id !== R;
2279
2280
  }
2280
2281
  ) : void 0;
2281
- }, [(H = C._client) == null ? void 0 : H.userID, (Y = C.state) == null ? void 0 : Y.members]), D = z.useMemo(() => {
2282
- var j, K;
2283
- const M = (j = C._client) == null ? void 0 : j.userID;
2284
- return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find((ee) => {
2285
- var Q;
2286
- return ((Q = ee.user) == null ? void 0 : Q.id) === M;
2282
+ }, [(q = N._client) == null ? void 0 : q.userID, ($ = N.state) == null ? void 0 : $.members]), B = z.useMemo(() => {
2283
+ var X, Q;
2284
+ const R = (X = N._client) == null ? void 0 : X.userID;
2285
+ return R ? Object.values(((Q = N.state) == null ? void 0 : Q.members) || {}).find((te) => {
2286
+ var ee;
2287
+ return ((ee = te.user) == null ? void 0 : ee.id) === R;
2287
2288
  }) : void 0;
2288
- }, [($ = C._client) == null ? void 0 : $.userID, (b = C.state) == null ? void 0 : b.members]), U = ((_ = D == null ? void 0 : D.user) == null ? void 0 : _.is_account) ?? (D == null ? void 0 : D.is_account), F = ((L = E == null ? void 0 : E.user) == null ? void 0 : L.is_account) ?? (E == null ? void 0 : E.is_account), Z = R && U === !1 && F === !0, V = z.useMemo(() => {
2289
+ }, [(p = N._client) == null ? void 0 : p.userID, (x = N.state) == null ? void 0 : x.members]), P = ((L = B == null ? void 0 : B.user) == null ? void 0 : L.is_account) ?? (B == null ? void 0 : B.is_account), Z = ((U = I == null ? void 0 : I.user) == null ? void 0 : U.is_account) ?? (I == null ? void 0 : I.is_account), G = D && P === !1 && Z === !0, H = z.useMemo(() => {
2289
2290
  if (!c) return;
2290
- const M = C.data ?? {};
2291
- if (M.followerStatus)
2292
- return String(M.followerStatus);
2293
- if (M.isFollower !== void 0)
2294
- return M.isFollower ? "Subscribed to you" : "Not subscribed";
2295
- }, [C.data, c]), G = q(() => {
2296
- var M;
2297
- (M = k.current) == null || M.showModal();
2298
- }, []), P = q(() => {
2299
- var M;
2300
- (M = k.current) == null || M.close();
2301
- }, []), B = q(
2302
- (M) => {
2303
- const { message: W } = be("ChannelView"), j = /* @__PURE__ */ n(
2291
+ const R = N.data ?? {};
2292
+ if (R.followerStatus)
2293
+ return String(R.followerStatus);
2294
+ if (R.isFollower !== void 0)
2295
+ return R.isFollower ? "Subscribed to you" : "Not subscribed";
2296
+ }, [N.data, c]), j = W(() => {
2297
+ var R;
2298
+ (R = E.current) == null || R.showModal();
2299
+ }, []), F = W(() => {
2300
+ var R;
2301
+ (R = E.current) == null || R.close();
2302
+ }, []), Y = W(
2303
+ (R) => {
2304
+ const { message: V } = pe("ChannelView"), X = /* @__PURE__ */ n(
2304
2305
  Ca,
2305
2306
  {
2306
- ...M,
2307
- chatbotVotingEnabled: x,
2308
- viewerLanguage: I
2307
+ ...R,
2308
+ chatbotVotingEnabled: w,
2309
+ viewerLanguage: T
2309
2310
  }
2310
2311
  );
2311
- return !S || !W ? j : S(j, W);
2312
+ return !A || !V ? X : A(X, V);
2312
2313
  },
2313
- [x, S, I]
2314
+ [w, A, T]
2314
2315
  );
2315
- return /* @__PURE__ */ h(se, { children: [
2316
+ return /* @__PURE__ */ h(ae, { children: [
2316
2317
  /* @__PURE__ */ n(
2317
2318
  rs,
2318
2319
  {
2319
2320
  overrides: {
2320
- Message: B,
2321
+ Message: Y,
2321
2322
  MessageActions: Ia
2322
2323
  },
2323
2324
  children: /* @__PURE__ */ h(is, { children: [
@@ -2326,13 +2327,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2326
2327
  {
2327
2328
  onBack: e,
2328
2329
  showBackButton: t,
2329
- onShowInfo: G,
2330
- canShowInfo: !!E,
2330
+ onShowInfo: j,
2331
+ canShowInfo: M && !!I,
2331
2332
  showStarButton: v,
2332
- dmAgentEnabled: Z
2333
+ dmAgentEnabled: G
2333
2334
  }
2334
2335
  ) }, "lt-channel-header"),
2335
- w ? /* @__PURE__ */ n(z.Fragment, { children: w() }, "lt-channel-banner") : null,
2336
+ y ? /* @__PURE__ */ n(z.Fragment, { children: y() }, "lt-channel-banner") : null,
2336
2337
  /* @__PURE__ */ n(
2337
2338
  "div",
2338
2339
  {
@@ -2341,33 +2342,33 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2341
2342
  },
2342
2343
  "lt-channel-message-list"
2343
2344
  ),
2344
- r ? /* @__PURE__ */ n(z.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
2345
+ r ? /* @__PURE__ */ n(z.Fragment, { children: r(N) }, "lt-channel-conversation-footer") : null,
2345
2346
  /* @__PURE__ */ n(
2346
2347
  Ra,
2347
2348
  {
2348
2349
  ...s && {
2349
- renderActions: () => s == null ? void 0 : s(C)
2350
+ renderActions: () => s == null ? void 0 : s(N)
2350
2351
  },
2351
- renderFooter: () => a == null ? void 0 : a(C),
2352
- disabled: p,
2353
- disabledReason: N
2352
+ renderFooter: () => a == null ? void 0 : a(N),
2353
+ disabled: b,
2354
+ disabledReason: _
2354
2355
  },
2355
2356
  "lt-channel-message-input"
2356
2357
  )
2357
2358
  ] })
2358
2359
  }
2359
2360
  ),
2360
- /* @__PURE__ */ n(
2361
+ M && /* @__PURE__ */ n(
2361
2362
  $s,
2362
2363
  {
2363
- dialogRef: k,
2364
- onClose: P,
2365
- participant: E,
2366
- participantDisplayName: Te(
2367
- E == null ? void 0 : E.user
2364
+ dialogRef: E,
2365
+ onClose: F,
2366
+ participant: I,
2367
+ participantDisplayName: Ae(
2368
+ I == null ? void 0 : I.user
2368
2369
  ),
2369
- channel: C,
2370
- followerStatusLabel: V,
2370
+ channel: N,
2371
+ followerStatusLabel: H,
2371
2372
  onLeaveConversation: i,
2372
2373
  onBlockParticipant: o,
2373
2374
  showDeleteConversation: l,
@@ -2376,8 +2377,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2376
2377
  onDeleteConversationClick: d,
2377
2378
  onBlockParticipantClick: m,
2378
2379
  onReportParticipantClick: g,
2379
- customProfileContent: A,
2380
- customChannelActions: T
2380
+ customProfileContent: S,
2381
+ customChannelActions: k
2381
2382
  }
2382
2383
  )
2383
2384
  ] });
@@ -2397,75 +2398,76 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2397
2398
  onDeleteConversationClick: u,
2398
2399
  onBlockParticipantClick: f,
2399
2400
  onReportParticipantClick: c,
2400
- showBlockParticipant: p = !0,
2401
- showReportParticipant: N = !0,
2401
+ showBlockParticipant: b = !0,
2402
+ showReportParticipant: _ = !0,
2402
2403
  showFollowerStatus: v = !0,
2403
- composerDisabled: x = !1,
2404
- composerDisabledReason: w,
2405
- dmAgentEnabled: A,
2406
- messageMetadata: T,
2407
- onMessageSent: S,
2408
- showStarButton: R = !1,
2409
- chatbotVotingEnabled: I = !1,
2410
- renderChannelBanner: C,
2411
- customProfileContent: k,
2404
+ composerDisabled: w = !1,
2405
+ composerDisabledReason: y,
2406
+ dmAgentEnabled: S,
2407
+ messageMetadata: k,
2408
+ onMessageSent: A,
2409
+ showStarButton: D = !1,
2410
+ chatbotVotingEnabled: T = !1,
2411
+ renderChannelBanner: M,
2412
+ customProfileContent: N,
2412
2413
  customChannelActions: E,
2413
- renderMessage: D,
2414
- onMessageLinkClick: U,
2415
- sendButton: F,
2414
+ renderMessage: I,
2415
+ onMessageLinkClick: B,
2416
+ sendButton: P,
2416
2417
  attachmentPreviewList: Z,
2417
- viewerLanguage: V
2418
+ viewerLanguage: G,
2419
+ showChannelInfo: H = !0
2418
2420
  }) => {
2419
- const G = q(
2420
- async (B, H, Y) => {
2421
- var W;
2422
- const $ = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, b = A && !$, _ = {
2423
- ...H,
2424
- ...b && { silent: !0 },
2425
- ...T && {
2421
+ const j = W(
2422
+ async (Y, q, $) => {
2423
+ var V;
2424
+ const p = ((V = e.data) == null ? void 0 : V.chatbot_paused) === !0, x = S && !p, L = {
2425
+ ...q,
2426
+ ...x && { silent: !0 },
2427
+ ...k && {
2426
2428
  metadata: {
2427
- ...H.metadata ?? {},
2428
- ...T
2429
+ ...q.metadata ?? {},
2430
+ ...k
2429
2431
  }
2430
2432
  }
2431
- }, L = {
2432
- ...Y,
2433
- ...b && { skip_push: !0 }
2434
- }, M = await e.sendMessage(_, L);
2435
- return S == null || S(M), M;
2433
+ }, U = {
2434
+ ...$,
2435
+ ...x && { skip_push: !0 }
2436
+ }, R = await e.sendMessage(L, U);
2437
+ return A == null || A(R), R;
2436
2438
  },
2437
- [e, A, T, S]
2438
- ), P = X(null);
2439
+ [e, S, k, A]
2440
+ ), F = K(null);
2439
2441
  return J(() => {
2440
- if (!U) return;
2441
- const B = P.current;
2442
2442
  if (!B) return;
2443
- const H = (Y) => {
2444
- const $ = Y.target, b = $ == null ? void 0 : $.closest("a[href]"), _ = b == null ? void 0 : b.getAttribute("href");
2445
- if (!_) return;
2446
- const L = b == null ? void 0 : b.closest("[data-message-id]"), M = L == null ? void 0 : L.getAttribute("data-message-id"), W = M ? e.state.messages.find((j) => j.id === M) : void 0;
2447
- U(_, W);
2443
+ const Y = F.current;
2444
+ if (!Y) return;
2445
+ const q = ($) => {
2446
+ const p = $.target, x = p == null ? void 0 : p.closest("a[href]"), L = x == null ? void 0 : x.getAttribute("href");
2447
+ if (!L) return;
2448
+ const U = x == null ? void 0 : x.closest("[data-message-id]"), R = U == null ? void 0 : U.getAttribute("data-message-id"), V = R ? e.state.messages.find((X) => X.id === R) : void 0;
2449
+ B(L, V);
2448
2450
  };
2449
- return B.addEventListener("click", H), () => B.removeEventListener("click", H);
2450
- }, [U, e]), /* @__PURE__ */ n(
2451
+ return Y.addEventListener("click", q), () => Y.removeEventListener("click", q);
2452
+ }, [B, e]), /* @__PURE__ */ n(
2451
2453
  "div",
2452
2454
  {
2453
- ref: P,
2454
- className: y(
2455
+ ref: F,
2456
+ className: C(
2455
2457
  "messaging-channel-view h-full flex flex-col",
2456
2458
  d
2457
2459
  ),
2458
- children: /* @__PURE__ */ n(cn.Provider, { value: A ?? !1, children: /* @__PURE__ */ n(
2460
+ children: /* @__PURE__ */ n(cn.Provider, { value: S ?? !1, children: /* @__PURE__ */ n(
2459
2461
  as,
2460
2462
  {
2461
2463
  channel: e,
2462
2464
  MessageSystem: Ua,
2463
2465
  EmptyStateIndicator: m,
2464
- LoadingIndicator: ke,
2466
+ LoadingIndicator: Ee,
2465
2467
  DateSeparator: Bs,
2466
2468
  TypingIndicator: Ga,
2467
- doSendMessageRequest: G,
2468
- ...F ? { SendButton: F } : {},
2469
+ doSendMessageRequest: j,
2470
+ ...P ? { SendButton: P } : {},
2469
2471
  ...Z ? { AttachmentPreviewList: Z } : {},
2470
2472
  children: /* @__PURE__ */ n(
2471
2473
  Xa,
@@ -2482,19 +2484,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2482
2484
  onDeleteConversationClick: u,
2483
2485
  onBlockParticipantClick: f,
2484
2486
  onReportParticipantClick: c,
2485
- showBlockParticipant: p,
2486
- showReportParticipant: N,
2487
+ showBlockParticipant: b,
2488
+ showReportParticipant: _,
2487
2489
  showFollowerStatus: v,
2488
- composerDisabled: x,
2489
- composerDisabledReason: w,
2490
- showStarButton: R,
2491
- dmAgentEnabled: A,
2492
- chatbotVotingEnabled: I,
2493
- renderChannelBanner: C,
2494
- customProfileContent: k,
2490
+ composerDisabled: w,
2491
+ composerDisabledReason: y,
2492
+ showStarButton: D,
2493
+ dmAgentEnabled: S,
2494
+ chatbotVotingEnabled: T,
2495
+ renderChannelBanner: M,
2496
+ customProfileContent: N,
2495
2497
  customChannelActions: E,
2496
- renderMessage: D,
2497
- viewerLanguage: V
2498
+ renderMessage: I,
2499
+ viewerLanguage: G,
2500
+ showChannelInfo: H
2498
2501
  }
2499
2502
  )
2500
2503
  }
@@ -2504,7 +2507,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2504
2507
  }
2505
2508
  );
2506
2509
  dn.displayName = "ChannelView";
2507
- const he = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2510
+ const fe = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2508
2511
  /* @__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: "⚠️" }) }),
2509
2512
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2510
2513
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2518,7 +2521,7 @@ const he = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2518
2521
  }
2519
2522
  )
2520
2523
  ] }) }));
2521
- he.displayName = "ErrorState";
2524
+ fe.displayName = "ErrorState";
2522
2525
  const _i = ({
2523
2526
  capabilities: e = {},
2524
2527
  renderMessageInputActions: t,
@@ -2534,125 +2537,127 @@ const _i = ({
2534
2537
  onMessageSent: u,
2535
2538
  chatbotVotingEnabled: f = !1,
2536
2539
  viewerLanguage: c,
2537
- renderChannelBanner: p,
2538
- customChannelActions: N,
2540
+ renderChannelBanner: b,
2541
+ customChannelActions: _,
2539
2542
  renderMessage: v,
2540
- onMessageLinkClick: x
2543
+ onMessageLinkClick: w,
2544
+ showChannelInfo: y
2541
2545
  }) => {
2542
2546
  const {
2543
- client: w,
2544
- isConnected: A,
2545
- isLoading: T,
2546
- error: S,
2547
- refreshConnection: R,
2548
- service: I,
2549
- debug: C
2550
- } = Ds(), [k, E] = O(null), [D, U] = O(null), [F, Z] = O(!1), { showDeleteConversation: V = !0 } = e, G = X(o);
2551
- G.current = o;
2552
- const P = X(a);
2553
- P.current = a;
2554
- const B = X(null), H = X(null);
2547
+ client: S,
2548
+ isConnected: k,
2549
+ isLoading: A,
2550
+ error: D,
2551
+ refreshConnection: T,
2552
+ service: M,
2553
+ debug: N
2554
+ } = Ds(), [E, I] = O(null), [B, P] = O(null), [Z, G] = O(!1), { showDeleteConversation: H = !0 } = e, j = K(o);
2555
+ j.current = o;
2556
+ const F = K(a);
2557
+ F.current = a;
2558
+ const Y = K(null), q = K(null);
2555
2559
  J(() => {
2556
- H.current = k;
2557
- }, [k]), J(() => {
2558
- if (!w || !A) return;
2559
- const b = w.userID;
2560
- if (!b) return;
2561
- const _ = `${b}::${i}`;
2562
- if (B.current === _) return;
2563
- B.current = _;
2564
- const L = () => {
2565
- B.current === _ && (B.current = null);
2560
+ q.current = E;
2561
+ }, [E]), J(() => {
2562
+ if (!S || !k) return;
2563
+ const x = S.userID;
2564
+ if (!x) return;
2565
+ const L = `${x}::${i}`;
2566
+ if (Y.current === L) return;
2567
+ Y.current = L;
2568
+ const U = () => {
2569
+ Y.current === L && (Y.current = null);
2566
2570
  };
2567
2571
  (async () => {
2568
- var W, j;
2572
+ var V, X;
2569
2573
  try {
2570
- C && console.log(
2574
+ N && console.log(
2571
2575
  "[MessagingShell] Loading initial conversation with:",
2572
2576
  i
2573
2577
  );
2574
- const K = await w.queryChannels(
2578
+ const Q = await S.queryChannels(
2575
2579
  {
2576
2580
  type: "messaging",
2577
- members: { $eq: [b, i] }
2581
+ members: { $eq: [x, i] }
2578
2582
  },
2579
2583
  {},
2580
2584
  { limit: 1 }
2581
2585
  );
2582
- if (K.length > 0) {
2583
- E(K[0]), U(null), (W = P.current) == null || W.call(P, K[0]), C && console.log(
2586
+ if (Q.length > 0) {
2587
+ I(Q[0]), P(null), (V = F.current) == null || V.call(F, Q[0]), N && console.log(
2584
2588
  "[MessagingShell] Initial conversation loaded:",
2585
- K[0].id
2589
+ Q[0].id
2586
2590
  );
2587
2591
  return;
2588
2592
  }
2589
- const ee = G.current;
2590
- if (!ee || !I) {
2591
- L(), U("No conversation found with this account"), C && console.log(
2593
+ const te = j.current;
2594
+ if (!te || !M) {
2595
+ U(), P("No conversation found with this account"), N && console.log(
2592
2596
  "[MessagingShell] No conversation found for:",
2593
2597
  i
2594
2598
  );
2595
2599
  return;
2596
2600
  }
2597
2601
  try {
2598
- const Q = await I.startChannelWithParticipant({
2599
- id: ee.id,
2600
- name: ee.name,
2601
- phone: ee.phone
2602
+ const ee = await M.startChannelWithParticipant({
2603
+ id: te.id,
2604
+ name: te.name,
2605
+ phone: te.phone
2602
2606
  });
2603
- E(Q), U(null), (j = P.current) == null || j.call(P, Q), C && console.log(
2607
+ I(ee), P(null), (X = F.current) == null || X.call(F, ee), N && console.log(
2604
2608
  "[MessagingShell] Channel created and loaded:",
2605
- Q.id
2609
+ ee.id
2606
2610
  );
2607
- } catch (Q) {
2611
+ } catch (ee) {
2608
2612
  console.error(
2609
2613
  "[MessagingShell] Failed to create conversation:",
2610
- Q
2611
- ), L(), U("Failed to create conversation");
2614
+ ee
2615
+ ), U(), P("Failed to create conversation");
2612
2616
  }
2613
- } catch (K) {
2617
+ } catch (Q) {
2614
2618
  console.error(
2615
2619
  "[MessagingShell] Failed to load initial conversation:",
2616
- K
2617
- ), L(), H.current || U("Failed to load conversation");
2620
+ Q
2621
+ ), U(), q.current || P("Failed to load conversation");
2618
2622
  }
2619
2623
  })();
2620
- }, [i, w, A, I, C]);
2621
- const Y = X(r);
2622
- Y.current = r;
2623
- const $ = q(() => {
2624
- var b;
2625
- E(null), Z(!0), (b = Y.current) == null || b.call(Y);
2624
+ }, [i, S, k, M, N]);
2625
+ const $ = K(r);
2626
+ $.current = r;
2627
+ const p = W(() => {
2628
+ var x;
2629
+ I(null), G(!0), (x = $.current) == null || x.call($);
2626
2630
  }, []);
2627
- return T ? /* @__PURE__ */ n(ke, {}) : S ? /* @__PURE__ */ n(he, { message: S, onBack: R }) : !A || !w ? /* @__PURE__ */ n(
2628
- he,
2631
+ return A ? /* @__PURE__ */ n(Ee, {}) : D ? /* @__PURE__ */ n(fe, { message: D, onBack: T }) : !k || !S ? /* @__PURE__ */ n(
2632
+ fe,
2629
2633
  {
2630
2634
  message: "Not connected to messaging service",
2631
- onBack: R
2635
+ onBack: T
2632
2636
  }
2633
- ) : D ? /* @__PURE__ */ n(he, { message: D }) : F && !k ? /* @__PURE__ */ n(he, { message: "Conversation ended" }) : k ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2637
+ ) : B ? /* @__PURE__ */ n(fe, { message: B }) : Z && !E ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : E ? /* @__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(
2634
2638
  dn,
2635
2639
  {
2636
- channel: k,
2640
+ channel: E,
2637
2641
  renderMessageInputActions: t,
2638
2642
  renderConversationFooter: s,
2639
- renderChannelBanner: p,
2640
- onLeaveConversation: $,
2641
- onBlockParticipant: $,
2643
+ renderChannelBanner: b,
2644
+ onLeaveConversation: p,
2645
+ onBlockParticipant: p,
2642
2646
  CustomChannelEmptyState: l,
2643
- showDeleteConversation: V,
2647
+ showDeleteConversation: H,
2644
2648
  onBlockParticipantClick: d,
2645
2649
  onReportParticipantClick: m,
2646
2650
  dmAgentEnabled: g,
2647
2651
  onMessageSent: u,
2648
2652
  chatbotVotingEnabled: f,
2649
2653
  viewerLanguage: c,
2650
- customChannelActions: N,
2654
+ customChannelActions: _,
2651
2655
  renderMessage: v,
2652
- onMessageLinkClick: x
2656
+ onMessageLinkClick: w,
2657
+ showChannelInfo: y
2653
2658
  },
2654
- k.id
2655
- ) }) }) : /* @__PURE__ */ n(ke, {});
2659
+ E.id
2660
+ ) }) }) : /* @__PURE__ */ n(Ee, {});
2656
2661
  };
2657
2662
  function Ka(e) {
2658
2663
  const t = e.state.pending_messages;
@@ -2690,7 +2695,7 @@ const un = z.createContext({
2690
2695
  });
2691
2696
  }, mn = z.memo(
2692
2697
  ({ channel: e, unread: t }) => {
2693
- var R, I, C;
2698
+ var D, T, M;
2694
2699
  const {
2695
2700
  selectedChannel: s,
2696
2701
  onChannelSelect: a,
@@ -2699,40 +2704,40 @@ const un = z.createContext({
2699
2704
  viewerLanguage: o
2700
2705
  } = Za(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2701
2706
  e && a(e);
2702
- }, m = (k) => {
2703
- const E = k.key === "Enter" || k.key === " ", D = k.repeat;
2704
- !E || D || (k.preventDefault(), d());
2705
- }, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
2706
- (k) => {
2707
- var E, D;
2708
- return ((E = k.user) == null ? void 0 : E.id) && k.user.id !== ((D = e == null ? void 0 : e._client) == null ? void 0 : D.userID);
2707
+ }, m = (N) => {
2708
+ const E = N.key === "Enter" || N.key === " ", I = N.repeat;
2709
+ !E || I || (N.preventDefault(), d());
2710
+ }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2711
+ (N) => {
2712
+ var E, I;
2713
+ return ((E = N.user) == null ? void 0 : E.id) && N.user.id !== ((I = e == null ? void 0 : e._client) == null ? void 0 : I.userID);
2709
2714
  }
2710
- ), f = Te(u == null ? void 0 : u.user), c = (I = u == null ? void 0 : u.user) == null ? void 0 : I.image, p = (() => {
2715
+ ), f = Ae(u == null ? void 0 : u.user), c = (T = u == null ? void 0 : u.user) == null ? void 0 : T.image, b = (() => {
2711
2716
  var E;
2712
- const k = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2713
- if (k != null && k.length) {
2714
- for (let D = k.length - 1; D >= 0; D--)
2715
- if (k[D].type !== "system") return k[D];
2717
+ const N = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2718
+ if (N != null && N.length) {
2719
+ for (let I = N.length - 1; I >= 0; I--)
2720
+ if (N[I].type !== "system") return N[I];
2716
2721
  }
2717
2722
  })(), v = (() => {
2718
- var Z, V, G, P;
2719
- const k = Xt({
2720
- message: p,
2723
+ var Z, G, H, j;
2724
+ const N = Xt({
2725
+ message: b,
2721
2726
  viewerLanguage: o
2722
2727
  });
2723
- if (((Z = p == null ? void 0 : p.metadata) == null ? void 0 : Z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
2724
- if (((V = p == null ? void 0 : p.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
2725
- if (((G = p == null ? void 0 : p.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return k ? `📎 ${k}` : "📎 Sent an attachment";
2726
- if (k) return k;
2727
- const F = (P = p == null ? void 0 : p.attachments) == null ? void 0 : P[0];
2728
- return F ? F.og_scrape_url ? F.og_scrape_url : F.type === "image" ? "📷 Sent an image" : F.type === "video" ? "🎥 Sent a video" : F.type === "audio" ? "🎵 Sent audio" : F.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2729
- })(), x = p != null && p.created_at ? er(new Date(p.created_at)) : "", w = p ? Ce(p) : !1, A = i ? i(p, v) : `${w ? "✨ " : ""}${v}`, T = Wt(e), S = t ?? 0;
2728
+ if (((Z = b == null ? void 0 : b.metadata) == null ? void 0 : Z.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2729
+ if (((G = b == null ? void 0 : b.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2730
+ if (((H = b == null ? void 0 : b.metadata) == null ? void 0 : H.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2731
+ if (N) return N;
2732
+ const P = (j = b == null ? void 0 : b.attachments) == null ? void 0 : j[0];
2733
+ return P ? P.og_scrape_url ? P.og_scrape_url : P.type === "image" ? "📷 Sent an image" : P.type === "video" ? "🎥 Sent a video" : P.type === "audio" ? "🎵 Sent audio" : P.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2734
+ })(), w = b != null && b.created_at ? er(new Date(b.created_at)) : "", y = b ? ke(b) : !1, S = i ? i(b, v) : `${y ? "✨ " : ""}${v}`, k = Wt(e), A = t ?? 0;
2730
2735
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2731
2736
  channelId: e == null ? void 0 : e.id,
2732
2737
  isSelected: l,
2733
2738
  participantName: f,
2734
- unreadCount: S,
2735
- hasTimestamp: !!x
2739
+ unreadCount: A,
2740
+ hasTimestamp: !!w
2736
2741
  }), /* @__PURE__ */ n(
2737
2742
  "div",
2738
2743
  {
@@ -2740,7 +2745,7 @@ const un = z.createContext({
2740
2745
  tabIndex: 0,
2741
2746
  onClick: d,
2742
2747
  onKeyDown: m,
2743
- className: y(
2748
+ className: C(
2744
2749
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2745
2750
  {
2746
2751
  "bg-black/[0.04]": l,
@@ -2749,13 +2754,13 @@ const un = z.createContext({
2749
2754
  ),
2750
2755
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2751
2756
  /* @__PURE__ */ n(
2752
- ae,
2757
+ re,
2753
2758
  {
2754
- id: ((C = u == null ? void 0 : u.user) == null ? void 0 : C.id) || e.id || "unknown",
2759
+ id: ((M = u == null ? void 0 : u.user) == null ? void 0 : M.id) || e.id || "unknown",
2755
2760
  name: f,
2756
2761
  image: c,
2757
2762
  size: 48,
2758
- starred: T
2763
+ starred: k
2759
2764
  }
2760
2765
  ),
2761
2766
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2763,20 +2768,20 @@ const un = z.createContext({
2763
2768
  /* @__PURE__ */ h(
2764
2769
  "h3",
2765
2770
  {
2766
- className: y(
2771
+ className: C(
2767
2772
  "text-sm font-medium truncate text-[#191918]"
2768
2773
  ),
2769
2774
  children: [
2770
- T && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2775
+ k && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2771
2776
  f
2772
2777
  ]
2773
2778
  }
2774
2779
  ),
2775
- x && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: x })
2780
+ w && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: w })
2776
2781
  ] }),
2777
2782
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2778
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
2779
- S > 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: S > 99 ? "99+" : S })
2783
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
2784
+ A > 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: A > 99 ? "99+" : A })
2780
2785
  ] })
2781
2786
  ] })
2782
2787
  ] })
@@ -2800,11 +2805,11 @@ const tr = { last_message_at: -1 }, nr = z.memo(
2800
2805
  }) => {
2801
2806
  const g = z.useRef(0);
2802
2807
  g.current++;
2803
- const { debug: u = !1 } = qe(), f = z.useCallback(
2804
- (p) => {
2805
- for (const N of p)
2806
- Ka(N);
2807
- return r ? r(p) : p;
2808
+ const { debug: u = !1 } = We(), f = z.useCallback(
2809
+ (b) => {
2810
+ for (const _ of b)
2811
+ Ka(_);
2812
+ return r ? r(b) : b;
2808
2813
  },
2809
2814
  [r]
2810
2815
  );
@@ -2832,7 +2837,7 @@ const tr = { last_message_at: -1 }, nr = z.memo(
2832
2837
  return /* @__PURE__ */ n(
2833
2838
  "div",
2834
2839
  {
2835
- className: y(
2840
+ className: C(
2836
2841
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2837
2842
  o
2838
2843
  ),
@@ -2855,7 +2860,7 @@ const tr = { last_message_at: -1 }, nr = z.memo(
2855
2860
  );
2856
2861
  nr.displayName = "ChannelList";
2857
2862
  const sr = /^([a-z][a-z0-9+.-]*):/i, ar = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2858
- function Qe(e) {
2863
+ function et(e) {
2859
2864
  if (typeof e != "string") return;
2860
2865
  const t = e.trim();
2861
2866
  if (t === "") return;
@@ -2870,10 +2875,10 @@ const rr = {
2870
2875
  dark: "bg-white text-[#121110] hover:bg-white/90",
2871
2876
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2872
2877
  }, ir = ({ variant: e, cta: t }) => {
2873
- const s = y(
2878
+ const s = C(
2874
2879
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2875
2880
  rr[e]
2876
- ), a = Qe(t.href);
2881
+ ), a = et(t.href);
2877
2882
  return a ? /* @__PURE__ */ n(
2878
2883
  "a",
2879
2884
  {
@@ -2905,7 +2910,7 @@ const rr = {
2905
2910
  }, lr = "text-white/30", cr = {
2906
2911
  dark: "text-white/55",
2907
2912
  light: "text-black/55"
2908
- }, et = ({
2913
+ }, tt = ({
2909
2914
  variant: e,
2910
2915
  title: t,
2911
2916
  placeholderTitle: s,
@@ -2915,12 +2920,12 @@ const rr = {
2915
2920
  cta: o,
2916
2921
  trailingAction: l
2917
2922
  }) => {
2918
- const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", p = o != null;
2919
- if (!g && !u && !c && !p) return null;
2920
- const v = y(
2923
+ const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2924
+ if (!g && !u && !c && !b) return null;
2925
+ const v = C(
2921
2926
  "truncate text-base font-medium leading-6",
2922
2927
  d && !t ? lr : or[e]
2923
- ), x = y(
2928
+ ), w = C(
2924
2929
  "truncate text-xs leading-4",
2925
2930
  cr[e]
2926
2931
  );
@@ -2930,24 +2935,24 @@ const rr = {
2930
2935
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2931
2936
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2932
2937
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2933
- /* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
2938
+ /* @__PURE__ */ n("p", { className: C("min-w-0", v), children: m })
2934
2939
  ] }),
2935
- u && /* @__PURE__ */ n("p", { className: x, children: a })
2940
+ u && /* @__PURE__ */ n("p", { className: w, children: a })
2936
2941
  ] }),
2937
- !p && c && /* @__PURE__ */ n("p", { className: x, children: f })
2942
+ !b && c && /* @__PURE__ */ n("p", { className: w, children: f })
2938
2943
  ] }),
2939
2944
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2940
2945
  ] }),
2941
2946
  o && /* @__PURE__ */ n(ir, { variant: e, cta: o })
2942
2947
  ] });
2943
- }, dr = y(
2948
+ }, dr = C(
2944
2949
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2945
2950
  // 1px hairline border that sits flush with the card chrome — matches
2946
2951
  // the messaging design system's "small border around link attachments"
2947
2952
  // treatment from the mobile spec. The drop shadow remains for depth.
2948
2953
  "border border-black/[0.08]",
2949
2954
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2950
- ), Ee = ({
2955
+ ), Ie = ({
2951
2956
  variant: e,
2952
2957
  children: t,
2953
2958
  href: s,
@@ -2958,7 +2963,7 @@ const rr = {
2958
2963
  bgClassName: l,
2959
2964
  "data-testid": d
2960
2965
  }) => {
2961
- const m = s != null || a != null, g = y(
2966
+ const m = s != null || a != null, g = C(
2962
2967
  dr,
2963
2968
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2964
2969
  // `focus-ring` is a design-system utility from the component-library
@@ -2989,7 +2994,7 @@ const rr = {
2989
2994
  onClick: a,
2990
2995
  "aria-label": r,
2991
2996
  "data-testid": d,
2992
- className: y(g, "text-left"),
2997
+ className: C(g, "text-left"),
2993
2998
  children: [
2994
2999
  t,
2995
3000
  u
@@ -3013,11 +3018,11 @@ const rr = {
3013
3018
  }, mr = {
3014
3019
  dark: "size-16 text-white/25",
3015
3020
  light: "size-16 text-black/25"
3016
- }, Ae = (e, t) => !!t && !!e && re(e) === "audio", hn = (e, t) => {
3021
+ }, Me = (e, t) => !!t && !!e && ie(e) === "audio", hn = (e, t) => {
3017
3022
  if (!t || !e) return !1;
3018
- const s = re(e);
3023
+ const s = ie(e);
3019
3024
  return s === "video" || s === "audio";
3020
- }, tt = "bg-[#F2F3F4]", Ie = ({
3025
+ }, nt = "bg-[#F2F3F4]", Se = ({
3021
3026
  variant: e,
3022
3027
  thumbnailUrl: t,
3023
3028
  sourceUrl: s,
@@ -3026,8 +3031,8 @@ const rr = {
3026
3031
  topLeft: i,
3027
3032
  topRight: o
3028
3033
  }) => {
3029
- const l = re(r), d = !!s && l === "video";
3030
- return Ae(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3034
+ const l = ie(r), d = !!s && l === "video";
3035
+ return Me(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3031
3036
  "audio",
3032
3037
  {
3033
3038
  src: s,
@@ -3039,7 +3044,7 @@ const rr = {
3039
3044
  ) }) : /* @__PURE__ */ h(
3040
3045
  "div",
3041
3046
  {
3042
- className: y(
3047
+ className: C(
3043
3048
  "relative h-[180px] w-full overflow-hidden",
3044
3049
  d && "bg-black"
3045
3050
  ),
@@ -3066,11 +3071,11 @@ const rr = {
3066
3071
  ) : /* @__PURE__ */ n(
3067
3072
  "div",
3068
3073
  {
3069
- className: y(
3074
+ className: C(
3070
3075
  "flex h-full w-full items-center justify-center",
3071
3076
  ur[e]
3072
3077
  ),
3073
- children: le(r, {
3078
+ children: ce(r, {
3074
3079
  className: mr[e],
3075
3080
  weight: "regular"
3076
3081
  })
@@ -3095,16 +3100,16 @@ const rr = {
3095
3100
  onDismiss: g,
3096
3101
  onEditClick: u
3097
3102
  }) => {
3098
- const f = l === "classic", c = Ae(r, o), p = g ? /* @__PURE__ */ n(
3103
+ const f = l === "classic", c = Me(r, o), b = g ? /* @__PURE__ */ n(
3099
3104
  "button",
3100
3105
  {
3101
3106
  type: "button",
3102
3107
  onClick: g,
3103
3108
  "aria-label": "Dismiss attachment",
3104
3109
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3105
- children: /* @__PURE__ */ n(pe, { className: "size-3", weight: "bold" })
3110
+ children: /* @__PURE__ */ n(ve, { className: "size-3", weight: "bold" })
3106
3111
  }
3107
- ) : void 0, N = u ? /* @__PURE__ */ n(
3112
+ ) : void 0, _ = u ? /* @__PURE__ */ n(
3108
3113
  "button",
3109
3114
  {
3110
3115
  type: "button",
@@ -3114,9 +3119,9 @@ const rr = {
3114
3119
  children: /* @__PURE__ */ n(Ss, { className: "size-5", weight: "regular" })
3115
3120
  }
3116
3121
  ) : void 0;
3117
- return c ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3122
+ return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: nt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3118
3123
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3119
- Ie,
3124
+ Se,
3120
3125
  {
3121
3126
  variant: "dark",
3122
3127
  sourceUrl: o,
@@ -3124,26 +3129,26 @@ const rr = {
3124
3129
  mimeType: r
3125
3130
  }
3126
3131
  ) }),
3127
- p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
3132
+ b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3128
3133
  ] }) }) : /* @__PURE__ */ h(
3129
- Ee,
3134
+ Ie,
3130
3135
  {
3131
3136
  variant: "dark",
3132
- topRight: f ? p : void 0,
3137
+ topRight: f ? b : void 0,
3133
3138
  children: [
3134
3139
  !f && /* @__PURE__ */ n(
3135
- Ie,
3140
+ Se,
3136
3141
  {
3137
3142
  variant: "dark",
3138
3143
  thumbnailUrl: i,
3139
3144
  sourceUrl: o,
3140
3145
  title: e,
3141
3146
  mimeType: r,
3142
- topRight: p
3147
+ topRight: b
3143
3148
  }
3144
3149
  ),
3145
3150
  /* @__PURE__ */ n(
3146
- et,
3151
+ tt,
3147
3152
  {
3148
3153
  variant: "dark",
3149
3154
  title: e,
@@ -3152,7 +3157,7 @@ const rr = {
3152
3157
  url: a,
3153
3158
  appIcon: d,
3154
3159
  cta: m,
3155
- trailingAction: N
3160
+ trailingAction: _
3156
3161
  }
3157
3162
  )
3158
3163
  ]
@@ -3170,7 +3175,7 @@ const rr = {
3170
3175
  cta: d,
3171
3176
  onClick: m
3172
3177
  }) => {
3173
- const g = hn(a, i), u = Qe(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = Ae(a, i) ? tt : void 0, N = d && m ? {
3178
+ const g = hn(a, i), u = et(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Me(a, i) ? nt : void 0, _ = d && m ? {
3174
3179
  ...d,
3175
3180
  onClick: () => {
3176
3181
  var v;
@@ -3178,17 +3183,17 @@ const rr = {
3178
3183
  }
3179
3184
  } : d;
3180
3185
  return /* @__PURE__ */ h(
3181
- Ee,
3186
+ Ie,
3182
3187
  {
3183
3188
  variant: "light",
3184
3189
  href: f,
3185
3190
  onClick: c,
3186
3191
  ariaLabel: e ?? "Open attachment preview",
3187
- bgClassName: p,
3192
+ bgClassName: b,
3188
3193
  "data-testid": "link-attachment",
3189
3194
  children: [
3190
3195
  o === "featured" && /* @__PURE__ */ n(
3191
- Ie,
3196
+ Se,
3192
3197
  {
3193
3198
  variant: "light",
3194
3199
  thumbnailUrl: r,
@@ -3198,14 +3203,14 @@ const rr = {
3198
3203
  }
3199
3204
  ),
3200
3205
  /* @__PURE__ */ n(
3201
- et,
3206
+ tt,
3202
3207
  {
3203
3208
  variant: "light",
3204
3209
  title: e,
3205
3210
  description: t,
3206
3211
  url: s,
3207
3212
  appIcon: l,
3208
- cta: N
3213
+ cta: _
3209
3214
  }
3210
3215
  )
3211
3216
  ]
@@ -3224,17 +3229,17 @@ const rr = {
3224
3229
  cta: m,
3225
3230
  onClick: g
3226
3231
  }) => {
3227
- const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
3232
+ const u = hn(r, o), f = et(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3228
3233
  return /* @__PURE__ */ h(
3229
- Ee,
3234
+ Ie,
3230
3235
  {
3231
3236
  variant: "dark",
3232
3237
  href: c,
3233
- onClick: p,
3234
- bgClassName: Ae(r, o) ? tt : void 0,
3238
+ onClick: b,
3239
+ bgClassName: Me(r, o) ? nt : void 0,
3235
3240
  children: [
3236
3241
  l === "featured" && /* @__PURE__ */ n(
3237
- Ie,
3242
+ Se,
3238
3243
  {
3239
3244
  variant: "dark",
3240
3245
  thumbnailUrl: i,
@@ -3244,7 +3249,7 @@ const rr = {
3244
3249
  }
3245
3250
  ),
3246
3251
  /* @__PURE__ */ n(
3247
- et,
3252
+ tt,
3248
3253
  {
3249
3254
  variant: "dark",
3250
3255
  title: e,
@@ -3284,7 +3289,7 @@ const rr = {
3284
3289
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3285
3290
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3286
3291
  }
3287
- }, ve = ({
3292
+ }, xe = ({
3288
3293
  variant: e,
3289
3294
  text: t,
3290
3295
  bordered: s = !0,
@@ -3299,7 +3304,7 @@ const rr = {
3299
3304
  {
3300
3305
  "data-testid": o,
3301
3306
  "data-group-position": a,
3302
- className: y(
3307
+ className: C(
3303
3308
  // 280px-wide bubble — matches the mobile chat attachment width
3304
3309
  // and keeps the document / image / audio bubbles visually
3305
3310
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3319,7 +3324,7 @@ const rr = {
3319
3324
  l ? /* @__PURE__ */ n(
3320
3325
  "p",
3321
3326
  {
3322
- className: y(
3327
+ className: C(
3323
3328
  // No `text-*` / `font-*` overrides here — caption inherits
3324
3329
  // the same font family + size as `.str-chat__message-text`
3325
3330
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3336,7 +3341,7 @@ const rr = {
3336
3341
  ]
3337
3342
  }
3338
3343
  );
3339
- }, xe = ({
3344
+ }, we = ({
3340
3345
  onClick: e,
3341
3346
  variant: t = "overlay",
3342
3347
  ariaLabel: s = "Dismiss attachment"
@@ -3348,13 +3353,13 @@ const rr = {
3348
3353
  a.stopPropagation(), e();
3349
3354
  },
3350
3355
  "aria-label": s,
3351
- className: y(
3356
+ className: C(
3352
3357
  "flex size-6 items-center justify-center rounded-full text-white",
3353
3358
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3354
3359
  ),
3355
- children: /* @__PURE__ */ n(pe, { className: "size-3", weight: "bold" })
3360
+ children: /* @__PURE__ */ n(ve, { className: "size-3", weight: "bold" })
3356
3361
  }
3357
- ), we = (e) => e === "received" ? "light" : "dark", Ci = ({
3362
+ ), Ne = (e) => e === "received" ? "light" : "dark", Ci = ({
3358
3363
  firstOfGroup: e,
3359
3364
  endOfGroup: t,
3360
3365
  groupedByUser: s
@@ -3375,7 +3380,7 @@ const rr = {
3375
3380
  }
3376
3381
  ),
3377
3382
  s ?? null
3378
- ] }), nt = ({
3383
+ ] }), st = ({
3379
3384
  state: e,
3380
3385
  src: t,
3381
3386
  mimeType: s,
@@ -3386,18 +3391,18 @@ const rr = {
3386
3391
  preload: l,
3387
3392
  onDismiss: d
3388
3393
  }) => {
3389
- const m = we(e), g = e === "composer" && !!d, u = Nr({ src: t, mimeType: s, filename: a, items: r });
3394
+ const m = Ne(e), g = e === "composer" && !!d, u = Nr({ src: t, mimeType: s, filename: a, items: r });
3390
3395
  if (u.length === 0)
3391
3396
  return null;
3392
3397
  const f = l ?? (u.length > 1 ? "none" : "metadata");
3393
3398
  return /* @__PURE__ */ n(
3394
- ve,
3399
+ xe,
3395
3400
  {
3396
3401
  variant: m,
3397
3402
  text: i,
3398
3403
  groupPosition: o,
3399
3404
  "data-testid": "audio-attachment",
3400
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
3405
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
3401
3406
  _r,
3402
3407
  {
3403
3408
  item: c,
@@ -3405,14 +3410,14 @@ const rr = {
3405
3410
  trailingAction: (
3406
3411
  // Composer only supports a single attachment, so the
3407
3412
  // dismiss control sits on the only player.
3408
- g && p === 0 ? /* @__PURE__ */ n(xe, { onClick: d, variant: "inline" }) : void 0
3413
+ g && b === 0 ? /* @__PURE__ */ n(we, { onClick: d, variant: "inline" }) : void 0
3409
3414
  )
3410
3415
  },
3411
- `${c.src}-${p}`
3416
+ `${c.src}-${b}`
3412
3417
  )) })
3413
3418
  }
3414
3419
  );
3415
- }, yr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Er = {
3420
+ }, yr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), kr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Er = {
3416
3421
  Composer: yr,
3417
3422
  Sent: Cr,
3418
3423
  Received: kr
@@ -3439,7 +3444,7 @@ function Tr(e, t) {
3439
3444
  }
3440
3445
  }
3441
3446
  if (!e) return;
3442
- if (re(e) === "document") {
3447
+ if (ie(e) === "document") {
3443
3448
  const r = Zt(e), i = Sr[r];
3444
3449
  if (i) return i;
3445
3450
  if (e === "application/octet-stream") return;
@@ -3452,7 +3457,7 @@ function Ar(e, t, s) {
3452
3457
  const a = Tr(e, t), r = typeof s == "number" && s > 0 ? Ir(s) : void 0;
3453
3458
  return [a, r].filter(Boolean).join(" · ") || void 0;
3454
3459
  }
3455
- function te(e) {
3460
+ function ne(e) {
3456
3461
  try {
3457
3462
  const s = new URL(e).pathname.split("/").pop();
3458
3463
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3482,13 +3487,13 @@ const Mr = {
3482
3487
  const d = s ?? t ?? "File", m = Ar(a, t, r), g = /* @__PURE__ */ n(
3483
3488
  "div",
3484
3489
  {
3485
- className: y(
3490
+ className: C(
3486
3491
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3487
3492
  Dr[e]
3488
3493
  ),
3489
3494
  "aria-hidden": !0,
3490
- children: le(a, {
3491
- className: y("size-6", Rr[e]),
3495
+ children: ce(a, {
3496
+ className: C("size-6", Rr[e]),
3492
3497
  weight: "regular"
3493
3498
  })
3494
3499
  }
@@ -3497,7 +3502,7 @@ const Mr = {
3497
3502
  m ? /* @__PURE__ */ n(
3498
3503
  "p",
3499
3504
  {
3500
- className: y(
3505
+ className: C(
3501
3506
  "truncate text-xs leading-4",
3502
3507
  Mr[e]
3503
3508
  ),
@@ -3510,7 +3515,7 @@ const Mr = {
3510
3515
  type: "button",
3511
3516
  onClick: i,
3512
3517
  "aria-label": o,
3513
- className: y(
3518
+ className: C(
3514
3519
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3515
3520
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3516
3521
  ),
@@ -3519,7 +3524,7 @@ const Mr = {
3519
3524
  u
3520
3525
  ]
3521
3526
  }
3522
- ) : /* @__PURE__ */ h(se, { children: [
3527
+ ) : /* @__PURE__ */ h(ae, { children: [
3523
3528
  g,
3524
3529
  u
3525
3530
  ] });
@@ -3529,7 +3534,7 @@ const Mr = {
3529
3534
  ] });
3530
3535
  };
3531
3536
  async function gn(e, t) {
3532
- const s = t ?? te(e);
3537
+ const s = t ?? ne(e);
3533
3538
  try {
3534
3539
  const a = await fetch(e, { mode: "cors" });
3535
3540
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3556,7 +3561,7 @@ const Lr = ({
3556
3561
  onActivate: a,
3557
3562
  trailingAction: r
3558
3563
  }) => {
3559
- const i = t.filename ?? te(t.src);
3564
+ const i = t.filename ?? ne(t.src);
3560
3565
  return /* @__PURE__ */ n(
3561
3566
  fn,
3562
3567
  {
@@ -3570,7 +3575,7 @@ const Lr = ({
3570
3575
  trailingAction: r
3571
3576
  }
3572
3577
  );
3573
- }, st = ({
3578
+ }, at = ({
3574
3579
  state: e,
3575
3580
  src: t,
3576
3581
  filename: s,
@@ -3583,63 +3588,63 @@ const Lr = ({
3583
3588
  onClick: m,
3584
3589
  onDismiss: g
3585
3590
  }) => {
3586
- const u = we(e), f = e === "composer" && !!g, c = Lr({
3591
+ const u = Ne(e), f = e === "composer" && !!g, c = Lr({
3587
3592
  src: t,
3588
3593
  filename: s,
3589
3594
  fileSize: a,
3590
3595
  mimeType: r,
3591
3596
  title: i,
3592
3597
  items: o
3593
- }), p = (v) => {
3598
+ }), b = (v) => {
3594
3599
  if ((m == null ? void 0 : m(v)) === !1) return;
3595
- const x = c[v];
3596
- if (!x) return;
3597
- const w = x.filename ?? te(x.src);
3598
- gn(x.src, w);
3600
+ const w = c[v];
3601
+ if (!w) return;
3602
+ const y = w.filename ?? ne(w.src);
3603
+ gn(w.src, y);
3599
3604
  };
3600
3605
  if (c.length === 0)
3601
3606
  return null;
3602
- const N = /* @__PURE__ */ n(
3607
+ const _ = /* @__PURE__ */ n(
3603
3608
  "span",
3604
3609
  {
3605
- className: y(
3610
+ className: C(
3606
3611
  "flex size-8 items-center justify-center rounded-full",
3607
3612
  u === "dark" ? "text-white/70" : "text-black/70"
3608
3613
  ),
3609
3614
  "aria-hidden": !0,
3610
- children: /* @__PURE__ */ n(ge, { className: "size-5", weight: "bold" })
3615
+ children: /* @__PURE__ */ n(be, { className: "size-5", weight: "bold" })
3611
3616
  }
3612
3617
  );
3613
3618
  return /* @__PURE__ */ n(
3614
- ve,
3619
+ xe,
3615
3620
  {
3616
3621
  variant: u,
3617
3622
  text: l,
3618
3623
  groupPosition: d,
3619
3624
  "data-testid": "file-attachment",
3620
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
3625
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, w) => /* @__PURE__ */ n(
3621
3626
  Pr,
3622
3627
  {
3623
3628
  variant: u,
3624
3629
  item: v,
3625
- index: x,
3626
- onActivate: p,
3627
- trailingAction: f && x === 0 ? /* @__PURE__ */ n(xe, { onClick: g, variant: "inline" }) : N
3630
+ index: w,
3631
+ onActivate: b,
3632
+ trailingAction: f && w === 0 ? /* @__PURE__ */ n(we, { onClick: g, variant: "inline" }) : _
3628
3633
  },
3629
- `${v.src}-${x}`
3634
+ `${v.src}-${w}`
3630
3635
  )) })
3631
3636
  }
3632
3637
  );
3633
- }, Or = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), zr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), $r = {
3638
+ }, Or = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), zr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), $r = {
3634
3639
  Composer: Or,
3635
3640
  Sent: zr,
3636
3641
  Received: Fr
3637
- }, at = ({
3642
+ }, rt = ({
3638
3643
  onPrev: e,
3639
3644
  onNext: t,
3640
3645
  prevLabel: s = "Previous",
3641
3646
  nextLabel: a = "Next"
3642
- }) => /* @__PURE__ */ h(se, { children: [
3647
+ }) => /* @__PURE__ */ h(ae, { children: [
3643
3648
  /* @__PURE__ */ n(
3644
3649
  "button",
3645
3650
  {
@@ -3669,7 +3674,7 @@ const Lr = ({
3669
3674
  tone: i = "dark",
3670
3675
  onTriggered: o
3671
3676
  }) => {
3672
- const [l, d] = O(!1), m = q(
3677
+ const [l, d] = O(!1), m = W(
3673
3678
  (c) => {
3674
3679
  c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3675
3680
  }).finally(() => {
@@ -3677,7 +3682,7 @@ const Lr = ({
3677
3682
  }));
3678
3683
  },
3679
3684
  [l, e, t, o]
3680
- ), g = r ?? s !== "pill", f = { className: y(
3685
+ ), g = r ?? s !== "pill", f = { className: C(
3681
3686
  s === "pill" ? "size-4" : "size-5",
3682
3687
  "shrink-0"
3683
3688
  ), weight: "bold" };
@@ -3688,7 +3693,7 @@ const Lr = ({
3688
3693
  onClick: m,
3689
3694
  disabled: l,
3690
3695
  "aria-label": a,
3691
- className: y(
3696
+ className: C(
3692
3697
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3693
3698
  {
3694
3699
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3696,14 +3701,14 @@ const Lr = ({
3696
3701
  }[i]
3697
3702
  ),
3698
3703
  children: l ? /* @__PURE__ */ n(
3699
- fe,
3704
+ ge,
3700
3705
  {
3701
3706
  className: "size-4 animate-spin",
3702
3707
  weight: "bold",
3703
3708
  "aria-hidden": !0
3704
3709
  }
3705
3710
  ) : /* @__PURE__ */ n(
3706
- ge,
3711
+ be,
3707
3712
  {
3708
3713
  className: "size-5 shrink-0",
3709
3714
  weight: "bold",
@@ -3719,7 +3724,7 @@ const Lr = ({
3719
3724
  disabled: l,
3720
3725
  "aria-label": a,
3721
3726
  className: "mes-media-viewer__action",
3722
- children: l ? /* @__PURE__ */ n(fe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(ge, { size: 20, weight: "bold", "aria-hidden": !0 })
3727
+ children: l ? /* @__PURE__ */ n(ge, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 })
3723
3728
  }
3724
3729
  ) : /* @__PURE__ */ h(
3725
3730
  "button",
@@ -3728,37 +3733,37 @@ const Lr = ({
3728
3733
  onClick: m,
3729
3734
  disabled: l,
3730
3735
  "aria-label": g ? a : void 0,
3731
- className: y(
3736
+ className: C(
3732
3737
  "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",
3733
3738
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3734
3739
  ),
3735
3740
  children: [
3736
3741
  l ? /* @__PURE__ */ n(
3737
- fe,
3742
+ ge,
3738
3743
  {
3739
3744
  className: "size-4 animate-spin",
3740
3745
  weight: "bold",
3741
3746
  "aria-hidden": !0
3742
3747
  }
3743
- ) : /* @__PURE__ */ n(ge, { ...f, "aria-hidden": !0 }),
3748
+ ) : /* @__PURE__ */ n(be, { ...f, "aria-hidden": !0 }),
3744
3749
  g ? null : a
3745
3750
  ]
3746
3751
  }
3747
3752
  );
3748
- }, Fe = (e, t, s) => Math.min(Math.max(e, t), s), rt = ({
3753
+ }, $e = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
3749
3754
  length: e,
3750
3755
  initialIndex: t,
3751
3756
  open: s
3752
3757
  }) => {
3753
- const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3758
+ const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3754
3759
  J(() => {
3755
- s && i(Fe(t, 0, Math.max(e - 1, 0)));
3760
+ s && i($e(t, 0, Math.max(e - 1, 0)));
3756
3761
  }, [s, t, e]), J(() => {
3757
- i((d) => Fe(d, 0, Math.max(e - 1, 0)));
3762
+ i((d) => $e(d, 0, Math.max(e - 1, 0)));
3758
3763
  }, [e]);
3759
- const o = q(() => {
3764
+ const o = W(() => {
3760
3765
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3761
- }, [e]), l = q(() => {
3766
+ }, [e]), l = W(() => {
3762
3767
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3763
3768
  }, [e]);
3764
3769
  return J(() => {
@@ -3770,7 +3775,7 @@ const Lr = ({
3770
3775
  };
3771
3776
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3772
3777
  }, [s, e, o, l]), { index: r, prev: o, next: l };
3773
- }, it = ({
3778
+ }, ot = ({
3774
3779
  open: e,
3775
3780
  onClose: t,
3776
3781
  ariaLabel: s,
@@ -3779,7 +3784,7 @@ const Lr = ({
3779
3784
  children: i,
3780
3785
  "data-testid": o
3781
3786
  }) => {
3782
- const l = X(null), d = X(null);
3787
+ const l = K(null), d = K(null);
3783
3788
  return J(() => {
3784
3789
  var f;
3785
3790
  const u = l.current;
@@ -3851,7 +3856,7 @@ const Lr = ({
3851
3856
  onClick: t,
3852
3857
  "aria-label": "Close viewer",
3853
3858
  className: "mes-media-viewer__action",
3854
- children: /* @__PURE__ */ n(pe, { size: 20, weight: "bold", "aria-hidden": !0 })
3859
+ children: /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3855
3860
  }
3856
3861
  )
3857
3862
  ] })
@@ -3866,16 +3871,16 @@ const Lr = ({
3866
3871
  initialIndex: s = 0,
3867
3872
  onClose: a
3868
3873
  }) => {
3869
- const { index: r, prev: i, next: o } = rt({
3874
+ const { index: r, prev: i, next: o } = it({
3870
3875
  length: t.length,
3871
3876
  initialIndex: s,
3872
3877
  open: e
3873
- }), l = t[r], d = ne(
3874
- () => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "image"),
3878
+ }), l = t[r], d = se(
3879
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "image"),
3875
3880
  [l]
3876
3881
  );
3877
3882
  return l ? /* @__PURE__ */ h(
3878
- it,
3883
+ ot,
3879
3884
  {
3880
3885
  open: e,
3881
3886
  onClose: a,
@@ -3905,7 +3910,7 @@ const Lr = ({
3905
3910
  `${r}:${l.src}`
3906
3911
  ),
3907
3912
  t.length > 1 ? /* @__PURE__ */ n(
3908
- at,
3913
+ rt,
3909
3914
  {
3910
3915
  onPrev: i,
3911
3916
  onNext: o,
@@ -3925,14 +3930,14 @@ const Lr = ({
3925
3930
  const r = e.length;
3926
3931
  if (r === 0) return null;
3927
3932
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3928
- const u = y(Br, "h-full w-full");
3933
+ const u = C(Br, "h-full w-full");
3929
3934
  return t ? /* @__PURE__ */ h(
3930
3935
  "button",
3931
3936
  {
3932
3937
  type: "button",
3933
3938
  onClick: () => t(m),
3934
3939
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3935
- className: y(u, "cursor-zoom-in"),
3940
+ className: C(u, "cursor-zoom-in"),
3936
3941
  children: [
3937
3942
  d.content,
3938
3943
  g
@@ -3944,10 +3949,10 @@ const Lr = ({
3944
3949
  g
3945
3950
  ] }, m);
3946
3951
  };
3947
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3952
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3948
3953
  "div",
3949
3954
  {
3950
- className: y(
3955
+ className: C(
3951
3956
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3952
3957
  a
3953
3958
  ),
@@ -3956,7 +3961,7 @@ const Lr = ({
3956
3961
  ) : i.length === 3 ? /* @__PURE__ */ h(
3957
3962
  "div",
3958
3963
  {
3959
- className: y(
3964
+ className: C(
3960
3965
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3961
3966
  a
3962
3967
  ),
@@ -3969,7 +3974,7 @@ const Lr = ({
3969
3974
  ) : /* @__PURE__ */ n(
3970
3975
  "div",
3971
3976
  {
3972
- className: y(
3977
+ className: C(
3973
3978
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3974
3979
  a
3975
3980
  ),
@@ -3986,13 +3991,13 @@ const Lr = ({
3986
3991
  })
3987
3992
  }
3988
3993
  );
3989
- }, Ne = (e) => {
3990
- const [t, s] = O(!1), [a, r] = O(0), i = q(
3994
+ }, _e = (e) => {
3995
+ const [t, s] = O(!1), [a, r] = O(0), i = W(
3991
3996
  (l) => {
3992
3997
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3993
3998
  },
3994
3999
  [e]
3995
- ), o = q(() => s(!1), []);
4000
+ ), o = W(() => s(!1), []);
3996
4001
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3997
4002
  }, jr = (e, t, s, a) => ({
3998
4003
  ariaLabel: `Open image ${t + 1} of ${s}`,
@@ -4018,7 +4023,7 @@ const Lr = ({
4018
4023
  alt: s.alt,
4019
4024
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4020
4025
  })), Vr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4021
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
4026
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
4022
4027
  r
4023
4028
  );
4024
4029
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4042,7 +4047,7 @@ const Lr = ({
4042
4047
  )
4043
4048
  }
4044
4049
  ),
4045
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
4050
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: i }) }) : null,
4046
4051
  /* @__PURE__ */ n(
4047
4052
  pn,
4048
4053
  {
@@ -4064,30 +4069,30 @@ const Lr = ({
4064
4069
  loading: l = "lazy",
4065
4070
  onClick: d
4066
4071
  }) => {
4067
- const m = Ur({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ne(
4072
+ const m = Ur({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = _e(
4068
4073
  d
4069
4074
  );
4070
4075
  if (m.length === 0)
4071
4076
  return null;
4072
- const N = m.map(
4073
- (v, x) => jr(v, x, m.length, l)
4077
+ const _ = m.map(
4078
+ (v, w) => jr(v, w, m.length, l)
4074
4079
  );
4075
4080
  return /* @__PURE__ */ h(
4076
- ve,
4081
+ xe,
4077
4082
  {
4078
4083
  variant: g,
4079
4084
  text: i,
4080
4085
  groupPosition: o,
4081
4086
  "data-testid": "image-attachment",
4082
4087
  children: [
4083
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: N, onTileActivate: c }) }),
4088
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: _, onTileActivate: c }) }),
4084
4089
  /* @__PURE__ */ n(
4085
4090
  pn,
4086
4091
  {
4087
4092
  open: u,
4088
4093
  items: xn(m, a),
4089
4094
  initialIndex: f,
4090
- onClose: p
4095
+ onClose: b
4091
4096
  }
4092
4097
  )
4093
4098
  ]
@@ -4103,19 +4108,19 @@ const Lr = ({
4103
4108
  initialIndex: s = 0,
4104
4109
  onClose: a
4105
4110
  }) => {
4106
- const { index: r, prev: i, next: o } = rt({
4111
+ const { index: r, prev: i, next: o } = it({
4107
4112
  length: t.length,
4108
4113
  initialIndex: s,
4109
4114
  open: e
4110
- }), l = t[r], d = ne(
4111
- () => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
4115
+ }), l = t[r], d = se(
4116
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "document"),
4112
4117
  [l]
4113
- ), m = ne(
4118
+ ), m = se(
4114
4119
  () => l ? Xr(l.src) : void 0,
4115
4120
  [l]
4116
4121
  );
4117
4122
  return !l || !m ? null : /* @__PURE__ */ h(
4118
- it,
4123
+ ot,
4119
4124
  {
4120
4125
  open: e,
4121
4126
  onClose: a,
@@ -4134,7 +4139,7 @@ const Lr = ({
4134
4139
  `${r}:${l.src}`
4135
4140
  ),
4136
4141
  t.length > 1 ? /* @__PURE__ */ n(
4137
- at,
4142
+ rt,
4138
4143
  {
4139
4144
  onPrev: i,
4140
4145
  onNext: o,
@@ -4161,7 +4166,7 @@ const Lr = ({
4161
4166
  onActivate: a,
4162
4167
  trailingAction: r
4163
4168
  }) => {
4164
- const i = t.filename ?? te(t.src);
4169
+ const i = t.filename ?? ne(t.src);
4165
4170
  return /* @__PURE__ */ n(
4166
4171
  fn,
4167
4172
  {
@@ -4175,7 +4180,7 @@ const Lr = ({
4175
4180
  trailingAction: r
4176
4181
  }
4177
4182
  );
4178
- }, ot = ({
4183
+ }, lt = ({
4179
4184
  state: e,
4180
4185
  src: t,
4181
4186
  filename: s,
@@ -4187,31 +4192,31 @@ const Lr = ({
4187
4192
  onClick: d,
4188
4193
  onDismiss: m
4189
4194
  }) => {
4190
- const g = we(e), u = Kr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
4195
+ const g = Ne(e), u = Kr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = _e(
4191
4196
  d
4192
4197
  ), v = e === "composer" && !!m;
4193
4198
  if (u.length === 0)
4194
4199
  return null;
4195
- const x = u.map((w) => ({
4196
- src: w.src,
4197
- filename: w.filename ?? te(w.src)
4200
+ const w = u.map((y) => ({
4201
+ src: y.src,
4202
+ filename: y.filename ?? ne(y.src)
4198
4203
  }));
4199
4204
  return /* @__PURE__ */ h(
4200
- ve,
4205
+ xe,
4201
4206
  {
4202
4207
  variant: g,
4203
4208
  text: o,
4204
4209
  groupPosition: l,
4205
4210
  "data-testid": "pdf-attachment",
4206
4211
  children: [
4207
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, A) => {
4208
- const T = w.filename ?? te(w.src), S = v && A === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4212
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((y, S) => {
4213
+ const k = y.filename ?? ne(y.src), A = v && S === 0 ? /* @__PURE__ */ n(we, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4209
4214
  bn,
4210
4215
  {
4211
- url: w.src,
4212
- filename: T,
4216
+ url: y.src,
4217
+ filename: k,
4213
4218
  variant: "inline",
4214
- label: `Download ${T}`,
4219
+ label: `Download ${k}`,
4215
4220
  tone: g
4216
4221
  }
4217
4222
  );
@@ -4219,27 +4224,27 @@ const Lr = ({
4219
4224
  Jr,
4220
4225
  {
4221
4226
  variant: g,
4222
- item: w,
4223
- index: A,
4224
- onActivate: p,
4225
- trailingAction: S
4227
+ item: y,
4228
+ index: S,
4229
+ onActivate: b,
4230
+ trailingAction: A
4226
4231
  },
4227
- `${w.src}-${A}`
4232
+ `${y.src}-${S}`
4228
4233
  );
4229
4234
  }) }),
4230
4235
  /* @__PURE__ */ n(
4231
4236
  Wr,
4232
4237
  {
4233
4238
  open: f,
4234
- items: x,
4239
+ items: w,
4235
4240
  initialIndex: c,
4236
- onClose: N
4241
+ onClose: _
4237
4242
  }
4238
4243
  )
4239
4244
  ]
4240
4245
  }
4241
4246
  );
4242
- }, Zr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Qr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ti = {
4247
+ }, Zr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Qr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ti = {
4243
4248
  Composer: Zr,
4244
4249
  Sent: Qr,
4245
4250
  Received: ei
@@ -4249,16 +4254,16 @@ const Lr = ({
4249
4254
  initialIndex: s = 0,
4250
4255
  onClose: a
4251
4256
  }) => {
4252
- const { index: r, prev: i, next: o } = rt({
4257
+ const { index: r, prev: i, next: o } = it({
4253
4258
  length: t.length,
4254
4259
  initialIndex: s,
4255
4260
  open: e
4256
- }), l = t[r], d = ne(
4257
- () => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "video"),
4261
+ }), l = t[r], d = se(
4262
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "video"),
4258
4263
  [l]
4259
4264
  );
4260
4265
  return l ? /* @__PURE__ */ h(
4261
- it,
4266
+ ot,
4262
4267
  {
4263
4268
  open: e,
4264
4269
  onClose: a,
@@ -4282,7 +4287,7 @@ const Lr = ({
4282
4287
  `${r}:${l.src}`
4283
4288
  ),
4284
4289
  t.length > 1 ? /* @__PURE__ */ n(
4285
- at,
4290
+ rt,
4286
4291
  {
4287
4292
  onPrev: i,
4288
4293
  onNext: o,
@@ -4293,7 +4298,7 @@ const Lr = ({
4293
4298
  ]
4294
4299
  }
4295
4300
  ) : null;
4296
- }, ni = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
4301
+ }, ni = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
4297
4302
  item: e,
4298
4303
  index: t
4299
4304
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4332,7 +4337,7 @@ const Lr = ({
4332
4337
  preload: s.preload,
4333
4338
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4334
4339
  })), ri = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4335
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ne(
4340
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = _e(
4336
4341
  i
4337
4342
  );
4338
4343
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4346,7 +4351,7 @@ const Lr = ({
4346
4351
  children: /* @__PURE__ */ n(_n, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4347
4352
  }
4348
4353
  ),
4349
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
4354
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: o }) }) : null,
4350
4355
  /* @__PURE__ */ n(
4351
4356
  Nn,
4352
4357
  {
@@ -4372,16 +4377,16 @@ const Lr = ({
4372
4377
  preload: d,
4373
4378
  onClick: m
4374
4379
  }) => {
4375
- const g = ai({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
4380
+ const g = ai({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = _e(
4376
4381
  m
4377
4382
  );
4378
4383
  if (g.length === 0)
4379
4384
  return null;
4380
4385
  const v = g.map(
4381
- (x, w) => si(x, w, g.length)
4386
+ (w, y) => si(w, y, g.length)
4382
4387
  );
4383
4388
  return /* @__PURE__ */ h(
4384
- ve,
4389
+ xe,
4385
4390
  {
4386
4391
  variant: u,
4387
4392
  text: o,
@@ -4392,7 +4397,7 @@ const Lr = ({
4392
4397
  vn,
4393
4398
  {
4394
4399
  tiles: v,
4395
- onTileActivate: p,
4400
+ onTileActivate: b,
4396
4401
  className: "overflow-hidden rounded-md"
4397
4402
  }
4398
4403
  ) }),
@@ -4402,7 +4407,7 @@ const Lr = ({
4402
4407
  open: f,
4403
4408
  items: yn(g, r),
4404
4409
  initialIndex: c,
4405
- onClose: N
4410
+ onClose: _
4406
4411
  }
4407
4412
  )
4408
4413
  ]
@@ -4430,7 +4435,7 @@ const Lr = ({
4430
4435
  onClick: t,
4431
4436
  disabled: s,
4432
4437
  style: { backgroundColor: "#E6E5E3" },
4433
- className: y(
4438
+ className: C(
4434
4439
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4435
4440
  {
4436
4441
  "hover:brightness-95 active:brightness-90": !s,
@@ -4452,7 +4457,7 @@ const Lr = ({
4452
4457
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4453
4458
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4454
4459
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4455
- ae,
4460
+ re,
4456
4461
  {
4457
4462
  id: o || "account",
4458
4463
  name: o || "Account",
@@ -4490,13 +4495,13 @@ export {
4490
4495
  Ei as F,
4491
4496
  yi as L,
4492
4497
  wi as M,
4493
- ye as a,
4494
- ae as b,
4498
+ Ce as a,
4499
+ re as b,
4495
4500
  nr as c,
4496
4501
  dn as d,
4497
4502
  Ni as e,
4498
4503
  di as f,
4499
- re as g,
4504
+ ie as g,
4500
4505
  zt as h,
4501
4506
  ki as i,
4502
4507
  Na as j,
@@ -4507,14 +4512,14 @@ export {
4507
4512
  er as o,
4508
4513
  Tr as p,
4509
4514
  Xt as q,
4510
- le as r,
4515
+ ce as r,
4511
4516
  nn as s,
4512
4517
  Ls as t,
4513
4518
  Ci as u,
4514
4519
  Vs as v,
4515
- Je as w,
4516
- Ze as x,
4517
- Te as y,
4520
+ Ze as w,
4521
+ Qe as x,
4522
+ Ae as y,
4518
4523
  ga as z
4519
4524
  };
4520
- //# sourceMappingURL=index-CnOvDQIp.js.map
4525
+ //# sourceMappingURL=index-DJKFVBkP.js.map