@linktr.ee/messaging-react 3.6.2-rc-1783317817 → 3.6.2-rc-1783332217

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{Card-Ca5OtJh6.js → Card-0wf8lj5n.js} +2 -2
  2. package/dist/{Card-Ca5OtJh6.js.map → Card-0wf8lj5n.js.map} +1 -1
  3. package/dist/{Card-BYdqLBN3.cjs → Card-4UyBK3XO.cjs} +2 -2
  4. package/dist/{Card-BYdqLBN3.cjs.map → Card-4UyBK3XO.cjs.map} +1 -1
  5. package/dist/{Card-iHrzL32q.cjs → Card-6b4Ws9rn.cjs} +2 -2
  6. package/dist/{Card-iHrzL32q.cjs.map → Card-6b4Ws9rn.cjs.map} +1 -1
  7. package/dist/{Card-DuSTf-S8.cjs → Card-DsQhJjj0.cjs} +2 -2
  8. package/dist/{Card-DuSTf-S8.cjs.map → Card-DsQhJjj0.cjs.map} +1 -1
  9. package/dist/{Card-CZDLISxS.js → Card-RZ6C_IkE.js} +3 -3
  10. package/dist/{Card-CZDLISxS.js.map → Card-RZ6C_IkE.js.map} +1 -1
  11. package/dist/{Card-gjy-ib_1.js → Card-iGNcxybY.js} +2 -2
  12. package/dist/{Card-gjy-ib_1.js.map → Card-iGNcxybY.js.map} +1 -1
  13. package/dist/{LockedThumbnail-COK5XPQ9.js → LockedThumbnail-Do9udNMm.js} +2 -2
  14. package/dist/{LockedThumbnail-COK5XPQ9.js.map → LockedThumbnail-Do9udNMm.js.map} +1 -1
  15. package/dist/{LockedThumbnail-DrWiitE6.cjs → LockedThumbnail-N0pNOO3D.cjs} +2 -2
  16. package/dist/{LockedThumbnail-DrWiitE6.cjs.map → LockedThumbnail-N0pNOO3D.cjs.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/index-B3ZJaqJY.cjs +2 -0
  19. package/dist/index-B3ZJaqJY.cjs.map +1 -0
  20. package/dist/{index-CnR5N9Co.js → index-wFe1UO9t.js} +1104 -1097
  21. package/dist/index-wFe1UO9t.js.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/CustomMessage/CustomMessage.stories.tsx +11 -18
  26. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +107 -0
  27. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +86 -0
  28. package/src/components/CustomMessage/index.tsx +2 -3
  29. package/src/styles.css +25 -16
  30. package/dist/index-CnR5N9Co.js.map +0 -1
  31. package/dist/index-pODWIZCi.cjs +0 -2
  32. package/dist/index-pODWIZCi.cjs.map +0 -1
  33. package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +0 -66
  34. package/src/components/CustomMessage/MessageDeliveryStatus.tsx +0 -53
@@ -1,12 +1,12 @@
1
- import { jsx as s, jsxs as m, Fragment as te } from "react/jsx-runtime";
2
- import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as H, useEffect as K, useId as Gs, useMemo as ae, Suspense as rt } from "react";
1
+ import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
+ import U, { createContext as rt, useContext as Ie, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Gs, useMemo as se, Suspense as it } from "react";
3
3
  import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as ue, useChatContext as me, DateSeparator as Ws, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as is, Attachment as Js, EditMessageModal as Zs, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, MessageText as qt, MessageErrorIcon as Wt, Poll as hn, useMessageContext as Ie, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as En, MessageList as Sn, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
