@milaboratories/graph-maker 1.1.134 → 1.1.135

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.
@@ -1,21 +1,22 @@
1
- import j from "../../../canonicalize/lib/canonicalize.js";
2
- import { deriveLabels as De, isLabelColumn as Be } from "../../../@platforma-sdk/model/dist/index.js";
3
- import ce from "../../../lodash/lodash.js";
4
- var Pe = "pl7.app/axisNature", ge = "pl7.app/label", Oe = "pl7.app/columnAsAxis/name", Fe = "pl7.app/columnAsAxis/domain", K = "pl7.app/isSubset", $ = "pl7.app/isDiscreteFilter", _e = "pl7.app/discreteValues", Le = "pl7.app/graph/axis/highCardinality", Te = "pl7.app/graph/isVirtual", we = "pl7.app/isLinkerColumn", _ = class te {
1
+ import z from "../../../canonicalize/lib/canonicalize.js";
2
+ import { deriveLabels as Oe, isLabelColumn as Fe } from "../../../@platforma-sdk/model/dist/index.js";
3
+ import { canonicalizeJson as j } from "../../pl-model-common/dist/index.js";
4
+ import ie from "../../../lodash/lodash.js";
5
+ var _e = "pl7.app/axisNature", he = "pl7.app/label", Le = "pl7.app/columnAsAxis/name", Te = "pl7.app/columnAsAxis/domain", J = "pl7.app/isSubset", ee = "pl7.app/isDiscreteFilter", ke = "pl7.app/discreteValues", Ee = "pl7.app/graph/axis/highCardinality", Ne = "pl7.app/graph/isVirtual", xe = "pl7.app/isLinkerColumn", _ = class se {
5
6
  constructor({ type: e, name: o, domain: n }) {
6
7
  this.kind = "axis", this.type = e, this.name = o, this.domain = { ...n };
7
8
  }
8
9
  toCanonicalString() {
9
- return j(this);
10
+ return z(this);
10
11
  }
11
12
  static fromAxisSpec(e) {
12
- return new te({ name: e.name, type: e.type, domain: e.domain });
13
+ return new se({ name: e.name, type: e.type, domain: e.domain });
13
14
  }
14
15
  static fromAxesSpec(e) {
15
- return e.map((o) => te.fromAxisSpec(o));
16
+ return e.map((o) => se.fromAxisSpec(o));
16
17
  }
17
18
  copy() {
18
- return new te({ type: this.type, name: this.name, domain: this.domain });
19
+ return new se({ type: this.type, name: this.name, domain: this.domain });
19
20
  }
20
21
  toPFrameId() {
21
22
  return {
@@ -25,80 +26,173 @@ var Pe = "pl7.app/axisNature", ge = "pl7.app/label", Oe = "pl7.app/columnAsAxis/
25
26
  };
26
27
  }
27
28
  static fromPojo(e) {
28
- return new te(e);
29
+ return new se(e);
29
30
  }
30
- }, Y = class xe {
31
+ }, W = class we {
31
32
  constructor({ name: e, type: o }) {
32
33
  this.kind = "column", this.name = e, this.type = o;
33
34
  }
34
35
  toCanonicalString() {
35
- return j(this);
36
+ return z(this);
36
37
  }
37
38
  static fromPojo(e) {
38
- return new xe(e);
39
+ return new we(e);
39
40
  }
40
41
  };
41
42
  function B(t) {
42
43
  return t !== null && t.kind === "column";
43
44
  }
44
- function se(t) {
45
+ function le(t) {
45
46
  return t !== null && t.kind === "axis";
46
47
  }
47
- function C(t) {
48
+ function A(t) {
48
49
  const e = JSON.parse(t);
49
50
  if (e.kind === "column")
50
- return Y.fromPojo(e);
51
+ return W.fromPojo(e);
51
52
  if (e.kind === "axis")
52
53
  return _.fromPojo(e);
53
54
  throw Error("wrong column or axis object");
54
55
  }
55
- async function Ee(t, e, o, n, l, s, c = !0) {
56
- var a, r, u, p;
57
- const m = C(e);
58
- if (B(m)) {
59
- const d = await t.pFrameProvider.getColumnSpecById(m);
60
- if (!d)
56
+ var Se = "pl7.app/parents";
57
+ function Ce(t) {
58
+ return !t.annotations || !t.annotations[Se] ? [] : JSON.parse(t.annotations[Se]);
59
+ }
60
+ function Ge(t, e) {
61
+ const o = j(t[e]);
62
+ for (let n = 0; n < t.length; n++) {
63
+ const l = t[n];
64
+ if (e === n)
65
+ continue;
66
+ if (Ce(l).some((r) => j(r) === o))
67
+ return !1;
68
+ }
69
+ return !0;
70
+ }
71
+ function Me(t) {
72
+ for (let e = 0; e < t.length; e++)
73
+ if (Ge(t, e))
74
+ return t[e];
75
+ return null;
76
+ }
77
+ function qe(t) {
78
+ const e = { axis: t, parents: [] };
79
+ let o = [e];
80
+ for (; o.length; ) {
81
+ const n = [];
82
+ for (const l of o) {
83
+ const s = Ce(l.axis);
84
+ l.parents = s.map((r) => ({ axis: r, parents: [] })), n.push(...l.parents);
85
+ }
86
+ o = n;
87
+ }
88
+ return e;
89
+ }
90
+ function Ve(t) {
91
+ const e = /* @__PURE__ */ new Set([j(t.axis)]);
92
+ let o = [t];
93
+ for (; o.length; ) {
94
+ const n = [];
95
+ for (const l of o)
96
+ for (const s of l.parents)
97
+ e.add(j(s.axis)), n.push(s);
98
+ o = n;
99
+ }
100
+ return e;
101
+ }
102
+ function je(t) {
103
+ const e = [t.axis];
104
+ let o = [t];
105
+ for (; o.length; ) {
106
+ const n = [];
107
+ for (const l of o)
108
+ for (const s of l.parents)
109
+ e.push(s.axis), n.push(s);
110
+ o = n;
111
+ }
112
+ return e;
113
+ }
114
+ function te(t) {
115
+ if (!t.length)
116
+ return [];
117
+ let e = t;
118
+ const o = [];
119
+ for (; e.length; ) {
120
+ const n = Me(e);
121
+ if (n === null)
122
+ return null;
123
+ const l = qe(n);
124
+ if (l === null)
125
+ return null;
126
+ const s = Ve(l), r = je(l);
127
+ o.push(r), e = e.filter((c) => !s.has(j(c)));
128
+ }
129
+ return o;
130
+ }
131
+ function ze(t) {
132
+ var e, o;
133
+ const n = /* @__PURE__ */ new Map();
134
+ for (const l of t) {
135
+ const s = new W({ name: l.columnId, type: l.spec.valueType }), r = te(l.spec.axesSpec);
136
+ if (!r || r.length !== 2)
137
+ continue;
138
+ const [c, i] = r, p = j(c), u = j(i);
139
+ n.has(p) || n.set(p, /* @__PURE__ */ new Map()), n.has(u) || n.set(u, /* @__PURE__ */ new Map()), (e = n.get(p)) == null || e.set(u, s), (o = n.get(u)) == null || o.set(p, s);
140
+ }
141
+ return n;
142
+ }
143
+ async function Ke(t, e, o, n, l, s, r, c = !0, i) {
144
+ var p, u, m, d;
145
+ const h = A(e);
146
+ if (B(h)) {
147
+ const g = await t.pFrameProvider.getColumnSpecById(h);
148
+ if (!g)
61
149
  return;
62
- const w = d.axesSpec.map((x) => _.fromAxisSpec(x).toCanonicalString()), h = [], A = {};
63
- c && w.forEach((x, b) => {
64
- !l.has(x) && !s.has(x) && (h.push(x), A[x] = b);
150
+ const x = be(
151
+ g,
152
+ l,
153
+ s,
154
+ r,
155
+ i
156
+ ).map((a) => _.fromAxisSpec(a).toCanonicalString()), w = new Set(x), D = g.axesSpec.map((a) => _.fromAxisSpec(a).toCanonicalString()), b = {};
157
+ c && D.forEach((a, S) => {
158
+ w.has(a) && (b[a] = S);
65
159
  });
66
- const v = {
160
+ const C = {
67
161
  kind: "column",
68
- name: d.name,
69
- label: o ?? await F(t, e, []),
70
- type: d.valueType,
71
- spec: d,
72
- annotations: d.annotations,
73
- isSubsetFilter: ((a = d.annotations) == null ? void 0 : a[K]) === "true",
74
- isDiscreteFilter: d.valueType === "String" || ((r = d.annotations) == null ? void 0 : r[$]) === "true",
75
- axesToBeFixed: h,
76
- axesToBeFixedIndexes: A
162
+ name: g.name,
163
+ label: o ?? await T(t, e, []),
164
+ type: g.valueType,
165
+ spec: g,
166
+ annotations: g.annotations,
167
+ isSubsetFilter: ((p = g.annotations) == null ? void 0 : p[J]) === "true",
168
+ isDiscreteFilter: g.valueType === "String" || ((u = g.annotations) == null ? void 0 : u[ee]) === "true",
169
+ axesToBeFixed: x,
170
+ axesToBeFixedIndexes: b
77
171
  };
78
- n.set(m.toCanonicalString(), v);
79
- for (const x of d.axesSpec) {
80
- const g = _.fromAxisSpec(x).toCanonicalString();
81
- if (n.has(g))
172
+ n.set(h.toCanonicalString(), C);
173
+ for (const a of g.axesSpec) {
174
+ const y = _.fromAxisSpec(a).toCanonicalString();
175
+ if (n.has(y))
82
176
  continue;
83
- const i = Ce(x), f = {
177
+ const f = Ae(a), v = {
84
178
  kind: "axis",
85
- name: x.name,
86
- label: await F(t, g, [e]),
87
- type: x.type,
88
- mustBeConsumed: i,
179
+ name: a.name,
180
+ label: await T(t, y, [e]),
181
+ type: a.type,
182
+ mustBeConsumed: f,
89
183
  dividable: !1,
90
- spec: x,
91
- annotations: x.annotations,
92
- isSubsetFilter: ((u = x.annotations) == null ? void 0 : u[K]) === "true",
93
- isDiscreteFilter: x.type === "String" || ((p = x.annotations) == null ? void 0 : p[$]) === "true",
184
+ spec: a,
185
+ annotations: a.annotations,
186
+ isSubsetFilter: ((m = a.annotations) == null ? void 0 : m[J]) === "true",
187
+ isDiscreteFilter: a.type === "String" || ((d = a.annotations) == null ? void 0 : d[ee]) === "true",
94
188
  parentSources: [e]
95
189
  };
96
- n.set(g, f);
190
+ n.set(y, v);
97
191
  }
98
192
  }
99
193
  }
100
- function Se(t) {
101
- const e = C(t), { name: o, type: n } = e;
194
+ function ye(t) {
195
+ const e = A(t), { name: o, type: n } = e;
102
196
  return B(e) ? {
103
197
  kind: "column",
104
198
  name: "",
@@ -124,39 +218,39 @@ function Se(t) {
124
218
  parentSources: []
125
219
  };
126
220
  }
127
- function ie(t) {
221
+ function ue(t) {
128
222
  return {
129
223
  type: t.type,
130
224
  components: { ...t.components },
131
225
  dividedAxes: { ...t.dividedAxes }
132
226
  };
133
227
  }
134
- function ke(t) {
135
- const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s = C(e);
228
+ function Ue(t) {
229
+ const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s = A(e);
136
230
  if (!s)
137
231
  throw Error("Empty source selected");
138
232
  if (o === "range") {
139
- const c = [];
140
- return (n == null ? void 0 : n.max) !== void 0 && c.push({
233
+ const r = [];
234
+ return (n == null ? void 0 : n.max) !== void 0 && r.push({
141
235
  type: "bySingleColumnV2",
142
- column: se(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
236
+ column: le(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
143
237
  predicate: {
144
238
  operator: "LessOrEqual",
145
239
  reference: n.max
146
240
  }
147
- }), (n == null ? void 0 : n.min) !== void 0 && c.push({
241
+ }), (n == null ? void 0 : n.min) !== void 0 && r.push({
148
242
  type: "bySingleColumnV2",
149
- column: se(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
243
+ column: le(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
150
244
  predicate: {
151
245
  operator: "GreaterOrEqual",
152
246
  reference: n == null ? void 0 : n.min
153
247
  }
154
- }), c;
248
+ }), r;
155
249
  } else if (o === "subset")
156
250
  return [
157
251
  {
158
252
  type: "bySingleColumnV2",
159
- column: se(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
253
+ column: le(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
160
254
  predicate: {
161
255
  operator: "Not",
162
256
  operand: { operator: "IsNA" }
@@ -166,7 +260,7 @@ function ke(t) {
166
260
  return typeof l > "u" ? [] : [
167
261
  {
168
262
  type: "bySingleColumnV2",
169
- column: se(s) ? { type: "axis", id: s.toPFrameId() } : {
263
+ column: le(s) ? { type: "axis", id: s.toPFrameId() } : {
170
264
  type: "column",
171
265
  id: s.name
172
266
  },
@@ -177,125 +271,120 @@ function ke(t) {
177
271
  }
178
272
  ];
179
273
  }
180
- function U(t) {
274
+ function Y(t) {
181
275
  const e = [];
182
276
  for (const o of t)
183
- e.push(...ke(o));
277
+ e.push(...Ue(o));
184
278
  return e;
185
279
  }
186
- function ye(t) {
280
+ function fe(t) {
187
281
  var e, o, n, l;
188
282
  if ("kind" in t && t.kind === "PColumn") {
189
- const a = (o = t.name) != null ? o : (e = t.annotations) == null ? void 0 : e[Oe], r = (l = t.domain) != null ? l : (n = t.annotations) == null ? void 0 : n[Fe];
190
- return j({ name: a, domain: r });
283
+ const c = (o = t.name) != null ? o : (e = t.annotations) == null ? void 0 : e[Le], i = (l = t.domain) != null ? l : (n = t.annotations) == null ? void 0 : n[Te];
284
+ return z({ name: c, domain: i });
191
285
  }
192
- const s = t.name, c = t.domain;
193
- return j({ name: s, domain: c });
286
+ const s = t.name, r = t.domain;
287
+ return z({ name: s, domain: r });
194
288
  }
195
289
  async function ve(t, e, o) {
196
290
  var n;
197
291
  for (const l of o) {
198
- const s = C(l);
292
+ const s = A(l);
199
293
  if (B(s)) {
200
- const c = await t.pFrameProvider.getColumnSpecById(s), a = ((n = c == null ? void 0 : c.axesSpec) != null ? n : []).find(
201
- (r) => _.fromAxisSpec(r).toCanonicalString() === e.toCanonicalString()
294
+ const r = await t.pFrameProvider.getColumnSpecById(s), c = ((n = r == null ? void 0 : r.axesSpec) != null ? n : []).find(
295
+ (i) => _.fromAxisSpec(i).toCanonicalString() === e.toCanonicalString()
202
296
  );
203
- if (a)
204
- return a;
297
+ if (c)
298
+ return c;
205
299
  }
206
300
  }
207
301
  return null;
208
302
  }
209
- var Ne = "pl7.app/label";
210
- async function E(t, e, o) {
211
- const n = C(e);
303
+ var We = "pl7.app/label";
304
+ async function k(t, e, o) {
305
+ const n = A(e);
212
306
  if (B(n))
213
307
  return;
214
- async function l(r) {
215
- const u = await ve(t, r, o);
216
- return u ? ye(u) : null;
308
+ async function l(i) {
309
+ const p = await ve(t, i, o);
310
+ return p ? fe(p) : null;
217
311
  }
218
- const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [Ne]), c = await l(n), a = s.find(({ spec: r }) => r && r.axesSpec.length === 1 && ye(r.axesSpec[0]) === c);
219
- return a ? new Y({ name: a.columnId, type: a.spec.valueType }) : void 0;
312
+ const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [We]), r = await l(n), c = s.find(({ spec: i }) => i && i.axesSpec.length === 1 && fe(i.axesSpec[0]) === r);
313
+ return c ? new W({ name: c.columnId, type: c.spec.valueType }) : void 0;
220
314
  }
221
- async function F(t, e, o) {
315
+ async function T(t, e, o) {
222
316
  var n, l;
223
- const s = C(e), c = await E(t, e, o);
224
- let a;
225
- if (B(s) ? a = await t.pFrameProvider.getColumnSpecById(c ?? s) : a = c ? await t.pFrameProvider.getColumnSpecById(c) : await ve(t, s, o), !a)
317
+ const s = A(e), r = await k(t, e, o);
318
+ let c;
319
+ if (B(s) ? c = await t.pFrameProvider.getColumnSpecById(r ?? s) : c = r ? await t.pFrameProvider.getColumnSpecById(r) : await ve(t, s, o), !c)
226
320
  return "";
227
- const r = (l = (n = a.annotations) == null ? void 0 : n[ge]) != null ? l : a.name;
228
- return t.labelsModifier(a.name, r);
321
+ const i = (l = (n = c.annotations) == null ? void 0 : n[he]) != null ? l : c.name;
322
+ return t.labelsModifier(c.name, i);
229
323
  }
230
- function Ce(t) {
324
+ function Ae(t) {
231
325
  var e, o;
232
- const n = (o = (e = t.annotations) == null ? void 0 : e[Pe]) == null ? void 0 : o.toLowerCase();
326
+ const n = (o = (e = t.annotations) == null ? void 0 : e[_e]) == null ? void 0 : o.toLowerCase();
233
327
  return !!n && n !== "homogenous" && n !== "homogeneous";
234
328
  }
235
- function H(t) {
329
+ function R(t) {
236
330
  var e, o;
237
- return ((e = t.annotations) == null ? void 0 : e[K]) === "true" || ((o = t.annotations) == null ? void 0 : o[$]) === "true", !0;
331
+ return ((e = t.annotations) == null ? void 0 : e[J]) === "true" || ((o = t.annotations) == null ? void 0 : o[ee]) === "true", !0;
238
332
  }
239
- function Ge(t) {
333
+ function He(t) {
240
334
  var e, o;
241
- return !t.name.includes("metadata") && ((e = t.annotations) == null ? void 0 : e[Te]) !== "true" && ((o = t.annotations) == null ? void 0 : o[K]) !== "true";
335
+ return !t.name.includes("metadata") && ((e = t.annotations) == null ? void 0 : e[Ne]) !== "true" && ((o = t.annotations) == null ? void 0 : o[J]) !== "true";
242
336
  }
243
- async function W(t) {
337
+ function Ye(t) {
244
338
  var e;
245
- const o = await t.pFrameProvider.getColumns(
246
- [],
247
- !1,
248
- void 0,
249
- void 0,
250
- { [we]: "true" }
251
- ), n = {};
252
- for (const l of o) {
253
- const s = await t.pFrameProvider.getColumnSpecById(l), c = (e = s == null ? void 0 : s.axesSpec) != null ? e : [];
254
- if (s && c.length) {
255
- const [a, r] = c, u = _.fromAxisSpec(a).toCanonicalString(), p = _.fromAxisSpec(r).toCanonicalString();
256
- n[u] || (n[u] = {}), n[p] || (n[p] = {}), n[u][p] = { id: l, spec: s }, n[p][u] = { id: l, spec: s };
339
+ const o = {};
340
+ for (const n of t.filter((l) => l.spec.axesSpec.length === 2)) {
341
+ const l = new W({ name: n.columnId, type: n.spec.valueType }), s = (e = n.spec.axesSpec) != null ? e : [];
342
+ if (s.length) {
343
+ const [r, c] = s, i = _.fromAxisSpec(r).toCanonicalString(), p = _.fromAxisSpec(c).toCanonicalString();
344
+ o[i] || (o[i] = {}), o[p] || (o[p] = {}), o[i][p] = { id: l, spec: n.spec }, o[p][i] = { id: l, spec: n.spec };
257
345
  }
258
346
  }
259
- return n;
347
+ return o;
260
348
  }
261
- async function X(t, e) {
262
- const o = /* @__PURE__ */ new Set();
263
- for (const n of e) {
264
- const l = C(n);
265
- if (B(l)) {
266
- const s = await t.pFrameProvider.getColumnSpecById(l);
267
- if (!s)
349
+ async function $(t, e) {
350
+ const o = /* @__PURE__ */ new Set(), n = [];
351
+ for (const l of e) {
352
+ const s = A(l);
353
+ if (B(s)) {
354
+ const r = await t.pFrameProvider.getColumnSpecById(s);
355
+ if (!r)
268
356
  continue;
269
- s.axesSpec.forEach((c) => {
270
- o.add(_.fromAxisSpec(c).toCanonicalString());
357
+ r.axesSpec.forEach((c) => {
358
+ const i = _.fromAxisSpec(c).toCanonicalString();
359
+ o.has(i) || (o.add(i), n.push(c));
271
360
  });
272
361
  }
273
362
  }
274
- return o;
363
+ return n;
275
364
  }
276
- function qe(t, e, o) {
365
+ function Re(t, e, o) {
277
366
  const n = {}, l = /* @__PURE__ */ new Set([e]);
278
367
  let s = [e];
279
368
  for (; s.length; ) {
280
- const c = /* @__PURE__ */ new Set();
281
- for (const a of s)
282
- if (t[a]) {
283
- const r = Object.keys(t[a]);
284
- for (const u of r)
285
- if (n[u] = a, u === o) {
286
- const p = [];
369
+ const r = /* @__PURE__ */ new Set();
370
+ for (const c of s)
371
+ if (t[c]) {
372
+ const i = Object.keys(t[c]);
373
+ for (const p of i)
374
+ if (n[p] = c, p === o) {
375
+ const u = [];
287
376
  let m = o;
288
377
  for (; n[m] !== e; )
289
- p.push(m), m = n[m];
290
- return p.push(m), p.map((d) => t[d][n[d]].id);
291
- } else l.has(u) || (c.add(u), l.add(u));
378
+ u.push(m), m = n[m];
379
+ return u.push(m), u.map((d) => t[d][n[d]].id);
380
+ } else l.has(p) || (r.add(p), l.add(p));
292
381
  }
293
- s = [...c];
382
+ s = [...r];
294
383
  }
295
384
  return null;
296
385
  }
297
- function Me(t, e, o) {
298
- const n = [...e].map((s) => qe(t, s, o)).filter((s) => s !== null);
386
+ function Xe(t, e, o) {
387
+ const n = [...e].map((s) => Re(t, s, o)).filter((s) => s !== null);
299
388
  if (n.length === 0)
300
389
  return [];
301
390
  let l = n[0];
@@ -303,37 +392,90 @@ function Me(t, e, o) {
303
392
  s.length < l.length && (l = s);
304
393
  return l;
305
394
  }
306
- async function M(t, e, o, n, l) {
307
- const s = C(n);
308
- if (!B(s))
395
+ async function X(t) {
396
+ const e = await t.pFrameProvider.getColumnsFull(
397
+ [],
398
+ !1,
399
+ void 0,
400
+ void 0,
401
+ { [xe]: "true" }
402
+ ), o = Ye(e.filter((l) => l.spec.axesSpec.length === 2)), n = ze(e.filter((l) => l.spec.axesSpec.length > 2));
403
+ return { linkerColumnsMap: o, compositeLinkerMap: n };
404
+ }
405
+ async function V(t, e, o, n, l, s) {
406
+ const r = A(l);
407
+ if (!B(r))
309
408
  return [];
310
- const c = await t.pFrameProvider.getColumnSpecById(s);
409
+ const c = await t.pFrameProvider.getColumnSpecById(r);
311
410
  if (!c)
312
411
  return [];
313
- const a = c.axesSpec.map((u) => _.fromAxisSpec(u).toCanonicalString()).filter((u) => !o.has(u) && !(l != null && l.some((p) => p.axisSource === u))), r = /* @__PURE__ */ new Set();
314
- return a.forEach((u) => {
315
- Me(e, o, u).forEach((m) => {
316
- r.add(m.toCanonicalString());
317
- });
318
- }), [...r].map((u) => C(u));
412
+ const i = c.axesSpec.filter(
413
+ (x) => {
414
+ const w = _.fromAxisSpec(x).toCanonicalString();
415
+ return !(s != null && s.some((D) => D.axisSource === w));
416
+ }
417
+ ), p = new Set(n.map((x) => _.fromAxisSpec(x).toCanonicalString())), u = i.filter((x) => {
418
+ const w = _.fromAxisSpec(x).toCanonicalString();
419
+ return !p.has(w);
420
+ });
421
+ if (!u.length)
422
+ return [];
423
+ const m = te(n), d = te(u);
424
+ if (!m || !d)
425
+ throw Error(`Can't create axes tree for ${c.name}`);
426
+ const h = new Set(m.map(j)), g = /* @__PURE__ */ new Set();
427
+ return d.forEach((x) => {
428
+ var w;
429
+ const D = j(x);
430
+ if (o.has(D)) {
431
+ const b = o.get(D), a = (b ? [...b.keys()] : []).find((y) => h.has(y));
432
+ if (!a)
433
+ throw Error(`Can't find composite linker column for ${c.name}, ${D}`);
434
+ const S = (w = o.get(D)) == null ? void 0 : w.get(a);
435
+ g.add(S.toCanonicalString());
436
+ } else if (x.length === 1) {
437
+ const b = _.fromAxisSpec(x[0]).toCanonicalString();
438
+ Xe(e, p, b).forEach((a) => {
439
+ g.add(a.toCanonicalString());
440
+ });
441
+ }
442
+ }), [...g].map((x) => A(x));
443
+ }
444
+ function be(t, e, o, n, l) {
445
+ const r = t.axesSpec.filter(
446
+ (u) => !o.has(_.fromAxisSpec(u).toCanonicalString())
447
+ );
448
+ if (!r.length)
449
+ return [];
450
+ const c = te(e);
451
+ let i = te(r);
452
+ if (!c || !i)
453
+ return r;
454
+ const p = new Set(c.map(j));
455
+ return i = i.filter(
456
+ (u) => {
457
+ const m = j(u), d = l.get(m);
458
+ return !(d ? [...d.keys()] : []).some((g) => p.has(g));
459
+ }
460
+ ), i.some((u) => u.length > 1) ? i.flatMap((u) => u) : (i = i.filter(([u]) => !n.has(_.fromAxisSpec(u).toCanonicalString())), i.flatMap((u) => u));
319
461
  }
320
- function he(t, e) {
462
+ function Ie(t, e) {
321
463
  const o = e.columnsData[Object.keys(e.columnsData)[0]].length, n = new Int32Array(o).fill(0);
322
464
  for (let l = 0; l < o; l++) {
323
465
  let s = !1;
324
- for (let c = 0; c < t.length; c++) {
325
- const { selectedSource: a, selectedFilterValue: r, selectedFilterRange: u, type: p } = t[c], m = C(a), d = (B(m) ? e.columnsData[a] : e.axesData[a])[l];
326
- if (r !== void 0 && (s = s || d === r), u !== void 0 && (u.min !== void 0 || u.max !== void 0) && typeof d == "number") {
327
- let w = !0;
328
- u.min !== void 0 && (w = w && d >= u.min), u.max !== void 0 && (w = w && d <= u.max), s = s || w;
466
+ for (let r = 0; r < t.length; r++) {
467
+ const { selectedSource: c, selectedFilterValue: i, selectedFilterRange: p, type: u } = t[r], m = A(c), d = (B(m) ? e.columnsData[c] : e.axesData[c])[l];
468
+ if (i !== void 0 && (s = s || d === i), p !== void 0 && (p.min !== void 0 || p.max !== void 0) && typeof d == "number") {
469
+ let h = !0;
470
+ p.min !== void 0 && (h = h && d >= p.min), p.max !== void 0 && (h = h && d <= p.max), s = s || h;
329
471
  }
330
- p === "subset" && (s = s || d != null);
472
+ u === "subset" && (s = s || d != null);
331
473
  }
332
474
  s && (n[l] = 1);
333
475
  }
334
476
  return n;
335
477
  }
336
- var R = class {
478
+ var Q = class {
337
479
  constructor(t, e) {
338
480
  this.simpleComponentControllers = t, this.filterComponentControllers = e, this.ignoredOptionIdNames = [], this.dataInputs = [], this.dontAllowUnfilteredHighCardinality = !1;
339
481
  }
@@ -366,20 +508,20 @@ var R = class {
366
508
  throw Error(`Unknown input name: ${String(t)}`);
367
509
  }
368
510
  changeSelected(t, e, o, n) {
369
- const l = o.components[t].selectorStates, s = l.filter((r) => !n.find((u) => u.selectedSource === r.selectedSource)), c = n.filter((r) => !l.find((u) => u.selectedSource === r.selectedSource));
370
- let a = ie(o);
371
- return s.forEach((r) => {
372
- a = this.deleteSelected(t, e, a, r);
373
- }), c.forEach((r) => {
374
- a = this.addSelected(t, a, r);
511
+ const l = o.components[t].selectorStates, s = l.filter((i) => !n.find((p) => p.selectedSource === i.selectedSource)), r = n.filter((i) => !l.find((p) => p.selectedSource === i.selectedSource));
512
+ let c = ue(o);
513
+ return s.forEach((i) => {
514
+ c = this.deleteSelected(t, e, c, i);
515
+ }), r.forEach((i) => {
516
+ c = this.addSelected(t, c, i);
375
517
  }), o.components[t].selectorStates = n.map(
376
- (r) => o.components[t].selectorStates.find(
377
- (u) => u.selectedSource === r.selectedSource
518
+ (i) => o.components[t].selectorStates.find(
519
+ (p) => p.selectedSource === i.selectedSource
378
520
  )
379
- ).filter(Boolean), a;
521
+ ).filter(Boolean), c;
380
522
  }
381
523
  switchDividableAxis(t, e) {
382
- return ie(t);
524
+ return ue(t);
383
525
  }
384
526
  async getMustBeConsumedAxes(t, e) {
385
527
  return Promise.resolve(/* @__PURE__ */ new Set());
@@ -400,42 +542,53 @@ var R = class {
400
542
  )
401
543
  );
402
544
  }
403
- async getSelectedSourcesInfo(t, e, o, n) {
404
- var l;
405
- const s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
406
- for (const u of this.dataInputs)
407
- for (const p of e.components[u].selectorStates) {
408
- const m = C(p.selectedSource);
409
- if (B(m)) {
410
- const d = await t.pFrameProvider.getColumnSpecById(m);
411
- d && d.axesSpec.forEach(
412
- (w) => c.add(_.fromAxisSpec(w).toCanonicalString())
413
- );
545
+ async getSelectedSourcesInfo(t, e, o, n, l) {
546
+ var s;
547
+ const r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), i = [];
548
+ for (const m of this.dataInputs)
549
+ for (const d of e.components[m].selectorStates) {
550
+ const h = A(d.selectedSource);
551
+ if (B(h)) {
552
+ const g = await t.pFrameProvider.getColumnSpecById(h);
553
+ g && g.axesSpec.forEach((x) => {
554
+ const w = _.fromAxisSpec(x).toCanonicalString();
555
+ c.has(w) || (c.add(w), i.push(x));
556
+ });
414
557
  }
415
558
  }
416
- const a = /* @__PURE__ */ new Set();
417
- let r = [...c];
418
- for (; r.length; ) {
419
- const u = [];
420
- for (const p of r)
421
- if (n[p]) {
422
- const m = Object.keys(n[p]);
423
- for (const d of m)
424
- !a.has(d) && !c.has(d) && (u.push(d), a.add(d));
559
+ const p = /* @__PURE__ */ new Set();
560
+ let u = [...c];
561
+ for (; u.length; ) {
562
+ const m = [];
563
+ for (const d of u)
564
+ if (n[d]) {
565
+ const h = Object.keys(n[d]);
566
+ for (const g of h)
567
+ !p.has(g) && !c.has(g) && (m.push(g), p.add(g));
425
568
  }
426
- r = u;
569
+ u = m;
427
570
  }
428
- for (const [u, { selectorStates: p }] of Object.entries(e.components)) {
429
- const d = ((l = this.simpleComponentControllers[u]) != null ? l : this.filterComponentControllers[u]).settings.columnsWithExtraAxesAllowed;
430
- for (const { selectedSource: w } of p)
431
- await Ee(t, w, o[w], s, c, a, d);
571
+ for (const [m, { selectorStates: d }] of Object.entries(e.components)) {
572
+ const g = ((s = this.simpleComponentControllers[m]) != null ? s : this.filterComponentControllers[m]).settings.columnsWithExtraAxesAllowed;
573
+ for (const { selectedSource: x } of d)
574
+ await Ke(
575
+ t,
576
+ x,
577
+ o[x],
578
+ r,
579
+ i,
580
+ c,
581
+ p,
582
+ g,
583
+ l
584
+ );
432
585
  }
433
- return s;
586
+ return r;
434
587
  }
435
588
  getEmptyInputGuide(t) {
436
589
  return {
437
590
  components: this.createEmptyComponentsGuide(t),
438
- getSourceInfo: (e) => Se(e),
591
+ getSourceInfo: (e) => ye(e),
439
592
  freeOptionsSet: /* @__PURE__ */ new Set(),
440
593
  axesToBeFixedSet: /* @__PURE__ */ new Set(),
441
594
  readyData: !1,
@@ -453,106 +606,107 @@ var R = class {
453
606
  async getLabelsMap(t, e) {
454
607
  const o = await t.pFrameProvider.getColumnsFull(
455
608
  this.dataInputs.reduce((n, l) => {
456
- const c = e.components[l].selectorStates.map((a) => C(a.selectedSource));
457
- return n.concat(c);
609
+ const r = e.components[l].selectorStates.map((c) => A(c.selectedSource));
610
+ return n.concat(r);
458
611
  }, []),
459
612
  !1
460
613
  );
461
- return De(o, (n) => n.spec).reduce((n, l) => {
462
- const s = new Y({ name: l.value.columnId, type: l.value.spec.valueType }).toCanonicalString();
614
+ return Oe(o, (n) => n.spec).reduce((n, l) => {
615
+ const s = new W({ name: l.value.columnId, type: l.value.spec.valueType }).toCanonicalString();
463
616
  return n[s] = l.label, n;
464
617
  }, {});
465
618
  }
466
- async calculateOptions(t, e, o = [], n = Ge) {
619
+ async calculateOptions(t, e, o = [], n = He) {
467
620
  var l, s;
468
- const c = this.createEmptyComponentsGuide(e), a = this.getConsumedOptionsSet(e), r = new Set(this.ignoredOptionIdNames), u = new Set(o), p = await W(t), m = await this.getLabelsMap(t, e), d = await this.getSelectedSourcesInfo(t, e, m, p), w = /* @__PURE__ */ new Map(), h = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, A = /* @__PURE__ */ new Set();
469
- for (const [f, y] of Object.entries(h)) {
470
- const S = await y.getOptions(
621
+ const r = this.createEmptyComponentsGuide(e), c = this.getConsumedOptionsSet(e), i = new Set(this.ignoredOptionIdNames), p = new Set(o), { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = await this.getLabelsMap(t, e), h = await this.getSelectedSourcesInfo(t, e, d, u, m), g = /* @__PURE__ */ new Map(), x = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, w = /* @__PURE__ */ new Set();
622
+ for (const [y, f] of Object.entries(x)) {
623
+ const v = await f.getOptions(
471
624
  t,
472
625
  e,
626
+ d,
627
+ c,
628
+ u,
473
629
  m,
474
- a,
475
- p,
476
630
  n,
477
- r,
478
- u
631
+ i,
632
+ p
479
633
  );
480
- this.dataInputs.includes(f) || S.options.forEach((I) => {
481
- A.add(I.value);
634
+ this.dataInputs.includes(y) || v.options.forEach((P) => {
635
+ w.add(P.value);
482
636
  });
483
- for (const [I, P] of S.optionsInfo)
484
- w.set(I, P);
485
- c[f] = S;
637
+ for (const [P, O] of v.optionsInfo)
638
+ g.set(P, O);
639
+ r[y] = v;
486
640
  }
487
- const v = (f) => {
488
- const y = w.get(f);
489
- y && y.kind === "axis" && (y.mustBeConsumed = !0);
490
- const S = d.get(f);
491
- S && S.kind === "axis" && (S.mustBeConsumed = !0);
492
- }, x = await this.getMustBeConsumedAxes(t, e);
493
- for (const f of x)
494
- v(f);
641
+ const D = (y) => {
642
+ const f = g.get(y);
643
+ f && f.kind === "axis" && (f.mustBeConsumed = !0);
644
+ const v = h.get(y);
645
+ v && v.kind === "axis" && (v.mustBeConsumed = !0);
646
+ }, b = await this.getMustBeConsumedAxes(t, e);
647
+ for (const y of b)
648
+ D(y);
495
649
  if (this.dontAllowUnfilteredHighCardinality) {
496
- const f = (S) => {
497
- var I;
498
- return ((I = S == null ? void 0 : S.annotations) == null ? void 0 : I[Le]) === "true";
499
- }, y = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((S, I) => {
500
- const P = d.get(I.selectedSource);
501
- return (P == null ? void 0 : P.kind) === "column" && P.spec.axesSpec.filter(f).forEach((L) => S.add(_.fromAxisSpec(L).toCanonicalString())), (P == null ? void 0 : P.kind) === "axis" && f(P.spec) && S.add(_.fromAxisSpec(P.spec).toCanonicalString()), S;
650
+ const y = (v) => {
651
+ var P;
652
+ return ((P = v == null ? void 0 : v.annotations) == null ? void 0 : P[Ee]) === "true";
653
+ }, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((v, P) => {
654
+ const O = h.get(P.selectedSource);
655
+ return (O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(y).forEach((L) => v.add(_.fromAxisSpec(L).toCanonicalString())), (O == null ? void 0 : O.kind) === "axis" && y(O.spec) && v.add(_.fromAxisSpec(O.spec).toCanonicalString()), v;
502
656
  }, /* @__PURE__ */ new Set())) != null ? s : /* @__PURE__ */ new Set();
503
- this.dataInputs.forEach((S) => {
504
- for (const { selectedSource: I } of e.components[S].selectorStates) {
505
- const P = d.get(I);
506
- if ((P == null ? void 0 : P.kind) === "column" && P.spec.axesSpec.filter(f).forEach((L) => {
507
- const O = _.fromAxisSpec(L).toCanonicalString();
508
- !A.has(O) && !y.has(O) && A.add(O), y.has(O) || v(O);
509
- }), (P == null ? void 0 : P.kind) === "axis" && f(P.spec)) {
510
- const N = _.fromAxisSpec(P.spec).toCanonicalString();
511
- A.has(N) || A.add(N), y.has(N) || v(N);
657
+ this.dataInputs.forEach((v) => {
658
+ for (const { selectedSource: P } of e.components[v].selectorStates) {
659
+ const O = h.get(P);
660
+ if ((O == null ? void 0 : O.kind) === "column" && O.spec.axesSpec.filter(y).forEach((L) => {
661
+ const E = _.fromAxisSpec(L).toCanonicalString();
662
+ !w.has(E) && !f.has(E) && w.add(E), f.has(E) || D(E);
663
+ }), (O == null ? void 0 : O.kind) === "axis" && y(O.spec)) {
664
+ const N = _.fromAxisSpec(O.spec).toCanonicalString();
665
+ w.has(N) || w.add(N), f.has(N) || D(N);
512
666
  }
513
667
  }
514
668
  });
515
669
  }
516
- const b = /* @__PURE__ */ new Set();
517
- for (const { selectorStates: f } of Object.values(e.components))
518
- for (const { selectedSource: y } of f) {
519
- const S = d.get(y);
520
- S && S.kind === "column" && S.axesToBeFixed.forEach((I) => {
521
- b.add(I);
670
+ const C = /* @__PURE__ */ new Set();
671
+ for (const { selectorStates: y } of Object.values(e.components))
672
+ for (const { selectedSource: f } of y) {
673
+ const v = h.get(f);
674
+ v && v.kind === "column" && v.axesToBeFixed.forEach((P) => {
675
+ C.add(P);
522
676
  });
523
677
  }
524
- const g = await this.isConsistent(t, e, p), i = (f) => {
525
- var y, S, I;
526
- const P = (y = C(f).toCanonicalString()) != null ? y : f;
527
- return (I = (S = w.get(P)) != null ? S : d.get(P)) != null ? I : Se(f);
678
+ const a = await this.isConsistent(t, e, u, m), S = (y) => {
679
+ var f, v, P;
680
+ const O = (f = A(y).toCanonicalString()) != null ? f : y;
681
+ return (P = (v = g.get(O)) != null ? v : h.get(O)) != null ? P : ye(y);
528
682
  };
529
683
  return {
530
- components: c,
531
- getSourceInfo: i,
532
- freeOptionsSet: A,
533
- axesToBeFixedSet: b,
684
+ components: r,
685
+ getSourceInfo: S,
686
+ freeOptionsSet: w,
687
+ axesToBeFixedSet: C,
534
688
  readyData: this.readyDataInputs(e),
535
- ready: this.readyForPlotBuilding(t, e, g, A, i),
536
- consistent: g
689
+ ready: this.readyForPlotBuilding(t, e, a, w, S),
690
+ consistent: a
537
691
  };
538
692
  }
539
693
  async getUniqueSourceValuesWithLabels(t, e, o, n, l, s) {
540
- var c;
541
- const a = (p) => p.sort((m, d) => m.label.localeCompare(d.label, "en", { numeric: !0 })), r = e.getSourceInfo(o), u = (c = r.annotations) == null ? void 0 : c[_e];
694
+ var r;
695
+ const c = (u) => u.sort((m, d) => m.label.localeCompare(d.label, "en", { numeric: !0 })), i = e.getSourceInfo(o), p = (r = i.annotations) == null ? void 0 : r[ke];
542
696
  try {
543
- const p = u ? JSON.parse(u).map((m) => String(m)) : null;
544
- if (p) {
545
- const m = p.map((d) => ({ value: d, label: d }));
546
- return a(m), { values: m, overflow: !1 };
697
+ const u = p ? JSON.parse(p).map((m) => String(m)) : null;
698
+ if (u) {
699
+ const m = u.map((d) => ({ value: d, label: d }));
700
+ return c(m), { values: m, overflow: !1 };
547
701
  }
548
702
  } catch {
549
- console.error(`Parsing error: discrete values annotation ${u} in ${o}`);
703
+ console.error(`Parsing error: discrete values annotation ${p} in ${o}`);
550
704
  }
551
- if (r.kind === "axis") {
552
- const p = C(o), m = r.parentSources.map(C), d = await E(t, o, r.parentSources);
553
- let w = [];
705
+ if (i.kind === "axis") {
706
+ const u = A(o), m = i.parentSources.map(A), d = await k(t, o, i.parentSources);
707
+ let h = [];
554
708
  if (d) {
555
- l && (w = [{
709
+ l && (h = [{
556
710
  type: "bySingleColumnV2",
557
711
  column: {
558
712
  type: "column",
@@ -562,39 +716,39 @@ var R = class {
562
716
  operator: "StringIContains",
563
717
  substring: l
564
718
  }
565
- }]), s && (w = [{
719
+ }]), s && (h = [{
566
720
  type: "bySingleColumnV2",
567
721
  column: {
568
722
  type: "axis",
569
- id: p.toPFrameId()
723
+ id: u.toPFrameId()
570
724
  },
571
725
  predicate: {
572
726
  operator: "StringIContains",
573
727
  substring: s
574
728
  }
575
729
  }]);
576
- const { data: x, axesData: b } = await t.pFrameProvider.getSingleColumnData(d, w), g = b[p.toCanonicalString()], i = [];
577
- for (let f = 0; f < Math.min(g.length, n ?? g.length); f++)
578
- i.push({ value: String(g[f]), label: String(x[f]) });
579
- return a(i), { values: i, overflow: !(n === void 0 || g.length < n) };
730
+ const { data: D, axesData: b } = await t.pFrameProvider.getSingleColumnData(d, h), C = b[u.toCanonicalString()], a = [];
731
+ for (let S = 0; S < Math.min(C.length, n ?? C.length); S++)
732
+ a.push({ value: String(C[S]), label: String(D[S]) });
733
+ return c(a), { values: a, overflow: !(n === void 0 || C.length < n) };
580
734
  }
581
- const h = l ?? s;
582
- h && (w = [{
735
+ const g = l ?? s;
736
+ g && (h = [{
583
737
  type: "bySingleColumnV2",
584
738
  column: {
585
739
  type: "axis",
586
- id: p.toPFrameId()
740
+ id: u.toPFrameId()
587
741
  },
588
742
  predicate: {
589
743
  operator: "StringIContains",
590
- substring: h
744
+ substring: g
591
745
  }
592
746
  }]);
593
- const A = await t.pFrameProvider.getAxisUniqueValues(p, [m[0]], n, w), v = A.values.map((x) => ({ value: String(x), label: String(x) }));
594
- return a(v), { values: v, overflow: A.overflow };
747
+ const x = await t.pFrameProvider.getAxisUniqueValues(u, [m[0]], n, h), w = x.values.map((D) => ({ value: String(D), label: String(D) }));
748
+ return c(w), { values: w, overflow: x.overflow };
595
749
  }
596
- if (r.kind === "column") {
597
- const p = l ?? s, m = C(o), d = p ? [{
750
+ if (i.kind === "column") {
751
+ const u = l ?? s, m = A(o), d = u ? [{
598
752
  type: "bySingleColumnV2",
599
753
  column: {
600
754
  type: "column",
@@ -602,31 +756,31 @@ var R = class {
602
756
  },
603
757
  predicate: {
604
758
  operator: "StringIContains",
605
- substring: p
759
+ substring: u
606
760
  }
607
- }] : [], w = await t.pFrameProvider.getColumnUniqueValues(m, n, d), h = w.values.map((A) => ({ value: String(A), label: String(A) }));
608
- return a(h), { values: h, overflow: w.overflow };
761
+ }] : [], h = await t.pFrameProvider.getColumnUniqueValues(m, n, d), g = h.values.map((x) => ({ value: String(x), label: String(x) }));
762
+ return c(g), { values: g, overflow: h.overflow };
609
763
  }
610
764
  return { values: [], overflow: !1 };
611
765
  }
612
- async checkStateConsistency(t, e, o) {
613
- const n = /* @__PURE__ */ new Map();
614
- for (const l of Object.keys(this.simpleComponentControllers))
615
- n.set(
616
- l,
617
- await this.simpleComponentControllers[l].checkStateConsistency(t, e, o)
766
+ async checkStateConsistency(t, e, o, n) {
767
+ const l = /* @__PURE__ */ new Map();
768
+ for (const s of Object.keys(this.simpleComponentControllers))
769
+ l.set(
770
+ s,
771
+ await this.simpleComponentControllers[s].checkStateConsistency(t, e, o, n)
618
772
  );
619
- for (const l of Object.keys(this.filterComponentControllers))
620
- n.set(
621
- l,
622
- await this.filterComponentControllers[l].checkStateConsistency(t, e, o)
773
+ for (const s of Object.keys(this.filterComponentControllers))
774
+ l.set(
775
+ s,
776
+ await this.filterComponentControllers[s].checkStateConsistency(t, e, o, n)
623
777
  );
624
- return n;
778
+ return l;
625
779
  }
626
- async isConsistent(t, e, o) {
627
- const n = await this.checkStateConsistency(t, e, o);
628
- for (const l of n.values())
629
- if (Object.values(l).some((s) => !s))
780
+ async isConsistent(t, e, o, n) {
781
+ const l = await this.checkStateConsistency(t, e, o, n);
782
+ for (const s of l.values())
783
+ if (Object.values(s).some((r) => !r))
630
784
  return !1;
631
785
  return !0;
632
786
  }
@@ -637,31 +791,31 @@ var R = class {
637
791
  if (!o || !this.readyDataInputs(e))
638
792
  return !1;
639
793
  let s = !1;
640
- for (const a of n) {
641
- const r = l(a);
642
- if (r && r.kind === "axis" && r.mustBeConsumed) {
794
+ for (const c of n) {
795
+ const i = l(c);
796
+ if (i && i.kind === "axis" && i.mustBeConsumed) {
643
797
  s = !0;
644
798
  break;
645
799
  }
646
800
  }
647
- let c = !1;
648
- for (const { selectorStates: a } of Object.values(e.components)) {
649
- for (const { selectedSource: r, fixedAxes: u } of a) {
650
- const p = l(r);
651
- if (p && p.kind === "column" && p.axesToBeFixed.some(
801
+ let r = !1;
802
+ for (const { selectorStates: c } of Object.values(e.components)) {
803
+ for (const { selectedSource: i, fixedAxes: p } of c) {
804
+ const u = l(i);
805
+ if (u && u.kind === "column" && u.axesToBeFixed.some(
652
806
  (m) => {
653
807
  var d;
654
- return ((d = (u ?? []).find((w) => w.axisSource === m)) == null ? void 0 : d.axisValue) === void 0;
808
+ return ((d = (p ?? []).find((h) => h.axisSource === m)) == null ? void 0 : d.axisValue) === void 0;
655
809
  }
656
810
  )) {
657
- c = !0;
811
+ r = !0;
658
812
  break;
659
813
  }
660
814
  }
661
- if (c)
815
+ if (r)
662
816
  break;
663
817
  }
664
- return this.requiredComponents.every((a) => e.components[a].selectorStates.length > 0) && !s && !c;
818
+ return this.requiredComponents.every((c) => e.components[c].selectorStates.length > 0) && !s && !r;
665
819
  }
666
820
  async createDataForPlot(t, e) {
667
821
  return {
@@ -669,18 +823,21 @@ var R = class {
669
823
  settings: await this.createChartSettings(t, e)
670
824
  };
671
825
  }
672
- }, Ae = class be {
826
+ }, Je = (t) => {
827
+ var e;
828
+ return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[xe]) === "true";
829
+ }, De = class Be {
673
830
  constructor({
674
831
  componentName: e,
675
832
  allowedTypes: o,
676
833
  settings: n,
677
834
  strictlyDependsOnParents: l,
678
835
  dependsOn: s = [],
679
- parentComponents: c = [],
680
- annotations: a = {},
681
- checkSourceBySpec: r
836
+ parentComponents: r = [],
837
+ annotations: c = {},
838
+ checkSourceBySpec: i
682
839
  }) {
683
- this.componentName = e, this.allowedTypes = [...o], this.settings = { ...be.DefaultSettings, ...n }, this.dependsOn = [...s], this.parentComponents = [...c], this.strictlyDependsOnParents = l ?? !0, this.annotations = { ...a }, r && (this.checkSourceBySpec = r);
840
+ this.componentName = e, this.allowedTypes = [...o], this.settings = { ...Be.DefaultSettings, ...n }, this.dependsOn = [...s], this.parentComponents = [...r], this.strictlyDependsOnParents = l ?? !0, this.annotations = { ...c }, i && (this.checkSourceBySpec = i);
684
841
  }
685
842
  get isRequired() {
686
843
  return this.settings.required;
@@ -689,181 +846,205 @@ var R = class {
689
846
  return this.settings.dimensionConsumer;
690
847
  }
691
848
  addSelected(e, o) {
692
- const n = ie(e);
849
+ const n = ue(e);
693
850
  return n.components[this.componentName].selectorStates.push(o), n;
694
851
  }
695
852
  deleteSelected(e, o) {
696
- const n = ie(e);
853
+ const n = ue(e);
697
854
  return n.components[this.componentName].selectorStates = n.components[this.componentName].selectorStates.filter((l) => l.selectedSource !== o), n;
698
855
  }
699
- async checkStateConsistency(e, o, n) {
700
- const l = o.components[this.componentName], { allowedAxes: s } = await this.getAllowedAxes(e, o, n);
701
- function c(r) {
702
- const u = _.fromAxisSpec(r);
703
- return s.has(u.toCanonicalString());
856
+ async checkStateConsistency(e, o, n, l) {
857
+ const s = o.components[this.componentName], { parentAxes: r, linkerAxes: c } = await this.getAllowedAxes(e, o, n);
858
+ function i(u) {
859
+ const m = _.fromAxisSpec(u).toCanonicalString();
860
+ return r.has(m) || c.has(m);
704
861
  }
705
- const a = await Promise.all(
706
- l.selectorStates.map(async ({ selectedSource: r }) => {
707
- const u = C(r);
708
- if (B(u)) {
709
- const p = await e.pFrameProvider.getColumnSpecById(u);
710
- return p ? this.parentComponents.length === 0 ? !0 : this.strictlyDependsOnParents && !this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent ? p.axesSpec.every((d) => c(d)) : this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent ? p.axesSpec.some((d) => c(d)) : s.size === 0 || p.axesSpec.some((d) => c(d)) : !1;
862
+ const p = await Promise.all(
863
+ s.selectorStates.map(async ({ selectedSource: u }) => {
864
+ const m = A(u);
865
+ if (B(m)) {
866
+ const d = await e.pFrameProvider.getColumnSpecById(m);
867
+ if (!d)
868
+ return !1;
869
+ if (this.parentComponents.length === 0)
870
+ return !0;
871
+ if (this.strictlyDependsOnParents && !this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent)
872
+ return d.axesSpec.every((g) => i(g));
873
+ if (this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent) {
874
+ if (d.axesSpec.some((x) => i(x)))
875
+ return !0;
876
+ const g = te(d.axesSpec);
877
+ return g ? g.some((x) => l.has(j(x))) : !1;
878
+ } else
879
+ return r.size === 0 || d.axesSpec.some((g) => i(g));
711
880
  }
712
- return s.has(r);
881
+ return r.has(u);
713
882
  })
714
883
  );
715
- return l.selectorStates.reduce(
716
- (r, u, p) => (r[u.selectedSource] = a[p], r),
884
+ return s.selectorStates.reduce(
885
+ (u, m, d) => (u[m.selectedSource] = p[d], u),
717
886
  {}
718
887
  );
719
888
  }
720
889
  async getProducingAxes(e, o) {
721
- const s = o.components[this.componentName].selectorStates.map((r) => C(r.selectedSource)).filter((r) => B(r)), c = /* @__PURE__ */ new Set();
890
+ const s = o.components[this.componentName].selectorStates.map((i) => A(i.selectedSource)).filter((i) => B(i)), r = /* @__PURE__ */ new Set();
722
891
  return (await Promise.all(
723
- s.map((r) => e.pFrameProvider.getColumnSpecById(r))
724
- )).forEach((r) => {
725
- r && r.axesSpec.forEach((u) => {
726
- c.add(_.fromAxisSpec(u).toCanonicalString());
892
+ s.map((i) => e.pFrameProvider.getColumnSpecById(i))
893
+ )).forEach((i) => {
894
+ i && i.axesSpec.forEach((p) => {
895
+ r.add(_.fromAxisSpec(p).toCanonicalString());
727
896
  });
728
- }), c;
897
+ }), r;
729
898
  }
730
899
  getParentSelectedSources(e, o) {
731
900
  return this.parentComponents.reduce((l, s) => {
732
- const c = o.components[s].selectorStates.map(
733
- (a) => C(a.selectedSource)
901
+ const r = o.components[s].selectorStates.map(
902
+ (c) => A(c.selectedSource)
734
903
  );
735
- return l.push(...c), l;
904
+ return l.push(...r), l;
736
905
  }, []);
737
906
  }
738
907
  async getParentAxes(e, o) {
739
908
  var n;
740
909
  const l = this.getParentSelectedSources(e, o), s = /* @__PURE__ */ new Set();
741
- for (const c of l)
742
- if (B(c)) {
743
- const a = await e.pFrameProvider.getColumnSpecById(c);
744
- (n = a == null ? void 0 : a.axesSpec) == null || n.forEach((r) => {
745
- const u = _.fromAxisSpec(r);
746
- s.add(u.toCanonicalString());
910
+ for (const r of l)
911
+ if (B(r)) {
912
+ const c = await e.pFrameProvider.getColumnSpecById(r);
913
+ (n = c == null ? void 0 : c.axesSpec) == null || n.forEach((i) => {
914
+ const p = _.fromAxisSpec(i);
915
+ s.add(p.toCanonicalString());
747
916
  });
748
917
  }
749
918
  return s;
750
919
  }
751
920
  async getAllowedAxes(e, o, n) {
752
- var l, s, c, a, r, u, p;
753
- const m = this.getParentSelectedSources(e, o), d = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Map();
754
- for (const x of m)
755
- if (B(x)) {
756
- const b = await e.pFrameProvider.getColumnSpecById(x);
757
- for (const g of (l = b == null ? void 0 : b.axesSpec) != null ? l : []) {
758
- const f = _.fromAxisSpec(g).toCanonicalString();
759
- if (d.has(f))
921
+ var l, s, r, c, i, p, u;
922
+ const m = this.getParentSelectedSources(e, o), d = /* @__PURE__ */ new Set(), h = [], g = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Map();
923
+ for (const D of m)
924
+ if (B(D)) {
925
+ const b = await e.pFrameProvider.getColumnSpecById(D);
926
+ for (const C of (l = b == null ? void 0 : b.axesSpec) != null ? l : []) {
927
+ const S = _.fromAxisSpec(C).toCanonicalString();
928
+ if (d.has(S))
760
929
  continue;
761
- d.add(f), w.add(f);
762
- const y = Ce(g);
763
- A.set(f, {
930
+ d.add(S), h.push(C);
931
+ const y = Ae(C);
932
+ x.set(S, {
764
933
  kind: "axis",
765
- name: g.name,
766
- label: await F(e, f, [
767
- x.toCanonicalString()
934
+ name: C.name,
935
+ label: await T(e, S, [
936
+ D.toCanonicalString()
768
937
  ]),
769
- type: g.type,
938
+ type: C.type,
770
939
  mustBeConsumed: y,
771
940
  dividable: !1,
772
- spec: g,
773
- annotations: g.annotations,
774
- isSubsetFilter: ((s = g.annotations) == null ? void 0 : s[K]) === "true",
775
- isDiscreteFilter: g.type === "String" || ((c = g.annotations) == null ? void 0 : c[$]) === "true",
776
- parentSources: [x.toCanonicalString()]
941
+ spec: C,
942
+ annotations: C.annotations,
943
+ isSubsetFilter: ((s = C.annotations) == null ? void 0 : s[J]) === "true",
944
+ isDiscreteFilter: C.type === "String" || ((r = C.annotations) == null ? void 0 : r[ee]) === "true",
945
+ parentSources: [D.toCanonicalString()]
777
946
  });
778
947
  }
779
948
  }
780
- let v = [...d];
781
- for (; v.length; ) {
782
- const x = [];
783
- for (const b of v)
949
+ let w = [...d];
950
+ for (; w.length; ) {
951
+ const D = [];
952
+ for (const b of w)
784
953
  if (n[b]) {
785
- const g = Object.keys(n[b]);
786
- for (const i of g)
787
- if (!d.has(i)) {
788
- x.push(i), d.add(i), h.add(i);
789
- const { spec: f, id: y } = n[b][i];
790
- for (const S of f.axesSpec) {
791
- const I = _.fromAxisSpec(S).toCanonicalString();
792
- A.has(I) || A.set(I, {
954
+ const C = Object.keys(n[b]);
955
+ for (const a of C)
956
+ if (!g.has(a)) {
957
+ D.push(a), g.add(a);
958
+ const { spec: S, id: y } = n[b][a];
959
+ for (const f of S.axesSpec) {
960
+ const v = _.fromAxisSpec(f).toCanonicalString();
961
+ x.has(v) || x.set(v, {
793
962
  kind: "axis",
794
- name: S.name,
795
- label: (r = (a = S.annotations) == null ? void 0 : a[ge]) != null ? r : "",
796
- type: S.type,
963
+ name: f.name,
964
+ label: (i = (c = f.annotations) == null ? void 0 : c[he]) != null ? i : "",
965
+ type: f.type,
797
966
  mustBeConsumed: !1,
798
967
  dividable: !1,
799
- spec: S,
800
- annotations: S.annotations,
801
- isSubsetFilter: ((u = S.annotations) == null ? void 0 : u[K]) === "true",
802
- isDiscreteFilter: S.type === "String" || ((p = S.annotations) == null ? void 0 : p[$]) === "true",
968
+ spec: f,
969
+ annotations: f.annotations,
970
+ isSubsetFilter: ((p = f.annotations) == null ? void 0 : p[J]) === "true",
971
+ isDiscreteFilter: f.type === "String" || ((u = f.annotations) == null ? void 0 : u[ee]) === "true",
803
972
  parentSources: [y.toCanonicalString()]
804
973
  });
805
974
  }
806
975
  }
807
976
  }
808
- v = x;
977
+ w = D;
809
978
  }
810
- return { allowedAxes: d, parentAxes: w, linkerAxes: h, optionsInfo: A };
979
+ return { parentAxes: d, parentAxesList: h, linkerAxes: g, optionsInfo: x };
811
980
  }
812
- async getOptions(e, o, n, l, s, c, a = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
813
- var u, p, m, d, w, h, A, v;
814
- const x = this.settings.multipleSelectors, b = this.settings.required, g = await this.checkStateConsistency(e, o, s);
981
+ async getOptions(e, o, n, l, s, r, c, i = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set()) {
982
+ var u, m, d, h, g;
983
+ const x = this.settings.multipleSelectors, w = this.settings.required, D = await this.checkStateConsistency(e, o, s, r);
815
984
  if (this.dependsOn.length && this.dependsOn.some((O) => o.components[O].selectorStates.length === 0))
816
- return { multipleSelectors: x, required: b, stateConsistency: g, options: [], optionsInfo: /* @__PURE__ */ new Map() };
985
+ return { multipleSelectors: x, required: w, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
817
986
  if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((O) => o.components[O].selectorStates.length === 0))
818
- return { multipleSelectors: x, required: b, stateConsistency: g, options: [], optionsInfo: /* @__PURE__ */ new Map() };
819
- const i = this.getParentSelectedSources(e, o), f = (await e.pFrameProvider.getColumns([], !1, this.allowedTypes, void 0, this.annotations)).filter((O) => !l.has(O.toCanonicalString())), { allowedAxes: y, parentAxes: S, linkerAxes: I, optionsInfo: P } = await this.getAllowedAxes(e, o, s), N = o.components[this.componentName], L = [];
987
+ return { multipleSelectors: x, required: w, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
988
+ const b = this.getParentSelectedSources(e, o), C = (await e.pFrameProvider.getColumns([], !1, this.allowedTypes, void 0, this.annotations)).filter((O) => !l.has(O.toCanonicalString())), { parentAxes: a, linkerAxes: S, parentAxesList: y, optionsInfo: f } = await this.getAllowedAxes(e, o, s), v = o.components[this.componentName], P = [];
820
989
  if (this.settings.axesAllowed)
821
- for (const O of S) {
822
- const T = C(O), k = P.get(T.toCanonicalString()), q = this.allowedTypes.includes(k.spec.type), G = Object.entries(this.annotations).every(
823
- ([ee, V]) => {
824
- var J;
825
- return ((J = k.spec.annotations) == null ? void 0 : J[ee]) === V;
990
+ for (const O of a) {
991
+ const N = A(O), L = f.get(N.toCanonicalString()), E = this.allowedTypes.includes(L.spec.type), F = Object.entries(this.annotations).every(
992
+ ([oe, q]) => {
993
+ var U;
994
+ return ((U = L.spec.annotations) == null ? void 0 : U[oe]) === q;
826
995
  }
827
- ), Z = this.checkSourceBySpec ? this.checkSourceBySpec(k.spec, o) : !0, Q = !this.settings.homogeneous || !(k != null && k.mustBeConsumed), ne = !l.has(O), oe = a.has(T.name) || r.has(T.toCanonicalString()), ue = N.selectorStates.some((ee) => ee.selectedSource === O);
828
- q && G && Z && Q && ne && !oe && !ue && L.push({ value: O });
996
+ ), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(O), Z = i.has(N.name) || p.has(N.toCanonicalString()), ne = v.selectorStates.some((oe) => oe.selectedSource === O);
997
+ E && F && G && M && K && !Z && !ne && P.push({ value: O });
829
998
  }
830
999
  if (this.settings.columnsAllowed) {
831
1000
  const O = !this.settings.columnsWithExtraAxesAllowed && this.strictlyDependsOnParents;
832
- for (const T of f) {
833
- const k = T.toCanonicalString(), q = C(k), G = await e.pFrameProvider.getColumnSpecById(q), Z = ((u = G == null ? void 0 : G.annotations) == null ? void 0 : u[we]) === "true";
1001
+ for (const N of C) {
1002
+ const L = N.toCanonicalString(), E = A(L), F = await e.pFrameProvider.getColumnSpecById(E);
1003
+ if (!F)
1004
+ continue;
1005
+ const G = be(
1006
+ F,
1007
+ y,
1008
+ a,
1009
+ S,
1010
+ r
1011
+ ).map((q) => _.fromAxisSpec(q).toCanonicalString()), M = new Set(G);
834
1012
  if (
835
1013
  // do not add to available options label columns, or columns that are not fit by custom spec condition, or columns that are not fit by condition for data inputs
836
- !G || Be(G) || Z || this.checkSourceBySpec && !this.checkSourceBySpec(G, o) || this.settings.isDataComponent && !c(G) || O && ((p = G.axesSpec) != null && p.some((V) => !y.has(_.fromAxisSpec(V).toCanonicalString()))) || i.length && !((m = G.axesSpec) != null && m.some((V) => y.has(_.fromAxisSpec(V).toCanonicalString())))
1014
+ Fe(F) || Je(F) || this.checkSourceBySpec && !this.checkSourceBySpec(F, o) || this.settings.isDataComponent && !c(F) || O && G.length > 0 || b.length && G.length > 0 && !F.axesSpec.some((q) => {
1015
+ const U = _.fromAxisSpec(q).toCanonicalString();
1016
+ return a.has(U) || S.has(U);
1017
+ })
837
1018
  )
838
1019
  continue;
839
- const Q = (w = (d = G == null ? void 0 : G.axesSpec) == null ? void 0 : d.map((V) => _.fromAxisSpec(V).toCanonicalString())) != null ? w : [], ne = [], oe = {};
840
- if (this.settings.columnsWithExtraAxesAllowed && Q.forEach((V, J) => {
841
- y.has(V) || (ne.push(V), oe[V] = J);
842
- }), G) {
843
- const V = (h = n[k]) != null ? h : await F(e, T.toCanonicalString(), []), J = {
1020
+ const K = (m = (u = F == null ? void 0 : F.axesSpec) == null ? void 0 : u.map((q) => _.fromAxisSpec(q).toCanonicalString())) != null ? m : [], Z = {};
1021
+ if (this.settings.columnsWithExtraAxesAllowed && K.forEach((q, U) => {
1022
+ M.has(q) && (Z[q] = U);
1023
+ }), F) {
1024
+ const q = (d = n[L]) != null ? d : await T(e, N.toCanonicalString(), []), U = {
844
1025
  kind: "column",
845
- name: G.name,
846
- label: V,
847
- type: G.valueType,
848
- spec: G,
849
- annotations: G.annotations,
850
- isSubsetFilter: ((A = G.annotations) == null ? void 0 : A[K]) === "true",
851
- isDiscreteFilter: G.valueType === "String" || ((v = G.annotations) == null ? void 0 : v[$]) === "true",
852
- axesToBeFixed: ne,
853
- axesToBeFixedIndexes: oe
1026
+ name: F.name,
1027
+ label: q,
1028
+ type: F.valueType,
1029
+ spec: F,
1030
+ annotations: F.annotations,
1031
+ isSubsetFilter: ((h = F.annotations) == null ? void 0 : h[J]) === "true",
1032
+ isDiscreteFilter: F.valueType === "String" || ((g = F.annotations) == null ? void 0 : g[ee]) === "true",
1033
+ axesToBeFixed: G,
1034
+ axesToBeFixedIndexes: Z
854
1035
  };
855
- P.set(q.toCanonicalString(), J);
1036
+ f.set(E.toCanonicalString(), U);
856
1037
  }
857
- const ue = a.has(q.name) || r.has(q.toCanonicalString()), ee = o.components[this.componentName].selectorStates.some(
858
- (V) => V.selectedSource === k
1038
+ const ne = i.has(E.name) || p.has(E.toCanonicalString()), oe = o.components[this.componentName].selectorStates.some(
1039
+ (q) => q.selectedSource === L
859
1040
  );
860
- !ue && !ee && L.push({ value: k });
1041
+ !ne && !oe && P.push({ value: L });
861
1042
  }
862
1043
  }
863
- return { multipleSelectors: x, required: b, stateConsistency: g, options: L, optionsInfo: P };
1044
+ return { multipleSelectors: x, required: w, stateConsistency: D, options: P, optionsInfo: f };
864
1045
  }
865
1046
  };
866
- Ae.DefaultSettings = {
1047
+ De.DefaultSettings = {
867
1048
  isDataComponent: !1,
868
1049
  multipleSelectors: !1,
869
1050
  required: !1,
@@ -873,7 +1054,7 @@ Ae.DefaultSettings = {
873
1054
  columnsWithExtraAxesAllowed: !0,
874
1055
  dimensionConsumer: !1
875
1056
  };
876
- var D = Ae, Ve = {
1057
+ var I = De, $e = {
877
1058
  type: "bubble",
878
1059
  components: {
879
1060
  valueSize: { type: "simple", selectorStates: [] },
@@ -887,23 +1068,23 @@ var D = Ae, Ve = {
887
1068
  },
888
1069
  dividedAxes: {}
889
1070
  };
890
- function le(t, e) {
1071
+ function ae(t, e) {
891
1072
  if (!e.length)
892
1073
  return [];
893
- const o = e.map((s) => C(s)), n = Object.values(t.columnsData)[0].length, l = [];
1074
+ const o = e.map((s) => A(s)), n = Object.values(t.columnsData)[0].length, l = [];
894
1075
  for (let s = 0; s < n; s++) {
895
- const c = o.map((a) => {
896
- const r = a.toCanonicalString();
897
- return B(a) ? t.columnsData[r][s] : t.axesData[r][s];
1076
+ const r = o.map((c) => {
1077
+ const i = c.toCanonicalString();
1078
+ return B(c) ? t.columnsData[i][s] : t.axesData[i][s];
898
1079
  }).join(", ");
899
- l.push(c);
1080
+ l.push(r);
900
1081
  }
901
1082
  return l;
902
1083
  }
903
- var je = class extends R {
1084
+ var Qe = class extends Q {
904
1085
  constructor() {
905
1086
  super({
906
- valueSize: new D({
1087
+ valueSize: new I({
907
1088
  componentName: "valueSize",
908
1089
  allowedTypes: ["Int", "Long", "Double", "Float"],
909
1090
  strictlyDependsOnParents: !0,
@@ -915,7 +1096,7 @@ var je = class extends R {
915
1096
  required: !0
916
1097
  }
917
1098
  }),
918
- valueColor: new D({
1099
+ valueColor: new I({
919
1100
  componentName: "valueColor",
920
1101
  allowedTypes: ["Int", "Long", "Double", "Float"],
921
1102
  strictlyDependsOnParents: !0,
@@ -927,7 +1108,7 @@ var je = class extends R {
927
1108
  required: !0
928
1109
  }
929
1110
  }),
930
- x: new D({
1111
+ x: new I({
931
1112
  componentName: "x",
932
1113
  allowedTypes: ["Int", "String", "Long"],
933
1114
  strictlyDependsOnParents: !0,
@@ -940,7 +1121,7 @@ var je = class extends R {
940
1121
  columnsAllowed: !1
941
1122
  }
942
1123
  }),
943
- y: new D({
1124
+ y: new I({
944
1125
  componentName: "y",
945
1126
  allowedTypes: ["Int", "String", "Long"],
946
1127
  strictlyDependsOnParents: !0,
@@ -953,7 +1134,7 @@ var je = class extends R {
953
1134
  columnsAllowed: !1
954
1135
  }
955
1136
  }),
956
- tooltipContent: new D({
1137
+ tooltipContent: new I({
957
1138
  componentName: "tooltipContent",
958
1139
  allowedTypes: ["String", "Int", "Long", "Float", "Double"],
959
1140
  strictlyDependsOnParents: !0,
@@ -964,7 +1145,7 @@ var je = class extends R {
964
1145
  multipleSelectors: !0
965
1146
  }
966
1147
  }),
967
- facetBy: new D({
1148
+ facetBy: new I({
968
1149
  componentName: "facetBy",
969
1150
  allowedTypes: ["String", "Int", "Long"],
970
1151
  strictlyDependsOnParents: !0,
@@ -976,7 +1157,7 @@ var je = class extends R {
976
1157
  }
977
1158
  })
978
1159
  }, {
979
- filters: new D({
1160
+ filters: new I({
980
1161
  componentName: "filters",
981
1162
  allowedTypes: ["String", "Int", "Long", "Double", "Long"],
982
1163
  strictlyDependsOnParents: !0,
@@ -987,9 +1168,9 @@ var je = class extends R {
987
1168
  dimensionConsumer: !0,
988
1169
  multipleSelectors: !0
989
1170
  },
990
- checkSourceBySpec: H
1171
+ checkSourceBySpec: R
991
1172
  }),
992
- tabBy: new D({
1173
+ tabBy: new I({
993
1174
  componentName: "tabBy",
994
1175
  allowedTypes: ["String", "Int"],
995
1176
  strictlyDependsOnParents: !0,
@@ -1005,139 +1186,141 @@ var je = class extends R {
1005
1186
  async getMustBeConsumedAxes(t, e) {
1006
1187
  if (!e.components.valueColor.selectorStates.length)
1007
1188
  return /* @__PURE__ */ new Set();
1008
- const o = e.components.valueColor.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(C(o));
1189
+ const o = e.components.valueColor.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(A(o));
1009
1190
  return n ? new Set(n.axesSpec.map((l) => _.fromAxisSpec(l).toCanonicalString())) : /* @__PURE__ */ new Set();
1010
1191
  }
1011
1192
  async createDataByColumns(t, e) {
1012
1193
  var o, n, l;
1013
- const s = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
1014
- if (!s || !c)
1194
+ const s = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, r = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
1195
+ if (!s || !r)
1015
1196
  throw Error("Value column is not valid");
1016
- const a = C(s), r = C(c);
1017
- if (!a || !r || !B(a) && !B(r))
1197
+ const c = A(s), i = A(r);
1198
+ if (!c || !i || !B(c) && !B(i))
1018
1199
  throw Error("Value column is not valid");
1019
- const u = {
1200
+ const p = {
1020
1201
  type: "columns",
1021
- id: (l = j(e.components)) != null ? l : "",
1202
+ id: (l = z(e.components)) != null ? l : "",
1022
1203
  values: {}
1023
- }, p = await W(t), m = [
1204
+ }, { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = [
1024
1205
  ...e.components.filters.selectorStates,
1025
1206
  ...e.components.tabBy.selectorStates
1026
- ], d = U(m), w = m.map((T) => C(T.selectedSource)).filter(B), h = [a, r].filter(B), A = h.map((T) => T.toCanonicalString()), v = await X(t, A), x = [
1207
+ ], h = Y(d), g = d.map((F) => A(F.selectedSource)).filter(B), x = [c, i].filter(B), w = x.map((F) => F.toCanonicalString()), D = await $(t, w), b = [
1027
1208
  e.components.facetBy,
1028
1209
  e.components.x,
1029
1210
  e.components.y,
1030
1211
  e.components.tooltipContent
1031
- ], b = [], g = h.map(() => []), i = [], f = [];
1032
- for (const { selectedSource: T, fixedAxes: k } of m)
1033
- f.push(...await M(
1212
+ ], C = [], a = x.map(() => []), S = [], y = [];
1213
+ for (const { selectedSource: F, fixedAxes: G } of d)
1214
+ y.push(...await V(
1034
1215
  t,
1035
- p,
1036
- v,
1037
- T,
1038
- k
1039
- )), g.push(
1040
- (k ?? []).map(({ axisIdx: q, axisValue: G }) => ({ idx: q, value: G }))
1216
+ u,
1217
+ m,
1218
+ D,
1219
+ F,
1220
+ G
1221
+ )), a.push(
1222
+ (G ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
1041
1223
  );
1042
- for (const T of x)
1043
- for (const { selectedSource: k, fixedAxes: q } of T.selectorStates) {
1044
- b.push(C(k)), i.push(
1045
- (q ?? []).map(({ axisIdx: Z, axisValue: Q }) => ({ idx: Z, value: Q }))
1046
- ), f.push(...await M(
1224
+ for (const F of b)
1225
+ for (const { selectedSource: G, fixedAxes: M } of F.selectorStates) {
1226
+ C.push(A(G)), S.push(
1227
+ (M ?? []).map(({ axisIdx: Z, axisValue: ne }) => ({ idx: Z, value: ne }))
1228
+ ), y.push(...await V(
1047
1229
  t,
1048
- p,
1049
- v,
1050
- k,
1051
- q
1230
+ u,
1231
+ m,
1232
+ D,
1233
+ G,
1234
+ M
1052
1235
  ));
1053
- const G = await E(t, k, A);
1054
- G && b.push(G);
1236
+ const K = await k(t, G, w);
1237
+ K && C.push(K);
1055
1238
  }
1056
- const y = await t.pFrameProvider.getTableOuterJoin(
1057
- [...h, ...f, ...w],
1058
- b,
1059
- d,
1239
+ const f = await t.pFrameProvider.getTableOuterJoin(
1240
+ [...x, ...y, ...g],
1241
+ C,
1242
+ h,
1060
1243
  !0,
1061
- g,
1062
- i
1244
+ a,
1245
+ S
1063
1246
  );
1064
- b.forEach((T) => {
1065
- const k = T.toCanonicalString();
1066
- u.values[k] = B(T) ? y.columnsData[k] : y.axesData[k];
1067
- }), u.values[s] = B(a) ? y.columnsData[s] : y.axesData[s], u.values[c] = B(r) ? y.columnsData[c] : y.axesData[c];
1068
- const S = e.components.x.selectorStates.map((T) => T.selectedSource), I = S.join(", "), P = await Promise.all(S.map(
1069
- async (T) => {
1070
- var k, q;
1071
- return (q = (k = await E(t, T, A)) == null ? void 0 : k.toCanonicalString()) != null ? q : T;
1247
+ C.forEach((F) => {
1248
+ const G = F.toCanonicalString();
1249
+ p.values[G] = B(F) ? f.columnsData[G] : f.axesData[G];
1250
+ }), p.values[s] = B(c) ? f.columnsData[s] : f.axesData[s], p.values[r] = B(i) ? f.columnsData[r] : f.axesData[r];
1251
+ const v = e.components.x.selectorStates.map((F) => F.selectedSource), P = v.join(", "), O = await Promise.all(v.map(
1252
+ async (F) => {
1253
+ var G, M;
1254
+ return (M = (G = await k(t, F, w)) == null ? void 0 : G.toCanonicalString()) != null ? M : F;
1072
1255
  }
1073
1256
  ));
1074
- u.values[I] = le(y, S), u.values.xLabels = le(y, P);
1075
- const N = e.components.y.selectorStates.map((T) => T.selectedSource), L = N.join(", "), O = await Promise.all(N.map(
1076
- async (T) => {
1077
- var k, q;
1078
- return (q = (k = await E(t, T, A)) == null ? void 0 : k.toCanonicalString()) != null ? q : T;
1257
+ p.values[P] = ae(f, v), p.values.xLabels = ae(f, O);
1258
+ const N = e.components.y.selectorStates.map((F) => F.selectedSource), L = N.join(", "), E = await Promise.all(N.map(
1259
+ async (F) => {
1260
+ var G, M;
1261
+ return (M = (G = await k(t, F, w)) == null ? void 0 : G.toCanonicalString()) != null ? M : F;
1079
1262
  }
1080
1263
  ));
1081
- return u.values[L] = le(y, N), u.values.yLabels = le(y, O), { byColumns: u };
1264
+ return p.values[L] = ae(f, N), p.values.yLabels = ae(f, E), { byColumns: p };
1082
1265
  }
1083
1266
  async createChartSettings(t, e) {
1084
1267
  var o, n;
1085
1268
  const l = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, s = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
1086
1269
  if (!l || !s)
1087
1270
  throw Error("Value column is not valid");
1088
- const c = C(l), a = C(s);
1089
- if (!B(c) && !B(a))
1271
+ const r = A(l), c = A(s);
1272
+ if (!B(r) && !B(c))
1090
1273
  throw Error("Value column is not valid");
1091
- const r = [c, a].filter(B).map((g) => g.toCanonicalString()), u = {
1274
+ const i = [r, c].filter(B).map((C) => C.toCanonicalString()), p = {
1092
1275
  type: "column",
1093
1276
  value: l,
1094
- label: await F(t, l, [])
1095
- }, p = {
1277
+ label: await T(t, l, [])
1278
+ }, u = {
1096
1279
  type: "column",
1097
1280
  value: s,
1098
- label: await F(t, s, [])
1099
- }, d = e.components.x.selectorStates.map(({ selectedSource: g }) => g).join(", "), h = e.components.y.selectorStates.map(({ selectedSource: g }) => g).join(", "), A = await Promise.all(e.components.facetBy.selectorStates.map(async (g) => {
1100
- var i, f;
1281
+ label: await T(t, s, [])
1282
+ }, d = e.components.x.selectorStates.map(({ selectedSource: C }) => C).join(", "), g = e.components.y.selectorStates.map(({ selectedSource: C }) => C).join(", "), x = await Promise.all(e.components.facetBy.selectorStates.map(async (C) => {
1283
+ var a, S;
1101
1284
  return {
1102
1285
  type: "column",
1103
- value: (f = (i = await E(t, g.selectedSource, r)) == null ? void 0 : i.toCanonicalString()) != null ? f : g.selectedSource
1286
+ value: (S = (a = await k(t, C.selectedSource, i)) == null ? void 0 : a.toCanonicalString()) != null ? S : C.selectedSource
1104
1287
  };
1105
- })), v = (await Promise.all(e.components.x.selectorStates.map((g) => F(t, g.selectedSource, r)))).join(", "), x = (await Promise.all(e.components.y.selectorStates.map((g) => F(t, g.selectedSource, r)))).join(", "), b = await Promise.all(
1106
- e.components.tooltipContent.selectorStates.map(async (g) => {
1107
- var i, f;
1108
- const y = g.selectedSource;
1288
+ })), w = (await Promise.all(e.components.x.selectorStates.map((C) => T(t, C.selectedSource, i)))).join(", "), D = (await Promise.all(e.components.y.selectorStates.map((C) => T(t, C.selectedSource, i)))).join(", "), b = await Promise.all(
1289
+ e.components.tooltipContent.selectorStates.map(async (C) => {
1290
+ var a, S;
1291
+ const y = C.selectedSource;
1109
1292
  return {
1110
1293
  type: "column",
1111
- label: await F(t, y, r) || y,
1294
+ label: await T(t, y, i) || y,
1112
1295
  value: y,
1113
- valueLabels: (f = (i = await E(t, y, r)) == null ? void 0 : i.toCanonicalString()) != null ? f : y
1296
+ valueLabels: (S = (a = await k(t, y, i)) == null ? void 0 : a.toCanonicalString()) != null ? S : y
1114
1297
  };
1115
1298
  })
1116
1299
  );
1117
1300
  return {
1118
1301
  type: "bubble",
1119
- valueColor: u,
1120
- valueSize: p,
1302
+ valueColor: p,
1303
+ valueSize: u,
1121
1304
  xColumn: {
1122
1305
  type: "column",
1123
1306
  value: d,
1124
- label: v,
1307
+ label: w,
1125
1308
  valueLabels: "xLabels"
1126
1309
  },
1127
1310
  yColumn: {
1128
1311
  type: "column",
1129
- value: h,
1130
- label: x,
1312
+ value: g,
1313
+ label: D,
1131
1314
  valueLabels: "yLabels"
1132
1315
  },
1133
- facetBy: A,
1316
+ facetBy: x,
1134
1317
  tooltips: {
1135
1318
  show: !0,
1136
1319
  content: b
1137
1320
  }
1138
1321
  };
1139
1322
  }
1140
- }, ze = {
1323
+ }, Ze = {
1141
1324
  type: "histogram",
1142
1325
  components: {
1143
1326
  value: { type: "simple", selectorStates: [] },
@@ -1147,11 +1330,11 @@ var je = class extends R {
1147
1330
  facetBy: { type: "simple", selectorStates: [] }
1148
1331
  },
1149
1332
  dividedAxes: {}
1150
- }, Ue = class extends R {
1333
+ }, et = class extends Q {
1151
1334
  constructor() {
1152
1335
  super(
1153
1336
  {
1154
- value: new D({
1337
+ value: new I({
1155
1338
  componentName: "value",
1156
1339
  allowedTypes: ["Int", "Long", "Double", "Float"],
1157
1340
  settings: {
@@ -1161,7 +1344,7 @@ var je = class extends R {
1161
1344
  required: !0
1162
1345
  }
1163
1346
  }),
1164
- grouping: new D({
1347
+ grouping: new I({
1165
1348
  componentName: "grouping",
1166
1349
  allowedTypes: ["String", "Int", "Long"],
1167
1350
  parentComponents: ["value"],
@@ -1171,7 +1354,7 @@ var je = class extends R {
1171
1354
  multipleSelectors: !1
1172
1355
  }
1173
1356
  }),
1174
- facetBy: new D({
1357
+ facetBy: new I({
1175
1358
  componentName: "facetBy",
1176
1359
  allowedTypes: ["String", "Int", "Long"],
1177
1360
  parentComponents: ["value"],
@@ -1184,7 +1367,7 @@ var je = class extends R {
1184
1367
  })
1185
1368
  },
1186
1369
  {
1187
- filters: new D({
1370
+ filters: new I({
1188
1371
  componentName: "filters",
1189
1372
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
1190
1373
  parentComponents: ["value"],
@@ -1195,9 +1378,9 @@ var je = class extends R {
1195
1378
  dimensionConsumer: !0,
1196
1379
  multipleSelectors: !0
1197
1380
  },
1198
- checkSourceBySpec: H
1381
+ checkSourceBySpec: R
1199
1382
  }),
1200
- tabBy: new D({
1383
+ tabBy: new I({
1201
1384
  componentName: "tabBy",
1202
1385
  allowedTypes: ["String", "Int"],
1203
1386
  parentComponents: ["value"],
@@ -1216,87 +1399,85 @@ var je = class extends R {
1216
1399
  const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
1217
1400
  if (!l)
1218
1401
  throw Error("Value column is not valid");
1219
- const s = C(l);
1402
+ const s = A(l);
1220
1403
  if (!B(s))
1221
1404
  throw Error("Value column is not valid");
1222
- const c = {
1405
+ const r = {
1223
1406
  type: "columns",
1224
- id: (n = j(e.components)) != null ? n : "",
1407
+ id: (n = z(e.components)) != null ? n : "",
1225
1408
  values: {}
1226
- }, a = await W(t), r = [
1409
+ }, { linkerColumnsMap: c, compositeLinkerMap: i } = await X(t), p = [
1227
1410
  ...e.components.filters.selectorStates,
1228
1411
  ...e.components.tabBy.selectorStates
1229
- ], u = U(r), p = r.map((g) => C(g.selectedSource)).filter(B), m = [l], d = await X(t, m), w = [e.components.facetBy, e.components.grouping], h = [], A = [[]], v = [], x = [];
1230
- for (const { selectedSource: g, fixedAxes: i } of r)
1231
- x.push(
1232
- ...await M(t, a, d, g, i)
1233
- ), x.push(
1234
- ...await M(t, a, d, g, i)
1235
- ), A.push(
1236
- (i ?? []).map(({ axisIdx: f, axisValue: y }) => ({ idx: f, value: y }))
1412
+ ], u = Y(p), m = p.map((a) => A(a.selectedSource)).filter(B), d = [l], h = await $(t, d), g = [e.components.facetBy, e.components.grouping], x = [], w = [[]], D = [], b = [];
1413
+ for (const { selectedSource: a, fixedAxes: S } of p)
1414
+ b.push(
1415
+ ...await V(t, c, i, h, a, S)
1416
+ ), w.push(
1417
+ (S ?? []).map(({ axisIdx: y, axisValue: f }) => ({ idx: y, value: f }))
1237
1418
  );
1238
- for (const g of w)
1239
- for (const { selectedSource: i, fixedAxes: f } of g.selectorStates) {
1240
- h.push(C(i)), v.push(
1241
- (f ?? []).map(({ axisIdx: S, axisValue: I }) => ({ idx: S, value: I }))
1242
- ), x.push(
1243
- ...await M(t, a, d, i, f)
1419
+ for (const a of g)
1420
+ for (const { selectedSource: S, fixedAxes: y } of a.selectorStates) {
1421
+ x.push(A(S)), D.push(
1422
+ (y ?? []).map(({ axisIdx: v, axisValue: P }) => ({ idx: v, value: P }))
1423
+ ), b.push(
1424
+ ...await V(t, c, i, h, S, y)
1244
1425
  );
1245
- const y = await E(t, i, m);
1246
- y && h.push(y);
1426
+ const f = await k(t, S, d);
1427
+ f && x.push(f);
1247
1428
  }
1248
- const b = await t.pFrameProvider.getTableOuterJoin(
1249
- [s, ...x, ...p],
1250
- h,
1429
+ const C = await t.pFrameProvider.getTableOuterJoin(
1430
+ [s, ...b, ...m],
1431
+ x,
1251
1432
  u,
1252
1433
  !0,
1253
- A,
1254
- v
1434
+ w,
1435
+ D
1255
1436
  );
1256
- return h.forEach((g) => {
1257
- const i = g.toCanonicalString();
1258
- c.values[i] = B(g) ? b.columnsData[i] : b.axesData[i];
1259
- }), c.values[s.toCanonicalString()] = b.columnsData[s.toCanonicalString()], { byColumns: c };
1437
+ return x.forEach((a) => {
1438
+ const S = a.toCanonicalString();
1439
+ r.values[S] = B(a) ? C.columnsData[S] : C.axesData[S];
1440
+ }), r.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()], { byColumns: r };
1260
1441
  }
1261
1442
  async createChartSettings(t, e) {
1262
1443
  var o, n;
1263
1444
  const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
1264
1445
  if (!l)
1265
1446
  throw Error("Value column is not valid");
1266
- const s = C(l);
1447
+ const s = A(l);
1267
1448
  if (!B(s))
1268
1449
  throw Error("Value column is not valid");
1269
- const c = [l], a = {
1450
+ const r = [l], c = {
1270
1451
  type: "column",
1271
1452
  value: l,
1272
- label: await F(t, l, [])
1273
- }, r = await Promise.all(
1274
- e.components.facetBy.selectorStates.map(async (p) => {
1453
+ label: await T(t, l, [])
1454
+ }, i = await Promise.all(
1455
+ e.components.facetBy.selectorStates.map(async (u) => {
1275
1456
  var m, d;
1276
1457
  return {
1277
1458
  type: "column",
1278
- value: (d = (m = await E(t, p.selectedSource, c)) == null ? void 0 : m.toCanonicalString()) != null ? d : p.selectedSource
1459
+ value: (d = (m = await k(t, u.selectedSource, r)) == null ? void 0 : m.toCanonicalString()) != null ? d : u.selectedSource
1279
1460
  };
1280
1461
  })
1281
1462
  );
1282
- let u;
1463
+ let p;
1283
1464
  if (e.components.grouping.selectorStates.length) {
1284
- const { selectedSource: p } = e.components.grouping.selectorStates[0];
1285
- u = {
1465
+ const { selectedSource: u } = e.components.grouping.selectorStates[0];
1466
+ p = {
1286
1467
  type: "column",
1287
- value: p,
1288
- label: await F(t, p, c),
1289
- valueLabels: (n = await E(t, p, c)) == null ? void 0 : n.toCanonicalString()
1468
+ value: u,
1469
+ label: await T(t, u, r),
1470
+ valueLabels: (n = await k(t, u, r)) == null ? void 0 : n.toCanonicalString()
1290
1471
  };
1291
1472
  }
1292
1473
  return {
1293
1474
  type: "histogram",
1294
- valueColumn: a,
1295
- facetBy: r,
1296
- grouping: u
1475
+ valueColumn: c,
1476
+ facetBy: i,
1477
+ grouping: p
1297
1478
  };
1298
1479
  }
1299
- }, He = {
1480
+ }, tt = {
1300
1481
  type: "discrete",
1301
1482
  components: {
1302
1483
  y: { type: "simple", selectorStates: [] },
@@ -1307,16 +1488,16 @@ var je = class extends R {
1307
1488
  secondaryGrouping: { type: "simple", selectorStates: [] }
1308
1489
  },
1309
1490
  dividedAxes: {}
1310
- }, We = class extends R {
1491
+ }, nt = class extends Q {
1311
1492
  constructor() {
1312
1493
  super(
1313
1494
  {
1314
- y: new D({
1495
+ y: new I({
1315
1496
  componentName: "y",
1316
1497
  allowedTypes: ["Int", "Double", "Long", "Float"],
1317
1498
  settings: { isDataComponent: !0 }
1318
1499
  }),
1319
- primaryGrouping: new D({
1500
+ primaryGrouping: new I({
1320
1501
  componentName: "primaryGrouping",
1321
1502
  allowedTypes: ["String", "Int", "Long"],
1322
1503
  strictlyDependsOnParents: !0,
@@ -1327,7 +1508,7 @@ var je = class extends R {
1327
1508
  homogeneous: !0
1328
1509
  }
1329
1510
  }),
1330
- secondaryGrouping: new D({
1511
+ secondaryGrouping: new I({
1331
1512
  componentName: "secondaryGrouping",
1332
1513
  allowedTypes: ["String", "Int", "Long"],
1333
1514
  strictlyDependsOnParents: !0,
@@ -1338,7 +1519,7 @@ var je = class extends R {
1338
1519
  homogeneous: !0
1339
1520
  }
1340
1521
  }),
1341
- facetBy: new D({
1522
+ facetBy: new I({
1342
1523
  componentName: "facetBy",
1343
1524
  allowedTypes: ["String", "Int", "Long"],
1344
1525
  strictlyDependsOnParents: !0,
@@ -1352,7 +1533,7 @@ var je = class extends R {
1352
1533
  })
1353
1534
  },
1354
1535
  {
1355
- filters: new D({
1536
+ filters: new I({
1356
1537
  componentName: "filters",
1357
1538
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
1358
1539
  strictlyDependsOnParents: !0,
@@ -1363,9 +1544,9 @@ var je = class extends R {
1363
1544
  dimensionConsumer: !0,
1364
1545
  multipleSelectors: !0
1365
1546
  },
1366
- checkSourceBySpec: H
1547
+ checkSourceBySpec: R
1367
1548
  }),
1368
- tabBy: new D({
1549
+ tabBy: new I({
1369
1550
  componentName: "tabBy",
1370
1551
  allowedTypes: ["String", "Int"],
1371
1552
  strictlyDependsOnParents: !0,
@@ -1381,113 +1562,115 @@ var je = class extends R {
1381
1562
  }
1382
1563
  async createDataByColumns(t, e) {
1383
1564
  var o;
1384
- const n = e.components.y.selectorStates[0].selectedSource, l = C(n);
1565
+ const n = e.components.y.selectorStates[0].selectedSource, l = A(n);
1385
1566
  if (!n || !B(l))
1386
1567
  throw Error("Y column is not valid");
1387
1568
  const s = {
1388
1569
  type: "columns",
1389
- id: (o = j(e.components)) != null ? o : "",
1570
+ id: (o = z(e.components)) != null ? o : "",
1390
1571
  values: {}
1391
- }, c = await W(t), a = [
1572
+ }, { linkerColumnsMap: r, compositeLinkerMap: c } = await X(t), i = [
1392
1573
  ...e.components.filters.selectorStates,
1393
1574
  ...e.components.tabBy.selectorStates
1394
- ], r = U(a), u = a.map((b) => C(b.selectedSource)).filter(B), p = [n], m = await X(t, p), d = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], w = [], h = [[]], A = [], v = [];
1395
- for (const { selectedSource: b, fixedAxes: g } of a)
1396
- v.push(...await M(
1575
+ ], p = Y(i), u = i.map((C) => A(C.selectedSource)).filter(B), m = [n], d = await $(t, m), h = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], g = [], x = [[]], w = [], D = [];
1576
+ for (const { selectedSource: C, fixedAxes: a } of i)
1577
+ D.push(...await V(
1397
1578
  t,
1579
+ r,
1398
1580
  c,
1399
- m,
1400
- b,
1401
- g
1402
- )), h.push(
1403
- (g ?? []).map(({ axisIdx: i, axisValue: f }) => ({ idx: i, value: f }))
1581
+ d,
1582
+ C,
1583
+ a
1584
+ )), x.push(
1585
+ (a ?? []).map(({ axisIdx: S, axisValue: y }) => ({ idx: S, value: y }))
1404
1586
  );
1405
- for (const b of d)
1406
- for (const { selectedSource: g, fixedAxes: i } of b.selectorStates) {
1407
- w.push(C(g)), A.push(
1408
- (i ?? []).map(({ axisIdx: y, axisValue: S }) => ({ idx: y, value: S }))
1409
- ), v.push(...await M(
1587
+ for (const C of h)
1588
+ for (const { selectedSource: a, fixedAxes: S } of C.selectorStates) {
1589
+ g.push(A(a)), w.push(
1590
+ (S ?? []).map(({ axisIdx: f, axisValue: v }) => ({ idx: f, value: v }))
1591
+ ), D.push(...await V(
1410
1592
  t,
1593
+ r,
1411
1594
  c,
1412
- m,
1413
- g,
1414
- i
1595
+ d,
1596
+ a,
1597
+ S
1415
1598
  ));
1416
- const f = await E(t, g, p);
1417
- f && w.push(f);
1599
+ const y = await k(t, a, m);
1600
+ y && g.push(y);
1418
1601
  }
1419
- const x = await t.pFrameProvider.getTableOuterJoin(
1420
- [l, ...v, ...u],
1421
- w,
1422
- r,
1602
+ const b = await t.pFrameProvider.getTableOuterJoin(
1603
+ [l, ...D, ...u],
1604
+ g,
1605
+ p,
1423
1606
  !0,
1424
- h,
1425
- A
1607
+ x,
1608
+ w
1426
1609
  );
1427
- return w.forEach((b) => {
1428
- const g = b.toCanonicalString();
1429
- s.values[g] = B(b) ? x.columnsData[g] : x.axesData[g];
1430
- }), s.values[l.toCanonicalString()] = x.columnsData[l.toCanonicalString()], { byColumns: s };
1610
+ return g.forEach((C) => {
1611
+ const a = C.toCanonicalString();
1612
+ s.values[a] = B(C) ? b.columnsData[a] : b.axesData[a];
1613
+ }), s.values[l.toCanonicalString()] = b.columnsData[l.toCanonicalString()], { byColumns: s };
1431
1614
  }
1432
1615
  async createChartSettings(t, e) {
1433
1616
  var o, n;
1434
- const l = e.components.y.selectorStates[0].selectedSource, s = C(l);
1617
+ const l = e.components.y.selectorStates[0].selectedSource, s = A(l);
1435
1618
  if (!l || !B(s))
1436
1619
  throw Error("Y column is not valid");
1437
- const c = {
1620
+ const r = {
1438
1621
  type: "column",
1439
1622
  value: l,
1440
- label: await F(t, l, [])
1441
- }, a = [l];
1442
- let r;
1623
+ label: await T(t, l, [])
1624
+ }, c = [l];
1625
+ let i;
1443
1626
  if (e.components.primaryGrouping.selectorStates.length) {
1444
1627
  const { selectedSource: m } = e.components.primaryGrouping.selectorStates[0];
1445
- r = {
1628
+ i = {
1446
1629
  columnName: {
1447
1630
  type: "column",
1448
1631
  value: m,
1449
- label: await F(t, m, a),
1450
- valueLabels: (o = await E(
1632
+ label: await T(t, m, c),
1633
+ valueLabels: (o = await k(
1451
1634
  t,
1452
1635
  m,
1453
- a
1636
+ c
1454
1637
  )) == null ? void 0 : o.toCanonicalString()
1455
1638
  }
1456
1639
  };
1457
1640
  }
1458
- let u;
1641
+ let p;
1459
1642
  if (e.components.secondaryGrouping.selectorStates.length) {
1460
1643
  const { selectedSource: m } = e.components.secondaryGrouping.selectorStates[0];
1461
- u = {
1644
+ p = {
1462
1645
  columnName: {
1463
1646
  type: "column",
1464
1647
  value: m,
1465
- label: await F(t, m, a),
1466
- valueLabels: (n = await E(
1648
+ label: await T(t, m, c),
1649
+ valueLabels: (n = await k(
1467
1650
  t,
1468
1651
  m,
1469
- a
1652
+ c
1470
1653
  )) == null ? void 0 : n.toCanonicalString()
1471
1654
  }
1472
1655
  };
1473
1656
  }
1474
- const p = await Promise.all(e.components.facetBy.selectorStates.map(async (m) => {
1475
- var d, w;
1657
+ const u = await Promise.all(e.components.facetBy.selectorStates.map(async (m) => {
1658
+ var d, h;
1476
1659
  return {
1477
1660
  type: "column",
1478
- value: (w = (d = await E(t, m.selectedSource, a)) == null ? void 0 : d.toCanonicalString()) != null ? w : m.selectedSource,
1479
- label: await F(t, m.selectedSource, a)
1661
+ value: (h = (d = await k(t, m.selectedSource, c)) == null ? void 0 : d.toCanonicalString()) != null ? h : m.selectedSource,
1662
+ label: await T(t, m.selectedSource, c)
1480
1663
  };
1481
1664
  }));
1482
1665
  return {
1483
1666
  type: "discrete",
1484
- y: c,
1485
- primaryGrouping: r,
1486
- secondaryGrouping: u,
1487
- facetBy: p
1667
+ y: r,
1668
+ primaryGrouping: i,
1669
+ secondaryGrouping: p,
1670
+ facetBy: u
1488
1671
  };
1489
1672
  }
1490
- }, Ye = {
1673
+ }, ot = {
1491
1674
  type: "heatmap",
1492
1675
  components: {
1493
1676
  value: { type: "simple", selectorStates: [] },
@@ -1507,24 +1690,24 @@ var je = class extends R {
1507
1690
  function pe(t) {
1508
1691
  return t ? "kind" in t && t.kind === "PColumn" ? t.valueType === "String" : t.type === "String" : !0;
1509
1692
  }
1510
- function ae(t, e) {
1693
+ function re(t, e) {
1511
1694
  if (!e.length)
1512
1695
  return [];
1513
- const o = e.map((s) => C(s)), n = Object.values(t.columnsData)[0].length, l = [];
1696
+ const o = e.map((s) => A(s)), n = Object.values(t.columnsData)[0].length, l = [];
1514
1697
  for (let s = 0; s < n; s++) {
1515
- const c = o.map((a) => {
1516
- const r = a.toCanonicalString();
1517
- return B(a) ? t.columnsData[r][s] : t.axesData[r][s];
1698
+ const r = o.map((c) => {
1699
+ const i = c.toCanonicalString();
1700
+ return B(c) ? t.columnsData[i][s] : t.axesData[i][s];
1518
1701
  }).join(", ");
1519
- l.push(c);
1702
+ l.push(r);
1520
1703
  }
1521
1704
  return l;
1522
1705
  }
1523
- var Ke = class extends R {
1706
+ var st = class extends Q {
1524
1707
  constructor() {
1525
1708
  super(
1526
1709
  {
1527
- value: new D({
1710
+ value: new I({
1528
1711
  componentName: "value",
1529
1712
  allowedTypes: ["Int", "Long", "Double", "Float", "String"],
1530
1713
  settings: {
@@ -1534,7 +1717,7 @@ var Ke = class extends R {
1534
1717
  required: !0
1535
1718
  }
1536
1719
  }),
1537
- x: new D({
1720
+ x: new I({
1538
1721
  componentName: "x",
1539
1722
  allowedTypes: ["Int", "String", "Long"],
1540
1723
  strictlyDependsOnParents: !0,
@@ -1547,7 +1730,7 @@ var Ke = class extends R {
1547
1730
  columnsAllowed: !1
1548
1731
  }
1549
1732
  }),
1550
- xGroupBy: new D({
1733
+ xGroupBy: new I({
1551
1734
  componentName: "xGroupBy",
1552
1735
  allowedTypes: ["Int", "String", "Long"],
1553
1736
  strictlyDependsOnParents: !0,
@@ -1569,7 +1752,7 @@ var Ke = class extends R {
1569
1752
  ) : !0;
1570
1753
  }
1571
1754
  }),
1572
- y: new D({
1755
+ y: new I({
1573
1756
  componentName: "y",
1574
1757
  allowedTypes: ["Int", "String", "Long"],
1575
1758
  strictlyDependsOnParents: !0,
@@ -1582,7 +1765,7 @@ var Ke = class extends R {
1582
1765
  columnsAllowed: !0
1583
1766
  }
1584
1767
  }),
1585
- yGroupBy: new D({
1768
+ yGroupBy: new I({
1586
1769
  componentName: "yGroupBy",
1587
1770
  allowedTypes: ["Int", "String", "Long"],
1588
1771
  strictlyDependsOnParents: !0,
@@ -1604,7 +1787,7 @@ var Ke = class extends R {
1604
1787
  ) : !0;
1605
1788
  }
1606
1789
  }),
1607
- tooltipContent: new D({
1790
+ tooltipContent: new I({
1608
1791
  componentName: "tooltipContent",
1609
1792
  allowedTypes: ["String", "Int", "Long", "Float", "Double"],
1610
1793
  strictlyDependsOnParents: !0,
@@ -1616,7 +1799,7 @@ var Ke = class extends R {
1616
1799
  multipleSelectors: !0
1617
1800
  }
1618
1801
  }),
1619
- facetBy: new D({
1802
+ facetBy: new I({
1620
1803
  componentName: "facetBy",
1621
1804
  allowedTypes: ["String", "Int", "Long"],
1622
1805
  strictlyDependsOnParents: !0,
@@ -1628,7 +1811,7 @@ var Ke = class extends R {
1628
1811
  multipleSelectors: !0
1629
1812
  }
1630
1813
  }),
1631
- annotationsX: new D({
1814
+ annotationsX: new I({
1632
1815
  componentName: "annotationsX",
1633
1816
  allowedTypes: ["Int", "Long", "Double", "Float", "String"],
1634
1817
  parentComponents: ["value"],
@@ -1647,7 +1830,7 @@ var Ke = class extends R {
1647
1830
  ) : o.has(_.fromAxisSpec(t).toCanonicalString());
1648
1831
  }
1649
1832
  }),
1650
- annotationsY: new D({
1833
+ annotationsY: new I({
1651
1834
  componentName: "annotationsY",
1652
1835
  allowedTypes: ["Int", "Long", "Double", "Float", "String"],
1653
1836
  parentComponents: ["value"],
@@ -1668,7 +1851,7 @@ var Ke = class extends R {
1668
1851
  })
1669
1852
  },
1670
1853
  {
1671
- filters: new D({
1854
+ filters: new I({
1672
1855
  componentName: "filters",
1673
1856
  allowedTypes: ["String", "Int", "Long", "Double", "Long"],
1674
1857
  strictlyDependsOnParents: !0,
@@ -1680,9 +1863,9 @@ var Ke = class extends R {
1680
1863
  dimensionConsumer: !0,
1681
1864
  multipleSelectors: !0
1682
1865
  },
1683
- checkSourceBySpec: H
1866
+ checkSourceBySpec: R
1684
1867
  }),
1685
- tabBy: new D({
1868
+ tabBy: new I({
1686
1869
  componentName: "tabBy",
1687
1870
  allowedTypes: ["String", "Int"],
1688
1871
  strictlyDependsOnParents: !0,
@@ -1700,7 +1883,7 @@ var Ke = class extends R {
1700
1883
  async getMustBeConsumedAxes(t, e) {
1701
1884
  if (!e.components.value.selectorStates.length)
1702
1885
  return /* @__PURE__ */ new Set();
1703
- const o = e.components.value.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(C(o));
1886
+ const o = e.components.value.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(A(o));
1704
1887
  return n ? new Set(n.axesSpec.map((l) => _.fromAxisSpec(l).toCanonicalString())) : /* @__PURE__ */ new Set();
1705
1888
  }
1706
1889
  async createDataByColumns(t, e) {
@@ -1708,17 +1891,17 @@ var Ke = class extends R {
1708
1891
  const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
1709
1892
  if (!l)
1710
1893
  throw Error("Value column is not valid");
1711
- const s = C(l);
1894
+ const s = A(l);
1712
1895
  if (!B(s))
1713
1896
  throw Error("Value column is not valid");
1714
- const c = {
1897
+ const r = {
1715
1898
  type: "columns",
1716
- id: (n = j(e.components)) != null ? n : "",
1899
+ id: (n = z(e.components)) != null ? n : "",
1717
1900
  values: {}
1718
- }, a = await W(t), r = [
1901
+ }, { linkerColumnsMap: c, compositeLinkerMap: i } = await X(t), p = [
1719
1902
  ...e.components.filters.selectorStates,
1720
1903
  ...e.components.tabBy.selectorStates
1721
- ], u = U(r), p = r.map((L) => C(L.selectedSource)).filter(B), m = [l], d = await X(t, m), w = [
1904
+ ], u = Y(p), m = p.map((L) => A(L.selectedSource)).filter(B), d = [l], h = await $(t, d), g = [
1722
1905
  e.components.facetBy,
1723
1906
  e.components.annotationsX,
1724
1907
  e.components.annotationsY,
@@ -1727,185 +1910,187 @@ var Ke = class extends R {
1727
1910
  e.components.xGroupBy,
1728
1911
  e.components.yGroupBy,
1729
1912
  e.components.tooltipContent
1730
- ], h = [], A = [[]], v = [], x = [];
1731
- for (const { selectedSource: L, fixedAxes: O } of r)
1732
- x.push(...await M(
1913
+ ], x = [], w = [[]], D = [], b = [];
1914
+ for (const { selectedSource: L, fixedAxes: E } of p)
1915
+ b.push(...await V(
1733
1916
  t,
1734
- a,
1735
- d,
1917
+ c,
1918
+ i,
1919
+ h,
1736
1920
  L,
1737
- O
1738
- )), A.push(
1739
- (O ?? []).map(({ axisIdx: T, axisValue: k }) => ({ idx: T, value: k }))
1921
+ E
1922
+ )), w.push(
1923
+ (E ?? []).map(({ axisIdx: F, axisValue: G }) => ({ idx: F, value: G }))
1740
1924
  );
1741
- for (const L of w)
1742
- for (const { selectedSource: O, fixedAxes: T } of L.selectorStates) {
1743
- h.push(C(O)), v.push(
1744
- (T ?? []).map(({ axisIdx: q, axisValue: G }) => ({ idx: q, value: G }))
1745
- ), x.push(...await M(
1925
+ for (const L of g)
1926
+ for (const { selectedSource: E, fixedAxes: F } of L.selectorStates) {
1927
+ x.push(A(E)), D.push(
1928
+ (F ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
1929
+ ), b.push(...await V(
1746
1930
  t,
1747
- a,
1748
- d,
1749
- O,
1750
- T
1931
+ c,
1932
+ i,
1933
+ h,
1934
+ E,
1935
+ F
1751
1936
  ));
1752
- const k = await E(t, O, m);
1753
- k && h.push(k);
1937
+ const G = await k(t, E, d);
1938
+ G && x.push(G);
1754
1939
  }
1755
- const b = await t.pFrameProvider.getTableOuterJoin(
1756
- [s, ...x, ...p],
1757
- h,
1940
+ const C = await t.pFrameProvider.getTableOuterJoin(
1941
+ [s, ...b, ...m],
1942
+ x,
1758
1943
  u,
1759
1944
  !0,
1760
- A,
1761
- v
1945
+ w,
1946
+ D
1762
1947
  );
1763
- h.forEach((L) => {
1764
- const O = L.toCanonicalString();
1765
- c.values[O] = B(L) ? b.columnsData[O] : b.axesData[O];
1766
- }), c.values[s.toCanonicalString()] = b.columnsData[s.toCanonicalString()];
1767
- const g = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map((L) => L.selectedSource), i = g.join(", ");
1768
- c.values[i] = ae(b, g);
1769
- const f = e.components.x.selectorStates.map((L) => L.selectedSource), y = await Promise.all(
1770
- f.map(
1948
+ x.forEach((L) => {
1949
+ const E = L.toCanonicalString();
1950
+ r.values[E] = B(L) ? C.columnsData[E] : C.axesData[E];
1951
+ }), r.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()];
1952
+ const a = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map((L) => L.selectedSource), S = a.join(", ");
1953
+ r.values[S] = re(C, a);
1954
+ const y = e.components.x.selectorStates.map((L) => L.selectedSource), f = await Promise.all(
1955
+ y.map(
1771
1956
  async (L) => {
1772
- var O, T;
1773
- return (T = (O = await E(t, L, m)) == null ? void 0 : O.toCanonicalString()) != null ? T : L;
1957
+ var E, F;
1958
+ return (F = (E = await k(t, L, d)) == null ? void 0 : E.toCanonicalString()) != null ? F : L;
1774
1959
  }
1775
1960
  )
1776
1961
  );
1777
- c.values.xLabelsKey = ae(b, y);
1778
- const S = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map((L) => L.selectedSource), I = S.join(", ");
1779
- c.values[I] = ae(b, S);
1780
- const P = e.components.y.selectorStates.map((L) => L.selectedSource), N = await Promise.all(
1781
- P.map(
1962
+ r.values.xLabelsKey = re(C, f);
1963
+ const v = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map((L) => L.selectedSource), P = v.join(", ");
1964
+ r.values[P] = re(C, v);
1965
+ const O = e.components.y.selectorStates.map((L) => L.selectedSource), N = await Promise.all(
1966
+ O.map(
1782
1967
  async (L) => {
1783
- var O, T;
1784
- return (T = (O = await E(t, L, m)) == null ? void 0 : O.toCanonicalString()) != null ? T : L;
1968
+ var E, F;
1969
+ return (F = (E = await k(t, L, d)) == null ? void 0 : E.toCanonicalString()) != null ? F : L;
1785
1970
  }
1786
1971
  )
1787
1972
  );
1788
- return c.values.yLabelsKey = ae(b, N), { byColumns: c };
1973
+ return r.values.yLabelsKey = re(C, N), { byColumns: r };
1789
1974
  }
1790
1975
  async createChartSettings(t, e) {
1791
1976
  var o;
1792
1977
  const n = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
1793
1978
  if (!n)
1794
1979
  throw Error("Value column is not valid");
1795
- const l = C(n);
1980
+ const l = A(n);
1796
1981
  if (!B(l))
1797
1982
  throw Error("Value column is not valid");
1798
- const s = [n], c = {
1983
+ const s = [n], r = {
1799
1984
  type: "column",
1800
1985
  value: n,
1801
- label: await F(t, n, [])
1802
- }, r = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map(({ selectedSource: i }) => C(i)).map((i) => i.toCanonicalString()).join(", "), p = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map(({ selectedSource: i }) => C(i)).map((i) => i.toCanonicalString()).join(", "), m = await Promise.all(
1803
- e.components.facetBy.selectorStates.map(async (i) => {
1804
- var f, y;
1986
+ label: await T(t, n, [])
1987
+ }, i = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map(({ selectedSource: a }) => A(a)).map((a) => a.toCanonicalString()).join(", "), u = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map(({ selectedSource: a }) => A(a)).map((a) => a.toCanonicalString()).join(", "), m = await Promise.all(
1988
+ e.components.facetBy.selectorStates.map(async (a) => {
1989
+ var S, y;
1805
1990
  return {
1806
1991
  type: "column",
1807
- value: (y = (f = await E(t, i.selectedSource, s)) == null ? void 0 : f.toCanonicalString()) != null ? y : i.selectedSource
1992
+ value: (y = (S = await k(t, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
1808
1993
  };
1809
1994
  })
1810
1995
  ), d = await Promise.all(
1811
- e.components.xGroupBy.selectorStates.map(async (i) => {
1812
- var f, y;
1996
+ e.components.xGroupBy.selectorStates.map(async (a) => {
1997
+ var S, y;
1813
1998
  return {
1814
1999
  type: "column",
1815
- label: await F(t, i.selectedSource, s),
1816
- value: i.selectedSource,
1817
- valueLabels: (y = (f = await E(t, i.selectedSource, s)) == null ? void 0 : f.toCanonicalString()) != null ? y : i.selectedSource
2000
+ label: await T(t, a.selectedSource, s),
2001
+ value: a.selectedSource,
2002
+ valueLabels: (y = (S = await k(t, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
1818
2003
  };
1819
2004
  })
1820
- ), w = await Promise.all(
1821
- e.components.yGroupBy.selectorStates.map(async (i) => {
1822
- var f, y;
2005
+ ), h = await Promise.all(
2006
+ e.components.yGroupBy.selectorStates.map(async (a) => {
2007
+ var S, y;
1823
2008
  return {
1824
2009
  type: "column",
1825
- label: await F(t, i.selectedSource, s),
1826
- value: i.selectedSource,
1827
- valueLabels: (y = (f = await E(t, i.selectedSource, s)) == null ? void 0 : f.toCanonicalString()) != null ? y : i.selectedSource
2010
+ label: await T(t, a.selectedSource, s),
2011
+ value: a.selectedSource,
2012
+ valueLabels: (y = (S = await k(t, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
1828
2013
  };
1829
2014
  })
1830
- ), h = await t.pFrameProvider.getColumnSpecById(l), A = await Promise.all(
1831
- e.components.annotationsX.selectorStates.map(async (i) => {
1832
- var f, y;
1833
- const S = i.selectedSource, I = C(S), P = B(I) ? await t.pFrameProvider.getColumnSpecById(I) : (y = (f = h == null ? void 0 : h.axesSpec) == null ? void 0 : f.find(
1834
- (N) => _.fromAxisSpec(N).toCanonicalString() === S
2015
+ ), g = await t.pFrameProvider.getColumnSpecById(l), x = await Promise.all(
2016
+ e.components.annotationsX.selectorStates.map(async (a) => {
2017
+ var S, y;
2018
+ const f = a.selectedSource, v = A(f), P = B(v) ? await t.pFrameProvider.getColumnSpecById(v) : (y = (S = g == null ? void 0 : g.axesSpec) == null ? void 0 : S.find(
2019
+ (O) => _.fromAxisSpec(O).toCanonicalString() === f
1835
2020
  )) != null ? y : null;
1836
2021
  return {
1837
2022
  axis: "x",
1838
2023
  valueColumn: {
1839
2024
  type: "column",
1840
- value: S,
1841
- label: await F(t, S, s)
2025
+ value: f,
2026
+ label: await T(t, f, s)
1842
2027
  },
1843
2028
  type: pe(P) ? "discrete" : "continuous"
1844
2029
  };
1845
2030
  })
1846
- ), v = await Promise.all(
1847
- e.components.annotationsY.selectorStates.map(async (i) => {
1848
- var f, y;
1849
- const S = i.selectedSource, I = C(S), P = B(I) ? await t.pFrameProvider.getColumnSpecById(I) : (y = (f = h == null ? void 0 : h.axesSpec) == null ? void 0 : f.find(
1850
- (N) => _.fromAxisSpec(N).toCanonicalString() === S
2031
+ ), w = await Promise.all(
2032
+ e.components.annotationsY.selectorStates.map(async (a) => {
2033
+ var S, y;
2034
+ const f = a.selectedSource, v = A(f), P = B(v) ? await t.pFrameProvider.getColumnSpecById(v) : (y = (S = g == null ? void 0 : g.axesSpec) == null ? void 0 : S.find(
2035
+ (O) => _.fromAxisSpec(O).toCanonicalString() === f
1851
2036
  )) != null ? y : null;
1852
2037
  return {
1853
2038
  axis: "y",
1854
2039
  valueColumn: {
1855
2040
  type: "column",
1856
- value: S,
1857
- label: await F(t, S, s)
2041
+ value: f,
2042
+ label: await T(t, f, s)
1858
2043
  },
1859
2044
  type: pe(P) ? "discrete" : "continuous"
1860
2045
  };
1861
2046
  })
1862
- ), x = (await Promise.all(
2047
+ ), D = (await Promise.all(
1863
2048
  e.components.x.selectorStates.map(
1864
- (i) => F(t, i.selectedSource, s)
2049
+ (a) => T(t, a.selectedSource, s)
1865
2050
  )
1866
2051
  )).join(", "), b = (await Promise.all(
1867
2052
  e.components.y.selectorStates.map(
1868
- (i) => F(t, i.selectedSource, s)
2053
+ (a) => T(t, a.selectedSource, s)
1869
2054
  )
1870
- )).join(", "), g = await Promise.all(
1871
- e.components.tooltipContent.selectorStates.map(async (i) => {
1872
- var f, y;
1873
- const S = i.selectedSource;
2055
+ )).join(", "), C = await Promise.all(
2056
+ e.components.tooltipContent.selectorStates.map(async (a) => {
2057
+ var S, y;
2058
+ const f = a.selectedSource;
1874
2059
  return {
1875
2060
  type: "column",
1876
- label: await F(t, S, s) || S,
1877
- value: S,
1878
- valueLabels: (y = (f = await E(t, S, s)) == null ? void 0 : f.toCanonicalString()) != null ? y : S
2061
+ label: await T(t, f, s) || f,
2062
+ value: f,
2063
+ valueLabels: (y = (S = await k(t, f, s)) == null ? void 0 : S.toCanonicalString()) != null ? y : f
1879
2064
  };
1880
2065
  })
1881
2066
  );
1882
2067
  return {
1883
2068
  type: "heatmap",
1884
- valueColumn: c,
1885
- valueType: pe(h) ? "discrete" : "continuous",
2069
+ valueColumn: r,
2070
+ valueType: pe(g) ? "discrete" : "continuous",
1886
2071
  xColumn: {
1887
2072
  type: "column",
1888
- value: r,
1889
- label: x,
2073
+ value: i,
2074
+ label: D,
1890
2075
  valueLabels: "xLabelsKey"
1891
2076
  },
1892
2077
  yColumn: {
1893
2078
  type: "column",
1894
- value: p,
2079
+ value: u,
1895
2080
  label: b,
1896
2081
  valueLabels: "yLabelsKey"
1897
2082
  },
1898
2083
  facetBy: m,
1899
2084
  xGroupBy: d,
1900
- yGroupBy: w,
1901
- annotations: [...A, ...v],
2085
+ yGroupBy: h,
2086
+ annotations: [...x, ...w],
1902
2087
  tooltips: {
1903
2088
  show: !0,
1904
- content: g
2089
+ content: C
1905
2090
  }
1906
2091
  };
1907
2092
  }
1908
- }, Xe = {
2093
+ }, lt = {
1909
2094
  type: "scatterplot",
1910
2095
  components: {
1911
2096
  x: { type: "simple", selectorStates: [] },
@@ -1921,11 +2106,11 @@ var Ke = class extends R {
1921
2106
  tooltipContent: { type: "simple", selectorStates: [] }
1922
2107
  },
1923
2108
  dividedAxes: {}
1924
- }, Re = class extends R {
2109
+ }, at = class extends Q {
1925
2110
  constructor() {
1926
2111
  super(
1927
2112
  {
1928
- x: new D({
2113
+ x: new I({
1929
2114
  componentName: "x",
1930
2115
  allowedTypes: ["Int", "Long", "Double", "Float"],
1931
2116
  parentComponents: ["y"],
@@ -1937,7 +2122,7 @@ var Ke = class extends R {
1937
2122
  columnsAllowed: !0
1938
2123
  }
1939
2124
  }),
1940
- y: new D({
2125
+ y: new I({
1941
2126
  componentName: "y",
1942
2127
  allowedTypes: ["Int", "Long", "Double", "Float"],
1943
2128
  parentComponents: ["x"],
@@ -1949,7 +2134,7 @@ var Ke = class extends R {
1949
2134
  columnsAllowed: !0
1950
2135
  }
1951
2136
  }),
1952
- facetBy: new D({
2137
+ facetBy: new I({
1953
2138
  componentName: "facetBy",
1954
2139
  allowedTypes: ["String", "Int", "Long"],
1955
2140
  strictlyDependsOnParents: !0,
@@ -1961,7 +2146,7 @@ var Ke = class extends R {
1961
2146
  multipleSelectors: !0
1962
2147
  }
1963
2148
  }),
1964
- grouping: new D({
2149
+ grouping: new I({
1965
2150
  componentName: "grouping",
1966
2151
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
1967
2152
  strictlyDependsOnParents: !0,
@@ -1972,7 +2157,7 @@ var Ke = class extends R {
1972
2157
  multipleSelectors: !0
1973
2158
  }
1974
2159
  }),
1975
- shape: new D({
2160
+ shape: new I({
1976
2161
  componentName: "shape",
1977
2162
  allowedTypes: ["String", "Int", "Long"],
1978
2163
  strictlyDependsOnParents: !0,
@@ -1982,7 +2167,7 @@ var Ke = class extends R {
1982
2167
  axesAllowed: !0
1983
2168
  }
1984
2169
  }),
1985
- size: new D({
2170
+ size: new I({
1986
2171
  componentName: "size",
1987
2172
  allowedTypes: ["Int", "Long", "Double", "Float"],
1988
2173
  strictlyDependsOnParents: !0,
@@ -1992,7 +2177,7 @@ var Ke = class extends R {
1992
2177
  axesAllowed: !0
1993
2178
  }
1994
2179
  }),
1995
- tooltipContent: new D({
2180
+ tooltipContent: new I({
1996
2181
  componentName: "tooltipContent",
1997
2182
  allowedTypes: ["String", "Int", "Long", "Float", "Double"],
1998
2183
  strictlyDependsOnParents: !0,
@@ -2004,7 +2189,7 @@ var Ke = class extends R {
2004
2189
  multipleSelectors: !0
2005
2190
  }
2006
2191
  }),
2007
- label: new D({
2192
+ label: new I({
2008
2193
  componentName: "label",
2009
2194
  allowedTypes: ["String", "Int", "Long"],
2010
2195
  strictlyDependsOnParents: !0,
@@ -2018,7 +2203,7 @@ var Ke = class extends R {
2018
2203
  })
2019
2204
  },
2020
2205
  {
2021
- filters: new D({
2206
+ filters: new I({
2022
2207
  componentName: "filters",
2023
2208
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
2024
2209
  strictlyDependsOnParents: !0,
@@ -2030,9 +2215,9 @@ var Ke = class extends R {
2030
2215
  dimensionConsumer: !0,
2031
2216
  multipleSelectors: !0
2032
2217
  },
2033
- checkSourceBySpec: H
2218
+ checkSourceBySpec: R
2034
2219
  }),
2035
- tabBy: new D({
2220
+ tabBy: new I({
2036
2221
  componentName: "tabBy",
2037
2222
  allowedTypes: ["String", "Int"],
2038
2223
  strictlyDependsOnParents: !0,
@@ -2043,7 +2228,7 @@ var Ke = class extends R {
2043
2228
  dimensionConsumer: !0
2044
2229
  }
2045
2230
  }),
2046
- highlight: new D({
2231
+ highlight: new I({
2047
2232
  componentName: "highlight",
2048
2233
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
2049
2234
  strictlyDependsOnParents: !0,
@@ -2054,7 +2239,7 @@ var Ke = class extends R {
2054
2239
  columnsAllowed: !0,
2055
2240
  multipleSelectors: !0
2056
2241
  },
2057
- checkSourceBySpec: H
2242
+ checkSourceBySpec: R
2058
2243
  })
2059
2244
  }
2060
2245
  ), this.dataInputs = ["x", "y"];
@@ -2062,39 +2247,40 @@ var Ke = class extends R {
2062
2247
  async getMustBeConsumedAxes(t, e) {
2063
2248
  if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
2064
2249
  return /* @__PURE__ */ new Set();
2065
- const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(C(o)), s = await t.pFrameProvider.getColumnSpecById(C(n));
2250
+ const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(A(o)), s = await t.pFrameProvider.getColumnSpecById(A(n));
2066
2251
  if (!l || !s)
2067
2252
  return /* @__PURE__ */ new Set();
2068
- const c = l.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), a = s.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), r = c.filter((p) => !a.some((m) => m === p)), u = a.filter((p) => !c.some((m) => m === p));
2069
- return /* @__PURE__ */ new Set([...r, ...u]);
2253
+ const r = l.axesSpec.map((u) => _.fromAxisSpec(u).toCanonicalString()), c = s.axesSpec.map((u) => _.fromAxisSpec(u).toCanonicalString()), i = r.filter((u) => !c.some((m) => m === u)), p = c.filter((u) => !r.some((m) => m === u));
2254
+ return /* @__PURE__ */ new Set([...i, ...p]);
2070
2255
  }
2071
2256
  async createDataByColumns(t, e) {
2072
2257
  var o, n, l;
2073
- const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
2074
- if (!s || !c)
2258
+ const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, r = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
2259
+ if (!s || !r)
2075
2260
  throw Error("X or Y column is not valid");
2076
- const a = C(s), r = C(c), u = {
2261
+ const c = A(s), i = A(r), p = {
2077
2262
  type: "columns",
2078
- id: (l = j(e.components)) != null ? l : "",
2263
+ id: (l = z(e.components)) != null ? l : "",
2079
2264
  values: {}
2080
- }, p = await W(t), m = [
2265
+ }, { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = [
2081
2266
  ...e.components.filters.selectorStates,
2082
2267
  ...e.components.tabBy.selectorStates
2083
- ], d = U(m), w = m.map((S) => C(S.selectedSource)).filter(B), h = [a, r].filter(B).map((S) => S.toCanonicalString());
2084
- if (h.length === 0)
2268
+ ], h = Y(d), g = d.map((v) => A(v.selectedSource)).filter(B), x = [c, i].filter(B).map((v) => v.toCanonicalString());
2269
+ if (x.length === 0)
2085
2270
  throw Error("One of X and Y should be a column");
2086
- const A = await X(t, h), v = [a, r, ...w], x = [], b = [[], []], g = [], i = [];
2087
- for (const { selectedSource: S, fixedAxes: I } of m)
2088
- i.push(...await M(
2271
+ const w = await $(t, x), D = [c, i, ...g], b = [], C = [[], []], a = [], S = [];
2272
+ for (const { selectedSource: v, fixedAxes: P } of d)
2273
+ S.push(...await V(
2089
2274
  t,
2090
- p,
2091
- A,
2092
- S,
2093
- I
2094
- )), b.push(
2095
- (I ?? []).map(({ axisIdx: P, axisValue: N }) => ({ idx: P, value: N }))
2275
+ u,
2276
+ m,
2277
+ w,
2278
+ v,
2279
+ P
2280
+ )), C.push(
2281
+ (P ?? []).map(({ axisIdx: O, axisValue: N }) => ({ idx: O, value: N }))
2096
2282
  );
2097
- const f = [
2283
+ const y = [
2098
2284
  e.components.grouping,
2099
2285
  e.components.size,
2100
2286
  e.components.shape,
@@ -2103,113 +2289,114 @@ var Ke = class extends R {
2103
2289
  e.components.label,
2104
2290
  e.components.highlight
2105
2291
  ];
2106
- for (const S of f)
2107
- for (const { selectedSource: I, fixedAxes: P } of S.selectorStates) {
2108
- x.push(C(I)), g.push(
2109
- (P ?? []).map(({ axisIdx: L, axisValue: O }) => ({ idx: L, value: O }))
2110
- ), i.push(...await M(
2292
+ for (const v of y)
2293
+ for (const { selectedSource: P, fixedAxes: O } of v.selectorStates) {
2294
+ b.push(A(P)), a.push(
2295
+ (O ?? []).map(({ axisIdx: L, axisValue: E }) => ({ idx: L, value: E }))
2296
+ ), S.push(...await V(
2111
2297
  t,
2112
- p,
2113
- A,
2114
- I,
2115
- P
2298
+ u,
2299
+ m,
2300
+ w,
2301
+ P,
2302
+ O
2116
2303
  ));
2117
- const N = await E(t, I, h);
2118
- N && x.push(N);
2304
+ const N = await k(t, P, x);
2305
+ N && b.push(N);
2119
2306
  }
2120
- const y = await t.pFrameProvider.getTableOuterJoin(
2121
- [a, r, ...i, ...w],
2122
- x,
2123
- d,
2124
- !1,
2307
+ const f = await t.pFrameProvider.getTableOuterJoin(
2308
+ [c, i, ...S, ...g],
2125
2309
  b,
2126
- g
2310
+ h,
2311
+ !1,
2312
+ C,
2313
+ a
2127
2314
  );
2128
- return [...v, ...x].forEach((S) => {
2129
- const I = S.toCanonicalString();
2130
- u.values[I] = B(S) ? y.columnsData[I] : y.axesData[I];
2131
- }), u.values.key = new Array(u.values[Object.keys(u.values)[0]].length).fill(0).map((S, I) => I), e.components.highlight.selectorStates.length && (u.values.highlight = he(e.components.highlight.selectorStates, y)), { byColumns: u };
2315
+ return [...D, ...b].forEach((v) => {
2316
+ const P = v.toCanonicalString();
2317
+ p.values[P] = B(v) ? f.columnsData[P] : f.axesData[P];
2318
+ }), p.values.key = new Array(p.values[Object.keys(p.values)[0]].length).fill(0).map((v, P) => P), e.components.highlight.selectorStates.length && (p.values.highlight = Ie(e.components.highlight.selectorStates, f)), { byColumns: p };
2132
2319
  }
2133
2320
  async createChartSettings(t, e) {
2134
2321
  var o, n, l, s;
2135
- const c = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, r = c ? C(c) : null, u = a ? C(a) : null;
2136
- if (!c || !a || !r || !u || !B(r) && !B(u))
2322
+ const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, i = r ? A(r) : null, p = c ? A(c) : null;
2323
+ if (!r || !c || !i || !p || !B(i) && !B(p))
2137
2324
  throw Error("Empty or invalid required data");
2138
- const p = [r, u].filter(B).map((i) => i.toCanonicalString()), m = {
2325
+ const u = [i, p].filter(B).map((a) => a.toCanonicalString()), m = {
2139
2326
  type: "column",
2140
- value: c,
2141
- label: await F(t, c, p)
2327
+ value: r,
2328
+ label: await T(t, r, u)
2142
2329
  }, d = {
2143
2330
  type: "column",
2144
- value: a,
2145
- label: await F(t, a, p)
2146
- }, w = {
2331
+ value: c,
2332
+ label: await T(t, c, u)
2333
+ }, h = {
2147
2334
  type: "column",
2148
2335
  value: "key"
2149
- }, h = await Promise.all(
2150
- e.components.facetBy.selectorStates.map(async (i) => {
2151
- var f, y;
2336
+ }, g = await Promise.all(
2337
+ e.components.facetBy.selectorStates.map(async (a) => {
2338
+ var S, y;
2152
2339
  return {
2153
2340
  type: "column",
2154
- value: (y = (f = await E(t, i.selectedSource, p)) == null ? void 0 : f.toCanonicalString()) != null ? y : i.selectedSource
2341
+ value: (y = (S = await k(t, a.selectedSource, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
2155
2342
  };
2156
2343
  })
2157
- ), A = ce.uniq([
2158
- ...e.components.grouping.selectorStates.map((i) => i.selectedSource),
2159
- ...e.components.size.selectorStates.map((i) => i.selectedSource),
2160
- ...e.components.shape.selectorStates.map((i) => i.selectedSource)
2161
- ]), v = await Promise.all(
2162
- A.map(async (i) => {
2163
- var f, y;
2344
+ ), x = ie.uniq([
2345
+ ...e.components.grouping.selectorStates.map((a) => a.selectedSource),
2346
+ ...e.components.size.selectorStates.map((a) => a.selectedSource),
2347
+ ...e.components.shape.selectorStates.map((a) => a.selectedSource)
2348
+ ]), w = await Promise.all(
2349
+ x.map(async (a) => {
2350
+ var S, y;
2164
2351
  return {
2165
2352
  type: "column",
2166
- label: await F(t, i, p) || i,
2167
- value: i,
2168
- valueLabels: (y = (f = await E(t, i, p)) == null ? void 0 : f.toCanonicalString()) != null ? y : i
2353
+ label: await T(t, a, u) || a,
2354
+ value: a,
2355
+ valueLabels: (y = (S = await k(t, a, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : a
2169
2356
  };
2170
2357
  })
2171
- ), x = await Promise.all(
2172
- e.components.tooltipContent.selectorStates.map(async (i) => {
2173
- var f, y;
2174
- const S = i.selectedSource;
2358
+ ), D = await Promise.all(
2359
+ e.components.tooltipContent.selectorStates.map(async (a) => {
2360
+ var S, y;
2361
+ const f = a.selectedSource;
2175
2362
  return {
2176
2363
  type: "column",
2177
- label: await F(t, S, p) || S,
2178
- value: S,
2179
- valueLabels: (y = (f = await E(t, S, p)) == null ? void 0 : f.toCanonicalString()) != null ? y : S
2364
+ label: await T(t, f, u) || f,
2365
+ value: f,
2366
+ valueLabels: (y = (S = await k(t, f, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : f
2180
2367
  };
2181
2368
  })
2182
2369
  );
2183
2370
  let b;
2184
2371
  if (e.components.label.selectorStates.length) {
2185
- const i = e.components.label.selectorStates[0].selectedSource;
2372
+ const a = e.components.label.selectorStates[0].selectedSource;
2186
2373
  b = {
2187
2374
  type: "column",
2188
- value: i,
2189
- label: await F(t, i, p),
2190
- valueLabels: (s = (l = await E(t, i, p)) == null ? void 0 : l.toCanonicalString()) != null ? s : i
2375
+ value: a,
2376
+ label: await T(t, a, u),
2377
+ valueLabels: (s = (l = await k(t, a, u)) == null ? void 0 : l.toCanonicalString()) != null ? s : a
2191
2378
  };
2192
2379
  }
2193
- let g;
2194
- return e.components.highlight.selectorStates.length && (g = {
2380
+ let C;
2381
+ return e.components.highlight.selectorStates.length && (C = {
2195
2382
  type: "column",
2196
2383
  value: "highlight"
2197
2384
  }), {
2198
2385
  type: "scatterplot",
2199
2386
  x: m,
2200
2387
  y: d,
2201
- keyColumn: w,
2202
- facetBy: h,
2203
- grouping: v,
2388
+ keyColumn: h,
2389
+ facetBy: g,
2390
+ grouping: w,
2204
2391
  label: b,
2205
- highlight: g,
2392
+ highlight: C,
2206
2393
  tooltips: {
2207
2394
  show: !0,
2208
- content: x
2395
+ content: D
2209
2396
  }
2210
2397
  };
2211
2398
  }
2212
- }, Je = {
2399
+ }, rt = {
2213
2400
  type: "scatterplot-umap",
2214
2401
  components: {
2215
2402
  x: { type: "simple", selectorStates: [] },
@@ -2224,11 +2411,11 @@ var Ke = class extends R {
2224
2411
  size: { type: "simple", selectorStates: [] }
2225
2412
  },
2226
2413
  dividedAxes: {}
2227
- }, $e = class extends R {
2414
+ }, ct = class extends Q {
2228
2415
  constructor() {
2229
2416
  super(
2230
2417
  {
2231
- x: new D({
2418
+ x: new I({
2232
2419
  componentName: "x",
2233
2420
  allowedTypes: ["Int", "Long", "Double", "Float"],
2234
2421
  parentComponents: ["y"],
@@ -2240,7 +2427,7 @@ var Ke = class extends R {
2240
2427
  columnsAllowed: !0
2241
2428
  }
2242
2429
  }),
2243
- y: new D({
2430
+ y: new I({
2244
2431
  componentName: "y",
2245
2432
  allowedTypes: ["Int", "Long", "Double", "Float"],
2246
2433
  parentComponents: ["x"],
@@ -2252,7 +2439,7 @@ var Ke = class extends R {
2252
2439
  columnsAllowed: !0
2253
2440
  }
2254
2441
  }),
2255
- facetBy: new D({
2442
+ facetBy: new I({
2256
2443
  componentName: "facetBy",
2257
2444
  allowedTypes: ["String", "Int", "Long"],
2258
2445
  strictlyDependsOnParents: !0,
@@ -2264,7 +2451,7 @@ var Ke = class extends R {
2264
2451
  multipleSelectors: !0
2265
2452
  }
2266
2453
  }),
2267
- grouping: new D({
2454
+ grouping: new I({
2268
2455
  componentName: "grouping",
2269
2456
  allowedTypes: ["String", "Int", "Long", "Float", "Double"],
2270
2457
  strictlyDependsOnParents: !0,
@@ -2275,7 +2462,7 @@ var Ke = class extends R {
2275
2462
  multipleSelectors: !0
2276
2463
  }
2277
2464
  }),
2278
- tooltipContent: new D({
2465
+ tooltipContent: new I({
2279
2466
  componentName: "tooltipContent",
2280
2467
  allowedTypes: ["String", "Int", "Long", "Float", "Double"],
2281
2468
  strictlyDependsOnParents: !0,
@@ -2287,7 +2474,7 @@ var Ke = class extends R {
2287
2474
  multipleSelectors: !0
2288
2475
  }
2289
2476
  }),
2290
- label: new D({
2477
+ label: new I({
2291
2478
  componentName: "label",
2292
2479
  allowedTypes: ["String", "Int", "Long"],
2293
2480
  strictlyDependsOnParents: !0,
@@ -2299,7 +2486,7 @@ var Ke = class extends R {
2299
2486
  multipleSelectors: !1
2300
2487
  }
2301
2488
  }),
2302
- size: new D({
2489
+ size: new I({
2303
2490
  componentName: "size",
2304
2491
  allowedTypes: ["Int", "Long", "Double", "Float"],
2305
2492
  strictlyDependsOnParents: !0,
@@ -2311,7 +2498,7 @@ var Ke = class extends R {
2311
2498
  })
2312
2499
  },
2313
2500
  {
2314
- filters: new D({
2501
+ filters: new I({
2315
2502
  componentName: "filters",
2316
2503
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
2317
2504
  strictlyDependsOnParents: !0,
@@ -2322,9 +2509,9 @@ var Ke = class extends R {
2322
2509
  dimensionConsumer: !0,
2323
2510
  multipleSelectors: !0
2324
2511
  },
2325
- checkSourceBySpec: H
2512
+ checkSourceBySpec: R
2326
2513
  }),
2327
- tabBy: new D({
2514
+ tabBy: new I({
2328
2515
  componentName: "tabBy",
2329
2516
  allowedTypes: ["String", "Int"],
2330
2517
  strictlyDependsOnParents: !0,
@@ -2335,7 +2522,7 @@ var Ke = class extends R {
2335
2522
  dimensionConsumer: !0
2336
2523
  }
2337
2524
  }),
2338
- highlight: new D({
2525
+ highlight: new I({
2339
2526
  componentName: "highlight",
2340
2527
  allowedTypes: ["String", "Int", "Long", "Double", "Float"],
2341
2528
  strictlyDependsOnParents: !0,
@@ -2346,7 +2533,7 @@ var Ke = class extends R {
2346
2533
  columnsAllowed: !0,
2347
2534
  multipleSelectors: !0
2348
2535
  },
2349
- checkSourceBySpec: H
2536
+ checkSourceBySpec: R
2350
2537
  })
2351
2538
  }
2352
2539
  ), this.dataInputs = ["x", "y"];
@@ -2354,48 +2541,43 @@ var Ke = class extends R {
2354
2541
  async getMustBeConsumedAxes(t, e) {
2355
2542
  if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
2356
2543
  return /* @__PURE__ */ new Set();
2357
- const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(C(o)), s = await t.pFrameProvider.getColumnSpecById(C(n));
2544
+ const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(A(o)), s = await t.pFrameProvider.getColumnSpecById(A(n));
2358
2545
  if (!l || !s)
2359
2546
  return /* @__PURE__ */ new Set();
2360
- const c = l.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), a = s.axesSpec.map((p) => _.fromAxisSpec(p).toCanonicalString()), r = c.filter((p) => !a.some((m) => m === p)), u = a.filter((p) => !c.some((m) => m === p));
2361
- return /* @__PURE__ */ new Set([...r, ...u]);
2547
+ const r = l.axesSpec.map((u) => _.fromAxisSpec(u).toCanonicalString()), c = s.axesSpec.map((u) => _.fromAxisSpec(u).toCanonicalString()), i = r.filter((u) => !c.some((m) => m === u)), p = c.filter((u) => !r.some((m) => m === u));
2548
+ return /* @__PURE__ */ new Set([...i, ...p]);
2362
2549
  }
2363
2550
  async createDataByColumns(t, e) {
2364
2551
  var o, n, l;
2365
- const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
2366
- if (!s || !c)
2552
+ const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, r = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
2553
+ if (!s || !r)
2367
2554
  throw Error("X or Y column is not valid");
2368
- const a = C(s), r = C(c);
2369
- if (!a || !r)
2555
+ const c = A(s), i = A(r);
2556
+ if (!c || !i)
2370
2557
  throw Error("X or Y column is not valid");
2371
- const u = {
2558
+ const p = {
2372
2559
  type: "columns",
2373
- id: (l = j(e.components)) != null ? l : "",
2560
+ id: (l = z(e.components)) != null ? l : "",
2374
2561
  values: {}
2375
- }, p = await W(t), m = [
2562
+ }, { linkerColumnsMap: u, compositeLinkerMap: m } = await X(t), d = [
2376
2563
  ...e.components.filters.selectorStates,
2377
2564
  ...e.components.tabBy.selectorStates
2378
- ], d = U(m), w = m.map((S) => C(S.selectedSource)).filter(B), h = [a, r].filter(B).map((S) => S.toCanonicalString());
2379
- if (h.length === 0)
2565
+ ], h = Y(d), g = d.map((v) => A(v.selectedSource)).filter(B), x = [c, i].filter(B).map((v) => v.toCanonicalString());
2566
+ if (x.length === 0)
2380
2567
  throw Error("One of X and Y should be a column");
2381
- const A = await X(t, h), v = [a, r, ...w], x = [], b = [[], []], g = [], i = [];
2382
- for (const { selectedSource: S, fixedAxes: I } of m)
2383
- i.push(...await M(
2384
- t,
2385
- p,
2386
- A,
2387
- S,
2388
- I
2389
- )), i.push(...await M(
2568
+ const w = await $(t, x), D = [c, i, ...g], b = [], C = [[], []], a = [], S = [];
2569
+ for (const { selectedSource: v, fixedAxes: P } of d)
2570
+ S.push(...await V(
2390
2571
  t,
2391
- p,
2392
- A,
2393
- S,
2394
- I
2395
- )), b.push(
2396
- (I ?? []).map(({ axisIdx: P, axisValue: N }) => ({ idx: P, value: N }))
2572
+ u,
2573
+ m,
2574
+ w,
2575
+ v,
2576
+ P
2577
+ )), C.push(
2578
+ (P ?? []).map(({ axisIdx: O, axisValue: N }) => ({ idx: O, value: N }))
2397
2579
  );
2398
- const f = [
2580
+ const y = [
2399
2581
  e.components.grouping,
2400
2582
  e.components.facetBy,
2401
2583
  e.components.tooltipContent,
@@ -2403,115 +2585,116 @@ var Ke = class extends R {
2403
2585
  e.components.highlight,
2404
2586
  e.components.size
2405
2587
  ];
2406
- for (const S of f)
2407
- for (const { selectedSource: I, fixedAxes: P } of S.selectorStates) {
2408
- x.push(C(I)), g.push(
2409
- (P ?? []).map(({ axisIdx: L, axisValue: O }) => ({ idx: L, value: O }))
2410
- ), i.push(...await M(
2588
+ for (const v of y)
2589
+ for (const { selectedSource: P, fixedAxes: O } of v.selectorStates) {
2590
+ b.push(A(P)), a.push(
2591
+ (O ?? []).map(({ axisIdx: L, axisValue: E }) => ({ idx: L, value: E }))
2592
+ ), S.push(...await V(
2411
2593
  t,
2412
- p,
2413
- A,
2414
- I,
2415
- P
2594
+ u,
2595
+ m,
2596
+ w,
2597
+ P,
2598
+ O
2416
2599
  ));
2417
- const N = await E(t, I, h);
2418
- N && x.push(N);
2600
+ const N = await k(t, P, x);
2601
+ N && b.push(N);
2419
2602
  }
2420
- const y = await t.pFrameProvider.getTableOuterJoin(
2421
- [a, r, ...i, ...w],
2422
- x,
2423
- d,
2424
- !1,
2603
+ const f = await t.pFrameProvider.getTableOuterJoin(
2604
+ [c, i, ...S, ...g],
2425
2605
  b,
2426
- g
2606
+ h,
2607
+ !1,
2608
+ C,
2609
+ a
2427
2610
  );
2428
- return [...v, ...x].forEach((S) => {
2429
- const I = S.toCanonicalString();
2430
- u.values[I] = B(S) ? y.columnsData[I] : y.axesData[I];
2431
- }), e.components.highlight.selectorStates.length && (u.values.highlight = he(e.components.highlight.selectorStates, y)), {
2432
- byColumns: u,
2433
- axesData: y.axesData
2611
+ return [...D, ...b].forEach((v) => {
2612
+ const P = v.toCanonicalString();
2613
+ p.values[P] = B(v) ? f.columnsData[P] : f.axesData[P];
2614
+ }), e.components.highlight.selectorStates.length && (p.values.highlight = Ie(e.components.highlight.selectorStates, f)), {
2615
+ byColumns: p,
2616
+ axesData: f.axesData
2434
2617
  };
2435
2618
  }
2436
2619
  async createChartSettings(t, e) {
2437
2620
  var o, n, l, s;
2438
- const c = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, r = c ? C(c) : null, u = a ? C(a) : null;
2439
- if (!c || !a || !r || !u || !B(r) && !B(u))
2621
+ const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, i = r ? A(r) : null, p = c ? A(c) : null;
2622
+ if (!r || !c || !i || !p || !B(i) && !B(p))
2440
2623
  throw Error("Empty or invalid required data");
2441
- const p = [r, u].filter(B).map((i) => i.toCanonicalString()), m = {
2624
+ const u = [i, p].filter(B).map((a) => a.toCanonicalString()), m = {
2442
2625
  type: "column",
2443
- value: c,
2444
- label: await F(t, c, p)
2626
+ value: r,
2627
+ label: await T(t, r, u)
2445
2628
  }, d = {
2446
2629
  type: "column",
2447
- value: a,
2448
- label: await F(t, a, p)
2449
- }, w = {
2630
+ value: c,
2631
+ label: await T(t, c, u)
2632
+ }, h = {
2450
2633
  type: "column",
2451
2634
  value: "key"
2452
- }, h = await Promise.all(
2453
- e.components.facetBy.selectorStates.map(async (i) => {
2454
- var f, y;
2635
+ }, g = await Promise.all(
2636
+ e.components.facetBy.selectorStates.map(async (a) => {
2637
+ var S, y;
2455
2638
  return {
2456
2639
  type: "column",
2457
- value: (y = (f = await E(t, i.selectedSource, p)) == null ? void 0 : f.toCanonicalString()) != null ? y : i.selectedSource
2640
+ value: (y = (S = await k(t, a.selectedSource, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : a.selectedSource
2458
2641
  };
2459
2642
  })
2460
- ), A = ce.uniq([
2461
- ...e.components.grouping.selectorStates.map((i) => i.selectedSource),
2462
- ...e.components.size.selectorStates.map((i) => i.selectedSource)
2463
- ]), v = await Promise.all(
2464
- A.map(async (i) => {
2465
- var f, y;
2643
+ ), x = ie.uniq([
2644
+ ...e.components.grouping.selectorStates.map((a) => a.selectedSource),
2645
+ ...e.components.size.selectorStates.map((a) => a.selectedSource)
2646
+ ]), w = await Promise.all(
2647
+ x.map(async (a) => {
2648
+ var S, y;
2466
2649
  return {
2467
2650
  type: "column",
2468
- label: await F(t, i, p) || i,
2469
- value: i,
2470
- valueLabels: (y = (f = await E(t, i, p)) == null ? void 0 : f.toCanonicalString()) != null ? y : i
2651
+ label: await T(t, a, u) || a,
2652
+ value: a,
2653
+ valueLabels: (y = (S = await k(t, a, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : a
2471
2654
  };
2472
2655
  })
2473
- ), x = await Promise.all(
2474
- e.components.tooltipContent.selectorStates.map(async (i) => {
2475
- var f, y;
2476
- const S = i.selectedSource;
2656
+ ), D = await Promise.all(
2657
+ e.components.tooltipContent.selectorStates.map(async (a) => {
2658
+ var S, y;
2659
+ const f = a.selectedSource;
2477
2660
  return {
2478
2661
  type: "column",
2479
- label: await F(t, S, p) || S,
2480
- value: S,
2481
- valueLabels: (y = (f = await E(t, S, p)) == null ? void 0 : f.toCanonicalString()) != null ? y : S
2662
+ label: await T(t, f, u) || f,
2663
+ value: f,
2664
+ valueLabels: (y = (S = await k(t, f, u)) == null ? void 0 : S.toCanonicalString()) != null ? y : f
2482
2665
  };
2483
2666
  })
2484
2667
  );
2485
2668
  let b;
2486
2669
  if (e.components.label.selectorStates.length) {
2487
- const i = e.components.label.selectorStates[0].selectedSource;
2670
+ const a = e.components.label.selectorStates[0].selectedSource;
2488
2671
  b = {
2489
2672
  type: "column",
2490
- value: i,
2491
- label: await F(t, i, p),
2492
- valueLabels: (s = (l = await E(t, i, p)) == null ? void 0 : l.toCanonicalString()) != null ? s : i
2673
+ value: a,
2674
+ label: await T(t, a, u),
2675
+ valueLabels: (s = (l = await k(t, a, u)) == null ? void 0 : l.toCanonicalString()) != null ? s : a
2493
2676
  };
2494
2677
  }
2495
- let g;
2496
- return e.components.highlight.selectorStates.length && (g = {
2678
+ let C;
2679
+ return e.components.highlight.selectorStates.length && (C = {
2497
2680
  type: "column",
2498
2681
  value: "highlight"
2499
2682
  }), {
2500
2683
  type: "scatterplot-umap",
2501
2684
  x: m,
2502
2685
  y: d,
2503
- keyColumn: w,
2504
- facetBy: h,
2505
- grouping: v,
2686
+ keyColumn: h,
2687
+ facetBy: g,
2688
+ grouping: w,
2506
2689
  label: b,
2507
- highlight: g,
2690
+ highlight: C,
2508
2691
  tooltips: {
2509
2692
  show: !0,
2510
- content: x
2693
+ content: D
2511
2694
  }
2512
2695
  };
2513
2696
  }
2514
- }, me = "pl7.app/dendrogram/nodeId", de = "id", Ze = {
2697
+ }, me = "pl7.app/dendrogram/nodeId", de = "id", it = {
2515
2698
  type: "dendro",
2516
2699
  components: {
2517
2700
  value: { type: "simple", selectorStates: [] },
@@ -2531,11 +2714,11 @@ var Ke = class extends R {
2531
2714
  heatmapGroup: { type: "simple", selectorStates: [] }
2532
2715
  },
2533
2716
  dividedAxes: {}
2534
- }, Qe = class extends R {
2717
+ }, ut = class extends Q {
2535
2718
  constructor() {
2536
2719
  super(
2537
2720
  {
2538
- value: new D({
2721
+ value: new I({
2539
2722
  componentName: "value",
2540
2723
  allowedTypes: ["Int", "Long"],
2541
2724
  annotations: { "pl7.app/dendrogram/isTopology": "true" },
@@ -2547,7 +2730,7 @@ var Ke = class extends R {
2547
2730
  columnsWithExtraAxesAllowed: !1
2548
2731
  }
2549
2732
  }),
2550
- height: new D({
2733
+ height: new I({
2551
2734
  componentName: "height",
2552
2735
  allowedTypes: ["Int", "Long", "Double", "Float"],
2553
2736
  annotations: { "pl7.app/dendrogram/isDistance": "true" },
@@ -2560,7 +2743,7 @@ var Ke = class extends R {
2560
2743
  columnsWithExtraAxesAllowed: !1
2561
2744
  }
2562
2745
  }),
2563
- labels: new D({
2746
+ labels: new I({
2564
2747
  componentName: "labels",
2565
2748
  allowedTypes: ["Int", "String", "Long"],
2566
2749
  parentComponents: ["value"],
@@ -2571,7 +2754,7 @@ var Ke = class extends R {
2571
2754
  columnsWithExtraAxesAllowed: !1
2572
2755
  }
2573
2756
  }),
2574
- tableContent: new D({
2757
+ tableContent: new I({
2575
2758
  componentName: "tableContent",
2576
2759
  allowedTypes: ["Int", "String", "Long", "Double", "Float"],
2577
2760
  parentComponents: ["value"],
@@ -2583,7 +2766,7 @@ var Ke = class extends R {
2583
2766
  columnsWithExtraAxesAllowed: !1
2584
2767
  }
2585
2768
  }),
2586
- nodeShape: new D({
2769
+ nodeShape: new I({
2587
2770
  componentName: "nodeShape",
2588
2771
  allowedTypes: ["Int", "String", "Long"],
2589
2772
  parentComponents: ["value"],
@@ -2594,7 +2777,7 @@ var Ke = class extends R {
2594
2777
  columnsWithExtraAxesAllowed: !1
2595
2778
  }
2596
2779
  }),
2597
- nodeSize: new D({
2780
+ nodeSize: new I({
2598
2781
  componentName: "nodeSize",
2599
2782
  allowedTypes: ["Double", "Int", "String", "Long"],
2600
2783
  parentComponents: ["value"],
@@ -2605,7 +2788,7 @@ var Ke = class extends R {
2605
2788
  columnsWithExtraAxesAllowed: !1
2606
2789
  }
2607
2790
  }),
2608
- nodeColor: new D({
2791
+ nodeColor: new I({
2609
2792
  componentName: "nodeColor",
2610
2793
  allowedTypes: ["Double", "Int", "String", "Long"],
2611
2794
  parentComponents: ["value"],
@@ -2616,7 +2799,7 @@ var Ke = class extends R {
2616
2799
  columnsWithExtraAxesAllowed: !1
2617
2800
  }
2618
2801
  }),
2619
- lineColor: new D({
2802
+ lineColor: new I({
2620
2803
  componentName: "lineColor",
2621
2804
  allowedTypes: ["Double", "Int", "String", "Long"],
2622
2805
  parentComponents: ["value"],
@@ -2627,7 +2810,7 @@ var Ke = class extends R {
2627
2810
  columnsWithExtraAxesAllowed: !1
2628
2811
  }
2629
2812
  }),
2630
- heatmapForSequence: new D({
2813
+ heatmapForSequence: new I({
2631
2814
  componentName: "heatmapForSequence",
2632
2815
  allowedTypes: ["String"],
2633
2816
  annotations: { "pl7.app/type": "sequence" },
@@ -2639,7 +2822,7 @@ var Ke = class extends R {
2639
2822
  columnsWithExtraAxesAllowed: !1
2640
2823
  }
2641
2824
  }),
2642
- heatmapAnnotation: new D({
2825
+ heatmapAnnotation: new I({
2643
2826
  componentName: "heatmapAnnotation",
2644
2827
  allowedTypes: ["Double", "Int", "Long", "Float", "String"],
2645
2828
  parentComponents: ["value"],
@@ -2651,7 +2834,7 @@ var Ke = class extends R {
2651
2834
  columnsWithExtraAxesAllowed: !1
2652
2835
  }
2653
2836
  }),
2654
- facetBy: new D({
2837
+ facetBy: new I({
2655
2838
  componentName: "facetBy",
2656
2839
  allowedTypes: ["String", "Int", "Long"],
2657
2840
  parentComponents: ["value"],
@@ -2664,7 +2847,7 @@ var Ke = class extends R {
2664
2847
  columnsWithExtraAxesAllowed: !1
2665
2848
  }
2666
2849
  }),
2667
- heatmapAxis: new D({
2850
+ heatmapAxis: new I({
2668
2851
  componentName: "heatmapAxis",
2669
2852
  allowedTypes: ["String", "Int", "Long"],
2670
2853
  parentComponents: ["heatmapAnnotation"],
@@ -2675,7 +2858,7 @@ var Ke = class extends R {
2675
2858
  columnsWithExtraAxesAllowed: !1
2676
2859
  }
2677
2860
  }),
2678
- heatmapGroup: new D({
2861
+ heatmapGroup: new I({
2679
2862
  componentName: "heatmapGroup",
2680
2863
  allowedTypes: ["String", "Int", "Long"],
2681
2864
  parentComponents: ["heatmapAnnotation"],
@@ -2689,7 +2872,7 @@ var Ke = class extends R {
2689
2872
  })
2690
2873
  },
2691
2874
  {
2692
- filters: new D({
2875
+ filters: new I({
2693
2876
  componentName: "filters",
2694
2877
  allowedTypes: ["String", "Int", "Long"],
2695
2878
  parentComponents: ["value", "heatmapAnnotation"],
@@ -2702,7 +2885,7 @@ var Ke = class extends R {
2702
2885
  columnsWithExtraAxesAllowed: !1
2703
2886
  }
2704
2887
  }),
2705
- tabBy: new D({
2888
+ tabBy: new I({
2706
2889
  componentName: "tabBy",
2707
2890
  allowedTypes: ["String", "Int", "Long"],
2708
2891
  parentComponents: ["value", "heatmapAnnotation"],
@@ -2722,16 +2905,16 @@ var Ke = class extends R {
2722
2905
  }
2723
2906
  async createTableData(t, e) {
2724
2907
  var o;
2725
- const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s = C(l);
2908
+ const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s = A(l);
2726
2909
  if (!l || !B(s))
2727
2910
  throw Error("Value column is not valid");
2728
- const c = await W(t), a = U([
2911
+ const { linkerColumnsMap: r, compositeLinkerMap: c } = await X(t), i = Y([
2729
2912
  ...e.components.filters.selectorStates,
2730
2913
  ...e.components.tabBy.selectorStates
2731
- ]), r = [
2732
- ...e.components.filters.selectorStates.map((g) => C(g.selectedSource)),
2733
- ...e.components.tabBy.selectorStates.map((g) => C(g.selectedSource))
2734
- ].filter(B), u = [l], p = await X(t, u), m = [], d = [], w = [], h = [e.components.value], A = [
2914
+ ]), p = [
2915
+ ...e.components.filters.selectorStates.map((a) => A(a.selectedSource)),
2916
+ ...e.components.tabBy.selectorStates.map((a) => A(a.selectedSource))
2917
+ ].filter(B), u = [l], m = await $(t, u), d = [], h = [], g = [], x = [e.components.value], w = [
2735
2918
  e.components.tableContent,
2736
2919
  // next components can content data mapped on tree
2737
2920
  e.components.labels,
@@ -2739,70 +2922,72 @@ var Ke = class extends R {
2739
2922
  e.components.nodeSize,
2740
2923
  e.components.nodeShape,
2741
2924
  e.components.lineColor
2742
- ], v = {};
2743
- for (const g of h)
2744
- for (const { selectedSource: i, fixedAxes: f } of g.selectorStates) {
2745
- w.push(...await M(
2925
+ ], D = {};
2926
+ for (const a of x)
2927
+ for (const { selectedSource: S, fixedAxes: y } of a.selectorStates) {
2928
+ g.push(...await V(
2746
2929
  t,
2930
+ r,
2747
2931
  c,
2748
- p,
2749
- i,
2750
- f
2932
+ m,
2933
+ S,
2934
+ y
2751
2935
  ));
2752
- const y = await E(t, i, u), S = y ?? C(i);
2753
- v[S.toCanonicalString()] = i, m.push(S);
2936
+ const f = await k(t, S, u), v = f ?? A(S);
2937
+ D[v.toCanonicalString()] = S, d.push(v);
2754
2938
  }
2755
- for (const g of A)
2756
- for (const { selectedSource: i, fixedAxes: f } of g.selectorStates) {
2757
- w.push(...await M(
2939
+ for (const a of w)
2940
+ for (const { selectedSource: S, fixedAxes: y } of a.selectorStates) {
2941
+ g.push(...await V(
2758
2942
  t,
2943
+ r,
2759
2944
  c,
2760
- p,
2761
- i,
2762
- f
2945
+ m,
2946
+ S,
2947
+ y
2763
2948
  ));
2764
- const y = await E(t, i, u), S = y ?? C(i);
2765
- v[i] = S.toCanonicalString(), d.push(S);
2949
+ const f = await k(t, S, u), v = f ?? A(S);
2950
+ D[S] = v.toCanonicalString(), h.push(v);
2766
2951
  }
2767
- const x = await t.pFrameProvider.getTableOuterJoin(
2768
- [...m, ...r, ...w],
2769
- d,
2770
- a,
2952
+ const b = await t.pFrameProvider.getTableOuterJoin(
2953
+ [...d, ...p, ...g],
2954
+ h,
2955
+ i,
2771
2956
  !1
2772
2957
  );
2773
- for (const g of [...m, ...d]) {
2774
- const i = g.toCanonicalString(), f = v[g.toCanonicalString()];
2775
- n[f] = {
2776
- data: B(g) ? x.columnsData[i] : x.axesData[i],
2777
- spec: B(g) ? x.columnSpecs[i] : x.axesSpecs[i],
2778
- label: await F(t, f, u)
2958
+ for (const a of [...d, ...h]) {
2959
+ const S = a.toCanonicalString(), y = D[a.toCanonicalString()];
2960
+ n[y] = {
2961
+ data: B(a) ? b.columnsData[S] : b.axesData[S],
2962
+ spec: B(a) ? b.columnSpecs[S] : b.axesSpecs[S],
2963
+ label: await T(t, y, u)
2779
2964
  };
2780
2965
  }
2781
- const b = Object.keys(x.axesData).find(
2782
- (g) => {
2783
- var i;
2784
- return ((i = C(g)) == null ? void 0 : i.name) === me;
2966
+ const C = Object.keys(b.axesData).find(
2967
+ (a) => {
2968
+ var S;
2969
+ return ((S = A(a)) == null ? void 0 : S.name) === me;
2785
2970
  }
2786
2971
  );
2787
- return b ? n[de] = {
2788
- data: x.axesData[b],
2972
+ return C ? n[de] = {
2973
+ data: b.axesData[C],
2789
2974
  spec: { kind: "PColumn", valueType: "Int", name: "Node id" },
2790
2975
  label: "Node id"
2791
2976
  } : console.warn("Missed node id axis in data column"), n;
2792
2977
  }
2793
2978
  async createDataByColumns(t, e) {
2794
2979
  var o, n, l;
2795
- const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.heatmapAnnotation.selectorStates[0]) == null ? void 0 : n.selectedSource, a = C(s), r = c ? C(c) : null;
2796
- if (!s || !B(a))
2980
+ const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, r = (n = e.components.heatmapAnnotation.selectorStates[0]) == null ? void 0 : n.selectedSource, c = A(s), i = r ? A(r) : null;
2981
+ if (!s || !B(c))
2797
2982
  throw Error("Value column is not valid");
2798
- const u = {
2983
+ const p = {
2799
2984
  type: "columns",
2800
- id: (l = j(e.components)) != null ? l : "",
2985
+ id: (l = z(e.components)) != null ? l : "",
2801
2986
  values: {}
2802
- }, p = [
2987
+ }, u = [
2803
2988
  ...e.components.filters.selectorStates,
2804
2989
  ...e.components.tabBy.selectorStates
2805
- ], m = U(p), d = p.map((y) => C(y.selectedSource)).filter(B), w = [a, r].filter(B).map((y) => y.toCanonicalString()), h = [], A = [], v = [], x = [], b = [
2990
+ ], m = Y(u), d = u.map((y) => A(y.selectedSource)).filter(B), h = [c, i].filter(B).map((y) => y.toCanonicalString()), g = [], x = [], w = [], D = [], b = [
2806
2991
  e.components.value,
2807
2992
  e.components.height,
2808
2993
  e.components.labels,
@@ -2812,147 +2997,147 @@ var Ke = class extends R {
2812
2997
  e.components.lineColor,
2813
2998
  e.components.heatmapAnnotation,
2814
2999
  e.components.heatmapForSequence
2815
- ], g = [
3000
+ ], C = [
2816
3001
  e.components.facetBy,
2817
3002
  e.components.heatmapAxis,
2818
3003
  e.components.heatmapGroup,
2819
3004
  e.components.tableContent
2820
3005
  ];
2821
3006
  for (const y of b)
2822
- for (const { selectedSource: S, fixedAxes: I } of y.selectorStates) {
2823
- h.push(C(S)), v.push(
2824
- (I ?? []).map(({ axisIdx: N, axisValue: L }) => ({ idx: N, value: L }))
3007
+ for (const { selectedSource: f, fixedAxes: v } of y.selectorStates) {
3008
+ g.push(A(f)), w.push(
3009
+ (v ?? []).map(({ axisIdx: O, axisValue: N }) => ({ idx: O, value: N }))
2825
3010
  );
2826
- const P = await E(t, S, w);
2827
- P && h.push(P);
3011
+ const P = await k(t, f, h);
3012
+ P && g.push(P);
2828
3013
  }
2829
- p.forEach(({ fixedAxes: y }) => {
2830
- v.push(
2831
- (y ?? []).map(({ axisIdx: S, axisValue: I }) => ({ idx: S, value: I }))
3014
+ u.forEach(({ fixedAxes: y }) => {
3015
+ w.push(
3016
+ (y ?? []).map(({ axisIdx: f, axisValue: v }) => ({ idx: f, value: v }))
2832
3017
  );
2833
3018
  });
2834
- for (const y of g)
2835
- for (const { selectedSource: S, fixedAxes: I } of y.selectorStates) {
2836
- A.push(C(S)), x.push(
2837
- (I ?? []).map(({ axisIdx: N, axisValue: L }) => ({ idx: N, value: L }))
3019
+ for (const y of C)
3020
+ for (const { selectedSource: f, fixedAxes: v } of y.selectorStates) {
3021
+ x.push(A(f)), D.push(
3022
+ (v ?? []).map(({ axisIdx: O, axisValue: N }) => ({ idx: O, value: N }))
2838
3023
  );
2839
- const P = await E(t, S, w);
2840
- P && A.push(P);
3024
+ const P = await k(t, f, h);
3025
+ P && x.push(P);
2841
3026
  }
2842
- const i = await t.pFrameProvider.getTableOuterJoin(
2843
- [...h, ...d],
2844
- A,
3027
+ const a = await t.pFrameProvider.getTableOuterJoin(
3028
+ [...g, ...d],
3029
+ x,
2845
3030
  m,
2846
3031
  !1,
2847
- v,
2848
- x
3032
+ w,
3033
+ D
2849
3034
  );
2850
- [...h, ...A].forEach((y) => {
2851
- const S = y.toCanonicalString(), I = B(y) ? i.columnsData[S] : i.axesData[S];
2852
- u.values[S] = [], u.values[S] = I;
3035
+ [...g, ...x].forEach((y) => {
3036
+ const f = y.toCanonicalString(), v = B(y) ? a.columnsData[f] : a.axesData[f];
3037
+ p.values[f] = [], p.values[f] = v;
2853
3038
  });
2854
- const f = Object.keys(i.axesData).find(
3039
+ const S = Object.keys(a.axesData).find(
2855
3040
  (y) => {
2856
- var S;
2857
- return ((S = C(y)) == null ? void 0 : S.name) === me;
3041
+ var f;
3042
+ return ((f = A(y)) == null ? void 0 : f.name) === me;
2858
3043
  }
2859
3044
  );
2860
- return f ? u.values[de] = i.axesData[f] : console.warn("Missed node id axis in data column"), { byColumns: u };
3045
+ return S ? p.values[de] = a.axesData[S] : console.warn("Missed node id axis in data column"), { byColumns: p };
2861
3046
  }
2862
3047
  async createChartSettings(t, e) {
2863
3048
  var o, n, l;
2864
- const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = C(s);
2865
- if (!s || !B(c))
3049
+ const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, r = A(s);
3050
+ if (!s || !B(r))
2866
3051
  throw Error("Data column is not valid");
2867
- const a = [s], r = { type: "column", value: de }, u = { type: "column", value: s }, p = e.components.height.selectorStates.length ? { type: "column", value: e.components.height.selectorStates[0].selectedSource } : void 0, m = e.components.labels.selectorStates.length ? { type: "column", value: e.components.labels.selectorStates[0].selectedSource } : void 0, d = {};
3052
+ const c = [s], i = { type: "column", value: de }, p = { type: "column", value: s }, u = e.components.height.selectorStates.length ? { type: "column", value: e.components.height.selectorStates[0].selectedSource } : void 0, m = e.components.labels.selectorStates.length ? { type: "column", value: e.components.labels.selectorStates[0].selectedSource } : void 0, d = {};
2868
3053
  if (e.components.nodeColor.selectorStates.length) {
2869
- const v = e.components.nodeColor.selectorStates[0].selectedSource;
3054
+ const w = e.components.nodeColor.selectorStates[0].selectedSource;
2870
3055
  d.nodeColor = {
2871
3056
  columnName: {
2872
3057
  type: "column",
2873
- value: v,
2874
- label: await F(t, v, a)
3058
+ value: w,
3059
+ label: await T(t, w, c)
2875
3060
  }
2876
3061
  };
2877
3062
  }
2878
3063
  if (e.components.nodeShape.selectorStates.length) {
2879
- const v = e.components.nodeShape.selectorStates[0].selectedSource;
3064
+ const w = e.components.nodeShape.selectorStates[0].selectedSource;
2880
3065
  d.nodeShape = {
2881
3066
  columnName: {
2882
3067
  type: "column",
2883
- value: v,
2884
- label: await F(t, v, a)
3068
+ value: w,
3069
+ label: await T(t, w, c)
2885
3070
  }
2886
3071
  };
2887
3072
  }
2888
3073
  if (e.components.nodeSize.selectorStates.length) {
2889
- const v = e.components.nodeSize.selectorStates[0].selectedSource;
3074
+ const w = e.components.nodeSize.selectorStates[0].selectedSource;
2890
3075
  d.nodeSize = {
2891
3076
  columnName: {
2892
3077
  type: "column",
2893
- value: v,
2894
- label: await F(t, v, a)
3078
+ value: w,
3079
+ label: await T(t, w, c)
2895
3080
  }
2896
3081
  };
2897
3082
  }
2898
3083
  if (e.components.lineColor.selectorStates.length) {
2899
- const v = e.components.lineColor.selectorStates[0].selectedSource;
3084
+ const w = e.components.lineColor.selectorStates[0].selectedSource;
2900
3085
  d.lineColor = {
2901
3086
  columnName: {
2902
3087
  type: "column",
2903
- value: v,
2904
- label: await F(t, v, a)
3088
+ value: w,
3089
+ label: await T(t, w, c)
2905
3090
  }
2906
3091
  };
2907
3092
  }
2908
- let w, h, A;
3093
+ let h, g, x;
2909
3094
  if (e.components.heatmapAnnotation.selectorStates.length && e.components.heatmapAxis.selectorStates.length) {
2910
- const v = e.components.heatmapAnnotation.selectorStates[0].selectedSource;
2911
- w = {
3095
+ const w = e.components.heatmapAnnotation.selectorStates[0].selectedSource;
3096
+ h = {
2912
3097
  type: "column",
2913
- value: v,
2914
- label: await F(t, v, []),
2915
- valueLabels: (n = await E(t, v, [])) == null ? void 0 : n.toCanonicalString()
3098
+ value: w,
3099
+ label: await T(t, w, []),
3100
+ valueLabels: (n = await k(t, w, [])) == null ? void 0 : n.toCanonicalString()
2916
3101
  };
2917
- const x = e.components.heatmapAxis.selectorStates[0].selectedSource;
2918
- h = {
3102
+ const D = e.components.heatmapAxis.selectorStates[0].selectedSource;
3103
+ g = {
2919
3104
  type: "column",
2920
- value: x,
2921
- label: await F(t, x, [v]),
2922
- valueLabels: (l = await E(t, x, [v])) == null ? void 0 : l.toCanonicalString()
2923
- }, A = await Promise.all(
3105
+ value: D,
3106
+ label: await T(t, D, [w]),
3107
+ valueLabels: (l = await k(t, D, [w])) == null ? void 0 : l.toCanonicalString()
3108
+ }, x = await Promise.all(
2924
3109
  e.components.heatmapGroup.selectorStates.map(async (b) => {
2925
- var g;
3110
+ var C;
2926
3111
  return {
2927
3112
  type: "column",
2928
3113
  value: b.selectedSource,
2929
- label: await F(t, b.selectedSource, [v]),
2930
- valueLabels: (g = await E(t, b.selectedSource, [v])) == null ? void 0 : g.toCanonicalString()
3114
+ label: await T(t, b.selectedSource, [w]),
3115
+ valueLabels: (C = await k(t, b.selectedSource, [w])) == null ? void 0 : C.toCanonicalString()
2931
3116
  };
2932
3117
  })
2933
3118
  );
2934
3119
  } else if (e.components.heatmapForSequence.selectorStates.length) {
2935
- const v = e.components.heatmapForSequence.selectorStates[0].selectedSource;
2936
- w = {
3120
+ const w = e.components.heatmapForSequence.selectorStates[0].selectedSource;
3121
+ h = {
2937
3122
  type: "column",
2938
- value: v,
2939
- label: await F(t, v, [])
3123
+ value: w,
3124
+ label: await T(t, w, [])
2940
3125
  };
2941
3126
  }
2942
3127
  return {
2943
3128
  type: "dendro",
2944
- id: r,
2945
- parentId: u,
2946
- height: p,
3129
+ id: i,
3130
+ parentId: p,
3131
+ height: u,
2947
3132
  labels: m,
2948
3133
  aes: d,
2949
- heatmapAnnotation: w,
2950
- heatmapAxis: h,
2951
- heatmapGroup: A
3134
+ heatmapAnnotation: h,
3135
+ heatmapAxis: g,
3136
+ heatmapGroup: x
2952
3137
  };
2953
3138
  }
2954
- }, fe = 1e6;
2955
- function re(t, e) {
3139
+ }, ge = 1e6;
3140
+ function ce(t, e) {
2956
3141
  if (t === "String")
2957
3142
  return e.data;
2958
3143
  if (typeof e.data[0] == "bigint") {
@@ -2967,8 +3152,8 @@ function re(t, e) {
2967
3152
  }
2968
3153
  return e.data;
2969
3154
  }
2970
- var z = !1;
2971
- var et = class {
3155
+ var H = !1;
3156
+ var pt = class {
2972
3157
  constructor(t, e) {
2973
3158
  this.pframeHandle = t, this.pframeDriver = e;
2974
3159
  }
@@ -2989,19 +3174,19 @@ var et = class {
2989
3174
  },
2990
3175
  filters: e,
2991
3176
  sorting: []
2992
- }), l = n.filter((c) => c.spec.type === "axis"), s = n.filter((c) => c.spec.type === "column");
3177
+ }), l = n.filter((r) => r.spec.type === "axis"), s = n.filter((r) => r.spec.type === "column");
2993
3178
  return {
2994
- axesData: l.reduce((c, a) => {
2995
- const r = _.fromAxisSpec(a.spec.spec);
2996
- return c[r.toCanonicalString()] = re(r.type, a.data), c;
3179
+ axesData: l.reduce((r, c) => {
3180
+ const i = _.fromAxisSpec(c.spec.spec);
3181
+ return r[i.toCanonicalString()] = ce(i.type, c.data), r;
2997
3182
  }, {}),
2998
- data: s.length ? re(t.type, s[0].data) : []
3183
+ data: s.length ? ce(t.type, s[0].data) : []
2999
3184
  };
3000
3185
  } catch (o) {
3001
3186
  throw console.error("PFrame: calculateTableData error"), o;
3002
3187
  }
3003
3188
  }
3004
- async getColumnUniqueValues(t, e = fe, o = []) {
3189
+ async getColumnUniqueValues(t, e = ge, o = []) {
3005
3190
  if (!await this.isColumnExisted(t))
3006
3191
  return { values: [], overflow: !1 };
3007
3192
  const n = {
@@ -3011,25 +3196,25 @@ var et = class {
3011
3196
  };
3012
3197
  try {
3013
3198
  const l = Date.now(), s = await this.pframeDriver.getUniqueValues(this.pframeHandle, n);
3014
- let c = !1;
3015
- return s.overflow && (c = !0, console.warn(`More than ${e} values for ${t.name} column`)), {
3199
+ let r = !1;
3200
+ return s.overflow && (r = !0, console.warn(`More than ${e} values for ${t.name} column`)), {
3016
3201
  values: Array.from(s.values.data).map(String),
3017
- overflow: c
3202
+ overflow: r
3018
3203
  };
3019
3204
  } catch (l) {
3020
3205
  throw console.error("PFrame: getUniqueValues for column error"), l;
3021
3206
  }
3022
3207
  }
3023
- async getAxisUniqueValues(t, e, o = fe, n = []) {
3024
- const l = e.filter(B), s = await Promise.all(l.map((r) => this.getColumnSpecById(r))), c = t.toCanonicalString(), a = l.filter((r, u) => {
3025
- const p = s[u];
3026
- return p !== null && p.axesSpec.some((m) => _.fromAxisSpec(m).toCanonicalString() === c);
3208
+ async getAxisUniqueValues(t, e, o = ge, n = []) {
3209
+ const l = e.filter(B), s = await Promise.all(l.map((i) => this.getColumnSpecById(i))), r = t.toCanonicalString(), c = l.filter((i, p) => {
3210
+ const u = s[p];
3211
+ return u !== null && u.axesSpec.some((m) => _.fromAxisSpec(m).toCanonicalString() === r);
3027
3212
  });
3028
- if (a.length === 0)
3213
+ if (c.length === 0)
3029
3214
  return { values: [], overflow: !1 };
3030
3215
  try {
3031
- const r = Date.now(), u = await Promise.all(
3032
- a.map(
3216
+ const i = Date.now(), p = await Promise.all(
3217
+ c.map(
3033
3218
  (m) => this.pframeDriver.getUniqueValues(this.pframeHandle, {
3034
3219
  columnId: m.name,
3035
3220
  axis: t.toPFrameId(),
@@ -3038,58 +3223,58 @@ var et = class {
3038
3223
  })
3039
3224
  )
3040
3225
  );
3041
- let p = !1;
3042
- return u.forEach((m, d) => {
3043
- m.overflow && (p = !0, console.warn(`More than ${o} values for ${a[d].name} column`));
3226
+ let u = !1;
3227
+ return p.forEach((m, d) => {
3228
+ m.overflow && (u = !0, console.warn(`More than ${o} values for ${c[d].name} column`));
3044
3229
  }), {
3045
- values: ce.uniq(
3046
- ce.flatten(u.map((m) => Array.from(m.values.data).map(String)))
3230
+ values: ie.uniq(
3231
+ ie.flatten(p.map((m) => Array.from(m.values.data).map(String)))
3047
3232
  ),
3048
- overflow: p
3233
+ overflow: u
3049
3234
  };
3050
- } catch (r) {
3051
- throw console.error("PFrame: getUniqueValues for axis error", r), r;
3235
+ } catch (i) {
3236
+ throw console.error("PFrame: getUniqueValues for axis error", i), i;
3052
3237
  }
3053
3238
  }
3054
3239
  async getTableOuterJoin(t, e, o = [], n = !0, l = [], s = []) {
3055
- const c = t.filter(B), a = e.filter(B), r = {
3240
+ const r = t.filter(B), c = e.filter(B), i = {
3056
3241
  src: {
3057
3242
  type: "outer",
3058
3243
  primary: {
3059
3244
  type: n ? "inner" : "full",
3060
- entries: c.map((u, p) => {
3245
+ entries: r.map((p, u) => {
3061
3246
  var m;
3062
- const d = (m = l[p]) == null ? void 0 : m.map((w) => ({
3247
+ const d = (m = l[u]) == null ? void 0 : m.map((h) => ({
3063
3248
  type: "constant",
3064
- axisIndex: w.idx,
3065
- constant: w.value
3066
- })).filter((w) => w.constant !== void 0);
3249
+ axisIndex: h.idx,
3250
+ constant: h.value
3251
+ })).filter((h) => h.constant !== void 0);
3067
3252
  return d != null && d.length ? {
3068
3253
  type: "slicedColumn",
3069
- newId: u.name,
3070
- column: u.name,
3254
+ newId: p.name,
3255
+ column: p.name,
3071
3256
  axisFilters: d
3072
3257
  } : {
3073
3258
  type: "column",
3074
- column: u.name
3259
+ column: p.name
3075
3260
  };
3076
3261
  })
3077
3262
  },
3078
- secondary: a.map((u, p) => {
3263
+ secondary: c.map((p, u) => {
3079
3264
  var m;
3080
- const d = (m = s[p]) == null ? void 0 : m.map((w) => ({
3265
+ const d = (m = s[u]) == null ? void 0 : m.map((h) => ({
3081
3266
  type: "constant",
3082
- axisIndex: w.idx,
3083
- constant: w.value
3084
- })).filter((w) => w.constant !== void 0);
3267
+ axisIndex: h.idx,
3268
+ constant: h.value
3269
+ })).filter((h) => h.constant !== void 0);
3085
3270
  return d != null && d.length ? {
3086
3271
  type: "slicedColumn",
3087
- newId: u.name,
3088
- column: u.name,
3272
+ newId: p.name,
3273
+ column: p.name,
3089
3274
  axisFilters: d
3090
3275
  } : {
3091
3276
  type: "column",
3092
- column: u.name
3277
+ column: p.name
3093
3278
  };
3094
3279
  })
3095
3280
  },
@@ -3097,33 +3282,33 @@ var et = class {
3097
3282
  sorting: []
3098
3283
  };
3099
3284
  try {
3100
- const u = Date.now(), p = await this.pframeDriver.calculateTableData(this.pframeHandle, r), m = p.filter((w) => w.spec.type === "axis"), d = p.filter((w) => w.spec.type === "column");
3285
+ const p = Date.now(), u = await this.pframeDriver.calculateTableData(this.pframeHandle, i), m = u.filter((h) => h.spec.type === "axis"), d = u.filter((h) => h.spec.type === "column");
3101
3286
  return {
3102
- axesData: m.reduce((w, h) => {
3103
- const A = _.fromAxisSpec(h.spec.spec);
3104
- return w[A.toCanonicalString()] = re(A.type, h.data), w;
3287
+ axesData: m.reduce((h, g) => {
3288
+ const x = _.fromAxisSpec(g.spec.spec);
3289
+ return h[x.toCanonicalString()] = ce(x.type, g.data), h;
3105
3290
  }, {}),
3106
- columnsData: d.reduce((w, h) => {
3107
- const A = h.spec.spec, v = new Y({
3108
- name: h.spec.id,
3109
- type: A.valueType
3291
+ columnsData: d.reduce((h, g) => {
3292
+ const x = g.spec.spec, w = new W({
3293
+ name: g.spec.id,
3294
+ type: x.valueType
3110
3295
  });
3111
- return w[v.toCanonicalString()] = re(v.type, h.data), w;
3296
+ return h[w.toCanonicalString()] = ce(w.type, g.data), h;
3112
3297
  }, {}),
3113
- columnSpecs: d.reduce((w, h) => {
3114
- const A = h.spec.spec, v = new Y({
3115
- name: h.spec.id,
3116
- type: A.valueType
3298
+ columnSpecs: d.reduce((h, g) => {
3299
+ const x = g.spec.spec, w = new W({
3300
+ name: g.spec.id,
3301
+ type: x.valueType
3117
3302
  });
3118
- return w[v.toCanonicalString()] = A, w;
3303
+ return h[w.toCanonicalString()] = x, h;
3119
3304
  }, {}),
3120
- axesSpecs: m.reduce((w, h) => {
3121
- const A = h.spec.spec, v = _.fromAxisSpec(A);
3122
- return w[v.toCanonicalString()] = A, w;
3305
+ axesSpecs: m.reduce((h, g) => {
3306
+ const x = g.spec.spec, w = _.fromAxisSpec(x);
3307
+ return h[w.toCanonicalString()] = x, h;
3123
3308
  }, {})
3124
3309
  };
3125
- } catch (u) {
3126
- throw console.error("PFrame: table outer join error"), console.info("error with request: ", r), u;
3310
+ } catch (p) {
3311
+ throw console.error("PFrame: table outer join error"), console.info("error with request: ", i), p;
3127
3312
  }
3128
3313
  }
3129
3314
  async getColumnSpecById(t) {
@@ -3144,7 +3329,7 @@ var et = class {
3144
3329
  for (const l of t)
3145
3330
  if (B(l)) {
3146
3331
  const s = (o = (e = await this.getColumnSpecById(l)) == null ? void 0 : e.axesSpec) != null ? o : [];
3147
- n.push(...s.map((c) => _.fromAxisSpec(c).toPFrameId()));
3332
+ n.push(...s.map((r) => _.fromAxisSpec(r).toPFrameId()));
3148
3333
  }
3149
3334
  return n;
3150
3335
  }
@@ -3162,17 +3347,17 @@ var et = class {
3162
3347
  compatibleWith: await this.getRequestColumnsFromSelectedSources(t),
3163
3348
  strictlyCompatible: e
3164
3349
  // should be true if we want to get meta and false if X/Y
3165
- }, c = Date.now(), a = await this.pframeDriver.findColumns(this.pframeHandle, s), r = [];
3166
- return a.hits.forEach((u) => {
3167
- r.push(u);
3168
- }), r;
3350
+ }, r = Date.now(), c = await this.pframeDriver.findColumns(this.pframeHandle, s), i = [];
3351
+ return c.hits.forEach((p) => {
3352
+ i.push(p);
3353
+ }), i;
3169
3354
  } catch (s) {
3170
3355
  throw console.error("PFrame: findColumns error"), s;
3171
3356
  }
3172
3357
  }
3173
3358
  async getColumns(t, e, o, n, l) {
3174
3359
  return (await this.getColumnsFull(t, e, o, n, l)).map(
3175
- (s) => new Y({
3360
+ (s) => new W({
3176
3361
  name: s.columnId,
3177
3362
  type: s.spec.valueType
3178
3363
  })
@@ -3189,56 +3374,56 @@ var et = class {
3189
3374
  },
3190
3375
  compatibleWith: [],
3191
3376
  strictlyCompatible: !1
3192
- }, s = Date.now(), c = await this.pframeDriver.findColumns(this.pframeHandle, l), a = [];
3193
- return c.hits.forEach(({ columnId: r, spec: u }) => {
3194
- a.push(new Y({ name: r, type: u.valueType }));
3195
- }), a.length > 1 && console.warn(`More than 1 column found for ${t}}`), a.length === 0 ? (console.warn(`No columns found for ${t}}`), null) : a[0];
3377
+ }, s = Date.now(), r = await this.pframeDriver.findColumns(this.pframeHandle, l), c = [];
3378
+ return r.hits.forEach(({ columnId: i, spec: p }) => {
3379
+ c.push(new W({ name: i, type: p.valueType }));
3380
+ }), c.length > 1 && console.warn(`More than 1 column found for ${t}}`), c.length === 0 ? (console.warn(`No columns found for ${t}}`), null) : c[0];
3196
3381
  } catch (l) {
3197
3382
  throw console.error("PFrame: findColumns error"), l;
3198
3383
  }
3199
3384
  }
3200
- }, st = class {
3385
+ }, ft = class {
3201
3386
  constructor(t, e, o = (n, l) => l ?? n) {
3202
- this.labelsModifier = o, this.pFrameProvider = new et(t, e);
3387
+ this.labelsModifier = o, this.pFrameProvider = new pt(t, e);
3203
3388
  }
3204
- }, Ie = {
3389
+ }, Pe = {
3205
3390
  controllers: {
3206
- discrete: new We(),
3207
- scatterplot: new Re(),
3208
- "scatterplot-umap": new $e(),
3209
- heatmap: new Ke(),
3210
- dendro: new Qe(),
3211
- histogram: new Ue(),
3212
- bubble: new je()
3391
+ discrete: new nt(),
3392
+ scatterplot: new at(),
3393
+ "scatterplot-umap": new ct(),
3394
+ heatmap: new st(),
3395
+ dendro: new ut(),
3396
+ histogram: new et(),
3397
+ bubble: new Qe()
3213
3398
  },
3214
3399
  initialStates: {
3215
- discrete: He,
3216
- scatterplot: Xe,
3217
- "scatterplot-umap": Je,
3218
- heatmap: Ye,
3219
- dendro: Ze,
3220
- histogram: ze,
3221
- bubble: Ve
3400
+ discrete: tt,
3401
+ scatterplot: lt,
3402
+ "scatterplot-umap": rt,
3403
+ heatmap: ot,
3404
+ dendro: it,
3405
+ histogram: Ze,
3406
+ bubble: $e
3222
3407
  }
3223
3408
  };
3224
- function lt(t) {
3225
- return Ie.controllers[t];
3409
+ function gt(t) {
3410
+ return Pe.controllers[t];
3226
3411
  }
3227
- function at(t) {
3228
- return Ie.initialStates[t];
3412
+ function ht(t) {
3413
+ return Pe.initialStates[t];
3229
3414
  }
3230
3415
  export {
3231
3416
  _ as AxisId,
3232
- je as BubbleStateController,
3233
- Y as ColumnId,
3234
- st as DemoDataStore,
3235
- Qe as DendroStateController,
3236
- We as DiscreteStateController,
3237
- Ke as HeatmapStateController,
3238
- Re as ScatterplotStateController,
3239
- C as columnOrAxisIdFromString,
3240
- lt as getControllerByType,
3241
- at as getInitialStateByType,
3417
+ Qe as BubbleStateController,
3418
+ W as ColumnId,
3419
+ ft as DemoDataStore,
3420
+ ut as DendroStateController,
3421
+ nt as DiscreteStateController,
3422
+ st as HeatmapStateController,
3423
+ at as ScatterplotStateController,
3424
+ A as columnOrAxisIdFromString,
3425
+ gt as getControllerByType,
3426
+ ht as getInitialStateByType,
3242
3427
  B as isColumnId
3243
3428
  };
3244
3429
  //# sourceMappingURL=index.js.map