@linktr.ee/messaging-react 3.5.0 → 3.5.1-rc-1782843024

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 (32) hide show
  1. package/dist/{Card-DwuckVx8.cjs → Card-BFDouCWj.cjs} +2 -2
  2. package/dist/{Card-DwuckVx8.cjs.map → Card-BFDouCWj.cjs.map} +1 -1
  3. package/dist/{Card-BGF3hZJD.js → Card-BaurkIJ0.js} +3 -3
  4. package/dist/{Card-BGF3hZJD.js.map → Card-BaurkIJ0.js.map} +1 -1
  5. package/dist/{Card-BA3RGlVC.cjs → Card-CgMV-1UG.cjs} +2 -2
  6. package/dist/{Card-BA3RGlVC.cjs.map → Card-CgMV-1UG.cjs.map} +1 -1
  7. package/dist/{Card-DBi3Jd7-.js → Card-DYBRxXnN.js} +2 -2
  8. package/dist/{Card-DBi3Jd7-.js.map → Card-DYBRxXnN.js.map} +1 -1
  9. package/dist/{Card-BvekIUnZ.cjs → Card-J7NpeEF2.cjs} +2 -2
  10. package/dist/{Card-BvekIUnZ.cjs.map → Card-J7NpeEF2.cjs.map} +1 -1
  11. package/dist/{Card-yaDKMDYI.js → Card-fAFTUIb2.js} +2 -2
  12. package/dist/{Card-yaDKMDYI.js.map → Card-fAFTUIb2.js.map} +1 -1
  13. package/dist/{LockedThumbnail-anhR2WjV.cjs → LockedThumbnail-BDs4bOlZ.cjs} +2 -2
  14. package/dist/{LockedThumbnail-anhR2WjV.cjs.map → LockedThumbnail-BDs4bOlZ.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-CdfkygLY.js → LockedThumbnail-DAjFHtRQ.js} +2 -2
  16. package/dist/{LockedThumbnail-CdfkygLY.js.map → LockedThumbnail-DAjFHtRQ.js.map} +1 -1
  17. package/dist/{index-DmFR1zuQ.js → index-fO4nwAA3.js} +1156 -1136
  18. package/dist/index-fO4nwAA3.js.map +1 -0
  19. package/dist/index-q1Rt81SE.cjs +2 -0
  20. package/dist/index-q1Rt81SE.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelList/CustomChannelPreview.test.tsx +5 -0
  25. package/src/components/ChannelList/CustomChannelPreview.tsx +7 -4
  26. package/src/components/ChannelView.test.tsx +3 -1
  27. package/src/components/ChannelView.tsx +24 -18
  28. package/src/utils/resolveConversationParticipant.test.ts +61 -0
  29. package/src/utils/resolveConversationParticipant.ts +41 -0
  30. package/dist/index-BEQeC48N.cjs +0 -2
  31. package/dist/index-BEQeC48N.cjs.map +0 -1
  32. package/dist/index-DmFR1zuQ.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import V, { createContext as We, useContext as _e, useCallback as J, useState as $, useRef as Y, useEffect as K, useId as In, useMemo as re, Suspense as Xe } from "react";
