@orbcharts/core 3.0.0-beta.6 → 3.0.0-beta.7

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.
@@ -370,12 +370,12 @@ function Ui(t, e, n) {
370
370
  function Ee(t, e, n) {
371
371
  return e = +e, t = +t, n = +n, oe(t, e, n)[2];
372
372
  }
373
- function zi(t, e, n) {
373
+ function Hi(t, e, n) {
374
374
  e = +e, t = +t, n = +n;
375
375
  const r = e < t, i = r ? Ee(e, t, n) : Ee(t, e, n);
376
376
  return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
377
377
  }
378
- function Hi(t, e, n) {
378
+ function zi(t, e, n) {
379
379
  t = +t, e = +e, n = (i = arguments.length) < 2 ? (e = t, t = 0, 1) : i < 3 ? 1 : +n;
380
380
  for (var r = -1, i = Math.max(0, Math.ceil((e - t) / n)) | 0, a = new Array(i); ++r < i; )
381
381
  a[r] = t + r * n;
@@ -471,17 +471,17 @@ function ar(t) {
471
471
  }
472
472
  function Zi() {
473
473
  }
474
- function ze(t) {
474
+ function He(t) {
475
475
  return t == null ? Zi : function() {
476
476
  return this.querySelector(t);
477
477
  };
478
478
  }
479
479
  function Qi(t) {
480
- typeof t != "function" && (t = ze(t));
480
+ typeof t != "function" && (t = He(t));
481
481
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
482
482
  for (var a = e[i], o = a.length, s = r[i] = new Array(o), u, l, f = 0; f < o; ++f)
483
483
  (u = a[f]) && (l = t.call(u, u.__data__, f, a)) && ("__data__" in u && (l.__data__ = u.__data__), s[f] = l);
484
- return new z(r, this._parents);
484
+ return new H(r, this._parents);
485
485
  }
486
486
  function ta(t) {
487
487
  return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
@@ -504,7 +504,7 @@ function ra(t) {
504
504
  for (var e = this._groups, n = e.length, r = [], i = [], a = 0; a < n; ++a)
505
505
  for (var o = e[a], s = o.length, u, l = 0; l < s; ++l)
506
506
  (u = o[l]) && (r.push(t.call(u, u.__data__, l, o)), i.push(u));
507
- return new z(r, i);
507
+ return new H(r, i);
508
508
  }
509
509
  function sr(t) {
510
510
  return function() {
@@ -545,13 +545,13 @@ function ha(t) {
545
545
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
546
546
  for (var a = e[i], o = a.length, s = r[i] = [], u, l = 0; l < o; ++l)
547
547
  (u = a[l]) && t.call(u, u.__data__, l, a) && s.push(u);
548
- return new z(r, this._parents);
548
+ return new H(r, this._parents);
549
549
  }
550
550
  function lr(t) {
551
551
  return new Array(t.length);
552
552
  }
553
553
  function pa() {
554
- return new z(this._enter || this._groups.map(lr), this._parents);
554
+ return new H(this._enter || this._groups.map(lr), this._parents);
555
555
  }
556
556
  function se(t, e) {
557
557
  this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
@@ -607,13 +607,13 @@ function va(t, e) {
607
607
  T._next = _ || null;
608
608
  }
609
609
  }
610
- return o = new z(o, r), o._enter = s, o._exit = u, o;
610
+ return o = new H(o, r), o._enter = s, o._exit = u, o;
611
611
  }
612
612
  function ba(t) {
613
613
  return typeof t == "object" && "length" in t ? t : Array.from(t);
614
614
  }
615
615
  function xa() {
616
- return new z(this._exit || this._groups.map(lr), this._parents);
616
+ return new H(this._exit || this._groups.map(lr), this._parents);
617
617
  }
618
618
  function wa(t, e, n) {
619
619
  var r = this.enter(), i = this, a = this.exit();
@@ -625,7 +625,7 @@ function Da(t) {
625
625
  (p = l[m] || f[m]) && (h[m] = p);
626
626
  for (; u < i; ++u)
627
627
  s[u] = n[u];
628
- return new z(s, this._parents);
628
+ return new H(s, this._parents);
629
629
  }
630
630
  function $a() {
631
631
  for (var t = this._groups, e = -1, n = t.length; ++e < n; )
@@ -643,7 +643,7 @@ function _a(t) {
643
643
  (l = o[f]) && (u[f] = l);
644
644
  u.sort(e);
645
645
  }
646
- return new z(i, this._parents).order();
646
+ return new H(i, this._parents).order();
647
647
  }
648
648
  function Aa(t, e) {
649
649
  return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
@@ -752,19 +752,19 @@ function Ua(t, e) {
752
752
  this[t] = e;
753
753
  };
754
754
  }
755
- function za(t, e) {
755
+ function Ha(t, e) {
756
756
  return function() {
757
757
  var n = e.apply(this, arguments);
758
758
  n == null ? delete this[t] : this[t] = n;
759
759
  };
760
760
  }
761
- function Ha(t, e) {
762
- return arguments.length > 1 ? this.each((e == null ? Ya : typeof e == "function" ? za : Ua)(t, e)) : this.node()[t];
761
+ function za(t, e) {
762
+ return arguments.length > 1 ? this.each((e == null ? Ya : typeof e == "function" ? Ha : Ua)(t, e)) : this.node()[t];
763
763
  }
764
764
  function fr(t) {
765
765
  return t.trim().split(/^|\s+/);
766
766
  }
767
- function He(t) {
767
+ function ze(t) {
768
768
  return t.classList || new hr(t);
769
769
  }
770
770
  function hr(t) {
@@ -784,10 +784,10 @@ hr.prototype = {
784
784
  }
785
785
  };
786
786
  function pr(t, e) {
787
- for (var n = He(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
787
+ for (var n = ze(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
788
788
  }
789
789
  function mr(t, e) {
790
- for (var n = He(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
790
+ for (var n = ze(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
791
791
  }
792
792
  function qa(t) {
793
793
  return function() {
@@ -807,7 +807,7 @@ function Wa(t, e) {
807
807
  function Ja(t, e) {
808
808
  var n = fr(t + "");
809
809
  if (arguments.length < 2) {
810
- for (var r = He(this.node()), i = -1, a = n.length; ++i < a; ) if (!r.contains(n[i])) return !1;
810
+ for (var r = ze(this.node()), i = -1, a = n.length; ++i < a; ) if (!r.contains(n[i])) return !1;
811
811
  return !0;
812
812
  }
813
813
  return this.each((typeof e == "function" ? Wa : e ? qa : ja)(n, e));
@@ -868,7 +868,7 @@ function co() {
868
868
  return null;
869
869
  }
870
870
  function fo(t, e) {
871
- var n = typeof t == "function" ? t : ar(t), r = e == null ? co : typeof e == "function" ? e : ze(e);
871
+ var n = typeof t == "function" ? t : ar(t), r = e == null ? co : typeof e == "function" ? e : He(e);
872
872
  return this.select(function() {
873
873
  return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
874
874
  });
@@ -966,17 +966,17 @@ function* Co() {
966
966
  (o = r[i]) && (yield o);
967
967
  }
968
968
  var gr = [null];
969
- function z(t, e) {
969
+ function H(t, e) {
970
970
  this._groups = t, this._parents = e;
971
971
  }
972
- function zt() {
973
- return new z([[document.documentElement]], gr);
972
+ function Ht() {
973
+ return new H([[document.documentElement]], gr);
974
974
  }
975
975
  function Mo() {
976
976
  return this;
977
977
  }
978
- z.prototype = zt.prototype = {
979
- constructor: z,
978
+ H.prototype = Ht.prototype = {
979
+ constructor: H,
980
980
  select: Qi,
981
981
  selectAll: ra,
982
982
  selectChild: sa,
@@ -998,7 +998,7 @@ z.prototype = zt.prototype = {
998
998
  each: La,
999
999
  attr: Ba,
1000
1000
  style: Xa,
1001
- property: Ha,
1001
+ property: za,
1002
1002
  classed: Ja,
1003
1003
  text: to,
1004
1004
  html: io,
@@ -1014,7 +1014,7 @@ z.prototype = zt.prototype = {
1014
1014
  [Symbol.iterator]: Co
1015
1015
  };
1016
1016
  function Wt(t) {
1017
- return typeof t == "string" ? new z([[document.querySelector(t)]], [document.documentElement]) : new z([[t]], gr);
1017
+ return typeof t == "string" ? new H([[document.querySelector(t)]], [document.documentElement]) : new H([[t]], gr);
1018
1018
  }
1019
1019
  function qe(t, e, n) {
1020
1020
  t.prototype = e.prototype = n, n.constructor = t;
@@ -1024,7 +1024,7 @@ function yr(t, e) {
1024
1024
  for (var r in e) n[r] = e[r];
1025
1025
  return n;
1026
1026
  }
1027
- function Ht() {
1027
+ function zt() {
1028
1028
  }
1029
1029
  var It = 0.7, ue = 1 / It, _t = "\\s*([+-]?\\d+)\\s*", Vt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Z = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", To = /^#([0-9a-f]{3,8})$/, Fo = new RegExp(`^rgb\\(${_t},${_t},${_t}\\)$`), Lo = new RegExp(`^rgb\\(${Z},${Z},${Z}\\)$`), Eo = new RegExp(`^rgba\\(${_t},${_t},${_t},${Vt}\\)$`), Po = new RegExp(`^rgba\\(${Z},${Z},${Z},${Vt}\\)$`), Oo = new RegExp(`^hsl\\(${Vt},${Z},${Z}\\)$`), ko = new RegExp(`^hsla\\(${Vt},${Z},${Z},${Vt}\\)$`), yn = {
1030
1030
  aliceblue: 15792383,
@@ -1176,7 +1176,7 @@ var It = 0.7, ue = 1 / It, _t = "\\s*([+-]?\\d+)\\s*", Vt = "\\s*([+-]?(?:\\d*\\
1176
1176
  yellow: 16776960,
1177
1177
  yellowgreen: 10145074
1178
1178
  };
1179
- qe(Ht, gt, {
1179
+ qe(zt, gt, {
1180
1180
  copy(t) {
1181
1181
  return Object.assign(new this.constructor(), this, t);
1182
1182
  },
@@ -1214,7 +1214,7 @@ function Jt(t, e, n, r) {
1214
1214
  return r <= 0 && (t = e = n = NaN), new Y(t, e, n, r);
1215
1215
  }
1216
1216
  function Bo(t) {
1217
- return t instanceof Ht || (t = gt(t)), t ? (t = t.rgb(), new Y(t.r, t.g, t.b, t.opacity)) : new Y();
1217
+ return t instanceof zt || (t = gt(t)), t ? (t = t.rgb(), new Y(t.r, t.g, t.b, t.opacity)) : new Y();
1218
1218
  }
1219
1219
  function Oe(t, e, n, r) {
1220
1220
  return arguments.length === 1 ? Bo(t) : new Y(t, e, n, r ?? 1);
@@ -1222,7 +1222,7 @@ function Oe(t, e, n, r) {
1222
1222
  function Y(t, e, n, r) {
1223
1223
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
1224
1224
  }
1225
- qe(Y, Oe, yr(Ht, {
1225
+ qe(Y, Oe, yr(zt, {
1226
1226
  brighter(t) {
1227
1227
  return t = t == null ? ue : Math.pow(ue, t), new Y(this.r * t, this.g * t, this.b * t, this.opacity);
1228
1228
  },
@@ -1269,7 +1269,7 @@ function $n(t, e, n, r) {
1269
1269
  }
1270
1270
  function vr(t) {
1271
1271
  if (t instanceof J) return new J(t.h, t.s, t.l, t.opacity);
1272
- if (t instanceof Ht || (t = gt(t)), !t) return new J();
1272
+ if (t instanceof zt || (t = gt(t)), !t) return new J();
1273
1273
  if (t instanceof J) return t;
1274
1274
  t = t.rgb();
1275
1275
  var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = NaN, s = a - i, u = (a + i) / 2;
@@ -1281,7 +1281,7 @@ function Vo(t, e, n, r) {
1281
1281
  function J(t, e, n, r) {
1282
1282
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
1283
1283
  }
1284
- qe(J, Vo, yr(Ht, {
1284
+ qe(J, Vo, yr(zt, {
1285
1285
  brighter(t) {
1286
1286
  return t = t == null ? ue : Math.pow(ue, t), new J(this.h, this.s, this.l * t, this.opacity);
1287
1287
  },
@@ -1355,10 +1355,10 @@ function Uo(t, e) {
1355
1355
  return r;
1356
1356
  };
1357
1357
  }
1358
- function zo(t) {
1358
+ function Ho(t) {
1359
1359
  return ArrayBuffer.isView(t) && !(t instanceof DataView);
1360
1360
  }
1361
- function Ho(t, e) {
1361
+ function zo(t, e) {
1362
1362
  var n = e ? e.length : 0, r = t ? Math.min(n, t.length) : 0, i = new Array(r), a = new Array(n), o;
1363
1363
  for (o = 0; o < r; ++o) i[o] = We(t[o], e[o]);
1364
1364
  for (; o < n; ++o) a[o] = e[o];
@@ -1410,7 +1410,7 @@ function xr(t, e) {
1410
1410
  }
1411
1411
  function We(t, e) {
1412
1412
  var n = typeof e, r;
1413
- return e == null || n === "boolean" ? je(e) : (n === "number" ? W : n === "string" ? (r = gt(e)) ? (e = r, ce) : xr : e instanceof gt ? ce : e instanceof Date ? qo : zo(e) ? Uo : Array.isArray(e) ? Ho : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? jo : W)(t, e);
1413
+ return e == null || n === "boolean" ? je(e) : (n === "number" ? W : n === "string" ? (r = gt(e)) ? (e = r, ce) : xr : e instanceof gt ? ce : e instanceof Date ? qo : Ho(e) ? Uo : Array.isArray(e) ? zo : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? jo : W)(t, e);
1414
1414
  }
1415
1415
  function Ko(t, e) {
1416
1416
  return t = +t, e = +e, function(n) {
@@ -1849,7 +1849,7 @@ function Xs() {
1849
1849
  }
1850
1850
  function Ys(t) {
1851
1851
  var e = this._name, n = this._id;
1852
- typeof t != "function" && (t = ze(t));
1852
+ typeof t != "function" && (t = He(t));
1853
1853
  for (var r = this._groups, i = r.length, a = new Array(i), o = 0; o < i; ++o)
1854
1854
  for (var s = r[o], u = s.length, l = a[o] = new Array(u), f, c, h = 0; h < u; ++h)
1855
1855
  (f = s[h]) && (c = t.call(f, f.__data__, h, s)) && ("__data__" in f && (c.__data__ = f.__data__), l[h] = c, De(l[h], e, n, h, l, K(f, n)));
@@ -1867,9 +1867,9 @@ function Us(t) {
1867
1867
  }
1868
1868
  return new rt(a, o, e, n);
1869
1869
  }
1870
- var zs = zt.prototype.constructor;
1871
- function Hs() {
1872
- return new zs(this._groups, this._parents);
1870
+ var Hs = Ht.prototype.constructor;
1871
+ function zs() {
1872
+ return new Hs(this._groups, this._parents);
1873
1873
  }
1874
1874
  function qs(t, e) {
1875
1875
  var n, r, i;
@@ -1995,7 +1995,7 @@ function rt(t, e, n, r) {
1995
1995
  function Tr() {
1996
1996
  return ++lu;
1997
1997
  }
1998
- var nt = zt.prototype;
1998
+ var nt = Ht.prototype;
1999
1999
  rt.prototype = {
2000
2000
  constructor: rt,
2001
2001
  select: Ys,
@@ -2004,7 +2004,7 @@ rt.prototype = {
2004
2004
  selectChildren: nt.selectChildren,
2005
2005
  filter: Ns,
2006
2006
  merge: Rs,
2007
- selection: Hs,
2007
+ selection: zs,
2008
2008
  transition: su,
2009
2009
  call: nt.call,
2010
2010
  nodes: nt.nodes,
@@ -2052,8 +2052,8 @@ function pu(t) {
2052
2052
  (u = o[l]) && De(u, t, e, l, o, n || hu(u, e));
2053
2053
  return new rt(r, this._parents, t, e);
2054
2054
  }
2055
- zt.prototype.interrupt = cs;
2056
- zt.prototype.transition = pu;
2055
+ Ht.prototype.interrupt = cs;
2056
+ Ht.prototype.transition = pu;
2057
2057
  function mu(t) {
2058
2058
  return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
2059
2059
  }
@@ -2272,7 +2272,7 @@ function Pr() {
2272
2272
  function c() {
2273
2273
  var h = e().length, p = i < r, m = p ? i : r, d = p ? r : i;
2274
2274
  a = (d - m) / Math.max(1, h - u + l * 2), s && (a = Math.floor(a)), m += (d - m - a * (h - u)) * f, o = a * (1 - u), s && (m = Math.round(m), o = Math.round(o));
2275
- var v = Hi(h).map(function(D) {
2275
+ var v = zi(h).map(function(D) {
2276
2276
  return m + a * D;
2277
2277
  });
2278
2278
  return n(p ? v.reverse() : v);
@@ -2382,7 +2382,7 @@ function Pu() {
2382
2382
  return Eu()(Dt, Dt);
2383
2383
  }
2384
2384
  function Ou(t, e, n, r) {
2385
- var i = zi(t, e, n), a;
2385
+ var i = Hi(t, e, n), a;
2386
2386
  switch (r = de(r ?? ",f"), r.type) {
2387
2387
  case "s": {
2388
2388
  var o = Math.max(Math.abs(t), Math.abs(e));
@@ -2997,20 +2997,20 @@ var Ur = {
2997
2997
  Promise: void 0,
2998
2998
  useDeprecatedSynchronousErrorHandling: !1,
2999
2999
  useDeprecatedNextContext: !1
3000
- }, zr = {
3000
+ }, Hr = {
3001
3001
  setTimeout: function(t, e) {
3002
3002
  for (var n = [], r = 2; r < arguments.length; r++)
3003
3003
  n[r - 2] = arguments[r];
3004
3004
  return setTimeout.apply(void 0, st([t, e], ot(n)));
3005
3005
  },
3006
3006
  clearTimeout: function(t) {
3007
- var e = zr.delegate;
3007
+ var e = Hr.delegate;
3008
3008
  return ((e == null ? void 0 : e.clearTimeout) || clearTimeout)(t);
3009
3009
  },
3010
3010
  delegate: void 0
3011
3011
  };
3012
- function Hr(t) {
3013
- zr.setTimeout(function() {
3012
+ function zr(t) {
3013
+ Hr.setTimeout(function() {
3014
3014
  throw t;
3015
3015
  });
3016
3016
  }
@@ -3050,11 +3050,11 @@ var an = function(t) {
3050
3050
  this.unsubscribe();
3051
3051
  }
3052
3052
  }, e;
3053
- }(qt), zu = Function.prototype.bind;
3053
+ }(qt), Hu = Function.prototype.bind;
3054
3054
  function Te(t, e) {
3055
- return zu.call(t, e);
3055
+ return Hu.call(t, e);
3056
3056
  }
3057
- var Hu = function() {
3057
+ var zu = function() {
3058
3058
  function t(e) {
3059
3059
  this.partialObserver = e;
3060
3060
  }
@@ -3105,12 +3105,12 @@ var Hu = function() {
3105
3105
  complete: n.complete && Te(n.complete, s)
3106
3106
  }) : o = n;
3107
3107
  }
3108
- return a.destination = new Hu(o), a;
3108
+ return a.destination = new zu(o), a;
3109
3109
  }
3110
3110
  return e;
3111
3111
  }(an);
3112
3112
  function te(t) {
3113
- Hr(t);
3113
+ zr(t);
3114
3114
  }
3115
3115
  function qu(t) {
3116
3116
  throw t;
@@ -3577,7 +3577,7 @@ function ri(t) {
3577
3577
  function ii(t) {
3578
3578
  return N(t == null ? void 0 : t.getReader);
3579
3579
  }
3580
- function H(t) {
3580
+ function z(t) {
3581
3581
  if (t instanceof O)
3582
3582
  return t;
3583
3583
  if (t != null) {
@@ -3617,7 +3617,7 @@ function cl(t) {
3617
3617
  e.closed || (e.next(n), e.complete());
3618
3618
  }, function(n) {
3619
3619
  return e.error(n);
3620
- }).then(null, Hr);
3620
+ }).then(null, zr);
3621
3621
  });
3622
3622
  }
3623
3623
  function fl(t) {
@@ -3722,10 +3722,10 @@ function si(t, e) {
3722
3722
  });
3723
3723
  }
3724
3724
  function ml(t, e) {
3725
- return H(t).pipe(si(e), oi(e));
3725
+ return z(t).pipe(si(e), oi(e));
3726
3726
  }
3727
3727
  function dl(t, e) {
3728
- return H(t).pipe(si(e), oi(e));
3728
+ return z(t).pipe(si(e), oi(e));
3729
3729
  }
3730
3730
  function gl(t, e) {
3731
3731
  return new O(function(n) {
@@ -3789,7 +3789,7 @@ function bl(t, e) {
3789
3789
  throw ti(t);
3790
3790
  }
3791
3791
  function Et(t, e) {
3792
- return e ? bl(t, e) : H(t);
3792
+ return e ? bl(t, e) : z(t);
3793
3793
  }
3794
3794
  function pt() {
3795
3795
  for (var t = [], e = 0; e < arguments.length; e++)
@@ -3887,7 +3887,7 @@ function El(t, e, n, r, i, a, o, s) {
3887
3887
  }, m = function(d) {
3888
3888
  l++;
3889
3889
  var v = !1;
3890
- H(n(d, f++)).subscribe(V(e, function(D) {
3890
+ z(n(d, f++)).subscribe(V(e, function(D) {
3891
3891
  e.next(D);
3892
3892
  }, function() {
3893
3893
  v = !0;
@@ -3915,7 +3915,7 @@ function ci(t, e, n) {
3915
3915
  return n === void 0 && (n = 1 / 0), N(e) ? ci(function(r, i) {
3916
3916
  return x(function(a, o) {
3917
3917
  return e(r, a, i, o);
3918
- })(H(t(r, i)));
3918
+ })(z(t(r, i)));
3919
3919
  }, n) : (typeof e == "number" && (n = e), G(function(r, i) {
3920
3920
  return El(r, i, t, n);
3921
3921
  }));
@@ -3933,7 +3933,7 @@ function Un() {
3933
3933
  }
3934
3934
  function Ol(t) {
3935
3935
  return new O(function(e) {
3936
- H(t()).subscribe(e);
3936
+ z(t()).subscribe(e);
3937
3937
  });
3938
3938
  }
3939
3939
  function fi(t, e, n) {
@@ -3957,13 +3957,13 @@ function Nl() {
3957
3957
  for (var t = [], e = 0; e < arguments.length; e++)
3958
3958
  t[e] = arguments[e];
3959
3959
  var n = Lt(t), r = Wr(t, 1 / 0), i = t;
3960
- return i.length ? i.length === 1 ? H(i[0]) : cn(r)(Et(i, n)) : qr;
3960
+ return i.length ? i.length === 1 ? z(i[0]) : cn(r)(Et(i, n)) : qr;
3961
3961
  }
3962
3962
  var Rl = Array.isArray;
3963
3963
  function Bl(t) {
3964
3964
  return t.length === 1 && Rl(t[0]) ? t[0] : t;
3965
3965
  }
3966
- function zn(t, e) {
3966
+ function Hn(t, e) {
3967
3967
  return G(function(n, r) {
3968
3968
  var i = 0;
3969
3969
  n.subscribe(V(r, function(a) {
@@ -4042,7 +4042,7 @@ function Yl(t) {
4042
4042
  function Ul() {
4043
4043
  return new li();
4044
4044
  }
4045
- function zl(t, e) {
4045
+ function Hl(t, e) {
4046
4046
  var n = arguments.length >= 2;
4047
4047
  return function(r) {
4048
4048
  return r.pipe(Ft, Gl(1), n ? Vl(e) : Yl(function() {
@@ -4050,7 +4050,7 @@ function zl(t, e) {
4050
4050
  }));
4051
4051
  };
4052
4052
  }
4053
- function Hl() {
4053
+ function zl() {
4054
4054
  for (var t = [], e = 0; e < arguments.length; e++)
4055
4055
  t[e] = arguments[e];
4056
4056
  var n = Lt(t), r = Wr(t, 1 / 0);
@@ -4061,7 +4061,7 @@ function Hl() {
4061
4061
  function ql() {
4062
4062
  for (var t = [], e = 0; e < arguments.length; e++)
4063
4063
  t[e] = arguments[e];
4064
- return Hl.apply(void 0, st([], ot(t)));
4064
+ return zl.apply(void 0, st([], ot(t)));
4065
4065
  }
4066
4066
  function Ue(t) {
4067
4067
  t === void 0 && (t = {});
@@ -4092,7 +4092,7 @@ function Ue(t) {
4092
4092
  complete: function() {
4093
4093
  m = !0, v(), c = Fe(D, o), _.complete();
4094
4094
  }
4095
- }), H($).subscribe(f));
4095
+ }), z($).subscribe(f));
4096
4096
  })(l);
4097
4097
  };
4098
4098
  }
@@ -4109,7 +4109,7 @@ function Fe(t, e) {
4109
4109
  i.unsubscribe(), t();
4110
4110
  }
4111
4111
  });
4112
- return H(e.apply(void 0, st([], ot(n)))).subscribe(i);
4112
+ return z(e.apply(void 0, st([], ot(n)))).subscribe(i);
4113
4113
  }
4114
4114
  }
4115
4115
  function y(t, e, n) {
@@ -4139,7 +4139,7 @@ function L(t, e) {
4139
4139
  n.subscribe(V(r, function(u) {
4140
4140
  i == null || i.unsubscribe();
4141
4141
  var l = 0, f = a++;
4142
- H(t(u, f)).subscribe(i = V(r, function(c) {
4142
+ z(t(u, f)).subscribe(i = V(r, function(c) {
4143
4143
  return r.next(e ? e(u, c, f, l++) : c);
4144
4144
  }, function() {
4145
4145
  i = null, s();
@@ -4151,7 +4151,7 @@ function L(t, e) {
4151
4151
  }
4152
4152
  function C(t) {
4153
4153
  return G(function(e, n) {
4154
- H(t).subscribe(V(n, function() {
4154
+ z(t).subscribe(V(n, function() {
4155
4155
  return n.complete();
4156
4156
  }, Xe)), !n.closed && e.subscribe(n);
4157
4157
  });
@@ -4163,7 +4163,7 @@ function jl(t, e) {
4163
4163
  }, m = function() {
4164
4164
  c = null, h && r.complete();
4165
4165
  }, d = function(D) {
4166
- return c = H(t(D)).subscribe(V(r, p, m));
4166
+ return c = z(t(D)).subscribe(V(r, p, m));
4167
4167
  }, v = function() {
4168
4168
  if (l) {
4169
4169
  l = !1;
@@ -4210,7 +4210,7 @@ const xt = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
4210
4210
  ), a = n.pipe(
4211
4211
  C(r),
4212
4212
  // filter(d => d.eventName === 'mouseover' || d.eventName === 'mousemove'),
4213
- zn((c) => c.eventName === "mouseover"),
4213
+ Hn((c) => c.eventName === "mouseover"),
4214
4214
  // distinctUntilChanged((prev, current) => prev.eventName === current.eventName)
4215
4215
  x((c) => c.datum ? {
4216
4216
  id: c.datum.id,
@@ -4227,7 +4227,7 @@ const xt = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
4227
4227
  })
4228
4228
  ), o = n.pipe(
4229
4229
  C(r),
4230
- zn((c) => c.eventName === "mouseout"),
4230
+ Hn((c) => c.eventName === "mouseout"),
4231
4231
  // distinctUntilChanged((prev, current) => prev.eventName === current.eventName)
4232
4232
  // map(d => {
4233
4233
  // return { id: '', label: '' }
@@ -4304,7 +4304,7 @@ const xt = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
4304
4304
  ), Zl = ({ computedData$: t }) => t.pipe(
4305
4305
  x((e) => e.filter((n) => n.length).map((n) => n[0].seriesLabel)),
4306
4306
  q((e, n) => JSON.stringify(e).length === JSON.stringify(n).length)
4307
- ), Hn = ({ computedData$: t }) => t.pipe(
4307
+ ), zn = ({ computedData$: t }) => t.pipe(
4308
4308
  x((e) => e.map((n) => n.filter((r) => r.visible != !1)))
4309
4309
  ), Ql = ({ computedData$: t, fullDataFormatter$: e }) => E({
4310
4310
  computedData: t,
@@ -4339,14 +4339,14 @@ const xt = ({ datumList$: t, fullChartParams$: e, event$: n }) => {
4339
4339
  y(1)
4340
4340
  ), r = Kl({
4341
4341
  fullDataFormatter$: e.fullDataFormatter$
4342
- }), i = Hn({
4342
+ }), i = zn({
4343
4343
  computedData$: e.computedData$
4344
4344
  }), a = Ql({
4345
4345
  computedData$: e.computedData$,
4346
4346
  fullDataFormatter$: e.fullDataFormatter$
4347
4347
  }).pipe(
4348
4348
  y(1)
4349
- ), o = Hn({
4349
+ ), o = zn({
4350
4350
  computedData$: a
4351
4351
  }), s = e.computedData$.pipe(
4352
4352
  x((p) => p.flat())
@@ -5164,7 +5164,7 @@ const hc = ({
5164
5164
  );
5165
5165
  A.pipe(
5166
5166
  C(a),
5167
- zl()
5167
+ Hl()
5168
5168
  ).subscribe((b) => {
5169
5169
  c.attr("transform", `translate(${b.left}, ${b.top})`);
5170
5170
  }), A.subscribe((b) => {
@@ -6452,7 +6452,7 @@ const Xc = (t) => F(t, {
6452
6452
  // 畢免資料量過大檢查不完,不深度檢查
6453
6453
  test: (n) => U(n) && n.id !== void 0
6454
6454
  }
6455
- }), zc = ({ subject: t, observer: e }) => {
6455
+ }), Hc = ({ subject: t, observer: e }) => {
6456
6456
  const n = Pt(e.fullChartParams$).pipe(
6457
6457
  y(1)
6458
6458
  ), r = ac({
@@ -6497,14 +6497,14 @@ class mf extends Ot {
6497
6497
  dataFormatterValidator: Xc,
6498
6498
  computedDataFn: Yc,
6499
6499
  dataValidator: Uc,
6500
- contextObserverCallback: zc
6500
+ contextObserverCallback: Hc
6501
6501
  },
6502
6502
  e,
6503
6503
  n
6504
6504
  );
6505
6505
  }
6506
6506
  }
6507
- function Hc({ chartType: t, config: e, initFn: n }) {
6507
+ function zc({ chartType: t, config: e, initFn: n }) {
6508
6508
  const r = new P(), i = /* @__PURE__ */ new WeakMap();
6509
6509
  let a = () => {
6510
6510
  }, o;
@@ -6564,7 +6564,7 @@ const wt = (t) => function(n) {
6564
6564
  return function(i) {
6565
6565
  return class {
6566
6566
  constructor() {
6567
- const o = Hc({
6567
+ const o = zc({
6568
6568
  chartType: t,
6569
6569
  config: n,
6570
6570
  initFn: i
@@ -6587,7 +6587,7 @@ export {
6587
6587
  Zn as DEFAULT_DATA_FORMATTER_MULTI_GRID,
6588
6588
  be as DEFAULT_DATA_FORMATTER_MULTI_GRID_GRID,
6589
6589
  Qn as DEFAULT_DATA_FORMATTER_MULTI_VALUE,
6590
- er as DEFAULT_DATA_FORMATTER_RELATIONAL,
6590
+ er as DEFAULT_DATA_FORMATTER_RELATIONSHIP,
6591
6591
  Wn as DEFAULT_DATA_FORMATTER_SERIES,
6592
6592
  tr as DEFAULT_DATA_FORMATTER_TREE,
6593
6593
  X as DEFAULT_DATA_FORMATTER_VALUE_AXIS,
@@ -6665,7 +6665,7 @@ export {
6665
6665
  tc as seriesContainerPositionObservable,
6666
6666
  fn as seriesDataMapObservable,
6667
6667
  Zl as seriesLabelsObservable,
6668
- Hn as seriesVisibleComputedDataObservable,
6668
+ zn as seriesVisibleComputedDataObservable,
6669
6669
  Pt as textSizePxObservable,
6670
6670
  Iu as transposeData,
6671
6671
  sc as treeVisibleComputedDataObservable
@@ -4,4 +4,4 @@
4
4
 
5
5
  ----> find in '${n}'`}function xt({columnName:t,expectToBe:e,from:n}){return`Value is not correct: '${t}' suppose to be '${e}', it may cause unexpected errors.'
6
6
 
7
- ----> find in '${n}'`}function _c(t){return t?F(t,{width:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},height:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},preset:{toBeTypes:["object"]}}):{status:"success",columnName:"",expectToBe:""}}function $c(t){return F({element:t},{element:{toBe:"Dom",test:n=>Hn(n)}})}function Ac(t,e){const n={series:["series","datum","none"],grid:["series","group","datum","none"],multiGrid:["series","group","datum","none"],multiValue:["category","datum","none"],relationship:["category","datum","none"],tree:["category","datum","none"],noneData:["none"]},r=F(e,{padding:{toBeTypes:["object"]},highlightTarget:{toBe:n[t].map(i=>`"${i}"`).join(" | "),test:i=>n[t].includes(i)},highlightDefault:{toBeTypes:["string","null"]},colorScheme:{toBe:'"dark" | "light"',test:i=>i==="dark"||i==="light"},colors:{toBeTypes:["object"],test:i=>i.light&&i.dark},styles:{toBeTypes:["object"]},transitionDuration:{toBeTypes:["number"]},transitionEase:{toBeTypes:["string"]}});if(e&&e.padding){const i=F(e.padding,{top:{toBeTypes:["number"]},right:{toBeTypes:["number"]},bottom:{toBeTypes:["number"]},left:{toBeTypes:["number"]}});if(i.status==="error")return i}if(e&&e.colors){const i=F(e.colors,{light:{toBeTypes:["object"]},dark:{toBeTypes:["object"]}});if(i.status==="error")return i;if(e.colors.light){const a=F(e.colors.light,{label:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(a.status==="error")return a}if(e.colors.dark){const a=F(e.colors.dark,{label:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(a.status==="error")return a}}return r}function Tc(t,e){return F({pluginEntities:e},{pluginEntities:{toBe:`PluginEntity<'${t}'>[]`,test:r=>Array.isArray(r)&&r.every(i=>i.chartType===t||i.chartType==="noneData")}})}function ji(t,e,n){const r=ut(t,e);return n==="multiGrid"&&t.gridList!=null&&(r.gridList=t.gridList.map((i,a)=>{const o=e.gridList[a]||e.gridList[0];return ut(i,o)})),r}const Sc=({defaultDataFormatter:t,dataFormatterValidator:e,computedDataFn:n,dataValidator:r,contextObserverCallback:i})=>{const a=new R,o=t.type;return function(s,l){try{const{status:w,columnName:x,expectToBe:y}=_c(l);if(w==="error")throw new Error(Dt({columnName:x,expectToBe:y,from:"Chart.constructor"}));if(w==="warning")console.warn(xt({columnName:x,expectToBe:y,from:"Chart.constructor"}));else{const{status:S,columnName:C,expectToBe:B}=$c(s);if(S==="error")throw new Error(Dt({columnName:C,expectToBe:B,from:"Chart.constructor"}));S==="warning"&&console.warn(xt({columnName:C,expectToBe:B,from:"Chart.constructor"}))}}catch(w){throw new Error(w)}ae(s).selectAll("svg").remove();const f=ae(s).append("svg");f.attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("xmls","http://www.w3.org/2000/svg").attr("version","1.1").style("position","absolute").classed("orbcharts__root",!0);const c=f.append("g");c.classed("orbcharts__layout",!0);const h=c.append("g");h.classed("orbcharts__plugins",!0);const p={data$:new R,dataFormatter$:new R,plugins$:new R,chartParams$:new R,event$:new R},d=(w=>{const x=w||ot,y=x.preset?x.preset:{};return{name:y.name??"",description:y.description??"",chartParams:y.chartParams?ut(y.chartParams,Le):Le,dataFormatter:y.dataFormatter?ji(y.dataFormatter,t,o):t,allPluginParams:y.allPluginParams?y.allPluginParams:{}}})(l),m=p.data$.pipe(v(1)),b=p.dataFormatter$.pipe(M(a),An({}),D(w=>{try{const{status:x,columnName:y,expectToBe:S}=e(w);if(x==="error")throw new Error(Dt({columnName:y,expectToBe:S,from:"Chart.dataFormatter$"}));x==="warning"&&console.warn(xt({columnName:y,expectToBe:S,from:"Chart.dataFormatter$"}))}catch(x){console.error(It(x))}return ji(w,d.dataFormatter,o)}),v(1)),_=p.chartParams$.pipe(M(a),An({}),D(w=>{try{const{status:x,columnName:y,expectToBe:S}=Ac(o,w);if(x==="error")throw new Error(Dt({columnName:y,expectToBe:S,from:"Chart.chartParams$"}));x==="warning"&&console.warn(xt({columnName:y,expectToBe:S,from:"Chart.chartParams$"}))}catch(x){console.error(It(x))}return ut(w,d.chartParams)}),v(1)),T=_.pipe(M(a),An({}),D(w=>ut(w.padding??{},Fe)));T.pipe(M(a),dc()).subscribe(w=>{c.attr("transform",`translate(${w.left}, ${w.top})`)}),T.subscribe(w=>{c.transition().attr("transform",`translate(${w.left}, ${w.top})`)});const $=bt({width:(l==null?void 0:l.width)??ot.width,height:(l==null?void 0:l.height)??ot.height}).pipe(L(w=>Pi(()=>w.width==="auto"||w.height==="auto",Ii(s).pipe(D(x=>({width:w.width==="auto"?x.width:w.width,height:w.height==="auto"?x.height:w.height}))),bt(w))),M(a),_n()),E=bt().pipe(gc($.pipe(sc(250)),$.pipe(vc(250))),q((w,x)=>JSON.stringify(w)===JSON.stringify(x)),_n()),A=E.subscribe(),N=O({rootSize:E,mergedPadding:T}).pipe(M(a),L(async w=>{const x=w.rootSize.width>0?w.rootSize.width:Gn,y=w.rootSize.height>0?w.rootSize.height:Xn;return{width:x-w.mergedPadding.left-w.mergedPadding.right,height:y-w.mergedPadding.top-w.mergedPadding.bottom,top:w.mergedPadding.top,right:w.mergedPadding.right,bottom:w.mergedPadding.bottom,left:w.mergedPadding.left,rootWidth:x,rootHeight:y}}),v(1));N.subscribe(w=>{f.attr("width",w.rootWidth).attr("height",w.rootHeight)});const Y=O({data:m,dataFormatter:b,chartParams:_}).pipe(M(a),L(async w=>w),L(w=>bt(w).pipe(D(x=>{try{const{status:y,columnName:S,expectToBe:C}=r(x.data);if(y==="error")throw new Error(Dt({columnName:S,expectToBe:C,from:"Chart.data$"}));y==="warning"&&console.warn(xt({columnName:S,expectToBe:C,from:"Chart.data$"}))}catch(y){console.error(It(y))}return n({data:x.data,dataFormatter:x.dataFormatter,chartParams:x.chartParams})}))),v(1));Y.subscribe();const k={};return p.plugins$.subscribe(w=>{try{const{status:x,columnName:y,expectToBe:S}=Tc(o,w);if(x==="error")throw new Error(Dt({columnName:y,expectToBe:S,from:"Chart.plugins$"}));x==="warning"&&console.warn(xt({columnName:y,expectToBe:S,from:"Chart.plugins$"}))}catch(x){console.error(It(x));return}h.selectAll("g.orbcharts__plugin").data(w,x=>x.name).join(x=>x.append("g").attr("class",y=>`orbcharts__plugin orbcharts__${y.name}`).each((y,S,C)=>{const B={fullParams$:new P,fullChartParams$:_,fullDataFormatter$:b,computedData$:Y,layout$:N},dt=i({observer:B,subject:p}),Z={selection:ae(C[S]),rootSelection:f,name:y.name,chartType:o,subject:p,observer:dt};y.setPresetParams(d.allPluginParams[y.name]??{}),y.setContext(Z),k[Z.name]=y,y.init()}),x=>x,x=>x.each((y,S,C)=>{k[y.name]&&(k[y.name].destroy(),k[y.name]=void 0)}).remove()).sort((x,y)=>x.layerIndex-y.layerIndex)}),{...p,selection:f,destroy(){ae(s).selectAll("svg").remove(),a.next(void 0),A.unsubscribe()}}}};class kt{constructor({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:a},o,u){this.data$=new R,this.dataFormatter$=new R,this.plugins$=new R,this.chartParams$=new R,this.event$=new R;try{const l=Sc({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:a})(o,u);this.selection=l.selection,this.destroy=l.destroy,this.data$=l.data$,this.dataFormatter$=l.dataFormatter$,this.plugins$=l.plugins$,this.chartParams$=l.chartParams$,this.event$=l.event$}catch(s){console.error(It(s))}}}class Mc extends kt{constructor(e,n){super({defaultDataFormatter:Ee,dataFormatterValidator:ra,computedDataFn:ll,dataValidator:cl,contextObserverCallback:bc},e,n)}}const Cc=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},container:{toBeTypes:["object"]}}),n=F(t,{seriesDirection:{toBe:'"row" | "column"',test:r=>r==="row"||r==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(n.status==="error")return n;if(t.valueAxis){const r=F(t.valueAxis,{position:{toBe:'"bottom" | "left" | "top" | "right"',test:i=>i==="bottom"||i==="left"||i==="top"||i==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:i=>Array.isArray(i)&&i.length===2&&(typeof i[0]=="number"||i[0]==="min"||i[0]==="auto")&&(typeof i[1]=="number"||i[1]==="max"||i[1]==="auto")},scaleRange:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},label:{toBeTypes:["string"]}});if(r.status==="error")return r}if(t.groupAxis){const r=F(t.groupAxis,{position:{toBe:'"bottom" | "left" | "top" | "right"',test:i=>i==="bottom"||i==="left"||i==="top"||i==="right"},scaleDomain:{toBe:'[number, number | "max"]',test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&(typeof i[1]=="number"||i[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(r.status==="error")return r}if(t.container){const r=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(r.status==="error")return r}return e};function qi(t,e){if(!t.length)return[];try{const n=t.reduce((o,u)=>u.length>o?u.length:o,0),i=t.map((o,u)=>{if(o.length===n)return o;const s=Object.assign([],o);for(let l=s.length;l<n;l++)s[l]=null;return s}).map((o,u)=>o.map((s,l)=>s==null?{id:"",label:"",data:{},value:null}:typeof s=="number"?{id:"",label:"",data:{},value:s}:{id:s.id??"",label:s.label??"",data:s.data??{},value:s.value}));return ei(e.seriesDirection,i)}catch{return[]}}const Fc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i;try{const a=qi(e,n),o=sn({transposedDataGrid:a,dataFormatterGrid:n,chartType:"grid"}),u=Zr({transposedDataGrid:a,dataFormatterGrid:n,chartType:"grid"});let s=0;i=a.map((l,f)=>l.map((c,h)=>{const p=Jt("grid",0,f,h),d=u[h],m={id:c.id?c.id:p,index:s,label:c.label?c.label:p,description:c.description??"",data:c.data,value:c.value,gridIndex:0,seriesIndex:f,seriesLabel:o[f],groupIndex:h,groupLabel:d,color:lt(f,r),visible:!0};return m.visible=n.visibleFilter(m,t),s++,m}))}catch(a){throw Error(a)}return i},Lc=t=>F({data:t},{data:{toBe:"(DataGridDatum | DataGridValue)[][]",test:n=>Array.isArray(n)}}),Ec=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=e.fullDataFormatter$.pipe(D(A=>A.separateSeries),q(),v(1)),i=Xi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}),a=Cn({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),o=e.computedData$.pipe(D(A=>A.flat())).pipe(v(1)),u=pt({datumList$:o,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),s=Fn({computedData$:e.computedData$}),l=Me({datumList$:o}).pipe(v(1)),f=Tn({datumList$:o}).pipe(v(1)),c=Mn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),h=Ln({computedData$:e.computedData$}).pipe(v(1)),p=En({computedLayoutData$:c}).pipe(v(1)),d=On({computedData$:e.computedData$,isSeriesSeprate$:r}).pipe(v(1)),m=Pn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}).pipe(v(1)),b=Rn({computedData$:e.computedData$,groupScaleDomainValue$:m}).pipe(v(1)),_=In({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),T=kn({gridAxesTransform$:_}).pipe(v(1)),$=Nn({computedData$:e.computedData$,groupScaleDomainValue$:m,filteredMinMaxValue$:b,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),E=Bn({gridContainerPosition$:i,gridAxesTransform$:_,gridGraphicTransform$:$});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,isSeriesSeprate$:r,gridContainerPosition$:i,gridAxesSize$:a,gridHighlight$:u,seriesLabels$:s,SeriesDataMap$:l,GroupDataMap$:f,computedLayoutData$:c,visibleComputedData$:h,visibleComputedLayoutData$:p,computedStackedData$:d,groupScaleDomainValue$:m,filteredMinMaxValue$:b,gridAxesTransform$:_,gridAxesReverseTransform$:T,gridGraphicTransform$:$,gridGraphicReverseScale$:E}};class Oc extends kt{constructor(e,n){super({defaultDataFormatter:Pe,dataFormatterValidator:Cc,computedDataFn:Fc,dataValidator:Lc,contextObserverCallback:Ec},e,n)}}const Pc=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},gridList:{toBeTypes:["object[]"]},container:{toBeTypes:["object"]},separateGrid:{toBeTypes:["boolean"]}});if(t.gridList){const r=t.gridList.map((i,a)=>{const o=F(i,{seriesDirection:{toBe:'"row" | "column"',test:u=>u==="row"||u==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(o.status==="error")return o;if(i.valueAxis){const u=F(i.valueAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:s=>s==="top"||s==="bottom"||s==="left"||s==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:s=>Array.isArray(s)&&s.length===2&&(typeof s[0]=="number"||s[0]==="min"||s[0]==="auto")&&(typeof s[1]=="number"||s[1]==="max"||s[1]==="auto")},scaleRange:{toBe:"[number, number]",test:s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"},label:{toBeTypes:["string"]}});if(u.status==="error")return u}else if(i.groupAxis){const u=F(i.groupAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:s=>s==="top"||s==="bottom"||s==="left"||s==="right"},scaleDomain:{toBe:'[number, number | "max"]',test:s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&(typeof s[1]=="number"||s[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(u.status==="error")return u}return{status:"success",columnName:"",expectToBe:""}}).find(i=>i.status==="error");if(r)return r}if(t.container){const n=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e},Rc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const a=n.gridList[0]||Bt,o=e.map((c,h)=>n.gridList[h]||a),u=e.map((c,h)=>qi(c,o[h])),s=n.separateGrid?u.map((c,h)=>sn({transposedDataGrid:c,dataFormatterGrid:o[h],chartType:"multiGrid"})):u.map((c,h)=>Kr({transposedDataGrid:c,dataFormatterGrid:o[h],chartType:"multiGrid",gridIndex:h})),l=new Map;let f=0;s.flat().forEach((c,h)=>{if(!l.has(c)){const p=lt(f,r);l.set(c,p),f++}}),i=u.map((c,h)=>{const p=s[h],d=Qr({transposedDataGrid:c,dataFormatterGrid:o[h],chartType:"multiGrid",gridIndex:h});let m=0;return c.map((_,T)=>_.map(($,E)=>{const A=Jt("multiGrid",h,T,E),N=d[E],Y=p[T],k={id:$.id?$.id:A,index:m,label:$.label?$.label:A,description:$.description??"",data:$.data,value:$.value,gridIndex:h,seriesIndex:T,seriesLabel:Y,groupIndex:E,groupLabel:N,color:l.get(Y),visible:!0};return k.visible=n.visibleFilter(k,t),m++,k}))})}catch(a){throw Error(a)}return i},Ic=t=>F({data:t},{data:{toBe:"DataGrid[]",test:n=>Array.isArray(n)}}),kc=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=Yi({fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),i=Vn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,multiGridContainerPosition$:i,multiGridEachDetail$:r}};class Nc extends kt{constructor(e,n){super({defaultDataFormatter:Re,dataFormatterValidator:Pc,computedDataFn:Rc,dataValidator:Ic,contextObserverCallback:kc},e,n)}}const Bc=t=>({status:"success",columnName:"",expectToBe:""}),Vc=t=>{const{data:e,dataFormatter:n,chartParams:r}=t;if(!e.length)return[];const i=$e();let a=[];try{const o=e.map((f,c)=>Array.isArray(f)?{id:"",label:"",description:"",data:{},categoryLabel:i,value:f}:U(f)?{id:f.id??"",label:f.label??"",description:f.description??"",data:f.data??{},categoryLabel:f.categoryLabel??i,value:f.value}:{id:"",label:"",description:"",data:{},categoryLabel:i,value:[]}),u=(()=>{const f=new Set(n.categoryLabels);for(let c of o){const h=c.categoryLabel??i;f.add(h)}return Array.from(f)})(),s=new Map(u.map((f,c)=>[f,c]));let l=0;o.forEach((f,c)=>{const h=l;l++;const p=Jt(n.type,c),d=s.get(f.categoryLabel)??0,m=lt(d,r),b={id:f.id?f.id:p,index:h,label:f.label?f.label:p,description:f.description??"",data:f.data,datumIndex:c,value:f.value,categoryIndex:d,categoryLabel:f.categoryLabel,visible:!0,color:m};b.visible=n.visibleFilter(b,t),a[d]||(a[d]=[]),a[d].push(b)})}catch(o){throw Error(o)}return a},Gc=t=>({status:"success",columnName:"",expectToBe:""}),Xc=({computedData$:t})=>t.pipe(D(e=>{const n=e.flat(),[r,i]=st(n.map(u=>u.value[0])),[a,o]=st(n.map(u=>u.value[1]));return{minX:r,maxX:i,minY:a,maxY:o}})),Yc=({computedData$:t,minMaxXY$:e,fullDataFormatter$:n,layout$:r})=>{function i(o,u){let s=o.maxX,l=o.minX;return l===s&&s===0&&(s=1),it({maxValue:s,minValue:l,axisWidth:u.width,scaleDomain:["auto","auto"],scaleRange:[0,1]})}function a(o,u){let s=o.maxY,l=o.minY;return l===s&&s===0&&(s=1),it({maxValue:s,minValue:l,axisWidth:u.height,scaleDomain:["auto","auto"],scaleRange:[0,1],reverse:!0})}return O({computedData:t,minMaxXY:e,fullDataFormatter:n,layout:r}).pipe(L(async o=>o),D(o=>{const u=i(o.minMaxXY,o.layout),s=a(o.minMaxXY,o.layout);return o.computedData.map((l,f)=>l.map((c,h)=>({...c,axisX:u(c.value[0]??0),axisY:s(c.value[1]??0)})))}))},Uc=({computedData$:t,fullDataFormatter$:e})=>t.pipe(D(n=>n.map(r=>r[0]?r[0].categoryLabel:"")),q((n,r)=>JSON.stringify(n).length===JSON.stringify(r).length)),Hc=({computedData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible==!0)).filter(n=>n.length>0))),zc=({computedLayoutData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible==!0)).filter(n=>n.length>0))),jc=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async i=>i),D(i=>{if(i.fullDataFormatter.separateCategory)return Ft(i.layout,i.fullDataFormatter.container,i.computedData.length);{const a=Ft(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((o,u)=>a[0])}})),qc=({visibleComputedLayoutData$:t,minMaxXY$:e,fullDataFormatter$:n})=>O({visibleComputedLayoutData:t,minMaxXY:e,fullDataFormatter:n}).pipe(D(r=>{const{minX:i,maxX:a,minY:o,maxY:u}=(()=>{let{minX:p,maxX:d,minY:m,maxY:b}=r.minMaxXY;return r.fullDataFormatter.xAxis.scaleDomain[0]==="auto"&&p>0?p=0:typeof r.fullDataFormatter.xAxis.scaleDomain[0]=="number"&&(p=r.fullDataFormatter.xAxis.scaleDomain[0]),r.fullDataFormatter.xAxis.scaleDomain[1]==="auto"&&d<0?d=0:typeof r.fullDataFormatter.xAxis.scaleDomain[1]=="number"&&(d=r.fullDataFormatter.xAxis.scaleDomain[1]),r.fullDataFormatter.yAxis.scaleDomain[0]==="auto"&&m>0?m=0:typeof r.fullDataFormatter.yAxis.scaleDomain[0]=="number"&&(m=r.fullDataFormatter.yAxis.scaleDomain[0]),r.fullDataFormatter.yAxis.scaleDomain[1]==="auto"&&b<0?b=0:typeof r.fullDataFormatter.yAxis.scaleDomain[1]=="number"&&(b=r.fullDataFormatter.yAxis.scaleDomain[1]),{minX:p,maxX:d,minY:m,maxY:b}})();let s=[],l=null,f=null,c=null,h=null;for(let p of r.visibleComputedLayoutData)for(let d of p)d.value[0]>=i&&d.value[0]<=a&&d.value[1]>=o&&d.value[1]<=u&&(s.push(d),(l==null||d.value[0]<l.value[0])&&(l=d),(f==null||d.value[0]>f.value[0])&&(f=d),(c==null||d.value[1]<c.value[1])&&(c=d),(h==null||d.value[1]>h.value[1])&&(h=d));return{datumList:s,minXDatum:l,maxXDatum:f,minYDatum:c,maxYDatum:h}})),Wc=({minMaxXY$:t,filteredMinMaxXYData$:e,fullDataFormatter$:n,layout$:r})=>{const i=new R;function a({minMaxXY:o,filteredMinMaxXYData:u,xAxis:s,yAxis:l,width:f,height:c}){let h=0,p=0,d=0,m=0,{minX:b,maxX:_,minY:T,maxY:$}=o,E=u.minXDatum.value[0]??0,A=u.maxXDatum.value[0]??0,N=u.minYDatum.value[1]??0,Y=u.maxYDatum.value[1]??0;E===A&&A===0&&(A=1),N===Y&&Y===0&&(Y=1),b===_&&_===0&&(_=1),T===$&&$===0&&($=1);const k=it({maxValue:A,minValue:E,axisWidth:f,scaleDomain:s.scaleDomain,scaleRange:s.scaleRange}),w=k(b>0?0:b),x=k(_<0?0:_);h=w,d=(x-w)/f;const S=it({maxValue:Y,minValue:N,axisWidth:c,scaleDomain:l.scaleDomain,scaleRange:l.scaleRange,reverse:!0}),C=S(T>0?0:T),B=S($<0?0:$);return p=B,m=(C-B)/c,{translate:[h,p],scale:[d,m],rotate:0,rotateX:0,rotateY:0,value:`translate(${h}px, ${p}px) scale(${d}, ${m})`}}return new P(o=>(O({minMaxXY:t,filteredMinMaxXYData:e,fullDataFormatter:n,layout:r}).pipe(M(i),L(async u=>u)).subscribe(u=>{if(!u.filteredMinMaxXYData.minXDatum||!u.filteredMinMaxXYData.maxXDatum||u.filteredMinMaxXYData.minXDatum.value[0]==null||u.filteredMinMaxXYData.maxXDatum.value[0]==null||!u.filteredMinMaxXYData.minYDatum||!u.filteredMinMaxXYData.maxYDatum||u.filteredMinMaxXYData.minYDatum.value[1]==null||u.filteredMinMaxXYData.maxYDatum.value[1]==null)return;const s=a({minMaxXY:u.minMaxXY,filteredMinMaxXYData:u.filteredMinMaxXYData,xAxis:u.fullDataFormatter.xAxis,yAxis:u.fullDataFormatter.yAxis,width:u.layout.width,height:u.layout.height});o.next(s)}),function(){i.next(void 0)}))},Jc=({multiValueContainerPosition$:t,multiValueGraphicTransform$:e})=>O({multiValueContainerPosition:t,multiValueGraphicTransform:e}).pipe(L(async n=>n),D(n=>n.multiValueContainerPosition.map((r,i)=>[1/n.multiValueGraphicTransform.scale[0]/n.multiValueContainerPosition[i].scale[0],1/n.multiValueGraphicTransform.scale[1]/n.multiValueContainerPosition[i].scale[1]]))),Kc=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=e.fullDataFormatter$.pipe(D(b=>b.separateCategory),q(),v(1)),i=jc({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}),a=e.computedData$.pipe(D(b=>b.flat().flat())).pipe(v(1)),o=pt({datumList$:a,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),u=Uc({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}),s=Qt({datumList$:a}).pipe(v(1)),l=Xc({computedData$:e.computedData$}).pipe(v(1)),f=Yc({computedData$:e.computedData$,minMaxXY$:l,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),c=Hc({computedData$:e.computedData$}).pipe(v(1)),h=zc({computedLayoutData$:f}).pipe(v(1)),p=qc({visibleComputedLayoutData$:h,minMaxXY$:l,fullDataFormatter$:e.fullDataFormatter$}).pipe(v(1)),d=Wc({minMaxXY$:l,filteredMinMaxXYData$:p,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),m=Jc({multiValueContainerPosition$:i,multiValueGraphicTransform$:d});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,isCategorySeprate$:r,multiValueContainerPosition$:i,multiValueHighlight$:o,categoryLabels$:u,CategoryDataMap$:s,minMaxXY$:l,computedLayoutData$:f,visibleComputedData$:c,visibleComputedLayoutData$:h,filteredMinMaxXYData$:p,multiValueGraphicTransform$:d,multiValueGraphicReverseScale$:m}};class Zc extends kt{constructor(e,n){super({defaultDataFormatter:Ie,dataFormatterValidator:Bc,computedDataFn:Vc,dataValidator:Gc,contextObserverCallback:Kc},e,n)}}const Qc=t=>({status:"success",columnName:"",expectToBe:""}),tf=t=>{const{data:e,dataFormatter:n,chartParams:r}=t,i=$e();let a=[],o=[];try{let u=[],s=[];if(e.nodes)u=e.nodes,s=e.edges;else if(e[0])u=e[0],s=e[1];else return{nodes:[],edges:[]};const l=(()=>{const h=new Set(n.categoryLabels);for(let p of u){const d=p.categoryLabel??i;h.add(d)}for(let p of s){const d=p.categoryLabel??i;h.add(d)}return Array.from(h)})(),f=new Map(l.map((h,p)=>[h,p]));a=u.map((h,p)=>{const d=h.categoryLabel??i,m=f.get(d)??0,b={id:h.id,index:p,label:h.label??"",description:h.description??"",data:h.data??{},value:h.value??0,categoryIndex:m,categoryLabel:d,color:lt(m,r),visible:!0};return b.visible=n.visibleFilter(b,t),b});const c=new Map(a.map(h=>[h.id,h]));o=s.map((h,p)=>{const d=h.categoryLabel??i,m=c.get(h.start),b=c.get(h.end);return{id:h.id,index:p,label:h.label??"",description:h.description??"",data:h.data??{},value:h.value??0,categoryIndex:f.get(d),categoryLabel:d,color:lt(p,r),startNode:m,endNode:b,visible:m.visible&&b.visible}})}catch(u){throw Error(u)}return{nodes:a,edges:o}},ef=t=>({status:"success",columnName:"",expectToBe:""}),nf=(t,e)=>O({CategoryNodeMap:t,CategoryEdgeMap:e}).pipe(L(async n=>n),D(n=>[...Array.from(n.CategoryNodeMap.keys()),...Array.from(n.CategoryEdgeMap.keys())]),q((n,r)=>JSON.stringify(n).length===JSON.stringify(r).length)),rf=t=>t.pipe(D(e=>{const n=new Map;return e.nodes.forEach(r=>{n.set(r.id,r)}),n})),af=t=>t.pipe(D(e=>{const n=new Map;return e.edges.forEach(r=>{n.set(r.id,r)}),n})),of=({computedData$:t,NodeMap$:e})=>O({computedData:t,NodeMap:e}).pipe(L(async n=>n),D(n=>({nodes:n.computedData.nodes.filter(r=>r.visible),edges:n.computedData.edges.filter(r=>r.visible).filter(r=>n.NodeMap.has(r.startNode.id)&&n.NodeMap.has(r.endNode.id))}))),uf=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=pt({datumList$:e.computedData$.pipe(D(c=>c.nodes)),fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),i=pt({datumList$:e.computedData$.pipe(D(c=>c.edges)),fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),a=Qt({datumList$:e.computedData$.pipe(D(c=>c.nodes))}).pipe(v(1)),o=Qt({datumList$:e.computedData$.pipe(D(c=>c.edges))}).pipe(v(1)),u=rf(e.computedData$).pipe(v(1)),s=af(e.computedData$).pipe(v(1)),l=nf(a,o).pipe(v(1)),f=of({computedData$:e.computedData$,NodeMap$:u}).pipe(v(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,relationshipHighlightNodes$:r,relationshipHighlightEdges$:i,categoryLabels$:l,CategoryNodeMap$:a,CategoryEdgeMap$:o,NodeMap$:u,EdgeMap$:s,visibleComputedData$:f}};class sf extends kt{constructor(e,n){super({defaultDataFormatter:Ne,dataFormatterValidator:Qc,computedDataFn:tf,dataValidator:ef,contextObserverCallback:uf},e,n)}}const lf=t=>F(t,{visibleFilter:{toBeTypes:["Function"]},categoryLabels:{toBeTypes:["string[]"]}}),cf=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t,i=$e(),a=new Map(n.categoryLabels.map((u,s)=>[u,s]));let o={id:"",index:0,label:"",description:"",categoryIndex:-1,categoryLabel:"",color:"",visible:!0,data:{},value:0,level:0,seq:0,children:[]};try{const u=function(){if(U(e)===!0)return JSON.parse(JSON.stringify(e));if(Array.isArray(e)===!1)return{id:""};let f;const c=new Map;e.forEach(p=>{if(!p.parent)f=p;else{const d=c.get(p.parent)??[];d.push(p),c.set(p.parent,d)}});const h=p=>({id:p.id,label:p.label,data:p.data,value:p.value,categoryLabel:p.categoryLabel??i,children:(c.get(p.id)??[]).map(d=>h(d))});return f?h(f):{id:""}}();let s=0;const l=(f,c,h)=>{const p=c+1,d=f.categoryLabel??i;a.has(d)||a.set(d,a.size);const m=a.get(d)??0,b=s;s++;const _={id:f.id,index:b,level:c,seq:h,label:f.label??"",description:f.description??"",categoryIndex:m,categoryLabel:d,color:lt(m,r),data:f.data??{},value:f.value,visible:!0,children:(f.children??[]).map((T,$)=>l(T,p,$))};return _.visible=n.visibleFilter(_,t),_};o=l(u,0,0)}catch(u){throw Error(u)}return o},ff=t=>F({data:t},{data:{toBe:"DataTreeObj | DataTreeDatum[]",test:n=>U(n)&&n.id!==void 0}}),hf=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=Ui({computedData$:e.computedData$}).pipe(v(1)),i=pt({datumList$:r,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),a=Qt({datumList$:r}).pipe(v(1)),o=Hi(a).pipe(v(1)),u=zi({computedData$:e.computedData$}).pipe(v(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,treeHighlight$:i,categoryLabels$:o,CategoryDataMap$:a,visibleComputedData$:u}};class pf extends kt{constructor(e,n){super({defaultDataFormatter:ke,dataFormatterValidator:lf,computedDataFn:cf,dataValidator:ff,contextObserverCallback:hf},e,n)}}function df({chartType:t,config:e,initFn:n}){const r=new R,i=new WeakMap;let a=()=>{},o;const u=new hi(e.defaultParams),s=new hi({}),l=u.pipe(L(f=>s.pipe(M(r),D(c=>{try{const{status:h,columnName:p,expectToBe:d}=e.validator(c,{validateColumns:F});if(h==="error")throw new Error(Dt({columnName:p,expectToBe:d,from:`${e.name}.params$`}));h==="warning"&&console.warn(xt({columnName:p,expectToBe:d,from:`${e.name}.params$`}))}catch(h){console.error(It(h))}return ut(c,f)}))),v(1));return{params$:s,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){o&&(a=n(o)??(()=>{}),i.set(o.selection,o))},destroy(){a(),o&&(o.selection.remove(),o=void 0),r.next(void 0)},setPresetParams:f=>{u.next(ut(f,e.defaultParams))},setContext:f=>{o=f,o.observer.fullParams$=l}}}const _t=t=>function(n){return function(i){return class{constructor(){const o=df({chartType:t,config:n,initFn:i});this.params$=o.params$,this.name=o.name,this.chartType=o.chartType,this.defaultParams=o.defaultParams,this.layerIndex=o.layerIndex,this.init=o.init,this.destroy=o.destroy,this.setPresetParams=o.setPresetParams,this.setContext=o.setContext}}}},mf=_t("series"),gf=_t("grid"),yf=_t("multiGrid"),vf=_t("multiValue"),bf=_t("noneData"),wf=_t("relationship"),Df=_t("tree");g.DEFAULTL_DATA_RELATIONA=ta,g.DEFAULT_CHART_HEIGHT=Xn,g.DEFAULT_CHART_OPTIONS=ot,g.DEFAULT_CHART_PARAMS=Le,g.DEFAULT_CHART_WIDTH=Gn,g.DEFAULT_DATA_FORMATTER_CONTAINER=Nt,g.DEFAULT_DATA_FORMATTER_GRID=Pe,g.DEFAULT_DATA_FORMATTER_GRID_GRID=Oe,g.DEFAULT_DATA_FORMATTER_GROUP_AXIS=Yn,g.DEFAULT_DATA_FORMATTER_MULTI_GRID=Re,g.DEFAULT_DATA_FORMATTER_MULTI_GRID_GRID=Bt,g.DEFAULT_DATA_FORMATTER_MULTI_VALUE=Ie,g.DEFAULT_DATA_FORMATTER_RELATIONAL=Ne,g.DEFAULT_DATA_FORMATTER_SERIES=Ee,g.DEFAULT_DATA_FORMATTER_TREE=ke,g.DEFAULT_DATA_FORMATTER_VALUE_AXIS=V,g.DEFAULT_DATA_GRID=Ji,g.DEFAULT_DATA_MULTI_GRID=Ki,g.DEFAULT_DATA_MULTI_VALUE=Zi,g.DEFAULT_DATA_SERIES=Wi,g.DEFAULT_DATA_TREE=Qi,g.DEFAULT_PADDING=Fe,g.GridChart=Oc,g.MultiGridChart=Nc,g.MultiValueChart=Zc,g.RelationshipChart=sf,g.SeriesChart=Mc,g.TreeChart=pf,g.calcGridContainerLayout=Ft,g.calcSeriesContainerLayout=cn,g.categoryDataMapObservable=Qt,g.categoryLabelsObservable=Hi,g.computedStackedDataObservables=On,g.createAxisToLabelIndexScale=xc,g.createAxisToValueScale=wc,g.createDefaultCategoryLabel=$e,g.createDefaultDatumId=Jt,g.createDefaultGroupLabel=un,g.createDefaultSeriesLabel=_e,g.createGridGroupLabels=Zr,g.createGridSeriesLabels=sn,g.createLabelToAxisScale=Dc,g.createMultiGridGroupLabels=Qr,g.createMultiGridSeriesLabels=Kr,g.createValueToAxisScale=it,g.defineGridPlugin=gf,g.defineMultiGridPlugin=yf,g.defineMultiValuePlugin=vf,g.defineNoneDataPlugin=bf,g.defineRelationshipPlugin=wf,g.defineSeriesPlugin=mf,g.defineTreePlugin=Df,g.filteredMinMaxValueObservable=Rn,g.formatCommaNumber=ea,g.formatValueToLabel=il,g.getMinMax=st,g.getMinMaxGrid=ln,g.getMinMaxMultiGrid=ol,g.getMinMaxMultiValue=ul,g.getMinMaxMultiValueXY=sl,g.getMinMaxSeries=al,g.getMinMaxValue=ti,g.gridAxesReverseTransformObservable=kn,g.gridAxesSizeObservable=Cn,g.gridAxesTransformObservable=In,g.gridComputedLayoutDataObservable=Mn,g.gridContainerPositionObservable=Xi,g.gridGraphicReverseScaleObservable=Bn,g.gridGraphicTransformObservable=Nn,g.gridSeriesLabelsObservable=Fn,g.gridVisibleComputedDataObservable=Ln,g.gridVisibleComputedLayoutDataObservable=En,g.groupDataMapObservable=Tn,g.groupScaleDomainValueObservable=Pn,g.highlightObservable=pt,g.isDom=Hn,g.isFunction=Un,g.isPlainObject=U,g.mergeOptionsWithDefault=ut,g.multiGridContainerObservable=Vn,g.multiGridEachDetailObservable=Yi,g.nodeListObservable=Ui,g.resizeObservable=Ii,g.separateSeriesObservable=ki,g.seriesColorPredicate=lt,g.seriesComputedLayoutDataObservable=Bi,g.seriesContainerPositionMapObservable=Gi,g.seriesContainerPositionObservable=Vi,g.seriesDataMapObservable=Me,g.seriesLabelsObservable=Ni,g.seriesVisibleComputedDataObservable=Sn,g.textSizePxObservable=wt,g.transposeData=ei,g.treeVisibleComputedDataObservable=zi,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
7
+ ----> find in '${n}'`}function _c(t){return t?F(t,{width:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},height:{toBe:'"auto" | number',test:n=>n==="auto"||typeof n=="number"},preset:{toBeTypes:["object"]}}):{status:"success",columnName:"",expectToBe:""}}function $c(t){return F({element:t},{element:{toBe:"Dom",test:n=>Hn(n)}})}function Ac(t,e){const n={series:["series","datum","none"],grid:["series","group","datum","none"],multiGrid:["series","group","datum","none"],multiValue:["category","datum","none"],relationship:["category","datum","none"],tree:["category","datum","none"],noneData:["none"]},r=F(e,{padding:{toBeTypes:["object"]},highlightTarget:{toBe:n[t].map(i=>`"${i}"`).join(" | "),test:i=>n[t].includes(i)},highlightDefault:{toBeTypes:["string","null"]},colorScheme:{toBe:'"dark" | "light"',test:i=>i==="dark"||i==="light"},colors:{toBeTypes:["object"],test:i=>i.light&&i.dark},styles:{toBeTypes:["object"]},transitionDuration:{toBeTypes:["number"]},transitionEase:{toBeTypes:["string"]}});if(e&&e.padding){const i=F(e.padding,{top:{toBeTypes:["number"]},right:{toBeTypes:["number"]},bottom:{toBeTypes:["number"]},left:{toBeTypes:["number"]}});if(i.status==="error")return i}if(e&&e.colors){const i=F(e.colors,{light:{toBeTypes:["object"]},dark:{toBeTypes:["object"]}});if(i.status==="error")return i;if(e.colors.light){const a=F(e.colors.light,{label:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(a.status==="error")return a}if(e.colors.dark){const a=F(e.colors.dark,{label:{toBeTypes:["string[]"]},primary:{toBeTypes:["string"]},secondary:{toBeTypes:["string"]},white:{toBeTypes:["string"]},background:{toBeTypes:["string"]}});if(a.status==="error")return a}}return r}function Tc(t,e){return F({pluginEntities:e},{pluginEntities:{toBe:`PluginEntity<'${t}'>[]`,test:r=>Array.isArray(r)&&r.every(i=>i.chartType===t||i.chartType==="noneData")}})}function ji(t,e,n){const r=ut(t,e);return n==="multiGrid"&&t.gridList!=null&&(r.gridList=t.gridList.map((i,a)=>{const o=e.gridList[a]||e.gridList[0];return ut(i,o)})),r}const Sc=({defaultDataFormatter:t,dataFormatterValidator:e,computedDataFn:n,dataValidator:r,contextObserverCallback:i})=>{const a=new R,o=t.type;return function(s,l){try{const{status:w,columnName:x,expectToBe:y}=_c(l);if(w==="error")throw new Error(Dt({columnName:x,expectToBe:y,from:"Chart.constructor"}));if(w==="warning")console.warn(xt({columnName:x,expectToBe:y,from:"Chart.constructor"}));else{const{status:S,columnName:C,expectToBe:B}=$c(s);if(S==="error")throw new Error(Dt({columnName:C,expectToBe:B,from:"Chart.constructor"}));S==="warning"&&console.warn(xt({columnName:C,expectToBe:B,from:"Chart.constructor"}))}}catch(w){throw new Error(w)}ae(s).selectAll("svg").remove();const f=ae(s).append("svg");f.attr("xmlns:xlink","http://www.w3.org/1999/xlink").attr("xmls","http://www.w3.org/2000/svg").attr("version","1.1").style("position","absolute").classed("orbcharts__root",!0);const c=f.append("g");c.classed("orbcharts__layout",!0);const h=c.append("g");h.classed("orbcharts__plugins",!0);const p={data$:new R,dataFormatter$:new R,plugins$:new R,chartParams$:new R,event$:new R},d=(w=>{const x=w||ot,y=x.preset?x.preset:{};return{name:y.name??"",description:y.description??"",chartParams:y.chartParams?ut(y.chartParams,Le):Le,dataFormatter:y.dataFormatter?ji(y.dataFormatter,t,o):t,allPluginParams:y.allPluginParams?y.allPluginParams:{}}})(l),m=p.data$.pipe(v(1)),b=p.dataFormatter$.pipe(M(a),An({}),D(w=>{try{const{status:x,columnName:y,expectToBe:S}=e(w);if(x==="error")throw new Error(Dt({columnName:y,expectToBe:S,from:"Chart.dataFormatter$"}));x==="warning"&&console.warn(xt({columnName:y,expectToBe:S,from:"Chart.dataFormatter$"}))}catch(x){console.error(It(x))}return ji(w,d.dataFormatter,o)}),v(1)),_=p.chartParams$.pipe(M(a),An({}),D(w=>{try{const{status:x,columnName:y,expectToBe:S}=Ac(o,w);if(x==="error")throw new Error(Dt({columnName:y,expectToBe:S,from:"Chart.chartParams$"}));x==="warning"&&console.warn(xt({columnName:y,expectToBe:S,from:"Chart.chartParams$"}))}catch(x){console.error(It(x))}return ut(w,d.chartParams)}),v(1)),T=_.pipe(M(a),An({}),D(w=>ut(w.padding??{},Fe)));T.pipe(M(a),dc()).subscribe(w=>{c.attr("transform",`translate(${w.left}, ${w.top})`)}),T.subscribe(w=>{c.transition().attr("transform",`translate(${w.left}, ${w.top})`)});const $=bt({width:(l==null?void 0:l.width)??ot.width,height:(l==null?void 0:l.height)??ot.height}).pipe(L(w=>Pi(()=>w.width==="auto"||w.height==="auto",Ii(s).pipe(D(x=>({width:w.width==="auto"?x.width:w.width,height:w.height==="auto"?x.height:w.height}))),bt(w))),M(a),_n()),E=bt().pipe(gc($.pipe(sc(250)),$.pipe(vc(250))),q((w,x)=>JSON.stringify(w)===JSON.stringify(x)),_n()),A=E.subscribe(),N=O({rootSize:E,mergedPadding:T}).pipe(M(a),L(async w=>{const x=w.rootSize.width>0?w.rootSize.width:Gn,y=w.rootSize.height>0?w.rootSize.height:Xn;return{width:x-w.mergedPadding.left-w.mergedPadding.right,height:y-w.mergedPadding.top-w.mergedPadding.bottom,top:w.mergedPadding.top,right:w.mergedPadding.right,bottom:w.mergedPadding.bottom,left:w.mergedPadding.left,rootWidth:x,rootHeight:y}}),v(1));N.subscribe(w=>{f.attr("width",w.rootWidth).attr("height",w.rootHeight)});const Y=O({data:m,dataFormatter:b,chartParams:_}).pipe(M(a),L(async w=>w),L(w=>bt(w).pipe(D(x=>{try{const{status:y,columnName:S,expectToBe:C}=r(x.data);if(y==="error")throw new Error(Dt({columnName:S,expectToBe:C,from:"Chart.data$"}));y==="warning"&&console.warn(xt({columnName:S,expectToBe:C,from:"Chart.data$"}))}catch(y){console.error(It(y))}return n({data:x.data,dataFormatter:x.dataFormatter,chartParams:x.chartParams})}))),v(1));Y.subscribe();const k={};return p.plugins$.subscribe(w=>{try{const{status:x,columnName:y,expectToBe:S}=Tc(o,w);if(x==="error")throw new Error(Dt({columnName:y,expectToBe:S,from:"Chart.plugins$"}));x==="warning"&&console.warn(xt({columnName:y,expectToBe:S,from:"Chart.plugins$"}))}catch(x){console.error(It(x));return}h.selectAll("g.orbcharts__plugin").data(w,x=>x.name).join(x=>x.append("g").attr("class",y=>`orbcharts__plugin orbcharts__${y.name}`).each((y,S,C)=>{const B={fullParams$:new P,fullChartParams$:_,fullDataFormatter$:b,computedData$:Y,layout$:N},dt=i({observer:B,subject:p}),Z={selection:ae(C[S]),rootSelection:f,name:y.name,chartType:o,subject:p,observer:dt};y.setPresetParams(d.allPluginParams[y.name]??{}),y.setContext(Z),k[Z.name]=y,y.init()}),x=>x,x=>x.each((y,S,C)=>{k[y.name]&&(k[y.name].destroy(),k[y.name]=void 0)}).remove()).sort((x,y)=>x.layerIndex-y.layerIndex)}),{...p,selection:f,destroy(){ae(s).selectAll("svg").remove(),a.next(void 0),A.unsubscribe()}}}};class kt{constructor({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:a},o,u){this.data$=new R,this.dataFormatter$=new R,this.plugins$=new R,this.chartParams$=new R,this.event$=new R;try{const l=Sc({defaultDataFormatter:e,dataFormatterValidator:n,computedDataFn:r,dataValidator:i,contextObserverCallback:a})(o,u);this.selection=l.selection,this.destroy=l.destroy,this.data$=l.data$,this.dataFormatter$=l.dataFormatter$,this.plugins$=l.plugins$,this.chartParams$=l.chartParams$,this.event$=l.event$}catch(s){console.error(It(s))}}}class Mc extends kt{constructor(e,n){super({defaultDataFormatter:Ee,dataFormatterValidator:ra,computedDataFn:ll,dataValidator:cl,contextObserverCallback:bc},e,n)}}const Cc=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},container:{toBeTypes:["object"]}}),n=F(t,{seriesDirection:{toBe:'"row" | "column"',test:r=>r==="row"||r==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(n.status==="error")return n;if(t.valueAxis){const r=F(t.valueAxis,{position:{toBe:'"bottom" | "left" | "top" | "right"',test:i=>i==="bottom"||i==="left"||i==="top"||i==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:i=>Array.isArray(i)&&i.length===2&&(typeof i[0]=="number"||i[0]==="min"||i[0]==="auto")&&(typeof i[1]=="number"||i[1]==="max"||i[1]==="auto")},scaleRange:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},label:{toBeTypes:["string"]}});if(r.status==="error")return r}if(t.groupAxis){const r=F(t.groupAxis,{position:{toBe:'"bottom" | "left" | "top" | "right"',test:i=>i==="bottom"||i==="left"||i==="top"||i==="right"},scaleDomain:{toBe:'[number, number | "max"]',test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&(typeof i[1]=="number"||i[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(r.status==="error")return r}if(t.container){const r=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(r.status==="error")return r}return e};function qi(t,e){if(!t.length)return[];try{const n=t.reduce((o,u)=>u.length>o?u.length:o,0),i=t.map((o,u)=>{if(o.length===n)return o;const s=Object.assign([],o);for(let l=s.length;l<n;l++)s[l]=null;return s}).map((o,u)=>o.map((s,l)=>s==null?{id:"",label:"",data:{},value:null}:typeof s=="number"?{id:"",label:"",data:{},value:s}:{id:s.id??"",label:s.label??"",data:s.data??{},value:s.value}));return ei(e.seriesDirection,i)}catch{return[]}}const Fc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i;try{const a=qi(e,n),o=sn({transposedDataGrid:a,dataFormatterGrid:n,chartType:"grid"}),u=Zr({transposedDataGrid:a,dataFormatterGrid:n,chartType:"grid"});let s=0;i=a.map((l,f)=>l.map((c,h)=>{const p=Jt("grid",0,f,h),d=u[h],m={id:c.id?c.id:p,index:s,label:c.label?c.label:p,description:c.description??"",data:c.data,value:c.value,gridIndex:0,seriesIndex:f,seriesLabel:o[f],groupIndex:h,groupLabel:d,color:lt(f,r),visible:!0};return m.visible=n.visibleFilter(m,t),s++,m}))}catch(a){throw Error(a)}return i},Lc=t=>F({data:t},{data:{toBe:"(DataGridDatum | DataGridValue)[][]",test:n=>Array.isArray(n)}}),Ec=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=e.fullDataFormatter$.pipe(D(A=>A.separateSeries),q(),v(1)),i=Xi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}),a=Cn({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),o=e.computedData$.pipe(D(A=>A.flat())).pipe(v(1)),u=pt({datumList$:o,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),s=Fn({computedData$:e.computedData$}),l=Me({datumList$:o}).pipe(v(1)),f=Tn({datumList$:o}).pipe(v(1)),c=Mn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),h=Ln({computedData$:e.computedData$}).pipe(v(1)),p=En({computedLayoutData$:c}).pipe(v(1)),d=On({computedData$:e.computedData$,isSeriesSeprate$:r}).pipe(v(1)),m=Pn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}).pipe(v(1)),b=Rn({computedData$:e.computedData$,groupScaleDomainValue$:m}).pipe(v(1)),_=In({fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),T=kn({gridAxesTransform$:_}).pipe(v(1)),$=Nn({computedData$:e.computedData$,groupScaleDomainValue$:m,filteredMinMaxValue$:b,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),E=Bn({gridContainerPosition$:i,gridAxesTransform$:_,gridGraphicTransform$:$});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,isSeriesSeprate$:r,gridContainerPosition$:i,gridAxesSize$:a,gridHighlight$:u,seriesLabels$:s,SeriesDataMap$:l,GroupDataMap$:f,computedLayoutData$:c,visibleComputedData$:h,visibleComputedLayoutData$:p,computedStackedData$:d,groupScaleDomainValue$:m,filteredMinMaxValue$:b,gridAxesTransform$:_,gridAxesReverseTransform$:T,gridGraphicTransform$:$,gridGraphicReverseScale$:E}};class Oc extends kt{constructor(e,n){super({defaultDataFormatter:Pe,dataFormatterValidator:Cc,computedDataFn:Fc,dataValidator:Lc,contextObserverCallback:Ec},e,n)}}const Pc=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},gridList:{toBeTypes:["object[]"]},container:{toBeTypes:["object"]},separateGrid:{toBeTypes:["boolean"]}});if(t.gridList){const r=t.gridList.map((i,a)=>{const o=F(i,{seriesDirection:{toBe:'"row" | "column"',test:u=>u==="row"||u==="column"},rowLabels:{toBeTypes:["string[]"]},columnLabels:{toBeTypes:["string[]"]},valueAxis:{toBeTypes:["object"]},groupAxis:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]}});if(o.status==="error")return o;if(i.valueAxis){const u=F(i.valueAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:s=>s==="top"||s==="bottom"||s==="left"||s==="right"},scaleDomain:{toBe:'[number | "min" | "auto", number | "max" | "auto"]',test:s=>Array.isArray(s)&&s.length===2&&(typeof s[0]=="number"||s[0]==="min"||s[0]==="auto")&&(typeof s[1]=="number"||s[1]==="max"||s[1]==="auto")},scaleRange:{toBe:"[number, number]",test:s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"},label:{toBeTypes:["string"]}});if(u.status==="error")return u}else if(i.groupAxis){const u=F(i.groupAxis,{position:{toBe:'"top" | "bottom" | "left" | "right"',test:s=>s==="top"||s==="bottom"||s==="left"||s==="right"},scaleDomain:{toBe:'[number, number | "max"]',test:s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&(typeof s[1]=="number"||s[1]==="max")},scalePadding:{toBeTypes:["number"]},label:{toBeTypes:["string"]}});if(u.status==="error")return u}return{status:"success",columnName:"",expectToBe:""}}).find(i=>i.status==="error");if(r)return r}if(t.container){const n=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e},Rc=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const a=n.gridList[0]||Bt,o=e.map((c,h)=>n.gridList[h]||a),u=e.map((c,h)=>qi(c,o[h])),s=n.separateGrid?u.map((c,h)=>sn({transposedDataGrid:c,dataFormatterGrid:o[h],chartType:"multiGrid"})):u.map((c,h)=>Kr({transposedDataGrid:c,dataFormatterGrid:o[h],chartType:"multiGrid",gridIndex:h})),l=new Map;let f=0;s.flat().forEach((c,h)=>{if(!l.has(c)){const p=lt(f,r);l.set(c,p),f++}}),i=u.map((c,h)=>{const p=s[h],d=Qr({transposedDataGrid:c,dataFormatterGrid:o[h],chartType:"multiGrid",gridIndex:h});let m=0;return c.map((_,T)=>_.map(($,E)=>{const A=Jt("multiGrid",h,T,E),N=d[E],Y=p[T],k={id:$.id?$.id:A,index:m,label:$.label?$.label:A,description:$.description??"",data:$.data,value:$.value,gridIndex:h,seriesIndex:T,seriesLabel:Y,groupIndex:E,groupLabel:N,color:l.get(Y),visible:!0};return k.visible=n.visibleFilter(k,t),m++,k}))})}catch(a){throw Error(a)}return i},Ic=t=>F({data:t},{data:{toBe:"DataGrid[]",test:n=>Array.isArray(n)}}),kc=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=Yi({fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),i=Vn({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,multiGridContainerPosition$:i,multiGridEachDetail$:r}};class Nc extends kt{constructor(e,n){super({defaultDataFormatter:Re,dataFormatterValidator:Pc,computedDataFn:Rc,dataValidator:Ic,contextObserverCallback:kc},e,n)}}const Bc=t=>({status:"success",columnName:"",expectToBe:""}),Vc=t=>{const{data:e,dataFormatter:n,chartParams:r}=t;if(!e.length)return[];const i=$e();let a=[];try{const o=e.map((f,c)=>Array.isArray(f)?{id:"",label:"",description:"",data:{},categoryLabel:i,value:f}:U(f)?{id:f.id??"",label:f.label??"",description:f.description??"",data:f.data??{},categoryLabel:f.categoryLabel??i,value:f.value}:{id:"",label:"",description:"",data:{},categoryLabel:i,value:[]}),u=(()=>{const f=new Set(n.categoryLabels);for(let c of o){const h=c.categoryLabel??i;f.add(h)}return Array.from(f)})(),s=new Map(u.map((f,c)=>[f,c]));let l=0;o.forEach((f,c)=>{const h=l;l++;const p=Jt(n.type,c),d=s.get(f.categoryLabel)??0,m=lt(d,r),b={id:f.id?f.id:p,index:h,label:f.label?f.label:p,description:f.description??"",data:f.data,datumIndex:c,value:f.value,categoryIndex:d,categoryLabel:f.categoryLabel,visible:!0,color:m};b.visible=n.visibleFilter(b,t),a[d]||(a[d]=[]),a[d].push(b)})}catch(o){throw Error(o)}return a},Gc=t=>({status:"success",columnName:"",expectToBe:""}),Xc=({computedData$:t})=>t.pipe(D(e=>{const n=e.flat(),[r,i]=st(n.map(u=>u.value[0])),[a,o]=st(n.map(u=>u.value[1]));return{minX:r,maxX:i,minY:a,maxY:o}})),Yc=({computedData$:t,minMaxXY$:e,fullDataFormatter$:n,layout$:r})=>{function i(o,u){let s=o.maxX,l=o.minX;return l===s&&s===0&&(s=1),it({maxValue:s,minValue:l,axisWidth:u.width,scaleDomain:["auto","auto"],scaleRange:[0,1]})}function a(o,u){let s=o.maxY,l=o.minY;return l===s&&s===0&&(s=1),it({maxValue:s,minValue:l,axisWidth:u.height,scaleDomain:["auto","auto"],scaleRange:[0,1],reverse:!0})}return O({computedData:t,minMaxXY:e,fullDataFormatter:n,layout:r}).pipe(L(async o=>o),D(o=>{const u=i(o.minMaxXY,o.layout),s=a(o.minMaxXY,o.layout);return o.computedData.map((l,f)=>l.map((c,h)=>({...c,axisX:u(c.value[0]??0),axisY:s(c.value[1]??0)})))}))},Uc=({computedData$:t,fullDataFormatter$:e})=>t.pipe(D(n=>n.map(r=>r[0]?r[0].categoryLabel:"")),q((n,r)=>JSON.stringify(n).length===JSON.stringify(r).length)),Hc=({computedData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible==!0)).filter(n=>n.length>0))),zc=({computedLayoutData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible==!0)).filter(n=>n.length>0))),jc=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async i=>i),D(i=>{if(i.fullDataFormatter.separateCategory)return Ft(i.layout,i.fullDataFormatter.container,i.computedData.length);{const a=Ft(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((o,u)=>a[0])}})),qc=({visibleComputedLayoutData$:t,minMaxXY$:e,fullDataFormatter$:n})=>O({visibleComputedLayoutData:t,minMaxXY:e,fullDataFormatter:n}).pipe(D(r=>{const{minX:i,maxX:a,minY:o,maxY:u}=(()=>{let{minX:p,maxX:d,minY:m,maxY:b}=r.minMaxXY;return r.fullDataFormatter.xAxis.scaleDomain[0]==="auto"&&p>0?p=0:typeof r.fullDataFormatter.xAxis.scaleDomain[0]=="number"&&(p=r.fullDataFormatter.xAxis.scaleDomain[0]),r.fullDataFormatter.xAxis.scaleDomain[1]==="auto"&&d<0?d=0:typeof r.fullDataFormatter.xAxis.scaleDomain[1]=="number"&&(d=r.fullDataFormatter.xAxis.scaleDomain[1]),r.fullDataFormatter.yAxis.scaleDomain[0]==="auto"&&m>0?m=0:typeof r.fullDataFormatter.yAxis.scaleDomain[0]=="number"&&(m=r.fullDataFormatter.yAxis.scaleDomain[0]),r.fullDataFormatter.yAxis.scaleDomain[1]==="auto"&&b<0?b=0:typeof r.fullDataFormatter.yAxis.scaleDomain[1]=="number"&&(b=r.fullDataFormatter.yAxis.scaleDomain[1]),{minX:p,maxX:d,minY:m,maxY:b}})();let s=[],l=null,f=null,c=null,h=null;for(let p of r.visibleComputedLayoutData)for(let d of p)d.value[0]>=i&&d.value[0]<=a&&d.value[1]>=o&&d.value[1]<=u&&(s.push(d),(l==null||d.value[0]<l.value[0])&&(l=d),(f==null||d.value[0]>f.value[0])&&(f=d),(c==null||d.value[1]<c.value[1])&&(c=d),(h==null||d.value[1]>h.value[1])&&(h=d));return{datumList:s,minXDatum:l,maxXDatum:f,minYDatum:c,maxYDatum:h}})),Wc=({minMaxXY$:t,filteredMinMaxXYData$:e,fullDataFormatter$:n,layout$:r})=>{const i=new R;function a({minMaxXY:o,filteredMinMaxXYData:u,xAxis:s,yAxis:l,width:f,height:c}){let h=0,p=0,d=0,m=0,{minX:b,maxX:_,minY:T,maxY:$}=o,E=u.minXDatum.value[0]??0,A=u.maxXDatum.value[0]??0,N=u.minYDatum.value[1]??0,Y=u.maxYDatum.value[1]??0;E===A&&A===0&&(A=1),N===Y&&Y===0&&(Y=1),b===_&&_===0&&(_=1),T===$&&$===0&&($=1);const k=it({maxValue:A,minValue:E,axisWidth:f,scaleDomain:s.scaleDomain,scaleRange:s.scaleRange}),w=k(b>0?0:b),x=k(_<0?0:_);h=w,d=(x-w)/f;const S=it({maxValue:Y,minValue:N,axisWidth:c,scaleDomain:l.scaleDomain,scaleRange:l.scaleRange,reverse:!0}),C=S(T>0?0:T),B=S($<0?0:$);return p=B,m=(C-B)/c,{translate:[h,p],scale:[d,m],rotate:0,rotateX:0,rotateY:0,value:`translate(${h}px, ${p}px) scale(${d}, ${m})`}}return new P(o=>(O({minMaxXY:t,filteredMinMaxXYData:e,fullDataFormatter:n,layout:r}).pipe(M(i),L(async u=>u)).subscribe(u=>{if(!u.filteredMinMaxXYData.minXDatum||!u.filteredMinMaxXYData.maxXDatum||u.filteredMinMaxXYData.minXDatum.value[0]==null||u.filteredMinMaxXYData.maxXDatum.value[0]==null||!u.filteredMinMaxXYData.minYDatum||!u.filteredMinMaxXYData.maxYDatum||u.filteredMinMaxXYData.minYDatum.value[1]==null||u.filteredMinMaxXYData.maxYDatum.value[1]==null)return;const s=a({minMaxXY:u.minMaxXY,filteredMinMaxXYData:u.filteredMinMaxXYData,xAxis:u.fullDataFormatter.xAxis,yAxis:u.fullDataFormatter.yAxis,width:u.layout.width,height:u.layout.height});o.next(s)}),function(){i.next(void 0)}))},Jc=({multiValueContainerPosition$:t,multiValueGraphicTransform$:e})=>O({multiValueContainerPosition:t,multiValueGraphicTransform:e}).pipe(L(async n=>n),D(n=>n.multiValueContainerPosition.map((r,i)=>[1/n.multiValueGraphicTransform.scale[0]/n.multiValueContainerPosition[i].scale[0],1/n.multiValueGraphicTransform.scale[1]/n.multiValueContainerPosition[i].scale[1]]))),Kc=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=e.fullDataFormatter$.pipe(D(b=>b.separateCategory),q(),v(1)),i=jc({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}),a=e.computedData$.pipe(D(b=>b.flat().flat())).pipe(v(1)),o=pt({datumList$:a,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),u=Uc({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}),s=Qt({datumList$:a}).pipe(v(1)),l=Xc({computedData$:e.computedData$}).pipe(v(1)),f=Yc({computedData$:e.computedData$,minMaxXY$:l,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),c=Hc({computedData$:e.computedData$}).pipe(v(1)),h=zc({computedLayoutData$:f}).pipe(v(1)),p=qc({visibleComputedLayoutData$:h,minMaxXY$:l,fullDataFormatter$:e.fullDataFormatter$}).pipe(v(1)),d=Wc({minMaxXY$:l,filteredMinMaxXYData$:p,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),m=Jc({multiValueContainerPosition$:i,multiValueGraphicTransform$:d});return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,isCategorySeprate$:r,multiValueContainerPosition$:i,multiValueHighlight$:o,categoryLabels$:u,CategoryDataMap$:s,minMaxXY$:l,computedLayoutData$:f,visibleComputedData$:c,visibleComputedLayoutData$:h,filteredMinMaxXYData$:p,multiValueGraphicTransform$:d,multiValueGraphicReverseScale$:m}};class Zc extends kt{constructor(e,n){super({defaultDataFormatter:Ie,dataFormatterValidator:Bc,computedDataFn:Vc,dataValidator:Gc,contextObserverCallback:Kc},e,n)}}const Qc=t=>({status:"success",columnName:"",expectToBe:""}),tf=t=>{const{data:e,dataFormatter:n,chartParams:r}=t,i=$e();let a=[],o=[];try{let u=[],s=[];if(e.nodes)u=e.nodes,s=e.edges;else if(e[0])u=e[0],s=e[1];else return{nodes:[],edges:[]};const l=(()=>{const h=new Set(n.categoryLabels);for(let p of u){const d=p.categoryLabel??i;h.add(d)}for(let p of s){const d=p.categoryLabel??i;h.add(d)}return Array.from(h)})(),f=new Map(l.map((h,p)=>[h,p]));a=u.map((h,p)=>{const d=h.categoryLabel??i,m=f.get(d)??0,b={id:h.id,index:p,label:h.label??"",description:h.description??"",data:h.data??{},value:h.value??0,categoryIndex:m,categoryLabel:d,color:lt(m,r),visible:!0};return b.visible=n.visibleFilter(b,t),b});const c=new Map(a.map(h=>[h.id,h]));o=s.map((h,p)=>{const d=h.categoryLabel??i,m=c.get(h.start),b=c.get(h.end);return{id:h.id,index:p,label:h.label??"",description:h.description??"",data:h.data??{},value:h.value??0,categoryIndex:f.get(d),categoryLabel:d,color:lt(p,r),startNode:m,endNode:b,visible:m.visible&&b.visible}})}catch(u){throw Error(u)}return{nodes:a,edges:o}},ef=t=>({status:"success",columnName:"",expectToBe:""}),nf=(t,e)=>O({CategoryNodeMap:t,CategoryEdgeMap:e}).pipe(L(async n=>n),D(n=>[...Array.from(n.CategoryNodeMap.keys()),...Array.from(n.CategoryEdgeMap.keys())]),q((n,r)=>JSON.stringify(n).length===JSON.stringify(r).length)),rf=t=>t.pipe(D(e=>{const n=new Map;return e.nodes.forEach(r=>{n.set(r.id,r)}),n})),af=t=>t.pipe(D(e=>{const n=new Map;return e.edges.forEach(r=>{n.set(r.id,r)}),n})),of=({computedData$:t,NodeMap$:e})=>O({computedData:t,NodeMap:e}).pipe(L(async n=>n),D(n=>({nodes:n.computedData.nodes.filter(r=>r.visible),edges:n.computedData.edges.filter(r=>r.visible).filter(r=>n.NodeMap.has(r.startNode.id)&&n.NodeMap.has(r.endNode.id))}))),uf=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=pt({datumList$:e.computedData$.pipe(D(c=>c.nodes)),fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),i=pt({datumList$:e.computedData$.pipe(D(c=>c.edges)),fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),a=Qt({datumList$:e.computedData$.pipe(D(c=>c.nodes))}).pipe(v(1)),o=Qt({datumList$:e.computedData$.pipe(D(c=>c.edges))}).pipe(v(1)),u=rf(e.computedData$).pipe(v(1)),s=af(e.computedData$).pipe(v(1)),l=nf(a,o).pipe(v(1)),f=of({computedData$:e.computedData$,NodeMap$:u}).pipe(v(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,relationshipHighlightNodes$:r,relationshipHighlightEdges$:i,categoryLabels$:l,CategoryNodeMap$:a,CategoryEdgeMap$:o,NodeMap$:u,EdgeMap$:s,visibleComputedData$:f}};class sf extends kt{constructor(e,n){super({defaultDataFormatter:Ne,dataFormatterValidator:Qc,computedDataFn:tf,dataValidator:ef,contextObserverCallback:uf},e,n)}}const lf=t=>F(t,{visibleFilter:{toBeTypes:["Function"]},categoryLabels:{toBeTypes:["string[]"]}}),cf=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t,i=$e(),a=new Map(n.categoryLabels.map((u,s)=>[u,s]));let o={id:"",index:0,label:"",description:"",categoryIndex:-1,categoryLabel:"",color:"",visible:!0,data:{},value:0,level:0,seq:0,children:[]};try{const u=function(){if(U(e)===!0)return JSON.parse(JSON.stringify(e));if(Array.isArray(e)===!1)return{id:""};let f;const c=new Map;e.forEach(p=>{if(!p.parent)f=p;else{const d=c.get(p.parent)??[];d.push(p),c.set(p.parent,d)}});const h=p=>({id:p.id,label:p.label,data:p.data,value:p.value,categoryLabel:p.categoryLabel??i,children:(c.get(p.id)??[]).map(d=>h(d))});return f?h(f):{id:""}}();let s=0;const l=(f,c,h)=>{const p=c+1,d=f.categoryLabel??i;a.has(d)||a.set(d,a.size);const m=a.get(d)??0,b=s;s++;const _={id:f.id,index:b,level:c,seq:h,label:f.label??"",description:f.description??"",categoryIndex:m,categoryLabel:d,color:lt(m,r),data:f.data??{},value:f.value,visible:!0,children:(f.children??[]).map((T,$)=>l(T,p,$))};return _.visible=n.visibleFilter(_,t),_};o=l(u,0,0)}catch(u){throw Error(u)}return o},ff=t=>F({data:t},{data:{toBe:"DataTreeObj | DataTreeDatum[]",test:n=>U(n)&&n.id!==void 0}}),hf=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=Ui({computedData$:e.computedData$}).pipe(v(1)),i=pt({datumList$:r,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),a=Qt({datumList$:r}).pipe(v(1)),o=Hi(a).pipe(v(1)),u=zi({computedData$:e.computedData$}).pipe(v(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,treeHighlight$:i,categoryLabels$:o,CategoryDataMap$:a,visibleComputedData$:u}};class pf extends kt{constructor(e,n){super({defaultDataFormatter:ke,dataFormatterValidator:lf,computedDataFn:cf,dataValidator:ff,contextObserverCallback:hf},e,n)}}function df({chartType:t,config:e,initFn:n}){const r=new R,i=new WeakMap;let a=()=>{},o;const u=new hi(e.defaultParams),s=new hi({}),l=u.pipe(L(f=>s.pipe(M(r),D(c=>{try{const{status:h,columnName:p,expectToBe:d}=e.validator(c,{validateColumns:F});if(h==="error")throw new Error(Dt({columnName:p,expectToBe:d,from:`${e.name}.params$`}));h==="warning"&&console.warn(xt({columnName:p,expectToBe:d,from:`${e.name}.params$`}))}catch(h){console.error(It(h))}return ut(c,f)}))),v(1));return{params$:s,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){o&&(a=n(o)??(()=>{}),i.set(o.selection,o))},destroy(){a(),o&&(o.selection.remove(),o=void 0),r.next(void 0)},setPresetParams:f=>{u.next(ut(f,e.defaultParams))},setContext:f=>{o=f,o.observer.fullParams$=l}}}const _t=t=>function(n){return function(i){return class{constructor(){const o=df({chartType:t,config:n,initFn:i});this.params$=o.params$,this.name=o.name,this.chartType=o.chartType,this.defaultParams=o.defaultParams,this.layerIndex=o.layerIndex,this.init=o.init,this.destroy=o.destroy,this.setPresetParams=o.setPresetParams,this.setContext=o.setContext}}}},mf=_t("series"),gf=_t("grid"),yf=_t("multiGrid"),vf=_t("multiValue"),bf=_t("noneData"),wf=_t("relationship"),Df=_t("tree");g.DEFAULTL_DATA_RELATIONA=ta,g.DEFAULT_CHART_HEIGHT=Xn,g.DEFAULT_CHART_OPTIONS=ot,g.DEFAULT_CHART_PARAMS=Le,g.DEFAULT_CHART_WIDTH=Gn,g.DEFAULT_DATA_FORMATTER_CONTAINER=Nt,g.DEFAULT_DATA_FORMATTER_GRID=Pe,g.DEFAULT_DATA_FORMATTER_GRID_GRID=Oe,g.DEFAULT_DATA_FORMATTER_GROUP_AXIS=Yn,g.DEFAULT_DATA_FORMATTER_MULTI_GRID=Re,g.DEFAULT_DATA_FORMATTER_MULTI_GRID_GRID=Bt,g.DEFAULT_DATA_FORMATTER_MULTI_VALUE=Ie,g.DEFAULT_DATA_FORMATTER_RELATIONSHIP=Ne,g.DEFAULT_DATA_FORMATTER_SERIES=Ee,g.DEFAULT_DATA_FORMATTER_TREE=ke,g.DEFAULT_DATA_FORMATTER_VALUE_AXIS=V,g.DEFAULT_DATA_GRID=Ji,g.DEFAULT_DATA_MULTI_GRID=Ki,g.DEFAULT_DATA_MULTI_VALUE=Zi,g.DEFAULT_DATA_SERIES=Wi,g.DEFAULT_DATA_TREE=Qi,g.DEFAULT_PADDING=Fe,g.GridChart=Oc,g.MultiGridChart=Nc,g.MultiValueChart=Zc,g.RelationshipChart=sf,g.SeriesChart=Mc,g.TreeChart=pf,g.calcGridContainerLayout=Ft,g.calcSeriesContainerLayout=cn,g.categoryDataMapObservable=Qt,g.categoryLabelsObservable=Hi,g.computedStackedDataObservables=On,g.createAxisToLabelIndexScale=xc,g.createAxisToValueScale=wc,g.createDefaultCategoryLabel=$e,g.createDefaultDatumId=Jt,g.createDefaultGroupLabel=un,g.createDefaultSeriesLabel=_e,g.createGridGroupLabels=Zr,g.createGridSeriesLabels=sn,g.createLabelToAxisScale=Dc,g.createMultiGridGroupLabels=Qr,g.createMultiGridSeriesLabels=Kr,g.createValueToAxisScale=it,g.defineGridPlugin=gf,g.defineMultiGridPlugin=yf,g.defineMultiValuePlugin=vf,g.defineNoneDataPlugin=bf,g.defineRelationshipPlugin=wf,g.defineSeriesPlugin=mf,g.defineTreePlugin=Df,g.filteredMinMaxValueObservable=Rn,g.formatCommaNumber=ea,g.formatValueToLabel=il,g.getMinMax=st,g.getMinMaxGrid=ln,g.getMinMaxMultiGrid=ol,g.getMinMaxMultiValue=ul,g.getMinMaxMultiValueXY=sl,g.getMinMaxSeries=al,g.getMinMaxValue=ti,g.gridAxesReverseTransformObservable=kn,g.gridAxesSizeObservable=Cn,g.gridAxesTransformObservable=In,g.gridComputedLayoutDataObservable=Mn,g.gridContainerPositionObservable=Xi,g.gridGraphicReverseScaleObservable=Bn,g.gridGraphicTransformObservable=Nn,g.gridSeriesLabelsObservable=Fn,g.gridVisibleComputedDataObservable=Ln,g.gridVisibleComputedLayoutDataObservable=En,g.groupDataMapObservable=Tn,g.groupScaleDomainValueObservable=Pn,g.highlightObservable=pt,g.isDom=Hn,g.isFunction=Un,g.isPlainObject=U,g.mergeOptionsWithDefault=ut,g.multiGridContainerObservable=Vn,g.multiGridEachDetailObservable=Yi,g.nodeListObservable=Ui,g.resizeObservable=Ii,g.separateSeriesObservable=ki,g.seriesColorPredicate=lt,g.seriesComputedLayoutDataObservable=Bi,g.seriesContainerPositionMapObservable=Gi,g.seriesContainerPositionObservable=Vi,g.seriesDataMapObservable=Me,g.seriesLabelsObservable=Ni,g.seriesVisibleComputedDataObservable=Sn,g.textSizePxObservable=wt,g.transposeData=ei,g.treeVisibleComputedDataObservable=zi,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
@@ -21,4 +21,4 @@ export declare const DEFAULT_DATA_FORMATTER_MULTI_GRID_GRID: DataFormatterMultiG
21
21
  export declare const DEFAULT_DATA_FORMATTER_MULTI_GRID: DataFormatterMultiGrid;
22
22
  export declare const DEFAULT_DATA_FORMATTER_MULTI_VALUE: DataFormatterMultiValue;
23
23
  export declare const DEFAULT_DATA_FORMATTER_TREE: DataFormatterTree;
24
- export declare const DEFAULT_DATA_FORMATTER_RELATIONAL: DataFormatterRelationship;
24
+ export declare const DEFAULT_DATA_FORMATTER_RELATIONSHIP: DataFormatterRelationship;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbcharts/core",
3
- "version": "3.0.0-beta.6",
3
+ "version": "3.0.0-beta.7",
4
4
  "description": "OrbCharts is an open source chart library based on d3.js and rx.js",
5
5
  "author": "Blue Planet Inc.",
6
6
  "license": "Apache-2.0",
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  ChartEntity,
3
3
  ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_RELATIONAL} from './defaults'
4
+ import { DEFAULT_DATA_FORMATTER_RELATIONSHIP} from './defaults'
5
5
  import { dataFormatterValidator } from './relationship/dataFormatterValidator'
6
6
  import { computedDataFn } from './relationship/computedDataFn'
7
7
  import { dataValidator } from './relationship/dataValidator'
@@ -12,7 +12,7 @@ export class RelationshipChart extends AbstractChart<'relationship'> implements
12
12
  constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'relationship'>) {
13
13
  super(
14
14
  {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_RELATIONAL,
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_RELATIONSHIP,
16
16
  dataFormatterValidator,
17
17
  computedDataFn,
18
18
  dataValidator,
package/src/defaults.ts CHANGED
@@ -218,7 +218,7 @@ export const DEFAULT_DATA_FORMATTER_TREE: DataFormatterTree = {
218
218
  }
219
219
  DEFAULT_DATA_FORMATTER_TREE.visibleFilter.toString = () => `(datum, context) => true`
220
220
 
221
- export const DEFAULT_DATA_FORMATTER_RELATIONAL: DataFormatterRelationship = {
221
+ export const DEFAULT_DATA_FORMATTER_RELATIONSHIP: DataFormatterRelationship = {
222
222
  type: 'relationship',
223
223
  visibleFilter: (datum, context) => true,
224
224
  categoryLabels: []
@@ -231,5 +231,5 @@ export const DEFAULT_DATA_FORMATTER_RELATIONAL: DataFormatterRelationship = {
231
231
  // descriptionFormat: (edge: any) => (edge && edge.label) ?? ''
232
232
  // },
233
233
  }
234
- DEFAULT_DATA_FORMATTER_RELATIONAL.visibleFilter.toString = () => `(datum, context) => true`
234
+ DEFAULT_DATA_FORMATTER_RELATIONSHIP.visibleFilter.toString = () => `(datum, context) => true`
235
235