@linktr.ee/messaging-react 3.35.0-rc-1786108548 → 3.35.0-rc-1786109913

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.
@@ -39,7 +39,7 @@ const fs = Ve({
39
39
  serviceConfig: !!n,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, m] = U(null), [h, u] = U(null), [f, c] = U(!1), [v, w] = U(!1), [p, x] = U(null), b = H(!1), N = H(null), _ = H(n);
42
+ const [d, m] = U(null), [h, u] = U(null), [f, c] = U(!1), [x, w] = U(!1), [p, v] = U(null), b = H(!1), N = H(null), _ = H(n);
43
43
  _.current = n;
44
44
  const A = H(i);
45
45
  A.current = i;
@@ -70,7 +70,7 @@ const fs = Ve({
70
70
  Y(() => {
71
71
  const E = L.current, B = _.current;
72
72
  if (l) {
73
- N.current = null, m(null), u(null), c(!1), x(null), w(!1);
73
+ N.current = null, m(null), u(null), c(!1), v(null), w(!1);
74
74
  return;
75
75
  }
76
76
  if (!a || !$ || !B) {
@@ -123,7 +123,7 @@ const fs = Ve({
123
123
  return;
124
124
  }
125
125
  (async () => {
126
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), x(null);
126
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), v(null);
127
127
  try {
128
128
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
129
  const j = await d.connectUser(t);
@@ -133,7 +133,7 @@ const fs = Ve({
133
133
  });
134
134
  } catch (j) {
135
135
  const K = j instanceof Error ? j.message : "Connection failed";
136
- x(K), o("❌ USER CONNECTION ERROR", {
136
+ v(K), o("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
138
  error: K
139
139
  });
@@ -164,10 +164,10 @@ const fs = Ve({
164
164
  try {
165
165
  o("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
166
166
  const E = await d.connectUser(t);
167
- u(E), c(!0), x(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
+ u(E), c(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
168
  } catch (E) {
169
169
  const B = E instanceof Error ? E.message : "Refresh failed";
170
- x(B), o("❌ CONNECTION REFRESH ERROR", {
170
+ v(B), o("❌ CONNECTION REFRESH ERROR", {
171
171
  userId: t.id,
172
172
  error: B
173
173
  });
@@ -179,7 +179,7 @@ const fs = Ve({
179
179
  hasService: !!d,
180
180
  hasClient: !!h,
181
181
  isConnected: f,
182
- isLoading: v,
182
+ isLoading: x,
183
183
  hasError: !!p,
184
184
  capabilitiesKeys: Object.keys(r)
185
185
  }), {
@@ -194,7 +194,7 @@ const fs = Ve({
194
194
  // through if the same provider previously attempted an apiKey connect.
195
195
  client: l ?? h,
196
196
  isConnected: l ? !0 : f,
197
- isLoading: l ? !1 : v,
197
+ isLoading: l ? !1 : x,
198
198
  error: l ? null : p,
199
199
  capabilities: r,
200
200
  refreshConnection: C,
@@ -204,7 +204,7 @@ const fs = Ve({
204
204
  h,
205
205
  l,
206
206
  f,
207
- v,
207
+ x,
208
208
  p,
209
209
  r,
210
210
  C,
@@ -331,7 +331,7 @@ const ye = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: l = !1
333
333
  }) => {
334
- const o = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, f = 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(
334
+ const o = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
335
335
  "img",
336
336
  {
337
337
  src: t,
@@ -389,7 +389,7 @@ const ye = ({
389
389
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
390
390
  }
391
391
  },
392
- children: v
392
+ children: x
393
393
  }
394
394
  )
395
395
  ]
@@ -409,9 +409,9 @@ const ye = ({
409
409
  logLabel: h = "useChannelModerationActions"
410
410
  }) => {
411
411
  var P;
412
- const { service: u, debug: f } = ct(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, v = !!(a && n && u && c), [w, p] = U(!1), [x, b] = U(null), [N, _] = U(!1), [A, R] = U(!1), L = v && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== u);
412
+ const { service: u, debug: f } = ct(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [w, p] = U(!1), [v, b] = U(null), [N, _] = U(!1), [A, R] = U(!1), L = x && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
413
413
  return Y(() => {
414
- if (!v || !u || !c) {
414
+ if (!x || !u || !c) {
415
415
  p(!1), b(null);
416
416
  return;
417
417
  }
@@ -433,7 +433,7 @@ const ye = ({
433
433
  })(), () => {
434
434
  S = !0;
435
435
  };
436
- }, [v, u, c, h]), {
436
+ }, [x, u, c, h]), {
437
437
  isParticipantBlocked: w,
438
438
  isCheckingBlockedStatus: L,
439
439
  isLeaving: N,
@@ -513,8 +513,8 @@ const ye = ({
513
513
  customChannelActions: h,
514
514
  triggerClassName: u
515
515
  }) => {
516
- const [f, c] = U(!1), v = H(null), w = tn(), p = q(() => c(!1), []), {
517
- isParticipantBlocked: x,
516
+ const [f, c] = U(!1), x = H(null), w = tn(), p = q(() => c(!1), []), {
517
+ isParticipantBlocked: v,
518
518
  isCheckingBlockedStatus: b,
519
519
  isLeaving: N,
520
520
  isUpdatingBlockStatus: _,
@@ -538,14 +538,14 @@ const ye = ({
538
538
  return Y(() => {
539
539
  if (!f) return;
540
540
  const O = (P) => {
541
- v.current && !v.current.contains(P.target) && c(!1);
541
+ x.current && !x.current.contains(P.target) && c(!1);
542
542
  }, C = (P) => {
543
543
  P.key === "Escape" && c(!1);
544
544
  };
545
545
  return document.addEventListener("mousedown", O), document.addEventListener("keydown", C), () => {
546
546
  document.removeEventListener("mousedown", O), document.removeEventListener("keydown", C);
547
547
  };
548
- }, [f]), !t || !(n || a || r || !!h) ? null : /* @__PURE__ */ g("div", { ref: v, className: "relative", children: [
548
+ }, [f]), !t || !(n || a || r || !!h) ? null : /* @__PURE__ */ g("div", { ref: x, className: "relative", children: [
549
549
  /* @__PURE__ */ g(
550
550
  "button",
551
551
  {
@@ -590,7 +590,7 @@ const ye = ({
590
590
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
591
591
  /* @__PURE__ */ s("span", { children: "Block" })
592
592
  ] })
593
- ) : x ? /* @__PURE__ */ g(
593
+ ) : v ? /* @__PURE__ */ g(
594
594
  Ne,
595
595
  {
596
596
  onClick: L,
@@ -637,20 +637,20 @@ const ye = ({
637
637
  onReportParticipantClick: u,
638
638
  customChannelActions: f,
639
639
  renderChannelActions: c,
640
- showChannelInfo: v = !0,
640
+ showChannelInfo: x = !0,
641
641
  onParticipantNameClick: w
642
642
  }) => {
643
643
  var C, P, S, T;
644
- const { channel: p } = fe(), { client: x } = Te(), b = z.useMemo(
644
+ const { channel: p } = fe(), { client: v } = Te(), b = z.useMemo(
645
645
  () => {
646
646
  var E;
647
647
  return ps(
648
648
  (E = p.state) == null ? void 0 : E.members,
649
- x == null ? void 0 : x.userID,
649
+ v == null ? void 0 : v.userID,
650
650
  p.type
651
651
  );
652
652
  },
653
- [(C = p.state) == null ? void 0 : C.members, x == null ? void 0 : x.userID, p.type]
653
+ [(C = p.state) == null ? void 0 : C.members, v == null ? void 0 : v.userID, p.type]
654
654
  ), N = bs(b == null ? void 0 : b.user), _ = (P = b == null ? void 0 : b.user) == null ? void 0 : P.image, A = gs(p), R = Ra((S = p.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, L = a && A, D = R || L || !!w, $ = async () => {
655
655
  try {
656
656
  A ? await p.unpin() : await p.pin();
@@ -764,7 +764,7 @@ const ye = ({
764
764
  )
765
765
  }
766
766
  ),
767
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
767
+ x && (c !== void 0 ? c : /* @__PURE__ */ s(
768
768
  Ta,
769
769
  {
770
770
  channel: p,
@@ -905,7 +905,7 @@ const Ha = (e) => {
905
905
  muted: d = !1,
906
906
  onContainerClick: m
907
907
  }) => {
908
- const h = ue(t), u = H(null), f = H(null), c = H(null), v = H(r), [w, p] = U(a), [x, b] = U(0), [N, _] = U(!1), [A, R] = U(!1), [L, D] = U(!1), [$, O] = U(!1), [C, P] = U(!0), [S, T] = U(null), E = q(() => {
908
+ const h = ue(t), u = H(null), f = H(null), c = H(null), x = H(r), [w, p] = U(a), [v, b] = U(0), [N, _] = U(!1), [A, R] = U(!1), [L, D] = U(!1), [$, O] = U(!1), [C, P] = U(!0), [S, T] = U(null), E = q(() => {
909
909
  D(!1), p(!0);
910
910
  }, []), B = q((y) => {
911
911
  const I = f.current;
@@ -924,7 +924,7 @@ const Ha = (e) => {
924
924
  b(I), F(I);
925
925
  };
926
926
  Y(() => {
927
- r !== void 0 && r !== v.current && (v.current = r, p(r));
927
+ r !== void 0 && r !== x.current && (x.current = r, p(r));
928
928
  }, [r]), Y(() => {
929
929
  if (!w) {
930
930
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
@@ -951,7 +951,7 @@ const Ha = (e) => {
951
951
  window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", y), window.removeEventListener("touchend", I);
952
952
  };
953
953
  }, [N, B, F]);
954
- const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(x * 100);
954
+ const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(v * 100);
955
955
  return /* @__PURE__ */ g(
956
956
  "div",
957
957
  {
@@ -1070,7 +1070,7 @@ const Ha = (e) => {
1070
1070
  onTouchStart: j,
1071
1071
  onClick: (y) => y.stopPropagation(),
1072
1072
  onKeyDown: (y) => {
1073
- y.key === "ArrowRight" && F(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, x - 0.05));
1073
+ y.key === "ArrowRight" && F(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
1074
1074
  },
1075
1075
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1076
1076
  "div",
@@ -1111,7 +1111,7 @@ const Ha = (e) => {
1111
1111
  onMouseEnter: () => R(!0),
1112
1112
  onMouseLeave: () => R(!1),
1113
1113
  onKeyDown: (y) => {
1114
- y.key === "ArrowRight" && F(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, x - 0.05));
1114
+ y.key === "ArrowRight" && F(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
1115
1115
  },
1116
1116
  children: [
1117
1117
  /* @__PURE__ */ s(
@@ -1235,7 +1235,7 @@ const Ha = (e) => {
1235
1235
  rootRef: h,
1236
1236
  "data-testid": u
1237
1237
  }) => {
1238
- const f = e === "dark", c = f ? n ?? a : n ?? "", v = f && !n;
1238
+ const f = e === "dark", c = f ? n ?? a : n ?? "", x = f && !n;
1239
1239
  return /* @__PURE__ */ g(
1240
1240
  "div",
1241
1241
  {
@@ -1255,8 +1255,8 @@ const Ha = (e) => {
1255
1255
  {
1256
1256
  className: k("mb-0.5 truncate text-base font-medium", {
1257
1257
  "text-black": !f,
1258
- "text-white/30": f && v,
1259
- "text-white": f && !v
1258
+ "text-white/30": f && x,
1259
+ "text-white": f && !x
1260
1260
  }),
1261
1261
  children: c
1262
1262
  }
@@ -1379,14 +1379,14 @@ const Qa = ({
1379
1379
  );
1380
1380
  };
1381
1381
  function ht(e) {
1382
- var u, f, c, v;
1382
+ var u, f, c, x;
1383
1383
  const t = (u = e.attachments) == null ? void 0 : u.find(
1384
1384
  (w) => w.type === "video" && w.asset_url
1385
1385
  ), n = (f = e.attachments) == null ? void 0 : f.find(
1386
1386
  (w) => w.type === "image" && w.image_url
1387
1387
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1388
1388
  (w) => w.type === "audio" && w.asset_url
1389
- ), r = (v = e.attachments) == null ? void 0 : v.find(
1389
+ ), r = (x = e.attachments) == null ? void 0 : x.find(
1390
1390
  (w) => w.type === "file" && w.asset_url
1391
1391
  ), 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);
1392
1392
  if (!l) return null;
@@ -1662,7 +1662,7 @@ const Cs = ({
1662
1662
  text: i,
1663
1663
  groupPosition: l,
1664
1664
  "data-testid": "audio-attachment",
1665
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, v) => /* @__PURE__ */ s(
1665
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ s(
1666
1666
  dr,
1667
1667
  {
1668
1668
  item: c,
@@ -1670,10 +1670,10 @@ const Cs = ({
1670
1670
  trailingAction: (
1671
1671
  // Composer only supports a single attachment, so the
1672
1672
  // dismiss control sits on the only player.
1673
- h && v === 0 ? /* @__PURE__ */ s(Re, { onClick: d, variant: "inline" }) : void 0
1673
+ h && x === 0 ? /* @__PURE__ */ s(Re, { onClick: d, variant: "inline" }) : void 0
1674
1674
  )
1675
1675
  },
1676
- `${c.src}-${v}`
1676
+ `${c.src}-${x}`
1677
1677
  )) })
1678
1678
  }
1679
1679
  );
@@ -1855,12 +1855,12 @@ const yr = ({
1855
1855
  mimeType: r,
1856
1856
  title: i,
1857
1857
  items: l
1858
- }), v = (p) => {
1858
+ }), x = (p) => {
1859
1859
  if ((m == null ? void 0 : m(p)) === !1) return;
1860
- const x = c[p];
1861
- if (!x) return;
1862
- const b = x.filename ?? re(x.src);
1863
- Is(x.src, b);
1860
+ const v = c[p];
1861
+ if (!v) return;
1862
+ const b = v.filename ?? re(v.src);
1863
+ Is(v.src, b);
1864
1864
  };
1865
1865
  if (c.length === 0)
1866
1866
  return null;
@@ -1882,16 +1882,16 @@ const yr = ({
1882
1882
  text: o,
1883
1883
  groupPosition: d,
1884
1884
  "data-testid": "file-attachment",
1885
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, x) => /* @__PURE__ */ s(
1885
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, v) => /* @__PURE__ */ s(
1886
1886
  Nr,
1887
1887
  {
1888
1888
  variant: u,
1889
1889
  item: p,
1890
- index: x,
1891
- onActivate: v,
1892
- trailingAction: f && x === 0 ? /* @__PURE__ */ s(Re, { onClick: h, variant: "inline" }) : w
1890
+ index: v,
1891
+ onActivate: x,
1892
+ trailingAction: f && v === 0 ? /* @__PURE__ */ s(Re, { onClick: h, variant: "inline" }) : w
1893
1893
  },
1894
- `${p.src}-${x}`
1894
+ `${p.src}-${v}`
1895
1895
  )) })
1896
1896
  }
1897
1897
  );
@@ -2201,11 +2201,11 @@ const yr = ({
2201
2201
  const i = e.length;
2202
2202
  if (i === 0) return null;
2203
2203
  const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (h, u, f) => {
2204
- var v;
2204
+ var x;
2205
2205
  const c = k(
2206
2206
  Ir,
2207
2207
  "h-full w-full",
2208
- (v = Tr[l.length]) == null ? void 0 : v[u]
2208
+ (x = Tr[l.length]) == null ? void 0 : x[u]
2209
2209
  );
2210
2210
  return t ? /* @__PURE__ */ g(
2211
2211
  "button",
@@ -2402,12 +2402,12 @@ const yr = ({
2402
2402
  loading: o = "lazy",
2403
2403
  onClick: d
2404
2404
  }) => {
2405
- const m = Dr({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: v } = Me(
2405
+ const m = Dr({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: x } = Me(
2406
2406
  d
2407
2407
  ), w = m.length === 1, p = zr(w ? m[0] : void 0);
2408
2408
  if (m.length === 0)
2409
2409
  return null;
2410
- const x = m.map(
2410
+ const v = m.map(
2411
2411
  (b, N) => Mr({
2412
2412
  item: b,
2413
2413
  index: N,
@@ -2432,7 +2432,7 @@ const yr = ({
2432
2432
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2433
2433
  Rs,
2434
2434
  {
2435
- tiles: x,
2435
+ tiles: v,
2436
2436
  onTileActivate: c,
2437
2437
  singleAspectRatio: w ? p.ratio : void 0
2438
2438
  }
@@ -2443,7 +2443,7 @@ const yr = ({
2443
2443
  open: u,
2444
2444
  items: Ls(m, a),
2445
2445
  initialIndex: f,
2446
- onClose: v
2446
+ onClose: x
2447
2447
  }
2448
2448
  )
2449
2449
  ]
@@ -2543,12 +2543,12 @@ const yr = ({
2543
2543
  onClick: d,
2544
2544
  onDismiss: m
2545
2545
  }) => {
2546
- const h = Le(e), u = Hr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Me(
2546
+ const h = Le(e), u = Hr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
2547
2547
  d
2548
2548
  ), p = e === "composer" && !!m;
2549
2549
  if (u.length === 0)
2550
2550
  return null;
2551
- const x = u.map((b) => ({
2551
+ const v = u.map((b) => ({
2552
2552
  src: b.src,
2553
2553
  filename: b.filename ?? re(b.src)
2554
2554
  }));
@@ -2577,7 +2577,7 @@ const yr = ({
2577
2577
  variant: h,
2578
2578
  item: b,
2579
2579
  index: N,
2580
- onActivate: v,
2580
+ onActivate: x,
2581
2581
  trailingAction: A
2582
2582
  },
2583
2583
  `${b.src}-${N}`
@@ -2587,7 +2587,7 @@ const yr = ({
2587
2587
  jr,
2588
2588
  {
2589
2589
  open: f,
2590
- items: x,
2590
+ items: v,
2591
2591
  initialIndex: c,
2592
2592
  onClose: w
2593
2593
  }
@@ -2728,13 +2728,13 @@ const yr = ({
2728
2728
  preload: d,
2729
2729
  onClick: m
2730
2730
  }) => {
2731
- const h = Jr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Me(
2731
+ const h = Jr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
2732
2732
  m
2733
2733
  );
2734
2734
  if (h.length === 0)
2735
2735
  return null;
2736
2736
  const p = h.map(
2737
- (x, b) => Zr(x, b, h.length)
2737
+ (v, b) => Zr(v, b, h.length)
2738
2738
  );
2739
2739
  return /* @__PURE__ */ g(
2740
2740
  Ae,
@@ -2744,7 +2744,7 @@ const yr = ({
2744
2744
  groupPosition: o,
2745
2745
  "data-testid": "video-attachment",
2746
2746
  children: [
2747
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Rs, { tiles: p, onTileActivate: v }) }),
2747
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Rs, { tiles: p, onTileActivate: x }) }),
2748
2748
  /* @__PURE__ */ s(
2749
2749
  Ds,
2750
2750
  {
@@ -2803,7 +2803,7 @@ const yr = ({
2803
2803
  function di(e) {
2804
2804
  return _e(Bs)[e] ?? ci[e];
2805
2805
  }
2806
- const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import("./Card-BjtvPweb.js")), hi = () => /* @__PURE__ */ s(
2806
+ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import("./Card-B4qcC_0B.js")), hi = () => /* @__PURE__ */ s(
2807
2807
  "div",
2808
2808
  {
2809
2809
  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)]",
@@ -2860,7 +2860,7 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2860
2860
  if (r) {
2861
2861
  const f = (u = e.metadata) == null ? void 0 : u.amount_text;
2862
2862
  if (!f) return null;
2863
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = $s(e) ? "message" : "tip", w = t ? `${f} ${v}` : `Delivered with ${f} ${v}`;
2863
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = $s(e) ? "message" : "tip", w = t ? `${f} ${x}` : `Delivered with ${f} ${x}`;
2864
2864
  return /* @__PURE__ */ g("div", { className: c, children: [
2865
2865
  /* @__PURE__ */ s(aa, { size: t ? 14 : 12 }),
2866
2866
  /* @__PURE__ */ s("span", { children: w })
@@ -3091,8 +3091,8 @@ const Si = {
3091
3091
  trailingAction: h,
3092
3092
  isLoading: u = !1
3093
3093
  }) => {
3094
- const f = e === "dark", c = a ?? (f ? r : void 0) ?? "", v = c.trim() !== "", w = i != null && i.trim() !== "", p = typeof o == "string" ? o.trim() : "", x = p !== "", b = m != null;
3095
- if (!u && !v && !w && !x && !b)
3094
+ const f = e === "dark", c = a ?? (f ? r : void 0) ?? "", x = c.trim() !== "", w = i != null && i.trim() !== "", p = typeof o == "string" ? o.trim() : "", v = p !== "", b = m != null;
3095
+ if (!u && !x && !w && !v && !b)
3096
3096
  return null;
3097
3097
  const N = f && !a, _ = k(
3098
3098
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
@@ -3125,7 +3125,7 @@ const Si = {
3125
3125
  return /* @__PURE__ */ g("div", { className: "shrink-0 px-4 py-3", children: [
3126
3126
  /* @__PURE__ */ g("div", { className: "flex items-end gap-3", children: [
3127
3127
  /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
3128
- v && /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center gap-2", children: [
3128
+ x && /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center gap-2", children: [
3129
3129
  d ? /* @__PURE__ */ s("span", { className: "shrink-0", children: d }) : null,
3130
3130
  /* @__PURE__ */ s(
3131
3131
  "p",
@@ -3137,7 +3137,7 @@ const Si = {
3137
3137
  )
3138
3138
  ] }),
3139
3139
  w && /* @__PURE__ */ s("p", { className: R, style: D, children: i }),
3140
- !b && x && /* @__PURE__ */ s("p", { className: A, style: L, children: p })
3140
+ !b && v && /* @__PURE__ */ s("p", { className: A, style: L, children: p })
3141
3141
  ] }),
3142
3142
  h && /* @__PURE__ */ s("div", { className: "shrink-0", children: h })
3143
3143
  ] }),
@@ -3187,7 +3187,7 @@ const Si = {
3187
3187
  // tailwind preset — outline-none + a black 2px focus-visible ring
3188
3188
  // with offset, so keyboard users can see the focused card.
3189
3189
  f ? "cursor-pointer no-underline focus-ring" : null
3190
- ), v = h ? { role: "status", "aria-busy": !0, "aria-label": Ai } : void 0, w = d ? { "--accent": d } : void 0, p = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3190
+ ), x = h ? { role: "status", "aria-busy": !0, "aria-label": Ai } : void 0, w = d ? { "--accent": d } : void 0, p = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3191
3191
  return n ? /* @__PURE__ */ g(
3192
3192
  "a",
3193
3193
  {
@@ -3200,7 +3200,7 @@ const Si = {
3200
3200
  "data-variant": e,
3201
3201
  className: c,
3202
3202
  style: w,
3203
- ...v,
3203
+ ...x,
3204
3204
  children: [
3205
3205
  t,
3206
3206
  p
@@ -3217,7 +3217,7 @@ const Si = {
3217
3217
  "data-variant": e,
3218
3218
  className: k(c, "text-left"),
3219
3219
  style: w,
3220
- ...v,
3220
+ ...x,
3221
3221
  children: [
3222
3222
  t,
3223
3223
  p
@@ -3231,7 +3231,7 @@ const Si = {
3231
3231
  "data-variant": e,
3232
3232
  className: c,
3233
3233
  style: w,
3234
- ...v,
3234
+ ...x,
3235
3235
  children: [
3236
3236
  t,
3237
3237
  p
@@ -3372,11 +3372,11 @@ function He({
3372
3372
  }, [r]);
3373
3373
  const m = z.useCallback(() => {
3374
3374
  d(!0);
3375
- }, []), h = De(i, l), c = a === "featured" && !!r && !h && !o && n === "ready" && t != null && Di.test(t.trim()) ? Oi(t) : void 0, v = h ? Vs : zi[e];
3375
+ }, []), h = De(i, l), c = a === "featured" && !!r && !h && !o && n === "ready" && t != null && Di.test(t.trim()) ? Oi(t) : void 0, x = h ? Vs : zi[e];
3376
3376
  return {
3377
3377
  thumbnailUrl: o ? void 0 : r,
3378
3378
  accentHex: c,
3379
- chinTextColor: v,
3379
+ chinTextColor: x,
3380
3380
  surface: h ? "light" : e,
3381
3381
  isLoading: n === "loading",
3382
3382
  onImageError: m
@@ -3397,10 +3397,10 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3397
3397
  accentColor: u,
3398
3398
  status: f = "ready",
3399
3399
  onDismiss: c,
3400
- onEditClick: v,
3400
+ onEditClick: x,
3401
3401
  dismissLabel: w = "Dismiss attachment"
3402
3402
  }) => {
3403
- const p = d === "classic", x = De(i, o), b = He({
3403
+ const p = d === "classic", v = De(i, o), b = He({
3404
3404
  variant: "dark",
3405
3405
  accentColor: u,
3406
3406
  status: f,
@@ -3416,21 +3416,21 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3416
3416
  "aria-label": w,
3417
3417
  className: k(
3418
3418
  Fi,
3419
- !x && Bi
3419
+ !v && Bi
3420
3420
  ),
3421
3421
  children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
3422
3422
  }
3423
- ) : void 0, _ = v ? /* @__PURE__ */ s(
3423
+ ) : void 0, _ = x ? /* @__PURE__ */ s(
3424
3424
  "button",
3425
3425
  {
3426
3426
  type: "button",
3427
- onClick: v,
3427
+ onClick: x,
3428
3428
  "aria-label": "Edit attachment",
3429
3429
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3430
3430
  children: /* @__PURE__ */ s(da, { className: "size-5", weight: "regular" })
3431
3431
  }
3432
3432
  ) : void 0;
3433
- return x && !b.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2 pr-3", children: [
3433
+ return v && !b.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2 pr-3", children: [
3434
3434
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3435
3435
  Ie,
3436
3436
  {
@@ -3524,7 +3524,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3524
3524
  onClick: f,
3525
3525
  groupPosition: c = "single"
3526
3526
  }) => {
3527
- const v = kt(r, l), w = yt(a), p = m == null && w != null && !v ? w : void 0, x = m == null && !v ? f : void 0, b = u !== "loading" && De(r, l) ? Ct : void 0, N = m && f ? {
3527
+ const x = kt(r, l), w = yt(a), p = m == null && w != null && !x ? w : void 0, v = m == null && !x ? f : void 0, b = u !== "loading" && De(r, l) ? Ct : void 0, N = m && f ? {
3528
3528
  ...m,
3529
3529
  onClick: () => {
3530
3530
  var A;
@@ -3550,7 +3550,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3550
3550
  {
3551
3551
  variant: "light",
3552
3552
  href: p,
3553
- onClick: x,
3553
+ onClick: v,
3554
3554
  ariaLabel: e ?? "Open attachment preview",
3555
3555
  fixedHeight: o === "featured" && b == null,
3556
3556
  accentHex: _.accentHex,
@@ -3605,9 +3605,9 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3605
3605
  accentColor: u,
3606
3606
  status: f = "ready",
3607
3607
  onClick: c,
3608
- groupPosition: v = "single"
3608
+ groupPosition: x = "single"
3609
3609
  }) => {
3610
- const w = kt(i, o), p = yt(r), x = h == null && p != null && !w ? p : void 0, b = h == null && !w && x != null ? c : void 0, N = f !== "loading" && De(i, o), _ = He({
3610
+ const w = kt(i, o), p = yt(r), v = h == null && p != null && !w ? p : void 0, b = h == null && !w && v != null ? c : void 0, N = f !== "loading" && De(i, o), _ = He({
3611
3611
  variant: "dark",
3612
3612
  accentColor: u,
3613
3613
  status: f,
@@ -3621,12 +3621,12 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3621
3621
  {
3622
3622
  accentHex: _.accentHex,
3623
3623
  side: "sender",
3624
- visible: !N && (v === "single" || v === "end"),
3624
+ visible: !N && (x === "single" || x === "end"),
3625
3625
  children: /* @__PURE__ */ g(
3626
3626
  Ee,
3627
3627
  {
3628
3628
  variant: "dark",
3629
- href: x,
3629
+ href: v,
3630
3630
  onClick: b,
3631
3631
  fixedHeight: d === "featured" && !N,
3632
3632
  accentHex: _.accentHex,
@@ -3874,7 +3874,7 @@ const Ki = ({
3874
3874
  if (r.length === 0) return null;
3875
3875
  const i = Gi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((p) => p.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, m = l && Vi(l, d) ? void 0 : l;
3876
3876
  let h = 0;
3877
- const u = [], f = m ? "middle" : e, c = (p, x, b) => {
3877
+ const u = [], f = m ? "middle" : e, c = (p, v, b) => {
3878
3878
  const N = t ? ot.Sent : ot.Received;
3879
3879
  u.push(
3880
3880
  /* @__PURE__ */ s(
@@ -3883,10 +3883,10 @@ const Ki = ({
3883
3883
  ...ss(p),
3884
3884
  groupPosition: b ? f : "middle"
3885
3885
  },
3886
- x
3886
+ v
3887
3887
  )
3888
3888
  );
3889
- }, v = (p, x) => {
3889
+ }, x = (p, v) => {
3890
3890
  const b = Yi(
3891
3891
  h,
3892
3892
  i,
@@ -3900,23 +3900,23 @@ const Ki = ({
3900
3900
  isMyMessage: t,
3901
3901
  segment: p
3902
3902
  },
3903
- x
3903
+ v
3904
3904
  )
3905
3905
  );
3906
3906
  };
3907
- return r.forEach((p, x) => {
3908
- const b = x === r.length - 1;
3907
+ return r.forEach((p, v) => {
3908
+ const b = v === r.length - 1;
3909
3909
  if (p.type === "link") {
3910
3910
  p.attachments.forEach((N, _) => {
3911
3911
  c(
3912
3912
  N,
3913
- `link-${x}-${_}`,
3913
+ `link-${v}-${_}`,
3914
3914
  b && _ === p.attachments.length - 1
3915
3915
  );
3916
3916
  });
3917
3917
  return;
3918
3918
  }
3919
- v(p, `media-${x}`);
3919
+ x(p, `media-${v}`);
3920
3920
  }), /* @__PURE__ */ g("div", { className: "str-chat__message-bubble-wrapper", children: [
3921
3921
  /* @__PURE__ */ g(
3922
3922
  "div",
@@ -3956,10 +3956,10 @@ const Ki = ({
3956
3956
  isMessageAIGenerated: u,
3957
3957
  isMyMessage: f,
3958
3958
  message: c,
3959
- renderText: v,
3959
+ renderText: x,
3960
3960
  threadList: w,
3961
3961
  viewerLanguage: p,
3962
- onBroadcastClick: x,
3962
+ onBroadcastClick: v,
3963
3963
  resolvedBroadcastName: b
3964
3964
  } = e, { client: N } = Te("CustomMessage"), { channel: _ } = fe("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: L, onDownloadClick: D } = di("LockedAttachment"), [$, O] = U(!1), C = dn(c.id), { selected: P, voteUp: S, voteDown: T } = Oa(c), {
3965
3965
  Attachment: E = un,
@@ -4025,7 +4025,7 @@ const Ki = ({
4025
4025
  contentType: "text",
4026
4026
  amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
4027
4027
  paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
4028
- renderedText: c.text && /* @__PURE__ */ s(Be, { message: ie, renderText: v })
4028
+ renderedText: c.text && /* @__PURE__ */ s(Be, { message: ie, renderText: x })
4029
4029
  }, Lt = {
4030
4030
  contentType: "media",
4031
4031
  title: (zt = c.metadata) == null ? void 0 : zt.attachment_title,
@@ -4133,7 +4133,7 @@ const Ki = ({
4133
4133
  Be,
4134
4134
  {
4135
4135
  message: ie,
4136
- renderText: v
4136
+ renderText: x
4137
4137
  }
4138
4138
  ) })
4139
4139
  ] }) : en ? /* @__PURE__ */ s(
@@ -4149,7 +4149,7 @@ const Ki = ({
4149
4149
  // the caption uses displayMessage.text from viewerLanguage.
4150
4150
  i18n: void 0
4151
4151
  },
4152
- renderText: v
4152
+ renderText: x
4153
4153
  }
4154
4154
  ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ g("div", { className: "str-chat__message-bubble", children: [
4155
4155
  be && !At && /* @__PURE__ */ s(
@@ -4172,13 +4172,13 @@ const Ki = ({
4172
4172
  W,
4173
4173
  {
4174
4174
  message: ie,
4175
- renderText: v
4175
+ renderText: x
4176
4176
  }
4177
4177
  ) : /* @__PURE__ */ s(
4178
4178
  Be,
4179
4179
  {
4180
4180
  message: ie,
4181
- renderText: v
4181
+ renderText: x
4182
4182
  }
4183
4183
  ),
4184
4184
  /* @__PURE__ */ s(st, {})
@@ -4206,7 +4206,7 @@ const Ki = ({
4206
4206
  /* @__PURE__ */ s(
4207
4207
  Ni,
4208
4208
  {
4209
- onBroadcastClick: x,
4209
+ onBroadcastClick: v,
4210
4210
  resolvedBroadcastName: b
4211
4211
  }
4212
4212
  ),
@@ -4473,8 +4473,8 @@ const Ki = ({
4473
4473
  if (!u || !f)
4474
4474
  return;
4475
4475
  let c = u.offsetHeight;
4476
- const v = () => {
4477
- const p = u.offsetHeight, x = p > c;
4476
+ const x = () => {
4477
+ const p = u.offsetHeight, v = p > c;
4478
4478
  c = p;
4479
4479
  const b = Array.from(
4480
4480
  f.querySelectorAll(".str-chat__list")
@@ -4482,11 +4482,11 @@ const Ki = ({
4482
4482
  f.style.setProperty(
4483
4483
  "--messaging-composer-height",
4484
4484
  `${p}px`
4485
- ), x && N && b && (b.scrollTop = b.scrollHeight);
4485
+ ), v && N && b && (b.scrollTop = b.scrollHeight);
4486
4486
  };
4487
- if (v(), typeof ResizeObserver > "u")
4487
+ if (x(), typeof ResizeObserver > "u")
4488
4488
  return;
4489
- const w = new ResizeObserver(v);
4489
+ const w = new ResizeObserver(x);
4490
4490
  return w.observe(u), () => {
4491
4491
  w.disconnect(), f.style.removeProperty("--messaging-composer-height");
4492
4492
  };
@@ -4694,10 +4694,10 @@ const Ki = ({
4694
4694
  qe.Generating,
4695
4695
  qe.ExternalSources
4696
4696
  ]), vo = ({ threadList: e }) => {
4697
- var v, w;
4697
+ var x, w;
4698
4698
  const { channel: t, channelConfig: n, thread: a } = fe(), { client: r } = Te(), { typing: i = {} } = Dn(), { aiState: l } = On(t), o = _e(Ys);
4699
4699
  if (!e && o && bo.has(l)) {
4700
- const p = xo(t, (v = r.user) == null ? void 0 : v.id);
4700
+ const p = xo(t, (x = r.user) == null ? void 0 : x.id);
4701
4701
  return /* @__PURE__ */ s(
4702
4702
  is,
4703
4703
  {
@@ -4711,14 +4711,14 @@ const Ki = ({
4711
4711
  if ((n == null ? void 0 : n.typing_events) === !1)
4712
4712
  return null;
4713
4713
  const m = e ? [] : Object.values(i).filter(
4714
- ({ parent_id: p, user: x }) => {
4714
+ ({ parent_id: p, user: v }) => {
4715
4715
  var b;
4716
- return (x == null ? void 0 : x.id) !== ((b = r.user) == null ? void 0 : b.id) && !p;
4716
+ return (v == null ? void 0 : v.id) !== ((b = r.user) == null ? void 0 : b.id) && !p;
4717
4717
  }
4718
4718
  ), h = e ? Object.values(i).filter(
4719
- ({ parent_id: p, user: x }) => {
4719
+ ({ parent_id: p, user: v }) => {
4720
4720
  var b;
4721
- return (x == null ? void 0 : x.id) !== ((b = r.user) == null ? void 0 : b.id) && p === (a == null ? void 0 : a.id);
4721
+ return (v == null ? void 0 : v.id) !== ((b = r.user) == null ? void 0 : b.id) && p === (a == null ? void 0 : a.id);
4722
4722
  }
4723
4723
  ) : [], u = e ? h : m;
4724
4724
  if (!u.length)
@@ -4849,10 +4849,10 @@ const yo = ({
4849
4849
  showBlockParticipant: u = !0,
4850
4850
  showReportParticipant: f = !0,
4851
4851
  composerDisabled: c = !1,
4852
- composerDisabledReason: v,
4852
+ composerDisabledReason: x,
4853
4853
  showStarButton: w = !1,
4854
4854
  chatbotVotingEnabled: p = !1,
4855
- renderChannelBanner: x,
4855
+ renderChannelBanner: v,
4856
4856
  customChannelActions: b,
4857
4857
  renderChannelActions: N,
4858
4858
  renderMessage: _,
@@ -4875,7 +4875,7 @@ const yo = ({
4875
4875
  $
4876
4876
  ), F = C.state.messages.some(
4877
4877
  (G) => G.type !== "deleted"
4878
- ), j = x ? /* @__PURE__ */ s(z.Fragment, { children: x() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
4878
+ ), j = v ? /* @__PURE__ */ s(z.Fragment, { children: v() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
4879
4879
  La,
4880
4880
  {
4881
4881
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
@@ -4955,7 +4955,7 @@ const yo = ({
4955
4955
  },
4956
4956
  renderFooter: () => a == null ? void 0 : a(C),
4957
4957
  disabled: c,
4958
- disabledReason: v,
4958
+ disabledReason: x,
4959
4959
  composerInput: O
4960
4960
  },
4961
4961
  "lt-channel-message-input"
@@ -4994,7 +4994,7 @@ const yo = ({
4994
4994
  },
4995
4995
  renderFooter: () => a == null ? void 0 : a(C),
4996
4996
  disabled: c,
4997
- disabledReason: v,
4997
+ disabledReason: x,
4998
4998
  composerInput: O
4999
4999
  },
5000
5000
  "lt-channel-message-input"
@@ -5018,10 +5018,10 @@ const yo = ({
5018
5018
  onDeleteConversationClick: u,
5019
5019
  onBlockParticipantClick: f,
5020
5020
  onReportParticipantClick: c,
5021
- showBlockParticipant: v = !0,
5021
+ showBlockParticipant: x = !0,
5022
5022
  showReportParticipant: w = !0,
5023
5023
  composerDisabled: p = !1,
5024
- composerDisabledReason: x,
5024
+ composerDisabledReason: v,
5025
5025
  dmAgentEnabled: b,
5026
5026
  messageMetadata: N,
5027
5027
  onMessageSent: _,
@@ -5107,10 +5107,10 @@ const yo = ({
5107
5107
  onDeleteConversationClick: u,
5108
5108
  onBlockParticipantClick: f,
5109
5109
  onReportParticipantClick: c,
5110
- showBlockParticipant: v,
5110
+ showBlockParticipant: x,
5111
5111
  showReportParticipant: w,
5112
5112
  composerDisabled: p,
5113
- composerDisabledReason: x,
5113
+ composerDisabledReason: v,
5114
5114
  showStarButton: A,
5115
5115
  chatbotVotingEnabled: R,
5116
5116
  renderChannelBanner: L,
@@ -5162,10 +5162,10 @@ const ol = ({
5162
5162
  onMessageSent: u,
5163
5163
  chatbotVotingEnabled: f = !1,
5164
5164
  viewerLanguage: c,
5165
- renderChannelBanner: v,
5165
+ renderChannelBanner: x,
5166
5166
  customChannelActions: w,
5167
5167
  renderChannelActions: p,
5168
- onParticipantNameClick: x,
5168
+ onParticipantNameClick: v,
5169
5169
  onBroadcastClick: b,
5170
5170
  resolveBroadcastName: N,
5171
5171
  renderMessage: _,
@@ -5270,7 +5270,7 @@ const ol = ({
5270
5270
  channel: E,
5271
5271
  renderMessageInputActions: t,
5272
5272
  renderConversationFooter: n,
5273
- renderChannelBanner: v,
5273
+ renderChannelBanner: x,
5274
5274
  onLeaveConversation: ne,
5275
5275
  onBlockParticipant: ne,
5276
5276
  CustomChannelEmptyState: o,
@@ -5283,7 +5283,7 @@ const ol = ({
5283
5283
  viewerLanguage: c,
5284
5284
  customChannelActions: w,
5285
5285
  renderChannelActions: p,
5286
- onParticipantNameClick: x,
5286
+ onParticipantNameClick: v,
5287
5287
  onBroadcastClick: b,
5288
5288
  resolveBroadcastName: N,
5289
5289
  renderMessage: _,
@@ -5355,11 +5355,11 @@ const qs = z.createContext({
5355
5355
  }, c = (C) => {
5356
5356
  const P = C.key === "Enter" || C.key === " ", S = C.repeat;
5357
5357
  !P || S || (C.preventDefault(), f());
5358
- }, v = ps(
5358
+ }, x = ps(
5359
5359
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
5360
5360
  m == null ? void 0 : m.userID,
5361
5361
  t == null ? void 0 : t.type
5362
- ), w = bs(v == null ? void 0 : v.user), p = ($ = v == null ? void 0 : v.user) == null ? void 0 : $.image, x = (() => {
5362
+ ), w = bs(x == null ? void 0 : x.user), p = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, v = (() => {
5363
5363
  var P;
5364
5364
  const C = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages;
5365
5365
  if (C != null && C.length) {
@@ -5369,9 +5369,9 @@ const qs = z.createContext({
5369
5369
  })(), N = (() => {
5370
5370
  var E;
5371
5371
  const C = xs({
5372
- message: x,
5372
+ message: v,
5373
5373
  viewerLanguage: d
5374
- }), { custom_type: P, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
5374
+ }), { custom_type: P, attachment_content_type: S } = (v == null ? void 0 : v.metadata) || {};
5375
5375
  if (P === ce.TIP)
5376
5376
  return C || "Sent a tip";
5377
5377
  if (P === ce.PAID)
@@ -5383,9 +5383,9 @@ const qs = z.createContext({
5383
5383
  return "🔒 Sent a locked attachment";
5384
5384
  }
5385
5385
  if (C) return C;
5386
- const T = (E = x == null ? void 0 : x.attachments) == null ? void 0 : E[0];
5386
+ const T = (E = v == null ? void 0 : v.attachments) == null ? void 0 : E[0];
5387
5387
  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";
5388
- })(), _ = x != null && x.created_at ? Eo(new Date(x.created_at)) : "", A = x ? $e(x) : !1, R = o ? o(x, N) : `${A ? "✨ " : ""}${N}`, L = n ?? 0;
5388
+ })(), _ = v != null && v.created_at ? Eo(new Date(v.created_at)) : "", A = v ? $e(v) : !1, R = o ? o(v, N) : `${A ? "✨ " : ""}${N}`, L = n ?? 0;
5389
5389
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5390
5390
  channelId: t == null ? void 0 : t.id,
5391
5391
  isSelected: h,
@@ -5411,7 +5411,7 @@ const qs = z.createContext({
5411
5411
  /* @__PURE__ */ s(
5412
5412
  ye,
5413
5413
  {
5414
- id: ((O = v == null ? void 0 : v.user) == null ? void 0 : O.id) || t.id || "unknown",
5414
+ id: ((O = x == null ? void 0 : x.user) == null ? void 0 : O.id) || t.id || "unknown",
5415
5415
  name: w,
5416
5416
  image: p,
5417
5417
  size: 48,
@@ -5461,10 +5461,10 @@ const Io = { last_message_at: -1 }, To = z.memo(
5461
5461
  viewerLanguage: u,
5462
5462
  lockChannelOrder: f,
5463
5463
  onMessageNewHandler: c,
5464
- onMessageNew: v,
5464
+ onMessageNew: x,
5465
5465
  onChannelVisible: w,
5466
5466
  onAddedToChannel: p,
5467
- onChannelUpdated: x
5467
+ onChannelUpdated: v
5468
5468
  }) => {
5469
5469
  const b = z.useRef(0);
5470
5470
  b.current++;
@@ -5516,10 +5516,10 @@ const Io = { last_message_at: -1 }, To = z.memo(
5516
5516
  channelRenderFilterFn: _,
5517
5517
  lockChannelOrder: f,
5518
5518
  onMessageNewHandler: c,
5519
- onMessageNew: v,
5519
+ onMessageNew: x,
5520
5520
  onChannelVisible: w,
5521
5521
  onAddedToChannel: p,
5522
- onChannelUpdated: x,
5522
+ onChannelUpdated: v,
5523
5523
  Paginator: d,
5524
5524
  Preview: Xs,
5525
5525
  EmptyStateIndicator: o
@@ -5602,11 +5602,11 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5602
5602
  1: [0],
5603
5603
  2: [-34, 34],
5604
5604
  3: [-58, 0, 58]
5605
- }, zo = ({ variant: e, images: t, title: n }) => {
5606
- const [a, r] = z.useState({}), i = t.join(`
5607
- `), [l, o] = z.useState(i);
5608
- i !== l && (o(i), r({}));
5609
- const d = t.slice(0, 3).map((f, c) => ({ src: f, index: c })).filter(({ index: f }) => !a[f]), m = d.length >= 3 ? 3 : d.length === 2 ? 2 : 1, h = Oo[m], u = Po[m];
5605
+ }, zo = ({ variant: e, images: t }) => {
5606
+ const [n, a] = z.useState({}), r = t.join(`
5607
+ `), [i, l] = z.useState(r);
5608
+ r !== i && (l(r), a({}));
5609
+ const o = t.slice(0, 3).map((u, f) => ({ src: u, index: f })).filter(({ index: u }) => !n[u]), d = o.length >= 3 ? 3 : o.length === 2 ? 2 : 1, m = Oo[d], h = Po[d];
5610
5610
  return /* @__PURE__ */ s(
5611
5611
  "div",
5612
5612
  {
@@ -5614,23 +5614,22 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5614
5614
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
5615
5615
  Do[e]
5616
5616
  ),
5617
- children: d.map(({ src: f, index: c }, v) => /* @__PURE__ */ s(
5617
+ children: o.map(({ src: u, index: f }, c) => /* @__PURE__ */ s(
5618
5618
  "img",
5619
5619
  {
5620
- src: de(f) ?? f,
5621
- alt: c === 0 ? n ?? "" : "",
5622
- "aria-hidden": c !== 0,
5620
+ src: de(u) ?? u,
5621
+ alt: "",
5623
5622
  draggable: !1,
5624
5623
  loading: "lazy",
5625
5624
  decoding: "async",
5626
- onError: () => r((w) => ({ ...w, [c]: !0 })),
5625
+ onError: () => a((x) => ({ ...x, [f]: !0 })),
5627
5626
  className: "absolute left-1/2 top-1/2 h-[82%] w-[46%] rounded-[12px] object-cover shadow-lg",
5628
5627
  style: {
5629
- transform: `translate(-50%, -50%) translateX(${u[v]}px) rotate(${h[v]}deg)`,
5630
- zIndex: v
5628
+ transform: `translate(-50%, -50%) translateX(${h[c]}px) rotate(${m[c]}deg)`,
5629
+ zIndex: c
5631
5630
  }
5632
5631
  },
5633
- `${f}-${c}`
5632
+ `${u}-${f}`
5634
5633
  ))
5635
5634
  }
5636
5635
  );
@@ -5641,7 +5640,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5641
5640
  title: a,
5642
5641
  heroUrl: r,
5643
5642
  onHeroError: i
5644
- }) => /* @__PURE__ */ s("div", { className: Fo, children: t === "fan" ? /* @__PURE__ */ s(zo, { variant: e, images: n, title: a }) : (
5643
+ }) => /* @__PURE__ */ s("div", { className: Fo, children: t === "fan" ? /* @__PURE__ */ s(zo, { variant: e, images: n }) : (
5645
5644
  // `heroUrl` is the palette-tracked source: it becomes `undefined` when the
5646
5645
  // hero image errors, so `CardThumbnail` falls through to its placeholder.
5647
5646
  // Do NOT `?? images[0]` here — that would re-instate the failed URL.
@@ -5675,13 +5674,13 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5675
5674
  accentColor: d,
5676
5675
  layout: "featured",
5677
5676
  thumbnailUrl: f ? r[0] : void 0
5678
- }), v = m === "single" || m === "end";
5677
+ }), x = m === "single" || m === "end";
5679
5678
  return /* @__PURE__ */ s(
5680
5679
  St,
5681
5680
  {
5682
5681
  accentHex: c.accentHex,
5683
5682
  side: e === "dark" ? "sender" : "receiver",
5684
- visible: v,
5683
+ visible: x,
5685
5684
  children: /* @__PURE__ */ g(
5686
5685
  Ee,
5687
5686
  {
@@ -5894,4 +5893,4 @@ export {
5894
5893
  ps as y,
5895
5894
  mt as z
5896
5895
  };
5897
- //# sourceMappingURL=index-CNqtYNZt.js.map
5896
+ //# sourceMappingURL=index-CrdAtOBl.js.map