fansunited-frontend-components 0.0.95 → 0.0.96

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 (104) hide show
  1. package/Betslip.d.ts +1 -2
  2. package/Betslip.d.ts.map +1 -1
  3. package/Betslip.js +4 -3
  4. package/ChanceGame.js +165 -163
  5. package/ChanceGameComponent.d.ts +1 -1
  6. package/ChanceGameComponent.d.ts.map +1 -1
  7. package/ClassicQuizPlay.d.ts +1 -1
  8. package/ClassicQuizPlay.d.ts.map +1 -1
  9. package/ClassicQuizPlay.js +4 -3
  10. package/CollectLead.d.ts +1 -1
  11. package/CollectLead.d.ts.map +1 -1
  12. package/CollectLead.js +37 -36
  13. package/CompetitionStatistics.d.ts +1 -2
  14. package/CompetitionStatistics.d.ts.map +1 -1
  15. package/CompetitionStatistics.js +458 -451
  16. package/CompetitorCard.d.ts +1 -2
  17. package/CompetitorCard.d.ts.map +1 -1
  18. package/CompetitorCard.js +1235 -1226
  19. package/Discussion.d.ts +1 -1
  20. package/Discussion.d.ts.map +1 -1
  21. package/Discussion.js +4 -3
  22. package/EitherOrPlay.d.ts +1 -1
  23. package/EitherOrPlay.d.ts.map +1 -1
  24. package/EitherOrPlay.js +4 -3
  25. package/EventCard.d.ts +1 -2
  26. package/EventCard.d.ts.map +1 -1
  27. package/EventCard.js +1249 -1244
  28. package/EventGamePlay.d.ts +1 -1
  29. package/EventGamePlay.d.ts.map +1 -1
  30. package/EventGamePlay.js +4 -3
  31. package/Leaderboard.d.ts +1 -1
  32. package/Leaderboard.d.ts.map +1 -1
  33. package/Leaderboard.js +482 -449
  34. package/List.d.ts +1 -2
  35. package/List.d.ts.map +1 -1
  36. package/List.js +258 -254
  37. package/MatchQuizPlay.d.ts +1 -1
  38. package/MatchQuizPlay.d.ts.map +1 -1
  39. package/MatchQuizPlay.js +4 -3
  40. package/Odds.d.ts +1 -2
  41. package/Odds.d.ts.map +1 -1
  42. package/Odds.js +35 -34
  43. package/PersonalityQuizPlay.d.ts +1 -1
  44. package/PersonalityQuizPlay.d.ts.map +1 -1
  45. package/PersonalityQuizPlay.js +4 -3
  46. package/PickThePair.js +102 -100
  47. package/PickThePairComponent.d.ts +1 -1
  48. package/PickThePairComponent.d.ts.map +1 -1
  49. package/PlayerOfTheMatch.d.ts +1 -2
  50. package/PlayerOfTheMatch.d.ts.map +1 -1
  51. package/PlayerOfTheMatch.js +1096 -1085
  52. package/PollVote.d.ts +1 -1
  53. package/PollVote.d.ts.map +1 -1
  54. package/PollVote.js +4 -3
  55. package/Predictor.d.ts +1 -2
  56. package/Predictor.d.ts.map +1 -1
  57. package/Predictor.js +4553 -4525
  58. package/README.md +1 -1
  59. package/Standings.d.ts +1 -2
  60. package/Standings.d.ts.map +1 -1
  61. package/Standings.js +404 -394
  62. package/TopX.d.ts +1 -2
  63. package/TopX.d.ts.map +1 -1
  64. package/TopX.js +5296 -5286
  65. package/chunks/{ChanceGameEmbedVariant-C3NGwvTF.js → ChanceGameEmbedVariant-CVys-3Zh.js} +1 -1
  66. package/chunks/{OddsSkeleton-Bav8FHHN.js → OddsSkeleton-ClJE2xhR.js} +5 -5
  67. package/chunks/{OddsStrip-CviVfQI4.js → OddsStrip-BnSp5TXa.js} +3 -3
  68. package/chunks/{PickOneOfX-a6Dv0-rR.js → PickOneOfX-DaJtkbCw.js} +6 -6
  69. package/chunks/index-Aq5MbUB9.js +4 -0
  70. package/chunks/index-BBQm_8LD.js +4 -0
  71. package/chunks/index-BC_sWWgc.js +4 -0
  72. package/chunks/index-DXKDJ1Vp.js +4 -0
  73. package/chunks/index-DjT5NrbA.js +4 -0
  74. package/chunks/index-DvLRehH6.js +4 -0
  75. package/chunks/index-aIMaxR-p.js +4 -0
  76. package/chunks/{main-Dj4Manb5.js → main-52Wff7qC.js} +1763 -1757
  77. package/chunks/{main-dwV_55lz.js → main-65WcUqAl.js} +615 -615
  78. package/chunks/{main-gexg6lc-.js → main-B58mi9jx.js} +349 -334
  79. package/chunks/{main-Dys2_Jt2.js → main-BIdXUTZS.js} +842 -827
  80. package/chunks/{main-CFwRpvUi.js → main-DD-NEzC7.js} +818 -817
  81. package/chunks/{main-DjiQz1dv.js → main-DUnfJPzY.js} +311 -311
  82. package/chunks/{main-eAQMCxQ7.js → main-DpCBqqg_.js} +322 -321
  83. package/chunks/{main-D9tFZv2q.js → main-Drznt1ak.js} +283 -282
  84. package/chunks/withVersionStamp-B6nArAj4.js +16 -0
  85. package/index.d.ts.map +1 -1
  86. package/index.js +45 -50
  87. package/package.json +57 -49
  88. package/withVersionStamp.d.ts +4 -0
  89. package/withVersionStamp.d.ts.map +1 -0
  90. package/chunks/3dicons-bookmark-fav-dynamic-color-BkMV51tL.js +0 -4
  91. package/chunks/3dicons-crow-dynamic-color-BnvCj9i8.js +0 -4
  92. package/chunks/3dicons-fire-dynamic-color-rNRL0kAe.js +0 -4
  93. package/chunks/3dicons-flag-dynamic-color-BscQxNXn.js +0 -4
  94. package/chunks/3dicons-medal-dynamic-color-CsR036OL.js +0 -4
  95. package/chunks/3dicons-rocket-dynamic-color-EiHCJ2rb.js +0 -4
  96. package/chunks/3dicons-target-dynamic-color-ChQzHpwv.js +0 -4
  97. package/chunks/3dicons-thumb-down-dynamic-color-NQLnsNFt.js +0 -4
  98. package/chunks/index-B1d9q8fX.js +0 -4
  99. package/chunks/index-BP0pvFJ4.js +0 -4
  100. package/chunks/index-CHZyL_g_.js +0 -4
  101. package/chunks/index-CeCUdRmF.js +0 -4
  102. package/chunks/index-Ckyyw-I8.js +0 -4
  103. package/chunks/index-DGvCP5G8.js +0 -4
  104. package/chunks/index-yjMVOgwO.js +0 -4
@@ -1,28 +1,28 @@
1
1
  import { jsx as t, jsxs as v, Fragment as Se } from "react/jsx-runtime";
2
- import { useColors as le, useCornerRadius as pe, useFontFamily as Re, useSpacingScale as ce, useConstantContext as ve, ConstantsContext as we, toIntlLocale as Te, Notification as Ie, Spinner as Pe, getLanguageDirection as Oe, initializeI18n as Ke, applyDirectionToMount as We, widgetCacheKey as He, createWidgetCache as Ue, ContainerProvider as Ve, ThemeProvider as _e, ConstantsProvider as je } from "fansunited-frontend-core";
2
+ import { useDisableCache as Oe, useColors as le, useCornerRadius as pe, useFontFamily as Re, useSpacingScale as ce, useConstantContext as ve, ConstantsContext as Ce, toIntlLocale as Te, Notification as Ie, Spinner as Pe, getLanguageDirection as Ke, initializeI18n as We, applyDirectionToMount as He, widgetCacheKey as Ue, createWidgetCache as Ve, ContainerProvider as _e, ThemeProvider as je, ConstantsProvider as Ye } from "fansunited-frontend-core";
3
3
  import X, { useState as T, useEffect as fe, useRef as oe, useCallback as ge } from "react";
4
- import { Box as w, Button as ie, Typography as z, Textarea as Me, IconButton as Ye, Menu as Ge, MenuItem as De, Modal as Fe, ModalDialog as $e, ModalClose as Je, RadioGroup as Xe, Radio as qe, Avatar as Qe, Divider as Ze, Select as et, Option as tt } from "@mui/joy";
4
+ import { Box as C, Button as ie, Typography as z, Textarea as Me, IconButton as Ge, Menu as Je, MenuItem as De, Modal as Fe, ModalDialog as $e, ModalClose as Xe, RadioGroup as qe, Radio as Qe, Avatar as Ze, Divider as et, Select as tt, Option as ot } from "@mui/joy";
5
5
  import { useTranslation as he } from "react-i18next";