6
- import { StarIcon as Ee, DotsThreeIcon as An, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as Qe, CurrencyDollarIcon as Rn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as cs, FileMdIcon as zn, FileTextIcon as Pn, FileZipIcon as Fn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as jn, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Hn, ChecksIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
5
+ import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as jn, FileXlsIcon as Bn, FileDocIcon as Un, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as ea, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
- const us = at({
8
+ import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
+ const us = rt({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const us = at({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), it = () => Se(us), cl = ({
19
+ }), lt = () => Ie(us), dl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -24,10 +24,10 @@ const us = at({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var M, E;
27
+ var A, E;
28
28
  const l = J(
29
- (C, ...T) => {
30
- i && console.log(`🔥 [MessagingProvider] ${C}`, ...T);
29
+ (C, ...I) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,37 +37,37 @@ const us = at({
37
37
  serviceConfig: !!n,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = B(null), [u, p] = B(null), [h, f] = B(!1), [b, c] = B(!1), [w, v] = B(null), g = H(!1), x = H(null), _ = H(n);
41
- _.current = n;
42
- const A = H(i);
43
- A.current = i;
44
- const S = H({
40
+ const [o, d] = B(null), [u, p] = B(null), [h, g] = B(!1), [c, v] = B(!1), [w, b] = B(null), f = G(!1), x = G(null), N = G(n);
41
+ N.current = n;
42
+ const S = G(i);
43
+ S.current = i;
44
+ const T = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: n,
48
48
  capabilities: r
49
- }), I = H(0);
50
- I.current++, l("📊 RENDER INFO", {
51
- renderCount: I.current,
49
+ }), M = G(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: S.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: S.current.apiKey !== a,
56
- serviceConfigChanged: S.current.serviceConfig !== n,
57
- capabilitiesChanged: S.current.capabilities !== r
54
+ userChanged: T.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: T.current.apiKey !== a,
56
+ serviceConfigChanged: T.current.serviceConfig !== n,
57
+ capabilitiesChanged: T.current.capabilities !== r
58
58
  }
59
- }), S.current = {
59
+ }), T.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: n,
63
63
  capabilities: r
64
64
  };
65
- const L = H(null);
66
- a && ((M = L.current) == null ? void 0 : M.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
65
+ const L = G(null);
66
+ a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
67
67
  const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
68
68
  K(() => {
69
- const C = I.current, T = _.current;
70
- if (!a || !D || !T) {
69
+ const C = M.current, I = N.current;
70
+ if (!a || !D || !I) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
@@ -78,36 +78,36 @@ const us = at({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const F = new Hs({
82
- ...T,
81
+ const $ = new Hs({
82
+ ...I,
83
83
  apiKey: a,
84
- debug: A.current,
84
+ debug: S.current,
85
85
  client: D
86
86
  });
87
- x.current = F, d(F), l("✅ SERVICE SET", {
87
+ x.current = $, d($), l("✅ SERVICE SET", {
88
88
  renderCount: C,
89
- serviceInstance: !!F
89
+ serviceInstance: !!$
90
90
  });
91
91
  }, [a, D]);
92
- const $ = H(null);
92
+ const O = G(null);
93
93
  K(() => {
94
- var T, F;
94
+ var I, $;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: g.current,
99
+ isConnecting: f.current,
100
100
  isConnected: h,
101
101
  dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
102
  }), !o || !t) {
103
103
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (g.current) {
106
+ if (f.current) {
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((T = $.current) == null ? void 0 : T.serviceId) === o && ((F = $.current) == null ? void 0 : F.userId) === t.id) {
110
+ if (((I = O.current) == null ? void 0 : I.serviceId) === o && (($ = O.current) == null ? void 0 : $.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,22 +115,22 @@ const us = at({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), g.current = !0, c(!0), v(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, v(!0), b(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const O = await o.connectUser(t);
122
- p(O), f(!0), $.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const F = await o.connectUser(t);
122
+ p(F), g(!0), O.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: O.userID
124
+ clientId: F.userID
125
125
  });
126
- } catch (O) {
127
- const V = O instanceof Error ? O.message : "Connection failed";
128
- v(V), l("❌ USER CONNECTION ERROR", {
126
+ } catch (F) {
127
+ const V = F instanceof Error ? F.message : "Connection failed";
128
+ b(V), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: V
131
131
  });
132
132
  } finally {
133
- c(!1), g.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ v(!1), f.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: h
136
136
  });
@@ -139,8 +139,8 @@ const us = at({
139
139
  }, [o, t, l, h]), K(() => {
140
140
  const C = D;
141
141
  return () => {
142
- var T;
143
- C && ($.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
142
+ var I;
143
+ C && (O.current = null, (I = x.current) == null || I.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [D]);
146
146
  const z = J(async () => {
@@ -151,32 +151,32 @@ const us = at({
151
151
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), c(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
157
  const C = await o.connectUser(t);
158
- p(C), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
158
+ p(C), g(!0), b(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (C) {
160
- const T = C instanceof Error ? C.message : "Refresh failed";
161
- v(T), l("❌ CONNECTION REFRESH ERROR", {
160
+ const I = C instanceof Error ? C.message : "Refresh failed";
161
+ b(I), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: T
163
+ error: I
164
164
  });
165
165
  } finally {
166
- c(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
168
  }, [o, t, l]), y = U.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!u,
171
171
  isConnected: h,
172
- isLoading: b,
172
+ isLoading: c,
173
173
  hasError: !!w,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: o,
177
177
  client: u,
178
178
  isConnected: h,
179
- isLoading: b,
179
+ isLoading: c,
180
180
  error: w,
181
181
  capabilities: r,
182
182
  refreshConnection: z,
@@ -185,7 +185,7 @@ const us = at({
185
185
  o,
186
186
  u,
187
187
  h,
188
- b,
188
+ c,
189
189
  w,
190
190
  r,
191
191
  z,
@@ -193,7 +193,7 @@ const us = at({
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: I.current,
196
+ renderCount: M.current,
197
197
  willRenderChat: !!D,
198
198
  contextValueReady: !!y
199
199
  }), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
@@ -206,7 +206,7 @@ const us = at({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, ta = () => it(), lt = (e) => {
209
+ }, sa = () => lt(), ot = (e) => {
210
210
  var a, r;
211
211
  const [t, n] = B(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -228,14 +228,14 @@ const us = at({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, sa = "linktree-official", na = "linktree-official-sender";
231
+ }, na = "linktree-official", aa = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === sa) {
234
+ if (n === na) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === na;
238
+ return ((l = i.user) == null ? void 0 : l.id) === aa;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,15 +247,15 @@ function Ue(e, t, n) {
247
247
  }
248
248
  );
249
249
  }
250
- const aa = /^[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 ra(e) {
252
- return aa.test(e.trim());
250
+ const ra = /^[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 ia(e) {
252
+ return ra.test(e.trim());
253
253
  }
254
254
  function Kt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !ra(n);
256
+ return !n || t && n === t ? !1 : !ia(n);
257
257
  }
258
- function ot(e) {
258
+ function ct(e) {
259
259
  return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
260
260
  }
261
261
  const Jt = [
@@ -286,7 +286,7 @@ const Jt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function ia(e) {
289
+ function la(e) {
290
290
  let t = 0;
291
291
  for (let n = 0; n < e.length; n++) {
292
292
  const a = e.charCodeAt(n);
@@ -295,12 +295,12 @@ function ia(e) {
295
295
  return Math.abs(t);
296
296
  }
297
297
  function ms(e) {
298
- return Jt[ia(e) % Jt.length];
298
+ return Jt[la(e) % Jt.length];
299
299
  }
300
- function la(e) {
300
+ function oa(e) {
301
301
  return ms(e).emoji;
302
302
  }
303
- function oa(e) {
303
+ function ca(e) {
304
304
  return ms(e).bgColor;
305
305
  }
306
306
  const ne = ({
@@ -312,7 +312,7 @@ const ne = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
315
- const o = la(e), d = oa(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, b = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, c = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: b, children: t ? /* @__PURE__ */ s(
315
+ const o = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -342,7 +342,7 @@ const ne = ({
342
342
  width: `${n}px`,
343
343
  height: `${n}px`,
344
344
  backgroundColor: t ? void 0 : d,
345
- ...b
345
+ ...c
346
346
  },
347
347
  children: [
348
348
  r && /* @__PURE__ */ s(
@@ -362,21 +362,21 @@ const ne = ({
362
362
  "bg-transparent"
363
363
  ),
364
364
  style: {
365
- ...b,
365
+ ...c,
366
366
  ...l && {
367
- borderWidth: `${f}px`,
367
+ borderWidth: `${g}px`,
368
368
  borderStyle: "solid",
369
369
  borderColor: "var(--AI-Gradient, #7F22FE)",
370
370
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
371
371
  }
372
372
  },
373
- children: c
373
+ children: v
374
374
  }
375
375
  )
376
376
  ]
377
377
  }
378
378
  );
379
- }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
379
+ }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -389,11 +389,11 @@ const ne = ({
389
389
  onActionComplete: u,
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
- var M;
393
- const { service: h, debug: f } = it(), b = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, c = !!(a && n && h && b), [w, v] = B(!1), [g, x] = B(null), [_, A] = B(!1), [S, I] = B(!1), L = c && ((g == null ? void 0 : g.participantId) !== b || (g == null ? void 0 : g.service) !== h);
392
+ var A;
393
+ const { service: h, debug: g } = lt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, S] = B(!1), [T, M] = B(!1), L = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
394
394
  return K(() => {
395
- if (!c || !h || !b) {
396
- v(!1), x(null);
395
+ if (!v || !h || !c) {
396
+ b(!1), x(null);
397
397
  return;
398
398
  }
399
399
  let E = !1;
@@ -401,69 +401,69 @@ const ne = ({
401
401
  try {
402
402
  const C = await h.getBlockedUsers();
403
403
  if (E) return;
404
- v(
404
+ b(
405
405
  C.some(
406
- (T) => T.blocked_user_id === b
406
+ (I) => I.blocked_user_id === c
407
407
  )
408
408
  );
409
409
  } catch (C) {
410
410
  E || console.error(`[${p}] Failed to check blocked status:`, C);
411
411
  } finally {
412
- E || x({ participantId: b, service: h });
412
+ E || x({ participantId: c, service: h });
413
413
  }
414
414
  })(), () => {
415
415
  E = !0;
416
416
  };
417
- }, [c, h, b, p]), {
417
+ }, [v, h, c, p]), {
418
418
  isParticipantBlocked: w,
419
419
  isCheckingBlockedStatus: L,
420
- isLeaving: _,
421
- isUpdatingBlockStatus: S,
420
+ isLeaving: N,
421
+ isUpdatingBlockStatus: T,
422
422
  handleLeaveConversation: async () => {
423
423
  var E;
424
- if (!_) {
425
- l == null || l(), f && console.log(`[${p}] Leave conversation`, e.cid), A(!0);
424
+ if (!N) {
425
+ l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), S(!0);
426
426
  try {
427
427
  const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
428
428
  await e.hide(C, !1), r && await r(e), u == null || u();
429
429
  } catch (C) {
430
430
  console.error(`[${p}] Failed to leave conversation`, C);
431
431
  } finally {
432
- A(!1);
432
+ S(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleBlockUser: async () => {
437
- var E, C, T;
438
- if (!(S || !h)) {
439
- o == null || o(), f && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
437
+ var E, C, I;
438
+ if (!(T || !h)) {
439
+ o == null || o(), g && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
440
440
  try {
441
- await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
442
- } catch (F) {
443
- console.error(`[${p}] Failed to block member`, F);
441
+ await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
442
+ } catch ($) {
443
+ console.error(`[${p}] Failed to block member`, $);
444
444
  } finally {
445
- I(!1);
445
+ M(!1);
446
446
  }
447
447
  }
448
448
  },
449
449
  handleUnblockUser: async () => {
450
- var E, C, T;
451
- if (!(S || !h)) {
452
- o == null || o(), f && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
450
+ var E, C, I;
451
+ if (!(T || !h)) {
452
+ o == null || o(), g && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
453
453
  try {
454
- await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
455
- } catch (F) {
456
- console.error(`[${p}] Failed to unblock member`, F);
454
+ await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
455
+ } catch ($) {
456
+ console.error(`[${p}] Failed to unblock member`, $);
457
457
  } finally {
458
- I(!1);
458
+ M(!1);
459
459
  }
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, _e = ({
466
+ }, Ne = ({
467
467
  variant: e = "default",
468
468
  className: t,
469
469
  children: n,
@@ -480,7 +480,7 @@ const ne = ({
480
480
  ...a,
481
481
  children: n
482
482
  }
483
- ), tt = ({
483
+ ), st = ({
484
484
  channel: e,
485
485
  participant: t,
486
486
  showDeleteConversation: n = !0,
@@ -494,55 +494,55 @@ const ne = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [f, b] = B(!1), c = H(null), w = Gs(), v = J(() => b(!1), []), {
498
- isParticipantBlocked: g,
497
+ const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
498
+ isParticipantBlocked: f,
499
499
  isCheckingBlockedStatus: x,
500
- isLeaving: _,
501
- isUpdatingBlockStatus: A,
502
- handleLeaveConversation: S,
503
- handleBlockUser: I,
500
+ isLeaving: N,
501
+ isUpdatingBlockStatus: S,
502
+ handleLeaveConversation: T,
503
+ handleBlockUser: M,
504
504
  handleUnblockUser: L,
505
505
  handleReportUser: D
506
- } = da({
506
+ } = ua({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
510
- enabled: f,
510
+ enabled: g,
511
511
  onLeaveConversation: i,
512
512
  onBlockParticipant: l,
513
513
  onDeleteConversationClick: o,
514
514
  onBlockParticipantClick: d,
515
515
  onReportParticipantClick: u,
516
- onActionComplete: v,
516
+ onActionComplete: b,
517
517
  logLabel: "ChannelActionsMenu"
518
518
  });
519
519
  return K(() => {
520
- if (!f) return;
521
- const z = (M) => {
522
- c.current && !c.current.contains(M.target) && b(!1);
523
- }, y = (M) => {
524
- M.key === "Escape" && b(!1);
520
+ if (!g) return;
521
+ const z = (A) => {
522
+ v.current && !v.current.contains(A.target) && c(!1);
523
+ }, y = (A) => {
524
+ A.key === "Escape" && c(!1);
525
525
  };
526
526
  return document.addEventListener("mousedown", z), document.addEventListener("keydown", y), () => {
527
527
  document.removeEventListener("mousedown", z), document.removeEventListener("keydown", y);
528
528
  };
529
- }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: c, className: "relative", children: [
529
+ }, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
530
530
  /* @__PURE__ */ m(
531
531
  "button",
532
532
  {
533
533
  className: h,
534
534
  type: "button",
535
535
  "aria-haspopup": "true",
536
- "aria-expanded": f,
537
- "aria-controls": f ? w : void 0,
538
- onClick: () => b((z) => !z),
536
+ "aria-expanded": g,
537
+ "aria-controls": g ? w : void 0,
538
+ onClick: () => c((z) => !z),
539
539
  children: [
540
- /* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
541
541
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
542
542
  ]
543
543
  }
544
544
  ),
545
- f && /* @__PURE__ */ s(
545
+ g && /* @__PURE__ */ s(
546
546
  "div",
547
547
  {
548
548
  id: w,
@@ -553,13 +553,13 @@ const ne = ({
553
553
  ),
554
554
  children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
555
555
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
556
- _e,
556
+ Ne,
557
557
  {
558
- onClick: S,
559
- disabled: _,
560
- "aria-busy": _,
558
+ onClick: T,
559
+ disabled: N,
560
+ "aria-busy": N,
561
561
  children: [
562
- _ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
562
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
@@ -567,34 +567,34 @@ const ne = ({
567
567
  a && /* @__PURE__ */ s("li", { children: x ? (
568
568
  // Block status not yet resolved — show a disabled placeholder
569
569
  // so a premature click can't act on a stale block state.
570
- /* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
571
571
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ s("span", { children: "Block" })
573
573
  ] })
574
- ) : g ? /* @__PURE__ */ m(
575
- _e,
574
+ ) : f ? /* @__PURE__ */ m(
575
+ Ne,
576
576
  {
577
577
  onClick: L,
578
- disabled: A,
579
- "aria-busy": A,
578
+ disabled: S,
579
+ "aria-busy": S,
580
580
  children: [
581
- A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
581
+ S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
- _e,
586
+ Ne,
587
587
  {
588
- onClick: I,
589
- disabled: A,
590
- "aria-busy": A,
588
+ onClick: M,
589
+ disabled: S,
590
+ "aria-busy": S,
591
591
  children: [
592
- A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
592
+ S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
593
593
  /* @__PURE__ */ s("span", { children: "Block" })
594
594
  ]
595
595
  }
596
596
  ) }),
597
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: D, children: [
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: D, children: [
598
598
  /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ s("span", { children: "Report" })
600
600
  ] }) }),
@@ -603,10 +603,10 @@ const ne = ({
603
603
  }
604
604
  )
605
605
  ] });
606
- }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (e) => {
606
+ }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
609
- }, ga = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
609
+ }, pa = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: n = !1,
@@ -619,25 +619,25 @@ const ne = ({
619
619
  onDeleteConversationClick: u,
620
620
  onBlockParticipantClick: p,
621
621
  onReportParticipantClick: h,
622
- customChannelActions: f,
623
- renderChannelActions: b,
624
- showChannelInfo: c = !0,
622
+ customChannelActions: g,
623
+ renderChannelActions: c,
624
+ showChannelInfo: v = !0,
625
625
  onParticipantNameClick: w
626
626
  }) => {
627
- var D, $, z;
628
- const { channel: v } = ue(), { client: g } = me(), x = U.useMemo(
627
+ var D, O, z;
628
+ const { channel: b } = le(), { client: f } = oe(), x = U.useMemo(
629
629
  () => {
630
630
  var y;
631
631
  return Ue(
632
- (y = v.state) == null ? void 0 : y.members,
633
- g == null ? void 0 : g.userID,
634
- v.type
632
+ (y = b.state) == null ? void 0 : y.members,
633
+ f == null ? void 0 : f.userID,
634
+ b.type
635
635
  );
636
636
  },
637
- [(D = v.state) == null ? void 0 : D.members, g == null ? void 0 : g.userID, v.type]
638
- ), _ = ot(x == null ? void 0 : x.user), A = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, S = lt(v), I = fa(x), L = async () => {
637
+ [(D = b.state) == null ? void 0 : D.members, f == null ? void 0 : f.userID, b.type]
638
+ ), N = ct(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = ot(b), M = ga(x), L = async () => {
639
639
  try {
640
- S ? await v.unpin() : await v.pin();
640
+ T ? await b.unpin() : await b.pin();
641
641
  } catch (y) {
642
642
  console.error(
643
643
  "[ChannelHeaderRedesign] Failed to update pinned status:",
@@ -657,7 +657,7 @@ const ne = ({
657
657
  }),
658
658
  type: "button",
659
659
  "aria-label": "Back to conversations",
660
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
660
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
661
661
  }
662
662
  ) }),
663
663
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
@@ -665,15 +665,15 @@ const ne = ({
665
665
  {
666
666
  type: "button",
667
667
  onClick: w,
668
- "aria-label": `View details for ${_}`,
668
+ "aria-label": `View details for ${N}`,
669
669
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
670
670
  children: [
671
671
  /* @__PURE__ */ s(
672
672
  ne,
673
673
  {
674
- id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || v.id || "unknown",
675
- name: _,
676
- image: A,
674
+ id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
+ name: N,
676
+ image: S,
677
677
  dmAgentEnabled: a,
678
678
  shape: "circle",
679
679
  size: 48,
@@ -682,17 +682,17 @@ const ne = ({
682
682
  ),
683
683
  /* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
684
684
  /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
685
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: _ }),
685
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
686
686
  /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
687
- I && /* @__PURE__ */ s(
687
+ M && /* @__PURE__ */ s(
688
688
  "span",
689
689
  {
690
690
  "aria-label": "Paid customer",
691
691
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
692
- children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
- n && S && /* @__PURE__ */ s(
695
+ n && T && /* @__PURE__ */ s(
696
696
  "span",
697
697
  {
698
698
  "aria-label": "Starred conversation",
@@ -712,7 +712,7 @@ const ne = ({
712
712
  ] }),
713
713
  a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
714
714
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
715
- /* @__PURE__ */ s("span", { children: ma })
715
+ /* @__PURE__ */ s("span", { children: ha })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -725,24 +725,24 @@ const ne = ({
725
725
  className: We,
726
726
  onClick: L,
727
727
  type: "button",
728
- "aria-pressed": S,
729
- "aria-label": S ? "Unstar conversation" : "Star conversation",
728
+ "aria-pressed": T,
729
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
730
730
  children: /* @__PURE__ */ s(
731
731
  Ee,
732
732
  {
733
733
  className: k("size-5", {
734
- "text-[#FFD60A]": S,
735
- "text-black/90": !S
734
+ "text-[#FFD60A]": T,
735
+ "text-black/90": !T
736
736
  }),
737
- weight: S ? "fill" : "regular"
737
+ weight: T ? "fill" : "regular"
738
738
  }
739
739
  )
740
740
  }
741
741
  ),
742
- c && (b !== void 0 ? b : /* @__PURE__ */ s(
743
- tt,
742
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
743
+ st,
744
744
  {
745
- channel: v,
745
+ channel: b,
746
746
  participant: x,
747
747
  showDeleteConversation: l,
748
748
  showBlockParticipant: o,
@@ -752,26 +752,26 @@ const ne = ({
752
752
  onDeleteConversationClick: u,
753
753
  onBlockParticipantClick: p,
754
754
  onReportParticipantClick: h,
755
- customChannelActions: f,
755
+ customChannelActions: g,
756
756
  triggerClassName: We
757
757
  }
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
- function ba(e) {
763
- return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
- }
761
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
765
762
  function va(e) {
766
- const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
- () => ba(e.own_reactions),
763
+ return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
764
+ }
765
+ function xa(e) {
766
+ const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
767
+ () => va(e.own_reactions),
768
768
  [e.own_reactions]
769
769
  ), r = J(async () => {
770
770
  if (n != null && n.userID)
771
771
  try {
772
- a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
772
+ a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
773
773
  e.id,
774
- { type: st },
774
+ { type: nt },
775
775
  { enforce_unique: !0, skip_push: !0 }
776
776
  );
777
777
  } catch {
@@ -779,9 +779,9 @@ function va(e) {
779
779
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
780
780
  if (n != null && n.userID)
781
781
  try {
782
- a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
782
+ a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
783
783
  e.id,
784
- { type: nt },
784
+ { type: at },
785
785
  { enforce_unique: !0, skip_push: !0 }
786
786
  );
787
787
  } catch {
@@ -789,7 +789,7 @@ function va(e) {
789
789
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
790
790
  return { selected: a, voteUp: r, voteDown: i };
791
791
  }
792
- function xa(e) {
792
+ function wa(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
795
  function hs({
@@ -797,16 +797,16 @@ function hs({
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = xa(t);
800
+ const n = e == null ? void 0 : e.text, a = wa(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const wa = U.lazy(() => import("./Card-gjy-ib_1.js")), _a = U.lazy(() => import("./Card-Ca5OtJh6.js")), Na = U.lazy(() => import("./Card-CZDLISxS.js")), ct = () => /* @__PURE__ */ s(
803
+ const _a = U.lazy(() => import("./Card-iGNcxybY.js")), Na = U.lazy(() => import("./Card-0wf8lj5n.js")), ya = U.lazy(() => import("./Card-RZ6C_IkE.js")), dt = () => /* @__PURE__ */ s(
804
804
  "div",
805
805
  {
806
806
  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)]",
807
807
  "aria-hidden": !0
808
808
  }
809
- ), ya = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), gs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), ka = fs, Ca = gs, Zt = { Composer: ya, Sent: fs, Received: gs, Creator: ka, Visitor: Ca }, Ea = [
809
+ ), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -816,7 +816,7 @@ const wa = U.lazy(() => import("./Card-gjy-ib_1.js")), _a = U.lazy(() => import(
816
816
  [/plain|rtf/, "text"],
817
817
  [/markdown/, "markdown"]
818
818
  ];
819
- function oe(e) {
819
+ function ce(e) {
820
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
821
821
  }
822
822
  function ps(e) {
@@ -825,33 +825,33 @@ function ps(e) {
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Sa = {
828
+ const Ia = {
829
829
  video: cs,
830
- audio: Dn,
830
+ audio: zn,
831
831
  image: Ln,
832
832
  document: os
833
- }, Ia = {
834
- pdf: Un,
835
- doc: Bn,
836
- xls: jn,
837
- csv: $n,
838
- ppt: On,
839
- zip: Fn,
840
- text: Pn,
841
- markdown: zn,
833
+ }, Ta = {
834
+ pdf: Vn,
835
+ doc: Un,
836
+ xls: Bn,
837
+ csv: jn,
838
+ ppt: $n,
839
+ zip: On,
840
+ text: Fn,
841
+ markdown: Pn,
842
842
  generic: os
843
843
  };
844
- function Ta(e) {
845
- const t = oe(e);
846
- return t !== "document" ? Sa[t] : Ia[ps(e)];
844
+ function Aa(e) {
845
+ const t = ce(e);
846
+ return t !== "document" ? Ia[t] : Ta[ps(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Ta(e), t);
849
+ return U.createElement(Aa(e), t);
850
850
  }
851
- const Aa = (e) => {
851
+ const Ma = (e) => {
852
852
  var t, n;
853
853
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
854
- }, Ma = ({
854
+ }, Ra = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -863,74 +863,74 @@ const Aa = (e) => {
863
863
  muted: d = !1,
864
864
  onContainerClick: u
865
865
  }) => {
866
- const p = oe(t), h = H(null), f = H(null), b = H(null), c = H(r), [w, v] = B(a), [g, x] = B(0), [_, A] = B(!1), [S, I] = B(!1), [L, D] = B(!1), [$, z] = B(!1), [y, M] = B(!0), [E, C] = B(null), T = J(() => {
867
- D(!1), v(!0);
868
- }, []), F = J((N) => {
869
- const R = f.current;
866
+ const p = ce(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, S] = B(!1), [T, M] = B(!1), [L, D] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
867
+ D(!1), b(!0);
868
+ }, []), $ = J((_) => {
869
+ const R = g.current;
870
870
  if (!R) return 0;
871
- const G = R.getBoundingClientRect();
871
+ const H = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Aa(N) - G.left) / G.width)
874
+ Math.min(1, (Ma(_) - H.left) / H.width)
875
875
  );
876
- }, []), O = J((N) => {
876
+ }, []), F = J((_) => {
877
877
  const R = h.current;
878
- R && R.duration && (R.currentTime = N * R.duration);
879
- }, []), V = (N) => {
880
- N.stopPropagation(), A(!0);
881
- const R = F(N);
882
- x(R), O(R);
878
+ R && R.duration && (R.currentTime = _ * R.duration);
879
+ }, []), V = (_) => {
880
+ _.stopPropagation(), S(!0);
881
+ const R = $(_);
882
+ x(R), F(R);
883
883
  };
884
884
  K(() => {
885
- r !== void 0 && r !== c.current && (c.current = r, v(r));
885
+ r !== void 0 && r !== v.current && (v.current = r, b(r));
886
886
  }, [r]), K(() => {
887
887
  if (!w) {
888
- b.current !== null && (cancelAnimationFrame(b.current), b.current = null);
888
+ c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
889
889
  return;
890
890
  }
891
- const N = () => {
891
+ const _ = () => {
892
892
  const R = h.current;
893
- R && R.duration && !_ && x(R.currentTime / R.duration), b.current = requestAnimationFrame(N);
893
+ R && R.duration && !N && x(R.currentTime / R.duration), c.current = requestAnimationFrame(_);
894
894
  };
895
- return b.current = requestAnimationFrame(N), () => {
896
- b.current !== null && cancelAnimationFrame(b.current);
895
+ return c.current = requestAnimationFrame(_), () => {
896
+ c.current !== null && cancelAnimationFrame(c.current);
897
897
  };
898
- }, [w, _]), K(() => {
899
- const N = h.current;
900
- N && (w ? N.play().catch((R) => {
901
- v(!1), D(!0);
902
- }) : N.pause());
898
+ }, [w, N]), K(() => {
899
+ const _ = h.current;
900
+ _ && (w ? _.play().catch((R) => {
901
+ b(!1), D(!0);
902
+ }) : _.pause());
903
903
  }, [w]), K(() => {
904
- if (!_) return;
905
- const N = (G) => x(F(G)), R = (G) => {
906
- A(!1), O(F(G));
904
+ if (!N) return;
905
+ const _ = (H) => x($(H)), R = (H) => {
906
+ S(!1), F($(H));
907
907
  };
908
- return window.addEventListener("mousemove", N), window.addEventListener("mouseup", R), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
- window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", R);
908
+ return window.addEventListener("mousemove", _), window.addEventListener("mouseup", R), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
+ window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", R);
910
910
  };
911
- }, [_, F, O]);
912
- const Z = E ? { aspectRatio: String(E) } : void 0, ee = E ? "" : " aspect-video", X = Math.round(g * 100);
911
+ }, [N, $, F]);
912
+ const Q = E ? { aspectRatio: String(E) } : void 0, te = E ? "" : " aspect-video", X = Math.round(f * 100);
913
913
  return /* @__PURE__ */ m(
914
914
  "div",
915
915
  {
916
916
  role: "button",
917
917
  tabIndex: 0,
918
- className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
919
- style: Z,
920
- onClick: (N) => {
918
+ className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
919
+ style: Q,
920
+ onClick: (_) => {
921
921
  if (u) {
922
- u(N);
922
+ u(_);
923
923
  return;
924
924
  }
925
- L || l && v((R) => !R);
925
+ L || l && b((R) => !R);
926
926
  },
927
- onKeyDown: (N) => {
928
- if (!(N.key !== "Enter" && N.key !== " ")) {
929
- if (N.preventDefault(), u) {
930
- u(N);
927
+ onKeyDown: (_) => {
928
+ if (!(_.key !== "Enter" && _.key !== " ")) {
929
+ if (_.preventDefault(), u) {
930
+ u(_);
931
931
  return;
932
932
  }
933
- L || l && v((R) => !R);
933
+ L || l && b((R) => !R);
934
934
  }
935
935
  },
936
936
  children: [
@@ -956,12 +956,12 @@ const Aa = (e) => {
956
956
  style: { width: "100%", height: "100%" },
957
957
  onLoadStart: () => z(!0),
958
958
  onCanPlay: () => {
959
- z(!1), M(!1);
959
+ z(!1), A(!1);
960
960
  },
961
961
  onWaiting: () => z(!0),
962
962
  onPlay: () => D(!1),
963
963
  onEnded: () => {
964
- i || (v(!1), x(0));
964
+ i || (b(!1), x(0));
965
965
  },
966
966
  children: /* @__PURE__ */ s("track", { kind: "captions" })
967
967
  }
@@ -976,22 +976,22 @@ const Aa = (e) => {
976
976
  style: { width: "100%", height: "100%" },
977
977
  onLoadStart: () => z(!0),
978
978
  onCanPlay: () => {
979
- z(!1), M(!1);
979
+ z(!1), A(!1);
980
980
  },
981
981
  onWaiting: () => z(!0),
982
982
  onPlay: () => D(!1),
983
983
  onLoadedMetadata: () => {
984
- const N = h.current;
985
- N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && C(N.videoWidth / N.videoHeight);
984
+ const _ = h.current;
985
+ _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && C(_.videoWidth / _.videoHeight);
986
986
  },
987
987
  onEnded: () => {
988
- i || (v(!1), x(0));
988
+ i || (b(!1), x(0));
989
989
  },
990
990
  children: /* @__PURE__ */ s("track", { kind: "captions" })
991
991
  }
992
992
  ) }),
993
- $ && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
- ke,
993
+ O && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
+ Ce,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
@@ -1004,13 +1004,13 @@ const Aa = (e) => {
1004
1004
  role: "button",
1005
1005
  tabIndex: 0,
1006
1006
  "aria-label": "Play preview",
1007
- onClick: (N) => {
1008
- N.stopPropagation(), T();
1007
+ onClick: (_) => {
1008
+ _.stopPropagation(), I();
1009
1009
  },
1010
- onKeyDown: (N) => {
1011
- N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), T());
1010
+ onKeyDown: (_) => {
1011
+ _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
1012
1012
  },
1013
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1014
1014
  }
1015
1015
  ),
1016
1016
  o && !l && /* @__PURE__ */ s("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__ */ s(
@@ -1022,13 +1022,13 @@ const Aa = (e) => {
1022
1022
  "aria-valuemin": 0,
1023
1023
  "aria-valuemax": 100,
1024
1024
  tabIndex: 0,
1025
- ref: f,
1025
+ ref: g,
1026
1026
  className: "relative flex h-4 w-full cursor-pointer items-center",
1027
1027
  onMouseDown: V,
1028
1028
  onTouchStart: V,
1029
- onClick: (N) => N.stopPropagation(),
1030
- onKeyDown: (N) => {
1031
- N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1029
+ onClick: (_) => _.stopPropagation(),
1030
+ onKeyDown: (_) => {
1031
+ _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1032
1032
  },
1033
1033
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1034
1034
  "div",
@@ -1044,12 +1044,12 @@ const Aa = (e) => {
1044
1044
  "button",
1045
1045
  {
1046
1046
  type: "button",
1047
- onClick: (N) => {
1048
- N.stopPropagation(), v((R) => !R);
1047
+ onClick: (_) => {
1048
+ _.stopPropagation(), b((R) => !R);
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1061,21 +1061,21 @@ const Aa = (e) => {
1061
1061
  "aria-valuemin": 0,
1062
1062
  "aria-valuemax": 100,
1063
1063
  tabIndex: 0,
1064
- ref: f,
1064
+ ref: g,
1065
1065
  className: "relative flex h-4 w-full cursor-pointer items-center",
1066
1066
  onMouseDown: V,
1067
1067
  onTouchStart: V,
1068
- onClick: (N) => N.stopPropagation(),
1069
- onMouseEnter: () => I(!0),
1070
- onMouseLeave: () => I(!1),
1071
- onKeyDown: (N) => {
1072
- N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1068
+ onClick: (_) => _.stopPropagation(),
1069
+ onMouseEnter: () => M(!0),
1070
+ onMouseLeave: () => M(!1),
1071
+ onKeyDown: (_) => {
1072
+ _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1073
1073
  },
1074
1074
  children: [
1075
1075
  /* @__PURE__ */ s(
1076
1076
  "div",
1077
1077
  {
1078
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || _ ? "h-1.5" : "h-1"}`,
1078
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1079
1079
  children: /* @__PURE__ */ s(
1080
1080
  "div",
1081
1081
  {
@@ -1088,7 +1088,7 @@ const Aa = (e) => {
1088
1088
  /* @__PURE__ */ s(
1089
1089
  "div",
1090
1090
  {
1091
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1091
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1092
1092
  style: { left: `${X}%` }
1093
1093
  }
1094
1094
  )
@@ -1099,7 +1099,7 @@ const Aa = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
1102
- }, Qt = (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", bs = ({
1102
+ }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1108,9 +1108,9 @@ const Aa = (e) => {
1108
1108
  mediaPlayerProps: i,
1109
1109
  containedImage: l = !1
1110
1110
  }) => {
1111
- const o = oe(e), [d, u] = B(!1);
1111
+ const o = ce(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Ma,
1113
+ Ra,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1161,7 +1161,7 @@ const Aa = (e) => {
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1193,7 +1193,7 @@ const Aa = (e) => {
1193
1193
  rootRef: p,
1194
1194
  "data-testid": h
1195
1195
  }) => {
1196
- const f = e === "dark", b = f ? n ?? a : n ?? "", c = f && !n;
1196
+ const g = e === "dark", c = g ? n ?? a : n ?? "", v = g && !n;
1197
1197
  return /* @__PURE__ */ m(
1198
1198
  "div",
1199
1199
  {
@@ -1201,29 +1201,29 @@ const Aa = (e) => {
1201
1201
  "data-testid": h,
1202
1202
  className: k(
1203
1203
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1204
- f ? "bg-[#121110]" : "bg-white"
1204
+ g ? "bg-[#121110]" : "bg-white"
1205
1205
  ),
1206
1206
  children: [
1207
1207
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1208
1208
  u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1209
1209
  t,
1210
1210
  /* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
1211
- b.trim() !== "" && /* @__PURE__ */ s(
1211
+ c.trim() !== "" && /* @__PURE__ */ s(
1212
1212
  "p",
1213
1213
  {
1214
1214
  className: k("mb-0.5 truncate text-base font-medium", {
1215
- "text-black": !f,
1216
- "text-white/30": f && c,
1217
- "text-white": f && !c
1215
+ "text-black": !g,
1216
+ "text-white/30": g && v,
1217
+ "text-white": g && !v
1218
1218
  }),
1219
- children: b
1219
+ children: c
1220
1220
  }
1221
1221
  ),
1222
1222
  /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1223
1223
  we(r, {
1224
1224
  className: k(
1225
1225
  "size-5 shrink-0",
1226
- f ? "text-white/55" : "text-black/55"
1226
+ g ? "text-white/55" : "text-black/55"
1227
1227
  ),
1228
1228
  weight: "regular"
1229
1229
  }),
@@ -1232,7 +1232,7 @@ const Aa = (e) => {
1232
1232
  {
1233
1233
  className: k(
1234
1234
  "text-xs font-medium",
1235
- f ? "text-white/55" : "text-black/55"
1235
+ g ? "text-white/55" : "text-black/55"
1236
1236
  ),
1237
1237
  children: i
1238
1238
  }
@@ -1248,25 +1248,25 @@ const Aa = (e) => {
1248
1248
  function xs(e) {
1249
1249
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1250
1250
  }
1251
- function dt(e) {
1251
+ function ut(e) {
1252
1252
  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)]`;
1253
1253
  }
1254
1254
  function La(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function Da(e) {
1257
+ function za(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function za(e) {
1260
+ function Pa(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function Pa(e) {
1263
+ function Fa(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
- function Fa(e) {
1266
+ function Oa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const ut = ({ attachment: e, isMyMessage: t }) => {
1269
+ const mt = ({ attachment: e, isMyMessage: t }) => {
1270
1270
  const { title: n, 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__ */ m(U.Fragment, { children: [
1271
1271
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1272
1272
  "img",
@@ -1279,13 +1279,13 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1279
1279
  "div",
1280
1280
  {
1281
1281
  className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Fa(t)}` })
1282
+ children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1283
1283
  }
1284
1284
  ) }),
1285
1285
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1286
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Da(t)}`, children: n }),
1287
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${za(t)}`, children: a }),
1288
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
1286
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1287
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
1289
1289
  ] })
1290
1290
  ] });
1291
1291
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
@@ -1293,11 +1293,11 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1293
1293
  function ws(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
- function mt(e) {
1296
+ function ht(e) {
1297
1297
  var t;
1298
1298
  return (t = e.attachments) == null ? void 0 : t.find(ws);
1299
1299
  }
1300
- async function Oa(e, t) {
1300
+ async function $a(e, t) {
1301
1301
  let n;
1302
1302
  try {
1303
1303
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1309,7 +1309,7 @@ async function Oa(e, t) {
1309
1309
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1310
1310
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1311
1311
  }
1312
- const $a = ({
1312
+ const ja = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const $a = ({
1321
1321
  onClick: (i) => {
1322
1322
  i.stopPropagation();
1323
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1324
- a(!0), Oa(e, t).then(() => {
1324
+ a(!0), $a(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1329,22 +1329,22 @@ const $a = ({
1329
1329
  },
1330
1330
  disabled: n,
1331
1331
  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",
1332
- children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
- /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1332
+ children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
+ /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1334
1334
  "Download"
1335
1335
  ] })
1336
1336
  }
1337
1337
  );
1338
1338
  };
1339
- function ht(e) {
1340
- var h, f, b, c;
1339
+ function ft(e) {
1340
+ var h, g, c, v;
1341
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1342
1342
  (w) => w.type === "video" && w.asset_url
1343
- ), n = (f = e.attachments) == null ? void 0 : f.find(
1343
+ ), n = (g = e.attachments) == null ? void 0 : g.find(
1344
1344
  (w) => w.type === "image" && w.image_url
1345
- ), a = (b = e.attachments) == null ? void 0 : b.find(
1345
+ ), a = (c = e.attachments) == null ? void 0 : c.find(
1346
1346
  (w) => w.type === "audio" && w.asset_url
1347
- ), r = (c = e.attachments) == null ? void 0 : c.find(
1347
+ ), r = (v = e.attachments) == null ? void 0 : v.find(
1348
1348
  (w) => w.type === "file" && w.asset_url
1349
1349
  ), i = t ?? n ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1350
1350
  if (!l) return null;
@@ -1392,7 +1392,7 @@ const _s = ({
1392
1392
  fileSize: a,
1393
1393
  thumbnailUrl: r
1394
1394
  }) => {
1395
- const i = oe(t), l = a !== void 0 ? xs(a) : void 0;
1395
+ const i = ce(t), l = a !== void 0 ? xs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
1397
  vs,
1398
1398
  {
@@ -1411,14 +1411,14 @@ const _s = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s($a, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s(ja, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, ja = ({
1417
+ }, Ba = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
- const n = mt(e), a = ht(e);
1421
+ const n = ht(e), a = ft(e);
1422
1422
  return !n && !a ? null : /* @__PURE__ */ m("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: [
1423
1423
  !t && e.user && /* @__PURE__ */ s(
1424
1424
  ne,
@@ -1439,41 +1439,41 @@ const _s = ({
1439
1439
  {
1440
1440
  className: "str-chat__message-bubble",
1441
1441
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1442
- children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1442
+ children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, Ba = ({
1448
+ }, Ua = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
- const t = mt(e);
1451
+ const t = ht(e);
1452
1452
  if (t)
1453
- return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1454
- const n = ht(e);
1453
+ return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1454
+ const n = ft(e);
1455
1455
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1456
- }, Ua = ({
1456
+ }, Va = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
- const t = mt(e);
1459
+ const t = ht(e);
1460
1460
  if (t)
1461
- return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1462
- const n = ht(e);
1461
+ return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1462
+ const n = ft(e);
1463
1463
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1464
- }, dl = Object.assign(ja, {
1465
- Creator: Ba,
1466
- Visitor: Ua
1467
- }), Va = {
1464
+ }, ul = Object.assign(Ba, {
1465
+ Creator: Ua,
1466
+ Visitor: Va
1467
+ }), Ga = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Ga = {
1470
+ }, Ha = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ha = {
1473
+ }, Ya = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
1476
+ }, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
1477
1477
  sender: {
1478
1478
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1479
1479
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1495,7 +1495,7 @@ const _s = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = qa[Ya(e)][a];
1498
+ const o = t != null && t !== "", d = Wa[qa(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const _s = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
- Va[e],
1514
1513
  Ga[e],
1514
+ Ha[e],
1515
1515
  n && "border",
1516
- n && Ha[e],
1516
+ n && Ya[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const _s = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
1564
1564
  src: e,
1565
1565
  mimeType: t,
1566
1566
  filename: n,
1567
1567
  items: a
1568
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ka = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1568
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1569
1569
  /* @__PURE__ */ s(
1570
1570
  "audio",
1571
1571
  {
@@ -1577,7 +1577,7 @@ const _s = ({
1577
1577
  }
1578
1578
  ),
1579
1579
  n ?? null
1580
- ] }), ft = ({
1580
+ ] }), gt = ({
1581
1581
  state: e,
1582
1582
  src: t,
1583
1583
  mimeType: n,
@@ -1588,10 +1588,10 @@ const _s = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1592
1592
  if (h.length === 0)
1593
1593
  return null;
1594
- const f = o ?? (h.length > 1 ? "none" : "metadata");
1594
+ const g = o ?? (h.length > 1 ? "none" : "metadata");
1595
1595
  return /* @__PURE__ */ s(
1596
1596
  Te,
1597
1597
  {
@@ -1599,30 +1599,30 @@ const _s = ({
1599
1599
  text: i,
1600
1600
  groupPosition: l,
1601
1601
  "data-testid": "audio-attachment",
1602
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((b, c) => /* @__PURE__ */ s(
1603
- Ka,
1602
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1603
+ Ja,
1604
1604
  {
1605
- item: b,
1606
- preload: f,
1605
+ item: c,
1606
+ preload: g,
1607
1607
  trailingAction: (
1608
1608
  // Composer only supports a single attachment, so the
1609
1609
  // dismiss control sits on the only player.
1610
- p && c === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1610
+ p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1611
1611
  )
1612
1612
  },
1613
- `${b.src}-${c}`
1613
+ `${c.src}-${v}`
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
1617
- }, Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Qa = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), er = {
1618
- Composer: Ja,
1619
- Sent: Za,
1620
- Received: Qa
1617
+ }, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
1618
+ Composer: Za,
1619
+ Sent: Qa,
1620
+ Received: er
1621
1621
  };
1622
- function tr(e) {
1622
+ function sr(e) {
1623
1623
  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`;
1624
1624
  }
1625
- const sr = {
1625
+ const nr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const sr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function nr(e, t) {
1635
+ function ar(e, t) {
1636
1636
  if (t) {
1637
1637
  const r = t.lastIndexOf(".");
1638
1638
  if (r > 0 && r < t.length - 1) {
@@ -1641,8 +1641,8 @@ function nr(e, t) {
1641
1641
  }
1642
1642
  }
1643
1643
  if (!e) return;
1644
- if (oe(e) === "document") {
1645
- const r = ps(e), i = sr[r];
1644
+ if (ce(e) === "document") {
1645
+ const r = ps(e), i = nr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function nr(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function ar(e, t, n) {
1654
- const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
1653
+ function rr(e, t, n) {
1654
+ const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
1655
1655
  return [a, r].filter(Boolean).join(" · ") || void 0;
1656
1656
  }
1657
1657
  function re(e) {
@@ -1662,13 +1662,13 @@ function re(e) {
1662
1662
  return "download";
1663
1663
  }
1664
1664
  }
1665
- const rr = {
1665
+ const ir = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, ir = {
1668
+ }, lr = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, lr = {
1671
+ }, or = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
1674
  }, ys = ({
@@ -1681,16 +1681,16 @@ const rr = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
1685
1685
  "div",
1686
1686
  {
1687
1687
  className: k(
1688
1688
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1689
- ir[e]
1689
+ lr[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", lr[e]),
1693
+ className: k("size-6", or[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,12 +1701,12 @@ const rr = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- rr[e]
1704
+ ir[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
1708
1708
  ) : null
1709
- ] }), f = i ? /* @__PURE__ */ m(
1709
+ ] }), g = i ? /* @__PURE__ */ m(
1710
1710
  "button",
1711
1711
  {
1712
1712
  type: "button",
@@ -1721,12 +1721,12 @@ const rr = {
1721
1721
  h
1722
1722
  ]
1723
1723
  }
1724
- ) : /* @__PURE__ */ m(te, { children: [
1724
+ ) : /* @__PURE__ */ m(ee, { children: [
1725
1725
  p,
1726
1726
  h
1727
1727
  ] });
1728
1728
  return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1729
- f,
1729
+ g,
1730
1730
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1731
1731
  ] });
1732
1732
  };
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const or = ({
1747
+ const cr = ({
1748
1748
  src: e,
1749
1749
  filename: t,
1750
1750
  fileSize: n,
1751
1751
  mimeType: a,
1752
1752
  title: r,
1753
1753
  items: i
1754
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], cr = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1772,7 +1772,7 @@ const or = ({
1772
1772
  trailingAction: r
1773
1773
  }
1774
1774
  );
1775
- }, gt = ({
1775
+ }, pt = ({
1776
1776
  state: e,
1777
1777
  src: t,
1778
1778
  filename: n,
@@ -1785,21 +1785,21 @@ const or = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), f = e === "composer" && !!p, b = or({
1788
+ const h = Me(e), g = e === "composer" && !!p, c = cr({
1789
1789
  src: t,
1790
1790
  filename: n,
1791
1791
  fileSize: a,
1792
1792
  mimeType: r,
1793
1793
  title: i,
1794
1794
  items: l
1795
- }), c = (v) => {
1796
- if ((u == null ? void 0 : u(v)) === !1) return;
1797
- const g = b[v];
1798
- if (!g) return;
1799
- const x = g.filename ?? re(g.src);
1800
- ks(g.src, x);
1795
+ }), v = (b) => {
1796
+ if ((u == null ? void 0 : u(b)) === !1) return;
1797
+ const f = c[b];
1798
+ if (!f) return;
1799
+ const x = f.filename ?? re(f.src);
1800
+ ks(f.src, x);
1801
1801
  };
1802
- if (b.length === 0)
1802
+ if (c.length === 0)
1803
1803
  return null;
1804
1804
  const w = /* @__PURE__ */ s(
1805
1805
  "span",
@@ -1809,7 +1809,7 @@ const or = ({
1809
1809
  h === "dark" ? "text-white/70" : "text-black/70"
1810
1810
  ),
1811
1811
  "aria-hidden": !0,
1812
- children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
1812
+ children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
1813
1813
  }
1814
1814
  );
1815
1815
  return /* @__PURE__ */ s(
@@ -1819,29 +1819,29 @@ const or = ({
1819
1819
  text: o,
1820
1820
  groupPosition: d,
1821
1821
  "data-testid": "file-attachment",
1822
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: b.map((v, g) => /* @__PURE__ */ s(
1823
- cr,
1822
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
1823
+ dr,
1824
1824
  {
1825
1825
  variant: h,
1826
- item: v,
1827
- index: g,
1828
- onActivate: c,
1829
- trailingAction: f && g === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1826
+ item: b,
1827
+ index: f,
1828
+ onActivate: v,
1829
+ trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1830
1830
  },
1831
- `${v.src}-${g}`
1831
+ `${b.src}-${f}`
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
1835
- }, dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), hr = {
1836
- Composer: dr,
1837
- Sent: ur,
1838
- Received: mr
1839
- }, pt = ({
1835
+ }, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
1836
+ Composer: ur,
1837
+ Sent: mr,
1838
+ Received: hr
1839
+ }, bt = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
1842
1842
  prevLabel: n = "Previous",
1843
1843
  nextLabel: a = "Next"
1844
- }) => /* @__PURE__ */ m(te, { children: [
1844
+ }) => /* @__PURE__ */ m(ee, { children: [
1845
1845
  /* @__PURE__ */ s(
1846
1846
  "button",
1847
1847
  {
@@ -1849,7 +1849,7 @@ const or = ({
1849
1849
  onClick: e,
1850
1850
  "aria-label": n,
1851
1851
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1852
- children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1872,14 +1872,14 @@ const or = ({
1872
1872
  onTriggered: l
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
- (b) => {
1876
- b.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1875
+ (c) => {
1876
+ c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
1880
1880
  },
1881
1881
  [o, e, t, l]
1882
- ), p = r ?? n !== "pill", f = { className: k(
1882
+ ), p = r ?? n !== "pill", g = { className: k(
1883
1883
  n === "pill" ? "size-4" : "size-5",
1884
1884
  "shrink-0"
1885
1885
  ), weight: "bold" };
@@ -1898,14 +1898,14 @@ const or = ({
1898
1898
  }[i]
1899
1899
  ),
1900
1900
  children: o ? /* @__PURE__ */ s(
1901
- ke,
1901
+ Ce,
1902
1902
  {
1903
1903
  className: "size-4 animate-spin",
1904
1904
  weight: "bold",
1905
1905
  "aria-hidden": !0
1906
1906
  }
1907
1907
  ) : /* @__PURE__ */ s(
1908
- Ce,
1908
+ Se,
1909
1909
  {
1910
1910
  className: "size-5 shrink-0",
1911
1911
  weight: "bold",
@@ -1921,7 +1921,7 @@ const or = ({
1921
1921
  disabled: o,
1922
1922
  "aria-label": a,
1923
1923
  className: "mes-media-viewer__action",
1924
- children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
1924
+ children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
1925
  }
1926
1926
  ) : /* @__PURE__ */ m(
1927
1927
  "button",
@@ -1936,18 +1936,18 @@ const or = ({
1936
1936
  ),
1937
1937
  children: [
1938
1938
  o ? /* @__PURE__ */ s(
1939
- ke,
1939
+ Ce,
1940
1940
  {
1941
1941
  className: "size-4 animate-spin",
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Ce, { ...f, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1946
1946
  p ? null : a
1947
1947
  ]
1948
1948
  }
1949
1949
  );
1950
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
1950
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1951
1951
  length: e,
1952
1952
  initialIndex: t,
1953
1953
  open: n
@@ -1972,7 +1972,7 @@ const or = ({
1972
1972
  };
1973
1973
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1974
1974
  }, [n, e, l, o]), { index: r, prev: l, next: o };
1975
- }, vt = ({
1975
+ }, xt = ({
1976
1976
  open: e,
1977
1977
  onClose: t,
1978
1978
  ariaLabel: n,
@@ -1981,9 +1981,9 @@ const or = ({
1981
1981
  children: i,
1982
1982
  "data-testid": l
1983
1983
  }) => {
1984
- const o = H(null), d = H(null);
1984
+ const o = G(null), d = G(null);
1985
1985
  return K(() => {
1986
- var f;
1986
+ var g;
1987
1987
  const h = o.current;
1988
1988
  if (h) {
1989
1989
  if (e) {
@@ -1996,8 +1996,8 @@ const or = ({
1996
1996
  }
1997
1997
  else
1998
1998
  h.setAttribute("open", "");
1999
- const b = typeof document < "u" ? document.activeElement : null;
2000
- return (f = d.current) == null || f.focus(), () => {
1999
+ const c = typeof document < "u" ? document.activeElement : null;
2000
+ return (g = d.current) == null || g.focus(), () => {
2001
2001
  if (h.open)
2002
2002
  if (typeof h.close == "function")
2003
2003
  try {
@@ -2007,7 +2007,7 @@ const or = ({
2007
2007
  }
2008
2008
  else
2009
2009
  h.removeAttribute("open");
2010
- b && document.body.contains(b) && b.focus();
2010
+ c && document.body.contains(c) && c.focus();
2011
2011
  };
2012
2012
  }
2013
2013
  if (h.open)
@@ -2062,22 +2062,22 @@ const or = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Es = ({
2065
+ }, Ss = ({
2066
2066
  open: e,
2067
2067
  items: t,
2068
2068
  initialIndex: n = 0,
2069
2069
  onClose: a
2070
2070
  }) => {
2071
- const { index: r, prev: i, next: l } = bt({
2071
+ const { index: r, prev: i, next: l } = vt({
2072
2072
  length: t.length,
2073
2073
  initialIndex: n,
2074
2074
  open: e
2075
- }), o = t[r], d = ae(
2075
+ }), o = t[r], d = se(
2076
2076
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
2077
2077
  [o]
2078
2078
  );
2079
2079
  return o ? /* @__PURE__ */ m(
2080
- vt,
2080
+ xt,
2081
2081
  {
2082
2082
  open: e,
2083
2083
  onClose: a,
@@ -2107,7 +2107,7 @@ const or = ({
2107
2107
  `${r}:${o.src}`
2108
2108
  ),
2109
2109
  t.length > 1 ? /* @__PURE__ */ s(
2110
- pt,
2110
+ bt,
2111
2111
  {
2112
2112
  onPrev: i,
2113
2113
  onNext: l,
@@ -2118,7 +2118,7 @@ const or = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
2121
- }, fr = "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", Ss = ({
2121
+ }, gr = "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", Es = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const or = ({
2127
2127
  const r = e.length;
2128
2128
  if (r === 0) return null;
2129
2129
  const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
2130
- const h = k(fr, "h-full w-full");
2130
+ const h = k(gr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const or = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, gr = (e, t, n, a) => ({
2199
+ }, pr = (e, t, n, a) => ({
2200
2200
  ariaLabel: `Open image ${t + 1} of ${n}`,
2201
2201
  content: /* @__PURE__ */ s(
2202
2202
  "img",
@@ -2211,7 +2211,7 @@ const or = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), pr = ({
2214
+ }), br = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
@@ -2219,7 +2219,7 @@ const or = ({
2219
2219
  src: n.src,
2220
2220
  alt: n.alt,
2221
2221
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2222
- })), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2223
2223
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
2224
2224
  r
2225
2225
  );
@@ -2246,7 +2246,7 @@ const or = ({
2246
2246
  ),
2247
2247
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
2248
2248
  /* @__PURE__ */ s(
2249
- Es,
2249
+ Ss,
2250
2250
  {
2251
2251
  open: l,
2252
2252
  items: Is([{ src: e, alt: t }], n),
@@ -2266,13 +2266,13 @@ const or = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: f, handleActivate: b, closeViewer: c } = Re(
2269
+ const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2270
2270
  d
2271
2271
  );
2272
2272
  if (u.length === 0)
2273
2273
  return null;
2274
2274
  const w = u.map(
2275
- (v, g) => gr(v, g, u.length, o)
2275
+ (b, f) => pr(b, f, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2282,42 +2282,42 @@ const or = ({
2282
2282
  groupPosition: l,
2283
2283
  "data-testid": "image-attachment",
2284
2284
  children: [
2285
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: b }) }),
2285
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Es,
2287
+ Ss,
2288
2288
  {
2289
2289
  open: h,
2290
2290
  items: Is(u, a),
2291
- initialIndex: f,
2292
- onClose: c
2291
+ initialIndex: g,
2292
+ onClose: v
2293
2293
  }
2294
2294
  )
2295
2295
  ]
2296
2296
  }
2297
2297
  );
2298
- }, vr = (e) => /* @__PURE__ */ s(br, { ...e }), xr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), _r = {
2299
- Composer: vr,
2300
- Sent: xr,
2301
- Received: wr
2302
- }, Nr = ({
2298
+ }, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Nr = {
2299
+ Composer: xr,
2300
+ Sent: wr,
2301
+ Received: _r
2302
+ }, yr = ({
2303
2303
  open: e,
2304
2304
  items: t,
2305
2305
  initialIndex: n = 0,
2306
2306
  onClose: a
2307
2307
  }) => {
2308
- const { index: r, prev: i, next: l } = bt({
2308
+ const { index: r, prev: i, next: l } = vt({
2309
2309
  length: t.length,
2310
2310
  initialIndex: n,
2311
2311
  open: e
2312
- }), o = t[r], d = ae(
2312
+ }), o = t[r], d = se(
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
- ), u = ae(
2316
- () => o ? yr(o.src) : void 0,
2315
+ ), u = se(
2316
+ () => o ? kr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
2320
- vt,
2320
+ xt,
2321
2321
  {
2322
2322
  open: e,
2323
2323
  onClose: a,
@@ -2336,7 +2336,7 @@ const or = ({
2336
2336
  `${r}:${o.src}`
2337
2337
  ),
2338
2338
  t.length > 1 ? /* @__PURE__ */ s(
2339
- pt,
2339
+ bt,
2340
2340
  {
2341
2341
  onPrev: i,
2342
2342
  onNext: l,
@@ -2347,16 +2347,16 @@ const or = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, yr = (e) => {
2350
+ }, kr = (e) => {
2351
2351
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2352
2352
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2353
- }, kr = ({
2353
+ }, Cr = ({
2354
2354
  src: e,
2355
2355
  filename: t,
2356
2356
  fileSize: n,
2357
2357
  title: a,
2358
2358
  items: r
2359
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Cr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2377,7 +2377,7 @@ const or = ({
2377
2377
  trailingAction: r
2378
2378
  }
2379
2379
  );
2380
- }, xt = ({
2380
+ }, wt = ({
2381
2381
  state: e,
2382
2382
  src: t,
2383
2383
  filename: n,
@@ -2389,12 +2389,12 @@ const or = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = kr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2392
+ const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2393
2393
  d
2394
- ), v = e === "composer" && !!u;
2394
+ ), b = e === "composer" && !!u;
2395
2395
  if (h.length === 0)
2396
2396
  return null;
2397
- const g = h.map((x) => ({
2397
+ const f = h.map((x) => ({
2398
2398
  src: x.src,
2399
2399
  filename: x.filename ?? re(x.src)
2400
2400
  }));
@@ -2406,61 +2406,61 @@ const or = ({
2406
2406
  groupPosition: o,
2407
2407
  "data-testid": "pdf-attachment",
2408
2408
  children: [
2409
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, _) => {
2410
- const A = x.filename ?? re(x.src), S = v && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2409
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
+ const S = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
2411
  Cs,
2412
2412
  {
2413
2413
  url: x.src,
2414
- filename: A,
2414
+ filename: S,
2415
2415
  variant: "inline",
2416
- label: `Download ${A}`,
2416
+ label: `Download ${S}`,
2417
2417
  tone: p
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- Cr,
2421
+ Sr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
2425
- index: _,
2426
- onActivate: c,
2427
- trailingAction: S
2425
+ index: N,
2426
+ onActivate: v,
2427
+ trailingAction: T
2428
2428
  },
2429
- `${x.src}-${_}`
2429
+ `${x.src}-${N}`
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- Nr,
2433
+ yr,
2434
2434
  {
2435
- open: f,
2436
- items: g,
2437
- initialIndex: b,
2435
+ open: g,
2436
+ items: f,
2437
+ initialIndex: c,
2438
2438
  onClose: w
2439
2439
  }
2440
2440
  )
2441
2441
  ]
2442
2442
  }
2443
2443
  );
2444
- }, Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Tr = {
2444
+ }, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
2445
2445
  Composer: Er,
2446
- Sent: Sr,
2447
- Received: Ir
2446
+ Sent: Ir,
2447
+ Received: Tr
2448
2448
  }, As = ({
2449
2449
  open: e,
2450
2450
  items: t,
2451
2451
  initialIndex: n = 0,
2452
2452
  onClose: a
2453
2453
  }) => {
2454
- const { index: r, prev: i, next: l } = bt({
2454
+ const { index: r, prev: i, next: l } = vt({
2455
2455
  length: t.length,
2456
2456
  initialIndex: n,
2457
2457
  open: e
2458
- }), o = t[r], d = ae(
2458
+ }), o = t[r], d = se(
2459
2459
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
2460
2460
  [o]
2461
2461
  );
2462
2462
  return o ? /* @__PURE__ */ m(
2463
- vt,
2463
+ xt,
2464
2464
  {
2465
2465
  open: e,
2466
2466
  onClose: a,
@@ -2484,7 +2484,7 @@ const or = ({
2484
2484
  `${r}:${o.src}`
2485
2485
  ),
2486
2486
  t.length > 1 ? /* @__PURE__ */ s(
2487
- pt,
2487
+ bt,
2488
2488
  {
2489
2489
  onPrev: i,
2490
2490
  onNext: l,
@@ -2495,7 +2495,7 @@ const or = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
2498
- }, Ar = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2498
+ }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(tt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2499
2499
  item: e,
2500
2500
  index: t
2501
2501
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2517,11 +2517,11 @@ const or = ({
2517
2517
  "aria-hidden": !0
2518
2518
  }
2519
2519
  ) }),
2520
- /* @__PURE__ */ s(Ar, {})
2521
- ] }), Mr = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Mr, {})
2521
+ ] }), Rr = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
2523
  content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
- }), Rr = ({
2524
+ }), Dr = ({
2525
2525
  src: e,
2526
2526
  poster: t,
2527
2527
  mimeType: n,
@@ -2562,7 +2562,7 @@ const or = ({
2562
2562
  }
2563
2563
  )
2564
2564
  ] });
2565
- }, Ls = ({
2565
+ }, Ds = ({
2566
2566
  state: e,
2567
2567
  src: t,
2568
2568
  poster: n,
@@ -2574,13 +2574,13 @@ const or = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Rr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2577
+ const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2578
2578
  u
2579
2579
  );
2580
2580
  if (p.length === 0)
2581
2581
  return null;
2582
- const v = p.map(
2583
- (g, x) => Mr(g, x, p.length)
2582
+ const b = p.map(
2583
+ (f, x) => Rr(f, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2591,57 +2591,44 @@ const or = ({
2591
2591
  "data-testid": "video-attachment",
2592
2592
  children: [
2593
2593
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2594
- Ss,
2594
+ Es,
2595
2595
  {
2596
- tiles: v,
2597
- onTileActivate: c,
2596
+ tiles: b,
2597
+ onTileActivate: v,
2598
2598
  className: "overflow-hidden rounded-md"
2599
2599
  }
2600
2600
  ) }),
2601
2601
  /* @__PURE__ */ s(
2602
2602
  As,
2603
2603
  {
2604
- open: f,
2604
+ open: g,
2605
2605
  items: Rs(p, r),
2606
- initialIndex: b,
2606
+ initialIndex: c,
2607
2607
  onClose: w
2608
2608
  }
2609
2609
  )
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Fr = {
2614
- Composer: Dr,
2615
- Sent: zr,
2616
- Received: Pr
2617
- }, Ne = {
2618
- Image: _r,
2619
- Video: Fr,
2620
- Audio: er,
2621
- Pdf: Tr,
2622
- File: hr
2623
- }, Or = {
2624
- isUnlocking: () => !1
2613
+ }, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
2614
+ Composer: zr,
2615
+ Sent: Pr,
2616
+ Received: Fr
2617
+ }, ye = {
2618
+ Image: Nr,
2619
+ Video: Or,
2620
+ Audio: tr,
2621
+ Pdf: Ar,
2622
+ File: fr
2625
2623
  }, $r = {
2626
- LockedAttachment: Or
2627
- }, Ds = at({}), ul = Ds.Provider;
2628
- function jr(e) {
2629
- return Se(Ds)[e] ?? $r[e];
2624
+ isUnlocking: () => !1
2625
+ }, jr = {
2626
+ LockedAttachment: $r
2627
+ }, Ls = rt({}), ml = Ls.Provider;
2628
+ function Br(e) {
2629
+ return Ie(Ls)[e] ?? jr[e];
2630
2630
  }
2631
- const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
2632
- message: e,
2633
- groupStyles: t
2634
- }) => !Br(t) || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
2635
- "div",
2636
- {
2637
- className: "str-chat__message-delivery-status",
2638
- "data-testid": "message-delivery-status",
2639
- children: [
2640
- /* @__PURE__ */ s(Yn, { size: 14, weight: "bold", "aria-hidden": "true" }),
2641
- /* @__PURE__ */ s("span", { children: "Delivered" })
2642
- ]
2643
- }
2644
- ), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2631
+ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2632
  "svg",
2646
2633
  {
2647
2634
  width: e,
@@ -2658,19 +2645,19 @@ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
2658
2645
  }
2659
2646
  )
2660
2647
  }
2661
- ), Gr = (e) => {
2648
+ ), Vr = (e) => {
2662
2649
  var t;
2663
2650
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2664
- }, Hr = (e) => {
2651
+ }, Gr = (e) => {
2665
2652
  var t;
2666
2653
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2667
2654
  }, Fe = (e) => {
2668
2655
  var t;
2669
2656
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2670
- }, Yr = (e) => {
2657
+ }, Hr = (e) => {
2671
2658
  var t;
2672
2659
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2673
- }, zs = (e) => Gr(e) || Hr(e), qr = (e) => {
2660
+ }, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
2674
2661
  var t;
2675
2662
  return zs(e) && !((t = e.text) != null && t.trim());
2676
2663
  }, Ke = ({
@@ -2684,27 +2671,27 @@ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
2684
2671
  if (!r && !i)
2685
2672
  return null;
2686
2673
  if (r) {
2687
- const f = (h = e.metadata) == null ? void 0 : h.amount_text;
2688
- if (!f) return null;
2689
- const b = t ? "message-tip-standalone" : "message-tag message-tag--tip", c = t ? `${f} tip` : `Delivered with ${f} tip`;
2690
- return /* @__PURE__ */ m("div", { className: b, children: [
2674
+ const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2675
+ if (!g) return null;
2676
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
+ return /* @__PURE__ */ m("div", { className: c, children: [
2691
2678
  /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2692
- /* @__PURE__ */ s("span", { children: c })
2679
+ /* @__PURE__ */ s("span", { children: v })
2693
2680
  ] });
2694
2681
  }
2695
2682
  const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
2696
2683
  "message-chatbot-indicator",
2697
2684
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2698
2685
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2699
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Vr, { size: l ? 12 : 15 }) });
2700
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
2686
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
2687
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
2701
2688
  u,
2702
2689
  p
2703
- ] }) : /* @__PURE__ */ m(te, { children: [
2690
+ ] }) : /* @__PURE__ */ m(ee, { children: [
2704
2691
  p,
2705
2692
  u
2706
2693
  ] }) });
2707
- }, Wr = ({
2694
+ }, qr = ({
2708
2695
  selected: e,
2709
2696
  onVoteUp: t,
2710
2697
  onVoteDown: n
@@ -2737,26 +2724,47 @@ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
2737
2724
  children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2738
2725
  }
2739
2726
  )
2740
- ] }), Xr = /^([a-z][a-z0-9+.-]*):/i, Kr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2741
- function wt(e) {
2727
+ ] }), Je = () => {
2728
+ var i;
2729
+ const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
2730
+ var l;
2731
+ if (!(!a || !t)) {
2732
+ for (let o = t.length - 1; o >= 0; o -= 1)
2733
+ if (((l = t[o].user) == null ? void 0 : l.id) === a) return t[o].id;
2734
+ }
2735
+ }, [t, a]);
2736
+ return e.id !== r ? null : /* @__PURE__ */ m(ee, { children: [
2737
+ /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2738
+ /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2739
+ ] });
2740
+ }, Wr = () => null, Xr = () => /* @__PURE__ */ s(
2741
+ Xs,
2742
+ {
2743
+ MessageSentStatus: Je,
2744
+ MessageDeliveredStatus: Je,
2745
+ MessageReadStatus: Je,
2746
+ MessageSendingStatus: Wr
2747
+ }
2748
+ ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2749
+ function _t(e) {
2742
2750
  if (typeof e != "string") return;
2743
2751
  const t = e.trim();
2744
2752
  if (t === "") return;
2745
- const n = Xr.exec(t);
2753
+ const n = Kr.exec(t);
2746
2754
  if (n) {
2747
2755
  const a = n[1].toLowerCase();
2748
- return Kr.has(a) ? t : void 0;
2756
+ return Jr.has(a) ? t : void 0;
2749
2757
  }
2750
2758
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2751
2759
  }
2752
- const Jr = {
2760
+ const Zr = {
2753
2761
  dark: "bg-white text-[#121110] hover:bg-white/90",
2754
2762
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2755
- }, Zr = ({ variant: e, cta: t }) => {
2763
+ }, Qr = ({ variant: e, cta: t }) => {
2756
2764
  const n = k(
2757
2765
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2758
- Jr[e]
2759
- ), a = wt(t.href);
2766
+ Zr[e]
2767
+ ), a = _t(t.href);
2760
2768
  return a ? /* @__PURE__ */ s(
2761
2769
  "a",
2762
2770
  {
@@ -2782,13 +2790,13 @@ const Jr = {
2782
2790
  children: t.label
2783
2791
  }
2784
2792
  );
2785
- }, Qr = {
2793
+ }, ei = {
2786
2794
  dark: "text-white",
2787
2795
  light: "text-black/90"
2788
- }, ei = "text-white/30", ti = {
2796
+ }, ti = "text-white/30", si = {
2789
2797
  dark: "text-white/55",
2790
2798
  light: "text-black/55"
2791
- }, _t = ({
2799
+ }, Nt = ({
2792
2800
  variant: e,
2793
2801
  title: t,
2794
2802
  placeholderTitle: n,
@@ -2798,14 +2806,14 @@ const Jr = {
2798
2806
  cta: l,
2799
2807
  trailingAction: o
2800
2808
  }) => {
2801
- const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", b = f !== "", c = l != null;
2802
- if (!p && !h && !b && !c) return null;
2803
- const v = k(
2809
+ const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", v = l != null;
2810
+ if (!p && !h && !c && !v) return null;
2811
+ const b = k(
2804
2812
  "truncate text-base font-medium leading-6",
2805
- d && !t ? ei : Qr[e]
2806
- ), g = k(
2813
+ d && !t ? ti : ei[e]
2814
+ ), f = k(
2807
2815
  "truncate text-xs leading-4",
2808
- ti[e]
2816
+ si[e]
2809
2817
  );
2810
2818
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2811
2819
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
@@ -2813,17 +2821,17 @@ const Jr = {
2813
2821
  /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2814
2822
  p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2815
2823
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2816
- /* @__PURE__ */ s("p", { className: k("min-w-0", v), children: u })
2824
+ /* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
2817
2825
  ] }),
2818
- h && /* @__PURE__ */ s("p", { className: g, children: a })
2826
+ h && /* @__PURE__ */ s("p", { className: f, children: a })
2819
2827
  ] }),
2820
- !c && b && /* @__PURE__ */ s("p", { className: g, children: f })
2828
+ !v && c && /* @__PURE__ */ s("p", { className: f, children: g })
2821
2829
  ] }),
2822
2830
  o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
2823
2831
  ] }),
2824
- l && /* @__PURE__ */ s(Zr, { variant: e, cta: l })
2832
+ l && /* @__PURE__ */ s(Qr, { variant: e, cta: l })
2825
2833
  ] });
2826
- }, si = k(
2834
+ }, ni = k(
2827
2835
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2828
2836
  // 1px hairline border that sits flush with the card chrome — matches
2829
2837
  // the messaging design system's "small border around link attachments"
@@ -2842,7 +2850,7 @@ const Jr = {
2842
2850
  "data-testid": d
2843
2851
  }) => {
2844
2852
  const u = n != null || a != null, p = k(
2845
- si,
2853
+ ni,
2846
2854
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2847
2855
  // `focus-ring` is a design-system utility from the component-library
2848
2856
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2890,17 +2898,17 @@ const Jr = {
2890
2898
  ]
2891
2899
  }
2892
2900
  );
2893
- }, ni = {
2901
+ }, ai = {
2894
2902
  dark: "bg-white/10",
2895
2903
  light: "bg-black/5"
2896
- }, ai = {
2904
+ }, ri = {
2897
2905
  dark: "size-16 text-white/25",
2898
2906
  light: "size-16 text-black/25"
2899
- }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", Nt = (e, t) => {
2907
+ }, Ve = (e, t) => !!t && !!e && ce(e) === "audio", yt = (e, t) => {
2900
2908
  if (!t || !e) return !1;
2901
- const n = oe(e);
2909
+ const n = ce(e);
2902
2910
  return n === "video" || n === "audio";
2903
- }, yt = "bg-[#F2F3F4]", $e = ({
2911
+ }, kt = "bg-[#F2F3F4]", $e = ({
2904
2912
  variant: e,
2905
2913
  thumbnailUrl: t,
2906
2914
  sourceUrl: n,
@@ -2909,7 +2917,7 @@ const Jr = {
2909
2917
  topLeft: i,
2910
2918
  topRight: l
2911
2919
  }) => {
2912
- const o = oe(r), d = !!n && o === "video";
2920
+ const o = ce(r), d = !!n && o === "video";
2913
2921
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2914
2922
  "audio",
2915
2923
  {
@@ -2951,10 +2959,10 @@ const Jr = {
2951
2959
  {
2952
2960
  className: k(
2953
2961
  "flex h-full w-full items-center justify-center",
2954
- ni[e]
2962
+ ai[e]
2955
2963
  ),
2956
2964
  children: we(r, {
2957
- className: ai[e],
2965
+ className: ri[e],
2958
2966
  weight: "regular"
2959
2967
  })
2960
2968
  }
@@ -2964,7 +2972,7 @@ const Jr = {
2964
2972
  ]
2965
2973
  }
2966
2974
  );
2967
- }, ri = ({
2975
+ }, ii = ({
2968
2976
  title: e,
2969
2977
  placeholderTitle: t,
2970
2978
  description: n,
@@ -2978,7 +2986,7 @@ const Jr = {
2978
2986
  onDismiss: p,
2979
2987
  onEditClick: h
2980
2988
  }) => {
2981
- const f = o === "classic", b = Ve(r, l), c = p ? /* @__PURE__ */ s(
2989
+ const g = o === "classic", c = Ve(r, l), v = p ? /* @__PURE__ */ s(
2982
2990
  "button",
2983
2991
  {
2984
2992
  type: "button",
@@ -2994,10 +3002,10 @@ const Jr = {
2994
3002
  onClick: h,
2995
3003
  "aria-label": "Edit attachment",
2996
3004
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2997
- children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3005
+ children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
2998
3006
  }
2999
3007
  ) : void 0;
3000
- return b ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3008
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3001
3009
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3002
3010
  $e,
3003
3011
  {
@@ -3007,14 +3015,14 @@ const Jr = {
3007
3015
  mimeType: r
3008
3016
  }
3009
3017
  ) }),
3010
- c && /* @__PURE__ */ s("div", { className: "shrink-0", children: c })
3018
+ v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
3011
3019
  ] }) }) : /* @__PURE__ */ m(
3012
3020
  Oe,
3013
3021
  {
3014
3022
  variant: "dark",
3015
- topRight: f ? c : void 0,
3023
+ topRight: g ? v : void 0,
3016
3024
  children: [
3017
- !f && /* @__PURE__ */ s(
3025
+ !g && /* @__PURE__ */ s(
3018
3026
  $e,
3019
3027
  {
3020
3028
  variant: "dark",
@@ -3022,11 +3030,11 @@ const Jr = {
3022
3030
  sourceUrl: l,
3023
3031
  title: e,
3024
3032
  mimeType: r,
3025
- topRight: c
3033
+ topRight: v
3026
3034
  }
3027
3035
  ),
3028
3036
  /* @__PURE__ */ s(
3029
- _t,
3037
+ Nt,
3030
3038
  {
3031
3039
  variant: "dark",
3032
3040
  title: e,
@@ -3041,7 +3049,7 @@ const Jr = {
3041
3049
  ]
3042
3050
  }
3043
3051
  );
3044
- }, ii = ({
3052
+ }, li = ({
3045
3053
  title: e,
3046
3054
  description: t,
3047
3055
  url: n,
@@ -3053,21 +3061,21 @@ const Jr = {
3053
3061
  cta: d,
3054
3062
  onClick: u
3055
3063
  }) => {
3056
- const p = Nt(a, i), h = wt(n), f = d == null && h != null && !p ? h : void 0, b = d == null && !p ? u : void 0, c = Ve(a, i) ? yt : void 0, w = d && u ? {
3064
+ const p = yt(a, i), h = _t(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
3057
3065
  ...d,
3058
3066
  onClick: () => {
3059
- var v;
3060
- u(), (v = d.onClick) == null || v.call(d);
3067
+ var b;
3068
+ u(), (b = d.onClick) == null || b.call(d);
3061
3069
  }
3062
3070
  } : d;
3063
3071
  return /* @__PURE__ */ m(
3064
3072
  Oe,
3065
3073
  {
3066
3074
  variant: "light",
3067
- href: f,
3068
- onClick: b,
3075
+ href: g,
3076
+ onClick: c,
3069
3077
  ariaLabel: e ?? "Open attachment preview",
3070
- bgClassName: c,
3078
+ bgClassName: v,
3071
3079
  "data-testid": "link-attachment",
3072
3080
  children: [
3073
3081
  l === "featured" && /* @__PURE__ */ s(
@@ -3081,7 +3089,7 @@ const Jr = {
3081
3089
  }
3082
3090
  ),
3083
3091
  /* @__PURE__ */ s(
3084
- _t,
3092
+ Nt,
3085
3093
  {
3086
3094
  variant: "light",
3087
3095
  title: e,
@@ -3094,7 +3102,7 @@ const Jr = {
3094
3102
  ]
3095
3103
  }
3096
3104
  );
3097
- }, li = ({
3105
+ }, oi = ({
3098
3106
  title: e,
3099
3107
  placeholderTitle: t,
3100
3108
  description: n,
@@ -3107,14 +3115,14 @@ const Jr = {
3107
3115
  cta: u,
3108
3116
  onClick: p
3109
3117
  }) => {
3110
- const h = Nt(r, l), f = wt(a), b = u == null && f != null && !h ? f : void 0, c = u == null && !h && b != null ? p : void 0;
3118
+ const h = yt(r, l), g = _t(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3111
3119
  return /* @__PURE__ */ m(
3112
3120
  Oe,
3113
3121
  {
3114
3122
  variant: "dark",
3115
- href: b,
3116
- onClick: c,
3117
- bgClassName: Ve(r, l) ? yt : void 0,
3123
+ href: c,
3124
+ onClick: v,
3125
+ bgClassName: Ve(r, l) ? kt : void 0,
3118
3126
  children: [
3119
3127
  o === "featured" && /* @__PURE__ */ s(
3120
3128
  $e,
@@ -3127,7 +3135,7 @@ const Jr = {
3127
3135
  }
3128
3136
  ),
3129
3137
  /* @__PURE__ */ s(
3130
- _t,
3138
+ Nt,
3131
3139
  {
3132
3140
  variant: "dark",
3133
3141
  title: e,
@@ -3142,10 +3150,10 @@ const Jr = {
3142
3150
  }
3143
3151
  );
3144
3152
  }, es = {
3145
- Composer: ri,
3146
- Sent: li,
3147
- Received: ii
3148
- }, oi = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3153
+ Composer: ii,
3154
+ Sent: oi,
3155
+ Received: li
3156
+ }, ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", di = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3149
3157
  function P(e) {
3150
3158
  const t = e == null ? void 0 : e.trim();
3151
3159
  return t || void 0;
@@ -3153,7 +3161,7 @@ function P(e) {
3153
3161
  function ts(e) {
3154
3162
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3155
3163
  }
3156
- function di(e, t) {
3164
+ function ui(e, t) {
3157
3165
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3158
3166
  return !1;
3159
3167
  const n = ts(e), a = ts(t);
@@ -3174,11 +3182,11 @@ function ss(e) {
3174
3182
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3175
3183
  // native video/audio player in the hero instead of a static thumbnail.
3176
3184
  sourceUrl: a,
3177
- layout: n || Nt(r, a) ? "featured" : "classic",
3185
+ layout: n || yt(r, a) ? "featured" : "classic",
3178
3186
  mimeType: r
3179
3187
  };
3180
3188
  }
3181
- function ui(e) {
3189
+ function mi(e) {
3182
3190
  var t;
3183
3191
  return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3184
3192
  }
@@ -3208,41 +3216,41 @@ function Fs(e) {
3208
3216
  a(r);
3209
3217
  continue;
3210
3218
  }
3211
- const i = ui(r);
3219
+ const i = mi(r);
3212
3220
  i && n(i, r);
3213
3221
  }
3214
3222
  return t;
3215
3223
  }
3216
- function mi(e) {
3224
+ function hi(e) {
3217
3225
  let t = 0;
3218
3226
  for (const n of e)
3219
3227
  t += n.type === "link" ? n.attachments.length : 1;
3220
3228
  return t;
3221
3229
  }
3222
- function hi(e) {
3230
+ function fi(e) {
3223
3231
  return e.filter((t) => t.type === "media").length;
3224
3232
  }
3225
- function fi(e, t, n) {
3233
+ function gi(e, t, n) {
3226
3234
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3227
3235
  }
3228
3236
  function ns(e) {
3229
3237
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3230
3238
  }
3231
- function gi(e) {
3239
+ function pi(e) {
3232
3240
  switch (e) {
3233
3241
  case "image":
3234
- return Ne.Image;
3242
+ return ye.Image;
3235
3243
  case "video":
3236
- return Ne.Video;
3244
+ return ye.Video;
3237
3245
  case "audio":
3238
- return Ne.Audio;
3246
+ return ye.Audio;
3239
3247
  case "pdf":
3240
- return Ne.Pdf;
3248
+ return ye.Pdf;
3241
3249
  default:
3242
- return Ne.File;
3250
+ return ye.File;
3243
3251
  }
3244
3252
  }
3245
- function pi(e, t) {
3253
+ function bi(e, t) {
3246
3254
  if (t.length > 1)
3247
3255
  switch (e) {
3248
3256
  case "image":
@@ -3329,20 +3337,20 @@ function pi(e, t) {
3329
3337
  };
3330
3338
  }
3331
3339
  }
3332
- function bi({
3340
+ function vi({
3333
3341
  groupPosition: e,
3334
3342
  isMyMessage: t,
3335
3343
  segment: n,
3336
3344
  text: a
3337
3345
  }) {
3338
- const r = gi(n.kind), i = {
3339
- ...pi(n.kind, n.attachments),
3346
+ const r = pi(n.kind), i = {
3347
+ ...bi(n.kind, n.attachments),
3340
3348
  groupPosition: e,
3341
3349
  ...a ? { text: a } : {}
3342
3350
  };
3343
3351
  return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3344
3352
  }
3345
- const vi = ({
3353
+ const xi = ({
3346
3354
  groupPosition: e,
3347
3355
  isMyMessage: t,
3348
3356
  message: n
@@ -3350,48 +3358,48 @@ const vi = ({
3350
3358
  var w;
3351
3359
  const a = Fs(n.attachments);
3352
3360
  if (a.length === 0) return null;
3353
- const r = mi(a), i = hi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((v) => v.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && di(l, d) ? void 0 : l;
3361
+ const r = hi(a), i = fi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
3354
3362
  let p = 0, h = 0;
3355
- const f = [], b = (v, g) => {
3363
+ const g = [], c = (b, f) => {
3356
3364
  const x = p === r - 1;
3357
3365
  p += 1;
3358
- const _ = t ? es.Sent : es.Received;
3359
- f.push(
3366
+ const N = t ? es.Sent : es.Received;
3367
+ g.push(
3360
3368
  /* @__PURE__ */ m(U.Fragment, { children: [
3361
- /* @__PURE__ */ s(_, { ...ss(v) }),
3362
- x && u ? /* @__PURE__ */ s("div", { className: t ? oi : ci, children: u }) : null
3363
- ] }, g)
3369
+ /* @__PURE__ */ s(N, { ...ss(b) }),
3370
+ x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3371
+ ] }, f)
3364
3372
  );
3365
- }, c = (v, g) => {
3366
- const x = p === r - 1, _ = fi(
3373
+ }, v = (b, f) => {
3374
+ const x = p === r - 1, N = gi(
3367
3375
  h,
3368
3376
  i,
3369
3377
  e
3370
3378
  );
3371
- p += 1, h += 1, f.push(
3379
+ p += 1, h += 1, g.push(
3372
3380
  /* @__PURE__ */ s(
3373
- bi,
3381
+ vi,
3374
3382
  {
3375
- groupPosition: _,
3383
+ groupPosition: N,
3376
3384
  isMyMessage: t,
3377
- segment: v,
3385
+ segment: b,
3378
3386
  text: x ? u : void 0
3379
3387
  },
3380
- g
3388
+ f
3381
3389
  )
3382
3390
  );
3383
3391
  };
3384
- return a.forEach((v, g) => {
3385
- if (v.type === "link") {
3386
- v.attachments.forEach((x, _) => {
3387
- b(x, `link-${g}-${_}`);
3392
+ return a.forEach((b, f) => {
3393
+ if (b.type === "link") {
3394
+ b.attachments.forEach((x, N) => {
3395
+ c(x, `link-${f}-${N}`);
3388
3396
  });
3389
3397
  return;
3390
3398
  }
3391
- c(v, `media-${g}`);
3392
- }), /* @__PURE__ */ s(te, { children: f });
3393
- }, xi = (e) => {
3394
- var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3399
+ v(b, `media-${f}`);
3400
+ }), /* @__PURE__ */ s(ee, { children: g });
3401
+ }, wi = (e) => {
3402
+ var At, Mt, Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3395
3403
  const {
3396
3404
  additionalMessageInputProps: t,
3397
3405
  chatbotVotingEnabled: n,
@@ -3399,93 +3407,92 @@ const vi = ({
3399
3407
  endOfGroup: r,
3400
3408
  firstOfGroup: i,
3401
3409
  groupedByUser: l,
3402
- groupStyles: o,
3403
- handleAction: d,
3404
- handleOpenThread: u,
3405
- handleRetry: p,
3406
- highlighted: h,
3407
- isMessageAIGenerated: f,
3408
- isMyMessage: b,
3410
+ handleAction: o,
3411
+ handleOpenThread: d,
3412
+ handleRetry: u,
3413
+ highlighted: p,
3414
+ isMessageAIGenerated: h,
3415
+ isMyMessage: g,
3409
3416
  message: c,
3410
- renderText: w,
3411
- threadList: v,
3412
- viewerLanguage: g
3413
- } = e, { client: x } = me("CustomMessage"), { channel: _ } = ue("CustomMessage"), { isUnlocking: A, onUnlockClick: S, onFetchSource: I, onDownloadClick: L } = jr("LockedAttachment"), [D, $] = B(!1), z = Ks(c.id), { selected: y, voteUp: M, voteDown: E } = va(c), {
3414
- Attachment: C = Js,
3415
- EditMessageModal: T = Zs,
3416
- MessageActions: F,
3417
- MessageBlocked: O = Qs,
3418
- MessageBouncePrompt: V = en,
3419
- MessageDeleted: Z = tn,
3420
- MessageIsThreadReplyInChannelButtonIndicator: ee = sn,
3421
- MessageRepliesCountButton: X = nn,
3422
- ReminderNotification: N = an,
3423
- StreamedMessageText: R = rn,
3424
- PinIndicator: G
3425
- } = is("CustomMessage"), Y = ln(c), q = on(c), W = ae(
3426
- () => f == null ? void 0 : f(c),
3427
- [f, c]
3428
- ), j = ae(() => {
3429
- const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3417
+ renderText: v,
3418
+ threadList: w,
3419
+ viewerLanguage: b
3420
+ } = e, { client: f } = oe("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = Br("LockedAttachment"), [L, D] = B(!1), O = Js(c.id), { selected: z, voteUp: y, voteDown: A } = xa(c), {
3421
+ Attachment: E = Zs,
3422
+ EditMessageModal: C = Qs,
3423
+ MessageActions: I,
3424
+ MessageBlocked: $ = en,
3425
+ MessageBouncePrompt: F = tn,
3426
+ MessageDeleted: V = sn,
3427
+ MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3428
+ MessageRepliesCountButton: te = an,
3429
+ ReminderNotification: X = rn,
3430
+ StreamedMessageText: _ = ln,
3431
+ PinIndicator: R
3432
+ } = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
3433
+ () => h == null ? void 0 : h(c),
3434
+ [h, c]
3435
+ ), j = se(() => {
3436
+ const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
3430
3437
  if (!Fe(c)) return pe;
3431
3438
  const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3432
3439
  return Gt.length === pe.length ? pe : Gt;
3433
- }, [c]), Q = ae(
3440
+ }, [c]), W = se(
3434
3441
  () => Fs(j),
3435
3442
  [j]
3436
- ), se = ae(() => {
3437
- const de = hs({ message: c, viewerLanguage: g });
3438
- return de === c.text ? c : { ...c, text: de };
3439
- }, [c, g]), Le = Q.length > 0, De = Q.reduce(
3440
- (de, pe) => de + pe.attachments.length,
3443
+ ), Z = se(() => {
3444
+ const me = hs({ message: c, viewerLanguage: b });
3445
+ return me === c.text ? c : { ...c, text: me };
3446
+ }, [c, b]), de = W.length > 0, De = W.reduce(
3447
+ (me, pe) => me + pe.attachments.length,
3441
3448
  0
3442
- ) === ((j == null ? void 0 : j.length) ?? 0), ie = Wa(
3449
+ ) === ((j == null ? void 0 : j.length) ?? 0), Le = Xa(
3443
3450
  {
3444
3451
  endOfGroup: r,
3445
3452
  firstOfGroup: i,
3446
3453
  groupedByUser: l
3447
3454
  }
3448
3455
  );
3449
- if (cn(c))
3456
+ if (dn(c))
3450
3457
  return null;
3451
3458
  if (c.deleted_at || c.type === "deleted")
3452
- return /* @__PURE__ */ s(Z, { message: c });
3453
- if (dn(c))
3454
- return /* @__PURE__ */ s(O, {});
3455
- const ce = !v && !!c.reply_count, le = !v && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, Et = un(c);
3459
+ return /* @__PURE__ */ s(V, { message: c });
3460
+ if (un(c))
3461
+ return /* @__PURE__ */ s($, {});
3462
+ const ae = !w && !!c.reply_count, ue = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3456
3463
  let he;
3457
- Ct ? he = () => p(c) : Et && (he = () => $(!0));
3458
- const fe = b(), Us = k(
3464
+ ie ? he = () => u(c) : St && (he = () => D(!0));
3465
+ const fe = g(), Us = k(
3459
3466
  "str-chat__message str-chat__message-simple",
3460
3467
  `str-chat__message--${c.type}`,
3461
3468
  `str-chat__message--${c.status}`,
3462
3469
  fe ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3463
3470
  c.text ? "str-chat__message--has-text" : "has-no-text",
3464
3471
  {
3465
- "str-chat__message--has-attachment": Y,
3466
- "str-chat__message--highlighted": h,
3472
+ "str-chat__message--has-attachment": H,
3473
+ "str-chat__message--highlighted": p,
3467
3474
  "str-chat__message--pinned pinned-message": c.pinned,
3468
3475
  "str-chat__message--with-reactions": q,
3469
3476
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3470
- "str-chat__message-with-thread-link": ce || le,
3477
+ "str-chat__message-with-thread-link": ae || ue,
3471
3478
  "str-chat__virtual-message__wrapper--end": r,
3472
3479
  "str-chat__virtual-message__wrapper--first": i,
3473
3480
  "str-chat__virtual-message__wrapper--group": l
3474
3481
  }
3475
- ), Ge = c.poll_id && x.polls.fromState(c.poll_id), St = qr(c), ge = Fe(c), It = Yr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = Le && De && !c.quoted_message && !Ge && !W && !ge;
3476
- return /* @__PURE__ */ m(te, { children: [
3482
+ ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
3483
+ return /* @__PURE__ */ m(ee, { children: [
3477
3484
  a && /* @__PURE__ */ s(
3478
- T,
3485
+ C,
3479
3486
  {
3480
3487
  additionalMessageInputProps: t
3481
3488
  }
3482
3489
  ),
3483
- D && /* @__PURE__ */ s(
3484
- mn,
3490
+ L && /* @__PURE__ */ s(
3491
+ hn,
3485
3492
  {
3486
- MessageBouncePrompt: V,
3487
- onClose: () => $(!1),
3488
- open: D
3493
+ MessageBouncePrompt: F,
3494
+ onClose: () => D(!1),
3495
+ open: L
3489
3496
  }
3490
3497
  ),
3491
3498
  /* @__PURE__ */ m(
@@ -3495,8 +3502,8 @@ const vi = ({
3495
3502
  "data-message-id": c.id,
3496
3503
  "data-dd-privacy": "mask",
3497
3504
  children: [
3498
- G && /* @__PURE__ */ s(G, {}),
3499
- !!z && /* @__PURE__ */ s(N, { reminder: z }),
3505
+ R && /* @__PURE__ */ s(R, {}),
3506
+ !!O && /* @__PURE__ */ s(X, { reminder: O }),
3500
3507
  c.user && /* @__PURE__ */ s(
3501
3508
  ne,
3502
3509
  {
@@ -3513,7 +3520,7 @@ const vi = ({
3513
3520
  "div",
3514
3521
  {
3515
3522
  className: k("str-chat__message-inner", {
3516
- "str-chat__simple-message--error-failed": Ct || Et
3523
+ "str-chat__simple-message--error-failed": ie || St
3517
3524
  }),
3518
3525
  "data-testid": "message-inner",
3519
3526
  onClick: he,
@@ -3528,18 +3535,18 @@ const vi = ({
3528
3535
  },
3529
3536
  children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3530
3537
  fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3531
- F && /* @__PURE__ */ s(F, {}),
3538
+ I && /* @__PURE__ */ s(I, {}),
3532
3539
  /* @__PURE__ */ s(
3533
3540
  Zt.Sent,
3534
3541
  {
3535
3542
  title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3536
- mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3537
- thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3543
+ mimeType: (Dt = c.metadata) == null ? void 0 : Dt.attachment_mime_type,
3544
+ thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3538
3545
  amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3539
3546
  detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3540
3547
  paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3541
- onPreviewClick: () => S == null ? void 0 : S(c, _),
3542
- onFetchSource: async () => await (I == null ? void 0 : I(c, _))
3548
+ onPreviewClick: () => S == null ? void 0 : S(c, x),
3549
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3543
3550
  }
3544
3551
  )
3545
3552
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
@@ -3552,22 +3559,22 @@ const vi = ({
3552
3559
  amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
3553
3560
  detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
3554
3561
  paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3555
- isUnlocking: A(c.id),
3556
- onUnlockClick: () => S == null ? void 0 : S(c, _),
3557
- onFetchSource: async () => await (I == null ? void 0 : I(c, _)),
3558
- onDownloadClick: () => L == null ? void 0 : L(c, _)
3562
+ isUnlocking: N(c.id),
3563
+ onUnlockClick: () => S == null ? void 0 : S(c, x),
3564
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3565
+ onDownloadClick: () => M == null ? void 0 : M(c, x)
3559
3566
  }
3560
3567
  ),
3561
- F && /* @__PURE__ */ s(F, {})
3568
+ I && /* @__PURE__ */ s(I, {})
3562
3569
  ] }),
3563
3570
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3564
3571
  qt,
3565
3572
  {
3566
- message: se,
3567
- renderText: w
3573
+ message: Z,
3574
+ renderText: v
3568
3575
  }
3569
3576
  ) })
3570
- ] }) : St ? (
3577
+ ] }) : Et ? (
3571
3578
  /* Tip-only messages render as a standalone bubble */
3572
3579
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3573
3580
  ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
@@ -3582,13 +3589,13 @@ const vi = ({
3582
3589
  },
3583
3590
  children: [
3584
3591
  /* @__PURE__ */ s(
3585
- vi,
3592
+ xi,
3586
3593
  {
3587
- groupPosition: ie,
3594
+ groupPosition: Le,
3588
3595
  isMyMessage: fe,
3589
3596
  message: {
3590
3597
  attachments: j,
3591
- text: se.text
3598
+ text: Z.text
3592
3599
  }
3593
3600
  }
3594
3601
  ),
@@ -3604,32 +3611,32 @@ const vi = ({
3604
3611
  isMyMessage: fe
3605
3612
  }
3606
3613
  ),
3607
- Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
3614
+ Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3608
3615
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3609
- C,
3616
+ E,
3610
3617
  {
3611
- actionHandler: d,
3618
+ actionHandler: o,
3612
3619
  attachments: j
3613
3620
  }
3614
3621
  ) : null,
3615
- W ? /* @__PURE__ */ s(
3616
- R,
3622
+ Y ? /* @__PURE__ */ s(
3623
+ _,
3617
3624
  {
3618
- message: se,
3619
- renderText: w
3625
+ message: Z,
3626
+ renderText: v
3620
3627
  }
3621
3628
  ) : /* @__PURE__ */ s(
3622
3629
  qt,
3623
3630
  {
3624
- message: se,
3625
- renderText: w
3631
+ message: Z,
3632
+ renderText: v
3626
3633
  }
3627
3634
  ),
3628
3635
  /* @__PURE__ */ s(Wt, {})
3629
3636
  ] }) })
3630
3637
  }
3631
3638
  ),
3632
- !It && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3639
+ !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3633
3640
  (!ge || Tt) && /* @__PURE__ */ s(
3634
3641
  Ke,
3635
3642
  {
@@ -3639,37 +3646,37 @@ const vi = ({
3639
3646
  }
3640
3647
  ),
3641
3648
  n && ge && /* @__PURE__ */ s(
3642
- Wr,
3649
+ qr,
3643
3650
  {
3644
- selected: y,
3645
- onVoteUp: M,
3646
- onVoteDown: E
3651
+ selected: z,
3652
+ onVoteUp: y,
3653
+ onVoteDown: A
3647
3654
  }
3648
3655
  )
3649
3656
  ] }),
3650
- /* @__PURE__ */ s(Ur, { message: c, groupStyles: o }),
3651
- ce && /* @__PURE__ */ s(
3652
- X,
3657
+ /* @__PURE__ */ s(Xr, {}),
3658
+ ae && /* @__PURE__ */ s(
3659
+ te,
3653
3660
  {
3654
- onClick: u,
3661
+ onClick: d,
3655
3662
  reply_count: c.reply_count
3656
3663
  }
3657
3664
  ),
3658
- le && /* @__PURE__ */ s(ee, {})
3665
+ ue && /* @__PURE__ */ s(Q, {})
3659
3666
  ]
3660
3667
  },
3661
3668
  c.id
3662
3669
  )
3663
3670
  ] });
3664
- }, wi = U.memo(
3665
- xi,
3666
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
3667
- ), _i = (e) => {
3668
- const t = Ie("CustomMessage");
3669
- return /* @__PURE__ */ s(wi, { ...t, ...e });
3670
- }, Ni = () => {
3671
+ }, _i = U.memo(
3672
+ wi,
3673
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3674
+ ), Ni = (e) => {
3675
+ const t = _e("CustomMessage");
3676
+ return /* @__PURE__ */ s(_i, { ...t, ...e });
3677
+ }, yi = () => {
3671
3678
  var n;
3672
- const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3679
+ const { handleDelete: e, message: t } = _e("CustomMessageActions");
3673
3680
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3674
3681
  ds,
3675
3682
  {
@@ -3677,11 +3684,11 @@ const vi = ({
3677
3684
  "aria-label": "Delete",
3678
3685
  title: "Delete",
3679
3686
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3680
- children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3687
+ children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3681
3688
  }
3682
3689
  );
3683
- }, yi = () => {
3684
- const { handleFlag: e } = Ie("CustomMessageActions");
3690
+ }, ki = () => {
3691
+ const { handleFlag: e } = _e("CustomMessageActions");
3685
3692
  return /* @__PURE__ */ s(
3686
3693
  ds,
3687
3694
  {
@@ -3692,19 +3699,19 @@ const vi = ({
3692
3699
  children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3693
3700
  }
3694
3701
  );
3695
- }, ki = () => {
3702
+ }, Ci = () => {
3696
3703
  var t;
3697
- const { message: e } = Ie("CustomMessageActions");
3704
+ const { message: e } = _e("CustomMessageActions");
3698
3705
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3699
- ea,
3706
+ ta,
3700
3707
  {
3701
3708
  messageActionSet: [
3702
- { Component: Ni, placement: "quick", type: "delete" },
3703
- { Component: yi, placement: "quick", type: "flag" }
3709
+ { Component: yi, placement: "quick", type: "delete" },
3710
+ { Component: ki, placement: "quick", type: "flag" }
3704
3711
  ]
3705
3712
  }
3706
3713
  );
3707
- }, Ci = ({
3714
+ }, Si = ({
3708
3715
  link: e,
3709
3716
  onDismiss: t
3710
3717
  }) => {
@@ -3748,8 +3755,8 @@ const vi = ({
3748
3755
  linkPreviews: Array.from(e.previews.values()).filter(
3749
3756
  (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3750
3757
  )
3751
- }), Si = () => {
3752
- const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3758
+ }), Ii = () => {
3759
+ const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3753
3760
  e.state,
3754
3761
  Ei
3755
3762
  ), n = (r) => {
@@ -3764,9 +3771,9 @@ const vi = ({
3764
3771
  // block so it keeps its intrinsic height and the container scrolls — a
3765
3772
  // bare flex-column child would be shrunk on the column axis and its
3766
3773
  // fixed-height hero would spill out of the collapsed card box.
3767
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3774
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3768
3775
  ) : null;
3769
- }, kt = U.createContext(!1), ml = () => Se(kt), Ii = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3776
+ }, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3770
3777
  "button",
3771
3778
  {
3772
3779
  ...n,
@@ -3774,12 +3781,12 @@ const vi = ({
3774
3781
  "aria-label": "Send",
3775
3782
  disabled: t,
3776
3783
  onClick: e,
3777
- children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3784
+ children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3778
3785
  }
3779
- ), Ti = () => {
3780
- const e = Se(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3781
- SendButton: r = Ii,
3782
- AttachmentPreviewList: i = xn
3786
+ ), Ai = () => {
3787
+ const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3788
+ SendButton: r = Ti,
3789
+ AttachmentPreviewList: i = wn
3783
3790
  } = is("CustomMessageInput");
3784
3791
  return (
3785
3792
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
@@ -3796,12 +3803,12 @@ const vi = ({
3796
3803
  className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch 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)]",
3797
3804
  "data-dd-privacy": "mask",
3798
3805
  children: [
3799
- /* @__PURE__ */ s(wn, {}),
3800
- /* @__PURE__ */ s(Si, {}),
3806
+ /* @__PURE__ */ s(_n, {}),
3807
+ /* @__PURE__ */ s(Ii, {}),
3801
3808
  /* @__PURE__ */ s(i, {}),
3802
3809
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3803
3810
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3804
- _n,
3811
+ Nn,
3805
3812
  {
3806
3813
  "aria-disabled": e || void 0,
3807
3814
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3827,7 +3834,7 @@ const vi = ({
3827
3834
  }
3828
3835
  )
3829
3836
  );
3830
- }, Ai = ({
3837
+ }, Mi = ({
3831
3838
  renderActions: e,
3832
3839
  renderFooter: t,
3833
3840
  disabled: n = !1,
@@ -3835,8 +3842,8 @@ const vi = ({
3835
3842
  composerInput: r
3836
3843
  }) => {
3837
3844
  var o;
3838
- const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3839
- return n ? /* @__PURE__ */ m(te, { children: [
3845
+ const { channel: i } = le(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3846
+ return n ? /* @__PURE__ */ m(ee, { children: [
3840
3847
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3841
3848
  t == null ? void 0 : t()
3842
3849
  ] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
@@ -3848,23 +3855,23 @@ const vi = ({
3848
3855
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3849
3856
  children: [
3850
3857
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3851
- /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ti }) })
3858
+ /* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3852
3859
  ]
3853
3860
  }
3854
3861
  ),
3855
3862
  t == null ? void 0 : t()
3856
3863
  ] });
3857
- }, Mi = [
3864
+ }, Ri = [
3858
3865
  "SYSTEM_DM_AGENT_PAUSED",
3859
3866
  "SYSTEM_DM_AGENT_RESUMED"
3860
- ], Ri = {
3867
+ ], Di = {
3861
3868
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3862
3869
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3863
3870
  }, Li = [
3864
3871
  "SYSTEM_AGE_SAFETY_BLOCKED"
3865
- ], Di = {
3872
+ ], zi = {
3866
3873
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3867
- }, Je = "age safety guidelines.", zi = "https://linktr.ee/s/about/contact", as = (e) => Mi.includes(e), Pi = (e) => Li.includes(e), Fi = (e) => {
3874
+ }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Li.includes(e), Oi = (e) => {
3868
3875
  var a;
3869
3876
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3870
3877
  if (as(t))
@@ -3872,7 +3879,7 @@ const vi = ({
3872
3879
  kind: "dm-agent",
3873
3880
  type: t
3874
3881
  };
3875
- if (Pi(t))
3882
+ if (Fi(t))
3876
3883
  return {
3877
3884
  kind: "age-safety",
3878
3885
  type: t
@@ -3883,32 +3890,32 @@ const vi = ({
3883
3890
  kind: "dm-agent",
3884
3891
  type: n
3885
3892
  };
3886
- }, Oi = (e) => {
3887
- const t = e.indexOf(Je);
3893
+ }, $i = (e) => {
3894
+ const t = e.indexOf(Ze);
3888
3895
  if (t === -1)
3889
3896
  return e;
3890
- const n = t + Je.length;
3891
- return /* @__PURE__ */ m(te, { children: [
3897
+ const n = t + Ze.length;
3898
+ return /* @__PURE__ */ m(ee, { children: [
3892
3899
  e.slice(0, t),
3893
3900
  /* @__PURE__ */ s(
3894
3901
  "a",
3895
3902
  {
3896
- href: zi,
3903
+ href: Pi,
3897
3904
  target: "_blank",
3898
3905
  rel: "noopener noreferrer",
3899
3906
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
3900
- children: Je
3907
+ children: Ze
3901
3908
  }
3902
3909
  ),
3903
3910
  e.slice(n)
3904
3911
  ] });
3905
- }, $i = (e) => {
3912
+ }, ji = (e) => {
3906
3913
  var a, r;
3907
- const t = e.message.hide_date === !0, n = Fi(
3914
+ const t = e.message.hide_date === !0, n = Oi(
3908
3915
  e.message
3909
3916
  );
3910
3917
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3911
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ri[n.type];
3918
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Di[n.type];
3912
3919
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3913
3920
  /* @__PURE__ */ m(
3914
3921
  "div",
@@ -3934,7 +3941,7 @@ const vi = ({
3934
3941
  ] });
3935
3942
  }
3936
3943
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3937
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Di[n.type];
3944
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
3938
3945
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3939
3946
  /* @__PURE__ */ m(
3940
3947
  "div",
@@ -3944,7 +3951,7 @@ const vi = ({
3944
3951
  "data-age-safety-system-type": n.type,
3945
3952
  children: [
3946
3953
  /* @__PURE__ */ s(
3947
- Qn,
3954
+ ea,
3948
3955
  {
3949
3956
  size: 24,
3950
3957
  weight: "duotone",
@@ -3953,7 +3960,7 @@ const vi = ({
3953
3960
  "data-testid": "age-safety-system-message-icon"
3954
3961
  }
3955
3962
  ),
3956
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: Oi(i) }) })
3963
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: $i(i) }) })
3957
3964
  ]
3958
3965
  }
3959
3966
  ),
@@ -3968,7 +3975,7 @@ const vi = ({
3968
3975
  ] }),
3969
3976
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3970
3977
  ] });
3971
- }, Os = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3978
+ }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3972
3979
  "animateTransform",
3973
3980
  {
3974
3981
  attributeName: "transform",
@@ -3978,21 +3985,21 @@ const vi = ({
3978
3985
  begin: `${120 * t}ms`,
3979
3986
  repeatCount: "indefinite"
3980
3987
  }
3981
- ) }), ji = /* @__PURE__ */ new Set([
3988
+ ) }), Bi = /* @__PURE__ */ new Set([
3982
3989
  qe.Thinking,
3983
3990
  qe.Generating,
3984
3991
  qe.ExternalSources
3985
- ]), Bi = ({ threadList: e }) => {
3986
- var c, w;
3987
- const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Se(Os);
3988
- if (!e && o && ji.has(l)) {
3989
- const v = Ui(t, (c = r.user) == null ? void 0 : c.id);
3992
+ ]), Ui = ({ threadList: e }) => {
3993
+ var v, w;
3994
+ const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
3995
+ if (!e && o && Bi.has(l)) {
3996
+ const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
3990
3997
  return /* @__PURE__ */ s(
3991
3998
  rs,
3992
3999
  {
3993
- avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
3994
- avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
3995
- avatarImage: v == null ? void 0 : v.image,
4000
+ avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
4001
+ avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
4002
+ avatarImage: b == null ? void 0 : b.image,
3996
4003
  testId: "typing-indicator-ai"
3997
4004
  }
3998
4005
  );
@@ -4000,25 +4007,25 @@ const vi = ({
4000
4007
  if ((n == null ? void 0 : n.typing_events) === !1)
4001
4008
  return null;
4002
4009
  const u = e ? [] : Object.values(i).filter(
4003
- ({ parent_id: v, user: g }) => {
4010
+ ({ parent_id: b, user: f }) => {
4004
4011
  var x;
4005
- return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
4012
+ return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
4006
4013
  }
4007
4014
  ), p = e ? Object.values(i).filter(
4008
- ({ parent_id: v, user: g }) => {
4015
+ ({ parent_id: b, user: f }) => {
4009
4016
  var x;
4010
- return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
4017
+ return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
4011
4018
  }
4012
4019
  ) : [], h = e ? p : u;
4013
4020
  if (!h.length)
4014
4021
  return null;
4015
- const f = (w = h[0]) == null ? void 0 : w.user, b = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
4022
+ const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4016
4023
  return /* @__PURE__ */ s(
4017
4024
  rs,
4018
4025
  {
4019
- avatarId: (f == null ? void 0 : f.id) ?? (b == null ? void 0 : b.id) ?? "typing-user",
4020
- avatarName: (f == null ? void 0 : f.name) ?? (b == null ? void 0 : b.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
4021
- avatarImage: (f == null ? void 0 : f.image) ?? (b == null ? void 0 : b.image),
4026
+ avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4027
+ avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4028
+ avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4022
4029
  testId: "typing-indicator"
4023
4030
  }
4024
4031
  );
@@ -4057,16 +4064,16 @@ const vi = ({
4057
4064
  height: "13",
4058
4065
  overflow: "visible",
4059
4066
  children: [
4060
- /* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
4061
- /* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
4062
- /* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
4067
+ /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4068
+ /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4069
+ /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4063
4070
  ]
4064
4071
  }
4065
4072
  ) }) }) }) }) })
4066
4073
  ] })
4067
4074
  }
4068
4075
  );
4069
- function Ui(e, t) {
4076
+ function Vi(e, t) {
4070
4077
  var a;
4071
4078
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4072
4079
  for (const r of Object.values(n)) {
@@ -4075,7 +4082,7 @@ function Ui(e, t) {
4075
4082
  return i;
4076
4083
  }
4077
4084
  }
4078
- const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4085
+ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4079
4086
  "div",
4080
4087
  {
4081
4088
  className: k("flex items-center justify-center h-full", e),
@@ -4119,11 +4126,11 @@ const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4119
4126
  ]
4120
4127
  }
4121
4128
  ), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4122
- /* @__PURE__ */ s(Gi, { className: "w-6 h-6" }),
4129
+ /* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
4123
4130
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4124
4131
  ] }) }));
4125
4132
  je.displayName = "LoadingState";
4126
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Hi = ({
4133
+ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Yi = ({
4127
4134
  onBack: e,
4128
4135
  showBackButton: t,
4129
4136
  showStarButton: n = !1,
@@ -4136,32 +4143,32 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4136
4143
  onDeleteConversationClick: u,
4137
4144
  onBlockParticipantClick: p,
4138
4145
  onReportParticipantClick: h,
4139
- customChannelActions: f,
4140
- renderChannelActions: b,
4141
- showChannelInfo: c = !0,
4146
+ customChannelActions: g,
4147
+ renderChannelActions: c,
4148
+ showChannelInfo: v = !0,
4142
4149
  onParticipantNameClick: w,
4143
- renderHeaderTitleBadges: v
4150
+ renderHeaderTitleBadges: b
4144
4151
  }) => {
4145
- var M, E, C, T, F, O;
4146
- const { channel: g } = ue(), { client: x } = me(), _ = U.useMemo(
4152
+ var A, E, C, I, $, F;
4153
+ const { channel: f } = le(), { client: x } = oe(), N = U.useMemo(
4147
4154
  () => {
4148
4155
  var V;
4149
4156
  return Ue(
4150
- (V = g.state) == null ? void 0 : V.members,
4157
+ (V = f.state) == null ? void 0 : V.members,
4151
4158
  x == null ? void 0 : x.userID,
4152
- g.type
4159
+ f.type
4153
4160
  );
4154
4161
  },
4155
- [(M = g.state) == null ? void 0 : M.members, x == null ? void 0 : x.userID, g.type]
4156
- ), A = ot(_ == null ? void 0 : _.user), S = (E = _ == null ? void 0 : _.user) == null ? void 0 : E.image, I = lt(g), L = v == null ? void 0 : v({
4157
- channel: g,
4158
- participant: _
4159
- }), 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", $ = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(te, { children: [
4160
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: A }),
4162
+ [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4163
+ ), S = ct(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = ot(f), L = b == null ? void 0 : b({
4164
+ channel: f,
4165
+ participant: N
4166
+ }), 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", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(ee, { children: [
4167
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
4161
4168
  L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4162
4169
  ] }), y = async () => {
4163
4170
  try {
4164
- I ? await g.unpin() : await g.pin();
4171
+ M ? await f.unpin() : await f.pin();
4165
4172
  } catch (V) {
4166
4173
  console.error(
4167
4174
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4182,7 +4189,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4182
4189
  }),
4183
4190
  type: "button",
4184
4191
  "aria-label": "Back to conversations",
4185
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4192
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4186
4193
  }
4187
4194
  ) }),
4188
4195
  /* @__PURE__ */ s(
@@ -4195,7 +4202,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4195
4202
  {
4196
4203
  type: "button",
4197
4204
  onClick: w,
4198
- "aria-label": `View details for ${A}`,
4205
+ "aria-label": `View details for ${S}`,
4199
4206
  className: k(
4200
4207
  D,
4201
4208
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
@@ -4204,10 +4211,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4204
4211
  /* @__PURE__ */ s(
4205
4212
  ne,
4206
4213
  {
4207
- id: ((C = _ == null ? void 0 : _.user) == null ? void 0 : C.id) || g.id || "unknown",
4208
- name: A,
4209
- image: S,
4210
- starred: n && I,
4214
+ id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
4215
+ name: S,
4216
+ image: T,
4217
+ starred: n && M,
4211
4218
  dmAgentEnabled: a,
4212
4219
  size: 48
4213
4220
  }
@@ -4226,10 +4233,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4226
4233
  /* @__PURE__ */ s(
4227
4234
  ne,
4228
4235
  {
4229
- id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || g.id || "unknown",
4230
- name: A,
4231
- image: S,
4232
- starred: n && I,
4236
+ id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
4237
+ name: S,
4238
+ image: T,
4239
+ starred: n && M,
4233
4240
  dmAgentEnabled: a,
4234
4241
  size: 48
4235
4242
  }
@@ -4258,24 +4265,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4258
4265
  className: be,
4259
4266
  onClick: y,
4260
4267
  type: "button",
4261
- "aria-label": I ? "Unstar conversation" : "Star conversation",
4268
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
4262
4269
  children: /* @__PURE__ */ s(
4263
4270
  Ee,
4264
4271
  {
4265
4272
  className: k("size-5", {
4266
- "text-yellow-600": I,
4267
- "text-black/90": !I
4273
+ "text-yellow-600": M,
4274
+ "text-black/90": !M
4268
4275
  }),
4269
- weight: I ? "duotone" : "regular"
4276
+ weight: M ? "duotone" : "regular"
4270
4277
  }
4271
4278
  )
4272
4279
  }
4273
4280
  ),
4274
- c && (b !== void 0 ? b : /* @__PURE__ */ s(
4275
- tt,
4281
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
4282
+ st,
4276
4283
  {
4277
- channel: g,
4278
- participant: _,
4284
+ channel: f,
4285
+ participant: N,
4279
4286
  showDeleteConversation: l,
4280
4287
  showBlockParticipant: o,
4281
4288
  showReportParticipant: d,
@@ -4284,7 +4291,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4284
4291
  onDeleteConversationClick: u,
4285
4292
  onBlockParticipantClick: p,
4286
4293
  onReportParticipantClick: h,
4287
- customChannelActions: f,
4294
+ customChannelActions: g,
4288
4295
  triggerClassName: k(be, "bg-[#F1F0EE]")
4289
4296
  }
4290
4297
  ))
@@ -4302,7 +4309,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4302
4309
  type: "button",
4303
4310
  onClick: e,
4304
4311
  "aria-label": "Back to conversations",
4305
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4312
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4306
4313
  }
4307
4314
  ),
4308
4315
  w ? /* @__PURE__ */ m(
@@ -4310,19 +4317,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4310
4317
  {
4311
4318
  type: "button",
4312
4319
  onClick: w,
4313
- "aria-label": `View details for ${A}`,
4320
+ "aria-label": `View details for ${S}`,
4314
4321
  className: k(
4315
- $,
4322
+ O,
4316
4323
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4317
4324
  ),
4318
4325
  children: [
4319
4326
  /* @__PURE__ */ s(
4320
4327
  ne,
4321
4328
  {
4322
- id: ((F = _ == null ? void 0 : _.user) == null ? void 0 : F.id) || g.id || "unknown",
4323
- name: A,
4324
- image: S,
4325
- starred: n && I,
4329
+ id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
4330
+ name: S,
4331
+ image: T,
4332
+ starred: n && M,
4326
4333
  dmAgentEnabled: a,
4327
4334
  size: 48
4328
4335
  }
@@ -4339,14 +4346,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4339
4346
  ] })
4340
4347
  ]
4341
4348
  }
4342
- ) : /* @__PURE__ */ m("div", { className: $, children: [
4349
+ ) : /* @__PURE__ */ m("div", { className: O, children: [
4343
4350
  /* @__PURE__ */ s(
4344
4351
  ne,
4345
4352
  {
4346
- id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || g.id || "unknown",
4347
- name: A,
4348
- image: S,
4349
- starred: n && I,
4353
+ id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
4354
+ name: S,
4355
+ image: T,
4356
+ starred: n && M,
4350
4357
  dmAgentEnabled: a,
4351
4358
  size: 48
4352
4359
  }
@@ -4376,24 +4383,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4376
4383
  className: be,
4377
4384
  onClick: y,
4378
4385
  type: "button",
4379
- "aria-label": I ? "Unstar conversation" : "Star conversation",
4386
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
4380
4387
  children: /* @__PURE__ */ s(
4381
4388
  Ee,
4382
4389
  {
4383
4390
  className: k("size-6", {
4384
- "text-yellow-600": I,
4385
- "text-black/90": !I
4391
+ "text-yellow-600": M,
4392
+ "text-black/90": !M
4386
4393
  }),
4387
- weight: I ? "duotone" : "regular"
4394
+ weight: M ? "duotone" : "regular"
4388
4395
  }
4389
4396
  )
4390
4397
  }
4391
4398
  ),
4392
- c && (b !== void 0 ? b : /* @__PURE__ */ s(
4393
- tt,
4399
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
4400
+ st,
4394
4401
  {
4395
- channel: g,
4396
- participant: _,
4402
+ channel: f,
4403
+ participant: N,
4397
4404
  showDeleteConversation: l,
4398
4405
  showBlockParticipant: o,
4399
4406
  showReportParticipant: d,
@@ -4402,14 +4409,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4402
4409
  onDeleteConversationClick: u,
4403
4410
  onBlockParticipantClick: p,
4404
4411
  onReportParticipantClick: h,
4405
- customChannelActions: f,
4412
+ customChannelActions: g,
4406
4413
  triggerClassName: be
4407
4414
  }
4408
4415
  ))
4409
4416
  ] })
4410
4417
  ] })
4411
4418
  ] });
4412
- }, Yi = ({
4419
+ }, qi = ({
4413
4420
  onBack: e,
4414
4421
  showBackButton: t,
4415
4422
  renderMessageInputActions: n,
@@ -4422,122 +4429,122 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4422
4429
  onBlockParticipantClick: u,
4423
4430
  onReportParticipantClick: p,
4424
4431
  showBlockParticipant: h = !0,
4425
- showReportParticipant: f = !0,
4426
- composerDisabled: b = !1,
4427
- composerDisabledReason: c,
4432
+ showReportParticipant: g = !0,
4433
+ composerDisabled: c = !1,
4434
+ composerDisabledReason: v,
4428
4435
  showStarButton: w = !1,
4429
- chatbotVotingEnabled: v = !1,
4430
- renderChannelBanner: g,
4436
+ chatbotVotingEnabled: b = !1,
4437
+ renderChannelBanner: f,
4431
4438
  renderHeaderTitleBadges: x,
4432
- customChannelActions: _,
4433
- renderChannelActions: A,
4434
- renderMessage: S,
4435
- dmAgentEnabled: I = !1,
4439
+ customChannelActions: N,
4440
+ renderChannelActions: S,
4441
+ renderMessage: T,
4442
+ dmAgentEnabled: M = !1,
4436
4443
  viewerLanguage: L,
4437
4444
  showChannelInfo: D = !0,
4438
- onParticipantNameClick: $,
4445
+ onParticipantNameClick: O,
4439
4446
  composerInput: z
4440
4447
  }) => {
4441
- var N, R, G, Y;
4442
- const { channel: y } = ue(), { client: M } = me(), E = U.useMemo(
4448
+ var _, R, H, q;
4449
+ const { channel: y } = le(), { client: A } = oe(), E = U.useMemo(
4443
4450
  () => {
4444
- var q;
4451
+ var Y;
4445
4452
  return Ue(
4446
- (q = y.state) == null ? void 0 : q.members,
4447
- M == null ? void 0 : M.userID,
4453
+ (Y = y.state) == null ? void 0 : Y.members,
4454
+ A == null ? void 0 : A.userID,
4448
4455
  y.type
4449
4456
  );
4450
4457
  },
4451
- [(N = y.state) == null ? void 0 : N.members, M == null ? void 0 : M.userID, y.type]
4458
+ [(_ = y.state) == null ? void 0 : _.members, A == null ? void 0 : A.userID, y.type]
4452
4459
  ), C = U.useMemo(() => {
4453
- var j;
4454
- const q = M == null ? void 0 : M.userID;
4455
- return q ? Object.values(((j = y.state) == null ? void 0 : j.members) || {}).find((Q) => {
4456
- var se;
4457
- return ((se = Q.user) == null ? void 0 : se.id) === q;
4460
+ var W;
4461
+ const Y = A == null ? void 0 : A.userID;
4462
+ return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Z) => {
4463
+ var de;
4464
+ return ((de = Z.user) == null ? void 0 : de.id) === Y;
4458
4465
  }) : void 0;
4459
- }, [M == null ? void 0 : M.userID, (R = y.state) == null ? void 0 : R.members]), T = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), F = ((Y = E == null ? void 0 : E.user) == null ? void 0 : Y.is_account) ?? (E == null ? void 0 : E.is_account), O = I && T === !1 && F === !0, V = y.state.messages.some(
4460
- (q) => q.type !== "deleted"
4461
- ), Z = g ? /* @__PURE__ */ s(U.Fragment, { children: g() }, "lt-channel-banner") : null, ee = $ ? /* @__PURE__ */ s(
4462
- ga,
4466
+ }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = E == null ? void 0 : E.user) == null ? void 0 : q.is_account) ?? (E == null ? void 0 : E.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4467
+ (Y) => Y.type !== "deleted"
4468
+ ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
4469
+ pa,
4463
4470
  {
4464
4471
  onBack: e,
4465
4472
  showBackButton: t,
4466
4473
  showChannelInfo: D,
4467
4474
  showStarButton: w,
4468
- dmAgentEnabled: O,
4475
+ dmAgentEnabled: F,
4469
4476
  onLeaveConversation: i,
4470
4477
  onBlockParticipant: l,
4471
4478
  showDeleteConversation: o,
4472
4479
  showBlockParticipant: h,
4473
- showReportParticipant: f,
4480
+ showReportParticipant: g,
4474
4481
  onDeleteConversationClick: d,
4475
4482
  onBlockParticipantClick: u,
4476
4483
  onReportParticipantClick: p,
4477
- customChannelActions: _,
4478
- renderChannelActions: A,
4479
- onParticipantNameClick: $
4484
+ customChannelActions: N,
4485
+ renderChannelActions: S,
4486
+ onParticipantNameClick: O
4480
4487
  }
4481
4488
  ) : null, X = J(
4482
- (q) => {
4483
- const { message: W } = Ie("ChannelView"), j = /* @__PURE__ */ s(
4484
- _i,
4489
+ (Y) => {
4490
+ const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
4491
+ Ni,
4485
4492
  {
4486
- ...q,
4487
- chatbotVotingEnabled: v,
4493
+ ...Y,
4494
+ chatbotVotingEnabled: b,
4488
4495
  viewerLanguage: L
4489
4496
  }
4490
4497
  );
4491
- return !S || !W ? j : S(j, W);
4498
+ return !T || !j ? W : T(W, j);
4492
4499
  },
4493
- [v, S, L]
4500
+ [b, T, L]
4494
4501
  );
4495
- return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4496
- Cn,
4502
+ return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4503
+ Sn,
4497
4504
  {
4498
4505
  overrides: {
4499
4506
  Message: X,
4500
- MessageActions: ki
4507
+ MessageActions: Ci
4501
4508
  },
4502
4509
  children: /* @__PURE__ */ m(En, { children: [
4503
- !$ && /* @__PURE__ */ m(te, { children: [
4510
+ !O && /* @__PURE__ */ m(ee, { children: [
4504
4511
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4505
- Hi,
4512
+ Yi,
4506
4513
  {
4507
4514
  onBack: e,
4508
4515
  showBackButton: t,
4509
4516
  showChannelInfo: D,
4510
4517
  showStarButton: w,
4511
- dmAgentEnabled: O,
4518
+ dmAgentEnabled: F,
4512
4519
  onLeaveConversation: i,
4513
4520
  onBlockParticipant: l,
4514
4521
  showDeleteConversation: o,
4515
4522
  showBlockParticipant: h,
4516
- showReportParticipant: f,
4523
+ showReportParticipant: g,
4517
4524
  onDeleteConversationClick: d,
4518
4525
  onBlockParticipantClick: u,
4519
4526
  onReportParticipantClick: p,
4520
- customChannelActions: _,
4521
- renderChannelActions: A,
4527
+ customChannelActions: N,
4528
+ renderChannelActions: S,
4522
4529
  renderHeaderTitleBadges: x
4523
4530
  }
4524
4531
  ) }, "lt-channel-header"),
4525
- Z
4532
+ Q
4526
4533
  ] }),
4527
- $ && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4528
- ee,
4529
- Z
4534
+ O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4535
+ te,
4536
+ Q
4530
4537
  ] }),
4531
4538
  /* @__PURE__ */ s(
4532
4539
  "div",
4533
4540
  {
4534
4541
  className: "flex-1 overflow-hidden relative",
4535
4542
  children: /* @__PURE__ */ s(
4536
- Sn,
4543
+ In,
4537
4544
  {
4538
- head: $ && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4539
- ee,
4540
- Z
4545
+ head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4546
+ te,
4547
+ Q
4541
4548
  ] }) : void 0,
4542
4549
  hideDeletedMessages: !0,
4543
4550
  hideNewMessageSeparator: !1
@@ -4548,14 +4555,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4548
4555
  ),
4549
4556
  r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4550
4557
  /* @__PURE__ */ s(
4551
- Ai,
4558
+ Mi,
4552
4559
  {
4553
4560
  ...n && {
4554
4561
  renderActions: () => n == null ? void 0 : n(y)
4555
4562
  },
4556
4563
  renderFooter: () => a == null ? void 0 : a(y),
4557
- disabled: b,
4558
- disabledReason: c,
4564
+ disabled: c,
4565
+ disabledReason: v,
4559
4566
  composerInput: z
4560
4567
  },
4561
4568
  "lt-channel-message-input"
@@ -4574,86 +4581,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4574
4581
  onLeaveConversation: l,
4575
4582
  onBlockParticipant: o,
4576
4583
  className: d,
4577
- CustomChannelEmptyState: u = Vi,
4584
+ CustomChannelEmptyState: u = Gi,
4578
4585
  showDeleteConversation: p = !0,
4579
4586
  onDeleteConversationClick: h,
4580
- onBlockParticipantClick: f,
4581
- onReportParticipantClick: b,
4582
- showBlockParticipant: c = !0,
4587
+ onBlockParticipantClick: g,
4588
+ onReportParticipantClick: c,
4589
+ showBlockParticipant: v = !0,
4583
4590
  showReportParticipant: w = !0,
4584
- composerDisabled: v = !1,
4585
- composerDisabledReason: g,
4591
+ composerDisabled: b = !1,
4592
+ composerDisabledReason: f,
4586
4593
  dmAgentEnabled: x,
4587
- messageMetadata: _,
4588
- onMessageSent: A,
4589
- showStarButton: S = !1,
4590
- chatbotVotingEnabled: I = !1,
4594
+ messageMetadata: N,
4595
+ onMessageSent: S,
4596
+ showStarButton: T = !1,
4597
+ chatbotVotingEnabled: M = !1,
4591
4598
  renderChannelBanner: L,
4592
4599
  renderHeaderTitleBadges: D,
4593
- customChannelActions: $,
4600
+ customChannelActions: O,
4594
4601
  renderChannelActions: z,
4595
4602
  renderMessage: y,
4596
- onMessageLinkClick: M,
4603
+ onMessageLinkClick: A,
4597
4604
  sendButton: E,
4598
4605
  attachmentPreviewList: C,
4599
- viewerLanguage: T,
4600
- showChannelInfo: F = !0,
4601
- onParticipantNameClick: O,
4606
+ viewerLanguage: I,
4607
+ showChannelInfo: $ = !0,
4608
+ onParticipantNameClick: F,
4602
4609
  composerInput: V
4603
4610
  }) => {
4604
- const Z = J(
4605
- async (X, N, R) => {
4606
- var Q;
4607
- const G = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, Y = x && !G, q = {
4608
- ...N,
4609
- ...Y && { silent: !0 },
4610
- ..._ && {
4611
+ const Q = J(
4612
+ async (X, _, R) => {
4613
+ var Z;
4614
+ const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q = x && !H, Y = {
4615
+ ..._,
4616
+ ...q && { silent: !0 },
4617
+ ...N && {
4611
4618
  metadata: {
4612
- ...N.metadata ?? {},
4613
- ..._
4619
+ ..._.metadata ?? {},
4620
+ ...N
4614
4621
  }
4615
4622
  }
4616
- }, W = {
4623
+ }, j = {
4617
4624
  ...R,
4618
- ...Y && { skip_push: !0 }
4619
- }, j = await e.sendMessage(q, W);
4620
- return A == null || A(j), j;
4625
+ ...q && { skip_push: !0 }
4626
+ }, W = await e.sendMessage(Y, j);
4627
+ return S == null || S(W), W;
4621
4628
  },
4622
- [e, x, _, A]
4623
- ), ee = H(null);
4629
+ [e, x, N, S]
4630
+ ), te = G(null);
4624
4631
  return K(() => {
4625
- if (!M) return;
4626
- const X = ee.current;
4632
+ if (!A) return;
4633
+ const X = te.current;
4627
4634
  if (!X) return;
4628
- const N = (R) => {
4629
- const G = R.target, Y = G == null ? void 0 : G.closest("a[href]"), q = Y == null ? void 0 : Y.getAttribute("href");
4630
- if (!q) return;
4631
- const W = Y == null ? void 0 : Y.closest("[data-message-id]"), j = W == null ? void 0 : W.getAttribute("data-message-id"), Q = j ? e.state.messages.find((se) => se.id === j) : void 0;
4632
- M(q, Q);
4635
+ const _ = (R) => {
4636
+ const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4637
+ if (!Y) return;
4638
+ const j = q == null ? void 0 : q.closest("[data-message-id]"), W = j == null ? void 0 : j.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
4639
+ A(Y, Z);
4633
4640
  };
4634
- return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4635
- }, [M, e]), /* @__PURE__ */ s(
4641
+ return X.addEventListener("click", _), () => X.removeEventListener("click", _);
4642
+ }, [A, e]), /* @__PURE__ */ s(
4636
4643
  "div",
4637
4644
  {
4638
- ref: ee,
4645
+ ref: te,
4639
4646
  className: k(
4640
4647
  "messaging-channel-view h-full flex flex-col",
4641
4648
  d
4642
4649
  ),
4643
4650
  children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4644
- kn,
4651
+ Cn,
4645
4652
  {
4646
4653
  channel: e,
4647
- MessageSystem: $i,
4654
+ MessageSystem: ji,
4648
4655
  EmptyStateIndicator: u,
4649
4656
  LoadingIndicator: je,
4650
- DateSeparator: pa,
4651
- TypingIndicator: Bi,
4652
- doSendMessageRequest: Z,
4657
+ DateSeparator: ba,
4658
+ TypingIndicator: Ui,
4659
+ doSendMessageRequest: Q,
4653
4660
  ...E ? { SendButton: E } : {},
4654
4661
  ...C ? { AttachmentPreviewList: C } : {},
4655
4662
  children: /* @__PURE__ */ s(
4656
- Yi,
4663
+ qi,
4657
4664
  {
4658
4665
  onBack: t,
4659
4666
  showBackButton: n,
@@ -4665,23 +4672,23 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4665
4672
  CustomChannelEmptyState: u,
4666
4673
  showDeleteConversation: p,
4667
4674
  onDeleteConversationClick: h,
4668
- onBlockParticipantClick: f,
4669
- onReportParticipantClick: b,
4670
- showBlockParticipant: c,
4675
+ onBlockParticipantClick: g,
4676
+ onReportParticipantClick: c,
4677
+ showBlockParticipant: v,
4671
4678
  showReportParticipant: w,
4672
- composerDisabled: v,
4673
- composerDisabledReason: g,
4674
- showStarButton: S,
4679
+ composerDisabled: b,
4680
+ composerDisabledReason: f,
4681
+ showStarButton: T,
4675
4682
  dmAgentEnabled: x,
4676
- chatbotVotingEnabled: I,
4683
+ chatbotVotingEnabled: M,
4677
4684
  renderChannelBanner: L,
4678
4685
  renderHeaderTitleBadges: D,
4679
- customChannelActions: $,
4686
+ customChannelActions: O,
4680
4687
  renderChannelActions: z,
4681
4688
  renderMessage: y,
4682
- viewerLanguage: T,
4683
- showChannelInfo: F,
4684
- onParticipantNameClick: O,
4689
+ viewerLanguage: I,
4690
+ showChannelInfo: $,
4691
+ onParticipantNameClick: F,
4685
4692
  composerInput: V
4686
4693
  }
4687
4694
  )
@@ -4692,7 +4699,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4692
4699
  }
4693
4700
  );
4694
4701
  $s.displayName = "ChannelView";
4695
- const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4702
+ const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4696
4703
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4697
4704
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4698
4705
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4706,8 +4713,8 @@ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4706
4713
  }
4707
4714
  )
4708
4715
  ] }) }));
4709
- ye.displayName = "ErrorState";
4710
- const hl = ({
4716
+ ke.displayName = "ErrorState";
4717
+ const fl = ({
4711
4718
  capabilities: e = {},
4712
4719
  renderMessageInputActions: t,
4713
4720
  renderConversationFooter: n,
@@ -4720,139 +4727,139 @@ const hl = ({
4720
4727
  onReportParticipantClick: u,
4721
4728
  dmAgentEnabled: p,
4722
4729
  onMessageSent: h,
4723
- chatbotVotingEnabled: f = !1,
4724
- viewerLanguage: b,
4725
- renderHeaderTitleBadges: c,
4730
+ chatbotVotingEnabled: g = !1,
4731
+ viewerLanguage: c,
4732
+ renderHeaderTitleBadges: v,
4726
4733
  renderChannelBanner: w,
4727
- customChannelActions: v,
4728
- renderChannelActions: g,
4734
+ customChannelActions: b,
4735
+ renderChannelActions: f,
4729
4736
  onParticipantNameClick: x,
4730
- renderMessage: _,
4731
- onMessageLinkClick: A,
4732
- showChannelInfo: S,
4733
- composerInput: I
4737
+ renderMessage: N,
4738
+ onMessageLinkClick: S,
4739
+ showChannelInfo: T,
4740
+ composerInput: M
4734
4741
  }) => {
4735
4742
  const {
4736
4743
  client: L,
4737
4744
  isConnected: D,
4738
- isLoading: $,
4745
+ isLoading: O,
4739
4746
  error: z,
4740
4747
  refreshConnection: y,
4741
- service: M,
4748
+ service: A,
4742
4749
  debug: E
4743
- } = ta(), [C, T] = B(null), [F, O] = B(null), [V, Z] = B(!1), { showDeleteConversation: ee = !0 } = e, X = H(l);
4750
+ } = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4744
4751
  X.current = l;
4745
- const N = H(a);
4746
- N.current = a;
4747
- const R = H(null), G = H(null);
4752
+ const _ = G(a);
4753
+ _.current = a;
4754
+ const R = G(null), H = G(null);
4748
4755
  K(() => {
4749
- G.current = C;
4756
+ H.current = C;
4750
4757
  }, [C]), K(() => {
4751
4758
  if (!L || !D) return;
4752
- const W = L.userID;
4753
- if (!W) return;
4754
- const j = `${W}::${i}`;
4755
- if (R.current === j) return;
4756
- R.current = j;
4757
- const Q = () => {
4758
- R.current === j && (R.current = null);
4759
+ const j = L.userID;
4760
+ if (!j) return;
4761
+ const W = `${j}::${i}`;
4762
+ if (R.current === W) return;
4763
+ R.current = W;
4764
+ const Z = () => {
4765
+ R.current === W && (R.current = null);
4759
4766
  };
4760
4767
  (async () => {
4761
- var Le, De;
4768
+ var De, Le;
4762
4769
  try {
4763
4770
  E && console.log(
4764
4771
  "[MessagingShell] Loading initial conversation with:",
4765
4772
  i
4766
4773
  );
4767
- const ie = await L.queryChannels(
4774
+ const ae = await L.queryChannels(
4768
4775
  {
4769
4776
  type: "messaging",
4770
- members: { $eq: [W, i] }
4777
+ members: { $eq: [j, i] }
4771
4778
  },
4772
4779
  {},
4773
4780
  { limit: 1 }
4774
4781
  );
4775
- if (ie.length > 0) {
4776
- T(ie[0]), O(null), (Le = N.current) == null || Le.call(N, ie[0]), E && console.log(
4782
+ if (ae.length > 0) {
4783
+ I(ae[0]), F(null), (De = _.current) == null || De.call(_, ae[0]), E && console.log(
4777
4784
  "[MessagingShell] Initial conversation loaded:",
4778
- ie[0].id
4785
+ ae[0].id
4779
4786
  );
4780
4787
  return;
4781
4788
  }
4782
- const ce = X.current;
4783
- if (!ce || !M) {
4784
- Q(), O("No conversation found with this account"), E && console.log(
4789
+ const ue = X.current;
4790
+ if (!ue || !A) {
4791
+ Z(), F("No conversation found with this account"), E && console.log(
4785
4792
  "[MessagingShell] No conversation found for:",
4786
4793
  i
4787
4794
  );
4788
4795
  return;
4789
4796
  }
4790
4797
  try {
4791
- const le = await M.startChannelWithParticipant({
4792
- id: ce.id,
4793
- name: ce.name,
4794
- phone: ce.phone
4798
+ const ie = await A.startChannelWithParticipant({
4799
+ id: ue.id,
4800
+ name: ue.name,
4801
+ phone: ue.phone
4795
4802
  });
4796
- T(le), O(null), (De = N.current) == null || De.call(N, le), E && console.log(
4803
+ I(ie), F(null), (Le = _.current) == null || Le.call(_, ie), E && console.log(
4797
4804
  "[MessagingShell] Channel created and loaded:",
4798
- le.id
4805
+ ie.id
4799
4806
  );
4800
- } catch (le) {
4807
+ } catch (ie) {
4801
4808
  console.error(
4802
4809
  "[MessagingShell] Failed to create conversation:",
4803
- le
4804
- ), Q(), O("Failed to create conversation");
4810
+ ie
4811
+ ), Z(), F("Failed to create conversation");
4805
4812
  }
4806
- } catch (ie) {
4813
+ } catch (ae) {
4807
4814
  console.error(
4808
4815
  "[MessagingShell] Failed to load initial conversation:",
4809
- ie
4810
- ), Q(), G.current || O("Failed to load conversation");
4816
+ ae
4817
+ ), Z(), H.current || F("Failed to load conversation");
4811
4818
  }
4812
4819
  })();
4813
- }, [i, L, D, M, E]);
4814
- const Y = H(r);
4815
- Y.current = r;
4816
- const q = J(() => {
4817
- var W;
4818
- T(null), Z(!0), (W = Y.current) == null || W.call(Y);
4820
+ }, [i, L, D, A, E]);
4821
+ const q = G(r);
4822
+ q.current = r;
4823
+ const Y = J(() => {
4824
+ var j;
4825
+ I(null), Q(!0), (j = q.current) == null || j.call(q);
4819
4826
  }, []);
4820
- return $ ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4821
- ye,
4827
+ return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4828
+ ke,
4822
4829
  {
4823
4830
  message: "Not connected to messaging service",
4824
4831
  onBack: y
4825
4832
  }
4826
- ) : F ? /* @__PURE__ */ s(ye, { message: F }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4833
+ ) : $ ? /* @__PURE__ */ s(ke, { message: $ }) : V && !C ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4827
4834
  $s,
4828
4835
  {
4829
4836
  channel: C,
4830
4837
  renderMessageInputActions: t,
4831
4838
  renderConversationFooter: n,
4832
4839
  renderChannelBanner: w,
4833
- onLeaveConversation: q,
4834
- onBlockParticipant: q,
4840
+ onLeaveConversation: Y,
4841
+ onBlockParticipant: Y,
4835
4842
  CustomChannelEmptyState: o,
4836
- showDeleteConversation: ee,
4843
+ showDeleteConversation: te,
4837
4844
  onBlockParticipantClick: d,
4838
4845
  onReportParticipantClick: u,
4839
4846
  dmAgentEnabled: p,
4840
4847
  onMessageSent: h,
4841
- chatbotVotingEnabled: f,
4842
- viewerLanguage: b,
4843
- renderHeaderTitleBadges: c,
4844
- customChannelActions: v,
4845
- renderChannelActions: g,
4848
+ chatbotVotingEnabled: g,
4849
+ viewerLanguage: c,
4850
+ renderHeaderTitleBadges: v,
4851
+ customChannelActions: b,
4852
+ renderChannelActions: f,
4846
4853
  onParticipantNameClick: x,
4847
- renderMessage: _,
4848
- onMessageLinkClick: A,
4849
- showChannelInfo: S,
4850
- composerInput: I
4854
+ renderMessage: N,
4855
+ onMessageLinkClick: S,
4856
+ showChannelInfo: T,
4857
+ composerInput: M
4851
4858
  },
4852
4859
  C.id
4853
4860
  ) }) }) : /* @__PURE__ */ s(je, {});
4854
4861
  };
4855
- function qi(e) {
4862
+ function Wi(e) {
4856
4863
  const t = e.state.pending_messages;
4857
4864
  if (t != null && t.length)
4858
4865
  for (const n of t)
@@ -4866,18 +4873,18 @@ const js = U.createContext({
4866
4873
  renderMessagePreview: void 0,
4867
4874
  channelPreview: void 0,
4868
4875
  viewerLanguage: void 0
4869
- }), Wi = js.Provider, Xi = () => U.useContext(js), Ki = (e, t) => {
4876
+ }), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
4870
4877
  const n = new Date(
4871
4878
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4872
4879
  ), r = new Date(
4873
4880
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4874
4881
  ).getTime() - n.getTime();
4875
4882
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4876
- }, Ji = (e) => {
4883
+ }, Zi = (e) => {
4877
4884
  const t = /* @__PURE__ */ new Date();
4878
4885
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4879
4886
  return "Just now";
4880
- const a = Ki(e, t);
4887
+ const a = Ji(e, t);
4881
4888
  return a === 0 ? e.toLocaleTimeString([], {
4882
4889
  hour: "numeric",
4883
4890
  minute: "2-digit",
@@ -4889,7 +4896,7 @@ const js = U.createContext({
4889
4896
  });
4890
4897
  }, Bs = U.memo(
4891
4898
  (e) => {
4892
- var D, $, z;
4899
+ var D, O, z;
4893
4900
  const { channel: t, unread: n } = e, {
4894
4901
  selectedChannel: a,
4895
4902
  onChannelSelect: r,
@@ -4897,7 +4904,7 @@ const js = U.createContext({
4897
4904
  channelPreview: l,
4898
4905
  renderMessagePreview: o,
4899
4906
  viewerLanguage: d
4900
- } = Xi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4907
+ } = Ki(), { client: u } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4901
4908
  if (l)
4902
4909
  return /* @__PURE__ */ s(
4903
4910
  l,
@@ -4909,49 +4916,49 @@ const js = U.createContext({
4909
4916
  viewerLanguage: d
4910
4917
  }
4911
4918
  );
4912
- const f = () => {
4919
+ const g = () => {
4913
4920
  t && r(t);
4914
- }, b = (y) => {
4915
- const M = y.key === "Enter" || y.key === " ", E = y.repeat;
4916
- !M || E || (y.preventDefault(), f());
4917
- }, c = Ue(
4921
+ }, c = (y) => {
4922
+ const A = y.key === "Enter" || y.key === " ", E = y.repeat;
4923
+ !A || E || (y.preventDefault(), g());
4924
+ }, v = Ue(
4918
4925
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
4919
4926
  u == null ? void 0 : u.userID,
4920
4927
  t == null ? void 0 : t.type
4921
- ), w = ot(c == null ? void 0 : c.user), v = ($ = c == null ? void 0 : c.user) == null ? void 0 : $.image, g = (() => {
4922
- var M;
4923
- const y = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
4928
+ ), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4929
+ var A;
4930
+ const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4924
4931
  if (y != null && y.length) {
4925
4932
  for (let E = y.length - 1; E >= 0; E--)
4926
4933
  if (y[E].type !== "system") return y[E];
4927
4934
  }
4928
- })(), _ = (() => {
4929
- var F, O, V, Z;
4935
+ })(), N = (() => {
4936
+ var $, F, V, Q;
4930
4937
  const y = hs({
4931
- message: g,
4938
+ message: f,
4932
4939
  viewerLanguage: d
4933
4940
  });
4934
- if (((F = g == null ? void 0 : g.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4935
- if (((O = g == null ? void 0 : g.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4936
- if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4941
+ if ((($ = f == null ? void 0 : f.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4942
+ if (((F = f == null ? void 0 : f.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4943
+ if (((V = f == null ? void 0 : f.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4937
4944
  return y ? `📎 ${y}` : "📎 Sent an attachment";
4938
4945
  if (y) return y;
4939
- const T = (Z = g == null ? void 0 : g.attachments) == null ? void 0 : Z[0];
4940
- return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4941
- })(), A = g != null && g.created_at ? Ji(new Date(g.created_at)) : "", S = g ? Fe(g) : !1, I = o ? o(g, _) : `${S ? "✨ " : ""}${_}`, L = n ?? 0;
4946
+ const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
4947
+ 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";
4948
+ })(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
4942
4949
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4943
4950
  channelId: t == null ? void 0 : t.id,
4944
4951
  isSelected: p,
4945
4952
  participantName: w,
4946
4953
  unreadCount: L,
4947
- hasTimestamp: !!A
4954
+ hasTimestamp: !!S
4948
4955
  }), /* @__PURE__ */ s(
4949
4956
  "div",
4950
4957
  {
4951
4958
  role: "button",
4952
4959
  tabIndex: 0,
4953
- onClick: f,
4954
- onKeyDown: b,
4960
+ onClick: g,
4961
+ onKeyDown: c,
4955
4962
  className: k(
4956
4963
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
4957
4964
  {
@@ -4964,9 +4971,9 @@ const js = U.createContext({
4964
4971
  /* @__PURE__ */ s(
4965
4972
  ne,
4966
4973
  {
4967
- id: ((z = c == null ? void 0 : c.user) == null ? void 0 : z.id) || t.id || "unknown",
4974
+ id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
4968
4975
  name: w,
4969
- image: v,
4976
+ image: b,
4970
4977
  size: 48,
4971
4978
  starred: h
4972
4979
  }
@@ -4985,10 +4992,10 @@ const js = U.createContext({
4985
4992
  ]
4986
4993
  }
4987
4994
  ),
4988
- A && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: A })
4995
+ S && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: S })
4989
4996
  ] }),
4990
4997
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
4991
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
4998
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
4992
4999
  L > 0 && /* @__PURE__ */ s("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 })
4993
5000
  ] })
4994
5001
  ] })
@@ -4998,33 +5005,33 @@ const js = U.createContext({
4998
5005
  }
4999
5006
  );
5000
5007
  Bs.displayName = "CustomChannelPreview";
5001
- const Zi = { last_message_at: -1 }, Qi = U.memo(
5008
+ const Qi = { last_message_at: -1 }, el = U.memo(
5002
5009
  ({
5003
5010
  onChannelSelect: e,
5004
5011
  selectedChannel: t,
5005
5012
  filters: n,
5006
5013
  allowNewMessagesFromUnfilteredChannels: a = !1,
5007
5014
  channelRenderFilterFn: r,
5008
- sort: i = Zi,
5015
+ sort: i = Qi,
5009
5016
  className: l,
5010
5017
  customEmptyStateIndicator: o,
5011
- channelListPaginator: d = Tn,
5018
+ channelListPaginator: d = An,
5012
5019
  channelPreview: u,
5013
5020
  renderMessagePreview: p,
5014
5021
  viewerLanguage: h
5015
5022
  }) => {
5016
- const f = U.useRef(0);
5017
- f.current++;
5018
- const { debug: b = !1 } = it(), c = U.useCallback(
5019
- (v) => {
5020
- for (const g of v)
5021
- qi(g);
5022
- return r ? r(v) : v;
5023
+ const g = U.useRef(0);
5024
+ g.current++;
5025
+ const { debug: c = !1 } = lt(), v = U.useCallback(
5026
+ (b) => {
5027
+ for (const f of b)
5028
+ Wi(f);
5029
+ return r ? r(b) : b;
5023
5030
  },
5024
5031
  [r]
5025
5032
  );
5026
- b && console.log("📺 [ChannelList] 🔄 RENDER START", {
5027
- renderCount: f.current,
5033
+ c && console.log("📺 [ChannelList] 🔄 RENDER START", {
5034
+ renderCount: g.current,
5028
5035
  selectedChannelId: t == null ? void 0 : t.id,
5029
5036
  filters: n
5030
5037
  });
@@ -5032,7 +5039,7 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
5032
5039
  () => ({
5033
5040
  selectedChannel: t,
5034
5041
  onChannelSelect: e,
5035
- debug: b,
5042
+ debug: c,
5036
5043
  channelPreview: u,
5037
5044
  renderMessagePreview: p,
5038
5045
  viewerLanguage: h
@@ -5040,7 +5047,7 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
5040
5047
  [
5041
5048
  t,
5042
5049
  e,
5043
- b,
5050
+ c,
5044
5051
  u,
5045
5052
  p,
5046
5053
  h
@@ -5053,14 +5060,14 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
5053
5060
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5054
5061
  l
5055
5062
  ),
5056
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Wi, { value: w, children: /* @__PURE__ */ s(
5057
- In,
5063
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5064
+ Tn,
5058
5065
  {
5059
5066
  filters: n,
5060
5067
  sort: i,
5061
5068
  options: { limit: 30 },
5062
5069
  allowNewMessagesFromUnfilteredChannels: a,
5063
- channelRenderFilterFn: c,
5070
+ channelRenderFilterFn: v,
5064
5071
  Paginator: d,
5065
5072
  Preview: Bs,
5066
5073
  EmptyStateIndicator: o
@@ -5071,8 +5078,8 @@ const Zi = { last_message_at: -1 }, Qi = U.memo(
5071
5078
  );
5072
5079
  }
5073
5080
  );
5074
- Qi.displayName = "ChannelList";
5075
- const el = ({
5081
+ el.displayName = "ChannelList";
5082
+ const tl = ({
5076
5083
  question: e,
5077
5084
  onClick: t,
5078
5085
  loading: n = !1,
@@ -5094,7 +5101,7 @@ const el = ({
5094
5101
  ),
5095
5102
  children: e
5096
5103
  }
5097
- ), fl = ({
5104
+ ), gl = ({
5098
5105
  faqs: e,
5099
5106
  onFaqClick: t,
5100
5107
  loadingFaqId: n,
@@ -5123,7 +5130,7 @@ const el = ({
5123
5130
  children: [
5124
5131
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5125
5132
  o.map((d) => /* @__PURE__ */ s(
5126
- el,
5133
+ tl,
5127
5134
  {
5128
5135
  question: d.question,
5129
5136
  onClick: () => t(d.id),
@@ -5138,39 +5145,39 @@ const el = ({
5138
5145
  };
5139
5146
  export {
5140
5147
  bs as A,
5141
- ml as B,
5142
- Vi as C,
5143
- jr as D,
5144
- va as E,
5145
- fl as F,
5146
- ta as G,
5148
+ hl as B,
5149
+ Gi as C,
5150
+ Br as D,
5151
+ xa as E,
5152
+ gl as F,
5153
+ sa as G,
5147
5154
  es as L,
5148
- dl as M,
5149
- _e as a,
5155
+ ul as M,
5156
+ Ne as a,
5150
5157
  ne as b,
5151
- Qi as c,
5158
+ el as c,
5152
5159
  $s as d,
5153
- ul as e,
5154
- el as f,
5155
- oe as g,
5160
+ ml as e,
5161
+ tl as f,
5162
+ ce as g,
5156
5163
  Zt as h,
5157
- Ne as i,
5158
- Wr as j,
5159
- cl as k,
5160
- hl as l,
5161
- ar as m,
5162
- tr as n,
5163
- Ji as o,
5164
- nr as p,
5164
+ ye as i,
5165
+ qr as j,
5166
+ dl as k,
5167
+ fl as l,
5168
+ rr as m,
5169
+ sr as n,
5170
+ Zi as o,
5171
+ ar as p,
5165
5172
  hs as q,
5166
5173
  we as r,
5167
5174
  ws as s,
5168
- ra as t,
5169
- Wa as u,
5170
- xa as v,
5175
+ ia as t,
5176
+ Xa as u,
5177
+ wa as v,
5171
5178
  Ue as w,
5172
- mt as x,
5173
- ht as y,
5174
- ot as z
5179
+ ht as x,
5180
+ ft as y,
5181
+ ct as z
5175
5182
  };
5176
- //# sourceMappingURL=index-CnR5N9Co.js.map
5183
+ //# sourceMappingURL=index-wFe1UO9t.js.map