@genome-spy/app 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
  2. package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
  3. package/dist/{agentApi-8hMSlqAQ.js → agentApi-BclFF9zB.js} +7130 -7509
  4. package/dist/agentApi.es.js +4344 -4015
  5. package/dist/agentShared.es.js +431 -458
  6. package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
  7. package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
  8. package/dist/{canvas2d-Bd8H8MMo.js → canvas2d-8MSf70d4.js} +78 -86
  9. package/dist/{canvas2d-D6VYooRf.js → canvas2d-BwGNI_Rx.js} +83 -91
  10. package/dist/clipOptions-SrrxeAEU.js +4316 -0
  11. package/dist/clipOptions-clBEbkjv.js +4326 -0
  12. package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
  13. package/dist/color-uTRRsy8i.js +116 -0
  14. package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
  15. package/dist/{containerView-aEVmYmkA.js → containerView-BItRtKqu.js} +5 -1
  16. package/dist/{containerView-CRJSc4bM.js → containerView-CWa6ZIJW.js} +5 -1
  17. package/dist/{debug-CQ0agCrd.js → debug-23s-jja_.js} +3 -2
  18. package/dist/{debug-DkIMiGdW.js → debug-CWRxvAss.js} +2 -3
  19. package/dist/dialog.es.js +1 -1
  20. package/dist/dist-CmY6iewb.js +1501 -0
  21. package/dist/dist-D6xbz5Ks.js +1501 -0
  22. package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
  23. package/dist/esm-BUkWqSr2.js +299 -0
  24. package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
  25. package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
  26. package/dist/esm-C6erfjPM.js +252 -0
  27. package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
  28. package/dist/esm-CqY5ezGz.js +1249 -0
  29. package/dist/esm-DfMIJ_N2.js +1522 -0
  30. package/dist/esm-Dls41IbZ.js +787 -0
  31. package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
  32. package/dist/esm-aGLCvYRP.js +238 -0
  33. package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
  34. package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
  35. package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
  36. package/dist/flowNode-BSjy0Wz3.js +1306 -0
  37. package/dist/flowOutput-D5qpxWe0.js +183 -0
  38. package/dist/index.es.js +4756 -5528
  39. package/dist/index.js +707 -547
  40. package/dist/inflate-BdC5KvHn.js +886 -0
  41. package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
  42. package/dist/{markUtils-CvLDz744.js → markUtils-RaatLEa-.js} +9 -6
  43. package/dist/metadataUtils-DxEPe0vj.js +879 -0
  44. package/dist/{order-BVvkjDRT.js → order-BnKzKjt4.js} +383 -347
  45. package/dist/{order-DmMoZsi1.js → order-BpJnq_nV.js} +375 -339
  46. package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
  47. package/dist/{rasterExport-jeRVq6kY.js → rasterExport-B-WrX1pa.js} +5 -5
  48. package/dist/{rasterExport-DxvowWjH.js → rasterExport-C_vx4Jwd.js} +3 -3
  49. package/dist/{rasterization-DFj3Cvx4.js → rasterization-QktH8Sn2.js} +1 -1
  50. package/dist/{rectangle-Dl4Dy0hS.js → rectangle-BAdoDPXu.js} +34 -31
  51. package/dist/{renderCanvas2D-Bfm1NHFu.js → renderCanvas2D-CsRO78Pq.js} +88 -87
  52. package/dist/{renderCanvas2D-DVjhp834.js → renderCanvas2D-Y7pkRzbC.js} +93 -92
  53. package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
  54. package/dist/{indexer-DOYMJ-Md.js → scaleNull-CVzag4z8.js} +2 -12
  55. package/dist/{indexer-DDC0YRGn.js → scaleNull-Pbz7QGnl.js} +2 -12
  56. package/dist/{scalePosition-0aeqp_kz.js → scalePosition-CRXa0rCC.js} +1 -1
  57. package/dist/schema.json +3801 -816
  58. package/dist/{svg-Bm2zxBPu.js → svg-BBMtLgtM.js} +369 -285
  59. package/dist/{svg-CkfuhONt.js → svg-JjWL6U-T.js} +371 -287
  60. package/dist/{svgRasterizer-DoRQEqFA.js → svgRasterizer-6OcftuoI.js} +2 -2
  61. package/dist/{svgRasterizer-raDDhBF-.js → svgRasterizer-DkNRaCPs.js} +4 -4
  62. package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
  63. package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
  64. package/dist/url-DeOdSRrv.js +183 -0
  65. package/dist/{viewError-BkJeVYXA.js → viewError-B0TMfOpB.js} +1 -1
  66. package/dist/{viewError-IYqyluc7.js → viewError-D9aO90cI.js} +1 -1
  67. package/dist/{viewSelectors-7LyasQN-.js → viewSelectors-DkFvo33d.js} +832 -734
  68. package/dist/{viewSelectors-CbmkSQRT.js → viewSelectors-lM93fHAq.js} +900 -802
  69. package/dist/{viewUtils-DuddMNNw.js → viewUtils-0SJOewM6.js} +1861 -2459
  70. package/dist/webgl-CXIO3OQz.js +5782 -0
  71. package/dist/webgl-Pdvfhio5.js +5783 -0
  72. package/package.json +7 -5
  73. package/src/agentApi/index.d.ts +3 -2
  74. package/src/agentShared/index.d.ts +2 -0
  75. package/src/appTypes.d.ts +1 -6
  76. package/src/embedTypes.d.ts +36 -1
  77. package/src/index.d.ts +6 -0
  78. package/src/spec/sampleView.d.ts +68 -13
  79. package/src/state/paramProvenanceTypes.d.ts +25 -2
  80. package/src/state.d.ts +14 -52
  81. package/dist/clipOptions-DElJ8dTZ.js +0 -3097
  82. package/dist/clipOptions-D_wBNhzs.js +0 -3087
  83. package/dist/esm-Dndm-NaA.js +0 -1193
  84. package/dist/vega-scale-BoGHANI7.js +0 -2446
  85. package/dist/vega-scale-o9TRyzYH.js +0 -2443
  86. package/dist/webgl-CQfvgnxo.js +0 -5633
  87. package/dist/webgl-DVYkXtiZ.js +0 -5632
