@genome-spy/app 0.86.0 → 0.87.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 (36) hide show
  1. package/dist/{agentApi-DgopQbMV.js → agentApi-BZ1JCo1N.js} +6994 -6499
  2. package/dist/agentApi.es.js +3057 -3225
  3. package/dist/agentShared.es.js +7 -7
  4. package/dist/{canvas2d-8uxuN_vx.js → canvas2d-B_PnIof-.js} +108 -107
  5. package/dist/{canvas2d-BtQC7Xr8.js → canvas2d-Cafq5v-N.js} +128 -127
  6. package/dist/{clipOptions-taFzEljc.js → clipOptions-D6eh9T-_.js} +1508 -1166
  7. package/dist/{clipOptions-BQfNhxgP.js → clipOptions-H68pJyEZ.js} +1496 -1114
  8. package/dist/{debug-D_VtWQ6l.js → debug-BGzgZmyk.js} +2 -2
  9. package/dist/{debug-Bzc3SoRg.js → debug-UYKZLNh4.js} +2 -2
  10. package/dist/index.es.js +96 -106
  11. package/dist/index.js +399 -392
  12. package/dist/{indexer-qy_dq5l5.js → indexer-Di57GyxX.js} +1 -1
  13. package/dist/{indexer-qiFctgR3.js → indexer-o6Hpg4nN.js} +1 -1
  14. package/dist/nativeText-D9SoxpaD.js +934 -0
  15. package/dist/nativeText-DAjvkrzc.js +934 -0
  16. package/dist/{rasterExport-B8pVoOsj.js → rasterExport-DzldLv6E.js} +1 -1
  17. package/dist/{rasterExport-C4r4xjQT.js → rasterExport-IAbJwi8F.js} +1 -1
  18. package/dist/{renderCanvas2D-BQrRWp2Z.js → renderCanvas2D-BJ93Ptqj.js} +102 -96
  19. package/dist/{renderCanvas2D-CHVNfIUz.js → renderCanvas2D-yJ1IrDcX.js} +103 -97
  20. package/dist/schema.json +10169 -2852
  21. package/dist/{svg-C-Sw6E6G.js → svg-BRpl2Xub.js} +338 -384
  22. package/dist/{svg-CKHwwKRt.js → svg-DJuqHIyc.js} +353 -399
  23. package/dist/{svgRasterizer-BgD72AmG.js → svgRasterizer-CGZQ5njV.js} +1 -1
  24. package/dist/{svgRasterizer-BgSNqI3L.js → svgRasterizer-PAoqLn1j.js} +1 -1
  25. package/dist/{vega-scale-D46-iCaL.js → vega-scale-BGC53c22.js} +887 -1184
  26. package/dist/{vega-scale-CK0_al6O.js → vega-scale-DdW2NzQ3.js} +898 -1195
  27. package/dist/{viewIdentityRegistry-CDtVktJD.js → viewIdentityRegistry-D4p067HU.js} +1 -1
  28. package/dist/{viewIdentityRegistry-B-VGlez1.js → viewIdentityRegistry-Dc2hXYsO.js} +1 -1
  29. package/dist/{viewSelectors-CKfxF_LM.js → viewSelectors-DNXnGwEW.js} +519 -321
  30. package/dist/{viewSelectors-D_imtq5Z.js → viewSelectors-DYYlOt91.js} +584 -386
  31. package/dist/{viewUtils-nCJ7AoaI.js → viewUtils-EdhZTPrJ.js} +2930 -2264
  32. package/dist/{webgl-BaA3jSa2.js → webgl-C53DwzVT.js} +427 -428
  33. package/dist/{webgl-FP-4EsBL.js → webgl-CdgNFlJk.js} +639 -640
  34. package/package.json +5 -5
  35. package/dist/nativeText-DFV5XIx8.js +0 -860
  36. package/dist/nativeText-vT3AWE14.js +0 -860
@@ -1,5 +1,5 @@
1
- import { I as e, J as t, Jt as n, L as r, Mt as i, Nt as a, Ot as o, f as s, h as c, jt as l, l as u, o as d, p as f, rt as p, t as m, u as h, zt as ee } from "./clipOptions-taFzEljc.js";
2
- import { E as te, at as ne, m as g, y as _ } from "./vega-scale-D46-iCaL.js";
1
+ import { C as e, E as t, Ht as n, J as r, S as i, Ut as a, Wt as o, Xt as s, an as c, at as l, b as u, mt as d, o as f, q as p, t as m, y as h, zt as g } from "./clipOptions-H68pJyEZ.js";
2
+ import { E as ee, it as te, m as ne, y as _ } from "./vega-scale-BGC53c22.js";
3
3
  import { a as v, n as re, r as ie, t as y } from "./viewError-BiR9VCgL.js";
4
4
  //#region ../../node_modules/flatqueue/index.js
