@platforma-sdk/model 1.30.24 → 1.30.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +622 -608
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +2 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/util/column_collection.d.ts +3 -1
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/render/util/label.d.ts +2 -0
- package/dist/render/util/label.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/render/api.ts +2 -0
- package/src/render/util/column_collection.ts +18 -1
- package/src/render/util/label.test.ts +78 -0
- package/src/render/util/label.ts +8 -1
package/dist/index.mjs
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var Ye = (t, e, n) => e in t ? ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var F = (t, e, n) => Ye(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as ye, mapPObjectData as ve, isDataInfoEntries as Le, isDataInfo as be, dataInfoToEntries as Xe, selectorsToPredicate as Y, resolveAnchors as we, deriveNativeId as Qe, isPColumnSpec as te, isPartitionedDataInfoEntries as Ze, getAxisId as O, entriesToDataInfo as et, canonicalizeAxisId as tt, withEnrichments as Ae, AnchoredIdDeriver as xe, isPlRef as nt, mapValueInVOE as rt, ensurePColumn as it, extractAllColumns as st, mapPTableDef as ot, mapDataInfo as at, canonicalizeJson as re, matchAxisId as K, getColumnIdAndSpec as Ee, getPColumnSpecId as Pe } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
6
|
+
import De from "canonicalize";
|
|
7
|
+
import { z as U } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class lt extends Error {
|
|
10
10
|
constructor(e, n) {
|
|
11
11
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (!t.ok) throw new
|
|
14
|
+
function ut(t) {
|
|
15
|
+
if (!t.ok) throw new lt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function qt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return ut(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ?
|
|
25
|
+
function C(t) {
|
|
26
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? ne(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function X(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function zt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
37
|
+
const Yt = X("$args"), Xt = X("$it"), Qt = X("$prod"), Zt = X("$staging"), en = X("$ui");
|
|
38
|
+
function ne(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Fe(t) {
|
|
42
42
|
const e = {};
|
|
43
|
-
for (const [n, r] of Object.entries(t)) e[n] =
|
|
43
|
+
for (const [n, r] of Object.entries(t)) e[n] = C(r);
|
|
44
44
|
return {
|
|
45
45
|
type: "MakeObject",
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function tn(...t) {
|
|
50
50
|
const e = [];
|
|
51
|
-
for (const n of t) e.push(
|
|
51
|
+
for (const n of t) e.push(C(n));
|
|
52
52
|
return {
|
|
53
53
|
type: "MakeArray",
|
|
54
54
|
template: e
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ie(t, e) {
|
|
58
58
|
return {
|
|
59
59
|
type: "GetJsonField",
|
|
60
|
-
source:
|
|
61
|
-
field:
|
|
60
|
+
source: C(t),
|
|
61
|
+
field: C(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function nn(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function en(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function rn(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,54 +77,54 @@ function tn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function sn(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function on(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function an(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ln(t, e) {
|
|
99
99
|
return {
|
|
100
100
|
type: "And",
|
|
101
101
|
operand1: t,
|
|
102
102
|
operand2: e
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function un(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
109
109
|
operand2: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function cn(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
|
-
source:
|
|
116
|
-
field:
|
|
115
|
+
source: C(t),
|
|
116
|
+
field: C(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function dn() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
123
|
-
source:
|
|
123
|
+
source: C(t)
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function pn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,120 +132,120 @@ function cn(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function fn(t) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
|
-
source:
|
|
138
|
+
source: C(t)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function hn(t) {
|
|
142
142
|
return {
|
|
143
143
|
type: "GetBlobContentAsString",
|
|
144
|
-
source:
|
|
144
|
+
source: C(t)
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function gn() {
|
|
148
148
|
return function(t) {
|
|
149
149
|
return {
|
|
150
150
|
type: "GetBlobContentAsJson",
|
|
151
|
-
source:
|
|
151
|
+
source: C(t)
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function mn(t) {
|
|
156
156
|
return {
|
|
157
157
|
type: "GetDownloadedBlobContent",
|
|
158
|
-
source:
|
|
158
|
+
source: C(t)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function yn(t) {
|
|
162
162
|
return {
|
|
163
163
|
type: "GetOnDemandBlobContent",
|
|
164
|
-
source:
|
|
164
|
+
source: C(t)
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function vn(t, e) {
|
|
168
168
|
return {
|
|
169
169
|
type: "ExtractArchiveAndGetURL",
|
|
170
170
|
format: e,
|
|
171
|
-
source:
|
|
171
|
+
source: C(t)
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function bn(t) {
|
|
175
175
|
return {
|
|
176
176
|
type: "GetImportProgress",
|
|
177
|
-
source:
|
|
177
|
+
source: C(t)
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function wn(t, e) {
|
|
181
181
|
return {
|
|
182
182
|
type: "GetLastLogs",
|
|
183
|
-
source:
|
|
183
|
+
source: C(t),
|
|
184
184
|
lines: e
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function An(t, e) {
|
|
188
188
|
return {
|
|
189
189
|
type: "GetProgressLog",
|
|
190
|
-
source:
|
|
190
|
+
source: C(t),
|
|
191
191
|
patternToSearch: e
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function xn(t, e) {
|
|
195
195
|
return {
|
|
196
196
|
type: "GetProgressLogWithInfo",
|
|
197
|
-
source:
|
|
197
|
+
source: C(t),
|
|
198
198
|
patternToSearch: e
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Pn(t) {
|
|
202
202
|
return {
|
|
203
203
|
type: "GetLogHandle",
|
|
204
|
-
source:
|
|
204
|
+
source: C(t)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function ct() {
|
|
208
208
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Oe(t) {
|
|
211
211
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
212
212
|
return globalThis.getPlatforma(t);
|
|
213
213
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
214
214
|
throw new Error("Can't get platforma instance.");
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function dt() {
|
|
217
217
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function f() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
throw new Error("Not in config rendering context");
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const n =
|
|
223
|
+
function G(t, e) {
|
|
224
|
+
const n = dt();
|
|
225
225
|
if (n === void 0) return !1;
|
|
226
226
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
227
|
return n.callbackRegistry[t] = e, !0;
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
231
|
-
t in
|
|
232
|
-
for (const r of
|
|
229
|
+
const ue = /* @__PURE__ */ new Map();
|
|
230
|
+
function pt(t, e) {
|
|
231
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
|
|
232
|
+
for (const r of ue.get(t))
|
|
233
233
|
r(n);
|
|
234
|
-
},
|
|
234
|
+
}, ue.set(t, [])), ue.get(t).push(e);
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class I {
|
|
237
237
|
constructor(e, n = (r) => r) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
this.handle = e, this.postProcess = n,
|
|
238
|
+
F(this, "isResolved", !1);
|
|
239
|
+
F(this, "resolvedValue");
|
|
240
|
+
this.handle = e, this.postProcess = n, pt(e, (r) => {
|
|
241
241
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
map(e) {
|
|
245
|
-
return new
|
|
245
|
+
return new I(this.handle, (n) => e(this.postProcess(n)));
|
|
246
246
|
}
|
|
247
247
|
mapDefined(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new I(this.handle, (n) => {
|
|
249
249
|
const r = this.postProcess(n);
|
|
250
250
|
return r ? e(r) : void 0;
|
|
251
251
|
});
|
|
@@ -257,7 +257,7 @@ class _ {
|
|
|
257
257
|
function pe(t, e) {
|
|
258
258
|
return t === void 0 ? void 0 : e(t);
|
|
259
259
|
}
|
|
260
|
-
class
|
|
260
|
+
class E {
|
|
261
261
|
constructor(e, n) {
|
|
262
262
|
this.handle = e, this.resolvePath = n;
|
|
263
263
|
}
|
|
@@ -297,46 +297,46 @@ class L {
|
|
|
297
297
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
298
298
|
];
|
|
299
299
|
return pe(
|
|
300
|
-
|
|
301
|
-
(i) => new
|
|
300
|
+
f().resolveWithCommon(this.handle, e, ...n),
|
|
301
|
+
(i) => new E(i, r)
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
get resourceType() {
|
|
305
|
-
return
|
|
305
|
+
return f().getResourceType(this.handle);
|
|
306
306
|
}
|
|
307
307
|
getInputsLocked() {
|
|
308
|
-
return
|
|
308
|
+
return f().getInputsLocked(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getOutputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return f().getOutputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getIsReadyOrError() {
|
|
314
|
-
return
|
|
314
|
+
return f().getIsReadyOrError(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsFinal() {
|
|
317
|
-
return
|
|
317
|
+
return f().getIsFinal(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getError() {
|
|
320
320
|
const e = [...this.resolvePath, "error"];
|
|
321
321
|
return pe(
|
|
322
|
-
|
|
323
|
-
(n) => new
|
|
322
|
+
f().getError(this.handle),
|
|
323
|
+
(n) => new E(n, e)
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
326
|
listInputFields() {
|
|
327
|
-
return
|
|
327
|
+
return f().listInputFields(this.handle);
|
|
328
328
|
}
|
|
329
329
|
listOutputFields() {
|
|
330
|
-
return
|
|
330
|
+
return f().listOutputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listDynamicFields() {
|
|
333
|
-
return
|
|
333
|
+
return f().listDynamicFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
getKeyValueBase64(e) {
|
|
336
|
-
return
|
|
336
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueAsString(e) {
|
|
339
|
-
return
|
|
339
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsJson(e) {
|
|
342
342
|
const n = this.getKeyValueAsString(e);
|
|
@@ -344,10 +344,10 @@ class L {
|
|
|
344
344
|
return JSON.parse(n);
|
|
345
345
|
}
|
|
346
346
|
getDataBase64() {
|
|
347
|
-
return
|
|
347
|
+
return f().getDataBase64(this.handle);
|
|
348
348
|
}
|
|
349
349
|
getDataAsString() {
|
|
350
|
-
return
|
|
350
|
+
return f().getDataAsString(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsJson() {
|
|
353
353
|
const e = this.getDataAsString();
|
|
@@ -360,7 +360,7 @@ class L {
|
|
|
360
360
|
getPColumns(e = !1, n = "") {
|
|
361
361
|
const r = this.parsePObjectCollection(e, n);
|
|
362
362
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
363
|
-
if (!
|
|
363
|
+
if (!ye(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
364
364
|
return s;
|
|
365
365
|
});
|
|
366
366
|
}
|
|
@@ -368,7 +368,7 @@ class L {
|
|
|
368
368
|
*
|
|
369
369
|
*/
|
|
370
370
|
parsePObjectCollection(e = !1, n = "") {
|
|
371
|
-
const r =
|
|
371
|
+
const r = f().parsePObjectCollection(
|
|
372
372
|
this.handle,
|
|
373
373
|
e,
|
|
374
374
|
n,
|
|
@@ -378,19 +378,19 @@ class L {
|
|
|
378
378
|
const i = {};
|
|
379
379
|
for (const [s, o] of Object.entries(r)) {
|
|
380
380
|
const a = [...this.resolvePath, s];
|
|
381
|
-
i[s] =
|
|
381
|
+
i[s] = ve(o, (l) => new E(l, a));
|
|
382
382
|
}
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
385
|
getFileContentAsBase64() {
|
|
386
|
-
return new
|
|
386
|
+
return new I(f().getBlobContentAsBase64(this.handle));
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsString() {
|
|
389
|
-
return new
|
|
389
|
+
return new I(f().getBlobContentAsString(this.handle));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsJson() {
|
|
392
|
-
return new
|
|
393
|
-
|
|
392
|
+
return new I(
|
|
393
|
+
f().getBlobContentAsString(this.handle)
|
|
394
394
|
).mapDefined((e) => JSON.parse(e));
|
|
395
395
|
}
|
|
396
396
|
/**
|
|
@@ -409,7 +409,7 @@ class L {
|
|
|
409
409
|
* @returns downloaded file handle
|
|
410
410
|
*/
|
|
411
411
|
getFileHandle() {
|
|
412
|
-
return new
|
|
412
|
+
return new I(f().getDownloadedBlobContentHandle(this.handle));
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @deprecated use getFileHandle
|
|
@@ -421,7 +421,7 @@ class L {
|
|
|
421
421
|
* @returns downloaded file handle
|
|
422
422
|
*/
|
|
423
423
|
getRemoteFileHandle() {
|
|
424
|
-
return new
|
|
424
|
+
return new I(f().getOnDemandBlobContentHandle(this.handle));
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @deprecated use getRemoteFileHandle
|
|
@@ -433,22 +433,22 @@ class L {
|
|
|
433
433
|
* @returns the url to the extracted folder
|
|
434
434
|
*/
|
|
435
435
|
extractArchiveAndGetURL(e) {
|
|
436
|
-
return new
|
|
436
|
+
return new I(f().extractArchiveAndGetURL(this.handle, e));
|
|
437
437
|
}
|
|
438
438
|
getImportProgress() {
|
|
439
|
-
return new
|
|
439
|
+
return new I(f().getImportProgress(this.handle));
|
|
440
440
|
}
|
|
441
441
|
getLastLogs(e) {
|
|
442
|
-
return new
|
|
442
|
+
return new I(f().getLastLogs(this.handle, e));
|
|
443
443
|
}
|
|
444
444
|
getProgressLog(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new I(f().getProgressLog(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLogWithInfo(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new I(f().getProgressLogWithInfo(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getLogHandle() {
|
|
451
|
-
return new
|
|
451
|
+
return new I(f().getLogHandle(this.handle));
|
|
452
452
|
}
|
|
453
453
|
allFieldsResolved(e = "Input") {
|
|
454
454
|
switch (e) {
|
|
@@ -474,122 +474,122 @@ class L {
|
|
|
474
474
|
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
475
475
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
476
476
|
);
|
|
477
|
-
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u,
|
|
477
|
+
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, p]) => o(u, p));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Re = "staging", ke = "main", ft = {
|
|
481
481
|
explicitColumnsSupport: !0,
|
|
482
482
|
inlineColumnsSupport: !0,
|
|
483
483
|
activeArgs: !0
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function je(t) {
|
|
486
486
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function fe(t, e, n) {
|
|
489
489
|
if (e.has(n)) return;
|
|
490
490
|
if (e.add(n), typeof n === "object")
|
|
491
|
-
if (
|
|
491
|
+
if (je(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
492
492
|
else if (Array.isArray(n))
|
|
493
|
-
for (const i of n)
|
|
493
|
+
for (const i of n) fe(t, e, i);
|
|
494
494
|
else
|
|
495
495
|
for (const [, i] of Object.entries(n))
|
|
496
|
-
i !== n &&
|
|
496
|
+
i !== n && fe(t, e, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ht(t) {
|
|
499
499
|
const e = /* @__PURE__ */ new Set();
|
|
500
|
-
return
|
|
500
|
+
return fe(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
503
|
__proto__: null,
|
|
504
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
505
|
-
MainAccessorName:
|
|
506
|
-
StagingAccessorName:
|
|
507
|
-
getAllFutureAwaits:
|
|
508
|
-
isFutureAwait:
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
510
|
-
type:
|
|
511
|
-
importance:
|
|
512
|
-
id:
|
|
513
|
-
label:
|
|
514
|
-
}),
|
|
515
|
-
function
|
|
516
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(),
|
|
517
|
-
var
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
"spec" in
|
|
521
|
-
const
|
|
522
|
-
...
|
|
523
|
-
...
|
|
524
|
-
...
|
|
504
|
+
GlobalCfgRenderCtxFeatureFlags: ft,
|
|
505
|
+
MainAccessorName: ke,
|
|
506
|
+
StagingAccessorName: Re,
|
|
507
|
+
getAllFutureAwaits: ht,
|
|
508
|
+
isFutureAwait: je
|
|
509
|
+
}, Symbol.toStringTag, { value: "Module" })), gt = "pl7.app/label", mt = "pl7.app/trace", yt = U.object({
|
|
510
|
+
type: U.string(),
|
|
511
|
+
importance: U.number().optional(),
|
|
512
|
+
id: U.string().optional(),
|
|
513
|
+
label: U.string()
|
|
514
|
+
}), vt = U.array(yt), bt = 1e-3, wt = "__LABEL__", Ce = "__LABEL__@1";
|
|
515
|
+
function Ve(t, e, n = {}) {
|
|
516
|
+
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((g) => {
|
|
517
|
+
var S, R;
|
|
518
|
+
const m = e(g);
|
|
519
|
+
let c, y, d;
|
|
520
|
+
"spec" in m && typeof m.spec == "object" ? (c = m.spec, y = m.prefixTrace, d = m.suffixTrace) : c = m;
|
|
521
|
+
const b = (S = c.annotations) == null ? void 0 : S[gt], A = (R = c.annotations) == null ? void 0 : R[mt], v = (A ? vt.safeParse(JSON.parse(A)).data : void 0) ?? [], P = [
|
|
522
|
+
...y ?? [],
|
|
523
|
+
...v,
|
|
524
|
+
...d ?? []
|
|
525
525
|
];
|
|
526
|
-
if (
|
|
527
|
-
const
|
|
528
|
-
n.addLabelAsSuffix ?
|
|
526
|
+
if (b !== void 0) {
|
|
527
|
+
const D = { label: b, type: wt, importance: -2 };
|
|
528
|
+
n.addLabelAsSuffix ? P.push(D) : P.splice(0, 0, D);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
for (let
|
|
532
|
-
const { type:
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
530
|
+
const x = [], T = /* @__PURE__ */ new Map();
|
|
531
|
+
for (let D = P.length - 1; D >= 0; --D) {
|
|
532
|
+
const { type: M } = P[D], j = P[D].importance ?? 0, $ = (T.get(M) ?? 0) + 1;
|
|
533
|
+
T.set(M, $);
|
|
534
|
+
const k = `${M}@${$}`;
|
|
535
|
+
s.set(k, (s.get(k) ?? 0) + 1), r.set(
|
|
536
|
+
k,
|
|
537
537
|
Math.max(
|
|
538
|
-
r.get(
|
|
539
|
-
|
|
538
|
+
r.get(k) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
+
j - (P.length - D) * bt
|
|
540
540
|
)
|
|
541
|
-
),
|
|
541
|
+
), x.push({ ...P[D], fullType: k, occurrenceIndex: $ });
|
|
542
542
|
}
|
|
543
|
-
return
|
|
544
|
-
value:
|
|
545
|
-
spec:
|
|
546
|
-
label:
|
|
547
|
-
fullTrace:
|
|
543
|
+
return x.reverse(), {
|
|
544
|
+
value: g,
|
|
545
|
+
spec: c,
|
|
546
|
+
label: b,
|
|
547
|
+
fullTrace: x
|
|
548
548
|
};
|
|
549
|
-
}),
|
|
550
|
-
|
|
551
|
-
for (const [
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
const
|
|
555
|
-
for (let
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
if (
|
|
559
|
-
|
|
549
|
+
}), a = [], l = [], u = [...r];
|
|
550
|
+
u.sort(([, g], [, m]) => m - g);
|
|
551
|
+
for (const [g] of u)
|
|
552
|
+
g.endsWith("@1") || s.get(g) === t.length ? a.push(g) : l.push(g);
|
|
553
|
+
const p = (g, m = !1) => {
|
|
554
|
+
const c = [];
|
|
555
|
+
for (let y = 0; y < o.length; y++) {
|
|
556
|
+
const d = o[y], b = d.fullTrace.filter((P) => g.has(P.fullType) || i && i.has(P.type));
|
|
557
|
+
if (b.length === 0)
|
|
558
|
+
if (m)
|
|
559
|
+
c.push({
|
|
560
560
|
label: "Unlabeled",
|
|
561
|
-
value:
|
|
561
|
+
value: d.value
|
|
562
562
|
});
|
|
563
563
|
else return;
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
label:
|
|
567
|
-
value:
|
|
564
|
+
const A = b.map((P) => P.label), v = n.separator ?? " / ";
|
|
565
|
+
c.push({
|
|
566
|
+
label: A.join(v),
|
|
567
|
+
value: d.value
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return c;
|
|
571
571
|
};
|
|
572
|
-
if (
|
|
573
|
-
if (
|
|
574
|
-
return
|
|
575
|
-
}
|
|
576
|
-
let
|
|
577
|
-
for (;
|
|
578
|
-
const
|
|
579
|
-
n.includeNativeLabel &&
|
|
580
|
-
for (let
|
|
581
|
-
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
return
|
|
587
|
-
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
572
|
+
if (a.length === 0) {
|
|
573
|
+
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
574
|
+
return p(new Set(Ce), !0);
|
|
575
|
+
}
|
|
576
|
+
let h = 0, w = -1;
|
|
577
|
+
for (; h < a.length; ) {
|
|
578
|
+
const g = /* @__PURE__ */ new Set();
|
|
579
|
+
n.includeNativeLabel && g.add(Ce);
|
|
580
|
+
for (let c = 0; c < h; ++c) g.add(a[c]);
|
|
581
|
+
w >= 0 && g.add(a[w]);
|
|
582
|
+
const m = p(g);
|
|
583
|
+
if (m !== void 0 && new Set(m.map((c) => c.label)).size === t.length) return m;
|
|
584
|
+
w++, w >= a.length && (h++, w = h);
|
|
585
|
+
}
|
|
586
|
+
return p(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
587
|
+
}
|
|
588
|
+
const Q = "PColumnData/", se = Q + "ResourceMap", oe = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned", Ke = Q + "Partitioned/", ae = Ke + "JsonPartitioned", q = Ke + "BinaryPartitioned";
|
|
589
|
+
function $e(t, e, n, r = [], i) {
|
|
590
590
|
if (t === void 0) return !1;
|
|
591
591
|
switch (t.resourceType.name) {
|
|
592
|
-
case
|
|
592
|
+
case se: {
|
|
593
593
|
let s = t.getInputsLocked();
|
|
594
594
|
for (const o of t.listInputFields()) {
|
|
595
595
|
const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
|
|
@@ -597,13 +597,13 @@ function je(t, e, n, r = [], i) {
|
|
|
597
597
|
}
|
|
598
598
|
return s;
|
|
599
599
|
}
|
|
600
|
-
case
|
|
600
|
+
case oe: {
|
|
601
601
|
let s = t.getInputsLocked();
|
|
602
602
|
for (const o of t.listInputFields()) {
|
|
603
603
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
604
604
|
if (a === void 0) s = !1;
|
|
605
605
|
else {
|
|
606
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
606
|
+
const l = [...r, ...JSON.parse(o)], u = $e(
|
|
607
607
|
a,
|
|
608
608
|
e,
|
|
609
609
|
n,
|
|
@@ -619,55 +619,55 @@ function je(t, e, n, r = [], i) {
|
|
|
619
619
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Sn(t, e, n = !1) {
|
|
623
623
|
const r = [];
|
|
624
|
-
return { isComplete:
|
|
624
|
+
return { isComplete: $e(t, e, r, [], n), data: r };
|
|
625
625
|
}
|
|
626
|
-
const
|
|
626
|
+
const he = (t) => {
|
|
627
627
|
if (t.endsWith(".index"))
|
|
628
628
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
629
629
|
if (t.endsWith(".values"))
|
|
630
630
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
631
631
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
632
632
|
};
|
|
633
|
-
function
|
|
633
|
+
function At(t) {
|
|
634
634
|
if (!t) return;
|
|
635
635
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
636
636
|
let i = 0;
|
|
637
637
|
switch (e) {
|
|
638
|
-
case
|
|
638
|
+
case se:
|
|
639
639
|
i = n.keyLength;
|
|
640
640
|
break;
|
|
641
|
-
case
|
|
641
|
+
case oe:
|
|
642
642
|
i = n.partitionKeyLength + n.keyLength;
|
|
643
643
|
break;
|
|
644
|
-
case
|
|
645
|
-
case
|
|
644
|
+
case H:
|
|
645
|
+
case B:
|
|
646
646
|
i = n.partitionKeyLength;
|
|
647
647
|
break;
|
|
648
|
-
case
|
|
649
|
-
case
|
|
648
|
+
case q:
|
|
649
|
+
case ae:
|
|
650
650
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
651
651
|
break;
|
|
652
652
|
}
|
|
653
653
|
switch (e) {
|
|
654
|
-
case
|
|
655
|
-
case
|
|
656
|
-
case
|
|
654
|
+
case se:
|
|
655
|
+
case H:
|
|
656
|
+
case B:
|
|
657
657
|
for (let s of t.listInputFields()) {
|
|
658
|
-
e ===
|
|
658
|
+
e === B && (s = he(s).baseKey);
|
|
659
659
|
const o = [...JSON.parse(s)];
|
|
660
660
|
r.push(o);
|
|
661
661
|
}
|
|
662
662
|
break;
|
|
663
|
-
case
|
|
664
|
-
case
|
|
665
|
-
case
|
|
663
|
+
case oe:
|
|
664
|
+
case q:
|
|
665
|
+
case ae:
|
|
666
666
|
for (const s of t.listInputFields()) {
|
|
667
667
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
668
668
|
if (a !== void 0)
|
|
669
669
|
for (let l of a.listInputFields()) {
|
|
670
|
-
e ===
|
|
670
|
+
e === q && (l = he(l).baseKey);
|
|
671
671
|
const u = [...o, ...JSON.parse(l)];
|
|
672
672
|
r.push(u);
|
|
673
673
|
}
|
|
@@ -676,7 +676,7 @@ function vt(t) {
|
|
|
676
676
|
}
|
|
677
677
|
return { data: r, keyLength: i };
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function xt(t) {
|
|
680
680
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
681
681
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
682
682
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -695,11 +695,11 @@ function bt(t) {
|
|
|
695
695
|
}
|
|
696
696
|
return r.map((i) => Array.from(i.values()));
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Pt(t) {
|
|
699
699
|
if (t === void 0) return;
|
|
700
|
-
if (
|
|
701
|
-
return
|
|
702
|
-
const e =
|
|
700
|
+
if (Le(t))
|
|
701
|
+
return xt(t);
|
|
702
|
+
const e = At(t);
|
|
703
703
|
if (!e) return;
|
|
704
704
|
const { data: n, keyLength: r } = e, i = [];
|
|
705
705
|
for (let s = 0; s < r; ++s)
|
|
@@ -712,16 +712,16 @@ function wt(t) {
|
|
|
712
712
|
}
|
|
713
713
|
return i.map((s) => Array.from(s.values()));
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function ge(t, e = []) {
|
|
716
716
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
717
717
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
718
|
-
if (e.length > 0 && (n ===
|
|
718
|
+
if (e.length > 0 && (n === ae || n === q))
|
|
719
719
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
720
720
|
switch (n) {
|
|
721
|
-
case
|
|
722
|
-
case
|
|
721
|
+
case se:
|
|
722
|
+
case oe:
|
|
723
723
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
724
|
-
case
|
|
724
|
+
case H: {
|
|
725
725
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
726
726
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
727
727
|
const i = [];
|
|
@@ -737,12 +737,12 @@ function he(t, e = []) {
|
|
|
737
737
|
parts: i
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
case
|
|
740
|
+
case B: {
|
|
741
741
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
742
742
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
743
743
|
const i = [], s = /* @__PURE__ */ new Map();
|
|
744
744
|
for (const o of t.listInputFields()) {
|
|
745
|
-
const a =
|
|
745
|
+
const a = he(o), l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
746
746
|
if (l === void 0) return;
|
|
747
747
|
let u = s.get(a.baseKey);
|
|
748
748
|
u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
|
|
@@ -764,16 +764,16 @@ function he(t, e = []) {
|
|
|
764
764
|
parts: i
|
|
765
765
|
};
|
|
766
766
|
}
|
|
767
|
-
case
|
|
767
|
+
case ae: {
|
|
768
768
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
769
769
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
770
770
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
771
771
|
for (const o of t.listInputFields()) {
|
|
772
772
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
773
773
|
if (a === void 0) return;
|
|
774
|
-
if (a.resourceType.name !==
|
|
775
|
-
throw new Error(`Expected ${
|
|
776
|
-
const l =
|
|
774
|
+
if (a.resourceType.name !== H)
|
|
775
|
+
throw new Error(`Expected ${H} inside ${n}, but got ${a.resourceType.name}`);
|
|
776
|
+
const l = ge(a, JSON.parse(o));
|
|
777
777
|
if (l === void 0) return;
|
|
778
778
|
if (l.type !== "JsonPartitioned")
|
|
779
779
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -785,16 +785,16 @@ function he(t, e = []) {
|
|
|
785
785
|
parts: s
|
|
786
786
|
};
|
|
787
787
|
}
|
|
788
|
-
case
|
|
788
|
+
case q: {
|
|
789
789
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
790
790
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
791
791
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
792
792
|
for (const o of t.listInputFields()) {
|
|
793
793
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
794
794
|
if (a === void 0) return;
|
|
795
|
-
if (a.resourceType.name !==
|
|
796
|
-
throw new Error(`Expected ${
|
|
797
|
-
const l =
|
|
795
|
+
if (a.resourceType.name !== B)
|
|
796
|
+
throw new Error(`Expected ${B} inside ${n}, but got ${a.resourceType.name}`);
|
|
797
|
+
const l = ge(a, JSON.parse(o));
|
|
798
798
|
if (l === void 0) return;
|
|
799
799
|
if (l.type !== "BinaryPartitioned")
|
|
800
800
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -810,15 +810,15 @@ function he(t, e = []) {
|
|
|
810
810
|
throw new Error(`Unknown resource type: ${n}`);
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Ct(t) {
|
|
814
814
|
if (t !== void 0) {
|
|
815
|
-
if (
|
|
816
|
-
if (
|
|
817
|
-
if (t instanceof
|
|
815
|
+
if (Le(t)) return t;
|
|
816
|
+
if (be(t)) return Xe(t);
|
|
817
|
+
if (t instanceof E) return ge(t);
|
|
818
818
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function St(t, e) {
|
|
822
822
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
823
823
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
824
824
|
const { partitionKeyLength: s } = t;
|
|
@@ -878,39 +878,39 @@ function xt(t, e) {
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
class
|
|
881
|
+
class _t {
|
|
882
882
|
constructor(e) {
|
|
883
883
|
this.columns = e;
|
|
884
884
|
}
|
|
885
885
|
selectColumns(e) {
|
|
886
|
-
const n = typeof e == "function" ? e :
|
|
886
|
+
const n = typeof e == "function" ? e : Y(e);
|
|
887
887
|
return this.columns.filter((r) => n(r.spec));
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function It(t) {
|
|
891
891
|
if (t)
|
|
892
892
|
return t.map((e) => ({
|
|
893
|
-
type: `split:${
|
|
893
|
+
type: `split:${tt(e.axisId)}`,
|
|
894
894
|
label: e.label,
|
|
895
895
|
importance: 1e6
|
|
896
896
|
// High importance for split filters in labels
|
|
897
897
|
}));
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function Tt(t) {
|
|
900
900
|
if (t)
|
|
901
901
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Lt(t, e) {
|
|
904
904
|
if (!e || e.length === 0) return t;
|
|
905
905
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
906
|
-
return
|
|
906
|
+
return De({ id: t, axisFilters: n });
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function Se(t) {
|
|
909
909
|
if (!t || typeof t != "object") return !1;
|
|
910
910
|
const e = t, n = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
911
911
|
return !!e.domainAnchor || n || r;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Et(t) {
|
|
914
914
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
915
915
|
return [];
|
|
916
916
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -918,11 +918,11 @@ function Lt(t) {
|
|
|
918
918
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
919
919
|
return e.sort((n, r) => n - r), e;
|
|
920
920
|
}
|
|
921
|
-
class
|
|
921
|
+
class me {
|
|
922
922
|
constructor() {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
923
|
+
F(this, "defaultProviderStore", []);
|
|
924
|
+
F(this, "providers", [new _t(this.defaultProviderStore)]);
|
|
925
|
+
F(this, "axisLabelProviders", []);
|
|
926
926
|
}
|
|
927
927
|
addColumnProvider(e) {
|
|
928
928
|
return this.providers.push(e), this;
|
|
@@ -944,119 +944,133 @@ class ge {
|
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
getUniversalEntries(e, n) {
|
|
947
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1 } = n ?? {},
|
|
947
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1, exclude: a } = n ?? {}, l = {
|
|
948
948
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
949
949
|
...i ?? {}
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
950
|
+
};
|
|
951
|
+
let u = () => !1;
|
|
952
|
+
if (a) {
|
|
953
|
+
const c = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
954
|
+
if (Se(y)) {
|
|
955
|
+
if (!r)
|
|
956
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
957
|
+
return Y(we(r.anchors, y, n));
|
|
958
|
+
} else
|
|
959
|
+
return Y(y);
|
|
960
|
+
});
|
|
961
|
+
u = (y) => c.some((d) => d(y));
|
|
962
|
+
}
|
|
963
|
+
const p = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h = [], w = /* @__PURE__ */ new Set();
|
|
964
|
+
for (const c of p) {
|
|
965
|
+
const y = Se(c);
|
|
966
|
+
let d;
|
|
967
|
+
if (y) {
|
|
955
968
|
if (!r)
|
|
956
969
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
957
|
-
|
|
970
|
+
d = we(r.anchors, c, n);
|
|
958
971
|
} else
|
|
959
|
-
|
|
960
|
-
const
|
|
961
|
-
for (const
|
|
962
|
-
const
|
|
963
|
-
for (const
|
|
964
|
-
if (
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
972
|
+
d = c;
|
|
973
|
+
const b = /* @__PURE__ */ new Set(), A = [];
|
|
974
|
+
for (const x of this.providers) {
|
|
975
|
+
const T = x.selectColumns(d);
|
|
976
|
+
for (const S of T) {
|
|
977
|
+
if (u(S.spec)) continue;
|
|
978
|
+
if (b.has(S.id))
|
|
979
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${x.constructor.name}`);
|
|
980
|
+
const R = Qe(S.spec);
|
|
981
|
+
w.has(R) || (b.add(S.id), w.add(R), A.push(S));
|
|
968
982
|
}
|
|
969
983
|
}
|
|
970
|
-
if (
|
|
971
|
-
const
|
|
972
|
-
for (const
|
|
973
|
-
if (!
|
|
974
|
-
const
|
|
975
|
-
if (
|
|
976
|
-
const
|
|
977
|
-
if (!
|
|
984
|
+
if (A.length === 0) continue;
|
|
985
|
+
const v = Et(c), P = v.length > 0;
|
|
986
|
+
for (const x of A) {
|
|
987
|
+
if (!te(x.spec)) continue;
|
|
988
|
+
const T = x.spec;
|
|
989
|
+
if (P) {
|
|
990
|
+
const S = Ct(x.data);
|
|
991
|
+
if (!S) {
|
|
978
992
|
if (s) continue;
|
|
979
993
|
return;
|
|
980
994
|
}
|
|
981
|
-
if (!
|
|
982
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
983
|
-
const
|
|
984
|
-
if (
|
|
985
|
-
throw new Error(`Not enough partition keys (${
|
|
986
|
-
const
|
|
987
|
-
if (
|
|
988
|
-
if (
|
|
995
|
+
if (!Ze(S))
|
|
996
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${x.id}`);
|
|
997
|
+
const R = Pt(S), D = v[v.length - 1];
|
|
998
|
+
if (D >= S.partitionKeyLength)
|
|
999
|
+
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D}) in column ${T.name}`);
|
|
1000
|
+
const M = v.map((_) => this.findLabels(O(T.axesSpec[_]))), j = [], $ = (_, W) => {
|
|
1001
|
+
if (W >= v.length) {
|
|
1002
|
+
if (j.push([..._]), j.length > 1e4)
|
|
989
1003
|
throw new Error("Too many key combinations, aborting.");
|
|
990
1004
|
return;
|
|
991
1005
|
}
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
994
|
-
throw new Error(`Axis index ${
|
|
995
|
-
const
|
|
996
|
-
if (!
|
|
997
|
-
|
|
1006
|
+
const V = v[W];
|
|
1007
|
+
if (V >= R.length)
|
|
1008
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${x.id}`);
|
|
1009
|
+
const J = R[V];
|
|
1010
|
+
if (!J || J.length === 0) {
|
|
1011
|
+
j.length = 0;
|
|
998
1012
|
return;
|
|
999
1013
|
}
|
|
1000
|
-
for (const
|
|
1001
|
-
|
|
1014
|
+
for (const Z of J)
|
|
1015
|
+
_.push(Z), $(_, W + 1), _.pop();
|
|
1002
1016
|
};
|
|
1003
|
-
if (
|
|
1017
|
+
if ($([], 0), j.length === 0)
|
|
1004
1018
|
continue;
|
|
1005
|
-
const
|
|
1006
|
-
for (let
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
for (const
|
|
1010
|
-
const
|
|
1011
|
-
const
|
|
1012
|
-
return { axisIdx:
|
|
1019
|
+
const k = [...T.axesSpec], We = v.map((_) => _);
|
|
1020
|
+
for (let _ = v.length - 1; _ >= 0; _--)
|
|
1021
|
+
k.splice(v[_], 1);
|
|
1022
|
+
const Ge = { ...T, axesSpec: k };
|
|
1023
|
+
for (const _ of j) {
|
|
1024
|
+
const W = _.map((V, J) => {
|
|
1025
|
+
const Z = We[J], He = O(T.axesSpec[Z]), le = M[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
1026
|
+
return { axisIdx: Z, axisId: He, value: V, label: qe };
|
|
1013
1027
|
});
|
|
1014
|
-
|
|
1028
|
+
h.push({
|
|
1015
1029
|
type: "split",
|
|
1016
|
-
originalColumn:
|
|
1017
|
-
spec:
|
|
1018
|
-
adjustedSpec:
|
|
1019
|
-
dataEntries:
|
|
1020
|
-
axisFilters:
|
|
1030
|
+
originalColumn: x,
|
|
1031
|
+
spec: T,
|
|
1032
|
+
adjustedSpec: Ge,
|
|
1033
|
+
dataEntries: S,
|
|
1034
|
+
axisFilters: W
|
|
1021
1035
|
});
|
|
1022
1036
|
}
|
|
1023
1037
|
} else
|
|
1024
|
-
|
|
1038
|
+
h.push({
|
|
1025
1039
|
type: "direct",
|
|
1026
|
-
originalColumn:
|
|
1027
|
-
spec:
|
|
1028
|
-
adjustedSpec:
|
|
1040
|
+
originalColumn: x,
|
|
1041
|
+
spec: T,
|
|
1042
|
+
adjustedSpec: T
|
|
1029
1043
|
});
|
|
1030
1044
|
}
|
|
1031
1045
|
}
|
|
1032
|
-
if (
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1046
|
+
if (h.length === 0) return [];
|
|
1047
|
+
const g = Ve(
|
|
1048
|
+
h,
|
|
1035
1049
|
(c) => ({
|
|
1036
1050
|
spec: c.spec,
|
|
1037
|
-
suffixTrace: c.type === "split" ?
|
|
1051
|
+
suffixTrace: c.type === "split" ? It(c.axisFilters) : void 0
|
|
1038
1052
|
}),
|
|
1039
|
-
|
|
1040
|
-
),
|
|
1041
|
-
for (const { value: c, label:
|
|
1042
|
-
const { originalColumn:
|
|
1043
|
-
let
|
|
1044
|
-
r ?
|
|
1045
|
-
let
|
|
1046
|
-
o && (
|
|
1047
|
-
...
|
|
1053
|
+
l
|
|
1054
|
+
), m = [];
|
|
1055
|
+
for (const { value: c, label: y } of g) {
|
|
1056
|
+
const { originalColumn: d, spec: b } = c, A = c.type === "split" ? c.axisFilters : void 0, v = Tt(A);
|
|
1057
|
+
let P;
|
|
1058
|
+
r ? P = r.deriveS(b, v) : P = Lt(d.id, v);
|
|
1059
|
+
let x = { ...c.adjustedSpec };
|
|
1060
|
+
o && (x = {
|
|
1061
|
+
...x,
|
|
1048
1062
|
annotations: {
|
|
1049
|
-
...
|
|
1050
|
-
"pl7.app/label":
|
|
1063
|
+
...x.annotations ?? {},
|
|
1064
|
+
"pl7.app/label": y
|
|
1051
1065
|
}
|
|
1052
|
-
}),
|
|
1053
|
-
id:
|
|
1054
|
-
spec:
|
|
1055
|
-
data: () => c.type === "split" ?
|
|
1056
|
-
label:
|
|
1066
|
+
}), m.push({
|
|
1067
|
+
id: P,
|
|
1068
|
+
spec: x,
|
|
1069
|
+
data: () => c.type === "split" ? et(St(c.dataEntries, v)) : c.originalColumn.data,
|
|
1070
|
+
label: y
|
|
1057
1071
|
});
|
|
1058
1072
|
}
|
|
1059
|
-
return
|
|
1073
|
+
return m;
|
|
1060
1074
|
}
|
|
1061
1075
|
getColumns(e, n) {
|
|
1062
1076
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1081,19 +1095,19 @@ class ge {
|
|
|
1081
1095
|
return i;
|
|
1082
1096
|
}
|
|
1083
1097
|
}
|
|
1084
|
-
function
|
|
1098
|
+
function ce(t, e) {
|
|
1085
1099
|
if (t === void 0) return e === void 0;
|
|
1086
1100
|
if (e === void 0) return !0;
|
|
1087
1101
|
for (const n in e)
|
|
1088
1102
|
if (t[n] !== e[n]) return !1;
|
|
1089
1103
|
return !0;
|
|
1090
1104
|
}
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1105
|
+
function _e(t) {
|
|
1106
|
+
return ve(t, (e) => e instanceof E ? e.handle : be(e) ? at(e, (n) => n.handle) : e);
|
|
1093
1107
|
}
|
|
1094
|
-
class
|
|
1108
|
+
class Dt {
|
|
1095
1109
|
constructor() {
|
|
1096
|
-
|
|
1110
|
+
F(this, "ctx", f());
|
|
1097
1111
|
}
|
|
1098
1112
|
/**
|
|
1099
1113
|
* @deprecated use getOptions()
|
|
@@ -1102,28 +1116,28 @@ class Tt {
|
|
|
1102
1116
|
return this.ctx.calculateOptions(e);
|
|
1103
1117
|
}
|
|
1104
1118
|
getOptions(e, n) {
|
|
1105
|
-
const r = typeof e == "function" ? e :
|
|
1119
|
+
const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1106
1120
|
let s = {}, o = !1;
|
|
1107
|
-
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ?
|
|
1108
|
-
ref:
|
|
1121
|
+
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ? Ve(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1122
|
+
ref: Ae(a, o),
|
|
1109
1123
|
label: l
|
|
1110
1124
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1111
|
-
ref:
|
|
1125
|
+
ref: Ae(a, o),
|
|
1112
1126
|
label: s(l, a)
|
|
1113
1127
|
}));
|
|
1114
1128
|
}
|
|
1115
1129
|
resolveAnchorCtx(e) {
|
|
1116
|
-
if (e instanceof
|
|
1130
|
+
if (e instanceof xe) return e;
|
|
1117
1131
|
const n = {};
|
|
1118
1132
|
for (const [r, i] of Object.entries(e))
|
|
1119
|
-
if (
|
|
1133
|
+
if (nt(i)) {
|
|
1120
1134
|
const s = this.getPColumnSpecByRef(i);
|
|
1121
1135
|
if (!s)
|
|
1122
1136
|
return;
|
|
1123
1137
|
n[r] = s;
|
|
1124
1138
|
} else
|
|
1125
1139
|
n[r] = i;
|
|
1126
|
-
return new
|
|
1140
|
+
return new xe(n);
|
|
1127
1141
|
}
|
|
1128
1142
|
/**
|
|
1129
1143
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1136,7 +1150,7 @@ class Tt {
|
|
|
1136
1150
|
getAnchoredPColumns(e, n, r) {
|
|
1137
1151
|
const i = this.resolveAnchorCtx(e);
|
|
1138
1152
|
if (i)
|
|
1139
|
-
return new
|
|
1153
|
+
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n, {
|
|
1140
1154
|
...r,
|
|
1141
1155
|
anchorCtx: i
|
|
1142
1156
|
});
|
|
@@ -1173,7 +1187,7 @@ class Tt {
|
|
|
1173
1187
|
getCanonicalOptions(e, n, r) {
|
|
1174
1188
|
const i = this.resolveAnchorCtx(e);
|
|
1175
1189
|
if (!i) return;
|
|
1176
|
-
const s = new
|
|
1190
|
+
const s = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n, {
|
|
1177
1191
|
...r,
|
|
1178
1192
|
anchorCtx: i
|
|
1179
1193
|
});
|
|
@@ -1197,7 +1211,7 @@ class Tt {
|
|
|
1197
1211
|
ref: n.ref,
|
|
1198
1212
|
obj: {
|
|
1199
1213
|
...n.obj,
|
|
1200
|
-
data: new
|
|
1214
|
+
data: new E(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1201
1215
|
}
|
|
1202
1216
|
}))
|
|
1203
1217
|
};
|
|
@@ -1216,9 +1230,9 @@ class Tt {
|
|
|
1216
1230
|
ref: n.ref,
|
|
1217
1231
|
obj: {
|
|
1218
1232
|
...n.obj,
|
|
1219
|
-
data:
|
|
1233
|
+
data: rt(
|
|
1220
1234
|
n.obj.data,
|
|
1221
|
-
(r) => new
|
|
1235
|
+
(r) => new E(r, [n.ref.blockId, n.ref.name])
|
|
1222
1236
|
)
|
|
1223
1237
|
}
|
|
1224
1238
|
}))
|
|
@@ -1245,9 +1259,9 @@ class Tt {
|
|
|
1245
1259
|
)) == null ? void 0 : r.obj;
|
|
1246
1260
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1247
1261
|
if (n)
|
|
1248
|
-
return
|
|
1262
|
+
return ve(
|
|
1249
1263
|
n,
|
|
1250
|
-
(i) => new
|
|
1264
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
1251
1265
|
);
|
|
1252
1266
|
}
|
|
1253
1267
|
/**
|
|
@@ -1258,7 +1272,7 @@ class Tt {
|
|
|
1258
1272
|
getPColumnByRef(e) {
|
|
1259
1273
|
const n = this.getDataByRef(e);
|
|
1260
1274
|
if (n)
|
|
1261
|
-
return
|
|
1275
|
+
return it(n);
|
|
1262
1276
|
}
|
|
1263
1277
|
/**
|
|
1264
1278
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1268,7 +1282,7 @@ class Tt {
|
|
|
1268
1282
|
getPColumnSpecByRef(e) {
|
|
1269
1283
|
const n = this.getSpecByRef(e);
|
|
1270
1284
|
if (n) {
|
|
1271
|
-
if (!
|
|
1285
|
+
if (!te(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
1272
1286
|
return n;
|
|
1273
1287
|
}
|
|
1274
1288
|
}
|
|
@@ -1287,13 +1301,13 @@ class Tt {
|
|
|
1287
1301
|
findDataWithCompatibleSpec(e) {
|
|
1288
1302
|
const n = [];
|
|
1289
1303
|
e: for (const r of this.getData().entries) {
|
|
1290
|
-
if (!
|
|
1304
|
+
if (!te(r.obj.spec))
|
|
1291
1305
|
continue;
|
|
1292
1306
|
const i = r.obj.spec;
|
|
1293
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1307
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
|
|
1294
1308
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1295
1309
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1296
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
1310
|
+
if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
|
|
1297
1311
|
continue e;
|
|
1298
1312
|
}
|
|
1299
1313
|
n.push(r.obj);
|
|
@@ -1308,9 +1322,9 @@ class Tt {
|
|
|
1308
1322
|
findLabels(e) {
|
|
1309
1323
|
const n = this.getData();
|
|
1310
1324
|
for (const r of n.entries) {
|
|
1311
|
-
if (!
|
|
1325
|
+
if (!ye(r.obj)) continue;
|
|
1312
1326
|
const i = r.obj.spec;
|
|
1313
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1327
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
|
|
1314
1328
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1315
1329
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1316
1330
|
return Object.fromEntries(
|
|
@@ -1329,13 +1343,13 @@ class Tt {
|
|
|
1329
1343
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1330
1344
|
*/
|
|
1331
1345
|
selectColumns(e) {
|
|
1332
|
-
const n = typeof e == "function" ? e :
|
|
1333
|
-
return this.getSpecs().entries.filter(({ obj: i }) =>
|
|
1346
|
+
const n = typeof e == "function" ? e : Y(e);
|
|
1347
|
+
return this.getSpecs().entries.filter(({ obj: i }) => te(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
|
|
1334
1348
|
const o = s;
|
|
1335
1349
|
let a = null;
|
|
1336
1350
|
const l = this;
|
|
1337
1351
|
return {
|
|
1338
|
-
id:
|
|
1352
|
+
id: De(i),
|
|
1339
1353
|
spec: o,
|
|
1340
1354
|
get data() {
|
|
1341
1355
|
var u;
|
|
@@ -1360,15 +1374,15 @@ class Tt {
|
|
|
1360
1374
|
return r;
|
|
1361
1375
|
}
|
|
1362
1376
|
}
|
|
1363
|
-
class
|
|
1377
|
+
class ee {
|
|
1364
1378
|
constructor() {
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1379
|
+
F(this, "ctx");
|
|
1380
|
+
F(this, "args");
|
|
1381
|
+
F(this, "uiState");
|
|
1368
1382
|
// lazy rendering because this feature is rarely used
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
this.ctx =
|
|
1383
|
+
F(this, "_activeArgsCache");
|
|
1384
|
+
F(this, "resultPool", new Dt());
|
|
1385
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1372
1386
|
}
|
|
1373
1387
|
/**
|
|
1374
1388
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -1386,14 +1400,14 @@ class Q {
|
|
|
1386
1400
|
getNamedAccessor(e) {
|
|
1387
1401
|
return pe(
|
|
1388
1402
|
this.ctx.getAccessorHandleByName(e),
|
|
1389
|
-
(n) => new
|
|
1403
|
+
(n) => new E(n, [e])
|
|
1390
1404
|
);
|
|
1391
1405
|
}
|
|
1392
1406
|
get prerun() {
|
|
1393
|
-
return this.getNamedAccessor(
|
|
1407
|
+
return this.getNamedAccessor(Re);
|
|
1394
1408
|
}
|
|
1395
1409
|
get outputs() {
|
|
1396
|
-
return this.getNamedAccessor(
|
|
1410
|
+
return this.getNamedAccessor(ke);
|
|
1397
1411
|
}
|
|
1398
1412
|
/**
|
|
1399
1413
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1405,13 +1419,13 @@ class Q {
|
|
|
1405
1419
|
}
|
|
1406
1420
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1407
1421
|
var i;
|
|
1408
|
-
const n = e.some((s) => !(s.data instanceof
|
|
1422
|
+
const n = e.some((s) => !(s.data instanceof E) || be(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1409
1423
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1410
1424
|
}
|
|
1411
1425
|
// TODO remove all non-PColumn fields
|
|
1412
1426
|
createPFrame(e) {
|
|
1413
1427
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1414
|
-
e.map((n) =>
|
|
1428
|
+
e.map((n) => _e(n))
|
|
1415
1429
|
);
|
|
1416
1430
|
}
|
|
1417
1431
|
createPTable(e) {
|
|
@@ -1423,8 +1437,8 @@ class Q {
|
|
|
1423
1437
|
},
|
|
1424
1438
|
filters: e.filters ?? [],
|
|
1425
1439
|
sorting: e.sorting ?? []
|
|
1426
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1427
|
-
|
|
1440
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(st(n.src)), this.ctx.createPTable(
|
|
1441
|
+
ot(n, (r) => _e(r))
|
|
1428
1442
|
);
|
|
1429
1443
|
}
|
|
1430
1444
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1435,19 +1449,19 @@ class Q {
|
|
|
1435
1449
|
return this.ctx.getCurrentUnstableMarker();
|
|
1436
1450
|
}
|
|
1437
1451
|
}
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1452
|
+
const z = "1.30.26";
|
|
1453
|
+
function Ft(t) {
|
|
1440
1454
|
return t.__renderLambda === !0;
|
|
1441
1455
|
}
|
|
1442
|
-
function
|
|
1456
|
+
function de(t) {
|
|
1443
1457
|
if (t !== void 0)
|
|
1444
|
-
return
|
|
1458
|
+
return Ft(t) ? t.handle : t;
|
|
1445
1459
|
}
|
|
1446
|
-
function
|
|
1460
|
+
function N(t) {
|
|
1447
1461
|
if (t !== void 0)
|
|
1448
1462
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1449
1463
|
}
|
|
1450
|
-
function
|
|
1464
|
+
function _n(t) {
|
|
1451
1465
|
if (t.v3 !== void 0) {
|
|
1452
1466
|
const {
|
|
1453
1467
|
initialArgs: e,
|
|
@@ -1459,7 +1473,7 @@ function Cn(t) {
|
|
|
1459
1473
|
sections: a,
|
|
1460
1474
|
title: l,
|
|
1461
1475
|
enrichmentTargets: u
|
|
1462
|
-
} = t.v3, { code:
|
|
1476
|
+
} = t.v3, { code: p } = t;
|
|
1463
1477
|
return {
|
|
1464
1478
|
initialArgs: e,
|
|
1465
1479
|
initialUiState: n,
|
|
@@ -1469,7 +1483,7 @@ function Cn(t) {
|
|
|
1469
1483
|
sdkVersion: o,
|
|
1470
1484
|
sections: a,
|
|
1471
1485
|
title: l,
|
|
1472
|
-
code:
|
|
1486
|
+
code: p,
|
|
1473
1487
|
enrichmentTargets: u
|
|
1474
1488
|
};
|
|
1475
1489
|
} else if (t.inputsValid !== void 0) {
|
|
@@ -1483,10 +1497,10 @@ function Cn(t) {
|
|
|
1483
1497
|
renderingMode: n,
|
|
1484
1498
|
initialArgs: o,
|
|
1485
1499
|
outputs: Object.fromEntries(
|
|
1486
|
-
Object.entries(r).map(([u,
|
|
1500
|
+
Object.entries(r).map(([u, p]) => [u, N(p)])
|
|
1487
1501
|
),
|
|
1488
|
-
inputsValid:
|
|
1489
|
-
sections:
|
|
1502
|
+
inputsValid: N(i),
|
|
1503
|
+
sections: N(s),
|
|
1490
1504
|
initialUiState: void 0,
|
|
1491
1505
|
code: a
|
|
1492
1506
|
};
|
|
@@ -1501,10 +1515,10 @@ function Cn(t) {
|
|
|
1501
1515
|
renderingMode: r,
|
|
1502
1516
|
initialArgs: o,
|
|
1503
1517
|
outputs: Object.fromEntries(
|
|
1504
|
-
Object.entries(i).map(([u,
|
|
1518
|
+
Object.entries(i).map(([u, p]) => [u, N(p)])
|
|
1505
1519
|
),
|
|
1506
|
-
inputsValid:
|
|
1507
|
-
sections:
|
|
1520
|
+
inputsValid: N(n),
|
|
1521
|
+
sections: N(s),
|
|
1508
1522
|
initialUiState: void 0,
|
|
1509
1523
|
code: a
|
|
1510
1524
|
};
|
|
@@ -1515,18 +1529,18 @@ function Cn(t) {
|
|
|
1515
1529
|
);
|
|
1516
1530
|
}
|
|
1517
1531
|
}
|
|
1518
|
-
class
|
|
1532
|
+
class L {
|
|
1519
1533
|
constructor(e, n, r, i, s, o, a, l) {
|
|
1520
1534
|
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
|
|
1521
1535
|
}
|
|
1522
1536
|
static create(e = "Heavy") {
|
|
1523
|
-
return new
|
|
1537
|
+
return new L(
|
|
1524
1538
|
e,
|
|
1525
1539
|
void 0,
|
|
1526
1540
|
{},
|
|
1527
1541
|
{},
|
|
1528
|
-
|
|
1529
|
-
|
|
1542
|
+
ne(!0),
|
|
1543
|
+
ne([]),
|
|
1530
1544
|
void 0,
|
|
1531
1545
|
void 0
|
|
1532
1546
|
);
|
|
@@ -1534,7 +1548,7 @@ class I {
|
|
|
1534
1548
|
output(e, n, r = {}) {
|
|
1535
1549
|
if (typeof n == "function") {
|
|
1536
1550
|
const i = `output#${e}`;
|
|
1537
|
-
return
|
|
1551
|
+
return G(i, () => n(new ee())), new L(
|
|
1538
1552
|
this._renderingMode,
|
|
1539
1553
|
this._initialArgs,
|
|
1540
1554
|
this._initialUiState,
|
|
@@ -1552,7 +1566,7 @@ class I {
|
|
|
1552
1566
|
this._enrichmentTargets
|
|
1553
1567
|
);
|
|
1554
1568
|
} else
|
|
1555
|
-
return new
|
|
1569
|
+
return new L(
|
|
1556
1570
|
this._renderingMode,
|
|
1557
1571
|
this._initialArgs,
|
|
1558
1572
|
this._initialUiState,
|
|
@@ -1571,7 +1585,7 @@ class I {
|
|
|
1571
1585
|
return this.output(e, n, { retentive: !0 });
|
|
1572
1586
|
}
|
|
1573
1587
|
argsValid(e) {
|
|
1574
|
-
return typeof e == "function" ? (
|
|
1588
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new ee())), new L(
|
|
1575
1589
|
this._renderingMode,
|
|
1576
1590
|
this._initialArgs,
|
|
1577
1591
|
this._initialUiState,
|
|
@@ -1583,7 +1597,7 @@ class I {
|
|
|
1583
1597
|
this._sections,
|
|
1584
1598
|
this._title,
|
|
1585
1599
|
this._enrichmentTargets
|
|
1586
|
-
)) : new
|
|
1600
|
+
)) : new L(
|
|
1587
1601
|
this._renderingMode,
|
|
1588
1602
|
this._initialArgs,
|
|
1589
1603
|
this._initialUiState,
|
|
@@ -1595,7 +1609,7 @@ class I {
|
|
|
1595
1609
|
);
|
|
1596
1610
|
}
|
|
1597
1611
|
sections(e) {
|
|
1598
|
-
return Array.isArray(e) ? this.sections(
|
|
1612
|
+
return Array.isArray(e) ? this.sections(ne(e)) : typeof e == "function" ? (G("sections", () => e(new ee())), new L(
|
|
1599
1613
|
this._renderingMode,
|
|
1600
1614
|
this._initialArgs,
|
|
1601
1615
|
this._initialUiState,
|
|
@@ -1604,7 +1618,7 @@ class I {
|
|
|
1604
1618
|
{ __renderLambda: !0, handle: "sections" },
|
|
1605
1619
|
this._title,
|
|
1606
1620
|
this._enrichmentTargets
|
|
1607
|
-
)) : new
|
|
1621
|
+
)) : new L(
|
|
1608
1622
|
this._renderingMode,
|
|
1609
1623
|
this._initialArgs,
|
|
1610
1624
|
this._initialUiState,
|
|
@@ -1617,7 +1631,7 @@ class I {
|
|
|
1617
1631
|
}
|
|
1618
1632
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1619
1633
|
title(e) {
|
|
1620
|
-
return
|
|
1634
|
+
return G("title", () => e(new ee())), new L(
|
|
1621
1635
|
this._renderingMode,
|
|
1622
1636
|
this._initialArgs,
|
|
1623
1637
|
this._initialUiState,
|
|
@@ -1633,7 +1647,7 @@ class I {
|
|
|
1633
1647
|
* @deprecated use {@link withArgs}
|
|
1634
1648
|
* */
|
|
1635
1649
|
initialArgs(e) {
|
|
1636
|
-
return new
|
|
1650
|
+
return new L(
|
|
1637
1651
|
this._renderingMode,
|
|
1638
1652
|
e,
|
|
1639
1653
|
this._initialUiState,
|
|
@@ -1646,7 +1660,7 @@ class I {
|
|
|
1646
1660
|
}
|
|
1647
1661
|
/** Sets initial args for the block, this value must be specified. */
|
|
1648
1662
|
withArgs(e) {
|
|
1649
|
-
return new
|
|
1663
|
+
return new L(
|
|
1650
1664
|
this._renderingMode,
|
|
1651
1665
|
e,
|
|
1652
1666
|
this._initialUiState,
|
|
@@ -1659,7 +1673,7 @@ class I {
|
|
|
1659
1673
|
}
|
|
1660
1674
|
/** Defines type and sets initial value for block UiState. */
|
|
1661
1675
|
withUiState(e) {
|
|
1662
|
-
return new
|
|
1676
|
+
return new L(
|
|
1663
1677
|
this._renderingMode,
|
|
1664
1678
|
this._initialArgs,
|
|
1665
1679
|
e,
|
|
@@ -1675,7 +1689,7 @@ class I {
|
|
|
1675
1689
|
* Influences dependency graph construction.
|
|
1676
1690
|
*/
|
|
1677
1691
|
enriches(e) {
|
|
1678
|
-
return
|
|
1692
|
+
return G("enrichmentTargets", e), new L(
|
|
1679
1693
|
this._renderingMode,
|
|
1680
1694
|
this._initialArgs,
|
|
1681
1695
|
this._initialUiState,
|
|
@@ -1693,7 +1707,7 @@ class I {
|
|
|
1693
1707
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1694
1708
|
const e = {
|
|
1695
1709
|
v3: {
|
|
1696
|
-
sdkVersion:
|
|
1710
|
+
sdkVersion: z,
|
|
1697
1711
|
renderingMode: this._renderingMode,
|
|
1698
1712
|
initialArgs: this._initialArgs,
|
|
1699
1713
|
initialUiState: this._initialUiState,
|
|
@@ -1704,81 +1718,81 @@ class I {
|
|
|
1704
1718
|
enrichmentTargets: this._enrichmentTargets
|
|
1705
1719
|
},
|
|
1706
1720
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1707
|
-
sdkVersion:
|
|
1721
|
+
sdkVersion: z,
|
|
1708
1722
|
renderingMode: this._renderingMode,
|
|
1709
1723
|
initialArgs: this._initialArgs,
|
|
1710
|
-
inputsValid:
|
|
1711
|
-
sections:
|
|
1724
|
+
inputsValid: de(this._inputsValid),
|
|
1725
|
+
sections: de(this._sections),
|
|
1712
1726
|
outputs: Object.fromEntries(
|
|
1713
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1727
|
+
Object.entries(this._outputs).map(([n, r]) => [n, de(r)])
|
|
1714
1728
|
)
|
|
1715
1729
|
};
|
|
1716
|
-
return
|
|
1730
|
+
return ct() ? Oe({ sdkVersion: z }) : { config: e };
|
|
1717
1731
|
}
|
|
1718
1732
|
}
|
|
1719
|
-
function
|
|
1733
|
+
function In(t) {
|
|
1720
1734
|
const e = t.type;
|
|
1721
1735
|
switch (e) {
|
|
1722
1736
|
case "axis":
|
|
1723
|
-
return
|
|
1737
|
+
return re(t);
|
|
1724
1738
|
case "column":
|
|
1725
|
-
return
|
|
1739
|
+
return re(t);
|
|
1726
1740
|
default:
|
|
1727
1741
|
throw Error(`unsupported column type: ${e}`);
|
|
1728
1742
|
}
|
|
1729
1743
|
}
|
|
1730
|
-
function
|
|
1744
|
+
function Ot(t) {
|
|
1731
1745
|
return JSON.parse(t);
|
|
1732
1746
|
}
|
|
1733
|
-
function
|
|
1747
|
+
function Rt(t) {
|
|
1734
1748
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1735
1749
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return new
|
|
1750
|
+
function Je(t) {
|
|
1751
|
+
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1738
1752
|
name: "pl7.app/label",
|
|
1739
1753
|
axes: [{}]
|
|
1740
1754
|
// exactly one axis
|
|
1741
1755
|
}, { dontWaitAllData: !0 });
|
|
1742
1756
|
}
|
|
1743
|
-
function
|
|
1757
|
+
function Ne(t, e) {
|
|
1744
1758
|
const n = [], r = [];
|
|
1745
1759
|
for (const a of t)
|
|
1746
|
-
|
|
1760
|
+
Rt(a.spec) ? n.push(a) : r.push(a);
|
|
1747
1761
|
const i = [];
|
|
1748
1762
|
for (const a of r)
|
|
1749
1763
|
for (const l of a.spec.axesSpec) {
|
|
1750
|
-
const u =
|
|
1751
|
-
i.some((
|
|
1764
|
+
const u = O(l);
|
|
1765
|
+
i.some((p) => K(p, u)) || i.push(u);
|
|
1752
1766
|
}
|
|
1753
1767
|
for (const a of n) {
|
|
1754
|
-
const l =
|
|
1768
|
+
const l = O(a.spec.axesSpec[0]), u = i.findIndex((p) => K(p, l));
|
|
1755
1769
|
u !== -1 && i.splice(u, 1);
|
|
1756
1770
|
}
|
|
1757
1771
|
const s = (a, l) => {
|
|
1758
1772
|
let u = a.toString();
|
|
1759
1773
|
if (l)
|
|
1760
|
-
for (const
|
|
1761
|
-
u +=
|
|
1774
|
+
for (const p in l)
|
|
1775
|
+
u += p, u += l[p];
|
|
1762
1776
|
return u;
|
|
1763
1777
|
}, o = [];
|
|
1764
1778
|
for (const a of e) {
|
|
1765
|
-
const l = a.spec.axesSpec[0], u =
|
|
1766
|
-
if (
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1769
|
-
id: s(a.id,
|
|
1779
|
+
const l = a.spec.axesSpec[0], u = O(l), p = i.findIndex((h) => K(h, u));
|
|
1780
|
+
if (p !== -1) {
|
|
1781
|
+
const h = i[p], w = Object.keys(h.domain ?? {}).length, g = Object.keys(l.domain ?? {}).length;
|
|
1782
|
+
w > g ? o.push({
|
|
1783
|
+
id: s(a.id, h.domain),
|
|
1770
1784
|
spec: {
|
|
1771
1785
|
...a.spec,
|
|
1772
|
-
axesSpec: [{ ...
|
|
1786
|
+
axesSpec: [{ ...h, annotations: l.annotations }]
|
|
1773
1787
|
},
|
|
1774
1788
|
data: a.data
|
|
1775
|
-
}) : o.push(a), i.splice(
|
|
1789
|
+
}) : o.push(a), i.splice(p, 1);
|
|
1776
1790
|
}
|
|
1777
1791
|
}
|
|
1778
1792
|
return o;
|
|
1779
1793
|
}
|
|
1780
|
-
function
|
|
1781
|
-
const e = (i) => Array.isArray(i), n = (i) => i instanceof
|
|
1794
|
+
function Ue(t) {
|
|
1795
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
1782
1796
|
return t.map((i) => i.data).every((i) => {
|
|
1783
1797
|
if (e(i))
|
|
1784
1798
|
return !0;
|
|
@@ -1797,7 +1811,7 @@ function $e(t) {
|
|
|
1797
1811
|
throw Error(`unsupported column data type: ${i}`);
|
|
1798
1812
|
});
|
|
1799
1813
|
}
|
|
1800
|
-
function
|
|
1814
|
+
function Be(t, e, n, r, i, s) {
|
|
1801
1815
|
let o = t;
|
|
1802
1816
|
const a = [];
|
|
1803
1817
|
if (s) {
|
|
@@ -1818,56 +1832,56 @@ function Je(t, e, n, r, i, s) {
|
|
|
1818
1832
|
sorting: i
|
|
1819
1833
|
};
|
|
1820
1834
|
}
|
|
1821
|
-
function
|
|
1822
|
-
var u,
|
|
1835
|
+
function Tn(t, e, n, r) {
|
|
1836
|
+
var u, p;
|
|
1823
1837
|
Array.isArray(r) && (r = { filters: r });
|
|
1824
|
-
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((
|
|
1838
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((p = n == null ? void 0 : n.pTableParams) == null ? void 0 : p.sorting) ?? [], a = Je(t.resultPool);
|
|
1825
1839
|
if (!a) return;
|
|
1826
|
-
const l =
|
|
1827
|
-
if (
|
|
1840
|
+
const l = Ne(e.map(Ee), a);
|
|
1841
|
+
if (Ue([...e, ...l]))
|
|
1828
1842
|
return t.createPTable(
|
|
1829
|
-
|
|
1843
|
+
Be(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1830
1844
|
);
|
|
1831
1845
|
}
|
|
1832
|
-
function
|
|
1846
|
+
function kt(t) {
|
|
1833
1847
|
var e;
|
|
1834
1848
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1835
1849
|
}
|
|
1836
|
-
function
|
|
1837
|
-
var
|
|
1838
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1850
|
+
function Ln(t, e, n, r, i) {
|
|
1851
|
+
var c, y;
|
|
1852
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((c = r == null ? void 0 : r.pTableParams) == null ? void 0 : c.filters) ?? []], a = ((y = r == null ? void 0 : r.pTableParams) == null ? void 0 : y.sorting) ?? [], l = e.find((d) => n(d.spec));
|
|
1839
1853
|
if (!l) return;
|
|
1840
|
-
const u =
|
|
1854
|
+
const u = Je(t.resultPool);
|
|
1841
1855
|
if (!u) return;
|
|
1842
|
-
const
|
|
1843
|
-
var
|
|
1856
|
+
const p = new Set((() => {
|
|
1857
|
+
var b, A;
|
|
1844
1858
|
if (s === "inner") return [];
|
|
1845
|
-
const
|
|
1846
|
-
return
|
|
1859
|
+
const d = (A = (b = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : b.hiddenColIds) == null ? void 0 : A.map(Ot).filter((v) => v.type === "column").map((v) => v.id);
|
|
1860
|
+
return d || e.filter((v) => kt(v.spec)).map((v) => v.id);
|
|
1847
1861
|
})());
|
|
1848
|
-
|
|
1849
|
-
const
|
|
1850
|
-
...l.spec.axesSpec.map((
|
|
1862
|
+
p.delete(l.id), [...o.map((d) => d.column), ...a.map((d) => d.column)].filter((d) => d.type === "column").map((d) => p.delete(d.id));
|
|
1863
|
+
const h = e.filter((d) => !p.has(d.id)), w = Ne(h.map(Ee), u), g = [
|
|
1864
|
+
...l.spec.axesSpec.map((d) => ({
|
|
1851
1865
|
type: "axis",
|
|
1852
|
-
id:
|
|
1853
|
-
spec:
|
|
1866
|
+
id: O(d),
|
|
1867
|
+
spec: d
|
|
1854
1868
|
})),
|
|
1855
|
-
...[...e, ...
|
|
1869
|
+
...[...e, ...w].map((d) => ({
|
|
1856
1870
|
type: "column",
|
|
1857
|
-
id:
|
|
1858
|
-
spec:
|
|
1871
|
+
id: d.id,
|
|
1872
|
+
spec: d.spec
|
|
1859
1873
|
}))
|
|
1860
1874
|
];
|
|
1861
|
-
if (
|
|
1875
|
+
if (!Ue([...h, ...w])) return;
|
|
1862
1876
|
const m = t.createPTable(
|
|
1863
|
-
|
|
1877
|
+
Be(e, w, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1864
1878
|
);
|
|
1865
1879
|
return {
|
|
1866
|
-
tableSpec:
|
|
1880
|
+
tableSpec: g,
|
|
1867
1881
|
tableHandle: m
|
|
1868
1882
|
};
|
|
1869
1883
|
}
|
|
1870
|
-
function
|
|
1884
|
+
function En(t, e, n) {
|
|
1871
1885
|
const r = t.resultPool.findLabels(e);
|
|
1872
1886
|
return {
|
|
1873
1887
|
axis: e,
|
|
@@ -1878,7 +1892,7 @@ function Ln(t, e, n) {
|
|
|
1878
1892
|
defaultValue: n[0]
|
|
1879
1893
|
};
|
|
1880
1894
|
}
|
|
1881
|
-
const
|
|
1895
|
+
const jt = (t, e) => {
|
|
1882
1896
|
let n = t.toString();
|
|
1883
1897
|
return e == null || e.forEach((r) => {
|
|
1884
1898
|
if (r)
|
|
@@ -1886,7 +1900,7 @@ const Rt = (t, e) => {
|
|
|
1886
1900
|
n += i, n += s;
|
|
1887
1901
|
}), n;
|
|
1888
1902
|
};
|
|
1889
|
-
function
|
|
1903
|
+
function Vt(t) {
|
|
1890
1904
|
if (!t.length)
|
|
1891
1905
|
return [];
|
|
1892
1906
|
let e = [[]];
|
|
@@ -1897,85 +1911,85 @@ function kt(t) {
|
|
|
1897
1911
|
}), e = r;
|
|
1898
1912
|
}), e;
|
|
1899
1913
|
}
|
|
1900
|
-
function
|
|
1901
|
-
const n = t.axesSpec.map(
|
|
1902
|
-
return e.axesSpec.map(
|
|
1914
|
+
function Kt(t, e) {
|
|
1915
|
+
const n = t.axesSpec.map(O);
|
|
1916
|
+
return e.axesSpec.map(O).every((i) => n.some((s) => K(s, i) && K(i, s)));
|
|
1903
1917
|
}
|
|
1904
|
-
function
|
|
1905
|
-
const n = t.axesSpec.map(
|
|
1906
|
-
return e.axesSpec.map(
|
|
1918
|
+
function Me(t, e) {
|
|
1919
|
+
const n = t.axesSpec.map(O);
|
|
1920
|
+
return e.axesSpec.map(O).every((i) => n.some((s) => K(s, i)));
|
|
1907
1921
|
}
|
|
1908
|
-
const
|
|
1909
|
-
function
|
|
1910
|
-
const n = t.spec.axesSpec.map(
|
|
1911
|
-
if (
|
|
1922
|
+
const $t = "pl7.app/graph/isVirtual", Ie = "pl7.app/label";
|
|
1923
|
+
function Te(t, e) {
|
|
1924
|
+
const n = t.spec.axesSpec.map(O), r = e.spec.axesSpec.map(O);
|
|
1925
|
+
if (Kt(t.spec, e.spec))
|
|
1912
1926
|
return [];
|
|
1913
|
-
if (!
|
|
1927
|
+
if (!Me(t.spec, e.spec))
|
|
1914
1928
|
return [];
|
|
1915
|
-
const o = r.map((
|
|
1916
|
-
const
|
|
1917
|
-
return
|
|
1918
|
-
const
|
|
1919
|
-
return Object.entries(
|
|
1920
|
-
if ((
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1929
|
+
const o = r.map((h) => n.filter((w) => K(w, h))), a = Vt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), p = a.map((h) => {
|
|
1930
|
+
const w = /* @__PURE__ */ new Set();
|
|
1931
|
+
return h.map((g, m) => {
|
|
1932
|
+
const c = e.spec.axesSpec[m].domain, y = g.domain;
|
|
1933
|
+
return Object.entries(y ?? {}).forEach(([d, b]) => {
|
|
1934
|
+
if ((c == null ? void 0 : c[d]) === void 0) {
|
|
1935
|
+
const A = JSON.stringify([d, b]);
|
|
1936
|
+
w.add(A), l.add(A);
|
|
1923
1937
|
}
|
|
1924
1938
|
}), {
|
|
1925
|
-
...
|
|
1939
|
+
...g,
|
|
1926
1940
|
annotations: e.spec.axesSpec[m].annotations
|
|
1927
1941
|
};
|
|
1928
|
-
}),
|
|
1942
|
+
}), w;
|
|
1929
1943
|
});
|
|
1930
|
-
return [...l].forEach((
|
|
1931
|
-
|
|
1932
|
-
}), a.map((
|
|
1933
|
-
var
|
|
1934
|
-
const
|
|
1935
|
-
var
|
|
1936
|
-
return (
|
|
1937
|
-
}).join(" / "),
|
|
1944
|
+
return [...l].forEach((h) => {
|
|
1945
|
+
p.some((w) => !w.has(h)) && u.add(h);
|
|
1946
|
+
}), a.map((h, w) => {
|
|
1947
|
+
var d;
|
|
1948
|
+
const g = jt(e.id, h.map((b) => b.domain)), m = ((d = e.spec.annotations) == null ? void 0 : d[Ie]) ?? "", c = [...p[w]].filter((b) => u.has(b)).sort().map((b) => {
|
|
1949
|
+
var A;
|
|
1950
|
+
return (A = JSON.parse(b)) == null ? void 0 : A[1];
|
|
1951
|
+
}).join(" / "), y = {
|
|
1938
1952
|
...e.spec.annotations,
|
|
1939
|
-
[
|
|
1953
|
+
[$t]: "true"
|
|
1940
1954
|
};
|
|
1941
|
-
return (m ||
|
|
1942
|
-
id:
|
|
1955
|
+
return (m || c) && (y[Ie] = m && c ? m + " / " + c : m + c), {
|
|
1956
|
+
id: g,
|
|
1943
1957
|
spec: {
|
|
1944
1958
|
...e.spec,
|
|
1945
|
-
axesSpec:
|
|
1946
|
-
...
|
|
1947
|
-
annotations: e.spec.axesSpec[
|
|
1959
|
+
axesSpec: h.map((b, A) => ({
|
|
1960
|
+
...b,
|
|
1961
|
+
annotations: e.spec.axesSpec[A].annotations
|
|
1948
1962
|
})),
|
|
1949
|
-
annotations:
|
|
1963
|
+
annotations: y
|
|
1950
1964
|
},
|
|
1951
1965
|
data: e.data
|
|
1952
1966
|
};
|
|
1953
1967
|
});
|
|
1954
1968
|
}
|
|
1955
|
-
function
|
|
1969
|
+
function Jt(t) {
|
|
1956
1970
|
const e = [];
|
|
1957
1971
|
for (let n = 0; n < t.length; n++)
|
|
1958
1972
|
for (let r = n + 1; r < t.length; r++) {
|
|
1959
1973
|
const i = t[n], s = t[r];
|
|
1960
1974
|
e.push(
|
|
1961
|
-
...
|
|
1962
|
-
...
|
|
1975
|
+
...Te(i, s),
|
|
1976
|
+
...Te(s, i)
|
|
1963
1977
|
);
|
|
1964
1978
|
}
|
|
1965
1979
|
return e;
|
|
1966
1980
|
}
|
|
1967
|
-
function
|
|
1981
|
+
function Nt(t, e) {
|
|
1968
1982
|
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1969
1983
|
t.forEach((s) => {
|
|
1970
|
-
n.add(s.id), r.set(
|
|
1984
|
+
n.add(s.id), r.set(re(Pe(s.spec)), s);
|
|
1971
1985
|
});
|
|
1972
1986
|
const i = /* @__PURE__ */ new Map();
|
|
1973
1987
|
for (const s of e) {
|
|
1974
1988
|
if (n.has(s.id)) continue;
|
|
1975
|
-
const o =
|
|
1989
|
+
const o = re(Pe(s.spec));
|
|
1976
1990
|
if (!r.has(o)) {
|
|
1977
1991
|
for (const a of r.values())
|
|
1978
|
-
if (
|
|
1992
|
+
if (Me(a.spec, s.spec)) {
|
|
1979
1993
|
i.set(o, s);
|
|
1980
1994
|
break;
|
|
1981
1995
|
}
|
|
@@ -1983,15 +1997,15 @@ function $t(t, e) {
|
|
|
1983
1997
|
}
|
|
1984
1998
|
return [...r.values(), ...i.values()];
|
|
1985
1999
|
}
|
|
1986
|
-
function
|
|
2000
|
+
function Dn(t, e) {
|
|
1987
2001
|
if (!e) return;
|
|
1988
|
-
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(
|
|
2002
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ye), r = Nt(e, n), i = [...r, ...Jt(r)];
|
|
1989
2003
|
if (!i.some(
|
|
1990
|
-
(s) => s.data instanceof
|
|
2004
|
+
(s) => s.data instanceof E && !s.data.getIsReadyOrError()
|
|
1991
2005
|
))
|
|
1992
2006
|
return t.createPFrame(i);
|
|
1993
2007
|
}
|
|
1994
|
-
class
|
|
2008
|
+
class Fn {
|
|
1995
2009
|
constructor(e) {
|
|
1996
2010
|
this.handle = e;
|
|
1997
2011
|
}
|
|
@@ -2011,121 +2025,121 @@ class En {
|
|
|
2011
2025
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2012
2026
|
}
|
|
2013
2027
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2028
|
+
function Ut(t) {
|
|
2029
|
+
return Fe({
|
|
2016
2030
|
__isRef: !0,
|
|
2017
|
-
blockId:
|
|
2018
|
-
name:
|
|
2031
|
+
blockId: ie(t, "blockId"),
|
|
2032
|
+
name: ie(t, "name")
|
|
2019
2033
|
});
|
|
2020
2034
|
}
|
|
2021
|
-
function
|
|
2022
|
-
return
|
|
2023
|
-
ref:
|
|
2024
|
-
label:
|
|
2035
|
+
function On(t) {
|
|
2036
|
+
return Fe({
|
|
2037
|
+
ref: Ut(ie(t, "ref")),
|
|
2038
|
+
label: ie(t, "label")
|
|
2025
2039
|
});
|
|
2026
2040
|
}
|
|
2027
|
-
const
|
|
2028
|
-
sdkVersion:
|
|
2041
|
+
const Rn = {
|
|
2042
|
+
sdkVersion: z
|
|
2029
2043
|
};
|
|
2030
|
-
function
|
|
2031
|
-
return
|
|
2044
|
+
function Bt() {
|
|
2045
|
+
return Oe({ sdkVersion: z });
|
|
2032
2046
|
}
|
|
2033
|
-
function
|
|
2047
|
+
function kn(t) {
|
|
2034
2048
|
try {
|
|
2035
|
-
return
|
|
2049
|
+
return Bt();
|
|
2036
2050
|
} catch {
|
|
2037
2051
|
return t;
|
|
2038
2052
|
}
|
|
2039
2053
|
}
|
|
2040
|
-
function
|
|
2054
|
+
function jn(t) {
|
|
2041
2055
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2042
2056
|
return globalThis.getEnvironmentValue(t);
|
|
2043
2057
|
}
|
|
2044
2058
|
export {
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2059
|
+
Yt as Args,
|
|
2060
|
+
L as BlockModel,
|
|
2061
|
+
Rn as CurrentSdkInfo,
|
|
2062
|
+
I as FutureRef,
|
|
2063
|
+
$t as IS_VIRTUAL_COLUMN,
|
|
2064
|
+
Xt as It,
|
|
2065
|
+
Cn as JsRenderInternal,
|
|
2066
|
+
Ie as LABEL_ANNOTATION,
|
|
2067
|
+
Qt as MainOutputs,
|
|
2068
|
+
lt as OutputError,
|
|
2069
|
+
gt as PAnnotationLabel,
|
|
2070
|
+
mt as PAnnotationTrace,
|
|
2071
|
+
me as PColumnCollection,
|
|
2072
|
+
Fn as PFrameImpl,
|
|
2073
|
+
B as RT_BINARY_PARTITIONED,
|
|
2074
|
+
q as RT_BINARY_SUPER_PARTITIONED,
|
|
2075
|
+
H as RT_JSON_PARTITIONED,
|
|
2076
|
+
ae as RT_JSON_SUPER_PARTITIONED,
|
|
2077
|
+
se as RT_RESOURCE_MAP,
|
|
2078
|
+
oe as RT_RESOURCE_MAP_PARTITIONED,
|
|
2079
|
+
ee as RenderCtx,
|
|
2080
|
+
Dt as ResultPool,
|
|
2081
|
+
Zt as StagingOutputs,
|
|
2082
|
+
vt as Trace,
|
|
2083
|
+
yt as TraceEntry,
|
|
2084
|
+
E as TreeNodeAccessor,
|
|
2085
|
+
en as UiState,
|
|
2086
|
+
Ue as allColumnsComputed,
|
|
2087
|
+
ln as and,
|
|
2088
|
+
Ct as convertOrParsePColumnData,
|
|
2089
|
+
Dn as createPFrameForGraphs,
|
|
2090
|
+
Tn as createPlDataTable,
|
|
2091
|
+
En as createPlDataTableSheet,
|
|
2092
|
+
Ln as createPlDataTableV2,
|
|
2093
|
+
Ve as deriveLabels,
|
|
2094
|
+
de as downgradeCfgOrLambda,
|
|
2095
|
+
Nt as enrichColumnsWithCompatible,
|
|
2096
|
+
vn as extractArchiveAndGetURL,
|
|
2097
|
+
_n as extractConfig,
|
|
2098
|
+
St as filterDataInfoEntries,
|
|
2099
|
+
sn as flatten,
|
|
2100
|
+
On as fromPlOption,
|
|
2101
|
+
Ut as fromPlRef,
|
|
2102
|
+
Jt as getAdditionalColumns,
|
|
2103
|
+
Je as getAllLabelColumns,
|
|
2104
|
+
fn as getBlobContent,
|
|
2105
|
+
gn as getBlobContentAsJson,
|
|
2106
|
+
hn as getBlobContentAsString,
|
|
2107
|
+
mn as getDownloadedBlobContent,
|
|
2108
|
+
jn as getEnvironmentValue,
|
|
2109
|
+
X as getFromCfg,
|
|
2110
|
+
ne as getImmediate,
|
|
2111
|
+
bn as getImportProgress,
|
|
2112
|
+
ie as getJsonField,
|
|
2113
|
+
wn as getLastLogs,
|
|
2114
|
+
Pn as getLogHandle,
|
|
2115
|
+
Ne as getMatchingLabelColumns,
|
|
2116
|
+
yn as getOnDemandBlobContent,
|
|
2117
|
+
At as getPartitionKeysList,
|
|
2118
|
+
kn as getPlatformaOrDefault,
|
|
2119
|
+
An as getProgressLog,
|
|
2120
|
+
xn as getProgressLogWithInfo,
|
|
2121
|
+
Bt as getRawPlatformaInstance,
|
|
2122
|
+
cn as getResourceField,
|
|
2123
|
+
dn as getResourceValueAsJson,
|
|
2124
|
+
Pt as getUniquePartitionKeys,
|
|
2111
2125
|
pe as ifDef,
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2126
|
+
kt as isColumnOptional,
|
|
2127
|
+
Ft as isConfigLambda,
|
|
2128
|
+
on as isEmpty,
|
|
2129
|
+
Rt as isLabelColumn,
|
|
2130
|
+
zt as isolate,
|
|
2131
|
+
tn as makeArray,
|
|
2132
|
+
Fe as makeObject,
|
|
2133
|
+
rn as mapArrayValues,
|
|
2134
|
+
nn as mapRecordValues,
|
|
2135
|
+
pn as mapResourceFields,
|
|
2136
|
+
an as not,
|
|
2137
|
+
un as or,
|
|
2138
|
+
ge as parsePColumnData,
|
|
2139
|
+
Ot as parsePTableColumnId,
|
|
2140
|
+
Sn as parseResourceMap,
|
|
2141
|
+
ut as readOutput,
|
|
2142
|
+
In as stringifyPTableColumnId,
|
|
2143
|
+
qt as wrapOutputs
|
|
2130
2144
|
};
|
|
2131
2145
|
//# sourceMappingURL=index.mjs.map
|