@@ -187,7 +187,7 @@ var t = (typeof document < "u" && document.currentScript && document.currentScri
187
187
  return t === -1 ? e : e.substr(0, t);
188
188
  }, we = (e, t, n) => {
189
189
  switch (t) {
190
- case 1: return n ? (e) => d[e >> 0] : (e) => f[e >> 0];
190
+ case 1: return n ? (e) => d[e | 0] : (e) => f[e | 0];
191
191
  case 2: return n ? (e) => p[e >> 1] : (e) => m[e >> 1];
192
192
  case 4: return n ? (e) => h[e >> 2] : (e) => g[e >> 2];
193
193
  default: throw TypeError(`invalid integer width (${t}): ${e}`);
@@ -579,8 +579,8 @@ var t = (typeof document < "u" && document.currentScript && document.currentScri
579
579
  var n = 0;
580
580
  return Fe().forEach((r, i) => {
581
581
  var a = t + n;
582
- for (i = g[e + 4 * i >> 2] = a, a = 0; a < r.length; ++a) d[i++ >> 0] = r.charCodeAt(a);
583
- d[i >> 0] = 0, n += r.length + 1;
582
+ for (i = g[e + 4 * i >> 2] = a, a = 0; a < r.length; ++a) d[i++ | 0] = r.charCodeAt(a);
583
+ d[i | 0] = 0, n += r.length + 1;
584
584
  }), 0;
585
585
  },
586
586
  u: (e, t) => {
@@ -1,17 +1,17 @@
1
- import { Dt as e, _ as t, o as n, s as r, xt as i } from "./clipOptions-D_wBNhzs.js";
2
- import { v as a } from "./vega-scale-BoGHANI7.js";
1
+ import { Et as e, _ as t, o as n, s as r, un as i } from "./clipOptions-SrrxeAEU.js";
2
+ import { r as a } from "./arrayUtils-Bm7QnzhN.js";
3
3
  import { t as o } from "./warning-CpIIpk8e.js";
4
- import { c as s } from "./markUtils-CvLDz744.js";
4
+ import { l as s } from "./markUtils-RaatLEa-.js";
5
5
  import { t as c } from "./rectangle-DZTR6NFQ.js";
6
- import { n as l, t as u } from "./layoutResult-D50MSHXR.js";
6
+ import { n as l, r as u } from "./color-jETn8xK_.js";
7
7
  import { n as d, r as f, t as p } from "./performanceProfiler-CPLEjApa.js";
8
- import { A as m, C as h, D as g, E as _, I as v, L as y, M as b, N as x, P as S, S as C, _ as w, c as T, d as E, f as D, g as O, i as ee, l as te, m as ne, n as re, p as ie, u as k, v as A, w as j, x as M, y as N } from "./order-BVvkjDRT.js";
9
- import { n as P, t as F } from "./renderCanvas2D-DVjhp834.js";
10
- import { t as I } from "./canvasSizeHelper-foL2YvGL.js";
11
- import { exportCanvas as L, exportRaster as R } from "./rasterExport-DxvowWjH.js";
12
- import { createCanvas2DSvgRasterizer as z } from "./svgRasterizer-DoRQEqFA.js";
8
+ import { C as m, D as h, E as g, F as _, L as v, N as y, P as b, R as x, S, _ as C, c as w, d as T, f as E, g as D, i as O, j as k, l as ee, m as te, n as ne, p as re, u as ie, v as ae, w as A, x as j, y as M } from "./order-BnKzKjt4.js";
9
+ import { n as N, t as P } from "./renderCanvas2D-Y7pkRzbC.js";
10
+ import { t as F } from "./canvasSizeHelper-foL2YvGL.js";
11
+ import { exportCanvas as I, exportRaster as L } from "./rasterExport-C_vx4Jwd.js";
12
+ import { createCanvas2DSvgRasterizer as R } from "./svgRasterizer-6OcftuoI.js";
13
13
  //#region ../core/src/rendering/canvas2d/picking/softwarePickingRasterizer.js
14
- var B = 12, V = .5, H = class {
14
+ var z = 12, B = .5, V = class {
15
15
  #e = [];
16
16
  #t = [];
17
17
  #n = [
@@ -51,7 +51,7 @@ var B = 12, V = .5, H = class {
51
51
  }
52
52
  setClip(e, t, n, r) {
53
53
  if (!Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r)) throw RangeError("Software picking clip must be finite.");
54
- this.#r = G(Math.floor(Math.min(e, n)), 0, this.buffer.width), this.#i = G(Math.floor(Math.min(t, r)), 0, this.buffer.height), this.#a = G(Math.ceil(Math.max(e, n)), this.#r, this.buffer.width), this.#o = G(Math.ceil(Math.max(t, r)), this.#i, this.buffer.height);
54
+ this.#r = W(Math.floor(Math.min(e, n)), 0, this.buffer.width), this.#i = W(Math.floor(Math.min(t, r)), 0, this.buffer.height), this.#a = W(Math.ceil(Math.max(e, n)), this.#r, this.buffer.width), this.#o = W(Math.ceil(Math.max(t, r)), this.#i, this.buffer.height);
55
55
  }
56
56
  fillRect(e, t, n, r, i) {
57
57
  this.#s++, this.#p(e, t, n, r, i);
@@ -96,24 +96,21 @@ var B = 12, V = .5, H = class {
96
96
  if (!(a > 0) || !Number.isFinite(a)) return;
97
97
  this.#u++;
98
98
  let s = a / 2, c = this.#n;
99
- if (!D(t, n, r, i, this.#r - s, this.#i - s, this.#a + s, this.#o + s, c)) return;
99
+ if (!E(t, n, r, i, this.#r - s, this.#i - s, this.#a + s, this.#o + s, c)) return;
100
100
  let l = c[2] - c[0], u = c[3] - c[1], d = Math.ceil(Math.max(Math.abs(l), Math.abs(u)));
101
- if (d == 0) {
102
- this.#h(e, c[0], c[1], s, o);
103
- return;
104
- }
105
- for (let t = 0; t <= d; t++) {
101
+ if (d == 0) this.#h(e, c[0], c[1], s, o);
102
+ else for (let t = 0; t <= d; t++) {
106
103
  let n = t / d;
107
104
  this.#h(e, c[0] + l * n, c[1] + u * n, s, o);
108
105
  }
109
106
  }
110
- strokeCubic(e, t, n, r, i, a, o, s, c, l, u = V, d) {
107
+ strokeCubic(e, t, n, r, i, a, o, s, c, l, u = B, d) {
111
108
  if (!(l > 0) || !Number.isFinite(l) || !(u > 0) || !Number.isFinite(u) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(s) || !Number.isFinite(c)) return;
112
109
  this.#d++;
113
110
  let f = this.#e;
114
111
  for (f.length = 0, f.push(t, n, r, i, a, o, s, c, 0); f.length;) {
115
112
  let t = f.pop(), n = f.pop(), r = f.pop(), i = f.pop(), a = f.pop(), o = f.pop(), s = f.pop(), c = f.pop(), p = f.pop();
116
- if (t >= B || U(p, c, s, o, a, i, r, n, u)) {
113
+ if (t >= z || H(p, c, s, o, a, i, r, n, u)) {
117
114
  this.strokeSegment(e, p, c, r, n, l, d);
118
115
  continue;
119
116
  }
@@ -139,38 +136,38 @@ var B = 12, V = .5, H = class {
139
136
  }
140
137
  }
141
138
  };
142
- function U(e, t, n, r, i, a, o, s, c) {
139
+ function H(e, t, n, r, i, a, o, s, c) {
143
140
  let l = o - e, u = s - t, d = l * l + u * u, f = c * c;
144
141
  if (d == 0) {
145
- let o = W(e, t, n, r), s = W(e, t, i, a);
142
+ let o = U(e, t, n, r), s = U(e, t, i, a);
146
143
  return Math.max(o, s) <= f;
147
144
  }
148
145
  let p = u * (n - e) - l * (r - t), m = u * (i - e) - l * (a - t);
149
146
  return Math.max(p * p, m * m) <= f * d;
150
147
  }
151
- function W(e, t, n, r) {
148
+ function U(e, t, n, r) {
152
149
  let i = n - e, a = r - t;
153
150
  return i * i + a * a;
154
151
  }
155
- function G(e, t, n) {
152
+ function W(e, t, n) {
156
153
  return Math.max(t, Math.min(n, e));
157
154
  }
158
155
  //#endregion
159
156
  //#region ../core/src/rendering/canvas2d/picking/renderers/index.js
160
- var K = 1;
161
- function q(e, t) {
157
+ var G = 1;
158
+ function K(e, t) {
162
159
  let n = e.getType();
163
- return n == "arrow" ? ae(e, t) : n == "rect" ? oe(e, t) : n == "point" ? se(e, t) : n == "rule" || n == "tick" ? ce(e, t) : n == "link" ? le(e, t) : n == "text" ? ue(e, t) : 0;
160
+ return n == "arrow" ? J(e, t) : n == "rect" ? oe(e, t) : n == "point" ? se(e, t) : n == "rule" || n == "tick" ? ce(e, t) : n == "link" ? le(e, t) : n == "text" ? ue(e, t) : 0;
164
161
  }
165
- function J(e) {
162
+ function q(e) {
166
163
  let t = e.getType();
167
164
  return t == "rect" || t == "arrow" || t == "point" || t == "rule" || t == "tick" || t == "link" || t == "text";
168
165
  }
169
- function ae(e, t) {
170
- let n = e, r = h(n), i = Array(8).fill(0);
171
- return _(n, r, t, (e) => {
166
+ function J(e, t) {
167
+ let n = e, r = m(n), i = Array(8).fill(0);
168
+ return g(n, r, t, (e) => {
172
169
  let a = Y(n, e.datum), o = e.strokeWidth / 2;
173
- r.stem && t.rasterizer.strokeSegment(a, e.tail.x, e.tail.y, e.tip.x, e.tip.y, e.stemHalfWidth * 2 + e.strokeWidth), j(e, (n, r, s, c) => {
170
+ r.stem && t.rasterizer.strokeSegment(a, e.tail.x, e.tail.y, e.tip.x, e.tip.y, e.stemHalfWidth * 2 + e.strokeWidth), A(e, (n, r, s, c) => {
174
171
  let l = e.headHalfWidth + o, u = n + s.x * o, d = r + s.y * o, f = e.headRepeatFootprint + o, p = n - s.x * f, m = r - s.y * f;
175
172
  de(i, u, d, p, m, c.x, c.y, l), t.rasterizer.fillConvexPolygon(a, i);
176
173
  });
@@ -178,19 +175,22 @@ function ae(e, t) {
178
175
  }
179
176
  function oe(e, t) {
180
177
  let n = e;
181
- return ne(n, ie(n), t, (e) => t.rasterizer.fillRect(Y(n, e.datum), e.x, e.y, e.width, e.height));
178
+ return te(n, re(n), t, (e) => t.rasterizer.fillRect(Y(n, e.datum), e.x, e.y, e.width, e.height));
182
179
  }
183
180
  function se(e, t) {
184
- let n = e, r = m(n, n.properties.minPickingSize);
185
- return w(n, O(n), t, (e) => t.rasterizer.fillSquare(Y(n, e.datum), e.x, e.y, Math.max(e.boundsRadius, r / 2)));
181
+ let n = e, r = k(n, n.properties.minPickingSize);
182
+ return C(n, D(n), t, (e) => t.rasterizer.fillSquare(Y(n, e.datum), e.x, e.y, Math.max(e.boundsRadius, r / 2)));
186
183
  }
187
184
  function ce(e, t) {
188
- let n = e;
189
- return E(n, k(n), t, (e) => t.rasterizer.strokeSegment(Y(n, e.datum), e.x1, e.y1, e.x2, e.y2, Math.max(e.strokeWidth, K)));
185
+ let n = e, r = ie(n);
186
+ return T(n, r, t, (e) => {
187
+ let i = e.x2 - e.x1, a = e.y2 - e.y1, o = r.strokeCap === "square" && e.strokeWidth > 0 ? (e.size / 2 + e.strokeWidth) / Math.hypot(i, a) : 0;
188
+ t.rasterizer.strokeSegment(Y(n, e.datum), e.x1 - i * o, e.y1 - a * o, e.x2 + i * o, e.y2 + a * o, Math.max(e.size + 2 * e.strokeWidth, G));
189
+ });
190
190
  }
191
191
  function le(e, t) {
192
- let n = e, r = m(n, n.properties.minPickingSize), i = A(n), a = C(n, i.shape);
193
- return N(n, i, {
192
+ let n = e, r = k(n, n.properties.minPickingSize), i = ae(n), a = S(n, i.shape);
193
+ return M(n, i, {
194
194
  ...t,
195
195
  minPickingSize: r
196
196
  }, (e) => {
@@ -207,13 +207,13 @@ function le(e, t) {
207
207
  }
208
208
  return;
209
209
  }
210
- let [o, s, c, l] = i.points, u = a && M(o, l, a);
210
+ let [o, s, c, l] = i.points, u = a && j(o, l, a);
211
211
  t.rasterizer.strokeCubic(Y(n, e.datum), o[0], o[1], s[0], s[1], c[0], c[1], l[0], l[1], Math.max(e.strokeWidth, r), void 0, u ? (e, t) => Math.abs(u.normalX * e + u.normalY * t - u.offset) < u.end : void 0);
212
212
  });
213
213
  }
214
214
  function ue(e, t) {
215
- let n = e, r = t.textMetrics ?? n.unitView.context.textMetrics, i = r.requestFont(n.properties), a = ee(r, n.properties);
216
- return te(n, T(n), {
215
+ let n = e, r = t.textMetrics ?? n.unitView.context.textMetrics, i = r.requestFont(n.properties), a = O(r, n.properties);
216
+ return ee(n, w(n), {
217
217
  ...t,
218
218
  fontMeasurement: i,
219
219
  measureLogoInkBounds: a
@@ -225,11 +225,11 @@ function de(e, t, n, r, i, a, o, s) {
225
225
  }
226
226
  function Y(e, t) {
227
227
  let n = e.encoders;
228
- return g(n.uniqueId, t);
228
+ return h(n.uniqueId, t);
229
229
  }
230
230
  //#endregion
231
231
  //#region ../core/src/rendering/canvas2d/picking/softwarePickingViewRenderingContext.js
232
- var fe = class extends l {
232
+ var fe = class extends u {
233
233
  #e = [];
234
234
  #t = /* @__PURE__ */ new Set();
235
235
  #n;
@@ -252,23 +252,23 @@ var fe = class extends l {
252
252
  if (this.#e.pop()?.view !== e) throw Error("Unbalanced software picking view rendering context stack.");
253
253
  }
254
254
  renderMark(e, t) {
255
- if (!e.isPickingParticipant() || !J(e)) return;
255
+ if (!e.isPickingParticipant() || !q(e)) return;
256
256
  let i = t.sampleFacetRenderingOptions;
257
- if (i && !e.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !P(i))) {
257
+ if (i && !e.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !N(i))) {
258
258
  this.#n?.addCount("canvasCulledSampleFacetOccurrences");
259
259
  return;
260
260
  }
261
261
  let a = e.unitView.getEffectiveOpacity();
262
262
  if (a <= 0) return;
263
- let s = this.currentCoords, c = n(t), l = r(c, e.properties.clip, s), u = x(this.width, this.height, l);
264
- if (!S(u)) return;
265
- let d = b(s, c, e.properties.cullByVisibleRange), f = this.#i?.prepare(e) ?? !1;
266
- y(e, t, s, this.#r, (t, n) => {
263
+ let s = this.currentCoords, c = n(t), l = r(c, e.properties.clip, s), u = b(this.width, this.height, l);
264
+ if (!_(u)) return;
265
+ let d = y(s, c, e.properties.cullByVisibleRange), f = this.#i?.prepare(e) ?? !1;
266
+ x(e, t, s, this.#r, (t, n) => {
267
267
  if (n.length == 0) return;
268
268
  let r = 0, i = n.length;
269
269
  if (f && this.#i.query(n, this.#a) && (r = this.#a[0], i = this.#a[1], r === i)) return;
270
270
  let o = this.getRasterizer();
271
- o.setClip(u.x1, u.y1, u.x2, u.y2), q(e, {
271
+ o.setClip(u.x1, u.y1, u.x2, u.y2), K(e, {
272
272
  rasterizer: o,
273
273
  coords: t,
274
274
  data: n,
@@ -282,59 +282,51 @@ var fe = class extends l {
282
282
  }, (t) => o(`Canvas2D picking could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
283
283
  }
284
284
  get currentCoords() {
285
- let t = e(this.#e);
286
- if (!t) throw Error("No current view in software picking rendering context.");
287
- return t.coords;
285
+ let e = a(this.#e);
286
+ if (!e) throw Error("No current view in software picking rendering context.");
287
+ return e.coords;
288
288
  }
289
289
  }, X = 2 ** 31 - 1, pe = -(2 ** 31);
290
- function me(e, t, n, r = n) {
291
- let a = Array(e);
290
+ function me(t, n, r, i = r) {
291
+ let a = Array(t);
292
292
  a.fill(X);
293
- let o = pe, s = -Infinity, c = !1, l = Array(e);
293
+ let o = pe, s = -Infinity, c = !1, l = Array(t);
294
294
  l.fill(0);
295
- let u = t[0], d = (t[1] - t[0]) / e, f = (t, n) => {
296
- let r = (t - u) / d, a = Math.floor(r);
297
- return i(n && a == r ? a - 1 : a, 0, e - 1);
295
+ let u = n[0], d = (n[1] - n[0]) / t, f = (n, r) => {
296
+ let i = (n - u) / d, a = Math.floor(i);
297
+ return e(r && a == i ? a - 1 : a, 0, t - 1);
298
298
  };
299
- function p(e, t, r) {
299
+ function p(e, t, n) {
300
300
  if (c) return;
301
301
  if (t > o) o = t;
302
302
  else {
303
303
  c = !0;
304
304
  return;
305
305
  }
306
- let i = n(e);
306
+ let i = r(e);
307
307
  if (!Number.isFinite(i) || i < s) {
308
308
  c = !0;
309
309
  return;
310
310
  }
311
311
  s = i;
312
312
  let u = f(i, !1);
313
- a[u] > t && (a[u] = t), l[u] < r && (l[u] = r);
313
+ a[u] > t && (a[u] = t), l[u] < n && (l[u] = n);
314
314
  }
315
- function m(e, t, i) {
315
+ function m(e, t, n) {
316
316
  if (c) return;
317
317
  if (t > o) o = t;
318
318
  else {
319
319
  c = !0, console.debug("Items (vertices) are not ordered properly. Disabling binned index.");
320
320
  return;
321
321
  }
322
- let u = n(e), d = r(e);
323
- if (!Number.isFinite(u) || !Number.isFinite(d)) {
324
- c = !0;
325
- return;
326
- }
327
- if (u < s) {
328
- c = !0;
329
- return;
330
- }
331
- if (d < u) {
322
+ let u = r(e), d = i(e);
323
+ if (!Number.isFinite(u) || !Number.isFinite(d) || u < s || d < u) {
332
324
  c = !0;
333
325
  return;
334
326
  }
335
327
  s = u;
336
328
  let p = f(u, !1), m = u === d ? p : f(d, !0);
337
- for (let e = p; e <= m; e++) a[e] > t && (a[e] = t), l[e] < i && (l[e] = i);
329
+ for (let e = p; e <= m; e++) a[e] > t && (a[e] = t), l[e] < n && (l[e] = n);
338
330
  }
339
331
  let h = (e, t, n = [0, 0]) => {
340
332
  let r = f(e, !1), i = f(t, !0), o = a[r], s = Math.max(l[i], o);
@@ -346,7 +338,7 @@ function me(e, t, n, r = n) {
346
338
  for (let t = a.length - 1; t > 0; t--) e && a[t] == X ? (a[t] = l[t], e = !1) : a[t - 1] > a[t] && (a[t - 1] = a[t]);
347
339
  return h;
348
340
  };
349
- return p.getIndex = g, m.getIndex = g, n == r ? p : m;
341
+ return p.getIndex = g, m.getIndex = g, r == i ? p : m;
350
342
  }
351
343
  //#endregion
352
344
  //#region ../core/src/utils/forEachInBatch.js
@@ -372,9 +364,9 @@ function _e(e, t, n = 0) {
372
364
  }
373
365
  function ve(e) {
374
366
  let n = e.encoders?.x, r = e.encoders?.x2;
375
- if (!n?.channelDef || !("buildIndex" in n.channelDef) || !n.channelDef.buildIndex || !n.scale || !a(n.scale.type) && !["index", "locus"].includes(n.scale.type) || n.branches.length !== 1) return;
376
- let i = e.getType();
377
- if (i === "point" && s(e, "x") || i !== "point" && i !== "rect") return;
367
+ if (!n?.channelDef || !("buildIndex" in n.channelDef) || !n.channelDef.buildIndex || !n.scale || !i(n.scale.type) && !["index", "locus"].includes(n.scale.type) || n.branches.length !== 1) return;
368
+ let a = e.getType();
369
+ if (a === "point" && s(e, "x") || a !== "point" && a !== "rect") return;
378
370
  let o = t(n)?.asNumberAccessor();
379
371
  if (!o) return;
380
372
  let c;
@@ -455,7 +447,7 @@ var ye = class {
455
447
  let n = d();
456
448
  n?.beginFrame("canvas");
457
449
  try {
458
- f("render", () => F({
450
+ f("render", () => P({
459
451
  layoutResult: e,
460
452
  context: this.context,
461
453
  width: t.width,
@@ -482,7 +474,7 @@ var ye = class {
482
474
  height: t.height,
483
475
  devicePixelRatio: this.surface.getDevicePixelRatio(),
484
476
  textMetrics: this.textMetrics,
485
- getRasterizer: () => (n || (n = new H(this.surface.getPickingBuffer()), this.pickingRasterizer = n), r ||= (n.resetClip(), n.resetStatistics(), !0), n),
477
+ getRasterizer: () => (n || (n = new V(this.surface.getPickingBuffer()), this.pickingRasterizer = n), r ||= (n.resetClip(), n.resetStatistics(), !0), n),
486
478
  xIndexManager: this.xIndexManager
487
479
  }), a = d();
488
480
  a?.beginFrame("canvas", "picking");
@@ -497,7 +489,7 @@ var ye = class {
497
489
  }
498
490
  #e() {
499
491
  let e = this.surface.getLogicalCanvasSize();
500
- if (!(isNaN(e.width) || isNaN(e.height))) return u(this.viewRoot, c.create(0, 0, e.width, e.height), {
492
+ if (!(isNaN(e.width) || isNaN(e.height))) return l(this.viewRoot, c.create(0, 0, e.width, e.height), {
501
493
  devicePixelRatio: this.surface.getDevicePixelRatio(),
502
494
  renderingOptions: { firstFacet: !0 }
503
495
  });
@@ -555,7 +547,7 @@ var Ce = class {
555
547
  if (!n) throw Error("Unable to initialize a Canvas2D rendering context.");
556
548
  this.canvas = t, this.context = n, e.container.appendChild(t);
557
549
  try {
558
- this.#e = new I(e.container, t, e.sizeSource, () => {
550
+ this.#e = new F(e.container, t, e.sizeSource, () => {
559
551
  this.#i() && e.onCanvasResize();
560
552
  }), this.#i();
561
553
  } catch (e) {
@@ -618,7 +610,7 @@ var Ce = class {
618
610
  //#endregion
619
611
  //#region ../core/src/rendering/canvas2d/index.js
620
612
  function we(e) {
621
- let t = new Ce(e), n = re(e.container.ownerDocument);
613
+ let t = new Ce(e), n = ne(e.container.ownerDocument);
622
614
  return {
623
615
  surface: t,
624
616
  textMetrics: n,
@@ -628,19 +620,19 @@ function we(e) {
628
620
  context: t.context,
629
621
  textMetrics: n
630
622
  }),
631
- exportCanvas: (e) => L({
623
+ exportCanvas: (e) => I({
632
624
  ...e,
633
625
  liveSize: t.getLogicalCanvasSize(),
634
626
  liveDevicePixelRatio: t.getDevicePixelRatio(),
635
627
  textMetrics: n
636
628
  }),
637
- exportRaster: (e) => R({
629
+ exportRaster: (e) => L({
638
630
  ...e,
639
631
  liveSize: t.getLogicalCanvasSize(),
640
632
  liveDevicePixelRatio: t.getDevicePixelRatio(),
641
633
  textMetrics: n
642
634
  }),
643
- rasterizeSvgRuns: (e) => z()(e),
635
+ rasterizeSvgRuns: (e) => R()(e),
644
636
  readPickingId: (e, n) => t.readPickingId(e, n)
645
637
  };
646
638
  }