@genome-spy/app 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
  2. package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
  3. package/dist/{agentApi-sPuuT0KS.js → agentApi-BclFF9zB.js} +9981 -8914
  4. package/dist/agentApi.es.js +6783 -5135
  5. package/dist/agentShared.es.js +433 -460
  6. package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
  7. package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
  8. package/dist/{canvas2d-iDK4BC5j.js → canvas2d-8MSf70d4.js} +141 -134
  9. package/dist/{canvas2d-MXaFeZnP.js → canvas2d-BwGNI_Rx.js} +147 -141
  10. package/dist/clipOptions-SrrxeAEU.js +4316 -0
  11. package/dist/clipOptions-clBEbkjv.js +4326 -0
  12. package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
  13. package/dist/color-uTRRsy8i.js +116 -0
  14. package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
  15. package/dist/{viewIdentityRegistry-BIYd4TE0.js → containerView-BItRtKqu.js} +28 -31
  16. package/dist/{viewIdentityRegistry-BDKkEjXl.js → containerView-CWa6ZIJW.js} +28 -31
  17. package/dist/{debug-DbigmdrK.js → debug-23s-jja_.js} +10 -9
  18. package/dist/{debug-BlqDxTw3.js → debug-CWRxvAss.js} +9 -10
  19. package/dist/dialog.es.js +1 -1
  20. package/dist/dist-CmY6iewb.js +1501 -0
  21. package/dist/dist-D6xbz5Ks.js +1501 -0
  22. package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
  23. package/dist/esm-BUkWqSr2.js +299 -0
  24. package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
  25. package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
  26. package/dist/esm-C6erfjPM.js +252 -0
  27. package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
  28. package/dist/esm-CqY5ezGz.js +1249 -0
  29. package/dist/esm-DfMIJ_N2.js +1522 -0
  30. package/dist/esm-Dls41IbZ.js +787 -0
  31. package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
  32. package/dist/esm-aGLCvYRP.js +238 -0
  33. package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
  34. package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
  35. package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
  36. package/dist/flowNode-BSjy0Wz3.js +1306 -0
  37. package/dist/flowOutput-D5qpxWe0.js +183 -0
  38. package/dist/index.es.js +4766 -5522
  39. package/dist/index.js +1089 -685
  40. package/dist/inflate-BdC5KvHn.js +886 -0
  41. package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
  42. package/dist/markUtils-RaatLEa-.js +78 -0
  43. package/dist/{metadataChannels-DV62inJh.js → metadataChannels-DLSmx7kU.js} +6 -3
  44. package/dist/metadataUtils-DxEPe0vj.js +879 -0
  45. package/dist/order-BnKzKjt4.js +1151 -0
  46. package/dist/order-BpJnq_nV.js +1150 -0
  47. package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
  48. package/dist/{rasterExport-B62RmAK1.js → rasterExport-B-WrX1pa.js} +5 -5
  49. package/dist/{rasterExport-DQH3hVg_.js → rasterExport-C_vx4Jwd.js} +4 -4
  50. package/dist/{rasterization-B05bDo5e.js → rasterization-QktH8Sn2.js} +26 -19
  51. package/dist/rectangle-BAdoDPXu.js +194 -0
  52. package/dist/{rectangle-DE98gIxF.js → rectangle-DZTR6NFQ.js} +10 -1
  53. package/dist/renderCanvas2D-CsRO78Pq.js +291 -0
  54. package/dist/{renderCanvas2D-Bdv-B4wj.js → renderCanvas2D-Y7pkRzbC.js} +98 -92
  55. package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
  56. package/dist/{indexer-DbFTKGlm.js → scaleNull-CVzag4z8.js} +2 -12
  57. package/dist/{indexer-En7gpvLN.js → scaleNull-Pbz7QGnl.js} +2 -12
  58. package/dist/{scalePosition-ByvlXaML.js → scalePosition-CRXa0rCC.js} +8 -1
  59. package/dist/schema.json +33403 -16929
  60. package/dist/style.css +1 -1
  61. package/dist/{svg-N3tj05-e.js → svg-BBMtLgtM.js} +445 -362
  62. package/dist/{svg-DHsq1RpV.js → svg-JjWL6U-T.js} +464 -381
  63. package/dist/{svgRasterizer-CYVDlt5z.js → svgRasterizer-6OcftuoI.js} +3 -3
  64. package/dist/{svgRasterizer-CvCBlxLj.js → svgRasterizer-DkNRaCPs.js} +4 -4
  65. package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
  66. package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
  67. package/dist/url-DeOdSRrv.js +183 -0
  68. package/dist/viewError-B0TMfOpB.js +33 -0
  69. package/dist/viewError-D9aO90cI.js +33 -0
  70. package/dist/{viewSelectors-DDLW-byr.js → viewSelectors-DkFvo33d.js} +914 -752
  71. package/dist/{viewSelectors-j-F9XwsE.js → viewSelectors-lM93fHAq.js} +942 -780
  72. package/dist/viewUtils-0SJOewM6.js +6195 -0
  73. package/dist/webgl-CXIO3OQz.js +5782 -0
  74. package/dist/webgl-Pdvfhio5.js +5783 -0
  75. package/package.json +7 -5
  76. package/src/agentApi/index.d.ts +3 -2
  77. package/src/agentShared/index.d.ts +2 -0
  78. package/src/appTypes.d.ts +1 -6
  79. package/src/embedTypes.d.ts +36 -1
  80. package/src/index.d.ts +6 -0
  81. package/src/spec/sampleView.d.ts +68 -13
  82. package/src/spec/view.d.ts +44 -5
  83. package/src/state/paramProvenanceTypes.d.ts +25 -2
  84. package/src/state.d.ts +14 -52
  85. package/dist/clipOptions-B5PibDq3.js +0 -2923
  86. package/dist/clipOptions-Cba4I0AO.js +0 -2903
  87. package/dist/esm-Dndm-NaA.js +0 -1193
  88. package/dist/order-B4uR9Q04.js +0 -1062
  89. package/dist/order-BSPy5DI8.js +0 -1062
  90. package/dist/renderCanvas2D-ChdoHGrU.js +0 -285
  91. package/dist/vega-scale-Byaw1K8O.js +0 -2446
  92. package/dist/vega-scale-Ctz_wa3z.js +0 -2443
  93. package/dist/viewError-BiR9VCgL.js +0 -29
  94. package/dist/viewUtils-JX6CMEYH.js +0 -6664
  95. package/dist/webgl-DdmOwEH0.js +0 -5544
  96. package/dist/webgl-Dw8xqZpX.js +0 -5544