5
5
  var b = class {
@@ -43,13 +43,11 @@ var b = class {
43
43
  shrink() {
44
44
  Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
45
45
  }
46
- }, x = Symbol("runtimeNode"), ae = 1e6;
47
- function oe(e) {
48
- return e ? (t, n) => {
49
- e.addDisposer(t, n);
50
- } : () => void 0;
46
+ }, x = Symbol("runtimeNode"), S = 1e6;
47
+ function ae(e) {
48
+ return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
51
49
  }
52
- function se(e, t) {
50
+ function C(e, t) {
53
51
  let n = {
54
52
  id: e.id,
55
53
  name: e.name,
@@ -72,31 +70,37 @@ function se(e, t) {
72
70
  t(e);
73
71
  } }) : n;
74
72
  }
75
- function ce(e) {
73
+ function oe(e) {
76
74
  let t = e[x];
77
75
  if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
78
76
  return t;
79
77
  }
80
- function le(e) {
81
- return typeof e.rank == "number" ? e.rank : ce(e).rank;
78
+ function se(e) {
79
+ return typeof e.rank == "number" ? e.rank : oe(e).rank;
82
80
  }
83
- function ue(e) {
81
+ function ce(e) {
84
82
  for (let t of e) t();
85
83
  }
86
- var de = class {
84
+ var le = class {
87
85
  #e = 1;
88
86
  #t = 1;
89
87
  #n = 0;
90
- #r = !1;
88
+ #r = 0;
91
89
  #i = !1;
92
- #a = /* @__PURE__ */ new Set();
93
- #o = /* @__PURE__ */ new Set();
94
- #s = new b();
95
- #c = new b();
96
- #l = /* @__PURE__ */ new Set();
97
- #u;
90
+ #a = !1;
91
+ #o = !1;
92
+ #s = 0;
93
+ #c = !1;
94
+ #l = /* @__PURE__ */ new Map();
95
+ #u = /* @__PURE__ */ new Map();
96
+ #d = /* @__PURE__ */ new Set();
97
+ #f = /* @__PURE__ */ new Set();
98
+ #p = new b();
99
+ #m = new b();
100
+ #h = /* @__PURE__ */ new Set();
101
+ #g;
98
102
  constructor(e = {}) {
99
- this.#u = oe(e.lifecycleRegistry);
103
+ this.#g = ae(e.lifecycleRegistry);
100
104
  }
101
105
  createWritable(e, t, n, r, i = {}) {
102
106
  let a = "n" + this.#e++, o = i.notify ?? !0, s = {
@@ -112,121 +116,219 @@ var de = class {
112
116
  s.listeners.delete(e);
113
117
  };
114
118
  }
115
- };
116
- return this.#u(e, () => {
117
- s.disposed = !0, s.listeners.clear();
118
- }), se(s, (e) => {
119
+ }, c = (e) => {
119
120
  if (s.disposed) throw Error("Cannot set disposed parameter \"" + t + "\" (" + a + ").");
120
- e !== s.value && (s.value = e, o && ue(s.listeners));
121
- });
121
+ e !== s.value && (s.value = e, o && this.#v(s.listeners));
122
+ }, l = () => {
123
+ s.disposed = !0, s.listeners.clear(), u();
124
+ }, u = this.#g(e, l);
125
+ return Object.assign(C(s, c), { dispose: l });
122
126
  }
123
- computed(e, t, n, r) {
124
- let i = n.reduce((e, t) => Math.max(e, le(t)), 0), a = {
127
+ computed(e, t, n, r, i = {}) {
128
+ return this.#_(e, t, n, r, i);
129
+ }
130
+ operation(e, t, n, r, i, a = {}) {
131
+ return this.#_(e, t, n, r, a, i);
132
+ }
133
+ #_(e, t, n, r, i, a) {
134
+ let o = this.#b(() => s.dependencies), s = {
125
135
  id: "n" + this.#e++,
126
136
  name: t,
127
137
  kind: "derived",
128
- rank: i + 1,
138
+ get rank() {
139
+ return o();
140
+ },
141
+ dependencies: n,
129
142
  value: r(),
130
143
  disposed: !1,
131
144
  listeners: /* @__PURE__ */ new Set(),
132
145
  fn: r,
146
+ apply: a,
147
+ equals: i.equals ?? ((e, t) => e === t),
133
148
  subscribe(e) {
134
- return a.listeners.add(e), () => {
135
- a.listeners.delete(e);
149
+ return s.listeners.add(e), () => {
150
+ s.listeners.delete(e);
136
151
  };
137
152
  }
138
- }, o = n.map((e) => e.subscribe(() => {
139
- a.disposed || (this.#d(a), e.propagation === "sync" && this.flushNow());
140
- }));
141
- return this.#u(e, () => {
142
- a.disposed || (a.disposed = !0, o.forEach((e) => e()), a.listeners.clear(), this.#a.delete(a));
143
- }), se(a);
153
+ };
154
+ a?.(s.value);
155
+ let c = () => s.dependencies.map((e) => e.subscribe(() => {
156
+ s.disposed || (this.#x(s), e.propagation === "sync" && this.flushNow());
157
+ })), l = c(), u = () => {
158
+ s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
159
+ }, d = this.#g(e, u);
160
+ return Object.assign(C(s), {
161
+ dispose: u,
162
+ rebind: (e, n) => {
163
+ if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
164
+ let r = /* @__PURE__ */ new Set(), i = (e) => {
165
+ let n = e[x];
166
+ if (n === s) throw Error("Reactive dependency cycle: " + t);
167
+ if (!r.has(n)) {
168
+ r.add(n);
169
+ for (let e of n?.dependencies ?? []) i(e);
170
+ }
171
+ };
172
+ e.forEach(i), l.forEach((e) => e()), s.dependencies = e, s.fn = n, this.#n++, l = c(), this.#x(s), this.#p.clear();
173
+ for (let e of this.#d) this.#p.push(e, this.#C(e.rank));
174
+ this.#m.clear();
175
+ for (let e of this.#f) this.#m.push(e, this.#C(e.rank));
176
+ }
177
+ });
144
178
  }
145
179
  effect(e, t, n) {
146
- let r = t.reduce((e, t) => Math.max(e, le(t)), 0), i = {
180
+ let r = this.#b(() => t), i = {
147
181
  id: "n" + this.#e++,
148
- rank: r + 1,
182
+ get rank() {
183
+ return r();
184
+ },
149
185
  disposed: !1,
150
186
  fn: n
151
- }, a = () => {
152
- i.disposed || this.#f(i);
153
- }, o = t.map((e) => e.subscribe(a)), s = () => {
154
- i.disposed || (i.disposed = !0, o.forEach((e) => e()), this.#o.delete(i));
155
- };
156
- return this.#u(e, s), s;
187
+ }, a = t.map((e) => e.subscribe(() => {
188
+ i.disposed || (this.#S(i), e.propagation === "sync" && this.flushNow());
189
+ })), o = () => {
190
+ i.disposed || (i.disposed = !0, s(), a.forEach((e) => e()), this.#f.delete(i));
191
+ }, s = this.#g(e, o);
192
+ return o;
157
193
  }
158
194
  runInTransaction(e) {
159
- this.#n += 1;
195
+ this.#r += 1;
160
196
  try {
161
197
  return e();
162
198
  } finally {
163
- --this.#n, this.#n === 0 && this.#m();
199
+ --this.#r, this.#r === 0 && (this.#i ? (this.#i = !1, this.flushNow()) : this.#w());
164
200
  }
165
201
  }
166
- flushNow() {
167
- if (!(this.#n > 0 || this.#i)) {
168
- this.#r = !1, this.#i = !0;
169
- try {
170
- let e = !0;
171
- for (; e;) {
172
- for (e = !1; this.#s.length > 0;) {
173
- e = !0;
174
- let t = this.#s.pop();
175
- if (this.#a.delete(t), t.disposed) continue;
176
- let n = t.value, r = t.fn();
177
- r !== n && (t.value = r, ue(t.listeners));
202
+ flushNow({ afterTransaction: e = !1 } = {}) {
203
+ if (e && this.#r > 0 && (this.#i = !0), this.#s > 0) {
204
+ this.#c = !0;
205
+ return;
206
+ }
207
+ if (this.#r > 0 || this.#o) return;
208
+ this.#a = !1, this.#o = !0;
209
+ let t;
210
+ try {
211
+ for (; this.#p.length || this.#l.size || this.#m.length;) {
212
+ for (; this.#p.length;) {
213
+ let e = this.#p.pop();
214
+ if (this.#d.delete(e), e.disposed) continue;
215
+ this.#y(e, e.name);
216
+ let t, n;
217
+ try {
218
+ t = e.fn(), n = !e.equals(t, e.value), n && e.apply?.(t);
219
+ } catch (t) {
220
+ throw this.#x(e), t;
178
221
  }
179
- for (; this.#c.length > 0;) {
180
- e = !0;
181
- let t = this.#c.pop();
182
- this.#o.delete(t), !t.disposed && t.fn();
222
+ n && (e.value = t, this.#v(e.listeners));
223
+ }
224
+ if (this.#l.size) {
225
+ let e = Infinity, n;
226
+ for (let [t, { rank: r }] of this.#l) r < e && (n = t, e = r);
227
+ let r = /* @__PURE__ */ new Set();
228
+ for (;;) {
229
+ if (r.has(n)) throw Error("Cyclic streaming publication dependencies");
230
+ r.add(n);
231
+ let e;
232
+ for (let t of this.#l.get(n).prerequisites?.() ?? []) if (this.#l.has(t)) {
233
+ e = t;
234
+ break;
235
+ }
236
+ if (!e) break;
237
+ n = e;
183
238
  }
239
+ t = this.#l.get(n).onError, this.#l.delete(n), this.#y(n, "streaming update"), n(), t = void 0;
240
+ } else if (this.#m.length) {
241
+ let e = this.#m.pop();
242
+ this.#f.delete(e), e.disposed || (this.#y(e, "effect " + e.id), e.fn());
184
243
  }
185
- } finally {
186
- this.#i = !1, this.#g();
187
244
  }
245
+ } catch (e) {
246
+ let n = Array.from(this.#l.values());
247
+ this.#l.clear(), t?.(e);
248
+ for (let t of n) t.onError?.(e);
249
+ for (let t of this.#h) t.reject(e);
250
+ throw this.#h.clear(), e;
251
+ } finally {
252
+ this.#u.clear(), this.#o = !1, this.#E();
253
+ }
254
+ }
255
+ requestUpdate(e, t = 0, n, r) {
256
+ this.#l.set(e, {
257
+ rank: t,
258
+ onError: n,
259
+ prerequisites: r
260
+ }), this.#w();
261
+ }
262
+ cancelUpdate(e) {
263
+ this.#l.delete(e);
264
+ }
265
+ #v(e) {
266
+ this.#s++;
267
+ try {
268
+ ce(e);
269
+ } finally {
270
+ this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
188
271
  }
189
272
  }
273
+ #y(e, t) {
274
+ let n = (this.#u.get(e) ?? 0) + 1;
275
+ if (n > 100) throw Error("Reactive propagation did not settle: " + t);
276
+ this.#u.set(e, n);
277
+ }
190
278
  whenPropagated(e = {}) {
191
- if (this.#h()) return Promise.resolve();
279
+ if (this.#T()) return Promise.resolve();
192
280
  let { signal: t, timeoutMs: n } = e;
193
281
  return t?.aborted ? Promise.reject(/* @__PURE__ */ Error("whenPropagated aborted")) : new Promise((e, r) => {
194
- let i = {
195
- resolve: e,
196
- reject: r
197
- };
198
- t && (i.abortHandler = () => {
199
- this.#l.delete(i), r(/* @__PURE__ */ Error("whenPropagated aborted"));
200
- }, t.addEventListener("abort", i.abortHandler, { once: !0 })), n != null && (i.timeoutId = setTimeout(() => {
201
- this.#l.delete(i), i.abortHandler && t?.removeEventListener("abort", i.abortHandler), r(/* @__PURE__ */ Error("whenPropagated timeout after " + n + " ms"));
202
- }, n)), this.#l.add(i);
282
+ let i, a = () => {
283
+ this.#h.delete(o), t?.removeEventListener("abort", s), i !== void 0 && clearTimeout(i);
284
+ }, o = {
285
+ resolve: () => {
286
+ a(), e();
287
+ },
288
+ reject: (e) => {
289
+ a(), r(e);
290
+ }
291
+ }, s = () => o.reject(/* @__PURE__ */ Error("whenPropagated aborted"));
292
+ t?.addEventListener("abort", s, { once: !0 }), n != null && (i = setTimeout(() => o.reject(/* @__PURE__ */ Error("whenPropagated timeout after " + n + " ms")), n)), this.#h.add(o);
203
293
  });
204
294
  }
205
- #d(e) {
206
- this.#a.has(e) || (this.#a.add(e), this.#s.push(e, this.#p(e.rank)), this.#m());
295
+ #b(e) {
296
+ let t = -1, n = 0;
297
+ return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, se(t)), 0), t = this.#n), n);
298
+ }
299
+ #x(e) {
300
+ if (this.#d.has(e)) {
301
+ this.#w();
302
+ return;
303
+ }
304
+ this.#d.add(e), this.#p.push(e, this.#C(e.rank)), this.#w();
207
305
  }
208
- #f(e) {
209
- this.#o.has(e) || (this.#o.add(e), this.#c.push(e, this.#p(e.rank)), this.#m());
306
+ #S(e) {
307
+ if (this.#f.has(e)) {
308
+ this.#w();
309
+ return;
310
+ }
311
+ this.#f.add(e), this.#m.push(e, this.#C(e.rank)), this.#w();
210
312
  }
211
- #p(e) {
212
- let t = this.#t % ae;
213
- return this.#t += 1, e * ae + t;
313
+ #C(e) {
314
+ let t = this.#t % S;
315
+ return this.#t += 1, e * S + t;
214
316
  }
215
- #m() {
216
- this.#n > 0 || this.#r || this.#i || (this.#r = !0, queueMicrotask(() => {
217
- this.flushNow();
317
+ #w() {
318
+ this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
319
+ this.#a && this.flushNow();
218
320
  }));
219
321
  }
220
- #h() {
221
- return this.#n === 0 && !this.#r && !this.#i && this.#s.length === 0 && this.#c.length === 0 && this.#a.size === 0 && this.#o.size === 0;
322
+ #T() {
323
+ return this.#r === 0 && !this.#a && !this.#o && this.#p.length === 0 && this.#m.length === 0 && this.#d.size === 0 && this.#f.size === 0 && this.#l.size === 0;
222
324
  }
223
- #g() {
224
- if (this.#h()) {
225
- for (let e of this.#l) e.timeoutId && clearTimeout(e.timeoutId), e.resolve();
226
- this.#l.clear();
325
+ #E() {
326
+ if (this.#T()) {
327
+ for (let e of this.#h) e.resolve();
328
+ this.#h.clear();
227
329
  }
228
330
  }
229
- }, fe = class {
331
+ }, ue = class {
230
332
  #e = 1;
231
333
  #t = /* @__PURE__ */ new Map();
232
334
  createOwner(e, t) {
@@ -236,7 +338,9 @@ var de = class {
236
338
  addDisposer(e, t) {
237
339
  let n = this.#t.get(e);
238
340
  if (!n) throw Error("Unknown owner: " + e);
239
- n.add(t);
341
+ return n.add(t), () => {
342
+ n.delete(t);
343
+ };
240
344
  }
241
345
  disposeOwner(e) {
242
346
  let t = this.#t.get(e);
@@ -245,13 +349,14 @@ var de = class {
245
349
  t.clear(), this.#t.delete(e);
246
350
  }
247
351
  }
248
- }, pe = class {
352
+ }, de = class {
249
353
  #e = 1;
250
354
  #t = /* @__PURE__ */ new Map();
251
355
  createRootScope(e) {
252
356
  let t = "scope:" + this.#e++;
253
357
  return this.#t.set(t, {
254
358
  params: /* @__PURE__ */ new Map(),
359
+ initializers: /* @__PURE__ */ new Map(),
255
360
  ownerId: e
256
361
  }), t;
257
362
  }
@@ -261,6 +366,7 @@ var de = class {
261
366
  return this.#t.set(n, {
262
367
  parentScope: t,
263
368
  params: /* @__PURE__ */ new Map(),
369
+ initializers: /* @__PURE__ */ new Map(),
264
370
  ownerId: e
265
371
  }), n;
266
372
  }
@@ -272,36 +378,57 @@ var de = class {
272
378
  clearScope(e) {
273
379
  let t = this.#t.get(e);
274
380
  if (!t) throw Error("Unknown scope: " + e);
275
- t.params.clear();
276
- }
277
- register(e, t, n) {
278
- c(t);
279
- let r = this.#t.get(e);
280
- if (!r) throw Error("Unknown scope: " + e);
281
- if (r.params.has(t)) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
282
- return r.params.set(t, n), n;
381
+ t.params.clear(), t.initializers.clear();
382
+ }
383
+ registerInitializer(e, n, r) {
384
+ t(n);
385
+ let i = this.#t.get(e);
386
+ if (!i) throw Error("Unknown scope: " + e);
387
+ if (i.params.has(n) || i.initializers.has(n)) throw Error(`Parameter "${n}" already exists in scope ${e}`);
388
+ i.initializers.set(n, {
389
+ initialize: r,
390
+ initializing: !1
391
+ });
283
392
  }
284
- resolve(e, t) {
285
- c(t);
286
- let n = e;
287
- for (; n;) {
288
- let e = this.#t.get(n);
289
- if (!e) throw Error("Unknown scope: " + n);
290
- let r = e.params.get(t);
291
- if (r) return r;
292
- n = e.parentScope;
393
+ register(e, n, r) {
394
+ t(n);
395
+ let i = this.#t.get(e);
396
+ if (!i) throw Error("Unknown scope: " + e);
397
+ if (i.params.has(n) || i.initializers.get(n)?.initializing === !1) throw Error("Parameter \"" + n + "\" already exists in scope " + e);
398
+ return i.params.set(n, r), r;
399
+ }
400
+ resolve(e, n) {
401
+ t(n);
402
+ let r = e;
403
+ for (; r;) {
404
+ let e = this.#t.get(r);
405
+ if (!e) throw Error("Unknown scope: " + r);
406
+ let t = e.initializers.get(n);
407
+ if (t) {
408
+ if (t.initializing) throw Error(`Parameter dependency cycle while initializing "${n}" in ${r}.`);
409
+ t.initializing = !0;
410
+ try {
411
+ if (t.initialize(), !e.params.has(n)) throw Error(`Initializer did not register parameter "${n}".`);
412
+ e.initializers.delete(n);
413
+ } finally {
414
+ t.initializing = !1;
415
+ }
416
+ }
417
+ let i = e.params.get(n);
418
+ if (i) return i;
419
+ r = e.parentScope;
293
420
  }
294
421
  }
295
422
  };
296
423
  //#endregion
297
424
  //#region ../core/src/paramRuntime/expressionCompiler.js
298
- function me(e, t = {}, n = {}) {
425
+ function fe(e, t = {}, n = {}) {
299
426
  return r(e, t, n);
300
427
  }
301
428
  //#endregion
302
429
  //#region ../core/src/paramRuntime/expressionRef.js
303
- function he(e, t, n = {}) {
304
- let r = {}, i = me(e, r, n), a = /* @__PURE__ */ new Map();
430
+ function pe(e, t, n = {}) {
431
+ let r = {}, i = fe(e, r, n), a = /* @__PURE__ */ new Map();
305
432
  for (let n of i.globals) {
306
433
  if (a.has(n)) continue;
307
434
  let i = t(n);
@@ -325,17 +452,17 @@ function he(e, t, n = {}) {
325
452
  }, i.invalidate = () => {
326
453
  for (let e of o) e();
327
454
  o.clear();
328
- }, i.identifier = () => i.code + "|" + Array.from(a.values()).map((e) => e.id).concat((i.scaleDependencies ?? []).map((e) => e.id)).join(","), {
455
+ }, 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 ?? []), {
329
456
  expression: i,
330
- dependencies: Array.from(a.values()).concat(i.scaleDependencies ?? [])
457
+ dependencies: i.dependencies
331
458
  };
332
459
  }
333
460
  //#endregion
334
461
  //#region ../core/src/paramRuntime/paramRuntime.js
335
- var ge = class {
336
- #e = new fe();
337
- #t = new de({ lifecycleRegistry: this.#e });
338
- #n = new pe();
462
+ var me = class {
463
+ #e = new ue();
464
+ #t = new le({ lifecycleRegistry: this.#e });
465
+ #n = new de();
339
466
  createScope(e) {
340
467
  let t = this.#e.createOwner("scope", e ?? "root");
341
468
  return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
@@ -348,6 +475,9 @@ var ge = class {
348
475
  let n = this.#n.getOwnerId(e);
349
476
  this.#e.addDisposer(n, t);
350
477
  }
478
+ registerInitializer(e, t, n) {
479
+ this.#n.registerInitializer(e, t, n);
480
+ }
351
481
  registerBase(e, t, n, r) {
352
482
  let i = this.#n.getOwnerId(e), a = this.#t.createWritable(i, t, "base", n, r);
353
483
  return this.#n.register(e, t, a);
@@ -357,30 +487,48 @@ var ge = class {
357
487
  return this.#n.register(e, t, a);
358
488
  }
359
489
  registerDerived(e, t, n, r) {
360
- let { expression: i, dependencies: a } = he(n, (t) => this.resolve(e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
490
+ let { expression: i, dependencies: a } = pe(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
361
491
  return this.#n.register(e, t, s);
362
492
  }
363
493
  createExpression(e, t, n) {
364
- let { expression: r } = he(t, (t) => this.resolve(e, t), n);
494
+ let { expression: r } = pe(t, (t) => this.resolve(e, t), n);
365
495
  return r;
366
496
  }
367
497
  resolve(e, t) {
368
498
  return this.#n.resolve(e, t);
369
499
  }
500
+ signal(e, t, n) {
501
+ return this.#t.createWritable(this.#n.getOwnerId(e), t, "base", n);
502
+ }
503
+ computed(e, t, n, r, i) {
504
+ return this.#t.computed(this.#n.getOwnerId(e), t, n, r, i);
505
+ }
506
+ operation(e, t, n, r, i, a) {
507
+ return this.#t.operation(this.#n.getOwnerId(e), t, n, r, i, a);
508
+ }
509
+ effect(e, t, n) {
510
+ return this.#t.effect(this.#n.getOwnerId(e), t, n);
511
+ }
512
+ requestUpdate(e, t = 0, n, r) {
513
+ this.#t.requestUpdate(e, t, n, r);
514
+ }
515
+ cancelUpdate(e) {
516
+ this.#t.cancelUpdate(e);
517
+ }
370
518
  runInTransaction(e) {
371
519
  return this.#t.runInTransaction(e);
372
520
  }
373
- flushNow() {
374
- this.#t.flushNow();
521
+ flushNow(e) {
522
+ this.#t.flushNow(e);
375
523
  }
376
524
  whenPropagated(e) {
377
525
  return this.#t.whenPropagated(e);
378
526
  }
379
- }, _e = (e) => new Promise((t) => setTimeout(t, e));
380
- function ve() {
527
+ }, he = (e) => new Promise((t) => setTimeout(t, e));
528
+ function ge() {
381
529
  return { canceled: !1 };
382
530
  }
383
- function ye(e) {
531
+ function _e(e) {
384
532
  let t = e.requestAnimationFrame || window.requestAnimationFrame, n = e.signal, r = e.cancelToken, i = () => new Promise((i, a) => {
385
533
  if (r?.canceled) return i();
386
534
  if (n?.aborted) return a("aborted");
@@ -393,11 +541,11 @@ function ye(e) {
393
541
  };
394
542
  t(m);
395
543
  });
396
- return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : _e(e.delay).then(i) : i();
544
+ return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : he(e.delay).then(i) : i();
397
545
  }
398
546
  //#endregion
399
547
  //#region ../core/src/utils/animator.js
400
- var be = class {
548
+ var ve = class {
401
549
  constructor(e) {
402
550
  this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
403
551
  }
@@ -423,13 +571,13 @@ var be = class {
423
571
  this._finalized = !0, this._renderRequested = !1, this.transitions = [], this._animationFrameRequest !== void 0 && (window.cancelAnimationFrame(this._animationFrameRequest), this._animationFrameRequest = void 0);
424
572
  }
425
573
  transition(e) {
426
- return ye({
574
+ return _e({
427
575
  requestAnimationFrame: (e) => this.requestTransition(e),
428
576
  ...e
429
577
  });
430
578
  }
431
579
  };
432
- function xe(e, t, n, r, i) {
580
+ function w(e, t, n, r, i) {
433
581
  let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
434
582
  function u(e, t, n, r) {
435
583
  return t + (e - t) * 2 ** (-n / r);
@@ -448,7 +596,7 @@ function xe(e, t, n, r, i) {
448
596
  s || (s = !0, e.requestTransition(d));
449
597
  }
450
598
  function p(n) {
451
- l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = Se(), d(a));
599
+ l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = ye(), d(a));
452
600
  }
453
601
  return p.stop = () => {
454
602
  o = !0, s = !1, e.cancelTransition(d);
@@ -456,13 +604,13 @@ function xe(e, t, n, r, i) {
456
604
  l = e, c = e, p.stop(), t(c);
457
605
  }, p;
458
606
  }
459
- function Se() {
607
+ function ye() {
460
608
  let e = globalThis.document?.timeline?.currentTime;
461
609
  return typeof e == "number" ? e : performance.now();
462
610
  }
463
611
  //#endregion
464
612
  //#region ../core/src/paramRuntime/viewParamRuntime.js
465
- var S = class {
613
+ var be = class {
466
614
  #e;
467
615
  #t;
468
616
  #n = /* @__PURE__ */ new Map();
@@ -477,13 +625,37 @@ var S = class {
477
625
  constructor(e, t, n, r = {}) {
478
626
  this.#o = e ?? (() => void 0), this.#s = t ?? (() => void 0), this.#c = n, this.#l = r.snapTransitionedUpdates ?? !1;
479
627
  let i = this.#o();
480
- i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new ge(), this.#t = this.#e.createScope());
628
+ i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new me(), this.#t = this.#e.createScope());
629
+ }
630
+ registerParam(e, n = {}) {
631
+ let r = e.name;
632
+ if (t(r), this.#i.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
633
+ if (Se(e), n.defer) {
634
+ if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
635
+ return this.#e.registerInitializer(this.#t, r, () => {
636
+ this.#d(e);
637
+ }), this.#i.set(r, e), () => {
638
+ throw Error("Cannot set derived parameter \"" + r + "\".");
639
+ };
640
+ }
641
+ return this.#d(e);
642
+ }
643
+ registerScopedExpression(e, t, n) {
644
+ if (this.#e !== n.#e) throw Error("Scoped expressions must share a parameter runtime.");
645
+ if (this.#i.has(e)) throw Error("Parameter \"" + e + "\" already registered in this scope.");
646
+ this.#e.registerInitializer(this.#t, e, () => {
647
+ let r = this.#e.registerDerived(this.#t, e, t, {
648
+ expressionScope: n.#t,
649
+ resolveScaleResolution: n.#s
650
+ });
651
+ this.#r.set(e, r);
652
+ }), this.#i.set(e, {
653
+ name: e,
654
+ expr: t
655
+ });
481
656
  }
482
- registerParam(e) {
483
- let t = e.name;
484
- if (c(t), this.#i.has(t)) throw Error("Parameter \"" + t + "\" already registered in this scope.");
485
- we(e);
486
- let n, r;
657
+ #d(e) {
658
+ let t = e.name, n, r;
487
659
  if (e.push == "outer") {
488
660
  let i = this.findRuntimeForParam(t);
489
661
  if (!i) throw Error(`Parameter "${t}" not found in outer scope!`);
@@ -492,10 +664,10 @@ var S = class {
492
664
  if ("expr" in a || "select" in a || "ruler" in a) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
493
665
  n = (e) => {
494
666
  i.setValue(t, e);
495
- }, this.#n.set(t, n), "ruler" in e && (r = u(e, this), n(r));
496
- } else if ("value" in e) r = u(e, this), n = "transition" in e ? this.#f(t, r, e.transition) : this.#d(t, r);
667
+ }, this.#n.set(t, n), "ruler" in e && (r = h(e, this), n(r));
668
+ } else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#p(t, r, e.transition) : this.#f(t, r);
497
669
  else if ("expr" in e) {
498
- if ("transition" in e) this.#p(t, e.expr, e.transition);
670
+ if ("transition" in e) this.#m(t, e.expr, e.transition);
499
671
  else {
500
672
  let n = this.#e.registerDerived(this.#t, t, e.expr, { resolveScaleResolution: this.#s });
501
673
  this.#r.set(t, n);
@@ -503,9 +675,9 @@ var S = class {
503
675
  n = () => {
504
676
  throw Error("Cannot set derived parameter \"" + t + "\".");
505
677
  };
506
- } else r = u(e, this), n = this.#d(t, r);
678
+ } else r = h(e, this), n = this.#f(t, r);
507
679
  if ("select" in e) {
508
- if (r ??= u(e, this), !this.#n.has(t)) {
680
+ if (r ??= h(e, this), !this.#n.has(t)) {
509
681
  let e = this.#e.registerSelection(this.#t, t, r);
510
682
  this.#r.set(t, e), this.#n.set(t, (t) => {
511
683
  e.set(t), this.#e.flushNow();
@@ -515,34 +687,34 @@ var S = class {
515
687
  }
516
688
  return this.#i.set(t, e), n;
517
689
  }
518
- allocateSetter(e, t, n = !1) {
519
- if (c(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
520
- let r = this.#e.registerBase(this.#t, e, t, { notify: !n });
521
- this.#r.set(e, r);
522
- let i = (e) => {
523
- r.set(e), this.#e.flushNow();
690
+ allocateSetter(e, n, r = !1) {
691
+ if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
692
+ let i = this.#e.registerBase(this.#t, e, n, { notify: !r });
693
+ this.#r.set(e, i);
694
+ let a = (e) => {
695
+ i.set(e), this.#e.flushNow();
524
696
  };
525
- return this.#n.set(e, i), i;
697
+ return this.#n.set(e, a), a;
526
698
  }
527
- setValue(e, t, n) {
528
- c(e);
529
- let r = this.#n.get(e);
530
- if (!r) throw Error("Writable parameter not found in this scope: " + e);
531
- r(t, n);
699
+ setValue(e, n, r) {
700
+ t(e);
701
+ let i = this.#n.get(e);
702
+ if (!i) throw Error("Writable parameter not found in this scope: " + e);
703
+ i(n, r);
532
704
  }
533
705
  getValue(e) {
534
- return this.#r.get(e)?.get();
706
+ return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
535
707
  }
536
708
  getTargetValue(e) {
537
- return c(e), this.#a.get(e)?.target ?? this.getValue(e);
709
+ return t(e), this.#a.get(e)?.target ?? this.getValue(e);
538
710
  }
539
- subscribe(e, t) {
540
- c(e);
541
- let n = this.findRuntimeForParam(e);
542
- if (!n) throw Error("Parameter not found: " + e);
543
- let r = n.#r.get(e);
544
- if (!r) throw Error("Parameter found without local reference: " + e);
545
- return r.subscribe(t);
711
+ subscribe(e, n) {
712
+ t(e);
713
+ let r = this.findRuntimeForParam(e);
714
+ if (!r) throw Error("Parameter not found: " + e);
715
+ let i = r.#e.resolve(r.#t, e);
716
+ if (!i) throw Error("Parameter found without local reference: " + e);
717
+ return i.subscribe(n);
546
718
  }
547
719
  findValue(e) {
548
720
  return this.findRuntimeForParam(e)?.getValue(e);
@@ -554,13 +726,19 @@ var S = class {
554
726
  return this.#i;
555
727
  }
556
728
  hasLocalParam(e) {
557
- return c(e), this.#r.has(e);
729
+ t(e);
730
+ let n = this.#i.get(e);
731
+ return this.#r.has(e) || n !== void 0 && "expr" in n;
732
+ }
733
+ isPendingParam(e) {
734
+ let t = this.findRuntimeForParam(e);
735
+ return t !== void 0 && !t.#r.has(e);
558
736
  }
559
737
  hasConfiguredParamInScopeChain(e) {
560
- return c(e), this.#i.has(e) ? !0 : this.#o()?.hasConfiguredParamInScopeChain(e) ?? !1;
738
+ return t(e), this.#i.has(e) ? !0 : this.#o()?.hasConfiguredParamInScopeChain(e) ?? !1;
561
739
  }
562
740
  findRuntimeForParam(e) {
563
- return this.#r.has(e) ? this : this.#o()?.findRuntimeForParam(e);
741
+ return this.hasLocalParam(e) ? this : this.#o()?.findRuntimeForParam(e);
564
742
  }
565
743
  getDebugState() {
566
744
  let e = [];
@@ -568,7 +746,7 @@ var S = class {
568
746
  let r = this.#i.get(t);
569
747
  e.push({
570
748
  name: t,
571
- kind: Ce(r),
749
+ kind: xe(r),
572
750
  value: n.get(),
573
751
  writable: this.#n.has(t),
574
752
  configured: !!r,
@@ -589,7 +767,28 @@ var S = class {
589
767
  let r = this.createExpression(e), i = r.subscribe(t);
590
768
  return (n.scopeOwned ?? !0) && this.#e.addScopeDisposer(this.#t, i), n.registerDisposer?.(i), r;
591
769
  }
592
- #d(e, t) {
770
+ signal(e, t) {
771
+ return this.#e.signal(this.#t, e, t);
772
+ }
773
+ computed(e, t, n, r) {
774
+ return this.#e.computed(this.#t, e, t, n, r);
775
+ }
776
+ operation(e, t, n, r, i) {
777
+ return this.#e.operation(this.#t, e, t, n, r, i);
778
+ }
779
+ effect(e, t) {
780
+ return this.#e.effect(this.#t, e, t);
781
+ }
782
+ get updateScheduler() {
783
+ return this.#e;
784
+ }
785
+ requestUpdate(e, t = 0, n, r) {
786
+ this.#e.requestUpdate(e, t, n, r);
787
+ }
788
+ cancelUpdate(e) {
789
+ this.#e.cancelUpdate(e);
790
+ }
791
+ #f(e, t) {
593
792
  let n = this.#e.registerBase(this.#t, e, t);
594
793
  this.#r.set(e, n);
595
794
  let r = (e) => {
@@ -597,24 +796,24 @@ var S = class {
597
796
  };
598
797
  return this.#n.set(e, r), r;
599
798
  }
600
- #f(e, t, n) {
601
- let r = this.#m(e, t, n), i = (t, n) => {
602
- this.#h(e, r, t, n);
799
+ #p(e, t, n) {
800
+ let r = this.#h(e, t, n), i = (t, n) => {
801
+ this.#g(e, r, t, n);
603
802
  };
604
803
  return this.#n.set(e, i), i;
605
804
  }
606
- #p(e, t, n) {
607
- let r = this.createExpression(t), i = this.#m(e, r(null), n), a = r.subscribe(() => {
608
- this.#h(e, i, r(null), { animate: !this.#l });
805
+ #m(e, t, n) {
806
+ let r = this.createExpression(t), i = this.#h(e, r(null), n), a = r.subscribe(() => {
807
+ this.#g(e, i, r(null), { animate: !this.#l });
609
808
  });
610
809
  this.#e.addScopeDisposer(this.#t, a);
611
810
  }
612
- #m(e, t, n) {
613
- let r = C(e, t), i = this.#e.registerBase(this.#t, e, r);
811
+ #h(e, t, n) {
812
+ let r = Ce(e, t), i = this.#e.registerBase(this.#t, e, r);
614
813
  this.#r.set(e, i);
615
814
  let a = this.#c;
616
815
  if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
617
- let o = xe(a, ({ value: e }) => {
816
+ let o = w(a, ({ value: e }) => {
618
817
  i.set(e), this.#e.flushNow();
619
818
  }, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
620
819
  target: i.get(),
@@ -625,8 +824,8 @@ var S = class {
625
824
  };
626
825
  return this.#a.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
627
826
  }
628
- #h(e, t, n, r = {}) {
629
- let i = C(e, n);
827
+ #g(e, t, n, r = {}) {
828
+ let i = Ce(e, n);
630
829
  t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
631
830
  }
632
831
  evaluateAndGet(e) {
@@ -635,8 +834,8 @@ var S = class {
635
834
  runInTransaction(e) {
636
835
  return this.#e.runInTransaction(e);
637
836
  }
638
- flushNow() {
639
- this.#e.flushNow();
837
+ flushNow(e) {
838
+ this.#e.flushNow(e);
640
839
  }
641
840
  whenPropagated(e) {
642
841
  return this.#e.whenPropagated(e);
@@ -648,19 +847,19 @@ var S = class {
648
847
  this.#u || (this.#u = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear());
649
848
  }
650
849
  hasPointSelections() {
651
- for (let e of this.#i.values()) if (s(e)) {
850
+ for (let e of this.#i.values()) if (i(e)) {
652
851
  let t = e.select;
653
- if (a(t)) {
852
+ if (o(t)) {
654
853
  if (t == "point") return !0;
655
854
  } else if (t.type == "point") return !0;
656
855
  }
657
856
  return !1;
658
857
  }
659
858
  };
660
- function Ce(e) {
859
+ function xe(e) {
661
860
  return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
662
861
  }
663
- function we(e) {
862
+ function Se(e) {
664
863
  let t = e.name;
665
864
  if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
666
865
  if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
@@ -673,13 +872,13 @@ function we(e) {
673
872
  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.`);
674
873
  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.`);
675
874
  }
676
- function C(e, t) {
875
+ function Ce(e, t) {
677
876
  if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
678
877
  return t;
679
878
  }
680
879
  //#endregion
681
880
  //#region ../core/src/view/layout/flexLayout.js
682
- function Te(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
881
+ function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
683
882
  n ||= 0, i ||= 0;
684
883
  let o = Ne(e, t, n), s = 0, c = 0;
685
884
  for (let t = 0; t < e.length; t++) s += o[t], D(e[t]) || c++;
@@ -712,12 +911,12 @@ function Te(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
712
911
  }
713
912
  return m += a ? n : -n, p(!1), f;
714
913
  }
715
- function Ee(e, { spacing: t } = { spacing: 0 }) {
914
+ function Te(e, { spacing: t } = { spacing: 0 }) {
716
915
  let n = 0;
717
916
  for (let r of e) n += A(r) + (D(r) ? 0 : t);
718
917
  return Math.max(0, n - t);
719
918
  }
720
- function De(e, t, { spacing: n = 0 } = {}) {
919
+ function Ee(e, t, { spacing: n = 0 } = {}) {
721
920
  let r = [], i = [], a = 0, o = 0;
722
921
  for (let [s, c] of e.entries()) {
723
922
  let e = A(c), l = !D(c), u = o && l ? n : 0;
@@ -725,21 +924,21 @@ function De(e, t, { spacing: n = 0 } = {}) {
725
924
  }
726
925
  return i.length && r.push(i), r;
727
926
  }
728
- function Oe(e) {
927
+ function De(e) {
729
928
  let t = 0, n = 0, r = 0, i, a = !0;
730
929
  for (let o of e) {
731
930
  t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, A(o));
732
931
  let e = j(o);
733
932
  e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
734
933
  }
735
- return M({
934
+ return N({
736
935
  px: t,
737
936
  grow: n,
738
937
  minPx: r,
739
938
  maxPx: a ? i : void 0
740
939
  });
741
940
  }
742
- function ke(e) {
941
+ function Oe(e) {
743
942
  let t = {
744
943
  px: 0,
745
944
  grow: 0,
@@ -751,9 +950,9 @@ function ke(e) {
751
950
  let e = j(r);
752
951
  e === void 0 ? n = !1 : t.maxPx += e;
753
952
  }
754
- return n || delete t.maxPx, M(t);
953
+ return n || delete t.maxPx, N(t);
755
954
  }
756
- var w = class e {
955
+ var T = class e {
757
956
  constructor(e, t) {
758
957
  this.width = e, this.height = t;
759
958
  }
@@ -764,15 +963,15 @@ var w = class e {
764
963
  return this.#e(-e.width, -e.height);
765
964
  }
766
965
  #e(t, n) {
767
- return new e(Le(this.width, t), Le(this.height, n));
966
+ return new e(M(this.width, t), M(this.height, n));
768
967
  }
769
968
  isGrowing() {
770
969
  return !!(this.width.grow || this.height.grow);
771
970
  }
772
- }, T = Object.freeze({
971
+ }, E = Object.freeze({
773
972
  px: 0,
774
973
  grow: 0
775
- }), E = new w(T, T);
974
+ }), ke = new T(E, E);
776
975
  function D(e) {
777
976
  return !e.px && !e.grow && !e.minPx;
778
977
  }
@@ -783,12 +982,12 @@ function O(e) {
783
982
  return e || 0;
784
983
  }
785
984
  function je(e) {
786
- return e && (l(e.px) || l(e.grow) || l(e.minPx) || l(e.maxPx));
985
+ return e && (n(e.px) || n(e.grow) || n(e.minPx) || n(e.maxPx));
787
986
  }
788
987
  function Me(e) {
789
- if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
790
- if (je(e)) return Fe(e), M(e);
791
- if (l(e)) return {
988
+ if (J(e)) throw Error("parseSizeDef does not accept step-based sizes.");
989
+ if (je(e)) return Fe(e), N(e);
990
+ if (n(e)) return {
792
991
  px: e,
793
992
  grow: 0
794
993
  };
@@ -857,21 +1056,21 @@ function j(e) {
857
1056
  function Ie(e) {
858
1057
  return e.minPx !== void 0 || e.maxPx !== void 0;
859
1058
  }
860
- function Le(e, t) {
861
- return M({
1059
+ function M(e, t) {
1060
+ return N({
862
1061
  px: (e.px ?? 0) + t,
863
1062
  grow: e.grow,
864
1063
  minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
865
1064
  maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
866
1065
  });
867
1066
  }
868
- function M(e) {
1067
+ function N(e) {
869
1068
  let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = Ie(e);
870
1069
  return e.px ? t.px = e.px : e.px === 0 && (t.px = 0), e.grow ? t.grow = e.grow : e.grow === 0 ? t.grow = 0 : !n && !r && i && (t.grow = 1), e.minPx && e.minPx > O(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (O(t.grow) || e.maxPx < O(e.px)) && (t.maxPx = e.maxPx), t;
871
1070
  }
872
1071
  //#endregion
873
1072
  //#region ../core/src/view/layout/padding.js
874
- var N = class e {
1073
+ var P = class e {
875
1074
  constructor(e, t, n, r) {
876
1075
  this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
877
1076
  }
@@ -906,35 +1105,35 @@ var N = class e {
906
1105
  return this.top + this.bottom;
907
1106
  }
908
1107
  static createFromConfig(e) {
909
- return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : P;
1108
+ return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : F;
910
1109
  }
911
1110
  static createFromRecord(t) {
912
1111
  return new e(t.top, t.right, t.bottom, t.left);
913
1112
  }
914
1113
  static zero() {
915
- return P;
1114
+ return F;
916
1115
  }
917
1116
  static createUniformPadding(t) {
918
1117
  return new e(t, t, t, t);
919
1118
  }
920
1119
  };
921
- function Re(e, t) {
922
- return t ? new N(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;
1120
+ function Le(e, t) {
1121
+ return t ? new P(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;
923
1122
  }
924
- var P = N.createUniformPadding(0);
925
- Object.freeze(P);
1123
+ var F = P.createUniformPadding(0);
1124
+ Object.freeze(F);
926
1125
  //#endregion
927
1126
  //#region ../core/src/utils/url.js
928
- var ze = /^([A-Za-z]+:)?\/\//;
929
- function F(e, t) {
930
- if (t && ze.test(t)) return t;
1127
+ var Re = /^([A-Za-z]+:)?\/\//;
1128
+ function I(e, t) {
1129
+ if (t && Re.test(t)) return t;
931
1130
  let n = typeof e == "function" ? e() : e;
932
1131
  if (!n) return t;
933
1132
  if (!t) return n;
934
1133
  if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
935
- return I(n) + t;
1134
+ return Be(n) + t;
936
1135
  }
937
- function Be(e, t, n = Ve()) {
1136
+ function ze(e, t, n = Ve()) {
938
1137
  let r = typeof e == "function" ? e() : e;
939
1138
  if (!t) return r;
940
1139
  try {
@@ -943,9 +1142,9 @@ function Be(e, t, n = Ve()) {
943
1142
  return new URL(t, e).href;
944
1143
  } else if (n) return new URL(t, n).href;
945
1144
  } catch {}
946
- return F(r, t);
1145
+ return I(r, t);
947
1146
  }
948
- function I(e) {
1147
+ function Be(e) {
949
1148
  let t = e.replace(/[^/]*$/, "");
950
1149
  return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
951
1150
  }
@@ -966,7 +1165,7 @@ function Ue(e) {
966
1165
  //#endregion
967
1166
  //#region ../core/src/config/mergeConfig.js
968
1167
  function L(e) {
969
- return i(e) && !Array.isArray(e);
1168
+ return a(e) && !Array.isArray(e);
970
1169
  }
971
1170
  function We(e) {
972
1171
  let t = {};
@@ -1012,16 +1211,16 @@ function U(e) {
1012
1211
  }
1013
1212
  //#endregion
1014
1213
  //#region ../core/src/view/postScaleParams.js
1015
- var qe = /* @__PURE__ */ new WeakMap();
1016
- function Je(e, t) {
1017
- qe.set(e, t);
1214
+ var W = /* @__PURE__ */ new WeakMap();
1215
+ function qe(e, t) {
1216
+ W.set(e, t);
1018
1217
  }
1019
- function Ye(e) {
1020
- return qe.get(e);
1218
+ function Je(e) {
1219
+ return W.get(e);
1021
1220
  }
1022
1221
  //#endregion
1023
1222
  //#region ../core/src/data/namedDataScope.js
1024
- var Xe = class {
1223
+ var Ye = class {
1025
1224
  name;
1026
1225
  owner;
1027
1226
  getDefaultData;
@@ -1059,13 +1258,13 @@ var Xe = class {
1059
1258
  dispose() {
1060
1259
  this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
1061
1260
  }
1062
- }, Ze = class {
1261
+ }, Xe = class {
1063
1262
  view;
1064
1263
  #e = /* @__PURE__ */ new Map();
1065
1264
  #t = /* @__PURE__ */ new Map();
1066
1265
  constructor(e) {
1067
1266
  this.view = e;
1068
- for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Xe(t, e, () => n));
1267
+ for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Ye(t, e, () => n));
1069
1268
  }
1070
1269
  getLocalBinding(e) {
1071
1270
  return this.#e.get(e);
@@ -1079,7 +1278,7 @@ var Xe = class {
1079
1278
  let n = this.view.dataParent?.namedDataScope;
1080
1279
  if (n) return n.resolve(e);
1081
1280
  let r = this.#t.get(e);
1082
- return r || (r = new Xe(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1281
+ return r || (r = new Ye(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1083
1282
  }
1084
1283
  dispose() {
1085
1284
  for (let e of this.#e.values()) e.dispose();
@@ -1087,7 +1286,7 @@ var Xe = class {
1087
1286
  for (let e of this.#t.values()) e.dispose();
1088
1287
  this.#t.clear();
1089
1288
  }
1090
- }, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, Qe = class {
1289
+ }, G = "VISIT_SKIP", K = "VISIT_STOP", q = (e) => e, Ze = class {
1091
1290
  spec;
1092
1291
  namedDataScope;
1093
1292
  #e;
@@ -1102,38 +1301,37 @@ var Xe = class {
1102
1301
  #l = void 0;
1103
1302
  #u = !1;
1104
1303
  #d = [];
1105
- opacityFunction = K;
1304
+ opacityFunction = q;
1106
1305
  #f = [];
1107
1306
  #p = "none";
1108
1307
  #m = /* @__PURE__ */ new Map();
1109
- facetCoords = new ne([], JSON.stringify);
1110
- constructor(t, n, r, i, a, o = {}) {
1111
- if (!t) throw Error("View spec must be defined!");
1112
- if (this.context = n, this.layoutParent = r, this.dataParent = i, this.#t = a, this.spec = t, this.namedDataScope = new Ze(this), i && t.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1113
- let s = i ? i.getConfigScopes() : [n.getBaseConfig()], c = t.config;
1114
- if (this.#e = [...s, c].filter((e) => !!e), this.resolutions = {
1308
+ facetCoords = new te([], JSON.stringify);
1309
+ constructor(e, t, n, r, i, a = {}) {
1310
+ if (!e) throw Error("View spec must be defined!");
1311
+ if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Xe(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1312
+ let o = r ? r.getConfigScopes() : [t.getBaseConfig()], s = e.config;
1313
+ this.#e = [...o, s].filter((e) => !!e), this.resolutions = {
1115
1314
  scale: {},
1116
1315
  axis: {},
1117
1316
  legend: {}
1118
1317
  }, ie(this), this.options = {
1119
1318
  inheritEncoding: !1,
1120
1319
  layoutSizeParams: "own",
1121
- ...o
1320
+ ...a
1122
1321
  }, this.flowHandle = void 0, this.needsAxes = {
1123
1322
  x: !1,
1124
1323
  y: !1
1125
- }, this.paramRuntime = new S(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), n.animator, { snapTransitionedUpdates: !0 }), t.params) {
1126
- let n = /* @__PURE__ */ new Set();
1127
- for (let r of t.params) {
1128
- if ("expr" in r) {
1129
- let { usesScaleHelper: t, globals: i } = e(r.expr), a = i.some((e) => n.has(e));
1130
- if (t || a) {
1131
- n.add(r.name), this.#d.push(r);
1132
- continue;
1133
- }
1324
+ }, this.paramRuntime = new be(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { snapTransitionedUpdates: !0 });
1325
+ let c = [...e.params ?? [], ...Je(e) ?? []];
1326
+ for (let e of c) {
1327
+ if ("expr" in e) {
1328
+ let { usesScaleHelper: t, globals: n } = p(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1329
+ if (t || r) {
1330
+ this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
1331
+ continue;
1134
1332
  }
1135
- this.paramRuntime.registerParam(r);
1136
1333
  }
1334
+ this.paramRuntime.registerParam(e);
1137
1335
  }
1138
1336
  this.options.layoutSizeParams !== "inherit" && (this.#a = this.#h("width"), this.#o = this.#h("height"));
1139
1337
  }
@@ -1160,11 +1358,11 @@ var Xe = class {
1160
1358
  }
1161
1359
  getCursor() {
1162
1360
  let e = this.getCursorSpec();
1163
- return h(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1361
+ return u(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1164
1362
  }
1165
1363
  watchCursor(e, t) {
1166
1364
  let n = this.getCursorSpec();
1167
- h(n) && this.paramRuntime.watchExpression(n.expr, e, {
1365
+ u(n) && this.paramRuntime.watchExpression(n.expr, e, {
1168
1366
  scopeOwned: !1,
1169
1367
  registerDisposer: t
1170
1368
  });
@@ -1176,53 +1374,53 @@ var Xe = class {
1176
1374
  return this.facetCoords.values().next().value;
1177
1375
  }
1178
1376
  getPadding() {
1179
- return this._cache("size/padding", () => N.createFromConfig(this.spec.padding));
1377
+ return this._cache("size/padding", () => P.createFromConfig(this.spec.padding));
1180
1378
  }
1181
1379
  getOverhang() {
1182
- return N.zero();
1380
+ return P.zero();
1183
1381
  }
1184
1382
  isScrollable() {
1185
1383
  return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
1186
1384
  }
1187
1385
  getSize() {
1188
- return this._cache("size/size", () => this.isConfiguredVisible() ? new w(this.#g("width"), this.#g("height")) : E);
1386
+ return this._cache("size/size", () => this.isConfiguredVisible() ? new T(this.#g("width"), this.#g("height")) : ke);
1189
1387
  }
1190
1388
  getViewportSize() {
1191
1389
  if (!this.isScrollable()) return this.getSize();
1192
- if (!this.isConfiguredVisible()) return E;
1390
+ if (!this.isConfiguredVisible()) return ke;
1193
1391
  let e = this.getSize();
1194
- return new w(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1392
+ return new T(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1195
1393
  }
1196
1394
  #g(e) {
1197
- let { value: t, implicit: r } = this.#_(e), i = this.resolveSizeValue(e, t), a = q(i), o = e == "viewportWidth" || e == "viewportHeight";
1198
- if (a) {
1199
- if (o) throw new y(`Cannot use step-based size with "${e}"!`, this);
1200
- let t = this.#x(e, i), a = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1201
- if (a) {
1202
- let r;
1203
- if (_(a.type)) r = a.domain().length;
1204
- else if (["locus", "index"].includes(a.type)) {
1205
- let e = a.domain();
1206
- r = n(e) - e[0];
1207
- } else throw new y(`Cannot use step-based size with "${a.type}" scale!`, this);
1208
- let o = a;
1209
- r = g(r, o.paddingInner(), o.paddingOuter());
1210
- let s = e == "width" ? "xOffset" : "yOffset", c = this.getScaleResolution(s)?.getScale(), l = i.for ?? (c && _(c.type) ? "offset" : "position"), u = t;
1395
+ let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = J(r), a = e == "viewportWidth" || e == "viewportHeight";
1396
+ if (i) {
1397
+ if (a) throw new y(`Cannot use step-based size with "${e}"!`, this);
1398
+ let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1399
+ if (i) {
1400
+ let n;
1401
+ if (_(i.type)) n = i.domain().length;
1402
+ else if (["locus", "index"].includes(i.type)) {
1403
+ let e = i.domain();
1404
+ n = c(e) - e[0];
1405
+ } else throw new y(`Cannot use step-based size with "${i.type}" scale!`, this);
1406
+ let a = i;
1407
+ n = ne(n, a.paddingInner(), a.paddingOuter());
1408
+ let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), l = r.for ?? (s && _(s.type) ? "offset" : "position"), u = t;
1211
1409
  if (l == "offset") {
1212
- if (!c || !_(c.type)) throw new y(`Cannot use ${e}.step.for = "offset" without a discrete ${s} scale!`, this);
1213
- let t = c, n = g(c.domain().length, t.paddingInner(), t.paddingOuter());
1214
- u *= n / (1 - o.paddingInner());
1410
+ if (!s || !_(s.type)) throw new y(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
1411
+ let t = s, n = ne(s.domain().length, t.paddingInner(), t.paddingOuter());
1412
+ u *= n / (1 - a.paddingInner());
1215
1413
  }
1216
1414
  return {
1217
- px: r * u,
1415
+ px: n * u,
1218
1416
  grow: 0
1219
1417
  };
1220
- } else if (r) return {
1418
+ } else if (n) return {
1221
1419
  px: t,
1222
1420
  grow: 0
1223
1421
  };
1224
1422
  else throw new y(`Cannot use step-based size with "${e}"!`, this);
1225
- } else return (i && Me(i)) ?? (o ? void 0 : {
1423
+ } else return (r && Me(r)) ?? (a ? void 0 : {
1226
1424
  px: 0,
1227
1425
  grow: 1
1228
1426
  });
@@ -1245,9 +1443,9 @@ var Xe = class {
1245
1443
  return r && !_(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
1246
1444
  }
1247
1445
  resolveSizeValue(e, t) {
1248
- if (!h(t)) return t;
1446
+ if (!u(t)) return t;
1249
1447
  let n = this.#C(e)();
1250
- if (rt(n) || n === "container") return n;
1448
+ if (nt(n) || n === "container") return n;
1251
1449
  throw new y(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
1252
1450
  }
1253
1451
  registerSizeInvalidation() {
@@ -1255,7 +1453,7 @@ var Xe = class {
1255
1453
  }
1256
1454
  #y(e, t) {
1257
1455
  let { value: n, implicit: r } = this.#_(e);
1258
- if (!q(n)) return;
1456
+ if (!J(n)) return;
1259
1457
  let i = this.getScaleResolution(t);
1260
1458
  if (!i) {
1261
1459
  if (r) return;
@@ -1274,11 +1472,11 @@ var Xe = class {
1274
1472
  }
1275
1473
  #b(e) {
1276
1474
  let { value: t } = this.#_(e);
1277
- h(t) ? this.#S(e, t.expr) : q(t) && h(t.step) && this.#S(e + ".step", t.step.expr);
1475
+ u(t) ? this.#S(e, t.expr) : J(t) && u(t.step) && this.#S(e + ".step", t.step.expr);
1278
1476
  }
1279
1477
  #x(e, t) {
1280
- let n = h(t.step) ? this.#C(e + ".step")() : t.step;
1281
- if (rt(n)) return n;
1478
+ let n = u(t.step) ? this.#C(e + ".step")() : t.step;
1479
+ if (nt(n)) return n;
1282
1480
  throw new y(`"${e}.step" ExprRef must resolve to a finite number!`, this);
1283
1481
  }
1284
1482
  #S(e, t) {
@@ -1324,7 +1522,7 @@ var Xe = class {
1324
1522
  return this.opacityFunction(1);
1325
1523
  }
1326
1524
  hasLocalOpacity() {
1327
- return this.opacityFunction !== K;
1525
+ return this.opacityFunction !== q;
1328
1526
  }
1329
1527
  getPathString() {
1330
1528
  return this.getLayoutAncestors().map((e) => e.name).reverse().join("/");
@@ -1400,17 +1598,17 @@ var Xe = class {
1400
1598
  }, this.visit(e);
1401
1599
  }
1402
1600
  configurePostScaleParams() {
1403
- let e = [...this.#d, ...Ye(this.spec) ?? []];
1601
+ let e = this.#d;
1404
1602
  if (e.length && !this.#u) {
1405
1603
  this.#u = !0, this.#l = !1;
1406
- for (let t of e) this.paramRuntime.registerParam(t);
1604
+ for (let t of e) this.paramRuntime.getValue(t);
1407
1605
  this.registerDisposer(this._addBroadcastHandler("subtreeDataReady", () => {
1408
1606
  this.#l = !0, this.#T();
1409
1607
  }));
1410
1608
  }
1411
1609
  }
1412
1610
  configureViewOpacity() {
1413
- (!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = et(this));
1611
+ (!this.opacityFunction || this.opacityFunction === q) && (this.opacityFunction = $e(this));
1414
1612
  }
1415
1613
  finalizeParamRuntimeInitialization() {
1416
1614
  this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
@@ -1422,8 +1620,8 @@ var Xe = class {
1422
1620
  return this.#s;
1423
1621
  }
1424
1622
  arrange(e, t, n = {}) {
1425
- if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, d(n))), this.#a || this.#o) {
1426
- let e = this.getOverhang(), n = this.layoutParent ? N.zero() : this.getPadding();
1623
+ if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, f(n))), this.#a || this.#o) {
1624
+ let e = this.getOverhang(), n = this.layoutParent ? P.zero() : this.getPadding();
1427
1625
  this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
1428
1626
  }
1429
1627
  this.#c = !0, this.#T();
@@ -1444,7 +1642,7 @@ var Xe = class {
1444
1642
  }
1445
1643
  getFacetFields(e) {
1446
1644
  let t = this.getEncoding().sample;
1447
- return p(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1645
+ return d(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1448
1646
  }
1449
1647
  usesSampleFacetRendering() {
1450
1648
  return this.layoutParent?.usesSampleFacetRendering() ?? !1;
@@ -1456,16 +1654,16 @@ var Xe = class {
1456
1654
  };
1457
1655
  }
1458
1656
  getScaleResolution(e) {
1459
- let n = t(e);
1460
- return this.getDataAncestors().map((e) => e.resolutions.scale[n]).find((e) => e);
1657
+ let t = l(e);
1658
+ return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
1461
1659
  }
1462
1660
  getAxisResolution(e) {
1463
- let n = t(e);
1464
- return this.getDataAncestors().map((e) => e.resolutions.axis[n]).find((e) => e);
1661
+ let t = l(e);
1662
+ return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
1465
1663
  }
1466
1664
  getLegendResolution(e) {
1467
- let n = t(e);
1468
- return this.getDataAncestors().map((e) => e.resolutions.legend[n]).find((e) => e);
1665
+ let t = l(e);
1666
+ return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
1469
1667
  }
1470
1668
  getConfiguredResolution(e, t) {
1471
1669
  return this.spec.resolve?.[t]?.[e];
@@ -1477,14 +1675,14 @@ var Xe = class {
1477
1675
  return "independent";
1478
1676
  }
1479
1677
  getBaseUrl() {
1480
- return F(() => this.dataParent?.getBaseUrl(), Ue(this.spec.baseUrl));
1678
+ return I(() => this.dataParent?.getBaseUrl(), Ue(this.spec.baseUrl));
1481
1679
  }
1482
1680
  isPickingSupported() {
1483
1681
  return !0;
1484
1682
  }
1485
1683
  getTitleText() {
1486
1684
  let e = this.spec.title;
1487
- if (e) return a(e) ? e : h(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1685
+ if (e) return o(e) ? e : u(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1488
1686
  }
1489
1687
  _cache(e, t) {
1490
1688
  return re(this, e, t);
@@ -1508,14 +1706,14 @@ var Xe = class {
1508
1706
  }
1509
1707
  propagateInteraction(e) {}
1510
1708
  };
1511
- function $e(e) {
1709
+ function Qe(e) {
1512
1710
  return "unitsPerPixel" in e;
1513
1711
  }
1514
- function et(e) {
1712
+ function $e(e) {
1515
1713
  let t = "opacity" in e.spec ? e.spec.opacity : void 0;
1516
1714
  if (t !== void 0) {
1517
- if (l(t)) return (e) => e * t;
1518
- if ($e(t)) {
1715
+ if (n(t)) return (e) => e * t;
1716
+ if (Qe(t)) {
1519
1717
  let n = (t) => {
1520
1718
  let n = e.getScaleResolution(t), r = n?.getScale();
1521
1719
  if ([
@@ -1526,23 +1724,23 @@ function et(e) {
1526
1724
  scale: r,
1527
1725
  scaleResolution: n
1528
1726
  };
1529
- }, r = nt(t.values, "opacity.values", e);
1530
- if (!o(t.unitsPerPixel)) throw new y("\"opacity.unitsPerPixel\" must be an array.", e);
1531
- let i = () => 1, a = [], s = () => {
1532
- let t = tt(nt(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = te().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1727
+ }, r = tt(t.values, "opacity.values", e);
1728
+ if (!g(t.unitsPerPixel)) throw new y("\"opacity.unitsPerPixel\" must be an array.", e);
1729
+ let i = () => 1, a = [], o = () => {
1730
+ let t = et(tt(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = ee().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1533
1731
  i = (e) => n(e);
1534
1732
  };
1535
1733
  a = t.unitsPerPixel.map((t) => {
1536
- if (h(t)) {
1734
+ if (u(t)) {
1537
1735
  let n = e.paramRuntime.watchExpression(t.expr, () => {
1538
- s(), e.context.animator.requestRender();
1736
+ o(), e.context.animator.requestRender();
1539
1737
  });
1540
1738
  return () => n(null);
1541
1739
  } else return () => t;
1542
- }), s();
1740
+ }), o();
1543
1741
  let c = (e) => {
1544
1742
  let t = e.scaleResolution.getAxisLength() || 1e3;
1545
- return ee(e.scale.domain()) / t;
1743
+ return s(e.scale.domain()) / t;
1546
1744
  }, l;
1547
1745
  if (t.channel === "auto") {
1548
1746
  let t = n("x"), r = n("y");
@@ -1556,14 +1754,14 @@ function et(e) {
1556
1754
  l = () => c(r);
1557
1755
  }
1558
1756
  return (e) => i(l()) * e;
1559
- } else if (h(t)) {
1757
+ } else if (u(t)) {
1560
1758
  let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
1561
1759
  return (e) => n(null) * e;
1562
1760
  }
1563
1761
  }
1564
- return K;
1762
+ return q;
1565
1763
  }
1566
- function tt(e, t, n) {
1764
+ function et(e, t, n) {
1567
1765
  if (!e.length) throw new y("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
1568
1766
  if (e.length !== t.length) throw new y("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
1569
1767
  e.forEach((e, t) => {
@@ -1581,155 +1779,155 @@ function tt(e, t, n) {
1581
1779
  values: a
1582
1780
  };
1583
1781
  }
1584
- function nt(e, t, n) {
1585
- if (!o(e)) throw new y("\"" + t + "\" must evaluate to an array.", n);
1586
- return e.map((e, r) => {
1587
- if (!l(e) || !Number.isFinite(e)) throw new y("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1782
+ function tt(e, t, r) {
1783
+ if (!g(e)) throw new y("\"" + t + "\" must evaluate to an array.", r);
1784
+ return e.map((e, i) => {
1785
+ if (!n(e) || !Number.isFinite(e)) throw new y("Invalid " + t + " value at index " + i + ". Expected a finite number.", r);
1588
1786
  return e;
1589
1787
  });
1590
1788
  }
1591
- var q = (e) => !!e && typeof e == "object" && "step" in e;
1592
- function rt(e) {
1789
+ var J = (e) => !!e && typeof e == "object" && "step" in e;
1790
+ function nt(e) {
1593
1791
  return typeof e == "number" && Number.isFinite(e);
1594
1792
  }
1595
- var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
1596
- function it(e, t) {
1597
- ot(e, t, "Import");
1793
+ var Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap();
1794
+ function rt(e, t) {
1795
+ at(e, t, "Import");
1598
1796
  }
1599
- function at(e, t) {
1600
- ot(e, t, "View");
1797
+ function it(e, t) {
1798
+ at(e, t, "View");
1601
1799
  }
1602
- function ot(e, t, n) {
1800
+ function at(e, t, n) {
1603
1801
  if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
1604
- J.set(e, { name: t });
1802
+ Y.set(e, { name: t });
1605
1803
  }
1606
- function st(e) {
1607
- return J.get(e);
1804
+ function ot(e) {
1805
+ return Y.get(e);
1608
1806
  }
1609
- function ct(e, t = {}) {
1807
+ function st(e, t = {}) {
1610
1808
  let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
1611
- Y.set(e, n);
1809
+ X.set(e, n);
1612
1810
  }
1613
- function lt(e, t = {}) {
1811
+ function ct(e, t = {}) {
1614
1812
  Ge(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1615
1813
  }
1616
- function ut(e) {
1814
+ function lt(e) {
1617
1815
  return e.getLayoutAncestors().some(H);
1618
1816
  }
1619
- function X(e) {
1817
+ function Z(e) {
1620
1818
  let t = e.getDataAncestors(), n = [];
1621
1819
  for (let e = t.length - 1; e >= 0; --e) {
1622
- let r = J.get(t[e]);
1820
+ let r = Y.get(t[e]);
1623
1821
  r && typeof r.name == "string" && n.push(r.name);
1624
1822
  }
1625
1823
  return n;
1626
1824
  }
1627
- function dt(e) {
1825
+ function ut(e) {
1628
1826
  let t = e.explicitName;
1629
1827
  if (!t) throw Error("Cannot build a selector for a view without a name.");
1630
1828
  return {
1631
- scope: X(e),
1829
+ scope: Z(e),
1632
1830
  view: t
1633
1831
  };
1634
1832
  }
1635
- function ft(e, t) {
1833
+ function dt(e, t) {
1636
1834
  if (!t) throw Error("Cannot build a selector for a parameter without a name.");
1637
1835
  return {
1638
- scope: X(e),
1836
+ scope: Z(e),
1639
1837
  param: t
1640
1838
  };
1641
1839
  }
1642
- function pt(e) {
1643
- return xt(e), "p:" + JSON.stringify({
1840
+ function ft(e) {
1841
+ return bt(e), "p:" + JSON.stringify({
1644
1842
  scope: e.scope,
1645
1843
  param: e.param
1646
1844
  });
1647
1845
  }
1648
- function mt(e, t) {
1846
+ function pt(e, t) {
1649
1847
  e.visit((e) => {
1650
1848
  let n = Ke(e);
1651
- if (n === "excludeSubtree") return W;
1849
+ if (n === "excludeSubtree") return G;
1652
1850
  if (n !== "exclude") return t(e);
1653
1851
  });
1654
1852
  }
1655
- function ht(e, t) {
1853
+ function mt(e, t) {
1656
1854
  e.visit((e) => {
1657
- let n = Y.get(e);
1658
- if (n === "excludeSubtree") return W;
1855
+ let n = X.get(e);
1856
+ if (n === "excludeSubtree") return G;
1659
1857
  if (n !== "exclude") return t(e);
1660
1858
  });
1661
1859
  }
1662
- function gt(e, t) {
1663
- if (St(t), !kt(e, t.scope)) return;
1860
+ function ht(e, t) {
1861
+ if (xt(t), !kt(e, t.scope)) return;
1664
1862
  let n = [];
1665
1863
  if ($(e, t.scope, (e) => {
1666
1864
  e.explicitName === t.view && n.push(e);
1667
1865
  }, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
1668
1866
  if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
1669
1867
  }
1670
- function _t(e, t) {
1671
- if (xt(t), !kt(e, t.scope)) return;
1868
+ function gt(e, t) {
1869
+ if (bt(t), !kt(e, t.scope)) return;
1672
1870
  let n = [];
1673
1871
  if ($(e, t.scope, (e) => {
1674
- for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Z(i) && n.push({
1872
+ for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Q(i) && n.push({
1675
1873
  view: e,
1676
1874
  param: i
1677
1875
  });
1678
1876
  }), n.length === 1) return n[0];
1679
1877
  if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
1680
1878
  }
1681
- function vt(e, t) {
1879
+ function _t(e, t) {
1682
1880
  e.visit((e) => {
1683
- let n = Y.get(e);
1684
- if (n === "excludeSubtree") return W;
1685
- if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Z(r) && t({
1881
+ let n = X.get(e);
1882
+ if (n === "excludeSubtree") return G;
1883
+ if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Q(r) && t({
1686
1884
  view: e,
1687
1885
  param: r,
1688
- selector: ft(e, n)
1886
+ selector: dt(e, n)
1689
1887
  });
1690
1888
  });
1691
1889
  }
1692
- function yt(e) {
1890
+ function vt(e) {
1693
1891
  let t = [];
1694
- return vt(e, (e) => t.push(e)), t;
1892
+ return _t(e, (e) => t.push(e)), t;
1695
1893
  }
1696
- function bt(e) {
1894
+ function yt(e) {
1697
1895
  let t = [];
1698
- for (let n of Ct(e)) {
1699
- let r = wt(n);
1896
+ for (let n of St(e)) {
1897
+ let r = Ct(n);
1700
1898
  Tt(e, r, t), Et(e, r, t);
1701
1899
  }
1702
1900
  return t;
1703
1901
  }
1704
- function xt(e) {
1902
+ function bt(e) {
1705
1903
  if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
1706
1904
  if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
1707
1905
  }
1708
- function St(e) {
1906
+ function xt(e) {
1709
1907
  if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
1710
1908
  if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
1711
1909
  }
1712
- function Z(e) {
1713
- return e.persist === !1 ? !1 : s(e) ? !0 : f(e) ? !!e.bind : !1;
1910
+ function Q(t) {
1911
+ return t.persist === !1 ? !1 : i(t) ? !0 : e(t) ? !!t.bind : !1;
1714
1912
  }
1715
- function Ct(e) {
1913
+ function St(e) {
1716
1914
  let t = /* @__PURE__ */ new Set([e]);
1717
1915
  return e.visit((e) => {
1718
- let n = J.get(e);
1916
+ let n = Y.get(e);
1719
1917
  n && typeof n.name == "string" && t.add(e);
1720
1918
  }), Array.from(t);
1721
1919
  }
1722
- function wt(e) {
1723
- return X(e);
1920
+ function Ct(e) {
1921
+ return Z(e);
1724
1922
  }
1725
- function Q(e) {
1923
+ function wt(e) {
1726
1924
  return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
1727
1925
  }
1728
1926
  function Tt(e, t, n) {
1729
1927
  let r = /* @__PURE__ */ new Map();
1730
1928
  $(e, t, (e) => {
1731
1929
  for (let [t, n] of e.paramRuntime.paramConfigs) {
1732
- if (!Z(n)) continue;
1930
+ if (!Q(n)) continue;
1733
1931
  let i = r.get(t);
1734
1932
  i ? i.push(e) : r.set(t, [e]);
1735
1933
  }
@@ -1738,7 +1936,7 @@ function Tt(e, t, n) {
1738
1936
  if (i.length <= 1) continue;
1739
1937
  let r = i.map((e) => e.getPathString()).join(", ");
1740
1938
  n.push({
1741
- message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Q(t) + ". Found in: " + r + ".",
1939
+ message: "Bookmarkable parameter \"" + e + "\" is not unique within " + wt(t) + ". Found in: " + r + ".",
1742
1940
  scope: t
1743
1941
  });
1744
1942
  }
@@ -1750,29 +1948,29 @@ function Et(e, t, n) {
1750
1948
  if (i.length <= 1) return;
1751
1949
  let a = /* @__PURE__ */ new Map();
1752
1950
  for (let e of i) {
1753
- let t = J.get(e), n = t ? t.name : void 0;
1951
+ let t = Y.get(e), n = t ? t.name : void 0;
1754
1952
  typeof n != "string" || !n.length || a.set(n, (a.get(n) ?? 0) + 1);
1755
1953
  }
1756
1954
  for (let [e, r] of a) r > 1 && n.push({
1757
- message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Q(t) + ".",
1955
+ message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + wt(t) + ".",
1758
1956
  scope: t
1759
1957
  });
1760
1958
  }
1761
1959
  function Dt(e, t) {
1762
1960
  let n = [];
1763
1961
  return $(e, t, (e) => {
1764
- if (X(e).length !== t.length + 1) return;
1765
- let r = J.get(e);
1962
+ if (Z(e).length !== t.length + 1) return;
1963
+ let r = Y.get(e);
1766
1964
  !r || typeof r.name != "string" || n.push(e);
1767
1965
  }, { includeNamedImportRoots: !0 }), n;
1768
1966
  }
1769
1967
  function Ot(e) {
1770
1968
  let t = !1;
1771
1969
  return e.visit((e) => {
1772
- let n = Y.get(e);
1773
- if (n === "excludeSubtree") return W;
1970
+ let n = X.get(e);
1971
+ if (n === "excludeSubtree") return G;
1774
1972
  if (n !== "exclude") {
1775
- for (let n of e.paramRuntime.paramConfigs.values()) if (Z(n)) return t = !0, G;
1973
+ for (let n of e.paramRuntime.paramConfigs.values()) if (Q(n)) return t = !0, K;
1776
1974
  }
1777
1975
  }), t;
1778
1976
  }
@@ -1782,9 +1980,9 @@ function kt(e, t) {
1782
1980
  if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
1783
1981
  let t, a = !1;
1784
1982
  if ($(e, r, (e) => {
1785
- let n = J.get(e);
1786
- if (!(!n || n.name !== i) && X(e).length === r.length + 1) {
1787
- if (t) return a = !0, G;
1983
+ let n = Y.get(e);
1984
+ if (!(!n || n.name !== i) && Z(e).length === r.length + 1) {
1985
+ if (t) return a = !0, K;
1788
1986
  t = e;
1789
1987
  }
1790
1988
  }, { includeNamedImportRoots: !0 }), a) throw Error("Multiple import instances named \"" + i + "\" in scope.");
@@ -1796,13 +1994,13 @@ function kt(e, t) {
1796
1994
  function $(e, t, n, r = {}) {
1797
1995
  let i = r.includeNamedImportRoots ?? !1;
1798
1996
  e.visit((e) => {
1799
- let r = J.get(e), a = Y.get(e);
1800
- if (a === "excludeSubtree") return W;
1997
+ let r = Y.get(e), a = X.get(e);
1998
+ if (a === "excludeSubtree") return G;
1801
1999
  if (a !== "exclude" && At(e, t, r, i)) return n(e);
1802
2000
  });
1803
2001
  }
1804
2002
  function At(e, t, n, r) {
1805
- let i = X(e);
2003
+ let i = Z(e);
1806
2004
  return jt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Mt(t, i);
1807
2005
  }
1808
2006
  function jt(e, t) {
@@ -1814,4 +2012,4 @@ function Mt(e, t) {
1814
2012
  return !0;
1815
2013
  }
1816
2014
  //#endregion
1817
- export { w as A, S as B, B as C, Be as D, I as E, A as F, b as G, xe as H, Te as I, Me as L, Oe as M, Ee as N, N as O, j as P, ke as R, U as S, F as T, ve as U, be as V, ye as W, W as _, dt as a, Je as b, lt as c, at as d, _t as f, mt as g, ht as h, X as i, T as j, Re as k, ct as l, bt as m, st as n, ut as o, gt as p, ft as r, pt as s, yt as t, it as u, G as v, He as w, H as x, Qe as y, De as z };
2015
+ export { T as A, be as B, B as C, ze as D, Be as E, A as F, b as G, w as H, we as I, Me as L, De as M, Te as N, P as O, j as P, Oe as R, U as S, I as T, ge as U, ve as V, _e as W, G as _, ut as a, qe as b, ct as c, it as d, gt as f, pt as g, mt as h, Z as i, E as j, Le as k, st as l, yt as m, ot as n, lt as o, ht as p, dt as r, ft as s, vt as t, rt as u, K as v, He as w, H as x, Ze as y, Ee as z };