6
- import { ThumbUp as ot, ThumbDown as nt, Favorite as rt, SentimentSatisfied as st, FavoriteBorder as at, EmojiEmotions as it, SentimentVeryDissatisfied as lt, MoodBad as ct, Reply as dt, MoreVert as ut, Delete as mt, Flag as ft, RemoveCircleOutline as pt, Block as ht, KeyboardArrowDown as yt } from "@mui/icons-material";
7
- import { CacheProvider as xt } from "@emotion/react";
8
- import { createPortal as bt } from "react-dom";
9
- const gt = (e, r) => {
10
- const [s, m] = T(null), [u, n] = T(!0), [l, o] = T(null), [a, i] = T(!1);
6
+ import { ThumbUp as nt, ThumbDown as rt, Favorite as st, SentimentSatisfied as at, FavoriteBorder as it, EmojiEmotions as lt, SentimentVeryDissatisfied as ct, MoodBad as dt, Reply as ut, MoreVert as mt, Delete as ft, Flag as pt, RemoveCircleOutline as ht, Block as yt, KeyboardArrowDown as xt } from "@mui/icons-material";
7
+ import { CacheProvider as bt } from "@emotion/react";
8
+ import { createPortal as gt } from "react-dom";
9
+ const St = (e, r) => {
10
+ const [s, u] = T(null), [m, n] = T(!0), [i, o] = T(null), [l, a] = T(!1);
11
11
  return fe(() => {
12
12
  r && (async () => {
13
13
  try {
14
14
  n(!0);
15
15
  const c = await e.discussions.getById(r);
16
- m(c), o(null), i(!1);
16
+ u(c), o(null), a(!1);
17
17
  } catch (c) {
18
- (e.helpers.getSDKConfiguration().errorHandlingMode === "standard" ? c.error.code === 404 : c.data.error.code === 404) ? (i(!0), o(null), m(null)) : (o(l), m(null), i(!1));
18
+ (e.helpers.getSDKConfiguration().errorHandlingMode === "standard" ? c.error.code === 404 : c.data.error.code === 404) ? (a(!0), o(null), u(null)) : (o(i), u(null), a(!1));
19
19
  } finally {
20
20
  n(!1);
21
21
  }
22
22
  })();
23
- }, [e, r]), { discussion: s, setDiscussion: m, isLoading: u, error: l, isNotFound: a };
24
- }, St = 5e3, Rt = 5, vt = (e, r, s = null, m = "", u = "LATEST", n = 20, l, o = !1, a = 0) => {
25
- const i = n <= 0, [f, c] = T([]), [y, x] = T(!i), [R, b] = T(!1), [D, g] = T(null), [C, F] = T(u), [L, d] = T(
23
+ }, [e, r]), { discussion: s, setDiscussion: u, isLoading: m, error: i, isNotFound: l };
24
+ }, Rt = 5e3, vt = 5, Ct = (e, r, s = null, u = "", m = "LATEST", n = 20, i, o = !1, l = 0) => {
25
+ const a = n <= 0, [f, c] = T([]), [y, x] = T(!a), [R, b] = T(!1), [D, g] = T(null), [w, F] = T(m), [L, d] = T(
26
26
  null
27
27
  ), [I, ne] = T(!1), [k, j] = T(() => /* @__PURE__ */ new Set()), M = oe(0), A = ge(
28
28
  async (p, S, h = !1) => {
@@ -51,12 +51,12 @@ const gt = (e, r) => {
51
51
  [e, r, n, o]
52
52
  );
53
53
  fe(() => {
54
- if (i) {
54
+ if (a) {
55
55
  c([]), ne(!1), x(!1);
56
56
  return;
57
57
  }
58
- r && A(C);
59
- }, [r, C, A, i]);
58
+ r && A(w);
59
+ }, [r, w, A, a]);
60
60
  const de = (p) => {
61
61
  F(p), d(null);
62
62
  }, Y = oe(y);
@@ -64,23 +64,23 @@ const gt = (e, r) => {
64
64
  const P = oe(L);
65
65
  P.current = L;
66
66
  const U = ge(() => {
67
- P.current && !Y.current && A(C, P.current, !0);
68
- }, [A, C]), V = oe(f);
67
+ P.current && !Y.current && A(w, P.current, !0);
68
+ }, [A, w]), V = oe(f);
69
69
  V.current = f;
70
70
  const q = oe(I);
71
71
  q.current = I;
72
- const ee = oe(l);
73
- ee.current = l;
72
+ const ee = oe(i);
73
+ ee.current = i;
74
74
  const G = oe(!1), re = ge(async () => {
75
75
  var W, te;
76
76
  if (Y.current || G.current) return;
77
- const p = C === "LATEST" || !q.current;
77
+ const p = w === "LATEST" || !q.current;
78
78
  G.current = !0;
79
79
  const S = M.current, h = V.current, B = new Map(h.map((J) => [J.id, J])), K = (J) => !B.has(J.id);
80
80
  try {
81
81
  const J = [], ae = /* @__PURE__ */ new Map();
82
82
  let be;
83
- for (let $ = 0; $ < Rt; $++) {
83
+ for (let $ = 0; $ < vt; $++) {
84
84
  const H = await e.discussions.getPosts(r, {
85
85
  sort: "LATEST",
86
86
  limit: n,
@@ -112,10 +112,10 @@ const gt = (e, r) => {
112
112
  if (!O.length) return;
113
113
  h.length ? c(($) => {
114
114
  const H = new Set($.map((xe) => xe.id)), N = O.filter((xe) => !H.has(xe.id));
115
- return C === "LATEST" ? [...N, ...$].sort(
115
+ return w === "LATEST" ? [...N, ...$].sort(
116
116
  (xe, me) => Date.parse(me.createdAt) - Date.parse(xe.createdAt)
117
117
  ) : [...$, ...N.reverse()];
118
- }) : await A(C), j(($) => {
118
+ }) : await A(w), j(($) => {
119
119
  const H = new Set($);
120
120
  return O.forEach((N) => H.add(N.id)), H;
121
121
  }), (te = ee.current) == null || te.call(ee, O.length);
@@ -128,11 +128,11 @@ const gt = (e, r) => {
128
128
  r,
129
129
  n,
130
130
  o,
131
- C,
131
+ w,
132
132
  A
133
- ]), Q = a > 0 ? Math.max(a, St) : 0;
133
+ ]), Q = l > 0 ? Math.max(l, Rt) : 0;
134
134
  fe(() => {
135
- if (!Q || i || !r) return;
135
+ if (!Q || a || !r) return;
136
136
  const p = () => {
137
137
  document.visibilityState !== "hidden" && re();
138
138
  }, S = () => {
@@ -141,7 +141,7 @@ const gt = (e, r) => {
141
141
  return document.addEventListener("visibilitychange", S), () => {
142
142
  clearInterval(h), document.removeEventListener("visibilitychange", S);
143
143
  };
144
- }, [Q, i, r, re]);
144
+ }, [Q, a, r, re]);
145
145
  const ye = ge((p) => {
146
146
  j((S) => {
147
147
  if (!S.has(p)) return S;
@@ -151,11 +151,11 @@ const gt = (e, r) => {
151
151
  }, []);
152
152
  return {
153
153
  posts: f,
154
- postsHidden: i,
154
+ postsHidden: a,
155
155
  isLoading: y,
156
156
  isSubmitting: R,
157
157
  error: D,
158
- currentSort: C,
158
+ currentSort: w,
159
159
  hasMore: I,
160
160
  newPostIds: k,
161
161
  markPostSeen: ye,
@@ -169,7 +169,7 @@ const gt = (e, r) => {
169
169
  replyId: S || null,
170
170
  userNickname: null,
171
171
  discussionLabel: s,
172
- discussionUrl: m,
172
+ discussionUrl: u,
173
173
  context: {
174
174
  content: null,
175
175
  tags: [],
@@ -185,7 +185,7 @@ const gt = (e, r) => {
185
185
  (K) => K.map(
186
186
  (W) => W.id === S ? { ...W, repliesCount: (W.repliesCount || 0) + 1 } : W
187
187
  )
188
- ) : i || c((K) => [B, ...K]), l == null || l(1), g(null);
188
+ ) : a || c((K) => [B, ...K]), i == null || i(1), g(null);
189
189
  } catch (h) {
190
190
  throw g(
191
191
  h
@@ -212,7 +212,7 @@ const gt = (e, r) => {
212
212
  (h) => h.map(
213
213
  (B) => B.id === S ? { ...B, repliesCount: Math.max(0, (B.repliesCount || 0) - 1) } : B
214
214
  )
215
- ), l == null || l(-1), g(null);
215
+ ), i == null || i(-1), g(null);
216
216
  } catch (h) {
217
217
  throw g(
218
218
  h
@@ -232,27 +232,27 @@ const gt = (e, r) => {
232
232
  }, wt = async (e) => {
233
233
  var r;
234
234
  try {
235
- const m = (r = e.helpers.getSDKConfiguration().authProvider) == null ? void 0 : r.getIdToken(), u = m == null ? void 0 : m.split(".")[1];
236
- if (!u) return null;
235
+ const u = (r = e.helpers.getSDKConfiguration().authProvider) == null ? void 0 : r.getIdToken(), m = u == null ? void 0 : u.split(".")[1];
236
+ if (!m) return null;
237
237
  const { sub: n } = JSON.parse(
238
- atob(u.replace(/-/g, "+").replace(/_/g, "/"))
238
+ atob(m.replace(/-/g, "+").replace(/_/g, "/"))
239
239
  );
240
240
  return typeof n == "string" && n ? n : null;
241
241
  } catch {
242
242
  return null;
243
243
  }
244
- }, Ct = (e, r) => {
245
- var l;
246
- const [s, m] = T(null), u = ge(
247
- async (o = !1) => {
244
+ }, Pt = (e, r) => {
245
+ var o;
246
+ const [s, u] = T(null), m = Oe(), n = ge(
247
+ async (l) => {
248
248
  if (!r) {
249
- m(null);
249
+ u(null);
250
250
  return;
251
251
  }
252
252
  try {
253
253
  const a = await wt(e);
254
254
  if (!a) return;
255
- m(await e.discussions.getUserBan(a, o));
255
+ u(await e.discussions.getUserBan(a, l));
256
256
  } catch (a) {
257
257
  console.error("Failed to get user ban:", a);
258
258
  }
@@ -260,44 +260,44 @@ const gt = (e, r) => {
260
260
  [e, r]
261
261
  );
262
262
  fe(() => {
263
- u();
264
- }, [u]);
265
- const n = ge(() => u(!0), [u]);
266
- return { ban: s, isBanned: !!((l = s == null ? void 0 : s.activeBan) != null && l.banned), refresh: n };
263
+ n(m);
264
+ }, [n, m]);
265
+ const i = ge(() => n(!0), [n]);
266
+ return { ban: s, isBanned: !!((o = s == null ? void 0 : s.activeBan) != null && o.banned), refresh: i };
267
267
  }, Le = (e) => {
268
- var r, s, m;
269
- return (((r = e == null ? void 0 : e.error) == null ? void 0 : r.status) ?? ((m = (s = e == null ? void 0 : e.data) == null ? void 0 : s.error) == null ? void 0 : m.status)) === "ban";
268
+ var r, s, u;
269
+ return (((r = e == null ? void 0 : e.error) == null ? void 0 : r.status) ?? ((u = (s = e == null ? void 0 : e.data) == null ? void 0 : s.error) == null ? void 0 : u.status)) === "ban";
270
270
  }, Be = ({
271
271
  onSubmit: e,
272
272
  userIsLoggedIn: r,
273
273
  onSignInClick: s,
274
- placeholder: m,
275
- isSubmitting: u,
274
+ placeholder: u,
275
+ isSubmitting: m,
276
276
  replyTo: n,
277
- onCancel: l,
277
+ onCancel: i,
278
278
  disabled: o = !1
279
279
  }) => {
280
- const { t: a } = he(), [i, f] = T(""), c = le(), y = pe(), x = Re(), R = ce(), b = c.palette.primary.plainColor, D = c.palette.primary.onPrimary, g = async (C) => {
281
- if (C.preventDefault(), !(!i.trim() || o))
280
+ const { t: l } = he(), [a, f] = T(""), c = le(), y = pe(), x = Re(), R = ce(), b = c.palette.primary.plainColor, D = c.palette.primary.onPrimary, g = async (w) => {
281
+ if (w.preventDefault(), !(!a.trim() || o))
282
282
  try {
283
- await e(i), f("");
283
+ await e(a), f("");
284
284
  } catch (F) {
285
285
  console.error("Failed to submit comment:", F);
286
286
  }
287
287
  };
288
- return r ? /* @__PURE__ */ v(w, { component: "form", onSubmit: g, sx: { mb: R.lg }, children: [
289
- n && /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", mb: R.xs, color: c.textSecondary }, children: a("discussion.replyingTo", "Replying to {{name}}", {
288
+ return r ? /* @__PURE__ */ v(C, { component: "form", onSubmit: g, sx: { mb: R.lg }, children: [
289
+ n && /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", mb: R.xs, color: c.textSecondary }, children: l("discussion.replyingTo", "Replying to {{name}}", {
290
290
  name: n
291
291
  }) }),
292
292
  /* @__PURE__ */ t(
293
293
  Me,
294
294
  {
295
- placeholder: m || a("discussion.writeComment", "Write a comment..."),
296
- value: i,
297
- onChange: (C) => f(C.target.value),
295
+ placeholder: u || l("discussion.writeComment", "Write a comment..."),
296
+ value: a,
297
+ onChange: (w) => f(w.target.value),
298
298
  minRows: 3,
299
299
  maxRows: 8,
300
- disabled: u || o,
300
+ disabled: m || o,
301
301
  sx: {
302
302
  fontSize: "1em",
303
303
  mb: R.sm,
@@ -316,13 +316,13 @@ const gt = (e, r) => {
316
316
  }
317
317
  }
318
318
  ),
319
- /* @__PURE__ */ v(w, { sx: { display: "flex", gap: R.xs, justifyContent: "flex-end" }, children: [
320
- l && /* @__PURE__ */ t(
319
+ /* @__PURE__ */ v(C, { sx: { display: "flex", gap: R.xs, justifyContent: "flex-end" }, children: [
320
+ i && /* @__PURE__ */ t(
321
321
  ie,
322
322
  {
323
323
  variant: "plain",
324
- onClick: l,
325
- disabled: u,
324
+ onClick: i,
325
+ disabled: m,
326
326
  sx: {
327
327
  fontSize: "1em",
328
328
  fontFamily: x.primary,
@@ -332,7 +332,7 @@ const gt = (e, r) => {
332
332
  bgcolor: `${c.textPrimary}14`
333
333
  }
334
334
  },
335
- children: a("common.cancel", "Cancel")
335
+ children: l("common.cancel", "Cancel")
336
336
  }
337
337
  ),
338
338
  /* @__PURE__ */ t(
@@ -340,8 +340,8 @@ const gt = (e, r) => {
340
340
  {
341
341
  type: "submit",
342
342
  variant: "solid",
343
- disabled: !i.trim() || u || o,
344
- loading: u,
343
+ disabled: !a.trim() || m || o,
344
+ loading: m,
345
345
  sx: {
346
346
  fontSize: "1em",
347
347
  fontFamily: x.primary,
@@ -358,11 +358,11 @@ const gt = (e, r) => {
358
358
  opacity: 0.4
359
359
  }
360
360
  },
361
- children: n ? a("discussion.reply", "Reply") : a("discussion.post", "Post")
361
+ children: n ? l("discussion.reply", "Reply") : l("discussion.post", "Post")
362
362
  }
363
363
  )
364
364
  ] })
365
- ] }) : /* @__PURE__ */ t(w, { sx: { mb: R.lg }, children: /* @__PURE__ */ t(
365
+ ] }) : /* @__PURE__ */ t(C, { sx: { mb: R.lg }, children: /* @__PURE__ */ t(
366
366
  ie,
367
367
  {
368
368
  fullWidth: !0,
@@ -380,26 +380,26 @@ const gt = (e, r) => {
380
380
  borderColor: b
381
381
  }
382
382
  },
383
- children: a("discussion.signInToPost", "Sign in to post")
383
+ children: l("discussion.signInToPost", "Sign in to post")
384
384
  }
385
385
  ) });
386
- }, Pt = {
387
- LIKE: /* @__PURE__ */ t(ot, { fontSize: "small" }),
388
- DISLIKE: /* @__PURE__ */ t(nt, { fontSize: "small" }),
389
- LOVE: /* @__PURE__ */ t(rt, { fontSize: "small" }),
390
- LAUGH: /* @__PURE__ */ t(st, { fontSize: "small" }),
391
- CARE: /* @__PURE__ */ t(at, { fontSize: "small" }),
392
- WOW: /* @__PURE__ */ t(it, { fontSize: "small" }),
393
- SAD: /* @__PURE__ */ t(lt, { fontSize: "small" }),
394
- ANGRY: /* @__PURE__ */ t(ct, { fontSize: "small" })
386
+ }, Et = {
387
+ LIKE: /* @__PURE__ */ t(nt, { fontSize: "small" }),
388
+ DISLIKE: /* @__PURE__ */ t(rt, { fontSize: "small" }),
389
+ LOVE: /* @__PURE__ */ t(st, { fontSize: "small" }),
390
+ LAUGH: /* @__PURE__ */ t(at, { fontSize: "small" }),
391
+ CARE: /* @__PURE__ */ t(it, { fontSize: "small" }),
392
+ WOW: /* @__PURE__ */ t(lt, { fontSize: "small" }),
393
+ SAD: /* @__PURE__ */ t(ct, { fontSize: "small" }),
394
+ ANGRY: /* @__PURE__ */ t(dt, { fontSize: "small" })
395
395
  }, Ae = ({
396
396
  reaction: e,
397
397
  count: r,
398
398
  isActive: s,
399
- onClick: m,
400
- disabled: u
399
+ onClick: u,
400
+ disabled: m
401
401
  }) => {
402
- const n = le(), l = ce(), o = (i) => i >= 1e6 ? (i / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : i >= 1e3 ? (i / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : i.toString(), a = () => {
402
+ const n = le(), i = ce(), o = (a) => a >= 1e6 ? (a / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : a >= 1e3 ? (a / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : a.toString(), l = () => {
403
403
  if (!s) return n.textSecondary;
404
404
  switch (e) {
405
405
  case "LIKE":
@@ -415,27 +415,27 @@ const gt = (e, r) => {
415
415
  }
416
416
  };
417
417
  return /* @__PURE__ */ v(
418
- w,
418
+ C,
419
419
  {
420
420
  sx: {
421
421
  display: "inline-flex",
422
422
  alignItems: "center",
423
- gap: l["2xs"],
424
- px: l.sm,
425
- py: l["2xs"],
423
+ gap: i["2xs"],
424
+ px: i.sm,
425
+ py: i["2xs"],
426
426
  borderRadius: "18px",
427
427
  backgroundColor: s ? `${n.palette.neutral.softBg}` : "transparent",
428
- color: a(),
428
+ color: l(),
429
429
  "&:hover": {
430
430
  backgroundColor: `${n.palette.neutral.softHoverBg}`
431
431
  },
432
- cursor: u ? "not-allowed" : "pointer",
433
- opacity: u ? 0.5 : 1
432
+ cursor: m ? "not-allowed" : "pointer",
433
+ opacity: m ? 0.5 : 1
434
434
  },
435
- onClick: u ? void 0 : m,
435
+ onClick: m ? void 0 : u,
436
436
  children: [
437
437
  /* @__PURE__ */ t(
438
- w,
438
+ C,
439
439
  {
440
440
  sx: {
441
441
  display: "flex",
@@ -443,7 +443,7 @@ const gt = (e, r) => {
443
443
  fontSize: "1.25em",
444
444
  color: "inherit"
445
445
  },
446
- children: Pt[e]
446
+ children: Et[e]
447
447
  }
448
448
  ),
449
449
  r > 0 && /* @__PURE__ */ t(
@@ -452,7 +452,7 @@ const gt = (e, r) => {
452
452
  level: "body-sm",
453
453
  sx: {
454
454
  fontSize: "0.875em",
455
- color: s ? a() : n.textPrimary,
455
+ color: s ? l() : n.textPrimary,
456
456
  fontWeight: 500
457
457
  },
458
458
  children: o(r)
@@ -462,31 +462,31 @@ const gt = (e, r) => {
462
462
  }
463
463
  );
464
464
  }, ke = (e, r) => {
465
- const [s, m] = T(null);
465
+ const [s, u] = T(null);
466
466
  return fe(() => {
467
467
  (async () => {
468
468
  if (r)
469
469
  try {
470
470
  const n = await e.profile.getOwn().getInfo();
471
- m(n.id);
471
+ u(n.id);
472
472
  } catch (n) {
473
473
  console.error("Failed to get current user ID:", n);
474
474
  }
475
475
  })();
476
476
  }, [r, e]), s;
477
- }, Et = ({
477
+ }, Dt = ({
478
478
  post: e,
479
479
  sdk: r,
480
480
  userIsLoggedIn: s,
481
- onSignInClick: m,
482
- onReact: u,
481
+ onSignInClick: u,
482
+ onReact: m,
483
483
  showReactions: n = !0,
484
- showReplyButton: l = !0,
484
+ showReplyButton: i = !0,
485
485
  onReplyClick: o,
486
- isBanned: a = !1
486
+ isBanned: l = !1
487
487
  }) => {
488
- var C, F, L, d;
489
- const { t: i } = he(), f = le(), c = pe(), y = Re(), x = ce(), R = ke(r, s), D = (() => {
488
+ var w, F, L, d;
489
+ const { t: a } = he(), f = le(), c = pe(), y = Re(), x = ce(), R = ke(r, s), D = (() => {
490
490
  if (!R || !e.reactions)
491
491
  return null;
492
492
  for (const I of e.reactions)
@@ -495,14 +495,14 @@ const gt = (e, r) => {
495
495
  return null;
496
496
  })(), g = (I) => {
497
497
  if (!s) {
498
- m == null || m();
498
+ u == null || u();
499
499
  return;
500
500
  }
501
- u(e.id, I).catch(() => {
501
+ m(e.id, I).catch(() => {
502
502
  });
503
503
  };
504
504
  return /* @__PURE__ */ v(
505
- w,
505
+ C,
506
506
  {
507
507
  sx: {
508
508
  display: "flex",
@@ -517,10 +517,10 @@ const gt = (e, r) => {
517
517
  Ae,
518
518
  {
519
519
  reaction: "LIKE",
520
- count: ((F = (C = e.reactions) == null ? void 0 : C.find((I) => I.type === "LIKE")) == null ? void 0 : F.reactionCount) || 0,
520
+ count: ((F = (w = e.reactions) == null ? void 0 : w.find((I) => I.type === "LIKE")) == null ? void 0 : F.reactionCount) || 0,
521
521
  isActive: D === "LIKE",
522
522
  onClick: () => g("LIKE"),
523
- disabled: !s || a
523
+ disabled: !s || l
524
524
  }
525
525
  ),
526
526
  /* @__PURE__ */ t(
@@ -530,18 +530,18 @@ const gt = (e, r) => {
530
530
  count: ((d = (L = e.reactions) == null ? void 0 : L.find((I) => I.type === "DISLIKE")) == null ? void 0 : d.reactionCount) || 0,
531
531
  isActive: D === "DISLIKE",
532
532
  onClick: () => g("DISLIKE"),
533
- disabled: !s || a
533
+ disabled: !s || l
534
534
  }
535
535
  )
536
536
  ] }),
537
- l && /* @__PURE__ */ t(
537
+ i && /* @__PURE__ */ t(
538
538
  ie,
539
539
  {
540
540
  size: "sm",
541
541
  variant: "plain",
542
542
  onClick: o,
543
- disabled: a,
544
- startDecorator: /* @__PURE__ */ t(dt, { fontSize: "small" }),
543
+ disabled: l,
544
+ startDecorator: /* @__PURE__ */ t(ut, { fontSize: "small" }),
545
545
  sx: {
546
546
  ml: x.xs,
547
547
  fontFamily: y.primary,
@@ -557,25 +557,25 @@ const gt = (e, r) => {
557
557
  bgcolor: `${f.textPrimary}14`
558
558
  }
559
559
  },
560
- children: i("discussion.reply", "Reply")
560
+ children: a("discussion.reply", "Reply")
561
561
  }
562
562
  )
563
563
  ]
564
564
  }
565
565
  );
566
- }, Dt = ({
566
+ }, At = ({
567
567
  isOwnPost: e,
568
568
  canReport: r,
569
569
  onDelete: s,
570
- onReport: m,
571
- disabled: u = !1
570
+ onReport: u,
571
+ disabled: m = !1
572
572
  }) => {
573
- const { t: n } = he(), { shadowRootElement: l } = ve(we), o = pe(), a = le(), i = ce(), [f, c] = X.useState(null), y = X.useRef(null);
573
+ const { t: n } = he(), { shadowRootElement: i } = ve(Ce), o = pe(), l = le(), a = ce(), [f, c] = X.useState(null), y = X.useRef(null);
574
574
  if (X.useEffect(() => {
575
575
  if (!f) return;
576
576
  const b = (g) => {
577
- const C = g.composedPath();
578
- f && C.includes(f) || y.current && C.includes(y.current) || c(null);
577
+ const w = g.composedPath();
578
+ f && w.includes(f) || y.current && w.includes(y.current) || c(null);
579
579
  }, D = setTimeout(() => {
580
580
  document.addEventListener("click", b, !0);
581
581
  }, 0);
@@ -585,21 +585,21 @@ const gt = (e, r) => {
585
585
  }, [f]), !e && !r) return null;
586
586
  const x = {
587
587
  zIndex: 1300,
588
- bgcolor: a.surface,
589
- border: `1px solid ${a.outlineEnabledBorder}`,
588
+ bgcolor: l.surface,
589
+ border: `1px solid ${l.outlineEnabledBorder}`,
590
590
  borderRadius: o.sm,
591
591
  boxShadow: "none"
592
592
  }, R = {
593
- color: `${a.textPrimary} !important`,
594
- bgcolor: `${a.surface} !important`,
593
+ color: `${l.textPrimary} !important`,
594
+ bgcolor: `${l.surface} !important`,
595
595
  "&:hover": {
596
- bgcolor: `${a.surfaceVariant} !important`,
597
- color: `${a.textPrimary} !important`
596
+ bgcolor: `${l.surfaceVariant} !important`,
597
+ color: `${l.textPrimary} !important`
598
598
  }
599
599
  };
600
600
  return /* @__PURE__ */ v(Se, { children: [
601
601
  /* @__PURE__ */ t(
602
- Ye,
602
+ Ge,
603
603
  {
604
604
  size: "sm",
605
605
  variant: "plain",
@@ -607,22 +607,22 @@ const gt = (e, r) => {
607
607
  sx: {
608
608
  fontSize: "1em",
609
609
  ml: "auto",
610
- color: a.textPrimary,
610
+ color: l.textPrimary,
611
611
  "&:hover": {
612
- bgcolor: `${a.textPrimary}14`
612
+ bgcolor: `${l.textPrimary}14`
613
613
  }
614
614
  },
615
- children: /* @__PURE__ */ t(ut, { fontSize: "small" })
615
+ children: /* @__PURE__ */ t(mt, { fontSize: "small" })
616
616
  }
617
617
  ),
618
618
  /* @__PURE__ */ v(
619
- Ge,
619
+ Je,
620
620
  {
621
621
  ref: y,
622
622
  anchorEl: f,
623
623
  open: !!f,
624
624
  onClose: () => c(null),
625
- container: l,
625
+ container: i,
626
626
  sx: x,
627
627
  children: [
628
628
  e && /* @__PURE__ */ v(
@@ -631,10 +631,10 @@ const gt = (e, r) => {
631
631
  onClick: () => {
632
632
  c(null), s();
633
633
  },
634
- disabled: u,
634
+ disabled: m,
635
635
  sx: R,
636
636
  children: [
637
- /* @__PURE__ */ t(mt, { fontSize: "small", sx: { mr: i.xs } }),
637
+ /* @__PURE__ */ t(ft, { fontSize: "small", sx: { mr: a.xs } }),
638
638
  n("discussion.delete.action", "Delete")
639
639
  ]
640
640
  }
@@ -643,12 +643,12 @@ const gt = (e, r) => {
643
643
  De,
644
644
  {
645
645
  onClick: () => {
646
- c(null), m();
646
+ c(null), u();
647
647
  },
648
- disabled: u,
648
+ disabled: m,
649
649
  sx: R,
650
650
  children: [
651
- /* @__PURE__ */ t(ft, { fontSize: "small", sx: { mr: i.xs } }),
651
+ /* @__PURE__ */ t(pt, { fontSize: "small", sx: { mr: a.xs } }),
652
652
  n("discussion.report.action", "Report")
653
653
  ]
654
654
  }
@@ -657,19 +657,19 @@ const gt = (e, r) => {
657
657
  }
658
658
  )
659
659
  ] });
660
- }, At = ({
660
+ }, zt = ({
661
661
  open: e,
662
662
  onClose: r,
663
663
  onConfirm: s,
664
- onError: m,
665
- container: u
664
+ onError: u,
665
+ container: m
666
666
  }) => {
667
- const { t: n } = he(), l = le(), o = pe(), a = Re(), i = ce(), f = l.palette.primary.plainColor, c = l.palette.primary.onPrimary, [y, x] = T(!1), R = async () => {
667
+ const { t: n } = he(), i = le(), o = pe(), l = Re(), a = ce(), f = i.palette.primary.plainColor, c = i.palette.primary.onPrimary, [y, x] = T(!1), R = async () => {
668
668
  x(!0);
669
669
  try {
670
670
  await s(), r();
671
671
  } catch {
672
- m(
672
+ u(
673
673
  n(
674
674
  "discussion.delete.error",
675
675
  "Failed to delete comment. Please try again."
@@ -679,15 +679,15 @@ const gt = (e, r) => {
679
679
  x(!1);
680
680
  }
681
681
  };
682
- return /* @__PURE__ */ t(Fe, { open: e, onClose: r, container: u, children: /* @__PURE__ */ v(
682
+ return /* @__PURE__ */ t(Fe, { open: e, onClose: r, container: m, children: /* @__PURE__ */ v(
683
683
  $e,
684
684
  {
685
685
  sx: {
686
686
  fontSize: "1em",
687
- bgcolor: l.surface,
688
- color: l.textPrimary,
687
+ bgcolor: i.surface,
688
+ color: i.textPrimary,
689
689
  borderRadius: o.md,
690
- p: i.lg,
690
+ p: a.lg,
691
691
  minWidth: 320,
692
692
  maxWidth: 400
693
693
  },
@@ -696,15 +696,15 @@ const gt = (e, r) => {
696
696
  z,
697
697
  {
698
698
  level: "title-lg",
699
- sx: { fontSize: "1.25em", mb: i.xs, fontFamily: a.primary },
699
+ sx: { fontSize: "1.25em", mb: a.xs, fontFamily: l.primary },
700
700
  children: n("discussion.delete.title", "Delete comment")
701
701
  }
702
702
  ),
703
- /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", mb: i.lg, color: l.textSecondary }, children: n(
703
+ /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", mb: a.lg, color: i.textSecondary }, children: n(
704
704
  "discussion.delete.description",
705
705
  "Are you sure you want to delete this comment? This action cannot be undone."
706
706
  ) }),
707
- /* @__PURE__ */ v(w, { sx: { display: "flex", gap: i.xs, justifyContent: "flex-end" }, children: [
707
+ /* @__PURE__ */ v(C, { sx: { display: "flex", gap: a.xs, justifyContent: "flex-end" }, children: [
708
708
  /* @__PURE__ */ t(
709
709
  ie,
710
710
  {
@@ -712,10 +712,10 @@ const gt = (e, r) => {
712
712
  onClick: r,
713
713
  sx: {
714
714
  fontSize: "1em",
715
- fontFamily: a.primary,
716
- color: l.textPrimary,
715
+ fontFamily: l.primary,
716
+ color: i.textPrimary,
717
717
  borderRadius: o.sm,
718
- "&:hover": { bgcolor: `${l.textPrimary}14` }
718
+ "&:hover": { bgcolor: `${i.textPrimary}14` }
719
719
  },
720
720
  children: n("common.cancel", "Cancel")
721
721
  }
@@ -729,7 +729,7 @@ const gt = (e, r) => {
729
729
  onClick: R,
730
730
  sx: {
731
731
  fontSize: "1em",
732
- fontFamily: a.primary,
732
+ fontFamily: l.primary,
733
733
  bgcolor: f,
734
734
  color: c,
735
735
  borderRadius: o.sm,
@@ -750,7 +750,7 @@ const gt = (e, r) => {
750
750
  ]
751
751
  }
752
752
  ) });
753
- }, zt = [
753
+ }, Tt = [
754
754
  { value: "SPAM", labelKey: "discussion.report.spam", fallback: "Spam" },
755
755
  {
756
756
  value: "NOT_ON_THE_SUBJECT",
@@ -775,37 +775,37 @@ const gt = (e, r) => {
775
775
  },
776
776
  { value: "INSULT", labelKey: "discussion.report.insult", fallback: "Insult" },
777
777
  { value: "OTHER", labelKey: "discussion.report.other", fallback: "Other" }
778
- ], Tt = ({
778
+ ], It = ({
779
779
  open: e,
780
780
  onClose: r,
781
781
  onSubmit: s,
782
- onSuccess: m,
783
- onError: u,
782
+ onSuccess: u,
783
+ onError: m,
784
784
  container: n
785
785
  }) => {
786
- const { t: l } = he(), o = le(), a = pe(), i = Re(), f = ce(), c = o.palette.primary.plainColor, y = o.palette.primary.onPrimary, [x, R] = T(""), [b, D] = T(""), [g, C] = T(!1), F = () => {
786
+ const { t: i } = he(), o = le(), l = pe(), a = Re(), f = ce(), c = o.palette.primary.plainColor, y = o.palette.primary.onPrimary, [x, R] = T(""), [b, D] = T(""), [g, w] = T(!1), F = () => {
787
787
  r(), R(""), D("");
788
788
  }, L = async () => {
789
- C(!0);
789
+ w(!0);
790
790
  try {
791
791
  await s(
792
792
  x,
793
793
  x === "OTHER" ? b : void 0
794
- ), m(
795
- l(
794
+ ), u(
795
+ i(
796
796
  "discussion.report.success",
797
797
  "Post reported successfully. Thank you."
798
798
  )
799
799
  ), F();
800
800
  } catch {
801
- u(
802
- l(
801
+ m(
802
+ i(
803
803
  "discussion.report.error",
804
804
  "Failed to report post. Please try again."
805
805
  )
806
806
  );
807
807
  } finally {
808
- C(!1);
808
+ w(!1);
809
809
  }
810
810
  };
811
811
  return /* @__PURE__ */ t(Fe, { open: e, onClose: F, container: n, children: /* @__PURE__ */ v(
@@ -815,14 +815,14 @@ const gt = (e, r) => {
815
815
  fontSize: "1em",
816
816
  bgcolor: o.surface,
817
817
  color: o.textPrimary,
818
- borderRadius: a.md,
818
+ borderRadius: l.md,
819
819
  p: f.lg,
820
820
  minWidth: 320,
821
821
  maxWidth: 440
822
822
  },
823
823
  children: [
824
824
  /* @__PURE__ */ t(
825
- Je,
825
+ Xe,
826
826
  {
827
827
  sx: {
828
828
  color: o.textPrimary,
@@ -834,25 +834,25 @@ const gt = (e, r) => {
834
834
  z,
835
835
  {
836
836
  level: "title-lg",
837
- sx: { fontSize: "1.25em", mb: f.md, fontFamily: i.primary },
838
- children: l("discussion.report.title", "Report post")
837
+ sx: { fontSize: "1.25em", mb: f.md, fontFamily: a.primary },
838
+ children: i("discussion.report.title", "Report post")
839
839
  }
840
840
  ),
841
- /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", mb: f.md, color: o.textSecondary }, children: l(
841
+ /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", mb: f.md, color: o.textSecondary }, children: i(
842
842
  "discussion.report.description",
843
843
  "Why are you reporting this post?"
844
844
  ) }),
845
845
  /* @__PURE__ */ t(
846
- Xe,
846
+ qe,
847
847
  {
848
848
  value: x,
849
849
  onChange: (d) => R(d.target.value),
850
850
  sx: { gap: f.xs, mb: f.md },
851
- children: zt.map((d) => /* @__PURE__ */ t(
852
- qe,
851
+ children: Tt.map((d) => /* @__PURE__ */ t(
852
+ Qe,
853
853
  {
854
854
  value: d.value,
855
- label: l(d.labelKey, d.fallback),
855
+ label: i(d.labelKey, d.fallback),
856
856
  slotProps: {
857
857
  radio: {
858
858
  sx: {
@@ -866,7 +866,7 @@ const gt = (e, r) => {
866
866
  }
867
867
  },
868
868
  sx: {
869
- fontFamily: i.primary,
869
+ fontFamily: a.primary,
870
870
  color: o.textPrimary
871
871
  }
872
872
  },
@@ -877,7 +877,7 @@ const gt = (e, r) => {
877
877
  x === "OTHER" && /* @__PURE__ */ t(
878
878
  Me,
879
879
  {
880
- placeholder: l(
880
+ placeholder: i(
881
881
  "discussion.report.detailsPlaceholder",
882
882
  "Please provide more details..."
883
883
  ),
@@ -891,7 +891,7 @@ const gt = (e, r) => {
891
891
  bgcolor: o.surfaceVariant,
892
892
  color: o.textPrimary,
893
893
  border: `1px solid ${o.outlineEnabledBorder}`,
894
- borderRadius: a.sm,
894
+ borderRadius: l.sm,
895
895
  boxShadow: "none",
896
896
  "&::before": { display: "none" },
897
897
  "&:focus-within": {
@@ -901,7 +901,7 @@ const gt = (e, r) => {
901
901
  }
902
902
  }
903
903
  ),
904
- /* @__PURE__ */ v(w, { sx: { display: "flex", gap: f.xs, justifyContent: "flex-end" }, children: [
904
+ /* @__PURE__ */ v(C, { sx: { display: "flex", gap: f.xs, justifyContent: "flex-end" }, children: [
905
905
  /* @__PURE__ */ t(
906
906
  ie,
907
907
  {
@@ -909,12 +909,12 @@ const gt = (e, r) => {
909
909
  onClick: F,
910
910
  sx: {
911
911
  fontSize: "1em",
912
- fontFamily: i.primary,
912
+ fontFamily: a.primary,
913
913
  color: o.textPrimary,
914
- borderRadius: a.sm,
914
+ borderRadius: l.sm,
915
915
  "&:hover": { bgcolor: `${o.textPrimary}14` }
916
916
  },
917
- children: l("common.cancel", "Cancel")
917
+ children: i("common.cancel", "Cancel")
918
918
  }
919
919
  ),
920
920
  /* @__PURE__ */ t(
@@ -926,10 +926,10 @@ const gt = (e, r) => {
926
926
  onClick: L,
927
927
  sx: {
928
928
  fontSize: "1em",
929
- fontFamily: i.primary,
929
+ fontFamily: a.primary,
930
930
  bgcolor: c,
931
931
  color: y,
932
- borderRadius: a.sm,
932
+ borderRadius: l.sm,
933
933
  "&:hover": {
934
934
  bgcolor: c,
935
935
  opacity: 0.9
@@ -940,27 +940,27 @@ const gt = (e, r) => {
940
940
  opacity: 0.4
941
941
  }
942
942
  },
943
- children: l("discussion.report.action", "Report")
943
+ children: i("discussion.report.action", "Report")
944
944
  }
945
945
  )
946
946
  ] })
947
947
  ]
948
948
  }
949
949
  ) });
950
- }, It = (e, r, s) => {
951
- const m = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - m.getTime(), l = Math.floor(n / 6e4), o = Math.floor(n / 36e5), a = Math.floor(n / 864e5);
952
- return l < 1 ? r("discussion.justNow", "Just now") : l < 60 ? r("discussion.minutesAgo", "{{count}}m ago", { count: l }) : o < 24 ? r("discussion.hoursAgo", "{{count}}h ago", { count: o }) : a < 7 ? r("discussion.daysAgo", "{{count}}d ago", { count: a }) : m.toLocaleDateString(Te(s));
953
- }, Mt = 8e3, Ne = ({
950
+ }, Mt = (e, r, s) => {
951
+ const u = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - u.getTime(), i = Math.floor(n / 6e4), o = Math.floor(n / 36e5), l = Math.floor(n / 864e5);
952
+ return i < 1 ? r("discussion.justNow", "Just now") : i < 60 ? r("discussion.minutesAgo", "{{count}}m ago", { count: i }) : o < 24 ? r("discussion.hoursAgo", "{{count}}h ago", { count: o }) : l < 7 ? r("discussion.daysAgo", "{{count}}d ago", { count: l }) : u.toLocaleDateString(Te(s));
953
+ }, Ft = 8e3, Ne = ({
954
954
  post: e,
955
955
  sdk: r,
956
956
  userIsLoggedIn: s,
957
- onSignInClick: m,
958
- showReactions: u = !0,
957
+ onSignInClick: u,
958
+ showReactions: m = !0,
959
959
  showReplies: n = !0,
960
- showReportPost: l = !0,
960
+ showReportPost: i = !0,
961
961
  onReply: o,
962
- onReact: a,
963
- onDelete: i,
962
+ onReact: l,
963
+ onDelete: a,
964
964
  onReport: f,
965
965
  isSubmitting: c,
966
966
  showModeratedPosts: y = !1,
@@ -969,18 +969,18 @@ const gt = (e, r) => {
969
969
  isNew: b = !1,
970
970
  onNewSeen: D,
971
971
  depth: g = 0,
972
- parentPostId: C,
972
+ parentPostId: w,
973
973
  onReplyCreated: F,
974
974
  onDeleteSuccess: L
975
975
  }) => {
976
976
  var te, J, ae, be;
977
- const { t: d } = he(), { shadowRootElement: I, language: ne } = ve(we), k = le(), j = pe(), M = ce(), A = ke(r, s), [de, Y] = T(!1), [P, U] = T([]), [V, q] = T(!1), [ee, G] = T(!1), [re, Q] = T(!1), [ye, Z] = T({ open: !1, variant: "success", title: "", message: "" }), ue = oe(null);
977
+ const { t: d } = he(), { shadowRootElement: I, language: ne } = ve(Ce), k = le(), j = pe(), M = ce(), A = ke(r, s), [de, Y] = T(!1), [P, U] = T([]), [V, q] = T(!1), [ee, G] = T(!1), [re, Q] = T(!1), [ye, Z] = T({ open: !1, variant: "success", title: "", message: "" }), ue = oe(null);
978
978
  fe(() => {
979
979
  if (!b || !D || !ue.current) return;
980
980
  let E;
981
981
  const O = new IntersectionObserver(
982
982
  ([$]) => {
983
- $.isIntersecting && (O.disconnect(), E = setTimeout(() => D(e.id), Mt));
983
+ $.isIntersecting && (O.disconnect(), E = setTimeout(() => D(e.id), Ft));
984
984
  },
985
985
  { threshold: 0.5 }
986
986
  );
@@ -990,7 +990,7 @@ const gt = (e, r) => {
990
990
  }, [b, D, e.id]);
991
991
  const se = !!(s && A && e.userId === A), _ = !!e.moderated, p = async (E) => {
992
992
  var N;
993
- const O = g === 1 && C || e.id, $ = ((N = e.userModel) == null ? void 0 : N.name) || e.anonymousNickname || d("discussion.anonymous", "Anonymous"), H = g === 1 ? `@${$} ${E}` : E;
993
+ const O = g === 1 && w || e.id, $ = ((N = e.userModel) == null ? void 0 : N.name) || e.anonymousNickname || d("discussion.anonymous", "Anonymous"), H = g === 1 ? `@${$} ${E}` : E;
994
994
  await o(O, H), Y(!1), g === 1 && F ? F() : g === 0 && (q(!0), S());
995
995
  }, S = async () => {
996
996
  if (!(!n || g >= 2))
@@ -1009,9 +1009,9 @@ const gt = (e, r) => {
1009
1009
  V && P.length === 0 && S();
1010
1010
  }, [V]);
1011
1011
  const h = async (E) => {
1012
- await i(E, e.id), U((O) => O.filter(($) => $.id !== E));
1012
+ await a(E, e.id), U((O) => O.filter(($) => $.id !== E));
1013
1013
  }, B = async (E, O) => {
1014
- const $ = await a(E, O);
1014
+ const $ = await l(E, O);
1015
1015
  $ && P.length > 0 && U(
1016
1016
  (H) => H.map((N) => N.id === E ? $ : N)
1017
1017
  );
@@ -1019,7 +1019,7 @@ const gt = (e, r) => {
1019
1019
  Z({ open: !0, variant: O, title: "", message: E });
1020
1020
  }, W = k.palette.primary.plainColor;
1021
1021
  return /* @__PURE__ */ v(
1022
- w,
1022
+ C,
1023
1023
  {
1024
1024
  sx: {
1025
1025
  mb: M.md,
@@ -1035,9 +1035,9 @@ const gt = (e, r) => {
1035
1035
  }
1036
1036
  },
1037
1037
  children: [
1038
- /* @__PURE__ */ v(w, { sx: { display: "flex", gap: M.sm }, children: [
1038
+ /* @__PURE__ */ v(C, { sx: { display: "flex", gap: M.sm }, children: [
1039
1039
  /* @__PURE__ */ t(
1040
- Qe,
1040
+ Ze,
1041
1041
  {
1042
1042
  src: (te = e.userModel) == null ? void 0 : te.avatar,
1043
1043
  alt: ((J = e.userModel) == null ? void 0 : J.name) || e.anonymousNickname || "User",
@@ -1045,9 +1045,9 @@ const gt = (e, r) => {
1045
1045
  sx: { bgcolor: k.surfaceVariant, color: k.textPrimary }
1046
1046
  }
1047
1047
  ),
1048
- /* @__PURE__ */ v(w, { sx: { flex: 1, minWidth: 0 }, children: [
1048
+ /* @__PURE__ */ v(C, { sx: { flex: 1, minWidth: 0 }, children: [
1049
1049
  /* @__PURE__ */ v(
1050
- w,
1050
+ C,
1051
1051
  {
1052
1052
  ref: ue,
1053
1053
  sx: {
@@ -1070,7 +1070,7 @@ const gt = (e, r) => {
1070
1070
  {
1071
1071
  level: "body-xs",
1072
1072
  sx: { fontSize: "0.75em", color: k.textSecondary },
1073
- children: It(e.createdAt, d, ne)
1073
+ children: Mt(e.createdAt, d, ne)
1074
1074
  }
1075
1075
  ),
1076
1076
  b && /* @__PURE__ */ t(
@@ -1091,10 +1091,10 @@ const gt = (e, r) => {
1091
1091
  }
1092
1092
  ),
1093
1093
  /* @__PURE__ */ t(
1094
- Dt,
1094
+ At,
1095
1095
  {
1096
1096
  isOwnPost: se,
1097
- canReport: !!(l && s && !se) && !_,
1097
+ canReport: !!(i && s && !se) && !_,
1098
1098
  onDelete: () => G(!0),
1099
1099
  onReport: () => Q(!0),
1100
1100
  disabled: x
@@ -1104,7 +1104,7 @@ const gt = (e, r) => {
1104
1104
  }
1105
1105
  ),
1106
1106
  _ && y ? /* @__PURE__ */ v(
1107
- w,
1107
+ C,
1108
1108
  {
1109
1109
  sx: {
1110
1110
  mb: M.xs,
@@ -1120,7 +1120,7 @@ const gt = (e, r) => {
1120
1120
  },
1121
1121
  children: [
1122
1122
  /* @__PURE__ */ t(
1123
- pt,
1123
+ ht,
1124
1124
  {
1125
1125
  sx: {
1126
1126
  fontSize: "0.9375em",
@@ -1162,20 +1162,20 @@ const gt = (e, r) => {
1162
1162
  }
1163
1163
  ),
1164
1164
  !_ && /* @__PURE__ */ t(
1165
- Et,
1165
+ Dt,
1166
1166
  {
1167
1167
  post: e,
1168
1168
  sdk: r,
1169
1169
  userIsLoggedIn: s,
1170
- onSignInClick: m,
1171
- onReact: a,
1172
- showReactions: u,
1170
+ onSignInClick: u,
1171
+ onReact: l,
1172
+ showReactions: m,
1173
1173
  showReplyButton: n && g < 2,
1174
1174
  onReplyClick: () => Y(!de),
1175
1175
  isBanned: x
1176
1176
  }
1177
1177
  ),
1178
- n && e.repliesCount > 0 && /* @__PURE__ */ t(w, { sx: { mb: M.xs }, children: /* @__PURE__ */ v(
1178
+ n && e.repliesCount > 0 && /* @__PURE__ */ t(C, { sx: { mb: M.xs }, children: /* @__PURE__ */ v(
1179
1179
  z,
1180
1180
  {
1181
1181
  level: "body-sm",
@@ -1197,12 +1197,12 @@ const gt = (e, r) => {
1197
1197
  ]
1198
1198
  }
1199
1199
  ) }),
1200
- de && !_ && /* @__PURE__ */ t(w, { sx: { mt: M.md }, children: /* @__PURE__ */ t(
1200
+ de && !_ && /* @__PURE__ */ t(C, { sx: { mt: M.md }, children: /* @__PURE__ */ t(
1201
1201
  Be,
1202
1202
  {
1203
1203
  onSubmit: p,
1204
1204
  userIsLoggedIn: s,
1205
- onSignInClick: m,
1205
+ onSignInClick: u,
1206
1206
  placeholder: d("discussion.writeReply", "Write a reply..."),
1207
1207
  isSubmitting: c,
1208
1208
  replyTo: ((be = e.userModel) == null ? void 0 : be.name) || e.anonymousNickname,
@@ -1210,16 +1210,16 @@ const gt = (e, r) => {
1210
1210
  disabled: x
1211
1211
  }
1212
1212
  ) }),
1213
- V && P.length > 0 && /* @__PURE__ */ t(w, { sx: { mt: M.md }, children: P.map((E) => /* @__PURE__ */ t(
1213
+ V && P.length > 0 && /* @__PURE__ */ t(C, { sx: { mt: M.md }, children: P.map((E) => /* @__PURE__ */ t(
1214
1214
  Ne,
1215
1215
  {
1216
1216
  post: E,
1217
1217
  sdk: r,
1218
1218
  userIsLoggedIn: s,
1219
- onSignInClick: m,
1220
- showReactions: u,
1219
+ onSignInClick: u,
1220
+ showReactions: m,
1221
1221
  showReplies: n,
1222
- showReportPost: l,
1222
+ showReportPost: i,
1223
1223
  onReply: o,
1224
1224
  onReact: B,
1225
1225
  onDelete: h,
@@ -1228,7 +1228,7 @@ const gt = (e, r) => {
1228
1228
  showModeratedPosts: y,
1229
1229
  isBanned: x,
1230
1230
  depth: g + 1,
1231
- parentPostId: g === 0 ? e.id : C,
1231
+ parentPostId: g === 0 ? e.id : w,
1232
1232
  onReplyCreated: g === 0 ? S : void 0,
1233
1233
  onDeleteSuccess: L
1234
1234
  },
@@ -1237,19 +1237,19 @@ const gt = (e, r) => {
1237
1237
  ] })
1238
1238
  ] }),
1239
1239
  /* @__PURE__ */ t(
1240
- At,
1240
+ zt,
1241
1241
  {
1242
1242
  open: ee,
1243
1243
  onClose: () => G(!1),
1244
1244
  onConfirm: async () => {
1245
- await i(e.id), L == null || L();
1245
+ await a(e.id), L == null || L();
1246
1246
  },
1247
1247
  onError: (E) => K(E, "error"),
1248
1248
  container: I
1249
1249
  }
1250
1250
  ),
1251
1251
  /* @__PURE__ */ t(
1252
- Tt,
1252
+ It,
1253
1253
  {
1254
1254
  open: re,
1255
1255
  onClose: () => Q(!1),
@@ -1269,21 +1269,21 @@ const gt = (e, r) => {
1269
1269
  ]
1270
1270
  }
1271
1271
  );
1272
- }, Ce = 864e5, ze = -1, Ft = ({
1272
+ }, we = 864e5, ze = -1, $t = ({
1273
1273
  ban: e,
1274
1274
  showBanHistory: r = !1
1275
1275
  }) => {
1276
- const { t: s } = he(), { language: m } = ve(we), u = le(), n = pe(), l = Re(), o = ce(), [a, i] = T(!1), f = u.palette.danger.plainColor, c = Te(m), y = (d) => new Date(d).toLocaleDateString(c, { dateStyle: "medium" }), x = (d) => new Date(d).toLocaleString(c, {
1276
+ const { t: s } = he(), { language: u } = ve(Ce), m = le(), n = pe(), i = Re(), o = ce(), [l, a] = T(!1), f = m.palette.danger.plainColor, c = Te(u), y = (d) => new Date(d).toLocaleDateString(c, { dateStyle: "medium" }), x = (d) => new Date(d).toLocaleString(c, {
1277
1277
  dateStyle: "medium",
1278
1278
  timeStyle: "short"
1279
1279
  }), { activeBan: R } = e, b = R.bannedPeriodInDays === ze, D = new Date(
1280
- new Date(R.bannedAt).getTime() + R.bannedPeriodInDays * Ce
1280
+ new Date(R.bannedAt).getTime() + R.bannedPeriodInDays * we
1281
1281
  ), g = Math.max(
1282
1282
  1,
1283
- Math.ceil((D.getTime() - Date.now()) / Ce)
1284
- ), C = (e.history || []).filter(
1283
+ Math.ceil((D.getTime() - Date.now()) / we)
1284
+ ), w = (e.history || []).filter(
1285
1285
  (d) => d.bannedAt !== R.bannedAt
1286
- ), F = { fontSize: "0.8125em", color: u.textSecondary }, L = {
1286
+ ), F = { fontSize: "0.8125em", color: m.textSecondary }, L = {
1287
1287
  fontSize: "0.75em",
1288
1288
  fontWeight: 600,
1289
1289
  color: f,
@@ -1293,24 +1293,24 @@ const gt = (e, r) => {
1293
1293
  py: "0.125em"
1294
1294
  };
1295
1295
  return /* @__PURE__ */ t(
1296
- w,
1296
+ C,
1297
1297
  {
1298
1298
  role: "status",
1299
1299
  sx: {
1300
1300
  fontSize: "1em",
1301
1301
  mb: o.sm,
1302
1302
  p: o.md,
1303
- bgcolor: u.palette.danger.softBg,
1303
+ bgcolor: m.palette.danger.softBg,
1304
1304
  borderLeft: `4px solid ${f}`,
1305
1305
  borderRadius: n.sm
1306
1306
  },
1307
1307
  children: /* @__PURE__ */ v(
1308
- w,
1308
+ C,
1309
1309
  {
1310
1310
  sx: { display: "flex", gap: o.sm, alignItems: "flex-start" },
1311
1311
  children: [
1312
1312
  /* @__PURE__ */ t(
1313
- w,
1313
+ C,
1314
1314
  {
1315
1315
  sx: {
1316
1316
  flexShrink: 0,
@@ -1323,10 +1323,10 @@ const gt = (e, r) => {
1323
1323
  bgcolor: `${f}1F`,
1324
1324
  color: f
1325
1325
  },
1326
- children: /* @__PURE__ */ t(ht, { sx: { fontSize: "1.25em" } })
1326
+ children: /* @__PURE__ */ t(yt, { sx: { fontSize: "1.25em" } })
1327
1327
  }
1328
1328
  ),
1329
- /* @__PURE__ */ v(w, { sx: { flex: 1, minWidth: 0 }, children: [
1329
+ /* @__PURE__ */ v(C, { sx: { flex: 1, minWidth: 0 }, children: [
1330
1330
  /* @__PURE__ */ t(
1331
1331
  z,
1332
1332
  {
@@ -1334,8 +1334,8 @@ const gt = (e, r) => {
1334
1334
  sx: {
1335
1335
  fontSize: "1em",
1336
1336
  fontWeight: 700,
1337
- fontFamily: l.primary,
1338
- color: u.textPrimary
1337
+ fontFamily: i.primary,
1338
+ color: m.textPrimary
1339
1339
  },
1340
1340
  children: s("discussion.ban.title", "You've been banned from commenting")
1341
1341
  }
@@ -1346,7 +1346,7 @@ const gt = (e, r) => {
1346
1346
  level: "body-sm",
1347
1347
  sx: {
1348
1348
  fontSize: "0.875em",
1349
- color: u.textBody,
1349
+ color: m.textBody,
1350
1350
  mt: o["2xs"]
1351
1351
  },
1352
1352
  children: b ? s(
@@ -1359,7 +1359,7 @@ const gt = (e, r) => {
1359
1359
  }
1360
1360
  ),
1361
1361
  /* @__PURE__ */ v(
1362
- w,
1362
+ C,
1363
1363
  {
1364
1364
  sx: {
1365
1365
  display: "flex",
@@ -1386,13 +1386,13 @@ const gt = (e, r) => {
1386
1386
  }
1387
1387
  ),
1388
1388
  R.bannedReason && /* @__PURE__ */ v(
1389
- w,
1389
+ C,
1390
1390
  {
1391
1391
  sx: {
1392
1392
  mt: o.sm,
1393
1393
  px: o.sm,
1394
1394
  py: o.xs,
1395
- bgcolor: u.surface,
1395
+ bgcolor: m.surface,
1396
1396
  borderRadius: n.xs
1397
1397
  },
1398
1398
  children: [
@@ -1404,7 +1404,7 @@ const gt = (e, r) => {
1404
1404
  fontSize: "0.75em",
1405
1405
  fontWeight: 600,
1406
1406
  textTransform: "uppercase",
1407
- color: u.textSecondary
1407
+ color: m.textSecondary
1408
1408
  },
1409
1409
  children: s("discussion.ban.reason", "Reason")
1410
1410
  }
@@ -1415,7 +1415,7 @@ const gt = (e, r) => {
1415
1415
  level: "body-sm",
1416
1416
  sx: {
1417
1417
  fontSize: "0.875em",
1418
- color: u.textPrimary,
1418
+ color: m.textPrimary,
1419
1419
  whiteSpace: "pre-wrap",
1420
1420
  unicodeBidi: "plaintext"
1421
1421
  },
@@ -1425,19 +1425,19 @@ const gt = (e, r) => {
1425
1425
  ]
1426
1426
  }
1427
1427
  ),
1428
- r && C.length > 0 && /* @__PURE__ */ v(w, { sx: { mt: o.sm }, children: [
1428
+ r && w.length > 0 && /* @__PURE__ */ v(C, { sx: { mt: o.sm }, children: [
1429
1429
  /* @__PURE__ */ v(
1430
1430
  z,
1431
1431
  {
1432
1432
  component: "button",
1433
1433
  type: "button",
1434
- "aria-expanded": a,
1435
- onClick: () => i((d) => !d),
1434
+ "aria-expanded": l,
1435
+ onClick: () => a((d) => !d),
1436
1436
  sx: {
1437
1437
  fontSize: "0.8125em",
1438
1438
  fontWeight: 600,
1439
- fontFamily: l.primary,
1440
- color: u.textPrimary,
1439
+ fontFamily: i.primary,
1440
+ color: m.textPrimary,
1441
1441
  display: "inline-flex",
1442
1442
  alignItems: "center",
1443
1443
  gap: o["2xs"],
@@ -1448,32 +1448,32 @@ const gt = (e, r) => {
1448
1448
  },
1449
1449
  children: [
1450
1450
  s("discussion.ban.previousBans", "Previous bans ({{count}})", {
1451
- count: C.length
1451
+ count: w.length
1452
1452
  }),
1453
1453
  /* @__PURE__ */ t(
1454
- yt,
1454
+ xt,
1455
1455
  {
1456
1456
  sx: {
1457
1457
  fontSize: "1.25em",
1458
1458
  transition: "transform 0.2s",
1459
- transform: a ? "rotate(180deg)" : "none"
1459
+ transform: l ? "rotate(180deg)" : "none"
1460
1460
  }
1461
1461
  }
1462
1462
  )
1463
1463
  ]
1464
1464
  }
1465
1465
  ),
1466
- a && /* @__PURE__ */ t(
1467
- w,
1466
+ l && /* @__PURE__ */ t(
1467
+ C,
1468
1468
  {
1469
1469
  component: "ul",
1470
1470
  sx: { listStyle: "none", m: 0, p: 0, mt: o.xs },
1471
- children: C.map((d) => {
1471
+ children: w.map((d) => {
1472
1472
  const I = d.unbannedAt ?? (d.bannedPeriodInDays > 0 ? new Date(
1473
- new Date(d.bannedAt).getTime() + d.bannedPeriodInDays * Ce
1473
+ new Date(d.bannedAt).getTime() + d.bannedPeriodInDays * we
1474
1474
  ) : null);
1475
1475
  return /* @__PURE__ */ v(
1476
- w,
1476
+ C,
1477
1477
  {
1478
1478
  component: "li",
1479
1479
  sx: {
@@ -1487,7 +1487,7 @@ const gt = (e, r) => {
1487
1487
  sx: {
1488
1488
  ...F,
1489
1489
  fontWeight: 600,
1490
- color: u.textPrimary
1490
+ color: m.textPrimary
1491
1491
  },
1492
1492
  children: [
1493
1493
  y(d.bannedAt),
@@ -1511,7 +1511,7 @@ const gt = (e, r) => {
1511
1511
  d.unbannedReason && /* @__PURE__ */ v(Se, { children: [
1512
1512
  ": ",
1513
1513
  /* @__PURE__ */ t(
1514
- w,
1514
+ C,
1515
1515
  {
1516
1516
  component: "span",
1517
1517
  sx: { unicodeBidi: "isolate" },
@@ -1534,20 +1534,20 @@ const gt = (e, r) => {
1534
1534
  )
1535
1535
  }
1536
1536
  );
1537
- }, $t = (e) => {
1538
- var r, s, m;
1539
- return (((r = e == null ? void 0 : e.error) == null ? void 0 : r.code) ?? ((m = (s = e == null ? void 0 : e.data) == null ? void 0 : s.error) == null ? void 0 : m.code) ?? (e == null ? void 0 : e.status)) === 429;
1540
- }, Lt = ({
1537
+ }, Lt = (e) => {
1538
+ var r, s, u;
1539
+ return (((r = e == null ? void 0 : e.error) == null ? void 0 : r.code) ?? ((u = (s = e == null ? void 0 : e.data) == null ? void 0 : s.error) == null ? void 0 : u.code) ?? (e == null ? void 0 : e.status)) === 429;
1540
+ }, Bt = ({
1541
1541
  discussion: e,
1542
1542
  posts: r,
1543
1543
  postsHidden: s = !1,
1544
- sdk: m,
1545
- userIsLoggedIn: u,
1544
+ sdk: u,
1545
+ userIsLoggedIn: m,
1546
1546
  onSignInClick: n,
1547
- showReactions: l,
1547
+ showReactions: i,
1548
1548
  showReplies: o,
1549
- showReportPost: a,
1550
- currentSort: i,
1549
+ showReportPost: l,
1550
+ currentSort: a,
1551
1551
  onSortChange: f,
1552
1552
  onCreatePost: c,
1553
1553
  onReact: y,
@@ -1556,7 +1556,7 @@ const gt = (e, r) => {
1556
1556
  onLoadMore: b,
1557
1557
  hasMore: D,
1558
1558
  liveRefresh: g = !1,
1559
- newPostIds: C,
1559
+ newPostIds: w,
1560
1560
  onNewPostSeen: F,
1561
1561
  isLoading: L,
1562
1562
  isSubmitting: d,
@@ -1566,7 +1566,7 @@ const gt = (e, r) => {
1566
1566
  isBanned: j = !1,
1567
1567
  showBanHistory: M = !1
1568
1568
  }) => {
1569
- const { t: A } = he(), { shadowRootElement: de } = ve(we), Y = pe(), P = le(), U = ce(), V = oe(null), q = oe(null);
1569
+ const { t: A } = he(), { shadowRootElement: de } = ve(Ce), Y = pe(), P = le(), U = ce(), V = oe(null), q = oe(null);
1570
1570
  fe(() => {
1571
1571
  if (!I || !q.current) return;
1572
1572
  const p = new IntersectionObserver(
@@ -1589,7 +1589,7 @@ const gt = (e, r) => {
1589
1589
  open: !0,
1590
1590
  variant: "error",
1591
1591
  title: "",
1592
- message: $t(p) ? A(
1592
+ message: Lt(p) ? A(
1593
1593
  "discussion.rateLimited",
1594
1594
  "You're doing that too often. Please wait a moment and try again."
1595
1595
  ) : S
@@ -1655,7 +1655,7 @@ const gt = (e, r) => {
1655
1655
  }
1656
1656
  };
1657
1657
  return /* @__PURE__ */ v(
1658
- w,
1658
+ C,
1659
1659
  {
1660
1660
  ref: V,
1661
1661
  sx: {
@@ -1665,27 +1665,27 @@ const gt = (e, r) => {
1665
1665
  bgcolor: P.surface
1666
1666
  },
1667
1667
  children: [
1668
- /* @__PURE__ */ v(w, { sx: { mb: U.lg }, children: [
1668
+ /* @__PURE__ */ v(C, { sx: { mb: U.lg }, children: [
1669
1669
  /* @__PURE__ */ t(z, { level: "h3", sx: { fontSize: "1.5em", mb: U.xs }, children: e.label || A("discussion.title", "Discussion") }),
1670
1670
  !s && /* @__PURE__ */ t(z, { level: "body-sm", sx: { fontSize: "0.875em", color: P.textSecondary }, children: A("discussion.postsCount", "{{count}} posts", {
1671
1671
  count: e.postsCount || 0
1672
1672
  }) })
1673
1673
  ] }),
1674
- j && k && /* @__PURE__ */ t(Ft, { ban: k, showBanHistory: M }),
1674
+ j && k && /* @__PURE__ */ t($t, { ban: k, showBanHistory: M }),
1675
1675
  /* @__PURE__ */ t(
1676
1676
  Be,
1677
1677
  {
1678
1678
  onSubmit: (p) => Z(p),
1679
- userIsLoggedIn: u,
1679
+ userIsLoggedIn: m,
1680
1680
  onSignInClick: n,
1681
1681
  isSubmitting: d,
1682
1682
  disabled: j
1683
1683
  }
1684
1684
  ),
1685
1685
  !s && /* @__PURE__ */ v(Se, { children: [
1686
- /* @__PURE__ */ t(Ze, { sx: { my: U.lg } }),
1686
+ /* @__PURE__ */ t(et, { sx: { my: U.lg } }),
1687
1687
  /* @__PURE__ */ v(
1688
- w,
1688
+ C,
1689
1689
  {
1690
1690
  sx: {
1691
1691
  mb: U.lg,
@@ -1696,9 +1696,9 @@ const gt = (e, r) => {
1696
1696
  children: [
1697
1697
  /* @__PURE__ */ t(z, { level: "title-md", sx: { fontSize: "1em" }, children: A("discussion.comments", "Comments") }),
1698
1698
  /* @__PURE__ */ t(
1699
- et,
1699
+ tt,
1700
1700
  {
1701
- value: i,
1701
+ value: a,
1702
1702
  onChange: (p, S) => S && f(S),
1703
1703
  size: "sm",
1704
1704
  sx: {
@@ -1715,26 +1715,26 @@ const gt = (e, r) => {
1715
1715
  }
1716
1716
  },
1717
1717
  slotProps: se,
1718
- children: ue.map((p) => /* @__PURE__ */ t(tt, { value: p.value, sx: _, children: p.label }, p.value))
1718
+ children: ue.map((p) => /* @__PURE__ */ t(ot, { value: p.value, sx: _, children: p.label }, p.value))
1719
1719
  }
1720
1720
  )
1721
1721
  ]
1722
1722
  }
1723
1723
  ),
1724
- L && r.length === 0 ? /* @__PURE__ */ t(w, { sx: { py: U.xl }, children: /* @__PURE__ */ t(Pe, { my: 4 }) }) : r.length === 0 ? /* @__PURE__ */ t(w, { sx: { textAlign: "center", py: U.xl }, children: /* @__PURE__ */ t(z, { level: "body-md", sx: { fontSize: "1em", color: P.textSecondary }, children: A(
1724
+ L && r.length === 0 ? /* @__PURE__ */ t(C, { sx: { py: U.xl }, children: /* @__PURE__ */ t(Pe, { my: 4 }) }) : r.length === 0 ? /* @__PURE__ */ t(C, { sx: { textAlign: "center", py: U.xl }, children: /* @__PURE__ */ t(z, { level: "body-md", sx: { fontSize: "1em", color: P.textSecondary }, children: A(
1725
1725
  "discussion.noPosts",
1726
1726
  "No comments yet. Be the first to comment!"
1727
1727
  ) }) }) : /* @__PURE__ */ v(Se, { children: [
1728
- /* @__PURE__ */ t(w, { children: r.map((p) => /* @__PURE__ */ t(
1728
+ /* @__PURE__ */ t(C, { children: r.map((p) => /* @__PURE__ */ t(
1729
1729
  Ne,
1730
1730
  {
1731
1731
  post: p,
1732
- sdk: m,
1733
- userIsLoggedIn: u,
1732
+ sdk: u,
1733
+ userIsLoggedIn: m,
1734
1734
  onSignInClick: n,
1735
- showReactions: l,
1735
+ showReactions: i,
1736
1736
  showReplies: o,
1737
- showReportPost: a,
1737
+ showReportPost: l,
1738
1738
  onReply: (S, h) => Z(h, S),
1739
1739
  onReact: ye,
1740
1740
  onDelete: x,
@@ -1743,16 +1743,16 @@ const gt = (e, r) => {
1743
1743
  showModeratedPosts: ne,
1744
1744
  isBanned: j,
1745
1745
  highlightable: g,
1746
- isNew: C == null ? void 0 : C.has(p.id),
1746
+ isNew: w == null ? void 0 : w.has(p.id),
1747
1747
  onNewSeen: F,
1748
1748
  onDeleteSuccess: re
1749
1749
  },
1750
1750
  p.id
1751
1751
  )) }),
1752
- I && /* @__PURE__ */ t(w, { ref: q, sx: { height: 1 } })
1752
+ I && /* @__PURE__ */ t(C, { ref: q, sx: { height: 1 } })
1753
1753
  ] }),
1754
- I && L && r.length > 0 && /* @__PURE__ */ t(w, { sx: { py: U.md }, children: /* @__PURE__ */ t(Pe, { my: 2 }) }),
1755
- !I && D && /* @__PURE__ */ t(w, { sx: { display: "flex", justifyContent: "center", mt: U.lg }, children: /* @__PURE__ */ t(
1754
+ I && L && r.length > 0 && /* @__PURE__ */ t(C, { sx: { py: U.md }, children: /* @__PURE__ */ t(Pe, { my: 2 }) }),
1755
+ !I && D && /* @__PURE__ */ t(C, { sx: { display: "flex", justifyContent: "center", mt: U.lg }, children: /* @__PURE__ */ t(
1756
1756
  ie,
1757
1757
  {
1758
1758
  variant: "outlined",
@@ -1788,30 +1788,30 @@ const gt = (e, r) => {
1788
1788
  ]
1789
1789
  }
1790
1790
  );
1791
- }, Bt = (e) => {
1791
+ }, kt = (e) => {
1792
1792
  const {
1793
1793
  entityId: r,
1794
1794
  sdk: s,
1795
- discussionLabel: m,
1796
- discussionUrl: u = "",
1795
+ discussionLabel: u,
1796
+ discussionUrl: m = "",
1797
1797
  defaultSort: n = "LATEST",
1798
- postsPerPage: l = 20,
1798
+ postsPerPage: i = 20,
1799
1799
  showReactions: o = !0,
1800
- showReplies: a = !0,
1801
- showReportPost: i = !0,
1800
+ showReplies: l = !0,
1801
+ showReportPost: a = !0,
1802
1802
  infiniteScroll: f = !1,
1803
1803
  showModeratedPosts: c = !1,
1804
1804
  userIsLoggedIn: y = !1,
1805
1805
  showBanHistory: x = !1,
1806
1806
  refreshInterval: R = 0,
1807
1807
  onSignInClick: b
1808
- } = e, { ban: D, isBanned: g, refresh: C } = Ct(s, y), {
1808
+ } = e, { ban: D, isBanned: g, refresh: w } = Pt(s, y), {
1809
1809
  discussion: F,
1810
1810
  setDiscussion: L,
1811
1811
  isLoading: d,
1812
1812
  error: I,
1813
1813
  isNotFound: ne
1814
- } = gt(s, r), k = (se) => {
1814
+ } = St(s, r), k = (se) => {
1815
1815
  L(
1816
1816
  (_) => _ && { ..._, postsCount: Math.max(0, _.postsCount + se) }
1817
1817
  );
@@ -1830,13 +1830,13 @@ const gt = (e, r) => {
1830
1830
  handleReact: re,
1831
1831
  handleDeletePost: Q,
1832
1832
  handleReportPost: ye
1833
- } = vt(
1833
+ } = Ct(
1834
1834
  s,
1835
1835
  r,
1836
- m || null,
1837
- u,
1836
+ u || null,
1837
+ m,
1838
1838
  n,
1839
- l,
1839
+ i,
1840
1840
  k,
1841
1841
  c,
1842
1842
  R
@@ -1844,7 +1844,7 @@ const gt = (e, r) => {
1844
1844
  try {
1845
1845
  return await se(..._);
1846
1846
  } catch (p) {
1847
- throw Le(p) && C(), p;
1847
+ throw Le(p) && w(), p;
1848
1848
  }
1849
1849
  };
1850
1850
  if (d || !F && !ne && A)
@@ -1860,7 +1860,7 @@ const gt = (e, r) => {
1860
1860
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1861
1861
  };
1862
1862
  return /* @__PURE__ */ t(
1863
- Lt,
1863
+ Bt,
1864
1864
  {
1865
1865
  discussion: ue,
1866
1866
  posts: j,
@@ -1869,8 +1869,8 @@ const gt = (e, r) => {
1869
1869
  userIsLoggedIn: y,
1870
1870
  onSignInClick: b,
1871
1871
  showReactions: o,
1872
- showReplies: a,
1873
- showReportPost: i,
1872
+ showReplies: l,
1873
+ showReportPost: a,
1874
1874
  currentSort: Y,
1875
1875
  onSortChange: q,
1876
1876
  onCreatePost: Z(G),
@@ -1891,59 +1891,60 @@ const gt = (e, r) => {
1891
1891
  showBanHistory: x
1892
1892
  }
1893
1893
  );
1894
- }, kt = (e) => {
1895
- const [r, s] = X.useState(!1), [m, u] = X.useState(!1), n = Oe(e.language), l = X.useRef(
1894
+ }, Nt = (e) => {
1895
+ const [r, s] = X.useState(!1), [u, m] = X.useState(!1), n = Ke(e.language), i = X.useRef(
1896
1896
  `$discussion-shadow-root-${Math.random().toString(36).substring(2, 11)}`
1897
- ), o = X.useRef(null), a = X.useRef(null), i = X.useRef(null), [f, c] = X.useState(null);
1897
+ ), o = X.useRef(null), l = X.useRef(null), a = X.useRef(null), [f, c] = X.useState(null);
1898
1898
  X.useEffect(() => {
1899
- Ke(e.language || "en").finally(() => u(!0));
1899
+ We(e.language || "en").finally(() => m(!0));
1900
1900
  }, [e.language]), X.useEffect(() => {
1901
1901
  if (!o.current) return;
1902
- o.current.shadowRoot ? (a.current = o.current.shadowRoot, i.current = a.current.getElementById(
1903
- l.current
1904
- ), i.current || (i.current = document.createElement("div"), i.current.id = l.current, i.current.style.height = "100%", a.current.appendChild(i.current))) : (a.current = o.current.attachShadow({ mode: "open" }), i.current = document.createElement("div"), i.current.id = l.current, i.current.style.height = "100%", a.current.appendChild(i.current)), We(i.current, n);
1905
- const b = He("discussion", n);
1902
+ o.current.shadowRoot ? (l.current = o.current.shadowRoot, a.current = l.current.getElementById(
1903
+ i.current
1904
+ ), a.current || (a.current = document.createElement("div"), a.current.id = i.current, a.current.style.height = "100%", l.current.appendChild(a.current))) : (l.current = o.current.attachShadow({ mode: "open" }), a.current = document.createElement("div"), a.current.id = i.current, a.current.style.height = "100%", l.current.appendChild(a.current)), He(a.current, n);
1905
+ const b = Ue("discussion", n);
1906
1906
  return c(
1907
- (D) => (D == null ? void 0 : D.key) === b ? D : Ue(
1907
+ (D) => (D == null ? void 0 : D.key) === b ? D : Ve(
1908
1908
  "discussion",
1909
- a.current,
1909
+ l.current,
1910
1910
  n
1911
1911
  )
1912
1912
  ), s(!0), () => {
1913
1913
  s(!1);
1914
1914
  };
1915
1915
  }, [n]);
1916
- const y = e.themeOptions, x = /* @__PURE__ */ t(w, { ref: o, lang: e.language || "en", sx: { height: "100%", display: "block" } }), R = r && m && i.current && f ? bt(
1916
+ const y = e.themeOptions, x = /* @__PURE__ */ t(C, { ref: o, lang: e.language || "en", sx: { height: "100%", display: "block" } }), R = r && u && a.current && f ? gt(
1917
1917
  // Keyed on the cache, not on `direction`: it must change in the same
1918
1918
  // render that adopts the new cache, or CssVarsProvider writes its CSS
1919
1919
  // variables into the outgoing cache and never repeats.
1920
- /* @__PURE__ */ t(xt, { value: f, children: /* @__PURE__ */ t(Ve, { containerRef: o, children: /* @__PURE__ */ t(
1921
- _e,
1920
+ /* @__PURE__ */ t(bt, { value: f, children: /* @__PURE__ */ t(_e, { containerRef: o, children: /* @__PURE__ */ t(
1921
+ je,
1922
1922
  {
1923
1923
  customTheme: y,
1924
1924
  mode: y == null ? void 0 : y.mode,
1925
- shadowRootElement: i.current,
1925
+ shadowRootElement: a.current,
1926
1926
  direction: n,
1927
1927
  children: /* @__PURE__ */ t(
1928
- je,
1928
+ Ye,
1929
1929
  {
1930
- shadowRootElement: i.current,
1930
+ shadowRootElement: a.current,
1931
1931
  leadPhoneCountryCode: null,
1932
1932
  language: e.language,
1933
1933
  optionsLayout: null,
1934
1934
  direction: n,
1935
+ disableCache: e.disableCache ?? !1,
1935
1936
  children: e.children
1936
1937
  }
1937
1938
  )
1938
1939
  }
1939
1940
  ) }) }, f.key),
1940
- i.current
1941
+ a.current
1941
1942
  ) : null;
1942
1943
  return /* @__PURE__ */ v(Se, { children: [
1943
1944
  x,
1944
1945
  R
1945
1946
  ] });
1946
- }, jt = (e) => /* @__PURE__ */ t(kt, { ...e, children: /* @__PURE__ */ t(Bt, { ...e }) });
1947
+ }, Yt = (e) => /* @__PURE__ */ t(Nt, { ...e, children: /* @__PURE__ */ t(kt, { ...e }) });
1947
1948
  export {
1948
- jt as M
1949
+ Yt as M
1949
1950
  };