@everymatrix/tournaments-banner 0.2.1 → 0.2.3

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.
@@ -0,0 +1,1271 @@
1
+ import { A as Xe, B as nt, C as ft, c as rt, g as at, a as ht, p as K, D as vt, E as pt, F as Ze, G as gt, H as Pe, o as $e, I as mt, J as yt, K as bt, i as Qe, b as Fe, d as ot, q as ee, L as wt, M as _t, m as ve, j as w, u as Ye, h as Je, N as Ke, r as je, O as Tt, s as St, e as Ue, P as Re, f as Ne, t as et, l as Ge, k as Dt, Q as Mt, $ as Et } from "./StatusBadge-D1cxIANy.js";
2
+ import { T as xt } from "./TournamentImage-DhXCEHmk.js";
3
+ typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
4
+ }, globalThis.customElements = { define() {
5
+ }, get() {
6
+ }, whenDefined() {
7
+ } });
8
+ const Ot = (T, p) => {
9
+ window.postMessage(
10
+ {
11
+ ...p,
12
+ type: T
13
+ },
14
+ window.location.href
15
+ );
16
+ }, $t = (T, p) => {
17
+ Ot(`Tournaments:${T}`, p);
18
+ }, Lt = (T, p) => {
19
+ $t("viewTournamentDetails", {
20
+ tournamentId: T.id,
21
+ tournamentName: T.nameOrTitle
22
+ });
23
+ }, At = (T) => {
24
+ const p = new Headers();
25
+ return T && p.append("X-SessionId", T), p;
26
+ }, Ct = async (T) => {
27
+ const p = new URL(`${T.endpoint}/v1/tournaments`);
28
+ return p.searchParams.append("language", T.language), p.searchParams.append("sortField", T.sortField ?? "StartTime"), p.searchParams.append("sortOrder", T.sortOrder ?? "desc"), p.searchParams.append("platform", T.platform), (await (await fetch(p, { method: "GET", headers: At(T.session) })).json())?.items ?? [];
29
+ }, Ft = async (T) => {
30
+ const p = await Ct(T), E = /* @__PURE__ */ new Date();
31
+ return p.filter((z) => new Date(z.exhibitionEndTime) > E);
32
+ };
33
+ var tt = { exports: {} };
34
+ /** @license
35
+ * eventsource.js
36
+ * Available under MIT License (MIT)
37
+ * https://github.com/Yaffle/EventSource/
38
+ */
39
+ (function(T, p) {
40
+ (function(E) {
41
+ var z = E.setTimeout, ie = E.clearTimeout, A = E.XMLHttpRequest, C = E.XDomainRequest, W = E.ActiveXObject, I = E.EventSource, R = E.document, L = E.Promise, P = E.fetch, se = E.Response, Z = E.TextDecoder, S = E.TextEncoder, Se = E.AbortController;
42
+ if (typeof window < "u" && typeof R < "u" && !("readyState" in R) && R.body == null && (R.readyState = "loading", window.addEventListener("load", function(e) {
43
+ R.readyState = "complete";
44
+ }, !1)), A == null && W != null && (A = function() {
45
+ return new W("Microsoft.XMLHTTP");
46
+ }), Object.create == null && (Object.create = function(e) {
47
+ function r() {
48
+ }
49
+ return r.prototype = e, new r();
50
+ }), Date.now || (Date.now = function() {
51
+ return (/* @__PURE__ */ new Date()).getTime();
52
+ }), Se == null) {
53
+ var d = P;
54
+ P = function(e, r) {
55
+ var s = r.signal;
56
+ return d(e, { headers: r.headers, credentials: r.credentials, cache: r.cache }).then(function(o) {
57
+ var m = o.body.getReader();
58
+ return s._reader = m, s._aborted && s._reader.cancel(), {
59
+ status: o.status,
60
+ statusText: o.statusText,
61
+ headers: o.headers,
62
+ body: {
63
+ getReader: function() {
64
+ return m;
65
+ }
66
+ }
67
+ };
68
+ });
69
+ }, Se = function() {
70
+ this.signal = {
71
+ _reader: null,
72
+ _aborted: !1
73
+ }, this.abort = function() {
74
+ this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
75
+ };
76
+ };
77
+ }
78
+ function D() {
79
+ this.bitsNeeded = 0, this.codePoint = 0;
80
+ }
81
+ D.prototype.decode = function(e) {
82
+ function r(H, U, y) {
83
+ if (y === 1)
84
+ return H >= 128 >> U && H << U <= 2047;
85
+ if (y === 2)
86
+ return H >= 2048 >> U && H << U <= 55295 || H >= 57344 >> U && H << U <= 65535;
87
+ if (y === 3)
88
+ return H >= 65536 >> U && H << U <= 1114111;
89
+ throw new Error();
90
+ }
91
+ function s(H, U) {
92
+ if (H === 6 * 1)
93
+ return U >> 6 > 15 ? 3 : U > 31 ? 2 : 1;
94
+ if (H === 6 * 2)
95
+ return U > 15 ? 3 : 2;
96
+ if (H === 6 * 3)
97
+ return 3;
98
+ throw new Error();
99
+ }
100
+ for (var o = 65533, m = "", v = this.bitsNeeded, M = this.codePoint, X = 0; X < e.length; X += 1) {
101
+ var $ = e[X];
102
+ v !== 0 && ($ < 128 || $ > 191 || !r(M << 6 | $ & 63, v - 6, s(v, M))) && (v = 0, M = o, m += String.fromCharCode(M)), v === 0 ? ($ >= 0 && $ <= 127 ? (v = 0, M = $) : $ >= 192 && $ <= 223 ? (v = 6 * 1, M = $ & 31) : $ >= 224 && $ <= 239 ? (v = 6 * 2, M = $ & 15) : $ >= 240 && $ <= 247 ? (v = 6 * 3, M = $ & 7) : (v = 0, M = o), v !== 0 && !r(M, v, s(v, M)) && (v = 0, M = o)) : (v -= 6, M = M << 6 | $ & 63), v === 0 && (M <= 65535 ? m += String.fromCharCode(M) : (m += String.fromCharCode(55296 + (M - 65535 - 1 >> 10)), m += String.fromCharCode(56320 + (M - 65535 - 1 & 1023))));
103
+ }
104
+ return this.bitsNeeded = v, this.codePoint = M, m;
105
+ };
106
+ var F = function() {
107
+ try {
108
+ return new Z().decode(new S().encode("test"), { stream: !0 }) === "test";
109
+ } catch (e) {
110
+ console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
111
+ }
112
+ return !1;
113
+ };
114
+ (Z == null || S == null || !F()) && (Z = D);
115
+ var g = function() {
116
+ };
117
+ function B(e) {
118
+ this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = g, this.onload = g, this.onerror = g, this.onreadystatechange = g, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = g;
119
+ }
120
+ B.prototype.open = function(e, r) {
121
+ this._abort(!0);
122
+ var s = this, o = this._xhr, m = 1, v = 0;
123
+ this._abort = function(y) {
124
+ s._sendTimeout !== 0 && (ie(s._sendTimeout), s._sendTimeout = 0), (m === 1 || m === 2 || m === 3) && (m = 4, o.onload = g, o.onerror = g, o.onabort = g, o.onprogress = g, o.onreadystatechange = g, o.abort(), v !== 0 && (ie(v), v = 0), y || (s.readyState = 4, s.onabort(null), s.onreadystatechange())), m = 0;
125
+ };
126
+ var M = function() {
127
+ if (m === 1) {
128
+ var y = 0, q = "", Me = void 0;
129
+ if ("contentType" in o)
130
+ y = 200, q = "OK", Me = o.contentType;
131
+ else
132
+ try {
133
+ y = o.status, q = o.statusText, Me = o.getResponseHeader("Content-Type");
134
+ } catch {
135
+ y = 0, q = "", Me = void 0;
136
+ }
137
+ y !== 0 && (m = 2, s.readyState = 2, s.status = y, s.statusText = q, s._contentType = Me, s.onreadystatechange());
138
+ }
139
+ }, X = function() {
140
+ if (M(), m === 2 || m === 3) {
141
+ m = 3;
142
+ var y = "";
143
+ try {
144
+ y = o.responseText;
145
+ } catch {
146
+ }
147
+ s.readyState = 3, s.responseText = y, s.onprogress();
148
+ }
149
+ }, $ = function(y, q) {
150
+ if ((q == null || q.preventDefault == null) && (q = {
151
+ preventDefault: g
152
+ }), X(), m === 1 || m === 2 || m === 3) {
153
+ if (m = 4, v !== 0 && (ie(v), v = 0), s.readyState = 4, y === "load")
154
+ s.onload(q);
155
+ else if (y === "error")
156
+ s.onerror(q);
157
+ else if (y === "abort")
158
+ s.onabort(q);
159
+ else
160
+ throw new TypeError();
161
+ s.onreadystatechange();
162
+ }
163
+ }, H = function(y) {
164
+ o != null && (o.readyState === 4 ? (!("onload" in o) || !("onerror" in o) || !("onabort" in o)) && $(o.responseText === "" ? "error" : "load", y) : o.readyState === 3 ? "onprogress" in o || X() : o.readyState === 2 && M());
165
+ }, U = function() {
166
+ v = z(function() {
167
+ U();
168
+ }, 500), o.readyState === 3 && X();
169
+ };
170
+ "onload" in o && (o.onload = function(y) {
171
+ $("load", y);
172
+ }), "onerror" in o && (o.onerror = function(y) {
173
+ $("error", y);
174
+ }), "onabort" in o && (o.onabort = function(y) {
175
+ $("abort", y);
176
+ }), "onprogress" in o && (o.onprogress = X), "onreadystatechange" in o && (o.onreadystatechange = function(y) {
177
+ H(y);
178
+ }), ("contentType" in o || !("ontimeout" in A.prototype)) && (r += (r.indexOf("?") === -1 ? "?" : "&") + "padding=true"), o.open(e, r, !0), "readyState" in o && (v = z(function() {
179
+ U();
180
+ }, 0));
181
+ }, B.prototype.abort = function() {
182
+ this._abort(!1);
183
+ }, B.prototype.getResponseHeader = function(e) {
184
+ return this._contentType;
185
+ }, B.prototype.setRequestHeader = function(e, r) {
186
+ var s = this._xhr;
187
+ "setRequestHeader" in s && s.setRequestHeader(e, r);
188
+ }, B.prototype.getAllResponseHeaders = function() {
189
+ return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
190
+ }, B.prototype.send = function() {
191
+ if ((!("ontimeout" in A.prototype) || !("sendAsBinary" in A.prototype) && !("mozAnon" in A.prototype)) && R != null && R.readyState != null && R.readyState !== "complete") {
192
+ var e = this;
193
+ e._sendTimeout = z(function() {
194
+ e._sendTimeout = 0, e.send();
195
+ }, 4);
196
+ return;
197
+ }
198
+ var r = this._xhr;
199
+ "withCredentials" in r && (r.withCredentials = this.withCredentials);
200
+ try {
201
+ r.send(void 0);
202
+ } catch (s) {
203
+ throw s;
204
+ }
205
+ };
206
+ function Q(e) {
207
+ return e.replace(/[A-Z]/g, function(r) {
208
+ return String.fromCharCode(r.charCodeAt(0) + 32);
209
+ });
210
+ }
211
+ function te(e) {
212
+ for (var r = /* @__PURE__ */ Object.create(null), s = e.split(`\r
213
+ `), o = 0; o < s.length; o += 1) {
214
+ var m = s[o], v = m.split(": "), M = v.shift(), X = v.join(": ");
215
+ r[Q(M)] = X;
216
+ }
217
+ this._map = r;
218
+ }
219
+ te.prototype.get = function(e) {
220
+ return this._map[Q(e)];
221
+ }, A != null && A.HEADERS_RECEIVED == null && (A.HEADERS_RECEIVED = 2);
222
+ function he() {
223
+ }
224
+ he.prototype.open = function(e, r, s, o, m, v, M) {
225
+ e.open("GET", m);
226
+ var X = 0;
227
+ e.onprogress = function() {
228
+ var H = e.responseText, U = H.slice(X);
229
+ X += U.length, s(U);
230
+ }, e.onerror = function(H) {
231
+ H.preventDefault(), o(new Error("NetworkError"));
232
+ }, e.onload = function() {
233
+ o(null);
234
+ }, e.onabort = function() {
235
+ o(null);
236
+ }, e.onreadystatechange = function() {
237
+ if (e.readyState === A.HEADERS_RECEIVED) {
238
+ var H = e.status, U = e.statusText, y = e.getResponseHeader("Content-Type"), q = e.getAllResponseHeaders();
239
+ r(H, U, y, new te(q));
240
+ }
241
+ }, e.withCredentials = v;
242
+ for (var $ in M)
243
+ Object.prototype.hasOwnProperty.call(M, $) && e.setRequestHeader($, M[$]);
244
+ return e.send(), e;
245
+ };
246
+ function ne(e) {
247
+ this._headers = e;
248
+ }
249
+ ne.prototype.get = function(e) {
250
+ return this._headers.get(e);
251
+ };
252
+ function re() {
253
+ }
254
+ re.prototype.open = function(e, r, s, o, m, v, M) {
255
+ var X = null, $ = new Se(), H = $.signal, U = new Z();
256
+ return P(m, {
257
+ headers: M,
258
+ credentials: v ? "include" : "same-origin",
259
+ signal: H,
260
+ cache: "no-store"
261
+ }).then(function(y) {
262
+ return X = y.body.getReader(), r(y.status, y.statusText, y.headers.get("Content-Type"), new ne(y.headers)), new L(function(q, Me) {
263
+ var He = function() {
264
+ X.read().then(function(we) {
265
+ if (we.done)
266
+ q(void 0);
267
+ else {
268
+ var pe = U.decode(we.value, { stream: !0 });
269
+ s(pe), He();
270
+ }
271
+ }).catch(function(we) {
272
+ Me(we);
273
+ });
274
+ };
275
+ He();
276
+ });
277
+ }).catch(function(y) {
278
+ if (y.name !== "AbortError")
279
+ return y;
280
+ }).then(function(y) {
281
+ o(y);
282
+ }), {
283
+ abort: function() {
284
+ X?.cancel(), $.abort();
285
+ }
286
+ };
287
+ };
288
+ function x() {
289
+ this._listeners = /* @__PURE__ */ Object.create(null);
290
+ }
291
+ function b(e) {
292
+ z(function() {
293
+ throw e;
294
+ }, 0);
295
+ }
296
+ x.prototype.dispatchEvent = function(e) {
297
+ e.target = this;
298
+ var r = this._listeners[e.type];
299
+ if (r != null)
300
+ for (var s = r.length, o = 0; o < s; o += 1) {
301
+ var m = r[o];
302
+ try {
303
+ typeof m.handleEvent == "function" ? m.handleEvent(e) : m.call(this, e);
304
+ } catch (v) {
305
+ b(v);
306
+ }
307
+ }
308
+ }, x.prototype.addEventListener = function(e, r) {
309
+ e = String(e);
310
+ var s = this._listeners, o = s[e];
311
+ o == null && (o = [], s[e] = o);
312
+ for (var m = !1, v = 0; v < o.length; v += 1)
313
+ o[v] === r && (m = !0);
314
+ m || o.push(r);
315
+ }, x.prototype.removeEventListener = function(e, r) {
316
+ e = String(e);
317
+ var s = this._listeners, o = s[e];
318
+ if (o != null) {
319
+ for (var m = [], v = 0; v < o.length; v += 1)
320
+ o[v] !== r && m.push(o[v]);
321
+ m.length === 0 ? delete s[e] : s[e] = m;
322
+ }
323
+ };
324
+ function G(e) {
325
+ this.type = e, this.target = void 0;
326
+ }
327
+ function ae(e, r) {
328
+ G.call(this, e), this.data = r.data, this.lastEventId = r.lastEventId;
329
+ }
330
+ ae.prototype = Object.create(G.prototype);
331
+ function c(e, r) {
332
+ G.call(this, e), this.status = r.status, this.statusText = r.statusText, this.headers = r.headers;
333
+ }
334
+ c.prototype = Object.create(G.prototype);
335
+ function a(e, r) {
336
+ G.call(this, e), this.error = r.error;
337
+ }
338
+ a.prototype = Object.create(G.prototype);
339
+ var t = -1, i = 0, n = 1, l = 2, f = -1, h = 0, Y = 1, N = 2, J = 3, ue = /^text\/event\-stream(;.*)?$/i, u = 1e3, _ = 18e6, j = function(e, r) {
340
+ var s = e == null ? r : parseInt(e, 10);
341
+ return s !== s && (s = r), ce(s);
342
+ }, ce = function(e) {
343
+ return Math.min(Math.max(e, u), _);
344
+ }, k = function(e, r, s) {
345
+ try {
346
+ typeof r == "function" && r.call(e, s);
347
+ } catch (o) {
348
+ b(o);
349
+ }
350
+ };
351
+ function O(e, r) {
352
+ x.call(this), r = r || {}, 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, ye(this, e, r);
353
+ }
354
+ function V() {
355
+ return A != null && "withCredentials" in A.prototype || C == null ? new A() : new C();
356
+ }
357
+ var de = P != null && se != null && "body" in se.prototype;
358
+ function ye(e, r, s) {
359
+ r = String(r);
360
+ var o = !!s.withCredentials, m = s.lastEventIdQueryParameterName || "lastEventId", v = ce(1e3), M = j(s.heartbeatTimeout, 45e3), X = "", $ = v, H = !1, U = 0, y = s.headers || {}, q = s.Transport, Me = de && q == null ? void 0 : new B(q != null ? new q() : V()), He = q != null && typeof q != "string" ? new q() : Me == null ? new re() : new he(), we = void 0, pe = 0, De = t, Ae = "", ke = "", Ee = "", ze = "", ge = h, We = 0, Le = 0, lt = function(le, oe, _e, Te) {
361
+ if (De === i)
362
+ if (le === 200 && _e != null && ue.test(_e)) {
363
+ De = n, H = Date.now(), $ = v, e.readyState = n;
364
+ var me = new c("open", {
365
+ status: le,
366
+ statusText: oe,
367
+ headers: Te
368
+ });
369
+ e.dispatchEvent(me), k(e, e.onopen, me);
370
+ } else {
371
+ var fe = "";
372
+ le !== 200 ? (oe && (oe = oe.replace(/\s+/g, " ")), fe = "EventSource's response has a status " + le + " " + oe + " that is not 200. Aborting the connection.") : fe = "EventSource's response has a Content-Type specifying an unsupported type: " + (_e == null ? "-" : _e.replace(/\s+/g, " ")) + ". Aborting the connection.", Be();
373
+ var me = new c("error", {
374
+ status: le,
375
+ statusText: oe,
376
+ headers: Te
377
+ });
378
+ e.dispatchEvent(me), k(e, e.onerror, me), console.error(fe);
379
+ }
380
+ }, dt = function(le) {
381
+ if (De === n) {
382
+ for (var oe = -1, _e = 0; _e < le.length; _e += 1) {
383
+ var Te = le.charCodeAt(_e);
384
+ (Te === 10 || Te === 13) && (oe = _e);
385
+ }
386
+ var me = (oe !== -1 ? ze : "") + le.slice(0, oe + 1);
387
+ ze = (oe === -1 ? ze : "") + le.slice(oe + 1), le !== "" && (H = Date.now(), U += le.length);
388
+ for (var fe = 0; fe < me.length; fe += 1) {
389
+ var Te = me.charCodeAt(fe);
390
+ if (ge === f && Te === 10)
391
+ ge = h;
392
+ else if (ge === f && (ge = h), Te === 13 || Te === 10) {
393
+ if (ge !== h) {
394
+ ge === Y && (Le = fe + 1);
395
+ var xe = me.slice(We, Le - 1), Oe = me.slice(Le + (Le < fe && me.charCodeAt(Le) === 32 ? 1 : 0), fe);
396
+ xe === "data" ? (Ae += `
397
+ `, Ae += Oe) : xe === "id" ? ke = Oe : xe === "event" ? Ee = Oe : xe === "retry" ? (v = j(Oe, v), $ = v) : xe === "heartbeatTimeout" && (M = j(Oe, M), pe !== 0 && (ie(pe), pe = z(function() {
398
+ Ie();
399
+ }, M)));
400
+ }
401
+ if (ge === h) {
402
+ if (Ae !== "") {
403
+ X = ke, Ee === "" && (Ee = "message");
404
+ var Ce = new ae(Ee, {
405
+ data: Ae.slice(1),
406
+ lastEventId: ke
407
+ });
408
+ if (e.dispatchEvent(Ce), Ee === "open" ? k(e, e.onopen, Ce) : Ee === "message" ? k(e, e.onmessage, Ce) : Ee === "error" && k(e, e.onerror, Ce), De === l)
409
+ return;
410
+ }
411
+ Ae = "", Ee = "";
412
+ }
413
+ ge = Te === 13 ? f : h;
414
+ } else
415
+ ge === h && (We = fe, ge = Y), ge === Y ? Te === 58 && (Le = fe + 1, ge = N) : ge === N && (ge = J);
416
+ }
417
+ }
418
+ }, qe = function(le) {
419
+ if (De === n || De === i) {
420
+ De = t, pe !== 0 && (ie(pe), pe = 0), pe = z(function() {
421
+ Ie();
422
+ }, $), $ = ce(Math.min(v * 16, $ * 2)), e.readyState = i;
423
+ var oe = new a("error", { error: le });
424
+ e.dispatchEvent(oe), k(e, e.onerror, oe), le != null && console.error(le);
425
+ }
426
+ }, Be = function() {
427
+ De = l, we != null && (we.abort(), we = void 0), pe !== 0 && (ie(pe), pe = 0), e.readyState = l;
428
+ }, Ie = function() {
429
+ if (pe = 0, De !== t) {
430
+ if (!H && we != null)
431
+ qe(new Error("No activity within " + M + " milliseconds. " + (De === i ? "No response received." : U + " chars received.") + " Reconnecting.")), we != null && (we.abort(), we = void 0);
432
+ else {
433
+ var le = Math.max((H || Date.now()) + M - Date.now(), 1);
434
+ H = !1, pe = z(function() {
435
+ Ie();
436
+ }, le);
437
+ }
438
+ return;
439
+ }
440
+ H = !1, U = 0, pe = z(function() {
441
+ Ie();
442
+ }, M), De = i, Ae = "", Ee = "", ke = X, ze = "", We = 0, Le = 0, ge = h;
443
+ var oe = r;
444
+ if (r.slice(0, 5) !== "data:" && r.slice(0, 5) !== "blob:" && X !== "") {
445
+ var _e = r.indexOf("?");
446
+ oe = _e === -1 ? r : r.slice(0, _e + 1) + r.slice(_e + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(Oe, Ce) {
447
+ return Ce === m ? "" : Oe;
448
+ }), oe += (r.indexOf("?") === -1 ? "?" : "&") + m + "=" + encodeURIComponent(X);
449
+ }
450
+ var Te = e.withCredentials, me = {};
451
+ me.Accept = "text/event-stream";
452
+ var fe = e.headers;
453
+ if (fe != null)
454
+ for (var xe in fe)
455
+ Object.prototype.hasOwnProperty.call(fe, xe) && (me[xe] = fe[xe]);
456
+ try {
457
+ we = He.open(Me, lt, dt, qe, oe, Te, me);
458
+ } catch (Oe) {
459
+ throw Be(), Oe;
460
+ }
461
+ };
462
+ e.url = r, e.readyState = i, e.withCredentials = o, e.headers = y, e._close = Be, Ie();
463
+ }
464
+ O.prototype = Object.create(x.prototype), O.prototype.CONNECTING = i, O.prototype.OPEN = n, O.prototype.CLOSED = l, O.prototype.close = function() {
465
+ this._close();
466
+ }, O.CONNECTING = i, O.OPEN = n, O.CLOSED = l, O.prototype.withCredentials = void 0;
467
+ var be = I;
468
+ A != null && (I == null || !("withCredentials" in I.prototype)) && (be = O), function(e) {
469
+ {
470
+ var r = e(p);
471
+ r !== void 0 && (T.exports = r);
472
+ }
473
+ }(function(e) {
474
+ e.EventSourcePolyfill = O, e.NativeEventSource = I, e.EventSource = be;
475
+ });
476
+ })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : Xe : globalThis);
477
+ })(tt, tt.exports);
478
+ var it = { exports: {} };
479
+ (function(T, p) {
480
+ (function(E, z) {
481
+ T.exports = z();
482
+ })(Xe, function() {
483
+ var E = 1e3, z = 6e4, ie = 36e5, A = "millisecond", C = "second", W = "minute", I = "hour", R = "day", L = "week", P = "month", se = "quarter", Z = "year", S = "date", Se = "Invalid Date", d = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(c) {
484
+ var a = ["th", "st", "nd", "rd"], t = c % 100;
485
+ return "[" + c + (a[(t - 20) % 10] || a[t] || a[0]) + "]";
486
+ } }, g = function(c, a, t) {
487
+ var i = String(c);
488
+ return !i || i.length >= a ? c : "" + Array(a + 1 - i.length).join(t) + c;
489
+ }, B = { s: g, z: function(c) {
490
+ var a = -c.utcOffset(), t = Math.abs(a), i = Math.floor(t / 60), n = t % 60;
491
+ return (a <= 0 ? "+" : "-") + g(i, 2, "0") + ":" + g(n, 2, "0");
492
+ }, m: function c(a, t) {
493
+ if (a.date() < t.date()) return -c(t, a);
494
+ var i = 12 * (t.year() - a.year()) + (t.month() - a.month()), n = a.clone().add(i, P), l = t - n < 0, f = a.clone().add(i + (l ? -1 : 1), P);
495
+ return +(-(i + (t - n) / (l ? n - f : f - n)) || 0);
496
+ }, a: function(c) {
497
+ return c < 0 ? Math.ceil(c) || 0 : Math.floor(c);
498
+ }, p: function(c) {
499
+ return { M: P, y: Z, w: L, d: R, D: S, h: I, m: W, s: C, ms: A, Q: se }[c] || String(c || "").toLowerCase().replace(/s$/, "");
500
+ }, u: function(c) {
501
+ return c === void 0;
502
+ } }, Q = "en", te = {};
503
+ te[Q] = F;
504
+ var he = "$isDayjsObject", ne = function(c) {
505
+ return c instanceof G || !(!c || !c[he]);
506
+ }, re = function c(a, t, i) {
507
+ var n;
508
+ if (!a) return Q;
509
+ if (typeof a == "string") {
510
+ var l = a.toLowerCase();
511
+ te[l] && (n = l), t && (te[l] = t, n = l);
512
+ var f = a.split("-");
513
+ if (!n && f.length > 1) return c(f[0]);
514
+ } else {
515
+ var h = a.name;
516
+ te[h] = a, n = h;
517
+ }
518
+ return !i && n && (Q = n), n || !i && Q;
519
+ }, x = function(c, a) {
520
+ if (ne(c)) return c.clone();
521
+ var t = typeof a == "object" ? a : {};
522
+ return t.date = c, t.args = arguments, new G(t);
523
+ }, b = B;
524
+ b.l = re, b.i = ne, b.w = function(c, a) {
525
+ return x(c, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
526
+ };
527
+ var G = function() {
528
+ function c(t) {
529
+ this.$L = re(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[he] = !0;
530
+ }
531
+ var a = c.prototype;
532
+ return a.parse = function(t) {
533
+ this.$d = function(i) {
534
+ var n = i.date, l = i.utc;
535
+ if (n === null) return /* @__PURE__ */ new Date(NaN);
536
+ if (b.u(n)) return /* @__PURE__ */ new Date();
537
+ if (n instanceof Date) return new Date(n);
538
+ if (typeof n == "string" && !/Z$/i.test(n)) {
539
+ var f = n.match(d);
540
+ if (f) {
541
+ var h = f[2] - 1 || 0, Y = (f[7] || "0").substring(0, 3);
542
+ return l ? new Date(Date.UTC(f[1], h, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, Y)) : new Date(f[1], h, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, Y);
543
+ }
544
+ }
545
+ return new Date(n);
546
+ }(t), this.init();
547
+ }, a.init = function() {
548
+ var t = this.$d;
549
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
550
+ }, a.$utils = function() {
551
+ return b;
552
+ }, a.isValid = function() {
553
+ return this.$d.toString() !== Se;
554
+ }, a.isSame = function(t, i) {
555
+ var n = x(t);
556
+ return this.startOf(i) <= n && n <= this.endOf(i);
557
+ }, a.isAfter = function(t, i) {
558
+ return x(t) < this.startOf(i);
559
+ }, a.isBefore = function(t, i) {
560
+ return this.endOf(i) < x(t);
561
+ }, a.$g = function(t, i, n) {
562
+ return b.u(t) ? this[i] : this.set(n, t);
563
+ }, a.unix = function() {
564
+ return Math.floor(this.valueOf() / 1e3);
565
+ }, a.valueOf = function() {
566
+ return this.$d.getTime();
567
+ }, a.startOf = function(t, i) {
568
+ var n = this, l = !!b.u(i) || i, f = b.p(t), h = function(ce, k) {
569
+ var O = b.w(n.$u ? Date.UTC(n.$y, k, ce) : new Date(n.$y, k, ce), n);
570
+ return l ? O : O.endOf(R);
571
+ }, Y = function(ce, k) {
572
+ return b.w(n.toDate()[ce].apply(n.toDate("s"), (l ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(k)), n);
573
+ }, N = this.$W, J = this.$M, ue = this.$D, u = "set" + (this.$u ? "UTC" : "");
574
+ switch (f) {
575
+ case Z:
576
+ return l ? h(1, 0) : h(31, 11);
577
+ case P:
578
+ return l ? h(1, J) : h(0, J + 1);
579
+ case L:
580
+ var _ = this.$locale().weekStart || 0, j = (N < _ ? N + 7 : N) - _;
581
+ return h(l ? ue - j : ue + (6 - j), J);
582
+ case R:
583
+ case S:
584
+ return Y(u + "Hours", 0);
585
+ case I:
586
+ return Y(u + "Minutes", 1);
587
+ case W:
588
+ return Y(u + "Seconds", 2);
589
+ case C:
590
+ return Y(u + "Milliseconds", 3);
591
+ default:
592
+ return this.clone();
593
+ }
594
+ }, a.endOf = function(t) {
595
+ return this.startOf(t, !1);
596
+ }, a.$set = function(t, i) {
597
+ var n, l = b.p(t), f = "set" + (this.$u ? "UTC" : ""), h = (n = {}, n[R] = f + "Date", n[S] = f + "Date", n[P] = f + "Month", n[Z] = f + "FullYear", n[I] = f + "Hours", n[W] = f + "Minutes", n[C] = f + "Seconds", n[A] = f + "Milliseconds", n)[l], Y = l === R ? this.$D + (i - this.$W) : i;
598
+ if (l === P || l === Z) {
599
+ var N = this.clone().set(S, 1);
600
+ N.$d[h](Y), N.init(), this.$d = N.set(S, Math.min(this.$D, N.daysInMonth())).$d;
601
+ } else h && this.$d[h](Y);
602
+ return this.init(), this;
603
+ }, a.set = function(t, i) {
604
+ return this.clone().$set(t, i);
605
+ }, a.get = function(t) {
606
+ return this[b.p(t)]();
607
+ }, a.add = function(t, i) {
608
+ var n, l = this;
609
+ t = Number(t);
610
+ var f = b.p(i), h = function(J) {
611
+ var ue = x(l);
612
+ return b.w(ue.date(ue.date() + Math.round(J * t)), l);
613
+ };
614
+ if (f === P) return this.set(P, this.$M + t);
615
+ if (f === Z) return this.set(Z, this.$y + t);
616
+ if (f === R) return h(1);
617
+ if (f === L) return h(7);
618
+ var Y = (n = {}, n[W] = z, n[I] = ie, n[C] = E, n)[f] || 1, N = this.$d.getTime() + t * Y;
619
+ return b.w(N, this);
620
+ }, a.subtract = function(t, i) {
621
+ return this.add(-1 * t, i);
622
+ }, a.format = function(t) {
623
+ var i = this, n = this.$locale();
624
+ if (!this.isValid()) return n.invalidDate || Se;
625
+ var l = t || "YYYY-MM-DDTHH:mm:ssZ", f = b.z(this), h = this.$H, Y = this.$m, N = this.$M, J = n.weekdays, ue = n.months, u = n.meridiem, _ = function(k, O, V, de) {
626
+ return k && (k[O] || k(i, l)) || V[O].slice(0, de);
627
+ }, j = function(k) {
628
+ return b.s(h % 12 || 12, k, "0");
629
+ }, ce = u || function(k, O, V) {
630
+ var de = k < 12 ? "AM" : "PM";
631
+ return V ? de.toLowerCase() : de;
632
+ };
633
+ return l.replace(D, function(k, O) {
634
+ return O || function(V) {
635
+ switch (V) {
636
+ case "YY":
637
+ return String(i.$y).slice(-2);
638
+ case "YYYY":
639
+ return b.s(i.$y, 4, "0");
640
+ case "M":
641
+ return N + 1;
642
+ case "MM":
643
+ return b.s(N + 1, 2, "0");
644
+ case "MMM":
645
+ return _(n.monthsShort, N, ue, 3);
646
+ case "MMMM":
647
+ return _(ue, N);
648
+ case "D":
649
+ return i.$D;
650
+ case "DD":
651
+ return b.s(i.$D, 2, "0");
652
+ case "d":
653
+ return String(i.$W);
654
+ case "dd":
655
+ return _(n.weekdaysMin, i.$W, J, 2);
656
+ case "ddd":
657
+ return _(n.weekdaysShort, i.$W, J, 3);
658
+ case "dddd":
659
+ return J[i.$W];
660
+ case "H":
661
+ return String(h);
662
+ case "HH":
663
+ return b.s(h, 2, "0");
664
+ case "h":
665
+ return j(1);
666
+ case "hh":
667
+ return j(2);
668
+ case "a":
669
+ return ce(h, Y, !0);
670
+ case "A":
671
+ return ce(h, Y, !1);
672
+ case "m":
673
+ return String(Y);
674
+ case "mm":
675
+ return b.s(Y, 2, "0");
676
+ case "s":
677
+ return String(i.$s);
678
+ case "ss":
679
+ return b.s(i.$s, 2, "0");
680
+ case "SSS":
681
+ return b.s(i.$ms, 3, "0");
682
+ case "Z":
683
+ return f;
684
+ }
685
+ return null;
686
+ }(k) || f.replace(":", "");
687
+ });
688
+ }, a.utcOffset = function() {
689
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
690
+ }, a.diff = function(t, i, n) {
691
+ var l, f = this, h = b.p(i), Y = x(t), N = (Y.utcOffset() - this.utcOffset()) * z, J = this - Y, ue = function() {
692
+ return b.m(f, Y);
693
+ };
694
+ switch (h) {
695
+ case Z:
696
+ l = ue() / 12;
697
+ break;
698
+ case P:
699
+ l = ue();
700
+ break;
701
+ case se:
702
+ l = ue() / 3;
703
+ break;
704
+ case L:
705
+ l = (J - N) / 6048e5;
706
+ break;
707
+ case R:
708
+ l = (J - N) / 864e5;
709
+ break;
710
+ case I:
711
+ l = J / ie;
712
+ break;
713
+ case W:
714
+ l = J / z;
715
+ break;
716
+ case C:
717
+ l = J / E;
718
+ break;
719
+ default:
720
+ l = J;
721
+ }
722
+ return n ? l : b.a(l);
723
+ }, a.daysInMonth = function() {
724
+ return this.endOf(P).$D;
725
+ }, a.$locale = function() {
726
+ return te[this.$L];
727
+ }, a.locale = function(t, i) {
728
+ if (!t) return this.$L;
729
+ var n = this.clone(), l = re(t, i, !0);
730
+ return l && (n.$L = l), n;
731
+ }, a.clone = function() {
732
+ return b.w(this.$d, this);
733
+ }, a.toDate = function() {
734
+ return new Date(this.valueOf());
735
+ }, a.toJSON = function() {
736
+ return this.isValid() ? this.toISOString() : null;
737
+ }, a.toISOString = function() {
738
+ return this.$d.toISOString();
739
+ }, a.toString = function() {
740
+ return this.$d.toUTCString();
741
+ }, c;
742
+ }(), ae = G.prototype;
743
+ return x.prototype = ae, [["$ms", A], ["$s", C], ["$m", W], ["$H", I], ["$W", R], ["$M", P], ["$y", Z], ["$D", S]].forEach(function(c) {
744
+ ae[c[1]] = function(a) {
745
+ return this.$g(a, c[0], c[1]);
746
+ };
747
+ }), x.extend = function(c, a) {
748
+ return c.$i || (c(a, G, x), c.$i = !0), x;
749
+ }, x.locale = re, x.isDayjs = ne, x.unix = function(c) {
750
+ return x(1e3 * c);
751
+ }, x.en = te[Q], x.Ls = te, x.p = {}, x;
752
+ });
753
+ })(it);
754
+ var Yt = it.exports;
755
+ const Rt = /* @__PURE__ */ nt(Yt);
756
+ var st = { exports: {} };
757
+ (function(T, p) {
758
+ (function(E, z) {
759
+ T.exports = z();
760
+ })(Xe, function() {
761
+ var E = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, z = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, ie = /\d/, A = /\d\d/, C = /\d\d?/, W = /\d*[^-_:/,()\s\d]+/, I = {}, R = function(d) {
762
+ return (d = +d) + (d > 68 ? 1900 : 2e3);
763
+ }, L = function(d) {
764
+ return function(D) {
765
+ this[d] = +D;
766
+ };
767
+ }, P = [/[+-]\d\d:?(\d\d)?|Z/, function(d) {
768
+ (this.zone || (this.zone = {})).offset = function(D) {
769
+ if (!D || D === "Z") return 0;
770
+ var F = D.match(/([+-]|\d\d)/g), g = 60 * F[1] + (+F[2] || 0);
771
+ return g === 0 ? 0 : F[0] === "+" ? -g : g;
772
+ }(d);
773
+ }], se = function(d) {
774
+ var D = I[d];
775
+ return D && (D.indexOf ? D : D.s.concat(D.f));
776
+ }, Z = function(d, D) {
777
+ var F, g = I.meridiem;
778
+ if (g) {
779
+ for (var B = 1; B <= 24; B += 1) if (d.indexOf(g(B, 0, D)) > -1) {
780
+ F = B > 12;
781
+ break;
782
+ }
783
+ } else F = d === (D ? "pm" : "PM");
784
+ return F;
785
+ }, S = { A: [W, function(d) {
786
+ this.afternoon = Z(d, !1);
787
+ }], a: [W, function(d) {
788
+ this.afternoon = Z(d, !0);
789
+ }], Q: [ie, function(d) {
790
+ this.month = 3 * (d - 1) + 1;
791
+ }], S: [ie, function(d) {
792
+ this.milliseconds = 100 * +d;
793
+ }], SS: [A, function(d) {
794
+ this.milliseconds = 10 * +d;
795
+ }], SSS: [/\d{3}/, function(d) {
796
+ this.milliseconds = +d;
797
+ }], s: [C, L("seconds")], ss: [C, L("seconds")], m: [C, L("minutes")], mm: [C, L("minutes")], H: [C, L("hours")], h: [C, L("hours")], HH: [C, L("hours")], hh: [C, L("hours")], D: [C, L("day")], DD: [A, L("day")], Do: [W, function(d) {
798
+ var D = I.ordinal, F = d.match(/\d+/);
799
+ if (this.day = F[0], D) for (var g = 1; g <= 31; g += 1) D(g).replace(/\[|\]/g, "") === d && (this.day = g);
800
+ }], w: [C, L("week")], ww: [A, L("week")], M: [C, L("month")], MM: [A, L("month")], MMM: [W, function(d) {
801
+ var D = se("months"), F = (se("monthsShort") || D.map(function(g) {
802
+ return g.slice(0, 3);
803
+ })).indexOf(d) + 1;
804
+ if (F < 1) throw new Error();
805
+ this.month = F % 12 || F;
806
+ }], MMMM: [W, function(d) {
807
+ var D = se("months").indexOf(d) + 1;
808
+ if (D < 1) throw new Error();
809
+ this.month = D % 12 || D;
810
+ }], Y: [/[+-]?\d+/, L("year")], YY: [A, function(d) {
811
+ this.year = R(d);
812
+ }], YYYY: [/\d{4}/, L("year")], Z: P, ZZ: P };
813
+ function Se(d) {
814
+ var D, F;
815
+ D = d, F = I && I.formats;
816
+ for (var g = (d = D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(x, b, G) {
817
+ var ae = G && G.toUpperCase();
818
+ return b || F[G] || E[G] || F[ae].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(c, a, t) {
819
+ return a || t.slice(1);
820
+ });
821
+ })).match(z), B = g.length, Q = 0; Q < B; Q += 1) {
822
+ var te = g[Q], he = S[te], ne = he && he[0], re = he && he[1];
823
+ g[Q] = re ? { regex: ne, parser: re } : te.replace(/^\[|\]$/g, "");
824
+ }
825
+ return function(x) {
826
+ for (var b = {}, G = 0, ae = 0; G < B; G += 1) {
827
+ var c = g[G];
828
+ if (typeof c == "string") ae += c.length;
829
+ else {
830
+ var a = c.regex, t = c.parser, i = x.slice(ae), n = a.exec(i)[0];
831
+ t.call(b, n), x = x.replace(n, "");
832
+ }
833
+ }
834
+ return function(l) {
835
+ var f = l.afternoon;
836
+ if (f !== void 0) {
837
+ var h = l.hours;
838
+ f ? h < 12 && (l.hours += 12) : h === 12 && (l.hours = 0), delete l.afternoon;
839
+ }
840
+ }(b), b;
841
+ };
842
+ }
843
+ return function(d, D, F) {
844
+ F.p.customParseFormat = !0, d && d.parseTwoDigitYear && (R = d.parseTwoDigitYear);
845
+ var g = D.prototype, B = g.parse;
846
+ g.parse = function(Q) {
847
+ var te = Q.date, he = Q.utc, ne = Q.args;
848
+ this.$u = he;
849
+ var re = ne[1];
850
+ if (typeof re == "string") {
851
+ var x = ne[2] === !0, b = ne[3] === !0, G = x || b, ae = ne[2];
852
+ b && (ae = ne[2]), I = this.$locale(), !x && ae && (I = F.Ls[ae]), this.$d = function(i, n, l, f) {
853
+ try {
854
+ if (["x", "X"].indexOf(n) > -1) return new Date((n === "X" ? 1e3 : 1) * i);
855
+ var h = Se(n)(i), Y = h.year, N = h.month, J = h.day, ue = h.hours, u = h.minutes, _ = h.seconds, j = h.milliseconds, ce = h.zone, k = h.week, O = /* @__PURE__ */ new Date(), V = J || (Y || N ? 1 : O.getDate()), de = Y || O.getFullYear(), ye = 0;
856
+ Y && !N || (ye = N > 0 ? N - 1 : O.getMonth());
857
+ var be, e = ue || 0, r = u || 0, s = _ || 0, o = j || 0;
858
+ return ce ? new Date(Date.UTC(de, ye, V, e, r, s, o + 60 * ce.offset * 1e3)) : l ? new Date(Date.UTC(de, ye, V, e, r, s, o)) : (be = new Date(de, ye, V, e, r, s, o), k && (be = f(be).week(k).toDate()), be);
859
+ } catch {
860
+ return /* @__PURE__ */ new Date("");
861
+ }
862
+ }(te, re, he, F), this.init(), ae && ae !== !0 && (this.$L = this.locale(ae).$L), G && te != this.format(re) && (this.$d = /* @__PURE__ */ new Date("")), I = {};
863
+ } else if (re instanceof Array) for (var c = re.length, a = 1; a <= c; a += 1) {
864
+ ne[1] = re[a - 1];
865
+ var t = F.apply(this, ne);
866
+ if (t.isValid()) {
867
+ this.$d = t.$d, this.$L = t.$L, this.init();
868
+ break;
869
+ }
870
+ a === c && (this.$d = /* @__PURE__ */ new Date(""));
871
+ }
872
+ else B.call(this, Q);
873
+ };
874
+ };
875
+ });
876
+ })(st);
877
+ var Ht = st.exports;
878
+ const It = /* @__PURE__ */ nt(Ht);
879
+ Rt.extend(It);
880
+ const Ve = (T, p = !1) => {
881
+ if (typeof T == "boolean") return T;
882
+ if (T == null) return p;
883
+ if (typeof T == "number") return T !== 0;
884
+ const E = String(T).trim().toLowerCase();
885
+ return E === "" ? !0 : E !== "false" && E !== "0";
886
+ }, Nt = {
887
+ en: {
888
+ bannerSlideLabel: "Tournament {index} of {total}",
889
+ bannerGoToSlide: "Go to tournament {index}"
890
+ },
891
+ tr: {
892
+ bannerSlideLabel: "Turnuva {index} / {total}",
893
+ bannerGoToSlide: "{index}. turnuvaya git"
894
+ },
895
+ da: {
896
+ bannerSlideLabel: "Turnering {index} af {total}",
897
+ bannerGoToSlide: "Gå til turnering {index}"
898
+ }
899
+ }, kt = 5e3, zt = 1e3, Pt = !0, jt = !0, Ut = !0, Gt = !0;
900
+ var Vt = Ne('<div class="tournaments-banner svelte-h8hbcz"><div class="tournaments-banner__skeleton svelte-h8hbcz" aria-busy="true"></div></div>'), Wt = Ne('<a class="tournaments-banner__slide svelte-h8hbcz"><!></a>'), Bt = Ne('<button type="button"></button>'), Xt = Ne('<div class="tournaments-banner__dots svelte-h8hbcz"></div>'), qt = Ne('<div class="tournaments-banner svelte-h8hbcz" role="region" aria-roledescription="carousel"><div class="tournaments-banner__track svelte-h8hbcz"></div> <!></div>');
901
+ const Zt = {
902
+ hash: "svelte-h8hbcz",
903
+ code: `.tournaments-banner.svelte-h8hbcz {display:flex;flex-direction:column;gap:8px;.tournaments-banner__track:where(.svelte-h8hbcz) {display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.tournaments-banner__slide:where(.svelte-h8hbcz) {display:block;flex:0 0 100%;color:inherit;text-decoration:none;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;cursor:pointer;&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:-2px;border-radius:13px;}}.tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:308px;border-radius:13px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
904
+ animation: svelte-h8hbcz-tournaments-banner-pulse 1.5s ease-in-out infinite;}.tournaments-banner__dots:where(.svelte-h8hbcz) {display:flex;justify-content:center;gap:8px;}.tournaments-banner__dot:where(.svelte-h8hbcz) {width:8px;height:8px;padding:0;border:0;border-radius:50%;background:var(--text-subtle, rgba(223, 227, 232, 1));opacity:0.8;cursor:pointer;&.active {background:var(--text-brand, rgba(255, 204, 0, 1));opacity:1;}&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:2px;}}}
905
+
906
+ @keyframes svelte-h8hbcz-tournaments-banner-pulse {
907
+ 50% {
908
+ opacity: 0.4;
909
+ }
910
+ }
911
+
912
+ @media (max-width: 767px) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:160px;}
913
+ }
914
+
915
+ @media (prefers-reduced-motion: reduce) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__track:where(.svelte-h8hbcz) {scroll-behavior:auto;}.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {
916
+ animation: none;}
917
+ }`
918
+ };
919
+ function ut(T, p) {
920
+ at(p, !0), ht(T, Zt);
921
+ const E = () => Mt(Et, "$_", z), [z, ie] = wt(), A = K(p, "endpoint"), C = K(p, "language", 7, "en"), W = K(p, "session"), I = K(p, "platform"), R = K(p, "translationurl"), L = K(p, "navigationhref", 7, ""), P = K(p, "enableautoplay", 7, void 0), se = K(p, "autoplayinterval", 7, void 0), Z = K(p, "pauseoninteraction", 7, void 0), S = K(p, "loop", 7, void 0), Se = K(p, "showdots", 7, void 0);
922
+ vt({ withLocale: "en", translations: {} }), pt(Nt), Ze(C()), gt(() => {
923
+ R() && _t(R());
924
+ }), Pe(() => {
925
+ Ze(C());
926
+ });
927
+ let d = $e(mt([])), D = $e(!0), F = $e(0), g = $e(null), B = $e(!1), Q = $e(!1), te = $e(!1), he = $e(!1), ne = $e(!1);
928
+ const re = Ye(() => Ve(P(), Pt)), x = Ye(() => Ve(Z(), jt)), b = Ye(() => Ve(S(), Ut)), G = Ye(() => Ve(Se(), Gt)), ae = Ye(() => Number(se()) > 0 ? Math.max(Number(se()), zt) : kt), c = (u) => `${L().replace(/\/$/, "")}/${u.id}`;
929
+ Pe(() => {
930
+ const u = {
931
+ endpoint: A(),
932
+ language: C(),
933
+ session: W(),
934
+ platform: I()
935
+ };
936
+ if (!u.endpoint)
937
+ return;
938
+ let _ = !1;
939
+ return ve(D, !0), Ft(u).then((j) => {
940
+ _ || (ve(d, j, !0), ve(F, 0));
941
+ }).catch((j) => {
942
+ console.log(j), _ || ve(d, [], !0);
943
+ }).finally(() => {
944
+ _ || ve(D, !1);
945
+ }), () => {
946
+ _ = !0;
947
+ };
948
+ }), Pe(() => {
949
+ const u = window.matchMedia("(prefers-reduced-motion: reduce)"), _ = () => {
950
+ ve(ne, u.matches, !0);
951
+ }, j = () => {
952
+ ve(he, document.visibilityState === "hidden");
953
+ };
954
+ return _(), j(), u.addEventListener("change", _), document.addEventListener("visibilitychange", j), () => {
955
+ u.removeEventListener("change", _), document.removeEventListener("visibilitychange", j);
956
+ };
957
+ }), Pe(() => {
958
+ const u = w(F), _ = w(d).length, j = w(x) && (w(B) || w(Q) || w(te)), ce = u >= _ - 1;
959
+ if (!w(re) || _ < 2 || j || w(he) || w(ne) || ce && !w(b))
960
+ return;
961
+ const k = setTimeout(() => i((u + 1) % _), w(ae));
962
+ return () => clearTimeout(k);
963
+ });
964
+ const a = (u) => u.clientWidth + (parseFloat(getComputedStyle(u).columnGap) || 0), t = () => {
965
+ !w(g) || !w(g).clientWidth || ve(F, Math.round(w(g).scrollLeft / a(w(g))), !0);
966
+ }, i = (u) => {
967
+ w(g)?.scrollTo({ left: u * a(w(g)), behavior: "smooth" });
968
+ }, n = (u) => {
969
+ ve(Q, u.target.matches(":focus-visible"), !0);
970
+ }, l = (u, _) => {
971
+ L() || (u.preventDefault(), Lt(_));
972
+ };
973
+ var f = {
974
+ get endpoint() {
975
+ return A();
976
+ },
977
+ set endpoint(u) {
978
+ A(u), ee();
979
+ },
980
+ get language() {
981
+ return C();
982
+ },
983
+ set language(u = "en") {
984
+ C(u), ee();
985
+ },
986
+ get session() {
987
+ return W();
988
+ },
989
+ set session(u) {
990
+ W(u), ee();
991
+ },
992
+ get platform() {
993
+ return I();
994
+ },
995
+ set platform(u) {
996
+ I(u), ee();
997
+ },
998
+ get translationurl() {
999
+ return R();
1000
+ },
1001
+ set translationurl(u) {
1002
+ R(u), ee();
1003
+ },
1004
+ get navigationhref() {
1005
+ return L();
1006
+ },
1007
+ set navigationhref(u = "") {
1008
+ L(u), ee();
1009
+ },
1010
+ get enableautoplay() {
1011
+ return P();
1012
+ },
1013
+ set enableautoplay(u = void 0) {
1014
+ P(u), ee();
1015
+ },
1016
+ get autoplayinterval() {
1017
+ return se();
1018
+ },
1019
+ set autoplayinterval(u = void 0) {
1020
+ se(u), ee();
1021
+ },
1022
+ get pauseoninteraction() {
1023
+ return Z();
1024
+ },
1025
+ set pauseoninteraction(u = void 0) {
1026
+ Z(u), ee();
1027
+ },
1028
+ get loop() {
1029
+ return S();
1030
+ },
1031
+ set loop(u = void 0) {
1032
+ S(u), ee();
1033
+ },
1034
+ get showdots() {
1035
+ return Se();
1036
+ },
1037
+ set showdots(u = void 0) {
1038
+ Se(u), ee();
1039
+ }
1040
+ }, h = yt(), Y = bt(h);
1041
+ {
1042
+ var N = (u) => {
1043
+ var _ = Vt();
1044
+ Fe(u, _);
1045
+ }, J = (u) => {
1046
+ var _ = qt(), j = Je(_);
1047
+ Ke(j, 23, () => w(d), (O) => O.id, (O, V, de) => {
1048
+ var ye = Wt(), be = Je(ye);
1049
+ {
1050
+ let e = Ye(() => w(de) === 0);
1051
+ xt(be, {
1052
+ variant: "banner",
1053
+ get priority() {
1054
+ return w(e);
1055
+ },
1056
+ get src() {
1057
+ return w(V).thumbnail;
1058
+ },
1059
+ get alt() {
1060
+ return w(V).nameOrTitle;
1061
+ },
1062
+ get state() {
1063
+ return w(V).state;
1064
+ },
1065
+ get startTime() {
1066
+ return w(V).startTime;
1067
+ },
1068
+ get endTime() {
1069
+ return w(V).endTime;
1070
+ },
1071
+ get language() {
1072
+ return C();
1073
+ }
1074
+ });
1075
+ }
1076
+ je(ye), et(
1077
+ (e, r) => {
1078
+ Ge(ye, "href", e), Ge(ye, "aria-label", r);
1079
+ },
1080
+ [
1081
+ () => L() ? c(w(V)) : "#",
1082
+ () => `${w(V).nameOrTitle} – ${E()("bannerSlideLabel", {
1083
+ values: { index: w(de) + 1, total: w(d).length }
1084
+ })}`
1085
+ ]
1086
+ ), Re("click", ye, (e) => l(e, w(V))), Fe(O, ye);
1087
+ }), je(j), Tt(j, (O) => ve(g, O), () => w(g));
1088
+ var ce = St(j, 2);
1089
+ {
1090
+ var k = (O) => {
1091
+ var V = Xt();
1092
+ Ke(V, 23, () => w(d), (de) => de.id, (de, ye, be) => {
1093
+ var e = Bt();
1094
+ let r;
1095
+ et(
1096
+ (s) => {
1097
+ r = Dt(e, 1, "tournaments-banner__dot svelte-h8hbcz", null, r, { active: w(be) === w(F) }), Ge(e, "aria-label", s), Ge(e, "aria-current", w(be) === w(F) ? "true" : void 0);
1098
+ },
1099
+ [
1100
+ () => E()("bannerGoToSlide", { values: { index: w(be) + 1 } })
1101
+ ]
1102
+ ), Re("click", e, () => i(w(be))), Fe(de, e);
1103
+ }), je(V), Fe(O, V);
1104
+ };
1105
+ Qe(ce, (O) => {
1106
+ w(G) && w(d).length > 1 && O(k);
1107
+ });
1108
+ }
1109
+ je(_), Ue("mouseenter", _, () => ve(B, !0)), Ue("mouseleave", _, () => ve(B, !1)), Re("focusin", _, n), Re("focusout", _, () => ve(Q, !1)), Re("touchstart", _, () => ve(te, !0)), Re("touchend", _, () => ve(te, !1)), Ue("touchcancel", _, () => ve(te, !1)), Ue("scroll", j, t), Fe(u, _);
1110
+ };
1111
+ Qe(Y, (u) => {
1112
+ w(D) ? u(N) : w(d).length && u(J, 1);
1113
+ });
1114
+ }
1115
+ Fe(T, h);
1116
+ var ue = ot(f);
1117
+ return ie(), ue;
1118
+ }
1119
+ ft(["focusin", "focusout", "touchstart", "touchend", "click"]);
1120
+ rt(
1121
+ ut,
1122
+ {
1123
+ endpoint: {},
1124
+ language: {},
1125
+ session: {},
1126
+ platform: {},
1127
+ translationurl: {},
1128
+ navigationhref: {},
1129
+ enableautoplay: {},
1130
+ autoplayinterval: {},
1131
+ pauseoninteraction: {},
1132
+ loop: {},
1133
+ showdots: {}
1134
+ },
1135
+ [],
1136
+ [],
1137
+ { mode: "open" }
1138
+ );
1139
+ function ct(T, p) {
1140
+ at(p, !0);
1141
+ let E = K(p, "endpoint"), z = K(p, "language", 7, "en"), ie = K(p, "session"), A = K(p, "platform"), C = K(p, "translationurl"), W = K(p, "navigationhref"), I = K(p, "enableautoplay"), R = K(p, "autoplayinterval"), L = K(p, "pauseoninteraction"), P = K(p, "loop"), se = K(p, "showdots");
1142
+ var Z = {
1143
+ get endpoint() {
1144
+ return E();
1145
+ },
1146
+ set endpoint(S) {
1147
+ E(S), ee();
1148
+ },
1149
+ get language() {
1150
+ return z();
1151
+ },
1152
+ set language(S = "en") {
1153
+ z(S), ee();
1154
+ },
1155
+ get session() {
1156
+ return ie();
1157
+ },
1158
+ set session(S) {
1159
+ ie(S), ee();
1160
+ },
1161
+ get platform() {
1162
+ return A();
1163
+ },
1164
+ set platform(S) {
1165
+ A(S), ee();
1166
+ },
1167
+ get translationurl() {
1168
+ return C();
1169
+ },
1170
+ set translationurl(S) {
1171
+ C(S), ee();
1172
+ },
1173
+ get navigationhref() {
1174
+ return W();
1175
+ },
1176
+ set navigationhref(S) {
1177
+ W(S), ee();
1178
+ },
1179
+ get enableautoplay() {
1180
+ return I();
1181
+ },
1182
+ set enableautoplay(S) {
1183
+ I(S), ee();
1184
+ },
1185
+ get autoplayinterval() {
1186
+ return R();
1187
+ },
1188
+ set autoplayinterval(S) {
1189
+ R(S), ee();
1190
+ },
1191
+ get pauseoninteraction() {
1192
+ return L();
1193
+ },
1194
+ set pauseoninteraction(S) {
1195
+ L(S), ee();
1196
+ },
1197
+ get loop() {
1198
+ return P();
1199
+ },
1200
+ set loop(S) {
1201
+ P(S), ee();
1202
+ },
1203
+ get showdots() {
1204
+ return se();
1205
+ },
1206
+ set showdots(S) {
1207
+ se(S), ee();
1208
+ }
1209
+ };
1210
+ return ut(T, {
1211
+ get endpoint() {
1212
+ return E();
1213
+ },
1214
+ get language() {
1215
+ return z();
1216
+ },
1217
+ get session() {
1218
+ return ie();
1219
+ },
1220
+ get platform() {
1221
+ return A();
1222
+ },
1223
+ get translationurl() {
1224
+ return C();
1225
+ },
1226
+ get navigationhref() {
1227
+ return W();
1228
+ },
1229
+ get enableautoplay() {
1230
+ return I();
1231
+ },
1232
+ get autoplayinterval() {
1233
+ return R();
1234
+ },
1235
+ get pauseoninteraction() {
1236
+ return L();
1237
+ },
1238
+ get loop() {
1239
+ return P();
1240
+ },
1241
+ get showdots() {
1242
+ return se();
1243
+ }
1244
+ }), ot(Z);
1245
+ }
1246
+ customElements.define("tournaments-banner", rt(
1247
+ ct,
1248
+ {
1249
+ endpoint: {},
1250
+ language: {},
1251
+ session: {},
1252
+ platform: {},
1253
+ translationurl: {},
1254
+ navigationhref: {},
1255
+ enableautoplay: {},
1256
+ autoplayinterval: {},
1257
+ pauseoninteraction: {},
1258
+ loop: {},
1259
+ showdots: {}
1260
+ },
1261
+ [],
1262
+ []
1263
+ ));
1264
+ const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1265
+ __proto__: null,
1266
+ default: ct
1267
+ }, Symbol.toStringTag, { value: "Module" }));
1268
+ export {
1269
+ ut as T,
1270
+ Kt as a
1271
+ };