fansunited-frontend-components 0.0.69 → 0.0.71

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 (95) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +529 -520
  3. package/ClassicQuizPlay.js +1725 -1458
  4. package/CollectLead.js +141 -141
  5. package/Discussion.js +1 -1
  6. package/EitherOrPlay.js +1524 -1331
  7. package/EventCard.js +3001 -1848
  8. package/EventGamePlay.js +2023 -1742
  9. package/Leaderboard.js +367 -357
  10. package/MatchQuizPlay.js +2936 -2649
  11. package/PersonalityQuizPlay.js +1395 -1119
  12. package/PickThePair.js +481 -472
  13. package/PlayerOfTheMatch.js +235 -234
  14. package/PollVote.js +1318 -1036
  15. package/Predictor.js +4383 -4390
  16. package/README.md +110 -4
  17. package/Standings.js +652 -643
  18. package/TopX.js +2646 -2645
  19. package/chunks/{AccessTime-7cim24ED.js → AccessTime-BkHriW4j.js} +1 -1
  20. package/chunks/{AlertMessage-X4MQ4qsN.js → AlertMessage-DwSmhmHt.js} +11 -11
  21. package/chunks/{Avatar-RBMU1Gkk.js → Avatar-CEbT4X-o.js} +22 -22
  22. package/chunks/{Button-GawVOPKi.js → Button-CO-k2gLb.js} +3 -3
  23. package/chunks/{Card--xcz3SKi.js → Card-DZdPl8-h.js} +7 -7
  24. package/chunks/{CardActions-CPwvcLGp.js → CardActions-DTThyeLX.js} +20 -20
  25. package/chunks/{CardContent-Ew6fr-KR.js → CardContent-CzC1EwoD.js} +14 -14
  26. package/chunks/{ChanceGameEmbedVariant-Dio4ihOd.js → ChanceGameEmbedVariant-CteJ4tix.js} +309 -195
  27. package/chunks/{CheckCircle-DgKcR_no.js → CheckCircle-BzM-2e1z.js} +1 -1
  28. package/chunks/{Chip-CYpaygnD.js → Chip-BF1FXK0I.js} +15 -15
  29. package/chunks/{Close-CdJNGcLx.js → Close-BiMLcNyG.js} +1 -1
  30. package/chunks/{Close-D2mtuGDo.js → Close-CggU6Ga3.js} +1 -1
  31. package/chunks/{CollectLeadForm-D0P_JHmT.js → CollectLeadForm-BZj-9IDt.js} +1389 -1463
  32. package/chunks/ConsentsList-CtKgLYa8.js +339 -0
  33. package/chunks/DirectionScope-BGDPaR6B.js +24 -0
  34. package/chunks/{Divider-DcW0V71y.js → Divider-Dueyhj7K.js} +8 -8
  35. package/chunks/{Edit-Bcj6J4rt.js → Edit-Dqa7th_A.js} +3 -3
  36. package/chunks/EditOutlined-B__rjTwX.js +14 -0
  37. package/chunks/{EmojiEvents-g001ss_z.js → EmojiEvents-CpsA2Qo0.js} +1 -1
  38. package/chunks/{FavoriteBorder-Lr6swB6-.js → FavoriteBorder-DrC_eOCd.js} +1 -1
  39. package/chunks/{FormControl-BKlK7WPd.js → FormControl-fKyT2Mql.js} +34 -33
  40. package/chunks/{FormControlContext-B2HqeXgq.js → FormControlContext-CSrMcHcv.js} +11 -11
  41. package/chunks/{FormLabel-C47pX5hN.js → FormLabel-DlXT5RZd.js} +22 -25
  42. package/chunks/{InlineSpinner-Imz27zb2.js → InlineSpinner-CuisRY-E.js} +2 -2
  43. package/chunks/{Input-nS_KO1Bu.js → Input-CkSIGH-d.js} +15 -15
  44. package/chunks/{KeyboardArrowDown-CyZAOE-W.js → KeyboardArrowDown-DL8VjkJT.js} +1 -1
  45. package/chunks/{KeyboardArrowRight-FI0kqwO1.js → KeyboardArrowRight-Cm50UqHb.js} +1 -1
  46. package/chunks/{Link-DKU7kDL8.js → Link-BljMbRuR.js} +13 -13
  47. package/chunks/{ListItemButton-CPVIEVpf.js → ListItemButton-BqEcbBU0.js} +50 -50
  48. package/chunks/{ModalDialog-DDx8wQa3.js → ModalDialog-B0DLv5vW.js} +59 -59
  49. package/chunks/{NotFoundSkeleton-CJZIRj5-.js → NotFoundSkeleton-DKxLhOwI.js} +149 -125
  50. package/chunks/{Notification-BvVfrrB3.js → Notification-CEdU0opQ.js} +18 -18
  51. package/chunks/{OverlayScoreStateSkeleton-CAhCAjkS.js → OverlayScoreStateSkeleton-BtCy650g.js} +18 -12
  52. package/chunks/{ArrowRightAlt-DrBMgptf.js → OverlayScoreStateWrapperSkeleton-Ch_E6KQ6.js} +18 -21
  53. package/chunks/OverlaySignInSkeleton-DEiH7fmp.js +517 -0
  54. package/chunks/{Person-DB_bEPcg.js → Person-CLQl7Sxs.js} +1 -1
  55. package/chunks/{PersonOutline-BAOtfb1t.js → PersonOutline-D8yrpbw7.js} +1 -1
  56. package/chunks/{PickOneOfX-Dp6fzXJn.js → PickOneOfX-CG0B5u7Y.js} +3 -3
  57. package/chunks/{Popper-Bpy7eYt-.js → Popper-BSnc2Lit.js} +58 -58
  58. package/chunks/Portal-D8t1Jd5e.js +65 -0
  59. package/chunks/{Portal-Dvh4m8kk.js → Portal-cK515D9M.js} +4 -4
  60. package/chunks/{PrizeCard-CXjFADAN.js → PrizeCard-CyVJJLo1.js} +6295 -4346
  61. package/chunks/{Search-uVJw-NhK.js → Search-BXhhax8M.js} +1 -1
  62. package/chunks/{Select-BeixD4Vw.js → Select-DyRdhrMr.js} +61 -61
  63. package/chunks/{Sheet-vOgATocO.js → Sheet-sYNAL7gX.js} +14 -14
  64. package/chunks/{Spinner-C219bcnm.js → Spinner-Bb4eb64F.js} +2 -2
  65. package/chunks/SplitSignInSkeleton-BZT0ngoW.js +150 -0
  66. package/chunks/{Stack-JIDLCVx0.js → Stack-DX41loGb.js} +21 -21
  67. package/chunks/{StandardContentSkeleton-DsGBNMHN.js → StandardContentSkeleton-DAh7l7cd.js} +12 -12
  68. package/chunks/{Table-Cx7htUDp.js → Table-C09wF6nK.js} +8 -8
  69. package/chunks/{Tabs-CIJK8YZY.js → Tabs-Dhih1Lqb.js} +46 -46
  70. package/chunks/{Textarea-KSwIUuq8.js → Textarea-DWyUKbVv.js} +184 -244
  71. package/chunks/{TimerOutlined-BUL4BZFp.js → TimerOutlined-DeWQFv5g.js} +1 -1
  72. package/chunks/{Tooltip-DrP2vx9i.js → Tooltip-Dnj_oxHb.js} +55 -55
  73. package/chunks/{Typography-DFdgIDQS.js → Typography-B8CtvKkm.js} +1 -1
  74. package/chunks/{dividerClasses-BtSFa36Z.js → dividerClasses-BoOrlu7X.js} +1 -1
  75. package/chunks/{elementAcceptingRef-CZFKGdxR.js → elementAcceptingRef-DROQPsxj.js} +1 -1
  76. package/chunks/formLabelClasses-Bh4Fh0fk.js +9 -0
  77. package/chunks/{helpers-D8cWUfGf.js → helpers-DgUDSfd1.js} +14 -12
  78. package/chunks/{index-DZqXLvFO.js → index-C_R74meU.js} +69 -72
  79. package/chunks/index-PC-q6Shn.js +4 -0
  80. package/chunks/{main-C05CZWMa.js → main-5c5yYsj9.js} +973 -963
  81. package/chunks/{main-CHr45Z4W.js → main-BXu1mzLz.js} +157 -157
  82. package/chunks/{useButton-tjUHKc-B.js → useButton-CQ2o2nXk.js} +2 -2
  83. package/chunks/useConsents-CIhPZNel.js +1165 -0
  84. package/chunks/{useEventCallback-BFPi8YtI.js → useEventCallback-B1ahtq-a.js} +1 -1
  85. package/chunks/{useForwardedInput-VvmRv9KU.js → useForwardedInput-DRXHXEOw.js} +22 -22
  86. package/chunks/{useImageVariant-Cs6lWUs2.js → useImageVariant-D6aho5sy.js} +1 -1
  87. package/chunks/useSwitch-CYz8kkTr.js +65 -0
  88. package/index.js +3 -3
  89. package/package.json +2 -2
  90. package/chunks/EditOutlined-PCc4gafz.js +0 -11
  91. package/chunks/OverlayApiErrorSkeleton-JMWA0FV8.js +0 -731
  92. package/chunks/OverlayLeadAfterCollection-BwF9MvIB.js +0 -678
  93. package/chunks/Portal-bNE7Trh9.js +0 -55
  94. package/chunks/SplitLeadAfterCollection-BijLacCk.js +0 -236
  95. package/chunks/index-JDeYpSi1.js +0 -4