3
- import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
5
- import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as zn, MessageBouncePrompt as On, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as ye, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as $e, AIStates as Fe, useTypingContext as rs, useAIState as is, Channel as ls, WithComponents as os, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
- import { StarIcon as Ge, DotsThreeIcon as hs, SpinnerGapIcon as Te, SignOutIcon as fs, ProhibitInsetIcon as Pt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as bs, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as _s, FileDocIcon as ys, FilePdfIcon as ks, CircleNotchIcon as we, PlayIcon as He, PauseIcon as Cs, LinkIcon as Es, DownloadSimpleIcon as Ne, GiftIcon as Is, ThumbsUpIcon as Ss, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Pe, ArrowUpIcon as Ms, SparkleIcon as be, ProhibitIcon as Rs, ArrowLeftIcon as zt, CaretRightIcon as ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
2
+ import F, { createContext as Xe, useContext as ye, useCallback as W, useState as $, useRef as H, useEffect as q, useId as Sn, useMemo as re, Suspense as Ke } from "react";
3
+ import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as An, LinkPreviewsManager as Dt } from "stream-chat";
5
+ import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as zn, MessageBlocked as On, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Pt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ke, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as ls, Channel as os, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
+ import { StarIcon as He, DotsThreeIcon as fs, SpinnerGapIcon as Ae, SignOutIcon as gs, ProhibitInsetIcon as zt, FlagIcon as Yt, FileIcon as qt, ImageIcon as ps, SpeakerHighIcon as bs, VideoCameraIcon as Wt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as Ns, FileCsvIcon as _s, FileXlsIcon as ys, FileDocIcon as ks, FilePdfIcon as Cs, CircleNotchIcon as Ne, PlayIcon as Ye, PauseIcon as Es, LinkIcon as Is, DownloadSimpleIcon as _e, GiftIcon as Ss, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as ze, ArrowUpIcon as Rs, SparkleIcon as ve, ProhibitIcon as Ls, ArrowLeftIcon as Ot, CaretRightIcon as xe, PencilSimpleIcon as Ds, CaretLeftIcon as Ps } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as Ps, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
9
- const Xt = We({
8
+ import { MessageActions as zs, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
9
+ const Kt = Xe({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Xt = We({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Je = () => _e(Xt), _i = ({
19
+ }), Je = () => ye(Kt), Ci = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,10 +24,10 @@ const Xt = We({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var M, y;
28
- const l = J(
29
- (I, ...C) => {
30
- i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
27
+ var A, E;
28
+ const l = W(
29
+ (y, ...I) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${y}`, ...I);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,61 +37,61 @@ const Xt = We({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [N, w] = $(null), p = Y(!1), v = Y(null), A = Y(s);
41
- A.current = s;
42
- const T = Y(i);
40
+ const [o, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [w, v] = $(null), p = H(!1), N = H(null), _ = H(s);
41
+ _.current = s;
42
+ const T = H(i);
43
43
  T.current = i;
44
- const E = Y({
44
+ const R = H({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), O = Y(0);
50
- O.current++, l("📊 RENDER INFO", {
51
- renderCount: O.current,
49
+ }), M = H(0);
50
+ M.current++, l("📊 RENDER INFO", {
51
+ renderCount: M.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: E.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: E.current.apiKey !== a,
56
- serviceConfigChanged: E.current.serviceConfig !== s,
57
- capabilitiesChanged: E.current.capabilities !== r
54
+ userChanged: R.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: R.current.apiKey !== a,
56
+ serviceConfigChanged: R.current.serviceConfig !== s,
57
+ capabilitiesChanged: R.current.capabilities !== r
58
58
  }
59
- }), E.current = {
59
+ }), R.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const R = Y(null);
66
- a && ((M = R.current) == null ? void 0 : M.apiKey) !== a && (R.current = { apiKey: a, client: new Tn(a) });
67
- const L = a ? ((y = R.current) == null ? void 0 : y.client) ?? null : null;
68
- K(() => {
69
- const I = O.current, C = A.current;
70
- if (!a || !L || !C) {
65
+ const L = H(null);
66
+ a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new An(a) });
67
+ const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
68
+ q(() => {
69
+ const y = M.current, I = _.current;
70
+ if (!a || !D || !I) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: I,
72
+ renderCount: y,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  l("🚀 CREATING SERVICE", {
78
- renderCount: I,
78
+ renderCount: y,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const z = new Sn({
82
- ...C,
81
+ const O = new Tn({
82
+ ...I,
83
83
  apiKey: a,
84
84
  debug: T.current,
85
- client: L
85
+ client: D
86
86
  });
87
- v.current = z, d(z), l("✅ SERVICE SET", {
88
- renderCount: I,
89
- serviceInstance: !!z
87
+ N.current = O, d(O), l("✅ SERVICE SET", {
88
+ renderCount: y,
89
+ serviceInstance: !!O
90
90
  });
91
- }, [a, L]);
92
- const B = Y(null);
93
- K(() => {
94
- var C, z;
91
+ }, [a, D]);
92
+ const B = H(null);
93
+ q(() => {
94
+ var I, O;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const Xt = We({
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((C = B.current) == null ? void 0 : C.serviceId) === o && ((z = B.current) == null ? void 0 : z.userId) === t.id) {
110
+ if (((I = B.current) == null ? void 0 : I.serviceId) === o && ((O = B.current) == null ? void 0 : O.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,19 +115,19 @@ const Xt = We({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), w(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const D = await o.connectUser(t);
122
- g(D), f(!0), B.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const z = await o.connectUser(t);
122
+ g(z), f(!0), B.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: D.userID
124
+ clientId: z.userID
125
125
  });
126
- } catch (D) {
127
- const j = D instanceof Error ? D.message : "Connection failed";
128
- w(j), l("❌ USER CONNECTION ERROR", {
126
+ } catch (z) {
127
+ const U = z instanceof Error ? z.message : "Connection failed";
128
+ v(U), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: j
130
+ error: U
131
131
  });
132
132
  } finally {
133
133
  b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
@@ -136,14 +136,14 @@ const Xt = We({
136
136
  });
137
137
  }
138
138
  })();
139
- }, [o, t, l, m]), K(() => {
140
- const I = L;
139
+ }, [o, t, l, m]), q(() => {
140
+ const y = D;
141
141
  return () => {
142
- var C;
143
- I && (B.current = null, (C = v.current) == null || C.disconnectUser().catch(console.error));
142
+ var I;
143
+ y && (B.current = null, (I = N.current) == null || I.disconnectUser().catch(console.error));
144
144
  };
145
- }, [L]);
146
- const P = J(async () => {
145
+ }, [D]);
146
+ const P = W(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
149
149
  hasUser: !!t
@@ -154,30 +154,30 @@ const Xt = We({
154
154
  l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
- const I = await o.connectUser(t);
158
- g(I), f(!0), w(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (I) {
160
- const C = I instanceof Error ? I.message : "Refresh failed";
161
- w(C), l("❌ CONNECTION REFRESH ERROR", {
157
+ const y = await o.connectUser(t);
158
+ g(y), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (y) {
160
+ const I = y instanceof Error ? y.message : "Refresh failed";
161
+ v(I), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: C
163
+ error: I
164
164
  });
165
165
  } finally {
166
166
  b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [o, t, l]), _ = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [o, t, l]), C = F.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!u,
171
171
  isConnected: m,
172
172
  isLoading: c,
173
- hasError: !!N,
173
+ hasError: !!w,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: o,
177
177
  client: u,
178
178
  isConnected: m,
179
179
  isLoading: c,
180
- error: N,
180
+ error: w,
181
181
  capabilities: r,
182
182
  refreshConnection: P,
183
183
  debug: i
@@ -186,32 +186,32 @@ const Xt = We({
186
186
  u,
187
187
  m,
188
188
  c,
189
- N,
189
+ w,
190
190
  r,
191
191
  P,
192
192
  i,
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: O.current,
197
- willRenderChat: !!L,
198
- contextValueReady: !!_
199
- }), /* @__PURE__ */ n(Xt.Provider, { value: _, children: L ? /* @__PURE__ */ n(
200
- An,
196
+ renderCount: M.current,
197
+ willRenderChat: !!D,
198
+ contextValueReady: !!C
199
+ }), /* @__PURE__ */ n(Kt.Provider, { value: C, children: D ? /* @__PURE__ */ n(
200
+ Mn,
201
201
  {
202
- client: L,
202
+ client: D,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, zs = () => Je(), Kt = (e) => {
209
+ }, Os = () => Je(), Jt = (e) => {
210
210
  var a, r;
211
211
  const [t, s] = $(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
- return K(() => {
214
+ return q(() => {
215
215
  var l;
216
216
  if (!e) {
217
217
  s(!1);
@@ -228,18 +228,37 @@ const Xt = We({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, Os = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
232
- function $s(e) {
233
- return Os.test(e.trim());
231
+ }, $s = "linktree-official", Fs = "linktree-official-sender";
232
+ function Ze(e, t, s) {
233
+ const a = Object.values(e || {});
234
+ if (s === $s) {
235
+ const r = a.find(
236
+ (i) => {
237
+ var l;
238
+ return ((l = i.user) == null ? void 0 : l.id) === Fs;
239
+ }
240
+ );
241
+ if (r) return r;
242
+ }
243
+ return a.find(
244
+ (r) => {
245
+ var i;
246
+ return ((i = r.user) == null ? void 0 : i.id) && r.user.id !== t;
247
+ }
248
+ );
249
+ }
250
+ const Bs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
+ function Us(e) {
252
+ return Bs.test(e.trim());
234
253
  }
235
- function Ot(e, t) {
254
+ function $t(e, t) {
236
255
  const s = e == null ? void 0 : e.trim();
237
- return !s || t && s === t ? !1 : !$s(s);
256
+ return !s || t && s === t ? !1 : !Us(s);
238
257
  }
239
- function Jt(e) {
240
- return Ot(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ot(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
258
+ function Zt(e) {
259
+ return $t(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : $t(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
241
260
  }
242
- const $t = [
261
+ const Ft = [
243
262
  "🍎",
244
263
  // Apple
245
264
  "🍌",
@@ -267,7 +286,7 @@ const $t = [
267
286
  "🍈"
268
287
  // Melon
269
288
  ];
270
- function Fs(e) {
289
+ function js(e) {
271
290
  let t = 0;
272
291
  for (let s = 0; s < e.length; s++) {
273
292
  const a = e.charCodeAt(s);
@@ -275,9 +294,9 @@ function Fs(e) {
275
294
  }
276
295
  return Math.abs(t);
277
296
  }
278
- function Bs(e) {
279
- const s = Fs(e) % $t.length;
280
- return $t[s];
297
+ function Vs(e) {
298
+ const s = js(e) % Ft.length;
299
+ return Ft[s];
281
300
  }
282
301
  const ne = ({
283
302
  id: e,
@@ -288,7 +307,7 @@ const ne = ({
288
307
  shape: i = "squircle",
289
308
  dmAgentEnabled: l = !1
290
309
  }) => {
291
- const o = Bs(e), u = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
310
+ const o = Vs(e), u = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
292
311
  "img",
293
312
  {
294
313
  src: t,
@@ -324,7 +343,7 @@ const ne = ({
324
343
  {
325
344
  "aria-hidden": "true",
326
345
  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)]",
327
- children: /* @__PURE__ */ n(Ge, { className: "size-3 text-yellow-600", weight: "duotone" })
346
+ children: /* @__PURE__ */ n(He, { className: "size-3 text-yellow-600", weight: "duotone" })
328
347
  }
329
348
  ),
330
349
  /* @__PURE__ */ n(
@@ -350,7 +369,7 @@ const ne = ({
350
369
  ]
351
370
  }
352
371
  );
353
- }, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
372
+ }, Gs = "https://linktr.ee/s/about/trust-center/report", Hs = ({
354
373
  channel: e,
355
374
  participant: t,
356
375
  showBlockParticipant: s = !0,
@@ -363,81 +382,81 @@ const ne = ({
363
382
  onActionComplete: u,
364
383
  logLabel: g = "useChannelModerationActions"
365
384
  }) => {
366
- var M;
367
- const { service: m, debug: f } = Je(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, b = !!(a && s && m && c), [N, w] = $(!1), [p, v] = $(null), [A, T] = $(!1), [E, O] = $(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
368
- return K(() => {
385
+ var A;
386
+ const { service: m, debug: f } = Je(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, b = !!(a && s && m && c), [w, v] = $(!1), [p, N] = $(null), [_, T] = $(!1), [R, M] = $(!1), L = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
387
+ return q(() => {
369
388
  if (!b || !m || !c) {
370
- w(!1), v(null);
389
+ v(!1), N(null);
371
390
  return;
372
391
  }
373
- let y = !1;
392
+ let E = !1;
374
393
  return (async () => {
375
394
  try {
376
- const I = await m.getBlockedUsers();
377
- if (y) return;
378
- w(
379
- I.some(
380
- (C) => C.blocked_user_id === c
395
+ const y = await m.getBlockedUsers();
396
+ if (E) return;
397
+ v(
398
+ y.some(
399
+ (I) => I.blocked_user_id === c
381
400
  )
382
401
  );
383
- } catch (I) {
384
- y || console.error(`[${g}] Failed to check blocked status:`, I);
402
+ } catch (y) {
403
+ E || console.error(`[${g}] Failed to check blocked status:`, y);
385
404
  } finally {
386
- y || v({ participantId: c, service: m });
405
+ E || N({ participantId: c, service: m });
387
406
  }
388
407
  })(), () => {
389
- y = !0;
408
+ E = !0;
390
409
  };
391
410
  }, [b, m, c, g]), {
392
- isParticipantBlocked: N,
393
- isCheckingBlockedStatus: R,
394
- isLeaving: A,
395
- isUpdatingBlockStatus: E,
411
+ isParticipantBlocked: w,
412
+ isCheckingBlockedStatus: L,
413
+ isLeaving: _,
414
+ isUpdatingBlockStatus: R,
396
415
  handleLeaveConversation: async () => {
397
- var y;
398
- if (!A) {
416
+ var E;
417
+ if (!_) {
399
418
  l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
400
419
  try {
401
- const I = ((y = e._client) == null ? void 0 : y.userID) ?? null;
402
- await e.hide(I, !1), r && await r(e), u == null || u();
403
- } catch (I) {
404
- console.error(`[${g}] Failed to leave conversation`, I);
420
+ const y = ((E = e._client) == null ? void 0 : E.userID) ?? null;
421
+ await e.hide(y, !1), r && await r(e), u == null || u();
422
+ } catch (y) {
423
+ console.error(`[${g}] Failed to leave conversation`, y);
405
424
  } finally {
406
425
  T(!1);
407
426
  }
408
427
  }
409
428
  },
410
429
  handleBlockUser: async () => {
411
- var y, I, C;
412
- if (!(E || !m)) {
413
- o == null || o(), f && console.log(`[${g}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
430
+ var E, y, I;
431
+ if (!(R || !m)) {
432
+ o == null || o(), f && console.log(`[${g}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
414
433
  try {
415
- await m.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
416
- } catch (z) {
417
- console.error(`[${g}] Failed to block member`, z);
434
+ await m.blockUser((y = t == null ? void 0 : t.user) == null ? void 0 : y.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
435
+ } catch (O) {
436
+ console.error(`[${g}] Failed to block member`, O);
418
437
  } finally {
419
- O(!1);
438
+ M(!1);
420
439
  }
421
440
  }
422
441
  },
423
442
  handleUnblockUser: async () => {
424
- var y, I, C;
425
- if (!(E || !m)) {
426
- o == null || o(), f && console.log(`[${g}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
443
+ var E, y, I;
444
+ if (!(R || !m)) {
445
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
427
446
  try {
428
- await m.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
429
- } catch (z) {
430
- console.error(`[${g}] Failed to unblock member`, z);
447
+ await m.unBlockUser((y = t == null ? void 0 : t.user) == null ? void 0 : y.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
448
+ } catch (O) {
449
+ console.error(`[${g}] Failed to unblock member`, O);
431
450
  } finally {
432
- O(!1);
451
+ M(!1);
433
452
  }
434
453
  }
435
454
  },
436
455
  handleReportUser: () => {
437
- d == null || d(), u == null || u(), window.open(Us, "_blank", "noopener,noreferrer");
456
+ d == null || d(), u == null || u(), window.open(Gs, "_blank", "noopener,noreferrer");
438
457
  }
439
458
  };
440
- }, pe = ({
459
+ }, be = ({
441
460
  variant: e = "default",
442
461
  className: t,
443
462
  children: s,
@@ -454,7 +473,7 @@ const ne = ({
454
473
  ...a,
455
474
  children: s
456
475
  }
457
- ), Ft = ({
476
+ ), Bt = ({
458
477
  channel: e,
459
478
  participant: t,
460
479
  showDeleteConversation: s = !0,
@@ -468,16 +487,16 @@ const ne = ({
468
487
  customChannelActions: g,
469
488
  triggerClassName: m
470
489
  }) => {
471
- const [f, c] = $(!1), b = Y(null), N = In(), w = J(() => c(!1), []), {
490
+ const [f, c] = $(!1), b = H(null), w = Sn(), v = W(() => c(!1), []), {
472
491
  isParticipantBlocked: p,
473
- isCheckingBlockedStatus: v,
474
- isLeaving: A,
492
+ isCheckingBlockedStatus: N,
493
+ isLeaving: _,
475
494
  isUpdatingBlockStatus: T,
476
- handleLeaveConversation: E,
477
- handleBlockUser: O,
478
- handleUnblockUser: R,
479
- handleReportUser: L
480
- } = js({
495
+ handleLeaveConversation: R,
496
+ handleBlockUser: M,
497
+ handleUnblockUser: L,
498
+ handleReportUser: D
499
+ } = Hs({
481
500
  channel: e,
482
501
  participant: t,
483
502
  showBlockParticipant: a,
@@ -487,18 +506,18 @@ const ne = ({
487
506
  onDeleteConversationClick: o,
488
507
  onBlockParticipantClick: d,
489
508
  onReportParticipantClick: u,
490
- onActionComplete: w,
509
+ onActionComplete: v,
491
510
  logLabel: "ChannelActionsMenu"
492
511
  });
493
- return K(() => {
512
+ return q(() => {
494
513
  if (!f) return;
495
- const P = (M) => {
496
- b.current && !b.current.contains(M.target) && c(!1);
497
- }, _ = (M) => {
498
- M.key === "Escape" && c(!1);
514
+ const P = (A) => {
515
+ b.current && !b.current.contains(A.target) && c(!1);
516
+ }, C = (A) => {
517
+ A.key === "Escape" && c(!1);
499
518
  };
500
- return document.addEventListener("mousedown", P), document.addEventListener("keydown", _), () => {
501
- document.removeEventListener("mousedown", P), document.removeEventListener("keydown", _);
519
+ return document.addEventListener("mousedown", P), document.addEventListener("keydown", C), () => {
520
+ document.removeEventListener("mousedown", P), document.removeEventListener("keydown", C);
502
521
  };
503
522
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
523
  /* @__PURE__ */ h(
@@ -508,10 +527,10 @@ const ne = ({
508
527
  type: "button",
509
528
  "aria-haspopup": "true",
510
529
  "aria-expanded": f,
511
- "aria-controls": f ? N : void 0,
530
+ "aria-controls": f ? w : void 0,
512
531
  onClick: () => c((P) => !P),
513
532
  children: [
514
- /* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
533
+ /* @__PURE__ */ n(fs, { className: "size-5 text-black/90" }),
515
534
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
516
535
  ]
517
536
  }
@@ -519,7 +538,7 @@ const ne = ({
519
538
  f && /* @__PURE__ */ n(
520
539
  "div",
521
540
  {
522
- id: N,
541
+ id: w,
523
542
  "aria-label": "Conversation options",
524
543
  className: k(
525
544
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
@@ -527,49 +546,49 @@ const ne = ({
527
546
  ),
528
547
  children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
529
548
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
- pe,
549
+ be,
531
550
  {
532
- onClick: E,
533
- disabled: A,
534
- "aria-busy": A,
551
+ onClick: R,
552
+ disabled: _,
553
+ "aria-busy": _,
535
554
  children: [
536
- A ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
555
+ _ ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
537
556
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
538
557
  ]
539
558
  }
540
559
  ) }),
541
- a && /* @__PURE__ */ n("li", { children: v ? (
560
+ a && /* @__PURE__ */ n("li", { children: N ? (
542
561
  // Block status not yet resolved — show a disabled placeholder
543
562
  // so a premature click can't act on a stale block state.
544
- /* @__PURE__ */ h(pe, { disabled: !0, "aria-busy": !0, children: [
545
- /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }),
563
+ /* @__PURE__ */ h(be, { disabled: !0, "aria-busy": !0, children: [
564
+ /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }),
546
565
  /* @__PURE__ */ n("span", { children: "Block" })
547
566
  ] })
548
567
  ) : p ? /* @__PURE__ */ h(
549
- pe,
568
+ be,
550
569
  {
551
- onClick: R,
570
+ onClick: L,
552
571
  disabled: T,
553
572
  "aria-busy": T,
554
573
  children: [
555
- T ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Pt, { className: "h-5 w-5" }),
574
+ T ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(zt, { className: "h-5 w-5" }),
556
575
  /* @__PURE__ */ n("span", { children: "Unblock" })
557
576
  ]
558
577
  }
559
578
  ) : /* @__PURE__ */ h(
560
- pe,
579
+ be,
561
580
  {
562
- onClick: O,
581
+ onClick: M,
563
582
  disabled: T,
564
583
  "aria-busy": T,
565
584
  children: [
566
- T ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Pt, { className: "h-5 w-5" }),
585
+ T ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(zt, { className: "h-5 w-5" }),
567
586
  /* @__PURE__ */ n("span", { children: "Block" })
568
587
  ]
569
588
  }
570
589
  ) }),
571
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(pe, { variant: "danger", onClick: L, children: [
572
- /* @__PURE__ */ n(Ht, { className: "h-5 w-5" }),
590
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(be, { variant: "danger", onClick: D, children: [
591
+ /* @__PURE__ */ n(Yt, { className: "h-5 w-5" }),
573
592
  /* @__PURE__ */ n("span", { children: "Report" })
574
593
  ] }) }),
575
594
  g
@@ -577,30 +596,30 @@ const ne = ({
577
596
  }
578
597
  )
579
598
  ] });
580
- }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ye = "vote_up", qe = "vote_down";
581
- function Gs(e) {
582
- return e != null && e.length ? e.some((t) => t.type === qe) ? "down" : e.some((t) => t.type === Ye) ? "up" : null : null;
599
+ }, Ys = (e) => /* @__PURE__ */ n(Rn, { ...e, position: "center" }), qe = "vote_up", We = "vote_down";
600
+ function qs(e) {
601
+ return e != null && e.length ? e.some((t) => t.type === We) ? "down" : e.some((t) => t.type === qe) ? "up" : null : null;
583
602
  }
584
- function Hs(e) {
585
- const { channel: t } = de(), { client: s } = Ke("useMessageVote"), a = re(
586
- () => Gs(e.own_reactions),
603
+ function Ws(e) {
604
+ const { channel: t } = de(), { client: s } = ue("useMessageVote"), a = re(
605
+ () => qs(e.own_reactions),
587
606
  [e.own_reactions]
588
- ), r = J(async () => {
607
+ ), r = W(async () => {
589
608
  if (s != null && s.userID)
590
609
  try {
591
- a === "up" ? await t.deleteReaction(e.id, Ye) : await t.sendReaction(
610
+ a === "up" ? await t.deleteReaction(e.id, qe) : await t.sendReaction(
592
611
  e.id,
593
- { type: Ye },
612
+ { type: qe },
594
613
  { enforce_unique: !0, skip_push: !0 }
595
614
  );
596
615
  } catch {
597
616
  }
598
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = J(async () => {
617
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = W(async () => {
599
618
  if (s != null && s.userID)
600
619
  try {
601
- a === "down" ? await t.deleteReaction(e.id, qe) : await t.sendReaction(
620
+ a === "down" ? await t.deleteReaction(e.id, We) : await t.sendReaction(
602
621
  e.id,
603
- { type: qe },
622
+ { type: We },
604
623
  { enforce_unique: !0, skip_push: !0 }
605
624
  );
606
625
  } catch {
@@ -608,24 +627,24 @@ function Hs(e) {
608
627
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
609
628
  return { selected: a, voteUp: r, voteDown: i };
610
629
  }
611
- function Ys(e) {
630
+ function Xs(e) {
612
631
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
613
632
  }
614
- function Zt({
633
+ function Qt({
615
634
  message: e,
616
635
  viewerLanguage: t
617
636
  }) {
618
637
  var r;
619
- const s = e == null ? void 0 : e.text, a = Ys(t);
638
+ const s = e == null ? void 0 : e.text, a = Xs(t);
620
639
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
621
640
  }
622
- const qs = V.lazy(() => import("./Card-DBi3Jd7-.js")), Ws = V.lazy(() => import("./Card-yaDKMDYI.js")), Xs = V.lazy(() => import("./Card-BGF3hZJD.js")), Ze = () => /* @__PURE__ */ n(
641
+ const Ks = F.lazy(() => import("./Card-DYBRxXnN.js")), Js = F.lazy(() => import("./Card-fAFTUIb2.js")), Zs = F.lazy(() => import("./Card-BaurkIJ0.js")), Qe = () => /* @__PURE__ */ n(
623
642
  "div",
624
643
  {
625
644
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
626
645
  "aria-hidden": !0
627
646
  }
628
- ), Ks = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), en = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Qt, Zs = en, Bt = { Composer: Ks, Sent: Qt, Received: en, Creator: Js, Visitor: Zs }, Qs = [
647
+ ), Qs = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), en = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), tn = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Zs, { ...e }) }), ea = en, ta = tn, Ut = { Composer: Qs, Sent: en, Received: tn, Creator: ea, Visitor: ta }, na = [
629
648
  [/pdf/, "pdf"],
630
649
  [/wordprocessingml|msword|\.doc/, "doc"],
631
650
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -638,39 +657,39 @@ const qs = V.lazy(() => import("./Card-DBi3Jd7-.js")), Ws = V.lazy(() => import(
638
657
  function ie(e) {
639
658
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
659
  }
641
- function tn(e) {
642
- const t = Qs.find(
660
+ function nn(e) {
661
+ const t = na.find(
643
662
  ([s]) => s.test(e)
644
663
  );
645
664
  return t ? t[1] : "generic";
646
665
  }
647
- const ea = {
648
- video: qt,
649
- audio: ps,
650
- image: gs,
651
- document: Yt
652
- }, ta = {
653
- pdf: ks,
654
- doc: ys,
655
- xls: _s,
656
- csv: Ns,
657
- ppt: ws,
658
- zip: xs,
659
- text: vs,
660
- markdown: bs,
661
- generic: Yt
666
+ const sa = {
667
+ video: Wt,
668
+ audio: bs,
669
+ image: ps,
670
+ document: qt
671
+ }, aa = {
672
+ pdf: Cs,
673
+ doc: ks,
674
+ xls: ys,
675
+ csv: _s,
676
+ ppt: Ns,
677
+ zip: ws,
678
+ text: xs,
679
+ markdown: vs,
680
+ generic: qt
662
681
  };
663
- function na(e) {
682
+ function ra(e) {
664
683
  const t = ie(e);
665
- return t !== "document" ? ea[t] : ta[tn(e)];
684
+ return t !== "document" ? sa[t] : aa[nn(e)];
666
685
  }
667
686
  function ce(e, t) {
668
- return V.createElement(na(e), t);
687
+ return F.createElement(ra(e), t);
669
688
  }
670
- const sa = (e) => {
689
+ const ia = (e) => {
671
690
  var t, s;
672
691
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
673
- }, aa = ({
692
+ }, la = ({
674
693
  source: e,
675
694
  mimeType: t,
676
695
  poster: s,
@@ -682,66 +701,66 @@ const sa = (e) => {
682
701
  muted: d = !1,
683
702
  onContainerClick: u
684
703
  }) => {
685
- const g = ie(t), m = Y(null), f = Y(null), c = Y(null), b = Y(r), [N, w] = $(a), [p, v] = $(0), [A, T] = $(!1), [E, O] = $(!1), [R, L] = $(!1), [B, P] = $(!1), [_, M] = $(!0), [y, I] = $(null), C = J(() => {
686
- L(!1), w(!0);
687
- }, []), z = J((x) => {
704
+ const g = ie(t), m = H(null), f = H(null), c = H(null), b = H(r), [w, v] = $(a), [p, N] = $(0), [_, T] = $(!1), [R, M] = $(!1), [L, D] = $(!1), [B, P] = $(!1), [C, A] = $(!0), [E, y] = $(null), I = W(() => {
705
+ D(!1), v(!0);
706
+ }, []), O = W((x) => {
688
707
  const S = f.current;
689
708
  if (!S) return 0;
690
- const U = S.getBoundingClientRect();
709
+ const G = S.getBoundingClientRect();
691
710
  return Math.max(
692
711
  0,
693
- Math.min(1, (sa(x) - U.left) / U.width)
712
+ Math.min(1, (ia(x) - G.left) / G.width)
694
713
  );
695
- }, []), D = J((x) => {
714
+ }, []), z = W((x) => {
696
715
  const S = m.current;
697
716
  S && S.duration && (S.currentTime = x * S.duration);
698
- }, []), j = (x) => {
717
+ }, []), U = (x) => {
699
718
  x.stopPropagation(), T(!0);
700
- const S = z(x);
701
- v(S), D(S);
719
+ const S = O(x);
720
+ N(S), z(S);
702
721
  };
703
- K(() => {
704
- r !== void 0 && r !== b.current && (b.current = r, w(r));
705
- }, [r]), K(() => {
706
- if (!N) {
722
+ q(() => {
723
+ r !== void 0 && r !== b.current && (b.current = r, v(r));
724
+ }, [r]), q(() => {
725
+ if (!w) {
707
726
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
727
  return;
709
728
  }
710
729
  const x = () => {
711
730
  const S = m.current;
712
- S && S.duration && !A && v(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
731
+ S && S.duration && !_ && N(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
713
732
  };
714
733
  return c.current = requestAnimationFrame(x), () => {
715
734
  c.current !== null && cancelAnimationFrame(c.current);
716
735
  };
717
- }, [N, A]), K(() => {
736
+ }, [w, _]), q(() => {
718
737
  const x = m.current;
719
- x && (N ? x.play().catch((S) => {
720
- w(!1), L(!0);
738
+ x && (w ? x.play().catch((S) => {
739
+ v(!1), D(!0);
721
740
  }) : x.pause());
722
- }, [N]), K(() => {
723
- if (!A) return;
724
- const x = (U) => v(z(U)), S = (U) => {
725
- T(!1), D(z(U));
741
+ }, [w]), q(() => {
742
+ if (!_) return;
743
+ const x = (G) => N(O(G)), S = (G) => {
744
+ T(!1), z(O(G));
726
745
  };
727
746
  return window.addEventListener("mousemove", x), window.addEventListener("mouseup", S), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", S), () => {
728
747
  window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", S);
729
748
  };
730
- }, [A, z, D]);
731
- const Z = y ? { aspectRatio: String(y) } : void 0, Q = y ? "" : " aspect-video", G = Math.round(p * 100);
749
+ }, [_, O, z]);
750
+ const X = E ? { aspectRatio: String(E) } : void 0, Z = E ? "" : " aspect-video", Y = Math.round(p * 100);
732
751
  return /* @__PURE__ */ h(
733
752
  "div",
734
753
  {
735
754
  role: "button",
736
755
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
738
- style: Z,
756
+ className: `relative cursor-pointer overflow-hidden bg-black ${Z}`,
757
+ style: X,
739
758
  onClick: (x) => {
740
759
  if (u) {
741
760
  u(x);
742
761
  return;
743
762
  }
744
- R || l && w((S) => !S);
763
+ L || l && v((S) => !S);
745
764
  },
746
765
  onKeyDown: (x) => {
747
766
  if (!(x.key !== "Enter" && x.key !== " ")) {
@@ -749,11 +768,11 @@ const sa = (e) => {
749
768
  u(x);
750
769
  return;
751
770
  }
752
- R || l && w((S) => !S);
771
+ L || l && v((S) => !S);
753
772
  }
754
773
  },
755
774
  children: [
756
- s && (g === "audio" || _) && /* @__PURE__ */ n(
775
+ s && (g === "audio" || C) && /* @__PURE__ */ n(
757
776
  "img",
758
777
  {
759
778
  src: s,
@@ -761,7 +780,7 @@ const sa = (e) => {
761
780
  className: "absolute inset-0 h-full w-full object-cover"
762
781
  }
763
782
  ),
764
- !s && (g === "audio" || _) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
783
+ !s && (g === "audio" || C) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
765
784
  className: "size-12 text-black/20",
766
785
  weight: "regular"
767
786
  }) }),
@@ -775,12 +794,12 @@ const sa = (e) => {
775
794
  style: { width: "100%", height: "100%" },
776
795
  onLoadStart: () => P(!0),
777
796
  onCanPlay: () => {
778
- P(!1), M(!1);
797
+ P(!1), A(!1);
779
798
  },
780
799
  onWaiting: () => P(!0),
781
- onPlay: () => L(!1),
800
+ onPlay: () => D(!1),
782
801
  onEnded: () => {
783
- i || (w(!1), v(0));
802
+ i || (v(!1), N(0));
784
803
  },
785
804
  children: /* @__PURE__ */ n("track", { kind: "captions" })
786
805
  }
@@ -795,28 +814,28 @@ const sa = (e) => {
795
814
  style: { width: "100%", height: "100%" },
796
815
  onLoadStart: () => P(!0),
797
816
  onCanPlay: () => {
798
- P(!1), M(!1);
817
+ P(!1), A(!1);
799
818
  },
800
819
  onWaiting: () => P(!0),
801
- onPlay: () => L(!1),
820
+ onPlay: () => D(!1),
802
821
  onLoadedMetadata: () => {
803
822
  const x = m.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && I(x.videoWidth / x.videoHeight);
823
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && y(x.videoWidth / x.videoHeight);
805
824
  },
806
825
  onEnded: () => {
807
- i || (w(!1), v(0));
826
+ i || (v(!1), N(0));
808
827
  },
809
828
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
829
  }
811
830
  ) }),
812
- B && !R && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
- we,
831
+ B && !L && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
832
+ Ne,
814
833
  {
815
834
  className: "size-8 animate-spin text-white/80",
816
835
  weight: "bold"
817
836
  }
818
837
  ) }),
819
- R && !l && /* @__PURE__ */ n(
838
+ L && !l && /* @__PURE__ */ n(
820
839
  "div",
821
840
  {
822
841
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -824,12 +843,12 @@ const sa = (e) => {
824
843
  tabIndex: 0,
825
844
  "aria-label": "Play preview",
826
845
  onClick: (x) => {
827
- x.stopPropagation(), C();
846
+ x.stopPropagation(), I();
828
847
  },
829
848
  onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), C());
849
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), I());
831
850
  },
832
- children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(He, { className: "size-9 translate-x-0.5", weight: "fill" }) })
851
+ children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Ye, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
852
  }
834
853
  ),
835
854
  o && !l && /* @__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(
@@ -837,23 +856,23 @@ const sa = (e) => {
837
856
  {
838
857
  role: "slider",
839
858
  "aria-label": "Playback position",
840
- "aria-valuenow": G,
859
+ "aria-valuenow": Y,
841
860
  "aria-valuemin": 0,
842
861
  "aria-valuemax": 100,
843
862
  tabIndex: 0,
844
863
  ref: f,
845
864
  className: "relative flex h-4 w-full cursor-pointer items-center",
846
- onMouseDown: j,
847
- onTouchStart: j,
865
+ onMouseDown: U,
866
+ onTouchStart: U,
848
867
  onClick: (x) => x.stopPropagation(),
849
868
  onKeyDown: (x) => {
850
- x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
869
+ x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, p - 0.05));
851
870
  },
852
871
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
853
872
  "div",
854
873
  {
855
874
  className: "h-full rounded-full bg-white",
856
- style: { width: `${G}%` }
875
+ style: { width: `${Y}%` }
857
876
  }
858
877
  ) })
859
878
  }
@@ -864,11 +883,11 @@ const sa = (e) => {
864
883
  {
865
884
  type: "button",
866
885
  onClick: (x) => {
867
- x.stopPropagation(), w((S) => !S);
886
+ x.stopPropagation(), v((S) => !S);
868
887
  },
869
888
  className: "shrink-0 text-white",
870
- "aria-label": N ? "Pause" : "Play",
871
- children: N ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
889
+ "aria-label": w ? "Pause" : "Play",
890
+ children: w ? /* @__PURE__ */ n(Es, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ye, { className: "size-5 translate-x-px", weight: "fill" })
872
891
  }
873
892
  ),
874
893
  /* @__PURE__ */ h(
@@ -876,30 +895,30 @@ const sa = (e) => {
876
895
  {
877
896
  role: "slider",
878
897
  "aria-label": "Playback position",
879
- "aria-valuenow": G,
898
+ "aria-valuenow": Y,
880
899
  "aria-valuemin": 0,
881
900
  "aria-valuemax": 100,
882
901
  tabIndex: 0,
883
902
  ref: f,
884
903
  className: "relative flex h-4 w-full cursor-pointer items-center",
885
- onMouseDown: j,
886
- onTouchStart: j,
904
+ onMouseDown: U,
905
+ onTouchStart: U,
887
906
  onClick: (x) => x.stopPropagation(),
888
- onMouseEnter: () => O(!0),
889
- onMouseLeave: () => O(!1),
907
+ onMouseEnter: () => M(!0),
908
+ onMouseLeave: () => M(!1),
890
909
  onKeyDown: (x) => {
891
- x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
910
+ x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, p - 0.05));
892
911
  },
893
912
  children: [
894
913
  /* @__PURE__ */ n(
895
914
  "div",
896
915
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${E || A ? "h-1.5" : "h-1"}`,
916
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || _ ? "h-1.5" : "h-1"}`,
898
917
  children: /* @__PURE__ */ n(
899
918
  "div",
900
919
  {
901
920
  className: "h-full rounded-full bg-white",
902
- style: { width: `${G}%` }
921
+ style: { width: `${Y}%` }
903
922
  }
904
923
  )
905
924
  }
@@ -907,8 +926,8 @@ const sa = (e) => {
907
926
  /* @__PURE__ */ n(
908
927
  "div",
909
928
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${E || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${G}%` }
929
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
930
+ style: { left: `${Y}%` }
912
931
  }
913
932
  )
914
933
  ]
@@ -918,7 +937,7 @@ const sa = (e) => {
918
937
  ]
919
938
  }
920
939
  );
921
- }, Ut = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", nn = ({
940
+ }, jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", oa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", sn = ({
922
941
  mimeType: e,
923
942
  sourceUrl: t,
924
943
  thumbnailUrl: s,
@@ -929,7 +948,7 @@ const sa = (e) => {
929
948
  }) => {
930
949
  const o = ie(e), [d, u] = $(!1);
931
950
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
932
- aa,
951
+ la,
933
952
  {
934
953
  source: t,
935
954
  mimeType: e,
@@ -976,11 +995,11 @@ const sa = (e) => {
976
995
  {
977
996
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
978
997
  children: ce(e, {
979
- className: Ut(r),
998
+ className: jt(r),
980
999
  weight: "regular"
981
1000
  })
982
1001
  }
983
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
1002
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${oa(r)}`, children: /* @__PURE__ */ n(
984
1003
  "img",
985
1004
  {
986
1005
  src: s,
@@ -993,12 +1012,12 @@ const sa = (e) => {
993
1012
  {
994
1013
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
995
1014
  children: ce(e, {
996
- className: Ut(r),
1015
+ className: jt(r),
997
1016
  weight: "regular"
998
1017
  })
999
1018
  }
1000
1019
  );
1001
- }, sn = ({
1020
+ }, an = ({
1002
1021
  variant: e,
1003
1022
  thumbnail: t,
1004
1023
  title: s,
@@ -1064,29 +1083,29 @@ const sa = (e) => {
1064
1083
  }
1065
1084
  );
1066
1085
  };
1067
- function an(e) {
1086
+ function rn(e) {
1068
1087
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1069
1088
  }
1070
- function Qe(e) {
1089
+ function et(e) {
1071
1090
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1072
1091
  }
1073
- function ia(e) {
1092
+ function ca(e) {
1074
1093
  return e ? "bg-white/10" : "bg-black/5";
1075
1094
  }
1076
- function la(e) {
1095
+ function da(e) {
1077
1096
  return e ? "text-white" : "text-black";
1078
1097
  }
1079
- function oa(e) {
1098
+ function ua(e) {
1080
1099
  return e ? "text-white/55" : "text-black/55";
1081
1100
  }
1082
- function ca(e) {
1101
+ function ma(e) {
1083
1102
  return e ? "text-white/40" : "text-black/40";
1084
1103
  }
1085
- function da(e) {
1104
+ function ha(e) {
1086
1105
  return e ? "text-white/20" : "text-black/20";
1087
1106
  }
1088
- const et = ({ attachment: e, isMyMessage: t }) => {
1089
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ h(V.Fragment, { children: [
1107
+ const tt = ({ attachment: e, isMyMessage: t }) => {
1108
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ h(F.Fragment, { children: [
1090
1109
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1110
  "img",
1092
1111
  {
@@ -1097,26 +1116,26 @@ const et = ({ attachment: e, isMyMessage: t }) => {
1097
1116
  ) : /* @__PURE__ */ n(
1098
1117
  "div",
1099
1118
  {
1100
- className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
1101
- children: /* @__PURE__ */ n(Es, { className: `size-12 ${da(t)}` })
1119
+ className: `aspect-video w-full rounded-[20px] ${ca(t)} flex items-center justify-center`,
1120
+ children: /* @__PURE__ */ n(Is, { className: `size-12 ${ha(t)}` })
1102
1121
  }
1103
1122
  ) }),
1104
1123
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1105
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${la(t)}`, children: s }),
1106
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${oa(t)}`, children: a }),
1107
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1124
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${da(t)}`, children: s }),
1125
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ua(t)}`, children: a }),
1126
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ma(t)}`, children: d })
1108
1127
  ] })
1109
1128
  ] });
1110
1129
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
1111
1130
  };
1112
- function rn(e) {
1131
+ function ln(e) {
1113
1132
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1114
1133
  }
1115
- function tt(e) {
1134
+ function nt(e) {
1116
1135
  var t;
1117
- return (t = e.attachments) == null ? void 0 : t.find(rn);
1136
+ return (t = e.attachments) == null ? void 0 : t.find(ln);
1118
1137
  }
1119
- async function ua(e, t) {
1138
+ async function fa(e, t) {
1120
1139
  let s;
1121
1140
  try {
1122
1141
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1128,7 +1147,7 @@ async function ua(e, t) {
1128
1147
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1129
1148
  l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1130
1149
  }
1131
- const ma = ({
1150
+ const ga = ({
1132
1151
  url: e,
1133
1152
  filename: t
1134
1153
  }) => {
@@ -1140,7 +1159,7 @@ const ma = ({
1140
1159
  onClick: (i) => {
1141
1160
  i.stopPropagation();
1142
1161
  const l = window.open("", "_blank", "noopener,noreferrer");
1143
- a(!0), ua(e, t).then(() => {
1162
+ a(!0), fa(e, t).then(() => {
1144
1163
  l == null || l.close();
1145
1164
  }).catch(() => {
1146
1165
  l && (l.location.href = e);
@@ -1148,23 +1167,23 @@ const ma = ({
1148
1167
  },
1149
1168
  disabled: s,
1150
1169
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1151
- children: s ? /* @__PURE__ */ n(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(V.Fragment, { children: [
1152
- /* @__PURE__ */ n(Ne, { className: "size-4 text-white", weight: "bold" }),
1170
+ children: s ? /* @__PURE__ */ n(Ne, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(F.Fragment, { children: [
1171
+ /* @__PURE__ */ n(_e, { className: "size-4 text-white", weight: "bold" }),
1153
1172
  "Download"
1154
1173
  ] })
1155
1174
  }
1156
1175
  );
1157
1176
  };
1158
- function nt(e) {
1177
+ function st(e) {
1159
1178
  var m, f, c, b;
1160
1179
  const t = (m = e.attachments) == null ? void 0 : m.find(
1161
- (N) => N.type === "video" && N.asset_url
1180
+ (w) => w.type === "video" && w.asset_url
1162
1181
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
- (N) => N.type === "image" && N.image_url
1182
+ (w) => w.type === "image" && w.image_url
1164
1183
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
- (N) => N.type === "audio" && N.asset_url
1184
+ (w) => w.type === "audio" && w.asset_url
1166
1185
  ), r = (b = e.attachments) == null ? void 0 : b.find(
1167
- (N) => N.type === "file" && N.asset_url
1186
+ (w) => w.type === "file" && w.asset_url
1168
1187
  ), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
1188
  if (!l) return null;
1170
1189
  const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
@@ -1176,16 +1195,16 @@ function nt(e) {
1176
1195
  thumbnailUrl: g
1177
1196
  };
1178
1197
  }
1179
- const ln = ({
1198
+ const on = ({
1180
1199
  resolvedUrl: e,
1181
1200
  resolvedType: t,
1182
1201
  title: s,
1183
1202
  fileSize: a,
1184
1203
  thumbnailUrl: r
1185
1204
  }) => {
1186
- const i = a !== void 0 ? an(a) : void 0;
1205
+ const i = a !== void 0 ? rn(a) : void 0;
1187
1206
  return /* @__PURE__ */ n(
1188
- sn,
1207
+ an,
1189
1208
  {
1190
1209
  variant: "dark",
1191
1210
  title: s,
@@ -1193,7 +1212,7 @@ const ln = ({
1193
1212
  mimeType: t,
1194
1213
  detail: i,
1195
1214
  thumbnail: /* @__PURE__ */ n(
1196
- nn,
1215
+ sn,
1197
1216
  {
1198
1217
  mimeType: t,
1199
1218
  sourceUrl: e,
@@ -1204,23 +1223,23 @@ const ln = ({
1204
1223
  )
1205
1224
  }
1206
1225
  );
1207
- }, on = ({
1226
+ }, cn = ({
1208
1227
  resolvedUrl: e,
1209
1228
  resolvedType: t,
1210
1229
  title: s,
1211
1230
  fileSize: a,
1212
1231
  thumbnailUrl: r
1213
1232
  }) => {
1214
- const i = ie(t), l = a !== void 0 ? an(a) : void 0;
1233
+ const i = ie(t), l = a !== void 0 ? rn(a) : void 0;
1215
1234
  return /* @__PURE__ */ n(
1216
- sn,
1235
+ an,
1217
1236
  {
1218
1237
  variant: "light",
1219
1238
  title: s,
1220
1239
  mimeType: t,
1221
1240
  detail: l,
1222
1241
  thumbnail: /* @__PURE__ */ n(
1223
- nn,
1242
+ sn,
1224
1243
  {
1225
1244
  mimeType: t,
1226
1245
  sourceUrl: e,
@@ -1230,14 +1249,14 @@ const ln = ({
1230
1249
  containedImage: i === "image" || i === "document"
1231
1250
  }
1232
1251
  ),
1233
- action: /* @__PURE__ */ n(ma, { url: e, filename: s })
1252
+ action: /* @__PURE__ */ n(ga, { url: e, filename: s })
1234
1253
  }
1235
1254
  );
1236
- }, ha = ({
1255
+ }, pa = ({
1237
1256
  message: e,
1238
1257
  isMyMessage: t = !1
1239
1258
  }) => {
1240
- const s = tt(e), a = nt(e);
1259
+ const s = nt(e), a = st(e);
1241
1260
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1242
1261
  !t && e.user && /* @__PURE__ */ n(
1243
1262
  ne,
@@ -1258,40 +1277,40 @@ const ln = ({
1258
1277
  {
1259
1278
  className: "str-chat__message-bubble",
1260
1279
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1261
- children: s ? /* @__PURE__ */ n("div", { className: Qe(t), children: /* @__PURE__ */ n(et, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(ln, { ...a }) : /* @__PURE__ */ n(on, { ...a })
1280
+ children: s ? /* @__PURE__ */ n("div", { className: et(t), children: /* @__PURE__ */ n(tt, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(on, { ...a }) : /* @__PURE__ */ n(cn, { ...a })
1262
1281
  }
1263
1282
  ) })
1264
1283
  }
1265
1284
  )
1266
1285
  ] });
1267
- }, fa = ({
1286
+ }, ba = ({
1268
1287
  message: e
1269
1288
  }) => {
1270
- const t = tt(e);
1289
+ const t = nt(e);
1271
1290
  if (t)
1272
- return /* @__PURE__ */ n("div", { className: Qe(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !0 }) });
1273
- const s = nt(e);
1274
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ln, { ...s }) }) : null;
1275
- }, ga = ({
1291
+ return /* @__PURE__ */ n("div", { className: et(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(tt, { attachment: t, isMyMessage: !0 }) });
1292
+ const s = st(e);
1293
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(on, { ...s }) }) : null;
1294
+ }, va = ({
1276
1295
  message: e
1277
1296
  }) => {
1278
- const t = tt(e);
1297
+ const t = nt(e);
1279
1298
  if (t)
1280
- return /* @__PURE__ */ n("div", { className: Qe(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !1 }) });
1281
- const s = nt(e);
1282
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(on, { ...s }) }) : null;
1283
- }, yi = Object.assign(ha, {
1284
- Creator: fa,
1285
- Visitor: ga
1286
- }), pa = {
1299
+ return /* @__PURE__ */ n("div", { className: et(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(tt, { attachment: t, isMyMessage: !1 }) });
1300
+ const s = st(e);
1301
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(cn, { ...s }) }) : null;
1302
+ }, Ei = Object.assign(pa, {
1303
+ Creator: ba,
1304
+ Visitor: va
1305
+ }), xa = {
1287
1306
  isUnlocking: () => !1
1288
- }, ba = {
1289
- LockedAttachment: pa
1290
- }, cn = We({}), ki = cn.Provider;
1291
- function va(e) {
1292
- return _e(cn)[e] ?? ba[e];
1307
+ }, wa = {
1308
+ LockedAttachment: xa
1309
+ }, dn = Xe({}), Ii = dn.Provider;
1310
+ function Na(e) {
1311
+ return ye(dn)[e] ?? wa[e];
1293
1312
  }
1294
- const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1313
+ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1314
  "svg",
1296
1315
  {
1297
1316
  width: e,
@@ -1308,29 +1327,29 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1308
1327
  }
1309
1328
  )
1310
1329
  }
1311
- ), wa = (e) => {
1330
+ ), ya = (e) => {
1312
1331
  var t;
1313
1332
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1314
- }, Na = (e) => {
1333
+ }, ka = (e) => {
1315
1334
  var t;
1316
1335
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1317
- }, Me = (e) => {
1336
+ }, Re = (e) => {
1318
1337
  var t;
1319
1338
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1320
- }, _a = (e) => {
1339
+ }, Ca = (e) => {
1321
1340
  var t;
1322
1341
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1323
- }, dn = (e) => wa(e) || Na(e), ya = (e) => {
1342
+ }, un = (e) => ya(e) || ka(e), Ea = (e) => {
1324
1343
  var t;
1325
- return dn(e) && !((t = e.text) != null && t.trim());
1326
- }, Be = ({
1344
+ return un(e) && !((t = e.text) != null && t.trim());
1345
+ }, Ue = ({
1327
1346
  message: e,
1328
1347
  standalone: t = !1,
1329
1348
  isMyMessage: s = !1,
1330
1349
  hasAttachment: a = !1
1331
1350
  }) => {
1332
1351
  var m;
1333
- const r = dn(e), i = Me(e);
1352
+ const r = un(e), i = Re(e);
1334
1353
  if (!r && !i)
1335
1354
  return null;
1336
1355
  if (r) {
@@ -1338,7 +1357,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1338
1357
  if (!f) return null;
1339
1358
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1340
1359
  return /* @__PURE__ */ h("div", { className: c, children: [
1341
- /* @__PURE__ */ n(Is, { size: t ? 14 : 12 }),
1360
+ /* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
1342
1361
  /* @__PURE__ */ n("span", { children: b })
1343
1362
  ] });
1344
1363
  }
@@ -1346,7 +1365,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1346
1365
  "message-chatbot-indicator",
1347
1366
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
1367
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
- ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: l ? 12 : 15 }) });
1368
+ ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(_a, { size: l ? 12 : 15 }) });
1350
1369
  return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(se, { children: [
1351
1370
  u,
1352
1371
  g
@@ -1354,7 +1373,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1354
1373
  g,
1355
1374
  u
1356
1375
  ] }) });
1357
- }, ka = ({
1376
+ }, Ia = ({
1358
1377
  selected: e,
1359
1378
  onVoteUp: t,
1360
1379
  onVoteDown: s
@@ -1370,7 +1389,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1370
1389
  "aria-label": "Good response",
1371
1390
  "aria-pressed": e === "up",
1372
1391
  "data-tooltip": "Good response",
1373
- children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "up" ? "fill" : "regular" })
1392
+ children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "up" ? "fill" : "regular" })
1374
1393
  }
1375
1394
  ),
1376
1395
  /* @__PURE__ */ n(
@@ -1384,11 +1403,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1384
1403
  "aria-label": "Bad response",
1385
1404
  "aria-pressed": e === "down",
1386
1405
  "data-tooltip": "Bad response",
1387
- children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
1406
+ children: /* @__PURE__ */ n(As, { size: 16, weight: e === "down" ? "fill" : "regular" })
1388
1407
  }
1389
1408
  )
1390
- ] }), Ca = (e) => {
1391
- var bt, vt, xt, wt, Nt, _t, yt, kt, Ct, Et, It, St, Tt, At;
1409
+ ] }), Sa = (e) => {
1410
+ var vt, xt, wt, Nt, _t, yt, kt, Ct, Et, It, St, Tt, At, Mt;
1392
1411
  const {
1393
1412
  additionalMessageInputProps: t,
1394
1413
  chatbotVotingEnabled: s,
@@ -1404,41 +1423,41 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1404
1423
  isMyMessage: f,
1405
1424
  message: c,
1406
1425
  renderText: b,
1407
- threadList: N,
1408
- viewerLanguage: w
1409
- } = e, { client: p } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: E, onDownloadClick: O } = va("LockedAttachment"), [R, L] = $(!1), B = Ln(c.id), { selected: P, voteUp: _, voteDown: M } = Hs(c), {
1410
- Attachment: y = Dn,
1411
- EditMessageModal: I = Pn,
1412
- MessageActions: C,
1413
- MessageBlocked: z = zn,
1414
- MessageBouncePrompt: D = On,
1415
- MessageDeleted: j = $n,
1416
- MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
1417
- MessageRepliesCountButton: Q = Bn,
1418
- ReminderNotification: G = Un,
1419
- StreamedMessageText: x = jn,
1426
+ threadList: w,
1427
+ viewerLanguage: v
1428
+ } = e, { client: p } = ue("CustomMessage"), { channel: N } = de("CustomMessage"), { isUnlocking: _, onUnlockClick: T, onFetchSource: R, onDownloadClick: M } = Na("LockedAttachment"), [L, D] = $(!1), B = Dn(c.id), { selected: P, voteUp: C, voteDown: A } = Ws(c), {
1429
+ Attachment: E = Pn,
1430
+ EditMessageModal: y = zn,
1431
+ MessageActions: I,
1432
+ MessageBlocked: O = On,
1433
+ MessageBouncePrompt: z = $n,
1434
+ MessageDeleted: U = Fn,
1435
+ MessageIsThreadReplyInChannelButtonIndicator: X = Bn,
1436
+ MessageRepliesCountButton: Z = Un,
1437
+ ReminderNotification: Y = jn,
1438
+ StreamedMessageText: x = Vn,
1420
1439
  PinIndicator: S
1421
- } = Gt("CustomMessage"), U = Vn(c), H = Gn(c), q = re(
1440
+ } = Ht("CustomMessage"), G = Gn(c), V = Hn(c), Q = re(
1422
1441
  () => m == null ? void 0 : m(c),
1423
1442
  [m, c]
1424
- ), F = re(() => {
1425
- const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
1426
- if (!Me(c)) return Se;
1427
- const Mt = Se.filter((Rt) => !("type" in Rt) || !rn(Rt));
1428
- return Mt.length === Se.length ? Se : Mt;
1429
- }, [c]), W = re(() => {
1430
- const ge = Zt({ message: c, viewerLanguage: w });
1431
- return ge === c.text ? c : { ...c, text: ge };
1432
- }, [c, w]);
1433
- if (Hn(c))
1443
+ ), j = re(() => {
1444
+ const pe = c.attachments ?? [], Te = c.shared_location ? [c.shared_location, ...pe] : pe;
1445
+ if (!Re(c)) return Te;
1446
+ const Rt = Te.filter((Lt) => !("type" in Lt) || !ln(Lt));
1447
+ return Rt.length === Te.length ? Te : Rt;
1448
+ }, [c]), K = re(() => {
1449
+ const pe = Qt({ message: c, viewerLanguage: v });
1450
+ return pe === c.text ? c : { ...c, text: pe };
1451
+ }, [c, v]);
1452
+ if (Yn(c))
1434
1453
  return null;
1435
1454
  if (c.deleted_at || c.type === "deleted")
1436
- return /* @__PURE__ */ n(j, { message: c });
1437
- if (Yn(c))
1438
- return /* @__PURE__ */ n(z, {});
1439
- const X = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
1440
- let ee;
1441
- me ? ee = () => u(c) : he && (ee = () => L(!0));
1455
+ return /* @__PURE__ */ n(U, { message: c });
1456
+ if (qn(c))
1457
+ return /* @__PURE__ */ n(O, {});
1458
+ const ee = !w && !!c.reply_count, me = !w && c.show_in_channel && c.parent_id, he = c.status === "failed" && ((vt = c.error) == null ? void 0 : vt.status) !== 403, fe = Wn(c);
1459
+ let J;
1460
+ he ? J = () => u(c) : fe && (J = () => D(!0));
1442
1461
  const te = f(), le = k(
1443
1462
  "str-chat__message str-chat__message-simple",
1444
1463
  `str-chat__message--${c.type}`,
@@ -1446,30 +1465,30 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1446
1465
  te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1447
1466
  c.text ? "str-chat__message--has-text" : "has-no-text",
1448
1467
  {
1449
- "str-chat__message--has-attachment": U,
1468
+ "str-chat__message--has-attachment": G,
1450
1469
  "str-chat__message--highlighted": g,
1451
1470
  "str-chat__message--pinned pinned-message": c.pinned,
1452
- "str-chat__message--with-reactions": H,
1453
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((vt = c == null ? void 0 : c.error) == null ? void 0 : vt.status) !== 403,
1454
- "str-chat__message-with-thread-link": X || ue,
1471
+ "str-chat__message--with-reactions": V,
1472
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((xt = c == null ? void 0 : c.error) == null ? void 0 : xt.status) !== 403,
1473
+ "str-chat__message-with-thread-link": ee || me,
1455
1474
  "str-chat__virtual-message__wrapper--end": r,
1456
1475
  "str-chat__virtual-message__wrapper--first": i,
1457
1476
  "str-chat__virtual-message__wrapper--group": l
1458
1477
  }
1459
- ), ht = c.poll_id && p.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(F != null && F.length && !c.quoted_message), pt = fe && te && Oe;
1478
+ ), ft = c.poll_id && p.polls.fromState(c.poll_id), gt = Ea(c), ge = Re(c), pt = Ca(c), $e = !!(j != null && j.length && !c.quoted_message), bt = ge && te && $e;
1460
1479
  return /* @__PURE__ */ h(se, { children: [
1461
1480
  a && /* @__PURE__ */ n(
1462
- I,
1481
+ y,
1463
1482
  {
1464
1483
  additionalMessageInputProps: t
1465
1484
  }
1466
1485
  ),
1467
- R && /* @__PURE__ */ n(
1468
- Wn,
1486
+ L && /* @__PURE__ */ n(
1487
+ Xn,
1469
1488
  {
1470
- MessageBouncePrompt: D,
1471
- onClose: () => L(!1),
1472
- open: R
1489
+ MessageBouncePrompt: z,
1490
+ onClose: () => D(!1),
1491
+ open: L
1473
1492
  }
1474
1493
  ),
1475
1494
  /* @__PURE__ */ h(
@@ -1480,7 +1499,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1480
1499
  "data-dd-privacy": "mask",
1481
1500
  children: [
1482
1501
  S && /* @__PURE__ */ n(S, {}),
1483
- !!B && /* @__PURE__ */ n(G, { reminder: B }),
1502
+ !!B && /* @__PURE__ */ n(Y, { reminder: B }),
1484
1503
  c.user && /* @__PURE__ */ n(
1485
1504
  ne,
1486
1505
  {
@@ -1490,179 +1509,179 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1490
1509
  name: c.user.name || c.user.id,
1491
1510
  size: 24,
1492
1511
  shape: "circle",
1493
- dmAgentEnabled: fe
1512
+ dmAgentEnabled: ge
1494
1513
  }
1495
1514
  ),
1496
1515
  /* @__PURE__ */ n(
1497
1516
  "div",
1498
1517
  {
1499
1518
  className: k("str-chat__message-inner", {
1500
- "str-chat__simple-message--error-failed": me || he
1519
+ "str-chat__simple-message--error-failed": he || fe
1501
1520
  }),
1502
1521
  "data-testid": "message-inner",
1503
- onClick: ee,
1504
- onKeyDown: ee,
1505
- role: ee ? "button" : void 0,
1506
- tabIndex: ee ? 0 : void 0,
1522
+ onClick: J,
1523
+ onKeyDown: J,
1524
+ role: J ? "button" : void 0,
1525
+ tabIndex: J ? 0 : void 0,
1507
1526
  style: {
1508
1527
  // Force margins to 0 to prevent hover layout shift
1509
1528
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
1510
1529
  marginInlineEnd: 0,
1511
1530
  marginInlineStart: 0
1512
1531
  },
1513
- children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1532
+ children: pt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1514
1533
  te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1515
- C && /* @__PURE__ */ n(C, {}),
1534
+ I && /* @__PURE__ */ n(I, {}),
1516
1535
  /* @__PURE__ */ n(
1517
- Bt.Sent,
1536
+ Ut.Sent,
1518
1537
  {
1519
- title: (xt = c.metadata) == null ? void 0 : xt.attachment_title,
1520
- mimeType: (wt = c.metadata) == null ? void 0 : wt.attachment_mime_type,
1521
- thumbnailUrl: (Nt = c.metadata) == null ? void 0 : Nt.attachment_thumbnail,
1522
- amountText: (_t = c.metadata) == null ? void 0 : _t.amount_text,
1523
- detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1524
- paymentStatus: (kt = c.metadata) == null ? void 0 : kt.payment_status,
1525
- onPreviewClick: () => T == null ? void 0 : T(c, v),
1526
- onFetchSource: async () => await (E == null ? void 0 : E(c, v))
1538
+ title: (wt = c.metadata) == null ? void 0 : wt.attachment_title,
1539
+ mimeType: (Nt = c.metadata) == null ? void 0 : Nt.attachment_mime_type,
1540
+ thumbnailUrl: (_t = c.metadata) == null ? void 0 : _t.attachment_thumbnail,
1541
+ amountText: (yt = c.metadata) == null ? void 0 : yt.amount_text,
1542
+ detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
1543
+ paymentStatus: (Ct = c.metadata) == null ? void 0 : Ct.payment_status,
1544
+ onPreviewClick: () => T == null ? void 0 : T(c, N),
1545
+ onFetchSource: async () => await (R == null ? void 0 : R(c, N))
1527
1546
  }
1528
1547
  )
1529
1548
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1530
1549
  /* @__PURE__ */ n(
1531
- Bt.Received,
1550
+ Ut.Received,
1532
1551
  {
1533
- title: (Ct = c.metadata) == null ? void 0 : Ct.attachment_title,
1534
- mimeType: (Et = c.metadata) == null ? void 0 : Et.attachment_mime_type,
1535
- thumbnailUrl: (It = c.metadata) == null ? void 0 : It.attachment_thumbnail,
1536
- amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
1537
- detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1538
- paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1539
- isUnlocking: A(c.id),
1540
- onUnlockClick: () => T == null ? void 0 : T(c, v),
1541
- onFetchSource: async () => await (E == null ? void 0 : E(c, v)),
1542
- onDownloadClick: () => O == null ? void 0 : O(c, v)
1552
+ title: (Et = c.metadata) == null ? void 0 : Et.attachment_title,
1553
+ mimeType: (It = c.metadata) == null ? void 0 : It.attachment_mime_type,
1554
+ thumbnailUrl: (St = c.metadata) == null ? void 0 : St.attachment_thumbnail,
1555
+ amountText: (Tt = c.metadata) == null ? void 0 : Tt.amount_text,
1556
+ detail: (At = c.metadata) == null ? void 0 : At.attachment_detail,
1557
+ paymentStatus: (Mt = c.metadata) == null ? void 0 : Mt.payment_status,
1558
+ isUnlocking: _(c.id),
1559
+ onUnlockClick: () => T == null ? void 0 : T(c, N),
1560
+ onFetchSource: async () => await (R == null ? void 0 : R(c, N)),
1561
+ onDownloadClick: () => M == null ? void 0 : M(c, N)
1543
1562
  }
1544
1563
  ),
1545
- C && /* @__PURE__ */ n(C, {})
1564
+ I && /* @__PURE__ */ n(I, {})
1546
1565
  ] }),
1547
1566
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1548
- Dt,
1567
+ Pt,
1549
1568
  {
1550
- message: W,
1569
+ message: K,
1551
1570
  renderText: b
1552
1571
  }
1553
1572
  ) })
1554
- ] }) : ft ? (
1573
+ ] }) : gt ? (
1555
1574
  /* Tip-only messages render as a standalone bubble */
1556
- /* @__PURE__ */ n(Be, { message: c, standalone: !0 })
1575
+ /* @__PURE__ */ n(Ue, { message: c, standalone: !0 })
1557
1576
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1558
- fe && !pt && /* @__PURE__ */ n(
1559
- Be,
1577
+ ge && !bt && /* @__PURE__ */ n(
1578
+ Ue,
1560
1579
  {
1561
1580
  message: c,
1562
- hasAttachment: Oe,
1581
+ hasAttachment: $e,
1563
1582
  isMyMessage: te
1564
1583
  }
1565
1584
  ),
1566
- ht && /* @__PURE__ */ n(Xn, { poll: ht }),
1567
- F != null && F.length && !c.quoted_message ? /* @__PURE__ */ n(
1568
- y,
1585
+ ft && /* @__PURE__ */ n(Kn, { poll: ft }),
1586
+ j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
1587
+ E,
1569
1588
  {
1570
1589
  actionHandler: o,
1571
- attachments: F
1590
+ attachments: j
1572
1591
  }
1573
1592
  ) : null,
1574
- q ? /* @__PURE__ */ n(
1593
+ Q ? /* @__PURE__ */ n(
1575
1594
  x,
1576
1595
  {
1577
- message: W,
1596
+ message: K,
1578
1597
  renderText: b
1579
1598
  }
1580
1599
  ) : /* @__PURE__ */ n(
1581
- Dt,
1600
+ Pt,
1582
1601
  {
1583
- message: W,
1602
+ message: K,
1584
1603
  renderText: b
1585
1604
  }
1586
1605
  ),
1587
- /* @__PURE__ */ n(Kn, {})
1606
+ /* @__PURE__ */ n(Jn, {})
1588
1607
  ] }) })
1589
1608
  }
1590
1609
  ),
1591
- !gt && !ft && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1592
- (!fe || pt) && /* @__PURE__ */ n(
1593
- Be,
1610
+ !pt && !gt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1611
+ (!ge || bt) && /* @__PURE__ */ n(
1612
+ Ue,
1594
1613
  {
1595
1614
  message: c,
1596
- hasAttachment: Oe,
1615
+ hasAttachment: $e,
1597
1616
  isMyMessage: te
1598
1617
  }
1599
1618
  ),
1600
- s && fe && /* @__PURE__ */ n(
1601
- ka,
1619
+ s && ge && /* @__PURE__ */ n(
1620
+ Ia,
1602
1621
  {
1603
1622
  selected: P,
1604
- onVoteUp: _,
1605
- onVoteDown: M
1623
+ onVoteUp: C,
1624
+ onVoteDown: A
1606
1625
  }
1607
1626
  )
1608
1627
  ] }),
1609
- X && /* @__PURE__ */ n(
1610
- Q,
1628
+ ee && /* @__PURE__ */ n(
1629
+ Z,
1611
1630
  {
1612
1631
  onClick: d,
1613
1632
  reply_count: c.reply_count
1614
1633
  }
1615
1634
  ),
1616
- ue && /* @__PURE__ */ n(Z, {})
1635
+ me && /* @__PURE__ */ n(X, {})
1617
1636
  ]
1618
1637
  },
1619
1638
  c.id
1620
1639
  )
1621
1640
  ] });
1622
- }, Ea = V.memo(
1623
- Ca,
1624
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1625
- ), Ia = (e) => {
1626
- const t = ye("CustomMessage");
1627
- return /* @__PURE__ */ n(Ea, { ...t, ...e });
1628
- }, Sa = () => {
1641
+ }, Ta = F.memo(
1642
+ Sa,
1643
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ln(e, t)
1644
+ ), Aa = (e) => {
1645
+ const t = ke("CustomMessage");
1646
+ return /* @__PURE__ */ n(Ta, { ...t, ...e });
1647
+ }, Ma = () => {
1629
1648
  var s;
1630
- const { handleDelete: e, message: t } = ye("CustomMessageActions");
1649
+ const { handleDelete: e, message: t } = ke("CustomMessageActions");
1631
1650
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1632
- Wt,
1651
+ Xt,
1633
1652
  {
1634
1653
  onClick: e,
1635
1654
  "aria-label": "Delete",
1636
1655
  title: "Delete",
1637
1656
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1638
- children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
1657
+ children: /* @__PURE__ */ n(Ms, { size: 16, weight: "light", "aria-hidden": !0 })
1639
1658
  }
1640
1659
  );
1641
- }, Ta = () => {
1642
- const { handleFlag: e } = ye("CustomMessageActions");
1660
+ }, Ra = () => {
1661
+ const { handleFlag: e } = ke("CustomMessageActions");
1643
1662
  return /* @__PURE__ */ n(
1644
- Wt,
1663
+ Xt,
1645
1664
  {
1646
1665
  onClick: e,
1647
1666
  "aria-label": "Report",
1648
1667
  title: "Report",
1649
1668
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1650
- children: /* @__PURE__ */ n(Ht, { size: 16, weight: "light", "aria-hidden": !0 })
1669
+ children: /* @__PURE__ */ n(Yt, { size: 16, weight: "light", "aria-hidden": !0 })
1651
1670
  }
1652
1671
  );
1653
- }, Aa = () => {
1672
+ }, La = () => {
1654
1673
  var t;
1655
- const { message: e } = ye("CustomMessageActions");
1674
+ const { message: e } = ke("CustomMessageActions");
1656
1675
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1657
- Ps,
1676
+ zs,
1658
1677
  {
1659
1678
  messageActionSet: [
1660
- { Component: Sa, placement: "quick", type: "delete" },
1661
- { Component: Ta, placement: "quick", type: "flag" }
1679
+ { Component: Ma, placement: "quick", type: "delete" },
1680
+ { Component: Ra, placement: "quick", type: "flag" }
1662
1681
  ]
1663
1682
  }
1664
1683
  );
1665
- }, Ma = ({
1684
+ }, Da = ({
1666
1685
  link: e,
1667
1686
  onDismiss: t
1668
1687
  }) => {
@@ -1692,7 +1711,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1692
1711
  },
1693
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",
1694
1713
  "aria-label": "Close link preview",
1695
- children: /* @__PURE__ */ n(Pe, { className: "size-4 text-black/90" })
1714
+ children: /* @__PURE__ */ n(ze, { className: "size-4 text-black/90" })
1696
1715
  }
1697
1716
  ),
1698
1717
  /* @__PURE__ */ h("div", { className: "p-2", children: [
@@ -1702,26 +1721,26 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1702
1721
  ]
1703
1722
  }
1704
1723
  );
1705
- }, Ra = (e) => ({
1724
+ }, Pa = (e) => ({
1706
1725
  linkPreviews: Array.from(e.previews.values()).filter(
1707
- (t) => Lt.previewIsLoaded(t) || Lt.previewIsLoading(t)
1726
+ (t) => Dt.previewIsLoaded(t) || Dt.previewIsLoading(t)
1708
1727
  )
1709
- }), La = () => {
1710
- const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
1728
+ }), za = () => {
1729
+ const { linkPreviewsManager: e } = Zn(), { linkPreviews: t } = Qn(
1711
1730
  e.state,
1712
- Ra
1731
+ Pa
1713
1732
  ), s = (r) => {
1714
1733
  e.dismissPreview(r);
1715
1734
  };
1716
1735
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1717
- Ma,
1736
+ Da,
1718
1737
  {
1719
1738
  link: r,
1720
1739
  onDismiss: s
1721
1740
  },
1722
1741
  r.og_scrape_url
1723
1742
  )) }) : null;
1724
- }, st = V.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1743
+ }, at = F.createContext(!1), Si = () => ye(at), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1725
1744
  "button",
1726
1745
  {
1727
1746
  ...s,
@@ -1729,25 +1748,25 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1729
1748
  "aria-label": "Send",
1730
1749
  disabled: t,
1731
1750
  onClick: e,
1732
- children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
1751
+ children: /* @__PURE__ */ n(Rs, { weight: "bold", className: "size-4" })
1733
1752
  }
1734
- ), Pa = () => {
1735
- const e = _e(st), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1736
- SendButton: r = Da,
1737
- AttachmentPreviewList: i = ns
1738
- } = Gt("CustomMessageInput");
1753
+ ), $a = () => {
1754
+ const e = ye(at), { handleSubmit: t } = ts(), s = ns(), a = e || !s, {
1755
+ SendButton: r = Oa,
1756
+ AttachmentPreviewList: i = ss
1757
+ } = Ht("CustomMessageInput");
1739
1758
  return /* @__PURE__ */ h(
1740
1759
  "div",
1741
1760
  {
1742
1761
  className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
1743
1762
  "data-dd-privacy": "mask",
1744
1763
  children: [
1745
- /* @__PURE__ */ n(ss, {}),
1746
- /* @__PURE__ */ n(La, {}),
1764
+ /* @__PURE__ */ n(as, {}),
1765
+ /* @__PURE__ */ n(za, {}),
1747
1766
  /* @__PURE__ */ n(i, {}),
1748
1767
  /* @__PURE__ */ h("div", { className: "flex", children: [
1749
1768
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1750
- as,
1769
+ rs,
1751
1770
  {
1752
1771
  "aria-disabled": e || void 0,
1753
1772
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -1772,7 +1791,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1772
1791
  ]
1773
1792
  }
1774
1793
  );
1775
- }, za = ({
1794
+ }, Fa = ({
1776
1795
  renderActions: e,
1777
1796
  renderFooter: t,
1778
1797
  disabled: s = !1,
@@ -1793,67 +1812,67 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1793
1812
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1794
1813
  children: [
1795
1814
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1796
- /* @__PURE__ */ n(st.Provider, { value: l, children: /* @__PURE__ */ n(Qn, { Input: r ?? Pa }) })
1815
+ /* @__PURE__ */ n(at.Provider, { value: l, children: /* @__PURE__ */ n(es, { Input: r ?? $a }) })
1797
1816
  ]
1798
1817
  }
1799
1818
  ),
1800
1819
  t == null ? void 0 : t()
1801
1820
  ] });
1802
- }, Oa = [
1821
+ }, Ba = [
1803
1822
  "SYSTEM_DM_AGENT_PAUSED",
1804
1823
  "SYSTEM_DM_AGENT_RESUMED"
1805
- ], $a = {
1824
+ ], Ua = {
1806
1825
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1807
1826
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1808
- }, Fa = [
1827
+ }, ja = [
1809
1828
  "SYSTEM_AGE_SAFETY_BLOCKED"
1810
- ], Ba = {
1829
+ ], Va = {
1811
1830
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1812
- }, Ue = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", jt = (e) => Oa.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1831
+ }, je = "age safety guidelines.", Ga = "https://linktr.ee/s/about/contact", Vt = (e) => Ba.includes(e), Ha = (e) => ja.includes(e), Ya = (e) => {
1813
1832
  var a;
1814
1833
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1815
- if (jt(t))
1834
+ if (Vt(t))
1816
1835
  return {
1817
1836
  kind: "dm-agent",
1818
1837
  type: t
1819
1838
  };
1820
- if (ja(t))
1839
+ if (Ha(t))
1821
1840
  return {
1822
1841
  kind: "age-safety",
1823
1842
  type: t
1824
1843
  };
1825
1844
  const s = e.dm_agent_system_type;
1826
- if (jt(s))
1845
+ if (Vt(s))
1827
1846
  return {
1828
1847
  kind: "dm-agent",
1829
1848
  type: s
1830
1849
  };
1831
- }, Ga = (e) => {
1832
- const t = e.indexOf(Ue);
1850
+ }, qa = (e) => {
1851
+ const t = e.indexOf(je);
1833
1852
  if (t === -1)
1834
1853
  return e;
1835
- const s = t + Ue.length;
1854
+ const s = t + je.length;
1836
1855
  return /* @__PURE__ */ h(se, { children: [
1837
1856
  e.slice(0, t),
1838
1857
  /* @__PURE__ */ n(
1839
1858
  "a",
1840
1859
  {
1841
- href: Ua,
1860
+ href: Ga,
1842
1861
  target: "_blank",
1843
1862
  rel: "noopener noreferrer",
1844
1863
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1845
- children: Ue
1864
+ children: je
1846
1865
  }
1847
1866
  ),
1848
1867
  e.slice(s)
1849
1868
  ] });
1850
- }, Ha = (e) => {
1869
+ }, Wa = (e) => {
1851
1870
  var a, r;
1852
- const t = e.message.hide_date === !0, s = Va(
1871
+ const t = e.message.hide_date === !0, s = Ya(
1853
1872
  e.message
1854
1873
  );
1855
1874
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1856
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
1875
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ua[s.type];
1857
1876
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1858
1877
  /* @__PURE__ */ h(
1859
1878
  "div",
@@ -1863,7 +1882,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1863
1882
  "data-dm-agent-system-type": s.type,
1864
1883
  children: [
1865
1884
  /* @__PURE__ */ n(
1866
- be,
1885
+ ve,
1867
1886
  {
1868
1887
  size: 16,
1869
1888
  weight: "regular",
@@ -1875,11 +1894,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1875
1894
  ]
1876
1895
  }
1877
1896
  ),
1878
- !t && /* @__PURE__ */ n($e, { message: e.message })
1897
+ !t && /* @__PURE__ */ n(Fe, { message: e.message })
1879
1898
  ] });
1880
1899
  }
1881
1900
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1882
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
1901
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Va[s.type];
1883
1902
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1884
1903
  /* @__PURE__ */ h(
1885
1904
  "div",
@@ -1889,7 +1908,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1889
1908
  "data-age-safety-system-type": s.type,
1890
1909
  children: [
1891
1910
  /* @__PURE__ */ n(
1892
- Rs,
1911
+ Ls,
1893
1912
  {
1894
1913
  size: 24,
1895
1914
  weight: "duotone",
@@ -1898,11 +1917,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1898
1917
  "data-testid": "age-safety-system-message-icon"
1899
1918
  }
1900
1919
  ),
1901
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ga(i) }) })
1920
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: qa(i) }) })
1902
1921
  ]
1903
1922
  }
1904
1923
  ),
1905
- !t && /* @__PURE__ */ n($e, { message: e.message })
1924
+ !t && /* @__PURE__ */ n(Fe, { message: e.message })
1906
1925
  ] });
1907
1926
  }
1908
1927
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1911,9 +1930,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1911
1930
  /* @__PURE__ */ n("p", { children: e.message.text }),
1912
1931
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1913
1932
  ] }),
1914
- !t && /* @__PURE__ */ n($e, { message: e.message })
1933
+ !t && /* @__PURE__ */ n(Fe, { message: e.message })
1915
1934
  ] });
1916
- }, un = We(!1), je = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1935
+ }, mn = Xe(!1), Ve = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1917
1936
  "animateTransform",
1918
1937
  {
1919
1938
  attributeName: "transform",
@@ -1923,21 +1942,21 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1923
1942
  begin: `${120 * t}ms`,
1924
1943
  repeatCount: "indefinite"
1925
1944
  }
1926
- ) }), Ya = /* @__PURE__ */ new Set([
1927
- Fe.Thinking,
1928
- Fe.Generating,
1929
- Fe.ExternalSources
1930
- ]), qa = ({ threadList: e }) => {
1931
- var b, N;
1932
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = _e(un);
1933
- if (!e && o && Ya.has(l)) {
1934
- const w = Wa(t, (b = r.user) == null ? void 0 : b.id);
1945
+ ) }), Xa = /* @__PURE__ */ new Set([
1946
+ Be.Thinking,
1947
+ Be.Generating,
1948
+ Be.ExternalSources
1949
+ ]), Ka = ({ threadList: e }) => {
1950
+ var b, w;
1951
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = ue(), { typing: i = {} } = is(), { aiState: l } = ls(t), o = ye(mn);
1952
+ if (!e && o && Xa.has(l)) {
1953
+ const v = Ja(t, (b = r.user) == null ? void 0 : b.id);
1935
1954
  return /* @__PURE__ */ n(
1936
- Vt,
1955
+ Gt,
1937
1956
  {
1938
- avatarId: (w == null ? void 0 : w.id) ?? "ai-agent",
1939
- avatarName: (w == null ? void 0 : w.name) ?? (w == null ? void 0 : w.id) ?? "Agent",
1940
- avatarImage: w == null ? void 0 : w.image,
1957
+ avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
1958
+ avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
1959
+ avatarImage: v == null ? void 0 : v.image,
1941
1960
  testId: "typing-indicator-ai"
1942
1961
  }
1943
1962
  );
@@ -1945,21 +1964,21 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1945
1964
  if ((s == null ? void 0 : s.typing_events) === !1)
1946
1965
  return null;
1947
1966
  const u = e ? [] : Object.values(i).filter(
1948
- ({ parent_id: w, user: p }) => {
1949
- var v;
1950
- return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
1967
+ ({ parent_id: v, user: p }) => {
1968
+ var N;
1969
+ return (p == null ? void 0 : p.id) !== ((N = r.user) == null ? void 0 : N.id) && !v;
1951
1970
  }
1952
1971
  ), g = e ? Object.values(i).filter(
1953
- ({ parent_id: w, user: p }) => {
1954
- var v;
1955
- return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
1972
+ ({ parent_id: v, user: p }) => {
1973
+ var N;
1974
+ return (p == null ? void 0 : p.id) !== ((N = r.user) == null ? void 0 : N.id) && v === (a == null ? void 0 : a.id);
1956
1975
  }
1957
1976
  ) : [], m = e ? g : u;
1958
1977
  if (!m.length)
1959
1978
  return null;
1960
- const f = (N = m[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1979
+ const f = (w = m[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1961
1980
  return /* @__PURE__ */ n(
1962
- Vt,
1981
+ Gt,
1963
1982
  {
1964
1983
  avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
1965
1984
  avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
@@ -1967,7 +1986,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1967
1986
  testId: "typing-indicator"
1968
1987
  }
1969
1988
  );
1970
- }, Vt = ({
1989
+ }, Gt = ({
1971
1990
  avatarId: e,
1972
1991
  avatarName: t,
1973
1992
  avatarImage: s,
@@ -2002,16 +2021,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2002
2021
  height: "13",
2003
2022
  overflow: "visible",
2004
2023
  children: [
2005
- /* @__PURE__ */ n(je, { cx: "4", index: 0 }),
2006
- /* @__PURE__ */ n(je, { cx: "16", index: 1 }),
2007
- /* @__PURE__ */ n(je, { cx: "28", index: 2 })
2024
+ /* @__PURE__ */ n(Ve, { cx: "4", index: 0 }),
2025
+ /* @__PURE__ */ n(Ve, { cx: "16", index: 1 }),
2026
+ /* @__PURE__ */ n(Ve, { cx: "28", index: 2 })
2008
2027
  ]
2009
2028
  }
2010
2029
  ) }) }) }) }) })
2011
2030
  ] })
2012
2031
  }
2013
2032
  );
2014
- function Wa(e, t) {
2033
+ function Ja(e, t) {
2015
2034
  var a;
2016
2035
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2017
2036
  for (const r of Object.values(s)) {
@@ -2020,7 +2039,7 @@ function Wa(e, t) {
2020
2039
  return i;
2021
2040
  }
2022
2041
  }
2023
- const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2042
+ const Za = () => null, Qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2024
2043
  "div",
2025
2044
  {
2026
2045
  className: k("flex items-center justify-center h-full", e),
@@ -2063,12 +2082,12 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2063
2082
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2064
2083
  ]
2065
2084
  }
2066
- ), Re = V.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2067
- /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2085
+ ), Le = F.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2086
+ /* @__PURE__ */ n(Qa, { className: "w-6 h-6" }),
2068
2087
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2069
2088
  ] }) }));
2070
- Re.displayName = "LoadingState";
2071
- const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ae = "Replies instantly with AI assistant", Ja = ({
2089
+ Le.displayName = "LoadingState";
2090
+ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Me = "Replies instantly with AI assistant", er = ({
2072
2091
  onBack: e,
2073
2092
  showBackButton: t,
2074
2093
  showStarButton: s = !1,
@@ -2084,32 +2103,33 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2084
2103
  customChannelActions: f,
2085
2104
  renderChannelActions: c,
2086
2105
  showChannelInfo: b = !0,
2087
- onParticipantNameClick: N,
2088
- renderHeaderTitleBadges: w
2106
+ onParticipantNameClick: w,
2107
+ renderHeaderTitleBadges: v
2089
2108
  }) => {
2090
- var _, M, y, I, C, z, D;
2091
- const { channel: p } = de(), v = V.useMemo(() => {
2092
- var Q, G;
2093
- const j = (Q = p._client) == null ? void 0 : Q.userID;
2094
- return j ? Object.values(((G = p.state) == null ? void 0 : G.members) || {}).find(
2095
- (x) => {
2096
- var S;
2097
- return ((S = x.user) == null ? void 0 : S.id) && x.user.id !== j;
2098
- }
2099
- ) : void 0;
2100
- }, [(_ = p._client) == null ? void 0 : _.userID, (M = p.state) == null ? void 0 : M.members]), A = Jt(v == null ? void 0 : v.user), T = (y = v == null ? void 0 : v.user) == null ? void 0 : y.image, E = Kt(p), O = w == null ? void 0 : w({
2109
+ var A, E, y, I, O, z;
2110
+ const { channel: p } = de(), { client: N } = ue(), _ = F.useMemo(
2111
+ () => {
2112
+ var U;
2113
+ return Ze(
2114
+ (U = p.state) == null ? void 0 : U.members,
2115
+ N == null ? void 0 : N.userID,
2116
+ p.type
2117
+ );
2118
+ },
2119
+ [(A = p.state) == null ? void 0 : A.members, N == null ? void 0 : N.userID, p.type]
2120
+ ), T = Zt(_ == null ? void 0 : _.user), R = (E = _ == null ? void 0 : _.user) == null ? void 0 : E.image, M = Jt(p), L = v == null ? void 0 : v({
2101
2121
  channel: p,
2102
- participant: v
2103
- }), R = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", B = /* @__PURE__ */ h(se, { children: [
2104
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2105
- O && /* @__PURE__ */ n("span", { className: "shrink-0", children: O })
2106
- ] }), P = async () => {
2122
+ participant: _
2123
+ }), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", B = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", P = /* @__PURE__ */ h(se, { children: [
2124
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: T }),
2125
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2126
+ ] }), C = async () => {
2107
2127
  try {
2108
- E ? await p.unpin() : await p.pin();
2109
- } catch (j) {
2128
+ M ? await p.unpin() : await p.pin();
2129
+ } catch (U) {
2110
2130
  console.error(
2111
2131
  "[CustomChannelHeader] Failed to update pinned status:",
2112
- j
2132
+ U
2113
2133
  );
2114
2134
  }
2115
2135
  };
@@ -2126,7 +2146,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2126
2146
  }),
2127
2147
  type: "button",
2128
2148
  "aria-label": "Back to conversations",
2129
- children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2149
+ children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2130
2150
  }
2131
2151
  ) }),
2132
2152
  /* @__PURE__ */ n(
@@ -2134,54 +2154,54 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2134
2154
  {
2135
2155
  className: "flex flex-col gap-1 items-center",
2136
2156
  "data-dd-privacy": "mask",
2137
- children: N ? /* @__PURE__ */ h(
2157
+ children: w ? /* @__PURE__ */ h(
2138
2158
  "button",
2139
2159
  {
2140
2160
  type: "button",
2141
- onClick: N,
2142
- "aria-label": `View details for ${A}`,
2161
+ onClick: w,
2162
+ "aria-label": `View details for ${T}`,
2143
2163
  className: k(
2144
- R,
2164
+ D,
2145
2165
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2146
2166
  ),
2147
2167
  children: [
2148
2168
  /* @__PURE__ */ n(
2149
2169
  ne,
2150
2170
  {
2151
- id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || p.id || "unknown",
2152
- name: A,
2153
- image: T,
2154
- starred: s && E,
2171
+ id: ((y = _ == null ? void 0 : _.user) == null ? void 0 : y.id) || p.id || "unknown",
2172
+ name: T,
2173
+ image: R,
2174
+ starred: s && M,
2155
2175
  dmAgentEnabled: a,
2156
2176
  size: 48
2157
2177
  }
2158
2178
  ),
2159
2179
  /* @__PURE__ */ h("span", { className: "flex max-w-full items-center gap-0.5", children: [
2160
- B,
2161
- /* @__PURE__ */ n(ve, { className: "size-3 shrink-0", weight: "bold" })
2180
+ P,
2181
+ /* @__PURE__ */ n(xe, { className: "size-3 shrink-0", weight: "bold" })
2162
2182
  ] }),
2163
2183
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2164
- /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2165
- /* @__PURE__ */ n("span", { children: Ae })
2184
+ /* @__PURE__ */ n(ve, { className: "size-3 shrink-0 text-black/55" }),
2185
+ /* @__PURE__ */ n("span", { children: Me })
2166
2186
  ] })
2167
2187
  ]
2168
2188
  }
2169
- ) : /* @__PURE__ */ h("div", { className: R, children: [
2189
+ ) : /* @__PURE__ */ h("div", { className: D, children: [
2170
2190
  /* @__PURE__ */ n(
2171
2191
  ne,
2172
2192
  {
2173
- id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || p.id || "unknown",
2174
- name: A,
2175
- image: T,
2176
- starred: s && E,
2193
+ id: ((I = _ == null ? void 0 : _.user) == null ? void 0 : I.id) || p.id || "unknown",
2194
+ name: T,
2195
+ image: R,
2196
+ starred: s && M,
2177
2197
  dmAgentEnabled: a,
2178
2198
  size: 48
2179
2199
  }
2180
2200
  ),
2181
2201
  /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
2182
- B,
2202
+ P,
2183
2203
  /* @__PURE__ */ n(
2184
- ve,
2204
+ xe,
2185
2205
  {
2186
2206
  className: "invisible size-3 shrink-0",
2187
2207
  weight: "bold"
@@ -2189,8 +2209,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2189
2209
  )
2190
2210
  ] }),
2191
2211
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2192
- /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2193
- /* @__PURE__ */ n("span", { children: Ae })
2212
+ /* @__PURE__ */ n(ve, { className: "size-3 shrink-0 text-black/55" }),
2213
+ /* @__PURE__ */ n("span", { children: Me })
2194
2214
  ] })
2195
2215
  ] })
2196
2216
  }
@@ -2200,26 +2220,26 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2200
2220
  "button",
2201
2221
  {
2202
2222
  className: oe,
2203
- onClick: P,
2223
+ onClick: C,
2204
2224
  type: "button",
2205
- "aria-label": E ? "Unstar conversation" : "Star conversation",
2225
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
2206
2226
  children: /* @__PURE__ */ n(
2207
- Ge,
2227
+ He,
2208
2228
  {
2209
2229
  className: k("size-5", {
2210
- "text-yellow-600": E,
2211
- "text-black/90": !E
2230
+ "text-yellow-600": M,
2231
+ "text-black/90": !M
2212
2232
  }),
2213
- weight: E ? "duotone" : "regular"
2233
+ weight: M ? "duotone" : "regular"
2214
2234
  }
2215
2235
  )
2216
2236
  }
2217
2237
  ),
2218
2238
  b && (c !== void 0 ? c : /* @__PURE__ */ n(
2219
- Ft,
2239
+ Bt,
2220
2240
  {
2221
2241
  channel: p,
2222
- participant: v,
2242
+ participant: _,
2223
2243
  showDeleteConversation: l,
2224
2244
  showBlockParticipant: o,
2225
2245
  showReportParticipant: d,
@@ -2246,60 +2266,60 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2246
2266
  type: "button",
2247
2267
  onClick: e,
2248
2268
  "aria-label": "Back to conversations",
2249
- children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2269
+ children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2250
2270
  }
2251
2271
  ),
2252
- N ? /* @__PURE__ */ h(
2272
+ w ? /* @__PURE__ */ h(
2253
2273
  "button",
2254
2274
  {
2255
2275
  type: "button",
2256
- onClick: N,
2257
- "aria-label": `View details for ${A}`,
2276
+ onClick: w,
2277
+ "aria-label": `View details for ${T}`,
2258
2278
  className: k(
2259
- L,
2279
+ B,
2260
2280
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2261
2281
  ),
2262
2282
  children: [
2263
2283
  /* @__PURE__ */ n(
2264
2284
  ne,
2265
2285
  {
2266
- id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || p.id || "unknown",
2267
- name: A,
2268
- image: T,
2269
- starred: s && E,
2286
+ id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || p.id || "unknown",
2287
+ name: T,
2288
+ image: R,
2289
+ starred: s && M,
2270
2290
  dmAgentEnabled: a,
2271
2291
  size: 48
2272
2292
  }
2273
2293
  ),
2274
2294
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2275
2295
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2276
- B,
2277
- /* @__PURE__ */ n(ve, { className: "size-4 shrink-0", weight: "bold" })
2296
+ P,
2297
+ /* @__PURE__ */ n(xe, { className: "size-4 shrink-0", weight: "bold" })
2278
2298
  ] }),
2279
2299
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2280
- /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2281
- /* @__PURE__ */ n("span", { className: "truncate", children: Ae })
2300
+ /* @__PURE__ */ n(ve, { className: "size-3 shrink-0 text-black/55" }),
2301
+ /* @__PURE__ */ n("span", { className: "truncate", children: Me })
2282
2302
  ] })
2283
2303
  ] })
2284
2304
  ]
2285
2305
  }
2286
- ) : /* @__PURE__ */ h("div", { className: L, children: [
2306
+ ) : /* @__PURE__ */ h("div", { className: B, children: [
2287
2307
  /* @__PURE__ */ n(
2288
2308
  ne,
2289
2309
  {
2290
- id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || p.id || "unknown",
2291
- name: A,
2292
- image: T,
2293
- starred: s && E,
2310
+ id: ((z = _ == null ? void 0 : _.user) == null ? void 0 : z.id) || p.id || "unknown",
2311
+ name: T,
2312
+ image: R,
2313
+ starred: s && M,
2294
2314
  dmAgentEnabled: a,
2295
2315
  size: 48
2296
2316
  }
2297
2317
  ),
2298
2318
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2299
2319
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2300
- B,
2320
+ P,
2301
2321
  /* @__PURE__ */ n(
2302
- ve,
2322
+ xe,
2303
2323
  {
2304
2324
  className: "invisible size-4 shrink-0",
2305
2325
  weight: "bold"
@@ -2307,8 +2327,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2307
2327
  )
2308
2328
  ] }),
2309
2329
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2310
- /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2311
- /* @__PURE__ */ n("span", { className: "truncate", children: Ae })
2330
+ /* @__PURE__ */ n(ve, { className: "size-3 shrink-0 text-black/55" }),
2331
+ /* @__PURE__ */ n("span", { className: "truncate", children: Me })
2312
2332
  ] })
2313
2333
  ] })
2314
2334
  ] })
@@ -2318,26 +2338,26 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2318
2338
  "button",
2319
2339
  {
2320
2340
  className: oe,
2321
- onClick: P,
2341
+ onClick: C,
2322
2342
  type: "button",
2323
- "aria-label": E ? "Unstar conversation" : "Star conversation",
2343
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
2324
2344
  children: /* @__PURE__ */ n(
2325
- Ge,
2345
+ He,
2326
2346
  {
2327
2347
  className: k("size-6", {
2328
- "text-yellow-600": E,
2329
- "text-black/90": !E
2348
+ "text-yellow-600": M,
2349
+ "text-black/90": !M
2330
2350
  }),
2331
- weight: E ? "duotone" : "regular"
2351
+ weight: M ? "duotone" : "regular"
2332
2352
  }
2333
2353
  )
2334
2354
  }
2335
2355
  ),
2336
2356
  b && (c !== void 0 ? c : /* @__PURE__ */ n(
2337
- Ft,
2357
+ Bt,
2338
2358
  {
2339
2359
  channel: p,
2340
- participant: v,
2360
+ participant: _,
2341
2361
  showDeleteConversation: l,
2342
2362
  showBlockParticipant: o,
2343
2363
  showReportParticipant: d,
@@ -2353,7 +2373,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2353
2373
  ] })
2354
2374
  ] })
2355
2375
  ] });
2356
- }, Za = ({
2376
+ }, tr = ({
2357
2377
  onBack: e,
2358
2378
  showBackButton: t,
2359
2379
  renderMessageInputActions: s,
@@ -2369,65 +2389,66 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2369
2389
  showReportParticipant: f = !0,
2370
2390
  composerDisabled: c = !1,
2371
2391
  composerDisabledReason: b,
2372
- showStarButton: N = !1,
2373
- chatbotVotingEnabled: w = !1,
2392
+ showStarButton: w = !1,
2393
+ chatbotVotingEnabled: v = !1,
2374
2394
  renderChannelBanner: p,
2375
- renderHeaderTitleBadges: v,
2376
- customChannelActions: A,
2395
+ renderHeaderTitleBadges: N,
2396
+ customChannelActions: _,
2377
2397
  renderChannelActions: T,
2378
- renderMessage: E,
2379
- dmAgentEnabled: O = !1,
2380
- viewerLanguage: R,
2381
- showChannelInfo: L = !0,
2398
+ renderMessage: R,
2399
+ dmAgentEnabled: M = !1,
2400
+ viewerLanguage: L,
2401
+ showChannelInfo: D = !0,
2382
2402
  onParticipantNameClick: B,
2383
2403
  composerInput: P
2384
2404
  }) => {
2385
- var j, Z, Q, G, x, S;
2386
- const { channel: _ } = de(), M = V.useMemo(() => {
2387
- var q, F;
2388
- const U = (q = _._client) == null ? void 0 : q.userID;
2389
- return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find(
2390
- (W) => {
2391
- var X;
2392
- return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
2393
- }
2394
- ) : void 0;
2395
- }, [(j = _._client) == null ? void 0 : j.userID, (Z = _.state) == null ? void 0 : Z.members]), y = V.useMemo(() => {
2396
- var q, F;
2397
- const U = (q = _._client) == null ? void 0 : q.userID;
2398
- return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find((W) => {
2399
- var X;
2400
- return ((X = W.user) == null ? void 0 : X.id) === U;
2405
+ var X, Z, Y, x;
2406
+ const { channel: C } = de(), { client: A } = ue(), E = F.useMemo(
2407
+ () => {
2408
+ var S;
2409
+ return Ze(
2410
+ (S = C.state) == null ? void 0 : S.members,
2411
+ A == null ? void 0 : A.userID,
2412
+ C.type
2413
+ );
2414
+ },
2415
+ [(X = C.state) == null ? void 0 : X.members, A == null ? void 0 : A.userID, C.type]
2416
+ ), y = F.useMemo(() => {
2417
+ var V;
2418
+ const S = A == null ? void 0 : A.userID;
2419
+ return S ? Object.values(((V = C.state) == null ? void 0 : V.members) || {}).find((Q) => {
2420
+ var j;
2421
+ return ((j = Q.user) == null ? void 0 : j.id) === S;
2401
2422
  }) : void 0;
2402
- }, [(Q = _._client) == null ? void 0 : Q.userID, (G = _.state) == null ? void 0 : G.members]), I = ((x = y == null ? void 0 : y.user) == null ? void 0 : x.is_account) ?? (y == null ? void 0 : y.is_account), C = ((S = M == null ? void 0 : M.user) == null ? void 0 : S.is_account) ?? (M == null ? void 0 : M.is_account), z = O && I === !1 && C === !0, D = J(
2403
- (U) => {
2404
- const { message: H } = ye("ChannelView"), q = /* @__PURE__ */ n(
2405
- Ia,
2423
+ }, [A == null ? void 0 : A.userID, (Z = C.state) == null ? void 0 : Z.members]), I = ((Y = y == null ? void 0 : y.user) == null ? void 0 : Y.is_account) ?? (y == null ? void 0 : y.is_account), O = ((x = E == null ? void 0 : E.user) == null ? void 0 : x.is_account) ?? (E == null ? void 0 : E.is_account), z = M && I === !1 && O === !0, U = W(
2424
+ (S) => {
2425
+ const { message: G } = ke("ChannelView"), V = /* @__PURE__ */ n(
2426
+ Aa,
2406
2427
  {
2407
- ...U,
2408
- chatbotVotingEnabled: w,
2409
- viewerLanguage: R
2428
+ ...S,
2429
+ chatbotVotingEnabled: v,
2430
+ viewerLanguage: L
2410
2431
  }
2411
2432
  );
2412
- return !E || !H ? q : E(q, H);
2433
+ return !R || !G ? V : R(V, G);
2413
2434
  },
2414
- [w, E, R]
2435
+ [v, R, L]
2415
2436
  );
2416
2437
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2417
- os,
2438
+ cs,
2418
2439
  {
2419
2440
  overrides: {
2420
- Message: D,
2421
- MessageActions: Aa
2441
+ Message: U,
2442
+ MessageActions: La
2422
2443
  },
2423
- children: /* @__PURE__ */ h(cs, { children: [
2444
+ children: /* @__PURE__ */ h(ds, { children: [
2424
2445
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2425
- Ja,
2446
+ er,
2426
2447
  {
2427
2448
  onBack: e,
2428
2449
  showBackButton: t,
2429
- showChannelInfo: L,
2430
- showStarButton: N,
2450
+ showChannelInfo: D,
2451
+ showStarButton: w,
2431
2452
  dmAgentEnabled: z,
2432
2453
  onLeaveConversation: i,
2433
2454
  onBlockParticipant: l,
@@ -2437,29 +2458,29 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2437
2458
  onDeleteConversationClick: d,
2438
2459
  onBlockParticipantClick: u,
2439
2460
  onReportParticipantClick: g,
2440
- customChannelActions: A,
2461
+ customChannelActions: _,
2441
2462
  renderChannelActions: T,
2442
2463
  onParticipantNameClick: B,
2443
- renderHeaderTitleBadges: v
2464
+ renderHeaderTitleBadges: N
2444
2465
  }
2445
2466
  ) }, "lt-channel-header"),
2446
- p ? /* @__PURE__ */ n(V.Fragment, { children: p() }, "lt-channel-banner") : null,
2467
+ p ? /* @__PURE__ */ n(F.Fragment, { children: p() }, "lt-channel-banner") : null,
2447
2468
  /* @__PURE__ */ n(
2448
2469
  "div",
2449
2470
  {
2450
2471
  className: "flex-1 overflow-hidden relative",
2451
- children: /* @__PURE__ */ n(ds, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2472
+ children: /* @__PURE__ */ n(us, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2452
2473
  },
2453
2474
  "lt-channel-message-list"
2454
2475
  ),
2455
- r ? /* @__PURE__ */ n(V.Fragment, { children: r(_) }, "lt-channel-conversation-footer") : null,
2476
+ r ? /* @__PURE__ */ n(F.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
2456
2477
  /* @__PURE__ */ n(
2457
- za,
2478
+ Fa,
2458
2479
  {
2459
2480
  ...s && {
2460
- renderActions: () => s == null ? void 0 : s(_)
2481
+ renderActions: () => s == null ? void 0 : s(C)
2461
2482
  },
2462
- renderFooter: () => a == null ? void 0 : a(_),
2483
+ renderFooter: () => a == null ? void 0 : a(C),
2463
2484
  disabled: c,
2464
2485
  disabledReason: b,
2465
2486
  composerInput: P
@@ -2469,7 +2490,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2469
2490
  ] })
2470
2491
  }
2471
2492
  ) });
2472
- }, mn = V.memo(
2493
+ }, hn = F.memo(
2473
2494
  ({
2474
2495
  channel: e,
2475
2496
  onBack: t,
@@ -2480,86 +2501,86 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2480
2501
  onLeaveConversation: l,
2481
2502
  onBlockParticipant: o,
2482
2503
  className: d,
2483
- CustomChannelEmptyState: u = Xa,
2504
+ CustomChannelEmptyState: u = Za,
2484
2505
  showDeleteConversation: g = !0,
2485
2506
  onDeleteConversationClick: m,
2486
2507
  onBlockParticipantClick: f,
2487
2508
  onReportParticipantClick: c,
2488
2509
  showBlockParticipant: b = !0,
2489
- showReportParticipant: N = !0,
2490
- composerDisabled: w = !1,
2510
+ showReportParticipant: w = !0,
2511
+ composerDisabled: v = !1,
2491
2512
  composerDisabledReason: p,
2492
- dmAgentEnabled: v,
2493
- messageMetadata: A,
2513
+ dmAgentEnabled: N,
2514
+ messageMetadata: _,
2494
2515
  onMessageSent: T,
2495
- showStarButton: E = !1,
2496
- chatbotVotingEnabled: O = !1,
2497
- renderChannelBanner: R,
2498
- renderHeaderTitleBadges: L,
2516
+ showStarButton: R = !1,
2517
+ chatbotVotingEnabled: M = !1,
2518
+ renderChannelBanner: L,
2519
+ renderHeaderTitleBadges: D,
2499
2520
  customChannelActions: B,
2500
2521
  renderChannelActions: P,
2501
- renderMessage: _,
2502
- onMessageLinkClick: M,
2503
- sendButton: y,
2504
- attachmentPreviewList: I,
2505
- viewerLanguage: C,
2506
- showChannelInfo: z = !0,
2507
- onParticipantNameClick: D,
2508
- composerInput: j
2522
+ renderMessage: C,
2523
+ onMessageLinkClick: A,
2524
+ sendButton: E,
2525
+ attachmentPreviewList: y,
2526
+ viewerLanguage: I,
2527
+ showChannelInfo: O = !0,
2528
+ onParticipantNameClick: z,
2529
+ composerInput: U
2509
2530
  }) => {
2510
- const Z = J(
2511
- async (G, x, S) => {
2512
- var X;
2513
- const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, H = v && !U, q = {
2531
+ const X = W(
2532
+ async (Y, x, S) => {
2533
+ var ee;
2534
+ const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, V = N && !G, Q = {
2514
2535
  ...x,
2515
- ...H && { silent: !0 },
2516
- ...A && {
2536
+ ...V && { silent: !0 },
2537
+ ..._ && {
2517
2538
  metadata: {
2518
2539
  ...x.metadata ?? {},
2519
- ...A
2540
+ ..._
2520
2541
  }
2521
2542
  }
2522
- }, F = {
2543
+ }, j = {
2523
2544
  ...S,
2524
- ...H && { skip_push: !0 }
2525
- }, W = await e.sendMessage(q, F);
2526
- return T == null || T(W), W;
2545
+ ...V && { skip_push: !0 }
2546
+ }, K = await e.sendMessage(Q, j);
2547
+ return T == null || T(K), K;
2527
2548
  },
2528
- [e, v, A, T]
2529
- ), Q = Y(null);
2530
- return K(() => {
2531
- if (!M) return;
2532
- const G = Q.current;
2533
- if (!G) return;
2549
+ [e, N, _, T]
2550
+ ), Z = H(null);
2551
+ return q(() => {
2552
+ if (!A) return;
2553
+ const Y = Z.current;
2554
+ if (!Y) return;
2534
2555
  const x = (S) => {
2535
- const U = S.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
2536
- if (!q) return;
2537
- const F = H == null ? void 0 : H.closest("[data-message-id]"), W = F == null ? void 0 : F.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2538
- M(q, X);
2556
+ const G = S.target, V = G == null ? void 0 : G.closest("a[href]"), Q = V == null ? void 0 : V.getAttribute("href");
2557
+ if (!Q) return;
2558
+ const j = V == null ? void 0 : V.closest("[data-message-id]"), K = j == null ? void 0 : j.getAttribute("data-message-id"), ee = K ? e.state.messages.find((me) => me.id === K) : void 0;
2559
+ A(Q, ee);
2539
2560
  };
2540
- return G.addEventListener("click", x), () => G.removeEventListener("click", x);
2541
- }, [M, e]), /* @__PURE__ */ n(
2561
+ return Y.addEventListener("click", x), () => Y.removeEventListener("click", x);
2562
+ }, [A, e]), /* @__PURE__ */ n(
2542
2563
  "div",
2543
2564
  {
2544
- ref: Q,
2565
+ ref: Z,
2545
2566
  className: k(
2546
2567
  "messaging-channel-view h-full flex flex-col",
2547
2568
  d
2548
2569
  ),
2549
- children: /* @__PURE__ */ n(un.Provider, { value: v ?? !1, children: /* @__PURE__ */ n(
2550
- ls,
2570
+ children: /* @__PURE__ */ n(mn.Provider, { value: N ?? !1, children: /* @__PURE__ */ n(
2571
+ os,
2551
2572
  {
2552
2573
  channel: e,
2553
- MessageSystem: Ha,
2574
+ MessageSystem: Wa,
2554
2575
  EmptyStateIndicator: u,
2555
- LoadingIndicator: Re,
2556
- DateSeparator: Vs,
2557
- TypingIndicator: qa,
2558
- doSendMessageRequest: Z,
2559
- ...y ? { SendButton: y } : {},
2560
- ...I ? { AttachmentPreviewList: I } : {},
2576
+ LoadingIndicator: Le,
2577
+ DateSeparator: Ys,
2578
+ TypingIndicator: Ka,
2579
+ doSendMessageRequest: X,
2580
+ ...E ? { SendButton: E } : {},
2581
+ ...y ? { AttachmentPreviewList: y } : {},
2561
2582
  children: /* @__PURE__ */ n(
2562
- Za,
2583
+ tr,
2563
2584
  {
2564
2585
  onBack: t,
2565
2586
  showBackButton: s,
@@ -2574,21 +2595,21 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2574
2595
  onBlockParticipantClick: f,
2575
2596
  onReportParticipantClick: c,
2576
2597
  showBlockParticipant: b,
2577
- showReportParticipant: N,
2578
- composerDisabled: w,
2598
+ showReportParticipant: w,
2599
+ composerDisabled: v,
2579
2600
  composerDisabledReason: p,
2580
- showStarButton: E,
2581
- dmAgentEnabled: v,
2582
- chatbotVotingEnabled: O,
2583
- renderChannelBanner: R,
2584
- renderHeaderTitleBadges: L,
2601
+ showStarButton: R,
2602
+ dmAgentEnabled: N,
2603
+ chatbotVotingEnabled: M,
2604
+ renderChannelBanner: L,
2605
+ renderHeaderTitleBadges: D,
2585
2606
  customChannelActions: B,
2586
2607
  renderChannelActions: P,
2587
- renderMessage: _,
2588
- viewerLanguage: C,
2589
- showChannelInfo: z,
2590
- onParticipantNameClick: D,
2591
- composerInput: j
2608
+ renderMessage: C,
2609
+ viewerLanguage: I,
2610
+ showChannelInfo: O,
2611
+ onParticipantNameClick: z,
2612
+ composerInput: U
2592
2613
  }
2593
2614
  )
2594
2615
  }
@@ -2597,8 +2618,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2597
2618
  );
2598
2619
  }
2599
2620
  );
2600
- mn.displayName = "ChannelView";
2601
- const xe = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2621
+ hn.displayName = "ChannelView";
2622
+ const we = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2602
2623
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
2603
2624
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2604
2625
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2612,8 +2633,8 @@ const xe = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2612
2633
  }
2613
2634
  )
2614
2635
  ] }) }));
2615
- xe.displayName = "ErrorState";
2616
- const Ei = ({
2636
+ we.displayName = "ErrorState";
2637
+ const Ti = ({
2617
2638
  capabilities: e = {},
2618
2639
  renderMessageInputActions: t,
2619
2640
  renderConversationFooter: s,
@@ -2629,77 +2650,77 @@ const Ei = ({
2629
2650
  chatbotVotingEnabled: f = !1,
2630
2651
  viewerLanguage: c,
2631
2652
  renderHeaderTitleBadges: b,
2632
- renderChannelBanner: N,
2633
- customChannelActions: w,
2653
+ renderChannelBanner: w,
2654
+ customChannelActions: v,
2634
2655
  renderChannelActions: p,
2635
- onParticipantNameClick: v,
2636
- renderMessage: A,
2656
+ onParticipantNameClick: N,
2657
+ renderMessage: _,
2637
2658
  onMessageLinkClick: T,
2638
- showChannelInfo: E,
2639
- composerInput: O
2659
+ showChannelInfo: R,
2660
+ composerInput: M
2640
2661
  }) => {
2641
2662
  const {
2642
- client: R,
2643
- isConnected: L,
2663
+ client: L,
2664
+ isConnected: D,
2644
2665
  isLoading: B,
2645
2666
  error: P,
2646
- refreshConnection: _,
2647
- service: M,
2648
- debug: y
2649
- } = zs(), [I, C] = $(null), [z, D] = $(null), [j, Z] = $(!1), { showDeleteConversation: Q = !0 } = e, G = Y(l);
2650
- G.current = l;
2651
- const x = Y(a);
2667
+ refreshConnection: C,
2668
+ service: A,
2669
+ debug: E
2670
+ } = Os(), [y, I] = $(null), [O, z] = $(null), [U, X] = $(!1), { showDeleteConversation: Z = !0 } = e, Y = H(l);
2671
+ Y.current = l;
2672
+ const x = H(a);
2652
2673
  x.current = a;
2653
- const S = Y(null), U = Y(null);
2654
- K(() => {
2655
- U.current = I;
2656
- }, [I]), K(() => {
2657
- if (!R || !L) return;
2658
- const F = R.userID;
2659
- if (!F) return;
2660
- const W = `${F}::${i}`;
2661
- if (S.current === W) return;
2662
- S.current = W;
2663
- const X = () => {
2664
- S.current === W && (S.current = null);
2674
+ const S = H(null), G = H(null);
2675
+ q(() => {
2676
+ G.current = y;
2677
+ }, [y]), q(() => {
2678
+ if (!L || !D) return;
2679
+ const j = L.userID;
2680
+ if (!j) return;
2681
+ const K = `${j}::${i}`;
2682
+ if (S.current === K) return;
2683
+ S.current = K;
2684
+ const ee = () => {
2685
+ S.current === K && (S.current = null);
2665
2686
  };
2666
2687
  (async () => {
2667
- var me, he;
2688
+ var he, fe;
2668
2689
  try {
2669
- y && console.log(
2690
+ E && console.log(
2670
2691
  "[MessagingShell] Loading initial conversation with:",
2671
2692
  i
2672
2693
  );
2673
- const ee = await R.queryChannels(
2694
+ const J = await L.queryChannels(
2674
2695
  {
2675
2696
  type: "messaging",
2676
- members: { $eq: [F, i] }
2697
+ members: { $eq: [j, i] }
2677
2698
  },
2678
2699
  {},
2679
2700
  { limit: 1 }
2680
2701
  );
2681
- if (ee.length > 0) {
2682
- C(ee[0]), D(null), (me = x.current) == null || me.call(x, ee[0]), y && console.log(
2702
+ if (J.length > 0) {
2703
+ I(J[0]), z(null), (he = x.current) == null || he.call(x, J[0]), E && console.log(
2683
2704
  "[MessagingShell] Initial conversation loaded:",
2684
- ee[0].id
2705
+ J[0].id
2685
2706
  );
2686
2707
  return;
2687
2708
  }
2688
- const te = G.current;
2689
- if (!te || !M) {
2690
- X(), D("No conversation found with this account"), y && console.log(
2709
+ const te = Y.current;
2710
+ if (!te || !A) {
2711
+ ee(), z("No conversation found with this account"), E && console.log(
2691
2712
  "[MessagingShell] No conversation found for:",
2692
2713
  i
2693
2714
  );
2694
2715
  return;
2695
2716
  }
2696
2717
  try {
2697
- const le = await M.startChannelWithParticipant({
2718
+ const le = await A.startChannelWithParticipant({
2698
2719
  id: te.id,
2699
2720
  name: te.name,
2700
2721
  phone: te.phone
2701
2722
  });
2702
- C(le), D(null), (he = x.current) == null || he.call(x, le), y && console.log(
2723
+ I(le), z(null), (fe = x.current) == null || fe.call(x, le), E && console.log(
2703
2724
  "[MessagingShell] Channel created and loaded:",
2704
2725
  le.id
2705
2726
  );
@@ -2707,39 +2728,39 @@ const Ei = ({
2707
2728
  console.error(
2708
2729
  "[MessagingShell] Failed to create conversation:",
2709
2730
  le
2710
- ), X(), D("Failed to create conversation");
2731
+ ), ee(), z("Failed to create conversation");
2711
2732
  }
2712
- } catch (ee) {
2733
+ } catch (J) {
2713
2734
  console.error(
2714
2735
  "[MessagingShell] Failed to load initial conversation:",
2715
- ee
2716
- ), X(), U.current || D("Failed to load conversation");
2736
+ J
2737
+ ), ee(), G.current || z("Failed to load conversation");
2717
2738
  }
2718
2739
  })();
2719
- }, [i, R, L, M, y]);
2720
- const H = Y(r);
2721
- H.current = r;
2722
- const q = J(() => {
2723
- var F;
2724
- C(null), Z(!0), (F = H.current) == null || F.call(H);
2740
+ }, [i, L, D, A, E]);
2741
+ const V = H(r);
2742
+ V.current = r;
2743
+ const Q = W(() => {
2744
+ var j;
2745
+ I(null), X(!0), (j = V.current) == null || j.call(V);
2725
2746
  }, []);
2726
- return B ? /* @__PURE__ */ n(Re, {}) : P ? /* @__PURE__ */ n(xe, { message: P, onBack: _ }) : !L || !R ? /* @__PURE__ */ n(
2727
- xe,
2747
+ return B ? /* @__PURE__ */ n(Le, {}) : P ? /* @__PURE__ */ n(we, { message: P, onBack: C }) : !D || !L ? /* @__PURE__ */ n(
2748
+ we,
2728
2749
  {
2729
2750
  message: "Not connected to messaging service",
2730
- onBack: _
2751
+ onBack: C
2731
2752
  }
2732
- ) : z ? /* @__PURE__ */ n(xe, { message: z }) : j && !I ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : I ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2733
- mn,
2753
+ ) : O ? /* @__PURE__ */ n(we, { message: O }) : U && !y ? /* @__PURE__ */ n(we, { message: "Conversation ended" }) : y ? /* @__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(
2754
+ hn,
2734
2755
  {
2735
- channel: I,
2756
+ channel: y,
2736
2757
  renderMessageInputActions: t,
2737
2758
  renderConversationFooter: s,
2738
- renderChannelBanner: N,
2739
- onLeaveConversation: q,
2740
- onBlockParticipant: q,
2759
+ renderChannelBanner: w,
2760
+ onLeaveConversation: Q,
2761
+ onBlockParticipant: Q,
2741
2762
  CustomChannelEmptyState: o,
2742
- showDeleteConversation: Q,
2763
+ showDeleteConversation: Z,
2743
2764
  onBlockParticipantClick: d,
2744
2765
  onReportParticipantClick: u,
2745
2766
  dmAgentEnabled: g,
@@ -2747,24 +2768,24 @@ const Ei = ({
2747
2768
  chatbotVotingEnabled: f,
2748
2769
  viewerLanguage: c,
2749
2770
  renderHeaderTitleBadges: b,
2750
- customChannelActions: w,
2771
+ customChannelActions: v,
2751
2772
  renderChannelActions: p,
2752
- onParticipantNameClick: v,
2753
- renderMessage: A,
2773
+ onParticipantNameClick: N,
2774
+ renderMessage: _,
2754
2775
  onMessageLinkClick: T,
2755
- showChannelInfo: E,
2756
- composerInput: O
2776
+ showChannelInfo: R,
2777
+ composerInput: M
2757
2778
  },
2758
- I.id
2759
- ) }) }) : /* @__PURE__ */ n(Re, {});
2779
+ y.id
2780
+ ) }) }) : /* @__PURE__ */ n(Le, {});
2760
2781
  };
2761
- function Qa(e) {
2782
+ function nr(e) {
2762
2783
  const t = e.state.pending_messages;
2763
2784
  if (t != null && t.length)
2764
2785
  for (const s of t)
2765
2786
  e.state.addMessageSorted(s.message);
2766
2787
  }
2767
- const hn = V.createContext({
2788
+ const fn = F.createContext({
2768
2789
  selectedChannel: void 0,
2769
2790
  onChannelSelect: () => {
2770
2791
  },
@@ -2772,18 +2793,18 @@ const hn = V.createContext({
2772
2793
  renderMessagePreview: void 0,
2773
2794
  channelPreview: void 0,
2774
2795
  viewerLanguage: void 0
2775
- }), er = hn.Provider, tr = () => V.useContext(hn), nr = (e, t) => {
2796
+ }), sr = fn.Provider, ar = () => F.useContext(fn), rr = (e, t) => {
2776
2797
  const s = new Date(
2777
2798
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2778
2799
  ), r = new Date(
2779
2800
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2780
2801
  ).getTime() - s.getTime();
2781
2802
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2782
- }, sr = (e) => {
2803
+ }, ir = (e) => {
2783
2804
  const t = /* @__PURE__ */ new Date();
2784
2805
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2785
2806
  return "Just now";
2786
- const a = nr(e, t);
2807
+ const a = rr(e, t);
2787
2808
  return a === 0 ? e.toLocaleTimeString([], {
2788
2809
  hour: "numeric",
2789
2810
  minute: "2-digit",
@@ -2793,9 +2814,9 @@ const hn = V.createContext({
2793
2814
  day: "numeric",
2794
2815
  year: "2-digit"
2795
2816
  });
2796
- }, fn = V.memo(
2817
+ }, gn = F.memo(
2797
2818
  (e) => {
2798
- var L, B, P;
2819
+ var D, B, P;
2799
2820
  const { channel: t, unread: s } = e, {
2800
2821
  selectedChannel: a,
2801
2822
  onChannelSelect: r,
@@ -2803,67 +2824,66 @@ const hn = V.createContext({
2803
2824
  channelPreview: l,
2804
2825
  renderMessagePreview: o,
2805
2826
  viewerLanguage: d
2806
- } = tr(), u = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), g = Kt(t);
2827
+ } = ar(), { client: u } = ue(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = Jt(t);
2807
2828
  if (l)
2808
2829
  return /* @__PURE__ */ n(
2809
2830
  l,
2810
2831
  {
2811
2832
  ...e,
2812
- active: u,
2833
+ active: g,
2813
2834
  selectedChannel: a,
2814
2835
  onChannelSelect: r,
2815
2836
  viewerLanguage: d
2816
2837
  }
2817
2838
  );
2818
- const m = () => {
2839
+ const f = () => {
2819
2840
  t && r(t);
2820
- }, f = (_) => {
2821
- const M = _.key === "Enter" || _.key === " ", y = _.repeat;
2822
- !M || y || (_.preventDefault(), m());
2823
- }, b = Object.values(((L = t == null ? void 0 : t.state) == null ? void 0 : L.members) || {}).find(
2824
- (_) => {
2825
- var M, y;
2826
- return ((M = _.user) == null ? void 0 : M.id) && _.user.id !== ((y = t == null ? void 0 : t._client) == null ? void 0 : y.userID);
2827
- }
2828
- ), N = Jt(b == null ? void 0 : b.user), w = (B = b == null ? void 0 : b.user) == null ? void 0 : B.image, p = (() => {
2829
- var M;
2830
- const _ = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
2831
- if (_ != null && _.length) {
2832
- for (let y = _.length - 1; y >= 0; y--)
2833
- if (_[y].type !== "system") return _[y];
2841
+ }, c = (C) => {
2842
+ const A = C.key === "Enter" || C.key === " ", E = C.repeat;
2843
+ !A || E || (C.preventDefault(), f());
2844
+ }, b = Ze(
2845
+ (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
2846
+ u == null ? void 0 : u.userID,
2847
+ t == null ? void 0 : t.type
2848
+ ), w = Zt(b == null ? void 0 : b.user), v = (B = b == null ? void 0 : b.user) == null ? void 0 : B.image, p = (() => {
2849
+ var A;
2850
+ const C = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
2851
+ if (C != null && C.length) {
2852
+ for (let E = C.length - 1; E >= 0; E--)
2853
+ if (C[E].type !== "system") return C[E];
2834
2854
  }
2835
- })(), A = (() => {
2836
- var z, D, j, Z;
2837
- const _ = Zt({
2855
+ })(), _ = (() => {
2856
+ var O, z, U, X;
2857
+ const C = Qt({
2838
2858
  message: p,
2839
2859
  viewerLanguage: d
2840
2860
  });
2841
- if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2842
- if (((D = p == null ? void 0 : p.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2843
- if (((j = p == null ? void 0 : p.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
2844
- return _ ? `📎 ${_}` : "📎 Sent an attachment";
2845
- if (_) return _;
2846
- const C = (Z = p == null ? void 0 : p.attachments) == null ? void 0 : Z[0];
2847
- return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2848
- })(), T = p != null && p.created_at ? sr(new Date(p.created_at)) : "", E = p ? Me(p) : !1, O = o ? o(p, A) : `${E ? "✨ " : ""}${A}`, R = s ?? 0;
2861
+ if (((O = p == null ? void 0 : p.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return C ? `💵 ${C}` : "💵 Sent a tip";
2862
+ if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return C ? `💰 ${C}` : "💰 Sent a message";
2863
+ if (((U = p == null ? void 0 : p.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_ATTACHMENT")
2864
+ return C ? `📎 ${C}` : "📎 Sent an attachment";
2865
+ if (C) return C;
2866
+ const I = (X = p == null ? void 0 : p.attachments) == null ? void 0 : X[0];
2867
+ return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2868
+ })(), T = p != null && p.created_at ? ir(new Date(p.created_at)) : "", R = p ? Re(p) : !1, M = o ? o(p, _) : `${R ? "✨ " : ""}${_}`, L = s ?? 0;
2849
2869
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2850
2870
  channelId: t == null ? void 0 : t.id,
2851
- isSelected: u,
2852
- participantName: N,
2853
- unreadCount: R,
2871
+ isSelected: g,
2872
+ participantName: w,
2873
+ unreadCount: L,
2854
2874
  hasTimestamp: !!T
2855
2875
  }), /* @__PURE__ */ n(
2856
2876
  "div",
2857
2877
  {
2858
2878
  role: "button",
2859
2879
  tabIndex: 0,
2860
- onClick: m,
2861
- onKeyDown: f,
2880
+ onClick: f,
2881
+ onKeyDown: c,
2862
2882
  className: k(
2863
2883
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2864
2884
  {
2865
- "bg-black/[0.04]": u,
2866
- "hover:bg-black/[0.02]": !u
2885
+ "bg-black/[0.04]": g,
2886
+ "hover:bg-black/[0.02]": !g
2867
2887
  }
2868
2888
  ),
2869
2889
  "data-dd-privacy": "mask",
@@ -2872,10 +2892,10 @@ const hn = V.createContext({
2872
2892
  ne,
2873
2893
  {
2874
2894
  id: ((P = b == null ? void 0 : b.user) == null ? void 0 : P.id) || t.id || "unknown",
2875
- name: N,
2876
- image: w,
2895
+ name: w,
2896
+ image: v,
2877
2897
  size: 48,
2878
- starred: g
2898
+ starred: m
2879
2899
  }
2880
2900
  ),
2881
2901
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2887,16 +2907,16 @@ const hn = V.createContext({
2887
2907
  "text-sm font-medium truncate text-[#191918]"
2888
2908
  ),
2889
2909
  children: [
2890
- g && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2891
- N
2910
+ m && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2911
+ w
2892
2912
  ]
2893
2913
  }
2894
2914
  ),
2895
2915
  T && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: T })
2896
2916
  ] }),
2897
2917
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2898
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: O }),
2899
- R > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: R > 99 ? "99+" : R })
2918
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
2919
+ L > 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: L > 99 ? "99+" : L })
2900
2920
  ] })
2901
2921
  ] })
2902
2922
  ] })
@@ -2904,28 +2924,28 @@ const hn = V.createContext({
2904
2924
  );
2905
2925
  }
2906
2926
  );
2907
- fn.displayName = "CustomChannelPreview";
2908
- const ar = { last_message_at: -1 }, rr = V.memo(
2927
+ gn.displayName = "CustomChannelPreview";
2928
+ const lr = { last_message_at: -1 }, or = F.memo(
2909
2929
  ({
2910
2930
  onChannelSelect: e,
2911
2931
  selectedChannel: t,
2912
2932
  filters: s,
2913
2933
  allowNewMessagesFromUnfilteredChannels: a = !1,
2914
2934
  channelRenderFilterFn: r,
2915
- sort: i = ar,
2935
+ sort: i = lr,
2916
2936
  className: l,
2917
2937
  customEmptyStateIndicator: o,
2918
2938
  channelPreview: d,
2919
2939
  renderMessagePreview: u,
2920
2940
  viewerLanguage: g
2921
2941
  }) => {
2922
- const m = V.useRef(0);
2942
+ const m = F.useRef(0);
2923
2943
  m.current++;
2924
- const { debug: f = !1 } = Je(), c = V.useCallback(
2925
- (N) => {
2926
- for (const w of N)
2927
- Qa(w);
2928
- return r ? r(N) : N;
2944
+ const { debug: f = !1 } = Je(), c = F.useCallback(
2945
+ (w) => {
2946
+ for (const v of w)
2947
+ nr(v);
2948
+ return r ? r(w) : w;
2929
2949
  },
2930
2950
  [r]
2931
2951
  );
@@ -2934,7 +2954,7 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2934
2954
  selectedChannelId: t == null ? void 0 : t.id,
2935
2955
  filters: s
2936
2956
  });
2937
- const b = V.useMemo(
2957
+ const b = F.useMemo(
2938
2958
  () => ({
2939
2959
  selectedChannel: t,
2940
2960
  onChannelSelect: e,
@@ -2959,16 +2979,16 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2959
2979
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2960
2980
  l
2961
2981
  ),
2962
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: b, children: /* @__PURE__ */ n(
2963
- us,
2982
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(sr, { value: b, children: /* @__PURE__ */ n(
2983
+ ms,
2964
2984
  {
2965
2985
  filters: s,
2966
2986
  sort: i,
2967
2987
  options: { limit: 30 },
2968
2988
  allowNewMessagesFromUnfilteredChannels: a,
2969
2989
  channelRenderFilterFn: c,
2970
- Paginator: ms,
2971
- Preview: fn,
2990
+ Paginator: hs,
2991
+ Preview: gn,
2972
2992
  EmptyStateIndicator: o
2973
2993
  },
2974
2994
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -2977,27 +2997,27 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2977
2997
  );
2978
2998
  }
2979
2999
  );
2980
- rr.displayName = "ChannelList";
2981
- const ir = /^([a-z][a-z0-9+.-]*):/i, lr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2982
- function at(e) {
3000
+ or.displayName = "ChannelList";
3001
+ const cr = /^([a-z][a-z0-9+.-]*):/i, dr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3002
+ function rt(e) {
2983
3003
  if (typeof e != "string") return;
2984
3004
  const t = e.trim();
2985
3005
  if (t === "") return;
2986
- const s = ir.exec(t);
3006
+ const s = cr.exec(t);
2987
3007
  if (s) {
2988
3008
  const a = s[1].toLowerCase();
2989
- return lr.has(a) ? t : void 0;
3009
+ return dr.has(a) ? t : void 0;
2990
3010
  }
2991
3011
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2992
3012
  }
2993
- const or = {
3013
+ const ur = {
2994
3014
  dark: "bg-white text-[#121110] hover:bg-white/90",
2995
3015
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2996
- }, cr = ({ variant: e, cta: t }) => {
3016
+ }, mr = ({ variant: e, cta: t }) => {
2997
3017
  const s = k(
2998
3018
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2999
- or[e]
3000
- ), a = at(t.href);
3019
+ ur[e]
3020
+ ), a = rt(t.href);
3001
3021
  return a ? /* @__PURE__ */ n(
3002
3022
  "a",
3003
3023
  {
@@ -3023,13 +3043,13 @@ const or = {
3023
3043
  children: t.label
3024
3044
  }
3025
3045
  );
3026
- }, dr = {
3046
+ }, hr = {
3027
3047
  dark: "text-white",
3028
3048
  light: "text-black/90"
3029
- }, ur = "text-white/30", mr = {
3049
+ }, fr = "text-white/30", gr = {
3030
3050
  dark: "text-white/55",
3031
3051
  light: "text-black/55"
3032
- }, rt = ({
3052
+ }, it = ({
3033
3053
  variant: e,
3034
3054
  title: t,
3035
3055
  placeholderTitle: s,
@@ -3041,12 +3061,12 @@ const or = {
3041
3061
  }) => {
3042
3062
  const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
3043
3063
  if (!g && !m && !c && !b) return null;
3044
- const w = k(
3064
+ const v = k(
3045
3065
  "truncate text-base font-medium leading-6",
3046
- d && !t ? ur : dr[e]
3066
+ d && !t ? fr : hr[e]
3047
3067
  ), p = k(
3048
3068
  "truncate text-xs leading-4",
3049
- mr[e]
3069
+ gr[e]
3050
3070
  );
3051
3071
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
3052
3072
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -3054,7 +3074,7 @@ const or = {
3054
3074
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
3055
3075
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3056
3076
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
3057
- /* @__PURE__ */ n("p", { className: k("min-w-0", w), children: u })
3077
+ /* @__PURE__ */ n("p", { className: k("min-w-0", v), children: u })
3058
3078
  ] }),
3059
3079
  m && /* @__PURE__ */ n("p", { className: p, children: a })
3060
3080
  ] }),
@@ -3062,16 +3082,16 @@ const or = {
3062
3082
  ] }),
3063
3083
  o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3064
3084
  ] }),
3065
- l && /* @__PURE__ */ n(cr, { variant: e, cta: l })
3085
+ l && /* @__PURE__ */ n(mr, { variant: e, cta: l })
3066
3086
  ] });
3067
- }, hr = k(
3087
+ }, pr = k(
3068
3088
  "relative block w-[280px] select-none overflow-hidden rounded-md",
3069
3089
  // 1px hairline border that sits flush with the card chrome — matches
3070
3090
  // the messaging design system's "small border around link attachments"
3071
3091
  // treatment from the mobile spec. The drop shadow remains for depth.
3072
3092
  "border border-black/[0.08]",
3073
3093
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
3074
- ), Le = ({
3094
+ ), De = ({
3075
3095
  variant: e,
3076
3096
  children: t,
3077
3097
  href: s,
@@ -3083,7 +3103,7 @@ const or = {
3083
3103
  "data-testid": d
3084
3104
  }) => {
3085
3105
  const u = s != null || a != null, g = k(
3086
- hr,
3106
+ pr,
3087
3107
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3088
3108
  // `focus-ring` is a design-system utility from the component-library
3089
3109
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -3131,17 +3151,17 @@ const or = {
3131
3151
  ]
3132
3152
  }
3133
3153
  );
3134
- }, fr = {
3154
+ }, br = {
3135
3155
  dark: "bg-white/10",
3136
3156
  light: "bg-black/5"
3137
- }, gr = {
3157
+ }, vr = {
3138
3158
  dark: "size-16 text-white/25",
3139
3159
  light: "size-16 text-black/25"
3140
- }, ze = (e, t) => !!t && !!e && ie(e) === "audio", gn = (e, t) => {
3160
+ }, Oe = (e, t) => !!t && !!e && ie(e) === "audio", pn = (e, t) => {
3141
3161
  if (!t || !e) return !1;
3142
3162
  const s = ie(e);
3143
3163
  return s === "video" || s === "audio";
3144
- }, it = "bg-[#F2F3F4]", De = ({
3164
+ }, lt = "bg-[#F2F3F4]", Pe = ({
3145
3165
  variant: e,
3146
3166
  thumbnailUrl: t,
3147
3167
  sourceUrl: s,
@@ -3151,7 +3171,7 @@ const or = {
3151
3171
  topRight: l
3152
3172
  }) => {
3153
3173
  const o = ie(r), d = !!s && o === "video";
3154
- return ze(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3174
+ return Oe(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3155
3175
  "audio",
3156
3176
  {
3157
3177
  src: s,
@@ -3192,10 +3212,10 @@ const or = {
3192
3212
  {
3193
3213
  className: k(
3194
3214
  "flex h-full w-full items-center justify-center",
3195
- fr[e]
3215
+ br[e]
3196
3216
  ),
3197
3217
  children: ce(r, {
3198
- className: gr[e],
3218
+ className: vr[e],
3199
3219
  weight: "regular"
3200
3220
  })
3201
3221
  }
@@ -3205,7 +3225,7 @@ const or = {
3205
3225
  ]
3206
3226
  }
3207
3227
  );
3208
- }, pr = ({
3228
+ }, xr = ({
3209
3229
  title: e,
3210
3230
  placeholderTitle: t,
3211
3231
  description: s,
@@ -3219,28 +3239,28 @@ const or = {
3219
3239
  onDismiss: g,
3220
3240
  onEditClick: m
3221
3241
  }) => {
3222
- const f = o === "classic", c = ze(r, l), b = g ? /* @__PURE__ */ n(
3242
+ const f = o === "classic", c = Oe(r, l), b = g ? /* @__PURE__ */ n(
3223
3243
  "button",
3224
3244
  {
3225
3245
  type: "button",
3226
3246
  onClick: g,
3227
3247
  "aria-label": "Dismiss attachment",
3228
3248
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3229
- children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
3249
+ children: /* @__PURE__ */ n(ze, { className: "size-3", weight: "bold" })
3230
3250
  }
3231
- ) : void 0, N = m ? /* @__PURE__ */ n(
3251
+ ) : void 0, w = m ? /* @__PURE__ */ n(
3232
3252
  "button",
3233
3253
  {
3234
3254
  type: "button",
3235
3255
  onClick: m,
3236
3256
  "aria-label": "Edit attachment",
3237
3257
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3238
- children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
3258
+ children: /* @__PURE__ */ n(Ds, { className: "size-5", weight: "regular" })
3239
3259
  }
3240
3260
  ) : void 0;
3241
- return c ? /* @__PURE__ */ n(Le, { variant: "dark", bgClassName: it, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3261
+ return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: lt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3242
3262
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3243
- De,
3263
+ Pe,
3244
3264
  {
3245
3265
  variant: "dark",
3246
3266
  sourceUrl: l,
@@ -3250,13 +3270,13 @@ const or = {
3250
3270
  ) }),
3251
3271
  b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3252
3272
  ] }) }) : /* @__PURE__ */ h(
3253
- Le,
3273
+ De,
3254
3274
  {
3255
3275
  variant: "dark",
3256
3276
  topRight: f ? b : void 0,
3257
3277
  children: [
3258
3278
  !f && /* @__PURE__ */ n(
3259
- De,
3279
+ Pe,
3260
3280
  {
3261
3281
  variant: "dark",
3262
3282
  thumbnailUrl: i,
@@ -3267,7 +3287,7 @@ const or = {
3267
3287
  }
3268
3288
  ),
3269
3289
  /* @__PURE__ */ n(
3270
- rt,
3290
+ it,
3271
3291
  {
3272
3292
  variant: "dark",
3273
3293
  title: e,
@@ -3276,13 +3296,13 @@ const or = {
3276
3296
  url: a,
3277
3297
  appIcon: d,
3278
3298
  cta: u,
3279
- trailingAction: N
3299
+ trailingAction: w
3280
3300
  }
3281
3301
  )
3282
3302
  ]
3283
3303
  }
3284
3304
  );
3285
- }, br = ({
3305
+ }, wr = ({
3286
3306
  title: e,
3287
3307
  description: t,
3288
3308
  url: s,
@@ -3294,15 +3314,15 @@ const or = {
3294
3314
  cta: d,
3295
3315
  onClick: u
3296
3316
  }) => {
3297
- const g = gn(a, i), m = at(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? it : void 0, N = d && u ? {
3317
+ const g = pn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = Oe(a, i) ? lt : void 0, w = d && u ? {
3298
3318
  ...d,
3299
3319
  onClick: () => {
3300
- var w;
3301
- u(), (w = d.onClick) == null || w.call(d);
3320
+ var v;
3321
+ u(), (v = d.onClick) == null || v.call(d);
3302
3322
  }
3303
3323
  } : d;
3304
3324
  return /* @__PURE__ */ h(
3305
- Le,
3325
+ De,
3306
3326
  {
3307
3327
  variant: "light",
3308
3328
  href: f,
@@ -3312,7 +3332,7 @@ const or = {
3312
3332
  "data-testid": "link-attachment",
3313
3333
  children: [
3314
3334
  l === "featured" && /* @__PURE__ */ n(
3315
- De,
3335
+ Pe,
3316
3336
  {
3317
3337
  variant: "light",
3318
3338
  thumbnailUrl: r,
@@ -3322,20 +3342,20 @@ const or = {
3322
3342
  }
3323
3343
  ),
3324
3344
  /* @__PURE__ */ n(
3325
- rt,
3345
+ it,
3326
3346
  {
3327
3347
  variant: "light",
3328
3348
  title: e,
3329
3349
  description: t,
3330
3350
  url: s,
3331
3351
  appIcon: o,
3332
- cta: N
3352
+ cta: w
3333
3353
  }
3334
3354
  )
3335
3355
  ]
3336
3356
  }
3337
3357
  );
3338
- }, vr = ({
3358
+ }, Nr = ({
3339
3359
  title: e,
3340
3360
  placeholderTitle: t,
3341
3361
  description: s,
@@ -3348,17 +3368,17 @@ const or = {
3348
3368
  cta: u,
3349
3369
  onClick: g
3350
3370
  }) => {
3351
- const m = gn(r, l), f = at(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3371
+ const m = pn(r, l), f = rt(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3352
3372
  return /* @__PURE__ */ h(
3353
- Le,
3373
+ De,
3354
3374
  {
3355
3375
  variant: "dark",
3356
3376
  href: c,
3357
3377
  onClick: b,
3358
- bgClassName: ze(r, l) ? it : void 0,
3378
+ bgClassName: Oe(r, l) ? lt : void 0,
3359
3379
  children: [
3360
3380
  o === "featured" && /* @__PURE__ */ n(
3361
- De,
3381
+ Pe,
3362
3382
  {
3363
3383
  variant: "dark",
3364
3384
  thumbnailUrl: i,
@@ -3368,7 +3388,7 @@ const or = {
3368
3388
  }
3369
3389
  ),
3370
3390
  /* @__PURE__ */ n(
3371
- rt,
3391
+ it,
3372
3392
  {
3373
3393
  variant: "dark",
3374
3394
  title: e,
@@ -3382,20 +3402,20 @@ const or = {
3382
3402
  ]
3383
3403
  }
3384
3404
  );
3385
- }, Ii = {
3386
- Composer: pr,
3387
- Sent: vr,
3388
- Received: br
3389
- }, xr = {
3405
+ }, Ai = {
3406
+ Composer: xr,
3407
+ Sent: Nr,
3408
+ Received: wr
3409
+ }, _r = {
3390
3410
  dark: "bg-[#121110]",
3391
3411
  light: "bg-[#e9eaed]"
3392
- }, wr = {
3412
+ }, yr = {
3393
3413
  dark: "text-white",
3394
3414
  light: "text-[#080707]"
3395
- }, Nr = {
3415
+ }, kr = {
3396
3416
  dark: "border-white/[0.08]",
3397
3417
  light: "border-black/[0.08]"
3398
- }, _r = (e) => e === "dark" ? "sender" : "receiver", yr = {
3418
+ }, Cr = (e) => e === "dark" ? "sender" : "receiver", Er = {
3399
3419
  sender: {
3400
3420
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3401
3421
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3408,7 +3428,7 @@ const or = {
3408
3428
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3409
3429
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3410
3430
  }
3411
- }, ke = ({
3431
+ }, Ce = ({
3412
3432
  variant: e,
3413
3433
  text: t,
3414
3434
  bordered: s = !0,
@@ -3417,7 +3437,7 @@ const or = {
3417
3437
  children: i,
3418
3438
  "data-testid": l
3419
3439
  }) => {
3420
- const o = t != null && t !== "", d = yr[_r(e)][a];
3440
+ const o = t != null && t !== "", d = Er[Cr(e)][a];
3421
3441
  return /* @__PURE__ */ h(
3422
3442
  "div",
3423
3443
  {
@@ -3432,10 +3452,10 @@ const or = {
3432
3452
  // as the surrounding `CustomMessage` text bubbles.
3433
3453
  "relative w-[280px] overflow-hidden px-2 py-2",
3434
3454
  d,
3435
- xr[e],
3436
- wr[e],
3455
+ _r[e],
3456
+ yr[e],
3437
3457
  s && "border",
3438
- s && Nr[e],
3458
+ s && kr[e],
3439
3459
  r
3440
3460
  ),
3441
3461
  children: [
@@ -3460,7 +3480,7 @@ const or = {
3460
3480
  ]
3461
3481
  }
3462
3482
  );
3463
- }, Ce = ({
3483
+ }, Ee = ({
3464
3484
  onClick: e,
3465
3485
  variant: t = "overlay",
3466
3486
  ariaLabel: s = "Dismiss attachment"
@@ -3476,18 +3496,18 @@ const or = {
3476
3496
  "flex size-6 items-center justify-center rounded-full text-white",
3477
3497
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3478
3498
  ),
3479
- children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
3499
+ children: /* @__PURE__ */ n(ze, { className: "size-3", weight: "bold" })
3480
3500
  }
3481
- ), Ee = (e) => e === "received" ? "light" : "dark", Si = ({
3501
+ ), Ie = (e) => e === "received" ? "light" : "dark", Mi = ({
3482
3502
  firstOfGroup: e,
3483
3503
  endOfGroup: t,
3484
3504
  groupedByUser: s
3485
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", kr = ({
3505
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ir = ({
3486
3506
  src: e,
3487
3507
  mimeType: t,
3488
3508
  filename: s,
3489
3509
  items: a
3490
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3510
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Sr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3491
3511
  /* @__PURE__ */ n(
3492
3512
  "audio",
3493
3513
  {
@@ -3499,7 +3519,7 @@ const or = {
3499
3519
  }
3500
3520
  ),
3501
3521
  s ?? null
3502
- ] }), lt = ({
3522
+ ] }), ot = ({
3503
3523
  state: e,
3504
3524
  src: t,
3505
3525
  mimeType: s,
@@ -3510,41 +3530,41 @@ const or = {
3510
3530
  preload: o,
3511
3531
  onDismiss: d
3512
3532
  }) => {
3513
- const u = Ee(e), g = e === "composer" && !!d, m = kr({ src: t, mimeType: s, filename: a, items: r });
3533
+ const u = Ie(e), g = e === "composer" && !!d, m = Ir({ src: t, mimeType: s, filename: a, items: r });
3514
3534
  if (m.length === 0)
3515
3535
  return null;
3516
3536
  const f = o ?? (m.length > 1 ? "none" : "metadata");
3517
3537
  return /* @__PURE__ */ n(
3518
- ke,
3538
+ Ce,
3519
3539
  {
3520
3540
  variant: u,
3521
3541
  text: i,
3522
3542
  groupPosition: l,
3523
3543
  "data-testid": "audio-attachment",
3524
3544
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
3525
- Cr,
3545
+ Sr,
3526
3546
  {
3527
3547
  item: c,
3528
3548
  preload: f,
3529
3549
  trailingAction: (
3530
3550
  // Composer only supports a single attachment, so the
3531
3551
  // dismiss control sits on the only player.
3532
- g && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3552
+ g && b === 0 ? /* @__PURE__ */ n(Ee, { onClick: d, variant: "inline" }) : void 0
3533
3553
  )
3534
3554
  },
3535
3555
  `${c.src}-${b}`
3536
3556
  )) })
3537
3557
  }
3538
3558
  );
3539
- }, Er = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Tr = {
3540
- Composer: Er,
3541
- Sent: Ir,
3542
- Received: Sr
3559
+ }, Tr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Ar = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Mr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), Rr = {
3560
+ Composer: Tr,
3561
+ Sent: Ar,
3562
+ Received: Mr
3543
3563
  };
3544
- function Ar(e) {
3564
+ function Lr(e) {
3545
3565
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
3546
3566
  }
3547
- const Mr = {
3567
+ const Dr = {
3548
3568
  pdf: "PDF",
3549
3569
  doc: "DOC",
3550
3570
  xls: "XLS",
@@ -3554,7 +3574,7 @@ const Mr = {
3554
3574
  text: "TXT",
3555
3575
  markdown: "MD"
3556
3576
  };
3557
- function Rr(e, t) {
3577
+ function Pr(e, t) {
3558
3578
  if (t) {
3559
3579
  const r = t.lastIndexOf(".");
3560
3580
  if (r > 0 && r < t.length - 1) {
@@ -3564,7 +3584,7 @@ function Rr(e, t) {
3564
3584
  }
3565
3585
  if (!e) return;
3566
3586
  if (ie(e) === "document") {
3567
- const r = tn(e), i = Mr[r];
3587
+ const r = nn(e), i = Dr[r];
3568
3588
  if (i) return i;
3569
3589
  if (e === "application/octet-stream") return;
3570
3590
  }
@@ -3572,8 +3592,8 @@ function Rr(e, t) {
3572
3592
  if (!(!a || a === "*"))
3573
3593
  return a.toUpperCase();
3574
3594
  }
3575
- function Lr(e, t, s) {
3576
- const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3595
+ function zr(e, t, s) {
3596
+ const a = Pr(e, t), r = typeof s == "number" && s > 0 ? Lr(s) : void 0;
3577
3597
  return [a, r].filter(Boolean).join(" · ") || void 0;
3578
3598
  }
3579
3599
  function ae(e) {
@@ -3584,16 +3604,16 @@ function ae(e) {
3584
3604
  return "download";
3585
3605
  }
3586
3606
  }
3587
- const Dr = {
3607
+ const Or = {
3588
3608
  dark: "text-white/55",
3589
3609
  light: "text-black/65"
3590
- }, Pr = {
3610
+ }, $r = {
3591
3611
  dark: "bg-white/10",
3592
3612
  light: "bg-black/5"
3593
- }, zr = {
3613
+ }, Fr = {
3594
3614
  dark: "text-white/85",
3595
3615
  light: "text-black/85"
3596
- }, pn = ({
3616
+ }, bn = ({
3597
3617
  variant: e,
3598
3618
  filename: t,
3599
3619
  title: s,
@@ -3603,16 +3623,16 @@ const Dr = {
3603
3623
  activateLabel: l,
3604
3624
  trailingAction: o
3605
3625
  }) => {
3606
- const d = s ?? t ?? "File", u = Lr(a, t, r), g = /* @__PURE__ */ n(
3626
+ const d = s ?? t ?? "File", u = zr(a, t, r), g = /* @__PURE__ */ n(
3607
3627
  "div",
3608
3628
  {
3609
3629
  className: k(
3610
3630
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3611
- Pr[e]
3631
+ $r[e]
3612
3632
  ),
3613
3633
  "aria-hidden": !0,
3614
3634
  children: ce(a, {
3615
- className: k("size-6", zr[e]),
3635
+ className: k("size-6", Fr[e]),
3616
3636
  weight: "regular"
3617
3637
  })
3618
3638
  }
@@ -3623,7 +3643,7 @@ const Dr = {
3623
3643
  {
3624
3644
  className: k(
3625
3645
  "truncate text-xs leading-4",
3626
- Dr[e]
3646
+ Or[e]
3627
3647
  ),
3628
3648
  children: u
3629
3649
  }
@@ -3652,7 +3672,7 @@ const Dr = {
3652
3672
  o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3653
3673
  ] });
3654
3674
  };
3655
- async function bn(e, t) {
3675
+ async function vn(e, t) {
3656
3676
  const s = t ?? ae(e);
3657
3677
  try {
3658
3678
  const a = await fetch(e, { mode: "cors" });
@@ -3666,14 +3686,14 @@ async function bn(e, t) {
3666
3686
  }
3667
3687
  }
3668
3688
  }
3669
- const Or = ({
3689
+ const Br = ({
3670
3690
  src: e,
3671
3691
  filename: t,
3672
3692
  fileSize: s,
3673
3693
  mimeType: a,
3674
3694
  title: r,
3675
3695
  items: i
3676
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
3696
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Ur = ({
3677
3697
  variant: e,
3678
3698
  item: t,
3679
3699
  index: s,
@@ -3682,7 +3702,7 @@ const Or = ({
3682
3702
  }) => {
3683
3703
  const i = t.filename ?? ae(t.src);
3684
3704
  return /* @__PURE__ */ n(
3685
- pn,
3705
+ bn,
3686
3706
  {
3687
3707
  variant: e,
3688
3708
  filename: i,
@@ -3694,7 +3714,7 @@ const Or = ({
3694
3714
  trailingAction: r
3695
3715
  }
3696
3716
  );
3697
- }, ot = ({
3717
+ }, ct = ({
3698
3718
  state: e,
3699
3719
  src: t,
3700
3720
  filename: s,
@@ -3707,23 +3727,23 @@ const Or = ({
3707
3727
  onClick: u,
3708
3728
  onDismiss: g
3709
3729
  }) => {
3710
- const m = Ee(e), f = e === "composer" && !!g, c = Or({
3730
+ const m = Ie(e), f = e === "composer" && !!g, c = Br({
3711
3731
  src: t,
3712
3732
  filename: s,
3713
3733
  fileSize: a,
3714
3734
  mimeType: r,
3715
3735
  title: i,
3716
3736
  items: l
3717
- }), b = (w) => {
3718
- if ((u == null ? void 0 : u(w)) === !1) return;
3719
- const p = c[w];
3737
+ }), b = (v) => {
3738
+ if ((u == null ? void 0 : u(v)) === !1) return;
3739
+ const p = c[v];
3720
3740
  if (!p) return;
3721
- const v = p.filename ?? ae(p.src);
3722
- bn(p.src, v);
3741
+ const N = p.filename ?? ae(p.src);
3742
+ vn(p.src, N);
3723
3743
  };
3724
3744
  if (c.length === 0)
3725
3745
  return null;
3726
- const N = /* @__PURE__ */ n(
3746
+ const w = /* @__PURE__ */ n(
3727
3747
  "span",
3728
3748
  {
3729
3749
  className: k(
@@ -3731,34 +3751,34 @@ const Or = ({
3731
3751
  m === "dark" ? "text-white/70" : "text-black/70"
3732
3752
  ),
3733
3753
  "aria-hidden": !0,
3734
- children: /* @__PURE__ */ n(Ne, { className: "size-5", weight: "bold" })
3754
+ children: /* @__PURE__ */ n(_e, { className: "size-5", weight: "bold" })
3735
3755
  }
3736
3756
  );
3737
3757
  return /* @__PURE__ */ n(
3738
- ke,
3758
+ Ce,
3739
3759
  {
3740
3760
  variant: m,
3741
3761
  text: o,
3742
3762
  groupPosition: d,
3743
3763
  "data-testid": "file-attachment",
3744
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, p) => /* @__PURE__ */ n(
3745
- $r,
3764
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
3765
+ Ur,
3746
3766
  {
3747
3767
  variant: m,
3748
- item: w,
3768
+ item: v,
3749
3769
  index: p,
3750
3770
  onActivate: b,
3751
- trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
3771
+ trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ee, { onClick: g, variant: "inline" }) : w
3752
3772
  },
3753
- `${w.src}-${p}`
3773
+ `${v.src}-${p}`
3754
3774
  )) })
3755
3775
  }
3756
3776
  );
3757
- }, Fr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), jr = {
3758
- Composer: Fr,
3759
- Sent: Br,
3760
- Received: Ur
3761
- }, ct = ({
3777
+ }, jr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), Vr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), Gr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), Hr = {
3778
+ Composer: jr,
3779
+ Sent: Vr,
3780
+ Received: Gr
3781
+ }, dt = ({
3762
3782
  onPrev: e,
3763
3783
  onNext: t,
3764
3784
  prevLabel: s = "Previous",
@@ -3771,7 +3791,7 @@ const Or = ({
3771
3791
  onClick: e,
3772
3792
  "aria-label": s,
3773
3793
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3774
- children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3794
+ children: /* @__PURE__ */ n(Ps, { size: 20, weight: "bold", "aria-hidden": !0 })
3775
3795
  }
3776
3796
  ),
3777
3797
  /* @__PURE__ */ n(
@@ -3781,10 +3801,10 @@ const Or = ({
3781
3801
  onClick: t,
3782
3802
  "aria-label": a,
3783
3803
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3784
- children: /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3804
+ children: /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
3785
3805
  }
3786
3806
  )
3787
- ] }), vn = ({
3807
+ ] }), xn = ({
3788
3808
  url: e,
3789
3809
  filename: t,
3790
3810
  variant: s = "pill",
@@ -3793,9 +3813,9 @@ const Or = ({
3793
3813
  tone: i = "dark",
3794
3814
  onTriggered: l
3795
3815
  }) => {
3796
- const [o, d] = $(!1), u = J(
3816
+ const [o, d] = $(!1), u = W(
3797
3817
  (c) => {
3798
- c.stopPropagation(), !o && (d(!0), bn(e, t).catch(() => {
3818
+ c.stopPropagation(), !o && (d(!0), vn(e, t).catch(() => {
3799
3819
  }).finally(() => {
3800
3820
  d(!1), l == null || l();
3801
3821
  }));
@@ -3820,14 +3840,14 @@ const Or = ({
3820
3840
  }[i]
3821
3841
  ),
3822
3842
  children: o ? /* @__PURE__ */ n(
3823
- we,
3843
+ Ne,
3824
3844
  {
3825
3845
  className: "size-4 animate-spin",
3826
3846
  weight: "bold",
3827
3847
  "aria-hidden": !0
3828
3848
  }
3829
3849
  ) : /* @__PURE__ */ n(
3830
- Ne,
3850
+ _e,
3831
3851
  {
3832
3852
  className: "size-5 shrink-0",
3833
3853
  weight: "bold",
@@ -3843,7 +3863,7 @@ const Or = ({
3843
3863
  disabled: o,
3844
3864
  "aria-label": a,
3845
3865
  className: "mes-media-viewer__action",
3846
- children: o ? /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
3866
+ children: o ? /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(_e, { size: 20, weight: "bold", "aria-hidden": !0 })
3847
3867
  }
3848
3868
  ) : /* @__PURE__ */ h(
3849
3869
  "button",
@@ -3858,34 +3878,34 @@ const Or = ({
3858
3878
  ),
3859
3879
  children: [
3860
3880
  o ? /* @__PURE__ */ n(
3861
- we,
3881
+ Ne,
3862
3882
  {
3863
3883
  className: "size-4 animate-spin",
3864
3884
  weight: "bold",
3865
3885
  "aria-hidden": !0
3866
3886
  }
3867
- ) : /* @__PURE__ */ n(Ne, { ...f, "aria-hidden": !0 }),
3887
+ ) : /* @__PURE__ */ n(_e, { ...f, "aria-hidden": !0 }),
3868
3888
  g ? null : a
3869
3889
  ]
3870
3890
  }
3871
3891
  );
3872
- }, Ve = (e, t, s) => Math.min(Math.max(e, t), s), dt = ({
3892
+ }, Ge = (e, t, s) => Math.min(Math.max(e, t), s), ut = ({
3873
3893
  length: e,
3874
3894
  initialIndex: t,
3875
3895
  open: s
3876
3896
  }) => {
3877
- const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3878
- K(() => {
3879
- s && i(Ve(t, 0, Math.max(e - 1, 0)));
3880
- }, [s, t, e]), K(() => {
3881
- i((d) => Ve(d, 0, Math.max(e - 1, 0)));
3897
+ const a = Ge(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3898
+ q(() => {
3899
+ s && i(Ge(t, 0, Math.max(e - 1, 0)));
3900
+ }, [s, t, e]), q(() => {
3901
+ i((d) => Ge(d, 0, Math.max(e - 1, 0)));
3882
3902
  }, [e]);
3883
- const l = J(() => {
3903
+ const l = W(() => {
3884
3904
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3885
- }, [e]), o = J(() => {
3905
+ }, [e]), o = W(() => {
3886
3906
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3887
3907
  }, [e]);
3888
- return K(() => {
3908
+ return q(() => {
3889
3909
  if (!s || e <= 1) return;
3890
3910
  const d = (u) => {
3891
3911
  if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
@@ -3894,7 +3914,7 @@ const Or = ({
3894
3914
  };
3895
3915
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3896
3916
  }, [s, e, l, o]), { index: r, prev: l, next: o };
3897
- }, ut = ({
3917
+ }, mt = ({
3898
3918
  open: e,
3899
3919
  onClose: t,
3900
3920
  ariaLabel: s,
@@ -3903,8 +3923,8 @@ const Or = ({
3903
3923
  children: i,
3904
3924
  "data-testid": l
3905
3925
  }) => {
3906
- const o = Y(null), d = Y(null);
3907
- return K(() => {
3926
+ const o = H(null), d = H(null);
3927
+ return q(() => {
3908
3928
  var f;
3909
3929
  const m = o.current;
3910
3930
  if (m) {
@@ -3975,7 +3995,7 @@ const Or = ({
3975
3995
  onClick: t,
3976
3996
  "aria-label": "Close viewer",
3977
3997
  className: "mes-media-viewer__action",
3978
- children: /* @__PURE__ */ n(Pe, { size: 20, weight: "bold", "aria-hidden": !0 })
3998
+ children: /* @__PURE__ */ n(ze, { size: 20, weight: "bold", "aria-hidden": !0 })
3979
3999
  }
3980
4000
  )
3981
4001
  ] })
@@ -3984,13 +4004,13 @@ const Or = ({
3984
4004
  ]
3985
4005
  }
3986
4006
  );
3987
- }, xn = ({
4007
+ }, wn = ({
3988
4008
  open: e,
3989
4009
  items: t,
3990
4010
  initialIndex: s = 0,
3991
4011
  onClose: a
3992
4012
  }) => {
3993
- const { index: r, prev: i, next: l } = dt({
4013
+ const { index: r, prev: i, next: l } = ut({
3994
4014
  length: t.length,
3995
4015
  initialIndex: s,
3996
4016
  open: e
@@ -3999,14 +4019,14 @@ const Or = ({
3999
4019
  [o]
4000
4020
  );
4001
4021
  return o ? /* @__PURE__ */ h(
4002
- ut,
4022
+ mt,
4003
4023
  {
4004
4024
  open: e,
4005
4025
  onClose: a,
4006
4026
  ariaLabel: d,
4007
4027
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
4008
4028
  actions: /* @__PURE__ */ n(
4009
- vn,
4029
+ xn,
4010
4030
  {
4011
4031
  url: o.src,
4012
4032
  filename: d,
@@ -4029,7 +4049,7 @@ const Or = ({
4029
4049
  `${r}:${o.src}`
4030
4050
  ),
4031
4051
  t.length > 1 ? /* @__PURE__ */ n(
4032
- ct,
4052
+ dt,
4033
4053
  {
4034
4054
  onPrev: i,
4035
4055
  onNext: l,
@@ -4040,7 +4060,7 @@ const Or = ({
4040
4060
  ]
4041
4061
  }
4042
4062
  ) : null;
4043
- }, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", wn = ({
4063
+ }, Yr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Nn = ({
4044
4064
  tiles: e,
4045
4065
  onTileActivate: t,
4046
4066
  maxVisible: s = 4,
@@ -4049,7 +4069,7 @@ const Or = ({
4049
4069
  const r = e.length;
4050
4070
  if (r === 0) return null;
4051
4071
  const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, g) => {
4052
- const m = k(Vr, "h-full w-full");
4072
+ const m = k(Yr, "h-full w-full");
4053
4073
  return t ? /* @__PURE__ */ h(
4054
4074
  "button",
4055
4075
  {
@@ -4110,15 +4130,15 @@ const Or = ({
4110
4130
  })
4111
4131
  }
4112
4132
  );
4113
- }, Ie = (e) => {
4114
- const [t, s] = $(!1), [a, r] = $(0), i = J(
4133
+ }, Se = (e) => {
4134
+ const [t, s] = $(!1), [a, r] = $(0), i = W(
4115
4135
  (o) => {
4116
4136
  (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4117
4137
  },
4118
4138
  [e]
4119
- ), l = J(() => s(!1), []);
4139
+ ), l = W(() => s(!1), []);
4120
4140
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4121
- }, Gr = (e, t, s, a) => ({
4141
+ }, qr = (e, t, s, a) => ({
4122
4142
  ariaLabel: `Open image ${t + 1} of ${s}`,
4123
4143
  content: /* @__PURE__ */ n(
4124
4144
  "img",
@@ -4133,16 +4153,16 @@ const Or = ({
4133
4153
  className: "absolute inset-0 size-full rounded-md object-cover"
4134
4154
  }
4135
4155
  )
4136
- }), Hr = ({
4156
+ }), Wr = ({
4137
4157
  src: e,
4138
4158
  alt: t,
4139
4159
  items: s
4140
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Nn = (e, t) => e.map((s, a) => ({
4160
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], _n = (e, t) => e.map((s, a) => ({
4141
4161
  src: s.src,
4142
4162
  alt: s.alt,
4143
4163
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4144
- })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4145
- const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Ie(
4164
+ })), Xr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4165
+ const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Se(
4146
4166
  r
4147
4167
  );
4148
4168
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4166,18 +4186,18 @@ const Or = ({
4166
4186
  )
4167
4187
  }
4168
4188
  ),
4169
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: i }) }) : null,
4189
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ee, { onClick: i }) }) : null,
4170
4190
  /* @__PURE__ */ n(
4171
- xn,
4191
+ wn,
4172
4192
  {
4173
4193
  open: l,
4174
- items: Nn([{ src: e, alt: t }], s),
4194
+ items: _n([{ src: e, alt: t }], s),
4175
4195
  initialIndex: o,
4176
4196
  onClose: u
4177
4197
  }
4178
4198
  )
4179
4199
  ] });
4180
- }, _n = ({
4200
+ }, yn = ({
4181
4201
  state: e,
4182
4202
  src: t,
4183
4203
  alt: s,
@@ -4188,28 +4208,28 @@ const Or = ({
4188
4208
  loading: o = "lazy",
4189
4209
  onClick: d
4190
4210
  }) => {
4191
- const u = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Ie(
4211
+ const u = Wr({ src: t, alt: s, items: r }), g = Ie(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Se(
4192
4212
  d
4193
4213
  );
4194
4214
  if (u.length === 0)
4195
4215
  return null;
4196
- const N = u.map(
4197
- (w, p) => Gr(w, p, u.length, o)
4216
+ const w = u.map(
4217
+ (v, p) => qr(v, p, u.length, o)
4198
4218
  );
4199
4219
  return /* @__PURE__ */ h(
4200
- ke,
4220
+ Ce,
4201
4221
  {
4202
4222
  variant: g,
4203
4223
  text: i,
4204
4224
  groupPosition: l,
4205
4225
  "data-testid": "image-attachment",
4206
4226
  children: [
4207
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: N, onTileActivate: c }) }),
4227
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Nn, { tiles: w, onTileActivate: c }) }),
4208
4228
  /* @__PURE__ */ n(
4209
- xn,
4229
+ wn,
4210
4230
  {
4211
4231
  open: m,
4212
- items: Nn(u, a),
4232
+ items: _n(u, a),
4213
4233
  initialIndex: f,
4214
4234
  onClose: b
4215
4235
  }
@@ -4217,17 +4237,17 @@ const Or = ({
4217
4237
  ]
4218
4238
  }
4219
4239
  );
4220
- }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
4221
- Composer: qr,
4222
- Sent: Wr,
4223
- Received: Xr
4224
- }, Jr = ({
4240
+ }, Kr = (e) => /* @__PURE__ */ n(Xr, { ...e }), Jr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "received" }), Qr = {
4241
+ Composer: Kr,
4242
+ Sent: Jr,
4243
+ Received: Zr
4244
+ }, ei = ({
4225
4245
  open: e,
4226
4246
  items: t,
4227
4247
  initialIndex: s = 0,
4228
4248
  onClose: a
4229
4249
  }) => {
4230
- const { index: r, prev: i, next: l } = dt({
4250
+ const { index: r, prev: i, next: l } = ut({
4231
4251
  length: t.length,
4232
4252
  initialIndex: s,
4233
4253
  open: e
@@ -4235,11 +4255,11 @@ const Or = ({
4235
4255
  () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
4236
4256
  [o]
4237
4257
  ), u = re(
4238
- () => o ? Zr(o.src) : void 0,
4258
+ () => o ? ti(o.src) : void 0,
4239
4259
  [o]
4240
4260
  );
4241
4261
  return !o || !u ? null : /* @__PURE__ */ h(
4242
- ut,
4262
+ mt,
4243
4263
  {
4244
4264
  open: e,
4245
4265
  onClose: a,
@@ -4258,7 +4278,7 @@ const Or = ({
4258
4278
  `${r}:${o.src}`
4259
4279
  ),
4260
4280
  t.length > 1 ? /* @__PURE__ */ n(
4261
- ct,
4281
+ dt,
4262
4282
  {
4263
4283
  onPrev: i,
4264
4284
  onNext: l,
@@ -4269,16 +4289,16 @@ const Or = ({
4269
4289
  ]
4270
4290
  }
4271
4291
  );
4272
- }, Zr = (e) => {
4292
+ }, ti = (e) => {
4273
4293
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4274
4294
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4275
- }, Qr = ({
4295
+ }, ni = ({
4276
4296
  src: e,
4277
4297
  filename: t,
4278
4298
  fileSize: s,
4279
4299
  title: a,
4280
4300
  items: r
4281
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
4301
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], si = ({
4282
4302
  variant: e,
4283
4303
  item: t,
4284
4304
  index: s,
@@ -4287,7 +4307,7 @@ const Or = ({
4287
4307
  }) => {
4288
4308
  const i = t.filename ?? ae(t.src);
4289
4309
  return /* @__PURE__ */ n(
4290
- pn,
4310
+ bn,
4291
4311
  {
4292
4312
  variant: e,
4293
4313
  filename: i,
@@ -4299,7 +4319,7 @@ const Or = ({
4299
4319
  trailingAction: r
4300
4320
  }
4301
4321
  );
4302
- }, mt = ({
4322
+ }, ht = ({
4303
4323
  state: e,
4304
4324
  src: t,
4305
4325
  filename: s,
@@ -4311,28 +4331,28 @@ const Or = ({
4311
4331
  onClick: d,
4312
4332
  onDismiss: u
4313
4333
  }) => {
4314
- const g = Ee(e), m = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4334
+ const g = Ie(e), m = ni({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = Se(
4315
4335
  d
4316
- ), w = e === "composer" && !!u;
4336
+ ), v = e === "composer" && !!u;
4317
4337
  if (m.length === 0)
4318
4338
  return null;
4319
- const p = m.map((v) => ({
4320
- src: v.src,
4321
- filename: v.filename ?? ae(v.src)
4339
+ const p = m.map((N) => ({
4340
+ src: N.src,
4341
+ filename: N.filename ?? ae(N.src)
4322
4342
  }));
4323
4343
  return /* @__PURE__ */ h(
4324
- ke,
4344
+ Ce,
4325
4345
  {
4326
4346
  variant: g,
4327
4347
  text: l,
4328
4348
  groupPosition: o,
4329
4349
  "data-testid": "pdf-attachment",
4330
4350
  children: [
4331
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((v, A) => {
4332
- const T = v.filename ?? ae(v.src), E = w && A === 0 ? /* @__PURE__ */ n(Ce, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4333
- vn,
4351
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((N, _) => {
4352
+ const T = N.filename ?? ae(N.src), R = v && _ === 0 ? /* @__PURE__ */ n(Ee, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4353
+ xn,
4334
4354
  {
4335
- url: v.src,
4355
+ url: N.src,
4336
4356
  filename: T,
4337
4357
  variant: "inline",
4338
4358
  label: `Download ${T}`,
@@ -4340,40 +4360,40 @@ const Or = ({
4340
4360
  }
4341
4361
  );
4342
4362
  return /* @__PURE__ */ n(
4343
- ei,
4363
+ si,
4344
4364
  {
4345
4365
  variant: g,
4346
- item: v,
4347
- index: A,
4366
+ item: N,
4367
+ index: _,
4348
4368
  onActivate: b,
4349
- trailingAction: E
4369
+ trailingAction: R
4350
4370
  },
4351
- `${v.src}-${A}`
4371
+ `${N.src}-${_}`
4352
4372
  );
4353
4373
  }) }),
4354
4374
  /* @__PURE__ */ n(
4355
- Jr,
4375
+ ei,
4356
4376
  {
4357
4377
  open: f,
4358
4378
  items: p,
4359
4379
  initialIndex: c,
4360
- onClose: N
4380
+ onClose: w
4361
4381
  }
4362
4382
  )
4363
4383
  ]
4364
4384
  }
4365
4385
  );
4366
- }, ti = (e) => /* @__PURE__ */ n(mt, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(mt, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(mt, { ...e, state: "received" }), ai = {
4367
- Composer: ti,
4368
- Sent: ni,
4369
- Received: si
4370
- }, yn = ({
4386
+ }, ai = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), ri = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), ii = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), li = {
4387
+ Composer: ai,
4388
+ Sent: ri,
4389
+ Received: ii
4390
+ }, kn = ({
4371
4391
  open: e,
4372
4392
  items: t,
4373
4393
  initialIndex: s = 0,
4374
4394
  onClose: a
4375
4395
  }) => {
4376
- const { index: r, prev: i, next: l } = dt({
4396
+ const { index: r, prev: i, next: l } = ut({
4377
4397
  length: t.length,
4378
4398
  initialIndex: s,
4379
4399
  open: e
@@ -4382,7 +4402,7 @@ const Or = ({
4382
4402
  [o]
4383
4403
  );
4384
4404
  return o ? /* @__PURE__ */ h(
4385
- ut,
4405
+ mt,
4386
4406
  {
4387
4407
  open: e,
4388
4408
  onClose: a,
@@ -4406,7 +4426,7 @@ const Or = ({
4406
4426
  `${r}:${o.src}`
4407
4427
  ),
4408
4428
  t.length > 1 ? /* @__PURE__ */ n(
4409
- ct,
4429
+ dt,
4410
4430
  {
4411
4431
  onPrev: i,
4412
4432
  onNext: l,
@@ -4417,7 +4437,7 @@ const Or = ({
4417
4437
  ]
4418
4438
  }
4419
4439
  ) : null;
4420
- }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(He, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), kn = ({
4440
+ }, oi = () => /* @__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(Ye, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4421
4441
  item: e,
4422
4442
  index: t
4423
4443
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4432,31 +4452,31 @@ const Or = ({
4432
4452
  className: "absolute inset-0 size-full rounded-md object-cover"
4433
4453
  }
4434
4454
  ) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
4435
- qt,
4455
+ Wt,
4436
4456
  {
4437
4457
  className: "size-16 rounded-md text-white/30",
4438
4458
  weight: "regular",
4439
4459
  "aria-hidden": !0
4440
4460
  }
4441
4461
  ) }),
4442
- /* @__PURE__ */ n(ri, {})
4443
- ] }), ii = (e, t, s) => ({
4462
+ /* @__PURE__ */ n(oi, {})
4463
+ ] }), ci = (e, t, s) => ({
4444
4464
  ariaLabel: `Play video ${t + 1} of ${s}`,
4445
- content: /* @__PURE__ */ n(kn, { item: e, index: t })
4446
- }), li = ({
4465
+ content: /* @__PURE__ */ n(Cn, { item: e, index: t })
4466
+ }), di = ({
4447
4467
  src: e,
4448
4468
  poster: t,
4449
4469
  mimeType: s,
4450
4470
  preload: a,
4451
4471
  items: r
4452
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Cn = (e, t) => e.map((s, a) => ({
4472
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], En = (e, t) => e.map((s, a) => ({
4453
4473
  src: s.src,
4454
4474
  poster: s.poster,
4455
4475
  mimeType: s.mimeType,
4456
4476
  preload: s.preload,
4457
4477
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4458
- })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4459
- const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Ie(
4478
+ })), ui = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4479
+ const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Se(
4460
4480
  i
4461
4481
  );
4462
4482
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4467,15 +4487,15 @@ const Or = ({
4467
4487
  onClick: () => u(0),
4468
4488
  "aria-label": "Play video",
4469
4489
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4470
- children: /* @__PURE__ */ n(kn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4490
+ children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4471
4491
  }
4472
4492
  ),
4473
- l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: l }) }) : null,
4493
+ l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ee, { onClick: l }) }) : null,
4474
4494
  /* @__PURE__ */ n(
4475
- yn,
4495
+ kn,
4476
4496
  {
4477
4497
  open: o,
4478
- items: Cn(
4498
+ items: En(
4479
4499
  [{ src: e, poster: t, mimeType: s, preload: r }],
4480
4500
  a
4481
4501
  ),
@@ -4484,7 +4504,7 @@ const Or = ({
4484
4504
  }
4485
4505
  )
4486
4506
  ] });
4487
- }, En = ({
4507
+ }, In = ({
4488
4508
  state: e,
4489
4509
  src: t,
4490
4510
  poster: s,
@@ -4496,16 +4516,16 @@ const Or = ({
4496
4516
  preload: d,
4497
4517
  onClick: u
4498
4518
  }) => {
4499
- const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4519
+ const g = di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ie(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = Se(
4500
4520
  u
4501
4521
  );
4502
4522
  if (g.length === 0)
4503
4523
  return null;
4504
- const w = g.map(
4505
- (p, v) => ii(p, v, g.length)
4524
+ const v = g.map(
4525
+ (p, N) => ci(p, N, g.length)
4506
4526
  );
4507
4527
  return /* @__PURE__ */ h(
4508
- ke,
4528
+ Ce,
4509
4529
  {
4510
4530
  variant: m,
4511
4531
  text: l,
@@ -4513,36 +4533,36 @@ const Or = ({
4513
4533
  "data-testid": "video-attachment",
4514
4534
  children: [
4515
4535
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4516
- wn,
4536
+ Nn,
4517
4537
  {
4518
- tiles: w,
4538
+ tiles: v,
4519
4539
  onTileActivate: b,
4520
4540
  className: "overflow-hidden rounded-md"
4521
4541
  }
4522
4542
  ) }),
4523
4543
  /* @__PURE__ */ n(
4524
- yn,
4544
+ kn,
4525
4545
  {
4526
4546
  open: f,
4527
- items: Cn(g, r),
4547
+ items: En(g, r),
4528
4548
  initialIndex: c,
4529
- onClose: N
4549
+ onClose: w
4530
4550
  }
4531
4551
  )
4532
4552
  ]
4533
4553
  }
4534
4554
  );
4535
- }, ci = (e) => /* @__PURE__ */ n(oi, { ...e }), di = (e) => /* @__PURE__ */ n(En, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(En, { ...e, state: "received" }), mi = {
4536
- Composer: ci,
4537
- Sent: di,
4538
- Received: ui
4539
- }, Ti = {
4540
- Image: Kr,
4541
- Video: mi,
4542
- Audio: Tr,
4543
- Pdf: ai,
4544
- File: jr
4545
- }, hi = ({
4555
+ }, mi = (e) => /* @__PURE__ */ n(ui, { ...e }), hi = (e) => /* @__PURE__ */ n(In, { ...e, state: "sent" }), fi = (e) => /* @__PURE__ */ n(In, { ...e, state: "received" }), gi = {
4556
+ Composer: mi,
4557
+ Sent: hi,
4558
+ Received: fi
4559
+ }, Ri = {
4560
+ Image: Qr,
4561
+ Video: gi,
4562
+ Audio: Rr,
4563
+ Pdf: li,
4564
+ File: Hr
4565
+ }, pi = ({
4546
4566
  question: e,
4547
4567
  onClick: t,
4548
4568
  loading: s = !1,
@@ -4564,7 +4584,7 @@ const Or = ({
4564
4584
  ),
4565
4585
  children: e
4566
4586
  }
4567
- ), Ai = ({
4587
+ ), Li = ({
4568
4588
  faqs: e,
4569
4589
  onFaqClick: t,
4570
4590
  loadingFaqId: s,
@@ -4593,7 +4613,7 @@ const Or = ({
4593
4613
  children: [
4594
4614
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4595
4615
  o.map((d) => /* @__PURE__ */ n(
4596
- hi,
4616
+ pi,
4597
4617
  {
4598
4618
  question: d.question,
4599
4619
  onClick: () => t(d.id),
@@ -4607,39 +4627,39 @@ const Or = ({
4607
4627
  ] }) });
4608
4628
  };
4609
4629
  export {
4610
- nn as A,
4611
- va as B,
4612
- Xa as C,
4613
- Hs as D,
4614
- zs as E,
4615
- Ai as F,
4616
- Ii as L,
4617
- yi as M,
4618
- pe as a,
4630
+ sn as A,
4631
+ Na as B,
4632
+ Za as C,
4633
+ Ws as D,
4634
+ Os as E,
4635
+ Li as F,
4636
+ Ai as L,
4637
+ Ei as M,
4638
+ be as a,
4619
4639
  ne as b,
4620
- rr as c,
4621
- mn as d,
4622
- ki as e,
4623
- hi as f,
4640
+ or as c,
4641
+ hn as d,
4642
+ Ii as e,
4643
+ pi as f,
4624
4644
  ie as g,
4625
- Bt as h,
4626
- Ti as i,
4627
- ka as j,
4628
- _i as k,
4629
- Ei as l,
4630
- Lr as m,
4631
- Ar as n,
4632
- sr as o,
4633
- Rr as p,
4634
- Zt as q,
4645
+ Ut as h,
4646
+ Ri as i,
4647
+ Ia as j,
4648
+ Ci as k,
4649
+ Ti as l,
4650
+ zr as m,
4651
+ Lr as n,
4652
+ ir as o,
4653
+ Pr as p,
4654
+ Qt as q,
4635
4655
  ce as r,
4636
- rn as s,
4637
- $s as t,
4638
- Si as u,
4639
- Ys as v,
4640
- tt as w,
4641
- nt as x,
4642
- Jt as y,
4643
- Ci as z
4656
+ ln as s,
4657
+ Us as t,
4658
+ Mi as u,
4659
+ Xs as v,
4660
+ nt as w,
4661
+ st as x,
4662
+ Zt as y,
4663
+ Si as z
4644
4664
  };
4645
- //# sourceMappingURL=index-DmFR1zuQ.js.map
4665
+ //# sourceMappingURL=index-fO4nwAA3.js.map