manim-web 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -142,10 +142,10 @@ class st {
142
142
  if (e && (Array.isArray(e) ? i = e : (i = e.axis ?? [0, 0, 1], r = e.aboutPoint)), "_points3D" in this && this._points3D.length > 0) {
143
143
  const n = this._points3D, o = Math.cos(t), a = Math.sin(t);
144
144
  if (!r) {
145
- let u = 1 / 0, d = -1 / 0, f = 1 / 0, g = -1 / 0, m = 1 / 0, p = -1 / 0;
145
+ let u = 1 / 0, d = -1 / 0, f = 1 / 0, g = -1 / 0, p = 1 / 0, m = -1 / 0;
146
146
  for (const _ of n)
147
- _[0] < u && (u = _[0]), _[0] > d && (d = _[0]), _[1] < f && (f = _[1]), _[1] > g && (g = _[1]), _[2] < m && (m = _[2]), _[2] > p && (p = _[2]);
148
- r = [(u + d) / 2, (f + g) / 2, (m + p) / 2];
147
+ _[0] < u && (u = _[0]), _[0] > d && (d = _[0]), _[1] < f && (f = _[1]), _[1] > g && (g = _[1]), _[2] < p && (p = _[2]), _[2] > m && (m = _[2]);
148
+ r = [(u + d) / 2, (f + g) / 2, (p + m) / 2];
149
149
  }
150
150
  const h = r[0], l = r[1], c = r[2];
151
151
  if (i[0] === 0 && i[1] === 0 && i[2] !== 0)
@@ -156,8 +156,8 @@ class st {
156
156
  else {
157
157
  st._tempVec3.set(i[0], i[1], i[2]).normalize(), st._tempQuaternion.setFromAxisAngle(st._tempVec3, t);
158
158
  for (const u of n) {
159
- const d = u[0] - h, f = u[1] - l, g = u[2] - c, m = new S.Vector3(d, f, g);
160
- m.applyQuaternion(st._tempQuaternion), u[0] = h + m.x, u[1] = l + m.y, u[2] = c + m.z;
159
+ const d = u[0] - h, f = u[1] - l, g = u[2] - c, p = new S.Vector3(d, f, g);
160
+ p.applyQuaternion(st._tempQuaternion), u[0] = h + p.x, u[1] = l + p.y, u[2] = c + p.z;
161
161
  }
162
162
  }
163
163
  this._geometryDirty = !0, this._markDirty();
@@ -659,8 +659,8 @@ class st {
659
659
  for (let o = 0; o + 3 < r.length; o += 3) {
660
660
  const a = r[o], h = r[o + 1], l = r[o + 2], c = r[o + 3];
661
661
  for (let u = 0; u < t; u++) {
662
- const d = u / t, f = (u + 1) / t, g = cr(a, h, l, c, d), m = cr(a, h, l, c, f), p = d + (f - d) / 3, _ = d + 2 * (f - d) / 3, y = cr(a, h, l, c, p), x = cr(a, h, l, c, _);
663
- u === 0 && o === 0 && n.push(g), n.push(y, x, m);
662
+ const d = u / t, f = (u + 1) / t, g = cr(a, h, l, c, d), p = cr(a, h, l, c, f), m = d + (f - d) / 3, _ = d + 2 * (f - d) / 3, y = cr(a, h, l, c, m), x = cr(a, h, l, c, _);
663
+ u === 0 && o === 0 && n.push(g), n.push(y, x, p);
664
664
  }
665
665
  }
666
666
  i.setPoints(n);
@@ -1442,9 +1442,9 @@ function lf(s, t, e) {
1442
1442
  te.lerp(Jt, w);
1443
1443
  }
1444
1444
  Jt.applyMatrix4(i), te.applyMatrix4(i), Jt.multiplyScalar(1 / Jt.w), te.multiplyScalar(1 / te.w), Jt.x *= n.x / 2, Jt.y *= n.y / 2, te.x *= n.x / 2, te.y *= n.y / 2, ee.start.copy(Jt), ee.start.z = 0, ee.end.copy(te), ee.end.z = 0;
1445
- const m = ee.closestPointToPointParameter(Nn, !0);
1446
- ee.at(m, oh);
1447
- const p = h0.lerp(Jt.z, te.z, m), _ = p >= -1 && p <= 1, y = Nn.distanceTo(oh) < Ki * 0.5;
1445
+ const p = ee.closestPointToPointParameter(Nn, !0);
1446
+ ee.at(p, oh);
1447
+ const m = h0.lerp(Jt.z, te.z, p), _ = m >= -1 && m <= 1, y = Nn.distanceTo(oh) < Ki * 0.5;
1448
1448
  if (_ && y) {
1449
1449
  ee.start.fromBufferAttribute(h, d), ee.end.fromBufferAttribute(l, d), ee.start.applyMatrix4(o), ee.end.applyMatrix4(o);
1450
1450
  const x = new Ft(), w = new Ft();
@@ -1888,14 +1888,14 @@ class Is {
1888
1888
  n
1889
1889
  ], l = Math.floor((t.length - 1) / 3), c = i ?? e;
1890
1890
  for (let u = 0; u < l; u++) {
1891
- const d = u * 3, f = l > 1 ? u / (l - 1) : 0, g = l > 1 ? (u + 1) / (l - 1) : 1, m = e + (c - e) * f, p = e + (c - e) * Math.min(g, 1);
1891
+ const d = u * 3, f = l > 1 ? u / (l - 1) : 0, g = l > 1 ? (u + 1) / (l - 1) : 1, p = e + (c - e) * f, m = e + (c - e) * Math.min(g, 1);
1892
1892
  o.push({
1893
1893
  p0: t[d],
1894
1894
  p1: t[d + 1],
1895
1895
  p2: t[d + 2],
1896
1896
  p3: t[d + 3],
1897
- widthStart: m,
1898
- widthEnd: p,
1897
+ widthStart: p,
1898
+ widthEnd: m,
1899
1899
  color: h
1900
1900
  });
1901
1901
  }
@@ -1920,8 +1920,8 @@ class Is {
1920
1920
  i.instanceCount = e, i.setAttribute("aQuadUV", new S.BufferAttribute(mf, 2));
1921
1921
  const r = new Float32Array(e * 3), n = new Float32Array(e * 3), o = new Float32Array(e * 3), a = new Float32Array(e * 3), h = new Float32Array(e), l = new Float32Array(e), c = new Float32Array(e * 4);
1922
1922
  for (let d = 0; d < e; d++) {
1923
- const f = t[d], g = d * 3, m = d * 4;
1924
- r[g] = f.p0[0], r[g + 1] = f.p0[1], r[g + 2] = f.p0[2] ?? 0, n[g] = f.p1[0], n[g + 1] = f.p1[1], n[g + 2] = f.p1[2] ?? 0, o[g] = f.p2[0], o[g + 1] = f.p2[1], o[g + 2] = f.p2[2] ?? 0, a[g] = f.p3[0], a[g + 1] = f.p3[1], a[g + 2] = f.p3[2] ?? 0, h[d] = f.widthStart, l[d] = f.widthEnd, c[m] = f.color[0], c[m + 1] = f.color[1], c[m + 2] = f.color[2], c[m + 3] = f.color[3];
1923
+ const f = t[d], g = d * 3, p = d * 4;
1924
+ r[g] = f.p0[0], r[g + 1] = f.p0[1], r[g + 2] = f.p0[2] ?? 0, n[g] = f.p1[0], n[g + 1] = f.p1[1], n[g + 2] = f.p1[2] ?? 0, o[g] = f.p2[0], o[g + 1] = f.p2[1], o[g + 2] = f.p2[2] ?? 0, a[g] = f.p3[0], a[g + 1] = f.p3[1], a[g + 2] = f.p3[2] ?? 0, h[d] = f.widthStart, l[d] = f.widthEnd, c[p] = f.color[0], c[p + 1] = f.color[1], c[p + 2] = f.color[2], c[p + 3] = f.color[3];
1925
1925
  }
1926
1926
  i.setAttribute("aP0", new S.InstancedBufferAttribute(r, 3)), i.setAttribute("aP1", new S.InstancedBufferAttribute(n, 3)), i.setAttribute("aP2", new S.InstancedBufferAttribute(o, 3)), i.setAttribute("aP3", new S.InstancedBufferAttribute(a, 3)), i.setAttribute("aWidthStart", new S.InstancedBufferAttribute(h, 1)), i.setAttribute("aWidthEnd", new S.InstancedBufferAttribute(l, 1)), i.setAttribute("aColor", new S.InstancedBufferAttribute(c, 4));
1927
1927
  const u = new S.Mesh(i, this._material);
@@ -1967,8 +1967,8 @@ class Is {
1967
1967
  t.visible = !0;
1968
1968
  const n = i.getAttribute("aP0"), o = i.getAttribute("aP1"), a = i.getAttribute("aP2"), h = i.getAttribute("aP3"), l = i.getAttribute("aWidthStart"), c = i.getAttribute("aWidthEnd"), u = i.getAttribute("aColor");
1969
1969
  for (let d = 0; d < r; d++) {
1970
- const f = e[d], g = d * 3, m = d * 4;
1971
- n.array[g] = f.p0[0], n.array[g + 1] = f.p0[1], n.array[g + 2] = f.p0[2] ?? 0, o.array[g] = f.p1[0], o.array[g + 1] = f.p1[1], o.array[g + 2] = f.p1[2] ?? 0, a.array[g] = f.p2[0], a.array[g + 1] = f.p2[1], a.array[g + 2] = f.p2[2] ?? 0, h.array[g] = f.p3[0], h.array[g + 1] = f.p3[1], h.array[g + 2] = f.p3[2] ?? 0, l.array[d] = f.widthStart, c.array[d] = f.widthEnd, u.array[m] = f.color[0], u.array[m + 1] = f.color[1], u.array[m + 2] = f.color[2], u.array[m + 3] = f.color[3];
1970
+ const f = e[d], g = d * 3, p = d * 4;
1971
+ n.array[g] = f.p0[0], n.array[g + 1] = f.p0[1], n.array[g + 2] = f.p0[2] ?? 0, o.array[g] = f.p1[0], o.array[g + 1] = f.p1[1], o.array[g + 2] = f.p1[2] ?? 0, a.array[g] = f.p2[0], a.array[g + 1] = f.p2[1], a.array[g + 2] = f.p2[2] ?? 0, h.array[g] = f.p3[0], h.array[g + 1] = f.p3[1], h.array[g + 2] = f.p3[2] ?? 0, l.array[d] = f.widthStart, c.array[d] = f.widthEnd, u.array[p] = f.color[0], u.array[p + 1] = f.color[1], u.array[p + 2] = f.color[2], u.array[p + 3] = f.color[3];
1972
1972
  }
1973
1973
  return n.needsUpdate = !0, o.needsUpdate = !0, a.needsUpdate = !0, h.needsUpdate = !0, l.needsUpdate = !0, c.needsUpdate = !0, u.needsUpdate = !0, t;
1974
1974
  }
@@ -2060,18 +2060,18 @@ function _f(s) {
2060
2060
  function vf(s, t, e, i) {
2061
2061
  const r = s.prev, n = s, o = s.next;
2062
2062
  if (Wt(r, n, o) >= 0) return !1;
2063
- const a = r.x, h = n.x, l = o.x, c = r.y, u = n.y, d = o.y, f = Math.min(a, h, l), g = Math.min(c, u, d), m = Math.max(a, h, l), p = Math.max(c, u, d), _ = wo(f, g, t, e, i), y = wo(m, p, t, e, i);
2063
+ const a = r.x, h = n.x, l = o.x, c = r.y, u = n.y, d = o.y, f = Math.min(a, h, l), g = Math.min(c, u, d), p = Math.max(a, h, l), m = Math.max(c, u, d), _ = wo(f, g, t, e, i), y = wo(p, m, t, e, i);
2064
2064
  let x = s.prevZ, w = s.nextZ;
2065
2065
  for (; x && x.z >= _ && w && w.z <= y; ) {
2066
- if (x.x >= f && x.x <= m && x.y >= g && x.y <= p && x !== r && x !== o && Ds(a, c, h, u, l, d, x.x, x.y) && Wt(x.prev, x, x.next) >= 0 || (x = x.prevZ, w.x >= f && w.x <= m && w.y >= g && w.y <= p && w !== r && w !== o && Ds(a, c, h, u, l, d, w.x, w.y) && Wt(w.prev, w, w.next) >= 0)) return !1;
2066
+ if (x.x >= f && x.x <= p && x.y >= g && x.y <= m && x !== r && x !== o && Ds(a, c, h, u, l, d, x.x, x.y) && Wt(x.prev, x, x.next) >= 0 || (x = x.prevZ, w.x >= f && w.x <= p && w.y >= g && w.y <= m && w !== r && w !== o && Ds(a, c, h, u, l, d, w.x, w.y) && Wt(w.prev, w, w.next) >= 0)) return !1;
2067
2067
  w = w.nextZ;
2068
2068
  }
2069
2069
  for (; x && x.z >= _; ) {
2070
- if (x.x >= f && x.x <= m && x.y >= g && x.y <= p && x !== r && x !== o && Ds(a, c, h, u, l, d, x.x, x.y) && Wt(x.prev, x, x.next) >= 0) return !1;
2070
+ if (x.x >= f && x.x <= p && x.y >= g && x.y <= m && x !== r && x !== o && Ds(a, c, h, u, l, d, x.x, x.y) && Wt(x.prev, x, x.next) >= 0) return !1;
2071
2071
  x = x.prevZ;
2072
2072
  }
2073
2073
  for (; w && w.z <= y; ) {
2074
- if (w.x >= f && w.x <= m && w.y >= g && w.y <= p && w !== r && w !== o && Ds(a, c, h, u, l, d, w.x, w.y) && Wt(w.prev, w, w.next) >= 0) return !1;
2074
+ if (w.x >= f && w.x <= p && w.y >= g && w.y <= m && w !== r && w !== o && Ds(a, c, h, u, l, d, w.x, w.y) && Wt(w.prev, w, w.next) >= 0) return !1;
2075
2075
  w = w.nextZ;
2076
2076
  }
2077
2077
  return !0;
@@ -2884,9 +2884,9 @@ class B extends st {
2884
2884
  if (h.length >= 3) {
2885
2885
  const c = h[0], u = h[h.length - 1], d = c[0] - u[0], f = c[1] - u[1], g = c[2] - u[2];
2886
2886
  if (d * d + f * f + g * g < 1e-6) {
2887
- const m = Math.min(2, h.length - 1);
2888
- for (let p = 1; p <= m; p++) {
2889
- const _ = h[p];
2887
+ const p = Math.min(2, h.length - 1);
2888
+ for (let m = 1; m <= p; m++) {
2889
+ const _ = h[m];
2890
2890
  l.push(_[0], _[1], _[2]);
2891
2891
  }
2892
2892
  }
@@ -2923,12 +2923,12 @@ class B extends st {
2923
2923
  return;
2924
2924
  }
2925
2925
  const i = [e[0]];
2926
- for (let p = 1; p < e.length; p++) {
2927
- const _ = i[i.length - 1], y = e[p][0] - _[0], x = e[p][1] - _[1], w = e[p][2] - _[2];
2928
- y * y + x * x + w * w > 1e-8 && i.push(e[p]);
2926
+ for (let m = 1; m < e.length; m++) {
2927
+ const _ = i[i.length - 1], y = e[m][0] - _[0], x = e[m][1] - _[1], w = e[m][2] - _[2];
2928
+ y * y + x * x + w * w > 1e-8 && i.push(e[m]);
2929
2929
  }
2930
2930
  if (i.length >= 2) {
2931
- const p = i[0], _ = i[i.length - 1], y = p[0] - _[0], x = p[1] - _[1], w = p[2] - _[2];
2931
+ const m = i[0], _ = i[i.length - 1], y = m[0] - _[0], x = m[1] - _[1], w = m[2] - _[2];
2932
2932
  y * y + x * x + w * w < 1e-6 && i.pop();
2933
2933
  }
2934
2934
  const r = i.length;
@@ -2937,23 +2937,23 @@ class B extends st {
2937
2937
  return;
2938
2938
  }
2939
2939
  t.updateWorldMatrix(!0, !1);
2940
- const n = t.matrixWorld, o = new S.Matrix4().copy(n).invert(), a = new S.Vector3(), h = i.map((p) => (a.set(p[0], p[1], p[2]).applyMatrix4(n), [a.x, a.y, a.z])), l = this.strokeWidth * 5e-3;
2940
+ const n = t.matrixWorld, o = new S.Matrix4().copy(n).invert(), a = new S.Vector3(), h = i.map((m) => (a.set(m[0], m[1], m[2]).applyMatrix4(n), [a.x, a.y, a.z])), l = this.strokeWidth * 5e-3;
2941
2941
  let c = 0;
2942
- for (let p = 0; p < r; p++) {
2943
- const _ = (p + 1) % r;
2944
- c += h[p][0] * h[_][1] - h[_][0] * h[p][1];
2942
+ for (let m = 0; m < r; m++) {
2943
+ const _ = (m + 1) % r;
2944
+ c += h[m][0] * h[_][1] - h[_][0] * h[m][1];
2945
2945
  }
2946
2946
  const u = c < 0 ? 1 : -1, d = [];
2947
- for (let p = 0; p < r; p++) {
2948
- const _ = h[(p - 1 + r) % r], y = h[p], x = h[(p + 1) % r], w = y[0] - _[0], M = y[1] - _[1], C = x[0] - y[0], P = x[1] - y[1], R = Math.sqrt(w * w + M * M) || 1, O = Math.sqrt(C * C + P * P) || 1, z = u * (-M / R), I = u * (w / R), W = u * (-P / O), H = u * (C / O);
2947
+ for (let m = 0; m < r; m++) {
2948
+ const _ = h[(m - 1 + r) % r], y = h[m], x = h[(m + 1) % r], w = y[0] - _[0], M = y[1] - _[1], C = x[0] - y[0], P = x[1] - y[1], R = Math.sqrt(w * w + M * M) || 1, O = Math.sqrt(C * C + P * P) || 1, z = u * (-M / R), I = u * (w / R), W = u * (-P / O), H = u * (C / O);
2949
2949
  let N = z + W, q = I + H;
2950
2950
  const rt = Math.sqrt(N * N + q * q);
2951
2951
  rt > 1e-10 ? (N /= rt, q /= rt) : (N = z, q = I);
2952
2952
  const ht = z * N + I * q, ot = (ht > 0.1 ? l / ht : l * 2) + 5e-3;
2953
2953
  d.push(y[0] + N * ot, y[1] + q * ot, y[2]);
2954
2954
  }
2955
- for (let p = 0; p < r; p++) {
2956
- const _ = h[(p - 1 + r) % r], y = h[p], x = h[(p + 1) % r], w = y[0] - _[0], M = y[1] - _[1], C = x[0] - y[0], P = x[1] - y[1], R = Math.sqrt(w * w + M * M) || 1, O = Math.sqrt(C * C + P * P) || 1, z = u * (-M / R), I = u * (w / R), W = u * (-P / O), H = u * (C / O);
2955
+ for (let m = 0; m < r; m++) {
2956
+ const _ = h[(m - 1 + r) % r], y = h[m], x = h[(m + 1) % r], w = y[0] - _[0], M = y[1] - _[1], C = x[0] - y[0], P = x[1] - y[1], R = Math.sqrt(w * w + M * M) || 1, O = Math.sqrt(C * C + P * P) || 1, z = u * (-M / R), I = u * (w / R), W = u * (-P / O), H = u * (C / O);
2957
2957
  let N = z + W, q = I + H;
2958
2958
  const rt = Math.sqrt(N * N + q * q);
2959
2959
  rt > 1e-10 ? (N /= rt, q /= rt) : (N = z, q = I);
@@ -2961,21 +2961,21 @@ class B extends st {
2961
2961
  d.push(y[0] - N * ot, y[1] - q * ot, y[2]);
2962
2962
  }
2963
2963
  const f = [];
2964
- for (let p = 0; p < d.length; p += 3)
2965
- a.set(d[p], d[p + 1], d[p + 2]).applyMatrix4(o), f.push(a.x, a.y, a.z);
2964
+ for (let m = 0; m < d.length; m += 3)
2965
+ a.set(d[m], d[m + 1], d[m + 2]).applyMatrix4(o), f.push(a.x, a.y, a.z);
2966
2966
  const g = [];
2967
- for (let p = 0; p < r; p++) {
2968
- const _ = (p + 1) % r;
2969
- g.push(p, _, r + _), g.push(p, r + _, r + p);
2967
+ for (let m = 0; m < r; m++) {
2968
+ const _ = (m + 1) % r;
2969
+ g.push(m, _, r + _), g.push(m, r + _, r + m);
2970
2970
  }
2971
- const m = new S.BufferGeometry();
2972
- m.setAttribute("position", new S.Float32BufferAttribute(f, 3)), m.setIndex(g), this._cachedStrokeMesh ? (this._cachedStrokeMesh.geometry.dispose(), this._cachedStrokeMesh.geometry = m, this._strokeMeshMaterial && (this._strokeMeshMaterial.color.set(this.color), this._strokeMeshMaterial.opacity = this._opacity, this._strokeMeshMaterial.transparent = this._opacity < 1)) : (this._strokeMeshMaterial = this._strokeMeshMaterial || new S.MeshBasicMaterial({
2971
+ const p = new S.BufferGeometry();
2972
+ p.setAttribute("position", new S.Float32BufferAttribute(f, 3)), p.setIndex(g), this._cachedStrokeMesh ? (this._cachedStrokeMesh.geometry.dispose(), this._cachedStrokeMesh.geometry = p, this._strokeMeshMaterial && (this._strokeMeshMaterial.color.set(this.color), this._strokeMeshMaterial.opacity = this._opacity, this._strokeMeshMaterial.transparent = this._opacity < 1)) : (this._strokeMeshMaterial = this._strokeMeshMaterial || new S.MeshBasicMaterial({
2973
2973
  color: new S.Color(this.color),
2974
2974
  side: S.DoubleSide,
2975
2975
  depthTest: !1,
2976
2976
  transparent: this._opacity < 1,
2977
2977
  opacity: this._opacity
2978
- }), this._strokeMeshMaterial.color.set(this.color), this._strokeMeshMaterial.opacity = this._opacity, this._strokeMeshMaterial.transparent = this._opacity < 1, this._cachedStrokeMesh = new S.Mesh(m, this._strokeMeshMaterial), this._cachedStrokeMesh.frustumCulled = !1, t.add(this._cachedStrokeMesh));
2978
+ }), this._strokeMeshMaterial.color.set(this.color), this._strokeMeshMaterial.opacity = this._opacity, this._strokeMeshMaterial.transparent = this._opacity < 1, this._cachedStrokeMesh = new S.Mesh(p, this._strokeMeshMaterial), this._cachedStrokeMesh.frustumCulled = !1, t.add(this._cachedStrokeMesh));
2979
2979
  }
2980
2980
  /**
2981
2981
  * Remove the cached mesh-based stroke ring.
@@ -3377,8 +3377,8 @@ class Mt extends B {
3377
3377
  }
3378
3378
  const l = a + i, c = h + r;
3379
3379
  for (let u = 0; u < n; u++) {
3380
- const d = Math.floor(u / e), f = u % e, g = this.children[u], m = f * l, p = -d * c;
3381
- g.moveTo([m, p, g.position.z]);
3380
+ const d = Math.floor(u / e), f = u % e, g = this.children[u], p = f * l, m = -d * c;
3381
+ g.moveTo([p, m, g.position.z]);
3382
3382
  }
3383
3383
  return this.moveTo(o), this._markDirty(), this;
3384
3384
  }
@@ -5096,8 +5096,8 @@ class sa {
5096
5096
  d.push(t.getChannelData(g));
5097
5097
  let f = h;
5098
5098
  for (let g = 0; g < r; g++)
5099
- for (let m = 0; m < e; m++) {
5100
- const p = Math.max(-1, Math.min(1, d[m][g])), _ = p < 0 ? p * 32768 : p * 32767;
5099
+ for (let p = 0; p < e; p++) {
5100
+ const m = Math.max(-1, Math.min(1, d[p][g])), _ = m < 0 ? m * 32768 : m * 32767;
5101
5101
  u.setInt16(f, _, !0), f += 2;
5102
5102
  }
5103
5103
  return new Blob([c], { type: "audio/wav" });
@@ -5129,15 +5129,15 @@ class sa {
5129
5129
  if (a.gain.value = r.gain, r.fadeIn > 0) {
5130
5130
  const d = r.startTime, f = r.startTime + r.fadeIn;
5131
5131
  if (i < f) {
5132
- const g = e + Math.max(0, d - i), m = e + (f - i);
5133
- a.gain.setValueAtTime(0, g), a.gain.linearRampToValueAtTime(r.gain, m);
5132
+ const g = e + Math.max(0, d - i), p = e + (f - i);
5133
+ a.gain.setValueAtTime(0, g), a.gain.linearRampToValueAtTime(r.gain, p);
5134
5134
  }
5135
5135
  }
5136
5136
  if (r.fadeOut > 0) {
5137
5137
  const d = r.startTime + r.duration - r.fadeOut, f = r.startTime + r.duration;
5138
5138
  if (i < f) {
5139
- const g = e + Math.max(0, d - i), m = e + (f - i);
5140
- a.gain.setValueAtTime(r.gain, g), a.gain.linearRampToValueAtTime(0, m);
5139
+ const g = e + Math.max(0, d - i), p = e + (f - i);
5140
+ a.gain.setValueAtTime(r.gain, g), a.gain.linearRampToValueAtTime(0, p);
5141
5141
  }
5142
5142
  }
5143
5143
  o.connect(a), a.connect(this._masterGain);
@@ -7188,22 +7188,22 @@ class Qs extends ze {
7188
7188
  if (c === 0)
7189
7189
  return;
7190
7190
  const u = a / c, d = h / c, f = l / c;
7191
- let g, m, p;
7191
+ let g, p, m;
7192
7192
  if (Math.abs(f) > 0.99)
7193
- g = 1, m = 0, p = 0;
7193
+ g = 1, p = 0, m = 0;
7194
7194
  else {
7195
- g = -d, m = u, p = 0;
7196
- const C = Math.sqrt(g * g + m * m);
7197
- g /= C, m /= C;
7195
+ g = -d, p = u, m = 0;
7196
+ const C = Math.sqrt(g * g + p * p);
7197
+ g /= C, p /= C;
7198
7198
  }
7199
7199
  const _ = r - u * this._tipLength, y = n - d * this._tipLength, x = o - f * this._tipLength, w = [
7200
7200
  _ + g * this._tipWidth,
7201
- y + m * this._tipWidth,
7202
- x + p * this._tipWidth
7201
+ y + p * this._tipWidth,
7202
+ x + m * this._tipWidth
7203
7203
  ], M = [
7204
7204
  _ - g * this._tipWidth,
7205
- y - m * this._tipWidth,
7206
- x - p * this._tipWidth
7205
+ y - p * this._tipWidth,
7206
+ x - m * this._tipWidth
7207
7207
  ];
7208
7208
  this._shaft = new dn(
7209
7209
  [t, e, i],
@@ -7330,15 +7330,15 @@ class k0 extends ze {
7330
7330
  if (c === 0)
7331
7331
  return;
7332
7332
  const u = a / c, d = h / c, f = l / c;
7333
- let g, m, p;
7333
+ let g, p, m;
7334
7334
  if (Math.abs(f) > 0.99)
7335
- g = 1, m = 0, p = 0;
7335
+ g = 1, p = 0, m = 0;
7336
7336
  else {
7337
- g = -d, m = u, p = 0;
7338
- const N = Math.sqrt(g * g + m * m);
7339
- g /= N, m /= N;
7337
+ g = -d, p = u, m = 0;
7338
+ const N = Math.sqrt(g * g + p * p);
7339
+ g /= N, p /= N;
7340
7340
  }
7341
- const _ = r - u * this._tipLength, y = n - d * this._tipLength, x = o - f * this._tipLength, w = t + u * this._tipLength, M = e + d * this._tipLength, C = i + f * this._tipLength, P = [_ + g * this._tipWidth, y + m * this._tipWidth, x + p * this._tipWidth], R = [_ - g * this._tipWidth, y - m * this._tipWidth, x - p * this._tipWidth], O = [w + g * this._tipWidth, M + m * this._tipWidth, C + p * this._tipWidth], z = [w - g * this._tipWidth, M - m * this._tipWidth, C - p * this._tipWidth], I = new dn(
7341
+ const _ = r - u * this._tipLength, y = n - d * this._tipLength, x = o - f * this._tipLength, w = t + u * this._tipLength, M = e + d * this._tipLength, C = i + f * this._tipLength, P = [_ + g * this._tipWidth, y + p * this._tipWidth, x + m * this._tipWidth], R = [_ - g * this._tipWidth, y - p * this._tipWidth, x - m * this._tipWidth], O = [w + g * this._tipWidth, M + p * this._tipWidth, C + m * this._tipWidth], z = [w - g * this._tipWidth, M - p * this._tipWidth, C - m * this._tipWidth], I = new dn(
7342
7342
  [w, M, C],
7343
7343
  [_, y, x],
7344
7344
  this._color,
@@ -7408,8 +7408,8 @@ class ve extends B {
7408
7408
  */
7409
7409
  _generatePoints() {
7410
7410
  const t = this._width / 2, e = this._height / 2, [i, r, n] = this._centerPoint, o = [i - t, r + e, n], a = [i + t, r + e, n], h = [i + t, r - e, n], l = [i - t, r - e, n], c = [], u = (d, f) => {
7411
- const g = f[0] - d[0], m = f[1] - d[1], p = f[2] - d[2];
7412
- c.length > 0 ? (c.push([d[0] + g / 3, d[1] + m / 3, d[2] + p / 3]), c.push([d[0] + 2 * g / 3, d[1] + 2 * m / 3, d[2] + 2 * p / 3]), c.push([...f])) : (c.push([...d]), c.push([d[0] + g / 3, d[1] + m / 3, d[2] + p / 3]), c.push([d[0] + 2 * g / 3, d[1] + 2 * m / 3, d[2] + 2 * p / 3]), c.push([...f]));
7411
+ const g = f[0] - d[0], p = f[1] - d[1], m = f[2] - d[2];
7412
+ c.length > 0 ? (c.push([d[0] + g / 3, d[1] + p / 3, d[2] + m / 3]), c.push([d[0] + 2 * g / 3, d[1] + 2 * p / 3, d[2] + 2 * m / 3]), c.push([...f])) : (c.push([...d]), c.push([d[0] + g / 3, d[1] + p / 3, d[2] + m / 3]), c.push([d[0] + 2 * g / 3, d[1] + 2 * p / 3, d[2] + 2 * m / 3]), c.push([...f]));
7413
7413
  };
7414
7414
  u(o, a), u(a, h), u(h, l), u(l, o), this.setPoints3D(c);
7415
7415
  }
@@ -7693,9 +7693,9 @@ class bx extends vs {
7693
7693
  const a = e.phi, h = e.theta, l = e.distance;
7694
7694
  return new Promise((c) => {
7695
7695
  const u = performance.now();
7696
- let d = u, f = null, g = null, m = !1;
7697
- const p = (y) => {
7698
- if (m) return;
7696
+ let d = u, f = null, g = null, p = !1;
7697
+ const m = (y) => {
7698
+ if (p) return;
7699
7699
  const x = (y - u) / 1e3, w = Math.min(1, x / o), M = w * w * (3 - 2 * w), C = a + (i - a) * M, P = h + (r - h) * M, R = l + (n - l) * M;
7700
7700
  this._camera3D.orbit(C, P, R);
7701
7701
  const O = (y - d) / 1e3;
@@ -7703,16 +7703,16 @@ class bx extends vs {
7703
7703
  for (const z of this.mobjects)
7704
7704
  z.update(O);
7705
7705
  if (this._render(), w >= 1) {
7706
- m = !0, f !== null && cancelAnimationFrame(f), g !== null && clearInterval(g), c();
7706
+ p = !0, f !== null && cancelAnimationFrame(f), g !== null && clearInterval(g), c();
7707
7707
  return;
7708
7708
  }
7709
7709
  }, _ = (y) => {
7710
- p(y), m || (f = requestAnimationFrame(_));
7710
+ m(y), p || (f = requestAnimationFrame(_));
7711
7711
  };
7712
7712
  f = requestAnimationFrame(_), g = setInterval(() => {
7713
- if (m) return;
7713
+ if (p) return;
7714
7714
  const y = performance.now();
7715
- y - d > 200 && p(y);
7715
+ y - d > 200 && m(y);
7716
7716
  }, 100);
7717
7717
  });
7718
7718
  }
@@ -7959,7 +7959,7 @@ class wx extends vs {
7959
7959
  l,
7960
7960
  u
7961
7961
  );
7962
- const f = e.displayCorner ?? [1, 1, 0], g = e.displayCornerBuff ?? 0.5, m = this.camera.frameWidth, p = this.camera.frameHeight, _ = f[0] !== 0 ? f[0] * (m / 2 - g - i / 2) : 0, y = f[1] !== 0 ? f[1] * (p / 2 - g - r / 2) : 0;
7962
+ const f = e.displayCorner ?? [1, 1, 0], g = e.displayCornerBuff ?? 0.5, p = this.camera.frameWidth, m = this.camera.frameHeight, _ = f[0] !== 0 ? f[0] * (p / 2 - g - i / 2) : 0, y = f[1] !== 0 ? f[1] * (m / 2 - g - r / 2) : 0;
7963
7963
  this._displayDefaultPos = [_, y, 0], this.zoomedDisplay.moveTo(this._displayDefaultPos);
7964
7964
  }
7965
7965
  /** Check if zooming is active */
@@ -8648,8 +8648,8 @@ class mn extends B {
8648
8648
  _generatePoints() {
8649
8649
  const t = [], [e, i, r] = this._arcCenter, n = this._radius, o = this._angle, a = Math.max(1, Math.ceil(Math.abs(o) / (Math.PI / 2) * (this._numComponents / 4))), h = o / a, l = 4 / 3 * Math.tan(h / 4);
8650
8650
  for (let c = 0; c < a; c++) {
8651
- const u = this._startAngle + c * h, d = this._startAngle + (c + 1) * h, f = e + n * Math.cos(u), g = i + n * Math.sin(u), m = e + n * Math.cos(d), p = i + n * Math.sin(d), _ = -Math.sin(u), y = Math.cos(u), x = f + l * n * _, w = g + l * n * y, M = -Math.sin(d), C = Math.cos(d), P = m - l * n * M, R = p - l * n * C;
8652
- c === 0 && t.push([f, g, r]), t.push([x, w, r]), t.push([P, R, r]), t.push([m, p, r]);
8651
+ const u = this._startAngle + c * h, d = this._startAngle + (c + 1) * h, f = e + n * Math.cos(u), g = i + n * Math.sin(u), p = e + n * Math.cos(d), m = i + n * Math.sin(d), _ = -Math.sin(u), y = Math.cos(u), x = f + l * n * _, w = g + l * n * y, M = -Math.sin(d), C = Math.cos(d), P = p - l * n * M, R = m - l * n * C;
8652
+ c === 0 && t.push([f, g, r]), t.push([x, w, r]), t.push([P, R, r]), t.push([p, m, r]);
8653
8653
  }
8654
8654
  this.setPoints3D(t);
8655
8655
  }
@@ -8803,9 +8803,9 @@ class To extends mn {
8803
8803
  startAngle: 0
8804
8804
  };
8805
8805
  const c = Math.abs(i) / 2, u = l / Math.sin(c), d = u * Math.cos(c), f = 2 * l;
8806
- let g = -h / f, m = a / f;
8807
- i > 0 && (g = -g, m = -m);
8808
- const p = r + d * g, _ = n + d * m, y = [p, _, o], x = Math.atan2(t[1] - _, t[0] - p);
8806
+ let g = -h / f, p = a / f;
8807
+ i > 0 && (g = -g, p = -p);
8808
+ const m = r + d * g, _ = n + d * p, y = [m, _, o], x = Math.atan2(t[1] - _, t[0] - m);
8809
8809
  return { center: y, radius: u, startAngle: x };
8810
8810
  }
8811
8811
  /**
@@ -9062,22 +9062,22 @@ class P0 extends B {
9062
9062
  * Generate the annular sector points.
9063
9063
  */
9064
9064
  _generatePoints() {
9065
- const [t, e, i] = this._centerPoint, r = [], n = Math.max(1, Math.ceil(Math.abs(this._angle) / (Math.PI / 2) * (this._numComponents / 4))), o = this._angle / n, a = 4 / 3 * Math.tan(o / 4), h = (m, p, _, y) => {
9066
- const x = t + m * Math.cos(p), w = e + m * Math.sin(p), M = t + m * Math.cos(_), C = e + m * Math.sin(_), P = -Math.sin(p), R = Math.cos(p), O = x + a * m * P, z = w + a * m * R, I = -Math.sin(_), W = Math.cos(_), H = M - a * m * I, N = C - a * m * W;
9065
+ const [t, e, i] = this._centerPoint, r = [], n = Math.max(1, Math.ceil(Math.abs(this._angle) / (Math.PI / 2) * (this._numComponents / 4))), o = this._angle / n, a = 4 / 3 * Math.tan(o / 4), h = (p, m, _, y) => {
9066
+ const x = t + p * Math.cos(m), w = e + p * Math.sin(m), M = t + p * Math.cos(_), C = e + p * Math.sin(_), P = -Math.sin(m), R = Math.cos(m), O = x + a * p * P, z = w + a * p * R, I = -Math.sin(_), W = Math.cos(_), H = M - a * p * I, N = C - a * p * W;
9067
9067
  y && r.push([x, w, i]), r.push([O, z, i]), r.push([H, N, i]), r.push([M, C, i]);
9068
- }, l = (m, p) => {
9069
- const _ = p[0] - m[0], y = p[1] - m[1];
9070
- r.push([m[0] + _ / 3, m[1] + y / 3, i]), r.push([m[0] + 2 * _ / 3, m[1] + 2 * y / 3, i]), r.push([...p]);
9068
+ }, l = (p, m) => {
9069
+ const _ = m[0] - p[0], y = m[1] - p[1];
9070
+ r.push([p[0] + _ / 3, p[1] + y / 3, i]), r.push([p[0] + 2 * _ / 3, p[1] + 2 * y / 3, i]), r.push([...m]);
9071
9071
  };
9072
- for (let m = 0; m < n; m++) {
9073
- const p = this._startAngle + m * o, _ = this._startAngle + (m + 1) * o;
9074
- h(this._outerRadius, p, _, m === 0);
9072
+ for (let p = 0; p < n; p++) {
9073
+ const m = this._startAngle + p * o, _ = this._startAngle + (p + 1) * o;
9074
+ h(this._outerRadius, m, _, p === 0);
9075
9075
  }
9076
9076
  const c = this._startAngle + this._angle, u = [t + this._outerRadius * Math.cos(c), e + this._outerRadius * Math.sin(c), i], d = [t + this._innerRadius * Math.cos(c), e + this._innerRadius * Math.sin(c), i];
9077
9077
  l(u, d);
9078
- for (let m = n - 1; m >= 0; m--) {
9079
- const p = this._startAngle + (m + 1) * o, _ = this._startAngle + m * o;
9080
- h(this._innerRadius, p, _, !1);
9078
+ for (let p = n - 1; p >= 0; p--) {
9079
+ const m = this._startAngle + (p + 1) * o, _ = this._startAngle + p * o;
9080
+ h(this._innerRadius, m, _, !1);
9081
9081
  }
9082
9082
  const f = [t + this._innerRadius * Math.cos(this._startAngle), e + this._innerRadius * Math.sin(this._startAngle), i], g = [t + this._outerRadius * Math.cos(this._startAngle), e + this._outerRadius * Math.sin(this._startAngle), i];
9083
9083
  l(f, g), this.setPoints3D(r);
@@ -9191,8 +9191,8 @@ class A0 extends B {
9191
9191
  r.push([t, e, i]);
9192
9192
  const l = h[0] - t, c = h[1] - e;
9193
9193
  r.push([t + l / 3, e + c / 3, i]), r.push([t + 2 * l / 3, e + 2 * c / 3, i]), r.push([...h]);
9194
- for (let m = 0; m < n; m++) {
9195
- const p = this._startAngle + m * o, _ = this._startAngle + (m + 1) * o, y = t + this._radius * Math.cos(p), x = e + this._radius * Math.sin(p), w = t + this._radius * Math.cos(_), M = e + this._radius * Math.sin(_), C = -Math.sin(p), P = Math.cos(p), R = y + a * this._radius * C, O = x + a * this._radius * P, z = -Math.sin(_), I = Math.cos(_), W = w - a * this._radius * z, H = M - a * this._radius * I;
9194
+ for (let p = 0; p < n; p++) {
9195
+ const m = this._startAngle + p * o, _ = this._startAngle + (p + 1) * o, y = t + this._radius * Math.cos(m), x = e + this._radius * Math.sin(m), w = t + this._radius * Math.cos(_), M = e + this._radius * Math.sin(_), C = -Math.sin(m), P = Math.cos(m), R = y + a * this._radius * C, O = x + a * this._radius * P, z = -Math.sin(_), I = Math.cos(_), W = w - a * this._radius * z, H = M - a * this._radius * I;
9196
9196
  r.push([R, O, i]), r.push([W, H, i]), r.push([w, M, i]);
9197
9197
  }
9198
9198
  const u = this._startAngle + this._angle, d = [
@@ -9315,10 +9315,10 @@ class D0 extends B {
9315
9315
  const n = [], o = (t[0] + e[0]) / 2, a = (t[1] + e[1]) / 2, h = (t[2] + e[2]) / 2, l = e[0] - t[0], c = e[1] - t[1], u = Math.sqrt(l * l + c * c) / 2;
9316
9316
  if (u < 1e-10)
9317
9317
  return n.push([...t]), n;
9318
- const d = Math.abs(i) / 2, f = u / Math.sin(d), g = f * Math.cos(d), m = 2 * u;
9319
- let p = -c / m, _ = l / m;
9320
- i > 0 && (p = -p, _ = -_);
9321
- const y = o + g * p, x = a + g * _, w = Math.atan2(t[1] - x, t[0] - y), M = Math.max(1, Math.ceil(Math.abs(i) / (Math.PI / 2) * (r / 4))), C = i / M, P = 4 / 3 * Math.tan(C / 4);
9318
+ const d = Math.abs(i) / 2, f = u / Math.sin(d), g = f * Math.cos(d), p = 2 * u;
9319
+ let m = -c / p, _ = l / p;
9320
+ i > 0 && (m = -m, _ = -_);
9321
+ const y = o + g * m, x = a + g * _, w = Math.atan2(t[1] - x, t[0] - y), M = Math.max(1, Math.ceil(Math.abs(i) / (Math.PI / 2) * (r / 4))), C = i / M, P = 4 / 3 * Math.tan(C / 4);
9322
9322
  for (let R = 0; R < M; R++) {
9323
9323
  const O = w + R * C, z = w + (R + 1) * C, I = y + f * Math.cos(O), W = x + f * Math.sin(O), H = y + f * Math.cos(z), N = x + f * Math.sin(z), q = -Math.sin(O), rt = Math.cos(O), ht = I + P * f * q, ot = W + P * f * rt, pt = -Math.sin(z), mt = Math.cos(z), it = H - P * f * pt, at = N - P * f * mt;
9324
9324
  R === 0 && n.push([I, W, h]), n.push([ht, ot, h]), n.push([it, at, h]), n.push([H, N, h]);
@@ -9381,14 +9381,14 @@ class R0 extends B {
9381
9381
  return;
9382
9382
  }
9383
9383
  const c = Math.abs(this._angle) / 2, u = l / Math.sin(c), d = u * Math.cos(c), f = 2 * l;
9384
- let g = -h / f, m = a / f;
9385
- this._angle > 0 && (g = -g, m = -m);
9386
- const p = r + d * g, _ = n + d * m, y = Math.atan2(e[1] - _, e[0] - p), w = Math.abs(u * this._angle) - this._tipLength, M = (this._angle > 0 ? 1 : -1) * (w / u), C = Math.max(1, Math.ceil(Math.abs(M) / (Math.PI / 2) * (this._numComponents / 4))), P = M / C, R = 4 / 3 * Math.tan(P / 4);
9384
+ let g = -h / f, p = a / f;
9385
+ this._angle > 0 && (g = -g, p = -p);
9386
+ const m = r + d * g, _ = n + d * p, y = Math.atan2(e[1] - _, e[0] - m), w = Math.abs(u * this._angle) - this._tipLength, M = (this._angle > 0 ? 1 : -1) * (w / u), C = Math.max(1, Math.ceil(Math.abs(M) / (Math.PI / 2) * (this._numComponents / 4))), P = M / C, R = 4 / 3 * Math.tan(P / 4);
9387
9387
  for (let wt = 0; wt < C; wt++) {
9388
- const bt = y + wt * P, Z = y + (wt + 1) * P, Q = p + u * Math.cos(bt), J = _ + u * Math.sin(bt), kt = p + u * Math.cos(Z), Ut = _ + u * Math.sin(Z), le = -Math.sin(bt), ie = Math.cos(bt), Zt = Q + R * u * le, De = J + R * u * ie, ri = -Math.sin(Z), Kt = Math.cos(Z), Xt = kt - R * u * ri, Rt = Ut - R * u * Kt;
9388
+ const bt = y + wt * P, Z = y + (wt + 1) * P, Q = m + u * Math.cos(bt), J = _ + u * Math.sin(bt), kt = m + u * Math.cos(Z), Ut = _ + u * Math.sin(Z), le = -Math.sin(bt), ie = Math.cos(bt), Zt = Q + R * u * le, De = J + R * u * ie, ri = -Math.sin(Z), Kt = Math.cos(Z), Xt = kt - R * u * ri, Rt = Ut - R * u * Kt;
9389
9389
  wt === 0 && t.push([Q, J, o]), t.push([Zt, De, o]), t.push([Xt, Rt, o]), t.push([kt, Ut, o]);
9390
9390
  }
9391
- const O = y + M, z = p + u * Math.cos(O), I = _ + u * Math.sin(O), W = y + this._angle, H = this._angle > 0 ? -Math.sin(W) : Math.sin(W), N = this._angle > 0 ? Math.cos(W) : -Math.cos(W), q = Math.sqrt(H * H + N * N), rt = H / q, ot = -(N / q), pt = rt, mt = z + ot * this._tipWidth, it = I + pt * this._tipWidth, at = z - ot * this._tipWidth, vt = I - pt * this._tipWidth, nt = (wt, bt) => {
9391
+ const O = y + M, z = m + u * Math.cos(O), I = _ + u * Math.sin(O), W = y + this._angle, H = this._angle > 0 ? -Math.sin(W) : Math.sin(W), N = this._angle > 0 ? Math.cos(W) : -Math.cos(W), q = Math.sqrt(H * H + N * N), rt = H / q, ot = -(N / q), pt = rt, mt = z + ot * this._tipWidth, it = I + pt * this._tipWidth, at = z - ot * this._tipWidth, vt = I - pt * this._tipWidth, nt = (wt, bt) => {
9392
9392
  const Z = bt[0] - wt[0], Q = bt[1] - wt[1], J = bt[2] - wt[2];
9393
9393
  t.push([wt[0] + Z / 3, wt[1] + Q / 3, wt[2] + J / 3]), t.push([wt[0] + 2 * Z / 3, wt[1] + 2 * Q / 3, wt[2] + 2 * J / 3]), t.push([...bt]);
9394
9394
  };
@@ -9489,22 +9489,22 @@ class L0 extends B {
9489
9489
  return;
9490
9490
  }
9491
9491
  const c = Math.abs(this._angle) / 2, u = l / Math.sin(c), d = u * Math.cos(c), f = 2 * l;
9492
- let g = -h / f, m = a / f;
9493
- this._angle > 0 && (g = -g, m = -m);
9494
- const p = r + d * g, _ = n + d * m, y = Math.atan2(e[1] - _, e[0] - p), x = (this._angle > 0 ? 1 : -1) * (this._tipLength / u), w = (this._angle > 0 ? -1 : 1) * (this._tipLength / u), M = y + x, C = y + this._angle + w, P = C - M, R = p + u * Math.cos(M), O = _ + u * Math.sin(M), z = this._angle > 0 ? Math.sin(y) : -Math.sin(y), I = this._angle > 0 ? -Math.cos(y) : Math.cos(y), W = Math.sqrt(z * z + I * I), H = z / W, q = -(I / W), rt = H, ht = R + q * this._tipWidth, ot = O + rt * this._tipWidth, pt = R - q * this._tipWidth, mt = O - rt * this._tipWidth, it = (Rt, ce, Re) => {
9492
+ let g = -h / f, p = a / f;
9493
+ this._angle > 0 && (g = -g, p = -p);
9494
+ const m = r + d * g, _ = n + d * p, y = Math.atan2(e[1] - _, e[0] - m), x = (this._angle > 0 ? 1 : -1) * (this._tipLength / u), w = (this._angle > 0 ? -1 : 1) * (this._tipLength / u), M = y + x, C = y + this._angle + w, P = C - M, R = m + u * Math.cos(M), O = _ + u * Math.sin(M), z = this._angle > 0 ? Math.sin(y) : -Math.sin(y), I = this._angle > 0 ? -Math.cos(y) : Math.cos(y), W = Math.sqrt(z * z + I * I), H = z / W, q = -(I / W), rt = H, ht = R + q * this._tipWidth, ot = O + rt * this._tipWidth, pt = R - q * this._tipWidth, mt = O - rt * this._tipWidth, it = (Rt, ce, Re) => {
9495
9495
  const is = ce[0] - Rt[0], ss = ce[1] - Rt[1], xi = ce[2] - Rt[2];
9496
9496
  Re && t.push([...Rt]), t.push([Rt[0] + is / 3, Rt[1] + ss / 3, Rt[2] + xi / 3]), t.push([Rt[0] + 2 * is / 3, Rt[1] + 2 * ss / 3, Rt[2] + 2 * xi / 3]), t.push([...ce]);
9497
9497
  };
9498
9498
  it([e[0], e[1], o], [ht, ot, o], !0), it([ht, ot, o], [R, O, o], !1);
9499
9499
  const at = Math.max(1, Math.ceil(Math.abs(P) / (Math.PI / 2) * (this._numComponents / 4))), vt = P / at, nt = 4 / 3 * Math.tan(vt / 4);
9500
9500
  for (let Rt = 0; Rt < at; Rt++) {
9501
- const ce = M + Rt * vt, Re = M + (Rt + 1) * vt, is = p + u * Math.cos(ce), ss = _ + u * Math.sin(ce), xi = p + u * Math.cos(Re), Cs = _ + u * Math.sin(Re), On = -Math.sin(ce), En = Math.cos(ce), Fn = is + nt * u * On, zn = ss + nt * u * En, Bn = -Math.sin(Re), In = Math.cos(Re), Wn = xi - nt * u * Bn, Un = Cs - nt * u * In;
9501
+ const ce = M + Rt * vt, Re = M + (Rt + 1) * vt, is = m + u * Math.cos(ce), ss = _ + u * Math.sin(ce), xi = m + u * Math.cos(Re), Cs = _ + u * Math.sin(Re), On = -Math.sin(ce), En = Math.cos(ce), Fn = is + nt * u * On, zn = ss + nt * u * En, Bn = -Math.sin(Re), In = Math.cos(Re), Wn = xi - nt * u * Bn, Un = Cs - nt * u * In;
9502
9502
  t.push([Fn, zn, o]), t.push([Wn, Un, o]), t.push([xi, Cs, o]);
9503
9503
  }
9504
- const wt = p + u * Math.cos(C), bt = _ + u * Math.sin(C), Z = y + this._angle, Q = this._angle > 0 ? -Math.sin(Z) : Math.sin(Z), J = this._angle > 0 ? Math.cos(Z) : -Math.cos(Z), kt = Math.sqrt(Q * Q + J * J), Ut = Q / kt, ie = -(J / kt), Zt = Ut, De = wt + ie * this._tipWidth, ri = bt + Zt * this._tipWidth, Kt = wt - ie * this._tipWidth, Xt = bt - Zt * this._tipWidth;
9504
+ const wt = m + u * Math.cos(C), bt = _ + u * Math.sin(C), Z = y + this._angle, Q = this._angle > 0 ? -Math.sin(Z) : Math.sin(Z), J = this._angle > 0 ? Math.cos(Z) : -Math.cos(Z), kt = Math.sqrt(Q * Q + J * J), Ut = Q / kt, ie = -(J / kt), Zt = Ut, De = wt + ie * this._tipWidth, ri = bt + Zt * this._tipWidth, Kt = wt - ie * this._tipWidth, Xt = bt - Zt * this._tipWidth;
9505
9505
  it([wt, bt, o], [De, ri, o], !1), it([De, ri, o], [i[0], i[1], o], !1), it([i[0], i[1], o], [Kt, Xt, o], !1), it([Kt, Xt, o], [wt, bt, o], !1);
9506
9506
  for (let Rt = at - 1; Rt >= 0; Rt--) {
9507
- const ce = M + (Rt + 1) * vt, Re = M + Rt * vt, is = p + u * Math.cos(ce), ss = _ + u * Math.sin(ce), xi = p + u * Math.cos(Re), Cs = _ + u * Math.sin(Re), On = -Math.sin(ce), En = Math.cos(ce), Fn = is - nt * u * On, zn = ss - nt * u * En, Bn = -Math.sin(Re), In = Math.cos(Re), Wn = xi + nt * u * Bn, Un = Cs + nt * u * In;
9507
+ const ce = M + (Rt + 1) * vt, Re = M + Rt * vt, is = m + u * Math.cos(ce), ss = _ + u * Math.sin(ce), xi = m + u * Math.cos(Re), Cs = _ + u * Math.sin(Re), On = -Math.sin(ce), En = Math.cos(ce), Fn = is - nt * u * On, zn = ss - nt * u * En, Bn = -Math.sin(Re), In = Math.cos(Re), Wn = xi + nt * u * Bn, Un = Cs + nt * u * In;
9508
9508
  t.push([Fn, zn, o]), t.push([Wn, Un, o]), t.push([xi, Cs, o]);
9509
9509
  }
9510
9510
  it([R, O, o], [pt, mt, o], !1), it([pt, mt, o], [e[0], e[1], o], !1), this.setPoints3D(t);
@@ -9578,7 +9578,7 @@ class O0 extends mn {
9578
9578
  i[0] / l,
9579
9579
  i[1] / l,
9580
9580
  i[2] / l
9581
- ], u = n > 0 ? 1 : -1, d = -u * c[1], f = u * c[0], g = e[0] + r * d, m = e[1] + r * f, p = [g, m, e[2]], _ = Math.atan2(e[1] - m, e[0] - g);
9581
+ ], u = n > 0 ? 1 : -1, d = -u * c[1], f = u * c[0], g = e[0] + r * d, p = e[1] + r * f, m = [g, p, e[2]], _ = Math.atan2(e[1] - p, e[0] - g);
9582
9582
  super({
9583
9583
  radius: r,
9584
9584
  startAngle: _,
@@ -9586,7 +9586,7 @@ class O0 extends mn {
9586
9586
  color: o,
9587
9587
  strokeWidth: a,
9588
9588
  numComponents: h,
9589
- center: p
9589
+ center: m
9590
9590
  }), this._direction = [...c];
9591
9591
  }
9592
9592
  /**
@@ -9647,17 +9647,17 @@ class aa extends B {
9647
9647
  this._start[0] + n * d,
9648
9648
  this._start[1] + o * d,
9649
9649
  this._start[2] + a * d
9650
- ], m = [
9650
+ ], p = [
9651
9651
  this._start[0] + n * f,
9652
9652
  this._start[1] + o * f,
9653
9653
  this._start[2] + a * f
9654
- ], p = new _e({
9654
+ ], m = new _e({
9655
9655
  start: g,
9656
- end: m,
9656
+ end: p,
9657
9657
  color: this.color,
9658
9658
  strokeWidth: this.strokeWidth
9659
9659
  });
9660
- this._dashes.push(p), this.add(p);
9660
+ this._dashes.push(m), this.add(m);
9661
9661
  }
9662
9662
  u += c;
9663
9663
  }
@@ -10094,10 +10094,10 @@ class Wr extends B {
10094
10094
  * @returns Two CubicBezier curves [left, right]
10095
10095
  */
10096
10096
  splitAtT(t) {
10097
- const [e, i, r, n] = this._controlPoints, o = (m, p, _) => [
10098
- m[0] + (p[0] - m[0]) * _,
10099
- m[1] + (p[1] - m[1]) * _,
10100
- m[2] + (p[2] - m[2]) * _
10097
+ const [e, i, r, n] = this._controlPoints, o = (p, m, _) => [
10098
+ p[0] + (m[0] - p[0]) * _,
10099
+ p[1] + (m[1] - p[1]) * _,
10100
+ p[2] + (m[2] - p[2]) * _
10101
10101
  ], a = o(e, i, t), h = o(i, r, t), l = o(r, n, t), c = o(a, h, t), u = o(h, l, t), d = o(c, u, t), f = new Wr({
10102
10102
  points: [e, a, c, d],
10103
10103
  color: this.color,
@@ -10305,8 +10305,8 @@ class I0 extends B {
10305
10305
  */
10306
10306
  _generateSharpCornerPoints(t, e, i, r, n) {
10307
10307
  const o = [t - r, e + n, i], a = [t + r, e + n, i], h = [t + r, e - n, i], l = [t - r, e - n, i], c = [], u = (d, f, g) => {
10308
- const m = f[0] - d[0], p = f[1] - d[1], _ = f[2] - d[2];
10309
- g ? (c.push([...d]), c.push([d[0] + m / 3, d[1] + p / 3, d[2] + _ / 3]), c.push([d[0] + 2 * m / 3, d[1] + 2 * p / 3, d[2] + 2 * _ / 3]), c.push([...f])) : (c.push([d[0] + m / 3, d[1] + p / 3, d[2] + _ / 3]), c.push([d[0] + 2 * m / 3, d[1] + 2 * p / 3, d[2] + 2 * _ / 3]), c.push([...f]));
10308
+ const p = f[0] - d[0], m = f[1] - d[1], _ = f[2] - d[2];
10309
+ g ? (c.push([...d]), c.push([d[0] + p / 3, d[1] + m / 3, d[2] + _ / 3]), c.push([d[0] + 2 * p / 3, d[1] + 2 * m / 3, d[2] + 2 * _ / 3]), c.push([...f])) : (c.push([d[0] + p / 3, d[1] + m / 3, d[2] + _ / 3]), c.push([d[0] + 2 * p / 3, d[1] + 2 * m / 3, d[2] + 2 * _ / 3]), c.push([...f]));
10310
10310
  };
10311
10311
  u(o, a, !0), u(a, h, !1), u(h, l, !1), u(l, o, !1), this.setPoints3D(c);
10312
10312
  }
@@ -10314,7 +10314,7 @@ class I0 extends B {
10314
10314
  * Generate points for rounded corner rectangle
10315
10315
  */
10316
10316
  _generateRoundedCornerPoints(t, e, i, r, n, o) {
10317
- const a = [], h = 0.5522847498, l = t - r + o, c = e + n - o, u = t + r - o, d = e + n - o, f = t + r - o, g = e - n + o, m = t - r + o, p = e - n + o, _ = (x, w, M, C) => {
10317
+ const a = [], h = 0.5522847498, l = t - r + o, c = e + n - o, u = t + r - o, d = e + n - o, f = t + r - o, g = e - n + o, p = t - r + o, m = e - n + o, _ = (x, w, M, C) => {
10318
10318
  const P = Math.cos(M), R = Math.sin(M), O = Math.cos(M + Math.PI / 2), z = Math.sin(M + Math.PI / 2), I = [x + o * P, w + o * R, i], W = [x + o * O, w + o * z, i], H = [
10319
10319
  I[0] - h * o * R,
10320
10320
  I[1] + h * o * P,
@@ -10337,9 +10337,9 @@ class I0 extends B {
10337
10337
  [t + r, g, i]
10338
10338
  ), _(f, g, -Math.PI / 2, !1), y(
10339
10339
  [f, e - n, i],
10340
- [m, e - n, i]
10341
- ), _(m, p, Math.PI, !1), y(
10342
- [t - r, p, i],
10340
+ [p, e - n, i]
10341
+ ), _(p, m, Math.PI, !1), y(
10342
+ [t - r, m, i],
10343
10343
  [t - r, c, i]
10344
10344
  ), this.setPoints3D(a);
10345
10345
  }
@@ -10570,15 +10570,15 @@ class ha extends B {
10570
10570
  }, c = (C, P, R) => {
10571
10571
  const O = R, z = R + Math.PI / 2, I = C + r * Math.cos(O), W = P + r * Math.sin(O), H = C + r * Math.cos(z), N = P + r * Math.sin(z), q = -Math.sin(O), rt = Math.cos(O), ht = I + h * r * q, ot = W + h * r * rt, pt = -Math.sin(z), mt = Math.cos(z), it = H - h * r * pt, at = N - h * r * mt;
10572
10572
  t.push([ht, ot, a]), t.push([it, at, a]), t.push([H, N, a]);
10573
- }, u = n - e + r, d = o + i - r, f = n + e - r, g = o + i - r, m = n + e - r, p = o - i + r, _ = n - e + r, y = o - i + r, x = n - e, w = o + i - r, M = Math.PI;
10573
+ }, u = n - e + r, d = o + i - r, f = n + e - r, g = o + i - r, p = n + e - r, m = o - i + r, _ = n - e + r, y = o - i + r, x = n - e, w = o + i - r, M = Math.PI;
10574
10574
  t.push([x, w, a]), c(u, d, M), l(
10575
10575
  [u, o + i, a],
10576
10576
  [f, o + i, a]
10577
10577
  ), c(f, g, Math.PI / 2), l(
10578
10578
  [n + e, g, a],
10579
- [n + e, p, a]
10580
- ), c(m, p, 0), l(
10581
- [m, o - i, a],
10579
+ [n + e, m, a]
10580
+ ), c(p, m, 0), l(
10581
+ [p, o - i, a],
10582
10582
  [_, o - i, a]
10583
10583
  ), c(_, y, -Math.PI / 2), l(
10584
10584
  [n - e, y, a],
@@ -10809,8 +10809,8 @@ class N0 extends B {
10809
10809
  const h = this._numComponents, l = (c) => {
10810
10810
  const u = [];
10811
10811
  for (let d = 0; d < c.length; d++) {
10812
- const f = a[c[d]], g = a[c[(d + 1) % c.length]], m = g[0] - f[0], p = g[1] - f[1], _ = g[2] - f[2];
10813
- d === 0 && u.push([...f]), u.push([f[0] + m / 3, f[1] + p / 3, f[2] + _ / 3]), u.push([f[0] + 2 * m / 3, f[1] + 2 * p / 3, f[2] + 2 * _ / 3]), u.push([...g]);
10812
+ const f = a[c[d]], g = a[c[(d + 1) % c.length]], p = g[0] - f[0], m = g[1] - f[1], _ = g[2] - f[2];
10813
+ d === 0 && u.push([...f]), u.push([f[0] + p / 3, f[1] + m / 3, f[2] + _ / 3]), u.push([f[0] + 2 * p / 3, f[1] + 2 * m / 3, f[2] + 2 * _ / 3]), u.push([...g]);
10814
10814
  }
10815
10815
  return u;
10816
10816
  };
@@ -10827,10 +10827,10 @@ class N0 extends B {
10827
10827
  const u = [];
10828
10828
  let d = c;
10829
10829
  const f = r / h;
10830
- for (let p = 0; p < f; p++)
10830
+ for (let m = 0; m < f; m++)
10831
10831
  u.push(d), d = (d + n) % r;
10832
- const g = l(u), m = new B();
10833
- m.color = this.color, m.fillOpacity = this.fillOpacity, m.strokeWidth = this.strokeWidth, m.setPoints3D(g), this.add(m);
10832
+ const g = l(u), p = new B();
10833
+ p.color = this.color, p.fillOpacity = this.fillOpacity, p.strokeWidth = this.strokeWidth, p.setPoints3D(g), this.add(p);
10834
10834
  }
10835
10835
  }
10836
10836
  }
@@ -11119,12 +11119,12 @@ class H0 extends B {
11119
11119
  [u, d, f] = t.points;
11120
11120
  this._vertex = [...d];
11121
11121
  const g = Math.atan2(u[1] - d[1], u[0] - d[0]);
11122
- let p = Math.atan2(f[1] - d[1], f[0] - d[0]) - g;
11122
+ let m = Math.atan2(f[1] - d[1], f[0] - d[0]) - g;
11123
11123
  if (r !== void 0) {
11124
- const _ = this._adjustForQuadrant(g, p, r);
11124
+ const _ = this._adjustForQuadrant(g, m, r);
11125
11125
  this._startAngle = _.start, this._angleValue = _.delta;
11126
11126
  } else
11127
- p < 0 && (p += 2 * Math.PI), this._startAngle = g, this._angleValue = p, n && (this._angleValue = p - 2 * Math.PI);
11127
+ m < 0 && (m += 2 * Math.PI), this._startAngle = g, this._angleValue = m, n && (this._angleValue = m - 2 * Math.PI);
11128
11128
  this._generatePoints();
11129
11129
  }
11130
11130
  _distance(t, e) {
@@ -11148,8 +11148,8 @@ class H0 extends B {
11148
11148
  _generatePoints() {
11149
11149
  const t = [], [e, i, r] = this._vertex, n = this._radius, o = this._angleValue, a = Math.max(1, Math.ceil(Math.abs(o) / (Math.PI / 2) * 2)), h = o / a, l = 4 / 3 * Math.tan(h / 4);
11150
11150
  for (let c = 0; c < a; c++) {
11151
- const u = this._startAngle + c * h, d = this._startAngle + (c + 1) * h, f = e + n * Math.cos(u), g = i + n * Math.sin(u), m = e + n * Math.cos(d), p = i + n * Math.sin(d), _ = -Math.sin(u), y = Math.cos(u), x = f + l * n * _, w = g + l * n * y, M = -Math.sin(d), C = Math.cos(d), P = m - l * n * M, R = p - l * n * C;
11152
- c === 0 && t.push([f, g, r]), t.push([x, w, r]), t.push([P, R, r]), t.push([m, p, r]);
11151
+ const u = this._startAngle + c * h, d = this._startAngle + (c + 1) * h, f = e + n * Math.cos(u), g = i + n * Math.sin(u), p = e + n * Math.cos(d), m = i + n * Math.sin(d), _ = -Math.sin(u), y = Math.cos(u), x = f + l * n * _, w = g + l * n * y, M = -Math.sin(d), C = Math.cos(d), P = p - l * n * M, R = m - l * n * C;
11152
+ c === 0 && t.push([f, g, r]), t.push([x, w, r]), t.push([P, R, r]), t.push([p, m, r]);
11153
11153
  }
11154
11154
  this.setPoints3D(t);
11155
11155
  }
@@ -11257,8 +11257,8 @@ class q0 extends B {
11257
11257
  this._size = i, this.color = r, this.fillOpacity = 0, this.strokeWidth = n;
11258
11258
  let o, a, h;
11259
11259
  if ("line1" in t && "line2" in t) {
11260
- const l = t.line1.getStart(), c = t.line1.getEnd(), u = t.line2.getStart(), d = t.line2.getEnd(), f = this._distance(l, u), g = this._distance(l, d), m = this._distance(c, u), p = this._distance(c, d), _ = Math.min(f, g, m, p);
11261
- _ === f ? (a = l, o = c, h = d) : _ === g ? (a = l, o = c, h = u) : _ === m ? (a = c, o = l, h = d) : (a = c, o = l, h = u);
11260
+ const l = t.line1.getStart(), c = t.line1.getEnd(), u = t.line2.getStart(), d = t.line2.getEnd(), f = this._distance(l, u), g = this._distance(l, d), p = this._distance(c, u), m = this._distance(c, d), _ = Math.min(f, g, p, m);
11261
+ _ === f ? (a = l, o = c, h = d) : _ === g ? (a = l, o = c, h = u) : _ === p ? (a = c, o = l, h = d) : (a = c, o = l, h = u);
11262
11262
  } else
11263
11263
  [o, a, h] = t.points;
11264
11264
  this._vertex = [...a], this._angle1 = Math.atan2(o[1] - a[1], o[0] - a[0]), this._angle2 = Math.atan2(h[1] - a[1], h[0] - a[0]), this._generatePoints();
@@ -11451,11 +11451,11 @@ class Y0 extends B {
11451
11451
  const f = Math.floor(t * (i - 1)), g = t * (i - 1) - f;
11452
11452
  if (f >= i - 1)
11453
11453
  return [e[i - 1][0], e[i - 1][1], e[i - 1][2]];
11454
- const m = e[f], p = e[f + 1];
11454
+ const p = e[f], m = e[f + 1];
11455
11455
  return [
11456
- m[0] + (p[0] - m[0]) * g,
11457
- m[1] + (p[1] - m[1]) * g,
11458
- m[2] + (p[2] - m[2]) * g
11456
+ p[0] + (m[0] - p[0]) * g,
11457
+ p[1] + (m[1] - p[1]) * g,
11458
+ p[2] + (m[2] - p[2]) * g
11459
11459
  ];
11460
11460
  }
11461
11461
  const r = Math.floor((i - 1) / 3);
@@ -11928,16 +11928,16 @@ function Js(s) {
11928
11928
  }
11929
11929
  const pp = (3 + 16 * ui) * ui, mp = (2 + 12 * ui) * ui, gp = (9 + 64 * ui) * ui * ui, ns = Js(4), ph = Js(8), mh = Js(12), gh = Js(16), re = Js(4);
11930
11930
  function _p(s, t, e, i, r, n, o) {
11931
- let a, h, l, c, u, d, f, g, m, p, _, y, x, w, M, C, P, R;
11931
+ let a, h, l, c, u, d, f, g, p, m, _, y, x, w, M, C, P, R;
11932
11932
  const O = s - r, z = e - r, I = t - n, W = i - n;
11933
- w = O * W, d = se * O, f = d - (d - O), g = O - f, d = se * W, m = d - (d - W), p = W - m, M = g * p - (w - f * m - g * m - f * p), C = I * z, d = se * I, f = d - (d - I), g = I - f, d = se * z, m = d - (d - z), p = z - m, P = g * p - (C - f * m - g * m - f * p), _ = M - P, u = M - _, ns[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, ns[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, ns[2] = y - (R - u) + (_ - u), ns[3] = R;
11933
+ w = O * W, d = se * O, f = d - (d - O), g = O - f, d = se * W, p = d - (d - W), m = W - p, M = g * m - (w - f * p - g * p - f * m), C = I * z, d = se * I, f = d - (d - I), g = I - f, d = se * z, p = d - (d - z), m = z - p, P = g * m - (C - f * p - g * p - f * m), _ = M - P, u = M - _, ns[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, ns[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, ns[2] = y - (R - u) + (_ - u), ns[3] = R;
11934
11934
  let H = fp(4, ns), N = mp * o;
11935
11935
  if (H >= N || -H >= N || (u = s - O, a = s - (O + u) + (u - r), u = e - z, l = e - (z + u) + (u - r), u = t - I, h = t - (I + u) + (u - n), u = i - W, c = i - (W + u) + (u - n), a === 0 && h === 0 && l === 0 && c === 0) || (N = gp * o + dp * Math.abs(H), H += O * c + W * a - (I * l + z * h), H >= N || -H >= N)) return H;
11936
- w = a * W, d = se * a, f = d - (d - a), g = a - f, d = se * W, m = d - (d - W), p = W - m, M = g * p - (w - f * m - g * m - f * p), C = h * z, d = se * h, f = d - (d - h), g = h - f, d = se * z, m = d - (d - z), p = z - m, P = g * p - (C - f * m - g * m - f * p), _ = M - P, u = M - _, re[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, re[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, re[2] = y - (R - u) + (_ - u), re[3] = R;
11936
+ w = a * W, d = se * a, f = d - (d - a), g = a - f, d = se * W, p = d - (d - W), m = W - p, M = g * m - (w - f * p - g * p - f * m), C = h * z, d = se * h, f = d - (d - h), g = h - f, d = se * z, p = d - (d - z), m = z - p, P = g * m - (C - f * p - g * p - f * m), _ = M - P, u = M - _, re[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, re[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, re[2] = y - (R - u) + (_ - u), re[3] = R;
11937
11937
  const q = qn(4, ns, 4, re, ph);
11938
- w = O * c, d = se * O, f = d - (d - O), g = O - f, d = se * c, m = d - (d - c), p = c - m, M = g * p - (w - f * m - g * m - f * p), C = I * l, d = se * I, f = d - (d - I), g = I - f, d = se * l, m = d - (d - l), p = l - m, P = g * p - (C - f * m - g * m - f * p), _ = M - P, u = M - _, re[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, re[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, re[2] = y - (R - u) + (_ - u), re[3] = R;
11938
+ w = O * c, d = se * O, f = d - (d - O), g = O - f, d = se * c, p = d - (d - c), m = c - p, M = g * m - (w - f * p - g * p - f * m), C = I * l, d = se * I, f = d - (d - I), g = I - f, d = se * l, p = d - (d - l), m = l - p, P = g * m - (C - f * p - g * p - f * m), _ = M - P, u = M - _, re[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, re[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, re[2] = y - (R - u) + (_ - u), re[3] = R;
11939
11939
  const rt = qn(q, ph, 4, re, mh);
11940
- w = a * c, d = se * a, f = d - (d - a), g = a - f, d = se * c, m = d - (d - c), p = c - m, M = g * p - (w - f * m - g * m - f * p), C = h * l, d = se * h, f = d - (d - h), g = h - f, d = se * l, m = d - (d - l), p = l - m, P = g * p - (C - f * m - g * m - f * p), _ = M - P, u = M - _, re[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, re[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, re[2] = y - (R - u) + (_ - u), re[3] = R;
11940
+ w = a * c, d = se * a, f = d - (d - a), g = a - f, d = se * c, p = d - (d - c), m = c - p, M = g * m - (w - f * p - g * p - f * m), C = h * l, d = se * h, f = d - (d - h), g = h - f, d = se * l, p = d - (d - l), m = l - p, P = g * m - (C - f * p - g * p - f * m), _ = M - P, u = M - _, re[0] = M - (_ + u) + (u - P), y = w + _, u = y - w, x = w - (y - u) + (_ - u), _ = x - C, u = x - _, re[1] = x - (_ + u) + (u - C), R = y + _, u = R - y, re[2] = y - (R - u) + (_ - u), re[3] = R;
11941
11941
  const ht = qn(rt, mh, 4, re, gh);
11942
11942
  return gh[ht - 1];
11943
11943
  }
@@ -12512,22 +12512,22 @@ class Zr {
12512
12512
  for (; ; ) {
12513
12513
  const d = a.getAvailableLinkedEvents();
12514
12514
  if (d.length === 0) {
12515
- const m = l[0].point, p = l[l.length - 1].point;
12516
- throw new Error(`Unable to complete output ring starting at [${m.x}, ${m.y}]. Last matching segment found ends at [${p.x}, ${p.y}].`);
12515
+ const p = l[0].point, m = l[l.length - 1].point;
12516
+ throw new Error(`Unable to complete output ring starting at [${p.x}, ${p.y}]. Last matching segment found ends at [${m.x}, ${m.y}].`);
12517
12517
  }
12518
12518
  if (d.length === 1) {
12519
12519
  h = d[0].otherSE;
12520
12520
  break;
12521
12521
  }
12522
12522
  let f = null;
12523
- for (let m = 0, p = u.length; m < p; m++)
12524
- if (u[m].point === a.point) {
12525
- f = m;
12523
+ for (let p = 0, m = u.length; p < m; p++)
12524
+ if (u[p].point === a.point) {
12525
+ f = p;
12526
12526
  break;
12527
12527
  }
12528
12528
  if (f !== null) {
12529
- const m = u.splice(f)[0], p = l.splice(m.index);
12530
- p.unshift(p[0].otherSE), e.push(new Zr(p.reverse()));
12529
+ const p = u.splice(f)[0], m = l.splice(p.index);
12530
+ m.unshift(m[0].otherSE), e.push(new Zr(m.reverse()));
12531
12531
  continue;
12532
12532
  }
12533
12533
  u.push({
@@ -12721,13 +12721,13 @@ class Ap {
12721
12721
  if (Fe.type === "intersection")
12722
12722
  for (let u = 0, d = r.length; u < d; u++) {
12723
12723
  const f = r[u];
12724
- for (let g = u + 1, m = r.length; g < m; g++)
12724
+ for (let g = u + 1, p = r.length; g < p; g++)
12725
12725
  if (Ro(f.bbox, r[g].bbox) === null) return [];
12726
12726
  }
12727
12727
  const n = new la(Me.compare);
12728
12728
  for (let u = 0, d = r.length; u < d; u++) {
12729
12729
  const f = r[u].getSweepEvents();
12730
- for (let g = 0, m = f.length; g < m; g++)
12730
+ for (let g = 0, p = f.length; g < p; g++)
12731
12731
  if (n.insert(f[g]), n.size > Mh)
12732
12732
  throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
12733
12733
  }
@@ -12745,8 +12745,8 @@ class Ap {
12745
12745
  throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
12746
12746
  const d = o.process(u);
12747
12747
  for (let f = 0, g = d.length; f < g; f++) {
12748
- const m = d[f];
12749
- m.consumedBy === void 0 && n.insert(m);
12748
+ const p = d[f];
12749
+ p.consumedBy === void 0 && n.insert(p);
12750
12750
  }
12751
12751
  a = n.size, h = n.pop();
12752
12752
  }
@@ -13013,17 +13013,17 @@ function Xn(s, t = {}) {
13013
13013
  const u = [];
13014
13014
  let d = !0;
13015
13015
  for (const f of c) {
13016
- const g = f.map(([_, y]) => Np(_, y, n, a, h)), m = Gp(g, i);
13017
- if (m.length < 2) continue;
13018
- const p = Vp(m);
13019
- if (p.length !== 0) {
13016
+ const g = f.map(([_, y]) => Np(_, y, n, a, h)), p = Gp(g, i);
13017
+ if (p.length < 2) continue;
13018
+ const m = Vp(p);
13019
+ if (m.length !== 0) {
13020
13020
  if (!d && u.length > 0) {
13021
- const _ = u[u.length - 1], y = p[0];
13021
+ const _ = u[u.length - 1], y = m[0];
13022
13022
  u.push([..._]), u.push([...y]), u.push([...y]);
13023
13023
  } else
13024
- u.push(p[0]), d = !1;
13025
- for (let _ = 1; _ < p.length; _++)
13026
- u.push(p[_]);
13024
+ u.push(m[0]), d = !1;
13025
+ for (let _ = 1; _ < m.length; _++)
13026
+ u.push(m[_]);
13027
13027
  }
13028
13028
  }
13029
13029
  return u;
@@ -13041,8 +13041,8 @@ function Ip(s, t, e, i) {
13041
13041
  for (const l of n) {
13042
13042
  const [c, u, d, f] = l;
13043
13043
  if (u <= a && f > a || f <= a && u > a) {
13044
- const g = (a - u) / (f - u), m = c + g * (d - c);
13045
- h.push(m);
13044
+ const g = (a - u) / (f - u), p = c + g * (d - c);
13045
+ h.push(p);
13046
13046
  }
13047
13047
  }
13048
13048
  h.sort((l, c) => l - c);
@@ -13059,11 +13059,11 @@ function Wp(s, t, e, i, r) {
13059
13059
  for (let l = 0; l < h; l++) {
13060
13060
  const c = l * 3, u = s[c], d = s[c + 1], f = s[c + 2], g = s[c + 3];
13061
13061
  if (!u || !d || !f || !g) continue;
13062
- const m = 8;
13063
- let p = o(u[0]), _ = a(u[1]);
13064
- for (let y = 1; y <= m; y++) {
13065
- const x = y / m, w = 1 - x, M = w * w * w * u[0] + 3 * w * w * x * d[0] + 3 * w * x * x * f[0] + x * x * x * g[0], C = w * w * w * u[1] + 3 * w * w * x * d[1] + 3 * w * x * x * f[1] + x * x * x * g[1], P = o(M), R = a(C);
13066
- n.push([p, _, P, R]), p = P, _ = R;
13062
+ const p = 8;
13063
+ let m = o(u[0]), _ = a(u[1]);
13064
+ for (let y = 1; y <= p; y++) {
13065
+ const x = y / p, w = 1 - x, M = w * w * w * u[0] + 3 * w * w * x * d[0] + 3 * w * x * x * f[0] + x * x * x * g[0], C = w * w * w * u[1] + 3 * w * w * x * d[1] + 3 * w * x * x * f[1] + x * x * x * g[1], P = o(M), R = a(C);
13066
+ n.push([m, _, P, R]), m = P, _ = R;
13067
13067
  }
13068
13068
  }
13069
13069
  return n;
@@ -13118,9 +13118,9 @@ function jp(s, t, e, i) {
13118
13118
  r[u * t + d] = 1, c.push([d, u]);
13119
13119
  let f = !1;
13120
13120
  for (let g = 0; g < 8; g++) {
13121
- const m = u + Ah[g], p = d + Dh[g];
13122
- if (m >= 0 && m < e && p >= 0 && p < t && s[m * t + p] && !r[m * t + p]) {
13123
- u = m, d = p, f = !0;
13121
+ const p = u + Ah[g], m = d + Dh[g];
13122
+ if (p >= 0 && p < e && m >= 0 && m < t && s[p * t + m] && !r[p * t + m]) {
13123
+ u = p, d = m, f = !0;
13124
13124
  break;
13125
13125
  }
13126
13126
  }
@@ -13156,7 +13156,7 @@ function Gp(s, t) {
13156
13156
  const o = s[Math.max(0, n - 1)], a = s[n], h = s[Math.min(i - 1, n + 1)], l = s[Math.min(i - 1, n + 2)];
13157
13157
  n === 0 && e.push(a);
13158
13158
  for (let c = 1; c <= t; c++) {
13159
- const u = c / t, d = u * u, f = d * u, g = -r * f + 2 * r * d - r * u, m = (2 - r) * f + (r - 3) * d + 1, p = (r - 2) * f + (3 - 2 * r) * d + r * u, _ = r * f - r * d, y = g * o[0] + m * a[0] + p * h[0] + _ * l[0], x = g * o[1] + m * a[1] + p * h[1] + _ * l[1], w = g * o[2] + m * a[2] + p * h[2] + _ * l[2];
13159
+ const u = c / t, d = u * u, f = d * u, g = -r * f + 2 * r * d - r * u, p = (2 - r) * f + (r - 3) * d + 1, m = (r - 2) * f + (3 - 2 * r) * d + r * u, _ = r * f - r * d, y = g * o[0] + p * a[0] + m * h[0] + _ * l[0], x = g * o[1] + p * a[1] + m * h[1] + _ * l[1], w = g * o[2] + p * a[2] + m * h[2] + _ * l[2];
13160
13160
  e.push([y, x, w]);
13161
13161
  }
13162
13162
  }
@@ -13172,14 +13172,14 @@ function Vp(s) {
13172
13172
  const r = [];
13173
13173
  r.push([...s[i[0]]]);
13174
13174
  for (let n = 0; n < i.length - 1; n++) {
13175
- const o = i[n], a = i[n + 1], h = s[o], l = s[a], c = Rh(s, o), u = Rh(s, a), d = l[0] - h[0], f = l[1] - h[1], g = l[2] - h[2], p = Math.sqrt(d * d + f * f + g * g) / 3, _ = [
13176
- h[0] + c[0] * p,
13177
- h[1] + c[1] * p,
13178
- h[2] + c[2] * p
13175
+ const o = i[n], a = i[n + 1], h = s[o], l = s[a], c = Rh(s, o), u = Rh(s, a), d = l[0] - h[0], f = l[1] - h[1], g = l[2] - h[2], m = Math.sqrt(d * d + f * f + g * g) / 3, _ = [
13176
+ h[0] + c[0] * m,
13177
+ h[1] + c[1] * m,
13178
+ h[2] + c[2] * m
13179
13179
  ], y = [
13180
- l[0] - u[0] * p,
13181
- l[1] - u[1] * p,
13182
- l[2] + u[2] * p
13180
+ l[0] - u[0] * m,
13181
+ l[1] - u[1] * m,
13182
+ l[2] + u[2] * m
13183
13183
  ];
13184
13184
  r.push(_, y, [...s[a]]);
13185
13185
  }
@@ -13223,20 +13223,20 @@ class ca extends B {
13223
13223
  switch (g.type) {
13224
13224
  case "M": {
13225
13225
  if (f && h.length > 0) {
13226
- const m = h[h.length - 1], p = [g.x * Pt, -g.y * Pt, 0];
13227
- h.push([...m]), h.push([...p]), h.push([...p]);
13226
+ const p = h[h.length - 1], m = [g.x * Pt, -g.y * Pt, 0];
13227
+ h.push([...p]), h.push([...m]), h.push([...m]);
13228
13228
  } else
13229
13229
  h.push([g.x * Pt, -g.y * Pt, 0]);
13230
13230
  l = g.x, c = g.y, u = g.x, d = g.y, f = !0;
13231
13231
  break;
13232
13232
  }
13233
13233
  case "L": {
13234
- const m = g.x, p = g.y, _ = l + (m - l) / 3, y = c + (p - c) / 3, x = l + (m - l) * 2 / 3, w = c + (p - c) * 2 / 3;
13235
- h.push([_ * Pt, -y * Pt, 0]), h.push([x * Pt, -w * Pt, 0]), h.push([m * Pt, -p * Pt, 0]), l = m, c = p;
13234
+ const p = g.x, m = g.y, _ = l + (p - l) / 3, y = c + (m - c) / 3, x = l + (p - l) * 2 / 3, w = c + (m - c) * 2 / 3;
13235
+ h.push([_ * Pt, -y * Pt, 0]), h.push([x * Pt, -w * Pt, 0]), h.push([p * Pt, -m * Pt, 0]), l = p, c = m;
13236
13236
  break;
13237
13237
  }
13238
13238
  case "Q": {
13239
- const m = g.x1, p = g.y1, _ = g.x, y = g.y, x = l + 2 / 3 * (m - l), w = c + 2 / 3 * (p - c), M = _ + 2 / 3 * (m - _), C = y + 2 / 3 * (p - y);
13239
+ const p = g.x1, m = g.y1, _ = g.x, y = g.y, x = l + 2 / 3 * (p - l), w = c + 2 / 3 * (m - c), M = _ + 2 / 3 * (p - _), C = y + 2 / 3 * (m - y);
13240
13240
  h.push([x * Pt, -w * Pt, 0]), h.push([M * Pt, -C * Pt, 0]), h.push([_ * Pt, -y * Pt, 0]), l = _, c = y;
13241
13241
  break;
13242
13242
  }
@@ -13246,8 +13246,8 @@ class ca extends B {
13246
13246
  }
13247
13247
  case "Z": {
13248
13248
  if (l !== u || c !== d) {
13249
- const m = l + (u - l) / 3, p = c + (d - c) / 3, _ = l + (u - l) * 2 / 3, y = c + (d - c) * 2 / 3;
13250
- h.push([m * Pt, -p * Pt, 0]), h.push([_ * Pt, -y * Pt, 0]), h.push([u * Pt, -d * Pt, 0]);
13249
+ const p = l + (u - l) / 3, m = c + (d - c) / 3, _ = l + (u - l) * 2 / 3, y = c + (d - c) * 2 / 3;
13250
+ h.push([p * Pt, -m * Pt, 0]), h.push([_ * Pt, -y * Pt, 0]), h.push([u * Pt, -d * Pt, 0]);
13251
13251
  }
13252
13252
  l = u, c = d;
13253
13253
  break;
@@ -13511,15 +13511,15 @@ vi.prototype.addBezier = function(s, t, e, i, r, n, o, a) {
13511
13511
  var h = [s, t], l = [e, i], c = [r, n], u = [o, a];
13512
13512
  this.addPoint(s, t), this.addPoint(o, a);
13513
13513
  for (var d = 0; d <= 1; d++) {
13514
- var f = 6 * h[d] - 12 * l[d] + 6 * c[d], g = -3 * h[d] + 9 * l[d] - 9 * c[d] + 3 * u[d], m = 3 * l[d] - 3 * h[d];
13514
+ var f = 6 * h[d] - 12 * l[d] + 6 * c[d], g = -3 * h[d] + 9 * l[d] - 9 * c[d] + 3 * u[d], p = 3 * l[d] - 3 * h[d];
13515
13515
  if (g === 0) {
13516
13516
  if (f === 0)
13517
13517
  continue;
13518
- var p = -m / f;
13519
- 0 < p && p < 1 && (d === 0 && this.addX(os(h[d], l[d], c[d], u[d], p)), d === 1 && this.addY(os(h[d], l[d], c[d], u[d], p)));
13518
+ var m = -p / f;
13519
+ 0 < m && m < 1 && (d === 0 && this.addX(os(h[d], l[d], c[d], u[d], m)), d === 1 && this.addY(os(h[d], l[d], c[d], u[d], m)));
13520
13520
  continue;
13521
13521
  }
13522
- var _ = Math.pow(f, 2) - 4 * m * g;
13522
+ var _ = Math.pow(f, 2) - 4 * p * g;
13523
13523
  if (!(_ < 0)) {
13524
13524
  var y = (-f + Math.sqrt(_)) / (2 * g);
13525
13525
  0 < y && y < 1 && (d === 0 && this.addX(os(h[d], l[d], c[d], u[d], y)), d === 1 && this.addY(os(h[d], l[d], c[d], u[d], y)));
@@ -14501,8 +14501,8 @@ function c1(s, t, e, i, r) {
14501
14501
  var n;
14502
14502
  s.segCount = n = t.parseUShort() >> 1, t.skip("uShort", 3), s.glyphIndexMap = {};
14503
14503
  for (var o = new et.Parser(e, i + r + 14), a = new et.Parser(e, i + r + 16 + n * 2), h = new et.Parser(e, i + r + 16 + n * 4), l = new et.Parser(e, i + r + 16 + n * 6), c = i + r + 16 + n * 8, u = 0; u < n - 1; u += 1)
14504
- for (var d = void 0, f = o.parseUShort(), g = a.parseUShort(), m = h.parseShort(), p = l.parseUShort(), _ = g; _ <= f; _ += 1)
14505
- p !== 0 ? (c = l.offset + l.relativeOffset - 2, c += p, c += (_ - g) * 2, d = et.getUShort(e, c), d !== 0 && (d = d + m & 65535)) : d = _ + m & 65535, s.glyphIndexMap[_] = d;
14504
+ for (var d = void 0, f = o.parseUShort(), g = a.parseUShort(), p = h.parseShort(), m = l.parseUShort(), _ = g; _ <= f; _ += 1)
14505
+ m !== 0 ? (c = l.offset + l.relativeOffset - 2, c += m, c += (_ - g) * 2, d = et.getUShort(e, c), d !== 0 && (d = d + p & 65535)) : d = _ + p & 65535, s.glyphIndexMap[_] = d;
14506
14506
  }
14507
14507
  function u1(s, t) {
14508
14508
  var e = {};
@@ -14584,23 +14584,23 @@ function p1(s) {
14584
14584
  });
14585
14585
  }
14586
14586
  f1(n);
14587
- var h = n.segments.length, l = 0, c = [], u = [], d = [], f = [], g = [], m = [];
14587
+ var h = n.segments.length, l = 0, c = [], u = [], d = [], f = [], g = [], p = [];
14588
14588
  for (e = 0; e < h; e += 1) {
14589
- var p = n.segments[e];
14590
- p.end <= 65535 && p.start <= 65535 ? (c = c.concat({ name: "end_" + e, type: "USHORT", value: p.end }), u = u.concat({ name: "start_" + e, type: "USHORT", value: p.start }), d = d.concat({ name: "idDelta_" + e, type: "SHORT", value: p.delta }), f = f.concat({ name: "idRangeOffset_" + e, type: "USHORT", value: p.offset }), p.glyphId !== void 0 && (g = g.concat({ name: "glyph_" + e, type: "USHORT", value: p.glyphId }))) : l += 1, !t && p.glyphIndex !== void 0 && (m = m.concat({ name: "cmap12Start_" + e, type: "ULONG", value: p.start }), m = m.concat({ name: "cmap12End_" + e, type: "ULONG", value: p.end }), m = m.concat({ name: "cmap12Glyph_" + e, type: "ULONG", value: p.glyphIndex }));
14589
+ var m = n.segments[e];
14590
+ m.end <= 65535 && m.start <= 65535 ? (c = c.concat({ name: "end_" + e, type: "USHORT", value: m.end }), u = u.concat({ name: "start_" + e, type: "USHORT", value: m.start }), d = d.concat({ name: "idDelta_" + e, type: "SHORT", value: m.delta }), f = f.concat({ name: "idRangeOffset_" + e, type: "USHORT", value: m.offset }), m.glyphId !== void 0 && (g = g.concat({ name: "glyph_" + e, type: "USHORT", value: m.glyphId }))) : l += 1, !t && m.glyphIndex !== void 0 && (p = p.concat({ name: "cmap12Start_" + e, type: "ULONG", value: m.start }), p = p.concat({ name: "cmap12End_" + e, type: "ULONG", value: m.end }), p = p.concat({ name: "cmap12Glyph_" + e, type: "ULONG", value: m.glyphIndex }));
14591
14591
  }
14592
14592
  if (n.segCountX2 = (h - l) * 2, n.searchRange = Math.pow(2, Math.floor(Math.log(h - l) / Math.log(2))) * 2, n.entrySelector = Math.log(n.searchRange / 2) / Math.log(2), n.rangeShift = n.segCountX2 - n.searchRange, n.fields = n.fields.concat(c), n.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), n.fields = n.fields.concat(u), n.fields = n.fields.concat(d), n.fields = n.fields.concat(f), n.fields = n.fields.concat(g), n.cmap4Length = 14 + // Subtable header
14593
14593
  c.length * 2 + 2 + // reservedPad
14594
14594
  u.length * 2 + d.length * 2 + f.length * 2 + g.length * 2, !t) {
14595
14595
  var _ = 16 + // Subtable header
14596
- m.length * 4;
14596
+ p.length * 4;
14597
14597
  n.cmap12Offset = 20 + n.cmap4Length, n.fields = n.fields.concat([
14598
14598
  { name: "cmap12Format", type: "USHORT", value: 12 },
14599
14599
  { name: "cmap12Reserved", type: "USHORT", value: 0 },
14600
14600
  { name: "cmap12Length", type: "ULONG", value: _ },
14601
14601
  { name: "cmap12Language", type: "ULONG", value: 0 },
14602
- { name: "cmap12nGroups", type: "ULONG", value: m.length / 3 }
14603
- ]), n.fields = n.fields.concat(m);
14602
+ { name: "cmap12nGroups", type: "ULONG", value: p.length / 3 }
14603
+ ]), n.fields = n.fields.concat(p);
14604
14604
  }
14605
14605
  return n;
14606
14606
  }
@@ -15927,8 +15927,8 @@ xe.prototype.draw = function(s, t, e, i, r) {
15927
15927
  xe.prototype.drawPoints = function(s, t, e, i) {
15928
15928
  function r(u, d, f, g) {
15929
15929
  s.beginPath();
15930
- for (var m = 0; m < u.length; m += 1)
15931
- s.moveTo(d + u[m].x * g, f + u[m].y * g), s.arc(d + u[m].x * g, f + u[m].y * g, 2, 0, Math.PI * 2, !1);
15930
+ for (var p = 0; p < u.length; p += 1)
15931
+ s.moveTo(d + u[p].x * g, f + u[p].y * g), s.arc(d + u[p].x * g, f + u[p].y * g, 2, 0, Math.PI * 2, !1);
15932
15932
  s.closePath(), s.fill();
15933
15933
  }
15934
15934
  t = t !== void 0 ? t : 0, e = e !== void 0 ? e : 0, i = i !== void 0 ? i : 24;
@@ -16225,13 +16225,13 @@ function O1(s, t, e) {
16225
16225
  return new sn(r, e);
16226
16226
  }
16227
16227
  function jh(s, t, e) {
16228
- var i, r, n, o, a = new Ht(), h = [], l = 0, c = !1, u = !1, d = 0, f = 0, g, m, p, _;
16228
+ var i, r, n, o, a = new Ht(), h = [], l = 0, c = !1, u = !1, d = 0, f = 0, g, p, m, _;
16229
16229
  if (s.isCIDFont) {
16230
16230
  var y = s.tables.cff.topDict._fdSelect[t.index], x = s.tables.cff.topDict._fdArray[y];
16231
- g = x._subrs, m = x._subrsBias, p = x._defaultWidthX, _ = x._nominalWidthX;
16231
+ g = x._subrs, p = x._subrsBias, m = x._defaultWidthX, _ = x._nominalWidthX;
16232
16232
  } else
16233
- g = s.tables.cff.topDict._subrs, m = s.tables.cff.topDict._subrsBias, p = s.tables.cff.topDict._defaultWidthX, _ = s.tables.cff.topDict._nominalWidthX;
16234
- var w = p;
16233
+ g = s.tables.cff.topDict._subrs, p = s.tables.cff.topDict._subrsBias, m = s.tables.cff.topDict._defaultWidthX, _ = s.tables.cff.topDict._nominalWidthX;
16234
+ var w = m;
16235
16235
  function M(R, O) {
16236
16236
  u && a.closePath(), a.moveTo(R, O), u = !0;
16237
16237
  }
@@ -16269,7 +16269,7 @@ function jh(s, t, e) {
16269
16269
  i = d + h.shift(), r = f + h.shift(), n = i + h.shift(), o = r + h.shift(), d = n + h.shift(), f = o + h.shift(), a.curveTo(i, r, n, o, d, f);
16270
16270
  break;
16271
16271
  case 10:
16272
- H = h.pop() + m, N = g[H], N && P(N);
16272
+ H = h.pop() + p, N = g[H], N && P(N);
16273
16273
  break;
16274
16274
  case 11:
16275
16275
  return;
@@ -16393,9 +16393,9 @@ function F1(s, t, e, i) {
16393
16393
  var f = Mi(s, u), g = Uh(s, t, f.objects, a.objects);
16394
16394
  c._fdArray = g, d += t, c._fdSelect = E1(s, d, e.numGlyphs, g.length);
16395
16395
  }
16396
- var m = t + c.private[1], p = dc(s, m, c.private[0], a.objects);
16397
- if (e.defaultWidthX = p.defaultWidthX, e.nominalWidthX = p.nominalWidthX, p.subrs !== 0) {
16398
- var _ = m + p.subrs, y = Mi(s, _);
16396
+ var p = t + c.private[1], m = dc(s, p, c.private[0], a.objects);
16397
+ if (e.defaultWidthX = m.defaultWidthX, e.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
16398
+ var _ = p + m.subrs, y = Mi(s, _);
16399
16399
  e.subrs = y.objects, e.subrsBias = zo(e.subrs);
16400
16400
  } else
16401
16401
  e.subrs = [], e.subrsBias = 0;
@@ -17400,12 +17400,12 @@ function kc(s, t, e) {
17400
17400
  }
17401
17401
  function am(s, t, e) {
17402
17402
  for (var i = {}, r = new et.Parser(s, t), n = r.parseUShort(), o = r.parseUShort(), a = r.offset + r.parseUShort(), h = 0; h < o; h++) {
17403
- var l = r.parseUShort(), c = r.parseUShort(), u = r.parseUShort(), d = r.parseUShort(), f = bc[d] || d, g = r.parseUShort(), m = r.parseUShort(), p = rm(l, u, e), _ = kc(l, c, u);
17404
- if (_ !== void 0 && p !== void 0) {
17403
+ var l = r.parseUShort(), c = r.parseUShort(), u = r.parseUShort(), d = r.parseUShort(), f = bc[d] || d, g = r.parseUShort(), p = r.parseUShort(), m = rm(l, u, e), _ = kc(l, c, u);
17404
+ if (_ !== void 0 && m !== void 0) {
17405
17405
  var y = void 0;
17406
- if (_ === Bo ? y = ys.UTF16(s, a + m, g) : y = ys.MACSTRING(s, a + m, g, _), y) {
17406
+ if (_ === Bo ? y = ys.UTF16(s, a + p, g) : y = ys.MACSTRING(s, a + p, g, _), y) {
17407
17407
  var x = i[f];
17408
- x === void 0 && (x = i[f] = {}), x[p] = y;
17408
+ x === void 0 && (x = i[f] = {}), x[m] = y;
17409
17409
  }
17410
17410
  }
17411
17411
  }
@@ -17460,11 +17460,11 @@ function lm(s, t) {
17460
17460
  e = i[d];
17461
17461
  var f = r[e];
17462
17462
  for (var g in f) {
17463
- var m = f[g], p = 1, _ = h[g], y = sm[_], x = kc(p, y, _), w = X.MACSTRING(m, x);
17464
- w === void 0 && (p = 0, _ = t.indexOf(g), _ < 0 && (_ = t.length, t.push(g)), y = 4, w = X.UTF16(m));
17463
+ var p = f[g], m = 1, _ = h[g], y = sm[_], x = kc(m, y, _), w = X.MACSTRING(p, x);
17464
+ w === void 0 && (m = 0, _ = t.indexOf(g), _ < 0 && (_ = t.length, t.push(g)), y = 4, w = X.UTF16(p));
17465
17465
  var M = Hh(w, u);
17466
17466
  c.push(Vh(
17467
- p,
17467
+ m,
17468
17468
  y,
17469
17469
  _,
17470
17470
  e,
@@ -17473,7 +17473,7 @@ function lm(s, t) {
17473
17473
  ));
17474
17474
  var C = l[g];
17475
17475
  if (C !== void 0) {
17476
- var P = X.UTF16(m), R = Hh(P, u);
17476
+ var P = X.UTF16(p), R = Hh(P, u);
17477
17477
  c.push(Vh(
17478
17478
  3,
17479
17479
  1,
@@ -18177,11 +18177,11 @@ function ym(s) {
18177
18177
  }
18178
18178
  function xm(s) {
18179
18179
  for (var t = [], e = [], i = [], r = [], n = [], o = [], a = [], h, l = 0, c = 0, u = 0, d = 0, f = 0, g = 0; g < s.glyphs.length; g += 1) {
18180
- var m = s.glyphs.get(g), p = m.unicode | 0;
18181
- if (isNaN(m.advanceWidth))
18182
- throw new Error("Glyph " + m.name + " (" + g + "): advanceWidth is not a number.");
18183
- (h > p || h === void 0) && p > 0 && (h = p), l < p && (l = p);
18184
- var _ = Wo.getUnicodeRange(p);
18180
+ var p = s.glyphs.get(g), m = p.unicode | 0;
18181
+ if (isNaN(p.advanceWidth))
18182
+ throw new Error("Glyph " + p.name + " (" + g + "): advanceWidth is not a number.");
18183
+ (h > m || h === void 0) && m > 0 && (h = m), l < m && (l = m);
18184
+ var _ = Wo.getUnicodeRange(m);
18185
18185
  if (_ < 32)
18186
18186
  c |= 1 << _;
18187
18187
  else if (_ < 64)
@@ -18192,9 +18192,9 @@ function xm(s) {
18192
18192
  f |= 1 << _ - 96;
18193
18193
  else
18194
18194
  throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
18195
- if (m.name !== ".notdef") {
18196
- var y = m.getMetrics();
18197
- t.push(y.xMin), e.push(y.yMin), i.push(y.xMax), r.push(y.yMax), o.push(y.leftSideBearing), a.push(y.rightSideBearing), n.push(m.advanceWidth);
18195
+ if (p.name !== ".notdef") {
18196
+ var y = p.getMetrics();
18197
+ t.push(y.xMin), e.push(y.yMin), i.push(y.xMax), r.push(y.yMax), o.push(y.leftSideBearing), a.push(y.rightSideBearing), n.push(p.advanceWidth);
18198
18198
  }
18199
18199
  }
18200
18200
  var x = {
@@ -18634,10 +18634,10 @@ be.prototype.getLigatures = function(s, t, e) {
18634
18634
  for (var o = r[n].subtables, a = 0; a < o.length; a++)
18635
18635
  for (var h = o[a], l = this.expandCoverage(h.coverage), c = h.ligatureSets, u = 0; u < l.length; u++)
18636
18636
  for (var d = l[u], f = c[u], g = 0; g < f.length; g++) {
18637
- var m = f[g];
18637
+ var p = f[g];
18638
18638
  i.push({
18639
- sub: [d].concat(m.components),
18640
- by: m.ligGlyph
18639
+ sub: [d].concat(p.components),
18640
+ by: p.ligGlyph
18641
18641
  });
18642
18642
  }
18643
18643
  return i;
@@ -18768,10 +18768,10 @@ function Rc(s, t, e) {
18768
18768
  if (ut.argument(r.length === l, "Bad flags."), o.length > 0) {
18769
18769
  var f = [], g;
18770
18770
  if (l > 0) {
18771
- for (var m = 0; m < l; m += 1)
18772
- n = r[m], g = {}, g.onCurve = !!(n & 1), g.lastPointOfContour = o.indexOf(m) >= 0, f.push(g);
18773
- for (var p = 0, _ = 0; _ < l; _ += 1)
18774
- n = r[_], g = f[_], g.x = Kh(i, n, p, 2, 16), p = g.x;
18771
+ for (var p = 0; p < l; p += 1)
18772
+ n = r[p], g = {}, g.onCurve = !!(n & 1), g.lastPointOfContour = o.indexOf(p) >= 0, f.push(g);
18773
+ for (var m = 0, _ = 0; _ < l; _ += 1)
18774
+ n = r[_], g = f[_], g.x = Kh(i, n, m, 2, 16), m = g.x;
18775
18775
  for (var y = 0, x = 0; x < l; x += 1)
18776
18776
  n = r[x], g = f[x], g.y = Kh(i, n, y, 4, 32), y = g.y;
18777
18777
  }
@@ -19155,14 +19155,14 @@ zc = function(s, t) {
19155
19155
  for (var l = 0; l < r.length; l++) {
19156
19156
  var c = r[l], u = h.glyphs.get(c.glyphIndex);
19157
19157
  a = new Di("glyf", u.instructions), exports.DEBUG && (console.log("---EXEC COMP " + l + "---"), a.step = -1), Uo(u, a, e, i);
19158
- for (var d = Math.round(c.dx * e), f = Math.round(c.dy * i), g = a.gZone, m = a.contours, p = 0; p < g.length; p++) {
19159
- var _ = g[p];
19158
+ for (var d = Math.round(c.dx * e), f = Math.round(c.dy * i), g = a.gZone, p = a.contours, m = 0; m < g.length; m++) {
19159
+ var _ = g[m];
19160
19160
  _.xTouched = _.yTouched = !1, _.xo = _.x = _.x + d, _.yo = _.y = _.y + f;
19161
19161
  }
19162
19162
  var y = o.length;
19163
19163
  o.push.apply(o, g);
19164
- for (var x = 0; x < m.length; x++)
19165
- n.push(m[x] + y);
19164
+ for (var x = 0; x < p.length; x++)
19165
+ n.push(p[x] + y);
19166
19166
  }
19167
19167
  s.instructions && !a.inhibitGridFit && (a = new Di("glyf", s.instructions), a.gZone = a.z0 = a.z1 = a.z2 = o, a.contours = n, o.push(
19168
19168
  new di(0, 0),
@@ -19277,8 +19277,8 @@ function Wm(s) {
19277
19277
  function Um(s) {
19278
19278
  var t = s.stack, e = t.pop(), i = t.pop(), r = t.pop(), n = t.pop(), o = t.pop(), a = s.z0, h = s.z1, l = a[e], c = a[i], u = h[r], d = h[n], f = s.z2[o];
19279
19279
  exports.DEBUG && console.log("ISECT[], ", e, i, r, n, o);
19280
- var g = l.x, m = l.y, p = c.x, _ = c.y, y = u.x, x = u.y, w = d.x, M = d.y, C = (g - p) * (x - M) - (m - _) * (y - w), P = g * _ - m * p, R = y * M - x * w;
19281
- f.x = (P * (y - w) - R * (g - p)) / C, f.y = (P * (x - M) - R * (m - _)) / C;
19280
+ var g = l.x, p = l.y, m = c.x, _ = c.y, y = u.x, x = u.y, w = d.x, M = d.y, C = (g - m) * (x - M) - (p - _) * (y - w), P = g * _ - p * m, R = y * M - x * w;
19281
+ f.x = (P * (y - w) - R * (g - m)) / C, f.y = (P * (x - M) - R * (p - _)) / C;
19282
19282
  }
19283
19283
  function jm(s) {
19284
19284
  s.rp0 = s.stack.pop(), exports.DEBUG && console.log(s.step, "SRP0[]", s.rp0);
@@ -19633,8 +19633,8 @@ function Jn(s, t) {
19633
19633
  if (f === o) {
19634
19634
  var g = (d & 15) - 8;
19635
19635
  g >= 0 && g++, exports.DEBUG && console.log(t.step, "DELTAPFIX", u, "by", g * h);
19636
- var m = l[u];
19637
- r.setRelative(m, m, g * h, n);
19636
+ var p = l[u];
19637
+ r.setRelative(p, p, g * h, n);
19638
19638
  }
19639
19639
  }
19640
19640
  }
@@ -19838,16 +19838,16 @@ function wi(s, t) {
19838
19838
  t.ip = e;
19839
19839
  }
19840
19840
  function tt(s, t, e, i, r, n) {
19841
- var o = n.stack, a = s && o.pop(), h = o.pop(), l = n.rp0, c = n.z0[l], u = n.z1[h], d = n.minDis, f = n.fv, g = n.dpv, m, p, _, y;
19842
- p = m = g.distance(u, c, !0, !0), _ = p >= 0 ? 1 : -1, p = Math.abs(p), s && (y = n.cvt[a], i && Math.abs(p - y) < n.cvCutIn && (p = y)), e && p < d && (p = d), i && (p = n.round(p)), f.setRelative(u, c, _ * p, g), f.touch(u), exports.DEBUG && console.log(
19841
+ var o = n.stack, a = s && o.pop(), h = o.pop(), l = n.rp0, c = n.z0[l], u = n.z1[h], d = n.minDis, f = n.fv, g = n.dpv, p, m, _, y;
19842
+ m = p = g.distance(u, c, !0, !0), _ = m >= 0 ? 1 : -1, m = Math.abs(m), s && (y = n.cvt[a], i && Math.abs(m - y) < n.cvCutIn && (m = y)), e && m < d && (m = d), i && (m = n.round(m)), f.setRelative(u, c, _ * m, g), f.touch(u), exports.DEBUG && console.log(
19843
19843
  n.step,
19844
19844
  (s ? "MIRP[" : "MDRP[") + (t ? "M" : "m") + (e ? ">" : "_") + (i ? "R" : "_") + (r === 0 ? "Gr" : r === 1 ? "Bl" : r === 2 ? "Wh" : "") + "]",
19845
19845
  s ? a + "(" + n.cvt[a] + "," + y + ")" : "",
19846
19846
  h,
19847
19847
  "(d =",
19848
- m,
19848
+ p,
19849
19849
  "->",
19850
- _ * p,
19850
+ _ * m,
19851
19851
  ")"
19852
19852
  ), n.rp1 = n.rp0, n.rp2 = h, t && (n.rp0 = h);
19853
19853
  }
@@ -20726,8 +20726,8 @@ function l_(s, t) {
20726
20726
  ), u = i.length === t.inputCoverage.length && a.length === t.lookaheadCoverage.length && c.length === t.backtrackCoverage.length, d = [];
20727
20727
  if (u)
20728
20728
  for (var f = 0; f < t.lookupRecords.length; f++)
20729
- for (var g = t.lookupRecords[f], m = g.lookupListIndex, p = this.getLookupByIndex(m), _ = 0; _ < p.subtables.length; _++) {
20730
- var y = p.subtables[_], x = this.getLookupMethod(p, y), w = this.getSubstitutionType(p, y);
20729
+ for (var g = t.lookupRecords[f], p = g.lookupListIndex, m = this.getLookupByIndex(p), _ = 0; _ < m.subtables.length; _++) {
20730
+ var y = m.subtables[_], x = this.getLookupMethod(m, y), w = this.getSubstitutionType(m, y);
20731
20731
  if (w === "12")
20732
20732
  for (var M = 0; M < i.length; M++) {
20733
20733
  var C = s.get(M), P = x(C);
@@ -21827,7 +21827,7 @@ function wa(s, t) {
21827
21827
  o = et.getUShort(n, 12), a = a2(n, o);
21828
21828
  } else
21829
21829
  throw new Error("Unsupported OpenType signature " + h);
21830
- for (var c, u, d, f, g, m, p, _, y, x, w, M, C = 0; C < o; C += 1) {
21830
+ for (var c, u, d, f, g, p, m, _, y, x, w, M, C = 0; C < o; C += 1) {
21831
21831
  var P = a[C], R = void 0;
21832
21832
  switch (P.tag) {
21833
21833
  case "cmap":
@@ -21849,7 +21849,7 @@ function wa(s, t) {
21849
21849
  R = Gt(n, P), r.tables.hhea = _c.parse(R.data, R.offset), r.ascender = r.tables.hhea.ascender, r.descender = r.tables.hhea.descender, r.numberOfHMetrics = r.tables.hhea.numberOfHMetrics;
21850
21850
  break;
21851
21851
  case "hmtx":
21852
- p = P;
21852
+ m = P;
21853
21853
  break;
21854
21854
  case "ltag":
21855
21855
  R = Gt(n, P), i = yc.parse(R.data, R.offset);
@@ -21888,7 +21888,7 @@ function wa(s, t) {
21888
21888
  g = P;
21889
21889
  break;
21890
21890
  case "GSUB":
21891
- m = P;
21891
+ p = P;
21892
21892
  break;
21893
21893
  case "meta":
21894
21894
  w = P;
@@ -21904,7 +21904,7 @@ function wa(s, t) {
21904
21904
  mc.parse(N.data, N.offset, r, t);
21905
21905
  } else
21906
21906
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
21907
- var q = Gt(n, p);
21907
+ var q = Gt(n, m);
21908
21908
  if (vc.parse(r, q.data, q.offset, r.numberOfHMetrics, r.numGlyphs, r.glyphs, t), y1(r, t), _) {
21909
21909
  var rt = Gt(n, _);
21910
21910
  r.kerningPairs = i2.parse(rt.data, rt.offset);
@@ -21918,8 +21918,8 @@ function wa(s, t) {
21918
21918
  var ot = Gt(n, g);
21919
21919
  r.tables.gpos = Q_.parse(ot.data, ot.offset), r.position.init();
21920
21920
  }
21921
- if (m) {
21922
- var pt = Gt(n, m);
21921
+ if (p) {
21922
+ var pt = Gt(n, p);
21923
21923
  r.tables.gsub = Cc.parse(pt.data, pt.offset);
21924
21924
  }
21925
21925
  if (u) {
@@ -26666,23 +26666,23 @@ var Cr = [
26666
26666
  if (bn(n, u, r).metrics)
26667
26667
  return Ee(n, u, r, e, o.concat(d));
26668
26668
  if ($c.hasOwnProperty(n) && u.slice(0, 10) === "Typewriter") {
26669
- for (var g = [], m = 0; m < n.length; m++)
26670
- g.push(Ee(n[m], u, r, e, o.concat(d)));
26669
+ for (var g = [], p = 0; p < n.length; p++)
26670
+ g.push(Ee(n[p], u, r, e, o.concat(d)));
26671
26671
  return Kc(g);
26672
26672
  }
26673
26673
  }
26674
26674
  if (i === "mathord")
26675
26675
  return Ee(n, "Math-Italic", r, e, o.concat(["mathnormal"]));
26676
26676
  if (i === "textord") {
26677
- var p = Ot[r][n] && Ot[r][n].font;
26678
- if (p === "ams") {
26677
+ var m = Ot[r][n] && Ot[r][n].font;
26678
+ if (m === "ams") {
26679
26679
  var _ = Pr("amsrm", e.fontWeight, e.fontShape);
26680
26680
  return Ee(n, _, r, e, o.concat("amsrm", e.fontWeight, e.fontShape));
26681
- } else if (p === "main" || !p) {
26681
+ } else if (m === "main" || !m) {
26682
26682
  var y = Pr("textrm", e.fontWeight, e.fontShape);
26683
26683
  return Ee(n, y, r, e, o.concat(e.fontWeight, e.fontShape));
26684
26684
  } else {
26685
- var x = Pr(p, e.fontWeight, e.fontShape);
26685
+ var x = Pr(m, e.fontWeight, e.fontShape);
26686
26686
  return Ee(n, x, r, e, o.concat(x, e.fontWeight, e.fontShape));
26687
26687
  }
26688
26688
  } else
@@ -26781,12 +26781,12 @@ var Cr = [
26781
26781
  var l = de(["pstrut"], []);
26782
26782
  l.style.height = V(n);
26783
26783
  for (var c = [], u = r, d = r, f = r, g = 0; g < i.length; g++) {
26784
- var m = i[g];
26785
- if (m.type === "kern")
26786
- f += m.size;
26784
+ var p = i[g];
26785
+ if (p.type === "kern")
26786
+ f += p.size;
26787
26787
  else {
26788
- var p = m.elem, _ = m.wrapperClasses || [], y = m.wrapperStyle || {}, x = de(_, [l, p], void 0, y);
26789
- x.style.top = V(-n - f - p.depth), m.marginLeft && (x.style.marginLeft = m.marginLeft), m.marginRight && (x.style.marginRight = m.marginRight), c.push(x), f += p.height + p.depth;
26788
+ var m = p.elem, _ = p.wrapperClasses || [], y = p.wrapperStyle || {}, x = de(_, [l, m], void 0, y);
26789
+ x.style.top = V(-n - f - m.depth), p.marginLeft && (x.style.marginLeft = p.marginLeft), p.marginRight && (x.style.marginRight = p.marginRight), c.push(x), f += m.height + m.depth;
26790
26790
  }
26791
26791
  u = Math.min(u, f), d = Math.max(d, f);
26792
26792
  }
@@ -27070,13 +27070,13 @@ var hn = function(t) {
27070
27070
  c.type === "sizing" ? l = e.havingSize(c.size) : c.type === "styling" && (l = e.havingStyle(pv[c.style]));
27071
27071
  }
27072
27072
  var u = gi([r[0] || "leftmost"], [], e), d = gi([r[1] || "rightmost"], [], e), f = i === "root";
27073
- return Al(n, (g, m) => {
27074
- var p = m.classes[0], _ = g.classes[0];
27075
- p === "mbin" && fv.includes(_) ? m.classes[0] = "mord" : _ === "mbin" && dv.includes(p) && (g.classes[0] = "mord");
27073
+ return Al(n, (g, p) => {
27074
+ var m = p.classes[0], _ = g.classes[0];
27075
+ m === "mbin" && fv.includes(_) ? p.classes[0] = "mord" : _ === "mbin" && dv.includes(m) && (g.classes[0] = "mord");
27076
27076
  }, {
27077
27077
  node: u
27078
- }, d, f), Al(n, (g, m) => {
27079
- var p = Ho(m), _ = Ho(g), y = p && _ ? g.hasClass("mtight") ? uv[p][_] : cv[p][_] : null;
27078
+ }, d, f), Al(n, (g, p) => {
27079
+ var m = Ho(p), _ = Ho(g), y = m && _ ? g.hasClass("mtight") ? uv[m][_] : cv[m][_] : null;
27080
27080
  if (y)
27081
27081
  return E.makeGlue(y, l);
27082
27082
  }, {
@@ -27518,14 +27518,14 @@ var su = function(t) {
27518
27518
  var g = [1, 1, 2, 2, 3, 3][c];
27519
27519
  h === "widehat" || h === "widecheck" ? (a = [0, 1062, 2364, 2364, 2364][g], u = [0, 239, 300, 360, 420][g], f = [0, 0.24, 0.3, 0.3, 0.36, 0.42][g], d = h + g) : (a = [0, 600, 1033, 2339, 2340][g], u = [0, 260, 286, 306, 312][g], f = [0, 0.26, 0.286, 0.3, 0.306, 0.34][g], d = "tilde" + g);
27520
27520
  }
27521
- var m = new Ii(d), p = new mi([m], {
27521
+ var p = new Ii(d), m = new mi([p], {
27522
27522
  width: "100%",
27523
27523
  height: V(f),
27524
27524
  viewBox: "0 0 " + a + " " + u,
27525
27525
  preserveAspectRatio: "none"
27526
27526
  });
27527
27527
  return {
27528
- span: E.makeSvgSpan([], [p], e),
27528
+ span: E.makeSvgSpan([], [m], e),
27529
27529
  minWidth: 0,
27530
27530
  height: f
27531
27531
  };
@@ -27648,10 +27648,10 @@ var Ra = (s, t) => {
27648
27648
  mode: i.mode,
27649
27649
  text: i.label
27650
27650
  }, t, "textord"), f = Sl(f), f.italic = 0, g = f.width, c && (u += f.depth)), d = E.makeSpan(["accent-body"], [f]);
27651
- var m = i.label === "\\textcircled";
27652
- m && (d.classes.push("accent-full"), u = n.height);
27653
- var p = a;
27654
- m || (p -= g / 2), d.style.left = V(p), i.label === "\\textcircled" && (d.style.top = ".2em"), d = E.makeVList({
27651
+ var p = i.label === "\\textcircled";
27652
+ p && (d.classes.push("accent-full"), u = n.height);
27653
+ var m = a;
27654
+ p || (m -= g / 2), d.style.left = V(m), i.label === "\\textcircled" && (d.style.top = ".2em"), d = E.makeVList({
27655
27655
  positionType: "firstBaseline",
27656
27656
  children: [{
27657
27657
  type: "elem",
@@ -28089,19 +28089,19 @@ function Rv(s) {
28089
28089
  }
28090
28090
  else
28091
28091
  throw new G('Expected one of "<>AV=|." after @', o[h]);
28092
- var g = Dv(l, c, s), m = {
28092
+ var g = Dv(l, c, s), p = {
28093
28093
  type: "styling",
28094
28094
  body: [g],
28095
28095
  mode: "math",
28096
28096
  style: "display"
28097
28097
  // CD is always displaystyle.
28098
28098
  };
28099
- i.push(m), a = Rl();
28099
+ i.push(p), a = Rl();
28100
28100
  }
28101
28101
  n % 2 === 0 ? i.push(a) : i.shift(), i = [], r.push(i);
28102
28102
  }
28103
28103
  s.gullet.endGroup(), s.gullet.endGroup();
28104
- var p = new Array(r[0].length).fill({
28104
+ var m = new Array(r[0].length).fill({
28105
28105
  type: "align",
28106
28106
  align: "c",
28107
28107
  pregap: 0.25,
@@ -28116,7 +28116,7 @@ function Rv(s) {
28116
28116
  arraystretch: 1,
28117
28117
  addJot: !0,
28118
28118
  rowGaps: [null],
28119
- cols: p,
28119
+ cols: m,
28120
28120
  colSeparationType: "CD",
28121
28121
  hLinesBeforeRow: new Array(r.length + 1).fill([])
28122
28122
  };
@@ -28473,16 +28473,16 @@ var Rs = function(t, e, i) {
28473
28473
  a = l = c = t, h = null;
28474
28474
  var f = "Size1-Regular";
28475
28475
  t === "\\uparrow" ? l = c = "⏐" : t === "\\Uparrow" ? l = c = "‖" : t === "\\downarrow" ? a = l = "⏐" : t === "\\Downarrow" ? a = l = "‖" : t === "\\updownarrow" ? (a = "\\uparrow", l = "⏐", c = "\\downarrow") : t === "\\Updownarrow" ? (a = "\\Uparrow", l = "‖", c = "\\Downarrow") : Fv.includes(t) ? (l = "∣", u = "vert", d = 333) : zv.includes(t) ? (l = "∥", u = "doublevert", d = 556) : t === "[" || t === "\\lbrack" ? (a = "⎡", l = "⎢", c = "⎣", f = "Size4-Regular", u = "lbrack", d = 667) : t === "]" || t === "\\rbrack" ? (a = "⎤", l = "⎥", c = "⎦", f = "Size4-Regular", u = "rbrack", d = 667) : t === "\\lfloor" || t === "⌊" ? (l = a = "⎢", c = "⎣", f = "Size4-Regular", u = "lfloor", d = 667) : t === "\\lceil" || t === "⌈" ? (a = "⎡", l = c = "⎢", f = "Size4-Regular", u = "lceil", d = 667) : t === "\\rfloor" || t === "⌋" ? (l = a = "⎥", c = "⎦", f = "Size4-Regular", u = "rfloor", d = 667) : t === "\\rceil" || t === "⌉" ? (a = "⎤", l = c = "⎥", f = "Size4-Regular", u = "rceil", d = 667) : t === "(" || t === "\\lparen" ? (a = "⎛", l = "⎜", c = "⎝", f = "Size4-Regular", u = "lparen", d = 875) : t === ")" || t === "\\rparen" ? (a = "⎞", l = "⎟", c = "⎠", f = "Size4-Regular", u = "rparen", d = 875) : t === "\\{" || t === "\\lbrace" ? (a = "⎧", h = "⎨", c = "⎩", l = "⎪", f = "Size4-Regular") : t === "\\}" || t === "\\rbrace" ? (a = "⎫", h = "⎬", c = "⎭", l = "⎪", f = "Size4-Regular") : t === "\\lgroup" || t === "⟮" ? (a = "⎧", c = "⎩", l = "⎪", f = "Size4-Regular") : t === "\\rgroup" || t === "⟯" ? (a = "⎫", c = "⎭", l = "⎪", f = "Size4-Regular") : t === "\\lmoustache" || t === "⎰" ? (a = "⎧", c = "⎭", l = "⎪", f = "Size4-Regular") : (t === "\\rmoustache" || t === "⎱") && (a = "⎫", c = "⎩", l = "⎪", f = "Size4-Regular");
28476
- var g = Rs(a, f, n), m = g.height + g.depth, p = Rs(l, f, n), _ = p.height + p.depth, y = Rs(c, f, n), x = y.height + y.depth, w = 0, M = 1;
28476
+ var g = Rs(a, f, n), p = g.height + g.depth, m = Rs(l, f, n), _ = m.height + m.depth, y = Rs(c, f, n), x = y.height + y.depth, w = 0, M = 1;
28477
28477
  if (h !== null) {
28478
28478
  var C = Rs(h, f, n);
28479
28479
  w = C.height + C.depth, M = 2;
28480
28480
  }
28481
- var P = m + x + w, R = Math.max(0, Math.ceil((e - P) / (M * _))), O = P + R * M * _, z = r.fontMetrics().axisHeight;
28481
+ var P = p + x + w, R = Math.max(0, Math.ceil((e - P) / (M * _))), O = P + R * M * _, z = r.fontMetrics().axisHeight;
28482
28482
  i && (z *= r.sizeMultiplier);
28483
28483
  var I = O / 2 - z, W = [];
28484
28484
  if (u.length > 0) {
28485
- var H = O - m - x, N = Math.round(O * 1e3), q = U2(u, Math.round(H * 1e3)), rt = new Ii(u, q), ht = (d / 1e3).toFixed(3) + "em", ot = (N / 1e3).toFixed(3) + "em", pt = new mi([rt], {
28485
+ var H = O - p - x, N = Math.round(O * 1e3), q = U2(u, Math.round(H * 1e3)), rt = new Ii(u, q), ht = (d / 1e3).toFixed(3) + "em", ot = (N / 1e3).toFixed(3) + "em", pt = new mi([rt], {
28486
28486
  width: ht,
28487
28487
  height: ot,
28488
28488
  viewBox: "0 0 " + d + " " + N
@@ -28493,10 +28493,10 @@ var Rs = function(t, e, i) {
28493
28493
  });
28494
28494
  } else {
28495
28495
  if (W.push(lo(c, f, n)), W.push(Rr), h === null) {
28496
- var it = O - m - x + 2 * Yo;
28496
+ var it = O - p - x + 2 * Yo;
28497
28497
  W.push(co(l, it, r));
28498
28498
  } else {
28499
- var at = (O - m - x - w) / 2 + 2 * Yo;
28499
+ var at = (O - p - x - w) / 2 + 2 * Yo;
28500
28500
  W.push(co(l, at, r)), W.push(Rr), W.push(lo(h, f, n)), W.push(Rr), W.push(co(l, at, r));
28501
28501
  }
28502
28502
  W.push(Rr), W.push(lo(a, f, n));
@@ -28873,13 +28873,13 @@ var Oa = (s, t) => {
28873
28873
  n = E.makeSvgSpan(["hide-tail"], [g], t), n.style.height = V(u), o = e.depth + h + l;
28874
28874
  } else {
28875
28875
  /cancel/.test(i) ? a || e.classes.push("cancel-pad") : i === "angl" ? e.classes.push("anglpad") : e.classes.push("boxpad");
28876
- var m = 0, p = 0, _ = 0;
28876
+ var p = 0, m = 0, _ = 0;
28877
28877
  /box/.test(i) ? (_ = Math.max(
28878
28878
  t.fontMetrics().fboxrule,
28879
28879
  // default
28880
28880
  t.minRuleThickness
28881
28881
  // User override.
28882
- ), m = t.fontMetrics().fboxsep + (i === "colorbox" ? 0 : _), p = m) : i === "angl" ? (_ = Math.max(t.fontMetrics().defaultRuleThickness, t.minRuleThickness), m = 4 * _, p = Math.max(0, 0.25 - e.depth)) : (m = a ? 0.2 : 0, p = m), n = _i.encloseSpan(e, i, m, p, t), /fbox|boxed|fcolorbox/.test(i) ? (n.style.borderStyle = "solid", n.style.borderWidth = V(_)) : i === "angl" && _ !== 0.049 && (n.style.borderTopWidth = V(_), n.style.borderRightWidth = V(_)), o = e.depth + p, s.backgroundColor && (n.style.backgroundColor = s.backgroundColor, s.borderColor && (n.style.borderColor = s.borderColor));
28882
+ ), p = t.fontMetrics().fboxsep + (i === "colorbox" ? 0 : _), m = p) : i === "angl" ? (_ = Math.max(t.fontMetrics().defaultRuleThickness, t.minRuleThickness), p = 4 * _, m = Math.max(0, 0.25 - e.depth)) : (p = a ? 0.2 : 0, m = p), n = _i.encloseSpan(e, i, p, m, t), /fbox|boxed|fcolorbox/.test(i) ? (n.style.borderStyle = "solid", n.style.borderWidth = V(_)) : i === "angl" && _ !== 0.049 && (n.style.borderTopWidth = V(_), n.style.borderRightWidth = V(_)), o = e.depth + m, s.backgroundColor && (n.style.backgroundColor = s.backgroundColor, s.borderColor && (n.style.borderColor = s.borderColor));
28883
28883
  }
28884
28884
  var y;
28885
28885
  if (s.backgroundColor)
@@ -29130,7 +29130,7 @@ function Ni(s, t, e) {
29130
29130
  throw new G("Invalid \\arraystretch: " + f);
29131
29131
  }
29132
29132
  s.gullet.beginGroup();
29133
- var g = [], m = [g], p = [], _ = [], y = h != null ? [] : void 0;
29133
+ var g = [], p = [g], m = [], _ = [], y = h != null ? [] : void 0;
29134
29134
  function x() {
29135
29135
  h && s.gullet.macros.set("\\@eqnsw", "1", !0);
29136
29136
  }
@@ -29158,12 +29158,12 @@ function Ni(s, t, e) {
29158
29158
  }
29159
29159
  s.consume();
29160
29160
  } else if (C === "\\end") {
29161
- w(), g.length === 1 && M.type === "styling" && M.body[0].body.length === 0 && (m.length > 1 || !c) && m.pop(), _.length < m.length + 1 && _.push([]);
29161
+ w(), g.length === 1 && M.type === "styling" && M.body[0].body.length === 0 && (p.length > 1 || !c) && p.pop(), _.length < p.length + 1 && _.push([]);
29162
29162
  break;
29163
29163
  } else if (C === "\\\\") {
29164
29164
  s.consume();
29165
29165
  var P = void 0;
29166
- s.gullet.future().text !== " " && (P = s.parseSizeGroup(!0)), p.push(P ? P.value : null), w(), _.push(Fl(s)), g = [], m.push(g), x();
29166
+ s.gullet.future().text !== " " && (P = s.parseSizeGroup(!0)), m.push(P ? P.value : null), w(), _.push(Fl(s)), g = [], p.push(g), x();
29167
29167
  } else
29168
29168
  throw new G("Expected & or \\\\ or \\cr or \\end", s.nextToken);
29169
29169
  }
@@ -29172,9 +29172,9 @@ function Ni(s, t, e) {
29172
29172
  mode: s.mode,
29173
29173
  addJot: r,
29174
29174
  arraystretch: o,
29175
- body: m,
29175
+ body: p,
29176
29176
  cols: n,
29177
- rowGaps: p,
29177
+ rowGaps: m,
29178
29178
  hskipBeforeAndAfter: i,
29179
29179
  hLinesBeforeRow: _,
29180
29180
  colSeparationType: a,
@@ -29199,7 +29199,7 @@ var ii = function(t, e) {
29199
29199
  var g = t.colSeparationType === "CD" ? It({
29200
29200
  number: 3,
29201
29201
  unit: "ex"
29202
- }, e) : 12 * u, m = 3 * u, p = t.arraystretch * g, _ = 0.7 * p, y = 0.3 * p, x = 0;
29202
+ }, e) : 12 * u, p = 3 * u, m = t.arraystretch * g, _ = 0.7 * m, y = 0.3 * m, x = 0;
29203
29203
  function w(Xt) {
29204
29204
  for (var Rt = 0; Rt < Xt.length; ++Rt)
29205
29205
  Rt > 0 && (x += 0.25), l.push({
@@ -29216,7 +29216,7 @@ var ii = function(t, e) {
29216
29216
  P < O.depth && (P = O.depth), C < O.height && (C = O.height), R[r] = O;
29217
29217
  }
29218
29218
  var z = t.rowGaps[i], I = 0;
29219
- z && (I = It(z, e), I > 0 && (I += y, P < I && (P = I), I = 0)), t.addJot && (P += m), R.height = C, R.depth = P, x += C, R.pos = x, x += P + I, h[i] = R, w(o[i + 1]);
29219
+ z && (I = It(z, e), I > 0 && (I += y, P < I && (P = I), I = 0)), t.addJot && (P += p), R.height = C, R.depth = P, x += C, R.pos = x, x += P + I, h[i] = R, w(o[i + 1]);
29220
29220
  }
29221
29221
  var W = x / 2 + e.fontMetrics().axisHeight, H = t.cols || [], N = [], q, rt, ht = [];
29222
29222
  if (t.tags && t.tags.some((Xt) => Xt))
@@ -29309,11 +29309,11 @@ var ii = function(t, e) {
29309
29309
  c.setAttribute("rowspacing", V(u));
29310
29310
  var d = "", f = "";
29311
29311
  if (t.cols && t.cols.length > 0) {
29312
- var g = t.cols, m = "", p = !1, _ = 0, y = g.length;
29312
+ var g = t.cols, p = "", m = !1, _ = 0, y = g.length;
29313
29313
  g[0].type === "separator" && (d += "top ", _ = 1), g[g.length - 1].type === "separator" && (d += "bottom ", y -= 1);
29314
29314
  for (var x = _; x < y; x++)
29315
- g[x].type === "align" ? (f += Hv[g[x].align], p && (m += "none "), p = !0) : g[x].type === "separator" && p && (m += g[x].separator === "|" ? "solid " : "dashed ", p = !1);
29316
- c.setAttribute("columnalign", f.trim()), /[sd]/.test(m) && c.setAttribute("columnlines", m.trim());
29315
+ g[x].type === "align" ? (f += Hv[g[x].align], m && (p += "none "), m = !0) : g[x].type === "separator" && m && (p += g[x].separator === "|" ? "solid " : "dashed ", m = !1);
29316
+ c.setAttribute("columnalign", f.trim()), /[sd]/.test(p) && c.setAttribute("columnlines", p.trim());
29317
29317
  }
29318
29318
  if (t.colSeparationType === "align") {
29319
29319
  for (var w = t.cols || [], M = "", C = 1; C < w.length; C++)
@@ -29362,11 +29362,11 @@ var ii = function(t, e) {
29362
29362
  }
29363
29363
  });
29364
29364
  for (var g = 0; g < h; ++g) {
29365
- var m = "r", p = 0;
29366
- g % 2 === 1 ? m = "l" : g > 0 && f && (p = 1), i[g] = {
29365
+ var p = "r", m = 0;
29366
+ g % 2 === 1 ? p = "l" : g > 0 && f && (m = 1), i[g] = {
29367
29367
  type: "align",
29368
- align: m,
29369
- pregap: p,
29368
+ align: p,
29369
+ pregap: m,
29370
29370
  postgap: 0
29371
29371
  };
29372
29372
  }
@@ -29792,19 +29792,19 @@ var Mu = (s, t) => {
29792
29792
  n = t.havingStyle(r);
29793
29793
  var l = Tt(s.denom, n, t), c, u, d;
29794
29794
  s.hasBarLine ? (s.barSize ? (u = It(s.barSize, t), c = E.makeLineSpan("frac-line", t, u)) : c = E.makeLineSpan("frac-line", t), u = c.height, d = c.height) : (c = null, u = 0, d = t.fontMetrics().defaultRuleThickness);
29795
- var f, g, m;
29796
- e.size === ct.DISPLAY.size || s.size === "display" ? (f = t.fontMetrics().num1, u > 0 ? g = 3 * d : g = 7 * d, m = t.fontMetrics().denom1) : (u > 0 ? (f = t.fontMetrics().num2, g = d) : (f = t.fontMetrics().num3, g = 3 * d), m = t.fontMetrics().denom2);
29797
- var p;
29795
+ var f, g, p;
29796
+ e.size === ct.DISPLAY.size || s.size === "display" ? (f = t.fontMetrics().num1, u > 0 ? g = 3 * d : g = 7 * d, p = t.fontMetrics().denom1) : (u > 0 ? (f = t.fontMetrics().num2, g = d) : (f = t.fontMetrics().num3, g = 3 * d), p = t.fontMetrics().denom2);
29797
+ var m;
29798
29798
  if (c) {
29799
29799
  var y = t.fontMetrics().axisHeight;
29800
- f - o.depth - (y + 0.5 * u) < g && (f += g - (f - o.depth - (y + 0.5 * u))), y - 0.5 * u - (l.height - m) < g && (m += g - (y - 0.5 * u - (l.height - m)));
29800
+ f - o.depth - (y + 0.5 * u) < g && (f += g - (f - o.depth - (y + 0.5 * u))), y - 0.5 * u - (l.height - p) < g && (p += g - (y - 0.5 * u - (l.height - p)));
29801
29801
  var x = -(y - 0.5 * u);
29802
- p = E.makeVList({
29802
+ m = E.makeVList({
29803
29803
  positionType: "individualShift",
29804
29804
  children: [{
29805
29805
  type: "elem",
29806
29806
  elem: l,
29807
- shift: m
29807
+ shift: p
29808
29808
  }, {
29809
29809
  type: "elem",
29810
29810
  elem: c,
@@ -29816,13 +29816,13 @@ var Mu = (s, t) => {
29816
29816
  }]
29817
29817
  }, t);
29818
29818
  } else {
29819
- var _ = f - o.depth - (l.height - m);
29820
- _ < g && (f += 0.5 * (g - _), m += 0.5 * (g - _)), p = E.makeVList({
29819
+ var _ = f - o.depth - (l.height - p);
29820
+ _ < g && (f += 0.5 * (g - _), p += 0.5 * (g - _)), m = E.makeVList({
29821
29821
  positionType: "individualShift",
29822
29822
  children: [{
29823
29823
  type: "elem",
29824
29824
  elem: l,
29825
- shift: m
29825
+ shift: p
29826
29826
  }, {
29827
29827
  type: "elem",
29828
29828
  elem: o,
@@ -29830,11 +29830,11 @@ var Mu = (s, t) => {
29830
29830
  }]
29831
29831
  }, t);
29832
29832
  }
29833
- n = t.havingStyle(e), p.height *= n.sizeMultiplier / t.sizeMultiplier, p.depth *= n.sizeMultiplier / t.sizeMultiplier;
29833
+ n = t.havingStyle(e), m.height *= n.sizeMultiplier / t.sizeMultiplier, m.depth *= n.sizeMultiplier / t.sizeMultiplier;
29834
29834
  var w;
29835
29835
  e.size === ct.DISPLAY.size ? w = t.fontMetrics().delim1 : e.size === ct.SCRIPTSCRIPT.size ? w = t.havingStyle(ct.SCRIPT).fontMetrics().delim2 : w = t.fontMetrics().delim2;
29836
29836
  var M, C;
29837
- return s.leftDelim == null ? M = $s(t, ["mopen"]) : M = pi.customSizedDelim(s.leftDelim, w, !0, t.havingStyle(e), s.mode, ["mopen"]), s.continued ? C = E.makeSpan([]) : s.rightDelim == null ? C = $s(t, ["mclose"]) : C = pi.customSizedDelim(s.rightDelim, w, !0, t.havingStyle(e), s.mode, ["mclose"]), E.makeSpan(["mord"].concat(n.sizingClasses(t)), [M, E.makeSpan(["mfrac"], [p]), C], t);
29837
+ return s.leftDelim == null ? M = $s(t, ["mopen"]) : M = pi.customSizedDelim(s.leftDelim, w, !0, t.havingStyle(e), s.mode, ["mopen"]), s.continued ? C = E.makeSpan([]) : s.rightDelim == null ? C = $s(t, ["mclose"]) : C = pi.customSizedDelim(s.rightDelim, w, !0, t.havingStyle(e), s.mode, ["mclose"]), E.makeSpan(["mord"].concat(n.sizingClasses(t)), [M, E.makeSpan(["mfrac"], [m]), C], t);
29838
29838
  }, Ia = (s, t) => {
29839
29839
  var e = new j.MathNode("mfrac", [Lt(s.numer, t), Lt(s.denom, t)]);
29840
29840
  if (!s.hasBarLine)
@@ -30682,10 +30682,10 @@ var Cu = (s, t, e, i, r, n, o) => {
30682
30682
  }]
30683
30683
  }, i);
30684
30684
  } else if (l) {
30685
- var m = s.depth + o;
30685
+ var p = s.depth + o;
30686
30686
  d = E.makeVList({
30687
30687
  positionType: "bottom",
30688
- positionData: m,
30688
+ positionData: p,
30689
30689
  children: [{
30690
30690
  type: "elem",
30691
30691
  elem: s
@@ -30703,12 +30703,12 @@ var Cu = (s, t, e, i, r, n, o) => {
30703
30703
  }, i);
30704
30704
  } else
30705
30705
  return s;
30706
- var p = [d];
30706
+ var m = [d];
30707
30707
  if (h && n !== 0 && !a) {
30708
30708
  var _ = E.makeSpan(["mspace"], [], i);
30709
- _.style.marginRight = V(n), p.unshift(_);
30709
+ _.style.marginRight = V(n), m.unshift(_);
30710
30710
  }
30711
- return E.makeSpan(["mop", "op-limits"], p, i);
30711
+ return E.makeSpan(["mop", "op-limits"], m, i);
30712
30712
  }, Pu = ["\\smallint"], Ms = (s, t) => {
30713
30713
  var e, i, r = !1, n;
30714
30714
  s.type === "supsub" ? (e = s.sup, i = s.sub, n = yt(s.base, "op"), r = !0) : n = yt(s, "op");
@@ -30736,12 +30736,12 @@ var Cu = (s, t, e, i, r, n, o) => {
30736
30736
  var f = $t(n.body, t, !0);
30737
30737
  f.length === 1 && f[0] instanceof Pe ? (h = f[0], h.classes[0] = "mop") : h = E.makeSpan(["mop"], f, t);
30738
30738
  } else {
30739
- for (var g = [], m = 1; m < n.name.length; m++)
30740
- g.push(E.mathsym(n.name[m], n.mode, t));
30739
+ for (var g = [], p = 1; p < n.name.length; p++)
30740
+ g.push(E.mathsym(n.name[p], n.mode, t));
30741
30741
  h = E.makeSpan(["mop"], g, t);
30742
30742
  }
30743
- var p = 0, _ = 0;
30744
- return (h instanceof Pe || n.name === "\\oiint" || n.name === "\\oiiint") && !n.suppressBaseShift && (p = (h.height - h.depth) / 2 - t.fontMetrics().axisHeight, _ = h.italic), r ? Cu(h, e, i, t, o, _, p) : (p && (h.style.position = "relative", h.style.top = V(p)), h);
30743
+ var m = 0, _ = 0;
30744
+ return (h instanceof Pe || n.name === "\\oiint" || n.name === "\\oiiint") && !n.suppressBaseShift && (m = (h.height - h.depth) / 2 - t.fontMetrics().axisHeight, _ = h.italic), r ? Cu(h, e, i, t, o, _, m) : (m && (h.style.position = "relative", h.style.top = V(m)), h);
30745
30745
  }, ar = (s, t) => {
30746
30746
  var e;
30747
30747
  if (s.symbol)
@@ -31338,12 +31338,12 @@ Y({
31338
31338
  }]
31339
31339
  }, t);
31340
31340
  if (s.index) {
31341
- var g = t.havingStyle(ct.SCRIPTSCRIPT), m = Tt(s.index, g, t), p = 0.6 * (f.height - f.depth), _ = E.makeVList({
31341
+ var g = t.havingStyle(ct.SCRIPTSCRIPT), p = Tt(s.index, g, t), m = 0.6 * (f.height - f.depth), _ = E.makeVList({
31342
31342
  positionType: "shift",
31343
- positionData: -p,
31343
+ positionData: -m,
31344
31344
  children: [{
31345
31345
  type: "elem",
31346
- elem: m
31346
+ elem: p
31347
31347
  }]
31348
31348
  }, t), y = E.makeSpan(["root"], [_]);
31349
31349
  return E.makeSpan(["mord", "sqrt"], [y, f], t);
@@ -31440,16 +31440,16 @@ es({
31440
31440
  var g = t.havingStyle(t.style.sub());
31441
31441
  h = Tt(n, g, t), d || (u = o.depth + g.fontMetrics().subDrop * g.sizeMultiplier / t.sizeMultiplier);
31442
31442
  }
31443
- var m;
31444
- t.style === ct.DISPLAY ? m = l.sup1 : t.style.cramped ? m = l.sup3 : m = l.sup2;
31445
- var p = t.sizeMultiplier, _ = V(0.5 / l.ptPerEm / p), y = null;
31443
+ var p;
31444
+ t.style === ct.DISPLAY ? p = l.sup1 : t.style.cramped ? p = l.sup3 : p = l.sup2;
31445
+ var m = t.sizeMultiplier, _ = V(0.5 / l.ptPerEm / m), y = null;
31446
31446
  if (h) {
31447
31447
  var x = s.base && s.base.type === "op" && s.base.name && (s.base.name === "\\oiint" || s.base.name === "\\oiiint");
31448
31448
  (o instanceof Pe || x) && (y = V(-o.italic));
31449
31449
  }
31450
31450
  var w;
31451
31451
  if (a && h) {
31452
- c = Math.max(c, m, a.depth + 0.25 * l.xHeight), u = Math.max(u, l.sub2);
31452
+ c = Math.max(c, p, a.depth + 0.25 * l.xHeight), u = Math.max(u, l.sub2);
31453
31453
  var M = l.defaultRuleThickness, C = 4 * M;
31454
31454
  if (c - a.depth - (h.height - u) < C) {
31455
31455
  u = C - (c - a.depth) + h.height;
@@ -31486,7 +31486,7 @@ es({
31486
31486
  children: O
31487
31487
  }, t);
31488
31488
  } else if (a)
31489
- c = Math.max(c, m, a.depth + 0.25 * l.xHeight), w = E.makeVList({
31489
+ c = Math.max(c, p, a.depth + 0.25 * l.xHeight), w = E.makeVList({
31490
31490
  positionType: "shift",
31491
31491
  positionData: -c,
31492
31492
  children: [{
@@ -34019,81 +34019,81 @@ function my(s) {
34019
34019
  switch (u.toUpperCase()) {
34020
34020
  case "M": {
34021
34021
  e.length > 0 && (t.push(e), e = []);
34022
- for (let m = 0; m < d.length; m += 2) {
34023
- const p = f ? i + d[m] : d[m], _ = f ? r + d[m + 1] : d[m + 1];
34024
- m === 0 ? (n = p, o = _, e.push([p, _])) : ls(e, i, r, p, _), i = p, r = _;
34022
+ for (let p = 0; p < d.length; p += 2) {
34023
+ const m = f ? i + d[p] : d[p], _ = f ? r + d[p + 1] : d[p + 1];
34024
+ p === 0 ? (n = m, o = _, e.push([m, _])) : ls(e, i, r, m, _), i = m, r = _;
34025
34025
  }
34026
34026
  l = "M";
34027
34027
  break;
34028
34028
  }
34029
34029
  case "L": {
34030
- for (let m = 0; m < d.length; m += 2) {
34031
- const p = f ? i + d[m] : d[m], _ = f ? r + d[m + 1] : d[m + 1];
34032
- ls(e, i, r, p, _), i = p, r = _;
34030
+ for (let p = 0; p < d.length; p += 2) {
34031
+ const m = f ? i + d[p] : d[p], _ = f ? r + d[p + 1] : d[p + 1];
34032
+ ls(e, i, r, m, _), i = m, r = _;
34033
34033
  }
34034
34034
  l = "L";
34035
34035
  break;
34036
34036
  }
34037
34037
  case "H": {
34038
- for (const m of d) {
34039
- const p = f ? i + m : m;
34040
- ls(e, i, r, p, r), i = p;
34038
+ for (const p of d) {
34039
+ const m = f ? i + p : p;
34040
+ ls(e, i, r, m, r), i = m;
34041
34041
  }
34042
34042
  l = "H";
34043
34043
  break;
34044
34044
  }
34045
34045
  case "V": {
34046
- for (const m of d) {
34047
- const p = f ? r + m : m;
34048
- ls(e, i, r, i, p), r = p;
34046
+ for (const p of d) {
34047
+ const m = f ? r + p : p;
34048
+ ls(e, i, r, i, m), r = m;
34049
34049
  }
34050
34050
  l = "V";
34051
34051
  break;
34052
34052
  }
34053
34053
  case "C": {
34054
- for (let m = 0; m < d.length; m += 6) {
34055
- let p = d[m], _ = d[m + 1], y = d[m + 2], x = d[m + 3], w = d[m + 4], M = d[m + 5];
34056
- f && (p += i, _ += r, y += i, x += r, w += i, M += r), e.push([p, _], [y, x], [w, M]), a = y, h = x, i = w, r = M;
34054
+ for (let p = 0; p < d.length; p += 6) {
34055
+ let m = d[p], _ = d[p + 1], y = d[p + 2], x = d[p + 3], w = d[p + 4], M = d[p + 5];
34056
+ f && (m += i, _ += r, y += i, x += r, w += i, M += r), e.push([m, _], [y, x], [w, M]), a = y, h = x, i = w, r = M;
34057
34057
  }
34058
34058
  l = "C";
34059
34059
  break;
34060
34060
  }
34061
34061
  case "S": {
34062
- for (let m = 0; m < d.length; m += 4) {
34063
- let p = i, _ = r;
34064
- (l === "C" || l === "S") && (p = 2 * i - a, _ = 2 * r - h);
34065
- let y = d[m], x = d[m + 1], w = d[m + 2], M = d[m + 3];
34066
- f && (y += i, x += r, w += i, M += r), e.push([p, _], [y, x], [w, M]), a = y, h = x, i = w, r = M, l = "S";
34062
+ for (let p = 0; p < d.length; p += 4) {
34063
+ let m = i, _ = r;
34064
+ (l === "C" || l === "S") && (m = 2 * i - a, _ = 2 * r - h);
34065
+ let y = d[p], x = d[p + 1], w = d[p + 2], M = d[p + 3];
34066
+ f && (y += i, x += r, w += i, M += r), e.push([m, _], [y, x], [w, M]), a = y, h = x, i = w, r = M, l = "S";
34067
34067
  }
34068
34068
  break;
34069
34069
  }
34070
34070
  case "Q": {
34071
- for (let m = 0; m < d.length; m += 4) {
34072
- let p = d[m], _ = d[m + 1], y = d[m + 2], x = d[m + 3];
34073
- f && (p += i, _ += r, y += i, x += r);
34074
- const w = i + 2 / 3 * (p - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (p - y), P = x + 2 / 3 * (_ - x);
34075
- e.push([w, M], [C, P], [y, x]), a = p, h = _, i = y, r = x;
34071
+ for (let p = 0; p < d.length; p += 4) {
34072
+ let m = d[p], _ = d[p + 1], y = d[p + 2], x = d[p + 3];
34073
+ f && (m += i, _ += r, y += i, x += r);
34074
+ const w = i + 2 / 3 * (m - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (m - y), P = x + 2 / 3 * (_ - x);
34075
+ e.push([w, M], [C, P], [y, x]), a = m, h = _, i = y, r = x;
34076
34076
  }
34077
34077
  l = "Q";
34078
34078
  break;
34079
34079
  }
34080
34080
  case "T": {
34081
- for (let m = 0; m < d.length; m += 2) {
34082
- let p = i, _ = r;
34083
- (l === "Q" || l === "T") && (p = 2 * i - a, _ = 2 * r - h);
34084
- let y = d[m], x = d[m + 1];
34081
+ for (let p = 0; p < d.length; p += 2) {
34082
+ let m = i, _ = r;
34083
+ (l === "Q" || l === "T") && (m = 2 * i - a, _ = 2 * r - h);
34084
+ let y = d[p], x = d[p + 1];
34085
34085
  f && (y += i, x += r);
34086
- const w = i + 2 / 3 * (p - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (p - y), P = x + 2 / 3 * (_ - x);
34087
- e.push([w, M], [C, P], [y, x]), a = p, h = _, i = y, r = x, l = "T";
34086
+ const w = i + 2 / 3 * (m - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (m - y), P = x + 2 / 3 * (_ - x);
34087
+ e.push([w, M], [C, P], [y, x]), a = m, h = _, i = y, r = x, l = "T";
34088
34088
  }
34089
34089
  break;
34090
34090
  }
34091
34091
  case "A": {
34092
- for (let m = 0; m < d.length; m += 7) {
34093
- const p = d[m], _ = d[m + 1], y = d[m + 2] * Math.PI / 180, x = d[m + 3], w = d[m + 4];
34094
- let M = d[m + 5], C = d[m + 6];
34092
+ for (let p = 0; p < d.length; p += 7) {
34093
+ const m = d[p], _ = d[p + 1], y = d[p + 2] * Math.PI / 180, x = d[p + 3], w = d[p + 4];
34094
+ let M = d[p + 5], C = d[p + 6];
34095
34095
  f && (M += i, C += r);
34096
- const P = gy(i, r, M, C, p, _, y, x, w);
34096
+ const P = gy(i, r, M, C, m, _, y, x, w);
34097
34097
  for (const R of P)
34098
34098
  e.push(R);
34099
34099
  i = M, r = C;
@@ -34118,16 +34118,16 @@ function gy(s, t, e, i, r, n, o, a, h) {
34118
34118
  const u = [];
34119
34119
  if (l === 0 || c === 0 || s === e && t === i)
34120
34120
  return ls(u, s, t, e, i), u;
34121
- const d = Math.cos(o), f = Math.sin(o), g = (s - e) / 2, m = (t - i) / 2, p = d * g + f * m, _ = -f * g + d * m, y = p * p / (l * l) + _ * _ / (c * c);
34121
+ const d = Math.cos(o), f = Math.sin(o), g = (s - e) / 2, p = (t - i) / 2, m = d * g + f * p, _ = -f * g + d * p, y = m * m / (l * l) + _ * _ / (c * c);
34122
34122
  if (y > 1) {
34123
34123
  const q = Math.sqrt(y);
34124
34124
  l *= q, c *= q;
34125
34125
  }
34126
- const x = a === h ? -1 : 1, w = l * l * _ * _ + c * c * p * p, M = Math.max(0, (l * l * c * c - w) / w), C = x * Math.sqrt(M), P = C * l * _ / c, R = -C * c * p / l, O = d * P - f * R + (s + e) / 2, z = f * P + d * R + (t + i) / 2, I = Jl(1, 0, (p - P) / l, (_ - R) / c);
34126
+ const x = a === h ? -1 : 1, w = l * l * _ * _ + c * c * m * m, M = Math.max(0, (l * l * c * c - w) / w), C = x * Math.sqrt(M), P = C * l * _ / c, R = -C * c * m / l, O = d * P - f * R + (s + e) / 2, z = f * P + d * R + (t + i) / 2, I = Jl(1, 0, (m - P) / l, (_ - R) / c);
34127
34127
  let W = Jl(
34128
- (p - P) / l,
34128
+ (m - P) / l,
34129
34129
  (_ - R) / c,
34130
- (-p - P) / l,
34130
+ (-m - P) / l,
34131
34131
  (-_ - R) / c
34132
34132
  );
34133
34133
  h === 0 && W > 0 && (W -= 2 * Math.PI), h === 1 && W < 0 && (W += 2 * Math.PI);
@@ -34152,17 +34152,17 @@ function _y(s, t = {}) {
34152
34152
  flipY: o = !0
34153
34153
  } = t, a = new Mt(), h = /* @__PURE__ */ new Map();
34154
34154
  s.querySelectorAll("defs path").forEach((g) => {
34155
- const m = g.getAttribute("id"), p = g.getAttribute("d");
34156
- m && p && h.set(m, p);
34155
+ const p = g.getAttribute("id"), m = g.getAttribute("d");
34156
+ p && m && h.set(p, m);
34157
34157
  });
34158
34158
  const c = s.getAttribute?.("viewBox");
34159
34159
  let u = 1;
34160
34160
  c && (u = 1 / (c.split(/\s+/).map(Number)[2] || 1e3));
34161
34161
  const d = n * u;
34162
- function f(g, m, p) {
34162
+ function f(g, p, m) {
34163
34163
  const _ = g.tagName.toLowerCase();
34164
34164
  if (_ === "defs") return;
34165
- let y = m, x = p;
34165
+ let y = p, x = m;
34166
34166
  const w = g.getAttribute("transform");
34167
34167
  if (w) {
34168
34168
  const M = w.match(/translate\s*\(\s*([^,\s]+)[\s,]+([^)]+)\)/);
@@ -34207,8 +34207,8 @@ function yo(s, t, e, i, r, n, o, a) {
34207
34207
  const l = [], c = [];
34208
34208
  for (const d of h) {
34209
34209
  const f = l.length;
34210
- for (const [m, p] of d) {
34211
- const _ = (m + t) * i, y = r ? -(p + e) * i : (p + e) * i;
34210
+ for (const [p, m] of d) {
34211
+ const _ = (p + t) * i, y = r ? -(m + e) * i : (m + e) * i;
34212
34212
  l.push([_, y, 0]);
34213
34213
  }
34214
34214
  const g = l.length - f;
@@ -34268,11 +34268,11 @@ async function Hr(s, t = {}) {
34268
34268
  } = t, a = await Uu();
34269
34269
  let h, l;
34270
34270
  if (a.strategy === "global") {
34271
- const m = a.MathJax;
34272
- if (Object.keys(n).length > 0 && (m.tex = m.tex || {}, m.tex.macros = { ...m.tex.macros, ...n }), h = m.tex2svg(s, { display: e }).querySelector("svg"), !h)
34271
+ const p = a.MathJax;
34272
+ if (Object.keys(n).length > 0 && (p.tex = p.tex || {}, p.tex.macros = { ...p.tex.macros, ...n }), h = p.tex2svg(s, { display: e }).querySelector("svg"), !h)
34273
34273
  throw new Error(`MathJax failed to produce SVG for: ${s}`);
34274
34274
  try {
34275
- const _ = m.startup?.adaptor, y = m.startup?.output?.fontCache?.defs;
34275
+ const _ = p.startup?.adaptor, y = p.startup?.output?.fontCache?.defs;
34276
34276
  if (_ && y) {
34277
34277
  const x = _.outerHTML(y);
34278
34278
  if (x) {
@@ -34286,23 +34286,23 @@ async function Hr(s, t = {}) {
34286
34286
  }
34287
34287
  l = h.outerHTML;
34288
34288
  } else {
34289
- const { mjModule: m, texModule: p, svgModule: _, adaptor: y } = a, x = m.mathjax, w = p.TeX, M = _.SVG, C = new w({
34289
+ const { mjModule: p, texModule: m, svgModule: _, adaptor: y } = a, x = p.mathjax, w = m.TeX, M = _.SVG, C = new w({
34290
34290
  packages: ["base", "ams", "newcommand", "configmacros"],
34291
34291
  ...Object.keys(n).length > 0 ? { macros: n } : {}
34292
34292
  }), P = new M({ fontCache: "none" }), O = x.document("", { InputJax: C, OutputJax: P }).convert(s, { display: e });
34293
34293
  l = y.outerHTML(O), h = new DOMParser().parseFromString(l, "image/svg+xml").documentElement;
34294
34294
  }
34295
- h.setAttribute("color", i), h.setAttribute("style", `color:${i};`), h.querySelectorAll("path, line, rect, circle, polyline, polygon, use").forEach((m) => {
34296
- const p = m.getAttribute("fill");
34297
- (!p || p === "currentColor" || p === "inherit") && m.setAttribute("fill", i);
34298
- const _ = m.getAttribute("stroke");
34299
- (_ === "currentColor" || _ === "inherit") && m.setAttribute("stroke", i);
34295
+ h.setAttribute("color", i), h.setAttribute("style", `color:${i};`), h.querySelectorAll("path, line, rect, circle, polyline, polygon, use").forEach((p) => {
34296
+ const m = p.getAttribute("fill");
34297
+ (!m || m === "currentColor" || m === "inherit") && p.setAttribute("fill", i);
34298
+ const _ = p.getAttribute("stroke");
34299
+ (_ === "currentColor" || _ === "inherit") && p.setAttribute("stroke", i);
34300
34300
  });
34301
34301
  const u = h.getAttribute("viewBox");
34302
34302
  let d = 0, f = 0;
34303
34303
  if (u) {
34304
- const m = u.split(/\s+/);
34305
- d = parseFloat(m[2]) || 0, f = parseFloat(m[3]) || 0;
34304
+ const p = u.split(/\s+/);
34305
+ d = parseFloat(p[2]) || 0, f = parseFloat(p[3]) || 0;
34306
34306
  }
34307
34307
  d *= r, f *= r;
34308
34308
  const g = _y(h, { color: i, scale: r, flipY: !1 });
@@ -34577,19 +34577,19 @@ class ae extends st {
34577
34577
  }
34578
34578
  const f = 2, g = document.createElement("canvas");
34579
34579
  g.width = u * f, g.height = d * f;
34580
- const m = g.getContext("2d");
34581
- m.scale(f, f), await new Promise((_) => {
34580
+ const p = g.getContext("2d");
34581
+ p.scale(f, f), await new Promise((_) => {
34582
34582
  const y = new Image();
34583
34583
  y.onload = () => {
34584
- m.drawImage(y, c, c, a, h), URL.revokeObjectURL(y.src), _();
34584
+ p.drawImage(y, c, c, a, h), URL.revokeObjectURL(y.src), _();
34585
34585
  }, y.onerror = () => {
34586
34586
  URL.revokeObjectURL(y.src), console.warn("MathTex (MathJax): Failed to rasterize SVG"), _();
34587
34587
  };
34588
34588
  const x = new Blob([l], { type: "image/svg+xml;charset=utf-8" });
34589
34589
  y.src = URL.createObjectURL(x);
34590
34590
  }), this._renderState.canvas = g, this._renderState.texture && this._renderState.texture.dispose(), this._renderState.texture = new S.CanvasTexture(g), this._renderState.texture.minFilter = S.LinearFilter, this._renderState.texture.magFilter = S.LinearFilter, this._renderState.texture.needsUpdate = !0;
34591
- const p = 0.01;
34592
- if (this._renderState.width = u * p, this._renderState.height = d * p, this._renderState.mesh) {
34591
+ const m = 0.01;
34592
+ if (this._renderState.width = u * m, this._renderState.height = d * m, this._renderState.mesh) {
34593
34593
  this._updateMeshGeometry();
34594
34594
  const _ = this._renderState.mesh.material;
34595
34595
  _.map = this._renderState.texture, _.needsUpdate = !0;
@@ -34652,10 +34652,10 @@ class ae extends st {
34652
34652
  if (f.nodeType === Node.TEXT_NODE) {
34653
34653
  const g = f.textContent;
34654
34654
  if (!g || !g.trim() || /^[\u200B\u200C\u200D\uFEFF]+$/.test(g)) return;
34655
- const m = f.parentElement;
34656
- if (!m) return;
34657
- const p = window.getComputedStyle(m);
34658
- if (p.display === "none" || p.visibility === "hidden" || parseFloat(p.opacity) === 0) return;
34655
+ const p = f.parentElement;
34656
+ if (!p) return;
34657
+ const m = window.getComputedStyle(p);
34658
+ if (m.display === "none" || m.visibility === "hidden" || parseFloat(m.opacity) === 0) return;
34659
34659
  const _ = document.createRange();
34660
34660
  _.selectNodeContents(f);
34661
34661
  const y = _.getClientRects();
@@ -34666,7 +34666,7 @@ class ae extends st {
34666
34666
  text: g,
34667
34667
  x: x.left - e.left + n,
34668
34668
  y: x.top - e.top + n,
34669
- font: `${p.fontStyle} ${p.fontWeight} ${p.fontSize} ${p.fontFamily}`
34669
+ font: `${m.fontStyle} ${m.fontWeight} ${m.fontSize} ${m.fontFamily}`
34670
34670
  });
34671
34671
  return;
34672
34672
  }
@@ -34698,16 +34698,16 @@ class ae extends st {
34698
34698
  }
34699
34699
  return;
34700
34700
  }
34701
- const m = window.getComputedStyle(g), p = parseFloat(m.borderBottomWidth) || 0, _ = parseFloat(m.borderTopWidth) || 0;
34702
- if (p > 0 || _ > 0) {
34701
+ const p = window.getComputedStyle(g), m = parseFloat(p.borderBottomWidth) || 0, _ = parseFloat(p.borderTopWidth) || 0;
34702
+ if (m > 0 || _ > 0) {
34703
34703
  const x = g.getBoundingClientRect();
34704
34704
  if (x.width > 0) {
34705
34705
  const w = x.left - e.left + n, M = x.top - e.top + n;
34706
- p > 0 && u.push({
34706
+ m > 0 && u.push({
34707
34707
  x: w,
34708
- y: M + x.height - p,
34708
+ y: M + x.height - m,
34709
34709
  w: x.width,
34710
- h: Math.max(p, 1)
34710
+ h: Math.max(m, 1)
34711
34711
  }), _ > 0 && u.push({
34712
34712
  x: w,
34713
34713
  y: M,
@@ -34716,7 +34716,7 @@ class ae extends st {
34716
34716
  });
34717
34717
  }
34718
34718
  }
34719
- const y = m.backgroundColor;
34719
+ const y = p.backgroundColor;
34720
34720
  if (y && y !== "transparent" && y !== "rgba(0, 0, 0, 0)") {
34721
34721
  const x = g.getBoundingClientRect();
34722
34722
  x.width > 0 && x.height > 0 && u.push({
@@ -34731,21 +34731,21 @@ class ae extends st {
34731
34731
  }
34732
34732
  };
34733
34733
  d(t), c.length > 0 && await Promise.all(c.map((f) => new Promise((g) => {
34734
- const m = new Image();
34735
- m.onload = () => {
34736
- h.drawImage(m, f.x, f.y, f.w, f.h), URL.revokeObjectURL(m.src), g();
34737
- }, m.onerror = () => {
34738
- URL.revokeObjectURL(m.src), g();
34734
+ const p = new Image();
34735
+ p.onload = () => {
34736
+ h.drawImage(p, f.x, f.y, f.w, f.h), URL.revokeObjectURL(p.src), g();
34737
+ }, p.onerror = () => {
34738
+ URL.revokeObjectURL(p.src), g();
34739
34739
  };
34740
- const p = new Blob([f.svgString], { type: "image/svg+xml;charset=utf-8" });
34741
- m.src = URL.createObjectURL(p);
34740
+ const m = new Blob([f.svgString], { type: "image/svg+xml;charset=utf-8" });
34741
+ p.src = URL.createObjectURL(m);
34742
34742
  })));
34743
34743
  for (const f of u)
34744
34744
  h.fillStyle = "#ffffff", h.fillRect(f.x, f.y, f.w, f.h);
34745
34745
  for (const f of l) {
34746
34746
  h.font = f.font, h.fillStyle = "#ffffff", h.textBaseline = "alphabetic", h.textAlign = "left";
34747
- const g = h.measureText(f.text), m = f.y + (g.fontBoundingBoxAscent ?? 0);
34748
- h.fillText(f.text, f.x, m);
34747
+ const g = h.measureText(f.text), p = f.y + (g.fontBoundingBoxAscent ?? 0);
34748
+ h.fillText(f.text, f.x, p);
34749
34749
  }
34750
34750
  return a;
34751
34751
  }
@@ -34877,13 +34877,13 @@ class ln extends B {
34877
34877
  for (let u = t; u <= e + c; u += i) {
34878
34878
  const d = Math.round(u / i) * i;
34879
34879
  if (d < t - c || d > e + c) continue;
34880
- const f = this._numberToX(d), m = h.has(Math.round(d * 1e9) / 1e9) ? l : this._tickSize, p = new B();
34881
- p.color = this.color, p.strokeWidth = this.strokeWidth, p.fillOpacity = 0, p.setPoints3D([
34882
- [f, -m, 0],
34883
- [f, -m / 3, 0],
34884
- [f, m / 3, 0],
34885
- [f, m, 0]
34886
- ]), this._tickMarks.push(p), this.add(p);
34880
+ const f = this._numberToX(d), p = h.has(Math.round(d * 1e9) / 1e9) ? l : this._tickSize, m = new B();
34881
+ m.color = this.color, m.strokeWidth = this.strokeWidth, m.fillOpacity = 0, m.setPoints3D([
34882
+ [f, -p, 0],
34883
+ [f, -p / 3, 0],
34884
+ [f, p / 3, 0],
34885
+ [f, p, 0]
34886
+ ]), this._tickMarks.push(m), this.add(m);
34887
34887
  }
34888
34888
  }
34889
34889
  for (const h of this._numberLabels)
@@ -34894,12 +34894,12 @@ class ln extends B {
34894
34894
  const h = new Set(this._numbersToExclude), l = new Set(this._numbersWithElongatedTicks.map((u) => Math.round(u * 1e9) / 1e9)), c = this._tickSize * 1.5;
34895
34895
  for (const u of a) {
34896
34896
  if (h.has(u) || u < t - i * 0.01 || u > e + i * 0.01) continue;
34897
- const d = this._numberToX(u), g = (Number.isInteger(u) ? String(u) : u.toFixed(this._decimalPlaces)).replace(/^-/, "-"), m = new ae({
34897
+ const d = this._numberToX(u), g = (Number.isInteger(u) ? String(u) : u.toFixed(this._decimalPlaces)).replace(/^-/, "-"), p = new ae({
34898
34898
  latex: g,
34899
34899
  fontSize: this._numberFontSize,
34900
34900
  color: "#ffffff"
34901
- }), p = l.has(Math.round(u * 1e9) / 1e9) ? c : this._tickSize;
34902
- m.position.set(d, -p - 0.35, 0), this._numberLabels.push(m), this.add(m);
34901
+ }), m = l.has(Math.round(u * 1e9) / 1e9) ? c : this._tickSize;
34902
+ p.position.set(d, -m - 0.35, 0), this._numberLabels.push(p), this.add(p);
34903
34903
  }
34904
34904
  }
34905
34905
  }
@@ -35291,8 +35291,8 @@ class Va extends ze {
35291
35291
  const y = _.position.y;
35292
35292
  _.position.set(-0.45, y, 0);
35293
35293
  }
35294
- const m = this._numberToVisualX(0), p = this._numberToVisualY(0);
35295
- this.yAxis.position.x = m, this.xAxis.position.y = p, this.add(this.xAxis), this.add(this.yAxis), this._tips && this._addTips(o);
35294
+ const p = this._numberToVisualX(0), m = this._numberToVisualY(0);
35295
+ this.yAxis.position.x = p, this.xAxis.position.y = m, this.add(this.xAxis), this.add(this.yAxis), this._tips && this._addTips(o);
35296
35296
  }
35297
35297
  /**
35298
35298
  * Add arrow tips to the axes
@@ -35301,11 +35301,11 @@ class Va extends ze {
35301
35301
  const e = this._xLength / 2, i = this._yLength / 2, r = this._tipLength * 0.6, n = this._numberToVisualY(0), o = this._numberToVisualX(0), a = (c, u, d) => {
35302
35302
  const f = new B();
35303
35303
  f.color = t, f.fillOpacity = 1, f.strokeWidth = 0;
35304
- const g = (p, _, y, x) => {
35304
+ const g = (m, _, y, x) => {
35305
35305
  const w = y[0] - _[0], M = y[1] - _[1], C = y[2] - _[2];
35306
- x && p.push([..._]), p.push([_[0] + w / 3, _[1] + M / 3, _[2] + C / 3]), p.push([_[0] + 2 * w / 3, _[1] + 2 * M / 3, _[2] + 2 * C / 3]), p.push([...y]);
35307
- }, m = [];
35308
- return g(m, u, c, !0), g(m, c, d, !1), g(m, d, u, !1), f.setPoints3D(m), f;
35306
+ x && m.push([..._]), m.push([_[0] + w / 3, _[1] + M / 3, _[2] + C / 3]), m.push([_[0] + 2 * w / 3, _[1] + 2 * M / 3, _[2] + 2 * C / 3]), m.push([...y]);
35307
+ }, p = [];
35308
+ return g(p, u, c, !0), g(p, c, d, !1), g(p, d, u, !1), f.setPoints3D(p), f;
35309
35309
  };
35310
35310
  this._xTip = a(
35311
35311
  [e + this._tipLength, n, 0],
@@ -35506,13 +35506,13 @@ class Va extends ze {
35506
35506
  for (let f = l; f < c - r * 1e-3; f += r) {
35507
35507
  const g = u(f);
35508
35508
  if (!isFinite(g) || isNaN(g)) continue;
35509
- const m = this.coordsToPoint(f, 0), p = this.coordsToPoint(f + r, 0), _ = this.coordsToPoint(f + r, g), y = this.coordsToPoint(f, g), x = new B();
35509
+ const p = this.coordsToPoint(f, 0), m = this.coordsToPoint(f + r, 0), _ = this.coordsToPoint(f + r, g), y = this.coordsToPoint(f, g), x = new B();
35510
35510
  x.color = h, x.fillColor = n, x.fillOpacity = o, x.strokeWidth = a;
35511
35511
  const w = [], M = (C, P, R) => {
35512
35512
  const O = P[0] - C[0], z = P[1] - C[1], I = P[2] - C[2];
35513
35513
  R && w.push([...C]), w.push([C[0] + O / 3, C[1] + z / 3, C[2] + I / 3]), w.push([C[0] + 2 * O / 3, C[1] + 2 * z / 3, C[2] + 2 * I / 3]), w.push([...P]);
35514
35514
  };
35515
- M(m, y, !0), M(y, _, !1), M(_, p, !1), M(p, m, !1), x.setPoints3D(w), d.add(x);
35515
+ M(p, y, !0), M(y, _, !1), M(_, m, !1), M(m, p, !1), x.setPoints3D(w), d.add(x);
35516
35516
  }
35517
35517
  return d;
35518
35518
  }
@@ -35536,24 +35536,24 @@ class Va extends ze {
35536
35536
  const x = h + y * u, w = d(x);
35537
35537
  isFinite(w) && !isNaN(w) && g.push(this.coordsToPoint(x, w));
35538
35538
  }
35539
- const m = [];
35539
+ const p = [];
35540
35540
  if (r) {
35541
35541
  const y = r.getFunction();
35542
35542
  for (let x = c; x >= 0; x--) {
35543
35543
  const w = h + x * u, M = y(w);
35544
- isFinite(M) && !isNaN(M) && m.push(this.coordsToPoint(w, M));
35544
+ isFinite(M) && !isNaN(M) && p.push(this.coordsToPoint(w, M));
35545
35545
  }
35546
35546
  } else
35547
35547
  for (let y = c; y >= 0; y--) {
35548
35548
  const x = h + y * u;
35549
- m.push(this.coordsToPoint(x, 0));
35549
+ p.push(this.coordsToPoint(x, 0));
35550
35550
  }
35551
- const p = [...g, ...m];
35552
- if (p.length < 3) return f;
35553
- p.push([...p[0]]);
35551
+ const m = [...g, ...p];
35552
+ if (m.length < 3) return f;
35553
+ m.push([...m[0]]);
35554
35554
  const _ = [];
35555
- for (let y = 0; y < p.length - 1; y++) {
35556
- const x = p[y], w = p[y + 1], M = w[0] - x[0], C = w[1] - x[1], P = w[2] - x[2];
35555
+ for (let y = 0; y < m.length - 1; y++) {
35556
+ const x = m[y], w = m[y + 1], M = w[0] - x[0], C = w[1] - x[1], P = w[2] - x[2];
35557
35557
  y === 0 && _.push([...x]), _.push([x[0] + M / 3, x[1] + C / 3, x[2] + P / 3]), _.push([x[0] + 2 * M / 3, x[1] + 2 * C / 3, x[2] + 2 * P / 3]), _.push([...w]);
35558
35558
  }
35559
35559
  return f.setPoints3D(_), f;
@@ -35584,8 +35584,8 @@ class Va extends ze {
35584
35584
  c.color = r, c.fillOpacity = 0, c.strokeWidth = h;
35585
35585
  const u = [];
35586
35586
  for (let d = 0; d < e.length - 1; d++) {
35587
- const f = this.coordsToPoint(e[d], i[d]), g = this.coordsToPoint(e[d + 1], i[d + 1]), m = g[0] - f[0], p = g[1] - f[1], _ = g[2] - f[2];
35588
- d === 0 && u.push([...f]), u.push([f[0] + m / 3, f[1] + p / 3, f[2] + _ / 3]), u.push([f[0] + 2 * m / 3, f[1] + 2 * p / 3, f[2] + 2 * _ / 3]), u.push([...g]);
35587
+ const f = this.coordsToPoint(e[d], i[d]), g = this.coordsToPoint(e[d + 1], i[d + 1]), p = g[0] - f[0], m = g[1] - f[1], _ = g[2] - f[2];
35588
+ d === 0 && u.push([...f]), u.push([f[0] + p / 3, f[1] + m / 3, f[2] + _ / 3]), u.push([f[0] + 2 * p / 3, f[1] + 2 * m / 3, f[2] + 2 * _ / 3]), u.push([...g]);
35589
35589
  }
35590
35590
  c.setPoints3D(u), l.set("line_graph", c);
35591
35591
  }
@@ -35661,7 +35661,7 @@ class ju extends Va {
35661
35661
  const [t, e, i] = this._xRange, [r, n, o] = this._yRange, { color: a, strokeWidth: h, opacity: l } = this._backgroundLineStyle;
35662
35662
  for (; this._backgroundLines.children.length > 0; )
35663
35663
  this._backgroundLines.remove(this._backgroundLines.children[0]);
35664
- const c = 1e-4, u = Math.ceil(2 / i), d = Math.ceil(2 / o), f = t - u * i, g = e + u * i, m = r - d * o, p = n + d * o, _ = this._xLength / 2 + u * i + 1, y = this._yLength / 2 + d * o + 1;
35664
+ const c = 1e-4, u = Math.ceil(2 / i), d = Math.ceil(2 / o), f = t - u * i, g = e + u * i, p = r - d * o, m = n + d * o, _ = this._xLength / 2 + u * i + 1, y = this._yLength / 2 + d * o + 1;
35665
35665
  if (i > 0)
35666
35666
  for (let x = f; x <= g + c; x += i) {
35667
35667
  const w = Math.round(x / i) * i, [M] = this.coordsToPoint(w, 0), C = M - this.position.x, P = new _e({
@@ -35673,7 +35673,7 @@ class ju extends Va {
35673
35673
  P.setOpacity(this._calculateLineOpacity(w, 0, l)), this._backgroundLines.add(P);
35674
35674
  }
35675
35675
  if (o > 0)
35676
- for (let x = m; x <= p + c; x += o) {
35676
+ for (let x = p; x <= m + c; x += o) {
35677
35677
  const w = Math.round(x / o) * o, [, M] = this.coordsToPoint(0, w), C = M - this.position.y, P = new _e({
35678
35678
  start: [-_, C, 0],
35679
35679
  end: [_, C, 0],
@@ -35698,10 +35698,10 @@ class ju extends Va {
35698
35698
  H.setOpacity(M), this._backgroundLines.add(H);
35699
35699
  }
35700
35700
  if (o > 0 && P > 0)
35701
- for (let R = m; R <= p + c; R += o)
35701
+ for (let R = p; R <= m + c; R += o)
35702
35702
  for (let O = 1; O <= this._fadedLineRatio; O++) {
35703
35703
  const z = Math.round(R / o) * o + O * P;
35704
- if (z > p + c) break;
35704
+ if (z > m + c) break;
35705
35705
  const [, I] = this.coordsToPoint(0, z), W = I - this.position.y, H = new _e({
35706
35706
  start: [-_, W, 0],
35707
35707
  end: [_, W, 0],
@@ -35819,9 +35819,9 @@ class Nu extends B {
35819
35819
  */
35820
35820
  _marchingSquares() {
35821
35821
  const [t, e] = this._xRange, [i, r] = this._yRange, n = Math.pow(2, this._minDepth), o = (e - t) / n, a = (r - i) / n, h = /* @__PURE__ */ new Map(), l = (u, d) => {
35822
- const f = Math.pow(2, this._maxDepth), g = Math.round((u - t) * f / (e - t)), m = Math.round((d - i) * f / (r - i)), p = `${g},${m}`;
35823
- let _ = h.get(p);
35824
- return _ === void 0 && (_ = this._func(u, d), h.set(p, _)), _;
35822
+ const f = Math.pow(2, this._maxDepth), g = Math.round((u - t) * f / (e - t)), p = Math.round((d - i) * f / (r - i)), m = `${g},${p}`;
35823
+ let _ = h.get(m);
35824
+ return _ === void 0 && (_ = this._func(u, d), h.set(m, _)), _;
35825
35825
  }, c = [];
35826
35826
  for (let u = 0; u < n; u++)
35827
35827
  for (let d = 0; d < n; d++) {
@@ -35866,14 +35866,14 @@ class Nu extends B {
35866
35866
  t + i,
35867
35867
  e,
35868
35868
  l
35869
- ), m = this._interpolateEdge(
35869
+ ), p = this._interpolateEdge(
35870
35870
  t,
35871
35871
  e,
35872
35872
  h,
35873
35873
  t + i,
35874
35874
  e,
35875
35875
  l
35876
- ), p = this._interpolateEdge(
35876
+ ), m = this._interpolateEdge(
35877
35877
  t,
35878
35878
  e + r,
35879
35879
  u,
@@ -35883,48 +35883,48 @@ class Nu extends B {
35883
35883
  );
35884
35884
  switch (d) {
35885
35885
  case 1:
35886
- a.push([f, m]);
35886
+ a.push([f, p]);
35887
35887
  break;
35888
35888
  case 2:
35889
- a.push([m, g]);
35889
+ a.push([p, g]);
35890
35890
  break;
35891
35891
  case 3:
35892
35892
  a.push([f, g]);
35893
35893
  break;
35894
35894
  case 4:
35895
- a.push([g, p]);
35895
+ a.push([g, m]);
35896
35896
  break;
35897
35897
  case 5: {
35898
- o(t + i / 2, e + r / 2) > 0 ? (a.push([f, p]), a.push([m, g])) : (a.push([f, m]), a.push([g, p]));
35898
+ o(t + i / 2, e + r / 2) > 0 ? (a.push([f, m]), a.push([p, g])) : (a.push([f, p]), a.push([g, m]));
35899
35899
  break;
35900
35900
  }
35901
35901
  case 6:
35902
- a.push([m, p]);
35902
+ a.push([p, m]);
35903
35903
  break;
35904
35904
  case 7:
35905
- a.push([f, p]);
35905
+ a.push([f, m]);
35906
35906
  break;
35907
35907
  case 8:
35908
- a.push([p, f]);
35908
+ a.push([m, f]);
35909
35909
  break;
35910
35910
  case 9:
35911
- a.push([m, p]);
35911
+ a.push([p, m]);
35912
35912
  break;
35913
35913
  case 10: {
35914
- o(t + i / 2, e + r / 2) > 0 ? (a.push([f, m]), a.push([g, p])) : (a.push([f, p]), a.push([g, m]));
35914
+ o(t + i / 2, e + r / 2) > 0 ? (a.push([f, p]), a.push([g, m])) : (a.push([f, m]), a.push([g, p]));
35915
35915
  break;
35916
35916
  }
35917
35917
  case 11:
35918
- a.push([g, p]);
35918
+ a.push([g, m]);
35919
35919
  break;
35920
35920
  case 12:
35921
35921
  a.push([f, g]);
35922
35922
  break;
35923
35923
  case 13:
35924
- a.push([g, m]);
35924
+ a.push([g, p]);
35925
35925
  break;
35926
35926
  case 14:
35927
- a.push([f, m]);
35927
+ a.push([f, p]);
35928
35928
  break;
35929
35929
  }
35930
35930
  }
@@ -35951,19 +35951,19 @@ class Nu extends B {
35951
35951
  (i - e) / o,
35952
35952
  (n - r) / o
35953
35953
  ) * 0.1, l = (g) => {
35954
- const m = Math.round(g[0] / h), p = Math.round(g[1] / h);
35955
- return `${m},${p}`;
35954
+ const p = Math.round(g[0] / h), m = Math.round(g[1] / h);
35955
+ return `${p},${m}`;
35956
35956
  }, c = /* @__PURE__ */ new Map(), u = new Array(t.length).fill(!1);
35957
35957
  for (let g = 0; g < t.length; g++)
35958
- for (let m = 0; m < 2; m++) {
35959
- const p = l(t[g][m]);
35960
- let _ = c.get(p);
35961
- _ || (_ = [], c.set(p, _)), _.push({ segIndex: g, endIndex: m });
35958
+ for (let p = 0; p < 2; p++) {
35959
+ const m = l(t[g][p]);
35960
+ let _ = c.get(m);
35961
+ _ || (_ = [], c.set(m, _)), _.push({ segIndex: g, endIndex: p });
35962
35962
  }
35963
35963
  const d = (g) => {
35964
- const m = l(g), p = c.get(m);
35965
- if (!p) return null;
35966
- for (const _ of p)
35964
+ const p = l(g), m = c.get(p);
35965
+ if (!m) return null;
35966
+ for (const _ of m)
35967
35967
  if (!u[_.segIndex]) {
35968
35968
  const y = t[_.segIndex][_.endIndex], x = y[0] - g[0], w = y[1] - g[1];
35969
35969
  if (x * x + w * w < h * h)
@@ -35974,27 +35974,27 @@ class Nu extends B {
35974
35974
  for (let g = 0; g < t.length; g++) {
35975
35975
  if (u[g]) continue;
35976
35976
  u[g] = !0;
35977
- const m = [t[g][0], t[g][1]];
35978
- let p = !0;
35979
- for (; p; ) {
35980
- const _ = m[m.length - 1], y = d(_);
35977
+ const p = [t[g][0], t[g][1]];
35978
+ let m = !0;
35979
+ for (; m; ) {
35980
+ const _ = p[p.length - 1], y = d(_);
35981
35981
  if (y && !u[y.segIndex]) {
35982
35982
  u[y.segIndex] = !0;
35983
35983
  const x = y.endIndex === 0 ? 1 : 0;
35984
- m.push(t[y.segIndex][x]);
35984
+ p.push(t[y.segIndex][x]);
35985
35985
  } else
35986
- p = !1;
35986
+ m = !1;
35987
35987
  }
35988
- for (p = !0; p; ) {
35989
- const _ = m[0], y = d(_);
35988
+ for (m = !0; m; ) {
35989
+ const _ = p[0], y = d(_);
35990
35990
  if (y && !u[y.segIndex]) {
35991
35991
  u[y.segIndex] = !0;
35992
35992
  const x = y.endIndex === 0 ? 1 : 0;
35993
- m.unshift(t[y.segIndex][x]);
35993
+ p.unshift(t[y.segIndex][x]);
35994
35994
  } else
35995
- p = !1;
35995
+ m = !1;
35996
35996
  }
35997
- f.push(m);
35997
+ f.push(p);
35998
35998
  }
35999
35999
  return f;
36000
36000
  }
@@ -37068,17 +37068,17 @@ class $u extends Te {
37068
37068
  }
37069
37069
  let f = d;
37070
37070
  for (const g of a) {
37071
- const m = this._resolveSegmentFontSize(g) * Oe, p = this._buildStyledFontString(g);
37072
- this._ctx.font = p, this._ctx.textBaseline = "alphabetic", this._ctx.textAlign = "left";
37071
+ const p = this._resolveSegmentFontSize(g) * Oe, m = this._buildStyledFontString(g);
37072
+ this._ctx.font = m, this._ctx.textBaseline = "alphabetic", this._ctx.textAlign = "left";
37073
37073
  const _ = g.baselineShift * h, y = c + _, x = this._ctx.measureText(g.text).width + (g.text.length - 1) * this._letterSpacing * Oe;
37074
37074
  g.backgroundColor && (this._ctx.save(), this._ctx.fillStyle = g.backgroundColor, this._ctx.globalAlpha = this.fillOpacity * this._opacity, this._ctx.fillRect(f, o, x, l), this._ctx.restore());
37075
37075
  const w = g.color || this.color;
37076
37076
  if (this.strokeWidth > 0 && (this._ctx.strokeStyle = w, this._ctx.lineWidth = this.strokeWidth * Oe, this._ctx.strokeText(g.text, f, y)), this._ctx.fillStyle = w, this._ctx.globalAlpha = this.fillOpacity * this._opacity, this._ctx.fillText(g.text, f, y), g.underline) {
37077
- const M = y + m * 0.1, C = Math.max(1, m * 0.05);
37077
+ const M = y + p * 0.1, C = Math.max(1, p * 0.05);
37078
37078
  this._ctx.save(), this._ctx.strokeStyle = w, this._ctx.lineWidth = C, this._ctx.globalAlpha = this.fillOpacity * this._opacity, this._ctx.beginPath(), this._ctx.moveTo(f, M), this._ctx.lineTo(f + x, M), this._ctx.stroke(), this._ctx.restore();
37079
37079
  }
37080
37080
  if (g.strikethrough) {
37081
- const M = y - m * 0.3, C = Math.max(1, m * 0.05);
37081
+ const M = y - p * 0.3, C = Math.max(1, p * 0.05);
37082
37082
  this._ctx.save(), this._ctx.strokeStyle = w, this._ctx.lineWidth = C, this._ctx.globalAlpha = this.fillOpacity * this._opacity, this._ctx.beginPath(), this._ctx.moveTo(f, M), this._ctx.lineTo(f + x, M), this._ctx.stroke(), this._ctx.restore();
37083
37083
  }
37084
37084
  f += x;
@@ -38920,12 +38920,12 @@ class gs extends st {
38920
38920
  transparent: this._opacity < 1
38921
38921
  });
38922
38922
  if (a > 0) {
38923
- const p = new S.CylinderGeometry(
38923
+ const m = new S.CylinderGeometry(
38924
38924
  this._shaftRadius,
38925
38925
  this._shaftRadius,
38926
38926
  a,
38927
38927
  this._radialSegments
38928
- ), _ = new S.Mesh(p, h.clone()), y = new S.Vector3(
38928
+ ), _ = new S.Mesh(m, h.clone()), y = new S.Vector3(
38929
38929
  this._start[0] + o.x * a / 2,
38930
38930
  this._start[1] + o.y * a / 2,
38931
38931
  this._start[2] + o.z * a / 2
@@ -38939,12 +38939,12 @@ class gs extends st {
38939
38939
  opacity: this._opacity,
38940
38940
  transparent: this._opacity < 1,
38941
38941
  side: S.DoubleSide
38942
- }), g = new S.Mesh(d, f), m = new S.Vector3(
38942
+ }), g = new S.Mesh(d, f), p = new S.Vector3(
38943
38943
  this._end[0] - o.x * this._tipLength / 2,
38944
38944
  this._end[1] - o.y * this._tipLength / 2,
38945
38945
  this._end[2] - o.z * this._tipLength / 2
38946
38946
  );
38947
- return g.position.copy(m), this._orientMesh(g, o), t.add(g), t;
38947
+ return g.position.copy(p), this._orientMesh(g, o), t.add(g), t;
38948
38948
  }
38949
38949
  /**
38950
38950
  * Orient a mesh to point in a given direction
@@ -39102,16 +39102,16 @@ class Ko extends Ed {
39102
39102
  stacks: i
39103
39103
  };
39104
39104
  const r = [], n = [], o = [], a = [], h = 1e-5, l = new Ft(), c = new Ft(), u = new Ft(), d = new Ft(), f = new Ft(), g = e + 1;
39105
- for (let m = 0; m <= i; m++) {
39106
- const p = m / i;
39105
+ for (let p = 0; p <= i; p++) {
39106
+ const m = p / i;
39107
39107
  for (let _ = 0; _ <= e; _++) {
39108
39108
  const y = _ / e;
39109
- t(y, p, c), n.push(c.x, c.y, c.z), y - h >= 0 ? (t(y - h, p, u), d.subVectors(c, u)) : (t(y + h, p, u), d.subVectors(u, c)), p - h >= 0 ? (t(y, p - h, u), f.subVectors(c, u)) : (t(y, p + h, u), f.subVectors(u, c)), l.crossVectors(d, f).normalize(), o.push(l.x, l.y, l.z), a.push(y, p);
39109
+ t(y, m, c), n.push(c.x, c.y, c.z), y - h >= 0 ? (t(y - h, m, u), d.subVectors(c, u)) : (t(y + h, m, u), d.subVectors(u, c)), m - h >= 0 ? (t(y, m - h, u), f.subVectors(c, u)) : (t(y, m + h, u), f.subVectors(u, c)), l.crossVectors(d, f).normalize(), o.push(l.x, l.y, l.z), a.push(y, m);
39110
39110
  }
39111
39111
  }
39112
- for (let m = 0; m < i; m++)
39113
- for (let p = 0; p < e; p++) {
39114
- const _ = m * g + p, y = m * g + p + 1, x = (m + 1) * g + p + 1, w = (m + 1) * g + p;
39112
+ for (let p = 0; p < i; p++)
39113
+ for (let m = 0; m < e; m++) {
39114
+ const _ = p * g + m, y = p * g + m + 1, x = (p + 1) * g + m + 1, w = (p + 1) * g + m;
39115
39115
  r.push(_, y, w), r.push(y, x, w);
39116
39116
  }
39117
39117
  this.setIndex(r), this.setAttribute("position", new Ls(n, 3)), this.setAttribute("normal", new Ls(o, 3)), this.setAttribute("uv", new Ls(a, 2));
@@ -39152,19 +39152,19 @@ class Pn extends st {
39152
39152
  */
39153
39153
  _createThreeObject() {
39154
39154
  const [t, e] = this._uRange, [i, r] = this._vRange, n = e - t, o = r - i, a = (u, d, f) => {
39155
- const g = t + u * n, m = i + d * o, [p, _, y] = this._func(g, m);
39156
- f.set(p, _, y);
39155
+ const g = t + u * n, p = i + d * o, [m, _, y] = this._func(g, p);
39156
+ f.set(m, _, y);
39157
39157
  }, h = new Ko(a, this._uResolution, this._vResolution);
39158
39158
  if (h.computeVertexNormals(), this._checkerboardColors) {
39159
39159
  const u = h.toNonIndexed();
39160
39160
  h.dispose();
39161
- const d = u.getAttribute("position"), f = new Float32Array(d.count * 3), g = new S.Color(this._checkerboardColors[0]), m = new S.Color(this._checkerboardColors[1]);
39162
- let p = 0;
39161
+ const d = u.getAttribute("position"), f = new Float32Array(d.count * 3), g = new S.Color(this._checkerboardColors[0]), p = new S.Color(this._checkerboardColors[1]);
39162
+ let m = 0;
39163
39163
  for (let y = 0; y < this._vResolution; y++)
39164
39164
  for (let x = 0; x < this._uResolution; x++) {
39165
- const w = (x + y) % 2 === 0 ? g : m;
39165
+ const w = (x + y) % 2 === 0 ? g : p;
39166
39166
  for (let M = 0; M < 6; M++)
39167
- f[p * 3] = w.r, f[p * 3 + 1] = w.g, f[p * 3 + 2] = w.b, p++;
39167
+ f[m * 3] = w.r, f[m * 3 + 1] = w.g, f[m * 3 + 2] = w.b, m++;
39168
39168
  }
39169
39169
  u.setAttribute("color", new S.BufferAttribute(f, 3));
39170
39170
  const _ = new S.MeshStandardMaterial({
@@ -39201,23 +39201,23 @@ class Pn extends st {
39201
39201
  if (this._threeObject instanceof S.Mesh) {
39202
39202
  this._threeObject.geometry.dispose();
39203
39203
  const [t, e] = this._uRange, [i, r] = this._vRange, n = e - t, o = r - i, a = (l, c, u) => {
39204
- const d = t + l * n, f = i + c * o, [g, m, p] = this._func(d, f);
39205
- u.set(g, m, p);
39204
+ const d = t + l * n, f = i + c * o, [g, p, m] = this._func(d, f);
39205
+ u.set(g, p, m);
39206
39206
  }, h = new Ko(a, this._uResolution, this._vResolution);
39207
39207
  if (h.computeVertexNormals(), this._checkerboardColors) {
39208
39208
  const l = h.toNonIndexed();
39209
39209
  h.dispose();
39210
39210
  const c = l.getAttribute("position"), u = new Float32Array(c.count * 3), d = new S.Color(this._checkerboardColors[0]), f = new S.Color(this._checkerboardColors[1]);
39211
39211
  let g = 0;
39212
- for (let p = 0; p < this._vResolution; p++)
39212
+ for (let m = 0; m < this._vResolution; m++)
39213
39213
  for (let _ = 0; _ < this._uResolution; _++) {
39214
- const y = (_ + p) % 2 === 0 ? d : f;
39214
+ const y = (_ + m) % 2 === 0 ? d : f;
39215
39215
  for (let x = 0; x < 6; x++)
39216
39216
  u[g * 3] = y.r, u[g * 3 + 1] = y.g, u[g * 3 + 2] = y.b, g++;
39217
39217
  }
39218
39218
  l.setAttribute("color", new S.BufferAttribute(u, 3)), this._threeObject.geometry = l;
39219
- const m = this._threeObject.material;
39220
- m && (m.vertexColors = !0, m.needsUpdate = !0);
39219
+ const p = this._threeObject.material;
39220
+ p && (p.vertexColors = !0, p.needsUpdate = !0);
39221
39221
  } else
39222
39222
  this._threeObject.geometry = h;
39223
39223
  }
@@ -39616,13 +39616,13 @@ class Xa extends st {
39616
39616
  x.set(C, P, R);
39617
39617
  }, g = new Ko(f, r, n);
39618
39618
  g.computeVertexNormals();
39619
- const m = new S.MeshStandardMaterial({
39619
+ const p = new S.MeshStandardMaterial({
39620
39620
  color: "#4488cc",
39621
39621
  opacity: this._opacity,
39622
39622
  transparent: this._opacity < 1,
39623
39623
  side: this._doubleSided ? S.DoubleSide : S.FrontSide
39624
- }), p = new S.Mesh(g, m);
39625
- return this._texturesLoaded && this._texture && queueMicrotask(() => this._applyTextures()), p;
39624
+ }), m = new S.Mesh(g, p);
39625
+ return this._texturesLoaded && this._texture && queueMicrotask(() => this._applyTextures()), m;
39626
39626
  }
39627
39627
  /**
39628
39628
  * Sync material properties to the Three.js object
@@ -39767,56 +39767,50 @@ class rd extends ze {
39767
39767
  _xRange;
39768
39768
  _yRange;
39769
39769
  _zRange;
39770
- _xLength;
39771
- _yLength;
39772
- _zLength;
39773
39770
  _showTicks;
39774
39771
  _tickLength;
39775
39772
  _ticks = [];
39776
39773
  constructor(t = {}) {
39777
39774
  super(), this._disableChildZLayering = !0;
39778
39775
  const {
39779
- xRange: e = [-5, 5, 1],
39776
+ xRange: e = [-6, 6, 1],
39780
39777
  yRange: i = [-5, 5, 1],
39781
- zRange: r = [-5, 5, 1],
39782
- xLength: n = 10,
39783
- yLength: o = 10,
39784
- zLength: a = 10,
39785
- axisColor: h = "#ffffff",
39786
- xColor: l,
39787
- yColor: c,
39788
- zColor: u,
39789
- showLabels: d = !1,
39790
- showTicks: f = !0,
39791
- tickLength: g = 0.15,
39792
- tipLength: m = 0.2,
39793
- tipRadius: p = 0.08,
39794
- shaftRadius: _ = 0.01
39778
+ zRange: r = [-4, 4, 1],
39779
+ axisColor: n = "#ffffff",
39780
+ xColor: o,
39781
+ yColor: a,
39782
+ zColor: h,
39783
+ showLabels: l = !1,
39784
+ showTicks: c = !0,
39785
+ tickLength: u = 0.15,
39786
+ tipLength: d = 0.2,
39787
+ tipRadius: f = 0.08,
39788
+ shaftRadius: g = 0.01
39795
39789
  } = t;
39796
- this._xRange = [...e], this._yRange = [...i], this._zRange = [...r], this._xLength = n, this._yLength = o, this._zLength = a, this._showTicks = f, this._tickLength = g;
39797
- const y = l ?? h, x = c ?? h, w = u ?? h, M = n / 2, C = o / 2, P = a / 2;
39790
+ this._xRange = [...e], this._yRange = [...i], this._zRange = [...r], this._showTicks = c, this._tickLength = u;
39791
+ const p = o ?? n, m = a ?? n, _ = h ?? n;
39798
39792
  this._xAxis = new gs({
39799
- start: [-M, 0, 0],
39800
- end: [M, 0, 0],
39801
- color: y,
39802
- tipLength: m,
39803
- tipRadius: p,
39804
- shaftRadius: _
39793
+ start: [e[0], 0, 0],
39794
+ end: [e[1], 0, 0],
39795
+ color: p,
39796
+ tipLength: d,
39797
+ tipRadius: f,
39798
+ shaftRadius: g
39805
39799
  }), this._yAxis = new gs({
39806
- start: [0, 0, C],
39807
- end: [0, 0, -C],
39808
- color: x,
39809
- tipLength: m,
39810
- tipRadius: p,
39811
- shaftRadius: _
39800
+ start: [0, 0, -i[0]],
39801
+ end: [0, 0, -i[1]],
39802
+ color: m,
39803
+ tipLength: d,
39804
+ tipRadius: f,
39805
+ shaftRadius: g
39812
39806
  }), this._zAxis = new gs({
39813
- start: [0, -P, 0],
39814
- end: [0, P, 0],
39815
- color: w,
39816
- tipLength: m,
39817
- tipRadius: p,
39818
- shaftRadius: _
39819
- }), this.add(this._xAxis), this.add(this._yAxis), this.add(this._zAxis), f && this._createTicks(y, x, w);
39807
+ start: [0, r[0], 0],
39808
+ end: [0, r[1], 0],
39809
+ color: _,
39810
+ tipLength: d,
39811
+ tipRadius: f,
39812
+ shaftRadius: g
39813
+ }), this.add(this._xAxis), this.add(this._yAxis), this.add(this._zAxis), c && this._createTicks(p, m, _);
39820
39814
  }
39821
39815
  /**
39822
39816
  * Convert Manim coordinates (mx, my, mz) to THREE.js coordinates.
@@ -39829,64 +39823,50 @@ class rd extends ze {
39829
39823
  * Create tick marks for all axes using Manim→THREE.js coordinate mapping
39830
39824
  */
39831
39825
  _createTicks(t, e, i) {
39832
- const r = this._xLength / 2, n = this._yLength / 2, o = this._zLength / 2, [a, h, l] = this._xRange, [c, u, d] = this._yRange, [f, g, m] = this._zRange, p = this._tickLength / 2;
39833
- for (let _ = a; _ <= h; _ += l) {
39834
- if (Math.abs(_) < 1e-3 || Math.abs(_ - a) < 1e-3 || Math.abs(_ - h) < 1e-3) continue;
39835
- const y = this._mapToVisual(_, a, h, -r, r), x = new Fs({
39836
- start: this._m2t(y, 0, -p),
39837
- end: this._m2t(y, 0, p),
39826
+ const [r, n, o] = this._xRange, [a, h, l] = this._yRange, [c, u, d] = this._zRange, f = this._tickLength / 2;
39827
+ for (let g = r; g <= n; g += o) {
39828
+ if (Math.abs(g) < 1e-3 || Math.abs(g - r) < 1e-3 || Math.abs(g - n) < 1e-3) continue;
39829
+ const p = new Fs({
39830
+ start: this._m2t(g, 0, -f),
39831
+ end: this._m2t(g, 0, f),
39838
39832
  color: t
39839
39833
  });
39840
- this._ticks.push(x), this.add(x);
39834
+ this._ticks.push(p), this.add(p);
39841
39835
  }
39842
- for (let _ = c; _ <= u; _ += d) {
39843
- if (Math.abs(_) < 1e-3 || Math.abs(_ - c) < 1e-3 || Math.abs(_ - u) < 1e-3) continue;
39844
- const y = this._mapToVisual(_, c, u, -n, n), x = new Fs({
39845
- start: this._m2t(0, y, -p),
39846
- end: this._m2t(0, y, p),
39836
+ for (let g = a; g <= h; g += l) {
39837
+ if (Math.abs(g) < 1e-3 || Math.abs(g - a) < 1e-3 || Math.abs(g - h) < 1e-3) continue;
39838
+ const p = new Fs({
39839
+ start: this._m2t(0, g, -f),
39840
+ end: this._m2t(0, g, f),
39847
39841
  color: e
39848
39842
  });
39849
- this._ticks.push(x), this.add(x);
39843
+ this._ticks.push(p), this.add(p);
39850
39844
  }
39851
- for (let _ = f; _ <= g; _ += m) {
39852
- if (Math.abs(_) < 1e-3 || Math.abs(_ - f) < 1e-3 || Math.abs(_ - g) < 1e-3) continue;
39853
- const y = this._mapToVisual(_, f, g, -o, o), x = new Fs({
39854
- start: this._m2t(-p, 0, y),
39855
- end: this._m2t(p, 0, y),
39845
+ for (let g = c; g <= u; g += d) {
39846
+ if (Math.abs(g) < 1e-3 || Math.abs(g - c) < 1e-3 || Math.abs(g - u) < 1e-3) continue;
39847
+ const p = new Fs({
39848
+ start: this._m2t(-f, 0, g),
39849
+ end: this._m2t(f, 0, g),
39856
39850
  color: i
39857
39851
  });
39858
- this._ticks.push(x), this.add(x);
39852
+ this._ticks.push(p), this.add(p);
39859
39853
  }
39860
39854
  }
39861
- /**
39862
- * Map a value from graph coordinates to visual coordinates
39863
- */
39864
- _mapToVisual(t, e, i, r, n) {
39865
- if (i === e) return (r + n) / 2;
39866
- const o = (t - e) / (i - e);
39867
- return r + o * (n - r);
39868
- }
39869
39855
  /**
39870
39856
  * Convert graph coordinates (Manim space) to visual point coordinates (THREE.js space).
39857
+ * With unit_size=1, graph coordinates map directly to visual positions.
39871
39858
  * Applies Manim→THREE.js mapping: (mx, my, mz) → (mx, mz, -my)
39872
- * @param x X coordinate in graph space (Manim X)
39873
- * @param y Y coordinate in graph space (Manim Y)
39874
- * @param z Z coordinate in graph space (Manim Z)
39875
- * @returns The visual point [x, y, z] in THREE.js space
39876
39859
  */
39877
39860
  coordsToPoint(t, e, i) {
39878
- const [r, n] = this._xRange, [o, a] = this._yRange, [h, l] = this._zRange, c = this._xLength / 2, u = this._yLength / 2, d = this._zLength / 2, f = this._mapToVisual(t, r, n, -c, c), g = this._mapToVisual(e, o, a, -u, u), m = this._mapToVisual(i, h, l, -d, d);
39879
- return [f + this.position.x, m + this.position.y, -g + this.position.z];
39861
+ return [t + this.position.x, i + this.position.y, -e + this.position.z];
39880
39862
  }
39881
39863
  /**
39882
39864
  * Convert visual point coordinates (THREE.js space) to graph coordinates (Manim space).
39883
39865
  * Applies inverse THREE.js→Manim mapping: (tx, ty, tz) → (tx, -tz, ty)
39884
- * @param point Visual point [x, y, z] in THREE.js space
39885
- * @returns The graph coordinates [x, y, z] in Manim space
39886
39866
  */
39887
39867
  pointToCoords(t) {
39888
- const [e, i] = this._xRange, [r, n] = this._yRange, [o, a] = this._zRange, h = this._xLength / 2, l = this._yLength / 2, c = this._zLength / 2, u = t[0] - this.position.x, d = t[1] - this.position.y, f = t[2] - this.position.z, g = this._mapToVisual(u, -h, h, e, i), m = this._mapToVisual(-f, -l, l, r, n), p = this._mapToVisual(d, -c, c, o, a);
39889
- return [g, m, p];
39868
+ const e = t[0] - this.position.x, i = t[1] - this.position.y, r = t[2] - this.position.z;
39869
+ return [e, -r, i];
39890
39870
  }
39891
39871
  /**
39892
39872
  * Get the X-axis arrow
@@ -39925,22 +39905,22 @@ class rd extends ze {
39925
39905
  return [...this._zRange];
39926
39906
  }
39927
39907
  /**
39928
- * Get the visual X length
39908
+ * Get the visual X length (range span)
39929
39909
  */
39930
39910
  getXLength() {
39931
- return this._xLength;
39911
+ return this._xRange[1] - this._xRange[0];
39932
39912
  }
39933
39913
  /**
39934
- * Get the visual Y length
39914
+ * Get the visual Y length (range span)
39935
39915
  */
39936
39916
  getYLength() {
39937
- return this._yLength;
39917
+ return this._yRange[1] - this._yRange[0];
39938
39918
  }
39939
39919
  /**
39940
- * Get the visual Z length
39920
+ * Get the visual Z length (range span)
39941
39921
  */
39942
39922
  getZLength() {
39943
- return this._zLength;
39923
+ return this._zRange[1] - this._zRange[0];
39944
39924
  }
39945
39925
  /**
39946
39926
  * Get the origin point in visual coordinates
@@ -39974,9 +39954,6 @@ class rd extends ze {
39974
39954
  xRange: this._xRange,
39975
39955
  yRange: this._yRange,
39976
39956
  zRange: this._zRange,
39977
- xLength: this._xLength,
39978
- yLength: this._yLength,
39979
- zLength: this._zLength,
39980
39957
  showTicks: this._showTicks,
39981
39958
  tickLength: this._tickLength
39982
39959
  });
@@ -40823,8 +40800,8 @@ class An extends B {
40823
40800
  ], n = [-r[1], r[0], 0];
40824
40801
  let o = -1 / 0, a = 1 / 0, h = -1 / 0;
40825
40802
  for (const d of e) {
40826
- const f = d[0] - t[0], g = d[1] - t[1], m = f * r[0] + g * r[1], p = f * n[0] + g * n[1];
40827
- m > o && (o = m), p < a && (a = p), p > h && (h = p);
40803
+ const f = d[0] - t[0], g = d[1] - t[1], p = f * r[0] + g * r[1], m = f * n[0] + g * n[1];
40804
+ p > o && (o = p), m < a && (a = m), m > h && (h = m);
40828
40805
  }
40829
40806
  const l = o + this.buff, c = [
40830
40807
  t[0] + r[0] * l + n[0] * a,
@@ -40853,7 +40830,7 @@ class An extends B {
40853
40830
  this.setPoints3D([[...t], [...t], [...t], [...t]]);
40854
40831
  return;
40855
40832
  }
40856
- const a = [r / o, n / o, 0], h = i, l = 0.14, c = 0.25, u = c - l, d = 0.90552, f = Math.max(0, (o * this.sharpness - d) / 2), g = d + 2 * f, m = o / g, p = 0.23 * m, _ = 0.22 * m, y = f * m, x = (t[0] + e[0]) / 2, w = (t[1] + e[1]) / 2, M = (t[2] + e[2]) / 2;
40833
+ const a = [r / o, n / o, 0], h = i, l = 0.14, c = 0.25, u = c - l, d = 0.90552, f = Math.max(0, (o * this.sharpness - d) / 2), g = d + 2 * f, p = o / g, m = 0.23 * p, _ = 0.22 * p, y = f * p, x = (t[0] + e[0]) / 2, w = (t[1] + e[1]) / 2, M = (t[2] + e[2]) / 2;
40857
40834
  this._tipPoint = [
40858
40835
  x + h[0] * c,
40859
40836
  w + h[1] * c,
@@ -40863,7 +40840,7 @@ class An extends B {
40863
40840
  J[0] + a[0] * kt + h[0] * Ut,
40864
40841
  J[1] + a[1] * kt + h[1] * Ut,
40865
40842
  J[2]
40866
- ], P = C(t, p, l), R = C(P, y, 0), O = C(e, -p, l), z = C(O, -y, 0), I = C(t, p * 0.3, l * 0.85), W = C(t, p * 0.78, l * 1), H = C(P, y / 3, 0), N = C(P, y * 2 / 3, 0), q = C(R, _ * 0.55, u * 0.05), rt = [
40843
+ ], P = C(t, m, l), R = C(P, y, 0), O = C(e, -m, l), z = C(O, -y, 0), I = C(t, m * 0.3, l * 0.85), W = C(t, m * 0.78, l * 1), H = C(P, y / 3, 0), N = C(P, y * 2 / 3, 0), q = C(R, _ * 0.55, u * 0.05), rt = [
40867
40844
  this._tipPoint[0] - a[0] * _ * 0.02 - h[0] * u * 0.45,
40868
40845
  this._tipPoint[1] - a[1] * _ * 0.02 - h[1] * u * 0.45,
40869
40846
  this._tipPoint[2]
@@ -40871,7 +40848,7 @@ class An extends B {
40871
40848
  this._tipPoint[0] + a[0] * _ * 0.02 - h[0] * u * 0.45,
40872
40849
  this._tipPoint[1] + a[1] * _ * 0.02 - h[1] * u * 0.45,
40873
40850
  this._tipPoint[2]
40874
- ], ot = C(z, -_ * 0.55, u * 0.05), pt = C(z, y / 3, 0), mt = C(z, y * 2 / 3, 0), it = C(e, -p * 0.78, l * 1), at = C(e, -p * 0.3, l * 0.85), vt = [
40851
+ ], ot = C(z, -_ * 0.55, u * 0.05), pt = C(z, y / 3, 0), mt = C(z, y * 2 / 3, 0), it = C(e, -m * 0.78, l * 1), at = C(e, -m * 0.3, l * 0.85), vt = [
40875
40852
  [...t],
40876
40853
  I,
40877
40854
  W,
@@ -41108,21 +41085,21 @@ class hd extends B {
41108
41085
  this.setPoints3D([[...t], [...t], [...t], [...t]]);
41109
41086
  return;
41110
41087
  }
41111
- const a = [r / o, n / o, 0], h = i, l = 0.14, c = 0.25, u = 0.90552, d = Math.max(0, (o * this._sharpness - u) / 2), f = u + 2 * d, g = o / f, m = 0.23 * g, p = 0.22 * g, _ = d * g, y = c - l, x = (t[0] + e[0]) / 2, w = (t[1] + e[1]) / 2, M = (t[2] + e[2]) / 2;
41088
+ const a = [r / o, n / o, 0], h = i, l = 0.14, c = 0.25, u = 0.90552, d = Math.max(0, (o * this._sharpness - u) / 2), f = u + 2 * d, g = o / f, p = 0.23 * g, m = 0.22 * g, _ = d * g, y = c - l, x = (t[0] + e[0]) / 2, w = (t[1] + e[1]) / 2, M = (t[2] + e[2]) / 2;
41112
41089
  this._tipPoint = [x + h[0] * c, w + h[1] * c, M];
41113
41090
  const C = (J, kt, Ut) => [
41114
41091
  J[0] + a[0] * kt + h[0] * Ut,
41115
41092
  J[1] + a[1] * kt + h[1] * Ut,
41116
41093
  J[2]
41117
- ], P = C(t, m, l), R = C(P, _, 0), O = C(e, -m, l), z = C(O, -_, 0), I = C(t, m * 0.3, l * 0.85), W = C(t, m * 0.78, l * 1), H = C(P, _ / 3, 0), N = C(P, _ * 2 / 3, 0), q = C(R, p * 0.55, y * 0.05), rt = [
41118
- this._tipPoint[0] - a[0] * p * 0.02 - h[0] * y * 0.45,
41119
- this._tipPoint[1] - a[1] * p * 0.02 - h[1] * y * 0.45,
41094
+ ], P = C(t, p, l), R = C(P, _, 0), O = C(e, -p, l), z = C(O, -_, 0), I = C(t, p * 0.3, l * 0.85), W = C(t, p * 0.78, l * 1), H = C(P, _ / 3, 0), N = C(P, _ * 2 / 3, 0), q = C(R, m * 0.55, y * 0.05), rt = [
41095
+ this._tipPoint[0] - a[0] * m * 0.02 - h[0] * y * 0.45,
41096
+ this._tipPoint[1] - a[1] * m * 0.02 - h[1] * y * 0.45,
41120
41097
  this._tipPoint[2]
41121
41098
  ], ht = [
41122
- this._tipPoint[0] + a[0] * p * 0.02 - h[0] * y * 0.45,
41123
- this._tipPoint[1] + a[1] * p * 0.02 - h[1] * y * 0.45,
41099
+ this._tipPoint[0] + a[0] * m * 0.02 - h[0] * y * 0.45,
41100
+ this._tipPoint[1] + a[1] * m * 0.02 - h[1] * y * 0.45,
41124
41101
  this._tipPoint[2]
41125
- ], ot = C(z, -p * 0.55, y * 0.05), pt = C(z, _ / 3, 0), mt = C(z, _ * 2 / 3, 0), it = C(e, -m * 0.78, l * 1), at = C(e, -m * 0.3, l * 0.85), vt = [
41102
+ ], ot = C(z, -m * 0.55, y * 0.05), pt = C(z, _ / 3, 0), mt = C(z, _ * 2 / 3, 0), it = C(e, -p * 0.78, l * 1), at = C(e, -p * 0.3, l * 0.85), vt = [
41126
41103
  [...t],
41127
41104
  I,
41128
41105
  W,
@@ -41308,17 +41285,17 @@ class ld extends B {
41308
41285
  e[0] + o * Math.cos(c),
41309
41286
  e[1] + o * Math.sin(c),
41310
41287
  e[2]
41311
- ], m = n / 4, p = 4 / 3 * Math.tan(m / 4), _ = [-Math.sin(r), Math.cos(r), 0], y = [-Math.sin(l), Math.cos(l), 0];
41288
+ ], p = n / 4, m = 4 / 3 * Math.tan(p / 4), _ = [-Math.sin(r), Math.cos(r), 0], y = [-Math.sin(l), Math.cos(l), 0];
41312
41289
  t.push([...u]), t.push([
41313
- u[0] + p * o * _[0],
41314
- u[1] + p * o * _[1],
41290
+ u[0] + m * o * _[0],
41291
+ u[1] + m * o * _[1],
41315
41292
  u[2]
41316
41293
  ]), t.push([
41317
- f[0] - p * o * y[0],
41318
- f[1] - p * o * y[1],
41294
+ f[0] - m * o * y[0],
41295
+ f[1] - m * o * y[1],
41319
41296
  f[2]
41320
41297
  ]), t.push([...f]);
41321
- const x = [-Math.sin(h), Math.cos(h), 0], w = p * 0.5;
41298
+ const x = [-Math.sin(h), Math.cos(h), 0], w = m * 0.5;
41322
41299
  t.push([
41323
41300
  f[0] + w * o * y[0],
41324
41301
  f[1] + w * o * y[1],
@@ -41340,12 +41317,12 @@ class ld extends B {
41340
41317
  ]), t.push([...g]);
41341
41318
  const C = [-Math.sin(r + n), Math.cos(r + n), 0];
41342
41319
  t.push([
41343
- g[0] + p * o * M[0],
41344
- g[1] + p * o * M[1],
41320
+ g[0] + m * o * M[0],
41321
+ g[1] + m * o * M[1],
41345
41322
  g[2]
41346
41323
  ]), t.push([
41347
- d[0] - p * o * C[0],
41348
- d[1] - p * o * C[1],
41324
+ d[0] - m * o * C[0],
41325
+ d[1] - m * o * C[1],
41349
41326
  d[2]
41350
41327
  ]), t.push([...d]), this.setPoints3D(t);
41351
41328
  }
@@ -41472,92 +41449,92 @@ function Ti(s) {
41472
41449
  let e = [], i = 0, r = 0, n = 0, o = 0, a = 0, h = 0, l = "";
41473
41450
  const c = s.match(/[MmLlHhVvCcSsQqTtAaZz][^MmLlHhVvCcSsQqTtAaZz]*/g) || [];
41474
41451
  for (const u of c) {
41475
- const d = u[0], f = u.slice(1).trim().split(/[\s,]+/).filter((m) => m).map(parseFloat), g = d === d.toLowerCase();
41452
+ const d = u[0], f = u.slice(1).trim().split(/[\s,]+/).filter((p) => p).map(parseFloat), g = d === d.toLowerCase();
41476
41453
  switch (d.toUpperCase()) {
41477
41454
  case "M": {
41478
41455
  e.length > 0 && (t.push(e), e = []);
41479
- for (let m = 0; m < f.length; m += 2) {
41480
- const p = g ? i + f[m] : f[m], _ = g ? r + f[m + 1] : f[m + 1];
41481
- m === 0 && (n = p, o = _), i = p, r = _, e.push([p, -_]);
41456
+ for (let p = 0; p < f.length; p += 2) {
41457
+ const m = g ? i + f[p] : f[p], _ = g ? r + f[p + 1] : f[p + 1];
41458
+ p === 0 && (n = m, o = _), i = m, r = _, e.push([m, -_]);
41482
41459
  }
41483
41460
  l = "M";
41484
41461
  break;
41485
41462
  }
41486
41463
  case "L": {
41487
- for (let m = 0; m < f.length; m += 2) {
41488
- const p = g ? i + f[m] : f[m], _ = g ? r + f[m + 1] : f[m + 1], y = i + (p - i) / 3, x = r + (_ - r) / 3, w = i + (p - i) * 2 / 3, M = r + (_ - r) * 2 / 3;
41489
- e.push([y, -x]), e.push([w, -M]), e.push([p, -_]), i = p, r = _;
41464
+ for (let p = 0; p < f.length; p += 2) {
41465
+ const m = g ? i + f[p] : f[p], _ = g ? r + f[p + 1] : f[p + 1], y = i + (m - i) / 3, x = r + (_ - r) / 3, w = i + (m - i) * 2 / 3, M = r + (_ - r) * 2 / 3;
41466
+ e.push([y, -x]), e.push([w, -M]), e.push([m, -_]), i = m, r = _;
41490
41467
  }
41491
41468
  l = "L";
41492
41469
  break;
41493
41470
  }
41494
41471
  case "H": {
41495
- for (const m of f) {
41496
- const p = g ? i + m : m, _ = r, y = i + (p - i) / 3, x = i + (p - i) * 2 / 3;
41497
- e.push([y, -_]), e.push([x, -_]), e.push([p, -_]), i = p;
41472
+ for (const p of f) {
41473
+ const m = g ? i + p : p, _ = r, y = i + (m - i) / 3, x = i + (m - i) * 2 / 3;
41474
+ e.push([y, -_]), e.push([x, -_]), e.push([m, -_]), i = m;
41498
41475
  }
41499
41476
  l = "H";
41500
41477
  break;
41501
41478
  }
41502
41479
  case "V": {
41503
- for (const m of f) {
41504
- const p = i, _ = g ? r + m : m, y = r + (_ - r) / 3, x = r + (_ - r) * 2 / 3;
41505
- e.push([p, -y]), e.push([p, -x]), e.push([p, -_]), r = _;
41480
+ for (const p of f) {
41481
+ const m = i, _ = g ? r + p : p, y = r + (_ - r) / 3, x = r + (_ - r) * 2 / 3;
41482
+ e.push([m, -y]), e.push([m, -x]), e.push([m, -_]), r = _;
41506
41483
  }
41507
41484
  l = "V";
41508
41485
  break;
41509
41486
  }
41510
41487
  case "C": {
41511
- for (let m = 0; m < f.length; m += 6) {
41512
- let p = f[m], _ = f[m + 1], y = f[m + 2], x = f[m + 3], w = f[m + 4], M = f[m + 5];
41513
- g && (p += i, _ += r, y += i, x += r, w += i, M += r), e.push([p, -_]), e.push([y, -x]), e.push([w, -M]), a = y, h = x, i = w, r = M;
41488
+ for (let p = 0; p < f.length; p += 6) {
41489
+ let m = f[p], _ = f[p + 1], y = f[p + 2], x = f[p + 3], w = f[p + 4], M = f[p + 5];
41490
+ g && (m += i, _ += r, y += i, x += r, w += i, M += r), e.push([m, -_]), e.push([y, -x]), e.push([w, -M]), a = y, h = x, i = w, r = M;
41514
41491
  }
41515
41492
  l = "C";
41516
41493
  break;
41517
41494
  }
41518
41495
  case "S": {
41519
- for (let m = 0; m < f.length; m += 4) {
41520
- let p = i, _ = r;
41521
- (l === "C" || l === "S") && (p = 2 * i - a, _ = 2 * r - h);
41522
- let y = f[m], x = f[m + 1], w = f[m + 2], M = f[m + 3];
41523
- g && (y += i, x += r, w += i, M += r), e.push([p, -_]), e.push([y, -x]), e.push([w, -M]), a = y, h = x, i = w, r = M;
41496
+ for (let p = 0; p < f.length; p += 4) {
41497
+ let m = i, _ = r;
41498
+ (l === "C" || l === "S") && (m = 2 * i - a, _ = 2 * r - h);
41499
+ let y = f[p], x = f[p + 1], w = f[p + 2], M = f[p + 3];
41500
+ g && (y += i, x += r, w += i, M += r), e.push([m, -_]), e.push([y, -x]), e.push([w, -M]), a = y, h = x, i = w, r = M;
41524
41501
  }
41525
41502
  l = "S";
41526
41503
  break;
41527
41504
  }
41528
41505
  case "Q": {
41529
- for (let m = 0; m < f.length; m += 4) {
41530
- let p = f[m], _ = f[m + 1], y = f[m + 2], x = f[m + 3];
41531
- g && (p += i, _ += r, y += i, x += r);
41532
- const w = i + 2 / 3 * (p - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (p - y), P = x + 2 / 3 * (_ - x);
41533
- e.push([w, -M]), e.push([C, -P]), e.push([y, -x]), a = p, h = _, i = y, r = x;
41506
+ for (let p = 0; p < f.length; p += 4) {
41507
+ let m = f[p], _ = f[p + 1], y = f[p + 2], x = f[p + 3];
41508
+ g && (m += i, _ += r, y += i, x += r);
41509
+ const w = i + 2 / 3 * (m - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (m - y), P = x + 2 / 3 * (_ - x);
41510
+ e.push([w, -M]), e.push([C, -P]), e.push([y, -x]), a = m, h = _, i = y, r = x;
41534
41511
  }
41535
41512
  l = "Q";
41536
41513
  break;
41537
41514
  }
41538
41515
  case "T": {
41539
- for (let m = 0; m < f.length; m += 2) {
41540
- let p = i, _ = r;
41541
- (l === "Q" || l === "T") && (p = 2 * i - a, _ = 2 * r - h);
41542
- let y = f[m], x = f[m + 1];
41516
+ for (let p = 0; p < f.length; p += 2) {
41517
+ let m = i, _ = r;
41518
+ (l === "Q" || l === "T") && (m = 2 * i - a, _ = 2 * r - h);
41519
+ let y = f[p], x = f[p + 1];
41543
41520
  g && (y += i, x += r);
41544
- const w = i + 2 / 3 * (p - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (p - y), P = x + 2 / 3 * (_ - x);
41545
- e.push([w, -M]), e.push([C, -P]), e.push([y, -x]), a = p, h = _, i = y, r = x;
41521
+ const w = i + 2 / 3 * (m - i), M = r + 2 / 3 * (_ - r), C = y + 2 / 3 * (m - y), P = x + 2 / 3 * (_ - x);
41522
+ e.push([w, -M]), e.push([C, -P]), e.push([y, -x]), a = m, h = _, i = y, r = x;
41546
41523
  }
41547
41524
  l = "T";
41548
41525
  break;
41549
41526
  }
41550
41527
  case "A": {
41551
- for (let m = 0; m < f.length; m += 7) {
41552
- const p = f[m], _ = f[m + 1], y = f[m + 2] * Math.PI / 180, x = f[m + 3], w = f[m + 4];
41553
- let M = f[m + 5], C = f[m + 6];
41528
+ for (let p = 0; p < f.length; p += 7) {
41529
+ const m = f[p], _ = f[p + 1], y = f[p + 2] * Math.PI / 180, x = f[p + 3], w = f[p + 4];
41530
+ let M = f[p + 5], C = f[p + 6];
41554
41531
  g && (M += i, C += r);
41555
41532
  const P = Dy(
41556
41533
  i,
41557
41534
  r,
41558
41535
  M,
41559
41536
  C,
41560
- p,
41537
+ m,
41561
41538
  _,
41562
41539
  y,
41563
41540
  x,
@@ -41572,8 +41549,8 @@ function Ti(s) {
41572
41549
  }
41573
41550
  case "Z": {
41574
41551
  if (i !== n || r !== o) {
41575
- const m = i + (n - i) / 3, p = r + (o - r) / 3, _ = i + (n - i) * 2 / 3, y = r + (o - r) * 2 / 3;
41576
- e.push([m, -p]), e.push([_, -y]), e.push([n, -o]);
41552
+ const p = i + (n - i) / 3, m = r + (o - r) / 3, _ = i + (n - i) * 2 / 3, y = r + (o - r) * 2 / 3;
41553
+ e.push([p, -m]), e.push([_, -y]), e.push([n, -o]);
41577
41554
  }
41578
41555
  i = n, r = o, l = "Z";
41579
41556
  break;
@@ -41588,22 +41565,22 @@ function Dy(s, t, e, i, r, n, o, a, h) {
41588
41565
  const W = s + (e - s) / 3, H = t + (i - t) / 3, N = s + (e - s) * 2 / 3, q = t + (i - t) * 2 / 3;
41589
41566
  return [[W, H], [N, q], [e, i]];
41590
41567
  }
41591
- const c = Math.cos(o), u = Math.sin(o), d = (s - e) / 2, f = (t - i) / 2, g = c * d + u * f, m = -u * d + c * f;
41568
+ const c = Math.cos(o), u = Math.sin(o), d = (s - e) / 2, f = (t - i) / 2, g = c * d + u * f, p = -u * d + c * f;
41592
41569
  r = Math.abs(r), n = Math.abs(n);
41593
- const p = g * g / (r * r) + m * m / (n * n);
41594
- if (p > 1) {
41595
- const W = Math.sqrt(p);
41570
+ const m = g * g / (r * r) + p * p / (n * n);
41571
+ if (m > 1) {
41572
+ const W = Math.sqrt(m);
41596
41573
  r *= W, n *= W;
41597
41574
  }
41598
41575
  const _ = a === h ? -1 : 1, y = Math.max(
41599
41576
  0,
41600
- (r * r * n * n - r * r * m * m - n * n * g * g) / (r * r * m * m + n * n * g * g)
41601
- ), x = _ * Math.sqrt(y), w = x * r * m / n, M = -x * n * g / r, C = c * w - u * M + (s + e) / 2, P = u * w + c * M + (t + i) / 2, R = s0(1, 0, (g - w) / r, (m - M) / n);
41577
+ (r * r * n * n - r * r * p * p - n * n * g * g) / (r * r * p * p + n * n * g * g)
41578
+ ), x = _ * Math.sqrt(y), w = x * r * p / n, M = -x * n * g / r, C = c * w - u * M + (s + e) / 2, P = u * w + c * M + (t + i) / 2, R = s0(1, 0, (g - w) / r, (p - M) / n);
41602
41579
  let O = s0(
41603
41580
  (g - w) / r,
41604
- (m - M) / n,
41581
+ (p - M) / n,
41605
41582
  (-g - w) / r,
41606
- (-m - M) / n
41583
+ (-p - M) / n
41607
41584
  );
41608
41585
  h === 0 && O > 0 ? O -= 2 * Math.PI : h === 1 && O < 0 && (O += 2 * Math.PI);
41609
41586
  const z = Math.max(1, Math.ceil(Math.abs(O) / (Math.PI / 2))), I = O / z;
@@ -41665,10 +41642,10 @@ class $a extends Mt {
41665
41642
  return;
41666
41643
  }
41667
41644
  const l = h.querySelectorAll("path");
41668
- for (const p of l) {
41669
- const _ = p.getAttribute("d");
41645
+ for (const m of l) {
41646
+ const _ = m.getAttribute("d");
41670
41647
  if (!_) continue;
41671
- const y = p.getAttribute("stroke") || e, x = p.getAttribute("fill") || r, w = p.getAttribute("stroke-width"), M = w ? parseFloat(w) : i, C = Ti(_);
41648
+ const y = m.getAttribute("stroke") || e, x = m.getAttribute("fill") || r, w = m.getAttribute("stroke-width"), M = w ? parseFloat(w) : i, C = Ti(_);
41672
41649
  for (const P of C) {
41673
41650
  if (P.length === 0) continue;
41674
41651
  const R = P.map((z) => [z[0], z[1], 0]), O = Xi(
@@ -41682,24 +41659,24 @@ class $a extends Mt {
41682
41659
  }
41683
41660
  }
41684
41661
  const c = h.querySelectorAll("rect");
41685
- for (const p of c) {
41686
- const _ = parseFloat(p.getAttribute("x") || "0"), y = parseFloat(p.getAttribute("y") || "0"), x = parseFloat(p.getAttribute("width") || "0"), w = parseFloat(p.getAttribute("height") || "0");
41662
+ for (const m of c) {
41663
+ const _ = parseFloat(m.getAttribute("x") || "0"), y = parseFloat(m.getAttribute("y") || "0"), x = parseFloat(m.getAttribute("width") || "0"), w = parseFloat(m.getAttribute("height") || "0");
41687
41664
  if (x <= 0 || w <= 0) continue;
41688
41665
  const M = `M${_},${y} L${_ + x},${y} L${_ + x},${y + w} L${_},${y + w} Z`, C = Ti(M);
41689
41666
  for (const P of C) {
41690
41667
  const R = P.map((z) => [z[0], z[1], 0]), O = Xi(
41691
41668
  R,
41692
- p.getAttribute("stroke") || e,
41693
- parseFloat(p.getAttribute("stroke-width") || String(i)),
41694
- p.getAttribute("fill") !== "none" && p.getAttribute("fill") || void 0,
41695
- p.getAttribute("fill") && p.getAttribute("fill") !== "none" ? n ?? 0.5 : 0
41669
+ m.getAttribute("stroke") || e,
41670
+ parseFloat(m.getAttribute("stroke-width") || String(i)),
41671
+ m.getAttribute("fill") !== "none" && m.getAttribute("fill") || void 0,
41672
+ m.getAttribute("fill") && m.getAttribute("fill") !== "none" ? n ?? 0.5 : 0
41696
41673
  );
41697
41674
  this.add(O);
41698
41675
  }
41699
41676
  }
41700
41677
  const u = h.querySelectorAll("circle");
41701
- for (const p of u) {
41702
- const _ = parseFloat(p.getAttribute("cx") || "0"), y = parseFloat(p.getAttribute("cy") || "0"), x = parseFloat(p.getAttribute("r") || "0");
41678
+ for (const m of u) {
41679
+ const _ = parseFloat(m.getAttribute("cx") || "0"), y = parseFloat(m.getAttribute("cy") || "0"), x = parseFloat(m.getAttribute("r") || "0");
41703
41680
  if (x <= 0) continue;
41704
41681
  const w = 0.5522847498, M = `M${_ + x},${y}
41705
41682
  C${_ + x},${y + w * x} ${_ + w * x},${y + x} ${_},${y + x}
@@ -41710,17 +41687,17 @@ class $a extends Mt {
41710
41687
  for (const P of C) {
41711
41688
  const R = P.map((z) => [z[0], z[1], 0]), O = Xi(
41712
41689
  R,
41713
- p.getAttribute("stroke") || e,
41714
- parseFloat(p.getAttribute("stroke-width") || String(i)),
41715
- p.getAttribute("fill") !== "none" && p.getAttribute("fill") || void 0,
41716
- p.getAttribute("fill") && p.getAttribute("fill") !== "none" ? n ?? 0.5 : 0
41690
+ m.getAttribute("stroke") || e,
41691
+ parseFloat(m.getAttribute("stroke-width") || String(i)),
41692
+ m.getAttribute("fill") !== "none" && m.getAttribute("fill") || void 0,
41693
+ m.getAttribute("fill") && m.getAttribute("fill") !== "none" ? n ?? 0.5 : 0
41717
41694
  );
41718
41695
  this.add(O);
41719
41696
  }
41720
41697
  }
41721
41698
  const d = h.querySelectorAll("ellipse");
41722
- for (const p of d) {
41723
- const _ = parseFloat(p.getAttribute("cx") || "0"), y = parseFloat(p.getAttribute("cy") || "0"), x = parseFloat(p.getAttribute("rx") || "0"), w = parseFloat(p.getAttribute("ry") || "0");
41699
+ for (const m of d) {
41700
+ const _ = parseFloat(m.getAttribute("cx") || "0"), y = parseFloat(m.getAttribute("cy") || "0"), x = parseFloat(m.getAttribute("rx") || "0"), w = parseFloat(m.getAttribute("ry") || "0");
41724
41701
  if (x <= 0 || w <= 0) continue;
41725
41702
  const M = 0.5522847498, C = `M${_ + x},${y}
41726
41703
  C${_ + x},${y + M * w} ${_ + M * x},${y + w} ${_},${y + w}
@@ -41731,27 +41708,27 @@ class $a extends Mt {
41731
41708
  for (const R of P) {
41732
41709
  const O = R.map((I) => [I[0], I[1], 0]), z = Xi(
41733
41710
  O,
41734
- p.getAttribute("stroke") || e,
41735
- parseFloat(p.getAttribute("stroke-width") || String(i))
41711
+ m.getAttribute("stroke") || e,
41712
+ parseFloat(m.getAttribute("stroke-width") || String(i))
41736
41713
  );
41737
41714
  this.add(z);
41738
41715
  }
41739
41716
  }
41740
41717
  const f = h.querySelectorAll("line");
41741
- for (const p of f) {
41742
- const _ = parseFloat(p.getAttribute("x1") || "0"), y = parseFloat(p.getAttribute("y1") || "0"), x = parseFloat(p.getAttribute("x2") || "0"), w = parseFloat(p.getAttribute("y2") || "0"), M = `M${_},${y} L${x},${w}`, C = Ti(M);
41718
+ for (const m of f) {
41719
+ const _ = parseFloat(m.getAttribute("x1") || "0"), y = parseFloat(m.getAttribute("y1") || "0"), x = parseFloat(m.getAttribute("x2") || "0"), w = parseFloat(m.getAttribute("y2") || "0"), M = `M${_},${y} L${x},${w}`, C = Ti(M);
41743
41720
  for (const P of C) {
41744
41721
  const R = P.map((z) => [z[0], z[1], 0]), O = Xi(
41745
41722
  R,
41746
- p.getAttribute("stroke") || e,
41747
- parseFloat(p.getAttribute("stroke-width") || String(i))
41723
+ m.getAttribute("stroke") || e,
41724
+ parseFloat(m.getAttribute("stroke-width") || String(i))
41748
41725
  );
41749
41726
  this.add(O);
41750
41727
  }
41751
41728
  }
41752
41729
  const g = h.querySelectorAll("polygon");
41753
- for (const p of g) {
41754
- const _ = p.getAttribute("points");
41730
+ for (const m of g) {
41731
+ const _ = m.getAttribute("points");
41755
41732
  if (!_) continue;
41756
41733
  const y = _.trim().split(/[\s,]+/).map(parseFloat);
41757
41734
  if (y.length < 4) continue;
@@ -41763,17 +41740,17 @@ class $a extends Mt {
41763
41740
  for (const M of w) {
41764
41741
  const C = M.map((R) => [R[0], R[1], 0]), P = Xi(
41765
41742
  C,
41766
- p.getAttribute("stroke") || e,
41767
- parseFloat(p.getAttribute("stroke-width") || String(i)),
41768
- p.getAttribute("fill") !== "none" && p.getAttribute("fill") || void 0,
41769
- p.getAttribute("fill") && p.getAttribute("fill") !== "none" ? n ?? 0.5 : 0
41743
+ m.getAttribute("stroke") || e,
41744
+ parseFloat(m.getAttribute("stroke-width") || String(i)),
41745
+ m.getAttribute("fill") !== "none" && m.getAttribute("fill") || void 0,
41746
+ m.getAttribute("fill") && m.getAttribute("fill") !== "none" ? n ?? 0.5 : 0
41770
41747
  );
41771
41748
  this.add(P);
41772
41749
  }
41773
41750
  }
41774
- const m = h.querySelectorAll("polyline");
41775
- for (const p of m) {
41776
- const _ = p.getAttribute("points");
41751
+ const p = h.querySelectorAll("polyline");
41752
+ for (const m of p) {
41753
+ const _ = m.getAttribute("points");
41777
41754
  if (!_) continue;
41778
41755
  const y = _.trim().split(/[\s,]+/).map(parseFloat);
41779
41756
  if (y.length < 4) continue;
@@ -41784,8 +41761,8 @@ class $a extends Mt {
41784
41761
  for (const M of w) {
41785
41762
  const C = M.map((R) => [R[0], R[1], 0]), P = Xi(
41786
41763
  C,
41787
- p.getAttribute("stroke") || e,
41788
- parseFloat(p.getAttribute("stroke-width") || String(i))
41764
+ m.getAttribute("stroke") || e,
41765
+ parseFloat(m.getAttribute("stroke-width") || String(i))
41789
41766
  );
41790
41767
  this.add(P);
41791
41768
  }
@@ -41875,21 +41852,21 @@ function Ly(s, t, e, i, r, n) {
41875
41852
  for (const g of s)
41876
41853
  f.set(g, { x: 0, y: 0 });
41877
41854
  for (let g = 0; g < o; g++)
41878
- for (let m = g + 1; m < o; m++) {
41879
- const p = s[g], _ = s[m], y = a.get(p), x = a.get(_), w = y.x - x.x, M = y.y - x.y, C = Math.max(0.01, Math.sqrt(w * w + M * M)), P = c * c / C, R = w / C * P, O = M / C * P;
41880
- f.get(p).x += R, f.get(p).y += O, f.get(_).x -= R, f.get(_).y -= O;
41855
+ for (let p = g + 1; p < o; p++) {
41856
+ const m = s[g], _ = s[p], y = a.get(m), x = a.get(_), w = y.x - x.x, M = y.y - x.y, C = Math.max(0.01, Math.sqrt(w * w + M * M)), P = c * c / C, R = w / C * P, O = M / C * P;
41857
+ f.get(m).x += R, f.get(m).y += O, f.get(_).x -= R, f.get(_).y -= O;
41881
41858
  }
41882
- for (const [g, m] of t) {
41883
- const p = a.get(g), _ = a.get(m);
41884
- if (!p || !_) continue;
41885
- const y = p.x - _.x, x = p.y - _.y, w = Math.max(0.01, Math.sqrt(y * y + x * x)), M = w * w / c, C = y / w * M, P = x / w * M;
41886
- f.get(g).x -= C, f.get(g).y -= P, f.get(m).x += C, f.get(m).y += P;
41859
+ for (const [g, p] of t) {
41860
+ const m = a.get(g), _ = a.get(p);
41861
+ if (!m || !_) continue;
41862
+ const y = m.x - _.x, x = m.y - _.y, w = Math.max(0.01, Math.sqrt(y * y + x * x)), M = w * w / c, C = y / w * M, P = x / w * M;
41863
+ f.get(g).x -= C, f.get(g).y -= P, f.get(p).x += C, f.get(p).y += P;
41887
41864
  }
41888
41865
  for (const g of s) {
41889
- const m = f.get(g), p = a.get(g), _ = Math.sqrt(m.x * m.x + m.y * m.y);
41866
+ const p = f.get(g), m = a.get(g), _ = Math.sqrt(p.x * p.x + p.y * p.y);
41890
41867
  if (_ > 0) {
41891
41868
  const y = Math.min(_, u) / _;
41892
- p.x += m.x * y, p.y += m.y * y;
41869
+ m.x += p.x * y, m.y += p.y * y;
41893
41870
  }
41894
41871
  }
41895
41872
  u *= 0.95;
@@ -41924,9 +41901,9 @@ function Oy(s, t, e, i, r, n) {
41924
41901
  return d.set(x, C), C;
41925
41902
  }
41926
41903
  f(a, 0);
41927
- const g = Math.max(...Array.from(u.values())), m = g > 0 ? i * 2 / g : 1;
41928
- function p(x, w, M) {
41929
- const C = u.get(x), P = (w + M) / 2, R = r[1] + i - C * m;
41904
+ const g = Math.max(...Array.from(u.values())), p = g > 0 ? i * 2 / g : 1;
41905
+ function m(x, w, M) {
41906
+ const C = u.get(x), P = (w + M) / 2, R = r[1] + i - C * p;
41930
41907
  e.set(x, [P, R, r[2]]);
41931
41908
  const O = o.get(x) ?? [];
41932
41909
  if (O.length === 0) return;
@@ -41934,11 +41911,11 @@ function Oy(s, t, e, i, r, n) {
41934
41911
  let I = w;
41935
41912
  for (const W of O) {
41936
41913
  const H = d.get(W), N = (M - w) * H / z;
41937
- p(W, I, I + N), I += N;
41914
+ m(W, I, I + N), I += N;
41938
41915
  }
41939
41916
  }
41940
41917
  const _ = i * 2;
41941
- p(a, r[0] - _ / 2, r[0] + _ / 2);
41918
+ m(a, r[0] - _ / 2, r[0] + _ / 2);
41942
41919
  let y = 0;
41943
41920
  for (const x of s)
41944
41921
  e.has(x) || (e.set(x, [r[0] + y * 0.5, r[1] - i, r[2]]), y++);
@@ -41995,29 +41972,29 @@ function By(s, t, e, i, r, n) {
41995
41972
  h.set(f, g), a[g][g] = 0;
41996
41973
  });
41997
41974
  for (const [f, g] of t) {
41998
- const m = h.get(f), p = h.get(g);
41999
- a[m][p] = 1, a[p][m] = 1;
41975
+ const p = h.get(f), m = h.get(g);
41976
+ a[p][m] = 1, a[m][p] = 1;
42000
41977
  }
42001
41978
  for (let f = 0; f < o; f++)
42002
41979
  for (let g = 0; g < o; g++)
42003
- for (let m = 0; m < o; m++)
42004
- a[g][f] + a[f][m] < a[g][m] && (a[g][m] = a[g][f] + a[f][m]);
41980
+ for (let p = 0; p < o; p++)
41981
+ a[g][f] + a[f][p] < a[g][p] && (a[g][p] = a[g][f] + a[f][p]);
42005
41982
  const l = Math.max(...a.flat().filter((f) => f !== 1 / 0)), c = i / (l || 1), u = 1, d = s.map((f) => {
42006
41983
  const g = e.get(f);
42007
41984
  return { x: g[0], y: g[1] };
42008
41985
  });
42009
41986
  for (let f = 0; f < n; f++)
42010
41987
  for (let g = 0; g < o; g++) {
42011
- let m = 0, p = 0;
41988
+ let p = 0, m = 0;
42012
41989
  for (let y = 0; y < o; y++) {
42013
41990
  if (y === g || a[g][y] === 1 / 0) continue;
42014
41991
  const x = d[g].x - d[y].x, w = d[g].y - d[y].y, M = Math.sqrt(x * x + w * w);
42015
41992
  if (M === 0) continue;
42016
41993
  const C = c * a[g][y], P = u / (a[g][y] * a[g][y]);
42017
- m += P * (x - C * x / M), p += P * (w - C * w / M);
41994
+ p += P * (x - C * x / M), m += P * (w - C * w / M);
42018
41995
  }
42019
41996
  const _ = 0.1;
42020
- d[g].x -= _ * m, d[g].y -= _ * p;
41997
+ d[g].x -= _ * p, d[g].y -= _ * m;
42021
41998
  }
42022
41999
  for (let f = 0; f < o; f++)
42023
42000
  e.set(s[f], [d[f].x, d[f].y, r[2]]);
@@ -42637,8 +42614,8 @@ class dd extends st {
42637
42614
  for (let d = 0; d < e; d++) {
42638
42615
  const f = t[d];
42639
42616
  for (let g = 0; g < i; g++) {
42640
- const m = Math.max(0, Math.min(255, Math.round(f[g] ?? 0))), p = (d * i + g) * 4;
42641
- a[p] = m, a[p + 1] = m, a[p + 2] = m, a[p + 3] = 255;
42617
+ const p = Math.max(0, Math.min(255, Math.round(f[g] ?? 0))), m = (d * i + g) * 4;
42618
+ a[m] = p, a[m + 1] = p, a[m + 2] = p, a[m + 3] = 255;
42642
42619
  }
42643
42620
  }
42644
42621
  n.putImageData(o, 0, 0);
@@ -44209,8 +44186,8 @@ class yd extends Mt {
44209
44186
  this._removeVerticalPartitions();
44210
44187
  const h = this._ssWidth, l = this._ssHeight, [c, u, d] = this._ssCenter;
44211
44188
  let g = c - h / 2;
44212
- for (let m = 0; m < t.length; m++) {
44213
- const p = t[m], _ = h * p, y = g + _ / 2, x = u, w = i ? i[m % i.length] : hs[m % hs.length], M = new ve({
44189
+ for (let p = 0; p < t.length; p++) {
44190
+ const m = t[p], _ = h * m, y = g + _ / 2, x = u, w = i ? i[p % i.length] : hs[p % hs.length], M = new ve({
44214
44191
  width: _,
44215
44192
  height: l,
44216
44193
  color: w,
@@ -44219,11 +44196,11 @@ class yd extends Mt {
44219
44196
  center: [y, x, d]
44220
44197
  }), C = {
44221
44198
  rectangle: M,
44222
- proportion: p
44199
+ proportion: m
44223
44200
  };
44224
- if (n && n[m]) {
44201
+ if (n && n[p]) {
44225
44202
  const P = new Te({
44226
- text: n[m],
44203
+ text: n[p],
44227
44204
  fontSize: o,
44228
44205
  color: a
44229
44206
  });
@@ -44262,8 +44239,8 @@ class yd extends Mt {
44262
44239
  this._removeHorizontalPartitions();
44263
44240
  const h = this._ssWidth, l = this._ssHeight, [c, u, d] = this._ssCenter;
44264
44241
  let g = u + l / 2;
44265
- for (let m = 0; m < t.length; m++) {
44266
- const p = t[m], _ = l * p, y = c, x = g - _ / 2, w = i ? i[m % i.length] : hs[m % hs.length], M = new ve({
44242
+ for (let p = 0; p < t.length; p++) {
44243
+ const m = t[p], _ = l * m, y = c, x = g - _ / 2, w = i ? i[p % i.length] : hs[p % hs.length], M = new ve({
44267
44244
  width: h,
44268
44245
  height: _,
44269
44246
  color: w,
@@ -44272,11 +44249,11 @@ class yd extends Mt {
44272
44249
  center: [y, x, d]
44273
44250
  }), C = {
44274
44251
  rectangle: M,
44275
- proportion: p
44252
+ proportion: m
44276
44253
  };
44277
- if (n && n[m]) {
44254
+ if (n && n[p]) {
44278
44255
  const P = new Te({
44279
- text: n[m],
44256
+ text: n[p],
44280
44257
  fontSize: o,
44281
44258
  color: a
44282
44259
  });
@@ -44319,8 +44296,8 @@ class yd extends Mt {
44319
44296
  labelColor: h = St
44320
44297
  } = i;
44321
44298
  this._removeSubdivisions(t);
44322
- const c = this._verticalPartitions[t].rectangle, u = c.getWidth(), d = c.getHeight(), f = c.getRectCenter(), [g, m, p] = f;
44323
- let y = m + d / 2;
44299
+ const c = this._verticalPartitions[t].rectangle, u = c.getWidth(), d = c.getHeight(), f = c.getRectCenter(), [g, p, m] = f;
44300
+ let y = p + d / 2;
44324
44301
  const x = [];
44325
44302
  for (let w = 0; w < e.length; w++) {
44326
44303
  const M = e[w], C = d * M, P = g, R = y - C / 2, O = r ? r[w % r.length] : hs[(t + w + 2) % hs.length], z = new ve({
@@ -44329,7 +44306,7 @@ class yd extends Mt {
44329
44306
  color: O,
44330
44307
  fillOpacity: n,
44331
44308
  strokeWidth: this._outline.strokeWidth * 0.5,
44332
- center: [P, R, p + 1e-3]
44309
+ center: [P, R, m + 1e-3]
44333
44310
  }), I = {
44334
44311
  rectangle: z,
44335
44312
  proportion: M
@@ -44340,7 +44317,7 @@ class yd extends Mt {
44340
44317
  fontSize: a,
44341
44318
  color: h
44342
44319
  });
44343
- W.moveTo([P, R, p + 0.02]), I.label = W, this.add(W);
44320
+ W.moveTo([P, R, m + 0.02]), I.label = W, this.add(W);
44344
44321
  }
44345
44322
  x.push(I), this.add(z), y -= C;
44346
44323
  }
@@ -45120,14 +45097,14 @@ class xd extends xt {
45120
45097
  let f = 1;
45121
45098
  d.traverse((g) => {
45122
45099
  if (g instanceof gt) {
45123
- const m = g.material;
45124
- m.dashed = !0, m.dashScale = 1, g.computeLineDistances();
45100
+ const p = g.material;
45101
+ p.dashed = !0, p.dashScale = 1, g.computeLineDistances();
45125
45102
  const _ = g.geometry.attributes.instanceDistanceEnd;
45126
45103
  if (_ && _.count > 0) {
45127
45104
  const y = _.data ? _.data.array : _.array;
45128
45105
  f = y[y.length - 1] || 1;
45129
45106
  }
45130
- m.dashSize = 0, m.gapSize = f, m.needsUpdate = !0;
45107
+ p.dashSize = 0, p.gapSize = f, p.needsUpdate = !0;
45131
45108
  }
45132
45109
  }), this._skeletonVMobs.push(u), this._skeletonTotalLengths.push(f), this._glyphTotalLengths.push(1);
45133
45110
  } else {
@@ -45137,10 +45114,10 @@ class xd extends xt {
45137
45114
  if (d instanceof gt) {
45138
45115
  const f = d.material;
45139
45116
  f.dashed = !0, f.dashScale = 1, d.computeLineDistances();
45140
- const m = d.geometry.attributes.instanceDistanceEnd;
45141
- if (m && m.count > 0) {
45142
- const p = m.data ? m.data.array : m.array;
45143
- u = p[p.length - 1] || 1;
45117
+ const p = d.geometry.attributes.instanceDistanceEnd;
45118
+ if (p && p.count > 0) {
45119
+ const m = p.data ? p.data.array : p.array;
45120
+ u = m[m.length - 1] || 1;
45144
45121
  }
45145
45122
  f.dashSize = 0, f.gapSize = u, f.needsUpdate = !0;
45146
45123
  }
@@ -45176,16 +45153,16 @@ class xd extends xt {
45176
45153
  const d = this._skeletonTotalLengths[a] || 1;
45177
45154
  u.getThreeObject().traverse((g) => {
45178
45155
  if (g instanceof gt) {
45179
- const m = g.material, p = c * d;
45180
- m.dashSize = p, m.gapSize = d - p + 1e-4, m.needsUpdate = !0;
45156
+ const p = g.material, m = c * d;
45157
+ p.dashSize = m, p.gapSize = d - m + 1e-4, p.needsUpdate = !0;
45181
45158
  }
45182
45159
  });
45183
45160
  } else {
45184
45161
  const d = this._glyphTotalLengths[a] || 1;
45185
- i[a].getThreeObject().traverse((m) => {
45186
- if (m instanceof gt) {
45187
- const p = m.material, _ = c * d;
45188
- p.dashSize = _, p.gapSize = d - _ + 1e-4, p.needsUpdate = !0;
45162
+ i[a].getThreeObject().traverse((p) => {
45163
+ if (p instanceof gt) {
45164
+ const m = p.material, _ = c * d;
45165
+ m.dashSize = _, m.gapSize = d - _ + 1e-4, m.needsUpdate = !0;
45189
45166
  }
45190
45167
  });
45191
45168
  }
@@ -45561,40 +45538,40 @@ function s4(s) {
45561
45538
  assignedCols: /* @__PURE__ */ new Set()
45562
45539
  };
45563
45540
  let i = 0;
45564
- for (let m = 0; m < t; m++)
45565
- for (let p = 0; p < e; p++)
45566
- s[m][p] > i && (i = s[m][p]);
45541
+ for (let p = 0; p < t; p++)
45542
+ for (let m = 0; m < e; m++)
45543
+ s[p][m] > i && (i = s[p][m]);
45567
45544
  const r = i * 10 + 1, n = Math.max(t, e), o = Array.from(
45568
45545
  { length: n },
45569
- (m, p) => Array.from({ length: n }, (_, y) => p < t && y < e ? s[p][y] : r)
45546
+ (p, m) => Array.from({ length: n }, (_, y) => m < t && y < e ? s[m][y] : r)
45570
45547
  ), a = new Float64Array(n + 1), h = new Float64Array(n + 1), l = new Int32Array(n + 1).fill(0), c = new Int32Array(n + 1).fill(0);
45571
- for (let m = 1; m <= n; m++) {
45572
- l[0] = m;
45573
- let p = 0;
45548
+ for (let p = 1; p <= n; p++) {
45549
+ l[0] = p;
45550
+ let m = 0;
45574
45551
  const _ = new Float64Array(n + 1).fill(1 / 0), y = new Uint8Array(n + 1);
45575
45552
  do {
45576
- y[p] = 1;
45577
- const x = l[p];
45553
+ y[m] = 1;
45554
+ const x = l[m];
45578
45555
  let w = 1 / 0, M = -1;
45579
45556
  for (let C = 1; C <= n; C++) {
45580
45557
  if (y[C]) continue;
45581
45558
  const P = o[x - 1][C - 1] - a[x] - h[C];
45582
- P < _[C] && (_[C] = P, c[C] = p), _[C] < w && (w = _[C], M = C);
45559
+ P < _[C] && (_[C] = P, c[C] = m), _[C] < w && (w = _[C], M = C);
45583
45560
  }
45584
45561
  for (let C = 0; C <= n; C++)
45585
45562
  y[C] ? (a[l[C]] += w, h[C] -= w) : _[C] -= w;
45586
- p = M;
45587
- } while (l[p] !== 0);
45563
+ m = M;
45564
+ } while (l[m] !== 0);
45588
45565
  do {
45589
- const x = c[p];
45590
- l[p] = l[x], p = x;
45591
- } while (p !== 0);
45566
+ const x = c[m];
45567
+ l[m] = l[x], m = x;
45568
+ } while (m !== 0);
45592
45569
  }
45593
45570
  const u = new Array(t).fill(-1), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
45594
45571
  let g = 0;
45595
- for (let m = 1; m <= n; m++) {
45596
- const p = l[m] - 1, _ = m - 1;
45597
- p >= 0 && p < t && _ < e && (u[p] = _, d.add(p), f.add(_), g += s[p][_]);
45572
+ for (let p = 1; p <= n; p++) {
45573
+ const m = l[p] - 1, _ = p - 1;
45574
+ m >= 0 && m < t && _ < e && (u[m] = _, d.add(m), f.add(_), g += s[m][_]);
45598
45575
  }
45599
45576
  return { assignments: u, totalCost: g, assignedRows: d, assignedCols: f };
45600
45577
  }
@@ -46187,10 +46164,10 @@ class v4 extends xt {
46187
46164
  a[0] - c.original[0],
46188
46165
  a[1] - c.original[1],
46189
46166
  a[2] - c.original[2]
46190
- ], f = this.homotopyFunc(a[0], a[1], a[2], t), g = (o - h) / (l - h), m = (1 - g) * (c.transformed[0] + d[0]) + g * (u.transformed[0] + d[0] - (u.original[0] - c.original[0])), p = (1 - g) * (c.transformed[1] + d[1]) + g * (u.transformed[1] + d[1] - (u.original[1] - c.original[1])), _ = (1 - g) * (c.transformed[2] + d[2]) + g * (u.transformed[2] + d[2] - (u.original[2] - c.original[2])), y = 0.5;
46167
+ ], f = this.homotopyFunc(a[0], a[1], a[2], t), g = (o - h) / (l - h), p = (1 - g) * (c.transformed[0] + d[0]) + g * (u.transformed[0] + d[0] - (u.original[0] - c.original[0])), m = (1 - g) * (c.transformed[1] + d[1]) + g * (u.transformed[1] + d[1] - (u.original[1] - c.original[1])), _ = (1 - g) * (c.transformed[2] + d[2]) + g * (u.transformed[2] + d[2] - (u.original[2] - c.original[2])), y = 0.5;
46191
46168
  r[o] = [
46192
- f[0] * (1 - y) + m * y,
46193
- f[1] * (1 - y) + p * y,
46169
+ f[0] * (1 - y) + p * y,
46170
+ f[1] * (1 - y) + m * y,
46194
46171
  f[2] * (1 - y) + _ * y
46195
46172
  ];
46196
46173
  } else if (h >= 0) {
@@ -46977,20 +46954,20 @@ class A4 extends xt {
46977
46954
  if (this.ripples) {
46978
46955
  const f = o - this._center[0], g = a - this._center[1];
46979
46956
  l = Math.sqrt(f * f + g * g);
46980
- const m = Math.max(
46957
+ const p = Math.max(
46981
46958
  this._bounds.maxX - this._center[0],
46982
46959
  this._center[0] - this._bounds.minX,
46983
46960
  this._bounds.maxY - this._center[1],
46984
46961
  this._center[1] - this._bounds.minY
46985
46962
  );
46986
- l = l / (m || 1);
46963
+ l = l / (p || 1);
46987
46964
  } else this.direction === "horizontal" ? l = (o - this._bounds.minX) / (this._bounds.maxX - this._bounds.minX || 1) : l = (a - this._bounds.minY) / (this._bounds.maxY - this._bounds.minY || 1);
46988
46965
  const c = (l - i) * Math.PI * 2 * this.wavelength, u = Math.sin(t * Math.PI), d = Math.sin(c) * this.amplitude * u;
46989
46966
  if (this.ripples) {
46990
- const f = o - this._center[0], g = a - this._center[1], m = Math.sqrt(f * f + g * g) || 1;
46967
+ const f = o - this._center[0], g = a - this._center[1], p = Math.sqrt(f * f + g * g) || 1;
46991
46968
  return [
46992
- o + f / m * d * 0.5,
46993
- a + g / m * d * 0.5,
46969
+ o + f / p * d * 0.5,
46970
+ a + g / p * d * 0.5,
46994
46971
  h
46995
46972
  ];
46996
46973
  } else return this.direction === "horizontal" ? [o, a + d, h] : [o + d, a, h];
@@ -48289,8 +48266,8 @@ function j4() {
48289
48266
  }
48290
48267
  var f = r[l] = { exports: {} };
48291
48268
  i[l][0].call(f.exports, function(g) {
48292
- var m = i[l][1][g];
48293
- return o(m || g);
48269
+ var p = i[l][1][g];
48270
+ return o(p || g);
48294
48271
  }, f, f.exports, e, i, r, n);
48295
48272
  }
48296
48273
  return r[l].exports;
@@ -48305,7 +48282,7 @@ function j4() {
48305
48282
  if (!a(c) || c < 0 || isNaN(c)) throw TypeError("n must be a positive number");
48306
48283
  return this._maxListeners = c, this;
48307
48284
  }, n.prototype.emit = function(c) {
48308
- var u, d, f, g, m, p;
48285
+ var u, d, f, g, p, m;
48309
48286
  if (this._events || (this._events = {}), c === "error" && (!this._events.error || h(this._events.error) && !this._events.error.length)) {
48310
48287
  if (u = arguments[1], u instanceof Error)
48311
48288
  throw u;
@@ -48328,7 +48305,7 @@ function j4() {
48328
48305
  g = Array.prototype.slice.call(arguments, 1), d.apply(this, g);
48329
48306
  }
48330
48307
  else if (h(d))
48331
- for (g = Array.prototype.slice.call(arguments, 1), p = d.slice(), f = p.length, m = 0; m < f; m++) p[m].apply(this, g);
48308
+ for (g = Array.prototype.slice.call(arguments, 1), m = d.slice(), f = m.length, p = 0; p < f; p++) m[p].apply(this, g);
48332
48309
  return !0;
48333
48310
  }, n.prototype.addListener = function(c, u) {
48334
48311
  var d;
@@ -48342,15 +48319,15 @@ function j4() {
48342
48319
  }
48343
48320
  return f.listener = u, this.on(c, f), this;
48344
48321
  }, n.prototype.removeListener = function(c, u) {
48345
- var d, f, g, m;
48322
+ var d, f, g, p;
48346
48323
  if (!o(u)) throw TypeError("listener must be a function");
48347
48324
  if (!this._events || !this._events[c]) return this;
48348
48325
  if (d = this._events[c], g = d.length, f = -1, d === u || o(d.listener) && d.listener === u)
48349
48326
  delete this._events[c], this._events.removeListener && this.emit("removeListener", c, u);
48350
48327
  else if (h(d)) {
48351
- for (m = g; m-- > 0; )
48352
- if (d[m] === u || d[m].listener && d[m].listener === u) {
48353
- f = m;
48328
+ for (p = g; p-- > 0; )
48329
+ if (d[p] === u || d[p].listener && d[p].listener === u) {
48330
+ f = p;
48354
48331
  break;
48355
48332
  }
48356
48333
  if (f < 0) return this;
@@ -48404,10 +48381,10 @@ function j4() {
48404
48381
  var n, o, a, h = function(d, f) {
48405
48382
  for (var g in f)
48406
48383
  l.call(f, g) && (d[g] = f[g]);
48407
- function m() {
48384
+ function p() {
48408
48385
  this.constructor = d;
48409
48386
  }
48410
- return m.prototype = f.prototype, d.prototype = new m(), d.__super__ = f.prototype, d;
48387
+ return p.prototype = f.prototype, d.prototype = new p(), d.__super__ = f.prototype, d;
48411
48388
  }, l = {}.hasOwnProperty, c = [].indexOf || function(d) {
48412
48389
  for (var f = 0, g = this.length; f < g; f++)
48413
48390
  if (f in this && this[f] === d) return f;
@@ -48415,38 +48392,38 @@ function j4() {
48415
48392
  }, u = [].slice;
48416
48393
  n = e("events").EventEmitter, a = e("./browser.coffee"), o = (function(d) {
48417
48394
  var f, g;
48418
- h(m, d), f = { workerScript: "gif.worker.js", workers: 2, repeat: 0, background: "#fff", quality: 10, width: null, height: null, transparent: null, debug: !1, dither: !1 }, g = { delay: 500, copy: !1 };
48419
- function m(p) {
48395
+ h(p, d), f = { workerScript: "gif.worker.js", workers: 2, repeat: 0, background: "#fff", quality: 10, width: null, height: null, transparent: null, debug: !1, dither: !1 }, g = { delay: 500, copy: !1 };
48396
+ function p(m) {
48420
48397
  var _, y, x;
48421
- this.running = !1, this.options = {}, this.frames = [], this.freeWorkers = [], this.activeWorkers = [], this.setOptions(p);
48398
+ this.running = !1, this.options = {}, this.frames = [], this.freeWorkers = [], this.activeWorkers = [], this.setOptions(m);
48422
48399
  for (y in f)
48423
48400
  x = f[y], (_ = this.options)[y] == null && (_[y] = x);
48424
48401
  }
48425
- return m.prototype.setOption = function(p, _) {
48426
- if (this.options[p] = _, this._canvas != null && (p === "width" || p === "height"))
48427
- return this._canvas[p] = _;
48428
- }, m.prototype.setOptions = function(p) {
48402
+ return p.prototype.setOption = function(m, _) {
48403
+ if (this.options[m] = _, this._canvas != null && (m === "width" || m === "height"))
48404
+ return this._canvas[m] = _;
48405
+ }, p.prototype.setOptions = function(m) {
48429
48406
  var _, y, x;
48430
48407
  y = [];
48431
- for (_ in p)
48432
- l.call(p, _) && (x = p[_], y.push(this.setOption(_, x)));
48408
+ for (_ in m)
48409
+ l.call(m, _) && (x = m[_], y.push(this.setOption(_, x)));
48433
48410
  return y;
48434
- }, m.prototype.addFrame = function(p, _) {
48411
+ }, p.prototype.addFrame = function(m, _) {
48435
48412
  var y, x;
48436
48413
  _ == null && (_ = {}), y = {}, y.transparent = this.options.transparent;
48437
48414
  for (x in g)
48438
48415
  y[x] = _[x] || g[x];
48439
- if (this.options.width == null && this.setOption("width", p.width), this.options.height == null && this.setOption("height", p.height), typeof ImageData < "u" && ImageData !== null && p instanceof ImageData)
48440
- y.data = p.data;
48441
- else if (typeof CanvasRenderingContext2D < "u" && CanvasRenderingContext2D !== null && p instanceof CanvasRenderingContext2D || typeof WebGLRenderingContext < "u" && WebGLRenderingContext !== null && p instanceof WebGLRenderingContext)
48442
- _.copy ? y.data = this.getContextData(p) : y.context = p;
48443
- else if (p.childNodes != null)
48444
- _.copy ? y.data = this.getImageData(p) : y.image = p;
48416
+ if (this.options.width == null && this.setOption("width", m.width), this.options.height == null && this.setOption("height", m.height), typeof ImageData < "u" && ImageData !== null && m instanceof ImageData)
48417
+ y.data = m.data;
48418
+ else if (typeof CanvasRenderingContext2D < "u" && CanvasRenderingContext2D !== null && m instanceof CanvasRenderingContext2D || typeof WebGLRenderingContext < "u" && WebGLRenderingContext !== null && m instanceof WebGLRenderingContext)
48419
+ _.copy ? y.data = this.getContextData(m) : y.context = m;
48420
+ else if (m.childNodes != null)
48421
+ _.copy ? y.data = this.getImageData(m) : y.image = m;
48445
48422
  else
48446
48423
  throw new Error("Invalid image");
48447
48424
  return this.frames.push(y);
48448
- }, m.prototype.render = function() {
48449
- var p, _, y;
48425
+ }, p.prototype.render = function() {
48426
+ var m, _, y;
48450
48427
  if (this.running)
48451
48428
  throw new Error("Already running");
48452
48429
  if (this.options.width == null || this.options.height == null)
@@ -48459,18 +48436,18 @@ function j4() {
48459
48436
  }).call(this), _ = this.spawnWorkers(), this.options.globalPalette === !0)
48460
48437
  this.renderNextFrame();
48461
48438
  else
48462
- for (p = 0, y = _; 0 <= y ? p < y : p > y; 0 <= y ? ++p : --p)
48439
+ for (m = 0, y = _; 0 <= y ? m < y : m > y; 0 <= y ? ++m : --m)
48463
48440
  this.renderNextFrame();
48464
48441
  return this.emit("start"), this.emit("progress", 0);
48465
- }, m.prototype.abort = function() {
48466
- for (var p; p = this.activeWorkers.shift(), p != null; )
48467
- this.log("killing active worker"), p.terminate();
48442
+ }, p.prototype.abort = function() {
48443
+ for (var m; m = this.activeWorkers.shift(), m != null; )
48444
+ this.log("killing active worker"), m.terminate();
48468
48445
  return this.running = !1, this.emit("abort");
48469
- }, m.prototype.spawnWorkers = function() {
48470
- var p, _, y;
48471
- return p = Math.min(this.options.workers, this.frames.length), (function() {
48446
+ }, p.prototype.spawnWorkers = function() {
48447
+ var m, _, y;
48448
+ return m = Math.min(this.options.workers, this.frames.length), (function() {
48472
48449
  y = [];
48473
- for (var x = _ = this.freeWorkers.length; _ <= p ? x < p : x > p; _ <= p ? x++ : x--)
48450
+ for (var x = _ = this.freeWorkers.length; _ <= m ? x < m : x > m; _ <= m ? x++ : x--)
48474
48451
  y.push(x);
48475
48452
  return y;
48476
48453
  }).apply(this).forEach(/* @__PURE__ */ (function(x) {
@@ -48480,48 +48457,48 @@ function j4() {
48480
48457
  return x.activeWorkers.splice(x.activeWorkers.indexOf(M), 1), x.freeWorkers.push(M), x.frameFinished(C.data);
48481
48458
  }, x.freeWorkers.push(M);
48482
48459
  };
48483
- })(this)), p;
48484
- }, m.prototype.frameFinished = function(p) {
48460
+ })(this)), m;
48461
+ }, p.prototype.frameFinished = function(m) {
48485
48462
  var _, y;
48486
- if (this.log("frame " + p.index + " finished - " + this.activeWorkers.length + " active"), this.finishedFrames++, this.emit("progress", this.finishedFrames / this.frames.length), this.imageParts[p.index] = p, this.options.globalPalette === !0 && (this.options.globalPalette = p.globalPalette, this.log("global palette analyzed"), this.frames.length > 2))
48463
+ if (this.log("frame " + m.index + " finished - " + this.activeWorkers.length + " active"), this.finishedFrames++, this.emit("progress", this.finishedFrames / this.frames.length), this.imageParts[m.index] = m, this.options.globalPalette === !0 && (this.options.globalPalette = m.globalPalette, this.log("global palette analyzed"), this.frames.length > 2))
48487
48464
  for (_ = 1, y = this.freeWorkers.length; 1 <= y ? _ < y : _ > y; 1 <= y ? ++_ : --_)
48488
48465
  this.renderNextFrame();
48489
48466
  return c.call(this.imageParts, null) >= 0 ? this.renderNextFrame() : this.finishRendering();
48490
- }, m.prototype.finishRendering = function() {
48491
- var p, _, y, x, w, M, C, P, R, O, z, I, W, H, N, q;
48467
+ }, p.prototype.finishRendering = function() {
48468
+ var m, _, y, x, w, M, C, P, R, O, z, I, W, H, N, q;
48492
48469
  for (P = 0, H = this.imageParts, w = 0, R = H.length; w < R; w++)
48493
48470
  _ = H[w], P += (_.data.length - 1) * _.pageSize + _.cursor;
48494
- for (P += _.pageSize - _.cursor, this.log("rendering finished - filesize " + Math.round(P / 1e3) + "kb"), p = new Uint8Array(P), I = 0, N = this.imageParts, M = 0, O = N.length; M < O; M++)
48471
+ for (P += _.pageSize - _.cursor, this.log("rendering finished - filesize " + Math.round(P / 1e3) + "kb"), m = new Uint8Array(P), I = 0, N = this.imageParts, M = 0, O = N.length; M < O; M++)
48495
48472
  for (_ = N[M], q = _.data, y = C = 0, z = q.length; C < z; y = ++C)
48496
- W = q[y], p.set(W, I), y === _.data.length - 1 ? I += _.cursor : I += _.pageSize;
48497
- return x = new Blob([p], { type: "image/gif" }), this.emit("finished", x, p);
48498
- }, m.prototype.renderNextFrame = function() {
48499
- var p, _, y;
48473
+ W = q[y], m.set(W, I), y === _.data.length - 1 ? I += _.cursor : I += _.pageSize;
48474
+ return x = new Blob([m], { type: "image/gif" }), this.emit("finished", x, m);
48475
+ }, p.prototype.renderNextFrame = function() {
48476
+ var m, _, y;
48500
48477
  if (this.freeWorkers.length === 0)
48501
48478
  throw new Error("No free workers");
48502
48479
  if (!(this.nextFrame >= this.frames.length))
48503
- return p = this.frames[this.nextFrame++], y = this.freeWorkers.shift(), _ = this.getTask(p), this.log("starting frame " + (_.index + 1) + " of " + this.frames.length), this.activeWorkers.push(y), y.postMessage(_);
48504
- }, m.prototype.getContextData = function(p) {
48505
- return p.getImageData(0, 0, this.options.width, this.options.height).data;
48506
- }, m.prototype.getImageData = function(p) {
48480
+ return m = this.frames[this.nextFrame++], y = this.freeWorkers.shift(), _ = this.getTask(m), this.log("starting frame " + (_.index + 1) + " of " + this.frames.length), this.activeWorkers.push(y), y.postMessage(_);
48481
+ }, p.prototype.getContextData = function(m) {
48482
+ return m.getImageData(0, 0, this.options.width, this.options.height).data;
48483
+ }, p.prototype.getImageData = function(m) {
48507
48484
  var _;
48508
- return this._canvas == null && (this._canvas = document.createElement("canvas"), this._canvas.width = this.options.width, this._canvas.height = this.options.height), _ = this._canvas.getContext("2d"), _.setFill = this.options.background, _.fillRect(0, 0, this.options.width, this.options.height), _.drawImage(p, 0, 0), this.getContextData(_);
48509
- }, m.prototype.getTask = function(p) {
48485
+ return this._canvas == null && (this._canvas = document.createElement("canvas"), this._canvas.width = this.options.width, this._canvas.height = this.options.height), _ = this._canvas.getContext("2d"), _.setFill = this.options.background, _.fillRect(0, 0, this.options.width, this.options.height), _.drawImage(m, 0, 0), this.getContextData(_);
48486
+ }, p.prototype.getTask = function(m) {
48510
48487
  var _, y;
48511
- if (_ = this.frames.indexOf(p), y = { index: _, last: _ === this.frames.length - 1, delay: p.delay, transparent: p.transparent, width: this.options.width, height: this.options.height, quality: this.options.quality, dither: this.options.dither, globalPalette: this.options.globalPalette, repeat: this.options.repeat, canTransfer: a.name === "chrome" }, p.data != null)
48512
- y.data = p.data;
48513
- else if (p.context != null)
48514
- y.data = this.getContextData(p.context);
48515
- else if (p.image != null)
48516
- y.data = this.getImageData(p.image);
48488
+ if (_ = this.frames.indexOf(m), y = { index: _, last: _ === this.frames.length - 1, delay: m.delay, transparent: m.transparent, width: this.options.width, height: this.options.height, quality: this.options.quality, dither: this.options.dither, globalPalette: this.options.globalPalette, repeat: this.options.repeat, canTransfer: a.name === "chrome" }, m.data != null)
48489
+ y.data = m.data;
48490
+ else if (m.context != null)
48491
+ y.data = this.getContextData(m.context);
48492
+ else if (m.image != null)
48493
+ y.data = this.getImageData(m.image);
48517
48494
  else
48518
48495
  throw new Error("Invalid frame");
48519
48496
  return y;
48520
- }, m.prototype.log = function() {
48521
- var p;
48522
- if (p = 1 <= arguments.length ? u.call(arguments, 0) : [], !!this.options.debug)
48523
- return console.log.apply(console, p);
48524
- }, m;
48497
+ }, p.prototype.log = function() {
48498
+ var m;
48499
+ if (m = 1 <= arguments.length ? u.call(arguments, 0) : [], !!this.options.debug)
48500
+ return console.log.apply(console, m);
48501
+ }, p;
48525
48502
  })(n), i.exports = o;
48526
48503
  }, { "./browser.coffee": 2, events: 1 }] }, {}, [3])(3);
48527
48504
  });