@mjsz-vbr-elements/core 2.43.2 → 2.45.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/columns.js +1 -1
- package/dist/{components-DpAc0iFd.js → components-CLXsGHd2.js} +337 -310
- package/dist/components.js +5 -5
- package/dist/{composables-DkeAlPNN.js → composables-Bky0pXlN.js} +138 -145
- package/dist/composables.js +3 -3
- package/dist/constants.js +1 -1
- package/dist/{datetime-Dr5rQMCL.js → datetime-4YcVSk2g.js} +88 -83
- package/dist/index.iife.js +3 -3
- package/dist/index.iife.js.br +0 -0
- package/dist/index.iife.js.gz +0 -0
- package/dist/index.js +10 -10
- package/dist/props.js +1 -1
- package/dist/{utils-BzouF97X.js → utils-CPlcst7J.js} +231 -211
- package/dist/utils.js +4 -4
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
3
|
+
* version: v2.45.0 - 03/05/2026, 10:31:30
|
|
4
4
|
* (c) 2026
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { $ as e, A as t, D as n, E as r, F as i, H as a, J as o, M as s, O as c, Q as l, T as u, U as d, Z as f, at as p, h as m, k as h, l as g, tt as _, z as v } from "./datetime-4YcVSk2g.js";
|
|
9
9
|
import { SORT_STATE_ASCEND as y, SORT_STATE_DESCEND as b, SORT_STATE_ORIGINAL as x, VBR_API_BASE_URL as S } from "./constants.js";
|
|
10
10
|
import { computed as C, customRef as w, defineComponent as T, getCurrentScope as E, h as D, inject as O, isRef as k, nextTick as A, onErrorCaptured as ee, onScopeDispose as te, provide as ne, reactive as re, readonly as j, ref as M, shallowReadonly as ie, shallowRef as N, toRef as ae, toValue as P, unref as F, watch as I } from "vue";
|
|
11
11
|
//#region ../../node_modules/.pnpm/ramda@0.32.0/node_modules/ramda/es/internal/_xfind.js
|
|
@@ -13,10 +13,10 @@ var oe = /* @__PURE__ */ function() {
|
|
|
13
13
|
function e(e, t) {
|
|
14
14
|
this.xf = t, this.f = e, this.found = !1;
|
|
15
15
|
}
|
|
16
|
-
return e.prototype["@@transducer/init"] =
|
|
16
|
+
return e.prototype["@@transducer/init"] = f.init, e.prototype["@@transducer/result"] = function(e) {
|
|
17
17
|
return this.found || (e = this.xf["@@transducer/step"](e, void 0)), this.xf["@@transducer/result"](e);
|
|
18
18
|
}, e.prototype["@@transducer/step"] = function(e, t) {
|
|
19
|
-
return this.f(t) && (this.found = !0, e =
|
|
19
|
+
return this.f(t) && (this.found = !0, e = l(this.xf["@@transducer/step"](e, t))), e;
|
|
20
20
|
}, e;
|
|
21
21
|
}();
|
|
22
22
|
function se(e) {
|
|
@@ -26,7 +26,7 @@ function se(e) {
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region ../../node_modules/.pnpm/ramda@0.32.0/node_modules/ramda/es/find.js
|
|
29
|
-
var ce = /* @__PURE__ */ p(/* @__PURE__ */
|
|
29
|
+
var ce = /* @__PURE__ */ p(/* @__PURE__ */ e(["find"], se, function(e, t) {
|
|
30
30
|
for (var n = 0, r = t.length; n < r;) {
|
|
31
31
|
if (e(t[n])) return t[n];
|
|
32
32
|
n += 1;
|
|
@@ -35,10 +35,10 @@ var ce = /* @__PURE__ */ p(/* @__PURE__ */ a(["find"], se, function(e, t) {
|
|
|
35
35
|
function e(e, t) {
|
|
36
36
|
this.xf = t, this.f = e, this.idx = -1, this.found = !1;
|
|
37
37
|
}
|
|
38
|
-
return e.prototype["@@transducer/init"] =
|
|
38
|
+
return e.prototype["@@transducer/init"] = f.init, e.prototype["@@transducer/result"] = function(e) {
|
|
39
39
|
return this.found || (e = this.xf["@@transducer/step"](e, -1)), this.xf["@@transducer/result"](e);
|
|
40
40
|
}, e.prototype["@@transducer/step"] = function(e, t) {
|
|
41
|
-
return this.idx += 1, this.f(t) && (this.found = !0, e =
|
|
41
|
+
return this.idx += 1, this.f(t) && (this.found = !0, e = l(this.xf["@@transducer/step"](e, this.idx))), e;
|
|
42
42
|
}, e;
|
|
43
43
|
}();
|
|
44
44
|
function ue(e) {
|
|
@@ -48,42 +48,42 @@ function ue(e) {
|
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region ../../node_modules/.pnpm/ramda@0.32.0/node_modules/ramda/es/findIndex.js
|
|
51
|
-
var de = /* @__PURE__ */ p(/* @__PURE__ */
|
|
51
|
+
var de = /* @__PURE__ */ p(/* @__PURE__ */ e([], ue, function(e, t) {
|
|
52
52
|
for (var n = 0, r = t.length; n < r;) {
|
|
53
53
|
if (e(t[n])) return n;
|
|
54
54
|
n += 1;
|
|
55
55
|
}
|
|
56
56
|
return -1;
|
|
57
|
-
})), fe = /* @__PURE__ */
|
|
58
|
-
return
|
|
59
|
-
return
|
|
57
|
+
})), fe = /* @__PURE__ */ _(function e(n, r, i) {
|
|
58
|
+
return t(function(t, r, i) {
|
|
59
|
+
return d(r) && d(i) ? e(n, r, i) : n(t, r, i);
|
|
60
60
|
}, r, i);
|
|
61
61
|
}), pe = /* @__PURE__ */ p(function(e, t) {
|
|
62
62
|
return fe(function(e, t, n) {
|
|
63
63
|
return n;
|
|
64
64
|
}, e, t);
|
|
65
|
-
}), me = /* @__PURE__ */
|
|
65
|
+
}), me = /* @__PURE__ */ _(function(e, t, n) {
|
|
66
66
|
return e(i(t, n));
|
|
67
67
|
});
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/composables/useAdditionalText.js
|
|
70
70
|
function he(e, t, n, r) {
|
|
71
|
-
let
|
|
72
|
-
let r =
|
|
73
|
-
if (
|
|
71
|
+
let o = M(""), s = M(!1), c = (e) => {
|
|
72
|
+
let r = a(i(t), e), c = r.length > 0;
|
|
73
|
+
if (s.value = c, !c) return o.value = "";
|
|
74
74
|
let l = r.map((e) => ({
|
|
75
75
|
team: e.team.longName,
|
|
76
76
|
points: Math.abs(i(t, e))
|
|
77
77
|
})).map((e) => n(`additionalText.${t}.content`, e)).join(", ");
|
|
78
|
-
|
|
78
|
+
o.value = [
|
|
79
79
|
n(`additionalText.${t}.prependix`),
|
|
80
80
|
l,
|
|
81
81
|
...n(`additionalText.${t}.appendix`) && [n(`additionalText.${t}.appendix`)]
|
|
82
82
|
].join(" ");
|
|
83
83
|
};
|
|
84
|
-
return I(e,
|
|
85
|
-
text:
|
|
86
|
-
isVisible:
|
|
84
|
+
return I(e, c, { immediate: !0 }), I(() => F(r), () => c(F(e))), {
|
|
85
|
+
text: o,
|
|
86
|
+
isVisible: s
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
//#endregion
|
|
@@ -93,13 +93,13 @@ var ge = Symbol("I18nContext"), _e = /\{(\w+)\}/g, ve = /\{|\}/, L = re({
|
|
|
93
93
|
locale: "",
|
|
94
94
|
fallbackLocale: ""
|
|
95
95
|
});
|
|
96
|
-
function ye({ messages: e = {}, locale:
|
|
97
|
-
L.messages = pe(L.messages, e), L.locale =
|
|
98
|
-
let
|
|
99
|
-
let
|
|
96
|
+
function ye({ messages: e = {}, locale: t = "", fallbackLocale: i = "" }) {
|
|
97
|
+
L.messages = pe(L.messages, e), L.locale = t, L.fallbackLocale = i;
|
|
98
|
+
let a = (e, t = {}) => {
|
|
99
|
+
let i = !s(t), a = v(r, n(".", e));
|
|
100
100
|
return C(() => {
|
|
101
|
-
let e = Se(
|
|
102
|
-
return
|
|
101
|
+
let e = Se(a);
|
|
102
|
+
return i ? Ce(e, t) : e;
|
|
103
103
|
}).value;
|
|
104
104
|
};
|
|
105
105
|
return ne(ge, {
|
|
@@ -114,12 +114,12 @@ function ye({ messages: e = {}, locale: n = "", fallbackLocale: r = "" }) {
|
|
|
114
114
|
setLocale: (e) => {
|
|
115
115
|
L.locale = e;
|
|
116
116
|
},
|
|
117
|
-
translate:
|
|
117
|
+
translate: a,
|
|
118
118
|
hasTranslation: (e) => {
|
|
119
|
-
let
|
|
120
|
-
return !!R(L.locale,
|
|
119
|
+
let t = v(r, n(".", e));
|
|
120
|
+
return !!R(L.locale, t, L.messages);
|
|
121
121
|
}
|
|
122
|
-
}), { translate:
|
|
122
|
+
}), { translate: a };
|
|
123
123
|
}
|
|
124
124
|
function be(e) {
|
|
125
125
|
e && (L.messages = e.messages, L.locale = e.locale, L.fallbackLocale = e.fallbackLocale);
|
|
@@ -140,8 +140,8 @@ function Se(e = []) {
|
|
|
140
140
|
let t = R(L.locale, e, L.messages);
|
|
141
141
|
return !t && L.fallbackLocale && (t = R(L.fallbackLocale, e, L.messages)), t || e.join(".");
|
|
142
142
|
}
|
|
143
|
-
function R(t, n
|
|
144
|
-
return
|
|
143
|
+
function R(e, t, n) {
|
|
144
|
+
return c([e, ...t], n);
|
|
145
145
|
}
|
|
146
146
|
function Ce(e, t) {
|
|
147
147
|
return e.replace(_e, (e, n) => t[n]);
|
|
@@ -157,40 +157,40 @@ var we = T({
|
|
|
157
157
|
defult: ""
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
setup(e, { slots:
|
|
161
|
-
let
|
|
162
|
-
let
|
|
163
|
-
return
|
|
160
|
+
setup(e, { slots: t }) {
|
|
161
|
+
let i = n(ve, Se(v(r, n(".", e.path)))), a = Object.keys(t).map((e) => {
|
|
162
|
+
let n = i.indexOf(e);
|
|
163
|
+
return n > -1 && (i[n] = t[e]()[0]), i;
|
|
164
164
|
});
|
|
165
|
-
return () => D(e.tag,
|
|
165
|
+
return () => D(e.tag, a);
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/composables/useColumns.js
|
|
170
170
|
function Te(e, t = "", n = {}) {
|
|
171
|
-
let
|
|
171
|
+
let r = M(""), { t: i } = be(), a = C(() => {
|
|
172
172
|
if (F(t)) try {
|
|
173
|
-
return
|
|
173
|
+
return h(Ee(F(e), F(t)), F(e));
|
|
174
174
|
} catch (e) {
|
|
175
|
-
|
|
175
|
+
r.value = e;
|
|
176
176
|
}
|
|
177
177
|
return F(e);
|
|
178
|
-
}),
|
|
178
|
+
}), o = (e) => ({
|
|
179
179
|
...e,
|
|
180
|
-
...e.label && { label:
|
|
181
|
-
...e.tooltip && { tooltip:
|
|
180
|
+
...e.label && { label: i(e.label ?? "", F(n)) },
|
|
181
|
+
...e.tooltip && { tooltip: i(e.tooltip ?? "") }
|
|
182
182
|
});
|
|
183
183
|
return {
|
|
184
|
-
columns: C(() => o
|
|
185
|
-
error:
|
|
184
|
+
columns: C(() => v(o, a.value)),
|
|
185
|
+
error: r
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function Ee(e,
|
|
189
|
-
let
|
|
190
|
-
if (
|
|
191
|
-
let
|
|
192
|
-
if (
|
|
193
|
-
return
|
|
188
|
+
function Ee(e, t = "") {
|
|
189
|
+
let i = v(r, n(",", t)), a = o(e);
|
|
190
|
+
if (i[0] === "") return [];
|
|
191
|
+
let s = i.findIndex((e) => !a.includes(e));
|
|
192
|
+
if (s > -1) throw i[s];
|
|
193
|
+
return i;
|
|
194
194
|
}
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region src/composables/useErrors.js
|
|
@@ -199,7 +199,7 @@ function Oe() {
|
|
|
199
199
|
let e = M(""), t = M({}), n = (n) => {
|
|
200
200
|
console.error({ error: n }), e.value = n.message || n.error.message, t.value = {
|
|
201
201
|
message: n.message,
|
|
202
|
-
key: n.key ||
|
|
202
|
+
key: n.key || u(n.message),
|
|
203
203
|
cause: n.cause
|
|
204
204
|
};
|
|
205
205
|
}, r = () => {
|
|
@@ -235,28 +235,21 @@ function Ae() {
|
|
|
235
235
|
//#endregion
|
|
236
236
|
//#region src/composables/useFetchVBRApi.js
|
|
237
237
|
async function je(e, t, n) {
|
|
238
|
-
let r = `${S}/vbr${F(e)}${
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
"X-API-KEY": Ne(t)
|
|
246
|
-
}
|
|
247
|
-
}).then((e) => e.json()).then((t) => {
|
|
248
|
-
if (t.error) return n(t);
|
|
249
|
-
if (t.data.message) return n(t.data);
|
|
250
|
-
e(t.data);
|
|
251
|
-
}).catch((e) => {
|
|
252
|
-
n(e);
|
|
253
|
-
});
|
|
238
|
+
let r = `${S}/vbr${F(e)}${s(n) ? "" : `?${new URLSearchParams(n)}`}`, i = await fetch(r, {
|
|
239
|
+
method: "GET",
|
|
240
|
+
cache: "no-cache",
|
|
241
|
+
headers: {
|
|
242
|
+
"Content-Type": "application/json",
|
|
243
|
+
"X-API-KEY": Me(t)
|
|
244
|
+
}
|
|
254
245
|
});
|
|
246
|
+
if (!i.ok) throw Error(`API request failed: ${i.status} ${i.statusText}`);
|
|
247
|
+
let a = await i.json();
|
|
248
|
+
if (a.error) throw a;
|
|
249
|
+
if (a.data.message) throw a.data;
|
|
250
|
+
return a.data;
|
|
255
251
|
}
|
|
256
252
|
function Me(e) {
|
|
257
|
-
return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
|
|
258
|
-
}
|
|
259
|
-
function Ne(e) {
|
|
260
253
|
return e || (window.__MJSZ_VBR_WIDGET__?.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
|
|
261
254
|
}
|
|
262
255
|
//#endregion
|
|
@@ -264,8 +257,8 @@ function Ne(e) {
|
|
|
264
257
|
function z(e, t) {
|
|
265
258
|
return E() ? (te(e, t), !0) : !1;
|
|
266
259
|
}
|
|
267
|
-
var B = typeof window < "u" && typeof document < "u", V = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope,
|
|
268
|
-
function
|
|
260
|
+
var B = typeof window < "u" && typeof document < "u", V = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, Ne = Object.prototype.toString, Pe = (e) => Ne.call(e) === "[object Object]", H = () => {}, Fe = /* @__PURE__ */ Ie();
|
|
261
|
+
function Ie() {
|
|
269
262
|
var e, t;
|
|
270
263
|
return B && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
271
264
|
}
|
|
@@ -277,7 +270,7 @@ function U(...e) {
|
|
|
277
270
|
set: H
|
|
278
271
|
}))) : M(t);
|
|
279
272
|
}
|
|
280
|
-
function
|
|
273
|
+
function Le(e, t) {
|
|
281
274
|
function n(...n) {
|
|
282
275
|
return new Promise((r, i) => {
|
|
283
276
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -289,8 +282,8 @@ function Re(e, t) {
|
|
|
289
282
|
}
|
|
290
283
|
return n;
|
|
291
284
|
}
|
|
292
|
-
var
|
|
293
|
-
function
|
|
285
|
+
var Re = (e) => e();
|
|
286
|
+
function ze(e = Re, t = {}) {
|
|
294
287
|
let { initialState: n = "active" } = t, r = U(n === "active");
|
|
295
288
|
function i() {
|
|
296
289
|
r.value = !1;
|
|
@@ -315,14 +308,14 @@ function W(e, t = !1, n = "Timeout") {
|
|
|
315
308
|
function G(e) {
|
|
316
309
|
return Array.isArray(e) ? e : [e];
|
|
317
310
|
}
|
|
318
|
-
function
|
|
319
|
-
let { eventFilter: r =
|
|
320
|
-
return I(e,
|
|
311
|
+
function Be(e, t, n = {}) {
|
|
312
|
+
let { eventFilter: r = Re, ...i } = n;
|
|
313
|
+
return I(e, Le(r, t), i);
|
|
321
314
|
}
|
|
322
|
-
function
|
|
323
|
-
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } =
|
|
315
|
+
function Ve(e, t, n = {}) {
|
|
316
|
+
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = ze(r, { initialState: i });
|
|
324
317
|
return {
|
|
325
|
-
stop:
|
|
318
|
+
stop: Be(e, t, {
|
|
326
319
|
...a,
|
|
327
320
|
eventFilter: o
|
|
328
321
|
}),
|
|
@@ -404,10 +397,10 @@ function K(e, t = !1) {
|
|
|
404
397
|
}
|
|
405
398
|
};
|
|
406
399
|
}
|
|
407
|
-
function
|
|
400
|
+
function He(e) {
|
|
408
401
|
return K(e);
|
|
409
402
|
}
|
|
410
|
-
function
|
|
403
|
+
function Ue(e, t = 1e3, n = {}) {
|
|
411
404
|
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = null, o = N(!1);
|
|
412
405
|
function s() {
|
|
413
406
|
a &&= (clearInterval(a), null);
|
|
@@ -427,7 +420,7 @@ function We(e, t = 1e3, n = {}) {
|
|
|
427
420
|
resume: l
|
|
428
421
|
};
|
|
429
422
|
}
|
|
430
|
-
function
|
|
423
|
+
function We(e, t, n = {}) {
|
|
431
424
|
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = N(!1), o;
|
|
432
425
|
function s() {
|
|
433
426
|
o &&= (clearTimeout(o), void 0);
|
|
@@ -446,19 +439,19 @@ function Ge(e, t, n = {}) {
|
|
|
446
439
|
stop: c
|
|
447
440
|
};
|
|
448
441
|
}
|
|
449
|
-
function
|
|
442
|
+
function Ge(e, t, n) {
|
|
450
443
|
return I(e, t, {
|
|
451
444
|
...n,
|
|
452
445
|
immediate: !0
|
|
453
446
|
});
|
|
454
447
|
}
|
|
455
|
-
function
|
|
448
|
+
function Ke(e, t, n) {
|
|
456
449
|
return I(e, t, {
|
|
457
450
|
...n,
|
|
458
451
|
once: !0
|
|
459
452
|
});
|
|
460
453
|
}
|
|
461
|
-
function
|
|
454
|
+
function qe(e, t, n) {
|
|
462
455
|
let r = I(e, (e, i, a) => {
|
|
463
456
|
e && (n?.once && A(() => r()), t(e, i, a));
|
|
464
457
|
}, {
|
|
@@ -469,7 +462,7 @@ function Je(e, t, n) {
|
|
|
469
462
|
}
|
|
470
463
|
//#endregion
|
|
471
464
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.30_typescript@5.7.3_/node_modules/@vueuse/core/dist/index.js
|
|
472
|
-
var
|
|
465
|
+
var Je = B ? window : void 0, Ye = B ? window.document : void 0;
|
|
473
466
|
B && window.navigator, B && window.location;
|
|
474
467
|
function q(e) {
|
|
475
468
|
let t = P(e);
|
|
@@ -480,29 +473,29 @@ function J(...e) {
|
|
|
480
473
|
let t = G(P(e[0])).filter((e) => e != null);
|
|
481
474
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
482
475
|
});
|
|
483
|
-
return
|
|
484
|
-
n.value?.map((e) => q(e)) ?? [
|
|
476
|
+
return Ge(() => [
|
|
477
|
+
n.value?.map((e) => q(e)) ?? [Je].filter((e) => e != null),
|
|
485
478
|
G(P(n.value ? e[1] : e[0])),
|
|
486
479
|
G(F(n.value ? e[2] : e[1])),
|
|
487
480
|
P(n.value ? e[3] : e[2])
|
|
488
481
|
], ([e, n, r, i], a, o) => {
|
|
489
482
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
490
|
-
let s =
|
|
483
|
+
let s = Pe(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
491
484
|
o(() => {
|
|
492
485
|
c.forEach((e) => e());
|
|
493
486
|
});
|
|
494
487
|
}, { flush: "post" });
|
|
495
488
|
}
|
|
496
|
-
var
|
|
497
|
-
function
|
|
498
|
-
let { window: r =
|
|
489
|
+
var Xe = !1;
|
|
490
|
+
function Ze(e, t, n = {}) {
|
|
491
|
+
let { window: r = Je, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
499
492
|
if (!r) return s ? {
|
|
500
493
|
stop: H,
|
|
501
494
|
cancel: H,
|
|
502
495
|
trigger: H
|
|
503
496
|
} : H;
|
|
504
|
-
if (
|
|
505
|
-
|
|
497
|
+
if (Fe && !Xe) {
|
|
498
|
+
Xe = !0;
|
|
506
499
|
let e = { passive: !0 };
|
|
507
500
|
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", H, e)), r.document.documentElement.addEventListener("click", H, e);
|
|
508
501
|
}
|
|
@@ -560,7 +553,7 @@ function Qe(e, t, n = {}) {
|
|
|
560
553
|
}
|
|
561
554
|
} : h;
|
|
562
555
|
}
|
|
563
|
-
function
|
|
556
|
+
function Qe(e, t, n) {
|
|
564
557
|
let { immediate: r = !0, delay: i = 0, onError: a = globalThis.reportError ?? H, onSuccess: o = H, resetOnExecute: s = !0, shallow: c = !0, throwError: l } = n ?? {}, u = c ? N(t) : M(t), d = N(!1), f = N(!1), p = N(void 0), m = 0;
|
|
565
558
|
async function h(n = 0, ...r) {
|
|
566
559
|
let i = m += 1;
|
|
@@ -586,7 +579,7 @@ function $e(e, t, n) {
|
|
|
586
579
|
};
|
|
587
580
|
function _() {
|
|
588
581
|
return new Promise((e, t) => {
|
|
589
|
-
|
|
582
|
+
He(f).toBe(!1).then(() => e(g)).catch(t);
|
|
590
583
|
});
|
|
591
584
|
}
|
|
592
585
|
return {
|
|
@@ -596,39 +589,39 @@ function $e(e, t, n) {
|
|
|
596
589
|
}
|
|
597
590
|
};
|
|
598
591
|
}
|
|
599
|
-
function
|
|
600
|
-
let { document: t =
|
|
592
|
+
function $e(e = {}) {
|
|
593
|
+
let { document: t = Ye } = e;
|
|
601
594
|
if (!t) return N("visible");
|
|
602
595
|
let n = N(t.visibilityState);
|
|
603
596
|
return J(t, "visibilitychange", () => {
|
|
604
597
|
n.value = t.visibilityState;
|
|
605
598
|
}, { passive: !0 }), n;
|
|
606
599
|
}
|
|
607
|
-
async function
|
|
600
|
+
async function et(e) {
|
|
608
601
|
return new Promise((t, n) => {
|
|
609
602
|
let r = new Image(), { src: i, srcset: a, sizes: o, class: s, loading: c, crossorigin: l, referrerPolicy: u, width: d, height: f, decoding: p, fetchPriority: m, ismap: h, usemap: g } = e;
|
|
610
603
|
r.src = i, a != null && (r.srcset = a), o != null && (r.sizes = o), s != null && (r.className = s), c != null && (r.loading = c), l != null && (r.crossOrigin = l), u != null && (r.referrerPolicy = u), d != null && (r.width = d), f != null && (r.height = f), p != null && (r.decoding = p), m != null && (r.fetchPriority = m), h != null && (r.isMap = h), g != null && (r.useMap = g), r.onload = () => t(r), r.onerror = n;
|
|
611
604
|
});
|
|
612
605
|
}
|
|
613
|
-
function
|
|
614
|
-
let n =
|
|
606
|
+
function tt(e, t = {}) {
|
|
607
|
+
let n = Qe(() => et(P(e)), void 0, {
|
|
615
608
|
resetOnExecute: !0,
|
|
616
609
|
...t
|
|
617
610
|
});
|
|
618
611
|
return I(() => P(e), () => n.execute(t.delay), { deep: !0 }), n;
|
|
619
612
|
}
|
|
620
|
-
var
|
|
613
|
+
var nt = "ping";
|
|
621
614
|
function Y(e) {
|
|
622
615
|
return e === !0 ? {} : e;
|
|
623
616
|
}
|
|
624
|
-
function
|
|
617
|
+
function rt(e) {
|
|
625
618
|
if ("interval" in e) {
|
|
626
619
|
let { interval: t = 1e3 } = e;
|
|
627
|
-
return (e) =>
|
|
620
|
+
return (e) => Ue(e, t, { immediate: !1 });
|
|
628
621
|
}
|
|
629
|
-
return (e) =>
|
|
622
|
+
return (e) => Ue(e, 1e3, { immediate: !1 });
|
|
630
623
|
}
|
|
631
|
-
function
|
|
624
|
+
function it(e, t = {}) {
|
|
632
625
|
let { onConnected: n, onDisconnected: r, onError: i, onMessage: a, immediate: o = !0, autoConnect: s = !0, autoClose: c = !0, protocols: l = [] } = t, u = M(null), d = N("CLOSED"), f = M(), p = U(e), m, h, g = !1, _ = 0, v = [], y, b, x = () => {
|
|
633
626
|
if (v.length && f.value && d.value === "OPEN") {
|
|
634
627
|
for (let e of v) f.value.send(e);
|
|
@@ -659,14 +652,14 @@ function at(e, t = {}) {
|
|
|
659
652
|
}, e.onmessage = (n) => {
|
|
660
653
|
if (t.heartbeat) {
|
|
661
654
|
C();
|
|
662
|
-
let { message: e =
|
|
655
|
+
let { message: e = nt, responseMessage: r = e } = Y(t.heartbeat);
|
|
663
656
|
if (n.data === P(r)) return;
|
|
664
657
|
}
|
|
665
658
|
u.value = n.data, a?.(e, n);
|
|
666
659
|
};
|
|
667
660
|
};
|
|
668
661
|
if (t.heartbeat) {
|
|
669
|
-
let { message: e =
|
|
662
|
+
let { message: e = nt, scheduler: n = rt(Y(t.heartbeat)), pongTimeout: r = 1e3 } = Y(t.heartbeat), { pause: i, resume: a } = n(() => {
|
|
670
663
|
T(P(e), !1), b ??= setTimeout(() => {
|
|
671
664
|
w(), g = !1;
|
|
672
665
|
}, r);
|
|
@@ -688,8 +681,8 @@ function at(e, t = {}) {
|
|
|
688
681
|
}
|
|
689
682
|
//#endregion
|
|
690
683
|
//#region src/composables/useGameDataSocket.js
|
|
691
|
-
function
|
|
692
|
-
let { open: n, close: r } =
|
|
684
|
+
function at(e, t) {
|
|
685
|
+
let { open: n, close: r } = it(F(e), {
|
|
693
686
|
autoReconnect: { retries: 3 },
|
|
694
687
|
immediate: !1,
|
|
695
688
|
onMessage: (e, n) => {
|
|
@@ -704,11 +697,11 @@ function ot(e, t) {
|
|
|
704
697
|
}
|
|
705
698
|
//#endregion
|
|
706
699
|
//#region src/composables/useLazyLoadingState.js
|
|
707
|
-
function
|
|
700
|
+
function ot(e = [], t = {}) {
|
|
708
701
|
let { delay: n = 0 } = t, r = M(!1), i = C(() => {
|
|
709
702
|
let t = F(e);
|
|
710
703
|
return Array.isArray(t) ? t.map((e) => F(e)).some(Boolean) : t;
|
|
711
|
-
}), { start: a, stop: o } =
|
|
704
|
+
}), { start: a, stop: o } = We(() => {
|
|
712
705
|
r.value = !0;
|
|
713
706
|
}, n);
|
|
714
707
|
return I(i, (e) => {
|
|
@@ -721,9 +714,9 @@ function st(e = [], t = {}) {
|
|
|
721
714
|
}
|
|
722
715
|
//#endregion
|
|
723
716
|
//#region src/composables/usePage.js
|
|
724
|
-
function
|
|
725
|
-
let { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, a = M(F(t)), o = (e) =>
|
|
726
|
-
return
|
|
717
|
+
function st(e = {}) {
|
|
718
|
+
let { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, a = M(F(t)), o = (e) => m(e, "day");
|
|
719
|
+
return Ke(n, () => {
|
|
727
720
|
if (!i) return;
|
|
728
721
|
let e = de(me(o, "gameDate"))(F(n));
|
|
729
722
|
a.value = e === -1 ? 1 : Math.floor(e / r) + 1;
|
|
@@ -736,7 +729,7 @@ function ct(e = {}) {
|
|
|
736
729
|
}
|
|
737
730
|
//#endregion
|
|
738
731
|
//#region src/composables/usePagination.js
|
|
739
|
-
function
|
|
732
|
+
function ct({ currentPage: e, itemsPerPage: t = 20, totalItems: n, rangeLength: r = 5, update: i = H }) {
|
|
740
733
|
let a = C(() => Math.ceil(F(n) / t)), o = C(() => {
|
|
741
734
|
let t = F(e) - 1, n = Array.from({ length: a.value }, (e, t) => t + 1), i = Math.floor(r / 2), o = Math.max(t - i, 0);
|
|
742
735
|
return o + r >= a.value && (o = Math.max(a.value - r, 0)), n.slice(o, o + r);
|
|
@@ -759,17 +752,17 @@ function lt({ currentPage: e, itemsPerPage: t = 20, totalItems: n, rangeLength:
|
|
|
759
752
|
}
|
|
760
753
|
//#endregion
|
|
761
754
|
//#region src/composables/useScrollToGameDate.js
|
|
762
|
-
function
|
|
763
|
-
let { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, a = (e) =>
|
|
755
|
+
function lt(e = {}) {
|
|
756
|
+
let { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, a = (e) => m(e, "day"), o = () => {
|
|
764
757
|
if (!F(i)) return;
|
|
765
758
|
let e = ce(me(a, "gameDate"))(F(t));
|
|
766
759
|
if (!e) return;
|
|
767
|
-
let o =
|
|
760
|
+
let o = g(e.gameDate, "YYYY-MM-DD"), s = q(n).querySelector(`div[data-gamedate="${o}"]`);
|
|
768
761
|
if (!s) return;
|
|
769
762
|
let c = getComputedStyle(s).getPropertyValue("--mvw-sticky-top-offset") || 0, l = (s.getBoundingClientRect()?.top ?? 0) - F(r) - Number.parseFloat(c);
|
|
770
763
|
window.scrollTo(0, l);
|
|
771
764
|
};
|
|
772
|
-
|
|
765
|
+
Ve(() => ({
|
|
773
766
|
items: F(t),
|
|
774
767
|
element: F(n)
|
|
775
768
|
}), async ({ items: e, element: t }) => {
|
|
@@ -778,8 +771,8 @@ function ut(e = {}) {
|
|
|
778
771
|
}
|
|
779
772
|
//#endregion
|
|
780
773
|
//#region src/composables/useServices.js
|
|
781
|
-
function
|
|
782
|
-
let { path: i, apiKey: a, params: o, resetOnExecute: s = !1, immediate: c = !1 } = e, { state: l, error: u, isLoading: d, execute: f } =
|
|
774
|
+
function ut({ options: e = {}, transform: t = (e) => e, onError: n = H, onSuccess: r = H }) {
|
|
775
|
+
let { path: i, apiKey: a, params: o, resetOnExecute: s = !1, immediate: c = !1 } = e, { state: l, error: u, isLoading: d, execute: f } = Qe(() => je(i, a, F(o)).then((e) => t(e)), [], {
|
|
783
776
|
immediate: c,
|
|
784
777
|
resetOnExecute: s,
|
|
785
778
|
onError: n,
|
|
@@ -811,15 +804,15 @@ function X(e, t) {
|
|
|
811
804
|
}
|
|
812
805
|
return o;
|
|
813
806
|
}
|
|
814
|
-
var
|
|
807
|
+
var dt;
|
|
815
808
|
(function(e) {
|
|
816
809
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
817
|
-
})(
|
|
818
|
-
var
|
|
810
|
+
})(dt ||= {});
|
|
811
|
+
var ft = { type: "xstate.init" };
|
|
819
812
|
function Z(e) {
|
|
820
813
|
return e === void 0 ? [] : [].concat(e);
|
|
821
814
|
}
|
|
822
|
-
function
|
|
815
|
+
function pt(e, t) {
|
|
823
816
|
return typeof (e = typeof e == "string" && t && t[e] ? t[e] : e) == "string" ? { type: e } : typeof e == "function" ? {
|
|
824
817
|
type: e.name,
|
|
825
818
|
exec: e
|
|
@@ -830,7 +823,7 @@ function Q(e) {
|
|
|
830
823
|
return e === t;
|
|
831
824
|
};
|
|
832
825
|
}
|
|
833
|
-
function
|
|
826
|
+
function mt(e) {
|
|
834
827
|
return typeof e == "string" ? { type: e } : e;
|
|
835
828
|
}
|
|
836
829
|
function $(e, t) {
|
|
@@ -842,7 +835,7 @@ function $(e, t) {
|
|
|
842
835
|
matches: Q(e)
|
|
843
836
|
};
|
|
844
837
|
}
|
|
845
|
-
function
|
|
838
|
+
function ht(e, t, n) {
|
|
846
839
|
var r = t, i = !1;
|
|
847
840
|
return [
|
|
848
841
|
e.filter((function(e) {
|
|
@@ -859,11 +852,11 @@ function gt(e, t, n) {
|
|
|
859
852
|
i
|
|
860
853
|
];
|
|
861
854
|
}
|
|
862
|
-
function
|
|
855
|
+
function gt(e, t) {
|
|
863
856
|
t === void 0 && (t = {});
|
|
864
|
-
var n = X(
|
|
865
|
-
return
|
|
866
|
-
})), e.context,
|
|
857
|
+
var n = X(ht(Z(e.states[e.initial].entry).map((function(e) {
|
|
858
|
+
return pt(e, t.actions);
|
|
859
|
+
})), e.context, ft), 2), r = n[0], i = n[1], a = {
|
|
867
860
|
config: e,
|
|
868
861
|
_options: t,
|
|
869
862
|
initialState: {
|
|
@@ -876,7 +869,7 @@ function _t(e, t) {
|
|
|
876
869
|
var r, i, o = typeof t == "string" ? {
|
|
877
870
|
value: t,
|
|
878
871
|
context: e.context
|
|
879
|
-
} : t, s = o.value, c = o.context, l =
|
|
872
|
+
} : t, s = o.value, c = o.context, l = mt(n), u = e.states[s];
|
|
880
873
|
if (u.on) {
|
|
881
874
|
var d = Z(u.on[l.type]);
|
|
882
875
|
"*" in u.on && d.push.apply(d, function(e, t, n) {
|
|
@@ -901,10 +894,10 @@ function _t(e, t) {
|
|
|
901
894
|
return !0;
|
|
902
895
|
} : y, x = g === void 0, S = g ?? s, C = e.states[S];
|
|
903
896
|
if (b(c, l)) {
|
|
904
|
-
var w = X(
|
|
897
|
+
var w = X(ht((x ? Z(v) : [].concat(u.exit, v, C.entry).filter((function(e) {
|
|
905
898
|
return e;
|
|
906
899
|
}))).map((function(e) {
|
|
907
|
-
return
|
|
900
|
+
return pt(e, a._options.actions);
|
|
908
901
|
})), c, l), 3), T = w[0], E = w[1], D = w[2], O = g ?? s;
|
|
909
902
|
return {
|
|
910
903
|
value: O,
|
|
@@ -932,7 +925,7 @@ function _t(e, t) {
|
|
|
932
925
|
}
|
|
933
926
|
//#endregion
|
|
934
927
|
//#region src/composables/useSort.js
|
|
935
|
-
var
|
|
928
|
+
var _t = gt({
|
|
936
929
|
id: "sort",
|
|
937
930
|
initial: x,
|
|
938
931
|
states: {
|
|
@@ -950,11 +943,11 @@ var vt = _t({
|
|
|
950
943
|
} }
|
|
951
944
|
}
|
|
952
945
|
});
|
|
953
|
-
function
|
|
946
|
+
function vt(e, t) {
|
|
954
947
|
let n = t === "ascend" ? "DIRECTION2" : "DIRECTION1";
|
|
955
|
-
return
|
|
948
|
+
return _t.transition(e, n).value;
|
|
956
949
|
}
|
|
957
|
-
function
|
|
950
|
+
function yt(e = {}) {
|
|
958
951
|
let { sortTarget: t = null, orders: n = [] } = e, r = re({
|
|
959
952
|
sortTarget: t,
|
|
960
953
|
orders: n
|
|
@@ -968,7 +961,7 @@ function bt(e = {}) {
|
|
|
968
961
|
}
|
|
969
962
|
let n = t.map((e, t) => ({
|
|
970
963
|
...e,
|
|
971
|
-
direction:
|
|
964
|
+
direction: vt(r.orders[t].direction, e.direction)
|
|
972
965
|
}));
|
|
973
966
|
r.sortTarget = e, r.orders = n;
|
|
974
967
|
}
|
|
@@ -976,8 +969,8 @@ function bt(e = {}) {
|
|
|
976
969
|
}
|
|
977
970
|
//#endregion
|
|
978
971
|
//#region src/composables/useVisibilityChange.js
|
|
979
|
-
function
|
|
980
|
-
I(
|
|
972
|
+
function bt(e = !1, t = H, n = H) {
|
|
973
|
+
I($e(), (r) => {
|
|
981
974
|
if (F(e)) {
|
|
982
975
|
if (r === "visible") return t();
|
|
983
976
|
n();
|
|
@@ -985,4 +978,4 @@ function xt(e = !1, t = H, n = H) {
|
|
|
985
978
|
});
|
|
986
979
|
}
|
|
987
980
|
//#endregion
|
|
988
|
-
export { pe as S, Ee as _,
|
|
981
|
+
export { pe as S, Ee as _, ct as a, be as b, at as c, tt as d, qe as f, Te as g, Oe as h, lt as i, Ze as l, ke as m, yt as n, st as o, je as p, ut as r, ot as s, bt as t, q as u, ye as v, he as x, we as y };
|