@mjsz-vbr-elements/core 2.31.2 → 2.33.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/dist/{TimezoneSelector-T8Y8aFc-.js → TimezoneSelector-ypwhJVm-.js} +942 -827
- package/dist/columns.js +57 -57
- package/dist/components.js +14 -13
- package/dist/composables.js +40 -38
- package/dist/constants.js +1 -1
- package/dist/{datetime-bWwGbGlR.js → datetime-B_IKGlWy.js} +379 -374
- package/dist/{errors-DHx3LQ6t.js → errors-C61Kgyqj.js} +97 -94
- 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 +171 -228
- package/dist/props.js +74 -0
- package/dist/{useSort-D5U_wkle.js → useSort-CoM4Br_9.js} +29 -29
- package/dist/utils.js +57 -55
- package/package.json +5 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
3
|
+
* version: v2.33.0 - 25/11/2025, 21:00:09
|
|
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 de, SORT_STATE_ASCEND as ye } from "./constants.js";
|
|
9
|
-
import {
|
|
9
|
+
import { G as m, L as $, v as l, z as u, M as h, N as B, O as J, P as z, _ as f, Q as A, K as ve, R as K, S as ge, T as Ne, U as Q, V as Te, W as L, X as Se, Y as _e, Z as Ie, $ as be, a0 as Oe, a1 as Ae, a2 as G, E as Re, a3 as O, a4 as Ee, A as g, u as Pe, J as j, I as Ce, x as S, H as R, f as N, c as V, b as De, a as $e, w as je } from "./datetime-B_IKGlWy.js";
|
|
10
10
|
var Z = /* @__PURE__ */ m(function(e, r) {
|
|
11
11
|
if (e === r)
|
|
12
12
|
return r;
|
|
@@ -242,13 +242,13 @@ function T() {
|
|
|
242
242
|
throw new Error("pipe requires at least one argument");
|
|
243
243
|
return z(arguments[0].length, M(Ke, arguments[0], Ve(arguments)));
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var E = /* @__PURE__ */ h(function(e) {
|
|
246
246
|
return J(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
|
|
247
247
|
});
|
|
248
248
|
function o() {
|
|
249
249
|
if (arguments.length === 0)
|
|
250
250
|
throw new Error("compose requires at least one argument");
|
|
251
|
-
return T.apply(this,
|
|
251
|
+
return T.apply(this, E(arguments));
|
|
252
252
|
}
|
|
253
253
|
var se = /* @__PURE__ */ h(function(t) {
|
|
254
254
|
return Q(0, t);
|
|
@@ -339,14 +339,14 @@ var ue = /* @__PURE__ */ G(1, "join"), it = /* @__PURE__ */ m(function(e, r) {
|
|
|
339
339
|
return ce(r(a));
|
|
340
340
|
})(n).value;
|
|
341
341
|
}), fe = /* @__PURE__ */ f(function(e, r, n) {
|
|
342
|
-
return O(
|
|
342
|
+
return O(Ee(r, n), e);
|
|
343
343
|
}), pe = /* @__PURE__ */ m(function(e, r) {
|
|
344
344
|
for (var n = {}, a = 0; a < e.length; )
|
|
345
345
|
e[a] in r && (n[e[a]] = r[e[a]]), a += 1;
|
|
346
346
|
return n;
|
|
347
|
-
}), E = /* @__PURE__ */ f(function(e, r, n) {
|
|
348
|
-
return O(e, u(r, n));
|
|
349
347
|
}), P = /* @__PURE__ */ f(function(e, r, n) {
|
|
348
|
+
return O(e, u(r, n));
|
|
349
|
+
}), C = /* @__PURE__ */ f(function(e, r, n) {
|
|
350
350
|
return n.replace(e, r);
|
|
351
351
|
}), W = /* @__PURE__ */ m(function(e, r) {
|
|
352
352
|
return Array.prototype.slice.call(r, 0).sort(e);
|
|
@@ -370,29 +370,11 @@ var lt = /* @__PURE__ */ m(function(e, r) {
|
|
|
370
370
|
throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received " + $(e));
|
|
371
371
|
return ae(e).test(r);
|
|
372
372
|
}), H = /* @__PURE__ */ G(0, "toLowerCase"), ft = /* @__PURE__ */ G(0, "toUpperCase");
|
|
373
|
-
function Ot(t, e = "body") {
|
|
374
|
-
if (!t)
|
|
375
|
-
return;
|
|
376
|
-
if (typeof e != "string") {
|
|
377
|
-
e?.append(t);
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
document.querySelector(e)?.append(t);
|
|
381
|
-
}
|
|
382
|
-
function At(t, e = () => ({})) {
|
|
383
|
-
return t.slice().sort((r, n) => {
|
|
384
|
-
const a = e(r), s = e(n);
|
|
385
|
-
if (a === null || s === null)
|
|
386
|
-
return 0;
|
|
387
|
-
const i = a.compareDocumentPosition(s);
|
|
388
|
-
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
373
|
let pt = 0;
|
|
392
374
|
function mt() {
|
|
393
375
|
return ++pt;
|
|
394
376
|
}
|
|
395
|
-
function
|
|
377
|
+
function Ot(t = []) {
|
|
396
378
|
return {
|
|
397
379
|
result: [...t],
|
|
398
380
|
filteredRowsLength: 0,
|
|
@@ -408,7 +390,7 @@ function Rt(t = []) {
|
|
|
408
390
|
if (e) {
|
|
409
391
|
const a = r.map(
|
|
410
392
|
(c) => n ? T(S(c), O(e)) : T(u(c), H, rt(H(e)))
|
|
411
|
-
), s = ne((c) => c.name ? le(oe("name"),
|
|
393
|
+
), s = ne((c) => c.name ? le(oe("name"), C(",", ""), c) : c), i = R(T(s, ke([...a])), this.result);
|
|
412
394
|
this.isFiltered = !0, this.filteredRowsLength = i.length, this.result = i;
|
|
413
395
|
}
|
|
414
396
|
return this;
|
|
@@ -474,10 +456,13 @@ function Rt(t = []) {
|
|
|
474
456
|
},
|
|
475
457
|
slice(e = 3) {
|
|
476
458
|
return this.result = this.result.slice(0, e), this;
|
|
459
|
+
},
|
|
460
|
+
reverse(e) {
|
|
461
|
+
return e && (this.result = [...this.result].reverse()), this;
|
|
477
462
|
}
|
|
478
463
|
};
|
|
479
464
|
}
|
|
480
|
-
const
|
|
465
|
+
const At = (t, ...e) => l(o(...e))(t);
|
|
481
466
|
function b(t) {
|
|
482
467
|
return {
|
|
483
468
|
...t,
|
|
@@ -498,32 +483,32 @@ function me(t) {
|
|
|
498
483
|
...t?.team?.id && { teamName: t.team.longName }
|
|
499
484
|
};
|
|
500
485
|
}
|
|
501
|
-
function
|
|
486
|
+
function Rt(t = "", e = "hu") {
|
|
502
487
|
return (r) => ({
|
|
503
488
|
...r,
|
|
504
489
|
gameDateDate: N(r.gameDate, "L dddd", t, e),
|
|
505
490
|
gameDateTime: N(r.gameDate, "HH:mm", t, e)
|
|
506
491
|
});
|
|
507
492
|
}
|
|
508
|
-
function
|
|
493
|
+
function Et(t) {
|
|
509
494
|
return (e) => ({
|
|
510
495
|
...e,
|
|
511
496
|
gameResult: gt(e)
|
|
512
497
|
});
|
|
513
498
|
}
|
|
514
|
-
function
|
|
499
|
+
function Pt(t) {
|
|
515
500
|
return {
|
|
516
501
|
...t,
|
|
517
502
|
opponent: vt(t)
|
|
518
503
|
};
|
|
519
504
|
}
|
|
520
|
-
function
|
|
505
|
+
function Ct(t) {
|
|
521
506
|
return {
|
|
522
507
|
...t,
|
|
523
508
|
resultType: Nt(t)
|
|
524
509
|
};
|
|
525
510
|
}
|
|
526
|
-
function
|
|
511
|
+
function Dt(t) {
|
|
527
512
|
return {
|
|
528
513
|
...t,
|
|
529
514
|
rowClasses: t.optional ? "is-optional" : ""
|
|
@@ -535,22 +520,22 @@ function ht(t = []) {
|
|
|
535
520
|
[t]: e[t]?.toUpperCase()
|
|
536
521
|
});
|
|
537
522
|
}
|
|
538
|
-
function
|
|
523
|
+
function $t(t = []) {
|
|
539
524
|
return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = V(e[r]) : e), e);
|
|
540
525
|
}
|
|
541
|
-
function
|
|
526
|
+
function jt(t = []) {
|
|
542
527
|
return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = De(e[r]) : e), e);
|
|
543
528
|
}
|
|
544
|
-
function
|
|
529
|
+
function Bt(t = []) {
|
|
545
530
|
return (e) => (t.map((r) => e[`${r}Min`] = $e(e[r])), e);
|
|
546
531
|
}
|
|
547
|
-
function
|
|
532
|
+
function Lt(t) {
|
|
548
533
|
return {
|
|
549
534
|
...t,
|
|
550
535
|
periodResults: t.result?.match(/\(.*?\)/)?.[0] ?? ""
|
|
551
536
|
};
|
|
552
537
|
}
|
|
553
|
-
const dt = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(),
|
|
538
|
+
const dt = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), Gt = D([dt, _(u("id")), _(u("gameId"))]), yt = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), X = W(yt("name"));
|
|
554
539
|
function vt(t) {
|
|
555
540
|
return [t.isHomeGame ? null : "@", t.opponent?.shortName].join(" ");
|
|
556
541
|
}
|
|
@@ -562,7 +547,7 @@ function Nt(t) {
|
|
|
562
547
|
const e = t.gameResult.split(":"), r = e[0] > e[1], n = e[0] < e[1];
|
|
563
548
|
return r && t.isOvertime ? "OTW" : r && t.isShootout ? "SOW" : r ? "W" : n && t.isOvertime ? "OTL" : n && t.isShootout ? "SOL" : n ? "L" : "D";
|
|
564
549
|
}
|
|
565
|
-
function
|
|
550
|
+
function Mt(t) {
|
|
566
551
|
return t.map((e) => ({
|
|
567
552
|
phaseId: e.phaseId,
|
|
568
553
|
phaseName: Object.values({
|
|
@@ -577,43 +562,43 @@ function Ft(t) {
|
|
|
577
562
|
function Tt(t) {
|
|
578
563
|
return t.player ? t.player.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}` : `${t.lastName} ${t.firstName}`;
|
|
579
564
|
}
|
|
580
|
-
const
|
|
565
|
+
const xt = o(
|
|
581
566
|
W(y(u("seasonName"))),
|
|
582
567
|
l(pe(["championshipId", "seasonName"]))
|
|
583
|
-
),
|
|
568
|
+
), Ft = (t) => W(_(u("teamName")), t), Wt = o(v(u("sectionId")), g(o(Pe, u("phases")))), Ut = o(u("sectionId"), se), kt = o(u("phaseName"), se), qt = v(u("phaseId")), Ht = o(v(u("name")), l(o(b, me))), Xt = o(u("phaseName"), et), Yt = o(ft, C("_", "-")), Jt = o(g(lt(/-:-/)), j(",")), zt = o(l(j(":")), l(Ce), j(","), C(/^\(|\)$/g, "")), Kt = D([y(u("startingFive"))]), Qt = o(
|
|
584
569
|
ue(", "),
|
|
585
570
|
l((t) => `${t.lastName} ${t.firstName}`),
|
|
586
571
|
g((t) => !t)
|
|
587
|
-
),
|
|
588
|
-
function
|
|
572
|
+
), Vt = o(I(u("eventPeriod")), E, g(P("Period", "type"))), Zt = I(u("row")), wt = (t, e) => R(Ue([fe(e, ["team", "id"]), P("Gól", "type")]), E(t)), er = o(l(b), pe(["headCoach", "secondCoach"])), tr = o(E, l((t) => ({ ...t, eventId: t.eventId ? t.eventId : mt() }))), rr = (t) => v(u("eventTimeSec"), Object.values(t));
|
|
573
|
+
function nr(t, e) {
|
|
589
574
|
const r = (a) => {
|
|
590
575
|
const s = ["first_referee", "second_referee", "first_line_judge", "second_line_judge"].indexOf(a.role);
|
|
591
576
|
return s > -1 ? s : 4;
|
|
592
577
|
}, n = (a) => ({ ...b(a), role: e(`role.${a.role}`) });
|
|
593
578
|
return I(u("type"), l(n, v(r, Object.values(t))));
|
|
594
579
|
}
|
|
595
|
-
const
|
|
580
|
+
const ar = D([
|
|
596
581
|
y(u("points")),
|
|
597
582
|
_(u("gamesPlayed")),
|
|
598
583
|
y(u("w")),
|
|
599
584
|
y(u("gd")),
|
|
600
585
|
y(u("gf"))
|
|
601
|
-
]),
|
|
586
|
+
]), sr = (t, e) => g(P(t, "championshipId"), e), ir = (t, e) => R(P(t, "championshipId"), e), ur = o(g((t) => ["Rájátszás", "Újrajátszandó"].includes(t.phaseName)), S([0, "phases"])), or = o(
|
|
602
587
|
I(St),
|
|
603
588
|
v((t) => ["ld", "rd", "d"].includes(t.position?.toLowerCase()) ? 1 : ["lw", "rw", "c"].includes(t.position?.toLowerCase()) ? 2 : 0),
|
|
604
589
|
v(_t),
|
|
605
590
|
l(o(b, me, ht(["position"])))
|
|
606
591
|
);
|
|
607
|
-
function
|
|
592
|
+
function cr({ goalieStats: t, fieldPlayers: e, playersPenalty: r }) {
|
|
608
593
|
const n = l(S(["player", "playerId"]))(t), s = g((p) => n.includes(p.player.playerId), r), i = nt((p, he) => p.player.playerId === he, r, n), c = Y(e, s), d = Y(t, i);
|
|
609
594
|
return {
|
|
610
595
|
fieldPlayers: X(c),
|
|
611
596
|
goalies: X(d)
|
|
612
597
|
};
|
|
613
598
|
}
|
|
614
|
-
const
|
|
615
|
-
function
|
|
616
|
-
const e = t.city ? le(oe("city"),
|
|
599
|
+
const lr = ne((t, e) => T(R(fe(e, ["team", "id"])), l(b))(t));
|
|
600
|
+
function fr(t) {
|
|
601
|
+
const e = t.city ? le(oe("city"), C(/$/, ",")) : () => ({});
|
|
617
602
|
return o(ue(" "), re, e, je(["type"]))(t);
|
|
618
603
|
}
|
|
619
604
|
function St(t) {
|
|
@@ -625,6 +610,24 @@ function _t(t) {
|
|
|
625
610
|
function Y(t, e) {
|
|
626
611
|
return re(ot(ut, q(S(["player", "playerId"]), t), q(S(["player", "playerId"]), e)));
|
|
627
612
|
}
|
|
613
|
+
function pr(t, e = "body") {
|
|
614
|
+
if (!t)
|
|
615
|
+
return;
|
|
616
|
+
if (typeof e != "string") {
|
|
617
|
+
e?.append(t);
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
document.querySelector(e)?.append(t);
|
|
621
|
+
}
|
|
622
|
+
function mr(t, e = () => ({})) {
|
|
623
|
+
return t.slice().sort((r, n) => {
|
|
624
|
+
const a = e(r), s = e(n);
|
|
625
|
+
if (a === null || s === null)
|
|
626
|
+
return 0;
|
|
627
|
+
const i = a.compareDocumentPosition(s);
|
|
628
|
+
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
629
|
+
});
|
|
630
|
+
}
|
|
628
631
|
class hr extends Error {
|
|
629
632
|
constructor(e, r = {}) {
|
|
630
633
|
const { key: n, cause: a } = r;
|
|
@@ -646,63 +649,63 @@ const dr = {
|
|
|
646
649
|
};
|
|
647
650
|
export {
|
|
648
651
|
pe as $,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
652
|
+
Jt as A,
|
|
653
|
+
zt as B,
|
|
654
|
+
Kt as C,
|
|
655
|
+
Qt as D,
|
|
656
|
+
Vt as E,
|
|
657
|
+
Zt as F,
|
|
658
|
+
wt as G,
|
|
659
|
+
er as H,
|
|
660
|
+
tr as I,
|
|
661
|
+
rr as J,
|
|
662
|
+
nr as K,
|
|
663
|
+
ar as L,
|
|
664
|
+
sr as M,
|
|
665
|
+
ir as N,
|
|
666
|
+
ur as O,
|
|
667
|
+
or as P,
|
|
668
|
+
cr as Q,
|
|
669
|
+
lr as R,
|
|
670
|
+
fr as S,
|
|
671
|
+
pr as T,
|
|
672
|
+
mr as U,
|
|
670
673
|
dr as V,
|
|
671
674
|
hr as W,
|
|
672
675
|
yr as X,
|
|
673
676
|
se as Y,
|
|
674
677
|
et as Z,
|
|
675
678
|
ut as _,
|
|
676
|
-
|
|
679
|
+
Et as a,
|
|
677
680
|
T as a0,
|
|
678
|
-
|
|
679
|
-
|
|
681
|
+
P as a1,
|
|
682
|
+
E as a2,
|
|
680
683
|
v as a3,
|
|
681
684
|
x as a4,
|
|
682
685
|
M as a5,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
686
|
+
Pt as b,
|
|
687
|
+
Ot as c,
|
|
688
|
+
Ct as d,
|
|
689
|
+
$t as e,
|
|
690
|
+
jt as f,
|
|
691
|
+
Rt as g,
|
|
692
|
+
Bt as h,
|
|
693
|
+
Lt as i,
|
|
694
|
+
Gt as j,
|
|
695
|
+
Mt as k,
|
|
693
696
|
X as l,
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
+
xt as m,
|
|
698
|
+
Ft as n,
|
|
699
|
+
Wt as o,
|
|
697
700
|
b as p,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
+
Ut as q,
|
|
702
|
+
At as r,
|
|
703
|
+
Dt as s,
|
|
701
704
|
me as t,
|
|
702
705
|
ht as u,
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
706
|
+
kt as v,
|
|
707
|
+
qt as w,
|
|
708
|
+
Ht as x,
|
|
709
|
+
Xt as y,
|
|
710
|
+
Yt as z
|
|
708
711
|
};
|