package/Leaderboard.js CHANGED
@@ -1,26 +1,27 @@
1
- import { jsxs as R, jsx as i, Fragment as se } from "react/jsx-runtime";
2
- import M, { useState as B, useEffect as Q, useCallback as pe, useMemo as _ } from "react";
3
- import { u as D, g as fe, C as me, q as he, b as X, c as ce, d as O, f as G, B as L, a as de, k as ge, n as be, y as ye, z as xe, A as Ce, E as ve, D as Te } from "./chunks/PrizeCard-CXjFADAN.js";
4
- import { a as J } from "./chunks/AlertMessage-X4MQ4qsN.js";
5
- import { createPortal as Pe } from "react-dom";
6
- import { F as Se } from "./chunks/FormLabel-C47pX5hN.js";
7
- import { T as I } from "./chunks/Typography-DFdgIDQS.js";
8
- import { S as we, a as Re } from "./chunks/Select-BeixD4Vw.js";
9
- import { P as K } from "./chunks/Person-DB_bEPcg.js";
10
- import { h as U, s as Ee } from "./chunks/helpers-D8cWUfGf.js";
11
- import { S as Ae } from "./chunks/Spinner-C219bcnm.js";
12
- import { S as Ie } from "./chunks/Sheet-vOgATocO.js";
13
- import { T as Le } from "./chunks/Table-Cx7htUDp.js";
14
- import { A as ee } from "./chunks/Avatar-RBMU1Gkk.js";
15
- import { I as H, B as te } from "./chunks/Button-GawVOPKi.js";
16
- import { C as ze, a as Me } from "./chunks/chevrons-right-CXSpQt9w.js";
17
- import { C as Be, a as Fe } from "./chunks/chevron-right-eZEqQ93O.js";
18
- const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()).join(" "), $e = ({
1
+ import { jsxs as E, jsx as l, Fragment as ce } from "react/jsx-runtime";
2
+ import z, { useState as B, useEffect as Q, useCallback as me, useMemo as _ } from "react";
3
+ import { u as G, g as fe, C as he, s as ge, b as X, c as de, d as O, f as j, B as L, a as ue, k as be, A as ye, n as xe, D as Ce, E as ve, F as Te, G as Pe, H as Se, I as we, J as Ee } from "./chunks/PrizeCard-CyVJJLo1.js";
4
+ import { a as J } from "./chunks/AlertMessage-DwSmhmHt.js";
5
+ import { createPortal as Ie } from "react-dom";
6
+ import { F as Ae } from "./chunks/FormLabel-DlXT5RZd.js";
7
+ import { T as R } from "./chunks/Typography-B8CtvKkm.js";
8
+ import { S as Re, a as Le } from "./chunks/Select-DyRdhrMr.js";
9
+ import { P as ee } from "./chunks/Person-CLQl7Sxs.js";
10
+ import { h as U, s as Me } from "./chunks/helpers-DgUDSfd1.js";
11
+ import { S as ze } from "./chunks/Spinner-Bb4eb64F.js";
12
+ import { S as Be } from "./chunks/Sheet-sYNAL7gX.js";
13
+ import { T as Fe } from "./chunks/Table-C09wF6nK.js";
14
+ import { A as te } from "./chunks/Avatar-CEbT4X-o.js";
15
+ import { D as H } from "./chunks/DirectionScope-BGDPaR6B.js";
16
+ import { I as k, B as re } from "./chunks/Button-CO-k2gLb.js";
17
+ import { C as Ue, a as $e } from "./chunks/chevrons-right-CXSpQt9w.js";
18
+ import { C as Qe, a as He } from "./chunks/chevron-right-eZEqQ93O.js";
19
+ const ke = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()).join(" "), De = ({
19
20
  options: e,
20
21
  selectedId: t,
21
22
  onChange: a
22
23
  }) => {
23
- const { t: r } = D(), { shadowRootElement: o } = fe(me), b = he(), y = X(), d = ce(), c = O().primary, h = G(), v = y.textColor, u = {
24
+ const { t: r } = G(), { shadowRootElement: o } = fe(he), b = ge(), v = X(), d = de(), m = O().primary, c = j(), C = v.textColor, p = {
24
25
  background: {
25
26
  surface: b.colorSchemes.light.palette.background.surface,
26
27
  popup: b.colorSchemes.light.palette.background.popup
@@ -35,18 +36,18 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
35
36
  }
36
37
  }, x = {
37
38
  flexShrink: 0,
38
- fontFamily: c,
39
+ fontFamily: m,
39
40
  fontSize: "0.65em",
40
41
  fontWeight: 600,
41
42
  letterSpacing: "0.05em",
42
43
  textTransform: "uppercase",
43
- color: u.neutral.outlinedColor,
44
- bgcolor: u.neutral.plainHoverBg,
45
- border: `1px solid ${u.neutral.outlinedBorder}`,
44
+ color: p.neutral.outlinedColor,
45
+ bgcolor: p.neutral.plainHoverBg,
46
+ border: `1px solid ${p.neutral.outlinedBorder}`,
46
47
  borderRadius: d.sm,
47
- px: h["2xs"],
48
- py: h["3xs"]
49
- }, E = (C) => /* @__PURE__ */ R(
48
+ px: c["2xs"],
49
+ py: c["3xs"]
50
+ }, I = (g) => /* @__PURE__ */ E(
50
51
  L,
51
52
  {
52
53
  sx: {
@@ -54,107 +55,107 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
54
55
  alignItems: "center",
55
56
  justifyContent: "space-between",
56
57
  width: "100%",
57
- gap: h.sm
58
+ gap: c.sm
58
59
  },
59
60
  children: [
60
- /* @__PURE__ */ i("span", { children: C.label }),
61
- C.type && /* @__PURE__ */ i(L, { sx: x, children: Ue(C.type) })
61
+ /* @__PURE__ */ l("span", { children: g.label }),
62
+ g.type && /* @__PURE__ */ l(L, { sx: x, children: ke(g.type) })
62
63
  ]
63
64
  }
64
- ), w = {
65
+ ), P = {
65
66
  root: {
66
67
  sx: {
67
- fontFamily: c,
68
+ fontFamily: m,
68
69
  borderRadius: d.sm,
69
- bgcolor: u.background.surface,
70
- borderColor: u.neutral.outlinedBorder,
71
- color: u.neutral.outlinedColor,
70
+ bgcolor: p.background.surface,
71
+ borderColor: p.neutral.outlinedBorder,
72
+ color: p.neutral.outlinedColor,
72
73
  fontSize: "1em",
73
- "&:hover": { bgcolor: u.neutral.outlinedHoverBg }
74
+ "&:hover": { bgcolor: p.neutral.outlinedHoverBg }
74
75
  }
75
76
  },
76
77
  listbox: {
77
78
  container: o,
78
79
  sx: {
79
80
  zIndex: 10,
80
- bgcolor: u.background.popup,
81
- border: `1px solid ${u.neutral.outlinedBorder}`,
81
+ bgcolor: p.background.popup,
82
+ border: `1px solid ${p.neutral.outlinedBorder}`,
82
83
  borderRadius: d.sm,
83
84
  boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)"
84
85
  }
85
86
  }
86
- }, p = {
87
- fontFamily: c,
88
- color: `${u.neutral.outlinedColor} !important`,
87
+ }, u = {
88
+ fontFamily: m,
89
+ color: `${p.neutral.outlinedColor} !important`,
89
90
  bgcolor: "transparent",
90
91
  "&:hover": {
91
- bgcolor: `${u.neutral.plainHoverBg} !important`,
92
- color: `${u.neutral.plainHoverColor} !important`
92
+ bgcolor: `${p.neutral.plainHoverBg} !important`,
93
+ color: `${p.neutral.plainHoverColor} !important`
93
94
  },
94
95
  "&.Mui-selected": {
95
- bgcolor: `${u.neutral.plainActiveBg} !important`,
96
- color: `${u.neutral.outlinedColor} !important`
96
+ bgcolor: `${p.neutral.plainActiveBg} !important`,
97
+ color: `${p.neutral.outlinedColor} !important`
97
98
  },
98
99
  "&.Mui-selected:hover": {
99
- bgcolor: `${u.neutral.plainActiveBg} !important`,
100
- color: `${u.neutral.outlinedColor} !important`
100
+ bgcolor: `${p.neutral.plainActiveBg} !important`,
101
+ color: `${p.neutral.outlinedColor} !important`
101
102
  }
102
103
  };
103
- return /* @__PURE__ */ R(L, { sx: { display: "flex", flexDirection: "column", gap: h["2xs"] }, children: [
104
- /* @__PURE__ */ i(
105
- Se,
104
+ return /* @__PURE__ */ E(L, { sx: { display: "flex", flexDirection: "column", gap: c["2xs"] }, children: [
105
+ /* @__PURE__ */ l(
106
+ Ae,
106
107
  {
107
108
  sx: {
108
- color: `${v} !important`,
109
- fontFamily: c,
109
+ color: `${C} !important`,
110
+ fontFamily: m,
110
111
  fontSize: "0.875em"
111
112
  },
112
- children: /* @__PURE__ */ i(
113
- I,
113
+ children: /* @__PURE__ */ l(
114
+ R,
114
115
  {
115
116
  sx: {
116
- fontFamily: c,
117
+ fontFamily: m,
117
118
  fontSize: "0.875em",
118
- color: v
119
+ color: C
119
120
  },
120
121
  children: r("leaderboard.selectLabel")
121
122
  }
122
123
  )
123
124
  }
124
125
  ),
125
- /* @__PURE__ */ i(
126
- we,
126
+ /* @__PURE__ */ l(
127
+ Re,
127
128
  {
128
129
  value: t,
129
- onChange: (C, P) => P && a(P),
130
- slotProps: w,
131
- renderValue: (C) => {
132
- if (!C) return null;
133
- const P = e.find((f) => f.id === C.value);
134
- return P ? E(P) : C.label;
130
+ onChange: (g, S) => S && a(S),
131
+ slotProps: P,
132
+ renderValue: (g) => {
133
+ if (!g) return null;
134
+ const S = e.find((f) => f.id === g.value);
135
+ return S ? I(S) : g.label;
135
136
  },
136
- children: e.map((C) => /* @__PURE__ */ i(Re, { value: C.id, sx: p, children: E(C) }, C.id))
137
+ children: e.map((g) => /* @__PURE__ */ l(Le, { value: g.id, sx: u, children: I(g) }, g.id))
137
138
  }
138
139
  )
139
140
  ] });
140
- }, Qe = ({
141
+ }, _e = ({
141
142
  leaderboard: e,
142
143
  userRank: t,
143
144
  showHeading: a,
144
145
  title: r,
145
146
  description: o,
146
147
  isSplitVariant: b,
147
- brandingColors: y,
148
+ brandingColors: v,
148
149
  rankStyles: d
149
150
  }) => {
150
- const { t: c } = D(), h = de(), v = X(), u = (y == null ? void 0 : y.primaryColor) || v.palette.primary.plainColor, x = (y == null ? void 0 : y.contentColor) || v.textColor, E = v.textColor, w = O().primary, p = O().secondary, C = ce(), P = G(), f = ge(), l = v.surfaceVariant, n = h.colorSchemes.light.palette.primary.onPrimary, m = v.outlineEnabledBorder, s = {
151
+ const { t: m } = G(), c = ue(), C = X(), p = (v == null ? void 0 : v.primaryColor) || C.palette.primary.plainColor, x = (v == null ? void 0 : v.contentColor) || C.textColor, I = C.textColor, P = O().primary, u = O().secondary, g = de(), S = j(), f = be(), i = C.surfaceVariant, n = c.colorSchemes.light.palette.primary.onPrimary, h = C.outlineEnabledBorder, s = {
151
152
  leaderboardContainer: {
152
153
  display: "flex",
153
154
  flexDirection: "column",
154
- gap: P.md
155
+ gap: S.md
155
156
  },
156
157
  leaderboardTitle: {
157
- fontFamily: w,
158
+ fontFamily: P,
158
159
  fontWeight: 700,
159
160
  lineHeight: "133%",
160
161
  letterSpacing: "0px",
@@ -164,11 +165,11 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
164
165
  },
165
166
  tableContainer: {
166
167
  overflowX: "auto",
167
- borderRadius: C.md,
168
- border: `1px solid ${m}`
168
+ borderRadius: g.md,
169
+ border: `1px solid ${h}`
169
170
  },
170
171
  table: {
171
- backgroundColor: l,
172
+ backgroundColor: i,
172
173
  "--TableCell-paddingX": "0.5rem",
173
174
  "--TableCell-paddingY": "0.375rem",
174
175
  cursor: "default",
@@ -176,19 +177,19 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
176
177
  backgroundColor: "transparent"
177
178
  },
178
179
  "& > thead > tr > th": {
179
- backgroundColor: `rgba(${U(l)}, 0.8)`,
180
+ backgroundColor: `rgba(${U(i)}, 0.8)`,
180
181
  color: x,
181
- fontFamily: w,
182
+ fontFamily: P,
182
183
  fontWeight: 600,
183
184
  fontSize: "0.875em",
184
185
  textAlign: "center",
185
- borderBottom: `1px solid ${m}`
186
+ borderBottom: `1px solid ${h}`
186
187
  }
187
188
  },
188
189
  headerCellPosition: {
189
- backgroundColor: `rgba(${U(l)}, 0.8)`,
190
+ backgroundColor: `rgba(${U(i)}, 0.8)`,
190
191
  color: x,
191
- fontFamily: w,
192
+ fontFamily: P,
192
193
  fontWeight: 600,
193
194
  fontSize: "0.875em",
194
195
  textAlign: "center",
@@ -196,9 +197,9 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
196
197
  width: "10%"
197
198
  },
198
199
  headerCellName: {
199
- backgroundColor: `rgba(${U(l)}, 0.8)`,
200
+ backgroundColor: `rgba(${U(i)}, 0.8)`,
200
201
  color: x,
201
- fontFamily: w,
202
+ fontFamily: P,
202
203
  fontWeight: 600,
203
204
  fontSize: "0.875em",
204
205
  textAlign: "left",
@@ -206,9 +207,9 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
206
207
  width: "80%"
207
208
  },
208
209
  headerCellPoints: {
209
- backgroundColor: `rgba(${U(l)}, 0.8)`,
210
+ backgroundColor: `rgba(${U(i)}, 0.8)`,
210
211
  color: x,
211
- fontFamily: w,
212
+ fontFamily: P,
212
213
  fontWeight: 600,
213
214
  fontSize: "0.875em",
214
215
  textAlign: "center",
@@ -230,23 +231,23 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
230
231
  textAlign: "center"
231
232
  },
232
233
  userRow: {
233
- backgroundColor: `rgba(${U(u)}, 0.1)`
234
+ backgroundColor: `rgba(${U(p)}, 0.1)`
234
235
  },
235
236
  nameCell: {
236
237
  display: "flex",
237
238
  alignItems: "center",
238
- gap: P.sm
239
+ gap: S.sm
239
240
  },
240
241
  leaderboardAvatar: {
241
242
  width: "32px",
242
243
  height: "32px",
243
244
  fontSize: "0.875em",
244
245
  fontWeight: 600,
245
- backgroundColor: u,
246
+ backgroundColor: p,
246
247
  color: n
247
248
  },
248
249
  nameText: {
249
- fontFamily: w,
250
+ fontFamily: P,
250
251
  fontWeight: 500,
251
252
  fontSize: "0.875em",
252
253
  color: x,
@@ -255,13 +256,13 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
255
256
  whiteSpace: "nowrap"
256
257
  },
257
258
  positionText: {
258
- fontFamily: w,
259
+ fontFamily: P,
259
260
  fontWeight: 600,
260
261
  fontSize: "0.875em",
261
262
  color: x
262
263
  },
263
264
  pointsText: {
264
- fontFamily: w,
265
+ fontFamily: P,
265
266
  fontWeight: 600,
266
267
  fontSize: "0.875em",
267
268
  color: x
@@ -271,20 +272,20 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
271
272
  color: n
272
273
  },
273
274
  noLeaderboardText: {
274
- fontFamily: p,
275
+ fontFamily: u,
275
276
  fontSize: "1.25em",
276
277
  color: x,
277
278
  textAlign: "center",
278
- marginY: P.md
279
+ marginY: S.md
279
280
  }
280
281
  };
281
282
  if (!e)
282
- return /* @__PURE__ */ i(Ae, { my: 10 });
283
+ return /* @__PURE__ */ l(ze, { my: 10 });
283
284
  if (e.length === 0)
284
- return /* @__PURE__ */ i(I, { level: "body-lg", sx: s.noLeaderboardText, children: c("leaderboard.noLeaderboardAvailable") });
285
- const T = t, S = T == null ? void 0 : T.profileId, F = S && e.some((g) => g.profileId === S);
286
- return /* @__PURE__ */ R(L, { sx: s.leaderboardContainer, children: [
287
- a && /* @__PURE__ */ R(
285
+ return /* @__PURE__ */ l(R, { level: "body-lg", sx: s.noLeaderboardText, children: m("leaderboard.noLeaderboardAvailable") });
286
+ const T = t, w = T == null ? void 0 : T.profileId, F = w && e.some((y) => y.profileId === w);
287
+ return /* @__PURE__ */ E(L, { sx: s.leaderboardContainer, children: [
288
+ a && /* @__PURE__ */ E(
288
289
  L,
289
290
  {
290
291
  sx: {
@@ -294,8 +295,8 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
294
295
  textAlign: "center"
295
296
  },
296
297
  children: [
297
- /* @__PURE__ */ i(
298
- I,
298
+ /* @__PURE__ */ l(
299
+ R,
299
300
  {
300
301
  level: "body-sm",
301
302
  sx: {
@@ -304,36 +305,36 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
304
305
  letterSpacing: "1px",
305
306
  textTransform: "uppercase",
306
307
  fontSize: "0.75em",
307
- color: E,
308
+ color: I,
308
309
  opacity: "60%",
309
- fontFamily: p
310
+ fontFamily: u
310
311
  },
311
- children: c("leaderboard.heading")
312
+ children: m("leaderboard.heading")
312
313
  }
313
314
  ),
314
- /* @__PURE__ */ R(
315
+ /* @__PURE__ */ E(
315
316
  L,
316
317
  {
317
318
  sx: {
318
319
  display: "flex",
319
320
  flexDirection: "column",
320
- gap: P["3xs"]
321
+ gap: S["3xs"]
321
322
  },
322
323
  children: [
323
- r && /* @__PURE__ */ i(I, { level: "h4", sx: s.leaderboardTitle, children: r }),
324
- o && /* @__PURE__ */ i(
325
- I,
324
+ r && /* @__PURE__ */ l(R, { level: "h4", sx: s.leaderboardTitle, children: r }),
325
+ o && /* @__PURE__ */ l(
326
+ R,
326
327
  {
327
328
  sx: {
328
329
  fontWeight: 400,
329
330
  lineHeight: "140%",
330
331
  letterSpacing: "0.15px",
331
332
  fontSize: "1.25em",
332
- color: E,
333
+ color: I,
333
334
  opacity: "60%",
334
- fontFamily: w
335
+ fontFamily: P
335
336
  },
336
- children: Ee(o)
337
+ children: Me(o)
337
338
  }
338
339
  )
339
340
  ]
@@ -342,8 +343,8 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
342
343
  ]
343
344
  }
344
345
  ),
345
- /* @__PURE__ */ i(Ie, { sx: s.tableContainer, children: /* @__PURE__ */ R(
346
- Le,
346
+ /* @__PURE__ */ l(Be, { sx: s.tableContainer, children: /* @__PURE__ */ E(
347
+ Fe,
347
348
  {
348
349
  variant: "outlined",
349
350
  hoverRow: !1,
@@ -351,101 +352,101 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
351
352
  size: "sm",
352
353
  sx: s.table,
353
354
  children: [
354
- /* @__PURE__ */ i("thead", { children: /* @__PURE__ */ R("tr", { children: [
355
- /* @__PURE__ */ i("th", { style: s.headerCellPosition, children: f || b ? "" : c("leaderboard.position") }),
356
- /* @__PURE__ */ i("th", { style: s.headerCellName, children: c("leaderboard.name") }),
357
- /* @__PURE__ */ i("th", { style: s.headerCellPoints, children: f || b ? "🎯" : c("leaderboard.points") })
355
+ /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ E("tr", { children: [
356
+ /* @__PURE__ */ l("th", { style: s.headerCellPosition, children: f || b ? "" : m("leaderboard.position") }),
357
+ /* @__PURE__ */ l("th", { style: s.headerCellName, children: m("leaderboard.name") }),
358
+ /* @__PURE__ */ l("th", { style: s.headerCellPoints, children: f || b ? "🎯" : m("leaderboard.points") })
358
359
  ] }) }),
359
- /* @__PURE__ */ R("tbody", { children: [
360
- T && !F && /* @__PURE__ */ R("tr", { style: s.userRow, children: [
361
- /* @__PURE__ */ i("td", { style: s.tableCellPosition, children: /* @__PURE__ */ R(I, { sx: s.positionText, children: [
360
+ /* @__PURE__ */ E("tbody", { children: [
361
+ T && !F && /* @__PURE__ */ E("tr", { style: s.userRow, children: [
362
+ /* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(R, { sx: s.positionText, children: [
362
363
  "#",
363
364
  T.position
364
365
  ] }) }),
365
- /* @__PURE__ */ i("td", { style: s.tableCellName, children: /* @__PURE__ */ R(L, { sx: s.nameCell, children: [
366
- /* @__PURE__ */ i(ee, { sx: s.leaderboardAvatar, children: /* @__PURE__ */ i(K, { sx: s.avatarIcon }) }),
367
- /* @__PURE__ */ i(I, { sx: s.nameText, children: c("leaderboard.you") })
366
+ /* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(L, { sx: s.nameCell, children: [
367
+ /* @__PURE__ */ l(te, { sx: s.leaderboardAvatar, children: /* @__PURE__ */ l(ee, { sx: s.avatarIcon }) }),
368
+ /* @__PURE__ */ l(R, { sx: s.nameText, children: m("leaderboard.you") })
368
369
  ] }) }),
369
- /* @__PURE__ */ i("td", { style: s.tableCellPoints, children: /* @__PURE__ */ i(I, { sx: s.pointsText, children: T.points }) })
370
+ /* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(R, { sx: s.pointsText, children: T.points }) })
370
371
  ] }),
371
- e.map((g, A) => {
372
- var N, V, Y, q;
373
- const z = S === g.profileId, ue = z ? s.userRow : d == null ? void 0 : d[A + 1];
374
- return /* @__PURE__ */ R("tr", { style: ue, children: [
375
- /* @__PURE__ */ i("td", { style: s.tableCellPosition, children: /* @__PURE__ */ R(I, { sx: s.positionText, children: [
372
+ e.map((y, A) => {
373
+ var V, Y, K, q;
374
+ const M = w === y.profileId, pe = M ? s.userRow : d == null ? void 0 : d[A + 1];
375
+ return /* @__PURE__ */ E("tr", { style: pe, children: [
376
+ /* @__PURE__ */ l("td", { style: s.tableCellPosition, children: /* @__PURE__ */ E(R, { sx: s.positionText, children: [
376
377
  "#",
377
- g.position
378
+ y.position
378
379
  ] }) }),
379
- /* @__PURE__ */ i("td", { style: s.tableCellName, children: /* @__PURE__ */ R(L, { sx: s.nameCell, children: [
380
- /* @__PURE__ */ i(
381
- ee,
380
+ /* @__PURE__ */ l("td", { style: s.tableCellName, children: /* @__PURE__ */ E(L, { sx: s.nameCell, children: [
381
+ /* @__PURE__ */ l(
382
+ te,
382
383
  {
383
- src: ((N = g.profileModel) == null ? void 0 : N.avatar) || void 0,
384
+ src: ((V = y.profileModel) == null ? void 0 : V.avatar) || void 0,
384
385
  sx: s.leaderboardAvatar,
385
- children: (V = g.profileModel) != null && V.avatar ? /* @__PURE__ */ i(se, {}) : /* @__PURE__ */ i(K, { sx: s.avatarIcon })
386
+ children: (Y = y.profileModel) != null && Y.avatar ? /* @__PURE__ */ l(ce, {}) : /* @__PURE__ */ l(ee, { sx: s.avatarIcon })
386
387
  }
387
388
  ),
388
- /* @__PURE__ */ i(I, { sx: s.nameText, children: z ? c("leaderboard.you") : ((Y = g.profileModel) == null ? void 0 : Y.nickname) || ((q = g.profileModel) == null ? void 0 : q.name) || c("leaderboard.anonymous") })
389
+ /* @__PURE__ */ l(R, { sx: s.nameText, children: M ? m("leaderboard.you") : ((K = y.profileModel) == null ? void 0 : K.nickname) || ((q = y.profileModel) == null ? void 0 : q.name) || m("leaderboard.anonymous") })
389
390
  ] }) }),
390
- /* @__PURE__ */ i("td", { style: s.tableCellPoints, children: /* @__PURE__ */ i(I, { sx: s.pointsText, children: g.points }) })
391
- ] }, g.profileId);
391
+ /* @__PURE__ */ l("td", { style: s.tableCellPoints, children: /* @__PURE__ */ l(R, { sx: s.pointsText, children: y.points }) })
392
+ ] }, y.profileId);
392
393
  })
393
394
  ] })
394
395
  ]
395
396
  }
396
397
  ) })
397
398
  ] });
398
- }, He = ({
399
+ }, Oe = ({
399
400
  count: e = 10,
400
401
  page: t = 1,
401
402
  onChange: a,
402
403
  siblingCount: r = 1,
403
404
  boundaryCount: o = 1,
404
405
  showFirstButton: b = !0,
405
- showLastButton: y = !0,
406
+ showLastButton: v = !0,
406
407
  size: d = "md",
407
- disabled: c = !1,
408
- isOverlayVariant: h = !1
408
+ disabled: m = !1,
409
+ isOverlayVariant: c = !1
409
410
  }) => {
410
- const v = de(), u = (l) => {
411
- a && l >= 1 && l <= e && a(l);
412
- }, x = (l, n) => {
413
- const m = [];
414
- for (let s = l; s <= n; s++) m.push(s);
415
- return m;
416
- }, w = (() => {
411
+ const C = ue(), p = (i) => {
412
+ a && i >= 1 && i <= e && a(i);
413
+ }, x = (i, n) => {
414
+ const h = [];
415
+ for (let s = i; s <= n; s++) h.push(s);
416
+ return h;
417
+ }, P = (() => {
417
418
  if (e <= 0) return [];
418
- const l = x(1, Math.min(o, e)), n = x(
419
+ const i = x(1, Math.min(o, e)), n = x(
419
420
  Math.max(e - o + 1, o + 1),
420
421
  e
421
- ), m = Math.max(o + 1, t - r), s = Math.min(e - o, t + r), T = [...l];
422
- if (m > o + 1 && T.push("ellipsis-start"), m <= s)
423
- for (let S = m; S <= s; S++)
424
- T.push(S);
422
+ ), h = Math.max(o + 1, t - r), s = Math.min(e - o, t + r), T = [...i];
423
+ if (h > o + 1 && T.push("ellipsis-start"), h <= s)
424
+ for (let w = h; w <= s; w++)
425
+ T.push(w);
425
426
  s < e - o && T.push("ellipsis-end");
426
- for (const S of n)
427
- T.includes(S) || T.push(S);
427
+ for (const w of n)
428
+ T.includes(w) || T.push(w);
428
429
  return T;
429
- })(), p = d === "sm" ? "sm" : d === "lg" ? "lg" : "md", C = d === "sm" ? 16 : d === "lg" ? 24 : 20, P = (l = !1) => {
430
- if (!h)
430
+ })(), u = d === "sm" ? "sm" : d === "lg" ? "lg" : "md", g = d === "sm" ? 16 : d === "lg" ? 24 : 20, S = (i = !1) => {
431
+ if (!c)
431
432
  return {
432
433
  borderRadius: "8px",
433
434
  minWidth: "32px",
434
435
  minHeight: "32px",
435
- fontWeight: l ? 600 : 400
436
+ fontWeight: i ? 600 : 400
436
437
  };
437
- const n = v.colorSchemes.dark;
438
+ const n = C.colorSchemes.dark;
438
439
  return {
439
440
  borderRadius: "8px",
440
441
  minWidth: "32px",
441
442
  minHeight: "32px",
442
- fontWeight: l ? 600 : 400,
443
- backgroundColor: l ? n.palette.neutral.solidBg : "transparent",
444
- color: l ? n.palette.neutral.solidColor : n.textColor,
443
+ fontWeight: i ? 600 : 400,
444
+ backgroundColor: i ? n.palette.neutral.solidBg : "transparent",
445
+ color: i ? n.palette.neutral.solidColor : n.textColor,
445
446
  border: "none",
446
447
  "&:hover": {
447
448
  backgroundColor: n.palette.neutral.solidBg,
448
- color: l ? n.palette.neutral.solidColor : n.textColor
449
+ color: i ? n.palette.neutral.solidColor : n.textColor
449
450
  },
450
451
  "&:active": {
451
452
  backgroundColor: n.palette.neutral.plainActiveBg
@@ -457,35 +458,35 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
457
458
  }
458
459
  };
459
460
  }, f = () => {
460
- if (!h)
461
+ if (!c)
461
462
  return {
462
463
  borderRadius: "8px",
463
464
  minWidth: "32px",
464
465
  minHeight: "32px"
465
466
  };
466
- const l = v.colorSchemes.dark;
467
+ const i = C.colorSchemes.dark;
467
468
  return {
468
469
  borderRadius: "8px",
469
470
  minWidth: "32px",
470
471
  minHeight: "32px",
471
472
  backgroundColor: "transparent",
472
- color: l.textColor,
473
+ color: i.textColor,
473
474
  border: "none",
474
475
  "&:hover": {
475
- backgroundColor: l.palette.neutral.solidBg,
476
- color: l.textColor
476
+ backgroundColor: i.palette.neutral.solidBg,
477
+ color: i.textColor
477
478
  },
478
479
  "&:active": {
479
- backgroundColor: l.palette.neutral.plainActiveBg
480
+ backgroundColor: i.palette.neutral.plainActiveBg
480
481
  },
481
482
  "&.Mui-disabled": {
482
483
  backgroundColor: "transparent",
483
- color: l.textDisabled,
484
+ color: i.textDisabled,
484
485
  opacity: 0.5
485
486
  }
486
487
  };
487
488
  };
488
- return /* @__PURE__ */ R(
489
+ return /* @__PURE__ */ E(
489
490
  L,
490
491
  {
491
492
  sx: {
@@ -495,45 +496,45 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
495
496
  flexWrap: "wrap"
496
497
  },
497
498
  children: [
498
- b && /* @__PURE__ */ i(
499
- H,
499
+ b && /* @__PURE__ */ l(
500
+ k,
500
501
  {
501
- size: p,
502
+ size: u,
502
503
  variant: "plain",
503
504
  color: "neutral",
504
- onClick: () => u(1),
505
- disabled: c || t === 1,
505
+ onClick: () => p(1),
506
+ disabled: m || t === 1,
506
507
  sx: f(),
507
- children: /* @__PURE__ */ i(ze, { size: C })
508
+ children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ue, { size: g }) })
508
509
  }
509
510
  ),
510
- /* @__PURE__ */ i(
511
- H,
511
+ /* @__PURE__ */ l(
512
+ k,
512
513
  {
513
- size: p,
514
+ size: u,
514
515
  variant: "plain",
515
516
  color: "neutral",
516
- onClick: () => u(t - 1),
517
- disabled: c || t === 1,
517
+ onClick: () => p(t - 1),
518
+ disabled: m || t === 1,
518
519
  sx: f(),
519
- children: /* @__PURE__ */ i(Be, { size: C })
520
+ children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Qe, { size: g }) })
520
521
  }
521
522
  ),
522
- w.map((l, n) => {
523
- if (typeof l == "string" && l.startsWith("ellipsis"))
524
- return /* @__PURE__ */ i(
525
- te,
523
+ P.map((i, n) => {
524
+ if (typeof i == "string" && i.startsWith("ellipsis"))
525
+ return /* @__PURE__ */ l(
526
+ re,
526
527
  {
527
- size: p,
528
+ size: u,
528
529
  variant: "plain",
529
530
  color: "neutral",
530
531
  disabled: !0,
531
532
  sx: {
532
- ...P(!1),
533
+ ...S(!1),
533
534
  cursor: "default",
534
- "&.Mui-disabled": h ? {
535
+ "&.Mui-disabled": c ? {
535
536
  backgroundColor: "transparent",
536
- color: v.colorSchemes.dark.textDisabled,
537
+ color: C.colorSchemes.dark.textDisabled,
537
538
  opacity: 0.5
538
539
  } : {
539
540
  opacity: 1,
@@ -542,67 +543,67 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
542
543
  },
543
544
  children: "..."
544
545
  },
545
- `${l}-${n}`
546
+ `${i}-${n}`
546
547
  );
547
- const m = l === t;
548
- return /* @__PURE__ */ i(
549
- te,
548
+ const h = i === t;
549
+ return /* @__PURE__ */ l(
550
+ re,
550
551
  {
551
- size: p,
552
- variant: m ? "solid" : "plain",
552
+ size: u,
553
+ variant: h ? "solid" : "plain",
553
554
  color: "neutral",
554
- onClick: () => u(l),
555
- disabled: c,
556
- sx: P(m),
557
- children: l
555
+ onClick: () => p(i),
556
+ disabled: m,
557
+ sx: S(h),
558
+ children: i
558
559
  },
559
- l
560
+ i
560
561
  );
561
562
  }),
562
- /* @__PURE__ */ i(
563
- H,
563
+ /* @__PURE__ */ l(
564
+ k,
564
565
  {
565
- size: p,
566
+ size: u,
566
567
  variant: "plain",
567
568
  color: "neutral",
568
- onClick: () => u(t + 1),
569
- disabled: c || t === e,
569
+ onClick: () => p(t + 1),
570
+ disabled: m || t === e,
570
571
  sx: f(),
571
- children: /* @__PURE__ */ i(Fe, { size: C })
572
+ children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(He, { size: g }) })
572
573
  }
573
574
  ),
574
- y && /* @__PURE__ */ i(
575
- H,
575
+ v && /* @__PURE__ */ l(
576
+ k,
576
577
  {
577
- size: p,
578
+ size: u,
578
579
  variant: "plain",
579
580
  color: "neutral",
580
- onClick: () => u(e),
581
- disabled: c || t === e,
581
+ onClick: () => p(e),
582
+ disabled: m || t === e,
582
583
  sx: f(),
583
- children: /* @__PURE__ */ i(Me, { size: C })
584
+ children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l($e, { size: g }) })
584
585
  }
585
586
  )
586
587
  ]
587
588
  }
588
589
  );
589
- }, $ = "ALL", j = (e) => ({
590
+ }, $ = "ALL", Z = (e) => ({
590
591
  currentPage: e.currentPage,
591
592
  totalPages: e.numberOfPages,
592
593
  totalItems: e.totalItems,
593
594
  itemsPerPage: e.itemsPerPage
594
- }), Z = (e) => e.map((t) => ({
595
+ }), N = (e) => e.map((t) => ({
595
596
  position: t.position,
596
597
  profileId: t.profileId,
597
598
  profileModel: t.profileModel,
598
599
  points: t.points
599
- })), ke = async (e) => {
600
+ })), We = async (e) => {
600
601
  try {
601
602
  return await e.profile.getOwn().getInfo();
602
603
  } catch {
603
604
  return null;
604
605
  }
605
- }, re = async (e, t) => e.length === 0 ? [] : (await t.topX.getGames({ gameIds: e })).data.map((r) => {
606
+ }, oe = async (e, t) => e.length === 0 ? [] : (await t.topX.getGames({ gameIds: e })).data.map((r) => {
606
607
  var o;
607
608
  return {
608
609
  id: r.id,
@@ -610,7 +611,7 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
610
611
  description: r.description || null,
611
612
  branding: ((o = r.branding) == null ? void 0 : o.colors) || null
612
613
  };
613
- }), oe = async (e, t) => e.length === 0 ? [] : (await t.matchQuiz.getGames({ gameIds: e })).data.map((r) => {
614
+ }), ne = async (e, t) => e.length === 0 ? [] : (await t.matchQuiz.getGames({ gameIds: e })).data.map((r) => {
614
615
  var o;
615
616
  return {
616
617
  id: r.id,
@@ -618,7 +619,7 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
618
619
  description: r.description || null,
619
620
  branding: ((o = r.branding) == null ? void 0 : o.colors) || null
620
621
  };
621
- }), ne = async (e, t) => e.length === 0 ? [] : (await t.loyalty.getTemplates()).data.filter((r) => e.includes(r.id)).map((r) => {
622
+ }), ae = async (e, t) => e.length === 0 ? [] : (await t.loyalty.getTemplates()).data.filter((r) => e.includes(r.id)).map((r) => {
622
623
  var o;
623
624
  return {
624
625
  id: r.id,
@@ -626,7 +627,7 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
626
627
  description: r.description || null,
627
628
  branding: ((o = r.branding) == null ? void 0 : o.colors) || null
628
629
  };
629
- }), ae = async (e, t) => e.length === 0 ? [] : (await t.miniGames.getClassicQuizzes({
630
+ }), le = async (e, t) => e.length === 0 ? [] : (await t.miniGames.getClassicQuizzes({
630
631
  classicQuizIds: e,
631
632
  limit: e.length
632
633
  })).data.map((r) => {
@@ -637,20 +638,20 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
637
638
  description: r.description || null,
638
639
  branding: ((o = r.branding) == null ? void 0 : o.colors) || null
639
640
  };
640
- }), _e = async (e, t, a, r) => {
641
+ }), Ge = async (e, t, a, r) => {
641
642
  const o = await t.loyalty.getLeaderboardForGame(e, { page: a, limit: r });
642
643
  return {
643
- leaderboard: Z(o.data),
644
- pagination: j(o.meta.pagination)
644
+ leaderboard: N(o.data),
645
+ pagination: Z(o.meta.pagination)
645
646
  };
646
- }, Oe = async (e, t, a, r) => {
647
+ }, Xe = async (e, t, a, r) => {
647
648
  const o = await t.loyalty.getLeaderboard(
648
649
  e,
649
650
  { page: a, limit: r }
650
651
  );
651
652
  return {
652
- leaderboard: Z(o.data),
653
- pagination: j(o.meta.pagination)
653
+ leaderboard: N(o.data),
654
+ pagination: Z(o.meta.pagination)
654
655
  };
655
656
  }, W = async (e, t, a, r) => {
656
657
  const o = await t.miniGames.getLeaderboardForClassicQuizzes({
@@ -659,13 +660,13 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
659
660
  limit: r
660
661
  });
661
662
  return {
662
- leaderboard: Z(o.data),
663
- pagination: j(o.meta.pagination)
663
+ leaderboard: N(o.data),
664
+ pagination: Z(o.meta.pagination)
664
665
  };
665
- }, le = (e, t, a, r) => {
666
+ }, ie = (e, t, a, r) => {
666
667
  const o = e.type.toUpperCase();
667
- return o === "TOP_X" || o === "MATCH_QUIZ" ? _e(e.id, t, a, r) : o === "TEMPLATE" ? Oe(e.id, t, a, r) : W([e.id], t, a, r);
668
- }, We = async (e, t, a) => {
668
+ return o === "TOP_X" || o === "MATCH_QUIZ" ? Ge(e.id, t, a, r) : o === "TEMPLATE" ? Xe(e.id, t, a, r) : W([e.id], t, a, r);
669
+ }, je = async (e, t, a) => {
669
670
  const o = a.toUpperCase() === "TEMPLATE" ? { rankType: "TEMPLATE", leaderboardIds: [e] } : { rankType: "GAME", gameType: a.toUpperCase(), leaderboardIds: [e] }, d = (await t.loyalty.getOwnRankings(o, !0)).data[0] ?? null;
670
671
  return d ? {
671
672
  position: d.position,
@@ -673,55 +674,55 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
673
674
  profileModel: d.profileModel,
674
675
  points: d.points
675
676
  } : null;
676
- }, De = async (e, t, a) => {
677
+ }, Ze = async (e, t, a) => {
677
678
  const b = (await t.miniGames.getClassicQuizzesUserRanking(
678
679
  a,
679
680
  void 0,
680
681
  !0
681
- )).data.find((y) => y.classicQuizId === e) ?? null;
682
+ )).data.find((v) => v.classicQuizId === e) ?? null;
682
683
  return b ? {
683
684
  position: b.position,
684
685
  profileId: a,
685
686
  profileModel: null,
686
687
  points: b.points
687
688
  } : null;
688
- }, Xe = (e, t, a) => {
689
+ }, Ne = (e, t, a) => {
689
690
  const r = e.type.toUpperCase();
690
- return r === "TOP_X" || r === "MATCH_QUIZ" || r === "TEMPLATE" ? We(e.id, t, e.type) : De(e.id, t, a);
691
- }, Ge = (e, t, a, r = 10) => {
692
- const [o, b] = B({}), [y, d] = B(null), [c, h] = B(!1), [v, u] = B(!1), [x, E] = B(
691
+ return r === "TOP_X" || r === "MATCH_QUIZ" || r === "TEMPLATE" ? je(e.id, t, e.type) : Ze(e.id, t, a);
692
+ }, Ve = (e, t, a, r = 10) => {
693
+ const [o, b] = B({}), [v, d] = B(null), [m, c] = B(!1), [C, p] = B(!1), [x, I] = B(
693
694
  null
694
- ), [w, p] = B(null);
695
+ ), [P, u] = B(null);
695
696
  Q(() => {
696
697
  const f = {
697
698
  topX: e.filter((n) => n.type.toUpperCase() === "TOP_X").map((n) => n.id),
698
699
  matchQuiz: e.filter((n) => n.type.toUpperCase() === "MATCH_QUIZ").map((n) => n.id),
699
700
  template: e.filter((n) => n.type.toUpperCase() === "TEMPLATE").map((n) => n.id),
700
701
  classicQuiz: e.filter((n) => n.type.toUpperCase() === "CLASSIC_QUIZ").map((n) => n.id)
701
- }, l = (n) => n.catch(() => []);
702
+ }, i = (n) => n.catch(() => []);
702
703
  Promise.all([
703
- l(re(f.topX, t)),
704
- l(oe(f.matchQuiz, t)),
705
- l(ne(f.template, t)),
706
- l(ae(f.classicQuiz, t))
704
+ i(oe(f.topX, t)),
705
+ i(ne(f.matchQuiz, t)),
706
+ i(ae(f.template, t)),
707
+ i(le(f.classicQuiz, t))
707
708
  ]).then((n) => {
708
- const m = {};
709
+ const h = {};
709
710
  n.flat().forEach((s) => {
710
- m[s.id] = s;
711
- }), b(m);
711
+ h[s.id] = s;
712
+ }), b(h);
712
713
  });
713
714
  }, [e, t]), Q(() => {
714
- ke(t).then(E);
715
+ We(t).then(I);
715
716
  }, [t]), Q(() => {
716
717
  if (!a || !x) {
717
- p(null);
718
+ u(null);
718
719
  return;
719
720
  }
720
- let f = !1, l;
721
+ let f = !1, i;
721
722
  if (a === $) {
722
- const n = e.map((m) => m.id);
723
- l = t.miniGames.getClassicQuizzesUserRanking(x.id, void 0, !0).then((m) => {
724
- const T = m.data.find((S) => n.includes(S.classicQuizId)) ?? null;
723
+ const n = e.map((h) => h.id);
724
+ i = t.miniGames.getClassicQuizzesUserRanking(x.id, void 0, !0).then((h) => {
725
+ const T = h.data.find((w) => n.includes(w.classicQuizId)) ?? null;
725
726
  return T ? {
726
727
  position: T.position,
727
728
  profileId: x.id,
@@ -730,26 +731,26 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
730
731
  } : null;
731
732
  });
732
733
  } else {
733
- const n = e.find((m) => m.id === a);
734
+ const n = e.find((h) => h.id === a);
734
735
  if (!n) return;
735
- l = Xe(n, t, x.id);
736
+ i = Ne(n, t, x.id);
736
737
  }
737
- return l.then((n) => {
738
- f || p(n);
738
+ return i.then((n) => {
739
+ f || u(n);
739
740
  }).catch(() => {
740
- f || p(null);
741
+ f || u(null);
741
742
  }), () => {
742
743
  f = !0;
743
744
  };
744
745
  }, [a, e, t, x]), Q(() => {
745
746
  if (!a) return;
746
747
  let f = !1;
747
- return h(!0), u(!1), d(null), (async () => {
748
+ return c(!0), p(!1), d(null), (async () => {
748
749
  try {
749
- const n = e.length > 1 && e.every((g) => g.type.toUpperCase() === "CLASSIC_QUIZ");
750
+ const n = e.length > 1 && e.every((y) => y.type.toUpperCase() === "CLASSIC_QUIZ");
750
751
  if (a === $ && n) {
751
- const g = e.map((z) => z.id), A = await W(
752
- g,
752
+ const y = e.map((M) => M.id), A = await W(
753
+ y,
753
754
  t,
754
755
  1,
755
756
  r
@@ -763,59 +764,59 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
763
764
  });
764
765
  return;
765
766
  }
766
- const m = e.find((g) => g.id === a);
767
- if (!m) return;
768
- const s = m.type.toUpperCase(), T = s === "TOP_X" ? re([a], t) : s === "MATCH_QUIZ" ? oe([a], t) : s === "TEMPLATE" ? ne([a], t) : ae([a], t), [S, F] = await Promise.all([
769
- le(m, t, 1, r),
767
+ const h = e.find((y) => y.id === a);
768
+ if (!h) return;
769
+ const s = h.type.toUpperCase(), T = s === "TOP_X" ? oe([a], t) : s === "MATCH_QUIZ" ? ne([a], t) : s === "TEMPLATE" ? ae([a], t) : le([a], t), [w, F] = await Promise.all([
770
+ ie(h, t, 1, r),
770
771
  T.catch(() => [])
771
772
  ]);
772
773
  if (!f) {
773
- const g = F[0];
774
+ const y = F[0];
774
775
  d({
775
776
  id: a,
776
- title: (g == null ? void 0 : g.title) || a,
777
- description: (g == null ? void 0 : g.description) || null,
778
- branding: (g == null ? void 0 : g.branding) || null,
779
- ...S
777
+ title: (y == null ? void 0 : y.title) || a,
778
+ description: (y == null ? void 0 : y.description) || null,
779
+ branding: (y == null ? void 0 : y.branding) || null,
780
+ ...w
780
781
  });
781
782
  }
782
783
  } catch (n) {
783
- console.error("Failed to fetch leaderboard:", n), f || u(!0);
784
+ console.error("Failed to fetch leaderboard:", n), f || p(!0);
784
785
  } finally {
785
- f || h(!1);
786
+ f || c(!1);
786
787
  }
787
788
  })(), () => {
788
789
  f = !0;
789
790
  };
790
791
  }, [a, e, t, r]);
791
- const C = pe(
792
+ const g = me(
792
793
  async (f) => {
793
794
  if (a) {
794
- h(!0);
795
+ c(!0);
795
796
  try {
796
- let l;
797
+ let i;
797
798
  if (a === $) {
798
- const n = e.map((m) => m.id);
799
- l = await W(n, t, f, r);
799
+ const n = e.map((h) => h.id);
800
+ i = await W(n, t, f, r);
800
801
  } else {
801
- const n = e.find((m) => m.id === a);
802
+ const n = e.find((h) => h.id === a);
802
803
  if (!n) return;
803
- l = await le(n, t, f, r);
804
+ i = await ie(n, t, f, r);
804
805
  }
805
- d((n) => n ? { ...n, ...l } : null);
806
- } catch (l) {
807
- console.error("Failed to fetch page:", l);
806
+ d((n) => n ? { ...n, ...i } : null);
807
+ } catch (i) {
808
+ console.error("Failed to fetch page:", i);
808
809
  } finally {
809
- h(!1);
810
+ c(!1);
810
811
  }
811
812
  }
812
813
  },
813
814
  [a, e, t, r]
814
- ), P = Object.fromEntries(
815
- Object.entries(o).map(([f, l]) => [f, l.title])
815
+ ), S = Object.fromEntries(
816
+ Object.entries(o).map(([f, i]) => [f, i.title])
816
817
  );
817
- return { data: y, entityTitles: P, loading: c, error: v, setPage: C, userRank: w };
818
- }, k = "ALL", ie = ["TOP_X", "MATCH_QUIZ", "TEMPLATE", "CLASSIC_QUIZ"], je = (e, t) => {
818
+ return { data: v, entityTitles: S, loading: m, error: C, setPage: g, userRank: P };
819
+ }, D = "ALL", se = ["TOP_X", "MATCH_QUIZ", "TEMPLATE", "CLASSIC_QUIZ"], Ye = (e, t) => {
819
820
  if (!Array.isArray(e) || e.length === 0)
820
821
  return "The 'entities' setting is required and must be a non-empty array.";
821
822
  const a = /* @__PURE__ */ new Set();
@@ -829,11 +830,11 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
829
830
  return `Duplicate entity id '${o.id}' found at index ${r}. Each entity must have a unique id.`;
830
831
  if (a.add(o.id), !o.type || typeof o.type != "string")
831
832
  return `Entity at index ${r} is missing a required 'type' string field.`;
832
- if (!ie.includes(o.type.toUpperCase()))
833
- return `Entity at index ${r} has an invalid type '${o.type}'. Valid values are: ${ie.join(", ")} (case-insensitive).`;
833
+ if (!se.includes(o.type.toUpperCase()))
834
+ return `Entity at index ${r} has an invalid type '${o.type}'. Valid values are: ${se.join(", ")} (case-insensitive).`;
834
835
  }
835
836
  return t !== void 0 && (typeof t != "number" || !Number.isInteger(t) || t < 1 || t > 50) ? "The 'pageSize' setting must be an integer between 1 and 50." : null;
836
- }, Ze = ({
837
+ }, Ke = ({
837
838
  entities: e,
838
839
  sdk: t,
839
840
  pageSize: a,
@@ -841,134 +842,143 @@ const Ue = (e) => e.split("_").map((t) => t.charAt(0) + t.slice(1).toLowerCase()
841
842
  showOverallOnly: o = !1,
842
843
  showHeading: b = !0
843
844
  }) => {
844
- var g;
845
- const { t: y } = D(), d = G(), c = X().surface, h = _(
846
- () => je(e, a),
845
+ var y;
846
+ const { t: v } = G(), d = j(), m = X().surface, c = _(
847
+ () => Ye(e, a),
847
848
  [e, a]
848
- ), v = _(
849
- () => !h && e.length > 1 && e.every((A) => A.type.toUpperCase() === "CLASSIC_QUIZ"),
850
- [e, h]
851
- ), u = o && v, x = v ? k : ((g = e[0]) == null ? void 0 : g.id) || "", [E, w] = B(x);
849
+ ), C = _(
850
+ () => !c && e.length > 1 && e.every((A) => A.type.toUpperCase() === "CLASSIC_QUIZ"),
851
+ [e, c]
852
+ ), p = o && C, x = C ? D : ((y = e[0]) == null ? void 0 : y.id) || "", [I, P] = B(x);
852
853
  Q(() => {
853
- E === k || e.some((z) => z.id === E) || w(x);
854
+ I === D || e.some((M) => M.id === I) || P(x);
854
855
  }, [e]);
855
- const { data: p, entityTitles: C, loading: P, error: f, setPage: l, userRank: n } = Ge(
856
- h ? [] : e,
856
+ const { data: u, entityTitles: g, loading: S, error: f, setPage: i, userRank: n } = Ve(
857
+ c ? [] : e,
857
858
  t,
858
- h ? "" : E,
859
+ c ? "" : I,
859
860
  a
860
- ), m = _(() => {
861
- if (h) return [];
861
+ ), h = _(() => {
862
+ if (c) return [];
862
863
  const A = [];
863
- return v && A.push({ id: k, label: y("leaderboard.overall") }), e.forEach((z) => {
864
+ return C && A.push({ id: D, label: v("leaderboard.overall") }), e.forEach((M) => {
864
865
  A.push({
865
- id: z.id,
866
- label: C[z.id] ?? "",
867
- type: z.type.toUpperCase()
866
+ id: M.id,
867
+ label: g[M.id] ?? "",
868
+ type: M.type.toUpperCase()
868
869
  });
869
870
  }), A;
870
- }, [e, v, y, C, h]), s = e.every((A) => C[A.id] !== void 0), T = !h && !u && (e.length > 1 || v) && s, S = (p == null ? void 0 : p.pagination) || null, F = E === k ? y("leaderboard.overall") : (p == null ? void 0 : p.title) || null;
871
- return h ? /* @__PURE__ */ i(
871
+ }, [e, C, v, g, c]), s = e.every((A) => g[A.id] !== void 0), T = !c && !p && (e.length > 1 || C) && s, w = (u == null ? void 0 : u.pagination) || null, F = I === D ? v("leaderboard.overall") : (u == null ? void 0 : u.title) || null;
872
+ return c ? /* @__PURE__ */ l(
872
873
  J,
873
874
  {
874
875
  variant: "error",
875
876
  title: "Configuration Error",
876
- message: h
877
+ message: c
877
878
  }
878
- ) : f ? /* @__PURE__ */ i(
879
+ ) : f ? /* @__PURE__ */ l(
879
880
  J,
880
881
  {
881
882
  variant: "error",
882
883
  title: "Failed to Load Leaderboard",
883
884
  message: "One or more entity IDs could not be found. Please verify the provided IDs and try again."
884
885
  }
885
- ) : /* @__PURE__ */ R(
886
+ ) : /* @__PURE__ */ E(
886
887
  L,
887
888
  {
888
889
  sx: {
889
890
  display: "flex",
890
891
  flexDirection: "column",
891
892
  gap: d.md,
892
- backgroundColor: c,
893
+ backgroundColor: m,
893
894
  padding: d.md
894
895
  },
895
896
  children: [
896
- T && /* @__PURE__ */ i(
897
- $e,
897
+ T && /* @__PURE__ */ l(
898
+ De,
898
899
  {
899
- options: m,
900
- selectedId: E,
901
- onChange: w
900
+ options: h,
901
+ selectedId: I,
902
+ onChange: P
902
903
  }
903
904
  ),
904
- /* @__PURE__ */ i(
905
- Qe,
905
+ /* @__PURE__ */ l(
906
+ _e,
906
907
  {
907
- leaderboard: P ? null : (p == null ? void 0 : p.leaderboard) || null,
908
- userRank: P ? null : n,
908
+ leaderboard: S ? null : (u == null ? void 0 : u.leaderboard) || null,
909
+ userRank: S ? null : n,
909
910
  showHeading: b && !T,
910
911
  title: F,
911
- description: (p == null ? void 0 : p.description) || null,
912
- brandingColors: (p == null ? void 0 : p.branding) || null,
912
+ description: (u == null ? void 0 : u.description) || null,
913
+ brandingColors: (u == null ? void 0 : u.branding) || null,
913
914
  rankStyles: r
914
915
  }
915
916
  ),
916
- !P && S && S.totalPages > 1 && /* @__PURE__ */ i(
917
- He,
917
+ !S && w && w.totalPages > 1 && /* @__PURE__ */ l(
918
+ Oe,
918
919
  {
919
- count: S.totalPages,
920
- page: S.currentPage,
921
- onChange: l
920
+ count: w.totalPages,
921
+ page: w.currentPage,
922
+ onChange: i
922
923
  }
923
924
  )
924
925
  ]
925
926
  }
926
927
  );
927
- }, Ne = (e) => {
928
- var x;
929
- const [t, a] = M.useState(!1), [r, o] = M.useState(!1), b = M.useRef(
928
+ }, qe = (e) => {
929
+ var P;
930
+ const [t, a] = z.useState(!1), [r, o] = z.useState(!1), b = ye(e.language), v = z.useRef(
930
931
  `leaderboard-shadow-root-${Math.random().toString(36).substring(2, 11)}`
931
- ), y = M.useRef(null), d = M.useRef(null), c = M.useRef(null), h = M.useRef(null);
932
- M.useEffect(() => {
933
- be(e.language || "en").finally(() => o(!0));
934
- }, [e.language]), M.useEffect(() => {
935
- if (y.current)
936
- return y.current.shadowRoot ? (d.current = y.current.shadowRoot, c.current = d.current.getElementById(
937
- b.current
938
- ), c.current || (c.current = document.createElement("div"), c.current.id = b.current, d.current.appendChild(c.current))) : (d.current = y.current.attachShadow({ mode: "open" }), c.current = document.createElement("div"), c.current.id = b.current, d.current.appendChild(c.current)), h.current || (h.current = ye({
939
- key: "leaderboard-css",
940
- prepend: !0,
941
- container: d.current
942
- })), a(!0), () => {
943
- a(!1);
944
- };
945
- }, []);
946
- const v = /* @__PURE__ */ i(L, { ref: y }), u = t && r && c.current && h.current ? Pe(
947
- /* @__PURE__ */ i(xe, { value: h.current, children: /* @__PURE__ */ i(Ce, { containerRef: y, children: /* @__PURE__ */ i(
948
- ve,
932
+ ), d = z.useRef(null), m = z.useRef(null), c = z.useRef(null), [C, p] = z.useState(null);
933
+ z.useEffect(() => {
934
+ xe(e.language || "en").finally(() => o(!0));
935
+ }, [e.language]), z.useEffect(() => {
936
+ if (!d.current) return;
937
+ d.current.shadowRoot ? (m.current = d.current.shadowRoot, c.current = m.current.getElementById(
938
+ v.current
939
+ ), c.current || (c.current = document.createElement("div"), c.current.id = v.current, m.current.appendChild(c.current))) : (m.current = d.current.attachShadow({ mode: "open" }), c.current = document.createElement("div"), c.current.id = v.current, m.current.appendChild(c.current)), Ce(c.current, b);
940
+ const u = Ee("leaderboard", b);
941
+ return p(
942
+ (g) => (g == null ? void 0 : g.key) === u ? g : ve(
943
+ "leaderboard",
944
+ m.current,
945
+ b
946
+ )
947
+ ), a(!0), () => {
948
+ a(!1);
949
+ };
950
+ }, [b]);
951
+ const x = /* @__PURE__ */ l(L, { ref: d }), I = t && r && c.current && C ? Ie(
952
+ // Keyed on the cache, not on `direction`: it must change in the same
953
+ // render that adopts the new cache, or CssVarsProvider writes its CSS
954
+ // variables into the outgoing cache and never repeats.
955
+ /* @__PURE__ */ l(Te, { value: C, children: /* @__PURE__ */ l(Pe, { containerRef: d, children: /* @__PURE__ */ l(
956
+ Se,
949
957
  {
950
958
  customTheme: e.themeOptions,
951
- mode: (x = e.themeOptions) == null ? void 0 : x.mode,
959
+ mode: (P = e.themeOptions) == null ? void 0 : P.mode,
952
960
  shadowRootElement: c.current,
953
- children: /* @__PURE__ */ i(
954
- Te,
961
+ direction: b,
962
+ children: /* @__PURE__ */ l(
963
+ we,
955
964
  {
956
965
  shadowRootElement: c.current,
957
966
  leadPhoneCountryCode: null,
958
967
  language: e.language,
959
968
  optionsLayout: null,
969
+ direction: b,
960
970
  children: e.children
961
971
  }
962
972
  )
963
973
  }
964
- ) }) }),
974
+ ) }) }, C.key),
965
975
  c.current
966
976
  ) : null;
967
- return /* @__PURE__ */ R(se, { children: [
968
- v,
969
- u
977
+ return /* @__PURE__ */ E(ce, { children: [
978
+ x,
979
+ I
970
980
  ] });
971
- }, Ve = (e) => /* @__PURE__ */ i(Ne, { ...e, children: /* @__PURE__ */ i(Ze, { ...e }) }), ft = Ve;
981
+ }, Je = (e) => /* @__PURE__ */ l(qe, { ...e, children: /* @__PURE__ */ l(Ke, { ...e }) }), yt = Je;
972
982
  export {
973
- ft as Leaderboard
983
+ yt as Leaderboard
974
984
  };