@genome-spy/app 0.88.1 → 0.90.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 (65) hide show
  1. package/dist/{agentApi-BIpg3JKh.js → agentApi-Z65dw-sD.js} +5976 -6711
  2. package/dist/agentApi.es.js +3580 -4470
  3. package/dist/agentShared.es.js +742 -683
  4. package/dist/{canvas2d-BVQ7-2eJ.js → canvas2d-DiPQvNtZ.js} +122 -109
  5. package/dist/{canvas2d-D7SZK3xv.js → canvas2d-t_N10CeW.js} +114 -101
  6. package/dist/{canvasSizeHelper-7h_8rOcx.js → canvasSizeHelper-foL2YvGL.js} +15 -8
  7. package/dist/{clipOptions-DTMcB_9z.js → clipOptions-B5PibDq3.js} +1610 -1342
  8. package/dist/{clipOptions-BWHr3aTa.js → clipOptions-Cba4I0AO.js} +1872 -1644
  9. package/dist/{componentStyles-FsNmIb22.js → componentStyles-DGtQXvwc.js} +17 -15
  10. package/dist/{debug-CVpoEOWx.js → debug-CVAlrcZt.js} +2 -2
  11. package/dist/{debug-DYAMZZKl.js → debug-DP4WzTNo.js} +2 -2
  12. package/dist/dialog.es.js +4 -3
  13. package/dist/esm-BiqrFjMh.js +443 -0
  14. package/dist/{esm-lwYrRdbg.js → esm-Bv7Frz7C.js} +142 -79
  15. package/dist/{esm-VvpZ9hsq.js → esm-C3A-AuRi.js} +1 -1
  16. package/dist/esm-CvpR1OcU.js +322 -0
  17. package/dist/esm-DFHFX1sH.js +1526 -0
  18. package/dist/esm-Dndm-NaA.js +1193 -0
  19. package/dist/{esm-CcDLRSvC.js → esm-DtNElqRr.js} +64 -63
  20. package/dist/esm-L53qjcYH.js +1155 -0
  21. package/dist/esm-VFJeyk9i.js +249 -0
  22. package/dist/{esm-BdLYkz-m.js → esm-_xCtpDwm.js} +1 -1
  23. package/dist/index.es.js +4203 -3910
  24. package/dist/index.js +971 -482
  25. package/dist/{indexer-CXjZDo2Q.js → indexer-DbFTKGlm.js} +1 -1
  26. package/dist/{indexer-DAH_ruVn.js → indexer-En7gpvLN.js} +1 -1
  27. package/dist/{lit-ByuJ0FJ4.js → lit-CoXp9NFX.js} +12 -10
  28. package/dist/order-BkYCnwD7.js +1062 -0
  29. package/dist/order-R043xTpC.js +1062 -0
  30. package/dist/{parquetRead-Cs2xRrvz.js → parquetRead-0hFIa3Cc.js} +532 -350
  31. package/dist/rasterExport-C_FcNBkC.js +52 -0
  32. package/dist/rasterExport-Z7gs5346.js +52 -0
  33. package/dist/rasterization-_-9JmSas.js +63 -0
  34. package/dist/rectangle-DE98gIxF.js +108 -0
  35. package/dist/{renderCanvas2D-DxturTEW.js → renderCanvas2D-DK1c9TFK.js} +68 -67
  36. package/dist/{renderCanvas2D-DtcJjqpB.js → renderCanvas2D-IM-A9DYG.js} +57 -56
  37. package/dist/schema.json +599 -116
  38. package/dist/{src-DjOlFqSn.js → src-DJtvThVC.js} +3 -5
  39. package/dist/style.css +1 -1
  40. package/dist/{svg-SDJMzL--.js → svg-DW3tfUmm.js} +339 -326
  41. package/dist/{svg-CyrLfa9e.js → svg-PabUdcDi.js} +365 -352
  42. package/dist/{svgRasterizer-f7DJ3UO0.js → svgRasterizer-B6YtWLJs.js} +6 -5
  43. package/dist/{svgRasterizer-mWK7HTkx.js → svgRasterizer-BEVDyyS3.js} +6 -5
  44. package/dist/{vega-scale-DLKCwWRs.js → vega-scale-Byaw1K8O.js} +823 -780
  45. package/dist/{vega-scale-CypF85iS.js → vega-scale-Ctz_wa3z.js} +963 -923
  46. package/dist/{viewIdentityRegistry-Dl-vMN9I.js → viewIdentityRegistry-BW415b3o.js} +1 -1
  47. package/dist/{viewIdentityRegistry-DIDo44XQ.js → viewIdentityRegistry-_F0E7nkA.js} +1 -1
  48. package/dist/{viewSelectors-CymbZyE6.js → viewSelectors-DYz-PhTO.js} +407 -340
  49. package/dist/{viewSelectors-DNiDip5e.js → viewSelectors-KtD-QSN0.js} +349 -282
  50. package/dist/{viewUtils-BrJLIj2o.js → viewUtils-BZGPseMx.js} +2052 -1871
  51. package/dist/{webgl-tZfZ8y3q.js → webgl-BKSGqHaz.js} +2144 -784
  52. package/dist/{webgl-CTJt7jQd.js → webgl-tdKf9SlZ.js} +2386 -1026
  53. package/package.json +5 -5
  54. package/dist/esm-80V4xF_D.js +0 -1098
  55. package/dist/esm-BA6yMcc-.js +0 -1222
  56. package/dist/esm-BdT7qUL-.js +0 -157
  57. package/dist/esm-CfYZhLHN.js +0 -1367
  58. package/dist/esm-D-iG_TIX.js +0 -441
  59. package/dist/esm-JAiZmFIS.js +0 -128
  60. package/dist/order-C5CzA37O.js +0 -918
  61. package/dist/order-DvY7KNcu.js +0 -918
  62. package/dist/rasterExport-BgZ98e6U.js +0 -44
  63. package/dist/rasterExport-DEr8fOLm.js +0 -44
  64. package/dist/rasterization-CFogVB3B.js +0 -50
  65. package/dist/rectangle-DKnrAmKs.js +0 -142
@@ -1,11 +1,11 @@
1
- import { At as e, Dt as t, Ot as n, Pt as r, b as i, ct as a, dn as o, fn as s, jt as c, k as l, o as u, sn as d, st as f, t as p, u as m, un as h, vn as ee } from "./clipOptions-DTMcB_9z.js";
2
- import { a as g, n as te, r as ne, t as _ } from "./viewError-BiR9VCgL.js";
3
- import { U as re, m as ie, rt as ae, y as v } from "./vega-scale-DLKCwWRs.js";
4
- import { t as oe } from "./warning-CpIIpk8e.js";
1
+ import { $t as e, Ot as t, St as n, Tt as r, V as i, an as a, b as o, cn as s, ft as c, gn as l, k as u, ln as d, o as f, pt as p, t as m, u as ee, un as te, wt as ne, xt as h } from "./clipOptions-Cba4I0AO.js";
2
+ import { a as g, n as re, r as ie, t as _ } from "./viewError-BiR9VCgL.js";
3
+ import { H as ae, m as oe, y as v } from "./vega-scale-Byaw1K8O.js";
4
+ import { t as se } from "./warning-CpIIpk8e.js";
5
5
  //#region ../core/src/view/layout/flexLayout.js
