@genome-spy/app 0.87.0 → 0.88.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agentApi-BZ1JCo1N.js → agentApi-BIpg3JKh.js} +5365 -5080
- package/dist/agentApi.es.js +3160 -2909
- package/dist/agentShared.es.js +3 -3
- package/dist/{canvas2d-Cafq5v-N.js → canvas2d-BVQ7-2eJ.js} +68 -68
- package/dist/{canvas2d-B_PnIof-.js → canvas2d-D7SZK3xv.js} +39 -39
- package/dist/{clipOptions-H68pJyEZ.js → clipOptions-BWHr3aTa.js} +822 -768
- package/dist/{clipOptions-D6eh9T-_.js → clipOptions-DTMcB_9z.js} +547 -493
- package/dist/{debug-BGzgZmyk.js → debug-CVpoEOWx.js} +2 -2
- package/dist/{debug-UYKZLNh4.js → debug-DYAMZZKl.js} +2 -2
- package/dist/index.es.js +3390 -3410
- package/dist/index.js +395 -374
- package/dist/{indexer-Di57GyxX.js → indexer-CXjZDo2Q.js} +1 -1
- package/dist/{indexer-o6Hpg4nN.js → indexer-DAH_ruVn.js} +1 -1
- package/dist/{nativeText-DAjvkrzc.js → order-C5CzA37O.js} +271 -287
- package/dist/{nativeText-D9SoxpaD.js → order-DvY7KNcu.js} +271 -287
- package/dist/{rasterExport-DzldLv6E.js → rasterExport-BgZ98e6U.js} +1 -1
- package/dist/{rasterExport-IAbJwi8F.js → rasterExport-DEr8fOLm.js} +1 -1
- package/dist/{renderCanvas2D-yJ1IrDcX.js → renderCanvas2D-DtcJjqpB.js} +57 -50
- package/dist/{renderCanvas2D-BJ93Ptqj.js → renderCanvas2D-DxturTEW.js} +62 -55
- package/dist/schema.json +756 -96
- package/dist/{svg-DJuqHIyc.js → svg-CyrLfa9e.js} +364 -357
- package/dist/{svg-BRpl2Xub.js → svg-SDJMzL--.js} +338 -331
- package/dist/{svgRasterizer-PAoqLn1j.js → svgRasterizer-f7DJ3UO0.js} +1 -1
- package/dist/{svgRasterizer-CGZQ5njV.js → svgRasterizer-mWK7HTkx.js} +1 -1
- package/dist/{vega-scale-BGC53c22.js → vega-scale-CypF85iS.js} +801 -801
- package/dist/{vega-scale-DdW2NzQ3.js → vega-scale-DLKCwWRs.js} +65 -65
- package/dist/{viewIdentityRegistry-Dc2hXYsO.js → viewIdentityRegistry-DIDo44XQ.js} +1 -1
- package/dist/{viewIdentityRegistry-D4p067HU.js → viewIdentityRegistry-Dl-vMN9I.js} +1 -1
- package/dist/{viewSelectors-DNXnGwEW.js → viewSelectors-CymbZyE6.js} +375 -340
- package/dist/{viewSelectors-DYYlOt91.js → viewSelectors-DNiDip5e.js} +370 -335
- package/dist/{viewUtils-EdhZTPrJ.js → viewUtils-BrJLIj2o.js} +1750 -1716
- package/dist/{webgl-C53DwzVT.js → webgl-CTJt7jQd.js} +1019 -983
- package/dist/{webgl-CdgNFlJk.js → webgl-tZfZ8y3q.js} +1200 -1164
- package/package.json +5 -5
- package/src/embedTypes.d.ts +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { C as e, E as t,
|
|
2
|
-
import { E as
|
|
1
|
+
import { C as e, E as t, Jt as n, Q as r, S as i, Wt as a, Yt as o, Z as s, b as c, o as l, qt as u, t as d, tn as f, un as p, ut as m, y as h, yt as ee } from "./clipOptions-BWHr3aTa.js";
|
|
2
|
+
import { E as te, it as ne, m as g, y as _ } from "./vega-scale-CypF85iS.js";
|
|
3
3
|
import { a as v, n as re, r as ie, t as y } from "./viewError-BiR9VCgL.js";
|
|
4
|
+
import { t as ae } from "./warning-CpIIpk8e.js";
|
|
4
5
|
//#region ../../node_modules/flatqueue/index.js
|
|
5
6
|
var b = class {
|
|
6
7
|
constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
|
|
@@ -43,11 +44,11 @@ var b = class {
|
|
|
43
44
|
shrink() {
|
|
44
45
|
Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
|
|
45
46
|
}
|
|
46
|
-
}, x = Symbol("runtimeNode"),
|
|
47
|
-
function
|
|
47
|
+
}, x = Symbol("runtimeNode"), oe = 1e6;
|
|
48
|
+
function se(e) {
|
|
48
49
|
return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function ce(e, t) {
|
|
51
52
|
let n = {
|
|
52
53
|
id: e.id,
|
|
53
54
|
name: e.name,
|
|
@@ -70,18 +71,18 @@ function C(e, t) {
|
|
|
70
71
|
t(e);
|
|
71
72
|
} }) : n;
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function le(e) {
|
|
74
75
|
let t = e[x];
|
|
75
76
|
if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
|
|
76
77
|
return t;
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
return typeof e.rank == "number" ? e.rank :
|
|
79
|
+
function ue(e) {
|
|
80
|
+
return typeof e.rank == "number" ? e.rank : le(e).rank;
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function de(e) {
|
|
82
83
|
for (let t of e) t();
|
|
83
84
|
}
|
|
84
|
-
var
|
|
85
|
+
var fe = class {
|
|
85
86
|
#e = 1;
|
|
86
87
|
#t = 1;
|
|
87
88
|
#n = 0;
|
|
@@ -100,7 +101,7 @@ var le = class {
|
|
|
100
101
|
#h = /* @__PURE__ */ new Set();
|
|
101
102
|
#g;
|
|
102
103
|
constructor(e = {}) {
|
|
103
|
-
this.#g =
|
|
104
|
+
this.#g = se(e.lifecycleRegistry);
|
|
104
105
|
}
|
|
105
106
|
createWritable(e, t, n, r, i = {}) {
|
|
106
107
|
let a = "n" + this.#e++, o = i.notify ?? !0, s = {
|
|
@@ -122,7 +123,7 @@ var le = class {
|
|
|
122
123
|
}, l = () => {
|
|
123
124
|
s.disposed = !0, s.listeners.clear(), u();
|
|
124
125
|
}, u = this.#g(e, l);
|
|
125
|
-
return Object.assign(
|
|
126
|
+
return Object.assign(ce(s, c), { dispose: l });
|
|
126
127
|
}
|
|
127
128
|
computed(e, t, n, r, i = {}) {
|
|
128
129
|
return this.#_(e, t, n, r, i);
|
|
@@ -157,7 +158,7 @@ var le = class {
|
|
|
157
158
|
})), l = c(), u = () => {
|
|
158
159
|
s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
|
|
159
160
|
}, d = this.#g(e, u);
|
|
160
|
-
return Object.assign(
|
|
161
|
+
return Object.assign(ce(s), {
|
|
161
162
|
dispose: u,
|
|
162
163
|
rebind: (e, n) => {
|
|
163
164
|
if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
|
|
@@ -265,7 +266,7 @@ var le = class {
|
|
|
265
266
|
#v(e) {
|
|
266
267
|
this.#s++;
|
|
267
268
|
try {
|
|
268
|
-
|
|
269
|
+
de(e);
|
|
269
270
|
} finally {
|
|
270
271
|
this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
|
|
271
272
|
}
|
|
@@ -294,7 +295,7 @@ var le = class {
|
|
|
294
295
|
}
|
|
295
296
|
#b(e) {
|
|
296
297
|
let t = -1, n = 0;
|
|
297
|
-
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e,
|
|
298
|
+
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, ue(t)), 0), t = this.#n), n);
|
|
298
299
|
}
|
|
299
300
|
#x(e) {
|
|
300
301
|
if (this.#d.has(e)) {
|
|
@@ -311,8 +312,8 @@ var le = class {
|
|
|
311
312
|
this.#f.add(e), this.#m.push(e, this.#C(e.rank)), this.#w();
|
|
312
313
|
}
|
|
313
314
|
#C(e) {
|
|
314
|
-
let t = this.#t %
|
|
315
|
-
return this.#t += 1, e *
|
|
315
|
+
let t = this.#t % oe;
|
|
316
|
+
return this.#t += 1, e * oe + t;
|
|
316
317
|
}
|
|
317
318
|
#w() {
|
|
318
319
|
this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
|
|
@@ -328,7 +329,7 @@ var le = class {
|
|
|
328
329
|
this.#h.clear();
|
|
329
330
|
}
|
|
330
331
|
}
|
|
331
|
-
},
|
|
332
|
+
}, pe = class {
|
|
332
333
|
#e = 1;
|
|
333
334
|
#t = /* @__PURE__ */ new Map();
|
|
334
335
|
createOwner(e, t) {
|
|
@@ -349,7 +350,7 @@ var le = class {
|
|
|
349
350
|
t.clear(), this.#t.delete(e);
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
|
-
},
|
|
353
|
+
}, me = class {
|
|
353
354
|
#e = 1;
|
|
354
355
|
#t = /* @__PURE__ */ new Map();
|
|
355
356
|
createRootScope(e) {
|
|
@@ -422,13 +423,13 @@ var le = class {
|
|
|
422
423
|
};
|
|
423
424
|
//#endregion
|
|
424
425
|
//#region ../core/src/paramRuntime/expressionCompiler.js
|
|
425
|
-
function
|
|
426
|
+
function he(e, t = {}, n = {}) {
|
|
426
427
|
return r(e, t, n);
|
|
427
428
|
}
|
|
428
429
|
//#endregion
|
|
429
430
|
//#region ../core/src/paramRuntime/expressionRef.js
|
|
430
|
-
function
|
|
431
|
-
let r = {}, i =
|
|
431
|
+
function S(e, t, n = {}) {
|
|
432
|
+
let r = {}, i = he(e, r, n), a = /* @__PURE__ */ new Map();
|
|
432
433
|
for (let n of i.globals) {
|
|
433
434
|
if (a.has(n)) continue;
|
|
434
435
|
let i = t(n);
|
|
@@ -459,10 +460,10 @@ function pe(e, t, n = {}) {
|
|
|
459
460
|
}
|
|
460
461
|
//#endregion
|
|
461
462
|
//#region ../core/src/paramRuntime/paramRuntime.js
|
|
462
|
-
var
|
|
463
|
-
#e = new
|
|
464
|
-
#t = new
|
|
465
|
-
#n = new
|
|
463
|
+
var ge = class {
|
|
464
|
+
#e = new pe();
|
|
465
|
+
#t = new fe({ lifecycleRegistry: this.#e });
|
|
466
|
+
#n = new me();
|
|
466
467
|
createScope(e) {
|
|
467
468
|
let t = this.#e.createOwner("scope", e ?? "root");
|
|
468
469
|
return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
|
|
@@ -487,11 +488,11 @@ var me = class {
|
|
|
487
488
|
return this.#n.register(e, t, a);
|
|
488
489
|
}
|
|
489
490
|
registerDerived(e, t, n, r) {
|
|
490
|
-
let { expression: i, dependencies: a } =
|
|
491
|
+
let { expression: i, dependencies: a } = S(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
|
|
491
492
|
return this.#n.register(e, t, s);
|
|
492
493
|
}
|
|
493
494
|
createExpression(e, t, n) {
|
|
494
|
-
let { expression: r } =
|
|
495
|
+
let { expression: r } = S(t, (t) => this.resolve(e, t), n);
|
|
495
496
|
return r;
|
|
496
497
|
}
|
|
497
498
|
resolve(e, t) {
|
|
@@ -524,11 +525,11 @@ var me = class {
|
|
|
524
525
|
whenPropagated(e) {
|
|
525
526
|
return this.#t.whenPropagated(e);
|
|
526
527
|
}
|
|
527
|
-
},
|
|
528
|
-
function
|
|
528
|
+
}, _e = (e) => new Promise((t) => setTimeout(t, e));
|
|
529
|
+
function ve() {
|
|
529
530
|
return { canceled: !1 };
|
|
530
531
|
}
|
|
531
|
-
function
|
|
532
|
+
function ye(e) {
|
|
532
533
|
let t = e.requestAnimationFrame || window.requestAnimationFrame, n = e.signal, r = e.cancelToken, i = () => new Promise((i, a) => {
|
|
533
534
|
if (r?.canceled) return i();
|
|
534
535
|
if (n?.aborted) return a("aborted");
|
|
@@ -541,11 +542,11 @@ function _e(e) {
|
|
|
541
542
|
};
|
|
542
543
|
t(m);
|
|
543
544
|
});
|
|
544
|
-
return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") :
|
|
545
|
+
return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : _e(e.delay).then(i) : i();
|
|
545
546
|
}
|
|
546
547
|
//#endregion
|
|
547
548
|
//#region ../core/src/utils/animator.js
|
|
548
|
-
var
|
|
549
|
+
var be = class {
|
|
549
550
|
constructor(e) {
|
|
550
551
|
this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
|
|
551
552
|
}
|
|
@@ -571,13 +572,13 @@ var ve = class {
|
|
|
571
572
|
this._finalized = !0, this._renderRequested = !1, this.transitions = [], this._animationFrameRequest !== void 0 && (window.cancelAnimationFrame(this._animationFrameRequest), this._animationFrameRequest = void 0);
|
|
572
573
|
}
|
|
573
574
|
transition(e) {
|
|
574
|
-
return
|
|
575
|
+
return ye({
|
|
575
576
|
requestAnimationFrame: (e) => this.requestTransition(e),
|
|
576
577
|
...e
|
|
577
578
|
});
|
|
578
579
|
}
|
|
579
580
|
};
|
|
580
|
-
function
|
|
581
|
+
function C(e, t, n, r, i) {
|
|
581
582
|
let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
|
|
582
583
|
function u(e, t, n, r) {
|
|
583
584
|
return t + (e - t) * 2 ** (-n / r);
|
|
@@ -596,7 +597,7 @@ function w(e, t, n, r, i) {
|
|
|
596
597
|
s || (s = !0, e.requestTransition(d));
|
|
597
598
|
}
|
|
598
599
|
function p(n) {
|
|
599
|
-
l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a =
|
|
600
|
+
l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = xe(), d(a));
|
|
600
601
|
}
|
|
601
602
|
return p.stop = () => {
|
|
602
603
|
o = !0, s = !1, e.cancelTransition(d);
|
|
@@ -604,41 +605,53 @@ function w(e, t, n, r, i) {
|
|
|
604
605
|
l = e, c = e, p.stop(), t(c);
|
|
605
606
|
}, p;
|
|
606
607
|
}
|
|
607
|
-
function
|
|
608
|
+
function xe() {
|
|
608
609
|
let e = globalThis.document?.timeline?.currentTime;
|
|
609
610
|
return typeof e == "number" ? e : performance.now();
|
|
610
611
|
}
|
|
611
612
|
//#endregion
|
|
612
613
|
//#region ../core/src/paramRuntime/viewParamRuntime.js
|
|
613
|
-
var
|
|
614
|
+
var w = class {
|
|
614
615
|
#e;
|
|
615
616
|
#t;
|
|
616
617
|
#n = /* @__PURE__ */ new Map();
|
|
617
618
|
#r = /* @__PURE__ */ new Map();
|
|
618
619
|
#i = /* @__PURE__ */ new Map();
|
|
619
|
-
#a = /* @__PURE__ */ new
|
|
620
|
-
#o;
|
|
621
|
-
#s;
|
|
620
|
+
#a = /* @__PURE__ */ new Set();
|
|
621
|
+
#o = /* @__PURE__ */ new Map();
|
|
622
|
+
#s = /* @__PURE__ */ new Map();
|
|
622
623
|
#c;
|
|
623
624
|
#l;
|
|
624
|
-
#u
|
|
625
|
+
#u;
|
|
626
|
+
#d;
|
|
627
|
+
#f = !1;
|
|
625
628
|
constructor(e, t, n, r = {}) {
|
|
626
|
-
this.#
|
|
627
|
-
let i = this.#
|
|
628
|
-
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new
|
|
629
|
+
this.#c = e ?? (() => void 0), this.#l = t ?? (() => void 0), this.#u = n, this.#d = r.snapTransitionedUpdates ?? !1;
|
|
630
|
+
let i = this.#c();
|
|
631
|
+
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new ge(), this.#t = this.#e.createScope());
|
|
632
|
+
}
|
|
633
|
+
get #p() {
|
|
634
|
+
return { resolveScaleResolution: this.#l };
|
|
629
635
|
}
|
|
630
636
|
registerParam(e, n = {}) {
|
|
631
637
|
let r = e.name;
|
|
632
|
-
if (t(r), this.#i.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
|
|
633
|
-
if (
|
|
638
|
+
if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
|
|
639
|
+
if (Ce(e), n.defer) {
|
|
634
640
|
if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
|
|
635
641
|
return this.#e.registerInitializer(this.#t, r, () => {
|
|
636
|
-
this.#
|
|
642
|
+
this.#m(e);
|
|
637
643
|
}), this.#i.set(r, e), () => {
|
|
638
644
|
throw Error("Cannot set derived parameter \"" + r + "\".");
|
|
639
645
|
};
|
|
640
646
|
}
|
|
641
|
-
return this.#
|
|
647
|
+
return this.#m(e);
|
|
648
|
+
}
|
|
649
|
+
registerLazyExpression(e, t, n) {
|
|
650
|
+
this.#e.registerInitializer(this.#t, e, () => {
|
|
651
|
+
n?.();
|
|
652
|
+
let r = this.#e.registerDerived(this.#t, e, t, this.#p);
|
|
653
|
+
this.#r.set(e, r);
|
|
654
|
+
}), this.#a.add(e);
|
|
642
655
|
}
|
|
643
656
|
registerScopedExpression(e, t, n) {
|
|
644
657
|
if (this.#e !== n.#e) throw Error("Scoped expressions must share a parameter runtime.");
|
|
@@ -646,7 +659,7 @@ var be = class {
|
|
|
646
659
|
this.#e.registerInitializer(this.#t, e, () => {
|
|
647
660
|
let r = this.#e.registerDerived(this.#t, e, t, {
|
|
648
661
|
expressionScope: n.#t,
|
|
649
|
-
|
|
662
|
+
...n.#p
|
|
650
663
|
});
|
|
651
664
|
this.#r.set(e, r);
|
|
652
665
|
}), this.#i.set(e, {
|
|
@@ -654,7 +667,7 @@ var be = class {
|
|
|
654
667
|
expr: t
|
|
655
668
|
});
|
|
656
669
|
}
|
|
657
|
-
#
|
|
670
|
+
#m(e) {
|
|
658
671
|
let t = e.name, n, r;
|
|
659
672
|
if (e.push == "outer") {
|
|
660
673
|
let i = this.findRuntimeForParam(t);
|
|
@@ -665,17 +678,17 @@ var be = class {
|
|
|
665
678
|
n = (e) => {
|
|
666
679
|
i.setValue(t, e);
|
|
667
680
|
}, 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.#
|
|
681
|
+
} else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#g(t, r, e.transition) : this.#h(t, r);
|
|
669
682
|
else if ("expr" in e) {
|
|
670
|
-
if ("transition" in e) this.#
|
|
683
|
+
if ("transition" in e) this.#_(t, e.expr, e.transition);
|
|
671
684
|
else {
|
|
672
|
-
let n = this.#e.registerDerived(this.#t, t, e.expr,
|
|
685
|
+
let n = this.#e.registerDerived(this.#t, t, e.expr, this.#p);
|
|
673
686
|
this.#r.set(t, n);
|
|
674
687
|
}
|
|
675
688
|
n = () => {
|
|
676
689
|
throw Error("Cannot set derived parameter \"" + t + "\".");
|
|
677
690
|
};
|
|
678
|
-
} else r = h(e, this), n = this.#
|
|
691
|
+
} else r = h(e, this), n = this.#h(t, r);
|
|
679
692
|
if ("select" in e) {
|
|
680
693
|
if (r ??= h(e, this), !this.#n.has(t)) {
|
|
681
694
|
let e = this.#e.registerSelection(this.#t, t, r);
|
|
@@ -705,16 +718,18 @@ var be = class {
|
|
|
705
718
|
getValue(e) {
|
|
706
719
|
return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
|
|
707
720
|
}
|
|
721
|
+
getParamRef(e) {
|
|
722
|
+
t(e);
|
|
723
|
+
let n = this.findRuntimeForParam(e);
|
|
724
|
+
if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
|
|
725
|
+
}
|
|
708
726
|
getTargetValue(e) {
|
|
709
|
-
return t(e), this.#
|
|
727
|
+
return t(e), this.#s.get(e)?.target ?? this.getValue(e);
|
|
710
728
|
}
|
|
711
|
-
subscribe(e,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
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);
|
|
729
|
+
subscribe(e, t) {
|
|
730
|
+
let n = this.getParamRef(e);
|
|
731
|
+
if (!n) throw Error("Parameter not found: " + e);
|
|
732
|
+
return n.subscribe(t);
|
|
718
733
|
}
|
|
719
734
|
findValue(e) {
|
|
720
735
|
return this.findRuntimeForParam(e)?.getValue(e);
|
|
@@ -728,17 +743,37 @@ var be = class {
|
|
|
728
743
|
hasLocalParam(e) {
|
|
729
744
|
t(e);
|
|
730
745
|
let n = this.#i.get(e);
|
|
731
|
-
return this.#r.has(e) || n !== void 0 && "expr" in n;
|
|
746
|
+
return this.#r.has(e) || this.#a.has(e) || n !== void 0 && "expr" in n;
|
|
732
747
|
}
|
|
733
748
|
isPendingParam(e) {
|
|
734
749
|
let t = this.findRuntimeForParam(e);
|
|
735
750
|
return t !== void 0 && !t.#r.has(e);
|
|
736
751
|
}
|
|
737
752
|
hasConfiguredParamInScopeChain(e) {
|
|
738
|
-
return t(e), this.#i.has(e) ? !0 : this.#
|
|
753
|
+
return t(e), this.#i.has(e) ? !0 : this.#c()?.hasConfiguredParamInScopeChain(e) ?? !1;
|
|
739
754
|
}
|
|
740
755
|
findRuntimeForParam(e) {
|
|
741
|
-
return this.hasLocalParam(e) ? this : this.#
|
|
756
|
+
return this.hasLocalParam(e) ? this : this.#c()?.findRuntimeForParam(e);
|
|
757
|
+
}
|
|
758
|
+
findConfiguredParam(e) {
|
|
759
|
+
let t = this.#i.get(e);
|
|
760
|
+
return t ? {
|
|
761
|
+
runtime: this,
|
|
762
|
+
config: t
|
|
763
|
+
} : this.#c()?.findConfiguredParam(e);
|
|
764
|
+
}
|
|
765
|
+
registerSelectionController(e, t) {
|
|
766
|
+
let n = this.#o.get(e);
|
|
767
|
+
return n || (n = /* @__PURE__ */ new Set(), this.#o.set(e, n)), n.add(t), () => {
|
|
768
|
+
n.delete(t), n.size === 0 && this.#o.delete(e);
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
getSelectionController(e) {
|
|
772
|
+
let t = this.#o.get(e);
|
|
773
|
+
if (t) {
|
|
774
|
+
if (t.size > 1) throw Error(`Selection "${e}" has ambiguous interaction ownership.`);
|
|
775
|
+
return t.values().next().value;
|
|
776
|
+
}
|
|
742
777
|
}
|
|
743
778
|
getDebugState() {
|
|
744
779
|
let e = [];
|
|
@@ -746,22 +781,22 @@ var be = class {
|
|
|
746
781
|
let r = this.#i.get(t);
|
|
747
782
|
e.push({
|
|
748
783
|
name: t,
|
|
749
|
-
kind:
|
|
784
|
+
kind: Se(r),
|
|
750
785
|
value: n.get(),
|
|
751
786
|
writable: this.#n.has(t),
|
|
752
787
|
configured: !!r,
|
|
753
788
|
config: r ? structuredClone(r) : void 0,
|
|
754
|
-
target: this.#
|
|
789
|
+
target: this.#s.get(t)?.target
|
|
755
790
|
});
|
|
756
791
|
}
|
|
757
792
|
return {
|
|
758
793
|
scopeId: this.#t,
|
|
759
|
-
disposed: this.#
|
|
794
|
+
disposed: this.#f,
|
|
760
795
|
params: e
|
|
761
796
|
};
|
|
762
797
|
}
|
|
763
798
|
createExpression(e) {
|
|
764
|
-
return this.#e.createExpression(this.#t, e,
|
|
799
|
+
return this.#e.createExpression(this.#t, e, this.#p);
|
|
765
800
|
}
|
|
766
801
|
watchExpression(e, t, n = {}) {
|
|
767
802
|
let r = this.createExpression(e), i = r.subscribe(t);
|
|
@@ -788,7 +823,7 @@ var be = class {
|
|
|
788
823
|
cancelUpdate(e) {
|
|
789
824
|
this.#e.cancelUpdate(e);
|
|
790
825
|
}
|
|
791
|
-
#
|
|
826
|
+
#h(e, t) {
|
|
792
827
|
let n = this.#e.registerBase(this.#t, e, t);
|
|
793
828
|
this.#r.set(e, n);
|
|
794
829
|
let r = (e) => {
|
|
@@ -796,36 +831,36 @@ var be = class {
|
|
|
796
831
|
};
|
|
797
832
|
return this.#n.set(e, r), r;
|
|
798
833
|
}
|
|
799
|
-
#
|
|
800
|
-
let r = this.#
|
|
801
|
-
this.#
|
|
834
|
+
#g(e, t, n) {
|
|
835
|
+
let r = this.#v(e, t, n), i = (t, n) => {
|
|
836
|
+
this.#y(e, r, t, n);
|
|
802
837
|
};
|
|
803
838
|
return this.#n.set(e, i), i;
|
|
804
839
|
}
|
|
805
|
-
#
|
|
806
|
-
let r = this.createExpression(t), i = this.#
|
|
807
|
-
this.#
|
|
840
|
+
#_(e, t, n) {
|
|
841
|
+
let r = this.createExpression(t), i = this.#v(e, r(null), n), a = r.subscribe(() => {
|
|
842
|
+
this.#y(e, i, r(null), { animate: !this.#d });
|
|
808
843
|
});
|
|
809
844
|
this.#e.addScopeDisposer(this.#t, a);
|
|
810
845
|
}
|
|
811
|
-
#
|
|
812
|
-
let r =
|
|
846
|
+
#v(e, t, n) {
|
|
847
|
+
let r = T(e, t), i = this.#e.registerBase(this.#t, e, r);
|
|
813
848
|
this.#r.set(e, i);
|
|
814
|
-
let a = this.#
|
|
849
|
+
let a = this.#u;
|
|
815
850
|
if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
|
|
816
|
-
let o =
|
|
851
|
+
let o = C(a, ({ value: e }) => {
|
|
817
852
|
i.set(e), this.#e.flushNow();
|
|
818
853
|
}, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
|
|
819
854
|
target: i.get(),
|
|
820
855
|
smoother: o,
|
|
821
856
|
dispose: () => {
|
|
822
|
-
o.stop(), this.#
|
|
857
|
+
o.stop(), this.#s.delete(e);
|
|
823
858
|
}
|
|
824
859
|
};
|
|
825
|
-
return this.#
|
|
860
|
+
return this.#s.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
|
|
826
861
|
}
|
|
827
|
-
#
|
|
828
|
-
let i =
|
|
862
|
+
#y(e, t, n, r = {}) {
|
|
863
|
+
let i = T(e, n);
|
|
829
864
|
t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
|
|
830
865
|
}
|
|
831
866
|
evaluateAndGet(e) {
|
|
@@ -841,10 +876,10 @@ var be = class {
|
|
|
841
876
|
return this.#e.whenPropagated(e);
|
|
842
877
|
}
|
|
843
878
|
finalizeInitialization() {
|
|
844
|
-
this.#
|
|
879
|
+
this.#d = !1;
|
|
845
880
|
}
|
|
846
881
|
dispose() {
|
|
847
|
-
this.#
|
|
882
|
+
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());
|
|
848
883
|
}
|
|
849
884
|
hasPointSelections() {
|
|
850
885
|
for (let e of this.#i.values()) if (i(e)) {
|
|
@@ -856,10 +891,10 @@ var be = class {
|
|
|
856
891
|
return !1;
|
|
857
892
|
}
|
|
858
893
|
};
|
|
859
|
-
function
|
|
894
|
+
function Se(e) {
|
|
860
895
|
return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
|
|
861
896
|
}
|
|
862
|
-
function
|
|
897
|
+
function Ce(e) {
|
|
863
898
|
let t = e.name;
|
|
864
899
|
if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
|
|
865
900
|
if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
|
|
@@ -872,7 +907,7 @@ function Se(e) {
|
|
|
872
907
|
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.`);
|
|
873
908
|
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.`);
|
|
874
909
|
}
|
|
875
|
-
function
|
|
910
|
+
function T(e, t) {
|
|
876
911
|
if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
|
|
877
912
|
return t;
|
|
878
913
|
}
|
|
@@ -881,7 +916,7 @@ function Ce(e, t) {
|
|
|
881
916
|
function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
|
|
882
917
|
n ||= 0, i ||= 0;
|
|
883
918
|
let o = Ne(e, t, n), s = 0, c = 0;
|
|
884
|
-
for (let t = 0; t < e.length; t++) s += o[t],
|
|
919
|
+
for (let t = 0; t < e.length; t++) s += o[t], O(e[t]) || c++;
|
|
885
920
|
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) => {
|
|
886
921
|
let t = d;
|
|
887
922
|
if (!t) return;
|
|
@@ -893,13 +928,13 @@ function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
|
|
|
893
928
|
});
|
|
894
929
|
m += r, d = 0;
|
|
895
930
|
}, m = a ? Math.max(t, l) : 0 + i;
|
|
896
|
-
if (e.length == 1 &&
|
|
931
|
+
if (e.length == 1 && O(e[0])) return [{
|
|
897
932
|
location: m,
|
|
898
933
|
size: 0
|
|
899
934
|
}];
|
|
900
935
|
for (let t = 0; t < e.length; t++) {
|
|
901
936
|
let r = e[t];
|
|
902
|
-
if (
|
|
937
|
+
if (O(r)) d++;
|
|
903
938
|
else {
|
|
904
939
|
p(f.length > 0);
|
|
905
940
|
let e = o[t];
|
|
@@ -913,13 +948,13 @@ function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
|
|
|
913
948
|
}
|
|
914
949
|
function Te(e, { spacing: t } = { spacing: 0 }) {
|
|
915
950
|
let n = 0;
|
|
916
|
-
for (let r of e) n +=
|
|
951
|
+
for (let r of e) n += M(r) + (O(r) ? 0 : t);
|
|
917
952
|
return Math.max(0, n - t);
|
|
918
953
|
}
|
|
919
954
|
function Ee(e, t, { spacing: n = 0 } = {}) {
|
|
920
955
|
let r = [], i = [], a = 0, o = 0;
|
|
921
956
|
for (let [s, c] of e.entries()) {
|
|
922
|
-
let e =
|
|
957
|
+
let e = M(c), l = !O(c), u = o && l ? n : 0;
|
|
923
958
|
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;
|
|
924
959
|
}
|
|
925
960
|
return i.length && r.push(i), r;
|
|
@@ -927,11 +962,11 @@ function Ee(e, t, { spacing: n = 0 } = {}) {
|
|
|
927
962
|
function De(e) {
|
|
928
963
|
let t = 0, n = 0, r = 0, i, a = !0;
|
|
929
964
|
for (let o of e) {
|
|
930
|
-
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r,
|
|
931
|
-
let e =
|
|
965
|
+
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, M(o));
|
|
966
|
+
let e = N(o);
|
|
932
967
|
e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
|
|
933
968
|
}
|
|
934
|
-
return
|
|
969
|
+
return I({
|
|
935
970
|
px: t,
|
|
936
971
|
grow: n,
|
|
937
972
|
minPx: r,
|
|
@@ -946,13 +981,13 @@ function Oe(e) {
|
|
|
946
981
|
maxPx: 0
|
|
947
982
|
}, n = !0;
|
|
948
983
|
for (let r of e) {
|
|
949
|
-
t.px +=
|
|
950
|
-
let e =
|
|
984
|
+
t.px += k(r.px), t.grow += k(r.grow), t.minPx += M(r);
|
|
985
|
+
let e = N(r);
|
|
951
986
|
e === void 0 ? n = !1 : t.maxPx += e;
|
|
952
987
|
}
|
|
953
|
-
return n || delete t.maxPx,
|
|
988
|
+
return n || delete t.maxPx, I(t);
|
|
954
989
|
}
|
|
955
|
-
var
|
|
990
|
+
var E = class e {
|
|
956
991
|
constructor(e, t) {
|
|
957
992
|
this.width = e, this.height = t;
|
|
958
993
|
}
|
|
@@ -963,31 +998,31 @@ var T = class e {
|
|
|
963
998
|
return this.#e(-e.width, -e.height);
|
|
964
999
|
}
|
|
965
1000
|
#e(t, n) {
|
|
966
|
-
return new e(
|
|
1001
|
+
return new e(F(this.width, t), F(this.height, n));
|
|
967
1002
|
}
|
|
968
1003
|
isGrowing() {
|
|
969
1004
|
return !!(this.width.grow || this.height.grow);
|
|
970
1005
|
}
|
|
971
|
-
},
|
|
1006
|
+
}, D = Object.freeze({
|
|
972
1007
|
px: 0,
|
|
973
1008
|
grow: 0
|
|
974
|
-
}), ke = new
|
|
975
|
-
function
|
|
1009
|
+
}), ke = new E(D, D);
|
|
1010
|
+
function O(e) {
|
|
976
1011
|
return !e.px && !e.grow && !e.minPx;
|
|
977
1012
|
}
|
|
978
1013
|
function Ae(e, t) {
|
|
979
1014
|
return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
|
|
980
1015
|
}
|
|
981
|
-
function
|
|
1016
|
+
function k(e) {
|
|
982
1017
|
return e || 0;
|
|
983
1018
|
}
|
|
984
1019
|
function je(e) {
|
|
985
|
-
return e && (
|
|
1020
|
+
return e && (u(e.px) || u(e.grow) || u(e.minPx) || u(e.maxPx));
|
|
986
1021
|
}
|
|
987
1022
|
function Me(e) {
|
|
988
|
-
if (
|
|
989
|
-
if (je(e)) return
|
|
990
|
-
if (
|
|
1023
|
+
if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
|
|
1024
|
+
if (je(e)) return A(e), I(e);
|
|
1025
|
+
if (u(e)) return {
|
|
991
1026
|
px: e,
|
|
992
1027
|
grow: 0
|
|
993
1028
|
};
|
|
@@ -999,26 +1034,26 @@ function Me(e) {
|
|
|
999
1034
|
}
|
|
1000
1035
|
function Ne(e, t, n) {
|
|
1001
1036
|
let r = !1;
|
|
1002
|
-
for (let t of e)
|
|
1037
|
+
for (let t of e) A(t), r ||= P(t);
|
|
1003
1038
|
if (!r) return Pe(e, t, n);
|
|
1004
1039
|
let i = Array(e.length).fill(0), a = [];
|
|
1005
|
-
for (let t = 0; t < e.length; t++)
|
|
1040
|
+
for (let t = 0; t < e.length; t++) O(e[t]) || a.push(t);
|
|
1006
1041
|
let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
|
|
1007
1042
|
for (let t of a) {
|
|
1008
1043
|
let n = e[t];
|
|
1009
|
-
|
|
1044
|
+
k(n.grow) || (i[t] = j(k(n.px), n), c.add(t));
|
|
1010
1045
|
}
|
|
1011
1046
|
for (;;) {
|
|
1012
1047
|
let t = 0, n = 0, r = 0;
|
|
1013
|
-
for (let o of a) c.has(o) ? r += i[o] : (t +=
|
|
1048
|
+
for (let o of a) c.has(o) ? r += i[o] : (t += k(e[o].px), n += k(e[o].grow));
|
|
1014
1049
|
if (!n) {
|
|
1015
|
-
for (let t of a) c.has(t) || (i[t] = k(
|
|
1050
|
+
for (let t of a) c.has(t) || (i[t] = j(k(e[t].px), e[t]), c.add(t));
|
|
1016
1051
|
break;
|
|
1017
1052
|
}
|
|
1018
1053
|
let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
|
|
1019
1054
|
for (let t of a) {
|
|
1020
1055
|
if (c.has(t)) continue;
|
|
1021
|
-
let r = e[t], a =
|
|
1056
|
+
let r = e[t], a = k(r.px) + k(r.grow) / n * o, s = j(a, r);
|
|
1022
1057
|
i[t] = s;
|
|
1023
1058
|
let f = s - a;
|
|
1024
1059
|
l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
|
|
@@ -1032,45 +1067,45 @@ function Ne(e, t, n) {
|
|
|
1032
1067
|
}
|
|
1033
1068
|
function Pe(e, t, n) {
|
|
1034
1069
|
let r = 0, i = 0;
|
|
1035
|
-
for (let t of e) r +=
|
|
1070
|
+
for (let t of e) r += k(t.px) + (O(t) ? 0 : n), i += k(t.grow);
|
|
1036
1071
|
r -= n;
|
|
1037
1072
|
let a = Math.max(0, t - r), o = Array(e.length);
|
|
1038
1073
|
for (let t = 0; t < e.length; t++) {
|
|
1039
1074
|
let n = e[t];
|
|
1040
|
-
o[t] =
|
|
1075
|
+
o[t] = O(n) ? 0 : k(n.px) + (i ? k(n.grow) / i * a : 0);
|
|
1041
1076
|
}
|
|
1042
1077
|
return o;
|
|
1043
1078
|
}
|
|
1044
|
-
function
|
|
1079
|
+
function A(e) {
|
|
1045
1080
|
if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
|
|
1046
1081
|
}
|
|
1047
|
-
function
|
|
1082
|
+
function j(e, t) {
|
|
1048
1083
|
return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
|
|
1049
1084
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return k(
|
|
1085
|
+
function M(e) {
|
|
1086
|
+
return j(k(e.px), e);
|
|
1052
1087
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return e.maxPx ?? (
|
|
1088
|
+
function N(e) {
|
|
1089
|
+
return e.maxPx ?? (k(e.grow) ? void 0 : M(e));
|
|
1055
1090
|
}
|
|
1056
|
-
function
|
|
1091
|
+
function P(e) {
|
|
1057
1092
|
return e.minPx !== void 0 || e.maxPx !== void 0;
|
|
1058
1093
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
1094
|
+
function F(e, t) {
|
|
1095
|
+
return I({
|
|
1061
1096
|
px: (e.px ?? 0) + t,
|
|
1062
1097
|
grow: e.grow,
|
|
1063
1098
|
minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
|
|
1064
1099
|
maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
|
|
1065
1100
|
});
|
|
1066
1101
|
}
|
|
1067
|
-
function
|
|
1068
|
-
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i =
|
|
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 >
|
|
1102
|
+
function I(e) {
|
|
1103
|
+
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = P(e);
|
|
1104
|
+
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 > k(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (k(t.grow) || e.maxPx < k(e.px)) && (t.maxPx = e.maxPx), t;
|
|
1070
1105
|
}
|
|
1071
1106
|
//#endregion
|
|
1072
1107
|
//#region ../core/src/view/layout/padding.js
|
|
1073
|
-
var
|
|
1108
|
+
var L = class e {
|
|
1074
1109
|
constructor(e, t, n, r) {
|
|
1075
1110
|
this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
|
|
1076
1111
|
}
|
|
@@ -1105,35 +1140,35 @@ var P = class e {
|
|
|
1105
1140
|
return this.top + this.bottom;
|
|
1106
1141
|
}
|
|
1107
1142
|
static createFromConfig(e) {
|
|
1108
|
-
return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) :
|
|
1143
|
+
return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : R;
|
|
1109
1144
|
}
|
|
1110
1145
|
static createFromRecord(t) {
|
|
1111
1146
|
return new e(t.top, t.right, t.bottom, t.left);
|
|
1112
1147
|
}
|
|
1113
1148
|
static zero() {
|
|
1114
|
-
return
|
|
1149
|
+
return R;
|
|
1115
1150
|
}
|
|
1116
1151
|
static createUniformPadding(t) {
|
|
1117
1152
|
return new e(t, t, t, t);
|
|
1118
1153
|
}
|
|
1119
1154
|
};
|
|
1120
|
-
function
|
|
1121
|
-
return t ? new
|
|
1155
|
+
function Fe(e, t) {
|
|
1156
|
+
return t ? new L(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;
|
|
1122
1157
|
}
|
|
1123
|
-
var
|
|
1124
|
-
Object.freeze(
|
|
1158
|
+
var R = L.createUniformPadding(0);
|
|
1159
|
+
Object.freeze(R);
|
|
1125
1160
|
//#endregion
|
|
1126
1161
|
//#region ../core/src/utils/url.js
|
|
1127
|
-
var
|
|
1128
|
-
function
|
|
1129
|
-
if (t &&
|
|
1162
|
+
var Ie = /^([A-Za-z]+:)?\/\//;
|
|
1163
|
+
function z(e, t) {
|
|
1164
|
+
if (t && Ie.test(t)) return t;
|
|
1130
1165
|
let n = typeof e == "function" ? e() : e;
|
|
1131
1166
|
if (!n) return t;
|
|
1132
1167
|
if (!t) return n;
|
|
1133
1168
|
if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
|
|
1134
|
-
return
|
|
1169
|
+
return B(n) + t;
|
|
1135
1170
|
}
|
|
1136
|
-
function
|
|
1171
|
+
function Le(e, t, n = Re()) {
|
|
1137
1172
|
let r = typeof e == "function" ? e() : e;
|
|
1138
1173
|
if (!t) return r;
|
|
1139
1174
|
try {
|
|
@@ -1142,68 +1177,68 @@ function ze(e, t, n = Ve()) {
|
|
|
1142
1177
|
return new URL(t, e).href;
|
|
1143
1178
|
} else if (n) return new URL(t, n).href;
|
|
1144
1179
|
} catch {}
|
|
1145
|
-
return
|
|
1180
|
+
return z(r, t);
|
|
1146
1181
|
}
|
|
1147
|
-
function
|
|
1182
|
+
function B(e) {
|
|
1148
1183
|
let t = e.replace(/[^/]*$/, "");
|
|
1149
1184
|
return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
|
|
1150
1185
|
}
|
|
1151
|
-
function
|
|
1186
|
+
function Re() {
|
|
1152
1187
|
if (typeof document < "u" && document.baseURI) return document.baseURI;
|
|
1153
1188
|
if (typeof window < "u" && window.location?.href) return window.location.href;
|
|
1154
1189
|
}
|
|
1155
1190
|
//#endregion
|
|
1156
1191
|
//#region ../core/src/utils/addBaseUrl.js
|
|
1157
|
-
function
|
|
1192
|
+
function ze(e, t) {
|
|
1158
1193
|
return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
|
|
1159
1194
|
}
|
|
1160
|
-
function
|
|
1195
|
+
function Be(e) {
|
|
1161
1196
|
if (!e) return e;
|
|
1162
1197
|
if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
|
|
1163
1198
|
return e.endsWith("/") ? e : e + "/";
|
|
1164
1199
|
}
|
|
1165
1200
|
//#endregion
|
|
1166
1201
|
//#region ../core/src/config/mergeConfig.js
|
|
1167
|
-
function
|
|
1168
|
-
return
|
|
1202
|
+
function V(e) {
|
|
1203
|
+
return n(e) && !Array.isArray(e);
|
|
1169
1204
|
}
|
|
1170
|
-
function
|
|
1205
|
+
function Ve(e) {
|
|
1171
1206
|
let t = {};
|
|
1172
|
-
for (let [n, r] of Object.entries(e)) t[n] =
|
|
1207
|
+
for (let [n, r] of Object.entries(e)) t[n] = H(r);
|
|
1173
1208
|
return t;
|
|
1174
1209
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return Array.isArray(e) ? e.map(
|
|
1210
|
+
function H(e) {
|
|
1211
|
+
return Array.isArray(e) ? e.map(H) : V(e) ? Ve(e) : e;
|
|
1177
1212
|
}
|
|
1178
|
-
function
|
|
1213
|
+
function He(e, t) {
|
|
1179
1214
|
for (let [n, r] of Object.entries(t)) {
|
|
1180
1215
|
if (r === void 0) continue;
|
|
1181
1216
|
let t = e[n];
|
|
1182
|
-
|
|
1217
|
+
V(r) && V(t) ? He(t, r) : e[n] = H(r);
|
|
1183
1218
|
}
|
|
1184
1219
|
return e;
|
|
1185
1220
|
}
|
|
1186
|
-
function
|
|
1221
|
+
function Ue(e) {
|
|
1187
1222
|
let t = {};
|
|
1188
|
-
for (let n of e) n &&
|
|
1223
|
+
for (let n of e) n && He(t, n);
|
|
1189
1224
|
return t;
|
|
1190
1225
|
}
|
|
1191
1226
|
//#endregion
|
|
1192
1227
|
//#region ../core/src/view/viewChrome.js
|
|
1193
|
-
var
|
|
1194
|
-
function
|
|
1195
|
-
|
|
1228
|
+
var U = /* @__PURE__ */ new WeakMap();
|
|
1229
|
+
function We(e, t) {
|
|
1230
|
+
U.set(e, t);
|
|
1196
1231
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
1232
|
+
function Ge(e) {
|
|
1233
|
+
return U.get(e);
|
|
1199
1234
|
}
|
|
1200
|
-
function
|
|
1201
|
-
return
|
|
1235
|
+
function Ke(e) {
|
|
1236
|
+
return U.has(e);
|
|
1202
1237
|
}
|
|
1203
|
-
function
|
|
1238
|
+
function qe(e) {
|
|
1204
1239
|
let t = e;
|
|
1205
1240
|
for (; t;) {
|
|
1206
|
-
let n =
|
|
1241
|
+
let n = U.get(t);
|
|
1207
1242
|
if (n === "excludeSubtree" || t === e && n === "exclude") return !0;
|
|
1208
1243
|
t = t.layoutParent;
|
|
1209
1244
|
}
|
|
@@ -1211,16 +1246,16 @@ function U(e) {
|
|
|
1211
1246
|
}
|
|
1212
1247
|
//#endregion
|
|
1213
1248
|
//#region ../core/src/view/postScaleParams.js
|
|
1214
|
-
var
|
|
1215
|
-
function
|
|
1216
|
-
|
|
1249
|
+
var Je = /* @__PURE__ */ new WeakMap();
|
|
1250
|
+
function Ye(e, t) {
|
|
1251
|
+
Je.set(e, t);
|
|
1217
1252
|
}
|
|
1218
|
-
function
|
|
1219
|
-
return
|
|
1253
|
+
function Xe(e) {
|
|
1254
|
+
return Je.get(e);
|
|
1220
1255
|
}
|
|
1221
1256
|
//#endregion
|
|
1222
1257
|
//#region ../core/src/data/namedDataScope.js
|
|
1223
|
-
var
|
|
1258
|
+
var Ze = class {
|
|
1224
1259
|
name;
|
|
1225
1260
|
owner;
|
|
1226
1261
|
getDefaultData;
|
|
@@ -1258,13 +1293,13 @@ var Ye = class {
|
|
|
1258
1293
|
dispose() {
|
|
1259
1294
|
this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
|
|
1260
1295
|
}
|
|
1261
|
-
},
|
|
1296
|
+
}, Qe = class {
|
|
1262
1297
|
view;
|
|
1263
1298
|
#e = /* @__PURE__ */ new Map();
|
|
1264
1299
|
#t = /* @__PURE__ */ new Map();
|
|
1265
1300
|
constructor(e) {
|
|
1266
1301
|
this.view = e;
|
|
1267
|
-
for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new
|
|
1302
|
+
for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Ze(t, e, () => n));
|
|
1268
1303
|
}
|
|
1269
1304
|
getLocalBinding(e) {
|
|
1270
1305
|
return this.#e.get(e);
|
|
@@ -1278,7 +1313,7 @@ var Ye = class {
|
|
|
1278
1313
|
let n = this.view.dataParent?.namedDataScope;
|
|
1279
1314
|
if (n) return n.resolve(e);
|
|
1280
1315
|
let r = this.#t.get(e);
|
|
1281
|
-
return r || (r = new
|
|
1316
|
+
return r || (r = new Ze(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
|
|
1282
1317
|
}
|
|
1283
1318
|
dispose() {
|
|
1284
1319
|
for (let e of this.#e.values()) e.dispose();
|
|
@@ -1286,7 +1321,7 @@ var Ye = class {
|
|
|
1286
1321
|
for (let e of this.#t.values()) e.dispose();
|
|
1287
1322
|
this.#t.clear();
|
|
1288
1323
|
}
|
|
1289
|
-
},
|
|
1324
|
+
}, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, $e = class {
|
|
1290
1325
|
spec;
|
|
1291
1326
|
namedDataScope;
|
|
1292
1327
|
#e;
|
|
@@ -1301,16 +1336,16 @@ var Ye = class {
|
|
|
1301
1336
|
#l = void 0;
|
|
1302
1337
|
#u = !1;
|
|
1303
1338
|
#d = [];
|
|
1304
|
-
opacityFunction =
|
|
1339
|
+
opacityFunction = K;
|
|
1305
1340
|
#f = [];
|
|
1306
1341
|
#p = "none";
|
|
1307
1342
|
#m = /* @__PURE__ */ new Map();
|
|
1308
|
-
facetCoords = new
|
|
1343
|
+
facetCoords = new ne([], JSON.stringify);
|
|
1309
1344
|
constructor(e, t, n, r, i, a = {}) {
|
|
1310
1345
|
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
|
|
1312
|
-
let o = r ? r.getConfigScopes() : [t.getBaseConfig()],
|
|
1313
|
-
this.#e = [...o,
|
|
1346
|
+
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
|
+
let o = r ? r.getConfigScopes() : [t.getBaseConfig()], c = e.config;
|
|
1348
|
+
this.#e = [...o, c].filter((e) => !!e), this.resolutions = {
|
|
1314
1349
|
scale: {},
|
|
1315
1350
|
axis: {},
|
|
1316
1351
|
legend: {}
|
|
@@ -1321,11 +1356,11 @@ var Ye = class {
|
|
|
1321
1356
|
}, this.flowHandle = void 0, this.needsAxes = {
|
|
1322
1357
|
x: !1,
|
|
1323
1358
|
y: !1
|
|
1324
|
-
}, this.paramRuntime = new
|
|
1325
|
-
let
|
|
1326
|
-
for (let e of
|
|
1359
|
+
}, this.paramRuntime = new w(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { snapTransitionedUpdates: !0 }), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => ae("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
|
|
1360
|
+
let l = [...e.params ?? [], ...Xe(e) ?? []];
|
|
1361
|
+
for (let e of l) {
|
|
1327
1362
|
if ("expr" in e) {
|
|
1328
|
-
let { usesScaleHelper: t, globals: n } =
|
|
1363
|
+
let { usesScaleHelper: t, globals: n } = s(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
|
|
1329
1364
|
if (t || r) {
|
|
1330
1365
|
this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
|
|
1331
1366
|
continue;
|
|
@@ -1351,18 +1386,18 @@ var Ye = class {
|
|
|
1351
1386
|
return this.#t;
|
|
1352
1387
|
}
|
|
1353
1388
|
getConfig() {
|
|
1354
|
-
return
|
|
1389
|
+
return Ue(this.#e);
|
|
1355
1390
|
}
|
|
1356
1391
|
getCursorSpec() {
|
|
1357
1392
|
return this.spec.cursor;
|
|
1358
1393
|
}
|
|
1359
1394
|
getCursor() {
|
|
1360
1395
|
let e = this.getCursorSpec();
|
|
1361
|
-
return
|
|
1396
|
+
return c(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
|
|
1362
1397
|
}
|
|
1363
1398
|
watchCursor(e, t) {
|
|
1364
1399
|
let n = this.getCursorSpec();
|
|
1365
|
-
|
|
1400
|
+
c(n) && this.paramRuntime.watchExpression(n.expr, e, {
|
|
1366
1401
|
scopeOwned: !1,
|
|
1367
1402
|
registerDisposer: t
|
|
1368
1403
|
});
|
|
@@ -1374,25 +1409,25 @@ var Ye = class {
|
|
|
1374
1409
|
return this.facetCoords.values().next().value;
|
|
1375
1410
|
}
|
|
1376
1411
|
getPadding() {
|
|
1377
|
-
return this._cache("size/padding", () =>
|
|
1412
|
+
return this._cache("size/padding", () => L.createFromConfig(this.spec.padding));
|
|
1378
1413
|
}
|
|
1379
1414
|
getOverhang() {
|
|
1380
|
-
return
|
|
1415
|
+
return L.zero();
|
|
1381
1416
|
}
|
|
1382
1417
|
isScrollable() {
|
|
1383
1418
|
return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
|
|
1384
1419
|
}
|
|
1385
1420
|
getSize() {
|
|
1386
|
-
return this._cache("size/size", () => this.isConfiguredVisible() ? new
|
|
1421
|
+
return this._cache("size/size", () => this.isConfiguredVisible() ? new E(this.#g("width"), this.#g("height")) : ke);
|
|
1387
1422
|
}
|
|
1388
1423
|
getViewportSize() {
|
|
1389
1424
|
if (!this.isScrollable()) return this.getSize();
|
|
1390
1425
|
if (!this.isConfiguredVisible()) return ke;
|
|
1391
1426
|
let e = this.getSize();
|
|
1392
|
-
return new
|
|
1427
|
+
return new E(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
|
|
1393
1428
|
}
|
|
1394
1429
|
#g(e) {
|
|
1395
|
-
let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i =
|
|
1430
|
+
let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = q(r), a = e == "viewportWidth" || e == "viewportHeight";
|
|
1396
1431
|
if (i) {
|
|
1397
1432
|
if (a) throw new y(`Cannot use step-based size with "${e}"!`, this);
|
|
1398
1433
|
let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
|
|
@@ -1401,18 +1436,18 @@ var Ye = class {
|
|
|
1401
1436
|
if (_(i.type)) n = i.domain().length;
|
|
1402
1437
|
else if (["locus", "index"].includes(i.type)) {
|
|
1403
1438
|
let e = i.domain();
|
|
1404
|
-
n =
|
|
1439
|
+
n = p(e) - e[0];
|
|
1405
1440
|
} else throw new y(`Cannot use step-based size with "${i.type}" scale!`, this);
|
|
1406
1441
|
let a = i;
|
|
1407
|
-
n =
|
|
1408
|
-
let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(),
|
|
1409
|
-
if (
|
|
1442
|
+
n = g(n, a.paddingInner(), a.paddingOuter());
|
|
1443
|
+
let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && _(s.type) ? "offset" : "position"), l = t;
|
|
1444
|
+
if (c == "offset") {
|
|
1410
1445
|
if (!s || !_(s.type)) throw new y(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
|
|
1411
|
-
let t = s, n =
|
|
1412
|
-
|
|
1446
|
+
let t = s, n = g(s.domain().length, t.paddingInner(), t.paddingOuter());
|
|
1447
|
+
l *= n / (1 - a.paddingInner());
|
|
1413
1448
|
}
|
|
1414
1449
|
return {
|
|
1415
|
-
px: n *
|
|
1450
|
+
px: n * l,
|
|
1416
1451
|
grow: 0
|
|
1417
1452
|
};
|
|
1418
1453
|
} else if (n) return {
|
|
@@ -1436,16 +1471,16 @@ var Ye = class {
|
|
|
1436
1471
|
};
|
|
1437
1472
|
}
|
|
1438
1473
|
#v(e) {
|
|
1439
|
-
if (
|
|
1474
|
+
if (qe(this)) return;
|
|
1440
1475
|
let t = this.getConfig().view;
|
|
1441
1476
|
if (!t) return;
|
|
1442
1477
|
let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
|
|
1443
1478
|
return r && !_(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
|
|
1444
1479
|
}
|
|
1445
1480
|
resolveSizeValue(e, t) {
|
|
1446
|
-
if (!
|
|
1481
|
+
if (!c(t)) return t;
|
|
1447
1482
|
let n = this.#C(e)();
|
|
1448
|
-
if (
|
|
1483
|
+
if (it(n) || n === "container") return n;
|
|
1449
1484
|
throw new y(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
|
|
1450
1485
|
}
|
|
1451
1486
|
registerSizeInvalidation() {
|
|
@@ -1453,7 +1488,7 @@ var Ye = class {
|
|
|
1453
1488
|
}
|
|
1454
1489
|
#y(e, t) {
|
|
1455
1490
|
let { value: n, implicit: r } = this.#_(e);
|
|
1456
|
-
if (!
|
|
1491
|
+
if (!q(n)) return;
|
|
1457
1492
|
let i = this.getScaleResolution(t);
|
|
1458
1493
|
if (!i) {
|
|
1459
1494
|
if (r) return;
|
|
@@ -1472,11 +1507,11 @@ var Ye = class {
|
|
|
1472
1507
|
}
|
|
1473
1508
|
#b(e) {
|
|
1474
1509
|
let { value: t } = this.#_(e);
|
|
1475
|
-
|
|
1510
|
+
c(t) ? this.#S(e, t.expr) : q(t) && c(t.step) && this.#S(e + ".step", t.step.expr);
|
|
1476
1511
|
}
|
|
1477
1512
|
#x(e, t) {
|
|
1478
|
-
let n =
|
|
1479
|
-
if (
|
|
1513
|
+
let n = c(t.step) ? this.#C(e + ".step")() : t.step;
|
|
1514
|
+
if (it(n)) return n;
|
|
1480
1515
|
throw new y(`"${e}.step" ExprRef must resolve to a finite number!`, this);
|
|
1481
1516
|
}
|
|
1482
1517
|
#S(e, t) {
|
|
@@ -1522,7 +1557,7 @@ var Ye = class {
|
|
|
1522
1557
|
return this.opacityFunction(1);
|
|
1523
1558
|
}
|
|
1524
1559
|
hasLocalOpacity() {
|
|
1525
|
-
return this.opacityFunction !==
|
|
1560
|
+
return this.opacityFunction !== K;
|
|
1526
1561
|
}
|
|
1527
1562
|
getPathString() {
|
|
1528
1563
|
return this.getLayoutAncestors().map((e) => e.name).reverse().join("/");
|
|
@@ -1608,7 +1643,7 @@ var Ye = class {
|
|
|
1608
1643
|
}
|
|
1609
1644
|
}
|
|
1610
1645
|
configureViewOpacity() {
|
|
1611
|
-
(!this.opacityFunction || this.opacityFunction ===
|
|
1646
|
+
(!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = tt(this));
|
|
1612
1647
|
}
|
|
1613
1648
|
finalizeParamRuntimeInitialization() {
|
|
1614
1649
|
this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
|
|
@@ -1620,8 +1655,8 @@ var Ye = class {
|
|
|
1620
1655
|
return this.#s;
|
|
1621
1656
|
}
|
|
1622
1657
|
arrange(e, t, n = {}) {
|
|
1623
|
-
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId,
|
|
1624
|
-
let e = this.getOverhang(), n = this.layoutParent ?
|
|
1658
|
+
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, d(t, l(n))), this.#a || this.#o) {
|
|
1659
|
+
let e = this.getOverhang(), n = this.layoutParent ? L.zero() : this.getPadding();
|
|
1625
1660
|
this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
|
|
1626
1661
|
}
|
|
1627
1662
|
this.#c = !0, this.#T();
|
|
@@ -1642,7 +1677,7 @@ var Ye = class {
|
|
|
1642
1677
|
}
|
|
1643
1678
|
getFacetFields(e) {
|
|
1644
1679
|
let t = this.getEncoding().sample;
|
|
1645
|
-
return
|
|
1680
|
+
return ee(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
|
|
1646
1681
|
}
|
|
1647
1682
|
usesSampleFacetRendering() {
|
|
1648
1683
|
return this.layoutParent?.usesSampleFacetRendering() ?? !1;
|
|
@@ -1654,15 +1689,15 @@ var Ye = class {
|
|
|
1654
1689
|
};
|
|
1655
1690
|
}
|
|
1656
1691
|
getScaleResolution(e) {
|
|
1657
|
-
let t =
|
|
1692
|
+
let t = m(e);
|
|
1658
1693
|
return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
|
|
1659
1694
|
}
|
|
1660
1695
|
getAxisResolution(e) {
|
|
1661
|
-
let t =
|
|
1696
|
+
let t = m(e);
|
|
1662
1697
|
return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
|
|
1663
1698
|
}
|
|
1664
1699
|
getLegendResolution(e) {
|
|
1665
|
-
let t =
|
|
1700
|
+
let t = m(e);
|
|
1666
1701
|
return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
|
|
1667
1702
|
}
|
|
1668
1703
|
getConfiguredResolution(e, t) {
|
|
@@ -1675,14 +1710,14 @@ var Ye = class {
|
|
|
1675
1710
|
return "independent";
|
|
1676
1711
|
}
|
|
1677
1712
|
getBaseUrl() {
|
|
1678
|
-
return
|
|
1713
|
+
return z(() => this.dataParent?.getBaseUrl(), Be(this.spec.baseUrl));
|
|
1679
1714
|
}
|
|
1680
1715
|
isPickingSupported() {
|
|
1681
1716
|
return !0;
|
|
1682
1717
|
}
|
|
1683
1718
|
getTitleText() {
|
|
1684
1719
|
let e = this.spec.title;
|
|
1685
|
-
if (e) return o(e) ? e :
|
|
1720
|
+
if (e) return o(e) ? e : c(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
|
|
1686
1721
|
}
|
|
1687
1722
|
_cache(e, t) {
|
|
1688
1723
|
return re(this, e, t);
|
|
@@ -1706,14 +1741,14 @@ var Ye = class {
|
|
|
1706
1741
|
}
|
|
1707
1742
|
propagateInteraction(e) {}
|
|
1708
1743
|
};
|
|
1709
|
-
function
|
|
1744
|
+
function et(e) {
|
|
1710
1745
|
return "unitsPerPixel" in e;
|
|
1711
1746
|
}
|
|
1712
|
-
function
|
|
1747
|
+
function tt(e) {
|
|
1713
1748
|
let t = "opacity" in e.spec ? e.spec.opacity : void 0;
|
|
1714
1749
|
if (t !== void 0) {
|
|
1715
|
-
if (
|
|
1716
|
-
if (
|
|
1750
|
+
if (u(t)) return (e) => e * t;
|
|
1751
|
+
if (et(t)) {
|
|
1717
1752
|
let n = (t) => {
|
|
1718
1753
|
let n = e.getScaleResolution(t), r = n?.getScale();
|
|
1719
1754
|
if ([
|
|
@@ -1724,44 +1759,44 @@ function $e(e) {
|
|
|
1724
1759
|
scale: r,
|
|
1725
1760
|
scaleResolution: n
|
|
1726
1761
|
};
|
|
1727
|
-
}, r =
|
|
1728
|
-
if (!
|
|
1729
|
-
let i = () => 1,
|
|
1730
|
-
let t =
|
|
1762
|
+
}, r = rt(t.values, "opacity.values", e);
|
|
1763
|
+
if (!a(t.unitsPerPixel)) throw new y("\"opacity.unitsPerPixel\" must be an array.", e);
|
|
1764
|
+
let i = () => 1, o = [], s = () => {
|
|
1765
|
+
let t = nt(rt(o.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = te().domain(t.unitsPerPixel).range(t.values).clamp(!0);
|
|
1731
1766
|
i = (e) => n(e);
|
|
1732
1767
|
};
|
|
1733
|
-
|
|
1734
|
-
if (
|
|
1768
|
+
o = t.unitsPerPixel.map((t) => {
|
|
1769
|
+
if (c(t)) {
|
|
1735
1770
|
let n = e.paramRuntime.watchExpression(t.expr, () => {
|
|
1736
|
-
|
|
1771
|
+
s(), e.context.animator.requestRender();
|
|
1737
1772
|
});
|
|
1738
1773
|
return () => n(null);
|
|
1739
1774
|
} else return () => t;
|
|
1740
|
-
}),
|
|
1741
|
-
let
|
|
1775
|
+
}), s();
|
|
1776
|
+
let l = (e) => {
|
|
1742
1777
|
let t = e.scaleResolution.getAxisLength() || 1e3;
|
|
1743
|
-
return
|
|
1744
|
-
},
|
|
1778
|
+
return f(e.scale.domain()) / t;
|
|
1779
|
+
}, u;
|
|
1745
1780
|
if (t.channel === "auto") {
|
|
1746
1781
|
let t = n("x"), r = n("y");
|
|
1747
|
-
if (t && r)
|
|
1748
|
-
else if (t)
|
|
1749
|
-
else if (r)
|
|
1782
|
+
if (t && r) u = () => (l(t) + l(r)) / 2;
|
|
1783
|
+
else if (t) u = () => l(t);
|
|
1784
|
+
else if (r) u = () => l(r);
|
|
1750
1785
|
else throw new y("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
|
|
1751
1786
|
} else {
|
|
1752
1787
|
let r = t.channel ? n(t.channel) : n("x") ?? n("y");
|
|
1753
1788
|
if (!r) throw new y("Cannot find a resolved quantitative scale for dynamic opacity!", e);
|
|
1754
|
-
|
|
1789
|
+
u = () => l(r);
|
|
1755
1790
|
}
|
|
1756
|
-
return (e) => i(
|
|
1757
|
-
} else if (
|
|
1791
|
+
return (e) => i(u()) * e;
|
|
1792
|
+
} else if (c(t)) {
|
|
1758
1793
|
let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
|
|
1759
1794
|
return (e) => n(null) * e;
|
|
1760
1795
|
}
|
|
1761
1796
|
}
|
|
1762
|
-
return
|
|
1797
|
+
return K;
|
|
1763
1798
|
}
|
|
1764
|
-
function
|
|
1799
|
+
function nt(e, t, n) {
|
|
1765
1800
|
if (!e.length) throw new y("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
|
|
1766
1801
|
if (e.length !== t.length) throw new y("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
|
|
1767
1802
|
e.forEach((e, t) => {
|
|
@@ -1779,155 +1814,155 @@ function et(e, t, n) {
|
|
|
1779
1814
|
values: a
|
|
1780
1815
|
};
|
|
1781
1816
|
}
|
|
1782
|
-
function
|
|
1783
|
-
if (!
|
|
1784
|
-
return e.map((e,
|
|
1785
|
-
if (!
|
|
1817
|
+
function rt(e, t, n) {
|
|
1818
|
+
if (!a(e)) throw new y("\"" + t + "\" must evaluate to an array.", n);
|
|
1819
|
+
return e.map((e, r) => {
|
|
1820
|
+
if (!u(e) || !Number.isFinite(e)) throw new y("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
|
|
1786
1821
|
return e;
|
|
1787
1822
|
});
|
|
1788
1823
|
}
|
|
1789
|
-
var
|
|
1790
|
-
function
|
|
1824
|
+
var q = (e) => !!e && typeof e == "object" && "step" in e;
|
|
1825
|
+
function it(e) {
|
|
1791
1826
|
return typeof e == "number" && Number.isFinite(e);
|
|
1792
1827
|
}
|
|
1793
|
-
var
|
|
1794
|
-
function
|
|
1795
|
-
|
|
1828
|
+
var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
|
|
1829
|
+
function at(e, t) {
|
|
1830
|
+
st(e, t, "Import");
|
|
1796
1831
|
}
|
|
1797
|
-
function
|
|
1798
|
-
|
|
1832
|
+
function ot(e, t) {
|
|
1833
|
+
st(e, t, "View");
|
|
1799
1834
|
}
|
|
1800
|
-
function
|
|
1835
|
+
function st(e, t, n) {
|
|
1801
1836
|
if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
|
|
1802
|
-
|
|
1837
|
+
J.set(e, { name: t });
|
|
1803
1838
|
}
|
|
1804
|
-
function
|
|
1805
|
-
return
|
|
1839
|
+
function ct(e) {
|
|
1840
|
+
return J.get(e);
|
|
1806
1841
|
}
|
|
1807
|
-
function
|
|
1842
|
+
function lt(e, t = {}) {
|
|
1808
1843
|
let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
|
|
1809
|
-
|
|
1844
|
+
Y.set(e, n);
|
|
1810
1845
|
}
|
|
1811
|
-
function
|
|
1812
|
-
|
|
1846
|
+
function ut(e, t = {}) {
|
|
1847
|
+
We(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
|
|
1813
1848
|
}
|
|
1814
|
-
function
|
|
1815
|
-
return e.getLayoutAncestors().some(
|
|
1849
|
+
function dt(e) {
|
|
1850
|
+
return e.getLayoutAncestors().some(Ke);
|
|
1816
1851
|
}
|
|
1817
|
-
function
|
|
1852
|
+
function X(e) {
|
|
1818
1853
|
let t = e.getDataAncestors(), n = [];
|
|
1819
1854
|
for (let e = t.length - 1; e >= 0; --e) {
|
|
1820
|
-
let r =
|
|
1855
|
+
let r = J.get(t[e]);
|
|
1821
1856
|
r && typeof r.name == "string" && n.push(r.name);
|
|
1822
1857
|
}
|
|
1823
1858
|
return n;
|
|
1824
1859
|
}
|
|
1825
|
-
function
|
|
1860
|
+
function ft(e) {
|
|
1826
1861
|
let t = e.explicitName;
|
|
1827
1862
|
if (!t) throw Error("Cannot build a selector for a view without a name.");
|
|
1828
1863
|
return {
|
|
1829
|
-
scope:
|
|
1864
|
+
scope: X(e),
|
|
1830
1865
|
view: t
|
|
1831
1866
|
};
|
|
1832
1867
|
}
|
|
1833
|
-
function
|
|
1868
|
+
function pt(e, t) {
|
|
1834
1869
|
if (!t) throw Error("Cannot build a selector for a parameter without a name.");
|
|
1835
1870
|
return {
|
|
1836
|
-
scope:
|
|
1871
|
+
scope: X(e),
|
|
1837
1872
|
param: t
|
|
1838
1873
|
};
|
|
1839
1874
|
}
|
|
1840
|
-
function
|
|
1841
|
-
return
|
|
1875
|
+
function mt(e) {
|
|
1876
|
+
return St(e), "p:" + JSON.stringify({
|
|
1842
1877
|
scope: e.scope,
|
|
1843
1878
|
param: e.param
|
|
1844
1879
|
});
|
|
1845
1880
|
}
|
|
1846
|
-
function
|
|
1881
|
+
function ht(e, t) {
|
|
1847
1882
|
e.visit((e) => {
|
|
1848
|
-
let n =
|
|
1849
|
-
if (n === "excludeSubtree") return
|
|
1883
|
+
let n = Ge(e);
|
|
1884
|
+
if (n === "excludeSubtree") return W;
|
|
1850
1885
|
if (n !== "exclude") return t(e);
|
|
1851
1886
|
});
|
|
1852
1887
|
}
|
|
1853
|
-
function
|
|
1888
|
+
function gt(e, t) {
|
|
1854
1889
|
e.visit((e) => {
|
|
1855
|
-
let n =
|
|
1856
|
-
if (n === "excludeSubtree") return
|
|
1890
|
+
let n = Y.get(e);
|
|
1891
|
+
if (n === "excludeSubtree") return W;
|
|
1857
1892
|
if (n !== "exclude") return t(e);
|
|
1858
1893
|
});
|
|
1859
1894
|
}
|
|
1860
|
-
function
|
|
1861
|
-
if (
|
|
1895
|
+
function _t(e, t) {
|
|
1896
|
+
if (Ct(t), !jt(e, t.scope)) return;
|
|
1862
1897
|
let n = [];
|
|
1863
|
-
if (
|
|
1898
|
+
if (Q(e, t.scope, (e) => {
|
|
1864
1899
|
e.explicitName === t.view && n.push(e);
|
|
1865
1900
|
}, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
|
|
1866
1901
|
if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
|
|
1867
1902
|
}
|
|
1868
|
-
function
|
|
1869
|
-
if (
|
|
1903
|
+
function vt(e, t) {
|
|
1904
|
+
if (St(t), !jt(e, t.scope)) return;
|
|
1870
1905
|
let n = [];
|
|
1871
|
-
if (
|
|
1872
|
-
for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param &&
|
|
1906
|
+
if (Q(e, t.scope, (e) => {
|
|
1907
|
+
for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Z(i) && n.push({
|
|
1873
1908
|
view: e,
|
|
1874
1909
|
param: i
|
|
1875
1910
|
});
|
|
1876
1911
|
}), n.length === 1) return n[0];
|
|
1877
1912
|
if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
|
|
1878
1913
|
}
|
|
1879
|
-
function
|
|
1914
|
+
function yt(e, t) {
|
|
1880
1915
|
e.visit((e) => {
|
|
1881
|
-
let n =
|
|
1882
|
-
if (n === "excludeSubtree") return
|
|
1883
|
-
if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs)
|
|
1916
|
+
let n = Y.get(e);
|
|
1917
|
+
if (n === "excludeSubtree") return W;
|
|
1918
|
+
if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Z(r) && t({
|
|
1884
1919
|
view: e,
|
|
1885
1920
|
param: r,
|
|
1886
|
-
selector:
|
|
1921
|
+
selector: pt(e, n)
|
|
1887
1922
|
});
|
|
1888
1923
|
});
|
|
1889
1924
|
}
|
|
1890
|
-
function
|
|
1925
|
+
function bt(e) {
|
|
1891
1926
|
let t = [];
|
|
1892
|
-
return
|
|
1927
|
+
return yt(e, (e) => t.push(e)), t;
|
|
1893
1928
|
}
|
|
1894
|
-
function
|
|
1929
|
+
function xt(e) {
|
|
1895
1930
|
let t = [];
|
|
1896
|
-
for (let n of
|
|
1897
|
-
let r =
|
|
1898
|
-
|
|
1931
|
+
for (let n of wt(e)) {
|
|
1932
|
+
let r = Tt(n);
|
|
1933
|
+
Dt(e, r, t), Ot(e, r, t);
|
|
1899
1934
|
}
|
|
1900
1935
|
return t;
|
|
1901
1936
|
}
|
|
1902
|
-
function
|
|
1937
|
+
function St(e) {
|
|
1903
1938
|
if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
|
|
1904
1939
|
if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
|
|
1905
1940
|
}
|
|
1906
|
-
function
|
|
1941
|
+
function Ct(e) {
|
|
1907
1942
|
if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
|
|
1908
1943
|
if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
|
|
1909
1944
|
}
|
|
1910
|
-
function
|
|
1945
|
+
function Z(t) {
|
|
1911
1946
|
return t.persist === !1 ? !1 : i(t) ? !0 : e(t) ? !!t.bind : !1;
|
|
1912
1947
|
}
|
|
1913
|
-
function
|
|
1948
|
+
function wt(e) {
|
|
1914
1949
|
let t = /* @__PURE__ */ new Set([e]);
|
|
1915
1950
|
return e.visit((e) => {
|
|
1916
|
-
let n =
|
|
1951
|
+
let n = J.get(e);
|
|
1917
1952
|
n && typeof n.name == "string" && t.add(e);
|
|
1918
1953
|
}), Array.from(t);
|
|
1919
1954
|
}
|
|
1920
|
-
function
|
|
1921
|
-
return
|
|
1955
|
+
function Tt(e) {
|
|
1956
|
+
return X(e);
|
|
1922
1957
|
}
|
|
1923
|
-
function
|
|
1958
|
+
function Et(e) {
|
|
1924
1959
|
return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
|
|
1925
1960
|
}
|
|
1926
|
-
function
|
|
1961
|
+
function Dt(e, t, n) {
|
|
1927
1962
|
let r = /* @__PURE__ */ new Map();
|
|
1928
|
-
|
|
1963
|
+
Q(e, t, (e) => {
|
|
1929
1964
|
for (let [t, n] of e.paramRuntime.paramConfigs) {
|
|
1930
|
-
if (!
|
|
1965
|
+
if (!Z(n)) continue;
|
|
1931
1966
|
let i = r.get(t);
|
|
1932
1967
|
i ? i.push(e) : r.set(t, [e]);
|
|
1933
1968
|
}
|
|
@@ -1936,53 +1971,53 @@ function Tt(e, t, n) {
|
|
|
1936
1971
|
if (i.length <= 1) continue;
|
|
1937
1972
|
let r = i.map((e) => e.getPathString()).join(", ");
|
|
1938
1973
|
n.push({
|
|
1939
|
-
message: "Bookmarkable parameter \"" + e + "\" is not unique within " +
|
|
1974
|
+
message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Et(t) + ". Found in: " + r + ".",
|
|
1940
1975
|
scope: t
|
|
1941
1976
|
});
|
|
1942
1977
|
}
|
|
1943
1978
|
}
|
|
1944
|
-
function
|
|
1945
|
-
let r =
|
|
1979
|
+
function Ot(e, t, n) {
|
|
1980
|
+
let r = kt(e, t);
|
|
1946
1981
|
if (!r.length) return;
|
|
1947
|
-
let i = r.filter((e) =>
|
|
1982
|
+
let i = r.filter((e) => At(e));
|
|
1948
1983
|
if (i.length <= 1) return;
|
|
1949
1984
|
let a = /* @__PURE__ */ new Map();
|
|
1950
1985
|
for (let e of i) {
|
|
1951
|
-
let t =
|
|
1986
|
+
let t = J.get(e), n = t ? t.name : void 0;
|
|
1952
1987
|
typeof n != "string" || !n.length || a.set(n, (a.get(n) ?? 0) + 1);
|
|
1953
1988
|
}
|
|
1954
1989
|
for (let [e, r] of a) r > 1 && n.push({
|
|
1955
|
-
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " +
|
|
1990
|
+
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Et(t) + ".",
|
|
1956
1991
|
scope: t
|
|
1957
1992
|
});
|
|
1958
1993
|
}
|
|
1959
|
-
function
|
|
1994
|
+
function kt(e, t) {
|
|
1960
1995
|
let n = [];
|
|
1961
|
-
return
|
|
1962
|
-
if (
|
|
1963
|
-
let r =
|
|
1996
|
+
return Q(e, t, (e) => {
|
|
1997
|
+
if (X(e).length !== t.length + 1) return;
|
|
1998
|
+
let r = J.get(e);
|
|
1964
1999
|
!r || typeof r.name != "string" || n.push(e);
|
|
1965
2000
|
}, { includeNamedImportRoots: !0 }), n;
|
|
1966
2001
|
}
|
|
1967
|
-
function
|
|
2002
|
+
function At(e) {
|
|
1968
2003
|
let t = !1;
|
|
1969
2004
|
return e.visit((e) => {
|
|
1970
|
-
let n =
|
|
1971
|
-
if (n === "excludeSubtree") return
|
|
2005
|
+
let n = Y.get(e);
|
|
2006
|
+
if (n === "excludeSubtree") return W;
|
|
1972
2007
|
if (n !== "exclude") {
|
|
1973
|
-
for (let n of e.paramRuntime.paramConfigs.values()) if (
|
|
2008
|
+
for (let n of e.paramRuntime.paramConfigs.values()) if (Z(n)) return t = !0, G;
|
|
1974
2009
|
}
|
|
1975
2010
|
}), t;
|
|
1976
2011
|
}
|
|
1977
|
-
function
|
|
2012
|
+
function jt(e, t) {
|
|
1978
2013
|
let n = e, r = [];
|
|
1979
2014
|
for (let i of t) {
|
|
1980
2015
|
if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
|
|
1981
2016
|
let t, a = !1;
|
|
1982
|
-
if (
|
|
1983
|
-
let n =
|
|
1984
|
-
if (!(!n || n.name !== i) &&
|
|
1985
|
-
if (t) return a = !0,
|
|
2017
|
+
if (Q(e, r, (e) => {
|
|
2018
|
+
let n = J.get(e);
|
|
2019
|
+
if (!(!n || n.name !== i) && X(e).length === r.length + 1) {
|
|
2020
|
+
if (t) return a = !0, G;
|
|
1986
2021
|
t = e;
|
|
1987
2022
|
}
|
|
1988
2023
|
}, { includeNamedImportRoots: !0 }), a) throw Error("Multiple import instances named \"" + i + "\" in scope.");
|
|
@@ -1991,25 +2026,25 @@ function kt(e, t) {
|
|
|
1991
2026
|
}
|
|
1992
2027
|
return n;
|
|
1993
2028
|
}
|
|
1994
|
-
function
|
|
2029
|
+
function Q(e, t, n, r = {}) {
|
|
1995
2030
|
let i = r.includeNamedImportRoots ?? !1;
|
|
1996
2031
|
e.visit((e) => {
|
|
1997
|
-
let r =
|
|
1998
|
-
if (a === "excludeSubtree") return
|
|
1999
|
-
if (a !== "exclude" &&
|
|
2032
|
+
let r = J.get(e), a = Y.get(e);
|
|
2033
|
+
if (a === "excludeSubtree") return W;
|
|
2034
|
+
if (a !== "exclude" && Mt(e, t, r, i)) return n(e);
|
|
2000
2035
|
});
|
|
2001
2036
|
}
|
|
2002
|
-
function
|
|
2003
|
-
let i =
|
|
2004
|
-
return
|
|
2037
|
+
function Mt(e, t, n, r) {
|
|
2038
|
+
let i = X(e);
|
|
2039
|
+
return Nt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : $(t, i);
|
|
2005
2040
|
}
|
|
2006
|
-
function
|
|
2007
|
-
return e.length === t.length &&
|
|
2041
|
+
function Nt(e, t) {
|
|
2042
|
+
return e.length === t.length && $(e, t);
|
|
2008
2043
|
}
|
|
2009
|
-
function
|
|
2044
|
+
function $(e, t) {
|
|
2010
2045
|
if (e.length > t.length) return !1;
|
|
2011
2046
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
2012
2047
|
return !0;
|
|
2013
2048
|
}
|
|
2014
2049
|
//#endregion
|
|
2015
|
-
export {
|
|
2050
|
+
export { E as A, w as B, Ue as C, Le as D, B as E, M as F, b as G, C as H, we as I, Me as L, De as M, Te as N, L as O, N as P, Oe as R, qe as S, z as T, ve as U, be as V, ye as W, W as _, ft as a, Ye as b, ut as c, ot as d, vt as f, ht as g, gt as h, X as i, D as j, Fe as k, lt as l, xt as m, ct as n, dt as o, _t as p, pt as r, mt as s, bt as t, at as u, G as v, ze as w, Ke as x, $e as y, Ee as z };
|