fansunited-frontend-components 0.0.99 → 1.0.0
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.
- package/Betslip.js +2 -2
- package/ChanceGame.js +496 -505
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +405 -1163
- package/CompetitionStatistics.js +2 -2
- package/CompetitorCard.js +445 -425
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +648 -593
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +142 -132
- package/List.js +675 -713
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +1 -1
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +925 -1824
- package/PlayerOfTheMatch.js +2106 -2223
- package/PollVote.js +2 -2
- package/Predictor.js +4209 -18629
- package/Standings.js +497 -486
- package/TopX.js +3223 -16958
- package/chunks/{ChanceGameEmbedVariant-DM9eLG5s.js → ChanceGameEmbedVariant-z8XYzgDW.js} +1 -1
- package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
- package/chunks/index-BNl8scz6.js +4 -0
- package/chunks/index-CSa2JU4m.js +4 -0
- package/chunks/index-CVRI82Gb.js +4 -0
- package/chunks/index-Cd1dg0KI.js +4 -0
- package/chunks/index-Cei2fzi7.js +4 -0
- package/chunks/index-Cxb4wEJU.js +4 -0
- package/chunks/index-w1LGN5dz.js +4 -0
- package/chunks/main-07vzblS8.js +2091 -0
- package/chunks/main-C7X4dM_P.js +4827 -0
- package/chunks/main-D_QDfmAw.js +6417 -0
- package/chunks/{main-CzfWaEQP.js → main-DdL0UekL.js} +1931 -2025
- package/chunks/main-DmBfwyb4.js +2992 -0
- package/chunks/main-LEE8n2cG.js +3117 -0
- package/chunks/{main-DxvBjXsd.js → main-P2WNvBZE.js} +473 -444
- package/chunks/{main-DiBlJBNb.js → main-gV165E-A.js} +629 -657
- package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
- package/chunks/{withVersionStamp-BsLyhvNA.js → withVersionStamp-CPDfSE5H.js} +1 -1
- package/package.json +2 -6
- package/withVersionStamp.d.ts.map +1 -1
- package/chunks/CheckCircle-I1FktW5Y.js +0 -13
- package/chunks/Person-CXRqyF4E.js +0 -11
- package/chunks/PickOneOfX-DET4ZhjV.js +0 -3117
- package/chunks/Search-CIXthh0D.js +0 -17
- package/chunks/TimerOutlined-D-WA_vpE.js +0 -8
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +0 -136
- package/chunks/chevrons-right-HWKW2c4I.js +0 -45
- package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
- package/chunks/index-BENM3N_w.js +0 -4
- package/chunks/index-BRxAV693.js +0 -4
- package/chunks/index-BXYTsvIX.js +0 -4
- package/chunks/index-C0ilols1.js +0 -4
- package/chunks/index-D7VhczXH.js +0 -4
- package/chunks/index-DKwvdw9t.js +0 -4
- package/chunks/index-DZN-AITW.js +0 -4
- package/chunks/main-B2sDRFF4.js +0 -2184
- package/chunks/main-DFNl3g_U.js +0 -4910
- package/chunks/main-DLwnvntz.js +0 -4020
- package/chunks/main-S8_NDSiY.js +0 -3209
- package/chunks/main-lBgr8Liq.js +0 -6571
package/List.js
CHANGED
|
@@ -1,220 +1,209 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* This source code is licensed under the ISC license.
|
|
13
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
const Ut = bt("Users", [
|
|
16
|
-
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
17
|
-
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
18
|
-
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
19
|
-
["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
|
|
20
|
-
]), nt = (e) => {
|
|
21
|
-
const n = e.entityModel;
|
|
1
|
+
import { jsxs as I, jsx as o } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Modal as ue, Spinner as ie, baseButton as pe, WidgetPortal as fe } from "fansunited-frontend-core/ui/emotion";
|
|
3
|
+
import { css as i } from "@emotion/react";
|
|
4
|
+
import { useDisableCache as ge, useIsMobile as ae, defaultBg as he, WidgetTemplate as me, DirectionalIcon as G } from "fansunited-frontend-core";
|
|
5
|
+
import { useState as k, useRef as _, useCallback as Y, useEffect as ye, lazy as j, Suspense as xe } from "react";
|
|
6
|
+
import { useTranslation as q } from "react-i18next";
|
|
7
|
+
import { Users as be, ChevronsLeft as ve, ChevronLeft as Ce, ChevronRight as Se, ChevronsRight as Ie } from "fansunited-frontend-core/ui/icons/lucide";
|
|
8
|
+
import { CloseIcon as we } from "fansunited-frontend-core/ui/icons";
|
|
9
|
+
import { w as Me } from "./chunks/withVersionStamp-CPDfSE5H.js";
|
|
10
|
+
const se = (t) => {
|
|
11
|
+
const n = t.entityModel;
|
|
22
12
|
if (!n) return null;
|
|
23
|
-
switch (
|
|
13
|
+
switch (t.entityType) {
|
|
24
14
|
case "CLASSIC_QUIZ": {
|
|
25
|
-
const
|
|
15
|
+
const e = n;
|
|
26
16
|
return {
|
|
27
|
-
title:
|
|
28
|
-
images:
|
|
29
|
-
branding:
|
|
30
|
-
participationCount:
|
|
31
|
-
status:
|
|
17
|
+
title: e.title,
|
|
18
|
+
images: e.images,
|
|
19
|
+
branding: e.branding,
|
|
20
|
+
participationCount: e.participationCount,
|
|
21
|
+
status: e.status
|
|
32
22
|
};
|
|
33
23
|
}
|
|
34
24
|
case "PERSONALITY_QUIZ": {
|
|
35
|
-
const
|
|
25
|
+
const e = n;
|
|
36
26
|
return {
|
|
37
|
-
title:
|
|
38
|
-
images:
|
|
39
|
-
branding:
|
|
40
|
-
participationCount:
|
|
41
|
-
status:
|
|
27
|
+
title: e.title,
|
|
28
|
+
images: e.images,
|
|
29
|
+
branding: e.branding,
|
|
30
|
+
participationCount: e.participationCount,
|
|
31
|
+
status: e.status
|
|
42
32
|
};
|
|
43
33
|
}
|
|
44
34
|
case "POLL": {
|
|
45
|
-
const
|
|
35
|
+
const e = n;
|
|
46
36
|
return {
|
|
47
|
-
title:
|
|
48
|
-
images:
|
|
49
|
-
branding:
|
|
50
|
-
participationCount:
|
|
51
|
-
status:
|
|
37
|
+
title: e.title,
|
|
38
|
+
images: e.images,
|
|
39
|
+
branding: e.branding,
|
|
40
|
+
participationCount: e.totalVotes,
|
|
41
|
+
status: e.status
|
|
52
42
|
};
|
|
53
43
|
}
|
|
54
44
|
case "EITHER_OR": {
|
|
55
|
-
const
|
|
45
|
+
const e = n;
|
|
56
46
|
return {
|
|
57
|
-
title:
|
|
58
|
-
images:
|
|
59
|
-
branding:
|
|
60
|
-
participationCount:
|
|
61
|
-
status:
|
|
47
|
+
title: e.title,
|
|
48
|
+
images: e.images,
|
|
49
|
+
branding: e.branding,
|
|
50
|
+
participationCount: e.totalUsersCount,
|
|
51
|
+
status: e.status
|
|
62
52
|
};
|
|
63
53
|
}
|
|
64
54
|
case "MATCH_QUIZ": {
|
|
65
|
-
const
|
|
55
|
+
const e = n;
|
|
66
56
|
return {
|
|
67
|
-
title:
|
|
68
|
-
images:
|
|
69
|
-
branding:
|
|
70
|
-
participationCount:
|
|
71
|
-
status:
|
|
57
|
+
title: e.title,
|
|
58
|
+
images: e.images,
|
|
59
|
+
branding: e.branding,
|
|
60
|
+
participationCount: e.participantsCount,
|
|
61
|
+
status: e.status
|
|
72
62
|
};
|
|
73
63
|
}
|
|
74
64
|
case "CUSTOM_EVENT_GAME": {
|
|
75
|
-
const
|
|
65
|
+
const e = n;
|
|
76
66
|
return {
|
|
77
|
-
title:
|
|
78
|
-
images:
|
|
79
|
-
branding:
|
|
80
|
-
status:
|
|
67
|
+
title: e.title,
|
|
68
|
+
images: e.images,
|
|
69
|
+
branding: e.branding,
|
|
70
|
+
status: e.status
|
|
81
71
|
};
|
|
82
72
|
}
|
|
83
73
|
default:
|
|
84
74
|
return null;
|
|
85
75
|
}
|
|
86
|
-
},
|
|
87
|
-
var
|
|
88
|
-
const n = (
|
|
89
|
-
return !!(n &&
|
|
90
|
-
},
|
|
91
|
-
const l =
|
|
92
|
-
async (
|
|
93
|
-
var
|
|
94
|
-
const m = await
|
|
76
|
+
}, Te = /* @__PURE__ */ new Set(["ACTIVE", "OPEN"]), Pe = (t) => {
|
|
77
|
+
var e;
|
|
78
|
+
const n = (e = se(t)) == null ? void 0 : e.status;
|
|
79
|
+
return !!(n && Te.has(n));
|
|
80
|
+
}, Le = 50, Ee = 3, ze = (t, n, e, u) => {
|
|
81
|
+
const l = u === "paged", s = u === "limited", [y, p] = k([]), [T, b] = k(!1), [V, H] = k(!1), [Z, z] = k(!l), [Q, v] = k(1), [N, W] = k(1), w = _([]), C = _([]), R = _(/* @__PURE__ */ new Set()), U = _(1), P = _(!1), c = _(!1), f = _(null), a = _(0), O = ge(), x = Y(
|
|
82
|
+
async (h, M) => {
|
|
83
|
+
var $;
|
|
84
|
+
const m = await t.lists.getListContent(
|
|
95
85
|
n,
|
|
96
|
-
{ limit:
|
|
97
|
-
|
|
98
|
-
),
|
|
86
|
+
{ limit: M, page: h },
|
|
87
|
+
O
|
|
88
|
+
), g = ($ = m.meta) == null ? void 0 : $.pagination, E = m.data ?? [];
|
|
99
89
|
return {
|
|
100
|
-
valid:
|
|
101
|
-
rawCount:
|
|
102
|
-
pageCount: (
|
|
90
|
+
valid: E.filter(Pe),
|
|
91
|
+
rawCount: E.length,
|
|
92
|
+
pageCount: (g == null ? void 0 : g.numberOfPages) ?? 1
|
|
103
93
|
};
|
|
104
94
|
},
|
|
105
|
-
[
|
|
106
|
-
),
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
95
|
+
[t, n, O]
|
|
96
|
+
), B = Y(async () => {
|
|
97
|
+
if (c.current || !t || !n) return;
|
|
98
|
+
const h = a.current, M = () => h !== a.current, m = s ? e - C.current.length : e;
|
|
109
99
|
if (m <= 0) {
|
|
110
|
-
|
|
100
|
+
z(!1);
|
|
111
101
|
return;
|
|
112
102
|
}
|
|
113
|
-
if (w.current.length < m && !
|
|
114
|
-
|
|
103
|
+
if (w.current.length < m && !P.current) {
|
|
104
|
+
c.current = !0, b(!0);
|
|
115
105
|
try {
|
|
116
|
-
let
|
|
117
|
-
for (; w.current.length < m && !
|
|
106
|
+
let E = 0;
|
|
107
|
+
for (; w.current.length < m && !P.current && E < Ee; ) {
|
|
118
108
|
const {
|
|
119
|
-
valid:
|
|
120
|
-
rawCount:
|
|
121
|
-
pageCount:
|
|
122
|
-
} = await
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
(
|
|
109
|
+
valid: $,
|
|
110
|
+
rawCount: le,
|
|
111
|
+
pageCount: de
|
|
112
|
+
} = await x(U.current, Le);
|
|
113
|
+
if (M()) return;
|
|
114
|
+
E += 1;
|
|
115
|
+
const J = $.filter(
|
|
116
|
+
(K) => !R.current.has(K.entityId)
|
|
127
117
|
);
|
|
128
|
-
|
|
118
|
+
J.forEach((K) => R.current.add(K.entityId)), w.current.push(...J), (le === 0 || U.current >= de) && (P.current = !0), U.current += 1;
|
|
129
119
|
}
|
|
130
|
-
} catch (
|
|
131
|
-
if (
|
|
132
|
-
console.warn("Error fetching list content:",
|
|
120
|
+
} catch (E) {
|
|
121
|
+
if (M()) return;
|
|
122
|
+
console.warn("Error fetching list content:", E), H(!0);
|
|
133
123
|
return;
|
|
134
124
|
} finally {
|
|
135
|
-
|
|
125
|
+
M() || (c.current = !1, b(!1));
|
|
136
126
|
}
|
|
137
127
|
}
|
|
138
|
-
if (
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
!
|
|
128
|
+
if (M()) return;
|
|
129
|
+
const g = [...C.current, ...w.current.splice(0, m)];
|
|
130
|
+
C.current = g, p(g), z(
|
|
131
|
+
!s && (w.current.length > 0 || !P.current)
|
|
142
132
|
);
|
|
143
|
-
}, [
|
|
144
|
-
(
|
|
145
|
-
const m = Math.max(1, Math.ceil(
|
|
146
|
-
|
|
133
|
+
}, [x, s, e, n, t]), S = Y(
|
|
134
|
+
(h, M) => {
|
|
135
|
+
const m = Math.max(1, Math.ceil(h.length / e)), g = Math.min(Math.max(M, 1), m);
|
|
136
|
+
p(h.slice((g - 1) * e, g * e)), W(m), v(g);
|
|
147
137
|
},
|
|
148
|
-
[
|
|
149
|
-
),
|
|
150
|
-
async (
|
|
151
|
-
if (
|
|
152
|
-
if (
|
|
153
|
-
|
|
138
|
+
[e]
|
|
139
|
+
), L = Y(
|
|
140
|
+
async (h) => {
|
|
141
|
+
if (h < 1) return;
|
|
142
|
+
if (f.current) {
|
|
143
|
+
S(f.current, h);
|
|
154
144
|
return;
|
|
155
145
|
}
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
|
|
146
|
+
if (c.current || !t || !n) return;
|
|
147
|
+
const M = a.current, m = () => M !== a.current;
|
|
148
|
+
c.current = !0, b(!0);
|
|
159
149
|
try {
|
|
160
150
|
const {
|
|
161
|
-
valid:
|
|
162
|
-
rawCount:
|
|
163
|
-
pageCount:
|
|
164
|
-
} = await
|
|
151
|
+
valid: g,
|
|
152
|
+
rawCount: E,
|
|
153
|
+
pageCount: $
|
|
154
|
+
} = await x(h, e);
|
|
165
155
|
if (m()) return;
|
|
166
|
-
if (
|
|
167
|
-
|
|
156
|
+
if (E > e) {
|
|
157
|
+
f.current = g, S(g, h);
|
|
168
158
|
return;
|
|
169
159
|
}
|
|
170
|
-
|
|
171
|
-
} catch (
|
|
160
|
+
p(g), W($), v(h);
|
|
161
|
+
} catch (g) {
|
|
172
162
|
if (m()) return;
|
|
173
|
-
console.warn("Error fetching list content:",
|
|
163
|
+
console.warn("Error fetching list content:", g), H(!0);
|
|
174
164
|
} finally {
|
|
175
|
-
m() || (
|
|
165
|
+
m() || (c.current = !1, b(!1));
|
|
176
166
|
}
|
|
177
167
|
},
|
|
178
|
-
[
|
|
168
|
+
[x, e, n, t, S]
|
|
179
169
|
);
|
|
180
|
-
return
|
|
181
|
-
|
|
182
|
-
}, [l,
|
|
183
|
-
items:
|
|
184
|
-
loading:
|
|
185
|
-
error:
|
|
170
|
+
return ye(() => {
|
|
171
|
+
a.current += 1, c.current = !1, w.current = [], C.current = [], R.current = /* @__PURE__ */ new Set(), U.current = 1, P.current = !1, f.current = null, p([]), H(!1), z(!l), v(1), W(1), l ? L(1) : B();
|
|
172
|
+
}, [l, L, B]), {
|
|
173
|
+
items: y,
|
|
174
|
+
loading: T,
|
|
175
|
+
error: V,
|
|
186
176
|
hasMore: Z,
|
|
187
|
-
loadMore:
|
|
188
|
-
page:
|
|
189
|
-
pageCount:
|
|
190
|
-
goToPage:
|
|
177
|
+
loadMore: B,
|
|
178
|
+
page: Q,
|
|
179
|
+
pageCount: N,
|
|
180
|
+
goToPage: L
|
|
191
181
|
};
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
switch (e) {
|
|
182
|
+
}, r = {
|
|
183
|
+
fontPrimary: "var(--fu-ucrc-font-primary)",
|
|
184
|
+
fontSecondary: "var(--fu-ucrc-font-secondary)",
|
|
185
|
+
space2xs: "var(--fu-ucrc-space-2xs)",
|
|
186
|
+
spaceXs: "var(--fu-ucrc-space-xs)",
|
|
187
|
+
spaceMd: "var(--fu-ucrc-space-md)",
|
|
188
|
+
radiusSm: "var(--fu-ucrc-radius-sm)",
|
|
189
|
+
radiusMd: "var(--fu-ucrc-radius-md)",
|
|
190
|
+
radiusXl: "var(--fu-ucrc-radius-xl)",
|
|
191
|
+
surface: "var(--fu-ucrc-surface)",
|
|
192
|
+
text: "var(--fu-ucrc-text-primary)",
|
|
193
|
+
primary: "var(--fu-ucrc-primary-plain-color)",
|
|
194
|
+
onPrimary: "var(--fu-ucrc-primary-on-primary)",
|
|
195
|
+
focus: "var(--fu-ucrc-focus-visible)"
|
|
196
|
+
}, F = {
|
|
197
|
+
text: "#fff",
|
|
198
|
+
dim: "rgba(255, 255, 255, 0.7)",
|
|
199
|
+
dimStrong: "rgba(255, 255, 255, 0.8)",
|
|
200
|
+
panel: "rgba(255, 255, 255, 0.1)",
|
|
201
|
+
/** Bottom-up scrim that keeps the title legible over any artwork. */
|
|
202
|
+
scrim: "linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.7) 25%, rgba(0,0,0,0) 40%)",
|
|
203
|
+
textShadow: "0 2px 4px rgba(0,0,0,0.4)",
|
|
204
|
+
labelShadow: "0 1px 2px rgba(0,0,0,0.4)"
|
|
205
|
+
}, ee = "{CONTENT_ID}", Re = (t, n) => {
|
|
206
|
+
switch (t) {
|
|
218
207
|
case "CLASSIC_QUIZ":
|
|
219
208
|
return n == null ? void 0 : n.classicQuizUrl;
|
|
220
209
|
case "PERSONALITY_QUIZ":
|
|
@@ -230,629 +219,602 @@ const Ut = bt("Users", [
|
|
|
230
219
|
default:
|
|
231
220
|
return;
|
|
232
221
|
}
|
|
233
|
-
},
|
|
234
|
-
const
|
|
235
|
-
return
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
222
|
+
}, Ue = (t) => !!(t != null && t.classicQuizUrl || t != null && t.personalityQuizUrl || t != null && t.eitherOrUrl || t != null && t.pollUrl || t != null && t.matchQuizUrl || t != null && t.eventGameUrl), Oe = (t, n) => {
|
|
223
|
+
const e = Re(t.entityType, n);
|
|
224
|
+
return e ? e.includes(ee) ? e.replace(ee, t.entityId) : e : null;
|
|
225
|
+
}, te = i({
|
|
226
|
+
position: "absolute",
|
|
227
|
+
zIndex: 0,
|
|
228
|
+
inset: 0,
|
|
229
|
+
borderRadius: `calc(${r.radiusMd} - 1px)`
|
|
230
|
+
}), ne = i({
|
|
231
|
+
margin: 0,
|
|
232
|
+
lineHeight: 1.5,
|
|
233
|
+
fontSize: "0.7em",
|
|
234
|
+
fontFamily: r.fontSecondary
|
|
235
|
+
}), d = {
|
|
236
|
+
// Joy's outlined Card.
|
|
237
|
+
card: i({
|
|
238
|
+
position: "relative",
|
|
239
|
+
display: "flex",
|
|
240
|
+
flexDirection: "column",
|
|
241
|
+
// No `height: 100%` here. As a grid item that percentage resolves against a row whose size
|
|
242
|
+
// depends on this card, so the card ends up taller than its own row and whatever follows the
|
|
243
|
+
// grid (the Load More button) is drawn over it. The grid's `align-items: stretch` already gives
|
|
244
|
+
// every card in a row the same height.
|
|
245
|
+
minHeight: "350px",
|
|
246
|
+
padding: "1em",
|
|
247
|
+
border: "1px solid var(--fu-ucrc-neutral-outlined-border)",
|
|
248
|
+
borderRadius: r.radiusMd,
|
|
249
|
+
backgroundColor: "var(--fu-ucrc-bg-surface)",
|
|
250
|
+
color: "var(--fu-ucrc-neutral-outlined-color)",
|
|
251
|
+
fontSize: "1em",
|
|
252
|
+
fontFamily: r.fontSecondary,
|
|
253
|
+
lineHeight: 1.5,
|
|
254
|
+
cursor: "pointer",
|
|
255
|
+
transition: "transform 0.2s",
|
|
256
|
+
"&:hover": { transform: "translateY(-4px)" }
|
|
257
|
+
}),
|
|
258
|
+
cover: te,
|
|
259
|
+
image: i({
|
|
260
|
+
display: "flex",
|
|
261
|
+
boxSizing: "border-box",
|
|
262
|
+
width: "100%",
|
|
263
|
+
height: "100%",
|
|
264
|
+
margin: 0,
|
|
265
|
+
padding: 0,
|
|
266
|
+
objectFit: "cover",
|
|
267
|
+
borderRadius: `calc(${r.radiusMd} - 1px)`,
|
|
268
|
+
transition: "transform 0.4s ease-out"
|
|
269
|
+
}),
|
|
270
|
+
// The title sits on client artwork, so it needs its own contrast floor.
|
|
271
|
+
scrim: i(te, { background: F.scrim }),
|
|
272
|
+
content: i({
|
|
273
|
+
zIndex: 1,
|
|
274
|
+
display: "flex",
|
|
275
|
+
flexDirection: "column",
|
|
276
|
+
flex: "9999 1 0%",
|
|
277
|
+
justifyContent: "flex-end"
|
|
278
|
+
}),
|
|
279
|
+
row: i({
|
|
280
|
+
display: "flex",
|
|
281
|
+
alignItems: "flex-end",
|
|
282
|
+
justifyContent: "space-between",
|
|
283
|
+
gap: r.spaceMd
|
|
284
|
+
}),
|
|
285
|
+
meta: i({
|
|
286
|
+
display: "flex",
|
|
287
|
+
gap: r.spaceXs,
|
|
288
|
+
alignItems: "center",
|
|
289
|
+
marginBottom: r.spaceXs
|
|
290
|
+
}),
|
|
291
|
+
// Joy's soft neutral Chip, size sm.
|
|
292
|
+
chip: i({
|
|
293
|
+
position: "relative",
|
|
294
|
+
boxSizing: "border-box",
|
|
295
|
+
display: "inline-flex",
|
|
296
|
+
alignItems: "center",
|
|
297
|
+
justifyContent: "center",
|
|
298
|
+
maxWidth: "max-content",
|
|
299
|
+
minHeight: "20px",
|
|
300
|
+
paddingInline: "6px",
|
|
301
|
+
borderRadius: r.radiusSm,
|
|
302
|
+
backgroundColor: "var(--fu-ucrc-neutral-soft-bg)",
|
|
303
|
+
color: "var(--fu-ucrc-neutral-soft-color)",
|
|
304
|
+
fontSize: "0.75em",
|
|
305
|
+
fontFamily: r.fontSecondary,
|
|
306
|
+
lineHeight: 1.5,
|
|
307
|
+
whiteSpace: "nowrap",
|
|
308
|
+
verticalAlign: "middle"
|
|
309
|
+
}),
|
|
310
|
+
chipLabel: i({
|
|
311
|
+
display: "inline-block",
|
|
312
|
+
flexGrow: 1,
|
|
313
|
+
minInlineSize: 0,
|
|
314
|
+
overflow: "hidden",
|
|
315
|
+
textOverflow: "ellipsis"
|
|
316
|
+
}),
|
|
317
|
+
count: i({
|
|
318
|
+
display: "flex",
|
|
319
|
+
alignItems: "center",
|
|
320
|
+
margin: 0,
|
|
321
|
+
lineHeight: 1.5,
|
|
322
|
+
fontSize: "0.875em",
|
|
323
|
+
fontFamily: r.fontSecondary,
|
|
324
|
+
color: F.text
|
|
325
|
+
}),
|
|
326
|
+
countIcon: i({ display: "inline-flex", marginInlineEnd: "clamp(4px, 0.375em, 12px)" }),
|
|
327
|
+
title: i({
|
|
328
|
+
flex: 1,
|
|
329
|
+
margin: 0,
|
|
330
|
+
fontSize: "1.5em",
|
|
331
|
+
fontFamily: r.fontPrimary,
|
|
332
|
+
fontWeight: 600,
|
|
333
|
+
lineHeight: 1.2,
|
|
334
|
+
color: F.text,
|
|
335
|
+
textShadow: F.textShadow,
|
|
336
|
+
// Entity titles come from the CMS, so they are not necessarily in the UI language — let each
|
|
337
|
+
// one take its direction from its own content.
|
|
338
|
+
unicodeBidi: "plaintext"
|
|
339
|
+
}),
|
|
340
|
+
sponsor: i({
|
|
341
|
+
display: "flex",
|
|
342
|
+
flexDirection: "column",
|
|
343
|
+
alignItems: "center",
|
|
344
|
+
gap: r.space2xs,
|
|
345
|
+
maxWidth: "120px",
|
|
346
|
+
flexShrink: 0
|
|
347
|
+
}),
|
|
348
|
+
sponsorLabel: i(ne, {
|
|
349
|
+
color: F.dim,
|
|
350
|
+
textShadow: F.labelShadow,
|
|
351
|
+
textAlign: "center"
|
|
352
|
+
}),
|
|
353
|
+
sponsorLogo: i({ "& img": { height: "100%", objectFit: "contain", maxWidth: "100%" } }),
|
|
354
|
+
mobileSponsor: i({
|
|
355
|
+
display: "flex",
|
|
356
|
+
alignItems: "center",
|
|
357
|
+
gap: r.spaceXs,
|
|
358
|
+
marginTop: r.spaceMd,
|
|
359
|
+
padding: r.spaceXs,
|
|
360
|
+
backgroundColor: F.panel,
|
|
361
|
+
borderRadius: r.radiusSm,
|
|
362
|
+
backdropFilter: "blur(4px)"
|
|
363
|
+
}),
|
|
364
|
+
mobileSponsorLabel: i(ne, { color: F.dimStrong }),
|
|
365
|
+
mobileSponsorLogo: i({ height: "24px", "& img": { height: "100%", objectFit: "contain" } })
|
|
366
|
+
}, _e = (t, n) => {
|
|
367
|
+
const e = t == null ? void 0 : t.images;
|
|
368
|
+
return e ? n ? e.mobileLogo || e.mainLogo || null : e.mainLogo || e.mobileLogo || null : null;
|
|
369
|
+
}, Fe = ({
|
|
370
|
+
item: t,
|
|
241
371
|
entityData: n,
|
|
242
|
-
typeLabel:
|
|
243
|
-
imagePlaceholder:
|
|
372
|
+
typeLabel: e,
|
|
373
|
+
imagePlaceholder: u,
|
|
244
374
|
onClick: l
|
|
245
375
|
}) => {
|
|
246
|
-
var
|
|
247
|
-
const { t:
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
"
|
|
273
|
-
{
|
|
274
|
-
src: ((s = n.images) == null ? void 0 : s.cover) || ((U = n.images) == null ? void 0 : U.main) || p || dt,
|
|
275
|
-
alt: n.title,
|
|
276
|
-
loading: "lazy",
|
|
277
|
-
style: { transition: "transform 0.4s ease-out" }
|
|
278
|
-
}
|
|
279
|
-
) }),
|
|
280
|
-
/* @__PURE__ */ o(q, { sx: { background: r.onImage.scrim } }),
|
|
281
|
-
/* @__PURE__ */ P(mt, { sx: { justifyContent: "flex-end", gap: 0 }, children: [
|
|
282
|
-
/* @__PURE__ */ P(
|
|
283
|
-
g,
|
|
284
|
-
{
|
|
285
|
-
sx: {
|
|
286
|
-
display: "flex",
|
|
287
|
-
alignItems: "flex-end",
|
|
288
|
-
justifyContent: "space-between",
|
|
289
|
-
gap: r.spacing.md
|
|
290
|
-
},
|
|
291
|
-
children: [
|
|
292
|
-
/* @__PURE__ */ P(g, { children: [
|
|
293
|
-
/* @__PURE__ */ P(
|
|
294
|
-
g,
|
|
295
|
-
{
|
|
296
|
-
sx: {
|
|
297
|
-
display: "flex",
|
|
298
|
-
gap: r.spacing.xs,
|
|
299
|
-
alignItems: "center",
|
|
300
|
-
marginBottom: r.spacing.xs
|
|
301
|
-
},
|
|
302
|
-
children: [
|
|
303
|
-
t && /* @__PURE__ */ o(
|
|
304
|
-
yt,
|
|
305
|
-
{
|
|
306
|
-
size: "sm",
|
|
307
|
-
color: "neutral",
|
|
308
|
-
variant: "soft",
|
|
309
|
-
sx: {
|
|
310
|
-
fontSize: "0.75em",
|
|
311
|
-
fontFamily: r.fonts.secondary,
|
|
312
|
-
borderRadius: r.radius.sm
|
|
313
|
-
},
|
|
314
|
-
children: t
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
!!n.participationCount && /* @__PURE__ */ o(
|
|
318
|
-
V,
|
|
319
|
-
{
|
|
320
|
-
startDecorator: /* @__PURE__ */ o(Ut, { size: 16, color: r.onImage.text }),
|
|
321
|
-
sx: {
|
|
322
|
-
fontSize: "0.875em",
|
|
323
|
-
fontFamily: r.fonts.secondary,
|
|
324
|
-
color: r.onImage.text
|
|
325
|
-
},
|
|
326
|
-
children: n.participationCount
|
|
327
|
-
}
|
|
328
|
-
)
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
),
|
|
332
|
-
/* @__PURE__ */ o(
|
|
333
|
-
V,
|
|
334
|
-
{
|
|
335
|
-
sx: {
|
|
336
|
-
fontSize: "1.5em",
|
|
337
|
-
fontFamily: r.fonts.primary,
|
|
338
|
-
fontWeight: 600,
|
|
339
|
-
lineHeight: 1.2,
|
|
340
|
-
color: r.onImage.text,
|
|
341
|
-
textShadow: r.onImage.textShadow,
|
|
342
|
-
// Entity titles come from the CMS, so they are not necessarily in the UI
|
|
343
|
-
// language — let each one take its direction from its own content.
|
|
344
|
-
unicodeBidi: "plaintext",
|
|
345
|
-
flex: 1
|
|
346
|
-
},
|
|
347
|
-
children: n.title
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
] }),
|
|
351
|
-
y && !c && /* @__PURE__ */ P(
|
|
352
|
-
g,
|
|
353
|
-
{
|
|
354
|
-
sx: {
|
|
355
|
-
display: "flex",
|
|
356
|
-
flexDirection: "column",
|
|
357
|
-
alignItems: "center",
|
|
358
|
-
gap: r.spacing["2xs"],
|
|
359
|
-
maxWidth: "120px",
|
|
360
|
-
flexShrink: 0
|
|
361
|
-
},
|
|
362
|
-
children: [
|
|
363
|
-
/* @__PURE__ */ o(
|
|
364
|
-
V,
|
|
365
|
-
{
|
|
366
|
-
sx: {
|
|
367
|
-
fontSize: "0.7em",
|
|
368
|
-
fontFamily: r.fonts.secondary,
|
|
369
|
-
color: r.onImage.dim,
|
|
370
|
-
textShadow: r.onImage.labelShadow,
|
|
371
|
-
textAlign: "center"
|
|
372
|
-
},
|
|
373
|
-
children: a("list.sponsoredBy")
|
|
374
|
-
}
|
|
375
|
-
),
|
|
376
|
-
/* @__PURE__ */ o(
|
|
377
|
-
g,
|
|
378
|
-
{
|
|
379
|
-
sx: {
|
|
380
|
-
"& img": {
|
|
381
|
-
height: "100%",
|
|
382
|
-
objectFit: "contain",
|
|
383
|
-
maxWidth: "100%"
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
children: /* @__PURE__ */ o("img", { src: y, alt: a("list.sponsoredBy") })
|
|
387
|
-
}
|
|
388
|
-
)
|
|
389
|
-
]
|
|
390
|
-
}
|
|
391
|
-
)
|
|
392
|
-
]
|
|
393
|
-
}
|
|
394
|
-
),
|
|
395
|
-
y && c && /* @__PURE__ */ P(
|
|
396
|
-
g,
|
|
397
|
-
{
|
|
398
|
-
sx: {
|
|
399
|
-
display: "flex",
|
|
400
|
-
alignItems: "center",
|
|
401
|
-
gap: r.spacing.xs,
|
|
402
|
-
marginTop: r.spacing.md,
|
|
403
|
-
padding: r.spacing.xs,
|
|
404
|
-
backgroundColor: r.onImage.panel,
|
|
405
|
-
borderRadius: r.radius.sm,
|
|
406
|
-
backdropFilter: "blur(4px)"
|
|
407
|
-
},
|
|
408
|
-
children: [
|
|
409
|
-
/* @__PURE__ */ o(
|
|
410
|
-
V,
|
|
411
|
-
{
|
|
412
|
-
sx: {
|
|
413
|
-
fontSize: "0.7em",
|
|
414
|
-
fontFamily: r.fonts.secondary,
|
|
415
|
-
color: r.onImage.dimStrong
|
|
416
|
-
},
|
|
417
|
-
children: a("list.sponsoredBy")
|
|
418
|
-
}
|
|
419
|
-
),
|
|
420
|
-
/* @__PURE__ */ o(
|
|
421
|
-
g,
|
|
422
|
-
{
|
|
423
|
-
sx: {
|
|
424
|
-
height: "24px",
|
|
425
|
-
"& img": {
|
|
426
|
-
height: "100%",
|
|
427
|
-
objectFit: "contain"
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
children: /* @__PURE__ */ o("img", { src: y, alt: a("list.sponsoredBy") })
|
|
431
|
-
}
|
|
432
|
-
)
|
|
433
|
-
]
|
|
434
|
-
}
|
|
435
|
-
)
|
|
376
|
+
var T, b;
|
|
377
|
+
const { t: s } = q(), y = ae(), p = _e(n.branding, y);
|
|
378
|
+
return /* @__PURE__ */ I("div", { css: d.card, onClick: () => l(t), children: [
|
|
379
|
+
/* @__PURE__ */ o("div", { css: d.cover, children: /* @__PURE__ */ o(
|
|
380
|
+
"img",
|
|
381
|
+
{
|
|
382
|
+
css: d.image,
|
|
383
|
+
src: ((T = n.images) == null ? void 0 : T.cover) || ((b = n.images) == null ? void 0 : b.main) || u || he,
|
|
384
|
+
alt: n.title,
|
|
385
|
+
loading: "lazy"
|
|
386
|
+
}
|
|
387
|
+
) }),
|
|
388
|
+
/* @__PURE__ */ o("div", { css: d.scrim }),
|
|
389
|
+
/* @__PURE__ */ I("div", { css: d.content, children: [
|
|
390
|
+
/* @__PURE__ */ I("div", { css: d.row, children: [
|
|
391
|
+
/* @__PURE__ */ I("div", { children: [
|
|
392
|
+
/* @__PURE__ */ I("div", { css: d.meta, children: [
|
|
393
|
+
e && /* @__PURE__ */ o("div", { css: d.chip, children: /* @__PURE__ */ o("span", { css: d.chipLabel, children: e }) }),
|
|
394
|
+
!!n.participationCount && /* @__PURE__ */ I("p", { css: d.count, children: [
|
|
395
|
+
/* @__PURE__ */ o("span", { css: d.countIcon, children: /* @__PURE__ */ o(be, { size: 16 }) }),
|
|
396
|
+
n.participationCount
|
|
397
|
+
] })
|
|
398
|
+
] }),
|
|
399
|
+
/* @__PURE__ */ o("p", { css: d.title, children: n.title })
|
|
400
|
+
] }),
|
|
401
|
+
p && !y && /* @__PURE__ */ I("div", { css: d.sponsor, children: [
|
|
402
|
+
/* @__PURE__ */ o("p", { css: d.sponsorLabel, children: s("list.sponsoredBy") }),
|
|
403
|
+
/* @__PURE__ */ o("div", { css: d.sponsorLogo, children: /* @__PURE__ */ o("img", { src: p, alt: s("list.sponsoredBy") }) })
|
|
436
404
|
] })
|
|
437
|
-
]
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
405
|
+
] }),
|
|
406
|
+
p && y && /* @__PURE__ */ I("div", { css: d.mobileSponsor, children: [
|
|
407
|
+
/* @__PURE__ */ o("p", { css: d.mobileSponsorLabel, children: s("list.sponsoredBy") }),
|
|
408
|
+
/* @__PURE__ */ o("div", { css: d.mobileSponsorLogo, children: /* @__PURE__ */ o("img", { src: p, alt: s("list.sponsoredBy") }) })
|
|
409
|
+
] })
|
|
410
|
+
] })
|
|
411
|
+
] });
|
|
412
|
+
}, Ae = j(() => import("./chunks/index-CSa2JU4m.js")), ke = j(
|
|
413
|
+
() => import("./chunks/index-w1LGN5dz.js")
|
|
414
|
+
), He = j(() => import("./chunks/index-Cxb4wEJU.js")), We = j(() => import("./chunks/index-Cei2fzi7.js")), Be = j(() => import("./chunks/index-BNl8scz6.js")), Qe = j(() => import("./chunks/index-Cd1dg0KI.js")), oe = "rgba(var(--fu-ucrc-shadow-channel) / var(--fu-ucrc-shadow-opacity))", D = {
|
|
415
|
+
// Joy's outlined ModalDialog, centred in the modal's fixed root, with no padding.
|
|
416
|
+
dialog: i({
|
|
417
|
+
position: "absolute",
|
|
418
|
+
top: "50%",
|
|
419
|
+
left: "50%",
|
|
420
|
+
transform: "translate(-50%, -50%)",
|
|
421
|
+
boxSizing: "border-box",
|
|
422
|
+
display: "flex",
|
|
423
|
+
flexDirection: "column",
|
|
424
|
+
minWidth: "min(calc(100vw - 40px), 300px)",
|
|
425
|
+
maxWidth: "95vw",
|
|
426
|
+
maxHeight: "95vh",
|
|
427
|
+
overflowY: "auto",
|
|
428
|
+
overflowX: "hidden",
|
|
429
|
+
padding: 0,
|
|
430
|
+
border: "1px solid var(--fu-ucrc-neutral-outlined-border)",
|
|
431
|
+
borderRadius: r.radiusMd,
|
|
432
|
+
outline: 0,
|
|
433
|
+
boxShadow: `var(--fu-ucrc-shadow-ring), 0px 2px 8px -2px ${oe}, 0px 6px 12px -2px ${oe}`,
|
|
434
|
+
backgroundColor: r.surface,
|
|
435
|
+
color: "var(--fu-ucrc-neutral-outlined-color)",
|
|
436
|
+
fontSize: "1em",
|
|
437
|
+
fontFamily: r.fontSecondary,
|
|
438
|
+
lineHeight: 1.5
|
|
439
|
+
}),
|
|
440
|
+
// Joy's ModalClose: 8px inset, 2em square. The dialog has no padding, so it overlaps the
|
|
441
|
+
// content and sits on top of it. No hover/press fill: it read as a white tile over the image.
|
|
442
|
+
close: i({
|
|
443
|
+
position: "absolute",
|
|
444
|
+
zIndex: 1,
|
|
445
|
+
top: "8px",
|
|
446
|
+
right: "8px",
|
|
447
|
+
boxSizing: "border-box",
|
|
448
|
+
display: "inline-flex",
|
|
449
|
+
alignItems: "center",
|
|
450
|
+
justifyContent: "center",
|
|
451
|
+
minWidth: "2em",
|
|
452
|
+
minHeight: "2em",
|
|
453
|
+
margin: 0,
|
|
454
|
+
paddingBlock: 0,
|
|
455
|
+
paddingInline: "4px",
|
|
456
|
+
border: "none",
|
|
457
|
+
// Joy's ModalClose radius, derived from the dialog's.
|
|
458
|
+
borderRadius: `max(calc(${r.radiusMd} - 9px), min(4px, calc((${r.radiusMd} - 1px) / 2)))`,
|
|
459
|
+
backgroundColor: "transparent",
|
|
460
|
+
color: "var(--fu-ucrc-palette-text-secondary)",
|
|
461
|
+
fontFamily: "inherit",
|
|
462
|
+
fontSize: "1em",
|
|
463
|
+
cursor: "pointer",
|
|
464
|
+
WebkitTapHighlightColor: "transparent",
|
|
465
|
+
"& svg": { color: "var(--fu-ucrc-palette-text-icon)" },
|
|
466
|
+
"@media (hover: hover)": {
|
|
467
|
+
"&:hover": { color: "var(--fu-ucrc-neutral-plain-hover-color)" }
|
|
468
|
+
},
|
|
469
|
+
"&:hover svg, &:active svg, &:focus-visible svg": { color: "currentColor" },
|
|
470
|
+
"&:focus-visible": { outline: `2px solid ${r.focus}`, outlineOffset: "2px" }
|
|
471
|
+
}),
|
|
472
|
+
// The played widget's own stacking (its image headline sits at z-index 1, the same layer as the
|
|
473
|
+
// close button but later in tree order) would otherwise swallow the button's clicks; a shadow
|
|
474
|
+
// root doesn't isolate z-index. `zIndex: 0` confines it to its own context.
|
|
475
|
+
body: i({ position: "relative", zIndex: 0, fontSize: "1em" }),
|
|
476
|
+
unsupported: i({ padding: r.spaceMd, textAlign: "center" }),
|
|
477
|
+
unsupportedText: i({
|
|
478
|
+
margin: 0,
|
|
479
|
+
lineHeight: 1.5,
|
|
480
|
+
fontSize: "1em",
|
|
481
|
+
fontFamily: r.fontSecondary,
|
|
482
|
+
color: r.text
|
|
483
|
+
})
|
|
484
|
+
}, Ne = ({
|
|
485
|
+
item: t,
|
|
444
486
|
open: n,
|
|
445
|
-
onClose:
|
|
446
|
-
listProps:
|
|
487
|
+
onClose: e,
|
|
488
|
+
listProps: u
|
|
447
489
|
}) => {
|
|
448
|
-
const { t: l } =
|
|
449
|
-
sdk:
|
|
490
|
+
const { t: l } = q(), {
|
|
491
|
+
sdk: s,
|
|
450
492
|
language: y,
|
|
451
|
-
themeOptions:
|
|
452
|
-
userIsLoggedIn:
|
|
453
|
-
signInCTA:
|
|
454
|
-
additionalCTA:
|
|
455
|
-
shareCTA:
|
|
456
|
-
rulesDisplay:
|
|
457
|
-
leads:
|
|
458
|
-
consents:
|
|
459
|
-
chanceGameVariant:
|
|
460
|
-
showAnswerExplanations:
|
|
461
|
-
hideCorrectOption:
|
|
462
|
-
aggregateTranslatedVotes:
|
|
463
|
-
optionsLayout:
|
|
464
|
-
imagePosition:
|
|
465
|
-
defaultImagePlaceholderUrl:
|
|
466
|
-
disableCache:
|
|
467
|
-
matchQuiz:
|
|
493
|
+
themeOptions: p,
|
|
494
|
+
userIsLoggedIn: T,
|
|
495
|
+
signInCTA: b,
|
|
496
|
+
additionalCTA: V,
|
|
497
|
+
shareCTA: H,
|
|
498
|
+
rulesDisplay: Z,
|
|
499
|
+
leads: z,
|
|
500
|
+
consents: Q,
|
|
501
|
+
chanceGameVariant: v,
|
|
502
|
+
showAnswerExplanations: N,
|
|
503
|
+
hideCorrectOption: W,
|
|
504
|
+
aggregateTranslatedVotes: w,
|
|
505
|
+
optionsLayout: C,
|
|
506
|
+
imagePosition: R,
|
|
507
|
+
defaultImagePlaceholderUrl: U,
|
|
508
|
+
disableCache: P,
|
|
509
|
+
matchQuiz: c,
|
|
468
510
|
eventGame: f,
|
|
469
|
-
callbacks:
|
|
470
|
-
} =
|
|
471
|
-
sdk:
|
|
511
|
+
callbacks: a
|
|
512
|
+
} = u, O = {
|
|
513
|
+
sdk: s,
|
|
472
514
|
language: y,
|
|
473
|
-
themeOptions:
|
|
474
|
-
leads:
|
|
475
|
-
consents:
|
|
476
|
-
userIsLoggedIn:
|
|
477
|
-
signInCTA:
|
|
478
|
-
additionalCTA:
|
|
479
|
-
rulesDisplay:
|
|
480
|
-
defaultImagePlaceholderUrl:
|
|
481
|
-
disableCache:
|
|
482
|
-
template:
|
|
483
|
-
imagePosition:
|
|
484
|
-
},
|
|
485
|
-
if (!
|
|
486
|
-
switch (
|
|
515
|
+
themeOptions: p,
|
|
516
|
+
leads: z,
|
|
517
|
+
consents: Q,
|
|
518
|
+
userIsLoggedIn: T,
|
|
519
|
+
signInCTA: b,
|
|
520
|
+
additionalCTA: V,
|
|
521
|
+
rulesDisplay: Z,
|
|
522
|
+
defaultImagePlaceholderUrl: U,
|
|
523
|
+
disableCache: P,
|
|
524
|
+
template: me.STANDARD,
|
|
525
|
+
imagePosition: R
|
|
526
|
+
}, x = { ...O, chanceGameVariant: v }, B = () => {
|
|
527
|
+
if (!t) return null;
|
|
528
|
+
switch (t.entityType) {
|
|
487
529
|
case "CLASSIC_QUIZ":
|
|
488
530
|
return /* @__PURE__ */ o(
|
|
489
|
-
|
|
531
|
+
Ae,
|
|
490
532
|
{
|
|
491
|
-
...
|
|
492
|
-
entityId:
|
|
493
|
-
shareCTA:
|
|
494
|
-
showAnswerExplanations:
|
|
495
|
-
hideCorrectOption:
|
|
496
|
-
optionsLayout:
|
|
533
|
+
...x,
|
|
534
|
+
entityId: t.entityId,
|
|
535
|
+
shareCTA: H,
|
|
536
|
+
showAnswerExplanations: N,
|
|
537
|
+
hideCorrectOption: W,
|
|
538
|
+
optionsLayout: C,
|
|
497
539
|
callbacks: {
|
|
498
|
-
onFinish:
|
|
499
|
-
onShare:
|
|
540
|
+
onFinish: a == null ? void 0 : a.onFinish,
|
|
541
|
+
onShare: a == null ? void 0 : a.onShare
|
|
500
542
|
}
|
|
501
543
|
}
|
|
502
544
|
);
|
|
503
545
|
case "PERSONALITY_QUIZ":
|
|
504
546
|
return /* @__PURE__ */ o(
|
|
505
|
-
|
|
547
|
+
ke,
|
|
506
548
|
{
|
|
507
|
-
...
|
|
508
|
-
entityId:
|
|
509
|
-
showAnswerExplanations:
|
|
510
|
-
optionsLayout:
|
|
511
|
-
callbacks: { onFinish:
|
|
549
|
+
...x,
|
|
550
|
+
entityId: t.entityId,
|
|
551
|
+
showAnswerExplanations: N,
|
|
552
|
+
optionsLayout: C,
|
|
553
|
+
callbacks: { onFinish: a == null ? void 0 : a.onFinish }
|
|
512
554
|
}
|
|
513
555
|
);
|
|
514
556
|
case "POLL":
|
|
515
557
|
return /* @__PURE__ */ o(
|
|
516
|
-
|
|
558
|
+
He,
|
|
517
559
|
{
|
|
518
|
-
...
|
|
519
|
-
entityId:
|
|
520
|
-
optionsLayout:
|
|
521
|
-
aggregateTranslatedVotes:
|
|
522
|
-
callbacks: { onFinish:
|
|
560
|
+
...x,
|
|
561
|
+
entityId: t.entityId,
|
|
562
|
+
optionsLayout: C,
|
|
563
|
+
aggregateTranslatedVotes: w,
|
|
564
|
+
callbacks: { onFinish: a == null ? void 0 : a.onFinish }
|
|
523
565
|
}
|
|
524
566
|
);
|
|
525
567
|
case "EITHER_OR":
|
|
526
568
|
return /* @__PURE__ */ o(
|
|
527
|
-
|
|
569
|
+
We,
|
|
528
570
|
{
|
|
529
|
-
...
|
|
530
|
-
entityId:
|
|
531
|
-
callbacks: { onFinish:
|
|
571
|
+
...O,
|
|
572
|
+
entityId: t.entityId,
|
|
573
|
+
callbacks: { onFinish: a == null ? void 0 : a.onFinish }
|
|
532
574
|
}
|
|
533
575
|
);
|
|
534
576
|
case "MATCH_QUIZ":
|
|
535
577
|
return /* @__PURE__ */ o(
|
|
536
|
-
|
|
578
|
+
Be,
|
|
537
579
|
{
|
|
538
|
-
...
|
|
539
|
-
entityId:
|
|
540
|
-
showPredictionDetails: (
|
|
541
|
-
showCountdown: (
|
|
542
|
-
showTeamLabels: (
|
|
543
|
-
showPoints: (
|
|
544
|
-
callbacks: { onFinish:
|
|
580
|
+
...x,
|
|
581
|
+
entityId: t.entityId,
|
|
582
|
+
showPredictionDetails: (c == null ? void 0 : c.showPredictionDetails) ?? !0,
|
|
583
|
+
showCountdown: (c == null ? void 0 : c.showCountdown) ?? !0,
|
|
584
|
+
showTeamLabels: (c == null ? void 0 : c.showTeamLabels) ?? !0,
|
|
585
|
+
showPoints: (c == null ? void 0 : c.showPoints) ?? !0,
|
|
586
|
+
callbacks: { onFinish: a == null ? void 0 : a.onFinish }
|
|
545
587
|
}
|
|
546
588
|
);
|
|
547
589
|
case "CUSTOM_EVENT_GAME":
|
|
548
590
|
return /* @__PURE__ */ o(
|
|
549
|
-
|
|
591
|
+
Qe,
|
|
550
592
|
{
|
|
551
|
-
...
|
|
552
|
-
entityId:
|
|
553
|
-
optionsLayout:
|
|
593
|
+
...x,
|
|
594
|
+
entityId: t.entityId,
|
|
595
|
+
optionsLayout: C,
|
|
554
596
|
showPredictionDetails: (f == null ? void 0 : f.showPredictionDetails) ?? !0,
|
|
555
597
|
showCountdown: (f == null ? void 0 : f.showCountdown) ?? !0,
|
|
556
598
|
showPoints: (f == null ? void 0 : f.showPoints) ?? !0,
|
|
557
|
-
callbacks: { onFinish:
|
|
599
|
+
callbacks: { onFinish: a == null ? void 0 : a.onFinish }
|
|
558
600
|
}
|
|
559
601
|
);
|
|
560
602
|
default:
|
|
561
|
-
return /* @__PURE__ */ o(
|
|
562
|
-
V,
|
|
563
|
-
{
|
|
564
|
-
sx: {
|
|
565
|
-
fontSize: "1em",
|
|
566
|
-
fontFamily: a.fonts.secondary,
|
|
567
|
-
color: a.colors.text
|
|
568
|
-
},
|
|
569
|
-
children: l("list.unsupportedContentType", { type: e.entityType })
|
|
570
|
-
}
|
|
571
|
-
) });
|
|
603
|
+
return /* @__PURE__ */ o("div", { css: D.unsupported, children: /* @__PURE__ */ o("p", { css: D.unsupportedText, children: l("list.unsupportedContentType", { type: t.entityType }) }) });
|
|
572
604
|
}
|
|
573
605
|
};
|
|
574
|
-
return /* @__PURE__ */ o(
|
|
575
|
-
|
|
576
|
-
{
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
// Joy's plain hover/active fill reads as a white tile over the item's image.
|
|
602
|
-
"&:hover": { backgroundColor: "transparent" },
|
|
603
|
-
"&:active": { backgroundColor: "transparent" }
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
),
|
|
607
|
-
/* @__PURE__ */ o(g, { sx: { position: "relative", zIndex: 0, fontSize: "1em" }, children: /* @__PURE__ */ o(St, { fallback: /* @__PURE__ */ o(tt, { my: 4 }), children: x() }) })
|
|
608
|
-
]
|
|
609
|
-
}
|
|
610
|
-
)
|
|
606
|
+
return /* @__PURE__ */ o(ue, { open: n, onClose: e, children: /* @__PURE__ */ I("div", { role: "dialog", "aria-modal": "true", tabIndex: -1, css: D.dialog, children: [
|
|
607
|
+
/* @__PURE__ */ o("button", { type: "button", "aria-label": l("common.rules.close", "Close"), css: D.close, onClick: e, children: /* @__PURE__ */ o(we, { size: "calc(2em / 1.5)" }) }),
|
|
608
|
+
/* @__PURE__ */ o("div", { css: D.body, children: /* @__PURE__ */ o(xe, { fallback: /* @__PURE__ */ o(ie, { marginBlock: "32px" }), children: B() }) })
|
|
609
|
+
] }) });
|
|
610
|
+
}, ce = i({
|
|
611
|
+
boxSizing: "border-box",
|
|
612
|
+
display: "inline-flex",
|
|
613
|
+
alignItems: "center",
|
|
614
|
+
justifyContent: "center",
|
|
615
|
+
position: "relative",
|
|
616
|
+
minWidth: "2em",
|
|
617
|
+
minHeight: "2em",
|
|
618
|
+
margin: 0,
|
|
619
|
+
border: "none",
|
|
620
|
+
borderRadius: r.radiusSm,
|
|
621
|
+
backgroundColor: "transparent",
|
|
622
|
+
color: r.text,
|
|
623
|
+
fontFamily: r.fontPrimary,
|
|
624
|
+
fontSize: "0.875em",
|
|
625
|
+
fontWeight: "inherit",
|
|
626
|
+
cursor: "pointer",
|
|
627
|
+
WebkitTapHighlightColor: "transparent",
|
|
628
|
+
"&:focus-visible": { outline: `2px solid ${r.focus}`, outlineOffset: "2px" },
|
|
629
|
+
"@media (hover: hover)": {
|
|
630
|
+
"&:hover": {
|
|
631
|
+
backgroundColor: "var(--fu-ucrc-neutral-plain-hover-bg)",
|
|
632
|
+
color: "var(--fu-ucrc-neutral-plain-hover-color)"
|
|
611
633
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
})
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
634
|
+
},
|
|
635
|
+
"&:active": { backgroundColor: "var(--fu-ucrc-neutral-plain-active-bg)" },
|
|
636
|
+
"&:disabled": {
|
|
637
|
+
pointerEvents: "none",
|
|
638
|
+
cursor: "default",
|
|
639
|
+
color: "var(--fu-ucrc-neutral-plain-disabled-color)"
|
|
640
|
+
}
|
|
641
|
+
}), re = i(ce, {
|
|
642
|
+
paddingBlock: "6px",
|
|
643
|
+
paddingInline: "16px",
|
|
644
|
+
lineHeight: "inherit",
|
|
645
|
+
userSelect: "none",
|
|
646
|
+
fontWeight: 400,
|
|
647
|
+
"&:hover": { backgroundColor: r.surface }
|
|
648
|
+
}), A = {
|
|
649
|
+
root: i({
|
|
650
|
+
display: "flex",
|
|
651
|
+
alignItems: "center",
|
|
652
|
+
justifyContent: "center",
|
|
653
|
+
flexWrap: "wrap",
|
|
654
|
+
gap: r.space2xs
|
|
655
|
+
}),
|
|
656
|
+
// The UA's `line-height: normal` stays: Joy's IconButton never set one.
|
|
657
|
+
icon: i(ce, { paddingInline: "4px", paddingBlock: 0 }),
|
|
658
|
+
page: re,
|
|
659
|
+
// Hover and press keep the brand fill and its text colour.
|
|
660
|
+
current: i(re, {
|
|
661
|
+
fontWeight: 600,
|
|
662
|
+
backgroundColor: r.primary,
|
|
663
|
+
color: r.onPrimary,
|
|
664
|
+
"@media (hover: hover)": { "&:hover": { color: r.onPrimary } },
|
|
665
|
+
"&:hover, &:active": { backgroundColor: r.primary }
|
|
666
|
+
}),
|
|
667
|
+
ellipsis: i({
|
|
668
|
+
display: "flex",
|
|
669
|
+
alignItems: "center",
|
|
670
|
+
justifyContent: "center",
|
|
630
671
|
minWidth: "2em",
|
|
631
672
|
minHeight: "2em",
|
|
632
|
-
borderRadius:
|
|
633
|
-
fontFamily:
|
|
673
|
+
borderRadius: r.radiusSm,
|
|
674
|
+
fontFamily: r.fontPrimary,
|
|
634
675
|
fontSize: "0.875em",
|
|
635
|
-
color:
|
|
676
|
+
color: r.text,
|
|
677
|
+
opacity: 0.6
|
|
678
|
+
})
|
|
679
|
+
}, $e = (t, n) => {
|
|
680
|
+
const e = [];
|
|
681
|
+
for (let u = t; u <= n; u += 1) e.push(u);
|
|
682
|
+
return e;
|
|
683
|
+
}, je = (t, n) => {
|
|
684
|
+
if (n <= 0) return [];
|
|
685
|
+
const e = [1], u = Math.max(2, t - 1), l = Math.min(n - 1, t + 1);
|
|
686
|
+
return u > 2 && e.push("gap-start"), e.push(...$e(u, l)), l < n - 1 && e.push("gap-end"), n > 1 && e.push(n), e;
|
|
687
|
+
}, Ve = ({
|
|
688
|
+
page: t,
|
|
689
|
+
count: n,
|
|
690
|
+
disabled: e = !1,
|
|
691
|
+
onChange: u
|
|
692
|
+
}) => {
|
|
693
|
+
const l = (s) => {
|
|
694
|
+
s >= 1 && s <= n && s !== t && u(s);
|
|
636
695
|
};
|
|
637
|
-
return /* @__PURE__ */
|
|
638
|
-
|
|
639
|
-
{
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
{
|
|
662
|
-
variant: "plain",
|
|
663
|
-
color: "neutral",
|
|
664
|
-
disabled: t || e === 1,
|
|
665
|
-
onClick: () => a(e - 1),
|
|
666
|
-
sx: r,
|
|
667
|
-
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Pt, { size: 18 }) })
|
|
668
|
-
}
|
|
669
|
-
),
|
|
670
|
-
Gt(e, n).map((c, y) => {
|
|
671
|
-
if (typeof c == "string")
|
|
672
|
-
return /* @__PURE__ */ o(
|
|
673
|
-
g,
|
|
674
|
-
{
|
|
675
|
-
sx: {
|
|
676
|
-
...r,
|
|
677
|
-
display: "flex",
|
|
678
|
-
alignItems: "center",
|
|
679
|
-
justifyContent: "center",
|
|
680
|
-
opacity: 0.6
|
|
681
|
-
},
|
|
682
|
-
children: "…"
|
|
683
|
-
},
|
|
684
|
-
`${c}-${y}`
|
|
685
|
-
);
|
|
686
|
-
const s = c === e;
|
|
687
|
-
return /* @__PURE__ */ o(
|
|
688
|
-
et,
|
|
689
|
-
{
|
|
690
|
-
variant: "plain",
|
|
691
|
-
color: "neutral",
|
|
692
|
-
disabled: t,
|
|
693
|
-
onClick: () => a(c),
|
|
694
|
-
sx: {
|
|
695
|
-
...r,
|
|
696
|
-
fontWeight: s ? 600 : 400,
|
|
697
|
-
bgcolor: s ? l.colors.primary : "transparent",
|
|
698
|
-
color: s ? l.colors.onPrimary : l.colors.text,
|
|
699
|
-
"&:hover": {
|
|
700
|
-
bgcolor: s ? l.colors.primary : l.colors.surface
|
|
701
|
-
}
|
|
702
|
-
},
|
|
703
|
-
children: c
|
|
704
|
-
},
|
|
705
|
-
c
|
|
706
|
-
);
|
|
707
|
-
}),
|
|
708
|
-
/* @__PURE__ */ o(
|
|
709
|
-
W,
|
|
710
|
-
{
|
|
711
|
-
variant: "plain",
|
|
712
|
-
color: "neutral",
|
|
713
|
-
disabled: t || e === n,
|
|
714
|
-
onClick: () => a(e + 1),
|
|
715
|
-
sx: r,
|
|
716
|
-
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Et, { size: 18 }) })
|
|
717
|
-
}
|
|
718
|
-
),
|
|
719
|
-
/* @__PURE__ */ o(
|
|
720
|
-
W,
|
|
721
|
-
{
|
|
722
|
-
variant: "plain",
|
|
723
|
-
color: "neutral",
|
|
724
|
-
disabled: t || e === n,
|
|
725
|
-
onClick: () => a(n),
|
|
726
|
-
sx: r,
|
|
727
|
-
children: /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(Mt, { size: 18 }) })
|
|
728
|
-
}
|
|
729
|
-
)
|
|
730
|
-
]
|
|
731
|
-
}
|
|
732
|
-
);
|
|
733
|
-
}, $t = {
|
|
696
|
+
return /* @__PURE__ */ I("div", { css: A.root, children: [
|
|
697
|
+
/* @__PURE__ */ o("button", { type: "button", css: A.icon, disabled: e || t === 1, onClick: () => l(1), children: /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(ve, { size: 18 }) }) }),
|
|
698
|
+
/* @__PURE__ */ o("button", { type: "button", css: A.icon, disabled: e || t === 1, onClick: () => l(t - 1), children: /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(Ce, { size: 18 }) }) }),
|
|
699
|
+
je(t, n).map((s, y) => {
|
|
700
|
+
if (typeof s == "string")
|
|
701
|
+
return /* @__PURE__ */ o("div", { css: A.ellipsis, children: "…" }, `${s}-${y}`);
|
|
702
|
+
const p = s === t;
|
|
703
|
+
return /* @__PURE__ */ o(
|
|
704
|
+
"button",
|
|
705
|
+
{
|
|
706
|
+
type: "button",
|
|
707
|
+
css: p ? A.current : A.page,
|
|
708
|
+
"aria-current": p ? "page" : void 0,
|
|
709
|
+
disabled: e,
|
|
710
|
+
onClick: () => l(s),
|
|
711
|
+
children: s
|
|
712
|
+
},
|
|
713
|
+
s
|
|
714
|
+
);
|
|
715
|
+
}),
|
|
716
|
+
/* @__PURE__ */ o("button", { type: "button", css: A.icon, disabled: e || t === n, onClick: () => l(t + 1), children: /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(Se, { size: 18 }) }) }),
|
|
717
|
+
/* @__PURE__ */ o("button", { type: "button", css: A.icon, disabled: e || t === n, onClick: () => l(n), children: /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(Ie, { size: 18 }) }) })
|
|
718
|
+
] });
|
|
719
|
+
}, Ze = {
|
|
734
720
|
CLASSIC_QUIZ: "list.types.classicQuiz",
|
|
735
721
|
PERSONALITY_QUIZ: "list.types.personalityQuiz",
|
|
736
722
|
EITHER_OR: "list.types.eitherOr",
|
|
737
723
|
POLL: "list.types.poll",
|
|
738
724
|
MATCH_QUIZ: "list.types.matchQuiz",
|
|
739
725
|
CUSTOM_EVENT_GAME: "list.types.eventGame"
|
|
740
|
-
},
|
|
726
|
+
}, X = {
|
|
727
|
+
root: i({ fontSize: "1em", fontFamily: r.fontSecondary }),
|
|
728
|
+
grid: i({ display: "grid", gap: r.spaceXs, marginBottom: r.spaceMd }),
|
|
729
|
+
loadMoreRow: i({ display: "flex", justifyContent: "center", marginTop: r.spaceMd }),
|
|
730
|
+
loadMore: i(pe, {
|
|
731
|
+
padding: "10px 16px",
|
|
732
|
+
borderRadius: r.radiusXl,
|
|
733
|
+
backgroundColor: r.primary,
|
|
734
|
+
color: r.onPrimary,
|
|
735
|
+
fontFamily: r.fontPrimary,
|
|
736
|
+
fontSize: "0.9375em",
|
|
737
|
+
fontWeight: 500,
|
|
738
|
+
lineHeight: "24px",
|
|
739
|
+
letterSpacing: "0.46px",
|
|
740
|
+
textTransform: "uppercase",
|
|
741
|
+
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
742
|
+
transform: "scale(1)",
|
|
743
|
+
"&:hover": { transform: "scale(1.02)" },
|
|
744
|
+
"&:active": { transform: "scale(0.98)" }
|
|
745
|
+
}),
|
|
746
|
+
pagination: i({ marginTop: r.spaceMd })
|
|
747
|
+
}, De = (t) => {
|
|
741
748
|
const {
|
|
742
749
|
entityId: n,
|
|
743
|
-
sdk:
|
|
744
|
-
itemsCount:
|
|
750
|
+
sdk: e,
|
|
751
|
+
itemsCount: u = 10,
|
|
745
752
|
itemsPerRow: l = 2,
|
|
746
|
-
widgetMode:
|
|
747
|
-
urls:
|
|
748
|
-
defaultImagePlaceholderUrl:
|
|
749
|
-
} =
|
|
750
|
-
items:
|
|
751
|
-
loading:
|
|
752
|
-
error:
|
|
753
|
-
hasMore:
|
|
754
|
-
loadMore:
|
|
755
|
-
page:
|
|
756
|
-
pageCount:
|
|
757
|
-
goToPage:
|
|
758
|
-
} =
|
|
759
|
-
const
|
|
760
|
-
if (
|
|
761
|
-
window.location.href =
|
|
753
|
+
widgetMode: s = "load-more",
|
|
754
|
+
urls: y,
|
|
755
|
+
defaultImagePlaceholderUrl: p
|
|
756
|
+
} = t, { t: T } = q(), b = ae(), [V, H] = k(null), [Z, z] = k(!1), {
|
|
757
|
+
items: Q,
|
|
758
|
+
loading: v,
|
|
759
|
+
error: N,
|
|
760
|
+
hasMore: W,
|
|
761
|
+
loadMore: w,
|
|
762
|
+
page: C,
|
|
763
|
+
pageCount: R,
|
|
764
|
+
goToPage: U
|
|
765
|
+
} = ze(e, n, u, s), P = Ue(y), c = s === "paged", f = (S) => {
|
|
766
|
+
const L = Oe(S, y);
|
|
767
|
+
if (L) {
|
|
768
|
+
window.location.href = L;
|
|
762
769
|
return;
|
|
763
770
|
}
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
return
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
const C = $t[x.entityType];
|
|
780
|
-
return /* @__PURE__ */ o(
|
|
781
|
-
Ht,
|
|
782
|
-
{
|
|
783
|
-
item: x,
|
|
784
|
-
entityData: u,
|
|
785
|
-
typeLabel: C ? y(C) : "",
|
|
786
|
-
imagePlaceholder: c || "",
|
|
787
|
-
onClick: d
|
|
788
|
-
},
|
|
789
|
-
x.entityId
|
|
790
|
-
);
|
|
791
|
-
})
|
|
792
|
-
}
|
|
793
|
-
),
|
|
794
|
-
E && /* @__PURE__ */ o(tt, { my: 4 }),
|
|
795
|
-
F && /* @__PURE__ */ o(
|
|
796
|
-
g,
|
|
797
|
-
{
|
|
798
|
-
sx: {
|
|
799
|
-
display: "flex",
|
|
800
|
-
justifyContent: "center",
|
|
801
|
-
marginTop: s.spacing.md
|
|
771
|
+
P || (H(S), z(!0));
|
|
772
|
+
}, a = b ? 1 : Math.max(1, Math.floor(l)), O = c && R > 1, x = !c && W && !v, B = !(c && v);
|
|
773
|
+
return N || !v && Q.length === 0 && !O ? null : /* @__PURE__ */ I("div", { css: X.root, children: [
|
|
774
|
+
B && /* @__PURE__ */ o("div", { css: X.grid, style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` }, children: Q.map((S) => {
|
|
775
|
+
const L = se(S);
|
|
776
|
+
if (!L) return null;
|
|
777
|
+
const h = Ze[S.entityType];
|
|
778
|
+
return /* @__PURE__ */ o(
|
|
779
|
+
Fe,
|
|
780
|
+
{
|
|
781
|
+
item: S,
|
|
782
|
+
entityData: L,
|
|
783
|
+
typeLabel: h ? T(h) : "",
|
|
784
|
+
imagePlaceholder: p || "",
|
|
785
|
+
onClick: f
|
|
802
786
|
},
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
borderRadius: s.radius.xl,
|
|
810
|
-
py: "10px",
|
|
811
|
-
px: "16px",
|
|
812
|
-
bgcolor: s.colors.primary,
|
|
813
|
-
color: s.colors.onPrimary,
|
|
814
|
-
fontFamily: s.fonts.primary,
|
|
815
|
-
fontSize: "0.9375em",
|
|
816
|
-
fontWeight: 500,
|
|
817
|
-
lineHeight: "24px",
|
|
818
|
-
letterSpacing: "0.46px",
|
|
819
|
-
textTransform: "uppercase",
|
|
820
|
-
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
821
|
-
transform: "scale(1)",
|
|
822
|
-
"&:hover": {
|
|
823
|
-
bgcolor: s.colors.primary,
|
|
824
|
-
transform: "scale(1.02)"
|
|
825
|
-
},
|
|
826
|
-
"&:active": {
|
|
827
|
-
color: s.colors.onPrimary,
|
|
828
|
-
transform: "scale(0.98)"
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
children: y("list.loadMore")
|
|
832
|
-
}
|
|
833
|
-
)
|
|
834
|
-
}
|
|
835
|
-
),
|
|
836
|
-
i && /* @__PURE__ */ o(g, { sx: { marginTop: s.spacing.md }, children: /* @__PURE__ */ o(
|
|
837
|
-
Kt,
|
|
838
|
-
{
|
|
839
|
-
page: k,
|
|
840
|
-
count: I,
|
|
841
|
-
disabled: E,
|
|
842
|
-
onChange: M
|
|
843
|
-
}
|
|
844
|
-
) }),
|
|
787
|
+
S.entityId
|
|
788
|
+
);
|
|
789
|
+
}) }),
|
|
790
|
+
v && /* @__PURE__ */ o(ie, { marginBlock: "32px" }),
|
|
791
|
+
x && /* @__PURE__ */ o("div", { css: X.loadMoreRow, children: /* @__PURE__ */ o("button", { type: "button", css: X.loadMore, onClick: w, children: T("list.loadMore") }) }),
|
|
792
|
+
O && /* @__PURE__ */ o("div", { css: X.pagination, children: /* @__PURE__ */ o(Ve, { page: C, count: R, disabled: v, onChange: U }) }),
|
|
845
793
|
/* @__PURE__ */ o(
|
|
846
|
-
|
|
794
|
+
Ne,
|
|
847
795
|
{
|
|
848
|
-
item:
|
|
849
|
-
open:
|
|
850
|
-
onClose: () =>
|
|
851
|
-
listProps:
|
|
796
|
+
item: V,
|
|
797
|
+
open: Z,
|
|
798
|
+
onClose: () => z(!1),
|
|
799
|
+
listProps: t
|
|
852
800
|
}
|
|
853
801
|
)
|
|
854
802
|
] });
|
|
855
|
-
},
|
|
803
|
+
}, Xe = (t) => {
|
|
804
|
+
var n;
|
|
805
|
+
return /* @__PURE__ */ o(
|
|
806
|
+
fe,
|
|
807
|
+
{
|
|
808
|
+
packageName: "list",
|
|
809
|
+
language: t.language,
|
|
810
|
+
themeOptions: t.themeOptions,
|
|
811
|
+
disableCache: t.disableCache,
|
|
812
|
+
optionsLayout: t.optionsLayout,
|
|
813
|
+
leadPhoneCountryCode: (n = t.leads) == null ? void 0 : n.phoneCountryCode,
|
|
814
|
+
children: /* @__PURE__ */ o(De, { ...t })
|
|
815
|
+
}
|
|
816
|
+
);
|
|
817
|
+
}, rt = Me(Xe);
|
|
856
818
|
export {
|
|
857
|
-
|
|
819
|
+
rt as List
|
|
858
820
|
};
|