6
- function se(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
6
+ function ce(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
7
7
  n ||= 0, i ||= 0;
8
- let o = he(e, t, n), s = 0, c = 0;
8
+ let o = ge(e, t, n), s = 0, c = 0;
9
9
  for (let t = 0; t < e.length; t++) s += o[t], S(e[t]) || c++;
10
10
  let l = s + Math.max(0, c - 1) * n, u = r === void 0 ? (e) => e : (e) => Math.round(e * r) / r, d = 0, f = [], p = (e) => {
11
11
  let t = d;
@@ -36,24 +36,24 @@ function se(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
36
36
  }
37
37
  return m += a ? n : -n, p(!1), f;
38
38
  }
39
- function ce(e, { spacing: t } = { spacing: 0 }) {
39
+ function le(e, { spacing: t } = { spacing: 0 }) {
40
40
  let n = 0;
41
- for (let r of e) n += T(r) + (S(r) ? 0 : t);
41
+ for (let r of e) n += E(r) + (S(r) ? 0 : t);
42
42
  return Math.max(0, n - t);
43
43
  }
44
- function le(e, t, { spacing: n = 0 } = {}) {
44
+ function ue(e, t, { spacing: n = 0 } = {}) {
45
45
  let r = [], i = [], a = 0, o = 0;
46
46
  for (let [s, c] of e.entries()) {
47
- let e = T(c), l = !S(c), u = o && l ? n : 0;
47
+ let e = E(c), l = !S(c), u = o && l ? n : 0;
48
48
  i.length && a + u + e > t && (r.push(i), i = [], a = 0, o = 0), i.push(s), a += (o && l ? n : 0) + e, o += +!!l;
49
49
  }
50
50
  return i.length && r.push(i), r;
51
51
  }
52
- function ue(e) {
52
+ function de(e) {
53
53
  let t = 0, n = 0, r = 0, i, a = !0;
54
54
  for (let o of e) {
55
- t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, T(o));
56
- let e = E(o);
55
+ t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, E(o));
56
+ let e = D(o);
57
57
  e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
58
58
  }
59
59
  return O({
@@ -63,7 +63,7 @@ function ue(e) {
63
63
  maxPx: a ? i : void 0
64
64
  });
65
65
  }
66
- function de(e) {
66
+ function fe(e) {
67
67
  let t = {
68
68
  px: 0,
69
69
  grow: 0,
@@ -71,8 +71,8 @@ function de(e) {
71
71
  maxPx: 0
72
72
  }, n = !0;
73
73
  for (let r of e) {
74
- t.px += C(r.px), t.grow += C(r.grow), t.minPx += T(r);
75
- let e = E(r);
74
+ t.px += C(r.px), t.grow += C(r.grow), t.minPx += E(r);
75
+ let e = D(r);
76
76
  e === void 0 ? n = !1 : t.maxPx += e;
77
77
  }
78
78
  return n || delete t.maxPx, O(t);
@@ -88,7 +88,7 @@ var y = class e {
88
88
  return this.#e(-e.width, -e.height);
89
89
  }
90
90
  #e(t, n) {
91
- return new e(D(this.width, t), D(this.height, n));
91
+ return new e(ye(this.width, t), ye(this.height, n));
92
92
  }
93
93
  isGrowing() {
94
94
  return !!(this.width.grow || this.height.grow);
@@ -100,19 +100,19 @@ var y = class e {
100
100
  function S(e) {
101
101
  return !e.px && !e.grow && !e.minPx;
102
102
  }
103
- function fe(e, t) {
103
+ function pe(e, t) {
104
104
  return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
105
105
  }
106
106
  function C(e) {
107
107
  return e || 0;
108
108
  }
109
- function pe(e) {
110
- return e && (h(e.px) || h(e.grow) || h(e.minPx) || h(e.maxPx));
111
- }
112
109
  function me(e) {
110
+ return e && (s(e.px) || s(e.grow) || s(e.minPx) || s(e.maxPx));
111
+ }
112
+ function he(e) {
113
113
  if (J(e)) throw Error("parseSizeDef does not accept step-based sizes.");
114
- if (pe(e)) return _e(e), O(e);
115
- if (h(e)) return {
114
+ if (me(e)) return w(e), O(e);
115
+ if (s(e)) return {
116
116
  px: e,
117
117
  grow: 0
118
118
  };
@@ -122,28 +122,28 @@ function me(e) {
122
122
  };
123
123
  throw Error(`Invalid sizeDef: ${e}`);
124
124
  }
125
- function he(e, t, n) {
125
+ function ge(e, t, n) {
126
126
  let r = !1;
127
- for (let t of e) _e(t), r ||= ve(t);
128
- if (!r) return ge(e, t, n);
127
+ for (let t of e) w(t), r ||= ve(t);
128
+ if (!r) return _e(e, t, n);
129
129
  let i = Array(e.length).fill(0), a = [];
130
130
  for (let t = 0; t < e.length; t++) S(e[t]) || a.push(t);
131
131
  let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
132
132
  for (let t of a) {
133
133
  let n = e[t];
134
- C(n.grow) || (i[t] = w(C(n.px), n), c.add(t));
134
+ C(n.grow) || (i[t] = T(C(n.px), n), c.add(t));
135
135
  }
136
136
  for (;;) {
137
137
  let t = 0, n = 0, r = 0;
138
138
  for (let o of a) c.has(o) ? r += i[o] : (t += C(e[o].px), n += C(e[o].grow));
139
139
  if (!n) {
140
- for (let t of a) c.has(t) || (i[t] = w(C(e[t].px), e[t]), c.add(t));
140
+ for (let t of a) c.has(t) || (i[t] = T(C(e[t].px), e[t]), c.add(t));
141
141
  break;
142
142
  }
143
143
  let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
144
144
  for (let t of a) {
145
145
  if (c.has(t)) continue;
146
- let r = e[t], a = C(r.px) + C(r.grow) / n * o, s = w(a, r);
146
+ let r = e[t], a = C(r.px) + C(r.grow) / n * o, s = T(a, r);
147
147
  i[t] = s;
148
148
  let f = s - a;
149
149
  l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
@@ -155,7 +155,7 @@ function he(e, t, n) {
155
155
  }
156
156
  return i;
157
157
  }
158
- function ge(e, t, n) {
158
+ function _e(e, t, n) {
159
159
  let r = 0, i = 0;
160
160
  for (let t of e) r += C(t.px) + (S(t) ? 0 : n), i += C(t.grow);
161
161
  r -= n;
@@ -166,22 +166,22 @@ function ge(e, t, n) {
166
166
  }
167
167
  return o;
168
168
  }
169
- function _e(e) {
169
+ function w(e) {
170
170
  if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
171
171
  }
172
- function w(e, t) {
172
+ function T(e, t) {
173
173
  return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
174
174
  }
175
- function T(e) {
176
- return w(C(e.px), e);
177
- }
178
175
  function E(e) {
179
- return e.maxPx ?? (C(e.grow) ? void 0 : T(e));
176
+ return T(C(e.px), e);
177
+ }
178
+ function D(e) {
179
+ return e.maxPx ?? (C(e.grow) ? void 0 : E(e));
180
180
  }
181
181
  function ve(e) {
182
182
  return e.minPx !== void 0 || e.maxPx !== void 0;
183
183
  }
184
- function D(e, t) {
184
+ function ye(e, t) {
185
185
  return O({
186
186
  px: (e.px ?? 0) + t,
187
187
  grow: e.grow,
@@ -242,30 +242,31 @@ var k = class e {
242
242
  return new e(t, t, t, t);
243
243
  }
244
244
  };
245
- function ye(e, t) {
245
+ function be(e, t) {
246
246
  return t ? new k(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
247
247
  }
248
248
  var A = k.createUniformPadding(0);
249
249
  Object.freeze(A);
250
250
  //#endregion
251
251
  //#region ../core/src/utils/url.js
252
- var be = /^([A-Za-z]+:)?\/\//;
252
+ var xe = /^([A-Za-z]+:)?\/\//;
253
253
  function j(e, t) {
254
- if (t && be.test(t)) return t;
254
+ if (t && xe.test(t)) return t;
255
255
  let n = typeof e == "function" ? e() : e;
256
256
  if (!n) return t;
257
257
  if (!t) return n;
258
258
  if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
259
259
  return M(n) + t;
260
260
  }
261
- function xe(e, t, n = Se()) {
261
+ function Se(e, t, n = Ce()) {
262
262
  let r = typeof e == "function" ? e() : e;
263
263
  if (!t) return r;
264
264
  try {
265
265
  if (r) {
266
266
  let e = n ? new URL(r, n).href : new URL(r).href;
267
267
  return new URL(t, e).href;
268
- } else if (n) return new URL(t, n).href;
268
+ }
269
+ if (n) return new URL(t, n).href;
269
270
  } catch {}
270
271
  return j(r, t);
271
272
  }
@@ -273,7 +274,7 @@ function M(e) {
273
274
  let t = e.replace(/[^/]*$/, "");
274
275
  return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
275
276
  }
276
- function Se() {
277
+ function Ce() {
277
278
  if (typeof document < "u" && document.baseURI) return document.baseURI;
278
279
  if (typeof window < "u" && window.location?.href) return window.location.href;
279
280
  }
@@ -303,7 +304,7 @@ var N = class {
303
304
  if (r > 0) {
304
305
  let n = e[r], i = t[r], a = 0, o = r >> 1;
305
306
  for (; a < o;) {
306
- let n = (a << 1) + 1, o = n + 1, s = n + (o < r & +(t[o] < t[n]));
307
+ let n = (a << 1) + 1, o = n + 1, s = n + (+(o < r) & t[o] < t[n]);
307
308
  if (t[s] >= i) break;
308
309
  e[a] = e[s], t[a] = t[s], a = s;
309
310
  }
@@ -321,14 +322,15 @@ var N = class {
321
322
  Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
322
323
  }
323
324
  }, P = Symbol("runtimeNode"), F = 1e6;
324
- function Ce(e) {
325
+ function we(e) {
325
326
  return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
326
327
  }
327
- function I(e, t) {
328
- let n = {
328
+ function I(e, t, n = !0) {
329
+ let r = {
329
330
  id: e.id,
330
331
  name: e.name,
331
332
  kind: e.kind,
333
+ batchStable: n,
332
334
  get() {
333
335
  return e.value;
334
336
  },
@@ -338,27 +340,27 @@ function I(e, t) {
338
340
  };
339
341
  }
340
342
  };
341
- return Object.defineProperty(n, P, {
343
+ return Object.defineProperty(r, P, {
342
344
  enumerable: !1,
343
345
  configurable: !1,
344
346
  writable: !1,
345
347
  value: e
346
- }), t ? Object.assign(n, { set(e) {
348
+ }), t ? Object.assign(r, { set(e) {
347
349
  t(e);
348
- } }) : n;
350
+ } }) : r;
349
351
  }
350
- function we(e) {
352
+ function Te(e) {
351
353
  let t = e[P];
352
354
  if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
353
355
  return t;
354
356
  }
355
- function Te(e) {
356
- return typeof e.rank == "number" ? e.rank : we(e).rank;
357
- }
358
357
  function Ee(e) {
358
+ return typeof e.rank == "number" ? e.rank : Te(e).rank;
359
+ }
360
+ function De(e) {
359
361
  for (let t of e) t();
360
362
  }
361
- var De = class {
363
+ var Oe = class {
362
364
  #e = 1;
363
365
  #t = 1;
364
366
  #n = 0;
@@ -377,7 +379,7 @@ var De = class {
377
379
  #h = /* @__PURE__ */ new Set();
378
380
  #g;
379
381
  constructor(e = {}) {
380
- this.#g = Ce(e.lifecycleRegistry);
382
+ this.#g = we(e.lifecycleRegistry);
381
383
  }
382
384
  createWritable(e, t, n, r, i = {}) {
383
385
  let a = "n" + this.#e++, o = i.notify ?? !0, s = {
@@ -399,7 +401,7 @@ var De = class {
399
401
  }, l = () => {
400
402
  s.disposed = !0, s.listeners.clear(), u();
401
403
  }, u = this.#g(e, l);
402
- return Object.assign(I(s, c), { dispose: l });
404
+ return Object.assign(I(s, c, o), { dispose: l });
403
405
  }
404
406
  computed(e, t, n, r, i = {}) {
405
407
  return this.#_(e, t, n, r, i);
@@ -542,7 +544,7 @@ var De = class {
542
544
  #v(e) {
543
545
  this.#s++;
544
546
  try {
545
- Ee(e);
547
+ De(e);
546
548
  } finally {
547
549
  this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
548
550
  }
@@ -571,7 +573,7 @@ var De = class {
571
573
  }
572
574
  #b(e) {
573
575
  let t = -1, n = 0;
574
- return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, Te(t)), 0), t = this.#n), n);
576
+ return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, Ee(t)), 0), t = this.#n), n);
575
577
  }
576
578
  #x(e) {
577
579
  if (this.#d.has(e)) {
@@ -605,7 +607,7 @@ var De = class {
605
607
  this.#h.clear();
606
608
  }
607
609
  }
608
- }, Oe = class {
610
+ }, ke = class {
609
611
  #e = 1;
610
612
  #t = /* @__PURE__ */ new Map();
611
613
  createOwner(e, t) {
@@ -626,7 +628,7 @@ var De = class {
626
628
  t.clear(), this.#t.delete(e);
627
629
  }
628
630
  }
629
- }, ke = class {
631
+ }, Ae = class {
630
632
  #e = 1;
631
633
  #t = /* @__PURE__ */ new Map();
632
634
  createRootScope(e) {
@@ -657,55 +659,55 @@ var De = class {
657
659
  if (!t) throw Error("Unknown scope: " + e);
658
660
  t.params.clear(), t.initializers.clear();
659
661
  }
660
- registerInitializer(e, t, n) {
661
- r(t);
662
+ registerInitializer(e, n, r) {
663
+ t(n);
662
664
  let i = this.#t.get(e);
663
665
  if (!i) throw Error("Unknown scope: " + e);
664
- if (i.params.has(t) || i.initializers.has(t)) throw Error(`Parameter "${t}" already exists in scope ${e}`);
665
- i.initializers.set(t, {
666
- initialize: n,
666
+ if (i.params.has(n) || i.initializers.has(n)) throw Error(`Parameter "${n}" already exists in scope ${e}`);
667
+ i.initializers.set(n, {
668
+ initialize: r,
667
669
  initializing: !1
668
670
  });
669
671
  }
670
- register(e, t, n) {
671
- r(t);
672
+ register(e, n, r) {
673
+ t(n);
672
674
  let i = this.#t.get(e);
673
675
  if (!i) throw Error("Unknown scope: " + e);
674
- if (i.params.has(t) || i.initializers.get(t)?.initializing === !1) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
675
- return i.params.set(t, n), n;
676
- }
677
- resolve(e, t) {
678
- r(t);
679
- let n = e;
680
- for (; n;) {
681
- let e = this.#t.get(n);
682
- if (!e) throw Error("Unknown scope: " + n);
683
- let r = e.initializers.get(t);
684
- if (r) {
685
- if (r.initializing) throw Error(`Parameter dependency cycle while initializing "${t}" in ${n}.`);
686
- r.initializing = !0;
676
+ if (i.params.has(n) || i.initializers.get(n)?.initializing === !1) throw Error("Parameter \"" + n + "\" already exists in scope " + e);
677
+ return i.params.set(n, r), r;
678
+ }
679
+ resolve(e, n) {
680
+ t(n);
681
+ let r = e;
682
+ for (; r;) {
683
+ let e = this.#t.get(r);
684
+ if (!e) throw Error("Unknown scope: " + r);
685
+ let t = e.initializers.get(n);
686
+ if (t) {
687
+ if (t.initializing) throw Error(`Parameter dependency cycle while initializing "${n}" in ${r}.`);
688
+ t.initializing = !0;
687
689
  try {
688
- if (r.initialize(), !e.params.has(t)) throw Error(`Initializer did not register parameter "${t}".`);
689
- e.initializers.delete(t);
690
+ if (t.initialize(), !e.params.has(n)) throw Error(`Initializer did not register parameter "${n}".`);
691
+ e.initializers.delete(n);
690
692
  } finally {
691
- r.initializing = !1;
693
+ t.initializing = !1;
692
694
  }
693
695
  }
694
- let i = e.params.get(t);
696
+ let i = e.params.get(n);
695
697
  if (i) return i;
696
- n = e.parentScope;
698
+ r = e.parentScope;
697
699
  }
698
700
  }
699
701
  };
700
702
  //#endregion
701
703
  //#region ../core/src/paramRuntime/expressionCompiler.js
702
- function Ae(e, t = {}, n = {}) {
703
- return a(e, t, n);
704
+ function je(e, t = {}, n = {}) {
705
+ return p(e, t, n);
704
706
  }
705
707
  //#endregion
706
708
  //#region ../core/src/paramRuntime/expressionRef.js
707
- function L(e, t, n = {}) {
708
- let r = {}, i = Ae(e, r, n), a = /* @__PURE__ */ new Map();
709
+ function Me(e, t, n = {}) {
710
+ let r = {}, i = je(e, r, n), a = /* @__PURE__ */ new Map();
709
711
  for (let n of i.globals) {
710
712
  if (a.has(n)) continue;
711
713
  let i = t(n);
@@ -729,6 +731,17 @@ function L(e, t, n = {}) {
729
731
  }, i.invalidate = () => {
730
732
  for (let e of o) e();
731
733
  o.clear();
734
+ }, i.createSnapshotEvaluator = () => {
735
+ let e = {};
736
+ for (let t of Object.keys(r)) a.has(t) || (e[t] = r[t]);
737
+ for (let [t, n] of a) n.batchStable || Object.defineProperty(e, t, {
738
+ enumerable: !0,
739
+ get: () => n.get()
740
+ });
741
+ let t = Object.assign(i.createEvaluator(e), { refresh() {
742
+ for (let [t, n] of a) n.batchStable && (e[t] = n.get());
743
+ } });
744
+ return t.refresh(), t;
732
745
  }, i.identifier = () => i.code + "|" + Array.from(a.values()).map((e) => e.id).concat((i.scaleDependencies ?? []).map((e) => e.id)).join(","), i.dependencies = Array.from(a.values()).concat(i.scaleDependencies ?? []), {
733
746
  expression: i,
734
747
  dependencies: i.dependencies
@@ -736,10 +749,10 @@ function L(e, t, n = {}) {
736
749
  }
737
750
  //#endregion
738
751
  //#region ../core/src/paramRuntime/paramRuntime.js
739
- var je = class {
740
- #e = new Oe();
741
- #t = new De({ lifecycleRegistry: this.#e });
742
- #n = new ke();
752
+ var Ne = class {
753
+ #e = new ke();
754
+ #t = new Oe({ lifecycleRegistry: this.#e });
755
+ #n = new Ae();
743
756
  createScope(e) {
744
757
  let t = this.#e.createOwner("scope", e ?? "root");
745
758
  return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
@@ -764,11 +777,11 @@ var je = class {
764
777
  return this.#n.register(e, t, a);
765
778
  }
766
779
  registerDerived(e, t, n, r) {
767
- let { expression: i, dependencies: a } = L(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
780
+ let { expression: i, dependencies: a } = Me(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
768
781
  return this.#n.register(e, t, s);
769
782
  }
770
783
  createExpression(e, t, n) {
771
- let { expression: r } = L(t, (t) => this.resolve(e, t), n);
784
+ let { expression: r } = Me(t, (t) => this.resolve(e, t), n);
772
785
  return r;
773
786
  }
774
787
  resolve(e, t) {
@@ -801,11 +814,11 @@ var je = class {
801
814
  whenPropagated(e) {
802
815
  return this.#t.whenPropagated(e);
803
816
  }
804
- }, Me = (e) => new Promise((t) => setTimeout(t, e));
805
- function Ne() {
817
+ }, Pe = (e) => new Promise((t) => setTimeout(t, e));
818
+ function Fe() {
806
819
  return { canceled: !1 };
807
820
  }
808
- function Pe(e) {
821
+ function Ie(e) {
809
822
  let t = e.requestAnimationFrame || window.requestAnimationFrame, n = e.signal, r = e.cancelToken, i = () => new Promise((i, a) => {
810
823
  if (r?.canceled) return i();
811
824
  if (n?.aborted) return a("aborted");
@@ -818,11 +831,11 @@ function Pe(e) {
818
831
  };
819
832
  t(m);
820
833
  });
821
- return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : Me(e.delay).then(i) : i();
834
+ return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : Pe(e.delay).then(i) : i();
822
835
  }
823
836
  //#endregion
824
837
  //#region ../core/src/utils/animator.js
825
- var Fe = class {
838
+ var Le = class {
826
839
  constructor(e) {
827
840
  this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
828
841
  }
@@ -848,13 +861,13 @@ var Fe = class {
848
861
  this._finalized = !0, this._renderRequested = !1, this.transitions = [], this._animationFrameRequest !== void 0 && (window.cancelAnimationFrame(this._animationFrameRequest), this._animationFrameRequest = void 0);
849
862
  }
850
863
  transition(e) {
851
- return Pe({
864
+ return Ie({
852
865
  requestAnimationFrame: (e) => this.requestTransition(e),
853
866
  ...e
854
867
  });
855
868
  }
856
869
  };
857
- function R(e, t, n, r, i) {
870
+ function Re(e, t, n, r, i) {
858
871
  let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
859
872
  function u(e, t, n, r) {
860
873
  return t + (e - t) * 2 ** (-n / r);
@@ -873,7 +886,7 @@ function R(e, t, n, r, i) {
873
886
  s || (s = !0, e.requestTransition(d));
874
887
  }
875
888
  function p(n) {
876
- l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = Ie(), d(a));
889
+ l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = ze(), d(a));
877
890
  }
878
891
  return p.stop = () => {
879
892
  o = !0, s = !1, e.cancelTransition(d);
@@ -881,13 +894,13 @@ function R(e, t, n, r, i) {
881
894
  l = e, c = e, p.stop(), t(c);
882
895
  }, p;
883
896
  }
884
- function Ie() {
897
+ function ze() {
885
898
  let e = globalThis.document?.timeline?.currentTime;
886
899
  return typeof e == "number" ? e : performance.now();
887
900
  }
888
901
  //#endregion
889
902
  //#region ../core/src/paramRuntime/viewParamRuntime.js
890
- var z = class {
903
+ var Be = class {
891
904
  #e;
892
905
  #t;
893
906
  #n = /* @__PURE__ */ new Map();
@@ -895,37 +908,69 @@ var z = class {
895
908
  #i = /* @__PURE__ */ new Map();
896
909
  #a = /* @__PURE__ */ new Set();
897
910
  #o = /* @__PURE__ */ new Map();
898
- #s = /* @__PURE__ */ new Map();
899
- #c;
900
- #l;
901
- #u;
911
+ #s;
912
+ #c = /* @__PURE__ */ new Map();
913
+ #l = /* @__PURE__ */ new Map();
914
+ #u = /* @__PURE__ */ new Map();
902
915
  #d;
903
- #f = !1;
916
+ #f;
917
+ #p;
918
+ #m;
919
+ #h = !1;
904
920
  constructor(e, t, n, r = {}) {
905
- this.#c = e ?? (() => void 0), this.#l = t ?? (() => void 0), this.#u = n, this.#d = r.snapTransitionedUpdates ?? !1;
906
- let i = this.#c();
907
- i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new je(), this.#t = this.#e.createScope());
921
+ this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
922
+ let i = this.#d();
923
+ i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new Ne(), this.#t = this.#e.createScope());
924
+ }
925
+ setSelectionSource(e) {
926
+ this.#s = e;
927
+ }
928
+ findSelectionCapability(e) {
929
+ let t = this.findRuntimeForParam(e), n = t && t.#c.get(e);
930
+ if (!n?.size) return;
931
+ let r = Array.from(n, (t) => ({
932
+ type: t.kind,
933
+ components: t.components.map((e) => ({
934
+ component: e,
935
+ type: t.source?.getScaleResolution(e)?.type
936
+ })),
937
+ location: t.source?.name ?? e
938
+ })), i = r[0], a = JSON.stringify(i.components), o = r.find(({ components: e }) => JSON.stringify(e) !== a);
939
+ if (o) throw Error(`Conflicting selection declarations for "${e}" in "${i.location}" and "${o.location}".`);
940
+ return i;
941
+ }
942
+ #g(e) {
943
+ if (!("select" in e)) return;
944
+ let t = i(e.select), n = t.type === "interval" ? "interval" : t.toggle ? "multi" : "single", r = t.type === "interval" ? Array.from(new Set(t.encodings)).sort() : [], a = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, o = {
945
+ kind: n,
946
+ components: r,
947
+ source: this.#s
948
+ }, s = a.#c.get(e.name) ?? /* @__PURE__ */ new Set(), c = s.values().next().value;
949
+ if (c && (c.kind !== n || JSON.stringify(c.components) !== JSON.stringify(r))) throw Error(`Conflicting selection declarations for "${e.name}" in "${c.source?.name ?? e.name}" and "${this.#s?.name ?? e.name}".`);
950
+ s.add(o), a.#c.set(e.name, s), this.#e.addScopeDisposer(this.#t, () => {
951
+ s.delete(o);
952
+ });
908
953
  }
909
- get #p() {
910
- return { resolveScaleResolution: this.#l };
954
+ get #_() {
955
+ return { resolveScaleResolution: this.#f };
911
956
  }
912
- registerParam(e, t = {}) {
913
- let n = e.name;
914
- if (r(n), this.#i.has(n) || this.#a.has(n)) throw Error("Parameter \"" + n + "\" already registered in this scope.");
915
- if (Re(e), t.defer) {
957
+ registerParam(e, n = {}) {
958
+ let r = e.name;
959
+ if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
960
+ if (He(e), n.defer) {
916
961
  if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
917
- return this.#e.registerInitializer(this.#t, n, () => {
918
- this.#m(e);
919
- }), this.#i.set(n, e), () => {
920
- throw Error("Cannot set derived parameter \"" + n + "\".");
962
+ return this.#e.registerInitializer(this.#t, r, () => {
963
+ this.#v(e);
964
+ }), this.#i.set(r, e), () => {
965
+ throw Error("Cannot set derived parameter \"" + r + "\".");
921
966
  };
922
967
  }
923
- return this.#m(e);
968
+ return this.#v(e);
924
969
  }
925
970
  registerLazyExpression(e, t, n) {
926
971
  this.#e.registerInitializer(this.#t, e, () => {
927
972
  n?.();
928
- let r = this.#e.registerDerived(this.#t, e, t, this.#p);
973
+ let r = this.#e.registerDerived(this.#t, e, t, this.#_);
929
974
  this.#r.set(e, r);
930
975
  }), this.#a.add(e);
931
976
  }
@@ -935,7 +980,7 @@ var z = class {
935
980
  this.#e.registerInitializer(this.#t, e, () => {
936
981
  let r = this.#e.registerDerived(this.#t, e, t, {
937
982
  expressionScope: n.#t,
938
- ...n.#p
983
+ ...n.#_
939
984
  });
940
985
  this.#r.set(e, r);
941
986
  }), this.#i.set(e, {
@@ -943,64 +988,65 @@ var z = class {
943
988
  expr: t
944
989
  });
945
990
  }
946
- #m(e) {
947
- let n = e.name, r, i;
991
+ #v(e) {
992
+ let t = e.name, n, r;
948
993
  if (e.push == "outer") {
949
- let a = this.findRuntimeForParam(n);
950
- if (!a) throw Error(`Parameter "${n}" not found in outer scope!`);
951
- let o = a.paramConfigs.get(n);
952
- if (!o) throw Error(`Outer parameter "${n}" exists as a value but has no registered config.`);
953
- if ("expr" in o || "select" in o || "ruler" in o) throw Error(`The outer parameter "${n}" must not have expr, select, or ruler properties!`);
954
- r = (e) => {
955
- a.setValue(n, e);
956
- }, this.#n.set(n, r), "ruler" in e && (i = t(e, this), r(i));
957
- } else if ("value" in e) i = t(e, this), r = "transition" in e ? this.#g(n, i, e.transition) : this.#h(n, i);
994
+ let i = this.findRuntimeForParam(t);
995
+ if (!i) throw Error(`Parameter "${t}" not found in outer scope!`);
996
+ let a = i.paramConfigs.get(t);
997
+ if (!a) throw Error(`Outer parameter "${t}" exists as a value but has no registered config.`);
998
+ if ("expr" in a || "select" in a || "ruler" in a) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
999
+ n = (e) => {
1000
+ i.setValue(t, e);
1001
+ }, this.#n.set(t, n), "ruler" in e && (r = h(e, this), n(r));
1002
+ } else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#b(t, r, e.transition) : this.#y(t, r);
958
1003
  else if ("expr" in e) {
959
- if ("transition" in e) this.#_(n, e.expr, e.transition);
1004
+ if ("transition" in e) this.#x(t, e.expr, e.transition);
1005
+ else if ("debounce" in e) this.#S(t, e.expr, e.debounce);
960
1006
  else {
961
- let t = this.#e.registerDerived(this.#t, n, e.expr, this.#p);
962
- this.#r.set(n, t);
1007
+ let n = this.#e.registerDerived(this.#t, t, e.expr, this.#_);
1008
+ this.#r.set(t, n);
963
1009
  }
964
- r = () => {
965
- throw Error("Cannot set derived parameter \"" + n + "\".");
1010
+ n = () => {
1011
+ throw Error("Cannot set derived parameter \"" + t + "\".");
966
1012
  };
967
- } else i = t(e, this), r = this.#h(n, i);
1013
+ } else r = h(e, this), n = this.#y(t, r);
968
1014
  if ("select" in e) {
969
- if (i ??= t(e, this), !this.#n.has(n)) {
970
- let e = this.#e.registerSelection(this.#t, n, i);
971
- this.#r.set(n, e), this.#n.set(n, (t) => {
1015
+ if (r ??= h(e, this), !this.#n.has(t)) {
1016
+ let e = this.#e.registerSelection(this.#t, t, r);
1017
+ this.#r.set(t, e), this.#n.set(t, (t) => {
972
1018
  e.set(t), this.#e.flushNow();
973
- }), r = this.#n.get(n);
1019
+ }), n = this.#n.get(t);
974
1020
  }
975
- r(i);
1021
+ n(r);
976
1022
  }
977
- return this.#i.set(n, e), r;
1023
+ return this.#i.set(t, e), this.#g(e), n;
978
1024
  }
979
- allocateSetter(e, t, n = !1) {
980
- if (r(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
981
- let i = this.#e.registerBase(this.#t, e, t, { notify: !n });
1025
+ allocateSetter(e, n, r = !1) {
1026
+ if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
1027
+ let i = this.#e.registerBase(this.#t, e, n, { notify: !r });
982
1028
  this.#r.set(e, i);
983
1029
  let a = (e) => {
984
1030
  i.set(e), this.#e.flushNow();
985
1031
  };
986
1032
  return this.#n.set(e, a), a;
987
1033
  }
988
- setValue(e, t, n) {
989
- r(e);
1034
+ setValue(e, n, r) {
1035
+ t(e);
990
1036
  let i = this.#n.get(e);
991
1037
  if (!i) throw Error("Writable parameter not found in this scope: " + e);
992
- i(t, n);
1038
+ i(n, r);
993
1039
  }
994
1040
  getValue(e) {
995
1041
  return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
996
1042
  }
997
1043
  getParamRef(e) {
998
- r(e);
999
- let t = this.findRuntimeForParam(e);
1000
- if (t) return t.#r.has(e) || t.#e.resolve(t.#t, e), t.#r.get(e);
1044
+ t(e);
1045
+ let n = this.findRuntimeForParam(e);
1046
+ if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
1001
1047
  }
1002
1048
  getTargetValue(e) {
1003
- return r(e), this.#s.get(e)?.target ?? this.getValue(e);
1049
+ return t(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
1004
1050
  }
1005
1051
  subscribe(e, t) {
1006
1052
  let n = this.getParamRef(e);
@@ -1017,26 +1063,26 @@ var z = class {
1017
1063
  return this.#i;
1018
1064
  }
1019
1065
  hasLocalParam(e) {
1020
- r(e);
1021
- let t = this.#i.get(e);
1022
- return this.#r.has(e) || this.#a.has(e) || t !== void 0 && "expr" in t;
1066
+ t(e);
1067
+ let n = this.#i.get(e);
1068
+ return this.#r.has(e) || this.#a.has(e) || n !== void 0 && "expr" in n;
1023
1069
  }
1024
1070
  isPendingParam(e) {
1025
1071
  let t = this.findRuntimeForParam(e);
1026
1072
  return t !== void 0 && !t.#r.has(e);
1027
1073
  }
1028
1074
  hasConfiguredParamInScopeChain(e) {
1029
- return r(e), this.#i.has(e) ? !0 : this.#c()?.hasConfiguredParamInScopeChain(e) ?? !1;
1075
+ return t(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
1030
1076
  }
1031
1077
  findRuntimeForParam(e) {
1032
- return this.hasLocalParam(e) ? this : this.#c()?.findRuntimeForParam(e);
1078
+ return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
1033
1079
  }
1034
1080
  findConfiguredParam(e) {
1035
1081
  let t = this.#i.get(e);
1036
1082
  return t ? {
1037
1083
  runtime: this,
1038
1084
  config: t
1039
- } : this.#c()?.findConfiguredParam(e);
1085
+ } : this.#d()?.findConfiguredParam(e);
1040
1086
  }
1041
1087
  registerSelectionController(e, t) {
1042
1088
  let n = this.#o.get(e);
@@ -1057,22 +1103,22 @@ var z = class {
1057
1103
  let r = this.#i.get(t);
1058
1104
  e.push({
1059
1105
  name: t,
1060
- kind: Le(r),
1106
+ kind: Ve(r),
1061
1107
  value: n.get(),
1062
1108
  writable: this.#n.has(t),
1063
1109
  configured: !!r,
1064
1110
  config: r ? structuredClone(r) : void 0,
1065
- target: this.#s.get(t)?.target
1111
+ target: this.#l.get(t)?.target ?? this.#u.get(t)?.target
1066
1112
  });
1067
1113
  }
1068
1114
  return {
1069
1115
  scopeId: this.#t,
1070
- disposed: this.#f,
1116
+ disposed: this.#h,
1071
1117
  params: e
1072
1118
  };
1073
1119
  }
1074
1120
  createExpression(e) {
1075
- return this.#e.createExpression(this.#t, e, this.#p);
1121
+ return this.#e.createExpression(this.#t, e, this.#_);
1076
1122
  }
1077
1123
  watchExpression(e, t, n = {}) {
1078
1124
  let r = this.createExpression(e), i = r.subscribe(t);
@@ -1099,7 +1145,7 @@ var z = class {
1099
1145
  cancelUpdate(e) {
1100
1146
  this.#e.cancelUpdate(e);
1101
1147
  }
1102
- #h(e, t) {
1148
+ #y(e, t) {
1103
1149
  let n = this.#e.registerBase(this.#t, e, t);
1104
1150
  this.#r.set(e, n);
1105
1151
  let r = (e) => {
@@ -1107,36 +1153,51 @@ var z = class {
1107
1153
  };
1108
1154
  return this.#n.set(e, r), r;
1109
1155
  }
1110
- #g(e, t, n) {
1111
- let r = this.#v(e, t, n), i = (t, n) => {
1112
- this.#y(e, r, t, n);
1156
+ #b(e, t, n) {
1157
+ let r = this.#C(e, t, n), i = (t, n) => {
1158
+ this.#w(e, r, t, n);
1113
1159
  };
1114
1160
  return this.#n.set(e, i), i;
1115
1161
  }
1116
- #_(e, t, n) {
1117
- let r = this.createExpression(t), i = this.#v(e, r(null), n), a = r.subscribe(() => {
1118
- this.#y(e, i, r(null), { animate: !this.#d });
1162
+ #x(e, t, n) {
1163
+ let r = this.createExpression(t), i = this.#C(e, r(null), n), a = r.subscribe(() => {
1164
+ this.#w(e, i, r(null), { animate: !this.#m });
1119
1165
  });
1120
1166
  this.#e.addScopeDisposer(this.#t, a);
1121
1167
  }
1122
- #v(e, t, n) {
1123
- let r = B(e, t), i = this.#e.registerBase(this.#t, e, r);
1168
+ #S(e, t, n) {
1169
+ let r = this.createExpression(t), i = r(null), a = this.#e.registerBase(this.#t, e, i);
1170
+ this.#r.set(e, a);
1171
+ let o = {
1172
+ target: i,
1173
+ timeout: void 0
1174
+ }, s = () => {
1175
+ o.timeout = void 0, a.set(o.target), this.#e.flushNow();
1176
+ }, c = r.subscribe(() => {
1177
+ o.target = r(null), clearTimeout(o.timeout), o.timeout = void 0, o.target !== a.get() && (this.#m ? s() : o.timeout = setTimeout(s, n));
1178
+ });
1179
+ this.#u.set(e, o), this.#e.addScopeDisposer(this.#t, () => {
1180
+ clearTimeout(o.timeout), c(), this.#u.delete(e);
1181
+ });
1182
+ }
1183
+ #C(e, t, n) {
1184
+ let r = Ue(e, t), i = this.#e.registerBase(this.#t, e, r);
1124
1185
  this.#r.set(e, i);
1125
- let a = this.#u;
1186
+ let a = this.#p;
1126
1187
  if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
1127
- let o = R(a, ({ value: e }) => {
1188
+ let o = Re(a, ({ value: e }) => {
1128
1189
  i.set(e), this.#e.flushNow();
1129
1190
  }, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
1130
1191
  target: i.get(),
1131
1192
  smoother: o,
1132
1193
  dispose: () => {
1133
- o.stop(), this.#s.delete(e);
1194
+ o.stop(), this.#l.delete(e);
1134
1195
  }
1135
1196
  };
1136
- return this.#s.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
1197
+ return this.#l.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
1137
1198
  }
1138
- #y(e, t, n, r = {}) {
1139
- let i = B(e, n);
1199
+ #w(e, t, n, r = {}) {
1200
+ let i = Ue(e, n);
1140
1201
  t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
1141
1202
  }
1142
1203
  evaluateAndGet(e) {
@@ -1152,28 +1213,33 @@ var z = class {
1152
1213
  return this.#e.whenPropagated(e);
1153
1214
  }
1154
1215
  finalizeInitialization() {
1155
- this.#d = !1;
1216
+ this.#m = !1;
1156
1217
  }
1157
1218
  dispose() {
1158
- this.#f || (this.#f = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#s.clear());
1219
+ this.#h || (this.#h = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#l.clear(), this.#u.clear());
1159
1220
  }
1160
1221
  hasPointSelections() {
1161
- for (let t of this.#i.values()) if (e(t)) {
1162
- let e = t.select;
1163
- if (s(e)) {
1164
- if (e == "point") return !0;
1165
- } else if (e.type == "point") return !0;
1222
+ for (let e of this.#i.values()) if (ne(e)) {
1223
+ let t = e.select;
1224
+ if (te(t)) {
1225
+ if (t == "point") return !0;
1226
+ } else if (t.type == "point") return !0;
1166
1227
  }
1167
1228
  return !1;
1168
1229
  }
1169
1230
  };
1170
- function Le(e) {
1231
+ function Ve(e) {
1171
1232
  return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
1172
1233
  }
1173
- function Re(e) {
1234
+ function He(e) {
1174
1235
  let t = e.name;
1175
1236
  if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
1176
1237
  if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
1238
+ if ("debounce" in e) {
1239
+ if (!("expr" in e) || e.push === "outer") throw Error(`The debounced parameter "${t}" must have an expr property and must not use push.`);
1240
+ if ("transition" in e) throw Error(`The parameter "${t}" must not use debounce and transition together.`);
1241
+ if (!Number.isFinite(e.debounce) || e.debounce < 0) throw Error(`The debounce for parameter "${t}" must be a non-negative finite number.`);
1242
+ }
1177
1243
  if (!("transition" in e)) return;
1178
1244
  if ("select" in e || "ruler" in e || e.push === "outer") throw Error(`The parameter "${t}" must not use transition with select, ruler, or push.`);
1179
1245
  if (!("value" in e || "expr" in e)) throw Error(`The transitioned parameter "${t}" must have a value or expr property.`);
@@ -1183,62 +1249,62 @@ function Re(e) {
1183
1249
  if (n.halfLife != null && (!Number.isFinite(n.halfLife) || n.halfLife <= 0)) throw Error(`The transition halfLife for parameter "${t}" must be a positive finite number.`);
1184
1250
  if (n.epsilon != null && (!Number.isFinite(n.epsilon) || n.epsilon < 0)) throw Error(`The transition epsilon for parameter "${t}" must be a non-negative finite number.`);
1185
1251
  }
1186
- function B(e, t) {
1252
+ function Ue(e, t) {
1187
1253
  if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
1188
1254
  return t;
1189
1255
  }
1190
1256
  //#endregion
1191
1257
  //#region ../core/src/utils/addBaseUrl.js
1192
- function ze(e, t) {
1258
+ function We(e, t) {
1193
1259
  return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
1194
1260
  }
1195
- function Be(e) {
1261
+ function Ge(e) {
1196
1262
  if (!e) return e;
1197
1263
  if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
1198
1264
  return e.endsWith("/") ? e : e + "/";
1199
1265
  }
1200
1266
  //#endregion
1201
1267
  //#region ../core/src/config/mergeConfig.js
1202
- function V(e) {
1203
- return o(e) && !Array.isArray(e);
1268
+ function L(e) {
1269
+ return d(e) && !Array.isArray(e);
1204
1270
  }
1205
- function Ve(e) {
1271
+ function Ke(e) {
1206
1272
  let t = {};
1207
- for (let [n, r] of Object.entries(e)) t[n] = H(r);
1273
+ for (let [n, r] of Object.entries(e)) t[n] = R(r);
1208
1274
  return t;
1209
1275
  }
1210
- function H(e) {
1211
- return Array.isArray(e) ? e.map(H) : V(e) ? Ve(e) : e;
1276
+ function R(e) {
1277
+ return Array.isArray(e) ? e.map(R) : L(e) ? Ke(e) : e;
1212
1278
  }
1213
- function U(e, t) {
1279
+ function z(e, t) {
1214
1280
  for (let [n, r] of Object.entries(t)) {
1215
1281
  if (r === void 0) continue;
1216
1282
  let t = e[n];
1217
- V(r) && V(t) ? U(t, r) : e[n] = H(r);
1283
+ L(r) && L(t) ? z(t, r) : e[n] = R(r);
1218
1284
  }
1219
1285
  return e;
1220
1286
  }
1221
- function He(e) {
1287
+ function B(e) {
1222
1288
  let t = {};
1223
- for (let n of e) n && U(t, n);
1289
+ for (let n of e) n && z(t, n);
1224
1290
  return t;
1225
1291
  }
1226
1292
  //#endregion
1227
1293
  //#region ../core/src/view/viewChrome.js
1228
- var W = /* @__PURE__ */ new WeakMap();
1229
- function Ue(e, t) {
1230
- W.set(e, t);
1294
+ var V = /* @__PURE__ */ new WeakMap();
1295
+ function qe(e, t) {
1296
+ V.set(e, t);
1231
1297
  }
1232
- function We(e) {
1233
- return W.get(e);
1298
+ function Je(e) {
1299
+ return V.get(e);
1234
1300
  }
1235
- function Ge(e) {
1236
- return W.has(e);
1301
+ function H(e) {
1302
+ return V.has(e);
1237
1303
  }
1238
- function Ke(e) {
1304
+ function U(e) {
1239
1305
  let t = e;
1240
1306
  for (; t;) {
1241
- let n = W.get(t);
1307
+ let n = V.get(t);
1242
1308
  if (n === "excludeSubtree" || t === e && n === "exclude") return !0;
1243
1309
  t = t.layoutParent;
1244
1310
  }
@@ -1246,16 +1312,16 @@ function Ke(e) {
1246
1312
  }
1247
1313
  //#endregion
1248
1314
  //#region ../core/src/view/postScaleParams.js
1249
- var qe = /* @__PURE__ */ new WeakMap();
1250
- function Je(e, t) {
1251
- qe.set(e, t);
1315
+ var W = /* @__PURE__ */ new WeakMap();
1316
+ function Ye(e, t) {
1317
+ W.set(e, t);
1252
1318
  }
1253
- function Ye(e) {
1254
- return qe.get(e);
1319
+ function Xe(e) {
1320
+ return W.get(e);
1255
1321
  }
1256
1322
  //#endregion
1257
1323
  //#region ../core/src/data/namedDataScope.js
1258
- var Xe = class {
1324
+ var Ze = class {
1259
1325
  name;
1260
1326
  owner;
1261
1327
  getDefaultData;
@@ -1293,13 +1359,13 @@ var Xe = class {
1293
1359
  dispose() {
1294
1360
  this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
1295
1361
  }
1296
- }, Ze = class {
1362
+ }, Qe = class {
1297
1363
  view;
1298
1364
  #e = /* @__PURE__ */ new Map();
1299
1365
  #t = /* @__PURE__ */ new Map();
1300
1366
  constructor(e) {
1301
1367
  this.view = e;
1302
- for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Xe(t, e, () => n));
1368
+ for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Ze(t, e, () => n));
1303
1369
  }
1304
1370
  getLocalBinding(e) {
1305
1371
  return this.#e.get(e);
@@ -1313,7 +1379,7 @@ var Xe = class {
1313
1379
  let n = this.view.dataParent?.namedDataScope;
1314
1380
  if (n) return n.resolve(e);
1315
1381
  let r = this.#t.get(e);
1316
- return r || (r = new Xe(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1382
+ return r || (r = new Ze(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1317
1383
  }
1318
1384
  dispose() {
1319
1385
  for (let e of this.#e.values()) e.dispose();
@@ -1321,7 +1387,7 @@ var Xe = class {
1321
1387
  for (let e of this.#t.values()) e.dispose();
1322
1388
  this.#t.clear();
1323
1389
  }
1324
- }, G = "VISIT_SKIP", K = "VISIT_STOP", q = (e) => e, Qe = class {
1390
+ }, G = "VISIT_SKIP", K = "VISIT_STOP", q = (e) => e, $e = class {
1325
1391
  spec;
1326
1392
  namedDataScope;
1327
1393
  #e;
@@ -1340,27 +1406,27 @@ var Xe = class {
1340
1406
  #f = [];
1341
1407
  #p = "none";
1342
1408
  #m = /* @__PURE__ */ new Map();
1343
- facetCoords = new ae([], JSON.stringify);
1409
+ facetCoords = new e([], JSON.stringify);
1344
1410
  constructor(e, t, n, r, i, a = {}) {
1345
1411
  if (!e) throw Error("View spec must be defined!");
1346
- if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Ze(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1412
+ if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Qe(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1347
1413
  let o = r ? r.getConfigScopes() : [t.getBaseConfig()], s = e.config;
1348
1414
  this.#e = [...o, s].filter((e) => !!e), this.resolutions = {
1349
1415
  scale: {},
1350
1416
  axis: {},
1351
1417
  legend: {}
1352
- }, ne(this), this.options = {
1418
+ }, ie(this), this.options = {
1353
1419
  inheritEncoding: !1,
1354
1420
  layoutSizeParams: "own",
1355
1421
  ...a
1356
1422
  }, this.flowHandle = void 0, this.needsAxes = {
1357
1423
  x: !1,
1358
1424
  y: !1
1359
- }, this.paramRuntime = new z(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { snapTransitionedUpdates: !0 }), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => oe("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1360
- let c = [...e.params ?? [], ...Ye(e) ?? []];
1361
- for (let e of c) {
1425
+ }, this.paramRuntime = new Be(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { settleTemporalUpdatesImmediately: !0 }), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => se("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1426
+ let l = [...e.params ?? [], ...Xe(e) ?? []];
1427
+ for (let e of l) {
1362
1428
  if ("expr" in e) {
1363
- let { usesScaleHelper: t, globals: n } = f(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1429
+ let { usesScaleHelper: t, globals: n } = c(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1364
1430
  if (t || r) {
1365
1431
  this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
1366
1432
  continue;
@@ -1386,7 +1452,7 @@ var Xe = class {
1386
1452
  return this.#t;
1387
1453
  }
1388
1454
  getConfig() {
1389
- return He(this.#e);
1455
+ return B(this.#e);
1390
1456
  }
1391
1457
  getCursorSpec() {
1392
1458
  return this.spec.cursor;
@@ -1436,26 +1502,28 @@ var Xe = class {
1436
1502
  if (v(i.type)) n = i.domain().length;
1437
1503
  else if (["locus", "index"].includes(i.type)) {
1438
1504
  let e = i.domain();
1439
- n = m(e) - e[0];
1505
+ n = ee(e) - e[0];
1440
1506
  } else throw new _(`Cannot use step-based size with "${i.type}" scale!`, this);
1441
1507
  let a = i;
1442
- n = ie(n, a.paddingInner(), a.paddingOuter());
1508
+ n = oe(n, a.paddingInner(), a.paddingOuter());
1443
1509
  let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && v(s.type) ? "offset" : "position"), l = t;
1444
1510
  if (c == "offset") {
1445
1511
  if (!s || !v(s.type)) throw new _(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
1446
- let t = s, n = ie(s.domain().length, t.paddingInner(), t.paddingOuter());
1512
+ let t = s, n = oe(s.domain().length, t.paddingInner(), t.paddingOuter());
1447
1513
  l *= n / (1 - a.paddingInner());
1448
1514
  }
1449
1515
  return {
1450
1516
  px: n * l,
1451
1517
  grow: 0
1452
1518
  };
1453
- } else if (n) return {
1519
+ }
1520
+ if (n) return {
1454
1521
  px: t,
1455
1522
  grow: 0
1456
1523
  };
1457
- else throw new _(`Cannot use step-based size with "${e}"!`, this);
1458
- } else return (r && me(r)) ?? (a ? void 0 : {
1524
+ throw new _(`Cannot use step-based size with "${e}"!`, this);
1525
+ }
1526
+ return (r && he(r)) ?? (a ? void 0 : {
1459
1527
  px: 0,
1460
1528
  grow: 1
1461
1529
  });
@@ -1471,7 +1539,7 @@ var Xe = class {
1471
1539
  };
1472
1540
  }
1473
1541
  #v(e) {
1474
- if (Ke(this)) return;
1542
+ if (U(this)) return;
1475
1543
  let t = this.getConfig().view;
1476
1544
  if (!t) return;
1477
1545
  let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
@@ -1480,7 +1548,7 @@ var Xe = class {
1480
1548
  resolveSizeValue(e, t) {
1481
1549
  if (!n(t)) return t;
1482
1550
  let r = this.#C(e)();
1483
- if (rt(r) || r === "container") return r;
1551
+ if (it(r) || r === "container") return r;
1484
1552
  throw new _(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
1485
1553
  }
1486
1554
  registerSizeInvalidation() {
@@ -1498,7 +1566,7 @@ var Xe = class {
1498
1566
  let t = this.getSize()[e];
1499
1567
  this.invalidateSizeCache();
1500
1568
  let n = this.getSize()[e];
1501
- fe(t, n) || this.context.requestLayoutReflow();
1569
+ pe(t, n) || this.context.requestLayoutReflow();
1502
1570
  };
1503
1571
  if (i.addEventListener("domain", a), this.registerDisposer(() => i.removeEventListener("domain", a)), n.for != "position") {
1504
1572
  let t = e == "width" ? "xOffset" : "yOffset", n = this.getScaleResolution(t);
@@ -1511,7 +1579,7 @@ var Xe = class {
1511
1579
  }
1512
1580
  #x(e, t) {
1513
1581
  let r = n(t.step) ? this.#C(e + ".step")() : t.step;
1514
- if (rt(r)) return r;
1582
+ if (it(r)) return r;
1515
1583
  throw new _(`"${e}.step" ExprRef must resolve to a finite number!`, this);
1516
1584
  }
1517
1585
  #S(e, t) {
@@ -1643,7 +1711,7 @@ var Xe = class {
1643
1711
  }
1644
1712
  }
1645
1713
  configureViewOpacity() {
1646
- (!this.opacityFunction || this.opacityFunction === q) && (this.opacityFunction = et(this));
1714
+ (!this.opacityFunction || this.opacityFunction === q) && (this.opacityFunction = tt(this));
1647
1715
  }
1648
1716
  finalizeParamRuntimeInitialization() {
1649
1717
  this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
@@ -1655,7 +1723,7 @@ var Xe = class {
1655
1723
  return this.#s;
1656
1724
  }
1657
1725
  arrange(e, t, n = {}) {
1658
- if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, p(t, u(n))), this.#a || this.#o) {
1726
+ if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, f(n))), this.#a || this.#o) {
1659
1727
  let e = this.getOverhang(), n = this.layoutParent ? k.zero() : this.getPadding();
1660
1728
  this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
1661
1729
  }
@@ -1677,7 +1745,7 @@ var Xe = class {
1677
1745
  }
1678
1746
  getFacetFields(e) {
1679
1747
  let t = this.getEncoding().sample;
1680
- return l(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1748
+ return u(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1681
1749
  }
1682
1750
  usesSampleFacetRendering() {
1683
1751
  return this.layoutParent?.usesSampleFacetRendering() ?? !1;
@@ -1689,15 +1757,15 @@ var Xe = class {
1689
1757
  };
1690
1758
  }
1691
1759
  getScaleResolution(e) {
1692
- let t = i(e);
1760
+ let t = o(e);
1693
1761
  return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
1694
1762
  }
1695
1763
  getAxisResolution(e) {
1696
- let t = i(e);
1764
+ let t = o(e);
1697
1765
  return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
1698
1766
  }
1699
1767
  getLegendResolution(e) {
1700
- let t = i(e);
1768
+ let t = o(e);
1701
1769
  return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
1702
1770
  }
1703
1771
  getConfiguredResolution(e, t) {
@@ -1710,17 +1778,17 @@ var Xe = class {
1710
1778
  return "independent";
1711
1779
  }
1712
1780
  getBaseUrl() {
1713
- return j(() => this.dataParent?.getBaseUrl(), Be(this.spec.baseUrl));
1781
+ return j(() => this.dataParent?.getBaseUrl(), Ge(this.spec.baseUrl));
1714
1782
  }
1715
1783
  isPickingSupported() {
1716
1784
  return !0;
1717
1785
  }
1718
1786
  getTitleText() {
1719
1787
  let e = this.spec.title;
1720
- if (e) return s(e) ? e : n(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1788
+ if (e) return te(e) ? e : n(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1721
1789
  }
1722
1790
  _cache(e, t) {
1723
- return te(this, e, t);
1791
+ return re(this, e, t);
1724
1792
  }
1725
1793
  _invalidateCacheByPrefix(e, t = "self") {
1726
1794
  switch (t) {
@@ -1730,10 +1798,7 @@ var Xe = class {
1730
1798
  case "ancestors":
1731
1799
  for (let t of this.getLayoutAncestors()) g(t, e);
1732
1800
  break;
1733
- case "progeny":
1734
- this.visit((t) => g(t, e));
1735
- break;
1736
- default:
1801
+ case "progeny": this.visit((t) => g(t, e));
1737
1802
  }
1738
1803
  }
1739
1804
  invalidateSizeCache() {
@@ -1741,14 +1806,14 @@ var Xe = class {
1741
1806
  }
1742
1807
  propagateInteraction(e) {}
1743
1808
  };
1744
- function $e(e) {
1809
+ function et(e) {
1745
1810
  return "unitsPerPixel" in e;
1746
1811
  }
1747
- function et(e) {
1812
+ function tt(e) {
1748
1813
  let t = "opacity" in e.spec ? e.spec.opacity : void 0;
1749
1814
  if (t !== void 0) {
1750
- if (h(t)) return (e) => e * t;
1751
- if ($e(t)) {
1815
+ if (s(t)) return (e) => e * t;
1816
+ if (et(t)) {
1752
1817
  let r = (t) => {
1753
1818
  let n = e.getScaleResolution(t), r = n?.getScale();
1754
1819
  if ([
@@ -1759,44 +1824,46 @@ function et(e) {
1759
1824
  scale: r,
1760
1825
  scaleResolution: n
1761
1826
  };
1762
- }, i = nt(t.values, "opacity.values", e);
1763
- if (!d(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
1764
- let a = () => 1, o = [], s = () => {
1765
- let t = tt(nt(o.map((e) => e()), "opacity.unitsPerPixel", e), i, e), n = re().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1766
- a = (e) => n(e);
1827
+ }, i = rt(t.values, "opacity.values", e);
1828
+ if (!a(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
1829
+ let o = () => 1, s = [], c = () => {
1830
+ let t = nt(rt(s.map((e) => e()), "opacity.unitsPerPixel", e), i, e), n = ae().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1831
+ o = (e) => n(e);
1767
1832
  };
1768
- o = t.unitsPerPixel.map((t) => {
1833
+ s = t.unitsPerPixel.map((t) => {
1769
1834
  if (n(t)) {
1770
1835
  let n = e.paramRuntime.watchExpression(t.expr, () => {
1771
- s(), e.context.animator.requestRender();
1836
+ c(), e.context.animator.requestRender();
1772
1837
  });
1773
1838
  return () => n(null);
1774
- } else return () => t;
1775
- }), s();
1776
- let c = (e) => {
1839
+ }
1840
+ return () => t;
1841
+ }), c();
1842
+ let u = (e) => {
1777
1843
  let t = e.scaleResolution.getAxisLength() || 1e3;
1778
- return ee(e.scale.domain()) / t;
1779
- }, l;
1844
+ return l(e.scale.domain()) / t;
1845
+ }, d;
1780
1846
  if (t.channel === "auto") {
1781
1847
  let t = r("x"), n = r("y");
1782
- if (t && n) l = () => (c(t) + c(n)) / 2;
1783
- else if (t) l = () => c(t);
1784
- else if (n) l = () => c(n);
1848
+ if (t && n) d = () => (u(t) + u(n)) / 2;
1849
+ else if (t) d = () => u(t);
1850
+ else if (n) d = () => u(n);
1785
1851
  else throw new _("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
1786
1852
  } else {
1787
1853
  let n = t.channel ? r(t.channel) : r("x") ?? r("y");
1788
1854
  if (!n) throw new _("Cannot find a resolved quantitative scale for dynamic opacity!", e);
1789
- l = () => c(n);
1855
+ d = () => u(n);
1790
1856
  }
1791
- return (e) => a(l()) * e;
1792
- } else if (n(t)) {
1857
+ return (e) => o(d()) * e;
1858
+ }
1859
+ if (n(t)) {
1793
1860
  let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
1794
1861
  return (e) => n(null) * e;
1795
1862
  }
1796
1863
  }
1797
1864
  return q;
1798
1865
  }
1799
- function tt(e, t, n) {
1866
+ function nt(e, t, n) {
1800
1867
  if (!e.length) throw new _("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
1801
1868
  if (e.length !== t.length) throw new _("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
1802
1869
  e.forEach((e, t) => {
@@ -1814,40 +1881,40 @@ function tt(e, t, n) {
1814
1881
  values: a
1815
1882
  };
1816
1883
  }
1817
- function nt(e, t, n) {
1818
- if (!d(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
1884
+ function rt(e, t, n) {
1885
+ if (!a(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
1819
1886
  return e.map((e, r) => {
1820
- if (!h(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1887
+ if (!s(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1821
1888
  return e;
1822
1889
  });
1823
1890
  }
1824
1891
  var J = (e) => !!e && typeof e == "object" && "step" in e;
1825
- function rt(e) {
1892
+ function it(e) {
1826
1893
  return typeof e == "number" && Number.isFinite(e);
1827
1894
  }
1828
1895
  var Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap();
1829
- function it(e, t) {
1830
- ot(e, t, "Import");
1831
- }
1832
1896
  function at(e, t) {
1833
- ot(e, t, "View");
1897
+ st(e, t, "Import");
1898
+ }
1899
+ function ot(e, t) {
1900
+ st(e, t, "View");
1834
1901
  }
1835
- function ot(e, t, n) {
1902
+ function st(e, t, n) {
1836
1903
  if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
1837
1904
  Y.set(e, { name: t });
1838
1905
  }
1839
- function st(e) {
1906
+ function ct(e) {
1840
1907
  return Y.get(e);
1841
1908
  }
1842
- function ct(e, t = {}) {
1909
+ function lt(e, t = {}) {
1843
1910
  let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
1844
1911
  X.set(e, n);
1845
1912
  }
1846
- function lt(e, t = {}) {
1847
- Ue(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1913
+ function ut(e, t = {}) {
1914
+ qe(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1848
1915
  }
1849
- function ut(e) {
1850
- return e.getLayoutAncestors().some(Ge);
1916
+ function dt(e) {
1917
+ return e.getLayoutAncestors().some(H);
1851
1918
  }
1852
1919
  function Z(e) {
1853
1920
  let t = e.getDataAncestors(), n = [];
@@ -1857,7 +1924,7 @@ function Z(e) {
1857
1924
  }
1858
1925
  return n;
1859
1926
  }
1860
- function dt(e) {
1927
+ function ft(e) {
1861
1928
  let t = e.explicitName;
1862
1929
  if (!t) throw Error("Cannot build a selector for a view without a name.");
1863
1930
  return {
@@ -1865,43 +1932,43 @@ function dt(e) {
1865
1932
  view: t
1866
1933
  };
1867
1934
  }
1868
- function ft(e, t) {
1935
+ function pt(e, t) {
1869
1936
  if (!t) throw Error("Cannot build a selector for a parameter without a name.");
1870
1937
  return {
1871
1938
  scope: Z(e),
1872
1939
  param: t
1873
1940
  };
1874
1941
  }
1875
- function pt(e) {
1876
- return xt(e), "p:" + JSON.stringify({
1942
+ function mt(e) {
1943
+ return St(e), "p:" + JSON.stringify({
1877
1944
  scope: e.scope,
1878
1945
  param: e.param
1879
1946
  });
1880
1947
  }
1881
- function mt(e, t) {
1948
+ function ht(e, t) {
1882
1949
  e.visit((e) => {
1883
- let n = We(e);
1950
+ let n = Je(e);
1884
1951
  if (n === "excludeSubtree") return G;
1885
1952
  if (n !== "exclude") return t(e);
1886
1953
  });
1887
1954
  }
1888
- function ht(e, t) {
1955
+ function gt(e, t) {
1889
1956
  e.visit((e) => {
1890
1957
  let n = X.get(e);
1891
1958
  if (n === "excludeSubtree") return G;
1892
1959
  if (n !== "exclude") return t(e);
1893
1960
  });
1894
1961
  }
1895
- function gt(e, t) {
1896
- if (St(t), !At(e, t.scope)) return;
1962
+ function _t(e, t) {
1963
+ if (Ct(t), !jt(e, t.scope)) return;
1897
1964
  let n = [];
1898
1965
  if ($(e, t.scope, (e) => {
1899
1966
  e.explicitName === t.view && n.push(e);
1900
1967
  }, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
1901
1968
  if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
1902
1969
  }
1903
- function _t(e, t) {
1904
- if (xt(t), !At(e, t.scope)) return;
1970
+ function vt(e, t) {
1971
+ if (St(t), !jt(e, t.scope)) return;
1905
1972
  let n = [];
1906
1973
  if ($(e, t.scope, (e) => {
1907
1974
  for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Q(i) && n.push({
@@ -1911,54 +1978,54 @@ function _t(e, t) {
1911
1978
  }), n.length === 1) return n[0];
1912
1979
  if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
1913
1980
  }
1914
- function vt(e, t) {
1981
+ function yt(e, t) {
1915
1982
  e.visit((e) => {
1916
1983
  let n = X.get(e);
1917
1984
  if (n === "excludeSubtree") return G;
1918
1985
  if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Q(r) && t({
1919
1986
  view: e,
1920
1987
  param: r,
1921
- selector: ft(e, n)
1988
+ selector: pt(e, n)
1922
1989
  });
1923
1990
  });
1924
1991
  }
1925
- function yt(e) {
1992
+ function bt(e) {
1926
1993
  let t = [];
1927
- return vt(e, (e) => t.push(e)), t;
1994
+ return yt(e, (e) => t.push(e)), t;
1928
1995
  }
1929
- function bt(e) {
1996
+ function xt(e) {
1930
1997
  let t = [];
1931
- for (let n of Ct(e)) {
1932
- let r = wt(n);
1933
- Et(e, r, t), Dt(e, r, t);
1998
+ for (let n of wt(e)) {
1999
+ let r = Tt(n);
2000
+ Dt(e, r, t), Ot(e, r, t);
1934
2001
  }
1935
2002
  return t;
1936
2003
  }
1937
- function xt(e) {
2004
+ function St(e) {
1938
2005
  if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
1939
2006
  if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
1940
2007
  }
1941
- function St(e) {
2008
+ function Ct(e) {
1942
2009
  if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
1943
2010
  if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
1944
2011
  }
1945
- function Q(t) {
1946
- return t.persist === !1 ? !1 : e(t) ? !0 : c(t) ? !!t.bind : !1;
2012
+ function Q(e) {
2013
+ return e.persist === !1 ? !1 : ne(e) ? !0 : r(e) ? !!e.bind : !1;
1947
2014
  }
1948
- function Ct(e) {
2015
+ function wt(e) {
1949
2016
  let t = /* @__PURE__ */ new Set([e]);
1950
2017
  return e.visit((e) => {
1951
2018
  let n = Y.get(e);
1952
2019
  n && typeof n.name == "string" && t.add(e);
1953
2020
  }), Array.from(t);
1954
2021
  }
1955
- function wt(e) {
2022
+ function Tt(e) {
1956
2023
  return Z(e);
1957
2024
  }
1958
- function Tt(e) {
2025
+ function Et(e) {
1959
2026
  return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
1960
2027
  }
1961
- function Et(e, t, n) {
2028
+ function Dt(e, t, n) {
1962
2029
  let r = /* @__PURE__ */ new Map();
1963
2030
  $(e, t, (e) => {
1964
2031
  for (let [t, n] of e.paramRuntime.paramConfigs) {
@@ -1971,35 +2038,35 @@ function Et(e, t, n) {
1971
2038
  if (i.length <= 1) continue;
1972
2039
  let r = i.map((e) => e.getPathString()).join(", ");
1973
2040
  n.push({
1974
- message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Tt(t) + ". Found in: " + r + ".",
2041
+ message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Et(t) + ". Found in: " + r + ".",
1975
2042
  scope: t
1976
2043
  });
1977
2044
  }
1978
2045
  }
1979
- function Dt(e, t, n) {
1980
- let r = Ot(e, t);
2046
+ function Ot(e, t, n) {
2047
+ let r = kt(e, t);
1981
2048
  if (!r.length) return;
1982
- let i = r.filter((e) => kt(e));
2049
+ let i = r.filter((e) => At(e));
1983
2050
  if (i.length <= 1) return;
1984
2051
  let a = /* @__PURE__ */ new Map();
1985
2052
  for (let e of i) {
1986
2053
  let t = Y.get(e), n = t ? t.name : void 0;
1987
- typeof n != "string" || !n.length || a.set(n, (a.get(n) ?? 0) + 1);
2054
+ typeof n == "string" && n.length && a.set(n, (a.get(n) ?? 0) + 1);
1988
2055
  }
1989
2056
  for (let [e, r] of a) r > 1 && n.push({
1990
- message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Tt(t) + ".",
2057
+ message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Et(t) + ".",
1991
2058
  scope: t
1992
2059
  });
1993
2060
  }
1994
- function Ot(e, t) {
2061
+ function kt(e, t) {
1995
2062
  let n = [];
1996
2063
  return $(e, t, (e) => {
1997
2064
  if (Z(e).length !== t.length + 1) return;
1998
2065
  let r = Y.get(e);
1999
- !r || typeof r.name != "string" || n.push(e);
2066
+ r && typeof r.name == "string" && n.push(e);
2000
2067
  }, { includeNamedImportRoots: !0 }), n;
2001
2068
  }
2002
- function kt(e) {
2069
+ function At(e) {
2003
2070
  let t = !1;
2004
2071
  return e.visit((e) => {
2005
2072
  let n = X.get(e);
@@ -2009,14 +2076,14 @@ function kt(e) {
2009
2076
  }
2010
2077
  }), t;
2011
2078
  }
2012
- function At(e, t) {
2079
+ function jt(e, t) {
2013
2080
  let n = e, r = [];
2014
2081
  for (let i of t) {
2015
2082
  if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
2016
2083
  let t, a = !1;
2017
2084
  if ($(e, r, (e) => {
2018
2085
  let n = Y.get(e);
2019
- if (!(!n || n.name !== i) && Z(e).length === r.length + 1) {
2086
+ if (n && n.name === i && Z(e).length === r.length + 1) {
2020
2087
  if (t) return a = !0, K;
2021
2088
  t = e;
2022
2089
  }
@@ -2031,20 +2098,20 @@ function $(e, t, n, r = {}) {
2031
2098
  e.visit((e) => {
2032
2099
  let r = Y.get(e), a = X.get(e);
2033
2100
  if (a === "excludeSubtree") return G;
2034
- if (a !== "exclude" && jt(e, t, r, i)) return n(e);
2101
+ if (a !== "exclude" && Mt(e, t, r, i)) return n(e);
2035
2102
  });
2036
2103
  }
2037
- function jt(e, t, n, r) {
2104
+ function Mt(e, t, n, r) {
2038
2105
  let i = Z(e);
2039
- return Mt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Nt(t, i);
2040
- }
2041
- function Mt(e, t) {
2042
- return e.length === t.length && Nt(e, t);
2106
+ return Nt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Pt(t, i);
2043
2107
  }
2044
2108
  function Nt(e, t) {
2109
+ return e.length === t.length && Pt(e, t);
2110
+ }
2111
+ function Pt(e, t) {
2045
2112
  if (e.length > t.length) return !1;
2046
2113
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
2047
2114
  return !0;
2048
2115
  }
2049
2116
  //#endregion
2050
- export { M as A, se as B, ze as C, Ne as D, R as E, b as F, de as H, ue as I, ce as L, k as M, ye as N, N as O, y as P, E as R, He as S, Fe as T, le as U, me as V, K as _, ut as a, Ge as b, ct as c, _t as d, gt as f, G as g, mt as h, dt as i, xe as j, j as k, it as l, ht as m, st as n, pt as o, bt as p, Z as r, lt as s, yt as t, at as u, Qe as v, z as w, Ke as x, Je as y, T as z };
2117
+ export { M as A, ce as B, We as C, Fe as D, Re as E, b as F, fe as H, de as I, le as L, k as M, be as N, N as O, y as P, D as R, B as S, Le as T, ue as U, he as V, K as _, dt as a, H as b, lt as c, vt as d, _t as f, G as g, ht as h, ft as i, Se as j, j as k, at as l, gt as m, ct as n, mt as o, xt as p, Z as r, ut as s, bt as t, ot as u, $e as v, Be as w, U as x, Ye as y, E as z };