@mjsz-vbr-elements/core 2.30.2 → 2.31.1
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-qP6OxXMD.js → TimezoneSelector-T8Y8aFc-.js} +4 -4
- package/dist/columns.js +1 -1
- package/dist/components.js +2 -2
- package/dist/composables.js +24 -24
- package/dist/constants.js +1 -1
- package/dist/datetime-bWwGbGlR.js +1395 -0
- package/dist/errors-DHx3LQ6t.js +708 -0
- 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 +149 -105
- package/dist/useSort-D5U_wkle.js +912 -0
- package/dist/utils.js +128 -76
- package/package.json +2 -2
- package/dist/datetime-D600LvsU.js +0 -1357
- package/dist/errors-B6O6sS7H.js +0 -554
- package/dist/useSort-BMv5JZAH.js +0 -943
package/dist/useSort-BMv5JZAH.js
DELETED
|
@@ -1,943 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.30.2 - 24/10/2025, 19:34:53
|
|
4
|
-
* (c) 2025
|
|
5
|
-
* description: Data visualization for MJSZ VBR
|
|
6
|
-
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
|
-
*/
|
|
8
|
-
import { ref as P, watch as S, unref as C, reactive as Ae, defineComponent as We, h as Me, computed as M, provide as Oe, inject as Ie, onErrorCaptured as Be, nextTick as ce, shallowRef as k, shallowReadonly as Se, toRef as $e, readonly as Re, customRef as Ue, isRef as Ce, getCurrentScope as ze, onScopeDispose as Ge, toValue as A } from "vue";
|
|
9
|
-
import { _ as ne, w as Ke, x as He, z as le, A as qe, B as Je, C as Pe, D as Y, E as xe, F as Ve, G as ve, H as q, I as J, J as Qe, K as Xe, u as Ye } from "./datetime-D600LvsU.js";
|
|
10
|
-
import { SORT_STATE_DESCEND as ie, SORT_STATE_ORIGINAL as Z, SORT_STATE_ASCEND as te } from "./constants.js";
|
|
11
|
-
function Ze(e) {
|
|
12
|
-
var t = Object.prototype.toString.call(e);
|
|
13
|
-
return t === "[object Uint8ClampedArray]" || t === "[object Int8Array]" || t === "[object Uint8Array]" || t === "[object Int16Array]" || t === "[object Uint16Array]" || t === "[object Int32Array]" || t === "[object Uint32Array]" || t === "[object Float32Array]" || t === "[object Float64Array]" || t === "[object BigInt64Array]" || t === "[object BigUint64Array]";
|
|
14
|
-
}
|
|
15
|
-
var et = /* @__PURE__ */ ne(function(t) {
|
|
16
|
-
return t != null && typeof t["fantasy-land/empty"] == "function" ? t["fantasy-land/empty"]() : t != null && t.constructor != null && typeof t.constructor["fantasy-land/empty"] == "function" ? t.constructor["fantasy-land/empty"]() : t != null && typeof t.empty == "function" ? t.empty() : t != null && t.constructor != null && typeof t.constructor.empty == "function" ? t.constructor.empty() : t == Set || t instanceof Set ? /* @__PURE__ */ new Set() : t == Map || t instanceof Map ? /* @__PURE__ */ new Map() : Ke(t) ? [] : He(t) ? "" : le(t) ? {} : qe(t) ? /* @__PURE__ */ function() {
|
|
17
|
-
return arguments;
|
|
18
|
-
}() : Ze(t) ? t.constructor.from("") : void 0;
|
|
19
|
-
}), tt = /* @__PURE__ */ ne(function(t) {
|
|
20
|
-
return t != null && Je(t, et(t));
|
|
21
|
-
}), nt = /* @__PURE__ */ Pe(function(t, r, n) {
|
|
22
|
-
var i = {}, o;
|
|
23
|
-
r = r || {}, n = n || {};
|
|
24
|
-
for (o in r)
|
|
25
|
-
Y(o, r) && (i[o] = Y(o, n) ? t(o, r[o], n[o]) : r[o]);
|
|
26
|
-
for (o in n)
|
|
27
|
-
Y(o, n) && !Y(o, i) && (i[o] = n[o]);
|
|
28
|
-
return i;
|
|
29
|
-
}), rt = /* @__PURE__ */ Pe(function e(t, r, n) {
|
|
30
|
-
return nt(function(i, o, u) {
|
|
31
|
-
return le(o) && le(u) ? e(t, o, u) : t(i, o, u);
|
|
32
|
-
}, r, n);
|
|
33
|
-
}), ot = /* @__PURE__ */ xe(function(t, r) {
|
|
34
|
-
return rt(function(n, i, o) {
|
|
35
|
-
return o;
|
|
36
|
-
}, t, r);
|
|
37
|
-
}), it = /* @__PURE__ */ xe(function(t, r) {
|
|
38
|
-
for (var n = {}, i = {}, o = 0, u = t.length; o < u; )
|
|
39
|
-
i[t[o]] = 1, o += 1;
|
|
40
|
-
for (var s in r)
|
|
41
|
-
i.hasOwnProperty(s) || (n[s] = r[s]);
|
|
42
|
-
return n;
|
|
43
|
-
}), G = `
|
|
44
|
-
\v\f\r \u2028\u2029\uFEFF`, at = "", st = typeof String.prototype.trim == "function", re = !st || /* @__PURE__ */ G.trim() || !/* @__PURE__ */ at.trim() ? /* @__PURE__ */ ne(function(t) {
|
|
45
|
-
var r = new RegExp("^[" + G + "][" + G + "]*"), n = new RegExp("[" + G + "][" + G + "]*$");
|
|
46
|
-
return t.replace(r, "").replace(n, "");
|
|
47
|
-
}) : /* @__PURE__ */ ne(function(t) {
|
|
48
|
-
return t.trim();
|
|
49
|
-
});
|
|
50
|
-
function _t(e, t, r, n) {
|
|
51
|
-
const i = P(""), o = P(!1), u = (s) => {
|
|
52
|
-
const a = Ve(ve(t), s), m = a.length > 0;
|
|
53
|
-
if (o.value = m, !m)
|
|
54
|
-
return i.value = "";
|
|
55
|
-
const f = a.map((d) => ({
|
|
56
|
-
team: d.team.longName,
|
|
57
|
-
points: Math.abs(ve(t, d))
|
|
58
|
-
})).map((d) => r(`additionalText.${t}.content`, d)).join(", ");
|
|
59
|
-
i.value = [
|
|
60
|
-
r(`additionalText.${t}.prependix`),
|
|
61
|
-
f,
|
|
62
|
-
...r(`additionalText.${t}.appendix`) && [r(`additionalText.${t}.appendix`)]
|
|
63
|
-
].join(" ");
|
|
64
|
-
};
|
|
65
|
-
return S(e, u, { immediate: !0 }), S(
|
|
66
|
-
() => C(n),
|
|
67
|
-
() => u(C(e))
|
|
68
|
-
), {
|
|
69
|
-
text: i,
|
|
70
|
-
isVisible: o
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
const Ne = Symbol("I18nContext"), O = Ae({
|
|
74
|
-
messages: {},
|
|
75
|
-
locale: "",
|
|
76
|
-
fallbackLocale: ""
|
|
77
|
-
});
|
|
78
|
-
function jt({ messages: e = {}, locale: t = "", fallbackLocale: r = "" }) {
|
|
79
|
-
O.messages = ot(O.messages, e), O.locale = t, O.fallbackLocale = r;
|
|
80
|
-
const n = (a, m = {}) => {
|
|
81
|
-
const p = !tt(m), f = q(re, J(".", a));
|
|
82
|
-
return M(() => {
|
|
83
|
-
const v = ke(f);
|
|
84
|
-
return p ? lt(v, m) : v;
|
|
85
|
-
}).value;
|
|
86
|
-
}, i = (a) => {
|
|
87
|
-
const m = q(re, J(".", a));
|
|
88
|
-
return !!fe(O.locale, m, O.messages);
|
|
89
|
-
}, o = (a) => {
|
|
90
|
-
O.locale = a;
|
|
91
|
-
}, s = {
|
|
92
|
-
locale: M({
|
|
93
|
-
get() {
|
|
94
|
-
return O.locale;
|
|
95
|
-
},
|
|
96
|
-
set(a) {
|
|
97
|
-
O.locale = a;
|
|
98
|
-
}
|
|
99
|
-
}),
|
|
100
|
-
setLocale: o,
|
|
101
|
-
translate: n,
|
|
102
|
-
hasTranslation: i
|
|
103
|
-
};
|
|
104
|
-
return Oe(Ne, s), {
|
|
105
|
-
translate: n
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
function ut(e) {
|
|
109
|
-
e && (O.messages = e.messages, O.locale = e.locale, O.fallbackLocale = e.fallbackLocale);
|
|
110
|
-
const t = ct();
|
|
111
|
-
return {
|
|
112
|
-
locale: t.locale,
|
|
113
|
-
t: t.translate,
|
|
114
|
-
setLocale: t.setLocale,
|
|
115
|
-
hasTranslation: t.hasTranslation
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function ct() {
|
|
119
|
-
const e = Ie(Ne, null);
|
|
120
|
-
if (e === null)
|
|
121
|
-
throw new Error("Provider is missing a parent component.");
|
|
122
|
-
return e;
|
|
123
|
-
}
|
|
124
|
-
function ke(e = []) {
|
|
125
|
-
let t = fe(O.locale, e, O.messages);
|
|
126
|
-
return !t && O.fallbackLocale && (t = fe(O.fallbackLocale, e, O.messages)), t || e.join(".");
|
|
127
|
-
}
|
|
128
|
-
function fe(e, t, r) {
|
|
129
|
-
return Qe([e, ...t], r);
|
|
130
|
-
}
|
|
131
|
-
function lt(e, t) {
|
|
132
|
-
return e.replace(/\{(\w+)\}/g, (r, n) => t[n]);
|
|
133
|
-
}
|
|
134
|
-
const Ft = We({
|
|
135
|
-
props: {
|
|
136
|
-
tag: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: "div"
|
|
139
|
-
},
|
|
140
|
-
path: {
|
|
141
|
-
type: String,
|
|
142
|
-
defult: ""
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
setup(e, { slots: t }) {
|
|
146
|
-
const r = q(re, J(".", e.path)), n = ke(r), i = J(/\{|\}/, n), o = Object.keys(t).map((u) => {
|
|
147
|
-
const s = i.indexOf(u);
|
|
148
|
-
return s > -1 && (i[s] = t[u]()[0]), i;
|
|
149
|
-
});
|
|
150
|
-
return () => Me(e.tag, o);
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
function Wt(e, t = "", r = {}) {
|
|
154
|
-
const n = P(""), { t: i } = ut(), o = M(() => {
|
|
155
|
-
if (C(t))
|
|
156
|
-
try {
|
|
157
|
-
const a = ft(C(e), C(t));
|
|
158
|
-
return it(a, C(e));
|
|
159
|
-
} catch (a) {
|
|
160
|
-
n.value = a;
|
|
161
|
-
}
|
|
162
|
-
return C(e);
|
|
163
|
-
}), u = (a) => ({
|
|
164
|
-
...a,
|
|
165
|
-
...a.label && { label: i(a.label ?? "", C(r)) },
|
|
166
|
-
...a.tooltip && { tooltip: i(a.tooltip ?? "") }
|
|
167
|
-
});
|
|
168
|
-
return {
|
|
169
|
-
columns: M(() => q(u, o.value)),
|
|
170
|
-
error: n
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
function ft(e, t = "") {
|
|
174
|
-
const r = q(re, J(",", t)), n = Xe(e);
|
|
175
|
-
if (r[0] === "")
|
|
176
|
-
return [];
|
|
177
|
-
const i = r.findIndex((o) => !n.includes(o));
|
|
178
|
-
if (i > -1)
|
|
179
|
-
throw r[i];
|
|
180
|
-
return r;
|
|
181
|
-
}
|
|
182
|
-
const De = Symbol("ErrorProviderContext");
|
|
183
|
-
function Mt() {
|
|
184
|
-
const e = P(""), t = P({}), r = (o) => {
|
|
185
|
-
console.error({ error: o }), e.value = o.message || o.error.message, t.value = {
|
|
186
|
-
message: o.message,
|
|
187
|
-
key: o.key || Ye(o.message),
|
|
188
|
-
cause: o.cause
|
|
189
|
-
};
|
|
190
|
-
}, n = () => {
|
|
191
|
-
e.value = "", t.value = {};
|
|
192
|
-
};
|
|
193
|
-
return Oe(De, {
|
|
194
|
-
onError: r,
|
|
195
|
-
reset: n
|
|
196
|
-
}), window.onerror = (o) => {
|
|
197
|
-
console.error("WINDOW_ONERROR:", o);
|
|
198
|
-
}, Be((o, u, s) => {
|
|
199
|
-
console.error("onErrorCaptured:", o, u, s);
|
|
200
|
-
}), {
|
|
201
|
-
hasError: M(() => e.value.length > 0),
|
|
202
|
-
message: e,
|
|
203
|
-
error: t,
|
|
204
|
-
reset: n,
|
|
205
|
-
onError: r
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
function Bt() {
|
|
209
|
-
const e = dt();
|
|
210
|
-
return {
|
|
211
|
-
onError: e.onError,
|
|
212
|
-
reset: e.reset
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
function dt() {
|
|
216
|
-
const e = Ie(De, null);
|
|
217
|
-
if (e === null)
|
|
218
|
-
throw new Error("Provider is missing a parent component.");
|
|
219
|
-
return e;
|
|
220
|
-
}
|
|
221
|
-
function V(e) {
|
|
222
|
-
return ze() ? (Ge(e), !0) : !1;
|
|
223
|
-
}
|
|
224
|
-
const D = typeof window < "u" && typeof document < "u", ye = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, mt = Object.prototype.toString, pt = (e) => mt.call(e) === "[object Object]", N = () => {
|
|
225
|
-
}, vt = /* @__PURE__ */ yt();
|
|
226
|
-
function yt() {
|
|
227
|
-
var e, t;
|
|
228
|
-
return D && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
229
|
-
}
|
|
230
|
-
function Le(...e) {
|
|
231
|
-
if (e.length !== 1)
|
|
232
|
-
return $e(...e);
|
|
233
|
-
const t = e[0];
|
|
234
|
-
return typeof t == "function" ? Re(Ue(() => ({ get: t, set: N }))) : P(t);
|
|
235
|
-
}
|
|
236
|
-
function ht(e, t) {
|
|
237
|
-
function r(...n) {
|
|
238
|
-
return new Promise((i, o) => {
|
|
239
|
-
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(i).catch(o);
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
return r;
|
|
243
|
-
}
|
|
244
|
-
const _e = (e) => e();
|
|
245
|
-
function gt(e = _e, t = {}) {
|
|
246
|
-
const {
|
|
247
|
-
initialState: r = "active"
|
|
248
|
-
} = t, n = Le(r === "active");
|
|
249
|
-
function i() {
|
|
250
|
-
n.value = !1;
|
|
251
|
-
}
|
|
252
|
-
function o() {
|
|
253
|
-
n.value = !0;
|
|
254
|
-
}
|
|
255
|
-
const u = (...s) => {
|
|
256
|
-
n.value && e(...s);
|
|
257
|
-
};
|
|
258
|
-
return { isActive: Re(n), pause: i, resume: o, eventFilter: u };
|
|
259
|
-
}
|
|
260
|
-
function de(e, t = !1, r = "Timeout") {
|
|
261
|
-
return new Promise((n, i) => {
|
|
262
|
-
setTimeout(t ? () => i(r) : n, e);
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
function ae(e) {
|
|
266
|
-
return Array.isArray(e) ? e : [e];
|
|
267
|
-
}
|
|
268
|
-
function bt(e, t, r = {}) {
|
|
269
|
-
const {
|
|
270
|
-
eventFilter: n = _e,
|
|
271
|
-
...i
|
|
272
|
-
} = r;
|
|
273
|
-
return S(
|
|
274
|
-
e,
|
|
275
|
-
ht(
|
|
276
|
-
n,
|
|
277
|
-
t
|
|
278
|
-
),
|
|
279
|
-
i
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
function $t(e, t, r = {}) {
|
|
283
|
-
const {
|
|
284
|
-
eventFilter: n,
|
|
285
|
-
initialState: i = "active",
|
|
286
|
-
...o
|
|
287
|
-
} = r, { eventFilter: u, pause: s, resume: a, isActive: m } = gt(n, { initialState: i });
|
|
288
|
-
return { stop: bt(
|
|
289
|
-
e,
|
|
290
|
-
t,
|
|
291
|
-
{
|
|
292
|
-
...o,
|
|
293
|
-
eventFilter: u
|
|
294
|
-
}
|
|
295
|
-
), pause: s, resume: a, isActive: m };
|
|
296
|
-
}
|
|
297
|
-
function me(e, t = !1) {
|
|
298
|
-
function r(f, { flush: d = "sync", deep: v = !1, timeout: h, throwOnTimeout: w } = {}) {
|
|
299
|
-
let c = null;
|
|
300
|
-
const y = [new Promise((T) => {
|
|
301
|
-
c = S(
|
|
302
|
-
e,
|
|
303
|
-
(g) => {
|
|
304
|
-
f(g) !== t && (c ? c() : ce(() => c?.()), T(g));
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
flush: d,
|
|
308
|
-
deep: v,
|
|
309
|
-
immediate: !0
|
|
310
|
-
}
|
|
311
|
-
);
|
|
312
|
-
})];
|
|
313
|
-
return h != null && y.push(
|
|
314
|
-
de(h, w).then(() => A(e)).finally(() => c?.())
|
|
315
|
-
), Promise.race(y);
|
|
316
|
-
}
|
|
317
|
-
function n(f, d) {
|
|
318
|
-
if (!Ce(f))
|
|
319
|
-
return r((g) => g === f, d);
|
|
320
|
-
const { flush: v = "sync", deep: h = !1, timeout: w, throwOnTimeout: c } = d ?? {};
|
|
321
|
-
let l = null;
|
|
322
|
-
const T = [new Promise((g) => {
|
|
323
|
-
l = S(
|
|
324
|
-
[e, f],
|
|
325
|
-
([L, B]) => {
|
|
326
|
-
t !== (L === B) && (l ? l() : ce(() => l?.()), g(L));
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
flush: v,
|
|
330
|
-
deep: h,
|
|
331
|
-
immediate: !0
|
|
332
|
-
}
|
|
333
|
-
);
|
|
334
|
-
})];
|
|
335
|
-
return w != null && T.push(
|
|
336
|
-
de(w, c).then(() => A(e)).finally(() => (l?.(), A(e)))
|
|
337
|
-
), Promise.race(T);
|
|
338
|
-
}
|
|
339
|
-
function i(f) {
|
|
340
|
-
return r((d) => !!d, f);
|
|
341
|
-
}
|
|
342
|
-
function o(f) {
|
|
343
|
-
return n(null, f);
|
|
344
|
-
}
|
|
345
|
-
function u(f) {
|
|
346
|
-
return n(void 0, f);
|
|
347
|
-
}
|
|
348
|
-
function s(f) {
|
|
349
|
-
return r(Number.isNaN, f);
|
|
350
|
-
}
|
|
351
|
-
function a(f, d) {
|
|
352
|
-
return r((v) => {
|
|
353
|
-
const h = Array.from(v);
|
|
354
|
-
return h.includes(f) || h.includes(A(f));
|
|
355
|
-
}, d);
|
|
356
|
-
}
|
|
357
|
-
function m(f) {
|
|
358
|
-
return p(1, f);
|
|
359
|
-
}
|
|
360
|
-
function p(f = 1, d) {
|
|
361
|
-
let v = -1;
|
|
362
|
-
return r(() => (v += 1, v >= f), d);
|
|
363
|
-
}
|
|
364
|
-
return Array.isArray(A(e)) ? {
|
|
365
|
-
toMatch: r,
|
|
366
|
-
toContains: a,
|
|
367
|
-
changed: m,
|
|
368
|
-
changedTimes: p,
|
|
369
|
-
get not() {
|
|
370
|
-
return me(e, !t);
|
|
371
|
-
}
|
|
372
|
-
} : {
|
|
373
|
-
toMatch: r,
|
|
374
|
-
toBe: n,
|
|
375
|
-
toBeTruthy: i,
|
|
376
|
-
toBeNull: o,
|
|
377
|
-
toBeNaN: s,
|
|
378
|
-
toBeUndefined: u,
|
|
379
|
-
changed: m,
|
|
380
|
-
changedTimes: p,
|
|
381
|
-
get not() {
|
|
382
|
-
return me(e, !t);
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
function wt(e) {
|
|
387
|
-
return me(e);
|
|
388
|
-
}
|
|
389
|
-
function Tt(e, t = 1e3, r = {}) {
|
|
390
|
-
const {
|
|
391
|
-
immediate: n = !0,
|
|
392
|
-
immediateCallback: i = !1
|
|
393
|
-
} = r;
|
|
394
|
-
let o = null;
|
|
395
|
-
const u = k(!1);
|
|
396
|
-
function s() {
|
|
397
|
-
o && (clearInterval(o), o = null);
|
|
398
|
-
}
|
|
399
|
-
function a() {
|
|
400
|
-
u.value = !1, s();
|
|
401
|
-
}
|
|
402
|
-
function m() {
|
|
403
|
-
const p = A(t);
|
|
404
|
-
p <= 0 || (u.value = !0, i && e(), s(), u.value && (o = setInterval(e, p)));
|
|
405
|
-
}
|
|
406
|
-
if (n && D && m(), Ce(t) || typeof t == "function") {
|
|
407
|
-
const p = S(t, () => {
|
|
408
|
-
u.value && D && m();
|
|
409
|
-
});
|
|
410
|
-
V(p);
|
|
411
|
-
}
|
|
412
|
-
return V(a), {
|
|
413
|
-
isActive: Se(u),
|
|
414
|
-
pause: a,
|
|
415
|
-
resume: m
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
function Et(e, t, r = {}) {
|
|
419
|
-
const {
|
|
420
|
-
immediate: n = !0,
|
|
421
|
-
immediateCallback: i = !1
|
|
422
|
-
} = r, o = k(!1);
|
|
423
|
-
let u;
|
|
424
|
-
function s() {
|
|
425
|
-
u && (clearTimeout(u), u = void 0);
|
|
426
|
-
}
|
|
427
|
-
function a() {
|
|
428
|
-
o.value = !1, s();
|
|
429
|
-
}
|
|
430
|
-
function m(...p) {
|
|
431
|
-
i && e(), s(), o.value = !0, u = setTimeout(() => {
|
|
432
|
-
o.value = !1, u = void 0, e(...p);
|
|
433
|
-
}, A(t));
|
|
434
|
-
}
|
|
435
|
-
return n && (o.value = !0, D && m()), V(a), {
|
|
436
|
-
isPending: Se(o),
|
|
437
|
-
start: m,
|
|
438
|
-
stop: a
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
function At(e, t, r) {
|
|
442
|
-
return S(
|
|
443
|
-
e,
|
|
444
|
-
t,
|
|
445
|
-
{
|
|
446
|
-
...r,
|
|
447
|
-
immediate: !0
|
|
448
|
-
}
|
|
449
|
-
);
|
|
450
|
-
}
|
|
451
|
-
function Ut(e, t, r) {
|
|
452
|
-
return S(
|
|
453
|
-
e,
|
|
454
|
-
t,
|
|
455
|
-
{
|
|
456
|
-
...r,
|
|
457
|
-
once: !0
|
|
458
|
-
}
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
|
-
function zt(e, t, r) {
|
|
462
|
-
const n = S(
|
|
463
|
-
e,
|
|
464
|
-
(i, o, u) => {
|
|
465
|
-
i && (r?.once && ce(() => n()), t(i, o, u));
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
...r,
|
|
469
|
-
once: !1
|
|
470
|
-
}
|
|
471
|
-
);
|
|
472
|
-
return n;
|
|
473
|
-
}
|
|
474
|
-
const je = D ? window : void 0, Ot = D ? window.document : void 0;
|
|
475
|
-
function K(e) {
|
|
476
|
-
var t;
|
|
477
|
-
const r = A(e);
|
|
478
|
-
return (t = r?.$el) != null ? t : r;
|
|
479
|
-
}
|
|
480
|
-
function H(...e) {
|
|
481
|
-
const t = [], r = () => {
|
|
482
|
-
t.forEach((s) => s()), t.length = 0;
|
|
483
|
-
}, n = (s, a, m, p) => (s.addEventListener(a, m, p), () => s.removeEventListener(a, m, p)), i = M(() => {
|
|
484
|
-
const s = ae(A(e[0])).filter((a) => a != null);
|
|
485
|
-
return s.every((a) => typeof a != "string") ? s : void 0;
|
|
486
|
-
}), o = At(
|
|
487
|
-
() => {
|
|
488
|
-
var s, a;
|
|
489
|
-
return [
|
|
490
|
-
(a = (s = i.value) == null ? void 0 : s.map((m) => K(m))) != null ? a : [je].filter((m) => m != null),
|
|
491
|
-
ae(A(i.value ? e[1] : e[0])),
|
|
492
|
-
ae(C(i.value ? e[2] : e[1])),
|
|
493
|
-
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
494
|
-
A(i.value ? e[3] : e[2])
|
|
495
|
-
];
|
|
496
|
-
},
|
|
497
|
-
([s, a, m, p]) => {
|
|
498
|
-
if (r(), !s?.length || !a?.length || !m?.length)
|
|
499
|
-
return;
|
|
500
|
-
const f = pt(p) ? { ...p } : p;
|
|
501
|
-
t.push(
|
|
502
|
-
...s.flatMap(
|
|
503
|
-
(d) => a.flatMap(
|
|
504
|
-
(v) => m.map((h) => n(d, v, h, f))
|
|
505
|
-
)
|
|
506
|
-
)
|
|
507
|
-
);
|
|
508
|
-
},
|
|
509
|
-
{ flush: "post" }
|
|
510
|
-
), u = () => {
|
|
511
|
-
o(), r();
|
|
512
|
-
};
|
|
513
|
-
return V(r), u;
|
|
514
|
-
}
|
|
515
|
-
let he = !1;
|
|
516
|
-
function Gt(e, t, r = {}) {
|
|
517
|
-
const { window: n = je, ignore: i = [], capture: o = !0, detectIframe: u = !1, controls: s = !1 } = r;
|
|
518
|
-
if (!n)
|
|
519
|
-
return s ? { stop: N, cancel: N, trigger: N } : N;
|
|
520
|
-
if (vt && !he) {
|
|
521
|
-
he = !0;
|
|
522
|
-
const c = { passive: !0 };
|
|
523
|
-
Array.from(n.document.body.children).forEach((l) => l.addEventListener("click", N, c)), n.document.documentElement.addEventListener("click", N, c);
|
|
524
|
-
}
|
|
525
|
-
let a = !0;
|
|
526
|
-
const m = (c) => A(i).some((l) => {
|
|
527
|
-
if (typeof l == "string")
|
|
528
|
-
return Array.from(n.document.querySelectorAll(l)).some((y) => y === c.target || c.composedPath().includes(y));
|
|
529
|
-
{
|
|
530
|
-
const y = K(l);
|
|
531
|
-
return y && (c.target === y || c.composedPath().includes(y));
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
function p(c) {
|
|
535
|
-
const l = A(c);
|
|
536
|
-
return l && l.$.subTree.shapeFlag === 16;
|
|
537
|
-
}
|
|
538
|
-
function f(c, l) {
|
|
539
|
-
const y = A(c), T = y.$.subTree && y.$.subTree.children;
|
|
540
|
-
return T == null || !Array.isArray(T) ? !1 : T.some((g) => g.el === l.target || l.composedPath().includes(g.el));
|
|
541
|
-
}
|
|
542
|
-
const d = (c) => {
|
|
543
|
-
const l = K(e);
|
|
544
|
-
if (c.target != null && !(!(l instanceof Element) && p(e) && f(e, c)) && !(!l || l === c.target || c.composedPath().includes(l))) {
|
|
545
|
-
if ("detail" in c && c.detail === 0 && (a = !m(c)), !a) {
|
|
546
|
-
a = !0;
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
t(c);
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
let v = !1;
|
|
553
|
-
const h = [
|
|
554
|
-
H(n, "click", (c) => {
|
|
555
|
-
v || (v = !0, setTimeout(() => {
|
|
556
|
-
v = !1;
|
|
557
|
-
}, 0), d(c));
|
|
558
|
-
}, { passive: !0, capture: o }),
|
|
559
|
-
H(n, "pointerdown", (c) => {
|
|
560
|
-
const l = K(e);
|
|
561
|
-
a = !m(c) && !!(l && !c.composedPath().includes(l));
|
|
562
|
-
}, { passive: !0 }),
|
|
563
|
-
u && H(n, "blur", (c) => {
|
|
564
|
-
setTimeout(() => {
|
|
565
|
-
var l;
|
|
566
|
-
const y = K(e);
|
|
567
|
-
((l = n.document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !y?.contains(n.document.activeElement) && t(c);
|
|
568
|
-
}, 0);
|
|
569
|
-
}, { passive: !0 })
|
|
570
|
-
].filter(Boolean), w = () => h.forEach((c) => c());
|
|
571
|
-
return s ? {
|
|
572
|
-
stop: w,
|
|
573
|
-
cancel: () => {
|
|
574
|
-
a = !1;
|
|
575
|
-
},
|
|
576
|
-
trigger: (c) => {
|
|
577
|
-
a = !0, d(c), a = !1;
|
|
578
|
-
}
|
|
579
|
-
} : w;
|
|
580
|
-
}
|
|
581
|
-
function It(e, t, r) {
|
|
582
|
-
const {
|
|
583
|
-
immediate: n = !0,
|
|
584
|
-
delay: i = 0,
|
|
585
|
-
onError: o = N,
|
|
586
|
-
onSuccess: u = N,
|
|
587
|
-
resetOnExecute: s = !0,
|
|
588
|
-
shallow: a = !0,
|
|
589
|
-
throwError: m
|
|
590
|
-
} = r ?? {}, p = a ? k(t) : P(t), f = k(!1), d = k(!1), v = k(void 0);
|
|
591
|
-
async function h(l = 0, ...y) {
|
|
592
|
-
s && (p.value = t), v.value = void 0, f.value = !1, d.value = !0, l > 0 && await de(l);
|
|
593
|
-
const T = typeof e == "function" ? e(...y) : e;
|
|
594
|
-
try {
|
|
595
|
-
const g = await T;
|
|
596
|
-
p.value = g, f.value = !0, u(g);
|
|
597
|
-
} catch (g) {
|
|
598
|
-
if (v.value = g, o(g), m)
|
|
599
|
-
throw g;
|
|
600
|
-
} finally {
|
|
601
|
-
d.value = !1;
|
|
602
|
-
}
|
|
603
|
-
return p.value;
|
|
604
|
-
}
|
|
605
|
-
n && h(i);
|
|
606
|
-
const w = {
|
|
607
|
-
state: p,
|
|
608
|
-
isReady: f,
|
|
609
|
-
isLoading: d,
|
|
610
|
-
error: v,
|
|
611
|
-
execute: h,
|
|
612
|
-
executeImmediate: (...l) => h(0, ...l)
|
|
613
|
-
};
|
|
614
|
-
function c() {
|
|
615
|
-
return new Promise((l, y) => {
|
|
616
|
-
wt(d).toBe(!1).then(() => l(w)).catch(y);
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
return {
|
|
620
|
-
...w,
|
|
621
|
-
then(l, y) {
|
|
622
|
-
return c().then(l, y);
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
function Kt(e = {}) {
|
|
627
|
-
const { document: t = Ot } = e;
|
|
628
|
-
if (!t)
|
|
629
|
-
return k("visible");
|
|
630
|
-
const r = k(t.visibilityState);
|
|
631
|
-
return H(t, "visibilitychange", () => {
|
|
632
|
-
r.value = t.visibilityState;
|
|
633
|
-
}, { passive: !0 }), r;
|
|
634
|
-
}
|
|
635
|
-
async function St(e) {
|
|
636
|
-
return new Promise((t, r) => {
|
|
637
|
-
const n = new Image(), { src: i, srcset: o, sizes: u, class: s, loading: a, crossorigin: m, referrerPolicy: p, width: f, height: d, decoding: v, fetchPriority: h, ismap: w, usemap: c } = e;
|
|
638
|
-
n.src = i, o != null && (n.srcset = o), u != null && (n.sizes = u), s != null && (n.className = s), a != null && (n.loading = a), m != null && (n.crossOrigin = m), p != null && (n.referrerPolicy = p), f != null && (n.width = f), d != null && (n.height = d), v != null && (n.decoding = v), h != null && (n.fetchPriority = h), w != null && (n.isMap = w), c != null && (n.useMap = c), n.onload = () => t(n), n.onerror = r;
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
function Ht(e, t = {}) {
|
|
642
|
-
const r = It(
|
|
643
|
-
() => St(A(e)),
|
|
644
|
-
void 0,
|
|
645
|
-
{
|
|
646
|
-
resetOnExecute: !0,
|
|
647
|
-
...t
|
|
648
|
-
}
|
|
649
|
-
);
|
|
650
|
-
return S(
|
|
651
|
-
() => A(e),
|
|
652
|
-
() => r.execute(t.delay),
|
|
653
|
-
{ deep: !0 }
|
|
654
|
-
), r;
|
|
655
|
-
}
|
|
656
|
-
const ge = "ping";
|
|
657
|
-
function se(e) {
|
|
658
|
-
return e === !0 ? {} : e;
|
|
659
|
-
}
|
|
660
|
-
function qt(e, t = {}) {
|
|
661
|
-
const {
|
|
662
|
-
onConnected: r,
|
|
663
|
-
onDisconnected: n,
|
|
664
|
-
onError: i,
|
|
665
|
-
onMessage: o,
|
|
666
|
-
immediate: u = !0,
|
|
667
|
-
autoConnect: s = !0,
|
|
668
|
-
autoClose: a = !0,
|
|
669
|
-
protocols: m = []
|
|
670
|
-
} = t, p = P(null), f = k("CLOSED"), d = P(), v = Le(e);
|
|
671
|
-
let h, w, c = !1, l = 0, y = [], T, g;
|
|
672
|
-
const L = () => {
|
|
673
|
-
if (y.length && d.value && f.value === "OPEN") {
|
|
674
|
-
for (const b of y)
|
|
675
|
-
d.value.send(b);
|
|
676
|
-
y = [];
|
|
677
|
-
}
|
|
678
|
-
}, B = () => {
|
|
679
|
-
T != null && (clearTimeout(T), T = void 0);
|
|
680
|
-
}, $ = () => {
|
|
681
|
-
clearTimeout(g), g = void 0;
|
|
682
|
-
}, j = (b = 1e3, I) => {
|
|
683
|
-
B(), !(!D && !ye || !d.value) && (c = !0, $(), h?.(), d.value.close(b, I), d.value = void 0);
|
|
684
|
-
}, Q = (b, I = !0) => !d.value || f.value !== "OPEN" ? (I && y.push(b), !1) : (L(), d.value.send(b), !0), X = () => {
|
|
685
|
-
if (c || typeof v.value > "u")
|
|
686
|
-
return;
|
|
687
|
-
const b = new WebSocket(v.value, m);
|
|
688
|
-
d.value = b, f.value = "CONNECTING", b.onopen = () => {
|
|
689
|
-
f.value = "OPEN", l = 0, r?.(b), w?.(), L();
|
|
690
|
-
}, b.onclose = (I) => {
|
|
691
|
-
if (f.value = "CLOSED", $(), h?.(), n?.(b, I), !c && t.autoReconnect && (d.value == null || b === d.value)) {
|
|
692
|
-
const {
|
|
693
|
-
retries: R = -1,
|
|
694
|
-
delay: F = 1e3,
|
|
695
|
-
onFailed: W
|
|
696
|
-
} = se(t.autoReconnect);
|
|
697
|
-
(typeof R == "function" ? R : () => typeof R == "number" && (R < 0 || l < R))(l) ? (l += 1, T = setTimeout(X, F)) : W?.();
|
|
698
|
-
}
|
|
699
|
-
}, b.onerror = (I) => {
|
|
700
|
-
i?.(b, I);
|
|
701
|
-
}, b.onmessage = (I) => {
|
|
702
|
-
if (t.heartbeat) {
|
|
703
|
-
$();
|
|
704
|
-
const {
|
|
705
|
-
message: R = ge,
|
|
706
|
-
responseMessage: F = R
|
|
707
|
-
} = se(t.heartbeat);
|
|
708
|
-
if (I.data === A(F))
|
|
709
|
-
return;
|
|
710
|
-
}
|
|
711
|
-
p.value = I.data, o?.(b, I);
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
if (t.heartbeat) {
|
|
715
|
-
const {
|
|
716
|
-
message: b = ge,
|
|
717
|
-
interval: I = 1e3,
|
|
718
|
-
pongTimeout: R = 1e3
|
|
719
|
-
} = se(t.heartbeat), { pause: F, resume: W } = Tt(
|
|
720
|
-
() => {
|
|
721
|
-
Q(A(b), !1), g == null && (g = setTimeout(() => {
|
|
722
|
-
j(), c = !1;
|
|
723
|
-
}, R));
|
|
724
|
-
},
|
|
725
|
-
I,
|
|
726
|
-
{ immediate: !1 }
|
|
727
|
-
);
|
|
728
|
-
h = F, w = W;
|
|
729
|
-
}
|
|
730
|
-
a && (D && H("beforeunload", () => j(), { passive: !0 }), V(j));
|
|
731
|
-
const z = () => {
|
|
732
|
-
!D && !ye || (j(), c = !1, l = 0, X());
|
|
733
|
-
};
|
|
734
|
-
return u && z(), s && S(v, z), {
|
|
735
|
-
data: p,
|
|
736
|
-
status: f,
|
|
737
|
-
close: j,
|
|
738
|
-
send: Q,
|
|
739
|
-
open: z,
|
|
740
|
-
ws: d
|
|
741
|
-
};
|
|
742
|
-
}
|
|
743
|
-
function Jt(e = [], t = {}) {
|
|
744
|
-
const { delay: r = 0 } = t, n = P(!1), i = M(() => {
|
|
745
|
-
const s = C(e);
|
|
746
|
-
return Array.isArray(s) ? s.map((a) => C(a)).some(Boolean) : s;
|
|
747
|
-
}), { start: o, stop: u } = Et(() => {
|
|
748
|
-
n.value = !0;
|
|
749
|
-
}, r);
|
|
750
|
-
return S(
|
|
751
|
-
i,
|
|
752
|
-
(s) => {
|
|
753
|
-
if (s)
|
|
754
|
-
return o();
|
|
755
|
-
u(), n.value = !1;
|
|
756
|
-
},
|
|
757
|
-
{ immediate: !0, deep: !0 }
|
|
758
|
-
), n;
|
|
759
|
-
}
|
|
760
|
-
/*! *****************************************************************************
|
|
761
|
-
Copyright (c) Microsoft Corporation.
|
|
762
|
-
|
|
763
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
764
|
-
purpose with or without fee is hereby granted.
|
|
765
|
-
|
|
766
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
767
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
768
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
769
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
770
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
771
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
772
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
773
|
-
***************************************************************************** */
|
|
774
|
-
function ue(e, t) {
|
|
775
|
-
var r = typeof Symbol == "function" && e[Symbol.iterator];
|
|
776
|
-
if (!r) return e;
|
|
777
|
-
var n, i, o = r.call(e), u = [];
|
|
778
|
-
try {
|
|
779
|
-
for (; (t === void 0 || t-- > 0) && !(n = o.next()).done; ) u.push(n.value);
|
|
780
|
-
} catch (s) {
|
|
781
|
-
i = { error: s };
|
|
782
|
-
} finally {
|
|
783
|
-
try {
|
|
784
|
-
n && !n.done && (r = o.return) && r.call(o);
|
|
785
|
-
} finally {
|
|
786
|
-
if (i) throw i.error;
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
return u;
|
|
790
|
-
}
|
|
791
|
-
var be;
|
|
792
|
-
(function(e) {
|
|
793
|
-
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
794
|
-
})(be || (be = {}));
|
|
795
|
-
var Rt = { type: "xstate.init" };
|
|
796
|
-
function ee(e) {
|
|
797
|
-
return e === void 0 ? [] : [].concat(e);
|
|
798
|
-
}
|
|
799
|
-
function we(e, t) {
|
|
800
|
-
return typeof (e = typeof e == "string" && t && t[e] ? t[e] : e) == "string" ? { type: e } : typeof e == "function" ? { type: e.name, exec: e } : e;
|
|
801
|
-
}
|
|
802
|
-
function pe(e) {
|
|
803
|
-
return function(t) {
|
|
804
|
-
return e === t;
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
function Ct(e) {
|
|
808
|
-
return typeof e == "string" ? { type: e } : e;
|
|
809
|
-
}
|
|
810
|
-
function Te(e, t) {
|
|
811
|
-
return { value: e, context: t, actions: [], changed: !1, matches: pe(e) };
|
|
812
|
-
}
|
|
813
|
-
function Ee(e, t, r) {
|
|
814
|
-
var n = t, i = !1;
|
|
815
|
-
return [e.filter(function(o) {
|
|
816
|
-
if (o.type === "xstate.assign") {
|
|
817
|
-
i = !0;
|
|
818
|
-
var u = Object.assign({}, n);
|
|
819
|
-
return typeof o.assignment == "function" ? u = o.assignment(n, r) : Object.keys(o.assignment).forEach(function(s) {
|
|
820
|
-
u[s] = typeof o.assignment[s] == "function" ? o.assignment[s](n, r) : o.assignment[s];
|
|
821
|
-
}), n = u, !1;
|
|
822
|
-
}
|
|
823
|
-
return !0;
|
|
824
|
-
}), n, i];
|
|
825
|
-
}
|
|
826
|
-
function Pt(e, t) {
|
|
827
|
-
t === void 0 && (t = {});
|
|
828
|
-
var r = ue(Ee(ee(e.states[e.initial].entry).map(function(u) {
|
|
829
|
-
return we(u, t.actions);
|
|
830
|
-
}), e.context, Rt), 2), n = r[0], i = r[1], o = { config: e, _options: t, initialState: { value: e.initial, actions: n, context: i, matches: pe(e.initial) }, transition: function(u, s) {
|
|
831
|
-
var a, m, p = typeof u == "string" ? { value: u, context: e.context } : u, f = p.value, d = p.context, v = Ct(s), h = e.states[f];
|
|
832
|
-
if (h.on) {
|
|
833
|
-
var w = ee(h.on[v.type]);
|
|
834
|
-
"*" in h.on && w.push.apply(w, function(E, x, oe) {
|
|
835
|
-
if (arguments.length === 2) for (var _, U = 0, Fe = x.length; U < Fe; U++) !_ && U in x || (_ || (_ = Array.prototype.slice.call(x, 0, U)), _[U] = x[U]);
|
|
836
|
-
return E.concat(_ || Array.prototype.slice.call(x));
|
|
837
|
-
}([], ue(ee(h.on["*"])), !1));
|
|
838
|
-
try {
|
|
839
|
-
for (var c = function(E) {
|
|
840
|
-
var x = typeof Symbol == "function" && Symbol.iterator, oe = x && E[x], _ = 0;
|
|
841
|
-
if (oe) return oe.call(E);
|
|
842
|
-
if (E && typeof E.length == "number") return { next: function() {
|
|
843
|
-
return E && _ >= E.length && (E = void 0), { value: E && E[_++], done: !E };
|
|
844
|
-
} };
|
|
845
|
-
throw new TypeError(x ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
846
|
-
}(w), l = c.next(); !l.done; l = c.next()) {
|
|
847
|
-
var y = l.value;
|
|
848
|
-
if (y === void 0) return Te(f, d);
|
|
849
|
-
var T = typeof y == "string" ? { target: y } : y, g = T.target, L = T.actions, B = L === void 0 ? [] : L, $ = T.cond, j = $ === void 0 ? function() {
|
|
850
|
-
return !0;
|
|
851
|
-
} : $, Q = g === void 0, X = g ?? f, z = e.states[X];
|
|
852
|
-
if (j(d, v)) {
|
|
853
|
-
var b = ue(Ee((Q ? ee(B) : [].concat(h.exit, B, z.entry).filter(function(E) {
|
|
854
|
-
return E;
|
|
855
|
-
})).map(function(E) {
|
|
856
|
-
return we(E, o._options.actions);
|
|
857
|
-
}), d, v), 3), I = b[0], R = b[1], F = b[2], W = g ?? f;
|
|
858
|
-
return { value: W, context: R, actions: I, changed: g !== f || I.length > 0 || F, matches: pe(W) };
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
} catch (E) {
|
|
862
|
-
a = { error: E };
|
|
863
|
-
} finally {
|
|
864
|
-
try {
|
|
865
|
-
l && !l.done && (m = c.return) && m.call(c);
|
|
866
|
-
} finally {
|
|
867
|
-
if (a) throw a.error;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
return Te(f, d);
|
|
872
|
-
} };
|
|
873
|
-
return o;
|
|
874
|
-
}
|
|
875
|
-
const xt = Pt({
|
|
876
|
-
id: "sort",
|
|
877
|
-
initial: Z,
|
|
878
|
-
states: {
|
|
879
|
-
[Z]: {
|
|
880
|
-
on: {
|
|
881
|
-
DIRECTION1: ie,
|
|
882
|
-
DIRECTION2: te
|
|
883
|
-
}
|
|
884
|
-
},
|
|
885
|
-
[ie]: {
|
|
886
|
-
on: {
|
|
887
|
-
DIRECTION1: te,
|
|
888
|
-
DIRECTION2: Z
|
|
889
|
-
}
|
|
890
|
-
},
|
|
891
|
-
[te]: {
|
|
892
|
-
on: {
|
|
893
|
-
DIRECTION1: Z,
|
|
894
|
-
DIRECTION2: ie
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
|
-
function Nt(e, t) {
|
|
900
|
-
const r = t === te ? "DIRECTION2" : "DIRECTION1";
|
|
901
|
-
return xt.transition(e, r).value;
|
|
902
|
-
}
|
|
903
|
-
function Vt(e = {}) {
|
|
904
|
-
const { sortTarget: t = null, orders: r = [] } = e, n = Ae({ sortTarget: t, orders: r });
|
|
905
|
-
return {
|
|
906
|
-
sort: n,
|
|
907
|
-
change: ({ target: o, orders: u }) => {
|
|
908
|
-
if (n.sortTarget !== o) {
|
|
909
|
-
n.sortTarget = o, n.orders = u;
|
|
910
|
-
return;
|
|
911
|
-
}
|
|
912
|
-
const s = u.map((a, m) => ({
|
|
913
|
-
...a,
|
|
914
|
-
direction: Nt(n.orders[m].direction, a.direction)
|
|
915
|
-
}));
|
|
916
|
-
n.sortTarget = o, n.orders = s;
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
export {
|
|
921
|
-
Wt as a,
|
|
922
|
-
Mt as b,
|
|
923
|
-
Bt as c,
|
|
924
|
-
jt as d,
|
|
925
|
-
ut as e,
|
|
926
|
-
Jt as f,
|
|
927
|
-
Vt as g,
|
|
928
|
-
Ht as h,
|
|
929
|
-
Ft as i,
|
|
930
|
-
tt as j,
|
|
931
|
-
qt as k,
|
|
932
|
-
Ut as l,
|
|
933
|
-
ot as m,
|
|
934
|
-
N as n,
|
|
935
|
-
Gt as o,
|
|
936
|
-
$t as p,
|
|
937
|
-
K as q,
|
|
938
|
-
It as r,
|
|
939
|
-
Kt as s,
|
|
940
|
-
_t as u,
|
|
941
|
-
ft as v,
|
|
942
|
-
zt as w
|
|
943
|
-
};
|