@@ -1,2903 +0,0 @@
1
- //#region ../../node_modules/vega-util/build/vega-util.js
2
- function e(e, t, n) {
3
- return e.fields = t || [], e.fname = n, e;
4
- }
5
- function t(e) {
6
- return e == null ? null : e.fname;
7
- }
8
- function n(e) {
9
- return e == null ? null : e.fields;
10
- }
11
- function r(e) {
12
- return e.length === 1 ? i(e[0]) : a(e);
13
- }
14
- var i = (e) => function(t) {
15
- return t[e];
16
- }, a = (e) => {
17
- let t = e.length;
18
- return function(n) {
19
- for (let r = 0; r < t; ++r) n = n[e[r]];
20
- return n;
21
- };
22
- };
23
- function o(e) {
24
- throw Error(e);
25
- }
26
- function s(e) {
27
- let t = [], n = e.length, r = null, i = 0, a = "", s, c, l;
28
- e += "";
29
- function u() {
30
- t.push(a + e.substring(s, c)), a = "", s = c + 1;
31
- }
32
- for (s = c = 0; c < n; ++c) if (l = e[c], l === "\\") a += e.substring(s, c++), s = c;
33
- else if (l === r) u(), r = null, i = -1;
34
- else if (r) continue;
35
- else s === i && l === "\"" || s === i && l === "'" ? (s = c + 1, r = l) : l === "." && !i ? c > s ? u() : s = c + 1 : l === "[" ? (c > s && u(), i = s = c + 1) : l === "]" && (i || o("Access path missing open bracket: " + e), i > 0 && u(), i = 0, s = c + 1);
36
- return i && o("Access path missing closing bracket: " + e), r && o("Access path missing closing quote: " + e), c > s && (c++, u()), t;
37
- }
38
- function c(t, n, i) {
39
- let a = s(t);
40
- return t = a.length === 1 ? a[0] : t, e((i && i.get || r)(a), [t], n || t);
41
- }
42
- c("id");
43
- var l = e((e) => e, [], "identity");
44
- e(() => 0, [], "zero"), e(() => 1, [], "one"), e(() => !0, [], "true"), e(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
45
- var u = Array.isArray;
46
- function d(e) {
47
- return e === Object(e);
48
- }
49
- function f(e) {
50
- return e[e.length - 1];
51
- }
52
- function p(e) {
53
- return e == null || e === "" ? null : +e;
54
- }
55
- var m = (e) => (t) => e * Math.exp(t), h = (e) => (t) => Math.log(e * t), ee = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), g = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, _ = (e) => (t) => t < 0 ? -((-t) ** +e) : t ** +e;
56
- function v(e, t, n, r) {
57
- let i = n(e[0]), a = n(f(e)), o = (a - i) * t;
58
- return [r(i - o), r(a - o)];
59
- }
60
- function te(e, t) {
61
- return v(e, t, p, l);
62
- }
63
- function ne(e, t) {
64
- var n = Math.sign(e[0]);
65
- return v(e, t, h(n), m(n));
66
- }
67
- function re(e, t, n) {
68
- return v(e, t, _(n), _(1 / n));
69
- }
70
- function ie(e, t, n, r, i) {
71
- let a = r(e[0]), o = r(f(e)), s = t == null ? (a + o) / 2 : r(t);
72
- return [i(s + (a - s) * n), i(s + (o - s) * n)];
73
- }
74
- function y(e, t, n) {
75
- return ie(e, t, n, p, l);
76
- }
77
- function b(e, t, n) {
78
- let r = Math.sign(e[0]);
79
- return ie(e, t, n, h(r), m(r));
80
- }
81
- function x(e, t, n, r) {
82
- return ie(e, t, n, _(r), _(1 / r));
83
- }
84
- function ae(e, t, n, r) {
85
- return ie(e, t, n, ee(r), g(r));
86
- }
87
- function oe(e) {
88
- return e == null ? [] : u(e) ? e : [e];
89
- }
90
- function se(e, t, n) {
91
- let r = e[0], i = e[1], a;
92
- return i < r && (a = i, i = r, r = a), a = i - r, a >= n - t ? [t, n] : [r = Math.min(Math.max(r, t), n - a), r + a];
93
- }
94
- function ce(e) {
95
- return typeof e == "function";
96
- }
97
- var le = "descending";
98
- function ue(t, r, i) {
99
- i ||= {}, r = oe(r) || [];
100
- let a = [], o = [], s = {}, l = i.comparator || fe;
101
- return oe(t).forEach((e, t) => {
102
- e != null && (a.push(r[t] === le ? -1 : 1), o.push(e = ce(e) ? e : c(e, null, i)), (n(e) || []).forEach((e) => s[e] = 1));
103
- }), o.length === 0 ? null : e(l(o, a), Object.keys(s));
104
- }
105
- var de = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, (e = e instanceof Date ? +e : e) !== e && t === t ? -1 : +(t !== t && e === e)), fe = (e, t) => e.length === 1 ? pe(e[0], t[0]) : me(e, t, e.length), pe = (e, t) => function(n, r) {
106
- return de(e(n), e(r)) * t;
107
- }, me = (e, t, n) => (t.push(0), function(r, i) {
108
- let a, o = 0, s = -1;
109
- for (; o === 0 && ++s < n;) a = e[s], o = de(a(r), a(i));
110
- return o * t[s];
111
- });
112
- function he(e, t, n, r) {
113
- let i = t[0], a = t[t.length - 1], o;
114
- return i > a && (o = i, i = a, a = o), n = n === void 0 || n, r = r === void 0 || r, (n ? i <= e : i < e) && (r ? e <= a : e < a);
115
- }
116
- function ge(e) {
117
- return typeof e == "boolean";
118
- }
119
- function _e(e) {
120
- return typeof e == "number";
121
- }
122
- function ve(e) {
123
- return Object.prototype.toString.call(e) === "[object RegExp]";
124
- }
125
- function S(e) {
126
- return typeof e == "string";
127
- }
128
- function ye(e, t) {
129
- let n = e[0], r = f(e), i = +t;
130
- return i ? i === 1 ? r : n + i * (r - n) : n;
131
- }
132
- function be(e) {
133
- return e && f(e) - e[0] || 0;
134
- }
135
- function xe(e) {
136
- return u(e) ? `[${e.map((e) => e === null ? "null" : xe(e))}]` : d(e) || S(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
137
- }
138
- function Se(e) {
139
- let t = {}, n = e.length;
140
- for (let r = 0; r < n; ++r) t[e[r]] = !0;
141
- return t;
142
- }
143
- //#endregion
144
- //#region ../../node_modules/internmap/src/index.js
145
- var Ce = class extends Map {
146
- constructor(e, t = De) {
147
- if (super(), Object.defineProperties(this, {
148
- _intern: { value: /* @__PURE__ */ new Map() },
149
- _key: { value: t }
150
- }), e != null) for (let [t, n] of e) this.set(t, n);
151
- }
152
- get(e) {
153
- return super.get(we(this, e));
154
- }
155
- has(e) {
156
- return super.has(we(this, e));
157
- }
158
- set(e, t) {
159
- return super.set(Te(this, e), t);
160
- }
161
- delete(e) {
162
- return super.delete(Ee(this, e));
163
- }
164
- };
165
- function we({ _intern: e, _key: t }, n) {
166
- let r = t(n);
167
- return e.has(r) ? e.get(r) : n;
168
- }
169
- function Te({ _intern: e, _key: t }, n) {
170
- let r = t(n);
171
- return e.has(r) ? e.get(r) : (e.set(r, n), n);
172
- }
173
- function Ee({ _intern: e, _key: t }, n) {
174
- let r = t(n);
175
- return e.has(r) && (n = e.get(r), e.delete(r)), n;
176
- }
177
- function De(e) {
178
- return typeof e == "object" && e ? e.valueOf() : e;
179
- }
180
- //#endregion
181
- //#region ../../node_modules/d3-array/src/ticks.js
182
- var Oe = Math.sqrt(50), ke = Math.sqrt(10), Ae = Math.sqrt(2);
183
- function je(e, t, n) {
184
- let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / 10 ** i, o = a >= Oe ? 10 : a >= ke ? 5 : a >= Ae ? 2 : 1, s, c, l;
185
- return i < 0 ? (l = 10 ** -i / o, s = Math.round(e * l), c = Math.round(t * l), s / l < e && ++s, c / l > t && --c, l = -l) : (l = 10 ** i * o, s = Math.round(e / l), c = Math.round(t / l), s * l < e && ++s, c * l > t && --c), c < s && .5 <= n && n < 2 ? je(e, t, n * 2) : [
186
- s,
187
- c,
188
- l
189
- ];
190
- }
191
- function Me(e, t, n) {
192
- if (t = +t, e = +e, n = +n, !(n > 0)) return [];
193
- if (e === t) return [e];
194
- let r = t < e, [i, a, o] = r ? je(t, e, n) : je(e, t, n);
195
- if (!(a >= i)) return [];
196
- let s = a - i + 1, c = Array(s);
197
- if (r) {
198
- if (o < 0) for (let e = 0; e < s; ++e) c[e] = (a - e) / -o;
199
- else for (let e = 0; e < s; ++e) c[e] = (a - e) * o;
200
- } else if (o < 0) for (let e = 0; e < s; ++e) c[e] = (i + e) / -o;
201
- else for (let e = 0; e < s; ++e) c[e] = (i + e) * o;
202
- return c;
203
- }
204
- function Ne(e, t, n) {
205
- return t = +t, e = +e, n = +n, je(e, t, n)[2];
206
- }
207
- function Pe(e, t, n) {
208
- t = +t, e = +e, n = +n;
209
- let r = t < e, i = r ? Ne(t, e, n) : Ne(e, t, n);
210
- return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
211
- }
212
- //#endregion
213
- //#region ../../node_modules/d3-array/src/range.js
214
- function Fe(e, t, n) {
215
- e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
216
- for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
217
- return a;
218
- }
219
- //#endregion
220
- //#region ../../node_modules/d3-color/src/define.js
221
- function Ie(e, t, n) {
222
- e.prototype = t.prototype = n, n.constructor = e;
223
- }
224
- function Le(e, t) {
225
- var n = Object.create(e.prototype);
226
- for (var r in t) n[r] = t[r];
227
- return n;
228
- }
229
- //#endregion
230
- //#region ../../node_modules/d3-color/src/color.js
231
- function C() {}
232
- var w = .7, Re = 1 / w, T = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", E = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Be = /^#([0-9a-f]{3,8})$/, Ve = RegExp(`^rgb\\(${T},${T},${T}\\)$`), He = RegExp(`^rgb\\(${E},${E},${E}\\)$`), Ue = RegExp(`^rgba\\(${T},${T},${T},${ze}\\)$`), We = RegExp(`^rgba\\(${E},${E},${E},${ze}\\)$`), Ge = RegExp(`^hsl\\(${ze},${E},${E}\\)$`), Ke = RegExp(`^hsla\\(${ze},${E},${E},${ze}\\)$`), qe = {
233
- aliceblue: 15792383,
234
- antiquewhite: 16444375,
235
- aqua: 65535,
236
- aquamarine: 8388564,
237
- azure: 15794175,
238
- beige: 16119260,
239
- bisque: 16770244,
240
- black: 0,
241
- blanchedalmond: 16772045,
242
- blue: 255,
243
- blueviolet: 9055202,
244
- brown: 10824234,
245
- burlywood: 14596231,
246
- cadetblue: 6266528,
247
- chartreuse: 8388352,
248
- chocolate: 13789470,
249
- coral: 16744272,
250
- cornflowerblue: 6591981,
251
- cornsilk: 16775388,
252
- crimson: 14423100,
253
- cyan: 65535,
254
- darkblue: 139,
255
- darkcyan: 35723,
256
- darkgoldenrod: 12092939,
257
- darkgray: 11119017,
258
- darkgreen: 25600,
259
- darkgrey: 11119017,
260
- darkkhaki: 12433259,
261
- darkmagenta: 9109643,
262
- darkolivegreen: 5597999,
263
- darkorange: 16747520,
264
- darkorchid: 10040012,
265
- darkred: 9109504,
266
- darksalmon: 15308410,
267
- darkseagreen: 9419919,
268
- darkslateblue: 4734347,
269
- darkslategray: 3100495,
270
- darkslategrey: 3100495,
271
- darkturquoise: 52945,
272
- darkviolet: 9699539,
273
- deeppink: 16716947,
274
- deepskyblue: 49151,
275
- dimgray: 6908265,
276
- dimgrey: 6908265,
277
- dodgerblue: 2003199,
278
- firebrick: 11674146,
279
- floralwhite: 16775920,
280
- forestgreen: 2263842,
281
- fuchsia: 16711935,
282
- gainsboro: 14474460,
283
- ghostwhite: 16316671,
284
- gold: 16766720,
285
- goldenrod: 14329120,
286
- gray: 8421504,
287
- green: 32768,
288
- greenyellow: 11403055,
289
- grey: 8421504,
290
- honeydew: 15794160,
291
- hotpink: 16738740,
292
- indianred: 13458524,
293
- indigo: 4915330,
294
- ivory: 16777200,
295
- khaki: 15787660,
296
- lavender: 15132410,
297
- lavenderblush: 16773365,
298
- lawngreen: 8190976,
299
- lemonchiffon: 16775885,
300
- lightblue: 11393254,
301
- lightcoral: 15761536,
302
- lightcyan: 14745599,
303
- lightgoldenrodyellow: 16448210,
304
- lightgray: 13882323,
305
- lightgreen: 9498256,
306
- lightgrey: 13882323,
307
- lightpink: 16758465,
308
- lightsalmon: 16752762,
309
- lightseagreen: 2142890,
310
- lightskyblue: 8900346,
311
- lightslategray: 7833753,
312
- lightslategrey: 7833753,
313
- lightsteelblue: 11584734,
314
- lightyellow: 16777184,
315
- lime: 65280,
316
- limegreen: 3329330,
317
- linen: 16445670,
318
- magenta: 16711935,
319
- maroon: 8388608,
320
- mediumaquamarine: 6737322,
321
- mediumblue: 205,
322
- mediumorchid: 12211667,
323
- mediumpurple: 9662683,
324
- mediumseagreen: 3978097,
325
- mediumslateblue: 8087790,
326
- mediumspringgreen: 64154,
327
- mediumturquoise: 4772300,
328
- mediumvioletred: 13047173,
329
- midnightblue: 1644912,
330
- mintcream: 16121850,
331
- mistyrose: 16770273,
332
- moccasin: 16770229,
333
- navajowhite: 16768685,
334
- navy: 128,
335
- oldlace: 16643558,
336
- olive: 8421376,
337
- olivedrab: 7048739,
338
- orange: 16753920,
339
- orangered: 16729344,
340
- orchid: 14315734,
341
- palegoldenrod: 15657130,
342
- palegreen: 10025880,
343
- paleturquoise: 11529966,
344
- palevioletred: 14381203,
345
- papayawhip: 16773077,
346
- peachpuff: 16767673,
347
- peru: 13468991,
348
- pink: 16761035,
349
- plum: 14524637,
350
- powderblue: 11591910,
351
- purple: 8388736,
352
- rebeccapurple: 6697881,
353
- red: 16711680,
354
- rosybrown: 12357519,
355
- royalblue: 4286945,
356
- saddlebrown: 9127187,
357
- salmon: 16416882,
358
- sandybrown: 16032864,
359
- seagreen: 3050327,
360
- seashell: 16774638,
361
- sienna: 10506797,
362
- silver: 12632256,
363
- skyblue: 8900331,
364
- slateblue: 6970061,
365
- slategray: 7372944,
366
- slategrey: 7372944,
367
- snow: 16775930,
368
- springgreen: 65407,
369
- steelblue: 4620980,
370
- tan: 13808780,
371
- teal: 32896,
372
- thistle: 14204888,
373
- tomato: 16737095,
374
- turquoise: 4251856,
375
- violet: 15631086,
376
- wheat: 16113331,
377
- white: 16777215,
378
- whitesmoke: 16119285,
379
- yellow: 16776960,
380
- yellowgreen: 10145074
381
- };
382
- Ie(C, Qe, {
383
- copy(e) {
384
- return Object.assign(new this.constructor(), this, e);
385
- },
386
- displayable() {
387
- return this.rgb().displayable();
388
- },
389
- hex: Je,
390
- formatHex: Je,
391
- formatHex8: Ye,
392
- formatHsl: Xe,
393
- formatRgb: Ze,
394
- toString: Ze
395
- });
396
- function Je() {
397
- return this.rgb().formatHex();
398
- }
399
- function Ye() {
400
- return this.rgb().formatHex8();
401
- }
402
- function Xe() {
403
- return ct(this).formatHsl();
404
- }
405
- function Ze() {
406
- return this.rgb().formatRgb();
407
- }
408
- function Qe(e) {
409
- var t, n;
410
- return e = (e + "").trim().toLowerCase(), (t = Be.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? $e(t) : n === 3 ? new D(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? et(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? et(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Ve.exec(e)) ? new D(t[1], t[2], t[3], 1) : (t = He.exec(e)) ? new D(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Ue.exec(e)) ? et(t[1], t[2], t[3], t[4]) : (t = We.exec(e)) ? et(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Ge.exec(e)) ? st(t[1], t[2] / 100, t[3] / 100, 1) : (t = Ke.exec(e)) ? st(t[1], t[2] / 100, t[3] / 100, t[4]) : qe.hasOwnProperty(e) ? $e(qe[e]) : e === "transparent" ? new D(NaN, NaN, NaN, 0) : null;
411
- }
412
- function $e(e) {
413
- return new D(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
414
- }
415
- function et(e, t, n, r) {
416
- return r <= 0 && (e = t = n = NaN), new D(e, t, n, r);
417
- }
418
- function tt(e) {
419
- return e instanceof C || (e = Qe(e)), e ? (e = e.rgb(), new D(e.r, e.g, e.b, e.opacity)) : new D();
420
- }
421
- function nt(e, t, n, r) {
422
- return arguments.length === 1 ? tt(e) : new D(e, t, n, r ?? 1);
423
- }
424
- function D(e, t, n, r) {
425
- this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
426
- }
427
- Ie(D, nt, Le(C, {
428
- brighter(e) {
429
- return e = e == null ? Re : Re ** +e, new D(this.r * e, this.g * e, this.b * e, this.opacity);
430
- },
431
- darker(e) {
432
- return e = e == null ? w : w ** +e, new D(this.r * e, this.g * e, this.b * e, this.opacity);
433
- },
434
- rgb() {
435
- return this;
436
- },
437
- clamp() {
438
- return new D(O(this.r), O(this.g), O(this.b), ot(this.opacity));
439
- },
440
- displayable() {
441
- return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
442
- },
443
- hex: rt,
444
- formatHex: rt,
445
- formatHex8: it,
446
- formatRgb: at,
447
- toString: at
448
- }));
449
- function rt() {
450
- return `#${k(this.r)}${k(this.g)}${k(this.b)}`;
451
- }
452
- function it() {
453
- return `#${k(this.r)}${k(this.g)}${k(this.b)}${k((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
454
- }
455
- function at() {
456
- let e = ot(this.opacity);
457
- return `${e === 1 ? "rgb(" : "rgba("}${O(this.r)}, ${O(this.g)}, ${O(this.b)}${e === 1 ? ")" : `, ${e})`}`;
458
- }
459
- function ot(e) {
460
- return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
461
- }
462
- function O(e) {
463
- return Math.max(0, Math.min(255, Math.round(e) || 0));
464
- }
465
- function k(e) {
466
- return e = O(e), (e < 16 ? "0" : "") + e.toString(16);
467
- }
468
- function st(e, t, n, r) {
469
- return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new A(e, t, n, r);
470
- }
471
- function ct(e) {
472
- if (e instanceof A) return new A(e.h, e.s, e.l, e.opacity);
473
- if (e instanceof C || (e = Qe(e)), !e) return new A();
474
- if (e instanceof A) return e;
475
- e = e.rgb();
476
- var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
477
- return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new A(o, s, c, e.opacity);
478
- }
479
- function lt(e, t, n, r) {
480
- return arguments.length === 1 ? ct(e) : new A(e, t, n, r ?? 1);
481
- }
482
- function A(e, t, n, r) {
483
- this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
484
- }
485
- Ie(A, lt, Le(C, {
486
- brighter(e) {
487
- return e = e == null ? Re : Re ** +e, new A(this.h, this.s, this.l * e, this.opacity);
488
- },
489
- darker(e) {
490
- return e = e == null ? w : w ** +e, new A(this.h, this.s, this.l * e, this.opacity);
491
- },
492
- rgb() {
493
- var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
494
- return new D(ft(e >= 240 ? e - 240 : e + 120, i, r), ft(e, i, r), ft(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
495
- },
496
- clamp() {
497
- return new A(ut(this.h), dt(this.s), dt(this.l), ot(this.opacity));
498
- },
499
- displayable() {
500
- return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
501
- },
502
- formatHsl() {
503
- let e = ot(this.opacity);
504
- return `${e === 1 ? "hsl(" : "hsla("}${ut(this.h)}, ${dt(this.s) * 100}%, ${dt(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
505
- }
506
- }));
507
- function ut(e) {
508
- return e = (e || 0) % 360, e < 0 ? e + 360 : e;
509
- }
510
- function dt(e) {
511
- return Math.max(0, Math.min(1, e || 0));
512
- }
513
- function ft(e, t, n) {
514
- return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
515
- }
516
- //#endregion
517
- //#region ../../node_modules/d3-format/src/formatDecimal.js
518
- function pt(e) {
519
- return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
520
- }
521
- function mt(e, t) {
522
- if (!isFinite(e) || e === 0) return null;
523
- var n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e"), r = e.slice(0, n);
524
- return [r.length > 1 ? r[0] + r.slice(2) : r, +e.slice(n + 1)];
525
- }
526
- //#endregion
527
- //#region ../../node_modules/d3-format/src/exponent.js
528
- function ht(e) {
529
- return e = mt(Math.abs(e)), e ? e[1] : NaN;
530
- }
531
- //#endregion
532
- //#region ../../node_modules/d3-format/src/formatGroup.js
533
- function gt(e, t) {
534
- return function(n, r) {
535
- for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
536
- return a.reverse().join(t);
537
- };
538
- }
539
- //#endregion
540
- //#region ../../node_modules/d3-format/src/formatNumerals.js
541
- function _t(e) {
542
- return function(t) {
543
- return t.replace(/[0-9]/g, function(t) {
544
- return e[+t];
545
- });
546
- };
547
- }
548
- //#endregion
549
- //#region ../../node_modules/d3-format/src/formatSpecifier.js
550
- var vt = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
551
- function yt(e) {
552
- if (!(t = vt.exec(e))) throw Error("invalid format: " + e);
553
- var t;
554
- return new bt({
555
- fill: t[1],
556
- align: t[2],
557
- sign: t[3],
558
- symbol: t[4],
559
- zero: t[5],
560
- width: t[6],
561
- comma: t[7],
562
- precision: t[8] && t[8].slice(1),
563
- trim: t[9],
564
- type: t[10]
565
- });
566
- }
567
- yt.prototype = bt.prototype;
568
- function bt(e) {
569
- this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
570
- }
571
- bt.prototype.toString = function() {
572
- return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
573
- };
574
- //#endregion
575
- //#region ../../node_modules/d3-format/src/formatTrim.js
576
- function xt(e) {
577
- out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
578
- case ".":
579
- r = i = n;
580
- break;
581
- case "0":
582
- r === 0 && (r = n), i = n;
583
- break;
584
- default:
585
- if (!+e[n]) break out;
586
- r > 0 && (r = 0);
587
- }
588
- return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
589
- }
590
- //#endregion
591
- //#region ../../node_modules/d3-format/src/formatPrefixAuto.js
592
- var St;
593
- function Ct(e, t) {
594
- var n = mt(e, t);
595
- if (!n) return St = void 0, e.toPrecision(t);
596
- var r = n[0], i = n[1], a = i - (St = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
597
- return a === o ? r : a > o ? r + Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + Array(1 - a).join("0") + mt(e, Math.max(0, t + a - 1))[0];
598
- }
599
- //#endregion
600
- //#region ../../node_modules/d3-format/src/formatRounded.js
601
- function wt(e, t) {
602
- var n = mt(e, t);
603
- if (!n) return e + "";
604
- var r = n[0], i = n[1];
605
- return i < 0 ? "0." + Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + Array(i - r.length + 2).join("0");
606
- }
607
- //#endregion
608
- //#region ../../node_modules/d3-format/src/formatTypes.js
609
- var Tt = {
610
- "%": (e, t) => (e * 100).toFixed(t),
611
- b: (e) => Math.round(e).toString(2),
612
- c: (e) => e + "",
613
- d: pt,
614
- e: (e, t) => e.toExponential(t),
615
- f: (e, t) => e.toFixed(t),
616
- g: (e, t) => e.toPrecision(t),
617
- o: (e) => Math.round(e).toString(8),
618
- p: (e, t) => wt(e * 100, t),
619
- r: wt,
620
- s: Ct,
621
- X: (e) => Math.round(e).toString(16).toUpperCase(),
622
- x: (e) => Math.round(e).toString(16)
623
- };
624
- //#endregion
625
- //#region ../../node_modules/d3-format/src/identity.js
626
- function Et(e) {
627
- return e;
628
- }
629
- //#endregion
630
- //#region ../../node_modules/d3-format/src/locale.js
631
- var Dt = Array.prototype.map, Ot = [
632
- "y",
633
- "z",
634
- "a",
635
- "f",
636
- "p",
637
- "n",
638
- "µ",
639
- "m",
640
- "",
641
- "k",
642
- "M",
643
- "G",
644
- "T",
645
- "P",
646
- "E",
647
- "Z",
648
- "Y"
649
- ];
650
- function kt(e) {
651
- var t = e.grouping === void 0 || e.thousands === void 0 ? Et : gt(Dt.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? Et : _t(Dt.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
652
- function l(e, l) {
653
- e = yt(e);
654
- var u = e.fill, d = e.align, f = e.sign, p = e.symbol, m = e.zero, h = e.width, ee = e.comma, g = e.precision, _ = e.trim, v = e.type;
655
- v === "n" ? (ee = !0, v = "g") : Tt[v] || (g === void 0 && (g = 12), _ = !0, v = "g"), (m || u === "0" && d === "=") && (m = !0, u = "0", d = "=");
656
- var te = (l && l.prefix !== void 0 ? l.prefix : "") + (p === "$" ? n : p === "#" && /[boxX]/.test(v) ? "0" + v.toLowerCase() : ""), ne = (p === "$" ? r : /[%p]/.test(v) ? o : "") + (l && l.suffix !== void 0 ? l.suffix : ""), re = Tt[v], ie = /[defgprs%]/.test(v);
657
- g = g === void 0 ? 6 : /[gprs]/.test(v) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
658
- function y(e) {
659
- var n = te, r = ne, o, l, p;
660
- if (v === "c") r = re(e) + r, e = "";
661
- else {
662
- e = +e;
663
- var y = e < 0 || 1 / e < 0;
664
- if (e = isNaN(e) ? c : re(Math.abs(e), g), _ && (e = xt(e)), y && +e == 0 && f !== "+" && (y = !1), n = (y ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (v === "s" && !isNaN(e) && St !== void 0 ? Ot[8 + St / 3] : "") + r + (y && f === "(" ? ")" : ""), ie) {
665
- for (o = -1, l = e.length; ++o < l;) if (p = e.charCodeAt(o), 48 > p || p > 57) {
666
- r = (p === 46 ? i + e.slice(o + 1) : e.slice(o)) + r, e = e.slice(0, o);
667
- break;
668
- }
669
- }
670
- }
671
- ee && !m && (e = t(e, Infinity));
672
- var b = n.length + e.length + r.length, x = b < h ? Array(h - b + 1).join(u) : "";
673
- switch (ee && m && (e = t(x + e, x.length ? h - r.length : Infinity), x = ""), d) {
674
- case "<":
675
- e = n + e + r + x;
676
- break;
677
- case "=":
678
- e = n + x + e + r;
679
- break;
680
- case "^":
681
- e = x.slice(0, b = x.length >> 1) + n + e + r + x.slice(b);
682
- break;
683
- default: e = x + n + e + r;
684
- }
685
- return a(e);
686
- }
687
- return y.toString = function() {
688
- return e + "";
689
- }, y;
690
- }
691
- function u(e, t) {
692
- var n = Math.max(-8, Math.min(8, Math.floor(ht(t) / 3))) * 3, r = 10 ** -n, i = l((e = yt(e), e.type = "f", e), { suffix: Ot[8 + n / 3] });
693
- return function(e) {
694
- return i(r * e);
695
- };
696
- }
697
- return {
698
- format: l,
699
- formatPrefix: u
700
- };
701
- }
702
- //#endregion
703
- //#region ../../node_modules/d3-format/src/defaultLocale.js
704
- var At, jt, Mt;
705
- Nt({
706
- thousands: ",",
707
- grouping: [3],
708
- currency: ["$", ""]
709
- });
710
- function Nt(e) {
711
- return At = kt(e), jt = At.format, Mt = At.formatPrefix, At;
712
- }
713
- //#endregion
714
- //#region ../core/src/data/sideInputBinding.js
715
- var Pt = class {
716
- #e;
717
- #t;
718
- #n = !1;
719
- #r = !0;
720
- #i = [];
721
- constructor(e) {
722
- this.#e = e, this.#t = Array.from(new Set(e.dataDependencies), (e) => ({
723
- collector: e,
724
- consumed: -1
725
- }));
726
- for (let t of this.#t) this.#i.push(t.collector.observe(() => {
727
- e.parent && e.completed && !this.isReady() && e.areDataDependenciesAvailable() && e.requestRepropagate();
728
- }));
729
- }
730
- dispose() {
731
- for (let e of this.#i) e();
732
- this.#i.length = 0;
733
- }
734
- reset() {
735
- this.#n = !1, this.#r = !0;
736
- for (let e of this.#t) e.consumed = -1;
737
- }
738
- consume() {
739
- if (!this.#e.areDataDependenciesAvailable()) this.#r = !1;
740
- else if (!this.#n) {
741
- for (let e of this.#t) e.consumed = e.collector.dataRevision;
742
- this.#n = !0;
743
- }
744
- }
745
- complete() {
746
- this.#n || this.consume();
747
- }
748
- isReady() {
749
- return this.#r && this.#n && this.#e.areDataDependenciesAvailable() && this.#t.every(({ collector: e, consumed: t }) => e.dataRevision === t);
750
- }
751
- }, Ft = class {
752
- stats = {
753
- count: 0,
754
- first: null
755
- };
756
- #e = !1;
757
- #t = !1;
758
- #n = [];
759
- #r;
760
- #i;
761
- paramRuntimeProvider = null;
762
- get behavior() {
763
- return 0;
764
- }
765
- get domainSensitiveScaleChannels() {
766
- return [];
767
- }
768
- get dataDependencies() {
769
- return [];
770
- }
771
- isDataReady() {
772
- return this.completed && !this.disposed && (!this.#i || this.#i.isReady());
773
- }
774
- areDataDependenciesAvailable() {
775
- return this.dataDependencies.every((e) => e.completed && !e.disposed);
776
- }
777
- consumeDataDependencies() {
778
- this.#i?.consume();
779
- }
780
- get label() {
781
- return `(${this.constructor.name})`;
782
- }
783
- constructor(e) {
784
- this.paramRuntimeProvider = e, this.children = [], this.parent = void 0, this.completed = !1;
785
- }
786
- get disposed() {
787
- return this.#t;
788
- }
789
- getDebugState() {
790
- let e = this;
791
- return {
792
- label: this.label,
793
- children: this.children.slice(),
794
- parent: this.parent,
795
- stats: {
796
- count: this.stats.count,
797
- first: this.stats.first
798
- },
799
- completed: this.completed,
800
- initialized: this.#e,
801
- disposed: this.#t,
802
- params: "params" in e ? structuredClone(e.params) : void 0,
803
- view: It(e, this.paramRuntimeProvider),
804
- domainSensitiveScaleChannels: this.domainSensitiveScaleChannels
805
- };
806
- }
807
- reset() {
808
- this.#i?.reset(), this.completed = !1;
809
- for (let e of this.children) e.reset();
810
- this.stats.count = 0, this.stats.first = null;
811
- }
812
- initialize() {}
813
- initializeOnce() {
814
- this.#e ||= (this.dataDependencies.length && (this.#i = new Pt(this)), this.initialize(), !0);
815
- }
816
- #a() {
817
- this._propagate = Function("children", "stats", Fe(this.children.length).map((e) => `const child${e} = children[${e}];`).join("\n") + `return function propagate(datum) {
818
- if (stats.count === 0) {
819
- stats.first = structuredClone(datum);
820
- }
821
- stats.count++;
822
- ${Fe(this.children.length).map((e) => `child${e}.handle(datum);`).join("\n")}
823
- };`)(this.children, this.stats);
824
- }
825
- setParent(e) {
826
- this.parent = e;
827
- }
828
- addChild(e) {
829
- if (e.parent) throw Error("Cannot add the child! It already has a parent.");
830
- return this.children.push(e), e.setParent(this), this.#a(), this;
831
- }
832
- adopt(e) {
833
- e.parent && e.parent.removeChild(e), this.addChild(e);
834
- }
835
- adoptChildrenOf(e) {
836
- for (let t of e.children.slice()) this.adopt(t);
837
- }
838
- insertAsParent(e) {
839
- if (this.isRoot()) throw Error("Cannot insert a new parent for a root node!");
840
- e.parent = this.parent, this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#a(), this.parent = void 0, e.addChild(this);
841
- }
842
- removeChild(e) {
843
- let t = this.children.indexOf(e);
844
- if (t > -1) this.children.splice(t, 1), e.parent = void 0, this.#a();
845
- else throw Error("Trying to remove an unknown child node!");
846
- }
847
- excise() {
848
- if (this.isRoot()) throw Error("Cannot excise root node!");
849
- if (this.isTerminal()) this.parent.removeChild(this);
850
- else if (this.children.length == 1) {
851
- let e = this.children[0];
852
- e.setParent(this.parent), this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#a(), this.setParent(void 0), this.children.length = 0;
853
- } else throw Error("Cannot excise a node that has multiple children!");
854
- }
855
- isRoot() {
856
- return !this.parent;
857
- }
858
- isBranching() {
859
- return this.children.length > 1;
860
- }
861
- isTerminal() {
862
- return this.children.length == 0;
863
- }
864
- visit(e) {
865
- e(this);
866
- for (let t of this.children) t.visit(e);
867
- e.afterChildren && e.afterChildren(this);
868
- }
869
- subtreeToString(e = 0) {
870
- let t = this.children.map((t) => t.subtreeToString(e + 1)).join("");
871
- return `${" ".repeat(e * 2)}* ${this.label}${"identifier" in this && this.identifier ? ": " + this.identifier : ""} \n${t}`;
872
- }
873
- handle(e) {
874
- this._propagate(e);
875
- }
876
- complete() {
877
- this.#i?.complete(), this.completed = !0;
878
- for (let e of this.children) e.complete();
879
- }
880
- registerDisposer(e) {
881
- this.#t ? e() : this.#n.push(e);
882
- }
883
- dispose() {
884
- if (!this.#t) {
885
- this.#t = !0, this.#i?.dispose();
886
- for (let e of this.#n) e();
887
- this.#n.length = 0;
888
- }
889
- }
890
- disposeSubtree() {
891
- let e = () => void 0;
892
- e.afterChildren = (e) => {
893
- e.dispose();
894
- }, this.visit(e);
895
- }
896
- beginBatch(e) {
897
- for (let t of this.children) t.beginBatch(e);
898
- }
899
- get paramRuntime() {
900
- if (this.paramRuntimeProvider && this.paramRuntimeProvider.paramRuntime) return this.paramRuntimeProvider.paramRuntime;
901
- if (!this.parent) throw Error("Cannot find paramRuntime!");
902
- return this.parent.paramRuntime;
903
- }
904
- get replaySource() {
905
- if (!this.parent) throw Error("Cannot replay data: no upstream replay source.");
906
- return this.parent.replaySource;
907
- }
908
- get replaysSynchronously() {
909
- return !1;
910
- }
911
- requestRepropagate() {
912
- let e = this.replaySource, t = this.paramRuntime.updateScheduler;
913
- e.#r ||= () => {
914
- e.disposed || (e.replaysSynchronously && e.visit((e) => {
915
- e.#r && t.cancelUpdate(e.#r);
916
- }), e.repropagate());
917
- };
918
- let n = 0;
919
- for (let t = e.parent; t; t = t.parent) n++;
920
- t.requestUpdate(e.#r, n, void 0, () => e.#o());
921
- }
922
- #o() {
923
- let e = /* @__PURE__ */ new Set();
924
- return this.visit((t) => {
925
- for (let n of t.dataDependencies) for (let t = n.parent; t; t = t.parent) t !== this && t.#r && e.add(t.#r);
926
- }), e;
927
- }
928
- repropagate() {
929
- if (this.parent) this.parent.repropagate();
930
- else throw Error("Cannot repropagate data, no FlowNode with stored data found!");
931
- }
932
- _propagate(e) {}
933
- };
934
- function It(e, t) {
935
- if ("view" in e) return e.view;
936
- if (t && "getPathString" in t) return t;
937
- }
938
- function Lt(e) {
939
- let t = /* @__PURE__ */ new Set();
940
- for (; e;) {
941
- for (let n of e.domainSensitiveScaleChannels) t.add(n);
942
- e = e.parent;
943
- }
944
- return t;
945
- }
946
- function Rt(e) {
947
- return e.type == "file";
948
- }
949
- function zt(e) {
950
- return e.type == "facet";
951
- }
952
- //#endregion
953
- //#region ../core/src/ruler/rulerValue.js
954
- function Bt(e = ["x"], t = {}) {
955
- let n = {};
956
- for (let r of e) n[r] = t[r] ?? null;
957
- return {
958
- type: "ruler",
959
- values: n
960
- };
961
- }
962
- //#endregion
963
- //#region ../core/src/paramRuntime/paramUtils.js
964
- function j(e) {
965
- return typeof e == "object" && !!e && "expr" in e && S(e.expr);
966
- }
967
- function Vt(e) {
968
- if (j(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
969
- return e;
970
- }
971
- function Ht(e) {
972
- return ("expr" in e || "bind" in e) && !("select" in e) && !("ruler" in e);
973
- }
974
- function Ut(e) {
975
- return !("expr" in e || "bind" in e) && "select" in e;
976
- }
977
- function Wt(e) {
978
- return !("expr" in e || "bind" in e || "select" in e) && "ruler" in e;
979
- }
980
- function Gt(e) {
981
- if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)) throw Error("Invalid parameter name: " + e + ". Must be a valid JavaScript identifier.");
982
- return e;
983
- }
984
- function Kt(e, t, n) {
985
- if ("select" in e) {
986
- let t = Gi(e.select);
987
- if (Ki(t)) return t.toggle ? Fi() : Pi(null);
988
- if (qi(t)) {
989
- if (!t.encodings) throw Error("Interval selection \"" + e.name + "\" must have encodings defined!");
990
- return Ii(t.encodings);
991
- }
992
- throw Error("Unknown selection config for parameter \"" + e.name + "\".");
993
- }
994
- if ("ruler" in e) return Bt(e.ruler.encodings, e.value);
995
- if ("expr" in e) {
996
- let r = n ?? t?.createExpression(e.expr);
997
- if (!r) throw Error("Cannot evaluate expression for parameter \"" + e.name + "\".");
998
- return r(null);
999
- }
1000
- return "value" in e ? e.value : null;
1001
- }
1002
- function qt(e, t, n, r, i = []) {
1003
- let a = { ...t }, o = [];
1004
- for (let [r, i] of Object.entries(t)) if (j(i)) {
1005
- let t = e.createExpression(i.expr), s = o.push({
1006
- key: r,
1007
- fn: t
1008
- }) - 1;
1009
- Object.defineProperty(a, r, {
1010
- enumerable: !0,
1011
- get: n ? () => c.get()[s] : () => t(null)
1012
- });
1013
- } else a[r] = i;
1014
- if (!n) return a;
1015
- for (let { key: t, expr: n } of i) o.push({
1016
- key: t,
1017
- fn: e.createExpression(n.expr)
1018
- });
1019
- if (!o.length) return a;
1020
- let s = Array.from(new Set(o.flatMap(({ fn: e }) => e.dependencies))), c = e.computed("expression properties", s, () => o.map(({ fn: e }) => e(null)), { equals: Jt }), l = c.get(), u = e.effect([c], () => {
1021
- let e = c.get(), t = new Set(o.filter((t, n) => l[n] !== e[n]).map(({ key: e }) => e));
1022
- l = e, n(t);
1023
- });
1024
- return r?.(c.dispose), r?.(u), a;
1025
- }
1026
- function Jt(e, t) {
1027
- return e.every((e, n) => e === t[n]);
1028
- }
1029
- function Yt(e, t, n, r) {
1030
- if (!j(t)) return t;
1031
- let i = () => {
1032
- throw Error(n);
1033
- }, a = e.watchExpression ? e.watchExpression(t.expr, i, {
1034
- scopeOwned: !1,
1035
- registerDisposer: r
1036
- }) : e.createExpression(t.expr);
1037
- if (!e.watchExpression) {
1038
- let e = a.subscribe(i);
1039
- r?.(e);
1040
- }
1041
- return a();
1042
- }
1043
- function Xt(e) {
1044
- return Object.assign(() => e, {
1045
- dependencies: [],
1046
- subscribe: () => () => void 0,
1047
- invalidate: () => void 0,
1048
- identifier: () => "constant",
1049
- fields: [],
1050
- globals: [],
1051
- code: JSON.stringify(e)
1052
- });
1053
- }
1054
- //#endregion
1055
- //#region ../core/src/data/transforms/transform.js
1056
- var Zt = class extends Ft {
1057
- #e;
1058
- #t;
1059
- #n = 0;
1060
- #r = 0;
1061
- #i;
1062
- #a = [];
1063
- constructor(e, t) {
1064
- super(t), this.#e = e.type;
1065
- let n = e.debounce;
1066
- if (n !== void 0) {
1067
- if (!Number.isFinite(n) || n < 0) throw Error(`The debounce for the ${e.type} transform must be a non-negative finite number.`);
1068
- this.#t = n, this.registerDisposer(() => clearTimeout(this.#i));
1069
- }
1070
- }
1071
- complete() {
1072
- let e = this.#n;
1073
- super.complete(), this.#r = e, e == this.#n && (clearTimeout(this.#i), this.#i = void 0);
1074
- }
1075
- reset() {
1076
- this.#s(), super.reset();
1077
- }
1078
- beginBatch(e) {
1079
- this.#s(), super.beginBatch(e);
1080
- }
1081
- requestReactiveRepropagate() {
1082
- if (this.#n++, this.#t === void 0) {
1083
- this.requestRepropagate();
1084
- return;
1085
- }
1086
- clearTimeout(this.#i), this.#i = void 0, this.completed && (this.#i = setTimeout(this.#o, this.#t));
1087
- }
1088
- #o = () => {
1089
- this.#i = void 0, !this.disposed && this.completed && this.#r != this.#n && (this.requestRepropagate(), this.paramRuntime.flushNow());
1090
- };
1091
- get label() {
1092
- return this.#e;
1093
- }
1094
- watchExprRef(e, t) {
1095
- if (j(e)) {
1096
- let n = e;
1097
- return this.paramRuntime.watchExpression(n.expr, t, {
1098
- scopeOwned: !1,
1099
- registerDisposer: (e) => this.registerDisposer(e)
1100
- });
1101
- }
1102
- return (() => e);
1103
- }
1104
- watchSnapshottedExpression(e) {
1105
- let t, n;
1106
- return t = this.paramRuntime.watchExpression(e, () => {
1107
- n.refresh(), this.requestReactiveRepropagate();
1108
- }, {
1109
- scopeOwned: !1,
1110
- registerDisposer: (e) => this.registerDisposer(e)
1111
- }), n = t.createSnapshotEvaluator(), this.#a.push(n.refresh), n;
1112
- }
1113
- #s() {
1114
- for (let e of this.#a) e();
1115
- }
1116
- }, M = "__uniqueId", Qt = 1e4, $t = [null], en = class extends Zt {
1117
- get behavior() {
1118
- return 2;
1119
- }
1120
- constructor(e) {
1121
- super(e), this.params = e, this._blocks = [], this._usedBlocks = 0, this._id = -1;
1122
- }
1123
- initialize() {}
1124
- reset() {
1125
- super.reset(), this._usedBlocks = 0, this._id = -1;
1126
- }
1127
- handle(e) {
1128
- e[M] = this.#e(), this._propagate(e);
1129
- }
1130
- #e() {
1131
- return ++this._id % 1e4 == 0 && (this._id = this.#t() * Qt), this._id;
1132
- }
1133
- #t() {
1134
- return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
1135
- }
1136
- #n() {
1137
- let e = $t.length;
1138
- return $t[e] = this, this._blocks.push(e), this._usedBlocks++, e;
1139
- }
1140
- };
1141
- //#endregion
1142
- //#region ../core/src/utils/field.js
1143
- function tn(t, n = t) {
1144
- return /^[A-Za-z0-9_]+$/.test(t) ? e(Function("validator", `
1145
- let validated = !validator;
1146
- return function accessField(datum) {
1147
- if (!validated) {
1148
- validator(datum);
1149
- validated = true;
1150
- }
1151
- return datum[${JSON.stringify(t)}];
1152
- }`)(function(e) {
1153
- t in e || nn(e, t);
1154
- }), [t], n) : c(t);
1155
- }
1156
- function nn(e, t) {
1157
- throw Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`);
1158
- }
1159
- //#endregion
1160
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/accessor.js
1161
- function N(e, t, n) {
1162
- return Object.assign(e, {
1163
- fields: t || [],
1164
- fname: n
1165
- });
1166
- }
1167
- //#endregion
1168
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/getter.js
1169
- function rn(e) {
1170
- return e.length === 1 ? an(e[0]) : on(e);
1171
- }
1172
- var an = (e) => function(t) {
1173
- return t[e];
1174
- }, on = (e) => {
1175
- let t = e.length;
1176
- return function(n) {
1177
- for (let r = 0; r < t; ++r) n = n[e[r]];
1178
- return n;
1179
- };
1180
- };
1181
- //#endregion
1182
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/error.js
1183
- function P(e) {
1184
- throw Error(e);
1185
- }
1186
- //#endregion
1187
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/splitAccessPath.js
1188
- function sn(e) {
1189
- let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
1190
- e += "";
1191
- function l() {
1192
- t.push(a + e.substring(o, s)), a = "", o = s + 1;
1193
- }
1194
- for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
1195
- else if (c === r) l(), r = null, i = -1;
1196
- else if (r) continue;
1197
- else o === i && c === "\"" || o === i && c === "'" ? (o = s + 1, r = c) : c === "." && !i ? s > o ? l() : o = s + 1 : c === "[" ? (s > o && l(), i = o = s + 1) : c === "]" && (i || P("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
1198
- return i && P("Access path missing closing bracket: " + e), r && P("Access path missing closing quote: " + e), s > o && (s++, l()), t;
1199
- }
1200
- //#endregion
1201
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/field.js
1202
- function cn(e, t, n) {
1203
- let r = sn(e), i = r.length === 1 ? r[0] : e;
1204
- return N((n && n.get || rn)(r), [i], t || i);
1205
- }
1206
- cn("id"), N((e) => e, [], "identity"), N(() => 0, [], "zero"), N(() => 1, [], "one"), N(() => !0, [], "true"), N(() => !1, [], "false");
1207
- //#endregion
1208
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/interpreter.js
1209
- var ln = /* @__PURE__ */ new Set([
1210
- ...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function"),
1211
- "__proto__",
1212
- "then"
1213
- ]);
1214
- Array.isArray;
1215
- //#endregion
1216
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/isFunction.js
1217
- function un(e) {
1218
- return typeof e == "function";
1219
- }
1220
- //#endregion
1221
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/hasOwnProperty.js
1222
- function dn(e, t) {
1223
- return Object.hasOwn(e, t);
1224
- }
1225
- //#endregion
1226
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/isString.js
1227
- function fn(e) {
1228
- return typeof e == "string";
1229
- }
1230
- //#endregion
1231
- //#region ../../node_modules/vega-expression/node_modules/vega-util/build/toSet.js
1232
- function pn(e) {
1233
- let t = {}, n = e.length;
1234
- for (let r = 0; r < n; ++r) t[e[r] + ""] = !0;
1235
- return t;
1236
- }
1237
- //#endregion
1238
- //#region ../../node_modules/vega-expression/build/vega-expression.js
1239
- var mn = "RawCode", hn = "Literal", gn = "Property", _n = "Identifier", vn = "ArrayExpression", yn = "BinaryExpression", bn = "CallExpression", xn = "ConditionalExpression", Sn = "LogicalExpression", Cn = "MemberExpression", wn = "ObjectExpression", Tn = "UnaryExpression";
1240
- function F(e) {
1241
- this.type = e;
1242
- }
1243
- F.prototype.visit = function(e) {
1244
- let t, n, r;
1245
- if (e(this)) return 1;
1246
- for (t = En(this), n = 0, r = t.length; n < r; ++n) if (t[n].visit(e)) return 1;
1247
- };
1248
- function En(e) {
1249
- switch (e.type) {
1250
- case vn: return e.elements;
1251
- case yn:
1252
- case Sn: return [e.left, e.right];
1253
- case bn: return [e.callee].concat(e.arguments);
1254
- case xn: return [
1255
- e.test,
1256
- e.consequent,
1257
- e.alternate
1258
- ];
1259
- case Cn: return [e.object, e.property];
1260
- case wn: return e.properties;
1261
- case gn: return [e.key, e.value];
1262
- case Tn: return [e.argument];
1263
- case _n:
1264
- case hn:
1265
- case mn:
1266
- default: return [];
1267
- }
1268
- }
1269
- var I, L, R, z, B, Dn = 1, On = 2, V = 3, H = 4, kn = 5, U = 6, W = 7, An = 8, jn = 9;
1270
- I = {}, I[Dn] = "Boolean", I[On] = "<end>", I[V] = "Identifier", I[H] = "Keyword", I[kn] = "Null", I[U] = "Numeric", I[W] = "Punctuator", I[An] = "String", I[jn] = "RegularExpression";
1271
- var Mn = "ArrayExpression", Nn = "BinaryExpression", Pn = "CallExpression", Fn = "ConditionalExpression", In = "Identifier", Ln = "Literal", Rn = "LogicalExpression", zn = "MemberExpression", Bn = "ObjectExpression", Vn = "Property", Hn = "UnaryExpression", G = "Unexpected token %0", Un = "Unexpected number", Wn = "Unexpected string", Gn = "Unexpected identifier", Kn = "Unexpected reserved word", qn = "Unexpected end of input", Jn = "Invalid regular expression", Yn = "Invalid regular expression: missing /", Xn = "Octal literals are not allowed in strict mode.", Zn = "Duplicate data property in object literal not allowed in strict mode", K = "ILLEGAL", Qn = "Disabled.", $n = /* @__PURE__ */ RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), er = /* @__PURE__ */ RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
1272
- function tr(e, t) {
1273
- /* istanbul ignore next */
1274
- if (!e) throw Error("ASSERT: " + t);
1275
- }
1276
- function q(e) {
1277
- return e >= 48 && e <= 57;
1278
- }
1279
- function nr(e) {
1280
- return "0123456789abcdefABCDEF".includes(e);
1281
- }
1282
- function rr(e) {
1283
- return "01234567".includes(e);
1284
- }
1285
- function ir(e) {
1286
- return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [
1287
- 5760,
1288
- 6158,
1289
- 8192,
1290
- 8193,
1291
- 8194,
1292
- 8195,
1293
- 8196,
1294
- 8197,
1295
- 8198,
1296
- 8199,
1297
- 8200,
1298
- 8201,
1299
- 8202,
1300
- 8239,
1301
- 8287,
1302
- 12288,
1303
- 65279
1304
- ].includes(e);
1305
- }
1306
- function J(e) {
1307
- return e === 10 || e === 13 || e === 8232 || e === 8233;
1308
- }
1309
- function ar(e) {
1310
- return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && $n.test(String.fromCharCode(e));
1311
- }
1312
- function or(e) {
1313
- return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && er.test(String.fromCharCode(e));
1314
- }
1315
- var sr = {
1316
- if: 1,
1317
- in: 1,
1318
- do: 1,
1319
- var: 1,
1320
- for: 1,
1321
- new: 1,
1322
- try: 1,
1323
- let: 1,
1324
- this: 1,
1325
- else: 1,
1326
- case: 1,
1327
- void: 1,
1328
- with: 1,
1329
- enum: 1,
1330
- while: 1,
1331
- break: 1,
1332
- catch: 1,
1333
- throw: 1,
1334
- const: 1,
1335
- yield: 1,
1336
- class: 1,
1337
- super: 1,
1338
- return: 1,
1339
- typeof: 1,
1340
- delete: 1,
1341
- switch: 1,
1342
- export: 1,
1343
- import: 1,
1344
- public: 1,
1345
- static: 1,
1346
- default: 1,
1347
- finally: 1,
1348
- extends: 1,
1349
- package: 1,
1350
- private: 1,
1351
- function: 1,
1352
- continue: 1,
1353
- debugger: 1,
1354
- interface: 1,
1355
- protected: 1,
1356
- instanceof: 1,
1357
- implements: 1
1358
- };
1359
- function cr() {
1360
- for (; R < z;) {
1361
- let e = L.charCodeAt(R);
1362
- if (ir(e) || J(e)) ++R;
1363
- else break;
1364
- }
1365
- }
1366
- function lr(e) {
1367
- var t, n, r, i = 0;
1368
- for (n = e === "u" ? 4 : 2, t = 0; t < n; ++t) R < z && nr(L[R]) ? (r = L[R++], i = i * 16 + "0123456789abcdef".indexOf(r.toLowerCase())) : X({}, G, K);
1369
- return String.fromCharCode(i);
1370
- }
1371
- function ur() {
1372
- var e = L[R], t = 0, n, r;
1373
- for (e === "}" && X({}, G, K); R < z && (e = L[R++], nr(e));) t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
1374
- return (t > 1114111 || e !== "}") && X({}, G, K), t <= 65535 ? String.fromCharCode(t) : (n = (t - 65536 >> 10) + 55296, r = (t - 65536 & 1023) + 56320, String.fromCharCode(n, r));
1375
- }
1376
- function dr() {
1377
- var e = L.charCodeAt(R++), t = String.fromCharCode(e);
1378
- for (e === 92 && (L.charCodeAt(R) !== 117 && X({}, G, K), ++R, e = lr("u"), (!e || e === "\\" || !ar(e.charCodeAt(0))) && X({}, G, K), t = e); R < z && (e = L.charCodeAt(R), or(e));) ++R, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), L.charCodeAt(R) !== 117 && X({}, G, K), ++R, e = lr("u"), (!e || e === "\\" || !or(e.charCodeAt(0))) && X({}, G, K), t += e);
1379
- return t;
1380
- }
1381
- function fr() {
1382
- for (var e = R++, t; R < z;) {
1383
- if (t = L.charCodeAt(R), t === 92) return R = e, dr();
1384
- if (or(t)) ++R;
1385
- else break;
1386
- }
1387
- return L.slice(e, R);
1388
- }
1389
- function pr() {
1390
- var e = R, t = L.charCodeAt(R) === 92 ? dr() : fr();
1391
- return {
1392
- type: t.length === 1 ? V : sr.hasOwnProperty(t) ? H : t === "null" ? kn : t === "true" || t === "false" ? Dn : V,
1393
- value: t,
1394
- start: e,
1395
- end: R
1396
- };
1397
- }
1398
- function mr() {
1399
- var e = R, t = L.charCodeAt(R), n, r = L[R], i, a, o;
1400
- switch (t) {
1401
- case 46:
1402
- case 40:
1403
- case 41:
1404
- case 59:
1405
- case 44:
1406
- case 123:
1407
- case 125:
1408
- case 91:
1409
- case 93:
1410
- case 58:
1411
- case 63:
1412
- case 126: return ++R, {
1413
- type: W,
1414
- value: String.fromCharCode(t),
1415
- start: e,
1416
- end: R
1417
- };
1418
- default: if (n = L.charCodeAt(R + 1), n === 61) switch (t) {
1419
- case 43:
1420
- case 45:
1421
- case 47:
1422
- case 60:
1423
- case 62:
1424
- case 94:
1425
- case 124:
1426
- case 37:
1427
- case 38:
1428
- case 42: return R += 2, {
1429
- type: W,
1430
- value: String.fromCharCode(t) + String.fromCharCode(n),
1431
- start: e,
1432
- end: R
1433
- };
1434
- case 33:
1435
- case 61: return R += 2, L.charCodeAt(R) === 61 && ++R, {
1436
- type: W,
1437
- value: L.slice(e, R),
1438
- start: e,
1439
- end: R
1440
- };
1441
- }
1442
- }
1443
- if (o = L.substr(R, 4), o === ">>>=") return R += 4, {
1444
- type: W,
1445
- value: o,
1446
- start: e,
1447
- end: R
1448
- };
1449
- if (a = o.substr(0, 3), a === ">>>" || a === "<<=" || a === ">>=") return R += 3, {
1450
- type: W,
1451
- value: a,
1452
- start: e,
1453
- end: R
1454
- };
1455
- if (i = a.substr(0, 2), r === i[1] && "+-<>&|".includes(r) || i === "=>") return R += 2, {
1456
- type: W,
1457
- value: i,
1458
- start: e,
1459
- end: R
1460
- };
1461
- if (i === "//" && X({}, G, K), "<>=!+-*%&|^/".includes(r)) return ++R, {
1462
- type: W,
1463
- value: r,
1464
- start: e,
1465
- end: R
1466
- };
1467
- X({}, G, K);
1468
- }
1469
- function hr(e) {
1470
- let t = "";
1471
- for (; R < z && nr(L[R]);) t += L[R++];
1472
- return t.length === 0 && X({}, G, K), ar(L.charCodeAt(R)) && X({}, G, K), {
1473
- type: U,
1474
- value: parseInt("0x" + t, 16),
1475
- start: e,
1476
- end: R
1477
- };
1478
- }
1479
- function gr(e) {
1480
- let t = "0" + L[R++];
1481
- for (; R < z && rr(L[R]);) t += L[R++];
1482
- return (ar(L.charCodeAt(R)) || q(L.charCodeAt(R))) && X({}, G, K), {
1483
- type: U,
1484
- value: parseInt(t, 8),
1485
- octal: !0,
1486
- start: e,
1487
- end: R
1488
- };
1489
- }
1490
- function _r() {
1491
- var e, t, n = L[R];
1492
- if (tr(q(n.charCodeAt(0)) || n === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = R, e = "", n !== ".") {
1493
- if (e = L[R++], n = L[R], e === "0") {
1494
- if (n === "x" || n === "X") return ++R, hr(t);
1495
- if (rr(n)) return gr(t);
1496
- n && q(n.charCodeAt(0)) && X({}, G, K);
1497
- }
1498
- for (; q(L.charCodeAt(R));) e += L[R++];
1499
- n = L[R];
1500
- }
1501
- if (n === ".") {
1502
- for (e += L[R++]; q(L.charCodeAt(R));) e += L[R++];
1503
- n = L[R];
1504
- }
1505
- if (n === "e" || n === "E") {
1506
- if (e += L[R++], n = L[R], (n === "+" || n === "-") && (e += L[R++]), q(L.charCodeAt(R))) for (; q(L.charCodeAt(R));) e += L[R++];
1507
- else X({}, G, K);
1508
- }
1509
- return ar(L.charCodeAt(R)) && X({}, G, K), {
1510
- type: U,
1511
- value: parseFloat(e),
1512
- start: t,
1513
- end: R
1514
- };
1515
- }
1516
- function vr() {
1517
- var e = "", t, n, r, i, a = !1;
1518
- for (t = L[R], tr(t === "'" || t === "\"", "String literal must starts with a quote"), n = R, ++R; R < z;) {
1519
- if (r = L[R++], r === t) {
1520
- t = "";
1521
- break;
1522
- }
1523
- if (r === "\\") {
1524
- if (r = L[R++], !r || !J(r.charCodeAt(0))) switch (r) {
1525
- case "u":
1526
- case "x":
1527
- L[R] === "{" ? (++R, e += ur()) : e += lr(r);
1528
- break;
1529
- case "n":
1530
- e += "\n";
1531
- break;
1532
- case "r":
1533
- e += "\r";
1534
- break;
1535
- case "t":
1536
- e += " ";
1537
- break;
1538
- case "b":
1539
- e += "\b";
1540
- break;
1541
- case "f":
1542
- e += "\f";
1543
- break;
1544
- case "v":
1545
- e += "\v";
1546
- break;
1547
- default: rr(r) ? (i = "01234567".indexOf(r), i !== 0 && (a = !0), R < z && rr(L[R]) && (a = !0, i = i * 8 + "01234567".indexOf(L[R++]), "0123".includes(r) && R < z && rr(L[R]) && (i = i * 8 + "01234567".indexOf(L[R++]))), e += String.fromCharCode(i)) : e += r;
1548
- }
1549
- else r === "\r" && L[R] === "\n" && ++R;
1550
- } else if (J(r.charCodeAt(0))) break;
1551
- else e += r;
1552
- }
1553
- return t !== "" && X({}, G, K), {
1554
- type: An,
1555
- value: e,
1556
- octal: a,
1557
- start: n,
1558
- end: R
1559
- };
1560
- }
1561
- function yr(e, t) {
1562
- let n = e;
1563
- t.includes("u") && (n = n.replace(/\\u\{([0-9a-fA-F]+)\}/g, (e, t) => {
1564
- if (parseInt(t, 16) <= 1114111) return "x";
1565
- X({}, Jn);
1566
- }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
1567
- try {
1568
- new RegExp(n);
1569
- } catch {
1570
- X({}, Jn);
1571
- }
1572
- try {
1573
- return new RegExp(e, t);
1574
- } catch {
1575
- return null;
1576
- }
1577
- }
1578
- function br() {
1579
- var e = L[R], t, n, r, i;
1580
- for (tr(e === "/", "Regular expression literal must start with a slash"), t = L[R++], n = !1, r = !1; R < z;) if (e = L[R++], t += e, e === "\\") e = L[R++], J(e.charCodeAt(0)) && X({}, Yn), t += e;
1581
- else if (J(e.charCodeAt(0))) X({}, Yn);
1582
- else if (n) e === "]" && (n = !1);
1583
- else if (e === "/") {
1584
- r = !0;
1585
- break;
1586
- } else e === "[" && (n = !0);
1587
- return r || X({}, Yn), i = t.substr(1, t.length - 2), {
1588
- value: i,
1589
- literal: t
1590
- };
1591
- }
1592
- function xr() {
1593
- for (var e, t = "", n = ""; R < z && (e = L[R], or(e.charCodeAt(0)));) ++R, e === "\\" && R < z ? X({}, G, K) : (n += e, t += e);
1594
- return n.search(/[^gimuy]/g) >= 0 && X({}, Jn, n), {
1595
- value: n,
1596
- literal: t
1597
- };
1598
- }
1599
- function Sr() {
1600
- var e, t, n, r;
1601
- return B = null, cr(), e = R, t = br(), n = xr(), r = yr(t.value, n.value), {
1602
- literal: t.literal + n.literal,
1603
- value: r,
1604
- regex: {
1605
- pattern: t.value,
1606
- flags: n.value
1607
- },
1608
- start: e,
1609
- end: R
1610
- };
1611
- }
1612
- function Cr(e) {
1613
- return e.type === V || e.type === H || e.type === Dn || e.type === kn;
1614
- }
1615
- function wr() {
1616
- if (cr(), R >= z) return {
1617
- type: On,
1618
- start: R,
1619
- end: R
1620
- };
1621
- let e = L.charCodeAt(R);
1622
- return ar(e) ? pr() : e === 40 || e === 41 || e === 59 ? mr() : e === 39 || e === 34 ? vr() : e === 46 ? q(L.charCodeAt(R + 1)) ? _r() : mr() : q(e) ? _r() : mr();
1623
- }
1624
- function Y() {
1625
- let e = B;
1626
- return R = e.end, B = wr(), R = e.end, e;
1627
- }
1628
- function Tr() {
1629
- let e = R;
1630
- B = wr(), R = e;
1631
- }
1632
- function Er(e) {
1633
- let t = new F(Mn);
1634
- return t.elements = e, t;
1635
- }
1636
- function Dr(e, t, n) {
1637
- let r = new F(e === "||" || e === "&&" ? Rn : Nn);
1638
- return r.operator = e, r.left = t, r.right = n, r;
1639
- }
1640
- function Or(e, t) {
1641
- let n = new F(Pn);
1642
- return n.callee = e, n.arguments = t, n;
1643
- }
1644
- function kr(e, t, n) {
1645
- let r = new F(Fn);
1646
- return r.test = e, r.consequent = t, r.alternate = n, r;
1647
- }
1648
- function Ar(e) {
1649
- let t = new F(In);
1650
- return t.name = e, t;
1651
- }
1652
- function jr(e) {
1653
- let t = new F(Ln);
1654
- return t.value = e.value, t.raw = L.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
1655
- }
1656
- function Mr(e, t, n) {
1657
- let r = new F(zn);
1658
- return r.computed = e === "[", r.object = t, r.property = n, r.computed || (n.member = !0), r;
1659
- }
1660
- function Nr(e) {
1661
- let t = new F(Bn);
1662
- return t.properties = e, t;
1663
- }
1664
- function Pr(e, t, n) {
1665
- let r = new F(Vn);
1666
- return r.key = t, r.value = n, r.kind = e, r;
1667
- }
1668
- function Fr(e, t) {
1669
- let n = new F(Hn);
1670
- return n.operator = e, n.argument = t, n.prefix = !0, n;
1671
- }
1672
- function X(e, t) {
1673
- var n, r = Array.prototype.slice.call(arguments, 2), i = t.replace(/%(\d)/g, (e, t) => (tr(t < r.length, "Message reference must be in range"), r[t]));
1674
- throw n = Error(i), n.index = R, n.description = i, n;
1675
- }
1676
- function Ir(e) {
1677
- e.type === On && X(e, qn), e.type === U && X(e, Un), e.type === An && X(e, Wn), e.type === V && X(e, Gn), e.type === H && X(e, Kn), X(e, G, e.value);
1678
- }
1679
- function Z(e) {
1680
- let t = Y();
1681
- (t.type !== W || t.value !== e) && Ir(t);
1682
- }
1683
- function Q(e) {
1684
- return B.type === W && B.value === e;
1685
- }
1686
- function Lr(e) {
1687
- return B.type === H && B.value === e;
1688
- }
1689
- function Rr() {
1690
- let e = [];
1691
- for (R = B.start, Z("["); !Q("]");) Q(",") ? (Y(), e.push(null)) : (e.push($()), Q("]") || Z(","));
1692
- return Y(), Er(e);
1693
- }
1694
- function zr() {
1695
- R = B.start;
1696
- let e = Y();
1697
- return e.type === An || e.type === U ? (e.octal && X(e, Xn), jr(e)) : Ar(e.value);
1698
- }
1699
- function Br() {
1700
- var e, t, n, r;
1701
- if (R = B.start, e = B, e.type === V) return n = zr(), Z(":"), r = $(), Pr("init", n, r);
1702
- if (e.type === On || e.type === W) Ir(e);
1703
- else return t = zr(), Z(":"), r = $(), Pr("init", t, r);
1704
- }
1705
- function Vr() {
1706
- var e = [], t, n, r, i = {}, a = String;
1707
- for (R = B.start, Z("{"); !Q("}");) t = Br(), n = t.key.type === In ? t.key.name : a(t.key.value), r = "$" + n, Object.prototype.hasOwnProperty.call(i, r) ? X({}, Zn) : i[r] = !0, e.push(t), Q("}") || Z(",");
1708
- return Z("}"), Nr(e);
1709
- }
1710
- function Hr() {
1711
- Z("(");
1712
- let e = ei();
1713
- return Z(")"), e;
1714
- }
1715
- var Ur = { if: 1 };
1716
- function Wr() {
1717
- var e, t, n;
1718
- if (Q("(")) return Hr();
1719
- if (Q("[")) return Rr();
1720
- if (Q("{")) return Vr();
1721
- if (e = B.type, R = B.start, e === V || Ur[B.value]) n = Ar(Y().value);
1722
- else if (e === An || e === U) B.octal && X(B, Xn), n = jr(Y());
1723
- else if (e === H) throw Error(Qn);
1724
- else e === Dn ? (t = Y(), t.value = t.value === "true", n = jr(t)) : e === kn ? (t = Y(), t.value = null, n = jr(t)) : Q("/") || Q("/=") ? (n = jr(Sr()), Tr()) : Ir(Y());
1725
- return n;
1726
- }
1727
- function Gr() {
1728
- let e = [];
1729
- if (Z("("), !Q(")")) for (; R < z && (e.push($()), !Q(")"));) Z(",");
1730
- return Z(")"), e;
1731
- }
1732
- function Kr() {
1733
- R = B.start;
1734
- let e = Y();
1735
- return Cr(e) || Ir(e), Ar(e.value);
1736
- }
1737
- function qr() {
1738
- return Z("."), Kr();
1739
- }
1740
- function Jr() {
1741
- Z("[");
1742
- let e = ei();
1743
- return Z("]"), e;
1744
- }
1745
- function Yr() {
1746
- for (var e = Wr(), t, n;;) if (Q(".")) n = qr(), e = Mr(".", e, n);
1747
- else if (Q("(")) t = Gr(), e = Or(e, t);
1748
- else if (Q("[")) n = Jr(), e = Mr("[", e, n);
1749
- else break;
1750
- return e;
1751
- }
1752
- function Xr() {
1753
- let e = Yr();
1754
- if (B.type === W && (Q("++") || Q("--"))) throw Error(Qn);
1755
- return e;
1756
- }
1757
- function Zr() {
1758
- var e, t;
1759
- if (B.type !== W && B.type !== H) t = Xr();
1760
- else if (Q("++") || Q("--")) throw Error(Qn);
1761
- else if (Q("+") || Q("-") || Q("~") || Q("!")) e = Y(), t = Zr(), t = Fr(e.value, t);
1762
- else if (Lr("delete") || Lr("void") || Lr("typeof")) throw Error(Qn);
1763
- else t = Xr();
1764
- return t;
1765
- }
1766
- function Qr(e) {
1767
- let t = 0;
1768
- if (e.type !== W && e.type !== H) return 0;
1769
- switch (e.value) {
1770
- case "||":
1771
- t = 1;
1772
- break;
1773
- case "&&":
1774
- t = 2;
1775
- break;
1776
- case "|":
1777
- t = 3;
1778
- break;
1779
- case "^":
1780
- t = 4;
1781
- break;
1782
- case "&":
1783
- t = 5;
1784
- break;
1785
- case "==":
1786
- case "!=":
1787
- case "===":
1788
- case "!==":
1789
- t = 6;
1790
- break;
1791
- case "<":
1792
- case ">":
1793
- case "<=":
1794
- case ">=":
1795
- case "instanceof":
1796
- case "in":
1797
- t = 7;
1798
- break;
1799
- case "<<":
1800
- case ">>":
1801
- case ">>>":
1802
- t = 8;
1803
- break;
1804
- case "+":
1805
- case "-":
1806
- t = 9;
1807
- break;
1808
- case "*":
1809
- case "/":
1810
- case "%": t = 11;
1811
- }
1812
- return t;
1813
- }
1814
- function $r() {
1815
- var e = B, t, n, r, i, a, o, s, c = Zr(), l;
1816
- if (r = B, i = Qr(r), i === 0) return c;
1817
- for (r.prec = i, Y(), t = [e, B], o = Zr(), a = [
1818
- c,
1819
- r,
1820
- o
1821
- ]; (i = Qr(B)) > 0;) {
1822
- for (; a.length > 2 && i <= a[a.length - 2].prec;) o = a.pop(), s = a.pop().value, c = a.pop(), t.pop(), n = Dr(s, c, o), a.push(n);
1823
- r = Y(), r.prec = i, a.push(r), t.push(B), n = Zr(), a.push(n);
1824
- }
1825
- for (l = a.length - 1, n = a[l], t.pop(); l > 1;) t.pop(), n = Dr(a[l - 1].value, a[l - 2], n), l -= 2;
1826
- return n;
1827
- }
1828
- function $() {
1829
- var e = $r(), t, n;
1830
- return Q("?") && (Y(), t = $(), Z(":"), n = $(), e = kr(e, t, n)), e;
1831
- }
1832
- function ei() {
1833
- let e = $();
1834
- if (Q(",")) throw Error(Qn);
1835
- return e;
1836
- }
1837
- function ti(e) {
1838
- L = e, R = 0, z = L.length, B = null, Tr();
1839
- let t = ei();
1840
- if (B.type !== On) throw Error("Unexpect token after expression.");
1841
- return t;
1842
- }
1843
- var ni = {
1844
- NaN: "NaN",
1845
- E: "Math.E",
1846
- LN2: "Math.LN2",
1847
- LN10: "Math.LN10",
1848
- LOG2E: "Math.LOG2E",
1849
- LOG10E: "Math.LOG10E",
1850
- PI: "Math.PI",
1851
- SQRT1_2: "Math.SQRT1_2",
1852
- SQRT2: "Math.SQRT2",
1853
- MIN_VALUE: "Number.MIN_VALUE",
1854
- MAX_VALUE: "Number.MAX_VALUE"
1855
- };
1856
- function ri(e) {
1857
- function t(t, n, r, i) {
1858
- let a = e(n[0]);
1859
- return r && (a = r + "(" + a + ")", r.lastIndexOf("new ", 0) === 0 && (a = "(" + a + ")")), a + "." + t + (i < 0 ? "" : i === 0 ? "()" : "(" + n.slice(1).map(e).join(",") + ")");
1860
- }
1861
- function n(e, n, r) {
1862
- return (i) => t(e, i, n, r);
1863
- }
1864
- let r = "new Date", i = "String", a = "RegExp";
1865
- return {
1866
- isNaN: "Number.isNaN",
1867
- isFinite: "Number.isFinite",
1868
- abs: "Math.abs",
1869
- acos: "Math.acos",
1870
- asin: "Math.asin",
1871
- atan: "Math.atan",
1872
- atan2: "Math.atan2",
1873
- ceil: "Math.ceil",
1874
- cos: "Math.cos",
1875
- exp: "Math.exp",
1876
- floor: "Math.floor",
1877
- hypot: "Math.hypot",
1878
- log: "Math.log",
1879
- max: "Math.max",
1880
- min: "Math.min",
1881
- pow: "Math.pow",
1882
- random: "Math.random",
1883
- round: "Math.round",
1884
- sin: "Math.sin",
1885
- sqrt: "Math.sqrt",
1886
- tan: "Math.tan",
1887
- clamp: function(t) {
1888
- t.length < 3 && P("Missing arguments to clamp function."), t.length > 3 && P("Too many arguments to clamp function.");
1889
- let n = t.map(e);
1890
- return "Math.max(" + n[1] + ", Math.min(" + n[2] + "," + n[0] + "))";
1891
- },
1892
- now: "Date.now",
1893
- utc: "Date.UTC",
1894
- datetime: r,
1895
- date: n("getDate", r, 0),
1896
- day: n("getDay", r, 0),
1897
- year: n("getFullYear", r, 0),
1898
- month: n("getMonth", r, 0),
1899
- hours: n("getHours", r, 0),
1900
- minutes: n("getMinutes", r, 0),
1901
- seconds: n("getSeconds", r, 0),
1902
- milliseconds: n("getMilliseconds", r, 0),
1903
- time: n("getTime", r, 0),
1904
- timezoneoffset: n("getTimezoneOffset", r, 0),
1905
- utcdate: n("getUTCDate", r, 0),
1906
- utcday: n("getUTCDay", r, 0),
1907
- utcyear: n("getUTCFullYear", r, 0),
1908
- utcmonth: n("getUTCMonth", r, 0),
1909
- utchours: n("getUTCHours", r, 0),
1910
- utcminutes: n("getUTCMinutes", r, 0),
1911
- utcseconds: n("getUTCSeconds", r, 0),
1912
- utcmilliseconds: n("getUTCMilliseconds", r, 0),
1913
- length: n("length", null, -1),
1914
- parseFloat: "parseFloat",
1915
- parseInt: "parseInt",
1916
- upper: n("toUpperCase", i, 0),
1917
- lower: n("toLowerCase", i, 0),
1918
- substring: n("substring", i),
1919
- split: n("split", i),
1920
- trim: n("trim", i, 0),
1921
- btoa: "btoa",
1922
- atob: "atob",
1923
- encodeURIComponent: "encodeURIComponent",
1924
- regexp: a,
1925
- test: n("test", a),
1926
- if: function(t) {
1927
- t.length < 3 && P("Missing arguments to if function."), t.length > 3 && P("Too many arguments to if function.");
1928
- let n = t.map(e);
1929
- return "(" + n[0] + "?" + n[1] + ":" + n[2] + ")";
1930
- }
1931
- };
1932
- }
1933
- function ii(e) {
1934
- let t = e && e.length - 1;
1935
- return t && (e[0] === "\"" && e[t] === "\"" || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
1936
- }
1937
- function ai(e) {
1938
- e ||= {};
1939
- let t = e.allowed ? pn(e.allowed) : {}, n = e.forbidden ? pn(e.forbidden) : {}, r = e.constants || ni, i = (e.functions || ri)(d), a = e.globalvar, o = e.fieldvar, s = un(a) ? a : (e) => `${a}["${e}"]`, c = {}, l = {}, u = 0;
1940
- function d(e) {
1941
- if (fn(e)) return e;
1942
- let t = f[e.type];
1943
- return t ?? P("Unsupported type: " + e.type), t(e);
1944
- }
1945
- let f = {
1946
- Literal: (e) => e.raw,
1947
- Identifier: (e) => {
1948
- let i = e.name;
1949
- return u > 0 ? i : dn(n, i) ? P("Illegal identifier: " + i) : dn(r, i) ? r[i] : dn(t, i) ? i : (c[i] = 1, s(i));
1950
- },
1951
- MemberExpression: (e) => {
1952
- let t = !e.computed, n = d(e.object);
1953
- t && (u += 1);
1954
- let r = d(e.property);
1955
- return n === o && (l[ii(r)] = 1), t && --u, n + (t ? "." + r : "[" + r + "]");
1956
- },
1957
- CallExpression: (e) => {
1958
- e.callee.type !== "Identifier" && P("Illegal callee type: " + e.callee.type);
1959
- let t = e.callee.name, n = e.arguments, r = dn(i, t) && i[t];
1960
- return r || P("Unrecognized function: " + t), un(r) ? r(n) : r + "(" + n.map(d).join(",") + ")";
1961
- },
1962
- ArrayExpression: (e) => "[" + e.elements.map(d).join(",") + "]",
1963
- BinaryExpression: (e) => "(" + d(e.left) + " " + e.operator + " " + d(e.right) + ")",
1964
- UnaryExpression: (e) => "(" + e.operator + d(e.argument) + ")",
1965
- ConditionalExpression: (e) => "(" + d(e.test) + "?" + d(e.consequent) + ":" + d(e.alternate) + ")",
1966
- LogicalExpression: (e) => "(" + d(e.left) + e.operator + d(e.right) + ")",
1967
- ObjectExpression: (e) => {
1968
- for (let t of e.properties) {
1969
- let e = t.key.type === "Literal" ? String(t.key.value) : t.key.name;
1970
- ln.has(e) && P("Illegal property: " + e);
1971
- }
1972
- return "{" + e.properties.map(d).join(",") + "}";
1973
- },
1974
- Property: (e) => {
1975
- u += 1;
1976
- let t = d(e.key);
1977
- return --u, t + ":" + d(e.value);
1978
- }
1979
- };
1980
- function p(e) {
1981
- let t = {
1982
- code: d(e),
1983
- globals: Object.keys(c),
1984
- fields: Object.keys(l)
1985
- };
1986
- return c = {}, l = {}, t;
1987
- }
1988
- return p.functions = i, p.constants = r, p;
1989
- }
1990
- //#endregion
1991
- //#region ../core/src/utils/smoothstep.js
1992
- function oi(e, t, n) {
1993
- return n = (n - e) / (t - e), n = Math.max(0, Math.min(1, n)), n * n * (3 - 2 * n);
1994
- }
1995
- //#endregion
1996
- //#region ../core/src/utils/clamp.js
1997
- function si(e, t = 0, n = 1) {
1998
- return Math.max(t, Math.min(n, e));
1999
- }
2000
- //#endregion
2001
- //#region ../core/src/utils/linearstep.js
2002
- function ci(e, t, n) {
2003
- return si((n - e) / (t - e), 0, 1);
2004
- }
2005
- //#endregion
2006
- //#region ../core/src/utils/expression.js
2007
- function li(e) {
2008
- return u(e) || ArrayBuffer.isView(e) ? e : null;
2009
- }
2010
- function ui(e) {
2011
- return li(e) || (S(e) ? e : null);
2012
- }
2013
- var di = {
2014
- clamp: si,
2015
- tickStep: Pe,
2016
- format(e, t) {
2017
- return jt(t)(e);
2018
- },
2019
- join(e, t) {
2020
- return li(e).join(t);
2021
- },
2022
- indexof(e, t, n) {
2023
- return ui(e).indexOf(t, n);
2024
- },
2025
- inrange: he,
2026
- lastindexof(e, t, n) {
2027
- return ui(e).lastIndexOf(t, n);
2028
- },
2029
- reverse(e) {
2030
- return S(e) ? Array.from(e).reverse().join("") : li(e).slice().reverse();
2031
- },
2032
- slice(e, t, n) {
2033
- return ui(e).slice(t, n);
2034
- },
2035
- mapHasKey(e, t) {
2036
- return e.has(t);
2037
- },
2038
- isArray: u,
2039
- isBoolean: ge,
2040
- isDefined(e) {
2041
- return e !== void 0;
2042
- },
2043
- isNumber: _e,
2044
- isObject: d,
2045
- isRegExp: ve,
2046
- isString: S,
2047
- isValid(e) {
2048
- return e != null && e === e;
2049
- },
2050
- lerp: ye,
2051
- linearstep: ci,
2052
- replace(e, t, n) {
2053
- return String(e).replace(t, n);
2054
- },
2055
- sort(e) {
2056
- return li(e).slice().sort(de);
2057
- },
2058
- center(e) {
2059
- let t = li(e);
2060
- return (t[0] + t[t.length - 1]) / 2;
2061
- },
2062
- span(e) {
2063
- return be(e);
2064
- },
2065
- smoothstep: oi
2066
- };
2067
- function fi(e) {
2068
- let t = !1, n = bi(e, {}, { resolveScaleResolution: () => (t = !0, {
2069
- channel: "analysis",
2070
- getDomainRef: () => void 0,
2071
- getMappingRef: () => void 0,
2072
- getConfigurationRef: () => void 0,
2073
- getZoomLevelRef: () => void 0
2074
- }) });
2075
- return {
2076
- usesScaleHelper: t,
2077
- globals: n.globals
2078
- };
2079
- }
2080
- function pi(e, t) {
2081
- let n = ri(e);
2082
- for (let e in di) n[e] = `this.${e}`;
2083
- for (let r of [
2084
- "scale",
2085
- "invert",
2086
- "domain",
2087
- "range",
2088
- "bandwidth",
2089
- "linearize",
2090
- "zoomLevel"
2091
- ]) n[r] = (n) => mi(e, t, r, n);
2092
- return n;
2093
- }
2094
- function mi(e, t, n, r) {
2095
- if (n === "zoomLevel" && r.length === 0) {
2096
- let e = [];
2097
- for (let r of ["x", "y"]) {
2098
- let i = t.resolveScaleResolution?.(r);
2099
- if (i) {
2100
- let a = t.getScaleHelper(n, r, i);
2101
- e.push(`${t.globalvar}["${a.codeName}"]()`);
2102
- }
2103
- }
2104
- return `Math.sqrt(${e.join("*") || "1"})`;
2105
- }
2106
- if (r.length === 0) throw Error(`Scale helper "${n}" requires a literal channel name.`);
2107
- if ((n === "scale" || n === "invert" || n === "linearize") && r.length < 2) throw Error(`Scale helper "${n}" requires a channel name and a value.`);
2108
- if (n === "zoomLevel" && r.length > 1) throw Error("Scale helper \"zoomLevel\" accepts zero arguments or one literal channel name.");
2109
- let i = hi(r[0]);
2110
- if (!i) throw Error(`Scale helper "${n}" requires a literal channel name.`);
2111
- let a = t.resolveScaleResolution?.(i);
2112
- if (!a) throw Error(`Unknown scale channel "${i}" in expression helper "${n}".`);
2113
- let o = t.getScaleHelper(n, i, a), s = r.slice(1).map((t) => e(t)).join(",");
2114
- return `${t.globalvar}["${o.codeName}"](${s})`;
2115
- }
2116
- function hi(e) {
2117
- return e?.type === "Literal" && typeof e.value == "string" ? e.value : void 0;
2118
- }
2119
- function gi(e, t) {
2120
- let n = (n) => vi(t, e, n);
2121
- if (e === "domain") return () => n(() => t.getDomain());
2122
- if (e === "range") return () => n(() => t.getScale().range());
2123
- if (e === "bandwidth") return () => n(() => {
2124
- let e = t.getScale();
2125
- if (typeof e.bandwidth != "function") throw Error(`Scale channel "${t.channel}" does not support bandwidth().`);
2126
- return e.bandwidth();
2127
- });
2128
- if (e === "scale") return (e) => n(() => t.getScale()(e));
2129
- if (e === "invert") return (e) => n(() => t.getScale().invert(e));
2130
- if (e === "linearize") return (e) => n(() => e == null ? null : typeof t.fromComplex == "function" ? t.fromComplex(e) : e);
2131
- if (e === "zoomLevel") return () => n(() => t.getZoomLevel());
2132
- throw Error("Unknown scale helper: " + e);
2133
- }
2134
- var _i = /* @__PURE__ */ new WeakSet();
2135
- function vi(e, t, n) {
2136
- if (_i.has(e)) throw Error(`Scale helper cycle detected while evaluating ${t}("${e.channel}").`);
2137
- _i.add(e);
2138
- try {
2139
- return n();
2140
- } finally {
2141
- _i.delete(e);
2142
- }
2143
- }
2144
- function yi(e, t) {
2145
- return e === "domain" ? t.getDomainRef() : e === "linearize" ? t.getConfigurationRef() : e === "zoomLevel" ? t.getZoomLevelRef() : t.getMappingRef();
2146
- }
2147
- function bi(e, t = {}, n = {}) {
2148
- try {
2149
- let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), o = 1, s = {
2150
- ...n,
2151
- globalvar: "globalObject",
2152
- globalObject: t,
2153
- getScaleHelper(e, n, s) {
2154
- let c = e + ":" + n, l = i.get(c);
2155
- if (l) return l;
2156
- let u = r.get(c);
2157
- u || (u = yi(e, s), r.set(c, u));
2158
- let d = "__scale_helper_" + o++, f = {
2159
- codeName: d,
2160
- dependency: u
2161
- };
2162
- return i.set(c, f), e === "zoomLevel" && a.add(s), t[d] = gi(e, s), f;
2163
- }
2164
- }, c = ai({
2165
- forbidden: [],
2166
- allowed: ["datum", "undefined"],
2167
- globalvar: "globalObject",
2168
- fieldvar: "datum",
2169
- functions: (e) => pi(e, s)
2170
- })(ti(e)), l = Function("datum", "globalObject", `"use strict";
2171
- try {
2172
- return (${c.code});
2173
- } catch (e) {
2174
- throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
2175
- }`).bind(di), u = (e) => l(e, t);
2176
- return u.createEvaluator = (e) => (t) => l(t, e), u.fields = c.fields, u.globals = c.globals, u.code = c.code, u.scaleDependencies = Array.from(new Set(r.values())), u.zoomLevelResolutions = Array.from(a), u;
2177
- } catch (t) {
2178
- throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
2179
- }
2180
- }
2181
- var xi = ai({
2182
- forbidden: [],
2183
- allowed: ["event"],
2184
- globalvar: "globalObject"
2185
- });
2186
- function Si(e) {
2187
- try {
2188
- let t = xi(ti(e));
2189
- return Function("event", "globalObject", `"use strict";
2190
- try {
2191
- return !!(${t.code});
2192
- } catch (e) {
2193
- throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
2194
- }`);
2195
- } catch (t) {
2196
- throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
2197
- }
2198
- }
2199
- //#endregion
2200
- //#region ../core/src/utils/interactionConfig.js
2201
- function Ci(e) {
2202
- if (typeof e == "string") {
2203
- let t = e.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);
2204
- if (!t) throw Error(`Invalid event type string: ${e}`);
2205
- let [, n, r] = t, i = { type: n };
2206
- return r && (i.filter = r), i;
2207
- }
2208
- return e;
2209
- }
2210
- function wi(e) {
2211
- return e?.filter ? Si(e.filter) : () => !0;
2212
- }
2213
- function Ti(e, t, n) {
2214
- if (!t.includes(e.type)) throw Error(n);
2215
- return e;
2216
- }
2217
- //#endregion
2218
- //#region ../core/src/selection/selectionPredicateTree.js
2219
- function Ei(e, t) {
2220
- if (!("test" in e) || !("ref" in e.test)) return e;
2221
- let n = e.test.ref;
2222
- if (!Object.hasOwn(t, n)) throw Error(`Unknown predicate "${n}" in unit view.`);
2223
- return {
2224
- ...e,
2225
- test: t[n]
2226
- };
2227
- }
2228
- function Di(e) {
2229
- let t = "test" in e ? e.test : {
2230
- param: e.param,
2231
- ...e.empty === void 0 ? {} : { empty: e.empty },
2232
- ...e.project === void 0 ? {} : { project: e.project }
2233
- }, n = (e) => {
2234
- if (!e || typeof e != "object" || Array.isArray(e)) throw Error("Selection predicate must be an object.");
2235
- let t = e, r = [
2236
- "param",
2237
- "and",
2238
- "or",
2239
- "not"
2240
- ].filter((e) => e in t);
2241
- if (r.length !== 1) throw Error("Selection predicate must have exactly one operator.");
2242
- let i = r[0];
2243
- if (i === "param") {
2244
- if (typeof t.param == "string") {
2245
- if (Object.keys(t).some((e) => ![
2246
- "param",
2247
- "empty",
2248
- "project"
2249
- ].includes(e)) || typeof (t.empty ?? !0) != "boolean") throw Error("Invalid selection parameter predicate.");
2250
- if (t.project !== void 0) {
2251
- let e = t.project;
2252
- if (!e || typeof e != "object" || Array.isArray(e) || Object.keys(e).length === 0 || Object.entries(e).some(([e, t]) => !["x", "y"].includes(e) || t !== e && t !== e + "2")) throw Error("Invalid interval selection projection.");
2253
- }
2254
- return {
2255
- param: Gt(t.param),
2256
- empty: t.empty ?? !0,
2257
- ...t.project ? { project: { ...t.project } } : {}
2258
- };
2259
- }
2260
- if (!t.param || typeof t.param != "object" || Object.keys(t.param).length !== 1 || !Array.isArray(t.param.or) || Object.keys(t).some((e) => !["param", "empty"].includes(e)) || typeof (t.empty ?? !0) != "boolean") throw Error("Invalid flat selection union.");
2261
- if (t.param.or.length === 0) throw Error("Selection test \"or\" must be a nonempty array.");
2262
- let e = Array.from(new Set(t.param.or.map(Gt))), n = e.map((e) => ({ selectionActive: e })), r = e.map((e, t) => ({ all: [{
2263
- param: e,
2264
- empty: !0
2265
- }, n[t]] }));
2266
- return { any: t.empty === !1 ? r : [...r, { not: { any: n } }] };
2267
- }
2268
- if (Object.keys(t).length !== 1) throw Error("Selection predicate operators cannot be mixed.");
2269
- if (i === "not") return { not: n(t.not) };
2270
- let a = t[i];
2271
- if (!Array.isArray(a) || a.length === 0) throw Error(`Selection test "${i}" must be a nonempty array.`);
2272
- let o = a.map(n);
2273
- return i === "and" ? { all: o } : { any: o };
2274
- };
2275
- return n(t);
2276
- }
2277
- function Oi(e) {
2278
- let t = /* @__PURE__ */ new Set(), n = (e) => {
2279
- if ("param" in e) t.add(e.param);
2280
- else if ("selectionActive" in e) t.add(typeof e.selectionActive == "string" ? e.selectionActive : e.selectionActive.param);
2281
- else if ("not" in e) n(e.not);
2282
- else for (let t of "all" in e ? e.all : e.any) n(t);
2283
- };
2284
- return n(e), Array.from(t);
2285
- }
2286
- function ki(e) {
2287
- let t = /* @__PURE__ */ new Map(), n = (e) => {
2288
- if ("param" in e) t.set(e.param, { selectionActive: {
2289
- param: e.param,
2290
- type: e.type,
2291
- components: e.projections?.map(({ component: e }) => e) ?? []
2292
- } });
2293
- else if ("selectionActive" in e) t.set(e.selectionActive.param, e);
2294
- else if ("not" in e) n(e.not);
2295
- else for (let t of "all" in e ? e.all : e.any) n(t);
2296
- };
2297
- return n(e), { all: [e, { any: Array.from(t.values()) }] };
2298
- }
2299
- function Ai(e) {
2300
- if ("param" in e) return e.empty;
2301
- if ("selectionActive" in e) return !1;
2302
- if ("not" in e) return !Ai(e.not);
2303
- let t = "all" in e ? e.all : e.any;
2304
- return "all" in e ? t.every(Ai) : t.some(Ai);
2305
- }
2306
- function ji(e, t, n, r, i) {
2307
- let a = (e) => {
2308
- let t = n.findSelectionCapability?.(e);
2309
- if (t) return t;
2310
- let r = n.findValue(e);
2311
- if (!r || ![
2312
- "single",
2313
- "multi",
2314
- "interval"
2315
- ].includes(r.type)) throw Error(`Selection parameter "${e}" was not found.`);
2316
- return {
2317
- type: r.type,
2318
- components: r.type === "interval" ? Object.keys(r.intervals).map((e) => ({ component: e })) : []
2319
- };
2320
- }, o = t, s = (e) => {
2321
- let t = o[e];
2322
- if (t && "field" in t) return t.field;
2323
- if (t && "condition" in t) return (Array.isArray(t.condition) ? t.condition : [t.condition]).find((e) => "field" in e)?.field;
2324
- }, c = (e) => {
2325
- if ("all" in e) return { all: e.all.map(c) };
2326
- if ("any" in e) return { any: e.any.map(c) };
2327
- if ("not" in e) return { not: c(e.not) };
2328
- let t = "param" in e ? e.param : e.selectionActive, n = a(t);
2329
- if ("selectionActive" in e) return { selectionActive: {
2330
- param: t,
2331
- type: n.type,
2332
- components: n.components.map(({ component: e }) => e)
2333
- } };
2334
- if (e.project && n.type !== "interval") throw Error(`Selection "${t}" is not an interval selection; project is invalid.`);
2335
- if (n.type !== "interval") return {
2336
- param: t,
2337
- type: n.type,
2338
- empty: e.empty
2339
- };
2340
- let l = n.components.map(({ component: e }) => e);
2341
- if (e.project && (Object.keys(e.project).length !== l.length || l.some((t) => !(t in e.project)))) throw Error(`Selection "${t}" project must cover its declared components: ${l.join(", ")}.`);
2342
- let u = n.components.map(({ component: n, type: a }) => {
2343
- let c = e.project?.[n] ?? n;
2344
- if (![
2345
- "x",
2346
- "x2",
2347
- "y",
2348
- "y2"
2349
- ].includes(c)) throw Error(`Selection "${t}" has unsupported component "${n}".`);
2350
- let l = o[c];
2351
- if (e.project && (!l || !("field" in l))) throw Error(`Selection "${t}" project target "${c}" must be an unconditional field encoding.`);
2352
- let u = s(c);
2353
- if (!u) throw Error(`Selection "${t}" has no field for "${c}".`);
2354
- if (e.project) {
2355
- let e = i?.(c) ?? ("type" in l ? l.type : void 0) ?? ("type" in o[n] ? o[n].type : void 0);
2356
- if (![
2357
- "quantitative",
2358
- "index",
2359
- "locus"
2360
- ].includes(a) || e !== a) throw Error(`Selection "${t}" project target "${c}" must have matching quantitative, index, or locus type (${a} vs ${e}).`);
2361
- }
2362
- let d = n + "2", f = e.project ? void 0 : s(d);
2363
- return {
2364
- component: n,
2365
- input: c,
2366
- field: u,
2367
- ...f && f !== u ? {
2368
- secondaryInput: d,
2369
- secondaryField: f,
2370
- hitTest: r
2371
- } : {}
2372
- };
2373
- });
2374
- return {
2375
- param: t,
2376
- type: "interval",
2377
- empty: e.empty,
2378
- projections: u
2379
- };
2380
- };
2381
- return c(e);
2382
- }
2383
- function Mi(e, t) {
2384
- if ("all" in e || "any" in e) {
2385
- let n = ("all" in e ? e.all : e.any).map((e) => Mi(e, t));
2386
- return "all" in e ? (e) => n.every((t) => t(e)) : (e) => n.some((t) => t(e));
2387
- }
2388
- if ("not" in e) {
2389
- let n = Mi(e.not, t);
2390
- return (e) => !n(e);
2391
- }
2392
- if ("selectionActive" in e) {
2393
- let { param: n } = e.selectionActive;
2394
- return () => Ni(t(n));
2395
- }
2396
- let { param: n, type: r, empty: i } = e;
2397
- if (r === "single") return (e) => {
2398
- let r = t(n);
2399
- return r.uniqueId == null ? i : r.uniqueId === e[M];
2400
- };
2401
- if (r === "multi") return (e) => {
2402
- let r = t(n);
2403
- return r.data.size === 0 ? i : r.data.has(e[M]);
2404
- };
2405
- let a = e.projections.map((e) => ({
2406
- ...e,
2407
- read: tn(e.field),
2408
- readSecondary: e.secondaryField ? tn(e.secondaryField) : void 0
2409
- }));
2410
- return (e) => {
2411
- let r = t(n);
2412
- if (!Ni(r)) return i;
2413
- for (let t of a) {
2414
- let n = r.intervals[t.component], i = t.read(e), a = t.readSecondary?.(e), [o, s] = n;
2415
- if (!(a === void 0 ? o <= i && i < s : t.hitTest === "endpoints" ? o <= i && i < s || o <= a && a < s : t.hitTest === "encloses" ? o <= Math.min(i, a) && Math.max(i, a) <= s : o < Math.max(i, a) && Math.min(i, a) < s)) return !1;
2416
- }
2417
- return !0;
2418
- };
2419
- }
2420
- function Ni(e) {
2421
- if (e.type === "single") return e.uniqueId != null;
2422
- if (e.type === "multi") return e.data.size !== 0;
2423
- if (e.type === "interval") return Object.values(e.intervals).every((e) => !!e);
2424
- throw Error(`Unsupported selection type: ${e.type}`);
2425
- }
2426
- //#endregion
2427
- //#region ../core/src/selection/selection.js
2428
- function Pi(e) {
2429
- return {
2430
- type: "single",
2431
- datum: e,
2432
- uniqueId: e?.[M]
2433
- };
2434
- }
2435
- function Fi(e) {
2436
- return e ??= [], {
2437
- type: "multi",
2438
- data: new Map(e.map((e) => [e[M], e]))
2439
- };
2440
- }
2441
- function Ii(e) {
2442
- return {
2443
- type: "interval",
2444
- intervals: Object.fromEntries(e.map((e) => [e, null]))
2445
- };
2446
- }
2447
- function Li(e, { add: t, remove: n, toggle: r }) {
2448
- let i = e.data;
2449
- for (let e of t ?? []) i.set(e[M], e);
2450
- for (let e of n ?? []) i.delete(e[M]);
2451
- for (let e of r ?? []) {
2452
- let t = e[M];
2453
- i.has(t) ? i.delete(t) : i.set(t, e);
2454
- }
2455
- return {
2456
- type: "multi",
2457
- data: i
2458
- };
2459
- }
2460
- function Ri(e, t) {
2461
- let n = !!(e.empty ?? !0), r = Gt(e.param), i = e.fields ?? {};
2462
- if (Ui(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(M)}]`;
2463
- if (Wi(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(M)}])`;
2464
- if (Hi(t)) {
2465
- let a = Object.keys(t.intervals), o = Object.keys(i).filter(Oa);
2466
- if (o.length === 0) throw Error("Filtering using interval selections requires at least one primary positional channel in the config! " + JSON.stringify(e));
2467
- if (o.some((e) => !a.includes(e))) throw Error(`Selection channels (${a.join(", ")}) do not match the fields: ${JSON.stringify(e)}!`);
2468
- let s = (e) => `datum[${JSON.stringify(e)}]`;
2469
- return a.map((e) => {
2470
- let t = Ia(e), a = i[e], o = i[t] ?? i[e], c = `${r}.intervals.${e}[0] <= ${s(o)}`, l = `${s(a)} <= ${r}.intervals.${e}[1]`;
2471
- return `(${r}.intervals.${e} ? (${c} && ${l}) : ${n})`;
2472
- }).join(" && ");
2473
- }
2474
- throw Error(`Unrecognized selection type : ${JSON.stringify(t)}`);
2475
- }
2476
- function zi(e) {
2477
- if ("param" in e || "test" in e) return Di(e);
2478
- }
2479
- function Bi(e) {
2480
- return e?.selection ? Oi(e.selection) : [];
2481
- }
2482
- function Vi(e) {
2483
- let t = Object.values(e).flatMap((e) => e.branches.flatMap(({ predicate: e }) => e.selection ? [e.selection] : [])), n = /* @__PURE__ */ new Set();
2484
- return t.filter((e) => {
2485
- let t = JSON.stringify(e);
2486
- return !n.has(t) && (n.add(t), !0);
2487
- });
2488
- }
2489
- function Hi(e) {
2490
- return e.type === "interval";
2491
- }
2492
- function Ui(e) {
2493
- return e.type === "single";
2494
- }
2495
- function Wi(e) {
2496
- return e.type === "multi";
2497
- }
2498
- function Gi(e) {
2499
- let t = typeof e == "string" ? { type: e } : { ...e };
2500
- return t.on = t.on ? Ci(t.on) : Ki(t) ? { type: "click" } : void 0, t.clear = t.clear === !1 ? void 0 : t.clear === !0 || t.clear == null ? { type: "dblclick" } : Ci(t.clear), Ki(t) && t.on.type === "click" && t.toggle === void 0 && (t.toggle = !0), t;
2501
- }
2502
- function Ki(e) {
2503
- return e && e.type == "point";
2504
- }
2505
- function qi(e) {
2506
- return e && e.type == "interval";
2507
- }
2508
- function Ji(e) {
2509
- if (Ui(e)) return e.uniqueId != null;
2510
- if (Wi(e)) return e.data.size > 0;
2511
- if (Hi(e)) return Yi(e);
2512
- throw Error(`Unsupported selection type: ${e.type}`);
2513
- }
2514
- function Yi(e) {
2515
- return Object.values(e.intervals).some((e) => e && e.length === 2);
2516
- }
2517
- function Xi(e, t) {
2518
- return Object.entries(e.intervals).every(([e, n]) => (e == "x" || e == "y") && n && n[0] <= t[e] && n[1] >= t[e]);
2519
- }
2520
- //#endregion
2521
- //#region ../core/src/encoder/accessor.js
2522
- function Zi(e, t, n) {
2523
- if (!e) throw Error("Cannot create an accessor without a channel.");
2524
- function r(n) {
2525
- let r = n;
2526
- return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = ea(t), r.scaleChannel = ((ga(t) && t.resolutionChannel) ?? (Ba(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = ta({
2527
- scaleChannel: r.scaleChannel,
2528
- source: $i(t)
2529
- }).domainKeyBase), r.equals = (e) => e ? r === e || r.sourceKey !== void 0 && r.sourceKey === e.sourceKey : !1, r.asNumberAccessor = () => r, r;
2530
- }
2531
- function i(e) {
2532
- if (j(e)) {
2533
- let t = r(n.createExpression(e.expr));
2534
- if (t.fields.length > 0) throw Error("Expression in DatumDef/ValueDef cannot access data fields: " + e.expr);
2535
- return t;
2536
- }
2537
- {
2538
- let t = e;
2539
- return r(() => t);
2540
- }
2541
- }
2542
- if (ma(t)) try {
2543
- return r(tn(t.field));
2544
- } catch (e) {
2545
- throw Error(`Invalid field definition: ${e.message}`, { cause: e });
2546
- }
2547
- if (xa(t)) return r(n.createExpression(t.expr));
2548
- if (ha(t)) return i(t.datum);
2549
- if (pa(t)) return i(t.value);
2550
- throw Error(`Invalid channel definition: "${e}": ${JSON.stringify(t)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`);
2551
- }
2552
- function Qi(e) {
2553
- return e.scaleChannel !== void 0;
2554
- }
2555
- function $i(e) {
2556
- if (ma(e)) return {
2557
- kind: "field",
2558
- value: e.field
2559
- };
2560
- if (xa(e)) return {
2561
- kind: "expr",
2562
- value: e.expr
2563
- };
2564
- if (ha(e)) return {
2565
- kind: "datum",
2566
- value: e.datum
2567
- };
2568
- if (pa(e)) return {
2569
- kind: "value",
2570
- value: e.value
2571
- };
2572
- throw Error("Cannot derive a domain key from channel definition: " + JSON.stringify(e));
2573
- }
2574
- function ea(e) {
2575
- let t = $i(e);
2576
- return t.kind === "datum" || t.kind === "value" ? "constant|" + ia(t.value) : t.kind + "|" + ra(t);
2577
- }
2578
- function ta({ scaleChannel: e, source: t, type: n }) {
2579
- if (!e) throw Error("Cannot build a domain key without a scale channel.");
2580
- let r = e + "|" + t.kind + "|" + ra(t);
2581
- return {
2582
- domainKeyBase: r,
2583
- domainKey: n ? n + "|" + r : void 0
2584
- };
2585
- }
2586
- function na(e, t) {
2587
- let { domainKey: n, domainKeyBase: r } = ta({
2588
- scaleChannel: e.scaleChannel,
2589
- source: $i(e.channelDef),
2590
- type: t
2591
- });
2592
- if (!n) throw Error("Cannot finalize a domain key without a resolved type.");
2593
- return e.domainKeyBase = r, e.domainKey = n, n;
2594
- }
2595
- function ra(e) {
2596
- switch (e.kind) {
2597
- case "field":
2598
- case "expr": return e.value;
2599
- case "datum":
2600
- case "value": return ia(e.value);
2601
- default: throw Error("Unknown domain key source.");
2602
- }
2603
- }
2604
- function ia(e) {
2605
- return j(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
2606
- }
2607
- //#endregion
2608
- //#region ../core/src/encoder/encoder.js
2609
- function aa(e, t, n, r = "intersects", i) {
2610
- let a, o, s = Oi(e), c = () => (a ??= ji(e, t, n, r, i), a);
2611
- return s.every((e) => n.findValue(e)) && c(), Object.defineProperty((e) => !s.some((e) => !n.findValue(e)) && (o ??= Mi(c(), (e) => n.findValue(e)), o(e)), "selection", { get: c });
2612
- }
2613
- function oa(e, t, n, r, i = "intersects", a) {
2614
- let o = Sa(t) || Ca(t) ? Array.isArray(t.condition) ? t.condition : [t.condition] : [], s = [...o, t], c = s.map((t, c) => {
2615
- let l = o[c], u = Zi(e, t, r), d = l ? zi(l) : void 0;
2616
- return {
2617
- accessor: u,
2618
- predicate: d ? aa(d, n, r, i, a) : Xt(c === s.length - 1)
2619
- };
2620
- });
2621
- if (c.filter((e) => !e.accessor.constant).length > 1) throw Error("Only one accessor can be non-constant. Channel: " + e);
2622
- return c;
2623
- }
2624
- function sa(e, t) {
2625
- let n = {}, r = (t) => e.getScaleResolution(t)?.getScale(), i = (t, n) => {
2626
- let r = e.getScaleResolution(t);
2627
- e.paramRuntime.operation("encoder scale", [r.getMappingRef()], () => r.getScale(), n);
2628
- };
2629
- for (let [a, o] of Object.entries(t)) {
2630
- if (!o) continue;
2631
- let s = a;
2632
- ca(s) || (n[s] = da(oa(s, o, t, e.paramRuntime, e.mark.defaultHitTestMode, (t) => e.getScaleResolution(t)?.type), r, i));
2633
- }
2634
- return n;
2635
- }
2636
- function ca(e) {
2637
- return e === "key" || e === "search" || e === "tooltip" || e === "order";
2638
- }
2639
- function la(e) {
2640
- return e.branches.map((e) => e.accessor);
2641
- }
2642
- function ua(e) {
2643
- return e.branches.find((e) => !e.accessor.constant)?.accessor;
2644
- }
2645
- function da(e, t, n) {
2646
- if (e.length === 1) {
2647
- let r = fa(e[0].accessor, t, n);
2648
- return Object.assign(r, { branches: e });
2649
- }
2650
- let r = e.map((e) => e.predicate), i = e.map((e) => fa(e.accessor, t, n)), a = Object.assign((e) => {
2651
- for (let t = 0; t < i.length; t++) if (r[t](e)) return i[t](e);
2652
- }, {
2653
- constant: !1,
2654
- branches: e,
2655
- channelDef: e.at(-1).accessor.channelDef
2656
- });
2657
- return Object.defineProperty(a, "scale", {
2658
- enumerable: !0,
2659
- get: () => i.find((e) => e.scale)?.scale
2660
- });
2661
- }
2662
- function fa(e, t, n) {
2663
- let { channel: r, scaleChannel: i, channelDef: a } = e, o = e.scaleChannel ? t(i) : void 0;
2664
- if (i && !o) throw Error(`Missing scale! "${r}": ${JSON.stringify(a)}`);
2665
- let s = Object.assign(o ? (t) => o(e(t)) : (t) => e(t), {
2666
- scale: o,
2667
- constant: e.constant,
2668
- branches: [{
2669
- accessor: e,
2670
- predicate: Xt(!0)
2671
- }],
2672
- channelDef: a
2673
- });
2674
- return o && n?.(i, (e) => {
2675
- o = e, s.scale = e;
2676
- }), s;
2677
- }
2678
- function pa(e) {
2679
- return e && "value" in e;
2680
- }
2681
- function ma(e) {
2682
- return e && "field" in e;
2683
- }
2684
- function ha(e) {
2685
- return e && "datum" in e;
2686
- }
2687
- function ga(e) {
2688
- return ma(e) || ha(e) || xa(e) || ba(e);
2689
- }
2690
- function _a(e) {
2691
- if (Ca(e)) {
2692
- let t = e.condition;
2693
- return (Array.isArray(t) ? t : [t]).find((e) => ga(e));
2694
- }
2695
- if (ga(e)) return e;
2696
- }
2697
- function va(e) {
2698
- let t = e && _a(e);
2699
- return t != null && t.type != "quantitative" && t.scale !== null;
2700
- }
2701
- function ya(e, t) {
2702
- let n = e.mark.encoding[t];
2703
- if (Array.isArray(n)) throw Error("Not a channel def with scale!");
2704
- {
2705
- let e = _a(n);
2706
- if (e) return e;
2707
- }
2708
- throw Error("Not a channel def with scale!");
2709
- }
2710
- function ba(e) {
2711
- return e && "chrom" in e;
2712
- }
2713
- function xa(e) {
2714
- return e && "expr" in e;
2715
- }
2716
- function Sa(e) {
2717
- return (ma(e) || ha(e)) && "condition" in e;
2718
- }
2719
- function Ca(e) {
2720
- return pa(e) && "condition" in e;
2721
- }
2722
- var wa = ["x", "y"], Ta = ["x2", "y2"], Ea = ["xOffset", "yOffset"], Da = [...wa, ...Ta];
2723
- function Oa(e) {
2724
- return wa.includes(e);
2725
- }
2726
- function ka(e) {
2727
- return Da.includes(e);
2728
- }
2729
- function Aa(e) {
2730
- return Ea.includes(e);
2731
- }
2732
- function ja(e) {
2733
- return La(e) == "x" ? "xOffset" : "yOffset";
2734
- }
2735
- function Ma(e, t, n) {
2736
- return t ?? (n ? 0 : e);
2737
- }
2738
- var Na = {
2739
- x: "x2",
2740
- y: "y2"
2741
- }, Pa = Object.fromEntries(Object.entries(Na).map((e) => [e[1], e[0]]));
2742
- function Fa(e) {
2743
- return e in Pa;
2744
- }
2745
- function Ia(e) {
2746
- let t = Na[e];
2747
- if (t) return t;
2748
- throw Error(`${e} has no secondary channel!`);
2749
- }
2750
- function La(e) {
2751
- return Pa[e] ?? e;
2752
- }
2753
- function Ra(e) {
2754
- return [
2755
- "color",
2756
- "fill",
2757
- "stroke"
2758
- ].includes(La(e));
2759
- }
2760
- function za(e) {
2761
- return ["shape", "direction"].includes(e);
2762
- }
2763
- function Ba(e) {
2764
- return [
2765
- "x",
2766
- "y",
2767
- "x2",
2768
- "y2",
2769
- "xOffset",
2770
- "yOffset",
2771
- "color",
2772
- "fill",
2773
- "stroke",
2774
- "opacity",
2775
- "fillOpacity",
2776
- "strokeOpacity",
2777
- "strokeWidth",
2778
- "size",
2779
- "shape",
2780
- "direction",
2781
- "angle",
2782
- "dx",
2783
- "dy",
2784
- "sample"
2785
- ].includes(e);
2786
- }
2787
- function Va(e) {
2788
- switch (e) {
2789
- case "shape": return [
2790
- "circle",
2791
- "square",
2792
- "cross",
2793
- "diamond",
2794
- "triangle-up",
2795
- "triangle-right",
2796
- "triangle-down",
2797
- "triangle-left",
2798
- "tick-up",
2799
- "tick-right",
2800
- "tick-down",
2801
- "tick-left",
2802
- "x",
2803
- "+"
2804
- ];
2805
- case "direction": return [
2806
- "forward",
2807
- "reverse",
2808
- "both"
2809
- ];
2810
- }
2811
- }
2812
- function Ha(e) {
2813
- if (!za(e)) throw Error("Not a discrete channel: " + e);
2814
- let t = new Map(Va(e).map((e, t) => [e, t]));
2815
- return (n) => {
2816
- let r = t.get(n);
2817
- if (r !== void 0) return r;
2818
- throw Error(`Invalid value for "${e}" channel: ${n}`);
2819
- };
2820
- }
2821
- //#endregion
2822
- //#region ../core/src/utils/arrayUtils.js
2823
- function Ua(e, t) {
2824
- return e.length == t.length && e.every((n, r) => e[r] === t[r]);
2825
- }
2826
- function Wa(e) {
2827
- return Array.isArray(e) ? e : e === void 0 ? [] : [e];
2828
- }
2829
- function Ga(e) {
2830
- return e[e.length - 1];
2831
- }
2832
- function Ka(e, t, n) {
2833
- if (t < 0 || t >= e.length) throw Error("Source index out of range.");
2834
- if (n < 0 || n > e.length - 1) throw Error("Destination index out of range.");
2835
- let [r] = e.splice(t, 1);
2836
- e.splice(n, 0, r);
2837
- }
2838
- //#endregion
2839
- //#region ../core/src/view/renderingContext/clipOptions.js
2840
- function qa(e) {
2841
- if (e.clip) return e.clip;
2842
- if (e.clipRect) return {
2843
- rect: e.clipRect,
2844
- clipX: !0,
2845
- clipY: !0
2846
- };
2847
- }
2848
- function Ja(e, t) {
2849
- return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
2850
- }
2851
- function Ya(e, t, n) {
2852
- return t || n ? {
2853
- rect: e,
2854
- clipX: t,
2855
- clipY: n
2856
- } : void 0;
2857
- }
2858
- function Xa(e, t) {
2859
- return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
2860
- }
2861
- function Za(e, t) {
2862
- if (!e) return t;
2863
- if (!t) return e;
2864
- let n = e.clipX || t.clipX, r = e.clipY || t.clipY, i = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, a = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
2865
- return Ya(e.rect.modify({
2866
- x: () => i.x,
2867
- y: () => a.y,
2868
- width: () => i.width,
2869
- height: () => a.height
2870
- }), n, r);
2871
- }
2872
- function Qa(e, t) {
2873
- if (e === !0) return Ya(t, !0, !0);
2874
- if (e === "x") return Ya(t, !0, !1);
2875
- if (e === "y") return Ya(t, !1, !0);
2876
- }
2877
- function $a(e) {
2878
- let t = e.mark;
2879
- if (t) {
2880
- let e = t.properties.clip;
2881
- return {
2882
- clipX: e === !0 || e === "x",
2883
- clipY: e === !0 || e === "y"
2884
- };
2885
- }
2886
- let n = !1, r = !0, i = !0;
2887
- return e.visit((e) => {
2888
- let t = e.mark;
2889
- if (t) {
2890
- n = !0;
2891
- let e = t.properties.clip;
2892
- r &&= e === !0 || e === "x", i &&= e === !0 || e === "y";
2893
- }
2894
- }), {
2895
- clipX: n && r,
2896
- clipY: n && i
2897
- };
2898
- }
2899
- function eo(e, t, n) {
2900
- if (t !== "never") return Za(e, Qa(t, n));
2901
- }
2902
- //#endregion
2903
- export { Ui as $, Ce as $t, va as A, Bt as At, Qi as B, D as Bt, Ba as C, Wt as Ct, za as D, Yt as Dt, ha as E, Xt as Et, pa as F, jt as Ft, Pi as G, nt as Gt, Vi as H, Qe as Ht, wa as I, Mt as It, Hi as J, Le as Jt, Bi as K, tt as Kt, Ma as L, yt as Lt, ka as M, Lt as Mt, Oa as N, zt as Nt, xa as O, Gt as Ot, Fa as P, Rt as Pt, Ji as Q, Me as Qt, Zi as R, ht as Rt, ga as S, ae as Sn, j as St, Ra as T, Ht as Tt, Ii as U, w as Ut, Gi as V, Re as Vt, Fi as W, lt as Wt, Wi as X, Ne as Xt, qi as Y, Fe as Yt, Ki as Z, Pe as Zt, la as _, s as _n, en as _t, $a as a, u as an, Ei as at, La as b, b as bn, qt as bt, Wa as c, _e as cn, Ai as ct, Ua as d, ye as dn, Ti as dt, xe as en, Ri as et, sa as f, te as fn, fi as ft, Ha as g, be as gn, tn as gt, ya as h, f as hn, si as ht, Ya as i, o as in, ki as it, Aa as j, Ft as jt, ma as k, Vt as kt, Ka as l, d as ln, Ci as lt, _a as m, re as mn, ci as mt, Ja as n, se as nn, Xi as nt, qa as o, ge as on, Oi as ot, aa as p, ne as pn, bi as pt, Yi as q, Ie as qt, Za as r, ue as rn, Li as rt, eo as s, ce as sn, Di as st, Xa as t, t as tn, zi as tt, Ga as u, S as un, wi as ut, ua as v, Se as vn, M as vt, ba as w, Ut as wt, Ia as x, x as xn, Kt as xt, ja as y, y as yn, Zt as yt, na as z, C as zt };