@everymatrix/tournament-details-page 0.0.7 → 0.0.9
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/components/{TournamentDetails-qcyLTtSv.js → TournamentDetails-CKMkVYxd.js} +1976 -1943
- package/components/{TournamentDetails-DoBMS_9T.js → TournamentDetails-H6pHb_yG.js} +1608 -1575
- package/components/TournamentDetails-nG7lN2NT.cjs +7 -0
- package/components/TournamentDetailsPage-0JKgpPb4.js +1107 -0
- package/components/TournamentDetailsPage-CNDHXiDn.cjs +59 -0
- package/components/TournamentDetailsPage-D-pwFR-w.js +1082 -0
- package/components/TournamentGames-COHWeopg.js +377 -0
- package/components/TournamentGames-DLS2XJfo.js +403 -0
- package/components/TournamentGames-DO485kHn.cjs +27 -0
- package/components/TournamentLeaderboard-BnP-SIlN.cjs +31 -0
- package/components/TournamentLeaderboard-Dnpxq0_A.js +839 -0
- package/components/TournamentLeaderboard-ivZpO_TZ.js +823 -0
- package/es2015/tournament-details-page.cjs +1 -1
- package/es2015/tournament-details-page.js +1 -1
- package/esnext/tournament-details-page.js +1 -1
- package/package.json +1 -1
- package/components/TournamentDetails-C-zS8XGk.cjs +0 -7
- package/components/TournamentDetailsPage-C2wcS4rg.js +0 -987
- package/components/TournamentDetailsPage-CQFv3xok.js +0 -1010
- package/components/TournamentDetailsPage-CR3ti0az.cjs +0 -66
- package/components/TournamentGames-KOJ004rg.js +0 -387
- package/components/TournamentGames-xrJB7h-M.js +0 -359
- package/components/TournamentGames-zikPbhES.cjs +0 -27
- package/components/TournamentLeaderboard-BjBItfy9.js +0 -788
- package/components/TournamentLeaderboard-D9naoaD9.cjs +0 -30
- package/components/TournamentLeaderboard-Dc8xv6be.js +0 -804
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import { b as He, $ as Ie, p as Fe, g as Xe, h as y, u as pe, s as O, i as Ue, j as g, l as _, m as l, k as G, z as S, C as Je, E as x, B as A, w as a, n as m, q as Ke, r as qe, F as Qe, t as w, v as k, e as Ve, f as Ye, x as r, J as X, K as U, I as J, y as K, L as ae, D as me } from "./TournamentDetails-DoBMS_9T.js";
|
|
2
|
-
import { g as Ze } from "./TournamentDetailsPage-C2wcS4rg.js";
|
|
3
|
-
function $e(B, d) {
|
|
4
|
-
He(B, d);
|
|
5
|
-
}
|
|
6
|
-
function ve(B) {
|
|
7
|
-
Ie.set(B);
|
|
8
|
-
}
|
|
9
|
-
const de = {
|
|
10
|
-
en: {
|
|
11
|
-
previousButton: "Previous",
|
|
12
|
-
nextButton: "Next",
|
|
13
|
-
casinoTab: "Casino",
|
|
14
|
-
sportsbookTab: "Sportsbook",
|
|
15
|
-
gamesDescriptionTitle: "Participating games",
|
|
16
|
-
gamesDescriptionSubtitle: "Discover the games",
|
|
17
|
-
sportsRulesParseError: "Error parsing tournament rules",
|
|
18
|
-
noAvailableGames: "No games have been configured yet!"
|
|
19
|
-
},
|
|
20
|
-
tr: {
|
|
21
|
-
previousButton: "Önceki",
|
|
22
|
-
nextButton: "Sonraki",
|
|
23
|
-
casinoTab: "Casino",
|
|
24
|
-
sportsbookTab: "Spor Bahisleri",
|
|
25
|
-
gamesDescriptionTitle: "Katılımcı oyunlar",
|
|
26
|
-
gamesDescriptionSubtitle: "Oyunları keşfedin",
|
|
27
|
-
sportsRulesParseError: "Turnuva kuralları ayrıştırma hatası",
|
|
28
|
-
noAvailableGames: "Henüz oyun yapılandırılmamış!"
|
|
29
|
-
}
|
|
30
|
-
}, et = () => typeof window > "u";
|
|
31
|
-
var tt = g('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), at = g('<p class="svelte-p7mf8l"> </p>'), nt = g("<div></div>"), st = g('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), ot = g('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'), rt = g('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), lt = g("<button> </button>"), it = g('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'), pt = g("<p> </p>"), mt = g('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div></div>'), vt = g('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');
|
|
32
|
-
const dt = {
|
|
33
|
-
hash: "svelte-p7mf8l",
|
|
34
|
-
code: `.svelte-p7mf8l,
|
|
35
|
-
.svelte-p7mf8l::before,
|
|
36
|
-
.svelte-p7mf8l::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.GamesDescription.svelte-p7mf8l {display:flex;flex-direction:column;gap:6px;margin:10px 0;.GamesDescriptionTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:16px;font-weight:600;}.GamesDescriptionSubTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:200;}}.TournamentGamesTabs.svelte-p7mf8l {display:flex;border-radius:50px;background-color:var(--emw-color-bg-section, #434343);padding:6px;margin-bottom:6px;width:100%;justify-content:center;.Tab:where(.svelte-p7mf8l) {padding:5px 20px;color:var(--emw-color-typography, #ffffff);width:100%;border-radius:50px;background-color:transparent;border:none;cursor:pointer;}.Active:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-elements, #4A4A4A);border:none;}}.TournamentRulesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:400;margin:10px 0;}.TournamentGamesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;gap:10px;background-color:var(--emw-color-bg-secondary, #333232);padding:10px;border-radius:6px;}.TournamentGamesContainer.svelte-p7mf8l {display:grid;gap:12px;grid-template-columns:repeat(auto-fit, minmax(min(150px, 100%), 1fr));.TournamentGameThumbnailSkeleton:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:linear-gradient(
|
|
37
|
-
to top,
|
|
38
|
-
var(--emw-color-primary, #FF1D4E),
|
|
39
|
-
transparent
|
|
40
|
-
);background-size:100% 200%;
|
|
41
|
-
animation: pulse 1.5s ease-in-out infinite;}.ImageContainer:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;}img:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;border-radius:6px;}.PlayButtonOverlay:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(0, 0, 0, 0.6);display:flex;justify-content:center;align-items:center;opacity:0;&:hover {opacity:1;transition:opacity 0.5s;}.PlayGameButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-primary, #FF1D4E);border-radius:6px;color:var(--emw-color-typography, #ffffff);padding:10px;border:none;outline:none;min-width:50%;cursor:pointer;&:hover {background-color:var(--emw-color-primary-hover, #ff3a65);cursor:pointer;}&:active {transform:scale(0.9);}}}}.PaginationWrapper.svelte-p7mf8l {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-p7mf8l) {display:flex;gap:3px;}.PaginationButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;border:none;outline:none;padding:10px;width:auto;cursor:pointer;&.Number {background-color:transparent;min-width:0;padding:0 10px;}&:hover {background-color:var(--emw-color-bg-elements, #4A4A4A);cursor:pointer;}&:active {transform:scale(0.9);}&:disabled {opacity:60%;pointer-events:none;}&.Active {background-color:var(--emw-color-bg-elements, #4A4A4A);}&.Elipsis {pointer-events:none;background-color:transparent;min-width:0;padding:0;align-self:center;}}}.NoGamesAvailable.svelte-p7mf8l {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:300;}.PaginationSkeleton.svelte-p7mf8l {display:flex;justify-content:space-between;gap:6px;}.PaginationSkeletonButton.svelte-p7mf8l {width:80px;height:35px;border-radius:6px;background-color:var(--emw-color-bg-elements, #4A4A4A);overflow:hidden;position:relative;}.PaginationNumberSkeleton.svelte-p7mf8l {width:40px;height:35px;border-radius:6px;background-color:var(--emw-color-bg-elements, #4A4A4A);overflow:hidden;position:relative;}.SkeletonShimmer.svelte-p7mf8l {width:100%;height:100%;background:linear-gradient(
|
|
42
|
-
90deg,
|
|
43
|
-
transparent 0%,
|
|
44
|
-
var(--emw-color-skeleton, #333232) 50%,
|
|
45
|
-
transparent 100%
|
|
46
|
-
);
|
|
47
|
-
animation: svelte-p7mf8l-loading 1.5s infinite;transform:translateX(-100%);}
|
|
48
|
-
|
|
49
|
-
@keyframes svelte-p7mf8l-loading {
|
|
50
|
-
0% {
|
|
51
|
-
transform: translateX(-100%);
|
|
52
|
-
}
|
|
53
|
-
100% {
|
|
54
|
-
transform: translateX(100%);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@media (min-width: 750px) {.TournamentGamesTabs.svelte-p7mf8l {width:fit-content;}.PaginationWrapper.svelte-p7mf8l, .PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;}.PaginationButton.svelte-p7mf8l {min-width:75px;}.PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;.PaginationSkeletonButton:where(.svelte-p7mf8l) {width:auto;min-width:55px;}.PaginationNumberSkeleton:where(.svelte-p7mf8l) {width:35px;}}
|
|
59
|
-
|
|
60
|
-
}.Hidden.svelte-p7mf8l {display:none;}`
|
|
61
|
-
};
|
|
62
|
-
function ct(B, d) {
|
|
63
|
-
Fe(d, !0), Xe(B, dt);
|
|
64
|
-
const b = () => Je(Qe, "$_", ce), [ce, ue] = qe(), W = y(d, "initialGames"), q = y(d, "endpoint"), N = y(d, "language", 7, "en"), z = y(d, "session"), R = y(d, "tournamentid"), u = y(d, "gamesLimit", 7, 6), E = y(d, "totalGames"), Q = y(d, "platformProp", 7, null), D = y(d, "tournamentMetadata");
|
|
65
|
-
Object.keys(de).forEach((e) => {
|
|
66
|
-
$e(e, de[e]);
|
|
67
|
-
}), ve(N());
|
|
68
|
-
const fe = () => {
|
|
69
|
-
ve(N());
|
|
70
|
-
};
|
|
71
|
-
pe(() => {
|
|
72
|
-
fe();
|
|
73
|
-
});
|
|
74
|
-
let L = O(Ue(W() || [])), M = O(!1), c = O(0), C = O(void 0);
|
|
75
|
-
const ge = et() ? Q() ?? "dk" : Ze(window.navigator.userAgent), V = async () => {
|
|
76
|
-
if (Y.has(a(H)))
|
|
77
|
-
return;
|
|
78
|
-
w(M, !0);
|
|
79
|
-
const e = new URL(`${q()}/v1/tournaments/${R()}`), t = new Headers();
|
|
80
|
-
z() && t.append("X-SessionId", z());
|
|
81
|
-
const n = { method: "GET", headers: t };
|
|
82
|
-
e.searchParams.append("filter", `id=${R()}`), e.searchParams.append("language", N()), e.searchParams.append("expand", "games"), e.searchParams.append("pagination", `games(limit=${u()},offset=${a(c)})`), e.searchParams.append("platform", ge), fetch(e, n).then((s) => s.json()).then((s) => {
|
|
83
|
-
w(L, s?.item?.games?.items, !0), Y.set(a(H), a(L));
|
|
84
|
-
}).catch((s) => console.log(s)).finally(() => w(M, !1));
|
|
85
|
-
}, be = () => {
|
|
86
|
-
const e = Math.ceil(E() / u()), t = Math.floor(a(c) / u()) + 1;
|
|
87
|
-
if (e <= 5)
|
|
88
|
-
return Array.from({ length: e }, (s, i) => i + 1);
|
|
89
|
-
const n = [];
|
|
90
|
-
return n.push(1), t <= 3 ? (n.push(2, 3), n.push("..."), n.push(e)) : t >= e - 2 ? (n.push("..."), n.push(e - 2, e - 1, e)) : (n.push("..."), n.push(t - 1, t, t + 1), n.push("..."), n.push(e)), n;
|
|
91
|
-
}, he = () => {
|
|
92
|
-
a(c) < E() && (w(c, a(c) + u()), V());
|
|
93
|
-
}, _e = () => {
|
|
94
|
-
a(c) !== 0 && (w(c, a(c) - u()), V());
|
|
95
|
-
}, xe = (e) => {
|
|
96
|
-
w(c, (e - 1) * u()), V();
|
|
97
|
-
}, we = ae(be), H = ae(() => Math.floor(a(c) / u()) + 1);
|
|
98
|
-
let Y = /* @__PURE__ */ new Map([[1, W()]]), ye = ae(() => Y.get(a(H)) ?? []), P = O("casino");
|
|
99
|
-
const ke = () => {
|
|
100
|
-
if (!D()) return;
|
|
101
|
-
const e = D().sports?.rules;
|
|
102
|
-
let t;
|
|
103
|
-
if (e)
|
|
104
|
-
try {
|
|
105
|
-
t = JSON.parse(e), w(C, t[N()] || t["*"], !0);
|
|
106
|
-
} catch (n) {
|
|
107
|
-
console.log(n), w(C, `${b()("sportsRulesParseError")}`);
|
|
108
|
-
}
|
|
109
|
-
}, Pe = (e) => {
|
|
110
|
-
window.postMessage(
|
|
111
|
-
{
|
|
112
|
-
type: "Tournaments:PlayGame",
|
|
113
|
-
launchUrl: e.launchUrl,
|
|
114
|
-
id: e.gameId,
|
|
115
|
-
thumbnail: e.thumbnail,
|
|
116
|
-
name: e.name
|
|
117
|
-
},
|
|
118
|
-
window.location.href
|
|
119
|
-
);
|
|
120
|
-
};
|
|
121
|
-
pe(() => {
|
|
122
|
-
Object.keys(D()).length !== 0 && ke();
|
|
123
|
-
});
|
|
124
|
-
var Se = {
|
|
125
|
-
get initialGames() {
|
|
126
|
-
return W();
|
|
127
|
-
},
|
|
128
|
-
set initialGames(e) {
|
|
129
|
-
W(e), k();
|
|
130
|
-
},
|
|
131
|
-
get endpoint() {
|
|
132
|
-
return q();
|
|
133
|
-
},
|
|
134
|
-
set endpoint(e) {
|
|
135
|
-
q(e), k();
|
|
136
|
-
},
|
|
137
|
-
get language() {
|
|
138
|
-
return N();
|
|
139
|
-
},
|
|
140
|
-
set language(e = "en") {
|
|
141
|
-
N(e), k();
|
|
142
|
-
},
|
|
143
|
-
get session() {
|
|
144
|
-
return z();
|
|
145
|
-
},
|
|
146
|
-
set session(e) {
|
|
147
|
-
z(e), k();
|
|
148
|
-
},
|
|
149
|
-
get tournamentid() {
|
|
150
|
-
return R();
|
|
151
|
-
},
|
|
152
|
-
set tournamentid(e) {
|
|
153
|
-
R(e), k();
|
|
154
|
-
},
|
|
155
|
-
get gamesLimit() {
|
|
156
|
-
return u();
|
|
157
|
-
},
|
|
158
|
-
set gamesLimit(e = 6) {
|
|
159
|
-
u(e), k();
|
|
160
|
-
},
|
|
161
|
-
get totalGames() {
|
|
162
|
-
return E();
|
|
163
|
-
},
|
|
164
|
-
set totalGames(e) {
|
|
165
|
-
E(e), k();
|
|
166
|
-
},
|
|
167
|
-
get platformProp() {
|
|
168
|
-
return Q();
|
|
169
|
-
},
|
|
170
|
-
set platformProp(e = null) {
|
|
171
|
-
Q(e), k();
|
|
172
|
-
},
|
|
173
|
-
get tournamentMetadata() {
|
|
174
|
-
return D();
|
|
175
|
-
},
|
|
176
|
-
set tournamentMetadata(e) {
|
|
177
|
-
D(e), k();
|
|
178
|
-
}
|
|
179
|
-
}, Z = vt(), $ = l(Z), ee = l($), Te = l(ee, !0);
|
|
180
|
-
r(ee);
|
|
181
|
-
var ne = _(ee, 2), Ge = l(ne, !0);
|
|
182
|
-
r(ne), r($);
|
|
183
|
-
var se = _($, 2);
|
|
184
|
-
{
|
|
185
|
-
var Ae = (e) => {
|
|
186
|
-
var t = tt(), n = l(t);
|
|
187
|
-
let s;
|
|
188
|
-
n.__click = () => w(P, "casino");
|
|
189
|
-
var i = l(n, !0);
|
|
190
|
-
r(n);
|
|
191
|
-
var o = _(n, 2);
|
|
192
|
-
let p;
|
|
193
|
-
o.__click = () => w(P, "sports");
|
|
194
|
-
var v = l(o, !0);
|
|
195
|
-
r(o), r(t), S(
|
|
196
|
-
(h, f) => {
|
|
197
|
-
s = A(n, 1, "Tab svelte-p7mf8l", null, s, { Active: a(P) === "casino" }), x(i, h), p = A(o, 1, "Tab svelte-p7mf8l", null, p, { Active: a(P) === "sports" }), x(v, f);
|
|
198
|
-
},
|
|
199
|
-
[() => b()("casinoTab"), () => b()("sportsbookTab")]
|
|
200
|
-
), m(e, t);
|
|
201
|
-
};
|
|
202
|
-
G(se, (e) => {
|
|
203
|
-
Object.keys(D()).length !== 0 && e(Ae);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
var oe = _(se, 2);
|
|
207
|
-
{
|
|
208
|
-
var Be = (e) => {
|
|
209
|
-
var t = nt();
|
|
210
|
-
let n;
|
|
211
|
-
X(t, 21, () => a(C), U, (s, i) => {
|
|
212
|
-
var o = at(), p = l(o);
|
|
213
|
-
r(o), S((v) => x(p, `${a(i).rule ?? ""} ${v ?? ""}`), [() => b()("contribution")]), m(s, o);
|
|
214
|
-
}), r(t), S(() => n = A(t, 1, "TournamentRulesWrapper svelte-p7mf8l", null, n, { Hidden: a(P) === "casino" })), m(e, t);
|
|
215
|
-
};
|
|
216
|
-
G(oe, (e) => {
|
|
217
|
-
a(C) && e(Be);
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
var I = _(oe, 2);
|
|
221
|
-
let re;
|
|
222
|
-
var Ne = l(I);
|
|
223
|
-
{
|
|
224
|
-
var De = (e) => {
|
|
225
|
-
var t = J(), n = K(t);
|
|
226
|
-
X(n, 17, () => Array(u()), U, (s, i, o, p) => {
|
|
227
|
-
var v = st();
|
|
228
|
-
m(s, v);
|
|
229
|
-
}), m(e, t);
|
|
230
|
-
}, Me = (e) => {
|
|
231
|
-
var t = J(), n = K(t);
|
|
232
|
-
X(n, 17, () => a(ye), U, (s, i) => {
|
|
233
|
-
var o = ot();
|
|
234
|
-
o.__click = () => Pe(a(i));
|
|
235
|
-
var p = l(o), v = l(p), h = _(v, 2), f = l(h), F = l(f, !0);
|
|
236
|
-
r(f), r(h), r(p), r(o), S(
|
|
237
|
-
(te) => {
|
|
238
|
-
me(v, "src", `https:${a(i).thumbnail}`), me(v, "alt", a(i).name), x(F, te);
|
|
239
|
-
},
|
|
240
|
-
[() => b()("play")]
|
|
241
|
-
), m(s, o);
|
|
242
|
-
}), m(e, t);
|
|
243
|
-
};
|
|
244
|
-
G(Ne, (e) => {
|
|
245
|
-
a(M) || a(L)?.length === 0 ? e(De) : e(Me, !1);
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
r(I);
|
|
249
|
-
var le = _(I, 2);
|
|
250
|
-
{
|
|
251
|
-
var je = (e) => {
|
|
252
|
-
var t = it();
|
|
253
|
-
let n;
|
|
254
|
-
var s = l(t);
|
|
255
|
-
s.__click = _e;
|
|
256
|
-
var i = l(s, !0);
|
|
257
|
-
r(s);
|
|
258
|
-
var o = _(s, 2);
|
|
259
|
-
X(o, 21, () => a(we), U, (h, f) => {
|
|
260
|
-
var F = J(), te = K(F);
|
|
261
|
-
{
|
|
262
|
-
var ze = (j) => {
|
|
263
|
-
var T = rt();
|
|
264
|
-
m(j, T);
|
|
265
|
-
}, Re = (j) => {
|
|
266
|
-
var T = lt();
|
|
267
|
-
let ie;
|
|
268
|
-
T.__click = () => xe(a(f));
|
|
269
|
-
var Ce = l(T, !0);
|
|
270
|
-
r(T), S(() => {
|
|
271
|
-
ie = A(T, 1, "PaginationButton Number svelte-p7mf8l", null, ie, { Active: a(f) === a(H) }), x(Ce, a(f));
|
|
272
|
-
}), m(j, T);
|
|
273
|
-
};
|
|
274
|
-
G(te, (j) => {
|
|
275
|
-
typeof a(f) != "number" ? j(ze) : j(Re, !1);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
m(h, F);
|
|
279
|
-
}), r(o);
|
|
280
|
-
var p = _(o, 2);
|
|
281
|
-
p.__click = he;
|
|
282
|
-
var v = l(p, !0);
|
|
283
|
-
r(p), r(t), S(
|
|
284
|
-
(h, f) => {
|
|
285
|
-
n = A(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(P) === "sports" }), s.disabled = a(c) === 0, x(i, h), p.disabled = a(c) >= E() - u(), x(v, f);
|
|
286
|
-
},
|
|
287
|
-
[() => b()("previousButton"), () => b()("nextButton")]
|
|
288
|
-
), m(e, t);
|
|
289
|
-
}, Ee = (e) => {
|
|
290
|
-
var t = J(), n = K(t);
|
|
291
|
-
{
|
|
292
|
-
var s = (i) => {
|
|
293
|
-
var o = pt();
|
|
294
|
-
let p;
|
|
295
|
-
var v = l(o, !0);
|
|
296
|
-
r(o), S(
|
|
297
|
-
(h) => {
|
|
298
|
-
p = A(o, 1, "NoGamesAvailable svelte-p7mf8l", null, p, { Hidden: a(P) === "sports" }), x(v, h);
|
|
299
|
-
},
|
|
300
|
-
[() => b()("noAvailableGames")]
|
|
301
|
-
), m(i, o);
|
|
302
|
-
};
|
|
303
|
-
G(
|
|
304
|
-
n,
|
|
305
|
-
(i) => {
|
|
306
|
-
!a(M) && a(L)?.length === 0 && i(s);
|
|
307
|
-
},
|
|
308
|
-
!0
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
m(e, t);
|
|
312
|
-
};
|
|
313
|
-
G(le, (e) => {
|
|
314
|
-
!a(M) && a(L)?.length > 0 ? e(je) : e(Ee, !1);
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
var Le = _(le, 2);
|
|
318
|
-
{
|
|
319
|
-
var Oe = (e) => {
|
|
320
|
-
var t = mt();
|
|
321
|
-
m(e, t);
|
|
322
|
-
};
|
|
323
|
-
G(Le, (e) => {
|
|
324
|
-
a(M) && e(Oe);
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
r(Z), S(
|
|
328
|
-
(e, t) => {
|
|
329
|
-
x(Te, e), x(Ge, t), re = A(I, 1, "TournamentGamesContainer svelte-p7mf8l", null, re, { Hidden: a(P) === "sports" });
|
|
330
|
-
},
|
|
331
|
-
[
|
|
332
|
-
() => b()("gamesDescriptionTitle"),
|
|
333
|
-
() => b()("gamesDescriptionSubtitle")
|
|
334
|
-
]
|
|
335
|
-
), m(B, Z);
|
|
336
|
-
var We = Ke(Se);
|
|
337
|
-
return ue(), We;
|
|
338
|
-
}
|
|
339
|
-
Ve(["click"]);
|
|
340
|
-
customElements.define("tournament-games", Ye(
|
|
341
|
-
ct,
|
|
342
|
-
{
|
|
343
|
-
initialGames: {},
|
|
344
|
-
endpoint: {},
|
|
345
|
-
language: {},
|
|
346
|
-
session: {},
|
|
347
|
-
tournamentid: {},
|
|
348
|
-
gamesLimit: {},
|
|
349
|
-
totalGames: {},
|
|
350
|
-
platformProp: {},
|
|
351
|
-
tournamentMetadata: {}
|
|
352
|
-
},
|
|
353
|
-
[],
|
|
354
|
-
[],
|
|
355
|
-
!1
|
|
356
|
-
));
|
|
357
|
-
export {
|
|
358
|
-
ct as default
|
|
359
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";var K=(h,m,i)=>new Promise((j,A)=>{var y=d=>{try{g(i.next(d))}catch(b){A(b)}},S=d=>{try{g(i.throw(d))}catch(b){A(b)}},g=d=>d.done?j(d.value):Promise.resolve(d.value).then(y,S);g((i=i.apply(h,m)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetails-C-zS8XGk.cjs"),Pe=require("./TournamentDetailsPage-CR3ti0az.cjs");function Se(h,m){e.addMessages(h,m)}function Q(h){e.$locale.set(h)}const V={en:{previousButton:"Previous",nextButton:"Next",casinoTab:"Casino",sportsbookTab:"Sportsbook",gamesDescriptionTitle:"Participating games",gamesDescriptionSubtitle:"Discover the games",sportsRulesParseError:"Error parsing tournament rules",noAvailableGames:"No games have been configured yet!"},tr:{previousButton:"Önceki",nextButton:"Sonraki",casinoTab:"Casino",sportsbookTab:"Spor Bahisleri",gamesDescriptionTitle:"Katılımcı oyunlar",gamesDescriptionSubtitle:"Oyunları keşfedin",sportsRulesParseError:"Turnuva kuralları ayrıştırma hatası",noAvailableGames:"Henüz oyun yapılandırılmamış!"}},Te=()=>typeof window=="undefined";var Ge=e.from_html('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'),Ae=e.from_html('<p class="svelte-p7mf8l"> </p>'),Be=e.from_html("<div></div>"),Ne=e.from_html('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'),De=e.from_html('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'),Me=e.from_html('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'),je=e.from_html("<button> </button>"),Ee=e.from_html('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'),Oe=e.from_html("<p> </p>"),Le=e.from_html('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div></div>'),We=e.from_html('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');const Re={hash:"svelte-p7mf8l",code:`.svelte-p7mf8l,
|
|
2
|
-
.svelte-p7mf8l::before,
|
|
3
|
-
.svelte-p7mf8l::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.GamesDescription.svelte-p7mf8l {display:flex;flex-direction:column;gap:6px;margin:10px 0;.GamesDescriptionTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:16px;font-weight:600;}.GamesDescriptionSubTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:200;}}.TournamentGamesTabs.svelte-p7mf8l {display:flex;border-radius:50px;background-color:var(--emw-color-bg-section, #434343);padding:6px;margin-bottom:6px;width:100%;justify-content:center;.Tab:where(.svelte-p7mf8l) {padding:5px 20px;color:var(--emw-color-typography, #ffffff);width:100%;border-radius:50px;background-color:transparent;border:none;cursor:pointer;}.Active:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-elements, #4A4A4A);border:none;}}.TournamentRulesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:400;margin:10px 0;}.TournamentGamesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;gap:10px;background-color:var(--emw-color-bg-secondary, #333232);padding:10px;border-radius:6px;}.TournamentGamesContainer.svelte-p7mf8l {display:grid;gap:12px;grid-template-columns:repeat(auto-fit, minmax(min(150px, 100%), 1fr));.TournamentGameThumbnailSkeleton:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:linear-gradient(
|
|
4
|
-
to top,
|
|
5
|
-
var(--emw-color-primary, #FF1D4E),
|
|
6
|
-
transparent
|
|
7
|
-
);background-size:100% 200%;
|
|
8
|
-
animation: pulse 1.5s ease-in-out infinite;}.ImageContainer:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;}img:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;border-radius:6px;}.PlayButtonOverlay:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(0, 0, 0, 0.6);display:flex;justify-content:center;align-items:center;opacity:0;&:hover {opacity:1;transition:opacity 0.5s;}.PlayGameButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-primary, #FF1D4E);border-radius:6px;color:var(--emw-color-typography, #ffffff);padding:10px;border:none;outline:none;min-width:50%;cursor:pointer;&:hover {background-color:var(--emw-color-primary-hover, #ff3a65);cursor:pointer;}&:active {transform:scale(0.9);}}}}.PaginationWrapper.svelte-p7mf8l {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-p7mf8l) {display:flex;gap:3px;}.PaginationButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;border:none;outline:none;padding:10px;width:auto;cursor:pointer;&.Number {background-color:transparent;min-width:0;padding:0 10px;}&:hover {background-color:var(--emw-color-bg-elements, #4A4A4A);cursor:pointer;}&:active {transform:scale(0.9);}&:disabled {opacity:60%;pointer-events:none;}&.Active {background-color:var(--emw-color-bg-elements, #4A4A4A);}&.Elipsis {pointer-events:none;background-color:transparent;min-width:0;padding:0;align-self:center;}}}.NoGamesAvailable.svelte-p7mf8l {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:300;}.PaginationSkeleton.svelte-p7mf8l {display:flex;justify-content:space-between;gap:6px;}.PaginationSkeletonButton.svelte-p7mf8l {width:80px;height:35px;border-radius:6px;background-color:var(--emw-color-bg-elements, #4A4A4A);overflow:hidden;position:relative;}.PaginationNumberSkeleton.svelte-p7mf8l {width:40px;height:35px;border-radius:6px;background-color:var(--emw-color-bg-elements, #4A4A4A);overflow:hidden;position:relative;}.SkeletonShimmer.svelte-p7mf8l {width:100%;height:100%;background:linear-gradient(
|
|
9
|
-
90deg,
|
|
10
|
-
transparent 0%,
|
|
11
|
-
var(--emw-color-skeleton, #333232) 50%,
|
|
12
|
-
transparent 100%
|
|
13
|
-
);
|
|
14
|
-
animation: svelte-p7mf8l-loading 1.5s infinite;transform:translateX(-100%);}
|
|
15
|
-
|
|
16
|
-
@keyframes svelte-p7mf8l-loading {
|
|
17
|
-
0% {
|
|
18
|
-
transform: translateX(-100%);
|
|
19
|
-
}
|
|
20
|
-
100% {
|
|
21
|
-
transform: translateX(100%);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@media (min-width: 750px) {.TournamentGamesTabs.svelte-p7mf8l {width:fit-content;}.PaginationWrapper.svelte-p7mf8l, .PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;}.PaginationButton.svelte-p7mf8l {min-width:75px;}.PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;.PaginationSkeletonButton:where(.svelte-p7mf8l) {width:auto;min-width:55px;}.PaginationNumberSkeleton:where(.svelte-p7mf8l) {width:35px;}}
|
|
26
|
-
|
|
27
|
-
}.Hidden.svelte-p7mf8l {display:none;}`};function Y(h,m){var q;e.push(m,!0),e.append_styles(h,Re);const i=()=>e.store_get(e.$format,"$_",j),[j,A]=e.setup_stores(),y=e.prop(m,"initialGames"),S=e.prop(m,"endpoint"),g=e.prop(m,"language",7,"en"),d=e.prop(m,"session"),b=e.prop(m,"tournamentid"),v=e.prop(m,"gamesLimit",7,6),T=e.prop(m,"totalGames"),E=e.prop(m,"platformProp",7,null),w=e.prop(m,"tournamentMetadata");Object.keys(V).forEach(t=>{Se(t,V[t])}),Q(g());const Z=()=>{Q(g())};e.user_effect(()=>{Z()});let G=e.state(e.proxy(y()||[])),k=e.state(!1),f=e.state(0),B=e.state(void 0);const $=Te()?(q=E())!=null?q:"dk":Pe.getDevice(window.navigator.userAgent),O=()=>K(this,null,function*(){if(L.has(e.get(N)))return;e.set(k,!0);const t=new URL(`${S()}/v1/tournaments/${b()}`),a=new Headers;d()&&a.append("X-SessionId",d());const n={method:"GET",headers:a};t.searchParams.append("filter",`id=${b()}`),t.searchParams.append("language",g()),t.searchParams.append("expand","games"),t.searchParams.append("pagination",`games(limit=${v()},offset=${e.get(f)})`),t.searchParams.append("platform",$),fetch(t,n).then(r=>r.json()).then(r=>{var o,s;e.set(G,(s=(o=r==null?void 0:r.item)==null?void 0:o.games)==null?void 0:s.items,!0),L.set(e.get(N),e.get(G))}).catch(r=>console.log(r)).finally(()=>e.set(k,!1))}),ee=()=>{const t=Math.ceil(T()/v()),a=Math.floor(e.get(f)/v())+1;if(t<=5)return Array.from({length:t},(r,o)=>o+1);const n=[];return n.push(1),a<=3?(n.push(2,3),n.push("..."),n.push(t)):a>=t-2?(n.push("..."),n.push(t-2,t-1,t)):(n.push("..."),n.push(a-1,a,a+1),n.push("..."),n.push(t)),n},te=()=>{e.get(f)<T()&&(e.set(f,e.get(f)+v()),O())},ae=()=>{e.get(f)!==0&&(e.set(f,e.get(f)-v()),O())},ne=t=>{e.set(f,(t-1)*v()),O()},se=e.user_derived(ee),N=e.user_derived(()=>Math.floor(e.get(f)/v())+1);let L=new Map([[1,y()]]),re=e.user_derived(()=>{var t;return(t=L.get(e.get(N)))!=null?t:[]}),_=e.state("casino");const oe=()=>{var n;if(!w())return;const t=(n=w().sports)==null?void 0:n.rules;let a;if(t)try{a=JSON.parse(t),e.set(B,a[g()]||a["*"],!0)}catch(r){console.log(r),e.set(B,`${i()("sportsRulesParseError")}`)}},le=t=>{window.postMessage({type:"Tournaments:PlayGame",launchUrl:t.launchUrl,id:t.gameId,thumbnail:t.thumbnail,name:t.name},window.location.href)};e.user_effect(()=>{Object.keys(w()).length!==0&&oe()});var ie={get initialGames(){return y()},set initialGames(t){y(t),e.flushSync()},get endpoint(){return S()},set endpoint(t){S(t),e.flushSync()},get language(){return g()},set language(t="en"){g(t),e.flushSync()},get session(){return d()},set session(t){d(t),e.flushSync()},get tournamentid(){return b()},set tournamentid(t){b(t),e.flushSync()},get gamesLimit(){return v()},set gamesLimit(t=6){v(t),e.flushSync()},get totalGames(){return T()},set totalGames(t){T(t),e.flushSync()},get platformProp(){return E()},set platformProp(t=null){E(t),e.flushSync()},get tournamentMetadata(){return w()},set tournamentMetadata(t){w(t),e.flushSync()}},W=We(),R=e.child(W),z=e.child(R),pe=e.child(z,!0);e.reset(z);var C=e.sibling(z,2),me=e.child(C,!0);e.reset(C),e.reset(R);var I=e.sibling(R,2);{var ce=t=>{var a=Ge(),n=e.child(a);let r;n.__click=()=>e.set(_,"casino");var o=e.child(n,!0);e.reset(n);var s=e.sibling(n,2);let l;s.__click=()=>e.set(_,"sports");var p=e.child(s,!0);e.reset(s),e.reset(a),e.template_effect((c,u)=>{r=e.set_class(n,1,"Tab svelte-p7mf8l",null,r,{Active:e.get(_)==="casino"}),e.set_text(o,c),l=e.set_class(s,1,"Tab svelte-p7mf8l",null,l,{Active:e.get(_)==="sports"}),e.set_text(p,u)},[()=>i()("casinoTab"),()=>i()("sportsbookTab")]),e.append(t,a)};e.if_block(I,t=>{Object.keys(w()).length!==0&&t(ce)})}var F=e.sibling(I,2);{var de=t=>{var a=Be();let n;e.each(a,21,()=>e.get(B),e.index,(r,o)=>{var s=Ae(),l=e.child(s);e.reset(s),e.template_effect(p=>{var c;return e.set_text(l,`${(c=e.get(o).rule)!=null?c:""} ${p!=null?p:""}`)},[()=>i()("contribution")]),e.append(r,s)}),e.reset(a),e.template_effect(()=>n=e.set_class(a,1,"TournamentRulesWrapper svelte-p7mf8l",null,n,{Hidden:e.get(_)==="casino"})),e.append(t,a)};e.if_block(F,t=>{e.get(B)&&t(de)})}var D=e.sibling(F,2);let X;var fe=e.child(D);{var ve=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>Array(v()),e.index,(r,o,s,l)=>{var p=Ne();e.append(r,p)}),e.append(t,a)},ue=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>e.get(re),e.index,(r,o)=>{var s=De();s.__click=()=>le(e.get(o));var l=e.child(s),p=e.child(l),c=e.sibling(p,2),u=e.child(c),M=e.child(u,!0);e.reset(u),e.reset(c),e.reset(l),e.reset(s),e.template_effect(H=>{e.set_attribute(p,"src",`https:${e.get(o).thumbnail}`),e.set_attribute(p,"alt",e.get(o).name),e.set_text(M,H)},[()=>i()("play")]),e.append(r,s)}),e.append(t,a)};e.if_block(fe,t=>{var a;e.get(k)||((a=e.get(G))==null?void 0:a.length)===0?t(ve):t(ue,!1)})}e.reset(D);var U=e.sibling(D,2);{var ge=t=>{var a=Ee();let n;var r=e.child(a);r.__click=ae;var o=e.child(r,!0);e.reset(r);var s=e.sibling(r,2);e.each(s,21,()=>e.get(se),e.index,(c,u)=>{var M=e.comment(),H=e.first_child(M);{var ye=P=>{var x=Me();e.append(P,x)},we=P=>{var x=je();let J;x.__click=()=>ne(e.get(u));var ke=e.child(x,!0);e.reset(x),e.template_effect(()=>{J=e.set_class(x,1,"PaginationButton Number svelte-p7mf8l",null,J,{Active:e.get(u)===e.get(N)}),e.set_text(ke,e.get(u))}),e.append(P,x)};e.if_block(H,P=>{typeof e.get(u)!="number"?P(ye):P(we,!1)})}e.append(c,M)}),e.reset(s);var l=e.sibling(s,2);l.__click=te;var p=e.child(l,!0);e.reset(l),e.reset(a),e.template_effect((c,u)=>{n=e.set_class(a,1,"PaginationWrapper svelte-p7mf8l",null,n,{Hidden:e.get(_)==="sports"}),r.disabled=e.get(f)===0,e.set_text(o,c),l.disabled=e.get(f)>=T()-v(),e.set_text(p,u)},[()=>i()("previousButton"),()=>i()("nextButton")]),e.append(t,a)},he=t=>{var a=e.comment(),n=e.first_child(a);{var r=o=>{var s=Oe();let l;var p=e.child(s,!0);e.reset(s),e.template_effect(c=>{l=e.set_class(s,1,"NoGamesAvailable svelte-p7mf8l",null,l,{Hidden:e.get(_)==="sports"}),e.set_text(p,c)},[()=>i()("noAvailableGames")]),e.append(o,s)};e.if_block(n,o=>{var s;!e.get(k)&&((s=e.get(G))==null?void 0:s.length)===0&&o(r)},!0)}e.append(t,a)};e.if_block(U,t=>{var a;!e.get(k)&&((a=e.get(G))==null?void 0:a.length)>0?t(ge):t(he,!1)})}var be=e.sibling(U,2);{var _e=t=>{var a=Le();e.append(t,a)};e.if_block(be,t=>{e.get(k)&&t(_e)})}e.reset(W),e.template_effect((t,a)=>{e.set_text(pe,t),e.set_text(me,a),X=e.set_class(D,1,"TournamentGamesContainer svelte-p7mf8l",null,X,{Hidden:e.get(_)==="sports"})},[()=>i()("gamesDescriptionTitle"),()=>i()("gamesDescriptionSubtitle")]),e.append(h,W);var xe=e.pop(ie);return A(),xe}e.delegate(["click"]);customElements.define("tournament-games",e.create_custom_element(Y,{initialGames:{},endpoint:{},language:{},session:{},tournamentid:{},gamesLimit:{},totalGames:{},platformProp:{},tournamentMetadata:{}},[],[],!1));exports.default=Y;
|