fansunited-frontend-components 0.0.95 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Betslip.d.ts +1 -2
- package/Betslip.d.ts.map +1 -1
- package/Betslip.js +4 -3
- package/ChanceGame.js +165 -163
- package/ChanceGameComponent.d.ts +1 -1
- package/ChanceGameComponent.d.ts.map +1 -1
- package/ClassicQuizPlay.d.ts +1 -1
- package/ClassicQuizPlay.d.ts.map +1 -1
- package/ClassicQuizPlay.js +4 -3
- package/CollectLead.d.ts +1 -1
- package/CollectLead.d.ts.map +1 -1
- package/CollectLead.js +37 -36
- package/CompetitionStatistics.d.ts +1 -2
- package/CompetitionStatistics.d.ts.map +1 -1
- package/CompetitionStatistics.js +458 -451
- package/CompetitorCard.d.ts +1 -2
- package/CompetitorCard.d.ts.map +1 -1
- package/CompetitorCard.js +1235 -1226
- package/Discussion.d.ts +1 -1
- package/Discussion.d.ts.map +1 -1
- package/Discussion.js +4 -3
- package/EitherOrPlay.d.ts +1 -1
- package/EitherOrPlay.d.ts.map +1 -1
- package/EitherOrPlay.js +4 -3
- package/EventCard.d.ts +1 -2
- package/EventCard.d.ts.map +1 -1
- package/EventCard.js +1249 -1244
- package/EventGamePlay.d.ts +1 -1
- package/EventGamePlay.d.ts.map +1 -1
- package/EventGamePlay.js +4 -3
- package/Leaderboard.d.ts +1 -1
- package/Leaderboard.d.ts.map +1 -1
- package/Leaderboard.js +482 -449
- package/List.d.ts +1 -2
- package/List.d.ts.map +1 -1
- package/List.js +258 -254
- package/MatchQuizPlay.d.ts +1 -1
- package/MatchQuizPlay.d.ts.map +1 -1
- package/MatchQuizPlay.js +4 -3
- package/Odds.d.ts +1 -2
- package/Odds.d.ts.map +1 -1
- package/Odds.js +35 -34
- package/PersonalityQuizPlay.d.ts +1 -1
- package/PersonalityQuizPlay.d.ts.map +1 -1
- package/PersonalityQuizPlay.js +4 -3
- package/PickThePair.js +102 -100
- package/PickThePairComponent.d.ts +1 -1
- package/PickThePairComponent.d.ts.map +1 -1
- package/PlayerOfTheMatch.d.ts +1 -2
- package/PlayerOfTheMatch.d.ts.map +1 -1
- package/PlayerOfTheMatch.js +1096 -1085
- package/PollVote.d.ts +1 -1
- package/PollVote.d.ts.map +1 -1
- package/PollVote.js +4 -3
- package/Predictor.d.ts +1 -2
- package/Predictor.d.ts.map +1 -1
- package/Predictor.js +4553 -4525
- package/README.md +1 -1
- package/Standings.d.ts +1 -2
- package/Standings.d.ts.map +1 -1
- package/Standings.js +404 -394
- package/TopX.d.ts +1 -2
- package/TopX.d.ts.map +1 -1
- package/TopX.js +5296 -5286
- package/chunks/{ChanceGameEmbedVariant-C3NGwvTF.js → ChanceGameEmbedVariant-CVys-3Zh.js} +1 -1
- package/chunks/{OddsSkeleton-Bav8FHHN.js → OddsSkeleton-ClJE2xhR.js} +5 -5
- package/chunks/{OddsStrip-CviVfQI4.js → OddsStrip-BnSp5TXa.js} +3 -3
- package/chunks/{PickOneOfX-a6Dv0-rR.js → PickOneOfX-DaJtkbCw.js} +6 -6
- package/chunks/index-Aq5MbUB9.js +4 -0
- package/chunks/index-BBQm_8LD.js +4 -0
- package/chunks/index-BC_sWWgc.js +4 -0
- package/chunks/index-DXKDJ1Vp.js +4 -0
- package/chunks/index-DjT5NrbA.js +4 -0
- package/chunks/index-DvLRehH6.js +4 -0
- package/chunks/index-aIMaxR-p.js +4 -0
- package/chunks/{main-Dj4Manb5.js → main-52Wff7qC.js} +1763 -1757
- package/chunks/{main-dwV_55lz.js → main-65WcUqAl.js} +615 -615
- package/chunks/{main-gexg6lc-.js → main-B58mi9jx.js} +349 -334
- package/chunks/{main-Dys2_Jt2.js → main-BIdXUTZS.js} +842 -827
- package/chunks/{main-CFwRpvUi.js → main-DD-NEzC7.js} +818 -817
- package/chunks/{main-DjiQz1dv.js → main-DUnfJPzY.js} +311 -311
- package/chunks/{main-eAQMCxQ7.js → main-DpCBqqg_.js} +322 -321
- package/chunks/{main-D9tFZv2q.js → main-Drznt1ak.js} +283 -282
- package/chunks/withVersionStamp-B6nArAj4.js +16 -0
- package/index.d.ts.map +1 -1
- package/index.js +45 -50
- package/package.json +57 -49
- package/withVersionStamp.d.ts +4 -0
- package/withVersionStamp.d.ts.map +1 -0
- package/chunks/3dicons-bookmark-fav-dynamic-color-BkMV51tL.js +0 -4
- package/chunks/3dicons-crow-dynamic-color-BnvCj9i8.js +0 -4
- package/chunks/3dicons-fire-dynamic-color-rNRL0kAe.js +0 -4
- package/chunks/3dicons-flag-dynamic-color-BscQxNXn.js +0 -4
- package/chunks/3dicons-medal-dynamic-color-CsR036OL.js +0 -4
- package/chunks/3dicons-rocket-dynamic-color-EiHCJ2rb.js +0 -4
- package/chunks/3dicons-target-dynamic-color-ChQzHpwv.js +0 -4
- package/chunks/3dicons-thumb-down-dynamic-color-NQLnsNFt.js +0 -4
- package/chunks/index-B1d9q8fX.js +0 -4
- package/chunks/index-BP0pvFJ4.js +0 -4
- package/chunks/index-CHZyL_g_.js +0 -4
- package/chunks/index-CeCUdRmF.js +0 -4
- package/chunks/index-Ckyyw-I8.js +0 -4
- package/chunks/index-DGvCP5G8.js +0 -4
- package/chunks/index-yjMVOgwO.js +0 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { isMobile as ht, useColors as bt, useFontFamily as yt, useCurrentThemeMode as xt, useSpacingScale as $, useCornerRadius as T, useBorderSize as A, toIntlLocale as J, betslipApi as j, Portal as
|
|
3
|
-
import V, { useState as R, useRef as at, useEffect as _, createContext as
|
|
1
|
+
import { jsx as a, jsxs as g, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { isMobile as ht, useColors as bt, useFontFamily as yt, useCurrentThemeMode as xt, useSpacingScale as $, useCornerRadius as T, useBorderSize as A, toIntlLocale as J, useDisableCache as St, betslipApi as j, Portal as wt } from "fansunited-frontend-core";
|
|
3
|
+
import V, { useState as R, useRef as at, useEffect as _, createContext as vt, useMemo as q, useCallback as Y, useContext as Ct } from "react";
|
|
4
4
|
import z from "@emotion/styled";
|
|
5
5
|
import { keyframes as B, Global as st, css as lt } from "@emotion/react";
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { MatchOddsFilters as kt } from "fansunited-sdk-esm";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
function
|
|
6
|
+
import { useTranslation as k } from "react-i18next";
|
|
7
|
+
import { MatchOddsFilters as kt } from "fansunited-sdk-esm/models";
|
|
8
|
+
import Rt from "@mui/icons-material/KeyboardArrowUp";
|
|
9
|
+
import It from "@mui/icons-material/KeyboardArrowDown";
|
|
10
|
+
function _t(t) {
|
|
11
11
|
const e = {}, n = /* @__PURE__ */ new Set();
|
|
12
12
|
return t.forEach((o) => {
|
|
13
13
|
const s = `${o.eventId}::${o.marketId}`;
|
|
@@ -17,37 +17,37 @@ function It(t) {
|
|
|
17
17
|
function ct(t) {
|
|
18
18
|
return t.filter((e) => e.status === "active" || !e.status).reduce((e, n) => e * n.odds, 1);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const l = o ?? "Away", r = e.toLowerCase(),
|
|
20
|
+
function $t(t, e, n, o, s, i) {
|
|
21
|
+
const l = o ?? "Away", r = e.toLowerCase(), u = (i == null ? void 0 : i.draw) || s("betslip.outcomes.draw"), y = (i == null ? void 0 : i.yes) || s("betslip.outcomes.yes"), p = (i == null ? void 0 : i.no) || s("betslip.outcomes.no"), d = (i == null ? void 0 : i.over) || s("betslip.outcomes.over"), c = (i == null ? void 0 : i.under) || s("betslip.outcomes.under"), h = (i == null ? void 0 : i.noGoal) || s("betslip.outcomes.noGoal"), b = (i == null ? void 0 : i.nobody) || s("betslip.outcomes.nobody"), m = (i == null ? void 0 : i.or) || s("betslip.outcomes.or");
|
|
22
22
|
switch (t) {
|
|
23
23
|
case "FT_1X2":
|
|
24
24
|
case "HT_1X2":
|
|
25
25
|
if (e === "1") return n;
|
|
26
|
-
if (r === "x") return
|
|
26
|
+
if (r === "x") return u;
|
|
27
27
|
if (e === "2") return l;
|
|
28
28
|
break;
|
|
29
29
|
case "DOUBLE_CHANCE": {
|
|
30
30
|
const f = e.toUpperCase();
|
|
31
|
-
if (f === "1X") return `${n} ${
|
|
32
|
-
if (f === "12") return `${n} ${
|
|
33
|
-
if (f === "X2") return `${
|
|
31
|
+
if (f === "1X") return `${n} ${m} ${u}`;
|
|
32
|
+
if (f === "12") return `${n} ${m} ${l}`;
|
|
33
|
+
if (f === "X2") return `${u} ${m} ${l}`;
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
36
|
case "BOTH_TEAMS_SCORE":
|
|
37
37
|
case "RED_CARD_MATCH":
|
|
38
38
|
case "PENALTY_MATCH":
|
|
39
|
-
if (r === "yes") return
|
|
40
|
-
if (r === "no") return
|
|
39
|
+
if (r === "yes") return y;
|
|
40
|
+
if (r === "no") return p;
|
|
41
41
|
break;
|
|
42
42
|
case "CORRECT_SCORE":
|
|
43
43
|
case "CORRECT_SCORE_ADVANCED":
|
|
44
44
|
case "CORRECT_SCORE_HT": {
|
|
45
45
|
const f = e.split(/[-:]/).map(Number);
|
|
46
|
-
return f.length === 2 && !isNaN(f[0]) && !isNaN(f[1]) ? f[0] > f[1] ? n : f[1] > f[0] ? l :
|
|
46
|
+
return f.length === 2 && !isNaN(f[0]) && !isNaN(f[1]) ? f[0] > f[1] ? n : f[1] > f[0] ? l : u : e;
|
|
47
47
|
}
|
|
48
48
|
case "HT_FT": {
|
|
49
49
|
const f = e.toUpperCase();
|
|
50
|
-
return (f.includes("/") ? f.split("/") : f.split("")).map((v) => v === "1" ? n : v === "2" ? l :
|
|
50
|
+
return (f.includes("/") ? f.split("/") : f.split("")).map((v) => v === "1" ? n : v === "2" ? l : u).join(" / ");
|
|
51
51
|
}
|
|
52
52
|
case "DRAW_NO_BET":
|
|
53
53
|
if (e === "1") return n;
|
|
@@ -57,7 +57,7 @@ function _t(t, e, n, o, s, i) {
|
|
|
57
57
|
case "LAST_TEAM_TO_SCORE":
|
|
58
58
|
if (e === "1") return n;
|
|
59
59
|
if (e === "2") return l;
|
|
60
|
-
if (r === "none" || r === "no goal") return
|
|
60
|
+
if (r === "none" || r === "no goal") return h;
|
|
61
61
|
break;
|
|
62
62
|
case "PLAYER_SCORE_FIRST_GOAL":
|
|
63
63
|
case "PLAYER_SCORE":
|
|
@@ -65,7 +65,7 @@ function _t(t, e, n, o, s, i) {
|
|
|
65
65
|
case "PLAYER_SCORE_HATTRICK":
|
|
66
66
|
case "PLAYER_RED_CARD":
|
|
67
67
|
case "PLAYER_YELLOW_CARD":
|
|
68
|
-
return r === "none" || r === "no goal" || r === "nobody" ?
|
|
68
|
+
return r === "none" || r === "no goal" || r === "nobody" ? b : e;
|
|
69
69
|
}
|
|
70
70
|
const x = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
71
71
|
if (x) {
|
|
@@ -74,24 +74,24 @@ function _t(t, e, n, o, s, i) {
|
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Lt(t) {
|
|
78
78
|
return `${t.eventId}:${t.market}:${t.outcome}`;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Tt(t) {
|
|
81
81
|
var n;
|
|
82
82
|
const e = (n = t.participantTwo) == null ? void 0 : n.name;
|
|
83
83
|
return e ? `${t.participantOne.name} vs ${e}` : t.participantOne.name;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Et(t, e, n) {
|
|
86
86
|
return t.map((o) => {
|
|
87
87
|
var s, i, l;
|
|
88
88
|
return {
|
|
89
|
-
id:
|
|
89
|
+
id: Lt(o),
|
|
90
90
|
eventId: o.eventId,
|
|
91
91
|
marketId: o.market,
|
|
92
|
-
event:
|
|
92
|
+
event: Tt(o),
|
|
93
93
|
market: o.market,
|
|
94
|
-
name:
|
|
94
|
+
name: $t(
|
|
95
95
|
o.market,
|
|
96
96
|
o.outcome,
|
|
97
97
|
o.participantOne.name,
|
|
@@ -113,7 +113,7 @@ function Tt(t, e, n) {
|
|
|
113
113
|
};
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const zt = {
|
|
117
117
|
HT_FT: ["first_half_and_final_result", "htft", "ht_ft"],
|
|
118
118
|
BOTH_TEAMS_SCORE: ["both_to_score", "btts", "gg"],
|
|
119
119
|
DOUBLE_CHANCE: ["double_chance", "dc"],
|
|
@@ -123,43 +123,43 @@ const Et = {
|
|
|
123
123
|
PLAYER_RED_CARD: ["player_red_card", "red_card"],
|
|
124
124
|
PLAYER_YELLOW_CARD: ["player_yellow_card", "yellow_card"]
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function Ot(t) {
|
|
127
127
|
return t.replace(/^FT_/i, "").toLowerCase();
|
|
128
128
|
}
|
|
129
129
|
const dt = /^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i;
|
|
130
|
-
function
|
|
130
|
+
function At(t, e) {
|
|
131
131
|
const n = t.toLowerCase();
|
|
132
|
-
if (n === e.toLowerCase() || n ===
|
|
133
|
-
const o =
|
|
132
|
+
if (n === e.toLowerCase() || n === Ot(e)) return !0;
|
|
133
|
+
const o = zt[e];
|
|
134
134
|
return !!(o !== void 0 && o.includes(n) || dt.test(e) && n === "over_under");
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Bt(t) {
|
|
137
137
|
const e = t.split(":");
|
|
138
138
|
return e[e.length - 1];
|
|
139
139
|
}
|
|
140
140
|
function pt(t, e, n) {
|
|
141
|
-
var
|
|
141
|
+
var u, y, p, d, c, h;
|
|
142
142
|
if (!t) return null;
|
|
143
|
-
const o =
|
|
144
|
-
for (const
|
|
145
|
-
const
|
|
146
|
-
if (!
|
|
147
|
-
const x =
|
|
148
|
-
for (const f of
|
|
143
|
+
const o = Bt(n), s = e.match(dt), i = s !== null, l = i ? o.toLowerCase() === "no" ? "under" : o.toLowerCase() === "yes" ? "over" : o.toLowerCase() : null, r = i ? `${s[3]}.${s[4]}` : null;
|
|
144
|
+
for (const b of t.markets ?? []) {
|
|
145
|
+
const m = ((u = b == null ? void 0 : b.type) == null ? void 0 : u.code) ?? "";
|
|
146
|
+
if (!At(m, e)) continue;
|
|
147
|
+
const x = m.toLowerCase() !== "over_under";
|
|
148
|
+
for (const f of b.selections ?? [])
|
|
149
149
|
if (i) {
|
|
150
|
-
const S = ((
|
|
150
|
+
const S = ((y = f.code) == null ? void 0 : y.toLowerCase()) === l || ((p = f.name) == null ? void 0 : p.toLowerCase()) === l, v = x || r === null || ((d = f.value) == null ? void 0 : d.toString()) === r;
|
|
151
151
|
if (S && v) return f;
|
|
152
|
-
} else if (((c = f.code) == null ? void 0 : c.toLowerCase()) === o.toLowerCase() || ((
|
|
152
|
+
} else if (((c = f.code) == null ? void 0 : c.toLowerCase()) === o.toLowerCase() || ((h = f.name) == null ? void 0 : h.toLowerCase()) === o.toLowerCase())
|
|
153
153
|
return f;
|
|
154
154
|
}
|
|
155
155
|
return null;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Dt(t, e, n, o, s) {
|
|
158
158
|
if (!t || !e.includes(o) || !t.has(n)) return !1;
|
|
159
159
|
const i = (t.get(n) ?? [])[0];
|
|
160
160
|
return pt(i, o, s) === null;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Wt(t, e) {
|
|
163
163
|
return t.map((n) => {
|
|
164
164
|
var i, l, r;
|
|
165
165
|
const o = (e.get(n.eventId) ?? [])[0], s = pt(o, n.marketId, n.id);
|
|
@@ -174,11 +174,11 @@ function Dt(t, e) {
|
|
|
174
174
|
} : n;
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
const { operatorId: s, affiliateId: i } = o, [l, r] = R(null), [
|
|
179
|
-
if (!t ||
|
|
180
|
-
const
|
|
181
|
-
...new Set(
|
|
177
|
+
function Ut(t, e, n, o = {}) {
|
|
178
|
+
const { operatorId: s, affiliateId: i } = o, [l, r] = R(null), [u, y] = R([]), [p, d] = R(!1), c = at(null), h = async (b) => {
|
|
179
|
+
if (!t || b.length === 0) return;
|
|
180
|
+
const m = [...new Set(b.map((S) => S.eventId))], x = [
|
|
181
|
+
...new Set(b.map((S) => S.market))
|
|
182
182
|
], f = new kt({
|
|
183
183
|
marketTypes: x,
|
|
184
184
|
...s ? { operators: [s] } : {},
|
|
@@ -186,18 +186,18 @@ function Wt(t, e, n, o = {}) {
|
|
|
186
186
|
});
|
|
187
187
|
d(!0);
|
|
188
188
|
try {
|
|
189
|
-
const S = await t.odds.getByMatchIds(
|
|
190
|
-
r(S),
|
|
189
|
+
const S = await t.odds.getByMatchIds(m, f);
|
|
190
|
+
r(S), y(x);
|
|
191
191
|
} catch {
|
|
192
192
|
} finally {
|
|
193
193
|
d(!1);
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
|
-
return _(() => (
|
|
196
|
+
return _(() => (h(e), c.current && clearInterval(c.current), t && n > 0 && e.length > 0 && (c.current = setInterval(() => h(e), n)), () => {
|
|
197
197
|
c.current && clearInterval(c.current);
|
|
198
|
-
}), [JSON.stringify(e), n, s, i]), { oddsMap: l, oddsLoading:
|
|
198
|
+
}), [JSON.stringify(e), n, s, i]), { oddsMap: l, oddsLoading: p, oddsMarkets: u };
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function Ft(t) {
|
|
201
201
|
var e, n, o;
|
|
202
202
|
for (const s of t.values()) {
|
|
203
203
|
const i = s[0];
|
|
@@ -206,41 +206,41 @@ function Ut(t) {
|
|
|
206
206
|
if (l) return l;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Ht(t, e) {
|
|
210
210
|
var o;
|
|
211
211
|
const n = e ? "mobile" : "desktop";
|
|
212
212
|
for (const s of t.values()) {
|
|
213
213
|
const i = s[0];
|
|
214
214
|
if (!i) continue;
|
|
215
|
-
const l = ((o = i.bookmaker) == null ? void 0 : o.links) ?? [], r = l.find((
|
|
215
|
+
const l = ((o = i.bookmaker) == null ? void 0 : o.links) ?? [], r = l.find((u) => u.appType === n) ?? l[0];
|
|
216
216
|
if (r != null && r.homepageUrl) return r.homepageUrl;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function Pt(t, e) {
|
|
220
220
|
var o, s;
|
|
221
221
|
const n = e ? "mobile" : "desktop";
|
|
222
222
|
for (const i of t.values()) {
|
|
223
|
-
const l = ((s = (o = i[0]) == null ? void 0 : o.bookmaker) == null ? void 0 : s.betslipUrlTemplate) ?? [], r = l.find((
|
|
223
|
+
const l = ((s = (o = i[0]) == null ? void 0 : o.bookmaker) == null ? void 0 : s.betslipUrlTemplate) ?? [], r = l.find((u) => u.appType === n) ?? l[0];
|
|
224
224
|
if (r != null && r.url) return r.url;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Nt(t) {
|
|
228
228
|
var e, n;
|
|
229
229
|
for (const o of t.values()) {
|
|
230
230
|
const s = (n = (e = o[0]) == null ? void 0 : e.bookmaker) == null ? void 0 : n.betslipIdSeparator;
|
|
231
231
|
if (s) return s;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function jt(t) {
|
|
235
235
|
var e, n, o, s, i;
|
|
236
236
|
for (const l of t.values()) {
|
|
237
237
|
const r = l[0];
|
|
238
238
|
if (!r) continue;
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
239
|
+
const u = ((n = (e = r.bookmaker) == null ? void 0 : e.branding) == null ? void 0 : n.backgroundColor) ?? ((i = (s = (o = r.bookmaker) == null ? void 0 : o.assets) == null ? void 0 : s[0]) == null ? void 0 : i.backgroundColor);
|
|
240
|
+
if (u) return u;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
const mt =
|
|
243
|
+
const mt = vt(null), Mt = ({
|
|
244
244
|
labels: t = {},
|
|
245
245
|
initialSelections: e = [],
|
|
246
246
|
maxSelections: n,
|
|
@@ -249,24 +249,24 @@ const mt = wt(null), jt = ({
|
|
|
249
249
|
ctaUrlTemplate: i,
|
|
250
250
|
onExternalRemove: l,
|
|
251
251
|
sharedOddsMap: r,
|
|
252
|
-
children:
|
|
252
|
+
children: u
|
|
253
253
|
}) => {
|
|
254
|
-
const { t:
|
|
254
|
+
const { t: y } = k(), [p, d] = R(e), [c, h] = R(""), [b, m] = R(!0), x = ht();
|
|
255
255
|
_(() => {
|
|
256
256
|
d(e);
|
|
257
257
|
}, [JSON.stringify(e)]);
|
|
258
258
|
const f = q(() => {
|
|
259
259
|
if (!r) return !1;
|
|
260
|
-
const
|
|
261
|
-
return Array.isArray(
|
|
260
|
+
const C = r.values().next().value;
|
|
261
|
+
return Array.isArray(C) && C[0] !== void 0;
|
|
262
262
|
}, [r]), S = q(() => {
|
|
263
|
-
const
|
|
264
|
-
return r ?
|
|
265
|
-
}, [
|
|
266
|
-
(
|
|
263
|
+
const C = Et(p, y, t.outcomeLabels);
|
|
264
|
+
return r ? Wt(C, r) : C;
|
|
265
|
+
}, [p, r, y, t.outcomeLabels]), v = _t(S), w = r ? Ft(r) : void 0, D = r ? Ht(r, x) : void 0, W = r ? jt(r) : void 0, U = r ? Pt(r, x) : void 0, F = r ? Nt(r) : void 0, H = Y(
|
|
266
|
+
(C) => {
|
|
267
267
|
d(
|
|
268
|
-
(P) => P.filter((E) => `${E.eventId}:${E.market}:${E.outcome}` !==
|
|
269
|
-
), l == null || l(
|
|
268
|
+
(P) => P.filter((E) => `${E.eventId}:${E.market}:${E.outcome}` !== C)
|
|
269
|
+
), l == null || l(C);
|
|
270
270
|
},
|
|
271
271
|
[l]
|
|
272
272
|
);
|
|
@@ -275,10 +275,10 @@ const mt = wt(null), jt = ({
|
|
|
275
275
|
{
|
|
276
276
|
value: {
|
|
277
277
|
labels: t,
|
|
278
|
-
selectionInputs:
|
|
278
|
+
selectionInputs: p,
|
|
279
279
|
selections: S,
|
|
280
280
|
combStake: c,
|
|
281
|
-
open:
|
|
281
|
+
open: b,
|
|
282
282
|
oddsLoading: !1,
|
|
283
283
|
oddsReady: f,
|
|
284
284
|
conflictIds: v,
|
|
@@ -292,18 +292,18 @@ const mt = wt(null), jt = ({
|
|
|
292
292
|
bookmakerBetslipTemplate: U,
|
|
293
293
|
bookmakerIdSeparator: F,
|
|
294
294
|
onRemove: H,
|
|
295
|
-
setCombStake:
|
|
296
|
-
setOpen:
|
|
295
|
+
setCombStake: h,
|
|
296
|
+
setOpen: m
|
|
297
297
|
},
|
|
298
|
-
children:
|
|
298
|
+
children: u
|
|
299
299
|
}
|
|
300
300
|
);
|
|
301
301
|
}, I = () => {
|
|
302
|
-
const t =
|
|
302
|
+
const t = Ct(mt);
|
|
303
303
|
if (!t) throw new Error("useBetslip must be used within BetslipProvider");
|
|
304
304
|
return t;
|
|
305
305
|
};
|
|
306
|
-
function
|
|
306
|
+
function Yt(t) {
|
|
307
307
|
const e = bt(), n = yt(), s = xt() === "light";
|
|
308
308
|
return {
|
|
309
309
|
primary: t || e.palette.primary.plainColor,
|
|
@@ -329,7 +329,7 @@ const Q = ({
|
|
|
329
329
|
position: n,
|
|
330
330
|
brandingLogoUrl: o
|
|
331
331
|
}) => {
|
|
332
|
-
const { labels: s, selections: i, open: l, setOpen: r, maxSelections:
|
|
332
|
+
const { labels: s, selections: i, open: l, setOpen: r, maxSelections: u, bookmakerLogoUrl: y } = I(), { t: p } = k(), d = $(), c = T(), m = e ? "0" : n === "bottom-right" || n === "bottom-left" ? `${c.md} ${c.md} 0 0` : n === "top-right" || n === "top-left" ? `0 0 ${c.md} ${c.md}` : "0", x = o || y, f = {
|
|
333
333
|
background: "none",
|
|
334
334
|
border: "none",
|
|
335
335
|
cursor: "pointer",
|
|
@@ -343,7 +343,7 @@ const Q = ({
|
|
|
343
343
|
justifyContent: "center",
|
|
344
344
|
transition: "background .15s"
|
|
345
345
|
};
|
|
346
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ g(
|
|
347
347
|
"div",
|
|
348
348
|
{
|
|
349
349
|
style: {
|
|
@@ -357,11 +357,11 @@ const Q = ({
|
|
|
357
357
|
justifyContent: "space-between",
|
|
358
358
|
flexShrink: 0,
|
|
359
359
|
color: "#fff",
|
|
360
|
-
borderRadius:
|
|
360
|
+
borderRadius: m,
|
|
361
361
|
fontFamily: t.font
|
|
362
362
|
},
|
|
363
363
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
365
365
|
x ? /* @__PURE__ */ a(
|
|
366
366
|
"img",
|
|
367
367
|
{
|
|
@@ -387,10 +387,10 @@ const Q = ({
|
|
|
387
387
|
letterSpacing: "-0.5px",
|
|
388
388
|
color: "#fff"
|
|
389
389
|
},
|
|
390
|
-
children: s.title ||
|
|
390
|
+
children: s.title || p("betslip.title")
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
|
-
i.length > 0 &&
|
|
393
|
+
i.length > 0 && u != null && /* @__PURE__ */ g(
|
|
394
394
|
"span",
|
|
395
395
|
{
|
|
396
396
|
style: {
|
|
@@ -402,7 +402,7 @@ const Q = ({
|
|
|
402
402
|
children: [
|
|
403
403
|
i.length,
|
|
404
404
|
"/",
|
|
405
|
-
|
|
405
|
+
u
|
|
406
406
|
]
|
|
407
407
|
}
|
|
408
408
|
)
|
|
@@ -415,15 +415,15 @@ const Q = ({
|
|
|
415
415
|
title: l ? "Collapse" : "Expand",
|
|
416
416
|
onMouseEnter: (S) => S.currentTarget.style.background = "rgba(255,255,255,.18)",
|
|
417
417
|
onMouseLeave: (S) => S.currentTarget.style.background = "none",
|
|
418
|
-
children: l ? /* @__PURE__ */ a(
|
|
418
|
+
children: l ? /* @__PURE__ */ a(It, { sx: { fontSize: "1.125em", color: "inherit" } }) : /* @__PURE__ */ a(Rt, { sx: { fontSize: "1.125em", color: "inherit" } })
|
|
419
419
|
}
|
|
420
420
|
)
|
|
421
421
|
]
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
424
|
}, Z = ({ tokens: t }) => {
|
|
425
|
-
const { t: e } =
|
|
426
|
-
return /* @__PURE__ */
|
|
425
|
+
const { t: e } = k(), n = $(), o = A();
|
|
426
|
+
return /* @__PURE__ */ g(
|
|
427
427
|
"div",
|
|
428
428
|
{
|
|
429
429
|
style: {
|
|
@@ -461,13 +461,13 @@ const Q = ({
|
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
};
|
|
464
|
-
function
|
|
465
|
-
const s = e.map((
|
|
464
|
+
function Vt(t, e, n, o = ",") {
|
|
465
|
+
const s = e.map((p) => p.selectionId).filter((p) => !!p), i = s.join(","), l = s.map(encodeURIComponent).join(o), r = e[0], u = encodeURIComponent(
|
|
466
466
|
typeof window < "u" ? window.location.href : ""
|
|
467
|
-
),
|
|
468
|
-
return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(i)).replace(/\{currentUrl\}/g,
|
|
467
|
+
), y = String(n);
|
|
468
|
+
return t.replace(/\{betslip_ids\}/g, l).replace(/\{selectionIds\}/g, encodeURIComponent(i)).replace(/\{currentUrl\}/g, u).replace(/\{stake\}/g, y).replace(/\{eventId\}/g, (r == null ? void 0 : r.eventId) ?? "").replace(/\{oddsDecimal\}/g, r ? String(r.odds) : "").replace(/\{market\}/g, (r == null ? void 0 : r.marketId) ?? "").replace(/\{outcome\}/g, (r == null ? void 0 : r.name) ?? "");
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const Gt = z.a`
|
|
471
471
|
display: flex;
|
|
472
472
|
align-items: center;
|
|
473
473
|
justify-content: center;
|
|
@@ -495,17 +495,17 @@ const Vt = z.a`
|
|
|
495
495
|
selections: i,
|
|
496
496
|
combStake: l,
|
|
497
497
|
bookmakerLogoUrl: r,
|
|
498
|
-
bookmakerHomepageUrl:
|
|
499
|
-
bookmakerBetslipTemplate:
|
|
500
|
-
bookmakerIdSeparator:
|
|
501
|
-
} = I(), { t: d } =
|
|
502
|
-
const S = parseFloat(l) || 0, v = s ||
|
|
498
|
+
bookmakerHomepageUrl: u,
|
|
499
|
+
bookmakerBetslipTemplate: y,
|
|
500
|
+
bookmakerIdSeparator: p
|
|
501
|
+
} = I(), { t: d } = k(), c = e || r, h = $(), b = T(), m = o.continueLabel || d("betslip.continueLabel"), x = (() => {
|
|
502
|
+
const S = parseFloat(l) || 0, v = s || y;
|
|
503
503
|
if (v)
|
|
504
|
-
return
|
|
505
|
-
if (
|
|
504
|
+
return Vt(v, i, S, p);
|
|
505
|
+
if (u) return u;
|
|
506
506
|
})(), f = n || !x;
|
|
507
|
-
return /* @__PURE__ */ a("div", { children: /* @__PURE__ */
|
|
508
|
-
|
|
507
|
+
return /* @__PURE__ */ a("div", { children: /* @__PURE__ */ g(
|
|
508
|
+
Gt,
|
|
509
509
|
{
|
|
510
510
|
href: f ? void 0 : x,
|
|
511
511
|
target: x ? "_blank" : void 0,
|
|
@@ -514,13 +514,13 @@ const Vt = z.a`
|
|
|
514
514
|
primaryHover: t.primaryHover,
|
|
515
515
|
disabled: f,
|
|
516
516
|
style: {
|
|
517
|
-
padding: `${
|
|
518
|
-
borderRadius:
|
|
517
|
+
padding: `${h.xs} ${h.md}`,
|
|
518
|
+
borderRadius: b.full,
|
|
519
519
|
fontSize: "0.875em",
|
|
520
520
|
fontFamily: t.font
|
|
521
521
|
},
|
|
522
522
|
children: [
|
|
523
|
-
/* @__PURE__ */ a("span", { children:
|
|
523
|
+
/* @__PURE__ */ a("span", { children: m }),
|
|
524
524
|
c && /* @__PURE__ */ a(
|
|
525
525
|
"img",
|
|
526
526
|
{
|
|
@@ -532,7 +532,7 @@ const Vt = z.a`
|
|
|
532
532
|
width: "auto",
|
|
533
533
|
objectFit: "contain",
|
|
534
534
|
verticalAlign: "middle",
|
|
535
|
-
marginInlineStart:
|
|
535
|
+
marginInlineStart: h.sm,
|
|
536
536
|
flexShrink: 0
|
|
537
537
|
}
|
|
538
538
|
}
|
|
@@ -543,30 +543,30 @@ const Vt = z.a`
|
|
|
543
543
|
}, tt = ({ color: t }) => {
|
|
544
544
|
const e = A();
|
|
545
545
|
return /* @__PURE__ */ a("div", { style: { borderBottom: `${e.size} solid ${t}` } });
|
|
546
|
-
},
|
|
546
|
+
}, Xt = ({
|
|
547
547
|
tokens: t,
|
|
548
548
|
brandingLogoUrl: e
|
|
549
549
|
}) => {
|
|
550
|
-
const { labels: n, selections: o, combStake: s, conflictIds: i, currency: l } = I(), { t: r } =
|
|
551
|
-
(
|
|
552
|
-
),
|
|
550
|
+
const { labels: n, selections: o, combStake: s, conflictIds: i, currency: l } = I(), { t: r } = k(), u = $(), y = o.filter(
|
|
551
|
+
(m) => m.status === "active" || !m.status
|
|
552
|
+
), p = ct(y), d = parseFloat(s) || 0, c = d * p, h = i.size > 0, b = {
|
|
553
553
|
display: "flex",
|
|
554
554
|
justifyContent: "space-between",
|
|
555
555
|
alignItems: "center",
|
|
556
556
|
padding: "6px 0"
|
|
557
557
|
};
|
|
558
|
-
return /* @__PURE__ */
|
|
558
|
+
return /* @__PURE__ */ g(
|
|
559
559
|
"div",
|
|
560
560
|
{
|
|
561
561
|
style: {
|
|
562
562
|
background: t.s1,
|
|
563
|
-
padding: `10px 14px ${
|
|
563
|
+
padding: `10px 14px ${u.sm}`,
|
|
564
564
|
fontFamily: t.font
|
|
565
565
|
},
|
|
566
566
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ g("div", { style: b, children: [
|
|
568
568
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.6875em", color: t.t3 }, children: n.combinedOddsLabel || r("betslip.combinedOddsLabel") }),
|
|
569
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ g(
|
|
570
570
|
"span",
|
|
571
571
|
{
|
|
572
572
|
style: {
|
|
@@ -579,18 +579,18 @@ const Vt = z.a`
|
|
|
579
579
|
},
|
|
580
580
|
children: [
|
|
581
581
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.5em", color: t.ok }, children: "▲" }),
|
|
582
|
-
|
|
582
|
+
p.toFixed(2)
|
|
583
583
|
]
|
|
584
584
|
}
|
|
585
585
|
)
|
|
586
586
|
] }),
|
|
587
587
|
/* @__PURE__ */ a(tt, { color: t.bdr }),
|
|
588
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ g("div", { style: b, children: [
|
|
589
589
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: n.totalStakeLabel || r("betslip.totalStakeLabel") }),
|
|
590
590
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: d > 0 ? `${d.toFixed(2)}${l}` : "—" })
|
|
591
591
|
] }),
|
|
592
592
|
/* @__PURE__ */ a(tt, { color: t.bdr }),
|
|
593
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ g("div", { style: { ...b, borderBottom: "none", marginBottom: 10 }, children: [
|
|
594
594
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: n.potentialWinLabel || r("betslip.potentialWinLabel") }),
|
|
595
595
|
/* @__PURE__ */ a(
|
|
596
596
|
"span",
|
|
@@ -609,52 +609,52 @@ const Vt = z.a`
|
|
|
609
609
|
{
|
|
610
610
|
tokens: t,
|
|
611
611
|
brandingLogoUrl: e,
|
|
612
|
-
hasConflicts:
|
|
612
|
+
hasConflicts: h
|
|
613
613
|
}
|
|
614
614
|
)
|
|
615
615
|
]
|
|
616
616
|
}
|
|
617
617
|
);
|
|
618
618
|
};
|
|
619
|
-
function
|
|
619
|
+
function Kt(t, e, n) {
|
|
620
620
|
if (n != null && n[t]) return n[t];
|
|
621
621
|
const o = `betslip.markets.${t}`, s = e(o);
|
|
622
622
|
if (s !== o) return s;
|
|
623
623
|
const i = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
624
624
|
if (i) {
|
|
625
|
-
const l = i[2].charAt(0) + i[2].slice(1).toLowerCase(), r = `betslip.markets.${i[1].toUpperCase() === "OVER" ? "over" : "under"}${l}`,
|
|
626
|
-
if (
|
|
625
|
+
const l = i[2].charAt(0) + i[2].slice(1).toLowerCase(), r = `betslip.markets.${i[1].toUpperCase() === "OVER" ? "over" : "under"}${l}`, u = `${i[3]}.${i[4]}`, y = e(r, { line: u });
|
|
626
|
+
if (y !== r) return y;
|
|
627
627
|
}
|
|
628
628
|
return t.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase());
|
|
629
629
|
}
|
|
630
|
-
const
|
|
630
|
+
const Jt = B`
|
|
631
631
|
from { opacity: 0; transform: translateX(8px); }
|
|
632
632
|
to { opacity: 1; transform: translateX(0); }
|
|
633
|
-
`,
|
|
633
|
+
`, qt = B`
|
|
634
634
|
from { transform: rotate(0deg); }
|
|
635
635
|
to { transform: rotate(360deg); }
|
|
636
|
-
`,
|
|
636
|
+
`, Qt = z.div`
|
|
637
637
|
width: 12px;
|
|
638
638
|
height: 12px;
|
|
639
639
|
border-radius: 50%;
|
|
640
640
|
border: 2px solid transparent;
|
|
641
641
|
border-top-color: ${({ color: t }) => t};
|
|
642
|
-
animation: ${
|
|
642
|
+
animation: ${qt} 0.7s linear infinite;
|
|
643
643
|
flex-shrink: 0;
|
|
644
|
-
`,
|
|
645
|
-
animation: ${
|
|
646
|
-
`,
|
|
644
|
+
`, Zt = () => /* @__PURE__ */ a("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M7 4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1h3a1 1 0 1 1 0 2h-1l-1.4 13.2A2 2 0 0 1 16.6 22H7.4a2 2 0 0 1-2-1.8L4 7H3a1 1 0 1 1 0-2h3V4zm2 0v1h6V4H9zm-3 3 1.4 12h9.2L18 7H6zm4 2a1 1 0 0 1 1 1v7a1 1 0 1 1-2 0v-7a1 1 0 0 1 1-1zm4 0a1 1 0 0 1 1 1v7a1 1 0 1 1-2 0v-7a1 1 0 0 1 1-1z" }) }), te = z.div`
|
|
645
|
+
animation: ${Jt} 0.18s ease;
|
|
646
|
+
`, ee = B`
|
|
647
647
|
0%, 100% { opacity: 1; }
|
|
648
648
|
50% { opacity: 0.2; }
|
|
649
|
-
`,
|
|
649
|
+
`, ne = z.span`
|
|
650
650
|
width: 5px;
|
|
651
651
|
height: 5px;
|
|
652
652
|
border-radius: 50%;
|
|
653
653
|
background: #fff;
|
|
654
654
|
flex-shrink: 0;
|
|
655
|
-
animation: ${
|
|
655
|
+
animation: ${ee} 1s ease-in-out infinite;
|
|
656
656
|
`;
|
|
657
|
-
function
|
|
657
|
+
function oe(t, e, n) {
|
|
658
658
|
if (!t) return "";
|
|
659
659
|
const o = new Date(t);
|
|
660
660
|
if (isNaN(o.getTime())) return "";
|
|
@@ -693,7 +693,7 @@ const et = ({
|
|
|
693
693
|
}
|
|
694
694
|
) : /* @__PURE__ */ a("span", { style: { color: n.t2, fontWeight: 700 }, children: e.charAt(0) })
|
|
695
695
|
}
|
|
696
|
-
),
|
|
696
|
+
), re = ({ avatar: t, name: e, tokens: n }) => /* @__PURE__ */ a(
|
|
697
697
|
"div",
|
|
698
698
|
{
|
|
699
699
|
style: {
|
|
@@ -718,9 +718,9 @@ const et = ({
|
|
|
718
718
|
}
|
|
719
719
|
) : /* @__PURE__ */ a("span", { style: { color: n.t2 }, children: e.charAt(0) })
|
|
720
720
|
}
|
|
721
|
-
),
|
|
721
|
+
), ie = ({ name: t, logo: e, tokens: n }) => {
|
|
722
722
|
const o = $(), s = T(), [i, l] = V.useState(!1);
|
|
723
|
-
return e ? /* @__PURE__ */
|
|
723
|
+
return e ? /* @__PURE__ */ g(
|
|
724
724
|
"div",
|
|
725
725
|
{
|
|
726
726
|
style: { position: "relative", display: "inline-flex" },
|
|
@@ -803,15 +803,15 @@ const et = ({
|
|
|
803
803
|
children: t
|
|
804
804
|
}
|
|
805
805
|
);
|
|
806
|
-
},
|
|
806
|
+
}, ae = ({
|
|
807
807
|
sel: t,
|
|
808
808
|
tokens: e
|
|
809
809
|
}) => {
|
|
810
|
-
const { labels: n, oddsLoading: o } = I(), { t: s } =
|
|
811
|
-
return i === "settled_won" ? /* @__PURE__ */
|
|
810
|
+
const { labels: n, oddsLoading: o } = I(), { t: s } = k(), { status: i, odds: l, movement: r } = t;
|
|
811
|
+
return i === "settled_won" ? /* @__PURE__ */ g("span", { style: { color: e.ok, fontSize: "0.8125em", fontWeight: 700 }, children: [
|
|
812
812
|
"✓ ",
|
|
813
813
|
s("betslip.settledWon")
|
|
814
|
-
] }) : i === "settled_lost" ? /* @__PURE__ */
|
|
814
|
+
] }) : i === "settled_lost" ? /* @__PURE__ */ g(
|
|
815
815
|
"span",
|
|
816
816
|
{
|
|
817
817
|
style: { color: e.bad, fontSize: "0.8125em", fontWeight: 700 },
|
|
@@ -820,7 +820,7 @@ const et = ({
|
|
|
820
820
|
s("betslip.settledLost")
|
|
821
821
|
]
|
|
822
822
|
}
|
|
823
|
-
) : i === "settled_void" ? /* @__PURE__ */ a("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children: s("betslip.settledVoid") }) : i === "suspended" ? /* @__PURE__ */ a("span", { style: { fontSize: "0.75em", fontWeight: 600, color: e.warn }, children: n.suspendedLabel || s("betslip.suspendedLabel") }) : o ? /* @__PURE__ */ a(
|
|
823
|
+
) : i === "settled_void" ? /* @__PURE__ */ a("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children: s("betslip.settledVoid") }) : i === "suspended" ? /* @__PURE__ */ a("span", { style: { fontSize: "0.75em", fontWeight: 600, color: e.warn }, children: n.suspendedLabel || s("betslip.suspendedLabel") }) : o ? /* @__PURE__ */ a(Qt, { color: e.t3 }) : l === 0 ? /* @__PURE__ */ a("span", { style: { fontSize: "0.8125em", fontWeight: 600, color: e.t3 }, children: n.oddsUnavailableLabel || s("betslip.oddsUnavailableLabel") }) : /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 3 }, children: [
|
|
824
824
|
r && /* @__PURE__ */ a(
|
|
825
825
|
"span",
|
|
826
826
|
{
|
|
@@ -834,10 +834,10 @@ const et = ({
|
|
|
834
834
|
),
|
|
835
835
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.875em", fontWeight: 700, color: e.t1 }, children: l.toFixed(2) })
|
|
836
836
|
] });
|
|
837
|
-
},
|
|
838
|
-
const { onRemove: o, labels: s } = I(), { t: i, i18n: l } =
|
|
839
|
-
return /* @__PURE__ */
|
|
840
|
-
|
|
837
|
+
}, se = ({ sel: t, tokens: e, isConflict: n }) => {
|
|
838
|
+
const { onRemove: o, labels: s } = I(), { t: i, i18n: l } = k(), r = $(), u = T(), y = A(), [p, d] = V.useState(!1), c = oe(t.startAt, l.language, i), h = t.marketId === "CORRECT_SCORE" || t.marketId === "CORRECT_SCORE_ADVANCED" || t.marketId === "CORRECT_SCORE_HT", b = h && t.outcome ? t.outcome.split(/[-:]/) : null, m = b == null ? void 0 : b[0], x = b == null ? void 0 : b[1];
|
|
839
|
+
return /* @__PURE__ */ g(
|
|
840
|
+
te,
|
|
841
841
|
{
|
|
842
842
|
style: {
|
|
843
843
|
fontFamily: e.font,
|
|
@@ -845,15 +845,15 @@ const et = ({
|
|
|
845
845
|
padding: "14px 0 0",
|
|
846
846
|
overflow: "hidden",
|
|
847
847
|
background: e.warnSoftBg,
|
|
848
|
-
border: `${
|
|
849
|
-
borderRadius:
|
|
848
|
+
border: `${y.size} solid ${e.bad}`,
|
|
849
|
+
borderRadius: u.sm,
|
|
850
850
|
margin: "6px 8px"
|
|
851
851
|
} : {
|
|
852
852
|
padding: "14px 12px"
|
|
853
853
|
}
|
|
854
854
|
},
|
|
855
855
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ g(
|
|
857
857
|
"div",
|
|
858
858
|
{
|
|
859
859
|
style: {
|
|
@@ -865,9 +865,9 @@ const et = ({
|
|
|
865
865
|
...n && { paddingInlineStart: r.xs }
|
|
866
866
|
},
|
|
867
867
|
children: [
|
|
868
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
869
869
|
t.athlete && /* @__PURE__ */ a(
|
|
870
|
-
|
|
870
|
+
re,
|
|
871
871
|
{
|
|
872
872
|
avatar: t.athlete.avatar,
|
|
873
873
|
name: t.athlete.name,
|
|
@@ -886,7 +886,7 @@ const et = ({
|
|
|
886
886
|
}
|
|
887
887
|
)
|
|
888
888
|
] }),
|
|
889
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ g(
|
|
890
890
|
"div",
|
|
891
891
|
{
|
|
892
892
|
style: {
|
|
@@ -896,7 +896,7 @@ const et = ({
|
|
|
896
896
|
flexShrink: 0
|
|
897
897
|
},
|
|
898
898
|
children: [
|
|
899
|
-
/* @__PURE__ */ a(
|
|
899
|
+
/* @__PURE__ */ a(ae, { sel: t, tokens: e }),
|
|
900
900
|
/* @__PURE__ */ a(
|
|
901
901
|
"button",
|
|
902
902
|
{
|
|
@@ -905,19 +905,19 @@ const et = ({
|
|
|
905
905
|
onMouseLeave: () => d(!1),
|
|
906
906
|
title: "Remove",
|
|
907
907
|
style: {
|
|
908
|
-
background:
|
|
908
|
+
background: p ? "rgba(239,68,68,.08)" : "none",
|
|
909
909
|
border: "none",
|
|
910
910
|
cursor: "pointer",
|
|
911
|
-
color:
|
|
911
|
+
color: p ? e.bad : e.t2,
|
|
912
912
|
fontSize: "0.8125em",
|
|
913
913
|
padding: "3px 5px",
|
|
914
|
-
borderRadius:
|
|
914
|
+
borderRadius: u.xs,
|
|
915
915
|
transition: "color .15s, background .15s",
|
|
916
916
|
lineHeight: 1,
|
|
917
917
|
display: "flex",
|
|
918
918
|
alignItems: "center"
|
|
919
919
|
},
|
|
920
|
-
children: /* @__PURE__ */ a(
|
|
920
|
+
children: /* @__PURE__ */ a(Zt, {})
|
|
921
921
|
}
|
|
922
922
|
)
|
|
923
923
|
]
|
|
@@ -935,7 +935,7 @@ const et = ({
|
|
|
935
935
|
marginBottom: 6,
|
|
936
936
|
...n && { paddingInlineStart: 8 }
|
|
937
937
|
},
|
|
938
|
-
children:
|
|
938
|
+
children: Kt(t.marketId, i, s.marketLabels)
|
|
939
939
|
}
|
|
940
940
|
),
|
|
941
941
|
/* @__PURE__ */ a(
|
|
@@ -943,11 +943,11 @@ const et = ({
|
|
|
943
943
|
{
|
|
944
944
|
style: n ? { background: e.s3, paddingTop: 7, paddingBottom: 7 } : {
|
|
945
945
|
background: e.s3,
|
|
946
|
-
borderRadius:
|
|
946
|
+
borderRadius: u.sm,
|
|
947
947
|
padding: "7px 10px",
|
|
948
948
|
marginTop: 6
|
|
949
949
|
},
|
|
950
|
-
children: /* @__PURE__ */
|
|
950
|
+
children: /* @__PURE__ */ g(
|
|
951
951
|
"div",
|
|
952
952
|
{
|
|
953
953
|
style: {
|
|
@@ -966,12 +966,12 @@ const et = ({
|
|
|
966
966
|
display: "flex",
|
|
967
967
|
alignItems: "center"
|
|
968
968
|
},
|
|
969
|
-
children: /* @__PURE__ */
|
|
969
|
+
children: /* @__PURE__ */ g(
|
|
970
970
|
"div",
|
|
971
971
|
{
|
|
972
972
|
style: {
|
|
973
973
|
display: "grid",
|
|
974
|
-
gridTemplateColumns:
|
|
974
|
+
gridTemplateColumns: h ? "auto minmax(0, auto) auto" : "auto minmax(0, auto)",
|
|
975
975
|
columnGap: 6,
|
|
976
976
|
rowGap: r["2xs"],
|
|
977
977
|
alignItems: "center"
|
|
@@ -998,7 +998,7 @@ const et = ({
|
|
|
998
998
|
children: t.participantOne
|
|
999
999
|
}
|
|
1000
1000
|
),
|
|
1001
|
-
|
|
1001
|
+
h && (m !== void 0 ? /* @__PURE__ */ a(nt, { score: m, tokens: e }) : /* @__PURE__ */ a("span", {})),
|
|
1002
1002
|
t.participantTwo && /* @__PURE__ */ a(
|
|
1003
1003
|
et,
|
|
1004
1004
|
{
|
|
@@ -1020,13 +1020,13 @@ const et = ({
|
|
|
1020
1020
|
children: t.participantTwo
|
|
1021
1021
|
}
|
|
1022
1022
|
),
|
|
1023
|
-
t.participantTwo &&
|
|
1023
|
+
t.participantTwo && h && (x !== void 0 ? /* @__PURE__ */ a(nt, { score: x, tokens: e }) : /* @__PURE__ */ a("span", {}))
|
|
1024
1024
|
]
|
|
1025
1025
|
}
|
|
1026
1026
|
)
|
|
1027
1027
|
}
|
|
1028
1028
|
),
|
|
1029
|
-
(t.matchStatus === "inprogress" || c || t.competition) && /* @__PURE__ */
|
|
1029
|
+
(t.matchStatus === "inprogress" || c || t.competition) && /* @__PURE__ */ g(
|
|
1030
1030
|
"div",
|
|
1031
1031
|
{
|
|
1032
1032
|
style: {
|
|
@@ -1038,7 +1038,7 @@ const et = ({
|
|
|
1038
1038
|
alignItems: "flex-end"
|
|
1039
1039
|
},
|
|
1040
1040
|
children: [
|
|
1041
|
-
t.matchStatus === "inprogress" ? /* @__PURE__ */
|
|
1041
|
+
t.matchStatus === "inprogress" ? /* @__PURE__ */ g(
|
|
1042
1042
|
"span",
|
|
1043
1043
|
{
|
|
1044
1044
|
style: {
|
|
@@ -1057,7 +1057,7 @@ const et = ({
|
|
|
1057
1057
|
fontFamily: e.font
|
|
1058
1058
|
},
|
|
1059
1059
|
children: [
|
|
1060
|
-
/* @__PURE__ */ a(
|
|
1060
|
+
/* @__PURE__ */ a(ne, {}),
|
|
1061
1061
|
i("betslip.live")
|
|
1062
1062
|
]
|
|
1063
1063
|
}
|
|
@@ -1073,7 +1073,7 @@ const et = ({
|
|
|
1073
1073
|
}
|
|
1074
1074
|
) : null,
|
|
1075
1075
|
t.competition && /* @__PURE__ */ a(
|
|
1076
|
-
|
|
1076
|
+
ie,
|
|
1077
1077
|
{
|
|
1078
1078
|
name: t.competition.name,
|
|
1079
1079
|
logo: t.competition.logo,
|
|
@@ -1095,8 +1095,8 @@ const et = ({
|
|
|
1095
1095
|
tokens: t,
|
|
1096
1096
|
isSide: e
|
|
1097
1097
|
}) => {
|
|
1098
|
-
const { labels: n, selections: o, conflictIds: s } = I(), { t: i } =
|
|
1099
|
-
return /* @__PURE__ */
|
|
1098
|
+
const { labels: n, selections: o, conflictIds: s } = I(), { t: i } = k();
|
|
1099
|
+
return /* @__PURE__ */ g(M, { children: [
|
|
1100
1100
|
/* @__PURE__ */ a(
|
|
1101
1101
|
st,
|
|
1102
1102
|
{
|
|
@@ -1128,7 +1128,7 @@ const et = ({
|
|
|
1128
1128
|
maxHeight: e ? "none" : 300,
|
|
1129
1129
|
background: t.s1
|
|
1130
1130
|
},
|
|
1131
|
-
children: o.length === 0 ? /* @__PURE__ */
|
|
1131
|
+
children: o.length === 0 ? /* @__PURE__ */ g(
|
|
1132
1132
|
"div",
|
|
1133
1133
|
{
|
|
1134
1134
|
style: {
|
|
@@ -1154,7 +1154,7 @@ const et = ({
|
|
|
1154
1154
|
]
|
|
1155
1155
|
}
|
|
1156
1156
|
) : o.map((l) => /* @__PURE__ */ a(
|
|
1157
|
-
|
|
1157
|
+
se,
|
|
1158
1158
|
{
|
|
1159
1159
|
sel: l,
|
|
1160
1160
|
tokens: t,
|
|
@@ -1165,7 +1165,7 @@ const et = ({
|
|
|
1165
1165
|
}
|
|
1166
1166
|
)
|
|
1167
1167
|
] });
|
|
1168
|
-
},
|
|
1168
|
+
}, le = z.button`
|
|
1169
1169
|
background: ${({ primary: t }) => t};
|
|
1170
1170
|
color: #fff;
|
|
1171
1171
|
border: none;
|
|
@@ -1184,13 +1184,13 @@ const et = ({
|
|
|
1184
1184
|
setCombStake: i,
|
|
1185
1185
|
conflictIds: l,
|
|
1186
1186
|
currency: r,
|
|
1187
|
-
stakePresets:
|
|
1188
|
-
} = I(), { t:
|
|
1187
|
+
stakePresets: u
|
|
1188
|
+
} = I(), { t: y } = k(), p = $(), d = T(), c = A(), h = o.filter(
|
|
1189
1189
|
(w) => w.status === "active" || !w.status
|
|
1190
|
-
),
|
|
1190
|
+
), b = ct(h), m = parseFloat(s) || 0, x = m * b, f = l.size > 0, S = (w) => {
|
|
1191
1191
|
i(String(w));
|
|
1192
1192
|
}, v = V.useRef(null);
|
|
1193
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ g(M, { children: [
|
|
1194
1194
|
/* @__PURE__ */ a(
|
|
1195
1195
|
st,
|
|
1196
1196
|
{
|
|
@@ -1210,14 +1210,14 @@ const et = ({
|
|
|
1210
1210
|
"div",
|
|
1211
1211
|
{
|
|
1212
1212
|
style: {
|
|
1213
|
-
padding: `${
|
|
1213
|
+
padding: `${p.sm} 14px`,
|
|
1214
1214
|
flexShrink: 0,
|
|
1215
1215
|
borderTop: `${c.size} solid ${t.bdr}`,
|
|
1216
1216
|
background: t.s3,
|
|
1217
1217
|
fontFamily: t.font
|
|
1218
1218
|
},
|
|
1219
|
-
children: /* @__PURE__ */
|
|
1220
|
-
|
|
1219
|
+
children: /* @__PURE__ */ g(M, { children: [
|
|
1220
|
+
h.length > 0 && /* @__PURE__ */ g(
|
|
1221
1221
|
"div",
|
|
1222
1222
|
{
|
|
1223
1223
|
style: {
|
|
@@ -1226,31 +1226,31 @@ const et = ({
|
|
|
1226
1226
|
fontSize: "0.75em",
|
|
1227
1227
|
color: t.t2,
|
|
1228
1228
|
padding: "3px 0",
|
|
1229
|
-
paddingBottom:
|
|
1229
|
+
paddingBottom: p.xs
|
|
1230
1230
|
},
|
|
1231
1231
|
children: [
|
|
1232
|
-
/* @__PURE__ */ a("span", { children: n.combinedOddsLabel ||
|
|
1233
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ a("span", { children: n.combinedOddsLabel || y("betslip.combinedOddsLabel") }),
|
|
1233
|
+
/* @__PURE__ */ g(
|
|
1234
1234
|
"span",
|
|
1235
1235
|
{
|
|
1236
1236
|
style: {
|
|
1237
1237
|
display: "flex",
|
|
1238
1238
|
alignItems: "center",
|
|
1239
|
-
gap:
|
|
1239
|
+
gap: p["2xs"],
|
|
1240
1240
|
fontSize: "0.8125em",
|
|
1241
1241
|
fontWeight: 600,
|
|
1242
1242
|
color: t.t1
|
|
1243
1243
|
},
|
|
1244
1244
|
children: [
|
|
1245
1245
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.5625em", color: t.ok }, children: "▲" }),
|
|
1246
|
-
|
|
1246
|
+
b.toFixed(2)
|
|
1247
1247
|
]
|
|
1248
1248
|
}
|
|
1249
1249
|
)
|
|
1250
1250
|
]
|
|
1251
1251
|
}
|
|
1252
1252
|
),
|
|
1253
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ g(
|
|
1254
1254
|
"div",
|
|
1255
1255
|
{
|
|
1256
1256
|
style: {
|
|
@@ -1264,7 +1264,7 @@ const et = ({
|
|
|
1264
1264
|
"span",
|
|
1265
1265
|
{
|
|
1266
1266
|
style: { fontSize: "0.75em", color: t.t2, flexShrink: 0 },
|
|
1267
|
-
children: n.stakeLabel ||
|
|
1267
|
+
children: n.stakeLabel || y("betslip.stakeLabel")
|
|
1268
1268
|
}
|
|
1269
1269
|
),
|
|
1270
1270
|
/* @__PURE__ */ a("div", { style: { flex: 1, position: "relative", marginBottom: 0 }, children: /* @__PURE__ */ a(
|
|
@@ -1295,8 +1295,8 @@ const et = ({
|
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
1297
|
) }),
|
|
1298
|
-
|
|
1299
|
-
|
|
1298
|
+
u.map((w) => /* @__PURE__ */ a(
|
|
1299
|
+
le,
|
|
1300
1300
|
{
|
|
1301
1301
|
primary: t.primary,
|
|
1302
1302
|
onClick: () => S(w),
|
|
@@ -1315,8 +1315,8 @@ const et = ({
|
|
|
1315
1315
|
]
|
|
1316
1316
|
}
|
|
1317
1317
|
),
|
|
1318
|
-
/* @__PURE__ */
|
|
1319
|
-
/* @__PURE__ */
|
|
1318
|
+
/* @__PURE__ */ g("div", { style: { marginBottom: 10 }, children: [
|
|
1319
|
+
/* @__PURE__ */ g(
|
|
1320
1320
|
"div",
|
|
1321
1321
|
{
|
|
1322
1322
|
style: {
|
|
@@ -1328,12 +1328,12 @@ const et = ({
|
|
|
1328
1328
|
padding: "3px 0"
|
|
1329
1329
|
},
|
|
1330
1330
|
children: [
|
|
1331
|
-
/* @__PURE__ */ a("span", { children: n.totalStakeLabel ||
|
|
1332
|
-
/* @__PURE__ */ a("span", { children:
|
|
1331
|
+
/* @__PURE__ */ a("span", { children: n.totalStakeLabel || y("betslip.totalStakeLabel") }),
|
|
1332
|
+
/* @__PURE__ */ a("span", { children: m > 0 ? `${m.toFixed(2)}${r}` : "—" })
|
|
1333
1333
|
]
|
|
1334
1334
|
}
|
|
1335
1335
|
),
|
|
1336
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ g(
|
|
1337
1337
|
"div",
|
|
1338
1338
|
{
|
|
1339
1339
|
style: {
|
|
@@ -1346,7 +1346,7 @@ const et = ({
|
|
|
1346
1346
|
borderTop: `${c.size} solid ${t.bdr}`
|
|
1347
1347
|
},
|
|
1348
1348
|
children: [
|
|
1349
|
-
/* @__PURE__ */ a("span", { children: n.potentialWinLabel ||
|
|
1349
|
+
/* @__PURE__ */ a("span", { children: n.potentialWinLabel || y("betslip.potentialWinLabel") }),
|
|
1350
1350
|
/* @__PURE__ */ a(
|
|
1351
1351
|
"span",
|
|
1352
1352
|
{
|
|
@@ -1375,9 +1375,9 @@ const et = ({
|
|
|
1375
1375
|
fontSize: "0.625em",
|
|
1376
1376
|
color: t.t3,
|
|
1377
1377
|
textAlign: "center",
|
|
1378
|
-
marginTop:
|
|
1378
|
+
marginTop: p.xs,
|
|
1379
1379
|
lineHeight: 1.5,
|
|
1380
|
-
padding: `0 ${
|
|
1380
|
+
padding: `0 ${p["3xs"]}`
|
|
1381
1381
|
},
|
|
1382
1382
|
children: n.disclaimer
|
|
1383
1383
|
}
|
|
@@ -1387,92 +1387,92 @@ const et = ({
|
|
|
1387
1387
|
)
|
|
1388
1388
|
] });
|
|
1389
1389
|
};
|
|
1390
|
-
function
|
|
1391
|
-
const [n, o] = R([]), [s, i] = R((e == null ? void 0 : e.length) > 0);
|
|
1390
|
+
function ce(t, e) {
|
|
1391
|
+
const [n, o] = R([]), [s, i] = R((e == null ? void 0 : e.length) > 0), l = St();
|
|
1392
1392
|
return _(() => {
|
|
1393
1393
|
if (!(e != null && e.length)) {
|
|
1394
1394
|
o([]), i(!1);
|
|
1395
1395
|
return;
|
|
1396
1396
|
}
|
|
1397
|
-
const
|
|
1398
|
-
const
|
|
1399
|
-
return { eventId:
|
|
1400
|
-
}),
|
|
1401
|
-
i(!0), t.football.getMatches({ matchIds:
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1404
|
-
),
|
|
1405
|
-
({ eventId:
|
|
1406
|
-
var
|
|
1407
|
-
const m =
|
|
1397
|
+
const r = e.map((y) => {
|
|
1398
|
+
const p = y.split(":"), d = p[p.length - 1], c = p[p.length - 2];
|
|
1399
|
+
return { eventId: p.slice(0, p.length - 2).join(":"), market: c, outcome: d };
|
|
1400
|
+
}), u = [...new Set(r.map((y) => y.eventId))];
|
|
1401
|
+
i(!0), t.football.getMatches({ matchIds: u }, l).then((y) => {
|
|
1402
|
+
const p = new Map(
|
|
1403
|
+
y.data.map((c) => [c.id, c])
|
|
1404
|
+
), d = r.flatMap(
|
|
1405
|
+
({ eventId: c, market: h, outcome: b }) => {
|
|
1406
|
+
var x, f, S, v, w;
|
|
1407
|
+
const m = p.get(c);
|
|
1408
1408
|
return m ? [
|
|
1409
1409
|
{
|
|
1410
|
-
eventId:
|
|
1411
|
-
market:
|
|
1412
|
-
outcome:
|
|
1410
|
+
eventId: c,
|
|
1411
|
+
market: h,
|
|
1412
|
+
outcome: b,
|
|
1413
1413
|
participantOne: {
|
|
1414
1414
|
name: m.homeTeam.name,
|
|
1415
|
-
logo: (
|
|
1415
|
+
logo: (x = m.homeTeam.assets) == null ? void 0 : x.logo
|
|
1416
1416
|
},
|
|
1417
1417
|
participantTwo: {
|
|
1418
1418
|
name: m.awayTeam.name,
|
|
1419
|
-
logo: (
|
|
1419
|
+
logo: (f = m.awayTeam.assets) == null ? void 0 : f.logo
|
|
1420
1420
|
},
|
|
1421
1421
|
startAt: m.kickoffAt,
|
|
1422
|
-
matchStatus: (
|
|
1423
|
-
competition: (
|
|
1422
|
+
matchStatus: (S = m.status) == null ? void 0 : S.type,
|
|
1423
|
+
competition: (v = m.context) != null && v.competition ? {
|
|
1424
1424
|
name: m.context.competition.name,
|
|
1425
|
-
logo: (
|
|
1425
|
+
logo: (w = m.context.competition.assets) == null ? void 0 : w.logo
|
|
1426
1426
|
} : void 0
|
|
1427
1427
|
}
|
|
1428
1428
|
] : [];
|
|
1429
1429
|
}
|
|
1430
1430
|
);
|
|
1431
|
-
o(
|
|
1431
|
+
o(d);
|
|
1432
1432
|
}).catch(() => o([])).finally(() => i(!1));
|
|
1433
|
-
}, [JSON.stringify(e)]), { selectionInputs: n, loading: s };
|
|
1433
|
+
}, [JSON.stringify(e), l]), { selectionInputs: n, loading: s };
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1435
|
+
const de = B`
|
|
1436
1436
|
from { transform: translateY(100%); opacity: 0; }
|
|
1437
1437
|
to { transform: translateY(0); opacity: 1; }
|
|
1438
|
-
`,
|
|
1438
|
+
`, pe = B`
|
|
1439
1439
|
from { transform: translateY(-100%); opacity: 0; }
|
|
1440
1440
|
to { transform: translateY(0); opacity: 1; }
|
|
1441
1441
|
`;
|
|
1442
|
-
function
|
|
1443
|
-
return t.startsWith("top") ?
|
|
1442
|
+
function me(t) {
|
|
1443
|
+
return t.startsWith("top") ? pe : de;
|
|
1444
1444
|
}
|
|
1445
|
-
const
|
|
1445
|
+
const fe = z.div`
|
|
1446
1446
|
position: fixed;
|
|
1447
1447
|
z-index: 999;
|
|
1448
|
-
animation: ${({ pos: t }) =>
|
|
1448
|
+
animation: ${({ pos: t }) => me(t)} 0.22s ease;
|
|
1449
1449
|
`, O = 320, it = 340;
|
|
1450
|
-
function
|
|
1450
|
+
function ue(t) {
|
|
1451
1451
|
return t === "bottom-right" ? { bottom: 16, right: 16, width: O } : t === "bottom-left" ? { bottom: 16, left: 16, width: O } : t === "top-right" ? { top: 16, right: 16, width: O } : t === "top-left" ? { top: 16, left: 16, width: O } : { bottom: 16, right: 16, width: O };
|
|
1452
1452
|
}
|
|
1453
|
-
const
|
|
1453
|
+
const ge = () => {
|
|
1454
1454
|
const { selectionInputs: t, combStake: e, selections: n } = I(), o = parseFloat(e) || 0, s = n.length ? n.reduce((i, l) => i * l.odds, 1) : 0;
|
|
1455
1455
|
return _(() => {
|
|
1456
1456
|
j._notify({ selections: t, stake: o, totalOdds: s });
|
|
1457
1457
|
}, [t, o, s]), _(() => () => j._notify({ selections: [], stake: 0, totalOdds: 0 }), []), null;
|
|
1458
|
-
},
|
|
1459
|
-
var D, W, U, F, H,
|
|
1458
|
+
}, he = ({ props: t }) => {
|
|
1459
|
+
var D, W, U, F, H, C, P, E, G, X;
|
|
1460
1460
|
const { position: e = "bottom-right", brandingLogoUrl: n } = t, {
|
|
1461
1461
|
open: o,
|
|
1462
1462
|
setOpen: s,
|
|
1463
1463
|
conflictIds: i,
|
|
1464
1464
|
selections: l,
|
|
1465
1465
|
maxSelections: r,
|
|
1466
|
-
bookmakerLogoUrl:
|
|
1467
|
-
bookmakerBackgroundColor:
|
|
1468
|
-
oddsReady:
|
|
1469
|
-
} = I(), d = ((H = (F = (U = (W = (D = t.themeOptions) == null ? void 0 : D.colorSchemes) == null ? void 0 : W.light) == null ? void 0 : U.palette) == null ? void 0 : F.primary) == null ? void 0 : H.plainColor) != null || ((X = (G = (E = (P = (
|
|
1470
|
-
d ? void 0 :
|
|
1471
|
-
),
|
|
1472
|
-
if (!
|
|
1473
|
-
if (
|
|
1474
|
-
const L = e === "side-right", N = L ? "right" : "left", K = n ||
|
|
1475
|
-
return /* @__PURE__ */
|
|
1466
|
+
bookmakerLogoUrl: u,
|
|
1467
|
+
bookmakerBackgroundColor: y,
|
|
1468
|
+
oddsReady: p
|
|
1469
|
+
} = I(), d = ((H = (F = (U = (W = (D = t.themeOptions) == null ? void 0 : D.colorSchemes) == null ? void 0 : W.light) == null ? void 0 : U.palette) == null ? void 0 : F.primary) == null ? void 0 : H.plainColor) != null || ((X = (G = (E = (P = (C = t.themeOptions) == null ? void 0 : C.colorSchemes) == null ? void 0 : P.dark) == null ? void 0 : E.palette) == null ? void 0 : G.primary) == null ? void 0 : X.plainColor) != null, c = Yt(
|
|
1470
|
+
d ? void 0 : y
|
|
1471
|
+
), h = T(), b = A(), m = e.startsWith("side"), x = e === "top-right" || e === "top-left", f = i.size > 0, { t: S } = k();
|
|
1472
|
+
if (!p) return null;
|
|
1473
|
+
if (m) {
|
|
1474
|
+
const L = e === "side-right", N = L ? "right" : "left", K = n || u, ut = o ? it : 0, gt = o ? "translateX(0)" : `translateX(${L ? "100%" : "-100%"})`;
|
|
1475
|
+
return /* @__PURE__ */ g(
|
|
1476
1476
|
"div",
|
|
1477
1477
|
{
|
|
1478
1478
|
style: {
|
|
@@ -1486,7 +1486,7 @@ const ue = () => {
|
|
|
1486
1486
|
overflow: "visible"
|
|
1487
1487
|
},
|
|
1488
1488
|
children: [
|
|
1489
|
-
/* @__PURE__ */
|
|
1489
|
+
/* @__PURE__ */ g(
|
|
1490
1490
|
"div",
|
|
1491
1491
|
{
|
|
1492
1492
|
style: {
|
|
@@ -1537,7 +1537,7 @@ const ue = () => {
|
|
|
1537
1537
|
transform: `translate(-50%, -50%) rotate(${L ? "-90" : "90"}deg)`
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
|
-
) : /* @__PURE__ */
|
|
1540
|
+
) : /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
1541
1541
|
/* @__PURE__ */ a(
|
|
1542
1542
|
"div",
|
|
1543
1543
|
{
|
|
@@ -1574,7 +1574,7 @@ const ue = () => {
|
|
|
1574
1574
|
] })
|
|
1575
1575
|
}
|
|
1576
1576
|
),
|
|
1577
|
-
!o && r != null && /* @__PURE__ */
|
|
1577
|
+
!o && r != null && /* @__PURE__ */ g(
|
|
1578
1578
|
"div",
|
|
1579
1579
|
{
|
|
1580
1580
|
style: {
|
|
@@ -1598,7 +1598,7 @@ const ue = () => {
|
|
|
1598
1598
|
]
|
|
1599
1599
|
}
|
|
1600
1600
|
),
|
|
1601
|
-
/* @__PURE__ */
|
|
1601
|
+
/* @__PURE__ */ g(
|
|
1602
1602
|
"div",
|
|
1603
1603
|
{
|
|
1604
1604
|
style: {
|
|
@@ -1614,20 +1614,20 @@ const ue = () => {
|
|
|
1614
1614
|
flexDirection: "column",
|
|
1615
1615
|
background: c.s1,
|
|
1616
1616
|
boxShadow: L ? "-6px 0 24px rgba(0,0,0,.18)" : "6px 0 24px rgba(0,0,0,.18)",
|
|
1617
|
-
outline: `${
|
|
1617
|
+
outline: `${b.size} solid ${c.bdr}`
|
|
1618
1618
|
},
|
|
1619
1619
|
children: [
|
|
1620
1620
|
/* @__PURE__ */ a(
|
|
1621
1621
|
Q,
|
|
1622
1622
|
{
|
|
1623
1623
|
tokens: c,
|
|
1624
|
-
isSide:
|
|
1624
|
+
isSide: m,
|
|
1625
1625
|
position: e,
|
|
1626
1626
|
brandingLogoUrl: n
|
|
1627
1627
|
}
|
|
1628
1628
|
),
|
|
1629
1629
|
f && /* @__PURE__ */ a(Z, { tokens: c }),
|
|
1630
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ g(
|
|
1631
1631
|
"div",
|
|
1632
1632
|
{
|
|
1633
1633
|
style: {
|
|
@@ -1638,7 +1638,7 @@ const ue = () => {
|
|
|
1638
1638
|
overflow: "hidden"
|
|
1639
1639
|
},
|
|
1640
1640
|
children: [
|
|
1641
|
-
/* @__PURE__ */ a(ot, { tokens: c, isSide:
|
|
1641
|
+
/* @__PURE__ */ a(ot, { tokens: c, isSide: m }),
|
|
1642
1642
|
/* @__PURE__ */ a(rt, { tokens: c, brandingLogoUrl: n })
|
|
1643
1643
|
]
|
|
1644
1644
|
}
|
|
@@ -1650,9 +1650,9 @@ const ue = () => {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
1652
|
}
|
|
1653
|
-
const v = x ? `0 0 ${
|
|
1653
|
+
const v = x ? `0 0 ${h.md} ${h.md}` : `${h.md} ${h.md} 0 0`, w = ue(e);
|
|
1654
1654
|
return /* @__PURE__ */ a(
|
|
1655
|
-
|
|
1655
|
+
fe,
|
|
1656
1656
|
{
|
|
1657
1657
|
pos: e,
|
|
1658
1658
|
style: {
|
|
@@ -1660,10 +1660,10 @@ const ue = () => {
|
|
|
1660
1660
|
borderRadius: v,
|
|
1661
1661
|
overflow: "hidden",
|
|
1662
1662
|
boxShadow: x ? "0 4px 16px rgba(0,0,0,.2)" : "0 -4px 16px rgba(0,0,0,.2)",
|
|
1663
|
-
outline: `${
|
|
1663
|
+
outline: `${b.size} solid ${c.primary}`,
|
|
1664
1664
|
...w
|
|
1665
1665
|
},
|
|
1666
|
-
children: /* @__PURE__ */
|
|
1666
|
+
children: /* @__PURE__ */ g(
|
|
1667
1667
|
"div",
|
|
1668
1668
|
{
|
|
1669
1669
|
style: {
|
|
@@ -1677,20 +1677,20 @@ const ue = () => {
|
|
|
1677
1677
|
Q,
|
|
1678
1678
|
{
|
|
1679
1679
|
tokens: c,
|
|
1680
|
-
isSide:
|
|
1680
|
+
isSide: m,
|
|
1681
1681
|
position: e,
|
|
1682
1682
|
brandingLogoUrl: n
|
|
1683
1683
|
}
|
|
1684
1684
|
),
|
|
1685
1685
|
f && /* @__PURE__ */ a(Z, { tokens: c }),
|
|
1686
1686
|
!o && l.length > 0 && /* @__PURE__ */ a(
|
|
1687
|
-
|
|
1687
|
+
Xt,
|
|
1688
1688
|
{
|
|
1689
1689
|
tokens: c,
|
|
1690
1690
|
brandingLogoUrl: n
|
|
1691
1691
|
}
|
|
1692
1692
|
),
|
|
1693
|
-
o && /* @__PURE__ */
|
|
1693
|
+
o && /* @__PURE__ */ g(
|
|
1694
1694
|
"div",
|
|
1695
1695
|
{
|
|
1696
1696
|
style: {
|
|
@@ -1701,7 +1701,7 @@ const ue = () => {
|
|
|
1701
1701
|
overflow: "hidden"
|
|
1702
1702
|
},
|
|
1703
1703
|
children: [
|
|
1704
|
-
/* @__PURE__ */ a(ot, { tokens: c, isSide:
|
|
1704
|
+
/* @__PURE__ */ a(ot, { tokens: c, isSide: m }),
|
|
1705
1705
|
/* @__PURE__ */ a(rt, { tokens: c, brandingLogoUrl: n })
|
|
1706
1706
|
]
|
|
1707
1707
|
}
|
|
@@ -1711,53 +1711,53 @@ const ue = () => {
|
|
|
1711
1711
|
)
|
|
1712
1712
|
}
|
|
1713
1713
|
);
|
|
1714
|
-
},
|
|
1715
|
-
const [e, n] = R([]), o = at(/* @__PURE__ */ new Set()), { selectionInputs: s, loading: i } =
|
|
1714
|
+
}, be = (t) => {
|
|
1715
|
+
const [e, n] = R([]), o = at(/* @__PURE__ */ new Set()), { selectionInputs: s, loading: i } = ce(
|
|
1716
1716
|
t.sdk,
|
|
1717
1717
|
e
|
|
1718
1718
|
), l = s.filter(
|
|
1719
1719
|
(d) => d.matchStatus !== "finished"
|
|
1720
|
-
), { oddsMap: r, oddsMarkets:
|
|
1720
|
+
), { oddsMap: r, oddsMarkets: u } = Ut(
|
|
1721
1721
|
t.sdk,
|
|
1722
1722
|
l,
|
|
1723
1723
|
t.oddsPollingInterval || 3e4,
|
|
1724
1724
|
{ operatorId: t.operatorId, affiliateId: t.affiliateId }
|
|
1725
|
-
),
|
|
1725
|
+
), y = Y((d) => {
|
|
1726
1726
|
o.current.delete(d);
|
|
1727
|
-
const c = d.split(":"),
|
|
1728
|
-
n((
|
|
1729
|
-
const x =
|
|
1727
|
+
const c = d.split(":"), h = c[c.length - 2], b = c.slice(0, c.length - 2).join(":");
|
|
1728
|
+
n((m) => {
|
|
1729
|
+
const x = m.findIndex((f) => {
|
|
1730
1730
|
const S = f.split(":");
|
|
1731
|
-
return S.slice(0, S.length - 2).join(":") ===
|
|
1731
|
+
return S.slice(0, S.length - 2).join(":") === b && S[S.length - 2] === h;
|
|
1732
1732
|
});
|
|
1733
1733
|
if (x !== -1) {
|
|
1734
|
-
const f = [...
|
|
1734
|
+
const f = [...m];
|
|
1735
1735
|
return f[x] = d, f;
|
|
1736
1736
|
}
|
|
1737
|
-
return [...
|
|
1737
|
+
return [...m, d];
|
|
1738
1738
|
});
|
|
1739
|
-
}, []),
|
|
1740
|
-
n((c) => c.filter((
|
|
1739
|
+
}, []), p = Y((d) => {
|
|
1740
|
+
n((c) => c.filter((h) => h !== d));
|
|
1741
1741
|
}, []);
|
|
1742
1742
|
return _(() => {
|
|
1743
|
-
s.filter((d) => d.matchStatus === "finished").forEach((d) =>
|
|
1744
|
-
}, [s,
|
|
1743
|
+
s.filter((d) => d.matchStatus === "finished").forEach((d) => p(`${d.eventId}:${d.market}:${d.outcome}`));
|
|
1744
|
+
}, [s, p]), _(() => {
|
|
1745
1745
|
l.forEach((d) => {
|
|
1746
|
-
var
|
|
1746
|
+
var h, b;
|
|
1747
1747
|
const c = `${d.eventId}:${d.market}:${d.outcome}`;
|
|
1748
|
-
if (
|
|
1748
|
+
if (Dt(r, u, d.eventId, d.market, c)) {
|
|
1749
1749
|
if (!o.current.has(c)) {
|
|
1750
1750
|
o.current.add(c);
|
|
1751
|
-
const
|
|
1751
|
+
const m = ((b = (h = ((r == null ? void 0 : r.get(d.eventId)) ?? [])[0]) == null ? void 0 : h.bookmaker) == null ? void 0 : b.name) ?? "the bookmaker";
|
|
1752
1752
|
console.warn(
|
|
1753
|
-
`[betslip] Removing "${c}": ${
|
|
1753
|
+
`[betslip] Removing "${c}": ${m} returned no ${d.market} odds for this event.`
|
|
1754
1754
|
);
|
|
1755
1755
|
}
|
|
1756
|
-
|
|
1756
|
+
p(c);
|
|
1757
1757
|
}
|
|
1758
1758
|
});
|
|
1759
|
-
}, [r,
|
|
1760
|
-
|
|
1759
|
+
}, [r, u, l, p]), _(() => (j._mount({ setSelection: y, removeSelection: p }), () => j._unmount()), [y, p]), !e.length || !l.length && i ? null : /* @__PURE__ */ g(
|
|
1760
|
+
Mt,
|
|
1761
1761
|
{
|
|
1762
1762
|
labels: t.labels,
|
|
1763
1763
|
initialSelections: l,
|
|
@@ -1765,25 +1765,26 @@ const ue = () => {
|
|
|
1765
1765
|
currency: t.currency,
|
|
1766
1766
|
stakePresets: t.stakePresets,
|
|
1767
1767
|
ctaUrlTemplate: t.ctaUrlTemplate,
|
|
1768
|
-
onExternalRemove:
|
|
1768
|
+
onExternalRemove: p,
|
|
1769
1769
|
sharedOddsMap: r,
|
|
1770
1770
|
children: [
|
|
1771
|
-
/* @__PURE__ */ a(
|
|
1772
|
-
/* @__PURE__ */ a(
|
|
1771
|
+
/* @__PURE__ */ a(ge, {}),
|
|
1772
|
+
/* @__PURE__ */ a(he, { props: t })
|
|
1773
1773
|
]
|
|
1774
1774
|
}
|
|
1775
1775
|
);
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1776
|
+
}, _e = (t) => /* @__PURE__ */ a(
|
|
1777
|
+
wt,
|
|
1778
1778
|
{
|
|
1779
1779
|
packageName: "betslip",
|
|
1780
1780
|
language: t.language,
|
|
1781
1781
|
themeOptions: t.themeOptions,
|
|
1782
1782
|
sdk: t.sdk,
|
|
1783
1783
|
entityId: "",
|
|
1784
|
-
|
|
1784
|
+
disableCache: t.disableCache,
|
|
1785
|
+
children: /* @__PURE__ */ a(be, { ...t })
|
|
1785
1786
|
}
|
|
1786
1787
|
);
|
|
1787
1788
|
export {
|
|
1788
|
-
|
|
1789
|
+
_e as M
|
|
1789
1790
|
};
|