@cosmos.gl/graph 2.3.1-beta.0 → 2.3.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -736,16 +736,16 @@ function ma(t, e, n, r, i, o) {
736
736
  });
737
737
  }
738
738
  function Zs(t, e) {
739
- var n = gn(t, e);
739
+ var n = yn(t, e);
740
740
  if (n.state > sc) throw new Error("too late; already scheduled");
741
741
  return n;
742
742
  }
743
743
  function Pn(t, e) {
744
- var n = gn(t, e);
744
+ var n = yn(t, e);
745
745
  if (n.state > Vo) throw new Error("too late; already running");
746
746
  return n;
747
747
  }
748
- function gn(t, e) {
748
+ function yn(t, e) {
749
749
  var n = t.__transition;
750
750
  if (!n || !(n = n[e])) throw new Error("transition not found");
751
751
  return n;
@@ -1051,28 +1051,28 @@ function br(t) {
1051
1051
  return t = _r(t), (t < 16 ? "0" : "") + t.toString(16);
1052
1052
  }
1053
1053
  function sl(t, e, n, r) {
1054
- return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new pn(t, e, n, r);
1054
+ return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new vn(t, e, n, r);
1055
1055
  }
1056
1056
  function uc(t) {
1057
- if (t instanceof pn) return new pn(t.h, t.s, t.l, t.opacity);
1058
- if (t instanceof Mi || (t = Kn(t)), !t) return new pn();
1059
- if (t instanceof pn) return t;
1057
+ if (t instanceof vn) return new vn(t.h, t.s, t.l, t.opacity);
1058
+ if (t instanceof Mi || (t = Kn(t)), !t) return new vn();
1059
+ if (t instanceof vn) return t;
1060
1060
  t = t.rgb();
1061
1061
  var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), o = Math.max(e, n, r), s = NaN, f = o - i, u = (o + i) / 2;
1062
- return f ? (e === o ? s = (n - r) / f + (n < r) * 6 : n === o ? s = (r - e) / f + 2 : s = (e - n) / f + 4, f /= u < 0.5 ? o + i : 2 - o - i, s *= 60) : f = u > 0 && u < 1 ? 0 : s, new pn(s, f, u, t.opacity);
1062
+ return f ? (e === o ? s = (n - r) / f + (n < r) * 6 : n === o ? s = (r - e) / f + 2 : s = (e - n) / f + 4, f /= u < 0.5 ? o + i : 2 - o - i, s *= 60) : f = u > 0 && u < 1 ? 0 : s, new vn(s, f, u, t.opacity);
1063
1063
  }
1064
1064
  function d0(t, e, n, r) {
1065
- return arguments.length === 1 ? uc(t) : new pn(t, e, n, r ?? 1);
1065
+ return arguments.length === 1 ? uc(t) : new vn(t, e, n, r ?? 1);
1066
1066
  }
1067
- function pn(t, e, n, r) {
1067
+ function vn(t, e, n, r) {
1068
1068
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
1069
1069
  }
1070
- Qs(pn, d0, fc(Mi, {
1070
+ Qs(vn, d0, fc(Mi, {
1071
1071
  brighter(t) {
1072
- return t = t == null ? aa : Math.pow(aa, t), new pn(this.h, this.s, this.l * t, this.opacity);
1072
+ return t = t == null ? aa : Math.pow(aa, t), new vn(this.h, this.s, this.l * t, this.opacity);
1073
1073
  },
1074
1074
  darker(t) {
1075
- return t = t == null ? Ii : Math.pow(Ii, t), new pn(this.h, this.s, this.l * t, this.opacity);
1075
+ return t = t == null ? Ii : Math.pow(Ii, t), new vn(this.h, this.s, this.l * t, this.opacity);
1076
1076
  },
1077
1077
  rgb() {
1078
1078
  var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
@@ -1084,7 +1084,7 @@ Qs(pn, d0, fc(Mi, {
1084
1084
  );
1085
1085
  },
1086
1086
  clamp() {
1087
- return new pn(fl(this.h), Do(this.s), Do(this.l), sa(this.opacity));
1087
+ return new vn(fl(this.h), Do(this.s), Do(this.l), sa(this.opacity));
1088
1088
  },
1089
1089
  displayable() {
1090
1090
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
@@ -1159,7 +1159,7 @@ function b0(t, e) {
1159
1159
  return n.setTime(t * (1 - r) + e * r), n;
1160
1160
  };
1161
1161
  }
1162
- function mn(t, e) {
1162
+ function pn(t, e) {
1163
1163
  return t = +t, e = +e, function(n) {
1164
1164
  return t * (1 - n) + e * n;
1165
1165
  };
@@ -1188,7 +1188,7 @@ function T0(t) {
1188
1188
  function cc(t, e) {
1189
1189
  var n = Is.lastIndex = ys.lastIndex = 0, r, i, o, s = -1, f = [], u = [];
1190
1190
  for (t = t + "", e = e + ""; (r = Is.exec(t)) && (i = ys.exec(e)); )
1191
- (o = i.index) > n && (o = e.slice(n, o), f[s] ? f[s] += o : f[++s] = o), (r = r[0]) === (i = i[0]) ? f[s] ? f[s] += i : f[++s] = i : (f[++s] = null, u.push({ i: s, x: mn(r, i) })), n = ys.lastIndex;
1191
+ (o = i.index) > n && (o = e.slice(n, o), f[s] ? f[s] += o : f[++s] = o), (r = r[0]) === (i = i[0]) ? f[s] ? f[s] += i : f[++s] = i : (f[++s] = null, u.push({ i: s, x: pn(r, i) })), n = ys.lastIndex;
1192
1192
  return n < e.length && (o = e.slice(n), f[s] ? f[s] += o : f[++s] = o), f.length < 2 ? u[0] ? T0(u[0].x) : S0(e) : (e = u.length, function(l) {
1193
1193
  for (var p = 0, x; p < e; ++p) f[(x = u[p]).i] = x.x(l);
1194
1194
  return f.join("");
@@ -1196,7 +1196,7 @@ function cc(t, e) {
1196
1196
  }
1197
1197
  function Js(t, e) {
1198
1198
  var n = typeof e, r;
1199
- return e == null || n === "boolean" ? Ks(e) : (n === "number" ? mn : n === "string" ? (r = Kn(e)) ? (e = r, fa) : cc : e instanceof Kn ? fa : e instanceof Date ? b0 : y0(e) ? g0 : Array.isArray(e) ? x0 : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? _0 : mn)(t, e);
1199
+ return e == null || n === "boolean" ? Ks(e) : (n === "number" ? pn : n === "string" ? (r = Kn(e)) ? (e = r, fa) : cc : e instanceof Kn ? fa : e instanceof Date ? b0 : y0(e) ? g0 : Array.isArray(e) ? x0 : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? _0 : pn)(t, e);
1200
1200
  }
1201
1201
  function w0(t, e) {
1202
1202
  return t = +t, e = +e, function(n) {
@@ -1237,19 +1237,19 @@ function dc(t, e, n, r) {
1237
1237
  function o(l, p, x, S, D, Y) {
1238
1238
  if (l !== x || p !== S) {
1239
1239
  var Ee = D.push("translate(", null, e, null, n);
1240
- Y.push({ i: Ee - 4, x: mn(l, x) }, { i: Ee - 2, x: mn(p, S) });
1240
+ Y.push({ i: Ee - 4, x: pn(l, x) }, { i: Ee - 2, x: pn(p, S) });
1241
1241
  } else (x || S) && D.push("translate(" + x + e + S + n);
1242
1242
  }
1243
1243
  function s(l, p, x, S) {
1244
- l !== p ? (l - p > 180 ? p += 360 : p - l > 180 && (l += 360), S.push({ i: x.push(i(x) + "rotate(", null, r) - 2, x: mn(l, p) })) : p && x.push(i(x) + "rotate(" + p + r);
1244
+ l !== p ? (l - p > 180 ? p += 360 : p - l > 180 && (l += 360), S.push({ i: x.push(i(x) + "rotate(", null, r) - 2, x: pn(l, p) })) : p && x.push(i(x) + "rotate(" + p + r);
1245
1245
  }
1246
1246
  function f(l, p, x, S) {
1247
- l !== p ? S.push({ i: x.push(i(x) + "skewX(", null, r) - 2, x: mn(l, p) }) : p && x.push(i(x) + "skewX(" + p + r);
1247
+ l !== p ? S.push({ i: x.push(i(x) + "skewX(", null, r) - 2, x: pn(l, p) }) : p && x.push(i(x) + "skewX(" + p + r);
1248
1248
  }
1249
1249
  function u(l, p, x, S, D, Y) {
1250
1250
  if (l !== x || p !== S) {
1251
1251
  var Ee = D.push(i(D) + "scale(", null, ",", null, ")");
1252
- Y.push({ i: Ee - 4, x: mn(l, x) }, { i: Ee - 2, x: mn(p, S) });
1252
+ Y.push({ i: Ee - 4, x: pn(l, x) }, { i: Ee - 2, x: pn(p, S) });
1253
1253
  } else (x !== 1 || S !== 1) && D.push(i(D) + "scale(" + x + "," + S + ")");
1254
1254
  }
1255
1255
  return function(l, p) {
@@ -1334,7 +1334,7 @@ function D0(t, e, n) {
1334
1334
  function z0(t, e) {
1335
1335
  var n = this._id;
1336
1336
  if (t += "", arguments.length < 2) {
1337
- for (var r = gn(this.node(), n).tween, i = 0, o = r.length, s; i < o; ++i)
1337
+ for (var r = yn(this.node(), n).tween, i = 0, o = r.length, s; i < o; ++i)
1338
1338
  if ((s = r[i]).name === t)
1339
1339
  return s.value;
1340
1340
  return null;
@@ -1347,12 +1347,12 @@ function ef(t, e, n) {
1347
1347
  var i = Pn(this, r);
1348
1348
  (i.value || (i.value = {}))[e] = n.apply(this, arguments);
1349
1349
  }), function(i) {
1350
- return gn(i, r).value[e];
1350
+ return yn(i, r).value[e];
1351
1351
  };
1352
1352
  }
1353
1353
  function mc(t, e) {
1354
1354
  var n;
1355
- return (typeof e == "number" ? mn : e instanceof Kn ? fa : (n = Kn(e)) ? (e = n, fa) : cc)(t, e);
1355
+ return (typeof e == "number" ? pn : e instanceof Kn ? fa : (n = Kn(e)) ? (e = n, fa) : cc)(t, e);
1356
1356
  }
1357
1357
  function O0(t) {
1358
1358
  return function() {
@@ -1442,7 +1442,7 @@ function Y0(t, e) {
1442
1442
  }
1443
1443
  function Z0(t) {
1444
1444
  var e = this._id;
1445
- return arguments.length ? this.each((typeof t == "function" ? q0 : Y0)(e, t)) : gn(this.node(), e).delay;
1445
+ return arguments.length ? this.each((typeof t == "function" ? q0 : Y0)(e, t)) : yn(this.node(), e).delay;
1446
1446
  }
1447
1447
  function Q0(t, e) {
1448
1448
  return function() {
@@ -1456,7 +1456,7 @@ function K0(t, e) {
1456
1456
  }
1457
1457
  function J0(t) {
1458
1458
  var e = this._id;
1459
- return arguments.length ? this.each((typeof t == "function" ? Q0 : K0)(e, t)) : gn(this.node(), e).duration;
1459
+ return arguments.length ? this.each((typeof t == "function" ? Q0 : K0)(e, t)) : yn(this.node(), e).duration;
1460
1460
  }
1461
1461
  function ev(t, e) {
1462
1462
  if (typeof e != "function") throw new Error();
@@ -1466,7 +1466,7 @@ function ev(t, e) {
1466
1466
  }
1467
1467
  function tv(t) {
1468
1468
  var e = this._id;
1469
- return arguments.length ? this.each(ev(e, t)) : gn(this.node(), e).ease;
1469
+ return arguments.length ? this.each(ev(e, t)) : yn(this.node(), e).ease;
1470
1470
  }
1471
1471
  function nv(t, e) {
1472
1472
  return function() {
@@ -1510,7 +1510,7 @@ function sv(t, e, n) {
1510
1510
  }
1511
1511
  function fv(t, e) {
1512
1512
  var n = this._id;
1513
- return arguments.length < 2 ? gn(this.node(), n).on.on(t) : this.each(sv(n, t, e));
1513
+ return arguments.length < 2 ? yn(this.node(), n).on.on(t) : this.each(sv(n, t, e));
1514
1514
  }
1515
1515
  function uv(t) {
1516
1516
  return function() {
@@ -1527,7 +1527,7 @@ function cv(t) {
1527
1527
  typeof t != "function" && (t = Ws(t));
1528
1528
  for (var r = this._groups, i = r.length, o = new Array(i), s = 0; s < i; ++s)
1529
1529
  for (var f = r[s], u = f.length, l = o[s] = new Array(u), p, x, S = 0; S < u; ++S)
1530
- (p = f[S]) && (x = t.call(p, p.__data__, S, f)) && ("__data__" in p && (x.__data__ = p.__data__), l[S] = x, ma(l[S], e, n, S, l, gn(p, n)));
1530
+ (p = f[S]) && (x = t.call(p, p.__data__, S, f)) && ("__data__" in p && (x.__data__ = p.__data__), l[S] = x, ma(l[S], e, n, S, l, yn(p, n)));
1531
1531
  return new Nn(o, this._parents, e, n);
1532
1532
  }
1533
1533
  function hv(t) {
@@ -1536,7 +1536,7 @@ function hv(t) {
1536
1536
  for (var r = this._groups, i = r.length, o = [], s = [], f = 0; f < i; ++f)
1537
1537
  for (var u = r[f], l = u.length, p, x = 0; x < l; ++x)
1538
1538
  if (p = u[x]) {
1539
- for (var S = t.call(p, p.__data__, x, u), D, Y = gn(p, n), Ee = 0, Te = S.length; Ee < Te; ++Ee)
1539
+ for (var S = t.call(p, p.__data__, x, u), D, Y = yn(p, n), Ee = 0, Te = S.length; Ee < Te; ++Ee)
1540
1540
  (D = S[Ee]) && ma(D, e, n, Ee, S, Y);
1541
1541
  o.push(S), s.push(p);
1542
1542
  }
@@ -1641,7 +1641,7 @@ function kv() {
1641
1641
  for (var t = this._name, e = this._id, n = vc(), r = this._groups, i = r.length, o = 0; o < i; ++o)
1642
1642
  for (var s = r[o], f = s.length, u, l = 0; l < f; ++l)
1643
1643
  if (u = s[l]) {
1644
- var p = gn(u, e);
1644
+ var p = yn(u, e);
1645
1645
  ma(u, t, n, l, s, {
1646
1646
  time: p.time + p.delay + p.duration,
1647
1647
  delay: 0,
@@ -2024,10 +2024,10 @@ function Uv() {
2024
2024
  "unsupported renderbuffer format for attachment"
2025
2025
  );
2026
2026
  }
2027
- var Qe = 33071, Ze = 9728, dt = 9984, ct = 9985, _t = 9986, st = 9987, Vt = 5120, $t = 5121, Yt = 5122, Cn = 5123, Ni = 5124, Gi = 5125, kn = 5126, Jn = 32819, yn = 32820, Er = 33635, Pr = 34042, Bn = 36193, Dt = {};
2028
- Dt[Vt] = Dt[$t] = 1, Dt[Yt] = Dt[Cn] = Dt[Bn] = Dt[Er] = Dt[Jn] = Dt[yn] = 2, Dt[Ni] = Dt[Gi] = Dt[kn] = Dt[Pr] = 4;
2027
+ var Qe = 33071, Ze = 9728, dt = 9984, ct = 9985, _t = 9986, st = 9987, Vt = 5120, $t = 5121, Yt = 5122, Cn = 5123, Ni = 5124, Gi = 5125, kn = 5126, Jn = 32819, xn = 32820, Er = 33635, Pr = 34042, Bn = 36193, Dt = {};
2028
+ Dt[Vt] = Dt[$t] = 1, Dt[Yt] = Dt[Cn] = Dt[Bn] = Dt[Er] = Dt[Jn] = Dt[xn] = 2, Dt[Ni] = Dt[Gi] = Dt[kn] = Dt[Pr] = 4;
2029
2029
  function er(a, h) {
2030
- return a === yn || a === Jn || a === Er ? 2 : a === Pr ? 4 : Dt[a] * h;
2030
+ return a === xn || a === Jn || a === Er ? 2 : a === Pr ? 4 : Dt[a] * h;
2031
2031
  }
2032
2032
  function tr(a) {
2033
2033
  return !(a & a - 1) && !!a;
@@ -2146,7 +2146,7 @@ function Uv() {
2146
2146
  texture2D: Bi,
2147
2147
  textureCube: va
2148
2148
  }), nr = 0, Un = 0, Vn = 5, Ui = 6;
2149
- function xn(a, h) {
2149
+ function bn(a, h) {
2150
2150
  this.id = nr++, this.type = a, this.data = h;
2151
2151
  }
2152
2152
  function ei(a) {
@@ -2172,26 +2172,26 @@ function Uv() {
2172
2172
  return "[" + Ln(a).join("][") + "]";
2173
2173
  }
2174
2174
  function Cr(a, h) {
2175
- return new xn(a, ti(h + ""));
2175
+ return new bn(a, ti(h + ""));
2176
2176
  }
2177
2177
  function kr(a) {
2178
- return typeof a == "function" && !a._reglType || a instanceof xn;
2178
+ return typeof a == "function" && !a._reglType || a instanceof bn;
2179
2179
  }
2180
2180
  function nn(a, h) {
2181
2181
  if (typeof a == "function")
2182
- return new xn(Un, a);
2182
+ return new bn(Un, a);
2183
2183
  if (typeof a == "number" || typeof a == "boolean")
2184
- return new xn(Vn, a);
2184
+ return new bn(Vn, a);
2185
2185
  if (Array.isArray(a))
2186
- return new xn(Ui, a.map(function(_, O) {
2186
+ return new bn(Ui, a.map(function(_, O) {
2187
2187
  return nn(_, h + "[" + O + "]");
2188
2188
  }));
2189
- if (a instanceof xn)
2189
+ if (a instanceof bn)
2190
2190
  return a;
2191
2191
  d(!1, "invalid option type in uniform " + h);
2192
2192
  }
2193
2193
  var kt = {
2194
- DynamicVariable: xn,
2194
+ DynamicVariable: bn,
2195
2195
  define: Cr,
2196
2196
  isDynamic: kr,
2197
2197
  unbox: nn,
@@ -2902,7 +2902,7 @@ function Uv() {
2902
2902
  }
2903
2903
  var gf = function(a) {
2904
2904
  return !(a & a - 1) && !!a;
2905
- }, Ch = 34467, bn = 3553, Ca = 34067, io = 34069, fr = 6408, ka = 6406, oo = 6407, si = 6409, ao = 6410, yf = 32854, La = 32855, xf = 36194, kh = 32819, Lh = 32820, Fh = 33635, Rh = 34042, Fa = 6402, so = 34041, Ra = 35904, Ia = 35906, Or = 36193, Da = 33776, za = 33777, Oa = 33778, Ma = 33779, bf = 35986, _f = 35987, Sf = 34798, Tf = 35840, wf = 35841, Af = 35842, Ef = 35843, Pf = 36196, Mr = 5121, Na = 5123, Ga = 5125, fi = 5126, Ih = 10242, Dh = 10243, zh = 10497, Ba = 33071, Oh = 33648, Mh = 10240, Nh = 10241, Ua = 9728, Gh = 9729, Va = 9984, Cf = 9985, kf = 9986, $a = 9987, Bh = 33170, fo = 4352, Uh = 4353, Vh = 4354, $h = 34046, Hh = 3317, Xh = 37440, jh = 37441, Wh = 37443, Lf = 37444, ui = 33984, qh = [
2905
+ }, Ch = 34467, _n = 3553, Ca = 34067, io = 34069, fr = 6408, ka = 6406, oo = 6407, si = 6409, ao = 6410, yf = 32854, La = 32855, xf = 36194, kh = 32819, Lh = 32820, Fh = 33635, Rh = 34042, Fa = 6402, so = 34041, Ra = 35904, Ia = 35906, Or = 36193, Da = 33776, za = 33777, Oa = 33778, Ma = 33779, bf = 35986, _f = 35987, Sf = 34798, Tf = 35840, wf = 35841, Af = 35842, Ef = 35843, Pf = 36196, Mr = 5121, Na = 5123, Ga = 5125, fi = 5126, Ih = 10242, Dh = 10243, zh = 10497, Ba = 33071, Oh = 33648, Mh = 10240, Nh = 10241, Ua = 9728, Gh = 9729, Va = 9984, Cf = 9985, kf = 9986, $a = 9987, Bh = 33170, fo = 4352, Uh = 4353, Vh = 4354, $h = 34046, Hh = 3317, Xh = 37440, jh = 37441, Wh = 37443, Lf = 37444, ui = 33984, qh = [
2906
2906
  Va,
2907
2907
  kf,
2908
2908
  Cf,
@@ -3396,7 +3396,7 @@ function Uv() {
3396
3396
  }
3397
3397
  function ot() {
3398
3398
  var y = xt[0];
3399
- y ? a.bindTexture(y.target, y.texture) : a.bindTexture(bn, null);
3399
+ y ? a.bindTexture(y.target, y.texture) : a.bindTexture(_n, null);
3400
3400
  }
3401
3401
  function Ie(y) {
3402
3402
  var M = y.texture;
@@ -3432,13 +3432,13 @@ function Uv() {
3432
3432
  }
3433
3433
  });
3434
3434
  function et(y, M) {
3435
- var I = new qe(bn);
3435
+ var I = new qe(_n);
3436
3436
  It[I.id] = I, z.textureCount++;
3437
3437
  function _e(c, T) {
3438
3438
  var P = I.texInfo;
3439
3439
  ht.call(P);
3440
3440
  var L = tt();
3441
- return typeof c == "number" ? typeof T == "number" ? $e(L, c | 0, T | 0) : $e(L, c | 0, c | 0) : c ? (d.type(c, "object", "invalid arguments to regl.texture"), Tt(P, c), Je(L, c)) : $e(L, 1, 1), P.genMipmaps && (L.mipmask = (L.width << 1) - 1), I.mipmask = L.mipmask, $(I, L), d.texture2D(P, L, _), I.internalformat = L.internalformat, _e.width = L.width, _e.height = L.height, Gt(I), vt(L, bn), Et(P, bn), ot(), At(L), B.profile && (I.stats.size = lo(
3441
+ return typeof c == "number" ? typeof T == "number" ? $e(L, c | 0, T | 0) : $e(L, c | 0, c | 0) : c ? (d.type(c, "object", "invalid arguments to regl.texture"), Tt(P, c), Je(L, c)) : $e(L, 1, 1), P.genMipmaps && (L.mipmask = (L.width << 1) - 1), I.mipmask = L.mipmask, $(I, L), d.texture2D(P, L, _), I.internalformat = L.internalformat, _e.width = L.width, _e.height = L.height, Gt(I), vt(L, _n), Et(P, _n), ot(), At(L), B.profile && (I.stats.size = lo(
3442
3442
  I.internalformat,
3443
3443
  I.type,
3444
3444
  L.width,
@@ -3462,7 +3462,7 @@ function Uv() {
3462
3462
  ), d(
3463
3463
  v.data || v.element || v.needsCopy,
3464
3464
  "missing image data"
3465
- ), Gt(I), Ve(v, bn, A, w, E), ot(), ye(v), _e;
3465
+ ), Gt(I), Ve(v, _n, A, w, E), ot(), ye(v), _e;
3466
3466
  }
3467
3467
  function m(c, T) {
3468
3468
  var P = c | 0, L = T | 0 || P;
@@ -3473,7 +3473,7 @@ function Uv() {
3473
3473
  var w = P >> A, E = L >> A;
3474
3474
  if (!w || !E) break;
3475
3475
  a.texImage2D(
3476
- bn,
3476
+ _n,
3477
3477
  A,
3478
3478
  I.format,
3479
3479
  w,
@@ -3592,7 +3592,7 @@ function Uv() {
3592
3592
  }
3593
3593
  function bt() {
3594
3594
  for (var y = 0; y < Nt; ++y)
3595
- a.activeTexture(ui + y), a.bindTexture(bn, null), xt[y] = null;
3595
+ a.activeTexture(ui + y), a.bindTexture(_n, null), xt[y] = null;
3596
3596
  Jt(It).forEach(Ie), z.cubeCount = 0, z.textureCount = 0;
3597
3597
  }
3598
3598
  B.profile && (z.getTotalTextureSize = function() {
@@ -3601,7 +3601,7 @@ function Uv() {
3601
3601
  y += It[M].stats.size;
3602
3602
  }), y;
3603
3603
  });
3604
- function Sn() {
3604
+ function Tn() {
3605
3605
  for (var y = 0; y < Nt; ++y) {
3606
3606
  var M = xt[y];
3607
3607
  M && (M.bindCount = 0, M.unit = -1, xt[y] = null);
@@ -3610,9 +3610,9 @@ function Uv() {
3610
3610
  I.texture = a.createTexture(), a.bindTexture(I.target, I.texture);
3611
3611
  for (var _e = 0; _e < 32; ++_e)
3612
3612
  if ((I.mipmask & 1 << _e) !== 0)
3613
- if (I.target === bn)
3613
+ if (I.target === _n)
3614
3614
  a.texImage2D(
3615
- bn,
3615
+ _n,
3616
3616
  _e,
3617
3617
  I.internalformat,
3618
3618
  I.width >> _e,
@@ -3641,7 +3641,7 @@ function Uv() {
3641
3641
  function vr() {
3642
3642
  for (var y = 0; y < Nt; ++y) {
3643
3643
  var M = xt[y];
3644
- M && (M.bindCount = 0, M.unit = -1, xt[y] = null), a.activeTexture(ui + y), a.bindTexture(bn, null), a.bindTexture(Ca, null);
3644
+ M && (M.bindCount = 0, M.unit = -1, xt[y] = null), a.activeTexture(ui + y), a.bindTexture(_n, null), a.bindTexture(Ca, null);
3645
3645
  }
3646
3646
  }
3647
3647
  return {
@@ -3651,7 +3651,7 @@ function Uv() {
3651
3651
  getTexture: function(y) {
3652
3652
  return null;
3653
3653
  },
3654
- restore: Sn,
3654
+ restore: Tn,
3655
3655
  refresh: vr
3656
3656
  };
3657
3657
  }
@@ -4000,9 +4000,9 @@ function Uv() {
4000
4000
  !ot[ze] || ot[ze].texture && hd.indexOf(ot[ze].texture._texture.format) >= 0 || ot[ze].renderbuffer && Sd.indexOf(ot[ze].renderbuffer._renderbuffer.format) >= 0,
4001
4001
  "framebuffer color attachment " + ze + " is invalid"
4002
4002
  ), ot[ze] && ot[ze].texture) {
4003
- var Sn = ja[ot[ze].texture._texture.format] * mo[ot[ze].texture._texture.type];
4004
- bt === null ? bt = Sn : d(
4005
- bt === Sn,
4003
+ var Tn = ja[ot[ze].texture._texture.format] * mo[ot[ze].texture._texture.type];
4004
+ bt === null ? bt = Tn : d(
4005
+ bt === Tn,
4006
4006
  "all color attachments much have the same number of bits per pixel."
4007
4007
  );
4008
4008
  }
@@ -4638,7 +4638,7 @@ function Uv() {
4638
4638
  Rn,
4639
4639
  yo,
4640
4640
  is
4641
- ], Wr = 34962, ls = 34963, Md = 35632, Nd = 35633, Ru = 3553, Gd = 34067, Bd = 2884, Ud = 3042, Vd = 3024, $d = 2960, Hd = 2929, Xd = 3089, jd = 32823, Wd = 32926, qd = 32928, cs = 5126, _o = 35664, So = 35665, To = 35666, hs = 5124, wo = 35667, Ao = 35668, Eo = 35669, ds = 35670, Po = 35671, Co = 35672, ko = 35673, vi = 35674, gi = 35675, yi = 35676, xi = 35678, bi = 35680, ms = 4, _i = 1028, pr = 1029, Iu = 2304, ps = 2305, Yd = 32775, Zd = 32776, Qd = 519, qn = 7680, Du = 0, zu = 1, Ou = 32774, Kd = 513, Mu = 36160, Jd = 36064, _n = {
4641
+ ], Wr = 34962, ls = 34963, Md = 35632, Nd = 35633, Ru = 3553, Gd = 34067, Bd = 2884, Ud = 3042, Vd = 3024, $d = 2960, Hd = 2929, Xd = 3089, jd = 32823, Wd = 32926, qd = 32928, cs = 5126, _o = 35664, So = 35665, To = 35666, hs = 5124, wo = 35667, Ao = 35668, Eo = 35669, ds = 35670, Po = 35671, Co = 35672, ko = 35673, vi = 35674, gi = 35675, yi = 35676, xi = 35678, bi = 35680, ms = 4, _i = 1028, pr = 1029, Iu = 2304, ps = 2305, Yd = 32775, Zd = 32776, Qd = 519, qn = 7680, Du = 0, zu = 1, Ou = 32774, Kd = 513, Mu = 36160, Jd = 36064, Sn = {
4642
4642
  0: 0,
4643
4643
  1: 1,
4644
4644
  zero: 0,
@@ -4842,7 +4842,7 @@ function Uv() {
4842
4842
  }, de = {
4843
4843
  primTypes: jn,
4844
4844
  compareFuncs: qr,
4845
- blendFuncs: _n,
4845
+ blendFuncs: Sn,
4846
4846
  blendEquations: G,
4847
4847
  stencilOps: Yn,
4848
4848
  glTypes: ar,
@@ -5230,16 +5230,16 @@ function Uv() {
5230
5230
  v = !0;
5231
5231
  var Pe = P[hr];
5232
5232
  return Zt(Pe, function(we, Oe) {
5233
- var ft = we.shared, Bt = ft.isBufferArgs, gr = ft.elements, In = we.invoke(Oe, Pe), Tn = Oe.def("null"), Qn = Oe.def(Bt, "(", In, ")"), yr = we.cond(Qn).then(Tn, "=", gr, ".createStream(", In, ");").else(Tn, "=", gr, ".getElements(", In, ");");
5233
+ var ft = we.shared, Bt = ft.isBufferArgs, gr = ft.elements, In = we.invoke(Oe, Pe), wn = Oe.def("null"), Qn = Oe.def(Bt, "(", In, ")"), yr = we.cond(Qn).then(wn, "=", gr, ".createStream(", In, ");").else(wn, "=", gr, ".getElements(", In, ");");
5234
5234
  return d.optional(function() {
5235
5235
  we.assert(
5236
5236
  yr.else,
5237
- "!" + In + "||" + Tn,
5237
+ "!" + In + "||" + wn,
5238
5238
  "invalid elements"
5239
5239
  );
5240
5240
  }), Oe.entry(yr), Oe.exit(
5241
- we.cond(Qn).then(gr, ".destroyStream(", Tn, ");")
5242
- ), we.ELEMENTS = Tn, Tn;
5241
+ we.cond(Qn).then(gr, ".destroyStream(", wn, ");")
5242
+ ), we.ELEMENTS = wn, wn;
5243
5243
  });
5244
5244
  } else if (A)
5245
5245
  return new Ft(
@@ -5527,15 +5527,15 @@ function Uv() {
5527
5527
  function(v) {
5528
5528
  d.commandType(v, "object", "blend.func", c.commandStr);
5529
5529
  var b = "srcRGB" in v ? v.srcRGB : v.src, g = "srcAlpha" in v ? v.srcAlpha : v.src, R = "dstRGB" in v ? v.dstRGB : v.dst, F = "dstAlpha" in v ? v.dstAlpha : v.dst;
5530
- return d.commandParameter(b, _n, w + ".srcRGB", c.commandStr), d.commandParameter(g, _n, w + ".srcAlpha", c.commandStr), d.commandParameter(R, _n, w + ".dstRGB", c.commandStr), d.commandParameter(F, _n, w + ".dstAlpha", c.commandStr), d.command(
5530
+ return d.commandParameter(b, Sn, w + ".srcRGB", c.commandStr), d.commandParameter(g, Sn, w + ".srcAlpha", c.commandStr), d.commandParameter(R, Sn, w + ".dstRGB", c.commandStr), d.commandParameter(F, Sn, w + ".dstAlpha", c.commandStr), d.command(
5531
5531
  Nu.indexOf(b + ", " + R) === -1,
5532
5532
  "unallowed blending combination (srcRGB, dstRGB) = (" + b + ", " + R + ")",
5533
5533
  c.commandStr
5534
5534
  ), [
5535
- _n[b],
5536
- _n[R],
5537
- _n[g],
5538
- _n[F]
5535
+ Sn[b],
5536
+ Sn[R],
5537
+ Sn[g],
5538
+ Sn[F]
5539
5539
  ];
5540
5540
  },
5541
5541
  function(v, b, g) {
@@ -5568,7 +5568,7 @@ function Uv() {
5568
5568
  v.assert(
5569
5569
  b,
5570
5570
  Pe + " in " + R,
5571
- "invalid " + A + "." + q + U + ", must be one of " + Object.keys(_n)
5571
+ "invalid " + A + "." + q + U + ", must be one of " + Object.keys(Sn)
5572
5572
  );
5573
5573
  }), Pe;
5574
5574
  }
@@ -6930,11 +6930,11 @@ function Uv() {
6930
6930
  ")"
6931
6931
  ), c(");");
6932
6932
  } else if (ft > 1) {
6933
- for (var Tn = [], Qn = [], yr = 0; yr < ft; ++yr)
6934
- Array.isArray(q) ? Qn.push(q[yr]) : Qn.push(c.def(q + "[" + yr + "]")), A && Tn.push(c.def());
6935
- A && c("if(!", m.batchId, "||", Tn.map(function(en, xr) {
6933
+ for (var wn = [], Qn = [], yr = 0; yr < ft; ++yr)
6934
+ Array.isArray(q) ? Qn.push(q[yr]) : Qn.push(c.def(q + "[" + yr + "]")), A && wn.push(c.def());
6935
+ A && c("if(!", m.batchId, "||", wn.map(function(en, xr) {
6936
6936
  return en + "!==" + Qn[xr];
6937
- }).join("||"), "){", Tn.map(function(en, xr) {
6937
+ }).join("||"), "){", wn.map(function(en, xr) {
6938
6938
  return en + "=" + Qn[xr] + ";";
6939
6939
  }).join("")), c(E, ".uniform", b, "(", be, ",", Qn.join(","), ");"), A && c("}");
6940
6940
  } else {
@@ -7095,7 +7095,7 @@ function Uv() {
7095
7095
  }
7096
7096
  Object.keys(c.state).length > 0 && T(m.shared.current, ".dirty=true;"), m.shared.vao && T(m.shared.vao, ".setVAO(null);");
7097
7097
  }
7098
- function Sn(m, c, T, P) {
7098
+ function Tn(m, c, T, P) {
7099
7099
  m.batchId = "a1", xt(m, c);
7100
7100
  function L() {
7101
7101
  return !0;
@@ -7154,7 +7154,7 @@ function Uv() {
7154
7154
  "]=",
7155
7155
  m.link(function(Le) {
7156
7156
  return et(
7157
- Sn,
7157
+ Tn,
7158
7158
  m,
7159
7159
  T,
7160
7160
  Le,
@@ -7722,11 +7722,11 @@ function Uv() {
7722
7722
  static: w
7723
7723
  };
7724
7724
  }
7725
- var bt = nt(Ie.context || {}, !0), Sn = nt(Ie.uniforms || {}, !0), vr = nt(Ie.attributes || {}, !1), y = nt(et(Ie), !1), M = {
7725
+ var bt = nt(Ie.context || {}, !0), Tn = nt(Ie.uniforms || {}, !0), vr = nt(Ie.attributes || {}, !1), y = nt(et(Ie), !1), M = {
7726
7726
  gpuTime: 0,
7727
7727
  cpuTime: 0,
7728
7728
  count: 0
7729
- }, I = Se.compile(y, vr, Sn, bt, M), _e = I.draw, Ke = I.batch, m = I.scope, c = [];
7729
+ }, I = Se.compile(y, vr, Tn, bt, M), _e = I.draw, Ke = I.batch, m = I.scope, c = [];
7730
7730
  function T(L) {
7731
7731
  for (; c.length < L; )
7732
7732
  c.push(null);
@@ -7791,8 +7791,8 @@ function Uv() {
7791
7791
  var nt = ju(de, Ie);
7792
7792
  d(nt >= 0, "cannot cancel a frame twice");
7793
7793
  function bt() {
7794
- var Sn = ju(de, bt);
7795
- de[Sn] = de[de.length - 1], de.length -= 1, de.length <= 0 && Je();
7794
+ var Tn = ju(de, bt);
7795
+ de[Tn] = de[de.length - 1], de.length -= 1, de.length <= 0 && Je();
7796
7796
  }
7797
7797
  de[nt] = bt;
7798
7798
  }
@@ -7974,7 +7974,7 @@ zs || (zs = function(e, n, r) {
7974
7974
  Os || (Os = function(e, n) {
7975
7975
  return new e(...n);
7976
7976
  });
7977
- const Oo = qt(Array.prototype.forEach), ag = qt(Array.prototype.lastIndexOf), dl = qt(Array.prototype.pop), Ti = qt(Array.prototype.push), sg = qt(Array.prototype.splice), jo = qt(String.prototype.toLowerCase), xs = qt(String.prototype.toString), ml = qt(String.prototype.match), wi = qt(String.prototype.replace), fg = qt(String.prototype.indexOf), ug = qt(String.prototype.trim), dn = qt(Object.prototype.hasOwnProperty), jt = qt(RegExp.prototype.test), Ai = lg(TypeError);
7977
+ const Oo = qt(Array.prototype.forEach), ag = qt(Array.prototype.lastIndexOf), dl = qt(Array.prototype.pop), Ti = qt(Array.prototype.push), sg = qt(Array.prototype.splice), jo = qt(String.prototype.toLowerCase), xs = qt(String.prototype.toString), ml = qt(String.prototype.match), wi = qt(String.prototype.replace), fg = qt(String.prototype.indexOf), ug = qt(String.prototype.trim), mn = qt(Object.prototype.hasOwnProperty), jt = qt(RegExp.prototype.test), Ai = lg(TypeError);
7978
7978
  function qt(t) {
7979
7979
  return function(e) {
7980
7980
  e instanceof RegExp && (e.lastIndex = 0);
@@ -8006,13 +8006,13 @@ function it(t, e) {
8006
8006
  }
8007
8007
  function cg(t) {
8008
8008
  for (let e = 0; e < t.length; e++)
8009
- dn(t, e) || (t[e] = null);
8009
+ mn(t, e) || (t[e] = null);
8010
8010
  return t;
8011
8011
  }
8012
8012
  function zn(t) {
8013
8013
  const e = yc(null);
8014
8014
  for (const [n, r] of gc(t))
8015
- dn(t, n) && (Array.isArray(r) ? e[n] = cg(r) : r && typeof r == "object" && r.constructor === Object ? e[n] = zn(r) : e[n] = r);
8015
+ mn(t, n) && (Array.isArray(r) ? e[n] = cg(r) : r && typeof r == "object" && r.constructor === Object ? e[n] = zn(r) : e[n] = r);
8016
8016
  return e;
8017
8017
  }
8018
8018
  function Ei(t, e) {
@@ -8161,11 +8161,11 @@ function _c() {
8161
8161
  enumerable: !0,
8162
8162
  value: !1
8163
8163
  }
8164
- })), Vt = null, $t = null, Yt = !0, Cn = !0, Ni = !1, Gi = !0, kn = !1, Jn = !0, yn = !1, Er = !1, Pr = !1, Bn = !1, Dt = !1, er = !1, tr = !0, Bi = !1;
8164
+ })), Vt = null, $t = null, Yt = !0, Cn = !0, Ni = !1, Gi = !0, kn = !1, Jn = !0, xn = !1, Er = !1, Pr = !1, Bn = !1, Dt = !1, er = !1, tr = !0, Bi = !1;
8165
8165
  const va = "user-content-";
8166
8166
  let d = !0, nr = !1, Un = {}, Vn = null;
8167
8167
  const Ui = it({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
8168
- let xn = null;
8168
+ let bn = null;
8169
8169
  const ei = it({}, ["audio", "video", "img", "source", "image", "track"]);
8170
8170
  let Ln = null;
8171
8171
  const ti = it({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Cr = "http://www.w3.org/1998/Math/MathML", kr = "http://www.w3.org/2000/svg", nn = "http://www.w3.org/1999/xhtml";
@@ -8182,7 +8182,7 @@ function _c() {
8182
8182
  let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8183
8183
  if (!($n && $n === C)) {
8184
8184
  if ((!C || typeof C != "object") && (C = {}), C = zn(C), ir = // eslint-disable-next-line unicorn/prefer-includes
8185
- Vi.indexOf(C.PARSER_MEDIA_TYPE) === -1 ? $i : C.PARSER_MEDIA_TYPE, Lt = ir === "application/xhtml+xml" ? xs : jo, Ze = dn(C, "ALLOWED_TAGS") ? it({}, C.ALLOWED_TAGS, Lt) : dt, ct = dn(C, "ALLOWED_ATTR") ? it({}, C.ALLOWED_ATTR, Lt) : _t, Lr = dn(C, "ALLOWED_NAMESPACES") ? it({}, C.ALLOWED_NAMESPACES, xs) : ga, Ln = dn(C, "ADD_URI_SAFE_ATTR") ? it(zn(ti), C.ADD_URI_SAFE_ATTR, Lt) : ti, xn = dn(C, "ADD_DATA_URI_TAGS") ? it(zn(ei), C.ADD_DATA_URI_TAGS, Lt) : ei, Vn = dn(C, "FORBID_CONTENTS") ? it({}, C.FORBID_CONTENTS, Lt) : Ui, Vt = dn(C, "FORBID_TAGS") ? it({}, C.FORBID_TAGS, Lt) : zn({}), $t = dn(C, "FORBID_ATTR") ? it({}, C.FORBID_ATTR, Lt) : zn({}), Un = dn(C, "USE_PROFILES") ? C.USE_PROFILES : !1, Yt = C.ALLOW_ARIA_ATTR !== !1, Cn = C.ALLOW_DATA_ATTR !== !1, Ni = C.ALLOW_UNKNOWN_PROTOCOLS || !1, Gi = C.ALLOW_SELF_CLOSE_IN_ATTR !== !1, kn = C.SAFE_FOR_TEMPLATES || !1, Jn = C.SAFE_FOR_XML !== !1, yn = C.WHOLE_DOCUMENT || !1, Bn = C.RETURN_DOM || !1, Dt = C.RETURN_DOM_FRAGMENT || !1, er = C.RETURN_TRUSTED_TYPE || !1, Pr = C.FORCE_BODY || !1, tr = C.SANITIZE_DOM !== !1, Bi = C.SANITIZE_NAMED_PROPS || !1, d = C.KEEP_CONTENT !== !1, nr = C.IN_PLACE || !1, Qe = C.ALLOWED_URI_REGEXP || xc, kt = C.NAMESPACE || nn, Fr = C.MATHML_TEXT_INTEGRATION_POINTS || Fr, Rr = C.HTML_INTEGRATION_POINTS || Rr, st = C.CUSTOM_ELEMENT_HANDLING || {}, C.CUSTOM_ELEMENT_HANDLING && Hi(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (st.tagNameCheck = C.CUSTOM_ELEMENT_HANDLING.tagNameCheck), C.CUSTOM_ELEMENT_HANDLING && Hi(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (st.attributeNameCheck = C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), C.CUSTOM_ELEMENT_HANDLING && typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (st.allowCustomizedBuiltInElements = C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), kn && (Cn = !1), Dt && (Bn = !0), Un && (Ze = it({}, vl), ct = [], Un.html === !0 && (it(Ze, pl), it(ct, gl)), Un.svg === !0 && (it(Ze, bs), it(ct, Ts), it(ct, Mo)), Un.svgFilters === !0 && (it(Ze, _s), it(ct, Ts), it(ct, Mo)), Un.mathMl === !0 && (it(Ze, Ss), it(ct, yl), it(ct, Mo))), C.ADD_TAGS && (Ze === dt && (Ze = zn(Ze)), it(Ze, C.ADD_TAGS, Lt)), C.ADD_ATTR && (ct === _t && (ct = zn(ct)), it(ct, C.ADD_ATTR, Lt)), C.ADD_URI_SAFE_ATTR && it(Ln, C.ADD_URI_SAFE_ATTR, Lt), C.FORBID_CONTENTS && (Vn === Ui && (Vn = zn(Vn)), it(Vn, C.FORBID_CONTENTS, Lt)), d && (Ze["#text"] = !0), yn && it(Ze, ["html", "head", "body"]), Ze.table && (it(Ze, ["tbody"]), delete Vt.tbody), C.TRUSTED_TYPES_POLICY) {
8185
+ Vi.indexOf(C.PARSER_MEDIA_TYPE) === -1 ? $i : C.PARSER_MEDIA_TYPE, Lt = ir === "application/xhtml+xml" ? xs : jo, Ze = mn(C, "ALLOWED_TAGS") ? it({}, C.ALLOWED_TAGS, Lt) : dt, ct = mn(C, "ALLOWED_ATTR") ? it({}, C.ALLOWED_ATTR, Lt) : _t, Lr = mn(C, "ALLOWED_NAMESPACES") ? it({}, C.ALLOWED_NAMESPACES, xs) : ga, Ln = mn(C, "ADD_URI_SAFE_ATTR") ? it(zn(ti), C.ADD_URI_SAFE_ATTR, Lt) : ti, bn = mn(C, "ADD_DATA_URI_TAGS") ? it(zn(ei), C.ADD_DATA_URI_TAGS, Lt) : ei, Vn = mn(C, "FORBID_CONTENTS") ? it({}, C.FORBID_CONTENTS, Lt) : Ui, Vt = mn(C, "FORBID_TAGS") ? it({}, C.FORBID_TAGS, Lt) : zn({}), $t = mn(C, "FORBID_ATTR") ? it({}, C.FORBID_ATTR, Lt) : zn({}), Un = mn(C, "USE_PROFILES") ? C.USE_PROFILES : !1, Yt = C.ALLOW_ARIA_ATTR !== !1, Cn = C.ALLOW_DATA_ATTR !== !1, Ni = C.ALLOW_UNKNOWN_PROTOCOLS || !1, Gi = C.ALLOW_SELF_CLOSE_IN_ATTR !== !1, kn = C.SAFE_FOR_TEMPLATES || !1, Jn = C.SAFE_FOR_XML !== !1, xn = C.WHOLE_DOCUMENT || !1, Bn = C.RETURN_DOM || !1, Dt = C.RETURN_DOM_FRAGMENT || !1, er = C.RETURN_TRUSTED_TYPE || !1, Pr = C.FORCE_BODY || !1, tr = C.SANITIZE_DOM !== !1, Bi = C.SANITIZE_NAMED_PROPS || !1, d = C.KEEP_CONTENT !== !1, nr = C.IN_PLACE || !1, Qe = C.ALLOWED_URI_REGEXP || xc, kt = C.NAMESPACE || nn, Fr = C.MATHML_TEXT_INTEGRATION_POINTS || Fr, Rr = C.HTML_INTEGRATION_POINTS || Rr, st = C.CUSTOM_ELEMENT_HANDLING || {}, C.CUSTOM_ELEMENT_HANDLING && Hi(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (st.tagNameCheck = C.CUSTOM_ELEMENT_HANDLING.tagNameCheck), C.CUSTOM_ELEMENT_HANDLING && Hi(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (st.attributeNameCheck = C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), C.CUSTOM_ELEMENT_HANDLING && typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (st.allowCustomizedBuiltInElements = C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), kn && (Cn = !1), Dt && (Bn = !0), Un && (Ze = it({}, vl), ct = [], Un.html === !0 && (it(Ze, pl), it(ct, gl)), Un.svg === !0 && (it(Ze, bs), it(ct, Ts), it(ct, Mo)), Un.svgFilters === !0 && (it(Ze, _s), it(ct, Ts), it(ct, Mo)), Un.mathMl === !0 && (it(Ze, Ss), it(ct, yl), it(ct, Mo))), C.ADD_TAGS && (Ze === dt && (Ze = zn(Ze)), it(Ze, C.ADD_TAGS, Lt)), C.ADD_ATTR && (ct === _t && (ct = zn(ct)), it(ct, C.ADD_ATTR, Lt)), C.ADD_URI_SAFE_ATTR && it(Ln, C.ADD_URI_SAFE_ATTR, Lt), C.FORBID_CONTENTS && (Vn === Ui && (Vn = zn(Vn)), it(Vn, C.FORBID_CONTENTS, Lt)), d && (Ze["#text"] = !0), xn && it(Ze, ["html", "head", "body"]), Ze.table && (it(Ze, ["tbody"]), delete Vt.tbody), C.TRUSTED_TYPES_POLICY) {
8186
8186
  if (typeof C.TRUSTED_TYPES_POLICY.createHTML != "function")
8187
8187
  throw Ai('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
8188
8188
  if (typeof C.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -8255,7 +8255,7 @@ function _c() {
8255
8255
  }
8256
8256
  }
8257
8257
  const zt = ve.body || ve.documentElement;
8258
- return C && De && zt.insertBefore(n.createTextNode(De), zt.childNodes[0] || null), kt === nn ? at.call(ve, yn ? "html" : "body")[0] : yn ? ve.documentElement : zt;
8258
+ return C && De && zt.insertBefore(n.createTextNode(De), zt.childNodes[0] || null), kt === nn ? at.call(ve, xn ? "html" : "body")[0] : xn ? ve.documentElement : zt;
8259
8259
  }, ri = function(C) {
8260
8260
  return Ge.call(
8261
8261
  C.ownerDocument || C,
@@ -8320,7 +8320,7 @@ function _c() {
8320
8320
  ) return !1;
8321
8321
  } else if (!Ln[ve]) {
8322
8322
  if (!jt(Qe, wi(De, je, ""))) {
8323
- if (!((ve === "src" || ve === "xlink:href" || ve === "href") && C !== "script" && fg(De, "data:") === 0 && xn[C])) {
8323
+ if (!((ve === "src" || ve === "xlink:href" || ve === "href") && C !== "script" && fg(De, "data:") === 0 && bn[C])) {
8324
8324
  if (!(Ni && !jt(ke, wi(De, je, "")))) {
8325
8325
  if (De)
8326
8326
  return !1;
@@ -8422,7 +8422,7 @@ function _c() {
8422
8422
  } else if (Be instanceof f)
8423
8423
  ve = Wi("<!---->"), De = ve.ownerDocument.importNode(Be, !0), De.nodeType === Pi.element && De.nodeName === "BODY" || De.nodeName === "HTML" ? ve = De : ve.appendChild(De);
8424
8424
  else {
8425
- if (!Bn && !kn && !yn && // eslint-disable-next-line unicorn/prefer-includes
8425
+ if (!Bn && !kn && !xn && // eslint-disable-next-line unicorn/prefer-includes
8426
8426
  Be.indexOf("<") === -1)
8427
8427
  return H && er ? H.createHTML(Be) : Be;
8428
8428
  if (ve = Wi(Be), !ve)
@@ -8442,8 +8442,8 @@ function _c() {
8442
8442
  zt = ve;
8443
8443
  return (ct.shadowroot || ct.shadowrootmode) && (zt = ut.call(r, zt, !0)), zt;
8444
8444
  }
8445
- let Ht = yn ? ve.outerHTML : ve.innerHTML;
8446
- return yn && Ze["!doctype"] && ve.ownerDocument && ve.ownerDocument.doctype && ve.ownerDocument.doctype.name && jt(bc, ve.ownerDocument.doctype.name) && (Ht = "<!DOCTYPE " + ve.ownerDocument.doctype.name + `>
8445
+ let Ht = xn ? ve.outerHTML : ve.innerHTML;
8446
+ return xn && Ze["!doctype"] && ve.ownerDocument && ve.ownerDocument.doctype && ve.ownerDocument.doctype.name && jt(bc, ve.ownerDocument.doctype.name) && (Ht = "<!DOCTYPE " + ve.ownerDocument.doctype.name + `>
8447
8447
  ` + Ht), kn && Oo([lt, rt, N], (ln) => {
8448
8448
  Ht = wi(Ht, ln, " ");
8449
8449
  }), H && er ? H.createHTML(Ht) : Ht;
@@ -8499,7 +8499,7 @@ function sn(t, e) {
8499
8499
  function kg(t, e, n) {
8500
8500
  return Math.min(Math.max(t, e), n);
8501
8501
  }
8502
- function wn(t) {
8502
+ function dn(t) {
8503
8503
  return t != null && !Number.isNaN(t);
8504
8504
  }
8505
8505
  function Lg(t, e) {
@@ -8513,7 +8513,7 @@ function Lg(t, e) {
8513
8513
  }
8514
8514
  class Fg {
8515
8515
  constructor() {
8516
- this.enableSimulation = We.enableSimulation, this.backgroundColor = Jv, this.spaceSize = We.spaceSize, this.pointColor = Hv, this.pointGreyoutOpacity = Xv, this.pointGreyoutColor = jv, this.pointSize = qv, this.pointOpacity = Wv, this.pointSizeScale = We.pointSizeScale, this.hoveredPointCursor = We.hoveredPointCursor, this.renderHoveredPointRing = We.renderHoveredPointRing, this.hoveredPointRingColor = We.hoveredPointRingColor, this.focusedPointRingColor = We.focusedPointRingColor, this.focusedPointIndex = We.focusedPointIndex, this.linkColor = Yv, this.linkOpacity = Qv, this.linkGreyoutOpacity = Zv, this.linkWidth = Kv, this.linkWidthScale = We.linkWidthScale, this.renderLinks = We.renderLinks, this.curvedLinks = We.curvedLinks, this.curvedLinkSegments = We.curvedLinkSegments, this.curvedLinkWeight = We.curvedLinkWeight, this.curvedLinkControlPointDistance = We.curvedLinkControlPointDistance, this.linkArrows = We.arrowLinks, this.linkArrowsSizeScale = We.arrowSizeScale, this.scaleLinksOnZoom = We.scaleLinksOnZoom, this.linkVisibilityDistanceRange = We.linkVisibilityDistanceRange, this.linkVisibilityMinTransparency = We.linkVisibilityMinTransparency, this.useClassicQuadtree = We.useClassicQuadtree, this.simulationDecay = We.simulation.decay, this.simulationGravity = We.simulation.gravity, this.simulationCenter = We.simulation.center, this.simulationRepulsion = We.simulation.repulsion, this.simulationRepulsionTheta = We.simulation.repulsionTheta, this.simulationRepulsionQuadtreeLevels = We.simulation.repulsionQuadtreeLevels, this.simulationLinkSpring = We.simulation.linkSpring, this.simulationLinkDistance = We.simulation.linkDistance, this.simulationLinkDistRandomVariationRange = We.simulation.linkDistRandomVariationRange, this.simulationRepulsionFromMouse = We.simulation.repulsionFromMouse, this.enableRightClickRepulsion = We.enableRightClickRepulsion, this.simulationFriction = We.simulation.friction, this.simulationCluster = We.simulation.cluster, this.onSimulationStart = void 0, this.onSimulationTick = void 0, this.onSimulationEnd = void 0, this.onSimulationPause = void 0, this.onSimulationRestart = void 0, this.onClick = void 0, this.onMouseMove = void 0, this.onPointMouseOver = void 0, this.onPointMouseOut = void 0, this.onZoomStart = void 0, this.onZoom = void 0, this.onZoomEnd = void 0, this.onDragStart = void 0, this.onDrag = void 0, this.onDragEnd = void 0, this.showFPSMonitor = We.showFPSMonitor, this.pixelRatio = We.pixelRatio, this.scalePointsOnZoom = We.scalePointsOnZoom, this.initialZoomLevel = void 0, this.enableZoom = We.enableZoom, this.enableSimulationDuringZoom = We.enableSimulationDuringZoom, this.enableDrag = We.enableDrag, this.fitViewOnInit = We.fitViewOnInit, this.fitViewDelay = We.fitViewDelay, this.fitViewPadding = We.fitViewPadding, this.fitViewDuration = We.fitViewDuration, this.fitViewByPointsInRect = void 0, this.randomSeed = void 0, this.pointSamplingDistance = We.pointSamplingDistance, this.attribution = We.attribution, this.rescalePositions = We.rescalePositions;
8516
+ this.enableSimulation = We.enableSimulation, this.backgroundColor = Jv, this.spaceSize = We.spaceSize, this.pointColor = Hv, this.pointGreyoutOpacity = Xv, this.pointGreyoutColor = jv, this.pointSize = qv, this.pointOpacity = Wv, this.pointSizeScale = We.pointSizeScale, this.hoveredPointCursor = We.hoveredPointCursor, this.renderHoveredPointRing = We.renderHoveredPointRing, this.hoveredPointRingColor = We.hoveredPointRingColor, this.focusedPointRingColor = We.focusedPointRingColor, this.focusedPointIndex = We.focusedPointIndex, this.linkColor = Yv, this.linkOpacity = Qv, this.linkGreyoutOpacity = Zv, this.linkWidth = Kv, this.linkWidthScale = We.linkWidthScale, this.renderLinks = We.renderLinks, this.curvedLinks = We.curvedLinks, this.curvedLinkSegments = We.curvedLinkSegments, this.curvedLinkWeight = We.curvedLinkWeight, this.curvedLinkControlPointDistance = We.curvedLinkControlPointDistance, this.linkArrows = We.arrowLinks, this.linkArrowsSizeScale = We.arrowSizeScale, this.scaleLinksOnZoom = We.scaleLinksOnZoom, this.linkVisibilityDistanceRange = We.linkVisibilityDistanceRange, this.linkVisibilityMinTransparency = We.linkVisibilityMinTransparency, this.useClassicQuadtree = We.useClassicQuadtree, this.simulationDecay = We.simulation.decay, this.simulationGravity = We.simulation.gravity, this.simulationCenter = We.simulation.center, this.simulationRepulsion = We.simulation.repulsion, this.simulationRepulsionTheta = We.simulation.repulsionTheta, this.simulationRepulsionQuadtreeLevels = We.simulation.repulsionQuadtreeLevels, this.simulationLinkSpring = We.simulation.linkSpring, this.simulationLinkDistance = We.simulation.linkDistance, this.simulationLinkDistRandomVariationRange = We.simulation.linkDistRandomVariationRange, this.simulationRepulsionFromMouse = We.simulation.repulsionFromMouse, this.enableRightClickRepulsion = We.enableRightClickRepulsion, this.simulationFriction = We.simulation.friction, this.simulationCluster = We.simulation.cluster, this.onSimulationStart = void 0, this.onSimulationTick = void 0, this.onSimulationEnd = void 0, this.onSimulationPause = void 0, this.onSimulationRestart = void 0, this.onClick = void 0, this.onMouseMove = void 0, this.onPointMouseOver = void 0, this.onPointMouseOut = void 0, this.onZoomStart = void 0, this.onZoom = void 0, this.onZoomEnd = void 0, this.onDragStart = void 0, this.onDrag = void 0, this.onDragEnd = void 0, this.showFPSMonitor = We.showFPSMonitor, this.pixelRatio = We.pixelRatio, this.scalePointsOnZoom = We.scalePointsOnZoom, this.initialZoomLevel = void 0, this.enableZoom = We.enableZoom, this.enableSimulationDuringZoom = We.enableSimulationDuringZoom, this.enableDrag = We.enableDrag, this.fitViewOnInit = We.fitViewOnInit, this.fitViewDelay = We.fitViewDelay, this.fitViewPadding = We.fitViewPadding, this.fitViewDuration = We.fitViewDuration, this.fitViewByPointsInRect = void 0, this.fitViewByPointIndices = void 0, this.randomSeed = void 0, this.pointSamplingDistance = We.pointSamplingDistance, this.attribution = We.attribution, this.rescalePositions = We.rescalePositions;
8517
8517
  }
8518
8518
  init(e) {
8519
8519
  Object.keys(e).forEach((n) => {
@@ -9979,7 +9979,8 @@ class wl {
9979
9979
  this.bench = void 0, Ut("#gl-bench").remove();
9980
9980
  }
9981
9981
  }
9982
- class ty {
9982
+ var ty = /* @__PURE__ */ ((t) => (t[t.Circle = 0] = "Circle", t[t.Square = 1] = "Square", t[t.Triangle = 2] = "Triangle", t[t.Diamond = 3] = "Diamond", t[t.Pentagon = 4] = "Pentagon", t[t.Hexagon = 5] = "Hexagon", t[t.Star = 6] = "Star", t[t.Cross = 7] = "Cross", t))(ty || {});
9983
+ class ny {
9983
9984
  constructor(e) {
9984
9985
  this._config = e;
9985
9986
  }
@@ -10008,7 +10009,7 @@ class ty {
10008
10009
  } else {
10009
10010
  this.pointColors = this.inputPointColors;
10010
10011
  for (let n = 0; n < this.pointColors.length / 4; n++)
10011
- wn(this.pointColors[n * 4]) || (this.pointColors[n * 4] = e[0]), wn(this.pointColors[n * 4 + 1]) || (this.pointColors[n * 4 + 1] = e[1]), wn(this.pointColors[n * 4 + 2]) || (this.pointColors[n * 4 + 2] = e[2]), wn(this.pointColors[n * 4 + 3]) || (this.pointColors[n * 4 + 3] = e[3]);
10012
+ dn(this.pointColors[n * 4]) || (this.pointColors[n * 4] = e[0]), dn(this.pointColors[n * 4 + 1]) || (this.pointColors[n * 4 + 1] = e[1]), dn(this.pointColors[n * 4 + 2]) || (this.pointColors[n * 4 + 2] = e[2]), dn(this.pointColors[n * 4 + 3]) || (this.pointColors[n * 4 + 3] = e[3]);
10012
10013
  }
10013
10014
  }
10014
10015
  /**
@@ -10024,7 +10025,29 @@ class ty {
10024
10025
  else {
10025
10026
  this.pointSizes = this.inputPointSizes;
10026
10027
  for (let e = 0; e < this.pointSizes.length; e++)
10027
- wn(this.pointSizes[e]) || (this.pointSizes[e] = this._config.pointSize);
10028
+ dn(this.pointSizes[e]) || (this.pointSizes[e] = this._config.pointSize);
10029
+ }
10030
+ }
10031
+ /**
10032
+ * Updates the point shapes based on the input data or default shape (Circle).
10033
+ */
10034
+ updatePointShape() {
10035
+ if (this.pointsNumber === void 0) {
10036
+ this.pointShapes = void 0;
10037
+ return;
10038
+ }
10039
+ if (this.inputPointShapes === void 0 || this.inputPointShapes.length !== this.pointsNumber)
10040
+ this.pointShapes = new Float32Array(this.pointsNumber).fill(
10041
+ 0
10042
+ /* Circle */
10043
+ );
10044
+ else {
10045
+ this.pointShapes = new Float32Array(this.inputPointShapes);
10046
+ const e = this.pointShapes;
10047
+ for (let n = 0; n < e.length; n++) {
10048
+ const r = e[n];
10049
+ (r == null || !dn(r) || r < 0 || r > 7) && (e[n] = 0);
10050
+ }
10028
10051
  }
10029
10052
  }
10030
10053
  updateLinks() {
@@ -10046,7 +10069,7 @@ class ty {
10046
10069
  } else {
10047
10070
  this.linkColors = this.inputLinkColors;
10048
10071
  for (let n = 0; n < this.linkColors.length / 4; n++)
10049
- wn(this.linkColors[n * 4]) || (this.linkColors[n * 4] = e[0]), wn(this.linkColors[n * 4 + 1]) || (this.linkColors[n * 4 + 1] = e[1]), wn(this.linkColors[n * 4 + 2]) || (this.linkColors[n * 4 + 2] = e[2]), wn(this.linkColors[n * 4 + 3]) || (this.linkColors[n * 4 + 3] = e[3]);
10072
+ dn(this.linkColors[n * 4]) || (this.linkColors[n * 4] = e[0]), dn(this.linkColors[n * 4 + 1]) || (this.linkColors[n * 4 + 1] = e[1]), dn(this.linkColors[n * 4 + 2]) || (this.linkColors[n * 4 + 2] = e[2]), dn(this.linkColors[n * 4 + 3]) || (this.linkColors[n * 4 + 3] = e[3]);
10050
10073
  }
10051
10074
  }
10052
10075
  /**
@@ -10062,7 +10085,7 @@ class ty {
10062
10085
  else {
10063
10086
  this.linkWidths = this.inputLinkWidths;
10064
10087
  for (let e = 0; e < this.linkWidths.length; e++)
10065
- wn(this.linkWidths[e]) || (this.linkWidths[e] = this._config.linkWidth);
10088
+ dn(this.linkWidths[e]) || (this.linkWidths[e] = this._config.linkWidth);
10066
10089
  }
10067
10090
  }
10068
10091
  /**
@@ -10086,7 +10109,7 @@ class ty {
10086
10109
  this.inputPointClusters === void 0 || this.inputPointClusters.length !== this.pointsNumber ? this.pointClusters = void 0 : this.pointClusters = this.inputPointClusters, this.inputClusterPositions === void 0 ? this.clusterPositions = void 0 : this.clusterPositions = this.inputClusterPositions, this.inputClusterStrength === void 0 || this.inputClusterStrength.length !== this.pointsNumber ? this.clusterStrength = void 0 : this.clusterStrength = this.inputClusterStrength;
10087
10110
  }
10088
10111
  update() {
10089
- this.updatePoints(), this.updatePointColor(), this.updatePointSize(), this.updateLinks(), this.updateLinkColor(), this.updateLinkWidth(), this.updateArrows(), this.updateLinkStrength(), this.updateClusters(), this._createAdjacencyLists(), this._calculateDegrees();
10112
+ this.updatePoints(), this.updatePointColor(), this.updatePointSize(), this.updatePointShape(), this.updateLinks(), this.updateLinkColor(), this.updateLinkWidth(), this.updateArrows(), this.updateLinkStrength(), this.updateClusters(), this._createAdjacencyLists(), this._calculateDegrees();
10090
10113
  }
10091
10114
  getAdjacentIndices(e) {
10092
10115
  var n, r, i, o;
@@ -10115,7 +10138,7 @@ class ty {
10115
10138
  this.inDegree[o] = ((n = (e = this.targetIndexToSourceIndices) == null ? void 0 : e[o]) == null ? void 0 : n.length) ?? 0, this.outDegree[o] = ((i = (r = this.sourceIndexToTargetIndices) == null ? void 0 : r[o]) == null ? void 0 : i.length) ?? 0, this.degree[o] = (this.inDegree[o] ?? 0) + (this.outDegree[o] ?? 0);
10116
10139
  }
10117
10140
  }
10118
- var ny = `precision highp float;
10141
+ var ry = `precision highp float;
10119
10142
 
10120
10143
  varying vec4 rgbaColor;
10121
10144
  varying vec2 pos;
@@ -10149,7 +10172,7 @@ void main() {
10149
10172
  } else opacity = rgbaColor.a * smoothstep(0.5, 0.5 - smoothing, abs(pos.y));
10150
10173
 
10151
10174
  gl_FragColor = vec4(color, opacity);
10152
- }`, ry = `precision highp float;
10175
+ }`, iy = `precision highp float;
10153
10176
 
10154
10177
  attribute vec2 position, pointA, pointB;
10155
10178
  attribute vec4 color;
@@ -10319,12 +10342,12 @@ void main() {
10319
10342
  function qo(t, e) {
10320
10343
  return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
10321
10344
  }
10322
- function iy(t, e) {
10345
+ function oy(t, e) {
10323
10346
  return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
10324
10347
  }
10325
10348
  function Ac(t) {
10326
10349
  let e, n, r;
10327
- t.length !== 2 ? (e = qo, n = (f, u) => qo(t(f), u), r = (f, u) => t(f) - u) : (e = t === qo || t === iy ? t : oy, n = t, r = t);
10350
+ t.length !== 2 ? (e = qo, n = (f, u) => qo(t(f), u), r = (f, u) => t(f) - u) : (e = t === qo || t === oy ? t : ay, n = t, r = t);
10328
10351
  function i(f, u, l = 0, p = f.length) {
10329
10352
  if (l < p) {
10330
10353
  if (e(u, u) !== 0) return p;
@@ -10351,14 +10374,14 @@ function Ac(t) {
10351
10374
  }
10352
10375
  return { left: i, center: s, right: o };
10353
10376
  }
10354
- function oy() {
10377
+ function ay() {
10355
10378
  return 0;
10356
10379
  }
10357
- function ay(t) {
10380
+ function sy(t) {
10358
10381
  return t === null ? NaN : +t;
10359
10382
  }
10360
- const sy = Ac(qo), fy = sy.right;
10361
- Ac(ay).center;
10383
+ const fy = Ac(qo), uy = fy.right;
10384
+ Ac(sy).center;
10362
10385
  function Al(t, e) {
10363
10386
  let n, r;
10364
10387
  for (const i of t)
@@ -10366,7 +10389,7 @@ function Al(t, e) {
10366
10389
  return [n, r];
10367
10390
  }
10368
10391
  var Ns = Math.sqrt(50), Gs = Math.sqrt(10), Bs = Math.sqrt(2);
10369
- function uy(t, e, n) {
10392
+ function ly(t, e, n) {
10370
10393
  var r, i = -1, o, s, f;
10371
10394
  if (e = +e, t = +t, n = +n, t === e && n > 0) return [t];
10372
10395
  if ((r = e < t) && (o = t, t = e, e = o), (f = Ec(t, e, n)) === 0 || !isFinite(f)) return [];
@@ -10384,11 +10407,11 @@ function Ec(t, e, n) {
10384
10407
  var r = (e - t) / Math.max(0, n), i = Math.floor(Math.log(r) / Math.LN10), o = r / Math.pow(10, i);
10385
10408
  return i >= 0 ? (o >= Ns ? 10 : o >= Gs ? 5 : o >= Bs ? 2 : 1) * Math.pow(10, i) : -Math.pow(10, -i) / (o >= Ns ? 10 : o >= Gs ? 5 : o >= Bs ? 2 : 1);
10386
10409
  }
10387
- function ly(t, e, n) {
10410
+ function cy(t, e, n) {
10388
10411
  var r = Math.abs(e - t) / Math.max(0, n), i = Math.pow(10, Math.floor(Math.log(r) / Math.LN10)), o = r / i;
10389
10412
  return o >= Ns ? i *= 10 : o >= Gs ? i *= 5 : o >= Bs && (i *= 2), e < t ? -i : i;
10390
10413
  }
10391
- function cy(t, e, n) {
10414
+ function hy(t, e, n) {
10392
10415
  t = +t, e = +e, n = (i = arguments.length) < 2 ? (e = t, t = 0, 1) : i < 3 ? 1 : +n;
10393
10416
  for (var r = -1, i = Math.max(0, Math.ceil((e - t) / n)) | 0, o = new Array(i); ++r < i; )
10394
10417
  o[r] = t + r * n;
@@ -10407,12 +10430,12 @@ function Pc(t, e) {
10407
10430
  }
10408
10431
  return this;
10409
10432
  }
10410
- function hy(t) {
10433
+ function dy(t) {
10411
10434
  return function() {
10412
10435
  return t;
10413
10436
  };
10414
10437
  }
10415
- function dy(t) {
10438
+ function my(t) {
10416
10439
  return +t;
10417
10440
  }
10418
10441
  var El = [0, 1];
@@ -10422,26 +10445,26 @@ function An(t) {
10422
10445
  function Us(t, e) {
10423
10446
  return (e -= t = +t) ? function(n) {
10424
10447
  return (n - t) / e;
10425
- } : hy(isNaN(e) ? NaN : 0.5);
10448
+ } : dy(isNaN(e) ? NaN : 0.5);
10426
10449
  }
10427
- function my(t, e) {
10450
+ function py(t, e) {
10428
10451
  var n;
10429
10452
  return t > e && (n = t, t = e, e = n), function(r) {
10430
10453
  return Math.max(t, Math.min(e, r));
10431
10454
  };
10432
10455
  }
10433
- function py(t, e, n) {
10456
+ function vy(t, e, n) {
10434
10457
  var r = t[0], i = t[1], o = e[0], s = e[1];
10435
10458
  return i < r ? (r = Us(i, r), o = n(s, o)) : (r = Us(r, i), o = n(o, s)), function(f) {
10436
10459
  return o(r(f));
10437
10460
  };
10438
10461
  }
10439
- function vy(t, e, n) {
10462
+ function gy(t, e, n) {
10440
10463
  var r = Math.min(t.length, e.length) - 1, i = new Array(r), o = new Array(r), s = -1;
10441
10464
  for (t[r] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++s < r; )
10442
10465
  i[s] = Us(t[s], t[s + 1]), o[s] = n(e[s], e[s + 1]);
10443
10466
  return function(f) {
10444
- var u = fy(t, f, 1, r) - 1;
10467
+ var u = uy(t, f, 1, r) - 1;
10445
10468
  return o[u](i[u](f));
10446
10469
  };
10447
10470
  }
@@ -10452,15 +10475,15 @@ function kc() {
10452
10475
  var t = El, e = El, n = Js, r, i, o, s = An, f, u, l;
10453
10476
  function p() {
10454
10477
  var S = Math.min(t.length, e.length);
10455
- return s !== An && (s = my(t[0], t[S - 1])), f = S > 2 ? vy : py, u = l = null, x;
10478
+ return s !== An && (s = py(t[0], t[S - 1])), f = S > 2 ? gy : vy, u = l = null, x;
10456
10479
  }
10457
10480
  function x(S) {
10458
10481
  return S == null || isNaN(S = +S) ? o : (u || (u = f(t.map(r), e, n)))(r(s(S)));
10459
10482
  }
10460
10483
  return x.invert = function(S) {
10461
- return s(i((l || (l = f(e, t.map(r), mn)))(S)));
10484
+ return s(i((l || (l = f(e, t.map(r), pn)))(S)));
10462
10485
  }, x.domain = function(S) {
10463
- return arguments.length ? (t = Array.from(S, dy), p()) : t.slice();
10486
+ return arguments.length ? (t = Array.from(S, my), p()) : t.slice();
10464
10487
  }, x.range = function(S) {
10465
10488
  return arguments.length ? (e = Array.from(S), p()) : e.slice();
10466
10489
  }, x.rangeRound = function(S) {
@@ -10475,10 +10498,10 @@ function kc() {
10475
10498
  return r = S, i = D, p();
10476
10499
  };
10477
10500
  }
10478
- function gy() {
10501
+ function yy() {
10479
10502
  return kc()(An, An);
10480
10503
  }
10481
- function yy(t) {
10504
+ function xy(t) {
10482
10505
  return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
10483
10506
  }
10484
10507
  function ua(t, e) {
@@ -10492,23 +10515,23 @@ function ua(t, e) {
10492
10515
  function Jr(t) {
10493
10516
  return t = ua(Math.abs(t)), t ? t[1] : NaN;
10494
10517
  }
10495
- function xy(t, e) {
10518
+ function by(t, e) {
10496
10519
  return function(n, r) {
10497
10520
  for (var i = n.length, o = [], s = 0, f = t[0], u = 0; i > 0 && f > 0 && (u + f + 1 > r && (f = Math.max(1, r - u)), o.push(n.substring(i -= f, i + f)), !((u += f + 1) > r)); )
10498
10521
  f = t[s = (s + 1) % t.length];
10499
10522
  return o.reverse().join(e);
10500
10523
  };
10501
10524
  }
10502
- function by(t) {
10525
+ function _y(t) {
10503
10526
  return function(e) {
10504
10527
  return e.replace(/[0-9]/g, function(n) {
10505
10528
  return t[+n];
10506
10529
  });
10507
10530
  };
10508
10531
  }
10509
- var _y = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
10532
+ var Sy = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
10510
10533
  function la(t) {
10511
- if (!(e = _y.exec(t))) throw new Error("invalid format: " + t);
10534
+ if (!(e = Sy.exec(t))) throw new Error("invalid format: " + t);
10512
10535
  var e;
10513
10536
  return new nf({
10514
10537
  fill: e[1],
@@ -10530,7 +10553,7 @@ function nf(t) {
10530
10553
  nf.prototype.toString = function() {
10531
10554
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
10532
10555
  };
10533
- function Sy(t) {
10556
+ function Ty(t) {
10534
10557
  e: for (var e = t.length, n = 1, r = -1, i; n < e; ++n)
10535
10558
  switch (t[n]) {
10536
10559
  case ".":
@@ -10547,7 +10570,7 @@ function Sy(t) {
10547
10570
  return r > 0 ? t.slice(0, r) + t.slice(i + 1) : t;
10548
10571
  }
10549
10572
  var Lc;
10550
- function Ty(t, e) {
10573
+ function wy(t, e) {
10551
10574
  var n = ua(t, e);
10552
10575
  if (!n) return t + "";
10553
10576
  var r = n[0], i = n[1], o = i - (Lc = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = r.length;
@@ -10563,14 +10586,14 @@ const Cl = {
10563
10586
  "%": (t, e) => (t * 100).toFixed(e),
10564
10587
  b: (t) => Math.round(t).toString(2),
10565
10588
  c: (t) => t + "",
10566
- d: yy,
10589
+ d: xy,
10567
10590
  e: (t, e) => t.toExponential(e),
10568
10591
  f: (t, e) => t.toFixed(e),
10569
10592
  g: (t, e) => t.toPrecision(e),
10570
10593
  o: (t) => Math.round(t).toString(8),
10571
10594
  p: (t, e) => Pl(t * 100, e),
10572
10595
  r: Pl,
10573
- s: Ty,
10596
+ s: wy,
10574
10597
  X: (t) => Math.round(t).toString(16).toUpperCase(),
10575
10598
  x: (t) => Math.round(t).toString(16)
10576
10599
  };
@@ -10578,8 +10601,8 @@ function kl(t) {
10578
10601
  return t;
10579
10602
  }
10580
10603
  var Ll = Array.prototype.map, Fl = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
10581
- function wy(t) {
10582
- var e = t.grouping === void 0 || t.thousands === void 0 ? kl : xy(Ll.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", o = t.numerals === void 0 ? kl : by(Ll.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", f = t.minus === void 0 ? "−" : t.minus + "", u = t.nan === void 0 ? "NaN" : t.nan + "";
10604
+ function Ay(t) {
10605
+ var e = t.grouping === void 0 || t.thousands === void 0 ? kl : by(Ll.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", o = t.numerals === void 0 ? kl : _y(Ll.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", f = t.minus === void 0 ? "−" : t.minus + "", u = t.nan === void 0 ? "NaN" : t.nan + "";
10583
10606
  function l(x) {
10584
10607
  x = la(x);
10585
10608
  var S = x.fill, D = x.align, Y = x.sign, Ee = x.symbol, Te = x.zero, se = x.width, Ue = x.comma, He = x.precision, H = x.trim, fe = x.type;
@@ -10593,7 +10616,7 @@ function wy(t) {
10593
10616
  else {
10594
10617
  Ae = +Ae;
10595
10618
  var ke = Ae < 0 || 1 / Ae < 0;
10596
- if (Ae = isNaN(Ae) ? u : Ye(Math.abs(Ae), He), H && (Ae = Sy(Ae)), ke && +Ae == 0 && Y !== "+" && (ke = !1), lt = (ke ? Y === "(" ? Y : f : Y === "-" || Y === "(" ? "" : Y) + lt, rt = (fe === "s" ? Fl[8 + Lc / 3] : "") + rt + (ke && Y === "(" ? ")" : ""), at) {
10619
+ if (Ae = isNaN(Ae) ? u : Ye(Math.abs(Ae), He), H && (Ae = Ty(Ae)), ke && +Ae == 0 && Y !== "+" && (ke = !1), lt = (ke ? Y === "(" ? Y : f : Y === "-" || Y === "(" ? "" : Y) + lt, rt = (fe === "s" ? Fl[8 + Lc / 3] : "") + rt + (ke && Y === "(" ? ")" : ""), at) {
10597
10620
  for (N = -1, Ce = Ae.length; ++N < Ce; )
10598
10621
  if (re = Ae.charCodeAt(N), 48 > re || re > 57) {
10599
10622
  rt = (re === 46 ? i + Ae.slice(N + 1) : Ae.slice(N)) + rt, Ae = Ae.slice(0, N);
@@ -10635,41 +10658,41 @@ function wy(t) {
10635
10658
  };
10636
10659
  }
10637
10660
  var No, Fc, Rc;
10638
- Ay({
10661
+ Ey({
10639
10662
  thousands: ",",
10640
10663
  grouping: [3],
10641
10664
  currency: ["$", ""]
10642
10665
  });
10643
- function Ay(t) {
10644
- return No = wy(t), Fc = No.format, Rc = No.formatPrefix, No;
10645
- }
10646
10666
  function Ey(t) {
10667
+ return No = Ay(t), Fc = No.format, Rc = No.formatPrefix, No;
10668
+ }
10669
+ function Py(t) {
10647
10670
  return Math.max(0, -Jr(Math.abs(t)));
10648
10671
  }
10649
- function Py(t, e) {
10672
+ function Cy(t, e) {
10650
10673
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Jr(e) / 3))) * 3 - Jr(Math.abs(t)));
10651
10674
  }
10652
- function Cy(t, e) {
10675
+ function ky(t, e) {
10653
10676
  return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, Jr(e) - Jr(t)) + 1;
10654
10677
  }
10655
- function ky(t, e, n, r) {
10656
- var i = ly(t, e, n), o;
10678
+ function Ly(t, e, n, r) {
10679
+ var i = cy(t, e, n), o;
10657
10680
  switch (r = la(r ?? ",f"), r.type) {
10658
10681
  case "s": {
10659
10682
  var s = Math.max(Math.abs(t), Math.abs(e));
10660
- return r.precision == null && !isNaN(o = Py(i, s)) && (r.precision = o), Rc(r, s);
10683
+ return r.precision == null && !isNaN(o = Cy(i, s)) && (r.precision = o), Rc(r, s);
10661
10684
  }
10662
10685
  case "":
10663
10686
  case "e":
10664
10687
  case "g":
10665
10688
  case "p":
10666
10689
  case "r": {
10667
- r.precision == null && !isNaN(o = Cy(i, Math.max(Math.abs(t), Math.abs(e)))) && (r.precision = o - (r.type === "e"));
10690
+ r.precision == null && !isNaN(o = ky(i, Math.max(Math.abs(t), Math.abs(e)))) && (r.precision = o - (r.type === "e"));
10668
10691
  break;
10669
10692
  }
10670
10693
  case "f":
10671
10694
  case "%": {
10672
- r.precision == null && !isNaN(o = Ey(i)) && (r.precision = o - (r.type === "%") * 2);
10695
+ r.precision == null && !isNaN(o = Py(i)) && (r.precision = o - (r.type === "%") * 2);
10673
10696
  break;
10674
10697
  }
10675
10698
  }
@@ -10679,10 +10702,10 @@ function Ic(t) {
10679
10702
  var e = t.domain;
10680
10703
  return t.ticks = function(n) {
10681
10704
  var r = e();
10682
- return uy(r[0], r[r.length - 1], n ?? 10);
10705
+ return ly(r[0], r[r.length - 1], n ?? 10);
10683
10706
  }, t.tickFormat = function(n, r) {
10684
10707
  var i = e();
10685
- return ky(i[0], i[i.length - 1], n ?? 10, r);
10708
+ return Ly(i[0], i[i.length - 1], n ?? 10, r);
10686
10709
  }, t.nice = function(n) {
10687
10710
  n == null && (n = 10);
10688
10711
  var r = e(), i = 0, o = r.length - 1, s = r[i], f = r[o], u, l, p = 10;
@@ -10701,7 +10724,7 @@ function Ic(t) {
10701
10724
  }, t;
10702
10725
  }
10703
10726
  function Vs() {
10704
- var t = gy();
10727
+ var t = yy();
10705
10728
  return t.copy = function() {
10706
10729
  return Cc(t, Vs());
10707
10730
  }, Pc.apply(t, arguments), Ic(t);
@@ -10711,41 +10734,41 @@ function Rl(t) {
10711
10734
  return e < 0 ? -Math.pow(-e, t) : Math.pow(e, t);
10712
10735
  };
10713
10736
  }
10714
- function Ly(t) {
10737
+ function Fy(t) {
10715
10738
  return t < 0 ? -Math.sqrt(-t) : Math.sqrt(t);
10716
10739
  }
10717
- function Fy(t) {
10740
+ function Ry(t) {
10718
10741
  return t < 0 ? -t * t : t * t;
10719
10742
  }
10720
- function Ry(t) {
10743
+ function Iy(t) {
10721
10744
  var e = t(An, An), n = 1;
10722
10745
  function r() {
10723
- return n === 1 ? t(An, An) : n === 0.5 ? t(Ly, Fy) : t(Rl(n), Rl(1 / n));
10746
+ return n === 1 ? t(An, An) : n === 0.5 ? t(Fy, Ry) : t(Rl(n), Rl(1 / n));
10724
10747
  }
10725
10748
  return e.exponent = function(i) {
10726
10749
  return arguments.length ? (n = +i, r()) : n;
10727
10750
  }, Ic(e);
10728
10751
  }
10729
10752
  function Dc() {
10730
- var t = Ry(kc());
10753
+ var t = Iy(kc());
10731
10754
  return t.copy = function() {
10732
10755
  return Cc(t, Dc()).exponent(t.exponent());
10733
10756
  }, Pc.apply(t, arguments), t;
10734
10757
  }
10735
- const Iy = (t) => {
10736
- const e = Dc().exponent(2).range([0, 1]).domain([-1, 1]), n = cy(0, t).map((i) => -0.5 + i / t);
10758
+ const Dy = (t) => {
10759
+ const e = Dc().exponent(2).range([0, 1]).domain([-1, 1]), n = hy(0, t).map((i) => -0.5 + i / t);
10737
10760
  n.push(0.5);
10738
10761
  const r = new Array(n.length * 2);
10739
10762
  return n.forEach((i, o) => {
10740
10763
  r[o * 2] = [e(i * 2), 0.5], r[o * 2 + 1] = [e(i * 2), -0.5];
10741
10764
  }), r;
10742
10765
  };
10743
- class Dy extends Gn {
10766
+ class zy extends Gn {
10744
10767
  initPrograms() {
10745
10768
  const { reglInstance: e, config: n, store: r } = this;
10746
10769
  this.drawCurveCommand || (this.drawCurveCommand = e({
10747
- vert: ry,
10748
- frag: ny,
10770
+ vert: iy,
10771
+ frag: ry,
10749
10772
  attributes: {
10750
10773
  position: {
10751
10774
  buffer: () => this.curveLineBuffer,
@@ -10864,18 +10887,134 @@ class Dy extends Gn {
10864
10887
  }
10865
10888
  updateCurveLineGeometry() {
10866
10889
  const { reglInstance: e, config: { curvedLinks: n, curvedLinkSegments: r } } = this;
10867
- this.curveLineGeometry = Iy(n ? r ?? We.curvedLinkSegments : 1), this.curveLineBuffer || (this.curveLineBuffer = e.buffer(0)), this.curveLineBuffer(this.curveLineGeometry);
10890
+ this.curveLineGeometry = Dy(n ? r ?? We.curvedLinkSegments : 1), this.curveLineBuffer || (this.curveLineBuffer = e.buffer(0)), this.curveLineBuffer(this.curveLineGeometry);
10868
10891
  }
10869
10892
  }
10870
- var zy = `#ifdef GL_ES
10893
+ var Oy = `#ifdef GL_ES
10871
10894
  precision highp float;
10872
10895
  #endif
10873
10896
 
10874
10897
  varying vec3 rgbColor;
10875
10898
  varying float alpha;
10899
+ varying float pointShape;
10876
10900
 
10877
10901
  const float smoothing = 0.9;
10878
10902
 
10903
+ const float CIRCLE = 0.0;
10904
+ const float SQUARE = 1.0;
10905
+ const float TRIANGLE = 2.0;
10906
+ const float DIAMOND = 3.0;
10907
+ const float PENTAGON = 4.0;
10908
+ const float HEXAGON = 5.0;
10909
+ const float STAR = 6.0;
10910
+ const float CROSS = 7.0;
10911
+
10912
+ float circleDistance(vec2 p) {
10913
+ return dot(p, p);
10914
+ }
10915
+
10916
+ float squareDistance(vec2 p) {
10917
+ vec2 d = abs(p) - vec2(0.8);
10918
+ return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
10919
+ }
10920
+
10921
+ float triangleDistance(vec2 p) {
10922
+ const float k = sqrt(3.0);
10923
+ p.x = abs(p.x) - 0.9;
10924
+ p.y = p.y + 0.55;
10925
+
10926
+
10927
+ if (p.x + k * p.y > 0.0)
10928
+ p = vec2(p.x - k * p.y, -k * p.x - p.y) / 2.0;
10929
+
10930
+ p.x -= clamp(p.x, -1.0, 0.0);
10931
+
10932
+
10933
+ return -length(p) * sign(p.y);
10934
+ }
10935
+
10936
+ float diamondDistance(vec2 p) {
10937
+
10938
+ const float aspect = 1.2;
10939
+ return abs(p.x) + abs(p.y) / aspect - 0.8;
10940
+ }
10941
+
10942
+ float pentagonDistance(vec2 p) {
10943
+
10944
+ const vec3 k = vec3(0.809016994, 0.587785252, 0.726542528);
10945
+ p.x = abs(p.x);
10946
+
10947
+
10948
+ p -= 2.0 * min(dot(vec2(-k.x, k.y), p), 0.0) * vec2(-k.x, k.y);
10949
+ p -= 2.0 * min(dot(vec2( k.x, k.y), p), 0.0) * vec2( k.x, k.y);
10950
+
10951
+
10952
+ p -= vec2(clamp(p.x, -k.z * k.x, k.z * k.x), k.z);
10953
+
10954
+
10955
+ return length(p) * sign(p.y);
10956
+ }
10957
+
10958
+ float hexagonDistance(vec2 p) {
10959
+ const vec3 k = vec3(-0.866025404, 0.5, 0.577350269);
10960
+ p = abs(p);
10961
+ p -= 2.0 * min(dot(k.xy, p), 0.0) * k.xy;
10962
+ p -= vec2(clamp(p.x, -k.z * 0.8, k.z * 0.8), 0.8);
10963
+ return length(p) * sign(p.y);
10964
+ }
10965
+
10966
+ float starDistance(vec2 p) {
10967
+
10968
+
10969
+ const float r = 0.9;
10970
+ const float rf = 0.45;
10971
+
10972
+
10973
+ const vec2 k1 = vec2(0.809016994, -0.587785252);
10974
+ const vec2 k2 = vec2(-k1.x, k1.y);
10975
+
10976
+
10977
+ p.x = abs(p.x);
10978
+ p -= 2.0 * max(dot(k1, p), 0.0) * k1;
10979
+ p -= 2.0 * max(dot(k2, p), 0.0) * k2;
10980
+ p.x = abs(p.x);
10981
+
10982
+
10983
+ p.y -= r;
10984
+
10985
+
10986
+ vec2 ba = rf * vec2(-k1.y, k1.x) - vec2(0.0, 1.0);
10987
+
10988
+ float h = clamp(dot(p, ba) / dot(ba, ba), 0.0, r);
10989
+
10990
+
10991
+ return length(p - ba * h) * sign(p.y * ba.x - p.x * ba.y);
10992
+ }
10993
+
10994
+ float crossDistance(vec2 p) {
10995
+
10996
+
10997
+
10998
+ p = abs(p);
10999
+ if (p.y > p.x) p = p.yx;
11000
+
11001
+ vec2 q = p - vec2(0.8, 0.3);
11002
+
11003
+
11004
+ return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0);
11005
+ }
11006
+
11007
+ float getShapeDistance(vec2 p, float shape) {
11008
+ if (shape == SQUARE) return squareDistance(p);
11009
+ else if (shape == TRIANGLE) return triangleDistance(p);
11010
+ else if (shape == DIAMOND) return diamondDistance(p);
11011
+ else if (shape == PENTAGON) return pentagonDistance(p);
11012
+ else if (shape == HEXAGON) return hexagonDistance(p);
11013
+ else if (shape == STAR) return starDistance(p);
11014
+ else if (shape == CROSS) return crossDistance(p);
11015
+ else return circleDistance(p);
11016
+ }
11017
+
10879
11018
  void main() {
10880
11019
 
10881
11020
  if (alpha == 0.0) { discard; }
@@ -10883,18 +11022,26 @@ void main() {
10883
11022
 
10884
11023
  vec2 pointCoord = 2.0 * gl_PointCoord - 1.0;
10885
11024
 
10886
- float pointCenterDistance = dot(pointCoord, pointCoord);
10887
-
10888
- float opacity = alpha * (1.0 - smoothstep(smoothing, 1.0, pointCenterDistance));
11025
+ float opacity;
11026
+ if (pointShape == CIRCLE) {
11027
+
11028
+ float pointCenterDistance = dot(pointCoord, pointCoord);
11029
+ opacity = alpha * (1.0 - smoothstep(smoothing, 1.0, pointCenterDistance));
11030
+ } else {
11031
+
11032
+ float shapeDistance = getShapeDistance(pointCoord, pointShape);
11033
+ opacity = alpha * (1.0 - smoothstep(-0.01, 0.01, shapeDistance));
11034
+ }
10889
11035
 
10890
11036
  gl_FragColor = vec4(rgbColor, opacity);
10891
- }`, Oy = `#ifdef GL_ES
11037
+ }`, My = `#ifdef GL_ES
10892
11038
  precision highp float;
10893
11039
  #endif
10894
11040
 
10895
11041
  attribute vec2 pointIndices;
10896
11042
  attribute float size;
10897
11043
  attribute vec4 color;
11044
+ attribute float shape;
10898
11045
 
10899
11046
  uniform sampler2D positionsTexture;
10900
11047
  uniform sampler2D pointGreyoutStatus;
@@ -10911,12 +11058,13 @@ uniform vec4 backgroundColor;
10911
11058
  uniform bool scalePointsOnZoom;
10912
11059
  uniform float maxPointSize;
10913
11060
  uniform bool darkenGreyout;
10914
- uniform bool renderOnlySelected;
10915
- uniform bool renderOnlyUnselected;
11061
+ uniform bool skipSelected;
11062
+ uniform bool skipUnselected;
10916
11063
 
10917
11064
  varying vec2 textureCoords;
10918
11065
  varying vec3 rgbColor;
10919
11066
  varying float alpha;
11067
+ varying float pointShape;
10920
11068
 
10921
11069
  float calculatePointSize(float size) {
10922
11070
  float pSize;
@@ -10937,12 +11085,12 @@ void main() {
10937
11085
  bool isSelected = greyoutStatus.r == 0.0;
10938
11086
 
10939
11087
 
10940
- if (renderOnlySelected && !isSelected) {
11088
+ if (skipSelected && isSelected) {
10941
11089
  gl_Position = vec4(2.0, 2.0, 2.0, 1.0);
10942
11090
  gl_PointSize = 0.0;
10943
11091
  return;
10944
11092
  }
10945
- if (renderOnlyUnselected && isSelected) {
11093
+ if (skipUnselected && !isSelected) {
10946
11094
  gl_Position = vec4(2.0, 2.0, 2.0, 1.0);
10947
11095
  gl_PointSize = 0.0;
10948
11096
  return;
@@ -10962,6 +11110,7 @@ void main() {
10962
11110
 
10963
11111
  rgbColor = color.rgb;
10964
11112
  alpha = color.a * pointOpacity;
11113
+ pointShape = shape;
10965
11114
 
10966
11115
 
10967
11116
  if (greyoutStatus.r > 0.0) {
@@ -10985,7 +11134,7 @@ void main() {
10985
11134
  alpha *= greyoutOpacity;
10986
11135
  }
10987
11136
  }
10988
- }`, My = `#ifdef GL_ES
11137
+ }`, Ny = `#ifdef GL_ES
10989
11138
  precision highp float;
10990
11139
  #endif
10991
11140
 
@@ -11030,7 +11179,7 @@ void main() {
11030
11179
  if (final.x >= left && final.x <= right && final.y >= top && final.y <= bottom) {
11031
11180
  gl_FragColor.r = 1.0;
11032
11181
  }
11033
- }`, Ny = `#ifdef GL_ES
11182
+ }`, Gy = `#ifdef GL_ES
11034
11183
  precision highp float;
11035
11184
  #endif
11036
11185
 
@@ -11092,7 +11241,7 @@ void main() {
11092
11241
  if (pointInPolygon(screenPos, polygonPathTexture, polygonPathLength)) {
11093
11242
  gl_FragColor.r = 1.0;
11094
11243
  }
11095
- }`, Gy = `precision mediump float;
11244
+ }`, By = `precision mediump float;
11096
11245
 
11097
11246
  uniform float width;
11098
11247
 
@@ -11107,7 +11256,7 @@ void main () {
11107
11256
  float opacity = smoothstep(r, r * smoothing, 1.0);
11108
11257
  float stroke = smoothstep(width, width * smoothing, r);
11109
11258
  gl_FragColor = vec4(rgbColor, opacity * stroke * pointOpacity);
11110
- }`, By = `precision mediump float;
11259
+ }`, Uy = `precision mediump float;
11111
11260
 
11112
11261
  attribute vec2 vertexCoord;
11113
11262
 
@@ -11192,7 +11341,7 @@ void main () {
11192
11341
  vec3 final = transformationMatrix * vec3(p, 1);
11193
11342
 
11194
11343
  gl_Position = vec4(final.rg, 0, 1);
11195
- }`, Uy = `#ifdef GL_ES
11344
+ }`, Vy = `#ifdef GL_ES
11196
11345
  precision highp float;
11197
11346
  #endif
11198
11347
 
@@ -11200,7 +11349,7 @@ varying vec4 rgba;
11200
11349
 
11201
11350
  void main() {
11202
11351
  gl_FragColor = rgba;
11203
- }`, Vy = `#ifdef GL_ES
11352
+ }`, $y = `#ifdef GL_ES
11204
11353
  precision highp float;
11205
11354
  #endif
11206
11355
 
@@ -11256,7 +11405,7 @@ void main() {
11256
11405
  }
11257
11406
 
11258
11407
  gl_PointSize = 1.0;
11259
- }`, $y = `#ifdef GL_ES
11408
+ }`, Hy = `#ifdef GL_ES
11260
11409
  precision highp float;
11261
11410
  #endif
11262
11411
 
@@ -11264,7 +11413,7 @@ varying vec4 rgba;
11264
11413
 
11265
11414
  void main() {
11266
11415
  gl_FragColor = rgba;
11267
- }`, Hy = `#ifdef GL_ES
11416
+ }`, Xy = `#ifdef GL_ES
11268
11417
  precision highp float;
11269
11418
  #endif
11270
11419
 
@@ -11292,7 +11441,7 @@ void main() {
11292
11441
  gl_Position = vec4(2.0 * vec2(i, j) - 1.0, 0.0, 1.0);
11293
11442
 
11294
11443
  gl_PointSize = 1.0;
11295
- }`, Xy = `#ifdef GL_ES
11444
+ }`, jy = `#ifdef GL_ES
11296
11445
  precision highp float;
11297
11446
  #endif
11298
11447
 
@@ -11316,7 +11465,7 @@ void main() {
11316
11465
  pointPosition.g = clamp(pointPosition.g, 0.0, spaceSize);
11317
11466
 
11318
11467
  gl_FragColor = pointPosition;
11319
- }`, jy = `#ifdef GL_ES
11468
+ }`, Wy = `#ifdef GL_ES
11320
11469
  precision highp float;
11321
11470
  #endif
11322
11471
 
@@ -11332,7 +11481,7 @@ void main() {
11332
11481
  vec4 pointPosition = texture2D(positionsTexture, (trackedPointIndices.rg + 0.5) / pointsTextureSize);
11333
11482
 
11334
11483
  gl_FragColor = vec4(pointPosition.rg, 1.0, 1.0);
11335
- }`, Wy = `#ifdef GL_ES
11484
+ }`, qy = `#ifdef GL_ES
11336
11485
  precision highp float;
11337
11486
  #endif
11338
11487
 
@@ -11352,7 +11501,7 @@ void main() {
11352
11501
 
11353
11502
  gl_FragColor = pointPosition;
11354
11503
  }`;
11355
- class qy extends Gn {
11504
+ class Yy extends Gn {
11356
11505
  constructor() {
11357
11506
  super(...arguments), this.polygonPathLength = 0;
11358
11507
  }
@@ -11406,7 +11555,7 @@ class qy extends Gn {
11406
11555
  initPrograms() {
11407
11556
  const { reglInstance: e, config: n, store: r, data: i } = this;
11408
11557
  n.enableSimulation && (this.updatePositionCommand || (this.updatePositionCommand = e({
11409
- frag: Xy,
11558
+ frag: jy,
11410
11559
  vert: Rt,
11411
11560
  framebuffer: () => this.currentPositionFbo,
11412
11561
  primitive: "triangle strip",
@@ -11419,7 +11568,7 @@ class qy extends Gn {
11419
11568
  spaceSize: () => r.adjustedSpaceSize
11420
11569
  }
11421
11570
  }))), this.dragPointCommand || (this.dragPointCommand = e({
11422
- frag: Wy,
11571
+ frag: qy,
11423
11572
  vert: Rt,
11424
11573
  framebuffer: () => this.currentPositionFbo,
11425
11574
  primitive: "triangle strip",
@@ -11434,8 +11583,8 @@ class qy extends Gn {
11434
11583
  }
11435
11584
  }
11436
11585
  })), this.drawCommand || (this.drawCommand = e({
11437
- frag: zy,
11438
- vert: Oy,
11586
+ frag: Oy,
11587
+ vert: My,
11439
11588
  primitive: "points",
11440
11589
  count: () => i.pointsNumber ?? 0,
11441
11590
  attributes: {
@@ -11450,6 +11599,10 @@ class qy extends Gn {
11450
11599
  color: {
11451
11600
  buffer: () => this.colorBuffer,
11452
11601
  size: 4
11602
+ },
11603
+ shape: {
11604
+ buffer: () => this.shapeBuffer,
11605
+ size: 1
11453
11606
  }
11454
11607
  },
11455
11608
  uniforms: {
@@ -11468,8 +11621,8 @@ class qy extends Gn {
11468
11621
  darkenGreyout: () => r.darkenGreyout,
11469
11622
  scalePointsOnZoom: () => n.scalePointsOnZoom,
11470
11623
  maxPointSize: () => r.maxPointSize,
11471
- renderOnlySelected: e.prop("renderOnlySelected"),
11472
- renderOnlyUnselected: e.prop("renderOnlyUnselected")
11624
+ skipSelected: e.prop("skipSelected"),
11625
+ skipUnselected: e.prop("skipUnselected")
11473
11626
  },
11474
11627
  blend: {
11475
11628
  enable: !0,
@@ -11489,7 +11642,7 @@ class qy extends Gn {
11489
11642
  mask: !1
11490
11643
  }
11491
11644
  })), this.findPointsOnAreaSelectionCommand || (this.findPointsOnAreaSelectionCommand = e({
11492
- frag: My,
11645
+ frag: Ny,
11493
11646
  vert: Rt,
11494
11647
  framebuffer: () => this.selectedFbo,
11495
11648
  primitive: "triangle strip",
@@ -11511,7 +11664,7 @@ class qy extends Gn {
11511
11664
  maxPointSize: () => r.maxPointSize
11512
11665
  }
11513
11666
  })), this.findPointsOnPolygonSelectionCommand || (this.findPointsOnPolygonSelectionCommand = e({
11514
- frag: Ny,
11667
+ frag: Gy,
11515
11668
  vert: Rt,
11516
11669
  framebuffer: () => this.selectedFbo,
11517
11670
  primitive: "triangle strip",
@@ -11535,8 +11688,8 @@ class qy extends Gn {
11535
11688
  count: 4,
11536
11689
  attributes: { vertexCoord: Ct(e) }
11537
11690
  })), this.findHoveredPointCommand || (this.findHoveredPointCommand = e({
11538
- frag: Uy,
11539
- vert: Vy,
11691
+ frag: Vy,
11692
+ vert: $y,
11540
11693
  primitive: "points",
11541
11694
  count: () => i.pointsNumber ?? 0,
11542
11695
  framebuffer: () => this.hoveredFbo,
@@ -11574,8 +11727,8 @@ class qy extends Gn {
11574
11727
  count: 4,
11575
11728
  attributes: { vertexCoord: Ct(e) }
11576
11729
  })), this.fillSampledPointsFboCommand || (this.fillSampledPointsFboCommand = e({
11577
- frag: $y,
11578
- vert: Hy,
11730
+ frag: Hy,
11731
+ vert: Xy,
11579
11732
  primitive: "points",
11580
11733
  count: () => i.pointsNumber ?? 0,
11581
11734
  framebuffer: () => this.sampledPointsFbo,
@@ -11597,8 +11750,8 @@ class qy extends Gn {
11597
11750
  mask: !1
11598
11751
  }
11599
11752
  })), this.drawHighlightedCommand || (this.drawHighlightedCommand = e({
11600
- frag: Gy,
11601
- vert: By,
11753
+ frag: By,
11754
+ vert: Uy,
11602
11755
  attributes: { vertexCoord: Ct(e) },
11603
11756
  primitive: "triangle strip",
11604
11757
  count: 4,
@@ -11640,7 +11793,7 @@ class qy extends Gn {
11640
11793
  mask: !1
11641
11794
  }
11642
11795
  })), this.trackPointsCommand || (this.trackPointsCommand = e({
11643
- frag: jy,
11796
+ frag: Wy,
11644
11797
  vert: Rt,
11645
11798
  framebuffer: () => this.trackedPositionsFbo,
11646
11799
  primitive: "triangle strip",
@@ -11693,6 +11846,10 @@ class qy extends Gn {
11693
11846
  stencil: !1
11694
11847
  });
11695
11848
  }
11849
+ updateShape() {
11850
+ const { reglInstance: e, data: n } = this;
11851
+ n.pointsNumber === void 0 || n.pointShapes === void 0 || (this.shapeBuffer || (this.shapeBuffer = e.buffer(0)), this.shapeBuffer(n.pointShapes));
11852
+ }
11696
11853
  updateSampledPointsGrid() {
11697
11854
  const { store: { screenSize: e }, config: { pointSamplingDistance: n }, reglInstance: r } = this;
11698
11855
  let i = n ?? Math.min(...e) / 2;
@@ -11712,7 +11869,7 @@ class qy extends Gn {
11712
11869
  draw() {
11713
11870
  var o, s, f, u, l, p, x;
11714
11871
  const { config: { renderHoveredPointRing: e, pointSize: n }, store: r, data: i } = this;
11715
- this.colorBuffer || this.updateColor(), this.sizeBuffer || this.updateSize(), r.selectedIndices && r.selectedIndices.length > 0 ? ((o = this.drawCommand) == null || o.call(this, { renderOnlySelected: !1, renderOnlyUnselected: !0 }), (s = this.drawCommand) == null || s.call(this, { renderOnlySelected: !0, renderOnlyUnselected: !1 })) : (f = this.drawCommand) == null || f.call(this, { renderOnlySelected: !1, renderOnlyUnselected: !1 }), e && r.hoveredPoint && ((l = this.drawHighlightedCommand) == null || l.call(this, {
11872
+ this.colorBuffer || this.updateColor(), this.sizeBuffer || this.updateSize(), this.shapeBuffer || this.updateShape(), r.selectedIndices && r.selectedIndices.length > 0 ? ((o = this.drawCommand) == null || o.call(this, { skipSelected: !0, skipUnselected: !1 }), (s = this.drawCommand) == null || s.call(this, { skipSelected: !1, skipUnselected: !0 })) : (f = this.drawCommand) == null || f.call(this, { skipSelected: !1, skipUnselected: !1 }), e && r.hoveredPoint && ((l = this.drawHighlightedCommand) == null || l.call(this, {
11716
11873
  width: 0.85,
11717
11874
  color: r.hoveredPointRingColor,
11718
11875
  pointIndex: r.hoveredPoint.index,
@@ -11863,7 +12020,7 @@ Math.hypot || (Math.hypot = function() {
11863
12020
  t += arguments[e] * arguments[e];
11864
12021
  return Math.sqrt(t);
11865
12022
  });
11866
- function Yy() {
12023
+ function Zy() {
11867
12024
  var t = new Il(9);
11868
12025
  return Il != Float32Array && (t[1] = 0, t[2] = 0, t[3] = 0, t[5] = 0, t[6] = 0, t[7] = 0), t[0] = 1, t[4] = 1, t[8] = 1, t;
11869
12026
  }
@@ -11875,11 +12032,11 @@ function ws(t, e, n) {
11875
12032
  var r = n[0], i = n[1];
11876
12033
  return t[0] = r * e[0], t[1] = r * e[1], t[2] = r * e[2], t[3] = i * e[3], t[4] = i * e[4], t[5] = i * e[5], t[6] = e[6], t[7] = e[7], t[8] = e[8], t;
11877
12034
  }
11878
- function Zy(t, e, n) {
12035
+ function Qy(t, e, n) {
11879
12036
  return t[0] = 2 / e, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = -2 / n, t[5] = 0, t[6] = -1, t[7] = 1, t[8] = 1, t;
11880
12037
  }
11881
- var Yo = { exports: {} }, Qy = Yo.exports, zl;
11882
- function Ky() {
12038
+ var Yo = { exports: {} }, Ky = Yo.exports, zl;
12039
+ function Jy() {
11883
12040
  return zl || (zl = 1, function(t) {
11884
12041
  (function(e, n, r) {
11885
12042
  function i(u) {
@@ -11916,13 +12073,13 @@ function Ky() {
11916
12073
  }
11917
12074
  n && n.exports ? n.exports = s : this.alea = s;
11918
12075
  })(
11919
- Qy,
12076
+ Ky,
11920
12077
  t
11921
12078
  );
11922
12079
  }(Yo)), Yo.exports;
11923
12080
  }
11924
- var Zo = { exports: {} }, Jy = Zo.exports, Ol;
11925
- function ex() {
12081
+ var Zo = { exports: {} }, ex = Zo.exports, Ol;
12082
+ function tx() {
11926
12083
  return Ol || (Ol = 1, function(t) {
11927
12084
  (function(e, n, r) {
11928
12085
  function i(f) {
@@ -11952,13 +12109,13 @@ function ex() {
11952
12109
  }
11953
12110
  n && n.exports ? n.exports = s : this.xor128 = s;
11954
12111
  })(
11955
- Jy,
12112
+ ex,
11956
12113
  t
11957
12114
  );
11958
12115
  }(Zo)), Zo.exports;
11959
12116
  }
11960
- var Qo = { exports: {} }, tx = Qo.exports, Ml;
11961
- function nx() {
12117
+ var Qo = { exports: {} }, nx = Qo.exports, Ml;
12118
+ function rx() {
11962
12119
  return Ml || (Ml = 1, function(t) {
11963
12120
  (function(e, n, r) {
11964
12121
  function i(f) {
@@ -11988,13 +12145,13 @@ function nx() {
11988
12145
  }
11989
12146
  n && n.exports ? n.exports = s : this.xorwow = s;
11990
12147
  })(
11991
- tx,
12148
+ nx,
11992
12149
  t
11993
12150
  );
11994
12151
  }(Qo)), Qo.exports;
11995
12152
  }
11996
- var Ko = { exports: {} }, rx = Ko.exports, Nl;
11997
- function ix() {
12153
+ var Ko = { exports: {} }, ix = Ko.exports, Nl;
12154
+ function ox() {
11998
12155
  return Nl || (Nl = 1, function(t) {
11999
12156
  (function(e, n, r) {
12000
12157
  function i(f) {
@@ -12036,13 +12193,13 @@ function ix() {
12036
12193
  }
12037
12194
  n && n.exports ? n.exports = s : this.xorshift7 = s;
12038
12195
  })(
12039
- rx,
12196
+ ix,
12040
12197
  t
12041
12198
  );
12042
12199
  }(Ko)), Ko.exports;
12043
12200
  }
12044
- var Jo = { exports: {} }, ox = Jo.exports, Gl;
12045
- function ax() {
12201
+ var Jo = { exports: {} }, ax = Jo.exports, Gl;
12202
+ function sx() {
12046
12203
  return Gl || (Gl = 1, function(t) {
12047
12204
  (function(e, n, r) {
12048
12205
  function i(f) {
@@ -12080,14 +12237,14 @@ function ax() {
12080
12237
  }
12081
12238
  n && n.exports ? n.exports = s : this.xor4096 = s;
12082
12239
  })(
12083
- ox,
12240
+ ax,
12084
12241
  // window object or global
12085
12242
  t
12086
12243
  );
12087
12244
  }(Jo)), Jo.exports;
12088
12245
  }
12089
- var ea = { exports: {} }, sx = ea.exports, Bl;
12090
- function fx() {
12246
+ var ea = { exports: {} }, fx = ea.exports, Bl;
12247
+ function ux() {
12091
12248
  return Bl || (Bl = 1, function(t) {
12092
12249
  (function(e, n, r) {
12093
12250
  function i(f) {
@@ -12117,18 +12274,18 @@ function fx() {
12117
12274
  }
12118
12275
  n && n.exports ? n.exports = s : this.tychei = s;
12119
12276
  })(
12120
- sx,
12277
+ fx,
12121
12278
  t
12122
12279
  );
12123
12280
  }(ea)), ea.exports;
12124
12281
  }
12125
12282
  var ta = { exports: {} };
12126
- const ux = {}, lx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12283
+ const lx = {}, cx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12127
12284
  __proto__: null,
12128
- default: ux
12129
- }, Symbol.toStringTag, { value: "Module" })), cx = /* @__PURE__ */ Gv(lx);
12130
- var hx = ta.exports, Ul;
12131
- function dx() {
12285
+ default: lx
12286
+ }, Symbol.toStringTag, { value: "Module" })), hx = /* @__PURE__ */ Gv(cx);
12287
+ var dx = ta.exports, Ul;
12288
+ function mx() {
12132
12289
  return Ul || (Ul = 1, function(t) {
12133
12290
  (function(e, n, r) {
12134
12291
  var i = 256, o = 6, s = 52, f = "random", u = r.pow(i, o), l = r.pow(2, s), p = l * 2, x = i - 1, S;
@@ -12205,7 +12362,7 @@ function dx() {
12205
12362
  if (se(r.random(), n), t.exports) {
12206
12363
  t.exports = D;
12207
12364
  try {
12208
- S = cx;
12365
+ S = hx;
12209
12366
  } catch {
12210
12367
  }
12211
12368
  } else
@@ -12213,7 +12370,7 @@ function dx() {
12213
12370
  })(
12214
12371
  // global: `self` in browsers (including strict mode and web workers),
12215
12372
  // otherwise `this` in Node and other environments
12216
- typeof self < "u" ? self : hx,
12373
+ typeof self < "u" ? self : dx,
12217
12374
  [],
12218
12375
  // pool: entropy pool starts empty
12219
12376
  Math
@@ -12222,22 +12379,22 @@ function dx() {
12222
12379
  }(ta)), ta.exports;
12223
12380
  }
12224
12381
  var As, Vl;
12225
- function mx() {
12382
+ function px() {
12226
12383
  if (Vl) return As;
12227
12384
  Vl = 1;
12228
- var t = Ky(), e = ex(), n = nx(), r = ix(), i = ax(), o = fx(), s = dx();
12385
+ var t = Jy(), e = tx(), n = rx(), r = ox(), i = sx(), o = ux(), s = mx();
12229
12386
  return s.alea = t, s.xor128 = e, s.xorwow = n, s.xorshift7 = r, s.xor4096 = i, s.tychei = o, As = s, As;
12230
12387
  }
12231
- var px = mx();
12232
- const vx = /* @__PURE__ */ tf(px);
12233
- function gx(t, e) {
12388
+ var vx = px();
12389
+ const gx = /* @__PURE__ */ tf(vx);
12390
+ function yx(t, e) {
12234
12391
  for (var n = 0; n < e.length; n++) {
12235
12392
  var r = e[n];
12236
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, xx(r.key), r);
12393
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, bx(r.key), r);
12237
12394
  }
12238
12395
  }
12239
12396
  function rf(t, e, n) {
12240
- return e && gx(t.prototype, e), Object.defineProperty(t, "prototype", {
12397
+ return e && yx(t.prototype, e), Object.defineProperty(t, "prototype", {
12241
12398
  writable: !1
12242
12399
  }), t;
12243
12400
  }
@@ -12249,7 +12406,7 @@ function $s(t, e) {
12249
12406
  return r.__proto__ = i, r;
12250
12407
  }, $s(t, e);
12251
12408
  }
12252
- function yx(t, e) {
12409
+ function xx(t, e) {
12253
12410
  if (typeof t != "object" || t === null) return t;
12254
12411
  var n = t[Symbol.toPrimitive];
12255
12412
  if (n !== void 0) {
@@ -12259,8 +12416,8 @@ function yx(t, e) {
12259
12416
  }
12260
12417
  return String(t);
12261
12418
  }
12262
- function xx(t) {
12263
- var e = yx(t, "string");
12419
+ function bx(t) {
12420
+ var e = xx(t, "string");
12264
12421
  return typeof e == "symbol" ? e : String(e);
12265
12422
  }
12266
12423
  var pa = /* @__PURE__ */ function() {
@@ -12305,18 +12462,18 @@ var pa = /* @__PURE__ */ function() {
12305
12462
  case "number":
12306
12463
  case "string":
12307
12464
  default:
12308
- return new $l(vx.apply(void 0, t));
12465
+ return new $l(gx.apply(void 0, t));
12309
12466
  }
12310
12467
  throw new Error('invalid RNG "' + r + '"');
12311
- }, bx = function(t, e, n) {
12468
+ }, _x = function(t, e, n) {
12312
12469
  return e === void 0 && (e = 0), n === void 0 && (n = 1), function() {
12313
12470
  return t.next() * (n - e) + e;
12314
12471
  };
12315
12472
  };
12316
- function vn(t) {
12317
- return new _x(t);
12473
+ function gn(t) {
12474
+ return new Sx(t);
12318
12475
  }
12319
- var _x = function(e) {
12476
+ var Sx = function(e) {
12320
12477
  var n = this;
12321
12478
  this.n = void 0, this.isInt = function() {
12322
12479
  if (Number.isInteger(n.n))
@@ -12339,15 +12496,15 @@ var _x = function(e) {
12339
12496
  return n;
12340
12497
  throw new Error("Expected number to be greater than " + r + ", got " + n.n);
12341
12498
  }, this.n = e;
12342
- }, Sx = function(t, e, n) {
12343
- return e === void 0 && (e = 0), n === void 0 && (n = 1), n === void 0 && (n = e === void 0 ? 1 : e, e = 0), vn(e).isInt(), vn(n).isInt(), function() {
12499
+ }, Tx = function(t, e, n) {
12500
+ return e === void 0 && (e = 0), n === void 0 && (n = 1), n === void 0 && (n = e === void 0 ? 1 : e, e = 0), gn(e).isInt(), gn(n).isInt(), function() {
12344
12501
  return Math.floor(t.next() * (n - e + 1) + e);
12345
12502
  };
12346
- }, Tx = function(t) {
12503
+ }, wx = function(t) {
12347
12504
  return function() {
12348
12505
  return t.next() >= 0.5;
12349
12506
  };
12350
- }, wx = function(t, e, n) {
12507
+ }, Ax = function(t, e, n) {
12351
12508
  return e === void 0 && (e = 0), n === void 0 && (n = 1), function() {
12352
12509
  var r, i, o;
12353
12510
  do
@@ -12355,32 +12512,32 @@ var _x = function(e) {
12355
12512
  while (!o || o > 1);
12356
12513
  return e + n * i * Math.sqrt(-2 * Math.log(o) / o);
12357
12514
  };
12358
- }, Ax = function(t, e, n) {
12515
+ }, Ex = function(t, e, n) {
12359
12516
  e === void 0 && (e = 0), n === void 0 && (n = 1);
12360
12517
  var r = t.normal(e, n);
12361
12518
  return function() {
12362
12519
  return Math.exp(r());
12363
12520
  };
12364
- }, Ex = function(t, e) {
12365
- return e === void 0 && (e = 0.5), vn(e).greaterThanOrEqual(0).lessThan(1), function() {
12521
+ }, Px = function(t, e) {
12522
+ return e === void 0 && (e = 0.5), gn(e).greaterThanOrEqual(0).lessThan(1), function() {
12366
12523
  return Math.floor(t.next() + e);
12367
12524
  };
12368
- }, Px = function(t, e, n) {
12369
- return e === void 0 && (e = 1), n === void 0 && (n = 0.5), vn(e).isInt().isPositive(), vn(n).greaterThanOrEqual(0).lessThan(1), function() {
12525
+ }, Cx = function(t, e, n) {
12526
+ return e === void 0 && (e = 1), n === void 0 && (n = 0.5), gn(e).isInt().isPositive(), gn(n).greaterThanOrEqual(0).lessThan(1), function() {
12370
12527
  for (var r = 0, i = 0; r++ < e; )
12371
12528
  t.next() < n && i++;
12372
12529
  return i;
12373
12530
  };
12374
- }, Cx = function(t, e) {
12375
- e === void 0 && (e = 0.5), vn(e).greaterThan(0).lessThan(1);
12531
+ }, kx = function(t, e) {
12532
+ e === void 0 && (e = 0.5), gn(e).greaterThan(0).lessThan(1);
12376
12533
  var n = 1 / Math.log(1 - e);
12377
12534
  return function() {
12378
12535
  return Math.floor(1 + Math.log(t.next()) * n);
12379
12536
  };
12380
- }, kx = [0, 0, 0.6931471805599453, 1.791759469228055, 3.1780538303479458, 4.787491742782046, 6.579251212010101, 8.525161361065415, 10.60460290274525, 12.801827480081469], Lx = function(e) {
12381
- return kx[e];
12382
- }, Fx = 0.9189385332046727, Rx = function(t, e) {
12383
- if (e === void 0 && (e = 1), vn(e).isPositive(), e < 10) {
12537
+ }, Lx = [0, 0, 0.6931471805599453, 1.791759469228055, 3.1780538303479458, 4.787491742782046, 6.579251212010101, 8.525161361065415, 10.60460290274525, 12.801827480081469], Fx = function(e) {
12538
+ return Lx[e];
12539
+ }, Rx = 0.9189385332046727, Ix = function(t, e) {
12540
+ if (e === void 0 && (e = 1), gn(e).isPositive(), e < 10) {
12384
12541
  var n = Math.exp(-e);
12385
12542
  return function() {
12386
12543
  for (var u = n, l = 0, p = t.next(); p > u; )
@@ -12399,11 +12556,11 @@ var _x = function(e) {
12399
12556
  if (!(p < 0.013 && l > p)) {
12400
12557
  var x = Math.floor((2 * o / p + i) * u + e + 0.445);
12401
12558
  if (l = l * s / (o / (p * p) + i), x >= 10) {
12402
- var S = (x + 0.5) * Math.log(e / x) - e - Fx + x - (0.08333333333333333 - (0.002777777777777778 - 1 / (1260 * x * x)) / (x * x)) / x;
12559
+ var S = (x + 0.5) * Math.log(e / x) - e - Rx + x - (0.08333333333333333 - (0.002777777777777778 - 1 / (1260 * x * x)) / (x * x)) / x;
12403
12560
  if (Math.log(l * r) <= S)
12404
12561
  return x;
12405
12562
  } else if (x >= 0) {
12406
- var D, Y = (D = Lx(x)) != null ? D : 0;
12563
+ var D, Y = (D = Fx(x)) != null ? D : 0;
12407
12564
  if (Math.log(l) <= x * Math.log(e) - e - Y)
12408
12565
  return x;
12409
12566
  }
@@ -12411,29 +12568,29 @@ var _x = function(e) {
12411
12568
  }
12412
12569
  };
12413
12570
  }
12414
- }, Ix = function(t, e) {
12415
- return e === void 0 && (e = 1), vn(e).isPositive(), function() {
12571
+ }, Dx = function(t, e) {
12572
+ return e === void 0 && (e = 1), gn(e).isPositive(), function() {
12416
12573
  return -Math.log(1 - t.next()) / e;
12417
12574
  };
12418
- }, Dx = function(t, e) {
12419
- return e === void 0 && (e = 1), vn(e).isInt().greaterThanOrEqual(0), function() {
12575
+ }, zx = function(t, e) {
12576
+ return e === void 0 && (e = 1), gn(e).isInt().greaterThanOrEqual(0), function() {
12420
12577
  for (var n = 0, r = 0; r < e; ++r)
12421
12578
  n += t.next();
12422
12579
  return n;
12423
12580
  };
12424
- }, zx = function(t, e) {
12425
- e === void 0 && (e = 1), vn(e).isInt().isPositive();
12581
+ }, Ox = function(t, e) {
12582
+ e === void 0 && (e = 1), gn(e).isInt().isPositive();
12426
12583
  var n = t.irwinHall(e);
12427
12584
  return function() {
12428
12585
  return n() / e;
12429
12586
  };
12430
- }, Ox = function(t, e) {
12431
- e === void 0 && (e = 1), vn(e).greaterThanOrEqual(0);
12587
+ }, Mx = function(t, e) {
12588
+ e === void 0 && (e = 1), gn(e).greaterThanOrEqual(0);
12432
12589
  var n = 1 / e;
12433
12590
  return function() {
12434
12591
  return 1 / Math.pow(1 - t.next(), n);
12435
12592
  };
12436
- }, Mx = /* @__PURE__ */ function(t) {
12593
+ }, Nx = /* @__PURE__ */ function(t) {
12437
12594
  zc(e, t);
12438
12595
  function e() {
12439
12596
  return t.apply(this, arguments) || this;
@@ -12466,32 +12623,32 @@ var _x = function(e) {
12466
12623
  }, this.boolean = function() {
12467
12624
  return r.uniformBoolean()();
12468
12625
  }, this.uniform = function(i, o) {
12469
- return r._memoize("uniform", bx, i, o);
12626
+ return r._memoize("uniform", _x, i, o);
12470
12627
  }, this.uniformInt = function(i, o) {
12471
- return r._memoize("uniformInt", Sx, i, o);
12628
+ return r._memoize("uniformInt", Tx, i, o);
12472
12629
  }, this.uniformBoolean = function() {
12473
- return r._memoize("uniformBoolean", Tx);
12630
+ return r._memoize("uniformBoolean", wx);
12474
12631
  }, this.normal = function(i, o) {
12475
- return wx(r, i, o);
12476
- }, this.logNormal = function(i, o) {
12477
12632
  return Ax(r, i, o);
12633
+ }, this.logNormal = function(i, o) {
12634
+ return Ex(r, i, o);
12478
12635
  }, this.bernoulli = function(i) {
12479
- return Ex(r, i);
12636
+ return Px(r, i);
12480
12637
  }, this.binomial = function(i, o) {
12481
- return Px(r, i, o);
12638
+ return Cx(r, i, o);
12482
12639
  }, this.geometric = function(i) {
12483
- return Cx(r, i);
12640
+ return kx(r, i);
12484
12641
  }, this.poisson = function(i) {
12485
- return Rx(r, i);
12486
- }, this.exponential = function(i) {
12487
12642
  return Ix(r, i);
12488
- }, this.irwinHall = function(i) {
12643
+ }, this.exponential = function(i) {
12489
12644
  return Dx(r, i);
12490
- }, this.bates = function(i) {
12645
+ }, this.irwinHall = function(i) {
12491
12646
  return zx(r, i);
12492
- }, this.pareto = function(i) {
12647
+ }, this.bates = function(i) {
12493
12648
  return Ox(r, i);
12494
- }, n && n instanceof pa ? this.use(n) : this.use(new Mx()), this._cache = {};
12649
+ }, this.pareto = function(i) {
12650
+ return Mx(r, i);
12651
+ }, n && n instanceof pa ? this.use(n) : this.use(new Nx()), this._cache = {};
12495
12652
  }
12496
12653
  var e = t.prototype;
12497
12654
  return e.clone = function() {
@@ -12529,9 +12686,9 @@ var _x = function(e) {
12529
12686
  }();
12530
12687
  new Oc();
12531
12688
  const Hs = 1e-3, Xs = 64;
12532
- class Nx {
12689
+ class Gx {
12533
12690
  constructor() {
12534
- this.pointsTextureSize = 0, this.linksTextureSize = 0, this.alpha = 1, this.transform = Yy(), this.screenSize = [0, 0], this.mousePosition = [0, 0], this.screenMousePosition = [0, 0], this.selectedArea = [[0, 0], [0, 0]], this.isSimulationRunning = !1, this.simulationProgress = 0, this.selectedIndices = null, this.maxPointSize = Xs, this.hoveredPoint = void 0, this.focusedPoint = void 0, this.draggingPointIndex = void 0, this.adjustedSpaceSize = We.spaceSize, this.isSpaceKeyPressed = !1, this.hoveredPointRingColor = [1, 1, 1, eg], this.focusedPointRingColor = [1, 1, 1, tg], this.greyoutPointColor = [-1, -1, -1, -1], this.darkenGreyout = !1, this.alphaTarget = 0, this.scalePointX = Vs(), this.scalePointY = Vs(), this.random = new Oc(), this._backgroundColor = [0, 0, 0, 0], this.alphaDecay = (e) => 1 - Math.pow(Hs, 1 / e);
12691
+ this.pointsTextureSize = 0, this.linksTextureSize = 0, this.alpha = 1, this.transform = Zy(), this.screenSize = [0, 0], this.mousePosition = [0, 0], this.screenMousePosition = [0, 0], this.selectedArea = [[0, 0], [0, 0]], this.isSimulationRunning = !1, this.simulationProgress = 0, this.selectedIndices = null, this.maxPointSize = Xs, this.hoveredPoint = void 0, this.focusedPoint = void 0, this.draggingPointIndex = void 0, this.adjustedSpaceSize = We.spaceSize, this.isSpaceKeyPressed = !1, this.hoveredPointRingColor = [1, 1, 1, eg], this.focusedPointRingColor = [1, 1, 1, tg], this.greyoutPointColor = [-1, -1, -1, -1], this.darkenGreyout = !1, this.alphaTarget = 0, this.scalePointX = Vs(), this.scalePointY = Vs(), this.random = new Oc(), this._backgroundColor = [0, 0, 0, 0], this.alphaDecay = (e) => 1 - Math.pow(Hs, 1 / e);
12535
12692
  }
12536
12693
  get backgroundColor() {
12537
12694
  return this._backgroundColor;
@@ -12587,7 +12744,7 @@ class Nx {
12587
12744
  return (this.alphaTarget - this.alpha) * this.alphaDecay(e);
12588
12745
  }
12589
12746
  }
12590
- const Gx = { passive: !1 }, zi = { capture: !0, passive: !1 };
12747
+ const Bx = { passive: !1 }, zi = { capture: !0, passive: !1 };
12591
12748
  function Es(t) {
12592
12749
  t.stopImmediatePropagation();
12593
12750
  }
@@ -12635,22 +12792,22 @@ js.prototype.on = function() {
12635
12792
  var t = this._.on.apply(this._, arguments);
12636
12793
  return t === this._ ? this : t;
12637
12794
  };
12638
- function Bx(t) {
12795
+ function Ux(t) {
12639
12796
  return !t.ctrlKey && !t.button;
12640
12797
  }
12641
- function Ux() {
12798
+ function Vx() {
12642
12799
  return this.parentNode;
12643
12800
  }
12644
- function Vx(t, e) {
12801
+ function $x(t, e) {
12645
12802
  return e ?? { x: t.x, y: t.y };
12646
12803
  }
12647
- function $x() {
12804
+ function Hx() {
12648
12805
  return navigator.maxTouchPoints || "ontouchstart" in this;
12649
12806
  }
12650
- function Hx() {
12651
- var t = Bx, e = Ux, n = Vx, r = $x, i = {}, o = ha("start", "drag", "end"), s = 0, f, u, l, p, x = 0;
12807
+ function Xx() {
12808
+ var t = Ux, e = Vx, n = $x, r = Hx, i = {}, o = ha("start", "drag", "end"), s = 0, f, u, l, p, x = 0;
12652
12809
  function S(H) {
12653
- H.on("mousedown.drag", D).filter(r).on("touchstart.drag", Te).on("touchmove.drag", se, Gx).on("touchend.drag touchcancel.drag", Ue).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12810
+ H.on("mousedown.drag", D).filter(r).on("touchstart.drag", Te).on("touchmove.drag", se, Bx).on("touchend.drag touchcancel.drag", Ue).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12654
12811
  }
12655
12812
  function D(H, fe) {
12656
12813
  if (!(p || !t.call(this, H, fe))) {
@@ -12748,7 +12905,7 @@ function Hx() {
12748
12905
  }, S;
12749
12906
  }
12750
12907
  const Bo = (t) => () => t;
12751
- function Xx(t, {
12908
+ function jx(t, {
12752
12909
  sourceEvent: e,
12753
12910
  target: n,
12754
12911
  transform: r,
@@ -12809,31 +12966,31 @@ function Ps(t) {
12809
12966
  function Ci(t) {
12810
12967
  t.preventDefault(), t.stopImmediatePropagation();
12811
12968
  }
12812
- function jx(t) {
12969
+ function Wx(t) {
12813
12970
  return (!t.ctrlKey || t.type === "wheel") && !t.button;
12814
12971
  }
12815
- function Wx() {
12972
+ function qx() {
12816
12973
  var t = this;
12817
12974
  return t instanceof SVGElement ? (t = t.ownerSVGElement || t, t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]]) : [[0, 0], [t.clientWidth, t.clientHeight]];
12818
12975
  }
12819
12976
  function Xl() {
12820
12977
  return this.__zoom || Fi;
12821
12978
  }
12822
- function qx(t) {
12979
+ function Yx(t) {
12823
12980
  return -t.deltaY * (t.deltaMode === 1 ? 0.05 : t.deltaMode ? 1 : 2e-3) * (t.ctrlKey ? 10 : 1);
12824
12981
  }
12825
- function Yx() {
12982
+ function Zx() {
12826
12983
  return navigator.maxTouchPoints || "ontouchstart" in this;
12827
12984
  }
12828
- function Zx(t, e, n) {
12985
+ function Qx(t, e, n) {
12829
12986
  var r = t.invertX(e[0][0]) - n[0][0], i = t.invertX(e[1][0]) - n[1][0], o = t.invertY(e[0][1]) - n[0][1], s = t.invertY(e[1][1]) - n[1][1];
12830
12987
  return t.translate(
12831
12988
  i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i),
12832
12989
  s > o ? (o + s) / 2 : Math.min(0, o) || Math.max(0, s)
12833
12990
  );
12834
12991
  }
12835
- function Qx() {
12836
- var t = jx, e = Wx, n = Zx, r = qx, i = Yx, o = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], f = 250, u = R0, l = ha("start", "zoom", "end"), p, x, S, D = 500, Y = 150, Ee = 0, Te = 10;
12992
+ function Kx() {
12993
+ var t = Wx, e = qx, n = Qx, r = Yx, i = Zx, o = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], f = 250, u = R0, l = ha("start", "zoom", "end"), p, x, S, D = 500, Y = 150, Ee = 0, Te = 10;
12837
12994
  function se(N) {
12838
12995
  N.property("__zoom", Xl).on("wheel.zoom", Ye, { passive: !1 }).on("mousedown.zoom", at).on("dblclick.zoom", ut).filter(i).on("touchstart.zoom", Ae).on("touchmove.zoom", lt).on("touchend.zoom touchcancel.zoom", rt).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
12839
12996
  }
@@ -12919,7 +13076,7 @@ function Qx() {
12919
13076
  l.call(
12920
13077
  N,
12921
13078
  this.that,
12922
- new Xx(N, {
13079
+ new jx(N, {
12923
13080
  sourceEvent: this.sourceEvent,
12924
13081
  target: se,
12925
13082
  transform: this.that.__zoom,
@@ -13028,9 +13185,9 @@ function Qx() {
13028
13185
  return arguments.length ? (Te = +N, se) : Te;
13029
13186
  }, se;
13030
13187
  }
13031
- class Kx {
13188
+ class Jx {
13032
13189
  constructor(e, n) {
13033
- this.eventTransform = Fi, this.behavior = Qx().scaleExtent([1e-3, 1 / 0]).on("start", (r) => {
13190
+ this.eventTransform = Fi, this.behavior = Kx().scaleExtent([1e-3, 1 / 0]).on("start", (r) => {
13034
13191
  var o, s;
13035
13192
  this.isRunning = !0;
13036
13193
  const i = !!r.sourceEvent;
@@ -13040,7 +13197,7 @@ class Kx {
13040
13197
  this.eventTransform = r.transform;
13041
13198
  const { eventTransform: { x: i, y: o, k: s }, store: { transform: f, screenSize: u } } = this, l = u[0], p = u[1];
13042
13199
  if (!l || !p) return;
13043
- Zy(f, l, p), Dl(f, f, [i, o]), ws(f, f, [s, s]), Dl(f, f, [l / 2, p / 2]), ws(f, f, [l / 2, p / 2]), ws(f, f, [1, -1]);
13200
+ Qy(f, l, p), Dl(f, f, [i, o]), ws(f, f, [s, s]), Dl(f, f, [l / 2, p / 2]), ws(f, f, [l / 2, p / 2]), ws(f, f, [1, -1]);
13044
13201
  const x = !!r.sourceEvent;
13045
13202
  (D = (S = this.config) == null ? void 0 : S.onZoom) == null || D.call(S, r, x);
13046
13203
  }).on("end", (r) => {
@@ -13086,9 +13243,9 @@ class Kx {
13086
13243
  return n ? o *= i : o *= Math.min(5, Math.max(1, i * 0.01)), Math.min(o, r) / 2;
13087
13244
  }
13088
13245
  }
13089
- class Jx {
13246
+ class eb {
13090
13247
  constructor(e, n) {
13091
- this.isActive = !1, this.behavior = Hx().subject((r) => this.store.hoveredPoint && !this.store.isSpaceKeyPressed ? { x: r.x, y: r.y } : void 0).on("start", (r) => {
13248
+ this.isActive = !1, this.behavior = Xx().subject((r) => this.store.hoveredPoint && !this.store.isSpaceKeyPressed ? { x: r.x, y: r.y } : void 0).on("start", (r) => {
13092
13249
  var i, o;
13093
13250
  this.store.hoveredPoint && (this.store.draggingPointIndex = this.store.hoveredPoint.index, this.isActive = !0, (o = (i = this.config) == null ? void 0 : i.onDragStart) == null || o.call(i, r));
13094
13251
  }).on("drag", (r) => {
@@ -13100,7 +13257,7 @@ class Jx {
13100
13257
  }), this.store = e, this.config = n;
13101
13258
  }
13102
13259
  }
13103
- function eb(t) {
13260
+ function tb(t) {
13104
13261
  const e = document.createElement("div");
13105
13262
  return e.style.cssText = `
13106
13263
  color: var(--cosmosgl-error-message-color);
@@ -13115,9 +13272,9 @@ function eb(t) {
13115
13272
  user-select: none;
13116
13273
  `, e.textContent = "Sorry, your device or browser does not support the required WebGL features for this visualization", t.appendChild(e), e;
13117
13274
  }
13118
- class tb {
13275
+ class nb {
13119
13276
  constructor(e, n) {
13120
- this.config = new Fg(), this.graph = new ty(this.config), this.requestAnimationFrameId = 0, this.isRightClickMouse = !1, this.store = new Nx(), this.zoomInstance = new Kx(this.store, this.config), this.dragInstance = new Jx(this.store, this.config), this._findHoveredPointExecutionCount = 0, this._isMouseOnCanvas = !1, this._isFirstRenderAfterInit = !0, this._needsPointPositionsUpdate = !1, this._needsPointColorUpdate = !1, this._needsPointSizeUpdate = !1, this._needsLinksUpdate = !1, this._needsLinkColorUpdate = !1, this._needsLinkWidthUpdate = !1, this._needsLinkArrowUpdate = !1, this._needsPointClusterUpdate = !1, this._needsForceManyBodyUpdate = !1, this._needsForceLinkUpdate = !1, this._needsForceCenterUpdate = !1, this._isDestroyed = !1, n && this.config.init(n), this.store.div = e;
13277
+ this.config = new Fg(), this.graph = new ny(this.config), this.requestAnimationFrameId = 0, this.isRightClickMouse = !1, this.store = new Gx(), this.zoomInstance = new Jx(this.store, this.config), this.dragInstance = new eb(this.store, this.config), this._findHoveredPointExecutionCount = 0, this._isMouseOnCanvas = !1, this._isFirstRenderAfterInit = !0, this._needsPointPositionsUpdate = !1, this._needsPointColorUpdate = !1, this._needsPointSizeUpdate = !1, this._needsPointShapeUpdate = !1, this._needsLinksUpdate = !1, this._needsLinkColorUpdate = !1, this._needsLinkWidthUpdate = !1, this._needsLinkArrowUpdate = !1, this._needsPointClusterUpdate = !1, this._needsForceManyBodyUpdate = !1, this._needsForceLinkUpdate = !1, this._needsForceCenterUpdate = !1, this._isDestroyed = !1, n && this.config.init(n), this.store.div = e;
13121
13278
  const r = document.createElement("canvas");
13122
13279
  r.style.width = "100%", r.style.height = "100%", this.store.div.appendChild(r), this.addAttribution();
13123
13280
  const i = r.clientWidth, o = r.clientHeight;
@@ -13133,7 +13290,7 @@ class tb {
13133
13290
  extensions: ["OES_texture_float", "ANGLE_instanced_arrays"]
13134
13291
  });
13135
13292
  } catch {
13136
- eb(this.store.div), this._isDestroyed = !0;
13293
+ tb(this.store.div), this._isDestroyed = !0;
13137
13294
  return;
13138
13295
  }
13139
13296
  this.reglInstance = s, this.store.adjustSpaceSize(this.config.spaceSize, this.reglInstance.limits.maxTextureSize), this.store.updateScreenSize(i, o), this.canvasD3Selection = Ut(this.canvas), this.canvasD3Selection.on("mouseenter.cosmos", () => {
@@ -13158,7 +13315,7 @@ class tb {
13158
13315
  this.dragInstance.isActive && this.updateMousePosition(f), this.currentEvent = f;
13159
13316
  }).on("end.detect", (f) => {
13160
13317
  this.currentEvent = f, this.updateCanvasCursor();
13161
- }), this.canvasD3Selection.call(this.dragInstance.behavior).call(this.zoomInstance.behavior).on("click", this.onClick.bind(this)).on("mousemove", this.onMouseMove.bind(this)).on("contextmenu", this.onRightClickMouse.bind(this)), (!this.config.enableZoom || !this.config.enableDrag) && this.updateZoomDragBehaviors(), this.setZoomLevel(this.config.initialZoomLevel ?? 1), this.store.maxPointSize = (this.reglInstance.limits.pointSizeDims[1] ?? Xs) / this.config.pixelRatio, this.points = new qy(this.reglInstance, this.config, this.store, this.graph), this.lines = new Dy(this.reglInstance, this.config, this.store, this.graph, this.points), this.config.enableSimulation && (this.forceGravity = new Mg(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceCenter = new zg(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceManyBody = this.config.useClassicQuadtree ? new $g(this.reglInstance, this.config, this.store, this.graph, this.points) : new Ug(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkIncoming = new Sl(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkOutgoing = new Sl(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceMouse = new Xg(this.reglInstance, this.config, this.store, this.graph, this.points)), this.clusters = new Yg(this.reglInstance, this.config, this.store, this.graph, this.points), this.store.backgroundColor = Sr(this.config.backgroundColor), this.config.hoveredPointRingColor && this.store.setHoveredPointRingColor(this.config.hoveredPointRingColor), this.config.focusedPointRingColor && this.store.setFocusedPointRingColor(this.config.focusedPointRingColor), this.config.focusedPointIndex !== void 0 && this.store.setFocusedPoint(this.config.focusedPointIndex), this.config.pointGreyoutColor && this.store.setGreyoutPointColor(this.config.pointGreyoutColor), this.config.showFPSMonitor && (this.fpsMonitor = new wl(this.canvas)), this.config.randomSeed !== void 0 && this.store.addRandomSeed(this.config.randomSeed);
13318
+ }), this.canvasD3Selection.call(this.dragInstance.behavior).call(this.zoomInstance.behavior).on("click", this.onClick.bind(this)).on("mousemove", this.onMouseMove.bind(this)).on("contextmenu", this.onRightClickMouse.bind(this)), (!this.config.enableZoom || !this.config.enableDrag) && this.updateZoomDragBehaviors(), this.setZoomLevel(this.config.initialZoomLevel ?? 1), this.store.maxPointSize = (this.reglInstance.limits.pointSizeDims[1] ?? Xs) / this.config.pixelRatio, this.points = new Yy(this.reglInstance, this.config, this.store, this.graph), this.lines = new zy(this.reglInstance, this.config, this.store, this.graph, this.points), this.config.enableSimulation && (this.forceGravity = new Mg(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceCenter = new zg(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceManyBody = this.config.useClassicQuadtree ? new $g(this.reglInstance, this.config, this.store, this.graph, this.points) : new Ug(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkIncoming = new Sl(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceLinkOutgoing = new Sl(this.reglInstance, this.config, this.store, this.graph, this.points), this.forceMouse = new Xg(this.reglInstance, this.config, this.store, this.graph, this.points)), this.clusters = new Yg(this.reglInstance, this.config, this.store, this.graph, this.points), this.store.backgroundColor = Sr(this.config.backgroundColor), this.config.hoveredPointRingColor && this.store.setHoveredPointRingColor(this.config.hoveredPointRingColor), this.config.focusedPointRingColor && this.store.setFocusedPointRingColor(this.config.focusedPointRingColor), this.config.focusedPointIndex !== void 0 && this.store.setFocusedPoint(this.config.focusedPointIndex), this.config.pointGreyoutColor && this.store.setGreyoutPointColor(this.config.pointGreyoutColor), this.config.showFPSMonitor && (this.fpsMonitor = new wl(this.canvas)), this.config.randomSeed !== void 0 && this.store.addRandomSeed(this.config.randomSeed);
13162
13319
  }
13163
13320
  /**
13164
13321
  * Returns the current simulation progress
@@ -13200,7 +13357,7 @@ class tb {
13200
13357
  * - `false` or `undefined` (default): Use the behavior defined by `config.rescalePositions`.
13201
13358
  */
13202
13359
  setPointPositions(e, n) {
13203
- this._isDestroyed || !this.points || (this.graph.inputPointPositions = e, this.points.dontRescale = n, this._needsPointPositionsUpdate = !0, this._needsLinksUpdate = !0, this._needsPointColorUpdate = !0, this._needsPointSizeUpdate = !0, this._needsPointClusterUpdate = !0, this._needsForceManyBodyUpdate = !0, this._needsForceLinkUpdate = !0, this._needsForceCenterUpdate = !0);
13360
+ this._isDestroyed || !this.points || (this.graph.inputPointPositions = e, this.points.dontRescale = n, this._needsPointPositionsUpdate = !0, this._needsLinksUpdate = !0, this._needsPointColorUpdate = !0, this._needsPointSizeUpdate = !0, this._needsPointShapeUpdate = !0, this._needsPointClusterUpdate = !0, this._needsForceManyBodyUpdate = !0, this._needsForceLinkUpdate = !0, this._needsForceCenterUpdate = !0);
13204
13361
  }
13205
13362
  /**
13206
13363
  * Sets the colors for the graph points.
@@ -13231,6 +13388,17 @@ class tb {
13231
13388
  setPointSizes(e) {
13232
13389
  this._isDestroyed || (this.graph.inputPointSizes = e, this._needsPointSizeUpdate = !0);
13233
13390
  }
13391
+ /**
13392
+ * Sets the shapes for the graph points.
13393
+ *
13394
+ * @param {Float32Array} pointShapes - A Float32Array representing the shapes of points in the format [shape1, shape2, ..., shapen],
13395
+ * where `n` is the index of the point and each shape value corresponds to a PointShape enum:
13396
+ * 0 = Circle, 1 = Square, 2 = Triangle, 3 = Diamond, 4 = Pentagon, 5 = Hexagon, 6 = Star, 7 = Cross.
13397
+ * Example: `new Float32Array([0, 1, 2])` sets the first point to Circle, the second point to Square, and the third point to Triangle.
13398
+ */
13399
+ setPointShapes(e) {
13400
+ this._isDestroyed || (this.graph.inputPointShapes = e, this._needsPointShapeUpdate = !0);
13401
+ }
13234
13402
  /**
13235
13403
  * Gets the current sizes of the graph points.
13236
13404
  *
@@ -13359,7 +13527,7 @@ class tb {
13359
13527
  render(e) {
13360
13528
  if (this._isDestroyed || !this.reglInstance) return;
13361
13529
  this.graph.update();
13362
- const { fitViewOnInit: n, fitViewDelay: r, fitViewPadding: i, fitViewDuration: o, fitViewByPointsInRect: s, initialZoomLevel: f } = this.config;
13530
+ const { fitViewOnInit: n, fitViewDelay: r, fitViewPadding: i, fitViewDuration: o, fitViewByPointsInRect: s, fitViewByPointIndices: f, initialZoomLevel: u } = this.config;
13363
13531
  if (!this.graph.pointsNumber && !this.graph.linksNumber) {
13364
13532
  this.stopFrames(), Ut(this.canvas).style("cursor", null), this.reglInstance.clear({
13365
13533
  color: this.store.backgroundColor,
@@ -13368,8 +13536,8 @@ class tb {
13368
13536
  });
13369
13537
  return;
13370
13538
  }
13371
- this._isFirstRenderAfterInit && n && f === void 0 && (this._fitViewOnInitTimeoutID = window.setTimeout(() => {
13372
- s ? this.setZoomTransformByPointPositions(s, o, void 0, i) : this.fitView(o, i);
13539
+ this._isFirstRenderAfterInit && n && u === void 0 && (this._fitViewOnInitTimeoutID = window.setTimeout(() => {
13540
+ f ? this.fitViewByPointIndices(f, o, i) : s ? this.setZoomTransformByPointPositions(s, o, void 0, i) : this.fitView(o, i);
13373
13541
  }, r)), this._isFirstRenderAfterInit = !1, this.update(e);
13374
13542
  }
13375
13543
  /**
@@ -13735,7 +13903,7 @@ class tb {
13735
13903
  */
13736
13904
  create() {
13737
13905
  var e, n, r, i, o;
13738
- this._isDestroyed || !this.points || !this.lines || (this._needsPointPositionsUpdate && this.points.updatePositions(), this._needsPointColorUpdate && this.points.updateColor(), this._needsPointSizeUpdate && this.points.updateSize(), this._needsLinksUpdate && this.lines.updatePointsBuffer(), this._needsLinkColorUpdate && this.lines.updateColor(), this._needsLinkWidthUpdate && this.lines.updateWidth(), this._needsLinkArrowUpdate && this.lines.updateArrow(), this._needsForceManyBodyUpdate && ((e = this.forceManyBody) == null || e.create()), this._needsForceLinkUpdate && ((n = this.forceLinkIncoming) == null || n.create(Ms.INCOMING), (r = this.forceLinkOutgoing) == null || r.create(Ms.OUTGOING)), this._needsForceCenterUpdate && ((i = this.forceCenter) == null || i.create()), this._needsPointClusterUpdate && ((o = this.clusters) == null || o.create()), this._needsPointPositionsUpdate = !1, this._needsPointColorUpdate = !1, this._needsPointSizeUpdate = !1, this._needsLinksUpdate = !1, this._needsLinkColorUpdate = !1, this._needsLinkWidthUpdate = !1, this._needsLinkArrowUpdate = !1, this._needsPointClusterUpdate = !1, this._needsForceManyBodyUpdate = !1, this._needsForceLinkUpdate = !1, this._needsForceCenterUpdate = !1);
13906
+ this._isDestroyed || !this.points || !this.lines || (this._needsPointPositionsUpdate && this.points.updatePositions(), this._needsPointColorUpdate && this.points.updateColor(), this._needsPointSizeUpdate && this.points.updateSize(), this._needsPointShapeUpdate && this.points.updateShape(), this._needsLinksUpdate && this.lines.updatePointsBuffer(), this._needsLinkColorUpdate && this.lines.updateColor(), this._needsLinkWidthUpdate && this.lines.updateWidth(), this._needsLinkArrowUpdate && this.lines.updateArrow(), this._needsForceManyBodyUpdate && ((e = this.forceManyBody) == null || e.create()), this._needsForceLinkUpdate && ((n = this.forceLinkIncoming) == null || n.create(Ms.INCOMING), (r = this.forceLinkOutgoing) == null || r.create(Ms.OUTGOING)), this._needsForceCenterUpdate && ((i = this.forceCenter) == null || i.create()), this._needsPointClusterUpdate && ((o = this.clusters) == null || o.create()), this._needsPointPositionsUpdate = !1, this._needsPointColorUpdate = !1, this._needsPointSizeUpdate = !1, this._needsPointShapeUpdate = !1, this._needsLinksUpdate = !1, this._needsLinkColorUpdate = !1, this._needsLinkWidthUpdate = !1, this._needsLinkArrowUpdate = !1, this._needsPointClusterUpdate = !1, this._needsForceManyBodyUpdate = !1, this._needsForceLinkUpdate = !1, this._needsForceCenterUpdate = !1);
13739
13907
  }
13740
13908
  /**
13741
13909
  * Converts an array of tuple positions to a single array containing all coordinates sequentially
@@ -13880,13 +14048,14 @@ class tb {
13880
14048
  }
13881
14049
  }
13882
14050
  export {
13883
- tb as Graph,
14051
+ nb as Graph,
14052
+ ty as PointShape,
13884
14053
  kg as clamp,
13885
14054
  Sr as getRgbaColor,
13886
14055
  Pg as isAClassInstance,
13887
14056
  Sc as isArray,
13888
14057
  Ag as isFunction,
13889
- wn as isNumber,
14058
+ dn as isNumber,
13890
14059
  Eg as isObject,
13891
14060
  _l as isPlainObject,
13892
14061
  sn as readPixels,