@mjsz-vbr-elements/core 2.2.2 → 2.2.3

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.
Binary file
Binary file
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.2 - 08/01/2024, 11:28:47
3
+ * version: v2.2.3 - 27/01/2024, 13:29:55
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
- import { m, c as p, b as f, d as N, e as u, g as R, I as d, _ as g, k as C, a as I, j as M, f as y, h as O, i as P, l as U } from "./AdditionalStandingsText-nuhfGhAD.js";
9
- import { c as D, i as x, h as F, u as G, b as h, a as b, d as B, e as Y, f as w, g as k, v as V } from "./useAdditionalText-hj0kZWr7.js";
8
+ import { m, c as p, b as f, d as N, e as u, g as R, I as d, _ as g, k as C, a as I, j as M, f as y, h as O, i as P, l as U } from "./AdditionalStandingsText-NpkyVKB_.js";
9
+ import { c as D, i as x, h as F, u as G, b as h, a as b, d as B, e as Y, f as w, g as k, v as V } from "./useAdditionalText-EldMke4U.js";
10
10
  import { fetchVBRData as z, usePage as K, useScrollToGameDate as X, useServices as Z, useVisibilityChange as H } from "./composables.js";
11
11
  import "vue";
12
12
  import { I as J, U as q, W as Q, i as $, c as ee, e as ae, f as te, h as se, g as re, a as oe, l as ne, p as ie, r as le, s as Se, t as _e, b as Te, d as Ee, u as Le } from "./convert-rWfB71vI.js";
@@ -1,20 +1,20 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.2 - 08/01/2024, 11:28:47
3
+ * version: v2.2.3 - 27/01/2024, 13:29:55
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
- import { ref as w, readonly as me, watch as I, nextTick as Ce, getCurrentScope as Ne, onScopeDispose as De, unref as T, isRef as Le, shallowRef as te, computed as A, reactive as ye, defineComponent as Fe, h as Be, provide as ge, inject as he, onErrorCaptured as Ve } from "vue";
9
- import { _ as F, j as Ue, k as ke, l as We, m as Me, n as ze, p as qe, q as j, s as R, r as Ke, t as Ge, u as He, v as Xe, w as re } from "./datetime--bMmvxSM.js";
8
+ import { ref as w, readonly as me, watch as T, nextTick as Ce, getCurrentScope as Ne, onScopeDispose as De, unref as E, isRef as Le, shallowRef as te, computed as A, reactive as ye, defineComponent as Fe, h as Be, provide as ge, inject as he, onErrorCaptured as Ve } from "vue";
9
+ import { _ as F, j as Ue, k as ke, l as Me, m as We, n as ze, p as qe, q as j, s as R, r as Ke, t as Ge, u as He, v as Xe, w as re } from "./datetime--bMmvxSM.js";
10
10
  import { SORT_STATE_ORIGINAL as N, SORT_STATE_DESCEND as z, SORT_STATE_ASCEND as D } from "./constants.js";
11
11
  var Ye = { VITE_VBR_API_URL: "https://api.icehockey.hu/vbr", VITE_VBR_API_KEY: "", VITE_USER_NODE_ENV: "production", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
12
12
  const Ht = (e) => (Ye.VITE_CSS_CLASS_PREFIX || "mjsz-vbr-") + e;
13
13
  function _e(e) {
14
14
  return Ne() ? (De(e), !0) : !1;
15
15
  }
16
- function E(e) {
17
- return typeof e == "function" ? e() : T(e);
16
+ function P(e) {
17
+ return typeof e == "function" ? e() : E(e);
18
18
  }
19
19
  const k = typeof window < "u", B = () => {
20
20
  }, Je = /* @__PURE__ */ Qe();
@@ -50,32 +50,32 @@ function K(e, t = !1, r = "Timeout") {
50
50
  });
51
51
  }
