@mjsz-vbr-elements/core 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{AdditionalStandingsText-3jExdQ4O.js → TimezoneSelector-pJzOJFd2.js} +776 -774
- package/dist/columns.js +1 -1
- package/dist/components.js +2 -2
- package/dist/composables.js +84 -71
- package/dist/constants.js +1 -1
- package/dist/{datetime-P3jKxpvY.js → datetime-DTVWbsTz.js} +504 -454
- package/dist/{convert-HYpfGr9y.js → errors-1KEdp4yb.js} +226 -184
- package/dist/index.iife.js +4 -4
- package/dist/index.iife.js.br +0 -0
- package/dist/index.iife.js.gz +0 -0
- package/dist/index.js +127 -122
- package/dist/{useAdditionalText-DHQEg82L.js → useSort-fVNzrwPD.js} +188 -173
- package/dist/utils.js +35 -30
- package/package.json +9 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
3
|
+
* version: v2.11.0 - 14/01/2025, 16:53:44
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
8
|
import { SORT_STATE_ORIGINAL as F, SORT_STATE_ASCEND as U } from "./constants.js";
|
|
9
|
-
import { C as
|
|
10
|
-
var Z = /* @__PURE__ */
|
|
9
|
+
import { C as f, L as S, F as v, E as m, _ as p, w as g, x as R, M as b, J as c, N, O as M, K as T, P as j, Q as G, R as k, S as H, T as X, U as q, V as Y, B as D, H as K, D as J, f as h, c as $, b as Q, a as V } from "./datetime-DTVWbsTz.js";
|
|
10
|
+
var Z = /* @__PURE__ */ f(function(e, r) {
|
|
11
11
|
if (e === r)
|
|
12
12
|
return r;
|
|
13
13
|
function n(o, l) {
|
|
@@ -22,11 +22,11 @@ var Z = /* @__PURE__ */ p(function(e, r) {
|
|
|
22
22
|
return u === typeof e ? e : r;
|
|
23
23
|
var s = S(e), i = n(s, S(r));
|
|
24
24
|
return i !== void 0 && i === s ? e : r;
|
|
25
|
-
}), z = /* @__PURE__ */
|
|
25
|
+
}), z = /* @__PURE__ */ f(function(e, r) {
|
|
26
26
|
return v(m(e), r);
|
|
27
|
-
}), w = /* @__PURE__ */
|
|
27
|
+
}), w = /* @__PURE__ */ p(function(e) {
|
|
28
28
|
return g(e) ? !0 : !e || typeof e != "object" || R(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
|
|
29
|
-
}),
|
|
29
|
+
}), O = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
|
|
30
30
|
function ee(t, e, r) {
|
|
31
31
|
return function(a, u, s) {
|
|
32
32
|
if (w(s))
|
|
@@ -35,8 +35,8 @@ function ee(t, e, r) {
|
|
|
35
35
|
return u;
|
|
36
36
|
if (typeof s["fantasy-land/reduce"] == "function")
|
|
37
37
|
return e(a, u, s, "fantasy-land/reduce");
|
|
38
|
-
if (s[
|
|
39
|
-
return r(a, u, s[
|
|
38
|
+
if (s[O] != null)
|
|
39
|
+
return r(a, u, s[O]());
|
|
40
40
|
if (typeof s.next == "function")
|
|
41
41
|
return r(a, u, s);
|
|
42
42
|
if (typeof s.reduce == "function")
|
|
@@ -54,7 +54,7 @@ function te(t, e, r) {
|
|
|
54
54
|
}
|
|
55
55
|
return t["@@transducer/result"](e);
|
|
56
56
|
}
|
|
57
|
-
var re = /* @__PURE__ */
|
|
57
|
+
var re = /* @__PURE__ */ f(function(e, r) {
|
|
58
58
|
return b(e.length, function() {
|
|
59
59
|
return e.apply(r, arguments);
|
|
60
60
|
});
|
|
@@ -89,11 +89,11 @@ function E(t) {
|
|
|
89
89
|
}
|
|
90
90
|
var P = /* @__PURE__ */ c(function(t, e, r) {
|
|
91
91
|
return C(typeof t == "function" ? E(t) : t, e, r);
|
|
92
|
-
}),
|
|
92
|
+
}), I = /* @__PURE__ */ p(function(e) {
|
|
93
93
|
return function() {
|
|
94
94
|
return e;
|
|
95
95
|
};
|
|
96
|
-
}), ue = /* @__PURE__ */
|
|
96
|
+
}), ue = /* @__PURE__ */ p(function(e) {
|
|
97
97
|
return N(P(Z, 0, z("length", e)), function() {
|
|
98
98
|
for (var r = 0, n = e.length; r < n; ) {
|
|
99
99
|
if (e[r].apply(this, arguments))
|
|
@@ -105,7 +105,7 @@ var P = /* @__PURE__ */ c(function(t, e, r) {
|
|
|
105
105
|
}), y = /* @__PURE__ */ c(function(e, r, n) {
|
|
106
106
|
var a = e(r), u = e(n);
|
|
107
107
|
return a < u ? -1 : a > u ? 1 : 0;
|
|
108
|
-
}), ie = /* @__PURE__ */
|
|
108
|
+
}), ie = /* @__PURE__ */ p(function(e) {
|
|
109
109
|
return N(e.length, e);
|
|
110
110
|
});
|
|
111
111
|
function ce(t, e, r) {
|
|
@@ -118,7 +118,7 @@ function ce(t, e, r) {
|
|
|
118
118
|
a[u] = r[u];
|
|
119
119
|
return a[t] = e, a;
|
|
120
120
|
}
|
|
121
|
-
var oe = /* @__PURE__ */
|
|
121
|
+
var oe = /* @__PURE__ */ p(function(e) {
|
|
122
122
|
return e == null;
|
|
123
123
|
}), le = /* @__PURE__ */ c(function t(e, r, n) {
|
|
124
124
|
if (e.length === 0)
|
|
@@ -129,10 +129,10 @@ var oe = /* @__PURE__ */ f(function(e) {
|
|
|
129
129
|
r = t(Array.prototype.slice.call(e, 1), r, u);
|
|
130
130
|
}
|
|
131
131
|
return ce(a, r, n);
|
|
132
|
-
}),
|
|
132
|
+
}), fe = /* @__PURE__ */ c(function(e, r, n) {
|
|
133
133
|
return le([e], r, n);
|
|
134
134
|
});
|
|
135
|
-
function
|
|
135
|
+
function pe(t) {
|
|
136
136
|
return new RegExp(t.source, t.flags ? t.flags : (t.global ? "g" : "") + (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.sticky ? "y" : "") + (t.unicode ? "u" : "") + (t.dotAll ? "s" : ""));
|
|
137
137
|
}
|
|
138
138
|
function L(t, e, r) {
|
|
@@ -155,7 +155,7 @@ function L(t, e, r) {
|
|
|
155
155
|
case "Date":
|
|
156
156
|
return new Date(t.valueOf());
|
|
157
157
|
case "RegExp":
|
|
158
|
-
return
|
|
158
|
+
return pe(t);
|
|
159
159
|
case "Int8Array":
|
|
160
160
|
case "Uint8Array":
|
|
161
161
|
case "Uint8ClampedArray":
|
|
@@ -223,13 +223,13 @@ function _(t, e) {
|
|
|
223
223
|
}
|
|
224
224
|
var ye = /* @__PURE__ */ c(/* @__PURE__ */ _("slice", function(e, r, n) {
|
|
225
225
|
return Array.prototype.slice.call(n, e, r);
|
|
226
|
-
})), ve = /* @__PURE__ */
|
|
226
|
+
})), ve = /* @__PURE__ */ p(/* @__PURE__ */ _("tail", /* @__PURE__ */ ye(1, 1 / 0)));
|
|
227
227
|
function d() {
|
|
228
228
|
if (arguments.length === 0)
|
|
229
229
|
throw new Error("pipe requires at least one argument");
|
|
230
230
|
return b(arguments[0].length, P(de, arguments[0], ve(arguments)));
|
|
231
231
|
}
|
|
232
|
-
var ge = /* @__PURE__ */
|
|
232
|
+
var ge = /* @__PURE__ */ p(function(e) {
|
|
233
233
|
return R(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
|
|
234
234
|
});
|
|
235
235
|
function x() {
|
|
@@ -268,13 +268,13 @@ var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a)
|
|
|
268
268
|
})), Se = /* @__PURE__ */ c(function(e, r, n) {
|
|
269
269
|
var a = e(r), u = e(n);
|
|
270
270
|
return a > u ? -1 : a < u ? 1 : 0;
|
|
271
|
-
}),
|
|
271
|
+
}), De = /* @__PURE__ */ f(/* @__PURE__ */ _("groupBy", /* @__PURE__ */ _e(function(t, e) {
|
|
272
272
|
return t.push(e), t;
|
|
273
|
-
}, []))),
|
|
273
|
+
}, []))), Oe = /* @__PURE__ */ c(function(e, r, n) {
|
|
274
274
|
return N(Math.max(e.length, r.length, n.length), function() {
|
|
275
275
|
return e.apply(this, arguments) ? r.apply(this, arguments) : n.apply(this, arguments);
|
|
276
276
|
});
|
|
277
|
-
}),
|
|
277
|
+
}), Ie = /* @__PURE__ */ f(q), Ae = /* @__PURE__ */ f(function(e, r) {
|
|
278
278
|
return function(n) {
|
|
279
279
|
return function(a) {
|
|
280
280
|
return v(function(u) {
|
|
@@ -282,8 +282,8 @@ var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a)
|
|
|
282
282
|
}, n(e(a)));
|
|
283
283
|
};
|
|
284
284
|
};
|
|
285
|
-
}), Re = /* @__PURE__ */
|
|
286
|
-
return Ae(m(e),
|
|
285
|
+
}), Re = /* @__PURE__ */ p(function(e) {
|
|
286
|
+
return Ae(m(e), fe(e));
|
|
287
287
|
}), B = function(t) {
|
|
288
288
|
return {
|
|
289
289
|
value: t,
|
|
@@ -297,127 +297,118 @@ var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a)
|
|
|
297
297
|
})(n).value;
|
|
298
298
|
}), Me = /* @__PURE__ */ c(function(e, r, n) {
|
|
299
299
|
return n.replace(e, r);
|
|
300
|
-
}), $e = /* @__PURE__ */
|
|
300
|
+
}), $e = /* @__PURE__ */ f(function(e, r) {
|
|
301
301
|
return Array.prototype.slice.call(r, 0).sort(e);
|
|
302
|
-
}), W = /* @__PURE__ */
|
|
302
|
+
}), W = /* @__PURE__ */ f(function(e, r) {
|
|
303
303
|
return Array.prototype.slice.call(r, 0).sort(function(n, a) {
|
|
304
304
|
for (var u = 0, s = 0; u === 0 && s < e.length; )
|
|
305
305
|
u = e[s](n, a), s += 1;
|
|
306
306
|
return u;
|
|
307
307
|
});
|
|
308
308
|
}), A = /* @__PURE__ */ Y(0, "toLowerCase");
|
|
309
|
-
|
|
310
|
-
if (!t)
|
|
309
|
+
function Fe(t, e = "body") {
|
|
310
|
+
if (!t)
|
|
311
|
+
return;
|
|
311
312
|
if (typeof e != "string") {
|
|
312
313
|
e == null || e.append(t);
|
|
313
314
|
return;
|
|
314
315
|
}
|
|
315
316
|
const r = document.querySelector(e);
|
|
316
317
|
r == null || r.append(t);
|
|
317
|
-
}
|
|
318
|
+
}
|
|
318
319
|
function Ue(t, e = () => ({})) {
|
|
319
320
|
return t.slice().sort((r, n) => {
|
|
320
|
-
|
|
321
|
-
if (a === null || u === null)
|
|
322
|
-
|
|
321
|
+
const a = e(r), u = e(n);
|
|
322
|
+
if (a === null || u === null)
|
|
323
|
+
return 0;
|
|
324
|
+
const s = a.compareDocumentPosition(u);
|
|
323
325
|
return s & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : s & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
324
326
|
});
|
|
325
327
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
328
|
+
function je(t = []) {
|
|
329
|
+
return {
|
|
330
|
+
result: [...t],
|
|
331
|
+
filteredRowsLength: 0,
|
|
332
|
+
isFiltered: !1,
|
|
333
|
+
value() {
|
|
334
|
+
return {
|
|
335
|
+
rows: this.result,
|
|
336
|
+
totalItems: this.isFiltered ? this.filteredRowsLength : t.length,
|
|
337
|
+
currentItems: this.currentItems
|
|
338
|
+
};
|
|
339
|
+
},
|
|
340
|
+
filter(e, r = [], n = !1) {
|
|
341
|
+
if (e) {
|
|
342
|
+
const a = r.map(
|
|
343
|
+
(i) => n ? d(K(i), D(e)) : d(m(i), A, Ie(A(e)))
|
|
344
|
+
), u = ie((i) => i.name ? be(Re("name"), Me(",", ""), i) : i), s = J(d(u, ue([...a])), this.result);
|
|
345
|
+
this.isFiltered = !0, this.filteredRowsLength = s.length, this.result = s;
|
|
346
|
+
}
|
|
347
|
+
return this;
|
|
348
|
+
},
|
|
349
|
+
sorted(e) {
|
|
350
|
+
if (!e.sortTarget)
|
|
351
|
+
return this;
|
|
352
|
+
if (e.orders[0].direction === F)
|
|
353
|
+
return this;
|
|
354
|
+
const r = Oe(D(U), I(y), I(Se));
|
|
355
|
+
return this.result = W(e.orders.map((n) => x(r(n.direction), m)(n.target)))(this.result), this;
|
|
356
|
+
},
|
|
357
|
+
addIndex(e = null) {
|
|
358
|
+
return this.result.reduce((r, n, a) => {
|
|
359
|
+
const u = r[r.length - 1] || [], s = e && u[e] === n[e];
|
|
360
|
+
return n.index = s ? u.index : a + 1, n.indexClass = s ? "is-duplicated" : null, r.push(n), r;
|
|
361
|
+
}, []), this;
|
|
362
|
+
},
|
|
363
|
+
addContinuousIndex() {
|
|
364
|
+
return this.result = this.result.map((e, r) => ({
|
|
365
|
+
...e,
|
|
366
|
+
index: r + 1
|
|
367
|
+
})), this;
|
|
368
|
+
},
|
|
369
|
+
pagination(e, r) {
|
|
370
|
+
if (!r)
|
|
371
|
+
return this;
|
|
372
|
+
e = Number(e), r = Number(r);
|
|
373
|
+
const n = (e - 1) * r, a = n + r;
|
|
374
|
+
return this.result = this.result.slice(n, a), this;
|
|
375
|
+
},
|
|
376
|
+
more(e, r) {
|
|
377
|
+
return this.result = this.result.slice(Number(e), Number(r)), this;
|
|
378
|
+
},
|
|
379
|
+
playerName() {
|
|
380
|
+
return this.result = this.result.map((e) => ({
|
|
381
|
+
...e,
|
|
382
|
+
name: `${e.lastName} ${e.firstName}`
|
|
383
|
+
})), this;
|
|
384
|
+
},
|
|
385
|
+
teamName() {
|
|
386
|
+
return this.result = this.result.map((e) => ({
|
|
387
|
+
...e,
|
|
388
|
+
teamName: e.team.longName
|
|
389
|
+
})), this;
|
|
390
|
+
},
|
|
391
|
+
schedule(e = "", r = "hu") {
|
|
392
|
+
return this.result = this.result.map((n) => ({
|
|
393
|
+
...n,
|
|
394
|
+
gameResult: `${n.homeTeamScore}-${n.awayTeamScore}`,
|
|
395
|
+
gameDateDate: h(n.gameDate, "L dddd", e, r),
|
|
396
|
+
gameDateTime: h(n.gameDate, "HH:mm", e, r)
|
|
397
|
+
})), this;
|
|
398
|
+
},
|
|
399
|
+
gameDateFilter(e) {
|
|
400
|
+
return e === null ? this : (this.result = this.result.filter((r) => new Date(r.gameDate).getMonth() === e), this);
|
|
401
|
+
},
|
|
402
|
+
convertTimes(e = []) {
|
|
403
|
+
return this.result = this.result.map((r) => (e.map((n) => r[n] ? r[`${n}Sec`] = $(r[n]) : r), r)), this;
|
|
404
|
+
},
|
|
405
|
+
groupByDays() {
|
|
406
|
+
return this.currentItems = this.result.length, this.result = De((e) => h(e.gameDate, "YYYY-MM-DD"))(this.result), this;
|
|
361
407
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
if (e.orders[0].direction === F) return this;
|
|
367
|
-
const r = De(I(U), O(y), O(Se));
|
|
368
|
-
return this.result = W(e.orders.map((n) => x(r(n.direction), m)(n.target)))(this.result), this;
|
|
369
|
-
},
|
|
370
|
-
addIndex(e = null) {
|
|
371
|
-
return this.result.reduce((r, n, a) => {
|
|
372
|
-
const u = r[r.length - 1] || [], s = e && u[e] === n[e];
|
|
373
|
-
return n.index = s ? u.index : a + 1, n.indexClass = s ? "is-duplicated" : null, r.push(n), r;
|
|
374
|
-
}, []), this;
|
|
375
|
-
},
|
|
376
|
-
addContinuousIndex() {
|
|
377
|
-
return this.result = this.result.map((e, r) => ({
|
|
378
|
-
...e,
|
|
379
|
-
index: r + 1
|
|
380
|
-
})), this;
|
|
381
|
-
},
|
|
382
|
-
pagination(e, r) {
|
|
383
|
-
if (!r) return this;
|
|
384
|
-
e = Number(e), r = Number(r);
|
|
385
|
-
const n = (e - 1) * r, a = n + r;
|
|
386
|
-
return this.result = this.result.slice(n, a), this;
|
|
387
|
-
},
|
|
388
|
-
more(e, r) {
|
|
389
|
-
return this.result = this.result.slice(Number(e), Number(r)), this;
|
|
390
|
-
},
|
|
391
|
-
playerName() {
|
|
392
|
-
return this.result = this.result.map((e) => ({
|
|
393
|
-
...e,
|
|
394
|
-
name: `${e.lastName} ${e.firstName}`
|
|
395
|
-
})), this;
|
|
396
|
-
},
|
|
397
|
-
teamName() {
|
|
398
|
-
return this.result = this.result.map((e) => ({
|
|
399
|
-
...e,
|
|
400
|
-
teamName: e.team.longName
|
|
401
|
-
})), this;
|
|
402
|
-
},
|
|
403
|
-
schedule(e = "", r = "hu") {
|
|
404
|
-
return this.result = this.result.map((n) => ({
|
|
405
|
-
...n,
|
|
406
|
-
gameResult: `${n.homeTeamScore}-${n.awayTeamScore}`,
|
|
407
|
-
gameDateDate: h(n.gameDate, "L dddd", e, r),
|
|
408
|
-
gameDateTime: h(n.gameDate, "HH:mm", e, r)
|
|
409
|
-
})), this;
|
|
410
|
-
},
|
|
411
|
-
gameDateFilter(e) {
|
|
412
|
-
return e === null ? this : (this.result = this.result.filter((r) => new Date(r.gameDate).getMonth() == e), this);
|
|
413
|
-
},
|
|
414
|
-
convertTimes(e = []) {
|
|
415
|
-
return this.result = this.result.map((r) => (e.map((n) => r[n] ? r[`${n}Sec`] = $(r[n]) : r), r)), this;
|
|
416
|
-
},
|
|
417
|
-
groupByDays() {
|
|
418
|
-
return this.currentItems = this.result.length, this.result = Ie((e) => h(e.gameDate, "YYYY-MM-DD"))(this.result), this;
|
|
419
|
-
}
|
|
420
|
-
}), Xe = (t, ...e) => v(x(...e))(t), qe = (t) => {
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
const Ge = (t, ...e) => v(x(...e))(t);
|
|
411
|
+
function ke(t) {
|
|
421
412
|
var e, r, n, a;
|
|
422
413
|
return {
|
|
423
414
|
...t,
|
|
@@ -431,87 +422,138 @@ const Ge = {
|
|
|
431
422
|
name: t.nationality.includes("hu") ? `${t.lastName} ${t.firstName}` : `${t.lastName}, ${t.firstName}`
|
|
432
423
|
}
|
|
433
424
|
};
|
|
434
|
-
}
|
|
425
|
+
}
|
|
426
|
+
function He(t) {
|
|
435
427
|
var e;
|
|
436
428
|
return {
|
|
437
429
|
...t,
|
|
438
430
|
...((e = t == null ? void 0 : t.team) == null ? void 0 : e.id) && { teamName: t.team.longName }
|
|
439
431
|
};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}), Ve = (t) => ({
|
|
451
|
-
...t,
|
|
452
|
-
resultType: xe(t)
|
|
453
|
-
}), Ze = (t) => ({
|
|
454
|
-
...t,
|
|
455
|
-
rowClasses: t.optional ? "is-optional" : ""
|
|
456
|
-
}), ze = (t = []) => (e) => {
|
|
457
|
-
var r;
|
|
458
|
-
return {
|
|
432
|
+
}
|
|
433
|
+
function Xe(t = "", e = "hu") {
|
|
434
|
+
return (r) => ({
|
|
435
|
+
...r,
|
|
436
|
+
gameDateDate: h(r.gameDate, "L dddd", t, e),
|
|
437
|
+
gameDateTime: h(r.gameDate, "HH:mm", t, e)
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
function qe(t) {
|
|
441
|
+
return (e) => ({
|
|
459
442
|
...e,
|
|
460
|
-
|
|
443
|
+
gameResult: Le(e)
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function Ye(t) {
|
|
447
|
+
return {
|
|
448
|
+
...t,
|
|
449
|
+
opponent: Pe(t)
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function Ke(t) {
|
|
453
|
+
return {
|
|
454
|
+
...t,
|
|
455
|
+
resultType: xe(t)
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
function Je(t) {
|
|
459
|
+
return {
|
|
460
|
+
...t,
|
|
461
|
+
rowClasses: t.optional ? "is-optional" : ""
|
|
461
462
|
};
|
|
462
|
-
}
|
|
463
|
+
}
|
|
464
|
+
function Qe(t = []) {
|
|
465
|
+
return (e) => {
|
|
466
|
+
var r;
|
|
467
|
+
return {
|
|
468
|
+
...e,
|
|
469
|
+
[t]: (r = e[t]) == null ? void 0 : r.toUpperCase()
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
function Ve(t = []) {
|
|
474
|
+
return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = $(e[r]) : e), e);
|
|
475
|
+
}
|
|
476
|
+
function Ze(t = []) {
|
|
477
|
+
return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = Q(e[r]) : e), e);
|
|
478
|
+
}
|
|
479
|
+
function ze(t = []) {
|
|
480
|
+
return (e) => (t.map((r) => e[`${r}Min`] = V(e[r])), e);
|
|
481
|
+
}
|
|
482
|
+
function we(t) {
|
|
463
483
|
var e, r;
|
|
464
484
|
return {
|
|
465
485
|
...t,
|
|
466
486
|
periodResults: ((r = (e = t.result) == null ? void 0 : e.match(/\(.*?\)/)) == null ? void 0 : r[0]) ?? ""
|
|
467
487
|
};
|
|
468
|
-
}
|
|
488
|
+
}
|
|
489
|
+
const Ce = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), et = W([Ce, y(m("id")), y(m("gameId"))]), Ee = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), tt = $e(Ee("name"));
|
|
469
490
|
function Pe(t) {
|
|
470
491
|
var e;
|
|
471
492
|
return [t.isHomeGame ? null : "@", (e = t.opponent) == null ? void 0 : e.shortName].join(" ");
|
|
472
493
|
}
|
|
473
|
-
function Le(t
|
|
474
|
-
let
|
|
475
|
-
return t.isHomeGame || (
|
|
494
|
+
function Le(t) {
|
|
495
|
+
let e = t == null ? void 0 : t.homeTeamScore, r = t == null ? void 0 : t.awayTeamScore;
|
|
496
|
+
return t.isHomeGame || (e = t == null ? void 0 : t.awayTeamScore, r = t == null ? void 0 : t.homeTeamScore), [e, r].join(":");
|
|
476
497
|
}
|
|
477
498
|
function xe(t) {
|
|
478
499
|
const e = t.gameResult.split(":"), r = e[0] > e[1], n = e[0] < e[1];
|
|
479
500
|
return r && t.isOvertime ? "OTW" : r && t.isShootout ? "SOW" : r ? "W" : n && t.isOvertime ? "OTL" : n && t.isShootout ? "SOL" : n ? "L" : "D";
|
|
480
501
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
phaseName:
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
502
|
+
function rt(t) {
|
|
503
|
+
return t.map((e) => {
|
|
504
|
+
var r, n;
|
|
505
|
+
return {
|
|
506
|
+
phaseId: e.phaseId,
|
|
507
|
+
phaseName: Object.values({
|
|
508
|
+
phaseName: e.phaseName,
|
|
509
|
+
...((r = e.phaseType) == null ? void 0 : r.phaseTypeName) && e.phaseType.phaseTypeName !== e.phaseName && {
|
|
510
|
+
phaseTypeName: e.phaseType.phaseTypeName
|
|
511
|
+
},
|
|
512
|
+
...((n = e.phaseSubType) == null ? void 0 : n.phaseSubTypeName) && { phaseSubTypeName: e.phaseSubType.phaseSubTypeName }
|
|
513
|
+
}).join("-")
|
|
514
|
+
};
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
class nt extends Error {
|
|
518
|
+
constructor(e, r = {}) {
|
|
519
|
+
const { key: n, cause: a } = r;
|
|
520
|
+
super(e), this.name = "WidgetError", this.key = n, this.cause = a;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const at = {
|
|
524
|
+
message: "Undefined Column name Message",
|
|
525
|
+
options: {
|
|
526
|
+
key: "undefined-column",
|
|
527
|
+
cause: {}
|
|
528
|
+
}
|
|
529
|
+
}, st = {
|
|
530
|
+
message: "Invalid season name",
|
|
531
|
+
options: {
|
|
532
|
+
key: "invalid-season-name",
|
|
533
|
+
cause: {}
|
|
534
|
+
}
|
|
535
|
+
};
|
|
494
536
|
export {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
537
|
+
st as I,
|
|
538
|
+
at as U,
|
|
539
|
+
nt as W,
|
|
540
|
+
qe as a,
|
|
541
|
+
Ye as b,
|
|
542
|
+
je as c,
|
|
543
|
+
Ke as d,
|
|
544
|
+
Ve as e,
|
|
545
|
+
Ze as f,
|
|
546
|
+
Xe as g,
|
|
547
|
+
ze as h,
|
|
548
|
+
we as i,
|
|
549
|
+
et as j,
|
|
550
|
+
rt as k,
|
|
551
|
+
tt as l,
|
|
510
552
|
Fe as m,
|
|
511
553
|
Ue as n,
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
554
|
+
ke as p,
|
|
555
|
+
Ge as r,
|
|
556
|
+
Je as s,
|
|
557
|
+
He as t,
|
|
558
|
+
Qe as u
|
|
517
559
|
};
|