@mjsz-vbr-elements/core 2.41.0 → 2.43.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 +1417 -1010
- package/dist/components-DpAc0iFd.js +2969 -0
- package/dist/components.js +6 -21
- package/dist/composables-DkeAlPNN.js +988 -0
- package/dist/composables.js +4 -183
- package/dist/constants.js +11 -19
- package/dist/datetime-Dr5rQMCL.js +1416 -0
- package/dist/index.iife.js +3 -16
- package/dist/index.iife.js.br +0 -0
- package/dist/index.iife.js.gz +0 -0
- package/dist/index.js +27 -196
- package/dist/props.js +63 -66
- package/dist/utils-BzouF97X.js +725 -0
- package/dist/utils.js +4 -166
- package/package.json +10 -10
- package/dist/TimezoneSelector-Cftyj2uC.js +0 -2488
- package/dist/datetime-B_IKGlWy.js +0 -1400
- package/dist/errors-AyJoolyE.js +0 -723
- package/dist/useSort-CoM4Br_9.js +0 -912
|
@@ -0,0 +1,988 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* name: @mjsz-vbr-elements/core
|
|
3
|
+
* version: v2.43.0 - 14/03/2026, 12:04:11
|
|
4
|
+
* (c) 2026
|
|
5
|
+
* description: Data visualization for MJSZ VBR
|
|
6
|
+
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
|
+
*/
|
|
8
|
+
import { D as e, E as t, H as n, O as r, P as i, Q as a, R as o, T as s, V as c, X as l, Z as u, c as d, et as f, it as p, j as m, k as h, m as g, q as _, w as v } from "./datetime-Dr5rQMCL.js";
|
|
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
|
+
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
|
+
//#region ../../node_modules/.pnpm/ramda@0.32.0/node_modules/ramda/es/internal/_xfind.js
|
|
12
|
+
var oe = /* @__PURE__ */ function() {
|
|
13
|
+
function e(e, t) {
|
|
14
|
+
this.xf = t, this.f = e, this.found = !1;
|
|
15
|
+
}
|
|
16
|
+
return e.prototype["@@transducer/init"] = l.init, e.prototype["@@transducer/result"] = function(e) {
|
|
17
|
+
return this.found || (e = this.xf["@@transducer/step"](e, void 0)), this.xf["@@transducer/result"](e);
|
|
18
|
+
}, e.prototype["@@transducer/step"] = function(e, t) {
|
|
19
|
+
return this.f(t) && (this.found = !0, e = u(this.xf["@@transducer/step"](e, t))), e;
|
|
20
|
+
}, e;
|
|
21
|
+
}();
|
|
22
|
+
function se(e) {
|
|
23
|
+
return function(t) {
|
|
24
|
+
return new oe(e, t);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ../../node_modules/.pnpm/ramda@0.32.0/node_modules/ramda/es/find.js
|
|
29
|
+
var ce = /* @__PURE__ */ p(/* @__PURE__ */ a(["find"], se, function(e, t) {
|
|
30
|
+
for (var n = 0, r = t.length; n < r;) {
|
|
31
|
+
if (e(t[n])) return t[n];
|
|
32
|
+
n += 1;
|
|
33
|
+
}
|
|
34
|
+
})), le = /* @__PURE__ */ function() {
|
|
35
|
+
function e(e, t) {
|
|
36
|
+
this.xf = t, this.f = e, this.idx = -1, this.found = !1;
|
|
37
|
+
}
|
|
38
|
+
return e.prototype["@@transducer/init"] = l.init, e.prototype["@@transducer/result"] = function(e) {
|
|
39
|
+
return this.found || (e = this.xf["@@transducer/step"](e, -1)), this.xf["@@transducer/result"](e);
|
|
40
|
+
}, e.prototype["@@transducer/step"] = function(e, t) {
|
|
41
|
+
return this.idx += 1, this.f(t) && (this.found = !0, e = u(this.xf["@@transducer/step"](e, this.idx))), e;
|
|
42
|
+
}, e;
|
|
43
|
+
}();
|
|
44
|
+
function ue(e) {
|
|
45
|
+
return function(t) {
|
|
46
|
+
return new le(e, t);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region ../../node_modules/.pnpm/ramda@0.32.0/node_modules/ramda/es/findIndex.js
|
|
51
|
+
var de = /* @__PURE__ */ p(/* @__PURE__ */ a([], ue, function(e, t) {
|
|
52
|
+
for (var n = 0, r = t.length; n < r;) {
|
|
53
|
+
if (e(t[n])) return n;
|
|
54
|
+
n += 1;
|
|
55
|
+
}
|
|
56
|
+
return -1;
|
|
57
|
+
})), fe = /* @__PURE__ */ f(function e(t, r, i) {
|
|
58
|
+
return h(function(r, i, a) {
|
|
59
|
+
return n(i) && n(a) ? e(t, i, a) : t(r, i, a);
|
|
60
|
+
}, r, i);
|
|
61
|
+
}), pe = /* @__PURE__ */ p(function(e, t) {
|
|
62
|
+
return fe(function(e, t, n) {
|
|
63
|
+
return n;
|
|
64
|
+
}, e, t);
|
|
65
|
+
}), me = /* @__PURE__ */ f(function(e, t, n) {
|
|
66
|
+
return e(i(t, n));
|
|
67
|
+
});
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/composables/useAdditionalText.js
|
|
70
|
+
function he(e, t, n, r) {
|
|
71
|
+
let a = M(""), o = M(!1), s = (e) => {
|
|
72
|
+
let r = c(i(t), e), s = r.length > 0;
|
|
73
|
+
if (o.value = s, !s) return a.value = "";
|
|
74
|
+
let l = r.map((e) => ({
|
|
75
|
+
team: e.team.longName,
|
|
76
|
+
points: Math.abs(i(t, e))
|
|
77
|
+
})).map((e) => n(`additionalText.${t}.content`, e)).join(", ");
|
|
78
|
+
a.value = [
|
|
79
|
+
n(`additionalText.${t}.prependix`),
|
|
80
|
+
l,
|
|
81
|
+
...n(`additionalText.${t}.appendix`) && [n(`additionalText.${t}.appendix`)]
|
|
82
|
+
].join(" ");
|
|
83
|
+
};
|
|
84
|
+
return I(e, s, { immediate: !0 }), I(() => F(r), () => s(F(e))), {
|
|
85
|
+
text: a,
|
|
86
|
+
isVisible: o
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/composables/useI18n.js
|
|
91
|
+
var ge = Symbol("I18nContext"), _e = /\{(\w+)\}/g, ve = /\{|\}/, L = re({
|
|
92
|
+
messages: {},
|
|
93
|
+
locale: "",
|
|
94
|
+
fallbackLocale: ""
|
|
95
|
+
});
|
|
96
|
+
function ye({ messages: e = {}, locale: n = "", fallbackLocale: r = "" }) {
|
|
97
|
+
L.messages = pe(L.messages, e), L.locale = n, L.fallbackLocale = r;
|
|
98
|
+
let i = (e, n = {}) => {
|
|
99
|
+
let r = !m(n), i = o(s, t(".", e));
|
|
100
|
+
return C(() => {
|
|
101
|
+
let e = Se(i);
|
|
102
|
+
return r ? Ce(e, n) : e;
|
|
103
|
+
}).value;
|
|
104
|
+
};
|
|
105
|
+
return ne(ge, {
|
|
106
|
+
locale: C({
|
|
107
|
+
get() {
|
|
108
|
+
return L.locale;
|
|
109
|
+
},
|
|
110
|
+
set(e) {
|
|
111
|
+
L.locale = e;
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
setLocale: (e) => {
|
|
115
|
+
L.locale = e;
|
|
116
|
+
},
|
|
117
|
+
translate: i,
|
|
118
|
+
hasTranslation: (e) => {
|
|
119
|
+
let n = o(s, t(".", e));
|
|
120
|
+
return !!R(L.locale, n, L.messages);
|
|
121
|
+
}
|
|
122
|
+
}), { translate: i };
|
|
123
|
+
}
|
|
124
|
+
function be(e) {
|
|
125
|
+
e && (L.messages = e.messages, L.locale = e.locale, L.fallbackLocale = e.fallbackLocale);
|
|
126
|
+
let t = xe();
|
|
127
|
+
return {
|
|
128
|
+
locale: t.locale,
|
|
129
|
+
t: t.translate,
|
|
130
|
+
setLocale: t.setLocale,
|
|
131
|
+
hasTranslation: t.hasTranslation
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function xe() {
|
|
135
|
+
let e = O(ge, null);
|
|
136
|
+
if (e === null) throw Error("Provider is missing a parent component.");
|
|
137
|
+
return e;
|
|
138
|
+
}
|
|
139
|
+
function Se(e = []) {
|
|
140
|
+
let t = R(L.locale, e, L.messages);
|
|
141
|
+
return !t && L.fallbackLocale && (t = R(L.fallbackLocale, e, L.messages)), t || e.join(".");
|
|
142
|
+
}
|
|
143
|
+
function R(t, n, r) {
|
|
144
|
+
return e([t, ...n], r);
|
|
145
|
+
}
|
|
146
|
+
function Ce(e, t) {
|
|
147
|
+
return e.replace(_e, (e, n) => t[n]);
|
|
148
|
+
}
|
|
149
|
+
var we = T({
|
|
150
|
+
props: {
|
|
151
|
+
tag: {
|
|
152
|
+
type: String,
|
|
153
|
+
default: "div"
|
|
154
|
+
},
|
|
155
|
+
path: {
|
|
156
|
+
type: String,
|
|
157
|
+
defult: ""
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
setup(e, { slots: n }) {
|
|
161
|
+
let r = t(ve, Se(o(s, t(".", e.path)))), i = Object.keys(n).map((e) => {
|
|
162
|
+
let t = r.indexOf(e);
|
|
163
|
+
return t > -1 && (r[t] = n[e]()[0]), r;
|
|
164
|
+
});
|
|
165
|
+
return () => D(e.tag, i);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/composables/useColumns.js
|
|
170
|
+
function Te(e, t = "", n = {}) {
|
|
171
|
+
let i = M(""), { t: a } = be(), s = C(() => {
|
|
172
|
+
if (F(t)) try {
|
|
173
|
+
return r(Ee(F(e), F(t)), F(e));
|
|
174
|
+
} catch (e) {
|
|
175
|
+
i.value = e;
|
|
176
|
+
}
|
|
177
|
+
return F(e);
|
|
178
|
+
}), c = (e) => ({
|
|
179
|
+
...e,
|
|
180
|
+
...e.label && { label: a(e.label ?? "", F(n)) },
|
|
181
|
+
...e.tooltip && { tooltip: a(e.tooltip ?? "") }
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
columns: C(() => o(c, s.value)),
|
|
185
|
+
error: i
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function Ee(e, n = "") {
|
|
189
|
+
let r = o(s, t(",", n)), i = _(e);
|
|
190
|
+
if (r[0] === "") return [];
|
|
191
|
+
let a = r.findIndex((e) => !i.includes(e));
|
|
192
|
+
if (a > -1) throw r[a];
|
|
193
|
+
return r;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/composables/useErrors.js
|
|
197
|
+
var De = Symbol("ErrorProviderContext");
|
|
198
|
+
function Oe() {
|
|
199
|
+
let e = M(""), t = M({}), n = (n) => {
|
|
200
|
+
console.error({ error: n }), e.value = n.message || n.error.message, t.value = {
|
|
201
|
+
message: n.message,
|
|
202
|
+
key: n.key || v(n.message),
|
|
203
|
+
cause: n.cause
|
|
204
|
+
};
|
|
205
|
+
}, r = () => {
|
|
206
|
+
e.value = "", t.value = {};
|
|
207
|
+
};
|
|
208
|
+
return ne(De, {
|
|
209
|
+
onError: n,
|
|
210
|
+
reset: r
|
|
211
|
+
}), window.onerror = (e) => {
|
|
212
|
+
console.error("WINDOW_ONERROR:", e);
|
|
213
|
+
}, ee((e, t, n) => {
|
|
214
|
+
console.error("onErrorCaptured:", e, t, n);
|
|
215
|
+
}), {
|
|
216
|
+
hasError: C(() => e.value.length > 0),
|
|
217
|
+
message: e,
|
|
218
|
+
error: t,
|
|
219
|
+
reset: r,
|
|
220
|
+
onError: n
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function ke() {
|
|
224
|
+
let e = Ae();
|
|
225
|
+
return {
|
|
226
|
+
onError: e.onError,
|
|
227
|
+
reset: e.reset
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function Ae() {
|
|
231
|
+
let e = O(De, null);
|
|
232
|
+
if (e === null) throw Error("Provider is missing a parent component.");
|
|
233
|
+
return e;
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/composables/useFetchVBRApi.js
|
|
237
|
+
async function je(e, t, n) {
|
|
238
|
+
let r = `${S}/vbr${F(e)}${m(n) ? "" : `?${Me(n)}`}`;
|
|
239
|
+
return new Promise((e, n) => {
|
|
240
|
+
fetch(r, {
|
|
241
|
+
method: "GET",
|
|
242
|
+
cache: "no-cache",
|
|
243
|
+
headers: {
|
|
244
|
+
"Content-Type": "application/json",
|
|
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
|
+
});
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function Me(e) {
|
|
257
|
+
return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
|
|
258
|
+
}
|
|
259
|
+
function Ne(e) {
|
|
260
|
+
return e || (window.__MJSZ_VBR_WIDGET__?.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.30_typescript@5.7.3_/node_modules/@vueuse/shared/dist/index.js
|
|
264
|
+
function z(e, t) {
|
|
265
|
+
return E() ? (te(e, t), !0) : !1;
|
|
266
|
+
}
|
|
267
|
+
var B = typeof window < "u" && typeof document < "u", V = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, Pe = Object.prototype.toString, Fe = (e) => Pe.call(e) === "[object Object]", H = () => {}, Ie = /* @__PURE__ */ Le();
|
|
268
|
+
function Le() {
|
|
269
|
+
var e, t;
|
|
270
|
+
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
|
+
}
|
|
272
|
+
function U(...e) {
|
|
273
|
+
if (e.length !== 1) return ae(...e);
|
|
274
|
+
let t = e[0];
|
|
275
|
+
return typeof t == "function" ? j(w(() => ({
|
|
276
|
+
get: t,
|
|
277
|
+
set: H
|
|
278
|
+
}))) : M(t);
|
|
279
|
+
}
|
|
280
|
+
function Re(e, t) {
|
|
281
|
+
function n(...n) {
|
|
282
|
+
return new Promise((r, i) => {
|
|
283
|
+
Promise.resolve(e(() => t.apply(this, n), {
|
|
284
|
+
fn: t,
|
|
285
|
+
thisArg: this,
|
|
286
|
+
args: n
|
|
287
|
+
})).then(r).catch(i);
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return n;
|
|
291
|
+
}
|
|
292
|
+
var ze = (e) => e();
|
|
293
|
+
function Be(e = ze, t = {}) {
|
|
294
|
+
let { initialState: n = "active" } = t, r = U(n === "active");
|
|
295
|
+
function i() {
|
|
296
|
+
r.value = !1;
|
|
297
|
+
}
|
|
298
|
+
function a() {
|
|
299
|
+
r.value = !0;
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
isActive: j(r),
|
|
303
|
+
pause: i,
|
|
304
|
+
resume: a,
|
|
305
|
+
eventFilter: (...t) => {
|
|
306
|
+
r.value && e(...t);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function W(e, t = !1, n = "Timeout") {
|
|
311
|
+
return new Promise((r, i) => {
|
|
312
|
+
t ? setTimeout(() => i(n), e) : setTimeout(r, e);
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function G(e) {
|
|
316
|
+
return Array.isArray(e) ? e : [e];
|
|
317
|
+
}
|
|
318
|
+
function Ve(e, t, n = {}) {
|
|
319
|
+
let { eventFilter: r = ze, ...i } = n;
|
|
320
|
+
return I(e, Re(r, t), i);
|
|
321
|
+
}
|
|
322
|
+
function He(e, t, n = {}) {
|
|
323
|
+
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = Be(r, { initialState: i });
|
|
324
|
+
return {
|
|
325
|
+
stop: Ve(e, t, {
|
|
326
|
+
...a,
|
|
327
|
+
eventFilter: o
|
|
328
|
+
}),
|
|
329
|
+
pause: s,
|
|
330
|
+
resume: c,
|
|
331
|
+
isActive: l
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function K(e, t = !1) {
|
|
335
|
+
function n(n, { flush: r = "sync", deep: i = !1, timeout: a, throwOnTimeout: o } = {}) {
|
|
336
|
+
let s = null, c = [new Promise((a) => {
|
|
337
|
+
s = I(e, (e) => {
|
|
338
|
+
n(e) !== t && (s ? s() : A(() => s?.()), a(e));
|
|
339
|
+
}, {
|
|
340
|
+
flush: r,
|
|
341
|
+
deep: i,
|
|
342
|
+
immediate: !0
|
|
343
|
+
});
|
|
344
|
+
})];
|
|
345
|
+
return a != null && c.push(W(a, o).then(() => P(e)).finally(() => s?.())), Promise.race(c);
|
|
346
|
+
}
|
|
347
|
+
function r(r, i) {
|
|
348
|
+
if (!k(r)) return n((e) => e === r, i);
|
|
349
|
+
let { flush: a = "sync", deep: o = !1, timeout: s, throwOnTimeout: c } = i ?? {}, l = null, u = [new Promise((n) => {
|
|
350
|
+
l = I([e, r], ([e, r]) => {
|
|
351
|
+
t !== (e === r) && (l ? l() : A(() => l?.()), n(e));
|
|
352
|
+
}, {
|
|
353
|
+
flush: a,
|
|
354
|
+
deep: o,
|
|
355
|
+
immediate: !0
|
|
356
|
+
});
|
|
357
|
+
})];
|
|
358
|
+
return s != null && u.push(W(s, c).then(() => P(e)).finally(() => (l?.(), P(e)))), Promise.race(u);
|
|
359
|
+
}
|
|
360
|
+
function i(e) {
|
|
361
|
+
return n((e) => !!e, e);
|
|
362
|
+
}
|
|
363
|
+
function a(e) {
|
|
364
|
+
return r(null, e);
|
|
365
|
+
}
|
|
366
|
+
function o(e) {
|
|
367
|
+
return r(void 0, e);
|
|
368
|
+
}
|
|
369
|
+
function s(e) {
|
|
370
|
+
return n(Number.isNaN, e);
|
|
371
|
+
}
|
|
372
|
+
function c(e, t) {
|
|
373
|
+
return n((t) => {
|
|
374
|
+
let n = Array.from(t);
|
|
375
|
+
return n.includes(e) || n.includes(P(e));
|
|
376
|
+
}, t);
|
|
377
|
+
}
|
|
378
|
+
function l(e) {
|
|
379
|
+
return u(1, e);
|
|
380
|
+
}
|
|
381
|
+
function u(e = 1, t) {
|
|
382
|
+
let r = -1;
|
|
383
|
+
return n(() => (r += 1, r >= e), t);
|
|
384
|
+
}
|
|
385
|
+
return Array.isArray(P(e)) ? {
|
|
386
|
+
toMatch: n,
|
|
387
|
+
toContains: c,
|
|
388
|
+
changed: l,
|
|
389
|
+
changedTimes: u,
|
|
390
|
+
get not() {
|
|
391
|
+
return K(e, !t);
|
|
392
|
+
}
|
|
393
|
+
} : {
|
|
394
|
+
toMatch: n,
|
|
395
|
+
toBe: r,
|
|
396
|
+
toBeTruthy: i,
|
|
397
|
+
toBeNull: a,
|
|
398
|
+
toBeNaN: s,
|
|
399
|
+
toBeUndefined: o,
|
|
400
|
+
changed: l,
|
|
401
|
+
changedTimes: u,
|
|
402
|
+
get not() {
|
|
403
|
+
return K(e, !t);
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
function Ue(e) {
|
|
408
|
+
return K(e);
|
|
409
|
+
}
|
|
410
|
+
function We(e, t = 1e3, n = {}) {
|
|
411
|
+
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = null, o = N(!1);
|
|
412
|
+
function s() {
|
|
413
|
+
a &&= (clearInterval(a), null);
|
|
414
|
+
}
|
|
415
|
+
function c() {
|
|
416
|
+
o.value = !1, s();
|
|
417
|
+
}
|
|
418
|
+
function l() {
|
|
419
|
+
let n = P(t);
|
|
420
|
+
n <= 0 || (o.value = !0, i && e(), s(), o.value && (a = setInterval(e, n)));
|
|
421
|
+
}
|
|
422
|
+
return r && B && l(), (k(t) || typeof t == "function") && z(I(t, () => {
|
|
423
|
+
o.value && B && l();
|
|
424
|
+
})), z(c), {
|
|
425
|
+
isActive: ie(o),
|
|
426
|
+
pause: c,
|
|
427
|
+
resume: l
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
function Ge(e, t, n = {}) {
|
|
431
|
+
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = N(!1), o;
|
|
432
|
+
function s() {
|
|
433
|
+
o &&= (clearTimeout(o), void 0);
|
|
434
|
+
}
|
|
435
|
+
function c() {
|
|
436
|
+
a.value = !1, s();
|
|
437
|
+
}
|
|
438
|
+
function l(...n) {
|
|
439
|
+
i && e(), s(), a.value = !0, o = setTimeout(() => {
|
|
440
|
+
a.value = !1, o = void 0, e(...n);
|
|
441
|
+
}, P(t));
|
|
442
|
+
}
|
|
443
|
+
return r && (a.value = !0, B && l()), z(c), {
|
|
444
|
+
isPending: ie(a),
|
|
445
|
+
start: l,
|
|
446
|
+
stop: c
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function Ke(e, t, n) {
|
|
450
|
+
return I(e, t, {
|
|
451
|
+
...n,
|
|
452
|
+
immediate: !0
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
function qe(e, t, n) {
|
|
456
|
+
return I(e, t, {
|
|
457
|
+
...n,
|
|
458
|
+
once: !0
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
function Je(e, t, n) {
|
|
462
|
+
let r = I(e, (e, i, a) => {
|
|
463
|
+
e && (n?.once && A(() => r()), t(e, i, a));
|
|
464
|
+
}, {
|
|
465
|
+
...n,
|
|
466
|
+
once: !1
|
|
467
|
+
});
|
|
468
|
+
return r;
|
|
469
|
+
}
|
|
470
|
+
//#endregion
|
|
471
|
+
//#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 Ye = B ? window : void 0, Xe = B ? window.document : void 0;
|
|
473
|
+
B && window.navigator, B && window.location;
|
|
474
|
+
function q(e) {
|
|
475
|
+
let t = P(e);
|
|
476
|
+
return t?.$el ?? t;
|
|
477
|
+
}
|
|
478
|
+
function J(...e) {
|
|
479
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = C(() => {
|
|
480
|
+
let t = G(P(e[0])).filter((e) => e != null);
|
|
481
|
+
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
482
|
+
});
|
|
483
|
+
return Ke(() => [
|
|
484
|
+
n.value?.map((e) => q(e)) ?? [Ye].filter((e) => e != null),
|
|
485
|
+
G(P(n.value ? e[1] : e[0])),
|
|
486
|
+
G(F(n.value ? e[2] : e[1])),
|
|
487
|
+
P(n.value ? e[3] : e[2])
|
|
488
|
+
], ([e, n, r, i], a, o) => {
|
|
489
|
+
if (!e?.length || !n?.length || !r?.length) return;
|
|
490
|
+
let s = Fe(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
491
|
+
o(() => {
|
|
492
|
+
c.forEach((e) => e());
|
|
493
|
+
});
|
|
494
|
+
}, { flush: "post" });
|
|
495
|
+
}
|
|
496
|
+
var Ze = !1;
|
|
497
|
+
function Qe(e, t, n = {}) {
|
|
498
|
+
let { window: r = Ye, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
499
|
+
if (!r) return s ? {
|
|
500
|
+
stop: H,
|
|
501
|
+
cancel: H,
|
|
502
|
+
trigger: H
|
|
503
|
+
} : H;
|
|
504
|
+
if (Ie && !Ze) {
|
|
505
|
+
Ze = !0;
|
|
506
|
+
let e = { passive: !0 };
|
|
507
|
+
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", H, e)), r.document.documentElement.addEventListener("click", H, e);
|
|
508
|
+
}
|
|
509
|
+
let c = !0, l = (e) => P(i).some((t) => {
|
|
510
|
+
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
511
|
+
{
|
|
512
|
+
let n = q(t);
|
|
513
|
+
return n && (e.target === n || e.composedPath().includes(n));
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
function u(e) {
|
|
517
|
+
let t = P(e);
|
|
518
|
+
return t && t.$.subTree.shapeFlag === 16;
|
|
519
|
+
}
|
|
520
|
+
function d(e, t) {
|
|
521
|
+
let n = P(e), r = n.$.subTree && n.$.subTree.children;
|
|
522
|
+
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
523
|
+
}
|
|
524
|
+
let f = (n) => {
|
|
525
|
+
let r = q(e);
|
|
526
|
+
if (n.target != null && !(!(r instanceof Element) && u(e) && d(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
|
|
527
|
+
if ("detail" in n && n.detail === 0 && (c = !l(n)), !c) {
|
|
528
|
+
c = !0;
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
t(n);
|
|
532
|
+
}
|
|
533
|
+
}, p = !1, m = [
|
|
534
|
+
J(r, "click", (e) => {
|
|
535
|
+
p || (p = !0, setTimeout(() => {
|
|
536
|
+
p = !1;
|
|
537
|
+
}, 0), f(e));
|
|
538
|
+
}, {
|
|
539
|
+
passive: !0,
|
|
540
|
+
capture: a
|
|
541
|
+
}),
|
|
542
|
+
J(r, "pointerdown", (t) => {
|
|
543
|
+
let n = q(e);
|
|
544
|
+
c = !l(t) && !!(n && !t.composedPath().includes(n));
|
|
545
|
+
}, { passive: !0 }),
|
|
546
|
+
o && J(r, "blur", (n) => {
|
|
547
|
+
setTimeout(() => {
|
|
548
|
+
let i = q(e);
|
|
549
|
+
r.document.activeElement?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
|
|
550
|
+
}, 0);
|
|
551
|
+
}, { passive: !0 })
|
|
552
|
+
].filter(Boolean), h = () => m.forEach((e) => e());
|
|
553
|
+
return s ? {
|
|
554
|
+
stop: h,
|
|
555
|
+
cancel: () => {
|
|
556
|
+
c = !1;
|
|
557
|
+
},
|
|
558
|
+
trigger: (e) => {
|
|
559
|
+
c = !0, f(e), c = !1;
|
|
560
|
+
}
|
|
561
|
+
} : h;
|
|
562
|
+
}
|
|
563
|
+
function $e(e, t, n) {
|
|
564
|
+
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
|
+
async function h(n = 0, ...r) {
|
|
566
|
+
let i = m += 1;
|
|
567
|
+
s && (u.value = P(t)), p.value = void 0, d.value = !1, f.value = !0, n > 0 && await W(n);
|
|
568
|
+
let c = typeof e == "function" ? e(...r) : e;
|
|
569
|
+
try {
|
|
570
|
+
let e = await c;
|
|
571
|
+
return i === m && (u.value = e, d.value = !0), o(e), e;
|
|
572
|
+
} catch (e) {
|
|
573
|
+
if (i === m && (p.value = e), a(e), l) throw e;
|
|
574
|
+
} finally {
|
|
575
|
+
i === m && (f.value = !1);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
r && h(i);
|
|
579
|
+
let g = {
|
|
580
|
+
state: u,
|
|
581
|
+
isReady: d,
|
|
582
|
+
isLoading: f,
|
|
583
|
+
error: p,
|
|
584
|
+
execute: h,
|
|
585
|
+
executeImmediate: (...e) => h(0, ...e)
|
|
586
|
+
};
|
|
587
|
+
function _() {
|
|
588
|
+
return new Promise((e, t) => {
|
|
589
|
+
Ue(f).toBe(!1).then(() => e(g)).catch(t);
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
return {
|
|
593
|
+
...g,
|
|
594
|
+
then(e, t) {
|
|
595
|
+
return _().then(e, t);
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
function et(e = {}) {
|
|
600
|
+
let { document: t = Xe } = e;
|
|
601
|
+
if (!t) return N("visible");
|
|
602
|
+
let n = N(t.visibilityState);
|
|
603
|
+
return J(t, "visibilitychange", () => {
|
|
604
|
+
n.value = t.visibilityState;
|
|
605
|
+
}, { passive: !0 }), n;
|
|
606
|
+
}
|
|
607
|
+
async function tt(e) {
|
|
608
|
+
return new Promise((t, n) => {
|
|
609
|
+
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
|
+
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
|
+
});
|
|
612
|
+
}
|
|
613
|
+
function nt(e, t = {}) {
|
|
614
|
+
let n = $e(() => tt(P(e)), void 0, {
|
|
615
|
+
resetOnExecute: !0,
|
|
616
|
+
...t
|
|
617
|
+
});
|
|
618
|
+
return I(() => P(e), () => n.execute(t.delay), { deep: !0 }), n;
|
|
619
|
+
}
|
|
620
|
+
var rt = "ping";
|
|
621
|
+
function Y(e) {
|
|
622
|
+
return e === !0 ? {} : e;
|
|
623
|
+
}
|
|
624
|
+
function it(e) {
|
|
625
|
+
if ("interval" in e) {
|
|
626
|
+
let { interval: t = 1e3 } = e;
|
|
627
|
+
return (e) => We(e, t, { immediate: !1 });
|
|
628
|
+
}
|
|
629
|
+
return (e) => We(e, 1e3, { immediate: !1 });
|
|
630
|
+
}
|
|
631
|
+
function at(e, t = {}) {
|
|
632
|
+
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
|
+
if (v.length && f.value && d.value === "OPEN") {
|
|
634
|
+
for (let e of v) f.value.send(e);
|
|
635
|
+
v = [];
|
|
636
|
+
}
|
|
637
|
+
}, S = () => {
|
|
638
|
+
y != null && (clearTimeout(y), y = void 0);
|
|
639
|
+
}, C = () => {
|
|
640
|
+
clearTimeout(b), b = void 0;
|
|
641
|
+
}, w = (e = 1e3, t) => {
|
|
642
|
+
S(), !(!B && !V || !f.value) && (g = !0, C(), m?.(), f.value.close(e, t), f.value = void 0);
|
|
643
|
+
}, T = (e, t = !0) => !f.value || d.value !== "OPEN" ? (t && v.push(e), !1) : (x(), f.value.send(e), !0), E = () => {
|
|
644
|
+
if (g || p.value === void 0) return;
|
|
645
|
+
let e = new WebSocket(p.value, l);
|
|
646
|
+
f.value = e, d.value = "CONNECTING", e.onopen = () => {
|
|
647
|
+
d.value = "OPEN", _ = 0, n?.(e), h?.(), x();
|
|
648
|
+
}, e.onclose = (n) => {
|
|
649
|
+
if (d.value = "CLOSED", C(), m?.(), r?.(e, n), !g && t.autoReconnect && (f.value == null || e === f.value)) {
|
|
650
|
+
let { retries: e = -1, delay: n = 1e3, onFailed: r } = Y(t.autoReconnect);
|
|
651
|
+
if ((typeof e == "function" ? e : () => typeof e == "number" && (e < 0 || _ < e))(_)) {
|
|
652
|
+
_ += 1;
|
|
653
|
+
let e = typeof n == "function" ? n(_) : n;
|
|
654
|
+
y = setTimeout(E, e);
|
|
655
|
+
} else r?.();
|
|
656
|
+
}
|
|
657
|
+
}, e.onerror = (t) => {
|
|
658
|
+
i?.(e, t);
|
|
659
|
+
}, e.onmessage = (n) => {
|
|
660
|
+
if (t.heartbeat) {
|
|
661
|
+
C();
|
|
662
|
+
let { message: e = rt, responseMessage: r = e } = Y(t.heartbeat);
|
|
663
|
+
if (n.data === P(r)) return;
|
|
664
|
+
}
|
|
665
|
+
u.value = n.data, a?.(e, n);
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
if (t.heartbeat) {
|
|
669
|
+
let { message: e = rt, scheduler: n = it(Y(t.heartbeat)), pongTimeout: r = 1e3 } = Y(t.heartbeat), { pause: i, resume: a } = n(() => {
|
|
670
|
+
T(P(e), !1), b ??= setTimeout(() => {
|
|
671
|
+
w(), g = !1;
|
|
672
|
+
}, r);
|
|
673
|
+
});
|
|
674
|
+
m = i, h = a;
|
|
675
|
+
}
|
|
676
|
+
c && (B && J("beforeunload", () => w(), { passive: !0 }), z(w));
|
|
677
|
+
let D = () => {
|
|
678
|
+
!B && !V || (w(), g = !1, _ = 0, E());
|
|
679
|
+
};
|
|
680
|
+
return o && D(), s && I(p, D), {
|
|
681
|
+
data: u,
|
|
682
|
+
status: d,
|
|
683
|
+
close: w,
|
|
684
|
+
send: T,
|
|
685
|
+
open: D,
|
|
686
|
+
ws: f
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/composables/useGameDataSocket.js
|
|
691
|
+
function ot(e, t) {
|
|
692
|
+
let { open: n, close: r } = at(F(e), {
|
|
693
|
+
autoReconnect: { retries: 3 },
|
|
694
|
+
immediate: !1,
|
|
695
|
+
onMessage: (e, n) => {
|
|
696
|
+
let r = n.data, i = JSON.parse(r);
|
|
697
|
+
i.event !== "welcome" && (t.value = i.message);
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
return I(() => F(t).gameStatus, (e) => {
|
|
701
|
+
if (e === 1) return n();
|
|
702
|
+
r();
|
|
703
|
+
}, { immediate: !0 }), { gameData: t };
|
|
704
|
+
}
|
|
705
|
+
//#endregion
|
|
706
|
+
//#region src/composables/useLazyLoadingState.js
|
|
707
|
+
function st(e = [], t = {}) {
|
|
708
|
+
let { delay: n = 0 } = t, r = M(!1), i = C(() => {
|
|
709
|
+
let t = F(e);
|
|
710
|
+
return Array.isArray(t) ? t.map((e) => F(e)).some(Boolean) : t;
|
|
711
|
+
}), { start: a, stop: o } = Ge(() => {
|
|
712
|
+
r.value = !0;
|
|
713
|
+
}, n);
|
|
714
|
+
return I(i, (e) => {
|
|
715
|
+
if (e) return a();
|
|
716
|
+
o(), r.value = !1;
|
|
717
|
+
}, {
|
|
718
|
+
immediate: !0,
|
|
719
|
+
deep: !0
|
|
720
|
+
}), r;
|
|
721
|
+
}
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region src/composables/usePage.js
|
|
724
|
+
function ct(e = {}) {
|
|
725
|
+
let { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, a = M(F(t)), o = (e) => g(e, "day");
|
|
726
|
+
return qe(n, () => {
|
|
727
|
+
if (!i) return;
|
|
728
|
+
let e = de(me(o, "gameDate"))(F(n));
|
|
729
|
+
a.value = e === -1 ? 1 : Math.floor(e / r) + 1;
|
|
730
|
+
}), {
|
|
731
|
+
page: a,
|
|
732
|
+
change: (e) => {
|
|
733
|
+
a.value = e;
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
//#endregion
|
|
738
|
+
//#region src/composables/usePagination.js
|
|
739
|
+
function lt({ currentPage: e, itemsPerPage: t = 20, totalItems: n, rangeLength: r = 5, update: i = H }) {
|
|
740
|
+
let a = C(() => Math.ceil(F(n) / t)), o = C(() => {
|
|
741
|
+
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
|
+
return o + r >= a.value && (o = Math.max(a.value - r, 0)), n.slice(o, o + r);
|
|
743
|
+
}), s = (t) => {
|
|
744
|
+
let n = F(e) + t;
|
|
745
|
+
l(n) && i(n);
|
|
746
|
+
}, c = (e) => {
|
|
747
|
+
l(e) && i(e);
|
|
748
|
+
};
|
|
749
|
+
function l(e) {
|
|
750
|
+
return e <= a.value && e > 0;
|
|
751
|
+
}
|
|
752
|
+
return {
|
|
753
|
+
page: e,
|
|
754
|
+
range: o,
|
|
755
|
+
pageCount: a,
|
|
756
|
+
goTo: c,
|
|
757
|
+
pageStep: s
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/composables/useScrollToGameDate.js
|
|
762
|
+
function ut(e = {}) {
|
|
763
|
+
let { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, a = (e) => g(e, "day"), o = () => {
|
|
764
|
+
if (!F(i)) return;
|
|
765
|
+
let e = ce(me(a, "gameDate"))(F(t));
|
|
766
|
+
if (!e) return;
|
|
767
|
+
let o = d(e.gameDate, "YYYY-MM-DD"), s = q(n).querySelector(`div[data-gamedate="${o}"]`);
|
|
768
|
+
if (!s) return;
|
|
769
|
+
let c = getComputedStyle(s).getPropertyValue("--mvw-sticky-top-offset") || 0, l = (s.getBoundingClientRect()?.top ?? 0) - F(r) - Number.parseFloat(c);
|
|
770
|
+
window.scrollTo(0, l);
|
|
771
|
+
};
|
|
772
|
+
He(() => ({
|
|
773
|
+
items: F(t),
|
|
774
|
+
element: F(n)
|
|
775
|
+
}), async ({ items: e, element: t }) => {
|
|
776
|
+
e.length === 0 || !t || (await A(), o());
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
//#endregion
|
|
780
|
+
//#region src/composables/useServices.js
|
|
781
|
+
function dt({ options: e = {}, transform: t = (e) => e, onError: n = H, onSuccess: r = H }) {
|
|
782
|
+
let { path: i, apiKey: a, params: o, resetOnExecute: s = !1, immediate: c = !1 } = e, { state: l, error: u, isLoading: d, execute: f } = $e(() => je(i, a, F(o)).then((e) => t(e)), [], {
|
|
783
|
+
immediate: c,
|
|
784
|
+
resetOnExecute: s,
|
|
785
|
+
onError: n,
|
|
786
|
+
onSuccess: r
|
|
787
|
+
});
|
|
788
|
+
return {
|
|
789
|
+
state: l,
|
|
790
|
+
error: u,
|
|
791
|
+
isLoading: d,
|
|
792
|
+
execute: f
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region ../../node_modules/.pnpm/@xstate+fsm@2.1.0/node_modules/@xstate/fsm/es/index.js
|
|
797
|
+
function X(e, t) {
|
|
798
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
799
|
+
if (!n) return e;
|
|
800
|
+
var r, i, a = n.call(e), o = [];
|
|
801
|
+
try {
|
|
802
|
+
for (; (t === void 0 || t-- > 0) && !(r = a.next()).done;) o.push(r.value);
|
|
803
|
+
} catch (e) {
|
|
804
|
+
i = { error: e };
|
|
805
|
+
} finally {
|
|
806
|
+
try {
|
|
807
|
+
r && !r.done && (n = a.return) && n.call(a);
|
|
808
|
+
} finally {
|
|
809
|
+
if (i) throw i.error;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return o;
|
|
813
|
+
}
|
|
814
|
+
var ft;
|
|
815
|
+
(function(e) {
|
|
816
|
+
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
817
|
+
})(ft ||= {});
|
|
818
|
+
var pt = { type: "xstate.init" };
|
|
819
|
+
function Z(e) {
|
|
820
|
+
return e === void 0 ? [] : [].concat(e);
|
|
821
|
+
}
|
|
822
|
+
function mt(e, t) {
|
|
823
|
+
return typeof (e = typeof e == "string" && t && t[e] ? t[e] : e) == "string" ? { type: e } : typeof e == "function" ? {
|
|
824
|
+
type: e.name,
|
|
825
|
+
exec: e
|
|
826
|
+
} : e;
|
|
827
|
+
}
|
|
828
|
+
function Q(e) {
|
|
829
|
+
return function(t) {
|
|
830
|
+
return e === t;
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
function ht(e) {
|
|
834
|
+
return typeof e == "string" ? { type: e } : e;
|
|
835
|
+
}
|
|
836
|
+
function $(e, t) {
|
|
837
|
+
return {
|
|
838
|
+
value: e,
|
|
839
|
+
context: t,
|
|
840
|
+
actions: [],
|
|
841
|
+
changed: !1,
|
|
842
|
+
matches: Q(e)
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
function gt(e, t, n) {
|
|
846
|
+
var r = t, i = !1;
|
|
847
|
+
return [
|
|
848
|
+
e.filter((function(e) {
|
|
849
|
+
if (e.type === "xstate.assign") {
|
|
850
|
+
i = !0;
|
|
851
|
+
var t = Object.assign({}, r);
|
|
852
|
+
return typeof e.assignment == "function" ? t = e.assignment(r, n) : Object.keys(e.assignment).forEach((function(i) {
|
|
853
|
+
t[i] = typeof e.assignment[i] == "function" ? e.assignment[i](r, n) : e.assignment[i];
|
|
854
|
+
})), r = t, !1;
|
|
855
|
+
}
|
|
856
|
+
return !0;
|
|
857
|
+
})),
|
|
858
|
+
r,
|
|
859
|
+
i
|
|
860
|
+
];
|
|
861
|
+
}
|
|
862
|
+
function _t(e, t) {
|
|
863
|
+
t === void 0 && (t = {});
|
|
864
|
+
var n = X(gt(Z(e.states[e.initial].entry).map((function(e) {
|
|
865
|
+
return mt(e, t.actions);
|
|
866
|
+
})), e.context, pt), 2), r = n[0], i = n[1], a = {
|
|
867
|
+
config: e,
|
|
868
|
+
_options: t,
|
|
869
|
+
initialState: {
|
|
870
|
+
value: e.initial,
|
|
871
|
+
actions: r,
|
|
872
|
+
context: i,
|
|
873
|
+
matches: Q(e.initial)
|
|
874
|
+
},
|
|
875
|
+
transition: function(t, n) {
|
|
876
|
+
var r, i, o = typeof t == "string" ? {
|
|
877
|
+
value: t,
|
|
878
|
+
context: e.context
|
|
879
|
+
} : t, s = o.value, c = o.context, l = ht(n), u = e.states[s];
|
|
880
|
+
if (u.on) {
|
|
881
|
+
var d = Z(u.on[l.type]);
|
|
882
|
+
"*" in u.on && d.push.apply(d, function(e, t, n) {
|
|
883
|
+
if (n || arguments.length === 2) for (var r, i = 0, a = t.length; i < a; i++) !r && i in t || (r ||= Array.prototype.slice.call(t, 0, i), r[i] = t[i]);
|
|
884
|
+
return e.concat(r || Array.prototype.slice.call(t));
|
|
885
|
+
}([], X(Z(u.on["*"])), !1));
|
|
886
|
+
try {
|
|
887
|
+
for (var f = function(e) {
|
|
888
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
889
|
+
if (n) return n.call(e);
|
|
890
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
891
|
+
return e && r >= e.length && (e = void 0), {
|
|
892
|
+
value: e && e[r++],
|
|
893
|
+
done: !e
|
|
894
|
+
};
|
|
895
|
+
} };
|
|
896
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
897
|
+
}(d), p = f.next(); !p.done; p = f.next()) {
|
|
898
|
+
var m = p.value;
|
|
899
|
+
if (m === void 0) return $(s, c);
|
|
900
|
+
var h = typeof m == "string" ? { target: m } : m, g = h.target, _ = h.actions, v = _ === void 0 ? [] : _, y = h.cond, b = y === void 0 ? function() {
|
|
901
|
+
return !0;
|
|
902
|
+
} : y, x = g === void 0, S = g ?? s, C = e.states[S];
|
|
903
|
+
if (b(c, l)) {
|
|
904
|
+
var w = X(gt((x ? Z(v) : [].concat(u.exit, v, C.entry).filter((function(e) {
|
|
905
|
+
return e;
|
|
906
|
+
}))).map((function(e) {
|
|
907
|
+
return mt(e, a._options.actions);
|
|
908
|
+
})), c, l), 3), T = w[0], E = w[1], D = w[2], O = g ?? s;
|
|
909
|
+
return {
|
|
910
|
+
value: O,
|
|
911
|
+
context: E,
|
|
912
|
+
actions: T,
|
|
913
|
+
changed: g !== s || T.length > 0 || D,
|
|
914
|
+
matches: Q(O)
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
} catch (e) {
|
|
919
|
+
r = { error: e };
|
|
920
|
+
} finally {
|
|
921
|
+
try {
|
|
922
|
+
p && !p.done && (i = f.return) && i.call(f);
|
|
923
|
+
} finally {
|
|
924
|
+
if (r) throw r.error;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
return $(s, c);
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
return a;
|
|
932
|
+
}
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region src/composables/useSort.js
|
|
935
|
+
var vt = _t({
|
|
936
|
+
id: "sort",
|
|
937
|
+
initial: x,
|
|
938
|
+
states: {
|
|
939
|
+
[x]: { on: {
|
|
940
|
+
DIRECTION1: b,
|
|
941
|
+
DIRECTION2: y
|
|
942
|
+
} },
|
|
943
|
+
[b]: { on: {
|
|
944
|
+
DIRECTION1: y,
|
|
945
|
+
DIRECTION2: x
|
|
946
|
+
} },
|
|
947
|
+
[y]: { on: {
|
|
948
|
+
DIRECTION1: x,
|
|
949
|
+
DIRECTION2: b
|
|
950
|
+
} }
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
function yt(e, t) {
|
|
954
|
+
let n = t === "ascend" ? "DIRECTION2" : "DIRECTION1";
|
|
955
|
+
return vt.transition(e, n).value;
|
|
956
|
+
}
|
|
957
|
+
function bt(e = {}) {
|
|
958
|
+
let { sortTarget: t = null, orders: n = [] } = e, r = re({
|
|
959
|
+
sortTarget: t,
|
|
960
|
+
orders: n
|
|
961
|
+
});
|
|
962
|
+
return {
|
|
963
|
+
sort: r,
|
|
964
|
+
change: ({ target: e, orders: t }) => {
|
|
965
|
+
if (r.sortTarget !== e) {
|
|
966
|
+
r.sortTarget = e, r.orders = t;
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
let n = t.map((e, t) => ({
|
|
970
|
+
...e,
|
|
971
|
+
direction: yt(r.orders[t].direction, e.direction)
|
|
972
|
+
}));
|
|
973
|
+
r.sortTarget = e, r.orders = n;
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
//#endregion
|
|
978
|
+
//#region src/composables/useVisibilityChange.js
|
|
979
|
+
function xt(e = !1, t = H, n = H) {
|
|
980
|
+
I(et(), (r) => {
|
|
981
|
+
if (F(e)) {
|
|
982
|
+
if (r === "visible") return t();
|
|
983
|
+
n();
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
//#endregion
|
|
988
|
+
export { pe as S, Ee as _, lt as a, be as b, ot as c, nt as d, Je as f, Te as g, Oe as h, ut as i, Qe as l, ke as m, bt as n, ct as o, je as p, dt as r, st as s, xt as t, q as u, ye as v, he as x, we as y };
|