@everymatrix/tournament-details-page 0.1.7 → 0.1.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.
@@ -1,869 +0,0 @@
1
- import { a as lt, $ as dt, c as ct, b as vt, p as Pe, u as ut, d as at, o as ht, i as he, t as de, e as D, f as ft, s as pt, g as Q, h as Se, j as gt, k as z, l as C, m as yt, n as mt, q as K, r as s, v as f, w as bt, x as wt, y as ce, z as $e, A as h, B as Le, C as we, D as et, E as tt, F as _t, G as nt, H as jt } from "./TournamentDetailsPage-wAedD3fv.js";
2
- function ot(fe, Z) {
3
- lt(fe, Z);
4
- }
5
- function st(fe) {
6
- dt.set(fe);
7
- }
8
- const it = {
9
- en: {
10
- rank: "Rank",
11
- user: "User",
12
- points: "Points",
13
- prize: "Prize",
14
- notEnrolledRank: "You are currently not enrolled in this tournament.",
15
- leaderboardNotAvailable: "Leaderboard will be available soon.",
16
- myRanking: "My Ranking",
17
- showMore: "Show More",
18
- showLess: "Show Less",
19
- emptyLeaderboard: "Currently there are no players enrolled in this tournament",
20
- joinButton: "Join",
21
- previousButton: "Previous",
22
- nextButton: "Next"
23
- },
24
- tr: {
25
- rank: "Sıralama",
26
- user: "Kullanıcı",
27
- points: "Puan",
28
- prize: "Ödül",
29
- notEnrolledRank: "Şu anda bu turnuvaya kayıtlı değilsiniz.",
30
- leaderboardNotAvailable: "Liderlik tablosu yakında kullanıma sunulacak.",
31
- myRanking: "Sıralamam",
32
- showMore: "Daha Fazla Göster",
33
- showLess: "Daha Az Göster",
34
- emptyLeaderboard: "Şu anda bu turnuvaya kayıtlı oyuncu bulunmuyor.",
35
- joinButton: "Katıl",
36
- previousButton: "Önceki",
37
- nextButton: "Sonraki"
38
- },
39
- da: {
40
- rank: "Rang",
41
- user: "Bruger",
42
- points: "Point",
43
- prize: "Præmie",
44
- notEnrolledRank: "Du er i øjeblikket ikke tilmeldt denne turnering.",
45
- leaderboardNotAvailable: "Leaderboard vil være tilgængelig snart.",
46
- myRanking: "Min placering",
47
- showMore: "Vis mere",
48
- showLess: "Vis mindre",
49
- emptyLeaderboard: "Der er i øjeblikket ingen spillere tilmeldt denne turnering",
50
- previousButton: "Forrige",
51
- nextButton: "Næste",
52
- joinButton: "Deltag"
53
- }
54
- };
55
- var rt = { exports: {} };
56
- /** @license
57
- * eventsource.js
58
- * Available under MIT License (MIT)
59
- * https://github.com/Yaffle/EventSource/
60
- */
61
- (function(fe, Z) {
62
- (function(_) {
63
- var ee = _.setTimeout, pe = _.clearTimeout, L = _.XMLHttpRequest, te = _.XDomainRequest, re = _.ActiveXObject, ae = _.EventSource, X = _.document, Re = _.Promise, ge = _.fetch, qe = _.Response, Te = _.TextDecoder, ne = _.TextEncoder, ye = _.AbortController;
64
- if (typeof window < "u" && typeof X < "u" && !("readyState" in X) && X.body == null && (X.readyState = "loading", window.addEventListener("load", function(e) {
65
- X.readyState = "complete";
66
- }, !1)), L == null && re != null && (L = function() {
67
- return new re("Microsoft.XMLHTTP");
68
- }), Object.create == null && (Object.create = function(e) {
69
- function a() {
70
- }
71
- return a.prototype = e, new a();
72
- }), Date.now || (Date.now = function() {
73
- return (/* @__PURE__ */ new Date()).getTime();
74
- }), ye == null) {
75
- var Ne = ge;
76
- ge = function(e, a) {
77
- var n = a.signal;
78
- return Ne(e, { headers: a.headers, credentials: a.credentials, cache: a.cache }).then(function(r) {
79
- var d = r.body.getReader();
80
- return n._reader = d, n._aborted && n._reader.cancel(), {
81
- status: r.status,
82
- statusText: r.statusText,
83
- headers: r.headers,
84
- body: {
85
- getReader: function() {
86
- return d;
87
- }
88
- }
89
- };
90
- });
91
- }, ye = function() {
92
- this.signal = {
93
- _reader: null,
94
- _aborted: !1
95
- }, this.abort = function() {
96
- this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
97
- };
98
- };
99
- }
100
- function Ae() {
101
- this.bitsNeeded = 0, this.codePoint = 0;
102
- }
103
- Ae.prototype.decode = function(e) {
104
- function a(g, b, c) {
105
- if (c === 1)
106
- return g >= 128 >> b && g << b <= 2047;
107
- if (c === 2)
108
- return g >= 2048 >> b && g << b <= 55295 || g >= 57344 >> b && g << b <= 65535;
109
- if (c === 3)
110
- return g >= 65536 >> b && g << b <= 1114111;
111
- throw new Error();
112
- }
113
- function n(g, b) {
114
- if (g === 6 * 1)
115
- return b >> 6 > 15 ? 3 : b > 31 ? 2 : 1;
116
- if (g === 6 * 2)
117
- return b > 15 ? 3 : 2;
118
- if (g === 6 * 3)
119
- return 3;
120
- throw new Error();
121
- }
122
- for (var r = 65533, d = "", i = this.bitsNeeded, v = this.codePoint, x = 0; x < e.length; x += 1) {
123
- var u = e[x];
124
- i !== 0 && (u < 128 || u > 191 || !a(v << 6 | u & 63, i - 6, n(i, v))) && (i = 0, v = r, d += String.fromCharCode(v)), i === 0 ? (u >= 0 && u <= 127 ? (i = 0, v = u) : u >= 192 && u <= 223 ? (i = 6 * 1, v = u & 31) : u >= 224 && u <= 239 ? (i = 6 * 2, v = u & 15) : u >= 240 && u <= 247 ? (i = 6 * 3, v = u & 7) : (i = 0, v = r), i !== 0 && !a(v, i, n(i, v)) && (i = 0, v = r)) : (i -= 6, v = v << 6 | u & 63), i === 0 && (v <= 65535 ? d += String.fromCharCode(v) : (d += String.fromCharCode(55296 + (v - 65535 - 1 >> 10)), d += String.fromCharCode(56320 + (v - 65535 - 1 & 1023))));
125
- }
126
- return this.bitsNeeded = i, this.codePoint = v, d;
127
- };
128
- var me = function() {
129
- try {
130
- return new Te().decode(new ne().encode("test"), { stream: !0 }) === "test";
131
- } catch (e) {
132
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
133
- }
134
- return !1;
135
- };
136
- (Te == null || ne == null || !me()) && (Te = Ae);
137
- var W = function() {
138
- };
139
- function T(e) {
140
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = W, this.onload = W, this.onerror = W, this.onreadystatechange = W, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = W;
141
- }
142
- T.prototype.open = function(e, a) {
143
- this._abort(!0);
144
- var n = this, r = this._xhr, d = 1, i = 0;
145
- this._abort = function(c) {
146
- n._sendTimeout !== 0 && (pe(n._sendTimeout), n._sendTimeout = 0), (d === 1 || d === 2 || d === 3) && (d = 4, r.onload = W, r.onerror = W, r.onabort = W, r.onprogress = W, r.onreadystatechange = W, r.abort(), i !== 0 && (pe(i), i = 0), c || (n.readyState = 4, n.onabort(null), n.onreadystatechange())), d = 0;
147
- };
148
- var v = function() {
149
- if (d === 1) {
150
- var c = 0, E = "", t = void 0;
151
- if ("contentType" in r)
152
- c = 200, E = "OK", t = r.contentType;
153
- else
154
- try {
155
- c = r.status, E = r.statusText, t = r.getResponseHeader("Content-Type");
156
- } catch {
157
- c = 0, E = "", t = void 0;
158
- }
159
- c !== 0 && (d = 2, n.readyState = 2, n.status = c, n.statusText = E, n._contentType = t, n.onreadystatechange());
160
- }
161
- }, x = function() {
162
- if (v(), d === 2 || d === 3) {
163
- d = 3;
164
- var c = "";
165
- try {
166
- c = r.responseText;
167
- } catch {
168
- }
169
- n.readyState = 3, n.responseText = c, n.onprogress();
170
- }
171
- }, u = function(c, E) {
172
- if ((E == null || E.preventDefault == null) && (E = {
173
- preventDefault: W
174
- }), x(), d === 1 || d === 2 || d === 3) {
175
- if (d = 4, i !== 0 && (pe(i), i = 0), n.readyState = 4, c === "load")
176
- n.onload(E);
177
- else if (c === "error")
178
- n.onerror(E);
179
- else if (c === "abort")
180
- n.onabort(E);
181
- else
182
- throw new TypeError();
183
- n.onreadystatechange();
184
- }
185
- }, g = function(c) {
186
- r != null && (r.readyState === 4 ? (!("onload" in r) || !("onerror" in r) || !("onabort" in r)) && u(r.responseText === "" ? "error" : "load", c) : r.readyState === 3 ? "onprogress" in r || x() : r.readyState === 2 && v());
187
- }, b = function() {
188
- i = ee(function() {
189
- b();
190
- }, 500), r.readyState === 3 && x();
191
- };
192
- "onload" in r && (r.onload = function(c) {
193
- u("load", c);
194
- }), "onerror" in r && (r.onerror = function(c) {
195
- u("error", c);
196
- }), "onabort" in r && (r.onabort = function(c) {
197
- u("abort", c);
198
- }), "onprogress" in r && (r.onprogress = x), "onreadystatechange" in r && (r.onreadystatechange = function(c) {
199
- g(c);
200
- }), ("contentType" in r || !("ontimeout" in L.prototype)) && (a += (a.indexOf("?") === -1 ? "?" : "&") + "padding=true"), r.open(e, a, !0), "readyState" in r && (i = ee(function() {
201
- b();
202
- }, 0));
203
- }, T.prototype.abort = function() {
204
- this._abort(!1);
205
- }, T.prototype.getResponseHeader = function(e) {
206
- return this._contentType;
207
- }, T.prototype.setRequestHeader = function(e, a) {
208
- var n = this._xhr;
209
- "setRequestHeader" in n && n.setRequestHeader(e, a);
210
- }, T.prototype.getAllResponseHeaders = function() {
211
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
212
- }, T.prototype.send = function() {
213
- if ((!("ontimeout" in L.prototype) || !("sendAsBinary" in L.prototype) && !("mozAnon" in L.prototype)) && X != null && X.readyState != null && X.readyState !== "complete") {
214
- var e = this;
215
- e._sendTimeout = ee(function() {
216
- e._sendTimeout = 0, e.send();
217
- }, 4);
218
- return;
219
- }
220
- var a = this._xhr;
221
- "withCredentials" in a && (a.withCredentials = this.withCredentials);
222
- try {
223
- a.send(void 0);
224
- } catch (n) {
225
- throw n;
226
- }
227
- };
228
- function G(e) {
229
- return e.replace(/[A-Z]/g, function(a) {
230
- return String.fromCharCode(a.charCodeAt(0) + 32);
231
- });
232
- }
233
- function _e(e) {
234
- for (var a = /* @__PURE__ */ Object.create(null), n = e.split(`\r
235
- `), r = 0; r < n.length; r += 1) {
236
- var d = n[r], i = d.split(": "), v = i.shift(), x = i.join(": ");
237
- a[G(v)] = x;
238
- }
239
- this._map = a;
240
- }
241
- _e.prototype.get = function(e) {
242
- return this._map[G(e)];
243
- }, L != null && L.HEADERS_RECEIVED == null && (L.HEADERS_RECEIVED = 2);
244
- function be() {
245
- }
246
- be.prototype.open = function(e, a, n, r, d, i, v) {
247
- e.open("GET", d);
248
- var x = 0;
249
- e.onprogress = function() {
250
- var g = e.responseText, b = g.slice(x);
251
- x += b.length, n(b);
252
- }, e.onerror = function(g) {
253
- g.preventDefault(), r(new Error("NetworkError"));
254
- }, e.onload = function() {
255
- r(null);
256
- }, e.onabort = function() {
257
- r(null);
258
- }, e.onreadystatechange = function() {
259
- if (e.readyState === L.HEADERS_RECEIVED) {
260
- var g = e.status, b = e.statusText, c = e.getResponseHeader("Content-Type"), E = e.getAllResponseHeaders();
261
- a(g, b, c, new _e(E));
262
- }
263
- }, e.withCredentials = i;
264
- for (var u in v)
265
- Object.prototype.hasOwnProperty.call(v, u) && e.setRequestHeader(u, v[u]);
266
- return e.send(), e;
267
- };
268
- function De(e) {
269
- this._headers = e;
270
- }
271
- De.prototype.get = function(e) {
272
- return this._headers.get(e);
273
- };
274
- function je() {
275
- }
276
- je.prototype.open = function(e, a, n, r, d, i, v) {
277
- var x = null, u = new ye(), g = u.signal, b = new Te();
278
- return ge(d, {
279
- headers: v,
280
- credentials: i ? "include" : "same-origin",
281
- signal: g,
282
- cache: "no-store"
283
- }).then(function(c) {
284
- return x = c.body.getReader(), a(c.status, c.statusText, c.headers.get("Content-Type"), new De(c.headers)), new Re(function(E, t) {
285
- var l = function() {
286
- x.read().then(function(o) {
287
- if (o.done)
288
- E(void 0);
289
- else {
290
- var p = b.decode(o.value, { stream: !0 });
291
- n(p), l();
292
- }
293
- }).catch(function(o) {
294
- t(o);
295
- });
296
- };
297
- l();
298
- });
299
- }).catch(function(c) {
300
- if (c.name !== "AbortError")
301
- return c;
302
- }).then(function(c) {
303
- r(c);
304
- }), {
305
- abort: function() {
306
- x?.cancel(), u.abort();
307
- }
308
- };
309
- };
310
- function xe() {
311
- this._listeners = /* @__PURE__ */ Object.create(null);
312
- }
313
- function Ee(e) {
314
- ee(function() {
315
- throw e;
316
- }, 0);
317
- }
318
- xe.prototype.dispatchEvent = function(e) {
319
- e.target = this;
320
- var a = this._listeners[e.type];
321
- if (a != null)
322
- for (var n = a.length, r = 0; r < n; r += 1) {
323
- var d = a[r];
324
- try {
325
- typeof d.handleEvent == "function" ? d.handleEvent(e) : d.call(this, e);
326
- } catch (i) {
327
- Ee(i);
328
- }
329
- }
330
- }, xe.prototype.addEventListener = function(e, a) {
331
- e = String(e);
332
- var n = this._listeners, r = n[e];
333
- r == null && (r = [], n[e] = r);
334
- for (var d = !1, i = 0; i < r.length; i += 1)
335
- r[i] === a && (d = !0);
336
- d || r.push(a);
337
- }, xe.prototype.removeEventListener = function(e, a) {
338
- e = String(e);
339
- var n = this._listeners, r = n[e];
340
- if (r != null) {
341
- for (var d = [], i = 0; i < r.length; i += 1)
342
- r[i] !== a && d.push(r[i]);
343
- d.length === 0 ? delete n[e] : n[e] = d;
344
- }
345
- };
346
- function ve(e) {
347
- this.type = e, this.target = void 0;
348
- }
349
- function We(e, a) {
350
- ve.call(this, e), this.data = a.data, this.lastEventId = a.lastEventId;
351
- }
352
- We.prototype = Object.create(ve.prototype);
353
- function Fe(e, a) {
354
- ve.call(this, e), this.status = a.status, this.statusText = a.statusText, this.headers = a.headers;
355
- }
356
- Fe.prototype = Object.create(ve.prototype);
357
- function Xe(e, a) {
358
- ve.call(this, e), this.error = a.error;
359
- }
360
- Xe.prototype = Object.create(ve.prototype);
361
- var Ge = -1, oe = 0, $ = 1, ue = 2, Be = -1, se = 0, Oe = 1, Ve = 2, He = 3, Ie = /^text\/event\-stream(;.*)?$/i, Je = 1e3, Qe = 18e6, Me = function(e, a) {
362
- var n = e == null ? a : parseInt(e, 10);
363
- return n !== n && (n = a), Ce(n);
364
- }, Ce = function(e) {
365
- return Math.min(Math.max(e, Je), Qe);
366
- }, ie = function(e, a, n) {
367
- try {
368
- typeof a == "function" && a.call(e, n);
369
- } catch (r) {
370
- Ee(r);
371
- }
372
- };
373
- function V(e, a) {
374
- xe.call(this), a = a || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Ue(this, e, a);
375
- }
376
- function ze() {
377
- return L != null && "withCredentials" in L.prototype || te == null ? new L() : new te();
378
- }
379
- var Ye = ge != null && qe != null && "body" in qe.prototype;
380
- function Ue(e, a, n) {
381
- a = String(a);
382
- var r = !!n.withCredentials, d = n.lastEventIdQueryParameterName || "lastEventId", i = Ce(1e3), v = Me(n.heartbeatTimeout, 45e3), x = "", u = i, g = !1, b = 0, c = n.headers || {}, E = n.Transport, t = Ye && E == null ? void 0 : new T(E != null ? new E() : ze()), l = E != null && typeof E != "string" ? new E() : t == null ? new je() : new be(), o = void 0, p = 0, j = Ge, k = "", U = "", S = "", O = "", y = se, J = 0, I = 0, ke = function(w, m, P, R) {
383
- if (j === oe)
384
- if (w === 200 && P != null && Ie.test(P)) {
385
- j = $, g = Date.now(), u = i, e.readyState = $;
386
- var F = new Fe("open", {
387
- status: w,
388
- statusText: m,
389
- headers: R
390
- });
391
- e.dispatchEvent(F), ie(e, e.onopen, F);
392
- } else {
393
- var B = "";
394
- w !== 200 ? (m && (m = m.replace(/\s+/g, " ")), B = "EventSource's response has a status " + w + " " + m + " that is not 200. Aborting the connection.") : B = "EventSource's response has a Content-Type specifying an unsupported type: " + (P == null ? "-" : P.replace(/\s+/g, " ")) + ". Aborting the connection.", H();
395
- var F = new Fe("error", {
396
- status: w,
397
- statusText: m,
398
- headers: R
399
- });
400
- e.dispatchEvent(F), ie(e, e.onerror, F), console.error(B);
401
- }
402
- }, A = function(w) {
403
- if (j === $) {
404
- for (var m = -1, P = 0; P < w.length; P += 1) {
405
- var R = w.charCodeAt(P);
406
- (R === 10 || R === 13) && (m = P);
407
- }
408
- var F = (m !== -1 ? O : "") + w.slice(0, m + 1);
409
- O = (m === -1 ? O : "") + w.slice(m + 1), w !== "" && (g = Date.now(), b += w.length);
410
- for (var B = 0; B < F.length; B += 1) {
411
- var R = F.charCodeAt(B);
412
- if (y === Be && R === 10)
413
- y = se;
414
- else if (y === Be && (y = se), R === 13 || R === 10) {
415
- if (y !== se) {
416
- y === Oe && (I = B + 1);
417
- var q = F.slice(J, I - 1), M = F.slice(I + (I < B && F.charCodeAt(I) === 32 ? 1 : 0), B);
418
- q === "data" ? (k += `
419
- `, k += M) : q === "id" ? U = M : q === "event" ? S = M : q === "retry" ? (i = Me(M, i), u = i) : q === "heartbeatTimeout" && (v = Me(M, v), p !== 0 && (pe(p), p = ee(function() {
420
- Y();
421
- }, v)));
422
- }
423
- if (y === se) {
424
- if (k !== "") {
425
- x = U, S === "" && (S = "message");
426
- var le = new We(S, {
427
- data: k.slice(1),
428
- lastEventId: U
429
- });
430
- if (e.dispatchEvent(le), S === "open" ? ie(e, e.onopen, le) : S === "message" ? ie(e, e.onmessage, le) : S === "error" && ie(e, e.onerror, le), j === ue)
431
- return;
432
- }
433
- k = "", S = "";
434
- }
435
- y = R === 13 ? Be : se;
436
- } else
437
- y === se && (J = B, y = Oe), y === Oe ? R === 58 && (I = B + 1, y = Ve) : y === Ve && (y = He);
438
- }
439
- }
440
- }, N = function(w) {
441
- if (j === $ || j === oe) {
442
- j = Ge, p !== 0 && (pe(p), p = 0), p = ee(function() {
443
- Y();
444
- }, u), u = Ce(Math.min(i * 16, u * 2)), e.readyState = oe;
445
- var m = new Xe("error", { error: w });
446
- e.dispatchEvent(m), ie(e, e.onerror, m), w != null && console.error(w);
447
- }
448
- }, H = function() {
449
- j = ue, o != null && (o.abort(), o = void 0), p !== 0 && (pe(p), p = 0), e.readyState = ue;
450
- }, Y = function() {
451
- if (p = 0, j !== Ge) {
452
- if (!g && o != null)
453
- N(new Error("No activity within " + v + " milliseconds. " + (j === oe ? "No response received." : b + " chars received.") + " Reconnecting.")), o != null && (o.abort(), o = void 0);
454
- else {
455
- var w = Math.max((g || Date.now()) + v - Date.now(), 1);
456
- g = !1, p = ee(function() {
457
- Y();
458
- }, w);
459
- }
460
- return;
461
- }
462
- g = !1, b = 0, p = ee(function() {
463
- Y();
464
- }, v), j = oe, k = "", S = "", U = x, O = "", J = 0, I = 0, y = se;
465
- var m = a;
466
- if (a.slice(0, 5) !== "data:" && a.slice(0, 5) !== "blob:" && x !== "") {
467
- var P = a.indexOf("?");
468
- m = P === -1 ? a : a.slice(0, P + 1) + a.slice(P + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(M, le) {
469
- return le === d ? "" : M;
470
- }), m += (a.indexOf("?") === -1 ? "?" : "&") + d + "=" + encodeURIComponent(x);
471
- }
472
- var R = e.withCredentials, F = {};
473
- F.Accept = "text/event-stream";
474
- var B = e.headers;
475
- if (B != null)
476
- for (var q in B)
477
- Object.prototype.hasOwnProperty.call(B, q) && (F[q] = B[q]);
478
- try {
479
- o = l.open(t, ke, A, N, m, R, F);
480
- } catch (M) {
481
- throw H(), M;
482
- }
483
- };
484
- e.url = a, e.readyState = oe, e.withCredentials = r, e.headers = c, e._close = H, Y();
485
- }
486
- V.prototype = Object.create(xe.prototype), V.prototype.CONNECTING = oe, V.prototype.OPEN = $, V.prototype.CLOSED = ue, V.prototype.close = function() {
487
- this._close();
488
- }, V.CONNECTING = oe, V.OPEN = $, V.CLOSED = ue, V.prototype.withCredentials = void 0;
489
- var Ke = ae;
490
- L != null && (ae == null || !("withCredentials" in ae.prototype)) && (Ke = V), function(e) {
491
- {
492
- var a = e(Z);
493
- a !== void 0 && (fe.exports = a);
494
- }
495
- }(function(e) {
496
- e.EventSourcePolyfill = V, e.NativeEventSource = ae, e.EventSource = Ke;
497
- });
498
- })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : ct : globalThis);
499
- })(rt, rt.exports);
500
- var xt = rt.exports, Et = Q('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span>', 1), kt = Q('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh">—</span> <span class="svelte-75jgrh">—</span>', 1), Pt = Q('<p class="NoPlayerData svelte-75jgrh"> </p>'), St = Q('<p class="NoPlayerData svelte-75jgrh"> </p>'), Rt = Q('<div class="PlayerRankWrapper svelte-75jgrh"><div class="PlayerRankLabels svelte-75jgrh"><span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span></div> <div class="PlayerRankData svelte-75jgrh"><!></div></div>'), Tt = Q('<div class="PlayerRankSkeletonWrapper svelte-75jgrh"><div class="PlayerRankSkeleton svelte-75jgrh"></div> <div class="PlayerRankSkeleton svelte-75jgrh"></div></div>'), At = Q('<tr class="SkeletonRow svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"></td></tr>'), Ct = Q('<tr><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td></tr>'), Lt = Q('<tr class="svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"><div class="EmptyLeaderboard svelte-75jgrh"><p class="svelte-75jgrh"> </p></div></td></tr>'), Nt = Q('<div class="PaginationSkeleton svelte-75jgrh"><div class="PaginationSkeletonButton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationSkeletonButton svelte-75jgrh"></div></div>'), Dt = Q('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'), Ft = Q("<button> </button>"), Bt = Q('<div class="PaginationWrapper svelte-75jgrh"><button class="PaginationButton svelte-75jgrh"> </button> <div class="PageNumberWrapper svelte-75jgrh"></div> <button class="PaginationButton svelte-75jgrh"> </button></div>'), Ot = Q('<div class="LeaderboardWrapper svelte-75jgrh"><div class="RankingWrapper svelte-75jgrh"><!> <table class="LeaderboardTable svelte-75jgrh"><thead class="LeaderboardTableHeader svelte-75jgrh"><tr class="svelte-75jgrh"><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th></tr></thead><tbody class="LeaderboardTableBody svelte-75jgrh"><!></tbody></table></div> <!> <!></div>');
501
- const Ht = {
502
- hash: "svelte-75jgrh",
503
- code: `.svelte-75jgrh,
504
- .svelte-75jgrh::before,
505
- .svelte-75jgrh::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.LeaderboardWrapper.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);border-radius:6px;padding:16px;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;}.PlayerRankWrapper.svelte-75jgrh {display:flex;flex-direction:column;gap:5px;min-height:60px;.PlayerRankLabels:where(.svelte-75jgrh), .PlayerRankData:where(.svelte-75jgrh) {display:grid;grid-template-columns:1fr 1fr 2fr;padding:6px;color:var(--emw-color-typography-secondary, #bdbdbd);opacity:70%;font-size:14px;font-weight:400;& > span:where(.svelte-75jgrh):last-child{justify-self:end;}p:where(.svelte-75jgrh) {width:max-content;}.NoPlayerData:where(.svelte-75jgrh) {grid-column:1 / -1;text-wrap:auto;width:auto;}}.PlayerRankData:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;padding:12px;}}.PaginationWrapper.svelte-75jgrh {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-75jgrh) {display:flex;gap:6px;}.PaginationButton:where(.svelte-75jgrh) {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;}}}.LeaderboardTable.svelte-75jgrh {border-collapse:separate;border-spacing:0 12px;width:100%;table-layout:fixed;overflow:hidden;.PlayerRow:where(.svelte-75jgrh) {color:#F9C408;}thead:where(.svelte-75jgrh) th:where(.svelte-75jgrh) {background:transparent;padding:6px 16px;text-align:center;font-weight:400;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;}tbody:where(.svelte-75jgrh) tr:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:500;&:last-child{justify-self:end;}}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh) {padding:12px;background-color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):first-child {border-top-left-radius:8px;border-bottom-left-radius:8px;width:15%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(2) {width:35%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(3) {width:20%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):last-child {border-top-right-radius:8px;border-bottom-right-radius:8px;width:30%;}th:where(.svelte-75jgrh), td:where(.svelte-75jgrh) {text-align:center;vertical-align:middle;}tbody:where(.svelte-75jgrh) tr.Gold:where(.svelte-75jgrh){background:linear-gradient(to right, #a2851a, color-mix(in srgb, #a2851a 50%, var(--emw-color-bg-secondary, #434343) 50%), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Silver:where(.svelte-75jgrh) {background:linear-gradient(to right, #b0aeae, color-mix(in srgb, #b0aeae, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Bronze:where(.svelte-75jgrh) {background:linear-gradient(to right, #ac763c, color-mix(in srgb, #ac763c, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}}.EmptyLeaderboard.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);color:var(--emw-color-typography-secondary, #bdbdbd);width:100%;border-radius:8px;margin:10px 0;text-align:center;padding:10px 0;p:where(.svelte-75jgrh) {text-wrap:auto;padding:0 15px;text-align:left;}}.SkeletonRow.svelte-75jgrh {height:41px;overflow:hidden;background-color:var(--emw-color-skeleton, #535353);
506
- animation: svelte-75jgrh-pulse 1.5s infinite;}.PlayerRankSkeletonWrapper.svelte-75jgrh {display:flex;justify-content:space-between;width:100%;gap:6px;flex-direction:column;.PlayerRankSkeleton:where(.svelte-75jgrh) {width:100%;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #535353);border-radius:6px;
507
- animation: svelte-75jgrh-pulse 1s infinite;}}.PaginationSkeleton.svelte-75jgrh {display:flex;justify-content:space-between;gap:6px;.PaginationSkeletonButton:where(.svelte-75jgrh) {width:60px;height:35px;border-radius:6px;background-color:var(--emw-color-skeleton, #535353);overflow:hidden;position:relative;
508
- animation: svelte-75jgrh-pulse 1s infinite;}.PaginationNumberSkeleton:where(.svelte-75jgrh) {width:40px;height:35px;border-radius:6px;background-color:var(--emw-color-skeleton, #535353);overflow:hidden;position:relative;
509
- animation: svelte-75jgrh-pulse 1s infinite;}}
510
-
511
- @keyframes svelte-75jgrh-pulse {
512
- 0% {
513
- opacity: 0;
514
- }
515
- 50% {
516
- opacity: 1;
517
- }
518
- 100% {
519
- opacity: 0;
520
- }
521
- }
522
-
523
- @media (min-width: 1000px) {.ShowPlayersButton.svelte-75jgrh {display:block;width:300px;margin:auto;background-color:var(--emw-color-bg-primary, #212121);}
524
- }
525
-
526
- @media (min-width: 750px) {.PaginationWrapper.svelte-75jgrh, .PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;}.PaginationButton.svelte-75jgrh {min-width:75px;}.PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;.PaginationSkeletonButton:where(.svelte-75jgrh) {width:auto;min-width:55px;}.PaginationNumberSkeleton:where(.svelte-75jgrh) {width:25px;}}
527
- }
528
-
529
- @media (max-width: 475px) {.PaginationWrapper.svelte-75jgrh {& .PaginationButton:where(.svelte-75jgrh) {font-size:11px;&.Number {font-size:11px;}}}
530
- }`
531
- };
532
- function It(fe, Z) {
533
- gt(Z, !0), vt(fe, Ht);
534
- const _ = () => bt(wt, "$_", ee), [ee, pe] = pt(), L = Pe(Z, "endpoint"), te = Pe(Z, "language", 7, "en"), re = Pe(Z, "session"), ae = Pe(Z, "tournamentid"), X = Pe(Z, "platform"), Re = Pe(Z, "translationurl"), ge = Pe(Z, "newlyEnrolled"), qe = () => {
535
- let t = new URL(Re());
536
- fetch(t.href).then((l) => l.json()).then((l) => {
537
- Object.keys(l).forEach((o) => {
538
- ot(o, l[o]);
539
- });
540
- }).catch((l) => {
541
- console.log(l);
542
- });
543
- };
544
- Object.keys(it).forEach((t) => {
545
- ot(t, it[t]);
546
- }), st(te());
547
- const Te = () => {
548
- st(te());
549
- };
550
- ut(() => {
551
- Re() && qe();
552
- }), at(() => {
553
- Te();
554
- });
555
- let ne = null, ye = ce(void 0), Ne = ce(!1), Ae = ce(!1), me = ce(void 0), W = ce(void 0), T = ce(0), G = ce(10), _e = ce(!0), be = ce(void 0), De = ce(!1);
556
- const je = () => {
557
- if (ue.has(s($)))
558
- return;
559
- K(Ne, !0);
560
- const t = new URL(`${L()}/v1/tournaments/${ae()}/leaderboard`), l = new Headers();
561
- re() && l.append("X-SessionId", re()), t.searchParams.append("language", te()), t.searchParams.append("platform", X()), t.searchParams.append("pagination", `offset=${s(T)},limit=${s(G)}`), fetch(t).then((o) => o.json()).then((o) => {
562
- K(ye, o?.items, !0), K(be, o?.total, !0), ue.set(s($), s(ye)), s(_e) || K(_e, !0);
563
- }).catch((o) => console.log(o)).finally(() => K(Ne, !1));
564
- }, xe = (t) => {
565
- const l = JSON.parse(t.data);
566
- l && l.messageType === "LeaderBoardUpdate" && K(ye, l?.items, !0);
567
- }, Ee = () => {
568
- ne && (ne.close(), ne = null);
569
- const t = new URL(`${L()}/v1/tournaments/${ae()}/leaderboard/updates`);
570
- t.searchParams.append("HeartBeat", "false"), t.searchParams.append("language", te()), t.searchParams.append("filter", "includeUnqualifiedPlayer=true"), t.searchParams.append("pagination", `offset=${s(T)},limit=${s(G)}`), t.searchParams.append("platform", X()), ne = new xt.EventSourcePolyfill(t, {
571
- headers: { accept: "text/event-stream", "X-SessionId": re() }
572
- }), ne.onmessage = xe;
573
- }, ve = () => {
574
- K(Ae, !0);
575
- const t = new URL(`${L()}/v1/tournaments/leaderboard/player`), l = new Headers();
576
- t.searchParams.append("language", te()), t.searchParams.append("platform", X()), t.searchParams.append("filter", "includeUnqualifiedPlayer=false"), re() && l.append("X-SessionId", re()), fetch(t, { method: "GET", headers: l }).then((p) => p.json()).then((p) => {
577
- const j = p?.items?.find((k) => k?.tournament?.id === ae());
578
- K(me, j?.tournament?.leaderBoard, !0), K(W, j?.endRank, !0), K(De, j?.tournament?.playerEnrolled, !0);
579
- }).catch((p) => {
580
- console.log(p);
581
- }).finally(() => K(Ae, !1));
582
- }, We = () => {
583
- s(T) < s(be) && (K(T, s(T) + s(G)), je(), Ee());
584
- }, Fe = () => {
585
- s(T) !== 0 && (K(T, s(T) - s(G)), je(), Ee());
586
- }, Xe = (t) => {
587
- K(T, (t - 1) * s(G)), je(), Ee();
588
- }, oe = $e(() => {
589
- const t = Math.ceil(s(be) / s(G)), l = Math.floor(s(T) / s(G)) + 1;
590
- if (t <= 5)
591
- return Array.from({ length: t }, (p, j) => j + 1);
592
- const o = [];
593
- return o.push(1), l <= 3 ? (o.push(2, 3), o.push("..."), o.push(t)) : l >= t - 2 ? (o.push("..."), o.push(t - 2, t - 1, t)) : (o.push("..."), o.push(l - 1, l, l + 1), o.push("..."), o.push(t)), o;
594
- }), $ = $e(() => Math.floor(s(T) / s(G)) + 1);
595
- let ue = /* @__PURE__ */ new Map(), Be = $e(() => ue.get(s($)) ?? []);
596
- const se = (t, l) => {
597
- const o = [];
598
- return l && o.push("PlayerRow"), t === 1 && o.push("Gold"), t === 2 && o.push("Silver"), t === 3 && o.push("Bronze"), o.join(" ");
599
- }, Oe = (t) => t ? Math.floor(t) : "-";
600
- at(() => {
601
- ge() && ve();
602
- }), ht(() => (je(), ve(), Ee(), () => {
603
- ne?.close(), ne = null;
604
- }));
605
- var Ve = {
606
- get endpoint() {
607
- return L();
608
- },
609
- set endpoint(t) {
610
- L(t), Se();
611
- },
612
- get language() {
613
- return te();
614
- },
615
- set language(t = "en") {
616
- te(t), Se();
617
- },
618
- get session() {
619
- return re();
620
- },
621
- set session(t) {
622
- re(t), Se();
623
- },
624
- get tournamentid() {
625
- return ae();
626
- },
627
- set tournamentid(t) {
628
- ae(t), Se();
629
- },
630
- get platform() {
631
- return X();
632
- },
633
- set platform(t) {
634
- X(t), Se();
635
- },
636
- get translationurl() {
637
- return Re();
638
- },
639
- set translationurl(t) {
640
- Re(t), Se();
641
- },
642
- get newlyEnrolled() {
643
- return ge();
644
- },
645
- set newlyEnrolled(t) {
646
- ge(t), Se();
647
- }
648
- }, He = Ot(), Ie = f(He), Je = f(Ie);
649
- {
650
- var Qe = (t) => {
651
- var l = Rt(), o = f(l), p = f(o), j = f(p, !0);
652
- h(p);
653
- var k = z(p, 2), U = f(k, !0);
654
- h(k);
655
- var S = z(k, 2), O = f(S, !0);
656
- h(S), h(o);
657
- var y = z(o, 2), J = f(y);
658
- {
659
- var I = (A) => {
660
- var N = Et(), H = we(N), Y = f(H);
661
- h(H);
662
- var w = z(H, 2), m = f(w, !0);
663
- h(w);
664
- var P = z(w, 2), R = f(P, !0);
665
- h(P), de(() => {
666
- C(Y, `${s(me).rank ?? ""}.`), C(m, s(me).score), C(R, s(me).prizeName || "—");
667
- }), D(A, N);
668
- }, ke = (A) => {
669
- var N = Le(), H = we(N);
670
- {
671
- var Y = (m) => {
672
- var P = kt(), R = we(P), F = f(R);
673
- h(R), jt(4), de(() => C(F, `${s(W) ?? ""}.`)), D(m, P);
674
- }, w = (m) => {
675
- var P = Le(), R = we(P);
676
- {
677
- var F = (q) => {
678
- var M = Pt(), le = f(M, !0);
679
- h(M), de((Ze) => C(le, Ze), [() => _()("leaderboardNotAvailable")]), D(q, M);
680
- }, B = (q) => {
681
- var M = St(), le = f(M, !0);
682
- h(M), de((Ze) => C(le, Ze), [() => _()("notEnrolledRank")]), D(q, M);
683
- };
684
- he(
685
- R,
686
- (q) => {
687
- s(De) ? q(F) : q(B, !1);
688
- },
689
- !0
690
- );
691
- }
692
- D(m, P);
693
- };
694
- he(
695
- H,
696
- (m) => {
697
- s(W) ? m(Y) : m(w, !1);
698
- },
699
- !0
700
- );
701
- }
702
- D(A, N);
703
- };
704
- he(J, (A) => {
705
- s(me) ? A(I) : A(ke, !1);
706
- });
707
- }
708
- h(y), h(l), de(
709
- (A, N, H) => {
710
- C(j, A), C(U, N), C(O, H);
711
- },
712
- [
713
- () => _()("myRanking"),
714
- () => _()("points"),
715
- () => _()("prize")
716
- ]
717
- ), D(t, l);
718
- }, Me = (t) => {
719
- var l = Tt();
720
- D(t, l);
721
- };
722
- he(Je, (t) => {
723
- s(Ae) ? t(Me, !1) : t(Qe);
724
- });
725
- }
726
- var Ce = z(Je, 2), ie = f(Ce), V = f(ie), ze = f(V), Ye = f(ze, !0);
727
- h(ze);
728
- var Ue = z(ze), Ke = f(Ue, !0);
729
- h(Ue);
730
- var e = z(Ue), a = f(e, !0);
731
- h(e);
732
- var n = z(e), r = f(n, !0);
733
- h(n), h(V), h(ie);
734
- var d = z(ie), i = f(d);
735
- {
736
- var v = (t) => {
737
- var l = Le(), o = we(l);
738
- et(o, 17, () => Array(s(G)), tt, (p, j, k, U) => {
739
- var S = At();
740
- D(p, S);
741
- }), D(t, l);
742
- }, x = (t) => {
743
- var l = Le(), o = we(l);
744
- {
745
- var p = (k) => {
746
- var U = Le(), S = we(U);
747
- et(S, 17, () => s(Be), tt, (O, y) => {
748
- var J = Ct(), I = f(J), ke = f(I);
749
- h(I);
750
- var A = z(I), N = f(A, !0);
751
- h(A);
752
- var H = z(A), Y = f(H, !0);
753
- h(H);
754
- var w = z(H), m = f(w, !0);
755
- h(w), h(J), de(
756
- (P, R) => {
757
- nt(J, 1, P, "svelte-75jgrh"), C(ke, `${s(y).rank ?? ""}.`), C(N, s(y).shortName || "J.D"), C(Y, R), C(m, s(y).prizeName || "—");
758
- },
759
- [
760
- () => _t(se(s(y).rank, s(y).rank === s(me)?.rank)),
761
- () => Oe(s(y).score)
762
- ]
763
- ), D(O, J);
764
- }), D(k, U);
765
- }, j = (k) => {
766
- var U = Lt(), S = f(U), O = f(S), y = f(O), J = f(y, !0);
767
- h(y), h(O), h(S), h(U), de((I) => C(J, I), [() => _()("leaderboardNotAvailable")]), D(k, U);
768
- };
769
- he(
770
- o,
771
- (k) => {
772
- s(ye)?.length > 0 ? k(p) : k(j, !1);
773
- },
774
- !0
775
- );
776
- }
777
- D(t, l);
778
- };
779
- he(i, (t) => {
780
- s(Ne) ? t(v) : t(x, !1);
781
- });
782
- }
783
- h(d), h(Ce), h(Ie);
784
- var u = z(Ie, 2);
785
- {
786
- var g = (t) => {
787
- var l = Nt();
788
- D(t, l);
789
- };
790
- he(u, (t) => {
791
- s(_e) || t(g);
792
- });
793
- }
794
- var b = z(u, 2);
795
- {
796
- var c = (t) => {
797
- var l = Bt(), o = f(l);
798
- o.__click = Fe;
799
- var p = f(o, !0);
800
- h(o);
801
- var j = z(o, 2);
802
- et(j, 21, () => s(oe), tt, (S, O) => {
803
- var y = Le(), J = we(y);
804
- {
805
- var I = (A) => {
806
- var N = Dt();
807
- D(A, N);
808
- }, ke = (A) => {
809
- var N = Ft();
810
- let H;
811
- N.__click = () => Xe(s(O));
812
- var Y = f(N, !0);
813
- h(N), de(() => {
814
- H = nt(N, 1, "PaginationButton Number svelte-75jgrh", null, H, { Active: s(O) === s($) }), C(Y, s(O));
815
- }), D(A, N);
816
- };
817
- he(J, (A) => {
818
- typeof s(O) != "number" ? A(I) : A(ke, !1);
819
- });
820
- }
821
- D(S, y);
822
- }), h(j);
823
- var k = z(j, 2);
824
- k.__click = We;
825
- var U = f(k, !0);
826
- h(k), h(l), de(
827
- (S, O) => {
828
- o.disabled = s(T) === 0, C(p, S), k.disabled = s(T) >= s(be) - s(G), C(U, O);
829
- },
830
- [() => _()("previousButton"), () => _()("nextButton")]
831
- ), D(t, l);
832
- };
833
- he(b, (t) => {
834
- s(_e) && s(be) > s(G) && t(c);
835
- });
836
- }
837
- h(He), de(
838
- (t, l, o, p) => {
839
- C(Ye, t), C(Ke, l), C(a, o), C(r, p);
840
- },
841
- [
842
- () => _()("rank"),
843
- () => _()("user"),
844
- () => _()("points"),
845
- () => _()("prize")
846
- ]
847
- ), D(fe, He);
848
- var E = ft(Ve);
849
- return pe(), E;
850
- }
851
- yt(["click"]);
852
- customElements.define("tournament-leaderboard", mt(
853
- It,
854
- {
855
- endpoint: {},
856
- language: {},
857
- session: {},
858
- tournamentid: {},
859
- platform: {},
860
- translationurl: {},
861
- newlyEnrolled: {}
862
- },
863
- [],
864
- [],
865
- !1
866
- ));
867
- export {
868
- It as default
869
- };