52
52
  function G(e, t = !1) {
53
- function r(l, { flush: s = "sync", deep: f = !1, timeout: v, throwOnTimeout: P } = {}) {
53
+ function r(l, { flush: i = "sync", deep: f = !1, timeout: v, throwOnTimeout: I } = {}) {
54
54
  let _ = null;
55
55
  const O = [new Promise((b) => {
56
- _ = I(
56
+ _ = T(
57
57
  e,
58
58
  (m) => {
59
59
  l(m) !== t && (_ == null || _(), b(m));
60
60
  },
61
61
  {
62
- flush: s,
62
+ flush: i,
63
63
  deep: f,
64
64
  immediate: !0
65
65
  }
66
66
  );
67
67
  })];
68
68
  return v != null && O.push(
69
- K(v, P).then(() => E(e)).finally(() => _ == null ? void 0 : _())
69
+ K(v, I).then(() => P(e)).finally(() => _ == null ? void 0 : _())
70
70
  ), Promise.race(O);
71
71
  }
72
- function n(l, s) {
72
+ function n(l, i) {
73
73
  if (!Le(l))
74
- return r((m) => m === l, s);
75
- const { flush: f = "sync", deep: v = !1, timeout: P, throwOnTimeout: _ } = s ?? {};
74
+ return r((m) => m === l, i);
75
+ const { flush: f = "sync", deep: v = !1, timeout: I, throwOnTimeout: _ } = i ?? {};
76
76
  let y = null;
77
77
  const b = [new Promise((m) => {
78
- y = I(
78
+ y = T(
79
79
  [e, l],
80
80
  ([S, C]) => {
81
81
  t !== (S === C) && (y == null || y(), m(S));
@@ -87,12 +87,12 @@ function G(e, t = !1) {
87
87
  }
88
88
  );
89
89
  })];
90
- return P != null && b.push(
91
- K(P, _).then(() => E(e)).finally(() => (y == null || y(), E(e)))
90
+ return I != null && b.push(
91
+ K(I, _).then(() => P(e)).finally(() => (y == null || y(), P(e)))
92
92
  ), Promise.race(b);
93
93
  }
94
94
  function a(l) {
95
- return r((s) => !!s, l);
95
+ return r((i) => !!i, l);
96
96
  }
97
97
  function o(l) {
98
98
  return n(null, l);
@@ -100,23 +100,23 @@ function G(e, t = !1) {
100
100
  function c(l) {
101
101
  return n(void 0, l);
102
102
  }
103
- function i(l) {
103
+ function s(l) {
104
104
  return r(Number.isNaN, l);
105
105
  }
106
- function u(l, s) {
106
+ function u(l, i) {
107
107
  return r((f) => {
108
108
  const v = Array.from(f);
109
- return v.includes(l) || v.includes(E(l));
110
- }, s);
109
+ return v.includes(l) || v.includes(P(l));
110
+ }, i);
111
111
  }
112
112
  function p(l) {
113
113
  return d(1, l);
114
114
  }
115
- function d(l = 1, s) {
115
+ function d(l = 1, i) {
116
116
  let f = -1;
117
- return r(() => (f += 1, f >= l), s);
117
+ return r(() => (f += 1, f >= l), i);
118
118
  }
119
- return Array.isArray(E(e)) ? {
119
+ return Array.isArray(P(e)) ? {
120
120
  toMatch: r,
121
121
  toContains: u,
122
122
  changed: p,
@@ -129,7 +129,7 @@ function G(e, t = !1) {
129
129
  toBe: n,
130
130
  toBeTruthy: a,
131
131
  toBeNull: o,
132
- toBeNaN: i,
132
+ toBeNaN: s,
133
133
  toBeUndefined: c,
134
134
  changed: p,
135
135
  changedTimes: d,
@@ -149,18 +149,18 @@ function rt(e, t, r = {}) {
149
149
  function c() {
150
150
  o && (clearTimeout(o), o = null);
151
151
  }
152
- function i() {
152
+ function s() {
153
153
  a.value = !1, c();
154
154
  }
155
155
  function u(...p) {
156
156
  c(), a.value = !0, o = setTimeout(() => {
157
157
  a.value = !1, o = null, e(...p);
158
- }, E(t));
158
+ }, P(t));
159
159
  }
160
- return n && (a.value = !0, k && u()), _e(i), {
160
+ return n && (a.value = !0, k && u()), _e(s), {
161
161
  isPending: me(a),
162
162
  start: u,
163
- stop: i
163
+ stop: s
164
164
  };
165
165
  }
166
166
  var ne = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, ot = Object.prototype.propertyIsEnumerable, at = (e, t) => {
@@ -178,7 +178,7 @@ function it(e, t, r = {}) {
178
178
  } = n, o = at(n, [
179
179
  "eventFilter"
180
180
  ]);
181
- return I(
181
+ return T(
182
182
  e,
183
183
  Ze(
184
184
  a,
@@ -188,7 +188,7 @@ function it(e, t, r = {}) {
188
188
  );
189
189
  }
190
190
  function st(e, t, r) {
191
- const n = I(e, (...a) => (Ce(() => n()), t(...a)), r);
191
+ const n = T(e, (...a) => (Ce(() => n()), t(...a)), r);
192
192
  }
193
193
  var ct = Object.defineProperty, ut = Object.defineProperties, lt = Object.getOwnPropertyDescriptors, V = Object.getOwnPropertySymbols, we = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable, oe = (e, t, r) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ft = (e, t) => {
194
194
  for (var r in t || (t = {}))
@@ -211,17 +211,17 @@ function Xt(e, t, r = {}) {
211
211
  eventFilter: a
212
212
  } = n, o = dt(n, [
213
213
  "eventFilter"
214
- ]), { eventFilter: c, pause: i, resume: u, isActive: p } = et(a);
214
+ ]), { eventFilter: c, pause: s, resume: u, isActive: p } = et(a);
215
215
  return { stop: it(
216
216
  e,
217
217
  t,
218
218
  pt(ft({}, o), {
219
219
  eventFilter: c
220
220
  })
221
- ), pause: i, resume: u, isActive: p };
221
+ ), pause: s, resume: u, isActive: p };
222
222
  }
223
223
  function Yt(e, t, r) {
224
- return I(
224
+ return T(
225
225
  e,
226
226
  (n, a, o) => {
227
227
  n && t(n, a, o);
@@ -231,7 +231,7 @@ function Yt(e, t, r) {
231
231
  }
232
232
  function $(e) {
233
233
  var t;
234
- const r = E(e);
234
+ const r = P(e);
235
235
  return (t = r == null ? void 0 : r.$el) != null ? t : r;
236
236
  }
237
237
  const Ee = k ? window : void 0, vt = k ? window.document : void 0;
@@ -242,11 +242,11 @@ function L(...e) {
242
242
  Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
243
243
  const o = [], c = () => {
244
244
  o.forEach((d) => d()), o.length = 0;
245
- }, i = (d, l, s, f) => (d.addEventListener(l, s, f), () => d.removeEventListener(l, s, f)), u = I(
246
- () => [$(t), E(a)],
245
+ }, s = (d, l, i, f) => (d.addEventListener(l, i, f), () => d.removeEventListener(l, i, f)), u = T(
246
+ () => [$(t), P(a)],
247
247
  ([d, l]) => {
248
248
  c(), d && o.push(
249
- ...r.flatMap((s) => n.map((f) => i(d, s, f, l)))
249
+ ...r.flatMap((i) => n.map((f) => s(d, i, f, l)))
250
250
  );
251
251
  },
252
252
  { immediate: !0, flush: "post" }
@@ -260,37 +260,37 @@ function Jt(e, t, r = {}) {
260
260
  const { window: n = Ee, ignore: a = [], capture: o = !0, detectIframe: c = !1 } = r;
261
261
  if (!n)
262
262
  return;
263
- Je && !ae && (ae = !0, Array.from(n.document.body.children).forEach((s) => s.addEventListener("click", B)));
264
- let i = !0;
265
- const u = (s) => a.some((f) => {
263
+ Je && !ae && (ae = !0, Array.from(n.document.body.children).forEach((i) => i.addEventListener("click", B)));
264
+ let s = !0;
265
+ const u = (i) => a.some((f) => {
266
266
  if (typeof f == "string")
267
- return Array.from(n.document.querySelectorAll(f)).some((v) => v === s.target || s.composedPath().includes(v));
267
+ return Array.from(n.document.querySelectorAll(f)).some((v) => v === i.target || i.composedPath().includes(v));
268
268
  {
269
269
  const v = $(f);
270
- return v && (s.target === v || s.composedPath().includes(v));
270
+ return v && (i.target === v || i.composedPath().includes(v));
271
271
  }
272
272
  }), d = [
273
- L(n, "click", (s) => {
273
+ L(n, "click", (i) => {
274
274
  const f = $(e);
275
- if (!(!f || f === s.target || s.composedPath().includes(f))) {
276
- if (s.detail === 0 && (i = !u(s)), !i) {
277
- i = !0;
275
+ if (!(!f || f === i.target || i.composedPath().includes(f))) {
276
+ if (i.detail === 0 && (s = !u(i)), !s) {
277
+ s = !0;
278
278
  return;
279
279
  }
280
- t(s);
280
+ t(i);
281
281
  }
282
282
  }, { passive: !0, capture: o }),
283
- L(n, "pointerdown", (s) => {
283
+ L(n, "pointerdown", (i) => {
284
284
  const f = $(e);
285
- f && (i = !s.composedPath().includes(f) && !u(s));
285
+ f && (s = !i.composedPath().includes(f) && !u(i));
286
286
  }, { passive: !0 }),
287
- c && L(n, "blur", (s) => {
287
+ c && L(n, "blur", (i) => {
288
288
  var f;
289
289
  const v = $(e);
290
- ((f = n.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(v != null && v.contains(n.document.activeElement)) && t(s);
290
+ ((f = n.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(v != null && v.contains(n.document.activeElement)) && t(i);
291
291
  })
292
292
  ].filter(Boolean);
293
- return () => d.forEach((s) => s());
293
+ return () => d.forEach((i) => i());
294
294
  }
295
295
  var mt = Object.defineProperty, yt = Object.defineProperties, gt = Object.getOwnPropertyDescriptors, ie = Object.getOwnPropertySymbols, ht = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable, se = (e, t, r) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ot = (e, t) => {
296
296
  for (var r in t || (t = {}))
@@ -306,12 +306,12 @@ function bt(e, t, r) {
306
306
  delay: a = 0,
307
307
  onError: o = B,
308
308
  onSuccess: c = B,
309
- resetOnExecute: i = !0,
309
+ resetOnExecute: s = !0,
310
310
  shallow: u = !0,
311
311
  throwError: p
312
- } = r ?? {}, d = u ? te(t) : w(t), l = w(!1), s = w(!1), f = te(void 0);
312
+ } = r ?? {}, d = u ? te(t) : w(t), l = w(!1), i = w(!1), f = te(void 0);
313
313
  async function v(y = 0, ...O) {
314
- i && (d.value = t), f.value = void 0, l.value = !1, s.value = !0, y > 0 && await K(y);
314
+ s && (d.value = t), f.value = void 0, l.value = !1, i.value = !0, y > 0 && await K(y);
315
315
  const b = typeof e == "function" ? e(...O) : e;
316
316
  try {
317
317
  const m = await b;
@@ -320,24 +320,24 @@ function bt(e, t, r) {
320
320
  if (f.value = m, o(m), p)
321
321
  throw m;
322
322
  } finally {
323
- s.value = !1;
323
+ i.value = !1;
324
324
  }
325
325
  return d.value;
326
326
  }
327
327
  n && v(a);
328
- const P = {
328
+ const I = {
329
329
  state: d,
330
330
  isReady: l,
331
- isLoading: s,
331
+ isLoading: i,
332
332
  error: f,
333
333
  execute: v
334
334
  };
335
335
  function _() {
336
336
  return new Promise((y, O) => {
337
- tt(s).toBe(!1).then(() => y(P)).catch(O);
337
+ tt(i).toBe(!1).then(() => y(I)).catch(O);
338
338
  });
339
339
  }
340
- return wt(Ot({}, P), {
340
+ return wt(Ot({}, I), {
341
341
  then(y, O) {
342
342
  return _().then(y, O);
343
343
  }
@@ -351,45 +351,45 @@ function Qt({ document: e = vt } = {}) {
351
351
  t.value = e.visibilityState;
352
352
  }), t;
353
353
  }
354
- var Et = Object.defineProperty, ce = Object.getOwnPropertySymbols, Pt = Object.prototype.hasOwnProperty, Tt = Object.prototype.propertyIsEnumerable, ue = (e, t, r) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, It = (e, t) => {
354
+ var Et = Object.defineProperty, ce = Object.getOwnPropertySymbols, Pt = Object.prototype.hasOwnProperty, It = Object.prototype.propertyIsEnumerable, ue = (e, t, r) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Tt = (e, t) => {
355
355
  for (var r in t || (t = {}))
356
356
  Pt.call(t, r) && ue(e, r, t[r]);
357
357
  if (ce)
358
358
  for (var r of ce(t))
359
- Tt.call(t, r) && ue(e, r, t[r]);
359
+ It.call(t, r) && ue(e, r, t[r]);
360
360
  return e;
361
361
  };
362
362
  async function At(e) {
363
363
  return new Promise((t, r) => {
364
- const n = new Image(), { src: a, srcset: o, sizes: c, class: i, loading: u, crossorigin: p } = e;
365
- n.src = a, o && (n.srcset = o), c && (n.sizes = c), i && (n.className = i), u && (n.loading = u), p && (n.crossOrigin = p), n.onload = () => t(n), n.onerror = r;
364
+ const n = new Image(), { src: a, srcset: o, sizes: c, class: s, loading: u, crossorigin: p } = e;
365
+ n.src = a, o && (n.srcset = o), c && (n.sizes = c), s && (n.className = s), u && (n.loading = u), p && (n.crossOrigin = p), n.onload = () => t(n), n.onerror = r;
366
366
  });
367
367
  }
368
368
  function Zt(e, t = {}) {
369
369
  const r = bt(
370
- () => At(E(e)),
370
+ () => At(P(e)),
371
371
  void 0,
372
- It({
372
+ Tt({
373
373
  resetOnExecute: !0
374
374
  }, t)
375
375
  );
376
- return I(
377
- () => E(e),
376
+ return T(
377
+ () => P(e),
378
378
  () => r.execute(t.delay),
379
379
  { deep: !0 }
380
380
  ), r;
381
381
  }
382
382
  function er(e = [], t = {}) {
383
383
  const { delay: r = 0 } = t, n = w(!1), a = A(() => {
384
- const i = T(e);
385
- return Array.isArray(i) ? i.map((u) => T(u)).some(Boolean) : i;
384
+ const s = E(e);
385
+ return Array.isArray(s) ? s.map((u) => E(u)).some(Boolean) : s;
386
386
  }), { start: o, stop: c } = rt(() => {
387
387
  n.value = !0;
388
388
  }, r);
389
- return I(
389
+ return T(
390
390
  a,
391
- (i) => {
392
- if (i)
391
+ (s) => {
392
+ if (s)
393
393
  return o();
394
394
  c(), n.value = !1;
395
395
  },
@@ -401,7 +401,7 @@ function St(e) {
401
401
  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]";
402
402
  }
403
403
  var xt = /* @__PURE__ */ F(function(t) {
404
- 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() : Ue(t) ? [] : ke(t) ? "" : We(t) ? {} : Me(t) ? /* @__PURE__ */ function() {
404
+ 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() : Ue(t) ? [] : ke(t) ? "" : Me(t) ? {} : We(t) ? /* @__PURE__ */ function() {
405
405
  return arguments;
406
406
  }() : St(t) ? t.constructor.from("") : void 0;
407
407
  }), $t = /* @__PURE__ */ F(function(t) {
@@ -409,8 +409,8 @@ var xt = /* @__PURE__ */ F(function(t) {
409
409
  }), jt = /* @__PURE__ */ qe(function(t, r) {
410
410
  for (var n = {}, a = {}, o = 0, c = t.length; o < c; )
411
411
  a[t[o]] = 1, o += 1;
412
- for (var i in r)
413
- a.hasOwnProperty(i) || (n[i] = r[i]);
412
+ for (var s in r)
413
+ a.hasOwnProperty(s) || (n[s] = r[s]);
414
414
  return n;
415
415
  }), x = `
416
416
  \v\f\r                 \u2028\u2029\uFEFF`, Rt = "​", Ct = typeof String.prototype.trim == "function", Nt = !Ct || /* @__PURE__ */ x.trim() || !/* @__PURE__ */ Rt.trim() ? /* @__PURE__ */ F(function(t) {
@@ -428,7 +428,7 @@ const U = Nt, Pe = Symbol("I18nContext"), h = ye({
428
428
  const n = (u, p = {}) => {
429
429
  const d = !$t(p), l = j(U, R(".", u));
430
430
  return A(() => {
431
- const f = Te(l);
431
+ const f = Ie(l);
432
432
  return d ? Ft(f, p) : f;
433
433
  }).value;
434
434
  }, a = (u) => {
@@ -436,7 +436,7 @@ const U = Nt, Pe = Symbol("I18nContext"), h = ye({
436
436
  return !!H(h.locale, p, h.messages);
437
437
  }, o = (u) => {
438
438
  h.locale = u;
439
- }, i = {
439
+ }, s = {
440
440
  locale: A({
441
441
  get() {
442
442
  return h.locale;
@@ -447,9 +447,9 @@ const U = Nt, Pe = Symbol("I18nContext"), h = ye({
447
447
  }),
448
448
  setLocale: o,
449
449
  translate: n,
450
- hasTranlation: a
450
+ hasTranslation: a
451
451
  };
452
- return ge(Pe, i), {
452
+ return ge(Pe, s), {
453
453
  translate: n
454
454
  };
455
455
  }, Dt = (e) => {
@@ -459,14 +459,14 @@ const U = Nt, Pe = Symbol("I18nContext"), h = ye({
459
459
  locale: t.locale,
460
460
  t: t.translate,
461
461
  setLocale: t.setLocale,
462
- hasTranlation: t.hasTranlation
462
+ hasTranslation: t.hasTranslation
463
463
  };
464
464
  }, Lt = () => {
465
465
  const e = he(Pe, null);
466
466
  if (e === null)
467
467
  throw new Error("Privider is missing a parent component.");
468
468
  return e;
469
- }, Te = (e = []) => {
469
+ }, Ie = (e = []) => {
470
470
  let t = H(h.locale, e, h.messages);
471
471
  return !t && h.fallbackLocale && (t = H(h.fallbackLocale, e, h.messages)), t || e.join(".");
472
472
  };
@@ -489,13 +489,13 @@ const Ft = function(e, t) {
489
489
  }
490
490
  },
491
491
  setup(e, { slots: t }) {
492
- const r = j(U, R(".", e.path)), n = Te(r), a = R(/{|}/, n), o = Object.keys(t).map((c) => {
493
- const i = a.indexOf(c);
494
- return i > -1 && (a[i] = t[c]()[0]), a;
492
+ const r = j(U, R(".", e.path)), n = Ie(r), a = R(/{|}/, n), o = Object.keys(t).map((c) => {
493
+ const s = a.indexOf(c);
494
+ return s > -1 && (a[s] = t[c]()[0]), a;
495
495
  });
496
496
  return () => Be(e.tag, o);
497
497
  }
498
- }), Ie = Symbol("ErrorProviderContext"), nr = () => {
498
+ }), Te = Symbol("ErrorProviderContext"), nr = () => {
499
499
  const e = w(""), t = w({}), r = (o) => {
500
500
  console.error({ error: o }), e.value = o.message || o.error.message, t.value = {
501
501
  message: o.message,
@@ -503,15 +503,15 @@ const Ft = function(e, t) {
503
503
  cause: o.cause
504
504
  };
505
505
  };
506
- return ge(Ie, {
506
+ return ge(Te, {
507
507
  onError: r,
508
508
  reset: () => {
509
509
  e.value = "", t.value = {};
510
510
  }
511
511
  }), window.onerror = (o) => {
512
512
  console.error("WINDOW_ONERROR:", o);
513
- }, Ve((o, c, i) => {
514
- console.error("onErrorCaptured:", o, c, i);
513
+ }, Ve((o, c, s) => {
514
+ console.error("onErrorCaptured:", o, c, s);
515
515
  }), {
516
516
  hasError: A(() => e.value.length > 0),
517
517
  message: e,
@@ -525,23 +525,23 @@ const Ft = function(e, t) {
525
525
  reset: e.reset
526
526
  };
527
527
  }, Bt = () => {
528
- const e = he(Ie, null);
528
+ const e = he(Te, null);
529
529
  if (e === null)
530
530
  throw new Error("Privider is missing a parent component.");
531
531
  return e;
532
532
  }, ar = (e, t = "", r = {}) => {
533
533
  const n = w(""), { t: a } = Dt(), o = A(() => {
534
- if (T(t))
534
+ if (E(t))
535
535
  try {
536
- const u = Vt(T(e), T(t));
537
- return jt(u, T(e));
536
+ const u = Vt(E(e), E(t));
537
+ return jt(u, E(e));
538
538
  } catch (u) {
539
539
  n.value = u;
540
540
  }
541
- return T(e);
541
+ return E(e);
542
542
  }), c = (u) => ({
543
543
  ...u,
544
- ...u.label && { label: a(u.label ?? "", T(r)) },
544
+ ...u.label && { label: a(u.label ?? "", E(r)) },
545
545
  ...u.tooltip && { tooltip: a(u.tooltip ?? "") }
546
546
  });
547
547
  return {
@@ -579,8 +579,8 @@ function le(e, t) {
579
579
  try {
580
580
  for (; (t === void 0 || t-- > 0) && !(n = o.next()).done; )
581
581
  c.push(n.value);
582
- } catch (i) {
583
- a = { error: i };
582
+ } catch (s) {
583
+ a = { error: s };
584
584
  } finally {
585
585
  try {
586
586
  n && !n.done && (r = o.return) && r.call(o);
@@ -619,44 +619,44 @@ function ve(e, t, r) {
619
619
  if (o.type === "xstate.assign") {
620
620
  a = !0;
621
621
  var c = Object.assign({}, n);
622
- return typeof o.assignment == "function" ? c = o.assignment(n, r) : Object.keys(o.assignment).forEach(function(i) {
623
- c[i] = typeof o.assignment[i] == "function" ? o.assignment[i](n, r) : o.assignment[i];
622
+ return typeof o.assignment == "function" ? c = o.assignment(n, r) : Object.keys(o.assignment).forEach(function(s) {
623
+ c[s] = typeof o.assignment[s] == "function" ? o.assignment[s](n, r) : o.assignment[s];
624
624
  }), n = c, !1;
625
625
  }
626
626
  return !0;
627
627
  }), n, a];
628
628
  }
629
- function Wt(e, t) {
629
+ function Mt(e, t) {
630
630
  t === void 0 && (t = {});
631
631
  var r = le(ve(q(e.states[e.initial].entry).map(function(c) {
632
632
  return pe(c, t.actions);
633
- }), e.context, Ut), 2), n = r[0], a = r[1], o = { config: e, _options: t, initialState: { value: e.initial, actions: n, context: a, matches: X(e.initial) }, transition: function(c, i) {
634
- var u, p, d = typeof c == "string" ? { value: c, context: e.context } : c, l = d.value, s = d.context, f = kt(i), v = e.states[l];
633
+ }), e.context, Ut), 2), n = r[0], a = r[1], o = { config: e, _options: t, initialState: { value: e.initial, actions: n, context: a, matches: X(e.initial) }, transition: function(c, s) {
634
+ var u, p, d = typeof c == "string" ? { value: c, context: e.context } : c, l = d.value, i = d.context, f = kt(s), v = e.states[l];
635
635
  if (v.on) {
636
- var P = q(v.on[f.type]);
636
+ var I = q(v.on[f.type]);
637
637
  try {
638
638
  for (var _ = function(g) {
639
- var M = typeof Symbol == "function" && Symbol.iterator, Z = M && g[M], ee = 0;
639
+ var W = typeof Symbol == "function" && Symbol.iterator, Z = W && g[W], ee = 0;
640
640
  if (Z)
641
641
  return Z.call(g);
642
642
  if (g && typeof g.length == "number")
643
643
  return { next: function() {
644
644
  return g && ee >= g.length && (g = void 0), { value: g && g[ee++], done: !g };
645
645
  } };
646
- throw new TypeError(M ? "Object is not iterable." : "Symbol.iterator is not defined.");
647
- }(P), y = _.next(); !y.done; y = _.next()) {
646
+ throw new TypeError(W ? "Object is not iterable." : "Symbol.iterator is not defined.");
647
+ }(I), y = _.next(); !y.done; y = _.next()) {
648
648
  var O = y.value;
649
649
  if (O === void 0)
650
- return de(l, s);
650
+ return de(l, i);
651
651
  var b = typeof O == "string" ? { target: O } : O, m = b.target, S = b.actions, C = S === void 0 ? [] : S, Y = b.cond, Ae = Y === void 0 ? function() {
652
652
  return !0;
653
653
  } : Y, Se = m === void 0, xe = m ?? l, $e = e.states[xe];
654
- if (Ae(s, f)) {
655
- var W = le(ve((Se ? q(C) : [].concat(v.exit, C, $e.entry).filter(function(g) {
654
+ if (Ae(i, f)) {
655
+ var M = le(ve((Se ? q(C) : [].concat(v.exit, C, $e.entry).filter(function(g) {
656
656
  return g;
657
657
  })).map(function(g) {
658
658
  return pe(g, o._options.actions);
659
- }), s, f), 3), J = W[0], je = W[1], Re = W[2], Q = m ?? l;
659
+ }), i, f), 3), J = M[0], je = M[1], Re = M[2], Q = m ?? l;
660
660
  return { value: Q, context: je, actions: J, changed: m !== l || J.length > 0 || Re, matches: X(Q) };
661
661
  }
662
662
  }
@@ -671,11 +671,11 @@ function Wt(e, t) {
671
671
  }
672
672
  }
673
673
  }
674
- return de(l, s);
674
+ return de(l, i);
675
675
  } };
676
676
  return o;
677
677
  }
678
- const Mt = Wt({
678
+ const Wt = Mt({
679
679
  id: "sort",
680
680
  initial: N,
681
681
  states: {
@@ -700,7 +700,7 @@ const Mt = Wt({
700
700
  }
701
701
  }), zt = (e, t) => {
702
702
  const r = t === D ? "DIRECTION2" : "DIRECTION1";
703
- return Mt.transition(e, r).value;
703
+ return Wt.transition(e, r).value;
704
704
  };
705
705
  function ir(e = {}) {
706
706
  const { sortTarget: t = null, orders: r = [] } = e, n = ye({ sortTarget: t, orders: r });
@@ -711,32 +711,32 @@ function ir(e = {}) {
711
711
  n.sortTarget = o, n.orders = c;
712
712
  return;
713
713
  }
714
- const i = c.map((u, p) => ({
714
+ const s = c.map((u, p) => ({
715
715
  ...u,
716
716
  direction: zt(n.orders[p].direction, u.direction)
717
717
  }));
718
- n.sortTarget = o, n.orders = i;
718
+ n.sortTarget = o, n.orders = s;
719
719
  }
720
720
  };
721
721
  }
722
- function sr(e, t, r) {
723
- const n = w(""), a = w(!1);
724
- return st(e, (c) => {
725
- const i = Xe(re(t), c), u = i.length > 0;
726
- if (a.value = u, !u)
727
- return n.value = "";
728
- const d = i.map((l) => ({
729
- team: l.team.longName,
730
- points: re(t, l)
731
- })).map((l) => r(`additionalText.${t}.content`, l)).join(", ");
732
- n.value = [
722
+ function sr(e, t, r, n) {
723
+ const a = w(""), o = w(!1), c = (s) => {
724
+ const u = Xe(re(t), s), p = u.length > 0;
725
+ if (o.value = p, !p)
726
+ return a.value = "";
727
+ const l = u.map((i) => ({
728
+ team: i.team.longName,
729
+ points: Math.abs(re(t, i))
730
+ })).map((i) => r(`additionalText.${t}.content`, i)).join(", ");
731
+ a.value = [
733
732
  r(`additionalText.${t}.prependix`),
734
- d,
733
+ l,
735
734
  ...r(`additionalText.${t}.appendix`) && [r(`additionalText.${t}.appendix`)]
736
735
  ].join(" ");
737
- }), {
738
- text: n,
739
- isVisible: a
736
+ };
737
+ return st(e, c), T(n, () => c(E(e))), {
738
+ text: a,
739
+ isVisible: o
740
740
  };
741
741
  }
742
742
  export {
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.2 - 08/01/2024, 11:28:47
3
+ * version: v2.2.3 - 27/01/2024, 13:29:55
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>