@mjsz-vbr-elements/core 2.24.1 → 2.25.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.
@@ -1,64 +1,64 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.24.1 - 13/05/2025, 09:22:12
3
+ * version: v2.25.0 - 01/07/2025, 19:03:26
4
4
  * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
- import { ref as R, watch as O, unref as I, reactive as me, defineComponent as ke, h as De, computed as j, provide as ye, inject as he, onErrorCaptured as Le, shallowRef as C, readonly as oe, nextTick as K, getCurrentScope as Ne, onScopeDispose as _e, toValue as A, toRef as Fe, customRef as Be, isRef as We } from "vue";
9
- import { _ as G, w as Me, x as $e, z as Z, A as Ue, B as ze, C as ve, D as M, E as ge, F as Ke, G as ue, H as F, I as B, J as Ge, K as qe, u as He } from "./datetime-Djnl319m.js";
10
- import { SORT_STATE_ORIGINAL as $, SORT_STATE_DESCEND as V, SORT_STATE_ASCEND as z } from "./constants.js";
11
- function Je(e) {
8
+ import { ref as R, watch as O, unref as I, reactive as pe, defineComponent as Le, h as ke, computed as j, provide as me, inject as ve, onErrorCaptured as De, nextTick as Y, shallowRef as C, shallowReadonly as Ne, toValue as E, getCurrentScope as _e, onScopeDispose as Fe, readonly as ye, toRef as Me, customRef as Be, isRef as We } from "vue";
9
+ import { _ as K, w as $e, x as Ue, z as Z, A as ze, B as Ke, C as he, D as B, E as ge, F as Ge, G as se, H as _, I as F, J as qe, K as He, u as Je } from "./datetime-D600LvsU.js";
10
+ import { SORT_STATE_DESCEND as Q, SORT_STATE_ORIGINAL as W, SORT_STATE_ASCEND as U } from "./constants.js";
11
+ function Qe(e) {
12
12
  var t = Object.prototype.toString.call(e);
13
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
14
  }
15
- var Qe = /* @__PURE__ */ G(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() : Me(t) ? [] : $e(t) ? "" : Z(t) ? {} : Ue(t) ? /* @__PURE__ */ function() {
15
+ var Ve = /* @__PURE__ */ K(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() : $e(t) ? [] : Ue(t) ? "" : Z(t) ? {} : ze(t) ? /* @__PURE__ */ function() {
17
17
  return arguments;
18
- }() : Je(t) ? t.constructor.from("") : void 0;
19
- }), Ve = /* @__PURE__ */ G(function(t) {
20
- return t != null && ze(t, Qe(t));
21
- }), Xe = /* @__PURE__ */ ve(function(t, r, n) {
18
+ }() : Qe(t) ? t.constructor.from("") : void 0;
19
+ }), Xe = /* @__PURE__ */ K(function(t) {
20
+ return t != null && Ke(t, Ve(t));
21
+ }), Ye = /* @__PURE__ */ he(function(t, r, n) {
22
22
  var i = {}, o;
23
23
  r = r || {}, n = n || {};
24
24
  for (o in r)
25
- M(o, r) && (i[o] = M(o, n) ? t(o, r[o], n[o]) : r[o]);
25
+ B(o, r) && (i[o] = B(o, n) ? t(o, r[o], n[o]) : r[o]);
26
26
  for (o in n)
27
- M(o, n) && !M(o, i) && (i[o] = n[o]);
27
+ B(o, n) && !B(o, i) && (i[o] = n[o]);
28
28
  return i;
29
- }), Ye = /* @__PURE__ */ ve(function e(t, r, n) {
30
- return Xe(function(i, o, u) {
29
+ }), Ze = /* @__PURE__ */ he(function e(t, r, n) {
30
+ return Ye(function(i, o, u) {
31
31
  return Z(o) && Z(u) ? e(t, o, u) : t(i, o, u);
32
32
  }, r, n);
33
- }), Ze = /* @__PURE__ */ ge(function(t, r) {
34
- return Ye(function(n, i, o) {
33
+ }), et = /* @__PURE__ */ ge(function(t, r) {
34
+ return Ze(function(n, i, o) {
35
35
  return o;
36
36
  }, t, r);
37
- }), et = /* @__PURE__ */ ge(function(t, r) {
37
+ }), tt = /* @__PURE__ */ ge(function(t, r) {
38
38
  for (var n = {}, i = {}, o = 0, u = t.length; o < u; )
39
39
  i[t[o]] = 1, o += 1;
40
40
  for (var s in r)
41
41
  i.hasOwnProperty(s) || (n[s] = r[s]);
42
42
  return n;
43
- }), N = `
44
- \v\f\r                 \u2028\u2029\uFEFF`, tt = "​", nt = typeof String.prototype.trim == "function", q = !nt || /* @__PURE__ */ N.trim() || !/* @__PURE__ */ tt.trim() ? /* @__PURE__ */ G(function(t) {
45
- var r = new RegExp("^[" + N + "][" + N + "]*"), n = new RegExp("[" + N + "][" + N + "]*$");
43
+ }), D = `
44
+ \v\f\r                 \u2028\u2029\uFEFF`, nt = "​", rt = typeof String.prototype.trim == "function", G = !rt || /* @__PURE__ */ D.trim() || !/* @__PURE__ */ nt.trim() ? /* @__PURE__ */ K(function(t) {
45
+ var r = new RegExp("^[" + D + "][" + D + "]*"), n = new RegExp("[" + D + "][" + D + "]*$");
46
46
  return t.replace(r, "").replace(n, "");
47
- }) : /* @__PURE__ */ G(function(t) {
47
+ }) : /* @__PURE__ */ K(function(t) {
48
48
  return t.trim();
49
49
  });
50
- function Ct(e, t, r, n) {
50
+ function jt(e, t, r, n) {
51
51
  const i = R(""), o = R(!1), u = (s) => {
52
- const a = Ke(ue(t), s), d = a.length > 0;
52
+ const a = Ge(se(t), s), d = a.length > 0;
53
53
  if (o.value = d, !d)
54
54
  return i.value = "";
55
- const l = a.map((p) => ({
55
+ const f = a.map((p) => ({
56
56
  team: p.team.longName,
57
- points: Math.abs(ue(t, p))
57
+ points: Math.abs(se(t, p))
58
58
  })).map((p) => r(`additionalText.${t}.content`, p)).join(", ");
59
59
  i.value = [
60
60
  r(`additionalText.${t}.prependix`),
61
- l,
61
+ f,
62
62
  ...r(`additionalText.${t}.appendix`) && [r(`additionalText.${t}.appendix`)]
63
63
  ].join(" ");
64
64
  };
@@ -70,21 +70,21 @@ function Ct(e, t, r, n) {
70
70
  isVisible: o
71
71
  };
72
72
  }
73
- const be = Symbol("I18nContext"), T = me({
73
+ const we = Symbol("I18nContext"), T = pe({
74
74
  messages: {},
75
75
  locale: "",
76
76
  fallbackLocale: ""
77
77
  });
78
- function jt({ messages: e = {}, locale: t = "", fallbackLocale: r = "" }) {
79
- T.messages = Ze(T.messages, e), T.locale = t, T.fallbackLocale = r;
78
+ function Lt({ messages: e = {}, locale: t = "", fallbackLocale: r = "" }) {
79
+ T.messages = et(T.messages, e), T.locale = t, T.fallbackLocale = r;
80
80
  const n = (a, d = {}) => {
81
- const m = !Ve(d), l = F(q, B(".", a));
81
+ const m = !Xe(d), f = _(G, F(".", a));
82
82
  return j(() => {
83
- const y = we(l);
84
- return m ? it(y, d) : y;
83
+ const v = be(f);
84
+ return m ? at(v, d) : v;
85
85
  }).value;
86
86
  }, i = (a) => {
87
- const d = F(q, B(".", a));
87
+ const d = _(G, F(".", a));
88
88
  return !!ee(T.locale, d, T.messages);
89
89
  }, o = (a) => {
90
90
  T.locale = a;
@@ -101,13 +101,13 @@ function jt({ messages: e = {}, locale: t = "", fallbackLocale: r = "" }) {
101
101
  translate: n,
102
102
  hasTranslation: i
103
103
  };
104
- return ye(be, s), {
104
+ return me(we, s), {
105
105
  translate: n
106
106
  };
107
107
  }
108
- function rt(e) {
108
+ function ot(e) {
109
109
  e && (T.messages = e.messages, T.locale = e.locale, T.fallbackLocale = e.fallbackLocale);
110
- const t = ot();
110
+ const t = it();
111
111
  return {
112
112
  locale: t.locale,
113
113
  t: t.translate,
@@ -115,23 +115,23 @@ function rt(e) {
115
115
  hasTranslation: t.hasTranslation
116
116
  };
117
117
  }
118
- function ot() {
119
- const e = he(be, null);
118
+ function it() {
119
+ const e = ve(we, null);
120
120
  if (e === null)
121
121
  throw new Error("Provider is missing a parent component.");
122
122
  return e;
123
123
  }
124
- function we(e = []) {
124
+ function be(e = []) {
125
125
  let t = ee(T.locale, e, T.messages);
126
126
  return !t && T.fallbackLocale && (t = ee(T.fallbackLocale, e, T.messages)), t || e.join(".");
127
127
  }
128
128
  function ee(e, t, r) {
129
- return Ge([e, ...t], r);
129
+ return qe([e, ...t], r);
130
130
  }
131
- function it(e, t) {
131
+ function at(e, t) {
132
132
  return e.replace(/\{(\w+)\}/g, (r, n) => t[n]);
133
133
  }
134
- const kt = ke({
134
+ const kt = Le({
135
135
  props: {
136
136
  tag: {
137
137
  type: String,
@@ -143,19 +143,19 @@ const kt = ke({
143
143
  }
144
144
  },
145
145
  setup(e, { slots: t }) {
146
- const r = F(q, B(".", e.path)), n = we(r), i = B(/\{|\}/, n), o = Object.keys(t).map((u) => {
146
+ const r = _(G, F(".", e.path)), n = be(r), i = F(/\{|\}/, n), o = Object.keys(t).map((u) => {
147
147
  const s = i.indexOf(u);
148
148
  return s > -1 && (i[s] = t[u]()[0]), i;
149
149
  });
150
- return () => De(e.tag, o);
150
+ return () => ke(e.tag, o);
151
151
  }
152
152
  });
153
153
  function Dt(e, t = "", r = {}) {
154
- const n = R(""), { t: i } = rt(), o = j(() => {
154
+ const n = R(""), { t: i } = ot(), o = j(() => {
155
155
  if (I(t))
156
156
  try {
157
- const a = at(I(e), I(t));
158
- return et(a, I(e));
157
+ const a = st(I(e), I(t));
158
+ return tt(a, I(e));
159
159
  } catch (a) {
160
160
  n.value = a;
161
161
  }
@@ -166,12 +166,12 @@ function Dt(e, t = "", r = {}) {
166
166
  ...a.tooltip && { tooltip: i(a.tooltip ?? "") }
167
167
  });
168
168
  return {
169
- columns: j(() => F(u, o.value)),
169
+ columns: j(() => _(u, o.value)),
170
170
  error: n
171
171
  };
172
172
  }
173
- function at(e, t = "") {
174
- const r = F(q, B(",", t)), n = qe(e);
173
+ function st(e, t = "") {
174
+ const r = _(G, F(",", t)), n = He(e);
175
175
  if (r[0] === "")
176
176
  return [];
177
177
  const i = r.findIndex((o) => !n.includes(o));
@@ -180,22 +180,22 @@ function at(e, t = "") {
180
180
  return r;
181
181
  }
182
182
  const Te = Symbol("ErrorProviderContext");
183
- function Lt() {
183
+ function Nt() {
184
184
  const e = R(""), t = R({}), r = (o) => {
185
185
  console.error({ error: o }), e.value = o.message || o.error.message, t.value = {
186
186
  message: o.message,
187
- key: o.key || He(o.message),
187
+ key: o.key || Je(o.message),
188
188
  cause: o.cause
189
189
  };
190
190
  }, n = () => {
191
191
  e.value = "", t.value = {};
192
192
  };
193
- return ye(Te, {
193
+ return me(Te, {
194
194
  onError: r,
195
195
  reset: n
196
196
  }), window.onerror = (o) => {
197
197
  console.error("WINDOW_ONERROR:", o);
198
- }, Le((o, u, s) => {
198
+ }, De((o, u, s) => {
199
199
  console.error("onErrorCaptured:", o, u, s);
200
200
  }), {
201
201
  hasError: j(() => e.value.length > 0),
@@ -205,37 +205,37 @@ function Lt() {
205
205
  onError: r
206
206
  };
207
207
  }
208
- function Nt() {
209
- const e = st();
208
+ function _t() {
209
+ const e = ut();
210
210
  return {
211
211
  onError: e.onError,
212
212
  reset: e.reset
213
213
  };
214
214
  }
215
- function st() {
216
- const e = he(Te, null);
215
+ function ut() {
216
+ const e = ve(Te, null);
217
217
  if (e === null)
218
218
  throw new Error("Provider is missing a parent component.");
219
219
  return e;
220
220
  }
221
- function Ae(e) {
222
- return Ne() ? (_e(e), !0) : !1;
221
+ function Ee(e) {
222
+ return _e() ? (Fe(e), !0) : !1;
223
223
  }
224
- const H = typeof window < "u" && typeof document < "u";
224
+ const q = typeof window < "u" && typeof document < "u";
225
225
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
226
- const ut = Object.prototype.toString, ct = (e) => ut.call(e) === "[object Object]", x = () => {
227
- }, lt = /* @__PURE__ */ ft();
228
- function ft() {
226
+ const ct = Object.prototype.toString, lt = (e) => ct.call(e) === "[object Object]", x = () => {
227
+ }, ft = /* @__PURE__ */ dt();
228
+ function dt() {
229
229
  var e, t;
230
- return H && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
230
+ return q && ((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));
231
231
  }
232
- function dt(...e) {
232
+ function pt(...e) {
233
233
  if (e.length !== 1)
234
- return Fe(...e);
234
+ return Me(...e);
235
235
  const t = e[0];
236
- return typeof t == "function" ? oe(Be(() => ({ get: t, set: x }))) : R(t);
236
+ return typeof t == "function" ? ye(Be(() => ({ get: t, set: x }))) : R(t);
237
237
  }
238
- function pt(e, t) {
238
+ function mt(e, t) {
239
239
  function r(...n) {
240
240
  return new Promise((i, o) => {
241
241
  Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(i).catch(o);
@@ -243,11 +243,11 @@ function pt(e, t) {
243
243
  }
244
244
  return r;
245
245
  }
246
- const Ee = (e) => e();
247
- function mt(e = Ee, t = {}) {
246
+ const Ae = (e) => e();
247
+ function vt(e = Ae, t = {}) {
248
248
  const {
249
249
  initialState: r = "active"
250
- } = t, n = dt(r === "active");
250
+ } = t, n = pt(r === "active");
251
251
  function i() {
252
252
  n.value = !1;
253
253
  }
@@ -257,36 +257,36 @@ function mt(e = Ee, t = {}) {
257
257
  const u = (...s) => {
258
258
  n.value && e(...s);
259
259
  };
260
- return { isActive: oe(n), pause: i, resume: o, eventFilter: u };
260
+ return { isActive: ye(n), pause: i, resume: o, eventFilter: u };
261
261
  }
262
262
  function te(e, t = !1, r = "Timeout") {
263
263
  return new Promise((n, i) => {
264
264
  setTimeout(t ? () => i(r) : n, e);
265
265
  });
266
266
  }
267
- function X(e) {
267
+ function V(e) {
268
268
  return Array.isArray(e) ? e : [e];
269
269
  }
270
270
  function yt(e, t, r = {}) {
271
271
  const {
272
- eventFilter: n = Ee,
272
+ eventFilter: n = Ae,
273
273
  ...i
274
274
  } = r;
275
275
  return O(
276
276
  e,
277
- pt(
277
+ mt(
278
278
  n,
279
279
  t
280
280
  ),
281
281
  i
282
282
  );
283
283
  }
284
- function _t(e, t, r = {}) {
284
+ function Ft(e, t, r = {}) {
285
285
  const {
286
286
  eventFilter: n,
287
287
  initialState: i = "active",
288
288
  ...o
289
- } = r, { eventFilter: u, pause: s, resume: a, isActive: d } = mt(n, { initialState: i });
289
+ } = r, { eventFilter: u, pause: s, resume: a, isActive: d } = vt(n, { initialState: i });
290
290
  return { stop: yt(
291
291
  e,
292
292
  t,
@@ -297,73 +297,73 @@ function _t(e, t, r = {}) {
297
297
  ), pause: s, resume: a, isActive: d };
298
298
  }
299
299
  function ne(e, t = !1) {
300
- function r(l, { flush: p = "sync", deep: y = !1, timeout: v, throwOnTimeout: w } = {}) {
300
+ function r(f, { flush: p = "sync", deep: v = !1, timeout: h, throwOnTimeout: b } = {}) {
301
301
  let c = null;
302
- const h = [new Promise((E) => {
302
+ const y = [new Promise((A) => {
303
303
  c = O(
304
304
  e,
305
305
  (g) => {
306
- l(g) !== t && (c ? c() : K(() => c == null ? void 0 : c()), E(g));
306
+ f(g) !== t && (c ? c() : Y(() => c?.()), A(g));
307
307
  },
308
308
  {
309
309
  flush: p,
310
- deep: y,
310
+ deep: v,
311
311
  immediate: !0
312
312
  }
313
313
  );
314
314
  })];
315
- return v != null && h.push(
316
- te(v, w).then(() => A(e)).finally(() => c == null ? void 0 : c())
317
- ), Promise.race(h);
315
+ return h != null && y.push(
316
+ te(h, b).then(() => E(e)).finally(() => c?.())
317
+ ), Promise.race(y);
318
318
  }
319
- function n(l, p) {
320
- if (!We(l))
321
- return r((g) => g === l, p);
322
- const { flush: y = "sync", deep: v = !1, timeout: w, throwOnTimeout: c } = p ?? {};
323
- let f = null;
324
- const E = [new Promise((g) => {
325
- f = O(
326
- [e, l],
327
- ([L, W]) => {
328
- t !== (L === W) && (f ? f() : K(() => f == null ? void 0 : f()), g(L));
319
+ function n(f, p) {
320
+ if (!We(f))
321
+ return r((g) => g === f, p);
322
+ const { flush: v = "sync", deep: h = !1, timeout: b, throwOnTimeout: c } = p ?? {};
323
+ let l = null;
324
+ const A = [new Promise((g) => {
325
+ l = O(
326
+ [e, f],
327
+ ([k, M]) => {
328
+ t !== (k === M) && (l ? l() : Y(() => l?.()), g(k));
329
329
  },
330
330
  {
331
- flush: y,
332
- deep: v,
331
+ flush: v,
332
+ deep: h,
333
333
  immediate: !0
334
334
  }
335
335
  );
336
336
  })];
337
- return w != null && E.push(
338
- te(w, c).then(() => A(e)).finally(() => (f == null || f(), A(e)))
339
- ), Promise.race(E);
337
+ return b != null && A.push(
338
+ te(b, c).then(() => E(e)).finally(() => (l?.(), E(e)))
339
+ ), Promise.race(A);
340
340
  }
341
- function i(l) {
342
- return r((p) => !!p, l);
341
+ function i(f) {
342
+ return r((p) => !!p, f);
343
343
  }
344
- function o(l) {
345
- return n(null, l);
344
+ function o(f) {
345
+ return n(null, f);
346
346
  }
347
- function u(l) {
348
- return n(void 0, l);
347
+ function u(f) {
348
+ return n(void 0, f);
349
349
  }
350
- function s(l) {
351
- return r(Number.isNaN, l);
350
+ function s(f) {
351
+ return r(Number.isNaN, f);
352
352
  }
353
- function a(l, p) {
354
- return r((y) => {
355
- const v = Array.from(y);
356
- return v.includes(l) || v.includes(A(l));
353
+ function a(f, p) {
354
+ return r((v) => {
355
+ const h = Array.from(v);
356
+ return h.includes(f) || h.includes(E(f));
357
357
  }, p);
358
358
  }
359
- function d(l) {
360
- return m(1, l);
359
+ function d(f) {
360
+ return m(1, f);
361
361
  }
362
- function m(l = 1, p) {
363
- let y = -1;
364
- return r(() => (y += 1, y >= l), p);
362
+ function m(f = 1, p) {
363
+ let v = -1;
364
+ return r(() => (v += 1, v >= f), p);
365
365
  }
366
- return Array.isArray(A(e)) ? {
366
+ return Array.isArray(E(e)) ? {
367
367
  toMatch: r,
368
368
  toContains: a,
369
369
  changed: d,
@@ -388,30 +388,30 @@ function ne(e, t = !1) {
388
388
  function ht(e) {
389
389
  return ne(e);
390
390
  }
391
- function vt(e, t, r = {}) {
391
+ function gt(e, t, r = {}) {
392
392
  const {
393
393
  immediate: n = !0,
394
394
  immediateCallback: i = !1
395
395
  } = r, o = C(!1);
396
- let u = null;
396
+ let u;
397
397
  function s() {
398
- u && (clearTimeout(u), u = null);
398
+ u && (clearTimeout(u), u = void 0);
399
399
  }
400
400
  function a() {
401
401
  o.value = !1, s();
402
402
  }
403
403
  function d(...m) {
404
404
  i && e(), s(), o.value = !0, u = setTimeout(() => {
405
- o.value = !1, u = null, e(...m);
406
- }, A(t));
405
+ o.value = !1, u = void 0, e(...m);
406
+ }, E(t));
407
407
  }
408
- return n && (o.value = !0, H && d()), Ae(a), {
409
- isPending: oe(o),
408
+ return n && (o.value = !0, q && d()), Ee(a), {
409
+ isPending: Ne(o),
410
410
  start: d,
411
411
  stop: a
412
412
  };
413
413
  }
414
- function gt(e, t, r) {
414
+ function wt(e, t, r) {
415
415
  return O(
416
416
  e,
417
417
  t,
@@ -421,15 +421,21 @@ function gt(e, t, r) {
421
421
  }
422
422
  );
423
423
  }
424
- function Ft(e, t, r) {
425
- const n = O(e, (...i) => (K(() => n()), t(...i)), r);
426
- return n;
424
+ function Mt(e, t, r) {
425
+ return O(
426
+ e,
427
+ t,
428
+ {
429
+ ...r,
430
+ once: !0
431
+ }
432
+ );
427
433
  }
428
434
  function Bt(e, t, r) {
429
435
  const n = O(
430
436
  e,
431
437
  (i, o, u) => {
432
- i && (r != null && r.once && K(() => n()), t(i, o, u));
438
+ i && (r?.once && Y(() => n()), t(i, o, u));
433
439
  },
434
440
  {
435
441
  ...r,
@@ -438,37 +444,37 @@ function Bt(e, t, r) {
438
444
  );
439
445
  return n;
440
446
  }
441
- const Ie = H ? window : void 0, bt = H ? window.document : void 0;
442
- function _(e) {
447
+ const Ie = q ? window : void 0, bt = q ? window.document : void 0;
448
+ function N(e) {
443
449
  var t;
444
- const r = A(e);
445
- return (t = r == null ? void 0 : r.$el) != null ? t : r;
450
+ const r = E(e);
451
+ return (t = r?.$el) != null ? t : r;
446
452
  }
447
- function D(...e) {
453
+ function z(...e) {
448
454
  const t = [], r = () => {
449
455
  t.forEach((s) => s()), t.length = 0;
450
456
  }, n = (s, a, d, m) => (s.addEventListener(a, d, m), () => s.removeEventListener(a, d, m)), i = j(() => {
451
- const s = X(A(e[0])).filter((a) => a != null);
457
+ const s = V(E(e[0])).filter((a) => a != null);
452
458
  return s.every((a) => typeof a != "string") ? s : void 0;
453
- }), o = gt(
459
+ }), o = wt(
454
460
  () => {
455
461
  var s, a;
456
462
  return [
457
- (a = (s = i.value) == null ? void 0 : s.map((d) => _(d))) != null ? a : [Ie].filter((d) => d != null),
458
- X(A(i.value ? e[1] : e[0])),
459
- X(I(i.value ? e[2] : e[1])),
463
+ (a = (s = i.value) == null ? void 0 : s.map((d) => N(d))) != null ? a : [Ie].filter((d) => d != null),
464
+ V(E(i.value ? e[1] : e[0])),
465
+ V(I(i.value ? e[2] : e[1])),
460
466
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
461
- A(i.value ? e[3] : e[2])
467
+ E(i.value ? e[3] : e[2])
462
468
  ];
463
469
  },
464
470
  ([s, a, d, m]) => {
465
- if (r(), !(s != null && s.length) || !(a != null && a.length) || !(d != null && d.length))
471
+ if (r(), !s?.length || !a?.length || !d?.length)
466
472
  return;
467
- const l = ct(m) ? { ...m } : m;
473
+ const f = lt(m) ? { ...m } : m;
468
474
  t.push(
469
475
  ...s.flatMap(
470
476
  (p) => a.flatMap(
471
- (y) => d.map((v) => n(p, y, v, l))
477
+ (v) => d.map((h) => n(p, v, h, f))
472
478
  )
473
479
  )
474
480
  );
@@ -477,38 +483,38 @@ function D(...e) {
477
483
  ), u = () => {
478
484
  o(), r();
479
485
  };
480
- return Ae(r), u;
486
+ return Ee(r), u;
481
487
  }
482
- let ce = !1;
488
+ let ue = !1;
483
489
  function Wt(e, t, r = {}) {
484
490
  const { window: n = Ie, ignore: i = [], capture: o = !0, detectIframe: u = !1, controls: s = !1 } = r;
485
491
  if (!n)
486
492
  return s ? { stop: x, cancel: x, trigger: x } : x;
487
- if (lt && !ce) {
488
- ce = !0;
493
+ if (ft && !ue) {
494
+ ue = !0;
489
495
  const c = { passive: !0 };
490
- Array.from(n.document.body.children).forEach((f) => D(f, "click", x, c)), D(n.document.documentElement, "click", x, c);
496
+ Array.from(n.document.body.children).forEach((l) => l.addEventListener("click", x, c)), n.document.documentElement.addEventListener("click", x, c);
491
497
  }
492
498
  let a = !0;
493
- const d = (c) => A(i).some((f) => {
494
- if (typeof f == "string")
495
- return Array.from(n.document.querySelectorAll(f)).some((h) => h === c.target || c.composedPath().includes(h));
499
+ const d = (c) => E(i).some((l) => {
500
+ if (typeof l == "string")
501
+ return Array.from(n.document.querySelectorAll(l)).some((y) => y === c.target || c.composedPath().includes(y));
496
502
  {
497
- const h = _(f);
498
- return h && (c.target === h || c.composedPath().includes(h));
503
+ const y = N(l);
504
+ return y && (c.target === y || c.composedPath().includes(y));
499
505
  }
500
506
  });
501
507
  function m(c) {
502
- const f = A(c);
503
- return f && f.$.subTree.shapeFlag === 16;
508
+ const l = E(c);
509
+ return l && l.$.subTree.shapeFlag === 16;
504
510
  }
505
- function l(c, f) {
506
- const h = A(c), E = h.$.subTree && h.$.subTree.children;
507
- return E == null || !Array.isArray(E) ? !1 : E.some((g) => g.el === f.target || f.composedPath().includes(g.el));
511
+ function f(c, l) {
512
+ const y = E(c), A = y.$.subTree && y.$.subTree.children;
513
+ return A == null || !Array.isArray(A) ? !1 : A.some((g) => g.el === l.target || l.composedPath().includes(g.el));
508
514
  }
509
515
  const p = (c) => {
510
- const f = _(e);
511
- if (c.target != null && !(!(f instanceof Element) && m(e) && l(e, c)) && !(!f || f === c.target || c.composedPath().includes(f))) {
516
+ const l = N(e);
517
+ if (c.target != null && !(!(l instanceof Element) && m(e) && f(e, c)) && !(!l || l === c.target || c.composedPath().includes(l))) {
512
518
  if ("detail" in c && c.detail === 0 && (a = !d(c)), !a) {
513
519
  a = !0;
514
520
  return;
@@ -516,36 +522,36 @@ function Wt(e, t, r = {}) {
516
522
  t(c);
517
523
  }
518
524
  };
519
- let y = !1;
520
- const v = [
521
- D(n, "click", (c) => {
522
- y || (y = !0, setTimeout(() => {
523
- y = !1;
525
+ let v = !1;
526
+ const h = [
527
+ z(n, "click", (c) => {
528
+ v || (v = !0, setTimeout(() => {
529
+ v = !1;
524
530
  }, 0), p(c));
525
531
  }, { passive: !0, capture: o }),
526
- D(n, "pointerdown", (c) => {
527
- const f = _(e);
528
- a = !d(c) && !!(f && !c.composedPath().includes(f));
532
+ z(n, "pointerdown", (c) => {
533
+ const l = N(e);
534
+ a = !d(c) && !!(l && !c.composedPath().includes(l));
529
535
  }, { passive: !0 }),
530
- u && D(n, "blur", (c) => {
536
+ u && z(n, "blur", (c) => {
531
537
  setTimeout(() => {
532
- var f;
533
- const h = _(e);
534
- ((f = n.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(h != null && h.contains(n.document.activeElement)) && t(c);
538
+ var l;
539
+ const y = N(e);
540
+ ((l = n.document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !y?.contains(n.document.activeElement) && t(c);
535
541
  }, 0);
536
542
  }, { passive: !0 })
537
- ].filter(Boolean), w = () => v.forEach((c) => c());
543
+ ].filter(Boolean), b = () => h.forEach((c) => c());
538
544
  return s ? {
539
- stop: w,
545
+ stop: b,
540
546
  cancel: () => {
541
547
  a = !1;
542
548
  },
543
549
  trigger: (c) => {
544
550
  a = !0, p(c), a = !1;
545
551
  }
546
- } : w;
552
+ } : b;
547
553
  }
548
- function wt(e, t, r) {
554
+ function Tt(e, t, r) {
549
555
  const {
550
556
  immediate: n = !0,
551
557
  delay: i = 0,
@@ -554,59 +560,60 @@ function wt(e, t, r) {
554
560
  resetOnExecute: s = !0,
555
561
  shallow: a = !0,
556
562
  throwError: d
557
- } = r ?? {}, m = a ? C(t) : R(t), l = C(!1), p = C(!1), y = C(void 0);
558
- async function v(f = 0, ...h) {
559
- s && (m.value = t), y.value = void 0, l.value = !1, p.value = !0, f > 0 && await te(f);
560
- const E = typeof e == "function" ? e(...h) : e;
563
+ } = r ?? {}, m = a ? C(t) : R(t), f = C(!1), p = C(!1), v = C(void 0);
564
+ async function h(l = 0, ...y) {
565
+ s && (m.value = t), v.value = void 0, f.value = !1, p.value = !0, l > 0 && await te(l);
566
+ const A = typeof e == "function" ? e(...y) : e;
561
567
  try {
562
- const g = await E;
563
- m.value = g, l.value = !0, u(g);
568
+ const g = await A;
569
+ m.value = g, f.value = !0, u(g);
564
570
  } catch (g) {
565
- if (y.value = g, o(g), d)
571
+ if (v.value = g, o(g), d)
566
572
  throw g;
567
573
  } finally {
568
574
  p.value = !1;
569
575
  }
570
576
  return m.value;
571
577
  }
572
- n && v(i);
573
- const w = {
578
+ n && h(i);
579
+ const b = {
574
580
  state: m,
575
- isReady: l,
581
+ isReady: f,
576
582
  isLoading: p,
577
- error: y,
578
- execute: v
583
+ error: v,
584
+ execute: h,
585
+ executeImmediate: (...l) => h(0, ...l)
579
586
  };
580
587
  function c() {
581
- return new Promise((f, h) => {
582
- ht(p).toBe(!1).then(() => f(w)).catch(h);
588
+ return new Promise((l, y) => {
589
+ ht(p).toBe(!1).then(() => l(b)).catch(y);
583
590
  });
584
591
  }
585
592
  return {
586
- ...w,
587
- then(f, h) {
588
- return c().then(f, h);
593
+ ...b,
594
+ then(l, y) {
595
+ return c().then(l, y);
589
596
  }
590
597
  };
591
598
  }
592
- function Mt(e = {}) {
599
+ function $t(e = {}) {
593
600
  const { document: t = bt } = e;
594
601
  if (!t)
595
602
  return C("visible");
596
603
  const r = C(t.visibilityState);
597
- return D(t, "visibilitychange", () => {
604
+ return z(t, "visibilitychange", () => {
598
605
  r.value = t.visibilityState;
599
606
  }, { passive: !0 }), r;
600
607
  }
601
- async function Tt(e) {
608
+ async function Et(e) {
602
609
  return new Promise((t, r) => {
603
- const n = new Image(), { src: i, srcset: o, sizes: u, class: s, loading: a, crossorigin: d, referrerPolicy: m, width: l, height: p, decoding: y, fetchPriority: v, ismap: w, usemap: c } = e;
604
- n.src = i, o != null && (n.srcset = o), u != null && (n.sizes = u), s != null && (n.className = s), a != null && (n.loading = a), d != null && (n.crossOrigin = d), m != null && (n.referrerPolicy = m), l != null && (n.width = l), p != null && (n.height = p), y != null && (n.decoding = y), v != null && (n.fetchPriority = v), w != null && (n.isMap = w), c != null && (n.useMap = c), n.onload = () => t(n), n.onerror = r;
610
+ const n = new Image(), { src: i, srcset: o, sizes: u, class: s, loading: a, crossorigin: d, referrerPolicy: m, width: f, height: p, decoding: v, fetchPriority: h, ismap: b, usemap: c } = e;
611
+ n.src = i, o != null && (n.srcset = o), u != null && (n.sizes = u), s != null && (n.className = s), a != null && (n.loading = a), d != null && (n.crossOrigin = d), m != null && (n.referrerPolicy = m), f != null && (n.width = f), p != null && (n.height = p), v != null && (n.decoding = v), h != null && (n.fetchPriority = h), b != null && (n.isMap = b), c != null && (n.useMap = c), n.onload = () => t(n), n.onerror = r;
605
612
  });
606
613
  }
607
- function $t(e, t = {}) {
608
- const r = wt(
609
- () => Tt(A(e)),
614
+ function Ut(e, t = {}) {
615
+ const r = Tt(
616
+ () => Et(E(e)),
610
617
  void 0,
611
618
  {
612
619
  resetOnExecute: !0,
@@ -614,16 +621,16 @@ function $t(e, t = {}) {
614
621
  }
615
622
  );
616
623
  return O(
617
- () => A(e),
624
+ () => E(e),
618
625
  () => r.execute(t.delay),
619
626
  { deep: !0 }
620
627
  ), r;
621
628
  }
622
- function Ut(e = [], t = {}) {
629
+ function zt(e = [], t = {}) {
623
630
  const { delay: r = 0 } = t, n = R(!1), i = j(() => {
624
631
  const s = I(e);
625
632
  return Array.isArray(s) ? s.map((a) => I(a)).some(Boolean) : s;
626
- }), { start: o, stop: u } = vt(() => {
633
+ }), { start: o, stop: u } = gt(() => {
627
634
  n.value = !0;
628
635
  }, r);
629
636
  return O(
@@ -650,7 +657,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
650
657
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
651
658
  PERFORMANCE OF THIS SOFTWARE.
652
659
  ***************************************************************************** */
653
- function Y(e, t) {
660
+ function X(e, t) {
654
661
  var r = typeof Symbol == "function" && e[Symbol.iterator];
655
662
  if (!r) return e;
656
663
  var n, i, o = r.call(e), u = [];
@@ -667,15 +674,15 @@ function Y(e, t) {
667
674
  }
668
675
  return u;
669
676
  }
670
- var le;
677
+ var ce;
671
678
  (function(e) {
672
679
  e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
673
- })(le || (le = {}));
680
+ })(ce || (ce = {}));
674
681
  var At = { type: "xstate.init" };
675
- function U(e) {
682
+ function $(e) {
676
683
  return e === void 0 ? [] : [].concat(e);
677
684
  }
678
- function fe(e, t) {
685
+ function le(e, t) {
679
686
  return typeof (e = typeof e == "string" && t && t[e] ? t[e] : e) == "string" ? { type: e } : typeof e == "function" ? { type: e.name, exec: e } : e;
680
687
  }
681
688
  function re(e) {
@@ -683,13 +690,13 @@ function re(e) {
683
690
  return e === t;
684
691
  };
685
692
  }
686
- function Et(e) {
693
+ function It(e) {
687
694
  return typeof e == "string" ? { type: e } : e;
688
695
  }
689
- function de(e, t) {
696
+ function fe(e, t) {
690
697
  return { value: e, context: t, actions: [], changed: !1, matches: re(e) };
691
698
  }
692
- function pe(e, t, r) {
699
+ function de(e, t, r) {
693
700
  var n = t, i = !1;
694
701
  return [e.filter(function(o) {
695
702
  if (o.type === "xstate.assign") {
@@ -702,85 +709,85 @@ function pe(e, t, r) {
702
709
  return !0;
703
710
  }), n, i];
704
711
  }
705
- function It(e, t) {
712
+ function Ot(e, t) {
706
713
  t === void 0 && (t = {});
707
- var r = Y(pe(U(e.states[e.initial].entry).map(function(u) {
708
- return fe(u, t.actions);
714
+ var r = X(de($(e.states[e.initial].entry).map(function(u) {
715
+ return le(u, t.actions);
709
716
  }), e.context, At), 2), n = r[0], i = r[1], o = { config: e, _options: t, initialState: { value: e.initial, actions: n, context: i, matches: re(e.initial) }, transition: function(u, s) {
710
- var a, d, m = typeof u == "string" ? { value: u, context: e.context } : u, l = m.value, p = m.context, y = Et(s), v = e.states[l];
711
- if (v.on) {
712
- var w = U(v.on[y.type]);
713
- "*" in v.on && w.push.apply(w, function(b, S, Q) {
714
- if (arguments.length === 2) for (var P, k = 0, je = S.length; k < je; k++) !P && k in S || (P || (P = Array.prototype.slice.call(S, 0, k)), P[k] = S[k]);
715
- return b.concat(P || Array.prototype.slice.call(S));
716
- }([], Y(U(v.on["*"])), !1));
717
+ var a, d, m = typeof u == "string" ? { value: u, context: e.context } : u, f = m.value, p = m.context, v = It(s), h = e.states[f];
718
+ if (h.on) {
719
+ var b = $(h.on[v.type]);
720
+ "*" in h.on && b.push.apply(b, function(w, S, J) {
721
+ if (arguments.length === 2) for (var P, L = 0, je = S.length; L < je; L++) !P && L in S || (P || (P = Array.prototype.slice.call(S, 0, L)), P[L] = S[L]);
722
+ return w.concat(P || Array.prototype.slice.call(S));
723
+ }([], X($(h.on["*"])), !1));
717
724
  try {
718
- for (var c = function(b) {
719
- var S = typeof Symbol == "function" && Symbol.iterator, Q = S && b[S], P = 0;
720
- if (Q) return Q.call(b);
721
- if (b && typeof b.length == "number") return { next: function() {
722
- return b && P >= b.length && (b = void 0), { value: b && b[P++], done: !b };
725
+ for (var c = function(w) {
726
+ var S = typeof Symbol == "function" && Symbol.iterator, J = S && w[S], P = 0;
727
+ if (J) return J.call(w);
728
+ if (w && typeof w.length == "number") return { next: function() {
729
+ return w && P >= w.length && (w = void 0), { value: w && w[P++], done: !w };
723
730
  } };
724
731
  throw new TypeError(S ? "Object is not iterable." : "Symbol.iterator is not defined.");
725
- }(w), f = c.next(); !f.done; f = c.next()) {
726
- var h = f.value;
727
- if (h === void 0) return de(l, p);
728
- var E = typeof h == "string" ? { target: h } : h, g = E.target, L = E.actions, W = L === void 0 ? [] : L, ie = E.cond, Oe = ie === void 0 ? function() {
732
+ }(b), l = c.next(); !l.done; l = c.next()) {
733
+ var y = l.value;
734
+ if (y === void 0) return fe(f, p);
735
+ var A = typeof y == "string" ? { target: y } : y, g = A.target, k = A.actions, M = k === void 0 ? [] : k, oe = A.cond, Oe = oe === void 0 ? function() {
729
736
  return !0;
730
- } : ie, Se = g === void 0, xe = g ?? l, Pe = e.states[xe];
731
- if (Oe(p, y)) {
732
- var J = Y(pe((Se ? U(W) : [].concat(v.exit, W, Pe.entry).filter(function(b) {
733
- return b;
734
- })).map(function(b) {
735
- return fe(b, o._options.actions);
736
- }), p, y), 3), ae = J[0], Re = J[1], Ce = J[2], se = g ?? l;
737
- return { value: se, context: Re, actions: ae, changed: g !== l || ae.length > 0 || Ce, matches: re(se) };
737
+ } : oe, Se = g === void 0, xe = g ?? f, Pe = e.states[xe];
738
+ if (Oe(p, v)) {
739
+ var H = X(de((Se ? $(M) : [].concat(h.exit, M, Pe.entry).filter(function(w) {
740
+ return w;
741
+ })).map(function(w) {
742
+ return le(w, o._options.actions);
743
+ }), p, v), 3), ie = H[0], Re = H[1], Ce = H[2], ae = g ?? f;
744
+ return { value: ae, context: Re, actions: ie, changed: g !== f || ie.length > 0 || Ce, matches: re(ae) };
738
745
  }
739
746
  }
740
- } catch (b) {
741
- a = { error: b };
747
+ } catch (w) {
748
+ a = { error: w };
742
749
  } finally {
743
750
  try {
744
- f && !f.done && (d = c.return) && d.call(c);
751
+ l && !l.done && (d = c.return) && d.call(c);
745
752
  } finally {
746
753
  if (a) throw a.error;
747
754
  }
748
755
  }
749
756
  }
750
- return de(l, p);
757
+ return fe(f, p);
751
758
  } };
752
759
  return o;
753
760
  }
754
- const Ot = It({
761
+ const St = Ot({
755
762
  id: "sort",
756
- initial: $,
763
+ initial: W,
757
764
  states: {
758
- [$]: {
765
+ [W]: {
759
766
  on: {
760
- DIRECTION1: V,
761
- DIRECTION2: z
767
+ DIRECTION1: Q,
768
+ DIRECTION2: U
762
769
  }
763
770
  },
764
- [V]: {
771
+ [Q]: {
765
772
  on: {
766
- DIRECTION1: z,
767
- DIRECTION2: $
773
+ DIRECTION1: U,
774
+ DIRECTION2: W
768
775
  }
769
776
  },
770
- [z]: {
777
+ [U]: {
771
778
  on: {
772
- DIRECTION1: $,
773
- DIRECTION2: V
779
+ DIRECTION1: W,
780
+ DIRECTION2: Q
774
781
  }
775
782
  }
776
783
  }
777
784
  });
778
- function St(e, t) {
779
- const r = t === z ? "DIRECTION2" : "DIRECTION1";
780
- return Ot.transition(e, r).value;
785
+ function xt(e, t) {
786
+ const r = t === U ? "DIRECTION2" : "DIRECTION1";
787
+ return St.transition(e, r).value;
781
788
  }
782
- function zt(e = {}) {
783
- const { sortTarget: t = null, orders: r = [] } = e, n = me({ sortTarget: t, orders: r });
789
+ function Kt(e = {}) {
790
+ const { sortTarget: t = null, orders: r = [] } = e, n = pe({ sortTarget: t, orders: r });
784
791
  return {
785
792
  sort: n,
786
793
  change: ({ target: o, orders: u }) => {
@@ -790,7 +797,7 @@ function zt(e = {}) {
790
797
  }
791
798
  const s = u.map((a, d) => ({
792
799
  ...a,
793
- direction: St(n.orders[d].direction, a.direction)
800
+ direction: xt(n.orders[d].direction, a.direction)
794
801
  }));
795
802
  n.sortTarget = o, n.orders = s;
796
803
  }
@@ -798,24 +805,24 @@ function zt(e = {}) {
798
805
  }
799
806
  export {
800
807
  Dt as a,
801
- Lt as b,
802
- Nt as c,
803
- jt as d,
804
- rt as e,
805
- Ut as f,
806
- zt as g,
807
- $t as h,
808
+ Nt as b,
809
+ _t as c,
810
+ Lt as d,
811
+ ot as e,
812
+ zt as f,
813
+ Kt as g,
814
+ Ut as h,
808
815
  kt as i,
809
- Ve as j,
810
- Ft as k,
811
- _t as l,
812
- Ze as m,
816
+ Xe as j,
817
+ Mt as k,
818
+ Ft as l,
819
+ et as m,
813
820
  x as n,
814
821
  Wt as o,
815
- _ as p,
816
- wt as q,
817
- Mt as r,
818
- Ct as u,
819
- at as v,
822
+ N as p,
823
+ Tt as q,
824
+ $t as r,
825
+ jt as u,
826
+ st as v,
820
827
  Bt as w
821
828
  };