@platforma-sdk/model 1.22.97 → 1.23.4
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/components/PFrameForGraphs.d.ts +1 -0
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +588 -547
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +39 -2
- package/dist/render/api.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/components/PFrameForGraphs.test.ts +33 -1
- package/src/components/PFrameForGraphs.ts +47 -5
- package/src/render/api.ts +144 -45
package/dist/index.mjs
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var _e = (t, e, n) => e in t ? ve(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var P = (t, e, n) => _e(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as B, mapPObjectData as N, selectorsToPredicate as te, AnchorIdDeriver as $, isPlRef as Ae, resolveAnchors as ne, isPColumnSpec as G, mapValueInVOE as Se, ensurePColumn as we, extractAllColumns as Ie, mapPTableDef as Pe, getAxisId as R, matchAxisId as D } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import { z as
|
|
7
|
-
class
|
|
6
|
+
import { z as T } from "zod";
|
|
7
|
+
class Ce extends Error {
|
|
8
8
|
constructor(e, n) {
|
|
9
9
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0]), this.errors = e, this.moreErrors = n;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (!t.ok) throw new
|
|
12
|
+
function Re(t) {
|
|
13
|
+
if (!t.ok) throw new Ce(t.errors, t.moreErrors);
|
|
14
14
|
return t.value;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Ze(t) {
|
|
17
17
|
return new Proxy(t, {
|
|
18
18
|
get(e, n) {
|
|
19
|
-
return
|
|
19
|
+
return Re(e[n]);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function y(t) {
|
|
24
24
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? j(t) : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function O(t) {
|
|
27
27
|
return { type: "GetFromCtx", variable: t };
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function et(t) {
|
|
30
30
|
return {
|
|
31
31
|
type: "Isolate",
|
|
32
32
|
cfg: t
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const tt = O("$args"), nt = O("$it"), st = O("$prod"), rt = O("$staging"), it = O("$ui");
|
|
36
36
|
function j(t) {
|
|
37
37
|
return { type: "Immediate", value: t };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ce(t) {
|
|
40
40
|
const e = {};
|
|
41
|
-
for (const [n,
|
|
41
|
+
for (const [n, s] of Object.entries(t)) e[n] = y(s);
|
|
42
42
|
return {
|
|
43
43
|
type: "MakeObject",
|
|
44
44
|
template: e
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ot(...t) {
|
|
48
48
|
const e = [];
|
|
49
|
-
for (const n of t) e.push(
|
|
49
|
+
for (const n of t) e.push(y(n));
|
|
50
50
|
return {
|
|
51
51
|
type: "MakeArray",
|
|
52
52
|
template: e
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function U(t, e) {
|
|
56
56
|
return {
|
|
57
57
|
type: "GetJsonField",
|
|
58
|
-
source:
|
|
59
|
-
field:
|
|
58
|
+
source: y(t),
|
|
59
|
+
field: y(e)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function at(t, e, n = "$it") {
|
|
63
63
|
return {
|
|
64
64
|
type: "MapRecordValues",
|
|
65
65
|
source: t,
|
|
@@ -67,7 +67,7 @@ function nt(t, e, n = "$it") {
|
|
|
67
67
|
itVar: n
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function lt(t, e, n = "$it") {
|
|
71
71
|
return {
|
|
72
72
|
type: "MapArrayValues",
|
|
73
73
|
source: t,
|
|
@@ -75,54 +75,54 @@ function rt(t, e, n = "$it") {
|
|
|
75
75
|
itVar: n
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function ut(t) {
|
|
79
79
|
return {
|
|
80
80
|
type: "Flatten",
|
|
81
81
|
source: t
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ct(t) {
|
|
85
85
|
return {
|
|
86
86
|
type: "IsEmpty",
|
|
87
87
|
arg: t
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function dt(t) {
|
|
91
91
|
return {
|
|
92
92
|
type: "Not",
|
|
93
93
|
operand: t
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function pt(t, e) {
|
|
97
97
|
return {
|
|
98
98
|
type: "And",
|
|
99
99
|
operand1: t,
|
|
100
100
|
operand2: e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ft(t, e) {
|
|
104
104
|
return {
|
|
105
105
|
type: "Or",
|
|
106
106
|
operand1: t,
|
|
107
107
|
operand2: e
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function ht(t, e) {
|
|
111
111
|
return {
|
|
112
112
|
type: "GetResourceField",
|
|
113
|
-
source:
|
|
114
|
-
field:
|
|
113
|
+
source: y(t),
|
|
114
|
+
field: y(e)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function gt() {
|
|
118
118
|
return function(t) {
|
|
119
119
|
return {
|
|
120
120
|
type: "GetResourceValueAsJson",
|
|
121
|
-
source:
|
|
121
|
+
source: y(t)
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function mt(t, e, n = "$it") {
|
|
126
126
|
return {
|
|
127
127
|
type: "MapResourceFields",
|
|
128
128
|
source: t,
|
|
@@ -130,158 +130,158 @@ function dt(t, e, n = "$it") {
|
|
|
130
130
|
itVar: n
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function yt(t) {
|
|
134
134
|
return {
|
|
135
135
|
type: "GetBlobContent",
|
|
136
|
-
source:
|
|
136
|
+
source: y(t)
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function bt(t) {
|
|
140
140
|
return {
|
|
141
141
|
type: "GetBlobContentAsString",
|
|
142
|
-
source:
|
|
142
|
+
source: y(t)
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function vt() {
|
|
146
146
|
return function(t) {
|
|
147
147
|
return {
|
|
148
148
|
type: "GetBlobContentAsJson",
|
|
149
|
-
source:
|
|
149
|
+
source: y(t)
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function _t(t) {
|
|
154
154
|
return {
|
|
155
155
|
type: "GetDownloadedBlobContent",
|
|
156
|
-
source:
|
|
156
|
+
source: y(t)
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function At(t) {
|
|
160
160
|
return {
|
|
161
161
|
type: "GetOnDemandBlobContent",
|
|
162
|
-
source:
|
|
162
|
+
source: y(t)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function St(t, e) {
|
|
166
166
|
return {
|
|
167
167
|
type: "ExtractArchiveAndGetURL",
|
|
168
168
|
format: e,
|
|
169
|
-
source:
|
|
169
|
+
source: y(t)
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function wt(t) {
|
|
173
173
|
return {
|
|
174
174
|
type: "GetImportProgress",
|
|
175
|
-
source:
|
|
175
|
+
source: y(t)
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function It(t, e) {
|
|
179
179
|
return {
|
|
180
180
|
type: "GetLastLogs",
|
|
181
|
-
source:
|
|
181
|
+
source: y(t),
|
|
182
182
|
lines: e
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Pt(t, e) {
|
|
186
186
|
return {
|
|
187
187
|
type: "GetProgressLog",
|
|
188
|
-
source:
|
|
188
|
+
source: y(t),
|
|
189
189
|
patternToSearch: e
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ct(t, e) {
|
|
193
193
|
return {
|
|
194
194
|
type: "GetProgressLogWithInfo",
|
|
195
|
-
source:
|
|
195
|
+
source: y(t),
|
|
196
196
|
patternToSearch: e
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Rt(t) {
|
|
200
200
|
return {
|
|
201
201
|
type: "GetLogHandle",
|
|
202
|
-
source:
|
|
202
|
+
source: y(t)
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Fe() {
|
|
206
206
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function de(t) {
|
|
209
209
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
210
210
|
return globalThis.getPlatforma(t);
|
|
211
211
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
212
212
|
throw new Error("Can't get platforma instance.");
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Te() {
|
|
215
215
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function f() {
|
|
218
218
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
219
219
|
throw new Error("Not in config rendering context");
|
|
220
220
|
}
|
|
221
221
|
function E(t, e) {
|
|
222
|
-
const n =
|
|
222
|
+
const n = Te();
|
|
223
223
|
if (n === void 0) return !1;
|
|
224
224
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
225
225
|
return n.callbackRegistry[t] = e, !0;
|
|
226
226
|
}
|
|
227
|
-
const
|
|
228
|
-
function
|
|
229
|
-
t in
|
|
230
|
-
for (const
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
}
|
|
234
|
-
class
|
|
235
|
-
constructor(e, n = (
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
this.handle = e, this.postProcess = n,
|
|
239
|
-
this.resolvedValue = n(
|
|
227
|
+
const W = /* @__PURE__ */ new Map();
|
|
228
|
+
function xe(t, e) {
|
|
229
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
|
|
230
|
+
for (const s of W.get(t))
|
|
231
|
+
s(n);
|
|
232
|
+
}, W.set(t, [])), W.get(t).push(e);
|
|
233
|
+
}
|
|
234
|
+
class _ {
|
|
235
|
+
constructor(e, n = (s) => s) {
|
|
236
|
+
P(this, "isResolved", !1);
|
|
237
|
+
P(this, "resolvedValue");
|
|
238
|
+
this.handle = e, this.postProcess = n, xe(e, (s) => {
|
|
239
|
+
this.resolvedValue = n(s), this.isResolved = !0;
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
map(e) {
|
|
243
|
-
return new
|
|
243
|
+
return new _(this.handle, (n) => e(this.postProcess(n)));
|
|
244
244
|
}
|
|
245
245
|
mapDefined(e) {
|
|
246
|
-
return new
|
|
247
|
-
const
|
|
248
|
-
return
|
|
246
|
+
return new _(this.handle, (n) => {
|
|
247
|
+
const s = this.postProcess(n);
|
|
248
|
+
return s ? e(s) : void 0;
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
toJSON() {
|
|
252
252
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function z(t, e) {
|
|
256
256
|
return t === void 0 ? void 0 : e(t);
|
|
257
257
|
}
|
|
258
|
-
class
|
|
258
|
+
class S {
|
|
259
259
|
constructor(e, n) {
|
|
260
260
|
this.handle = e, this.resolvePath = n;
|
|
261
261
|
}
|
|
262
262
|
resolve(...e) {
|
|
263
263
|
const n = e.map(
|
|
264
|
-
(
|
|
264
|
+
(s) => ({
|
|
265
265
|
assertFieldType: "Input",
|
|
266
|
-
...typeof
|
|
266
|
+
...typeof s == "string" ? { field: s } : s
|
|
267
267
|
})
|
|
268
268
|
);
|
|
269
269
|
return this.resolveWithCommon({}, ...n);
|
|
270
270
|
}
|
|
271
271
|
resolveOutput(...e) {
|
|
272
272
|
const n = e.map(
|
|
273
|
-
(
|
|
273
|
+
(s) => ({
|
|
274
274
|
assertFieldType: "Output",
|
|
275
|
-
...typeof
|
|
275
|
+
...typeof s == "string" ? { field: s } : s
|
|
276
276
|
})
|
|
277
277
|
);
|
|
278
278
|
return this.resolveWithCommon({}, ...n);
|
|
279
279
|
}
|
|
280
280
|
resolveInput(...e) {
|
|
281
281
|
const n = e.map(
|
|
282
|
-
(
|
|
282
|
+
(s) => ({
|
|
283
283
|
assertFieldType: "Input",
|
|
284
|
-
...typeof
|
|
284
|
+
...typeof s == "string" ? { field: s } : s
|
|
285
285
|
})
|
|
286
286
|
);
|
|
287
287
|
return this.resolveWithCommon({}, ...n);
|
|
@@ -290,51 +290,51 @@ class v {
|
|
|
290
290
|
return this.resolveWithCommon({}, ...e);
|
|
291
291
|
}
|
|
292
292
|
resolveWithCommon(e, ...n) {
|
|
293
|
-
const
|
|
293
|
+
const s = [
|
|
294
294
|
...this.resolvePath,
|
|
295
|
-
...n.map((
|
|
295
|
+
...n.map((r) => typeof r == "string" ? r : r.field)
|
|
296
296
|
];
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
(
|
|
297
|
+
return z(
|
|
298
|
+
f().resolveWithCommon(this.handle, e, ...n),
|
|
299
|
+
(r) => new S(r, s)
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
302
|
get resourceType() {
|
|
303
|
-
return
|
|
303
|
+
return f().getResourceType(this.handle);
|
|
304
304
|
}
|
|
305
305
|
getInputsLocked() {
|
|
306
|
-
return
|
|
306
|
+
return f().getInputsLocked(this.handle);
|
|
307
307
|
}
|
|
308
308
|
getOutputsLocked() {
|
|
309
|
-
return
|
|
309
|
+
return f().getOutputsLocked(this.handle);
|
|
310
310
|
}
|
|
311
311
|
getIsReadyOrError() {
|
|
312
|
-
return
|
|
312
|
+
return f().getIsReadyOrError(this.handle);
|
|
313
313
|
}
|
|
314
314
|
getIsFinal() {
|
|
315
|
-
return
|
|
315
|
+
return f().getIsFinal(this.handle);
|
|
316
316
|
}
|
|
317
317
|
getError() {
|
|
318
318
|
const e = [...this.resolvePath, "error"];
|
|
319
|
-
return
|
|
320
|
-
|
|
321
|
-
(n) => new
|
|
319
|
+
return z(
|
|
320
|
+
f().getError(this.handle),
|
|
321
|
+
(n) => new S(n, e)
|
|
322
322
|
);
|
|
323
323
|
}
|
|
324
324
|
listInputFields() {
|
|
325
|
-
return
|
|
325
|
+
return f().listInputFields(this.handle);
|
|
326
326
|
}
|
|
327
327
|
listOutputFields() {
|
|
328
|
-
return
|
|
328
|
+
return f().listOutputFields(this.handle);
|
|
329
329
|
}
|
|
330
330
|
listDynamicFields() {
|
|
331
|
-
return
|
|
331
|
+
return f().listDynamicFields(this.handle);
|
|
332
332
|
}
|
|
333
333
|
getKeyValueBase64(e) {
|
|
334
|
-
return
|
|
334
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
335
335
|
}
|
|
336
336
|
getKeyValueAsString(e) {
|
|
337
|
-
return
|
|
337
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
338
338
|
}
|
|
339
339
|
getKeyValueAsJson(e) {
|
|
340
340
|
const n = this.getKeyValueAsString(e);
|
|
@@ -342,10 +342,10 @@ class v {
|
|
|
342
342
|
return JSON.parse(n);
|
|
343
343
|
}
|
|
344
344
|
getDataBase64() {
|
|
345
|
-
return
|
|
345
|
+
return f().getDataBase64(this.handle);
|
|
346
346
|
}
|
|
347
347
|
getDataAsString() {
|
|
348
|
-
return
|
|
348
|
+
return f().getDataAsString(this.handle);
|
|
349
349
|
}
|
|
350
350
|
getDataAsJson() {
|
|
351
351
|
const e = this.getDataAsString();
|
|
@@ -356,9 +356,9 @@ class v {
|
|
|
356
356
|
*
|
|
357
357
|
*/
|
|
358
358
|
getPColumns(e = !1, n = "") {
|
|
359
|
-
const
|
|
360
|
-
return
|
|
361
|
-
if (!
|
|
359
|
+
const s = this.parsePObjectCollection(e, n);
|
|
360
|
+
return s === void 0 ? void 0 : Object.entries(s).map(([, i]) => {
|
|
361
|
+
if (!B(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
362
362
|
return i;
|
|
363
363
|
});
|
|
364
364
|
}
|
|
@@ -366,29 +366,29 @@ class v {
|
|
|
366
366
|
*
|
|
367
367
|
*/
|
|
368
368
|
parsePObjectCollection(e = !1, n = "") {
|
|
369
|
-
const
|
|
369
|
+
const s = f().parsePObjectCollection(
|
|
370
370
|
this.handle,
|
|
371
371
|
e,
|
|
372
372
|
n,
|
|
373
373
|
...this.resolvePath
|
|
374
374
|
);
|
|
375
|
-
if (
|
|
376
|
-
const
|
|
377
|
-
for (const [i, o] of Object.entries(
|
|
378
|
-
const
|
|
379
|
-
|
|
375
|
+
if (s === void 0) return;
|
|
376
|
+
const r = {};
|
|
377
|
+
for (const [i, o] of Object.entries(s)) {
|
|
378
|
+
const l = [...this.resolvePath, i];
|
|
379
|
+
r[i] = N(o, (a) => new S(a, l));
|
|
380
380
|
}
|
|
381
|
-
return
|
|
381
|
+
return r;
|
|
382
382
|
}
|
|
383
383
|
getFileContentAsBase64() {
|
|
384
|
-
return new
|
|
384
|
+
return new _(f().getBlobContentAsBase64(this.handle));
|
|
385
385
|
}
|
|
386
386
|
getFileContentAsString() {
|
|
387
|
-
return new
|
|
387
|
+
return new _(f().getBlobContentAsString(this.handle));
|
|
388
388
|
}
|
|
389
389
|
getFileContentAsJson() {
|
|
390
|
-
return new
|
|
391
|
-
|
|
390
|
+
return new _(
|
|
391
|
+
f().getBlobContentAsString(this.handle)
|
|
392
392
|
).mapDefined((e) => JSON.parse(e));
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
@@ -407,7 +407,7 @@ class v {
|
|
|
407
407
|
* @returns downloaded file handle
|
|
408
408
|
*/
|
|
409
409
|
getFileHandle() {
|
|
410
|
-
return new
|
|
410
|
+
return new _(f().getDownloadedBlobContentHandle(this.handle));
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* @deprecated use getFileHandle
|
|
@@ -419,7 +419,7 @@ class v {
|
|
|
419
419
|
* @returns downloaded file handle
|
|
420
420
|
*/
|
|
421
421
|
getRemoteFileHandle() {
|
|
422
|
-
return new
|
|
422
|
+
return new _(f().getOnDemandBlobContentHandle(this.handle));
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
425
425
|
* @deprecated use getRemoteFileHandle
|
|
@@ -431,22 +431,22 @@ class v {
|
|
|
431
431
|
* @returns the url to the extracted folder
|
|
432
432
|
*/
|
|
433
433
|
extractArchiveAndGetURL(e) {
|
|
434
|
-
return new
|
|
434
|
+
return new _(f().extractArchiveAndGetURL(this.handle, e));
|
|
435
435
|
}
|
|
436
436
|
getImportProgress() {
|
|
437
|
-
return new
|
|
437
|
+
return new _(f().getImportProgress(this.handle));
|
|
438
438
|
}
|
|
439
439
|
getLastLogs(e) {
|
|
440
|
-
return new
|
|
440
|
+
return new _(f().getLastLogs(this.handle, e));
|
|
441
441
|
}
|
|
442
442
|
getProgressLog(e) {
|
|
443
|
-
return new
|
|
443
|
+
return new _(f().getProgressLog(this.handle, e));
|
|
444
444
|
}
|
|
445
445
|
getProgressLogWithInfo(e) {
|
|
446
|
-
return new
|
|
446
|
+
return new _(f().getProgressLogWithInfo(this.handle, e));
|
|
447
447
|
}
|
|
448
448
|
getLogHandle() {
|
|
449
|
-
return new
|
|
449
|
+
return new _(f().getLogHandle(this.handle));
|
|
450
450
|
}
|
|
451
451
|
allFieldsResolved(e = "Input") {
|
|
452
452
|
switch (e) {
|
|
@@ -461,114 +461,114 @@ class v {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
mapFields(e, n) {
|
|
464
|
-
const { fieldType:
|
|
464
|
+
const { fieldType: s, requireLocked: r, skipUnresolved: i } = {
|
|
465
465
|
fieldType: "Input",
|
|
466
466
|
requireLocked: !0,
|
|
467
467
|
skipUnresolved: !1,
|
|
468
468
|
...n
|
|
469
469
|
}, o = e;
|
|
470
|
-
if (
|
|
470
|
+
if (r && (s === "Input" && !this.getInputsLocked() || s === "Output" && !this.getOutputsLocked()))
|
|
471
471
|
return;
|
|
472
|
-
let
|
|
473
|
-
(u) => [u, this.resolve({ field: u, assertFieldType:
|
|
472
|
+
let a = (s === "Input" ? this.listInputFields() : s === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
473
|
+
(u) => [u, this.resolve({ field: u, assertFieldType: s })]
|
|
474
474
|
);
|
|
475
|
-
return i && (
|
|
475
|
+
return i && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, g]) => o(u, g));
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const pe = "staging", fe = "main", Le = {
|
|
479
479
|
inlineColumnsSupport: !0,
|
|
480
480
|
activeArgs: !0
|
|
481
481
|
};
|
|
482
|
-
function
|
|
482
|
+
function he(t) {
|
|
483
483
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Y(t, e, n) {
|
|
486
486
|
if (e.has(n)) return;
|
|
487
487
|
if (e.add(n), typeof n === "object")
|
|
488
|
-
if (
|
|
488
|
+
if (he(n)) n.__awaited_futures__.forEach((r) => t.add(r));
|
|
489
489
|
else if (Array.isArray(n))
|
|
490
|
-
for (const
|
|
490
|
+
for (const r of n) Y(t, e, r);
|
|
491
491
|
else
|
|
492
|
-
for (const [,
|
|
493
|
-
|
|
492
|
+
for (const [, r] of Object.entries(n))
|
|
493
|
+
r !== n && Y(t, e, r);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function De(t) {
|
|
496
496
|
const e = /* @__PURE__ */ new Set();
|
|
497
|
-
return
|
|
497
|
+
return Y(e, /* @__PURE__ */ new Set(), t), e;
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
500
500
|
__proto__: null,
|
|
501
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
502
|
-
MainAccessorName:
|
|
503
|
-
StagingAccessorName:
|
|
504
|
-
getAllFutureAwaits:
|
|
505
|
-
isFutureAwait:
|
|
506
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
507
|
-
type:
|
|
508
|
-
importance:
|
|
509
|
-
id:
|
|
510
|
-
label:
|
|
511
|
-
}),
|
|
512
|
-
function
|
|
513
|
-
const
|
|
514
|
-
var
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
const
|
|
518
|
-
n.addLabelAsSuffix ?
|
|
501
|
+
GlobalCfgRenderCtxFeatureFlags: Le,
|
|
502
|
+
MainAccessorName: fe,
|
|
503
|
+
StagingAccessorName: pe,
|
|
504
|
+
getAllFutureAwaits: De,
|
|
505
|
+
isFutureAwait: he
|
|
506
|
+
}, Symbol.toStringTag, { value: "Module" })), Oe = "pl7.app/label", ke = "pl7.app/trace", Ee = T.object({
|
|
507
|
+
type: T.string(),
|
|
508
|
+
importance: T.number().optional(),
|
|
509
|
+
id: T.string().optional(),
|
|
510
|
+
label: T.string()
|
|
511
|
+
}), Ve = T.array(Ee), je = 1e-3, Ne = "__LABEL__", se = "__LABEL__@1";
|
|
512
|
+
function re(t, e, n = {}) {
|
|
513
|
+
const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = t.map((d) => {
|
|
514
|
+
var A, ee;
|
|
515
|
+
const h = e(d), p = (A = h.annotations) == null ? void 0 : A[Oe], b = (ee = h.annotations) == null ? void 0 : ee[ke], m = (b ? Ve.safeParse(JSON.parse(b)).data : void 0) ?? [];
|
|
516
|
+
if (p) {
|
|
517
|
+
const C = { label: p, type: Ne, importance: -2 };
|
|
518
|
+
n.addLabelAsSuffix ? m.push(C) : m.splice(0, 0, C);
|
|
519
519
|
}
|
|
520
|
-
const
|
|
521
|
-
for (let
|
|
522
|
-
const { type:
|
|
523
|
-
|
|
524
|
-
const x = `${
|
|
525
|
-
|
|
520
|
+
const I = [], v = /* @__PURE__ */ new Map();
|
|
521
|
+
for (let C = m.length - 1; C >= 0; --C) {
|
|
522
|
+
const { type: J } = m[C], be = m[C].importance ?? 0, M = (v.get(J) ?? 0) + 1;
|
|
523
|
+
v.set(J, M);
|
|
524
|
+
const x = `${J}@${M}`;
|
|
525
|
+
r.set(x, (r.get(x) ?? 0) + 1), s.set(
|
|
526
526
|
x,
|
|
527
527
|
Math.max(
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
s.get(x) ?? Number.NEGATIVE_INFINITY,
|
|
529
|
+
be - (m.length - C) * je
|
|
530
530
|
)
|
|
531
|
-
),
|
|
531
|
+
), I.push({ ...m[C], fullType: x, occurenceIndex: M });
|
|
532
532
|
}
|
|
533
|
-
return
|
|
534
|
-
value:
|
|
535
|
-
spec:
|
|
536
|
-
label:
|
|
537
|
-
fullTrace:
|
|
533
|
+
return I.reverse(), {
|
|
534
|
+
value: d,
|
|
535
|
+
spec: h,
|
|
536
|
+
label: p,
|
|
537
|
+
fullTrace: I
|
|
538
538
|
};
|
|
539
|
-
}), o = [],
|
|
540
|
-
|
|
541
|
-
for (const [
|
|
542
|
-
|
|
543
|
-
const u = (
|
|
544
|
-
const
|
|
539
|
+
}), o = [], l = [], a = [...s];
|
|
540
|
+
a.sort(([, d], [, h]) => h - d);
|
|
541
|
+
for (const [d] of a)
|
|
542
|
+
d.endsWith("@1") || r.get(d) === t.length ? o.push(d) : l.push(d);
|
|
543
|
+
const u = (d) => i.map((h) => {
|
|
544
|
+
const p = h.fullTrace.filter((m) => d.has(m.fullType)).map((m) => m.label), b = n.separator ?? " / ";
|
|
545
545
|
return {
|
|
546
|
-
label:
|
|
547
|
-
value:
|
|
546
|
+
label: p.join(b),
|
|
547
|
+
value: h.value
|
|
548
548
|
};
|
|
549
549
|
});
|
|
550
550
|
if (o.length === 0) {
|
|
551
|
-
if (
|
|
552
|
-
return u(new Set(
|
|
553
|
-
}
|
|
554
|
-
let
|
|
555
|
-
for (;
|
|
556
|
-
const
|
|
557
|
-
n.includeNativeLabel &&
|
|
558
|
-
for (let
|
|
559
|
-
|
|
560
|
-
const
|
|
561
|
-
if (new Set(
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
return u(/* @__PURE__ */ new Set([...o, ...
|
|
565
|
-
}
|
|
566
|
-
class
|
|
551
|
+
if (l.length !== 0) throw new Error("Assertion error.");
|
|
552
|
+
return u(new Set(se));
|
|
553
|
+
}
|
|
554
|
+
let g = 0, c = 0;
|
|
555
|
+
for (; g < o.length; ) {
|
|
556
|
+
const d = /* @__PURE__ */ new Set();
|
|
557
|
+
n.includeNativeLabel && d.add(se);
|
|
558
|
+
for (let p = 0; p < g; ++p) d.add(o[p]);
|
|
559
|
+
d.add(o[c]);
|
|
560
|
+
const h = u(d);
|
|
561
|
+
if (new Set(h.map((p) => p.label)).size === t.length) return h;
|
|
562
|
+
c++, c == o.length && (g++, c = g);
|
|
563
|
+
}
|
|
564
|
+
return u(/* @__PURE__ */ new Set([...o, ...l]));
|
|
565
|
+
}
|
|
566
|
+
class Ue {
|
|
567
567
|
constructor() {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
var
|
|
571
|
-
return ((
|
|
568
|
+
P(this, "ctx", f());
|
|
569
|
+
P(this, "defaultLabelFn", (e, n) => {
|
|
570
|
+
var s;
|
|
571
|
+
return ((s = e.annotations) == null ? void 0 : s["pl7.app/label"]) ?? "Unlabelled";
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
574
|
/**
|
|
@@ -578,13 +578,33 @@ class De {
|
|
|
578
578
|
return this.ctx.calculateOptions(e);
|
|
579
579
|
}
|
|
580
580
|
getOptions(e, n) {
|
|
581
|
-
const r = this.getSpecs().entries.filter((
|
|
582
|
-
return typeof n == "object" || typeof n > "u" ?
|
|
583
|
-
ref:
|
|
584
|
-
label:
|
|
585
|
-
})) : r.map((
|
|
586
|
-
ref:
|
|
587
|
-
label: n(
|
|
581
|
+
const s = typeof e == "function" ? e : te(e), r = this.getSpecs().entries.filter((i) => s(i.obj));
|
|
582
|
+
return typeof n == "object" || typeof n > "u" ? re(r, (i) => i.obj, n ?? {}).map(({ value: { ref: i }, label: o }) => ({
|
|
583
|
+
ref: i,
|
|
584
|
+
label: o
|
|
585
|
+
})) : r.map((i) => ({
|
|
586
|
+
ref: i.ref,
|
|
587
|
+
label: n(i.obj, i.ref)
|
|
588
|
+
}));
|
|
589
|
+
}
|
|
590
|
+
// Implementation
|
|
591
|
+
getAnchoredOptions(e, n, s) {
|
|
592
|
+
const r = {};
|
|
593
|
+
if (!(e instanceof $))
|
|
594
|
+
for (const [a, u] of Object.entries(e))
|
|
595
|
+
if (Ae(u)) {
|
|
596
|
+
const g = this.getPColumnSpecByRef(u);
|
|
597
|
+
if (!g)
|
|
598
|
+
return;
|
|
599
|
+
r[a] = g;
|
|
600
|
+
} else
|
|
601
|
+
r[a] = u;
|
|
602
|
+
const i = typeof n == "function" ? n : te(
|
|
603
|
+
Array.isArray(n) ? n.map((a) => ne(r, a)) : ne(r, n)
|
|
604
|
+
), o = this.getSpecs().entries.filter(({ obj: a }) => G(a) ? i(a) : !1), l = e instanceof $ ? e : new $(r);
|
|
605
|
+
return re(o, (a) => a.obj, s ?? {}).map(({ value: { obj: a }, label: u }) => ({
|
|
606
|
+
value: l.deriveString(a),
|
|
607
|
+
label: u
|
|
588
608
|
}));
|
|
589
609
|
}
|
|
590
610
|
/**
|
|
@@ -601,7 +621,7 @@ class De {
|
|
|
601
621
|
ref: n.ref,
|
|
602
622
|
obj: {
|
|
603
623
|
...n.obj,
|
|
604
|
-
data: new
|
|
624
|
+
data: new S(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
605
625
|
}
|
|
606
626
|
}))
|
|
607
627
|
};
|
|
@@ -620,9 +640,9 @@ class De {
|
|
|
620
640
|
ref: n.ref,
|
|
621
641
|
obj: {
|
|
622
642
|
...n.obj,
|
|
623
|
-
data:
|
|
643
|
+
data: Se(
|
|
624
644
|
n.obj.data,
|
|
625
|
-
(
|
|
645
|
+
(s) => new S(s, [n.ref.blockId, n.ref.name])
|
|
626
646
|
)
|
|
627
647
|
}
|
|
628
648
|
}))
|
|
@@ -644,10 +664,10 @@ class De {
|
|
|
644
664
|
getDataByRef(e) {
|
|
645
665
|
var n;
|
|
646
666
|
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
|
|
647
|
-
(
|
|
648
|
-
)) == null ? void 0 : n.obj :
|
|
667
|
+
(s) => s.ref.blockId === e.blockId && s.ref.name === e.name
|
|
668
|
+
)) == null ? void 0 : n.obj : N(
|
|
649
669
|
this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
|
|
650
|
-
(
|
|
670
|
+
(s) => new S(s, [e.blockId, e.name])
|
|
651
671
|
);
|
|
652
672
|
}
|
|
653
673
|
/**
|
|
@@ -658,7 +678,7 @@ class De {
|
|
|
658
678
|
getPColumnByRef(e) {
|
|
659
679
|
const n = this.getDataByRef(e);
|
|
660
680
|
if (n)
|
|
661
|
-
return
|
|
681
|
+
return we(n);
|
|
662
682
|
}
|
|
663
683
|
/**
|
|
664
684
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -668,7 +688,7 @@ class De {
|
|
|
668
688
|
getPColumnSpecByRef(e) {
|
|
669
689
|
const n = this.getSpecByRef(e);
|
|
670
690
|
if (n) {
|
|
671
|
-
if (!
|
|
691
|
+
if (!G(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
672
692
|
return n;
|
|
673
693
|
}
|
|
674
694
|
}
|
|
@@ -677,10 +697,7 @@ class De {
|
|
|
677
697
|
* @returns object spec associated with the ref
|
|
678
698
|
*/
|
|
679
699
|
getSpecByRef(e) {
|
|
680
|
-
|
|
681
|
-
return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
|
|
682
|
-
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
683
|
-
)) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
|
|
700
|
+
return this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
|
|
684
701
|
}
|
|
685
702
|
/**
|
|
686
703
|
* @param spec object specification
|
|
@@ -689,23 +706,23 @@ class De {
|
|
|
689
706
|
*/
|
|
690
707
|
findDataWithCompatibleSpec(e) {
|
|
691
708
|
const n = [];
|
|
692
|
-
e: for (const
|
|
693
|
-
if (!
|
|
709
|
+
e: for (const s of this.getData().entries) {
|
|
710
|
+
if (!G(s.obj.spec))
|
|
694
711
|
continue;
|
|
695
|
-
const
|
|
696
|
-
if (e.name ===
|
|
712
|
+
const r = s.obj.spec;
|
|
713
|
+
if (e.name === r.name && e.valueType === r.valueType && e.axesSpec.length === r.axesSpec.length && X(e.domain, r.domain)) {
|
|
697
714
|
for (let i = 0; i < e.axesSpec.length; ++i) {
|
|
698
|
-
const o = e.axesSpec[i],
|
|
699
|
-
if (o.name !==
|
|
715
|
+
const o = e.axesSpec[i], l = r.axesSpec[i];
|
|
716
|
+
if (o.name !== l.name || o.type !== l.type || !X(o.domain, l.domain))
|
|
700
717
|
continue e;
|
|
701
718
|
}
|
|
702
|
-
n.push(
|
|
719
|
+
n.push(s.obj);
|
|
703
720
|
}
|
|
704
721
|
}
|
|
705
722
|
return n;
|
|
706
723
|
}
|
|
707
724
|
}
|
|
708
|
-
function
|
|
725
|
+
function X(t, e) {
|
|
709
726
|
if (t === void 0) return e === void 0;
|
|
710
727
|
if (e === void 0) return !0;
|
|
711
728
|
for (const n in e)
|
|
@@ -714,13 +731,13 @@ function z(t, e) {
|
|
|
714
731
|
}
|
|
715
732
|
class V {
|
|
716
733
|
constructor() {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
734
|
+
P(this, "ctx");
|
|
735
|
+
P(this, "args");
|
|
736
|
+
P(this, "uiState");
|
|
720
737
|
// lazy rendering because this feature is rarely used
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
this.ctx =
|
|
738
|
+
P(this, "_activeArgsCache");
|
|
739
|
+
P(this, "resultPool", new Ue());
|
|
740
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
724
741
|
}
|
|
725
742
|
/**
|
|
726
743
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -736,16 +753,16 @@ class V {
|
|
|
736
753
|
// return this.ctx.featureFlags;
|
|
737
754
|
// }
|
|
738
755
|
getNamedAccessor(e) {
|
|
739
|
-
return
|
|
756
|
+
return z(
|
|
740
757
|
this.ctx.getAccessorHandleByName(e),
|
|
741
|
-
(n) => new
|
|
758
|
+
(n) => new S(n, [e])
|
|
742
759
|
);
|
|
743
760
|
}
|
|
744
761
|
get prerun() {
|
|
745
|
-
return this.getNamedAccessor(
|
|
762
|
+
return this.getNamedAccessor(pe);
|
|
746
763
|
}
|
|
747
764
|
get outputs() {
|
|
748
|
-
return this.getNamedAccessor(
|
|
765
|
+
return this.getNamedAccessor(fe);
|
|
749
766
|
}
|
|
750
767
|
/**
|
|
751
768
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -753,43 +770,43 @@ class V {
|
|
|
753
770
|
*/
|
|
754
771
|
findLabels(e) {
|
|
755
772
|
const n = this.resultPool.getData();
|
|
756
|
-
for (const
|
|
757
|
-
if (!
|
|
758
|
-
const
|
|
759
|
-
if (
|
|
760
|
-
if (
|
|
761
|
-
throw Error(`Expected JSON column for labels, got: ${
|
|
773
|
+
for (const s of n.entries) {
|
|
774
|
+
if (!B(s.obj)) continue;
|
|
775
|
+
const r = s.obj.spec;
|
|
776
|
+
if (r.name === "pl7.app/label" && r.axesSpec.length === 1 && r.axesSpec[0].name === e.name && r.axesSpec[0].type === e.type && X(e.domain, r.axesSpec[0].domain)) {
|
|
777
|
+
if (s.obj.data.resourceType.name !== "PColumnData/Json")
|
|
778
|
+
throw Error(`Expected JSON column for labels, got: ${s.obj.data.resourceType.name}`);
|
|
762
779
|
return Object.fromEntries(
|
|
763
780
|
Object.entries(
|
|
764
|
-
|
|
781
|
+
s.obj.data.getDataAsJson().data
|
|
765
782
|
).map((o) => [JSON.parse(o[0])[0], o[1]])
|
|
766
783
|
);
|
|
767
784
|
}
|
|
768
785
|
}
|
|
769
786
|
}
|
|
770
787
|
verifyInlineColumnsSupport(e) {
|
|
771
|
-
var
|
|
772
|
-
const n = e.some((i) => !(i.data instanceof
|
|
773
|
-
if (n && !
|
|
788
|
+
var r;
|
|
789
|
+
const n = e.some((i) => !(i.data instanceof S)), s = ((r = this.ctx.featureFlags) == null ? void 0 : r.inlineColumnsSupport) === !0;
|
|
790
|
+
if (n && !s) throw Error("inline columns not supported");
|
|
774
791
|
}
|
|
775
792
|
createPFrame(e) {
|
|
776
793
|
return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
|
|
777
|
-
e.map((n) =>
|
|
794
|
+
e.map((n) => N(n, (s) => s instanceof S ? s.handle : s))
|
|
778
795
|
);
|
|
779
796
|
}
|
|
780
797
|
createPTable(e) {
|
|
781
|
-
|
|
798
|
+
let n;
|
|
782
799
|
return "columns" in e ? n = {
|
|
783
800
|
src: {
|
|
784
801
|
type: "full",
|
|
785
|
-
entries: e.columns.map((
|
|
802
|
+
entries: e.columns.map((s) => ({ type: "column", column: s }))
|
|
786
803
|
},
|
|
787
804
|
filters: e.filters ?? [],
|
|
788
805
|
sorting: e.sorting ?? []
|
|
789
|
-
} : n = e, this.verifyInlineColumnsSupport(
|
|
790
|
-
|
|
806
|
+
} : n = e, this.verifyInlineColumnsSupport(Ie(n.src)), this.ctx.createPTable(
|
|
807
|
+
Pe(
|
|
791
808
|
n,
|
|
792
|
-
(
|
|
809
|
+
(s) => N(s, (r) => r instanceof S ? r.handle : r)
|
|
793
810
|
)
|
|
794
811
|
);
|
|
795
812
|
}
|
|
@@ -802,30 +819,30 @@ class V {
|
|
|
802
819
|
return this.ctx.getCurrentUnstableMarker();
|
|
803
820
|
}
|
|
804
821
|
}
|
|
805
|
-
const
|
|
806
|
-
function
|
|
822
|
+
const k = "PColumnData/", Q = k + "ResourceMap", Z = k + "Partitioned/ResourceMap", ie = k + "JsonPartitioned", K = k + "BinaryPartitioned", ge = k + "Partitioned/", oe = ge + "JsonPartitioned", H = ge + "BinaryPartitioned";
|
|
823
|
+
function me(t, e, n, s = [], r) {
|
|
807
824
|
if (t === void 0) return !1;
|
|
808
825
|
switch (t.resourceType.name) {
|
|
809
|
-
case
|
|
826
|
+
case Q: {
|
|
810
827
|
let i = t.getInputsLocked();
|
|
811
828
|
for (const o of t.listInputFields()) {
|
|
812
|
-
const
|
|
813
|
-
u === void 0 && (i = !1), (u !== void 0 ||
|
|
829
|
+
const l = t.resolve({ field: o, assertFieldType: "Input" }), a = [...s, ...JSON.parse(o)], u = l === void 0 ? void 0 : e(l);
|
|
830
|
+
u === void 0 && (i = !1), (u !== void 0 || r) && n.push({ key: a, value: u });
|
|
814
831
|
}
|
|
815
832
|
return i;
|
|
816
833
|
}
|
|
817
|
-
case
|
|
834
|
+
case Z: {
|
|
818
835
|
let i = t.getInputsLocked();
|
|
819
836
|
for (const o of t.listInputFields()) {
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
837
|
+
const l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
838
|
+
if (l === void 0) i = !1;
|
|
822
839
|
else {
|
|
823
|
-
const
|
|
824
|
-
|
|
840
|
+
const a = [...s, ...JSON.parse(o)], u = me(
|
|
841
|
+
l,
|
|
825
842
|
e,
|
|
826
843
|
n,
|
|
827
|
-
|
|
828
|
-
|
|
844
|
+
a,
|
|
845
|
+
r
|
|
829
846
|
);
|
|
830
847
|
i = i && u;
|
|
831
848
|
}
|
|
@@ -836,155 +853,155 @@ function de(t, e, n, r = [], s) {
|
|
|
836
853
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
837
854
|
}
|
|
838
855
|
}
|
|
839
|
-
function
|
|
840
|
-
const
|
|
841
|
-
return { isComplete:
|
|
856
|
+
function Tt(t, e, n = !1) {
|
|
857
|
+
const s = [];
|
|
858
|
+
return { isComplete: me(t, e, s, [], n), data: s };
|
|
842
859
|
}
|
|
843
|
-
const
|
|
860
|
+
const ae = (t) => {
|
|
844
861
|
if (!t.endsWith(".index")) {
|
|
845
862
|
if (t.endsWith(".values"))
|
|
846
863
|
return t.substring(0, t.length - 7);
|
|
847
864
|
throw Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
848
865
|
}
|
|
849
866
|
};
|
|
850
|
-
function
|
|
867
|
+
function Be(t) {
|
|
851
868
|
if (!t) return;
|
|
852
|
-
const e = t.resourceType.name, n = t.getDataAsJson(),
|
|
853
|
-
let
|
|
869
|
+
const e = t.resourceType.name, n = t.getDataAsJson(), s = [];
|
|
870
|
+
let r = 0;
|
|
854
871
|
switch (e) {
|
|
855
|
-
case
|
|
856
|
-
|
|
872
|
+
case Q:
|
|
873
|
+
r = n.keyLength;
|
|
857
874
|
break;
|
|
858
|
-
case
|
|
859
|
-
|
|
875
|
+
case Z:
|
|
876
|
+
r = n.partitionKeyLength + n.keyLength;
|
|
860
877
|
break;
|
|
861
|
-
case
|
|
862
|
-
case
|
|
863
|
-
|
|
878
|
+
case ie:
|
|
879
|
+
case K:
|
|
880
|
+
r = n.partitionKeyLength;
|
|
864
881
|
break;
|
|
865
|
-
case
|
|
866
|
-
case
|
|
867
|
-
|
|
882
|
+
case H:
|
|
883
|
+
case oe:
|
|
884
|
+
r = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
868
885
|
break;
|
|
869
886
|
}
|
|
870
887
|
switch (e) {
|
|
871
|
-
case
|
|
872
|
-
case
|
|
873
|
-
case
|
|
888
|
+
case Q:
|
|
889
|
+
case ie:
|
|
890
|
+
case K:
|
|
874
891
|
for (let i of t.listInputFields()) {
|
|
875
|
-
if (e ===
|
|
876
|
-
const
|
|
877
|
-
if (
|
|
892
|
+
if (e === K) {
|
|
893
|
+
const l = ae(i);
|
|
894
|
+
if (l) i = l;
|
|
878
895
|
else continue;
|
|
879
896
|
}
|
|
880
897
|
const o = [...JSON.parse(i)];
|
|
881
|
-
|
|
898
|
+
s.push(o);
|
|
882
899
|
}
|
|
883
900
|
break;
|
|
884
|
-
case
|
|
885
|
-
case
|
|
886
|
-
case
|
|
901
|
+
case Z:
|
|
902
|
+
case H:
|
|
903
|
+
case oe:
|
|
887
904
|
for (const i of t.listInputFields()) {
|
|
888
|
-
const o = [...JSON.parse(i)],
|
|
889
|
-
if (
|
|
890
|
-
for (let
|
|
891
|
-
if (e ===
|
|
892
|
-
const
|
|
893
|
-
if (
|
|
905
|
+
const o = [...JSON.parse(i)], l = t.resolve({ field: i, assertFieldType: "Input" });
|
|
906
|
+
if (l !== void 0)
|
|
907
|
+
for (let a of l.listInputFields()) {
|
|
908
|
+
if (e === H) {
|
|
909
|
+
const g = ae(a);
|
|
910
|
+
if (g) a = g;
|
|
894
911
|
else continue;
|
|
895
912
|
}
|
|
896
|
-
const u = [...o, ...JSON.parse(
|
|
897
|
-
|
|
913
|
+
const u = [...o, ...JSON.parse(a)];
|
|
914
|
+
s.push(u);
|
|
898
915
|
}
|
|
899
916
|
}
|
|
900
917
|
break;
|
|
901
918
|
}
|
|
902
|
-
return { data:
|
|
919
|
+
return { data: s, keyLength: r };
|
|
903
920
|
}
|
|
904
|
-
function
|
|
905
|
-
const e =
|
|
921
|
+
function xt(t) {
|
|
922
|
+
const e = Be(t);
|
|
906
923
|
if (!e) return;
|
|
907
|
-
const { data: n, keyLength:
|
|
908
|
-
for (let i = 0; i <
|
|
909
|
-
|
|
924
|
+
const { data: n, keyLength: s } = e, r = [];
|
|
925
|
+
for (let i = 0; i < s; ++i)
|
|
926
|
+
r.push(/* @__PURE__ */ new Set());
|
|
910
927
|
for (const i of n) {
|
|
911
|
-
if (i.length !==
|
|
928
|
+
if (i.length !== s)
|
|
912
929
|
throw new Error("key length does not match partition length");
|
|
913
|
-
for (let o = 0; o <
|
|
914
|
-
|
|
930
|
+
for (let o = 0; o < s; ++o)
|
|
931
|
+
r[o].add(i[o]);
|
|
915
932
|
}
|
|
916
|
-
return
|
|
933
|
+
return r.map((i) => Array.from(i.values()));
|
|
917
934
|
}
|
|
918
|
-
const
|
|
919
|
-
function
|
|
935
|
+
const L = "1.23.4";
|
|
936
|
+
function Je(t) {
|
|
920
937
|
return t.__renderLambda === !0;
|
|
921
938
|
}
|
|
922
|
-
function
|
|
939
|
+
function q(t) {
|
|
923
940
|
if (t !== void 0)
|
|
924
|
-
return
|
|
941
|
+
return Je(t) ? t.handle : t;
|
|
925
942
|
}
|
|
926
|
-
function
|
|
943
|
+
function F(t) {
|
|
927
944
|
if (t !== void 0)
|
|
928
945
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
929
946
|
}
|
|
930
|
-
function
|
|
947
|
+
function Lt(t) {
|
|
931
948
|
if (t.v3 !== void 0) {
|
|
932
949
|
const {
|
|
933
950
|
initialArgs: e,
|
|
934
951
|
initialUiState: n,
|
|
935
|
-
inputsValid:
|
|
936
|
-
outputs:
|
|
952
|
+
inputsValid: s,
|
|
953
|
+
outputs: r,
|
|
937
954
|
renderingMode: i,
|
|
938
955
|
sdkVersion: o,
|
|
939
|
-
sections:
|
|
940
|
-
title:
|
|
956
|
+
sections: l,
|
|
957
|
+
title: a
|
|
941
958
|
} = t.v3, { code: u } = t;
|
|
942
959
|
return {
|
|
943
960
|
initialArgs: e,
|
|
944
961
|
initialUiState: n,
|
|
945
|
-
inputsValid:
|
|
946
|
-
outputs:
|
|
962
|
+
inputsValid: s,
|
|
963
|
+
outputs: r,
|
|
947
964
|
renderingMode: i,
|
|
948
965
|
sdkVersion: o,
|
|
949
|
-
sections:
|
|
950
|
-
title:
|
|
966
|
+
sections: l,
|
|
967
|
+
title: a,
|
|
951
968
|
code: u
|
|
952
969
|
};
|
|
953
970
|
} else if (t.inputsValid !== void 0) {
|
|
954
|
-
const { sdkVersion: e, renderingMode: n, outputs:
|
|
955
|
-
if (e === void 0 || n === void 0 ||
|
|
971
|
+
const { sdkVersion: e, renderingMode: n, outputs: s, inputsValid: r, sections: i, initialArgs: o, code: l } = t, a = Object.keys(t);
|
|
972
|
+
if (e === void 0 || n === void 0 || s === void 0 || r === void 0 || i === void 0 || o === void 0)
|
|
956
973
|
throw new Error(
|
|
957
|
-
`Malformed config v2. SDK version ${e}; Fields = ${
|
|
974
|
+
`Malformed config v2. SDK version ${e}; Fields = ${a.join(", ")}`
|
|
958
975
|
);
|
|
959
976
|
return {
|
|
960
977
|
sdkVersion: e,
|
|
961
978
|
renderingMode: n,
|
|
962
979
|
initialArgs: o,
|
|
963
980
|
outputs: Object.fromEntries(
|
|
964
|
-
Object.entries(
|
|
981
|
+
Object.entries(s).map(([u, g]) => [u, F(g)])
|
|
965
982
|
),
|
|
966
|
-
inputsValid:
|
|
967
|
-
sections:
|
|
983
|
+
inputsValid: F(r),
|
|
984
|
+
sections: F(i),
|
|
968
985
|
initialUiState: void 0,
|
|
969
|
-
code:
|
|
986
|
+
code: l
|
|
970
987
|
};
|
|
971
988
|
} else if (t.renderingMode !== void 0) {
|
|
972
|
-
const { sdkVersion: e, canRun: n, renderingMode:
|
|
973
|
-
if (
|
|
989
|
+
const { sdkVersion: e, canRun: n, renderingMode: s, outputs: r, sections: i, initialArgs: o, code: l } = t, a = Object.keys(t);
|
|
990
|
+
if (s === void 0 || r === void 0 || n === void 0 || i === void 0 || o === void 0)
|
|
974
991
|
throw new Error(
|
|
975
|
-
`Malformed config v1. SDK version ${e}; Fields = ${
|
|
992
|
+
`Malformed config v1. SDK version ${e}; Fields = ${a.join(", ")}`
|
|
976
993
|
);
|
|
977
994
|
return {
|
|
978
995
|
sdkVersion: e ?? "unknown",
|
|
979
|
-
renderingMode:
|
|
996
|
+
renderingMode: s,
|
|
980
997
|
initialArgs: o,
|
|
981
998
|
outputs: Object.fromEntries(
|
|
982
|
-
Object.entries(
|
|
999
|
+
Object.entries(r).map(([u, g]) => [u, F(g)])
|
|
983
1000
|
),
|
|
984
|
-
inputsValid:
|
|
985
|
-
sections:
|
|
1001
|
+
inputsValid: F(n),
|
|
1002
|
+
sections: F(i),
|
|
986
1003
|
initialUiState: void 0,
|
|
987
|
-
code:
|
|
1004
|
+
code: l
|
|
988
1005
|
};
|
|
989
1006
|
} else {
|
|
990
1007
|
const { sdkVersion: e } = t, n = Object.keys(t);
|
|
@@ -993,12 +1010,12 @@ function Pt(t) {
|
|
|
993
1010
|
);
|
|
994
1011
|
}
|
|
995
1012
|
}
|
|
996
|
-
class
|
|
997
|
-
constructor(e, n,
|
|
998
|
-
this._renderingMode = e, this._initialArgs = n, this._initialUiState =
|
|
1013
|
+
class w {
|
|
1014
|
+
constructor(e, n, s, r, i, o, l) {
|
|
1015
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = s, this._outputs = r, this._inputsValid = i, this._sections = o, this._title = l;
|
|
999
1016
|
}
|
|
1000
1017
|
static create(e = "Heavy") {
|
|
1001
|
-
return new
|
|
1018
|
+
return new w(
|
|
1002
1019
|
e,
|
|
1003
1020
|
void 0,
|
|
1004
1021
|
{},
|
|
@@ -1008,10 +1025,10 @@ class _ {
|
|
|
1008
1025
|
void 0
|
|
1009
1026
|
);
|
|
1010
1027
|
}
|
|
1011
|
-
output(e, n,
|
|
1028
|
+
output(e, n, s = {}) {
|
|
1012
1029
|
if (typeof n == "function") {
|
|
1013
|
-
const
|
|
1014
|
-
return E(
|
|
1030
|
+
const r = `output#${e}`;
|
|
1031
|
+
return E(r, () => n(new V())), new w(
|
|
1015
1032
|
this._renderingMode,
|
|
1016
1033
|
this._initialArgs,
|
|
1017
1034
|
this._initialUiState,
|
|
@@ -1019,8 +1036,8 @@ class _ {
|
|
|
1019
1036
|
...this._outputs,
|
|
1020
1037
|
[e]: {
|
|
1021
1038
|
__renderLambda: !0,
|
|
1022
|
-
handle:
|
|
1023
|
-
...
|
|
1039
|
+
handle: r,
|
|
1040
|
+
...s
|
|
1024
1041
|
}
|
|
1025
1042
|
},
|
|
1026
1043
|
this._inputsValid,
|
|
@@ -1028,7 +1045,7 @@ class _ {
|
|
|
1028
1045
|
this._title
|
|
1029
1046
|
);
|
|
1030
1047
|
} else
|
|
1031
|
-
return new
|
|
1048
|
+
return new w(
|
|
1032
1049
|
this._renderingMode,
|
|
1033
1050
|
this._initialArgs,
|
|
1034
1051
|
this._initialUiState,
|
|
@@ -1046,7 +1063,7 @@ class _ {
|
|
|
1046
1063
|
return this.output(e, n, { retentive: !0 });
|
|
1047
1064
|
}
|
|
1048
1065
|
argsValid(e) {
|
|
1049
|
-
return typeof e == "function" ? (E("inputsValid", () => e(new V())), new
|
|
1066
|
+
return typeof e == "function" ? (E("inputsValid", () => e(new V())), new w(
|
|
1050
1067
|
this._renderingMode,
|
|
1051
1068
|
this._initialArgs,
|
|
1052
1069
|
this._initialUiState,
|
|
@@ -1057,7 +1074,7 @@ class _ {
|
|
|
1057
1074
|
},
|
|
1058
1075
|
this._sections,
|
|
1059
1076
|
this._title
|
|
1060
|
-
)) : new
|
|
1077
|
+
)) : new w(
|
|
1061
1078
|
this._renderingMode,
|
|
1062
1079
|
this._initialArgs,
|
|
1063
1080
|
this._initialUiState,
|
|
@@ -1068,7 +1085,7 @@ class _ {
|
|
|
1068
1085
|
);
|
|
1069
1086
|
}
|
|
1070
1087
|
sections(e) {
|
|
1071
|
-
return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new
|
|
1088
|
+
return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new w(
|
|
1072
1089
|
this._renderingMode,
|
|
1073
1090
|
this._initialArgs,
|
|
1074
1091
|
this._initialUiState,
|
|
@@ -1076,7 +1093,7 @@ class _ {
|
|
|
1076
1093
|
this._inputsValid,
|
|
1077
1094
|
{ __renderLambda: !0, handle: "sections" },
|
|
1078
1095
|
this._title
|
|
1079
|
-
)) : new
|
|
1096
|
+
)) : new w(
|
|
1080
1097
|
this._renderingMode,
|
|
1081
1098
|
this._initialArgs,
|
|
1082
1099
|
this._initialUiState,
|
|
@@ -1088,7 +1105,7 @@ class _ {
|
|
|
1088
1105
|
}
|
|
1089
1106
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1090
1107
|
title(e) {
|
|
1091
|
-
return E("title", () => e(new V())), new
|
|
1108
|
+
return E("title", () => e(new V())), new w(
|
|
1092
1109
|
this._renderingMode,
|
|
1093
1110
|
this._initialArgs,
|
|
1094
1111
|
this._initialUiState,
|
|
@@ -1103,7 +1120,7 @@ class _ {
|
|
|
1103
1120
|
* @deprecated use {@link withArgs}
|
|
1104
1121
|
* */
|
|
1105
1122
|
initialArgs(e) {
|
|
1106
|
-
return new
|
|
1123
|
+
return new w(
|
|
1107
1124
|
this._renderingMode,
|
|
1108
1125
|
e,
|
|
1109
1126
|
this._initialUiState,
|
|
@@ -1115,7 +1132,7 @@ class _ {
|
|
|
1115
1132
|
}
|
|
1116
1133
|
/** Sets initial args for the block, this value must be specified. */
|
|
1117
1134
|
withArgs(e) {
|
|
1118
|
-
return new
|
|
1135
|
+
return new w(
|
|
1119
1136
|
this._renderingMode,
|
|
1120
1137
|
e,
|
|
1121
1138
|
this._initialUiState,
|
|
@@ -1127,7 +1144,7 @@ class _ {
|
|
|
1127
1144
|
}
|
|
1128
1145
|
/** Defines type and sets initial value for block UiState. */
|
|
1129
1146
|
withUiState(e) {
|
|
1130
|
-
return new
|
|
1147
|
+
return new w(
|
|
1131
1148
|
this._renderingMode,
|
|
1132
1149
|
this._initialArgs,
|
|
1133
1150
|
e,
|
|
@@ -1144,7 +1161,7 @@ class _ {
|
|
|
1144
1161
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1145
1162
|
const e = {
|
|
1146
1163
|
v3: {
|
|
1147
|
-
sdkVersion:
|
|
1164
|
+
sdkVersion: L,
|
|
1148
1165
|
renderingMode: this._renderingMode,
|
|
1149
1166
|
initialArgs: this._initialArgs,
|
|
1150
1167
|
initialUiState: this._initialUiState,
|
|
@@ -1154,162 +1171,185 @@ class _ {
|
|
|
1154
1171
|
outputs: this._outputs
|
|
1155
1172
|
},
|
|
1156
1173
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1157
|
-
sdkVersion:
|
|
1174
|
+
sdkVersion: L,
|
|
1158
1175
|
renderingMode: this._renderingMode,
|
|
1159
1176
|
initialArgs: this._initialArgs,
|
|
1160
|
-
inputsValid:
|
|
1161
|
-
sections:
|
|
1177
|
+
inputsValid: q(this._inputsValid),
|
|
1178
|
+
sections: q(this._sections),
|
|
1162
1179
|
outputs: Object.fromEntries(
|
|
1163
|
-
Object.entries(this._outputs).map(([n,
|
|
1180
|
+
Object.entries(this._outputs).map(([n, s]) => [n, q(s)])
|
|
1164
1181
|
)
|
|
1165
1182
|
};
|
|
1166
|
-
return
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
function
|
|
1170
|
-
var u,
|
|
1171
|
-
Array.isArray(
|
|
1172
|
-
const
|
|
1173
|
-
let
|
|
1174
|
-
if (
|
|
1175
|
-
for (const
|
|
1176
|
-
|
|
1177
|
-
return
|
|
1183
|
+
return Fe() ? de({ sdkVersion: L }) : { config: e };
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
function Dt(t, e, n, s) {
|
|
1187
|
+
var u, g;
|
|
1188
|
+
Array.isArray(s) && (s = { filters: s });
|
|
1189
|
+
const r = t.resultPool.getData().entries.map((c) => c.obj).filter(B).filter((c) => c.spec.name === "pl7.app/label" && c.spec.axesSpec.length === 1), i = (c, d) => {
|
|
1190
|
+
let h = c.toString();
|
|
1191
|
+
if (d)
|
|
1192
|
+
for (const p in d)
|
|
1193
|
+
h += p, h += d[p];
|
|
1194
|
+
return h;
|
|
1178
1195
|
}, o = /* @__PURE__ */ new Map();
|
|
1179
|
-
for (const
|
|
1180
|
-
for (const
|
|
1181
|
-
const
|
|
1182
|
-
for (const
|
|
1183
|
-
const
|
|
1184
|
-
if (
|
|
1185
|
-
const
|
|
1186
|
-
if (
|
|
1187
|
-
const
|
|
1188
|
-
o.set(
|
|
1189
|
-
id:
|
|
1196
|
+
for (const c of e)
|
|
1197
|
+
for (const d of c.spec.axesSpec) {
|
|
1198
|
+
const h = R(d);
|
|
1199
|
+
for (const p of r) {
|
|
1200
|
+
const b = p.spec.axesSpec[0], m = R(p.spec.axesSpec[0]);
|
|
1201
|
+
if (D(h, m)) {
|
|
1202
|
+
const I = Object.keys(h.domain ?? {}).length, v = Object.keys(m.domain ?? {}).length;
|
|
1203
|
+
if (I > v) {
|
|
1204
|
+
const A = i(p.id, h.domain);
|
|
1205
|
+
o.set(A, {
|
|
1206
|
+
id: A,
|
|
1190
1207
|
spec: {
|
|
1191
|
-
...
|
|
1192
|
-
axesSpec: [{ ...
|
|
1208
|
+
...p.spec,
|
|
1209
|
+
axesSpec: [{ ...h, annotations: b.annotations }]
|
|
1193
1210
|
},
|
|
1194
|
-
data:
|
|
1211
|
+
data: p.data
|
|
1195
1212
|
});
|
|
1196
1213
|
} else
|
|
1197
|
-
o.set(i(
|
|
1214
|
+
o.set(i(p.id), p);
|
|
1198
1215
|
}
|
|
1199
1216
|
}
|
|
1200
1217
|
}
|
|
1201
1218
|
if ([...e, ...o.values()].some(
|
|
1202
|
-
(
|
|
1219
|
+
(c) => c.data instanceof S && !c.data.getIsReadyOrError()
|
|
1203
1220
|
))
|
|
1204
1221
|
return;
|
|
1205
|
-
let
|
|
1206
|
-
const
|
|
1207
|
-
if (
|
|
1208
|
-
|
|
1209
|
-
for (const
|
|
1210
|
-
|
|
1211
|
-
}
|
|
1212
|
-
return
|
|
1222
|
+
let l = e;
|
|
1223
|
+
const a = [];
|
|
1224
|
+
if (s != null && s.coreColumnPredicate) {
|
|
1225
|
+
l = [];
|
|
1226
|
+
for (const c of e)
|
|
1227
|
+
s.coreColumnPredicate(c.spec) ? l.push(c) : a.push(c);
|
|
1228
|
+
}
|
|
1229
|
+
return a.push(...o.values()), t.createPTable({
|
|
1213
1230
|
src: {
|
|
1214
1231
|
type: "outer",
|
|
1215
1232
|
primary: {
|
|
1216
|
-
type: (
|
|
1217
|
-
entries:
|
|
1233
|
+
type: (s == null ? void 0 : s.coreJoinType) ?? "full",
|
|
1234
|
+
entries: l.map((c) => ({ type: "column", column: c }))
|
|
1218
1235
|
},
|
|
1219
|
-
secondary:
|
|
1236
|
+
secondary: a.map((c) => ({ type: "column", column: c }))
|
|
1220
1237
|
},
|
|
1221
|
-
filters: [...(
|
|
1222
|
-
sorting: ((
|
|
1238
|
+
filters: [...(s == null ? void 0 : s.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
|
|
1239
|
+
sorting: ((g = n == null ? void 0 : n.pTableParams) == null ? void 0 : g.sorting) ?? []
|
|
1223
1240
|
});
|
|
1224
1241
|
}
|
|
1225
|
-
function
|
|
1226
|
-
const
|
|
1242
|
+
function Ot(t, e, n) {
|
|
1243
|
+
const s = t.findLabels(e);
|
|
1227
1244
|
return {
|
|
1228
1245
|
axis: e,
|
|
1229
|
-
options: n.map((
|
|
1230
|
-
value:
|
|
1231
|
-
label: (
|
|
1246
|
+
options: n.map((r) => ({
|
|
1247
|
+
value: r,
|
|
1248
|
+
label: (s == null ? void 0 : s[r]) ?? r.toString()
|
|
1232
1249
|
})),
|
|
1233
1250
|
defaultValue: n[0]
|
|
1234
1251
|
};
|
|
1235
1252
|
}
|
|
1236
|
-
const
|
|
1253
|
+
const Me = (t, e) => {
|
|
1237
1254
|
let n = t.toString();
|
|
1238
|
-
return e == null || e.forEach((
|
|
1239
|
-
if (
|
|
1240
|
-
for (const [
|
|
1241
|
-
n +=
|
|
1255
|
+
return e == null || e.forEach((s) => {
|
|
1256
|
+
if (s)
|
|
1257
|
+
for (const [r, i] of Object.entries(s))
|
|
1258
|
+
n += r, n += i;
|
|
1242
1259
|
}), n;
|
|
1243
1260
|
};
|
|
1244
|
-
function
|
|
1261
|
+
function $e(t) {
|
|
1245
1262
|
if (!t.length)
|
|
1246
1263
|
return [];
|
|
1247
1264
|
let e = [[]];
|
|
1248
1265
|
return t.forEach((n) => {
|
|
1249
|
-
const
|
|
1250
|
-
n.forEach((
|
|
1251
|
-
|
|
1252
|
-
}), e =
|
|
1266
|
+
const s = [];
|
|
1267
|
+
n.forEach((r) => {
|
|
1268
|
+
s.push(...e.map((i) => [...i, r]));
|
|
1269
|
+
}), e = s;
|
|
1253
1270
|
}), e;
|
|
1254
1271
|
}
|
|
1255
|
-
function
|
|
1256
|
-
const n = t.spec.axesSpec.map(
|
|
1257
|
-
return e.spec.axesSpec.map(
|
|
1272
|
+
function Ge(t, e) {
|
|
1273
|
+
const n = t.spec.axesSpec.map(R);
|
|
1274
|
+
return e.spec.axesSpec.map(R).every((r) => n.some((i) => D(i, r) && D(r, i)));
|
|
1258
1275
|
}
|
|
1259
|
-
function
|
|
1260
|
-
const n = t.spec.axesSpec.map(
|
|
1261
|
-
return e.spec.axesSpec.map(
|
|
1276
|
+
function ye(t, e) {
|
|
1277
|
+
const n = t.spec.axesSpec.map(R);
|
|
1278
|
+
return e.spec.axesSpec.map(R).every((r) => n.some((i) => D(i, r)));
|
|
1262
1279
|
}
|
|
1263
|
-
const
|
|
1264
|
-
function
|
|
1265
|
-
const n = t.spec.axesSpec.map(
|
|
1266
|
-
if (
|
|
1280
|
+
const We = "pl7.app/graph/isVirtual", le = "pl7.app/label";
|
|
1281
|
+
function ue(t, e) {
|
|
1282
|
+
const n = t.spec.axesSpec.map(R), s = e.spec.axesSpec.map(R);
|
|
1283
|
+
if (Ge(t, e))
|
|
1267
1284
|
return [];
|
|
1268
|
-
if (!
|
|
1285
|
+
if (!ye(t, e))
|
|
1269
1286
|
return [];
|
|
1270
|
-
const o =
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1287
|
+
const o = s.map((c) => n.filter((d) => D(d, c))), l = $e(o), a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), g = l.map((c) => {
|
|
1288
|
+
const d = /* @__PURE__ */ new Set();
|
|
1289
|
+
return c.map((h, p) => {
|
|
1290
|
+
const b = e.spec.axesSpec[p].domain, m = h.domain;
|
|
1291
|
+
return Object.entries(m ?? {}).forEach(([I, v]) => {
|
|
1292
|
+
if ((b == null ? void 0 : b[I]) === void 0) {
|
|
1293
|
+
const A = JSON.stringify([I, v]);
|
|
1294
|
+
d.add(A), a.add(A);
|
|
1295
|
+
}
|
|
1296
|
+
}), {
|
|
1276
1297
|
...h,
|
|
1277
|
-
annotations: e.spec.axesSpec[
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1298
|
+
annotations: e.spec.axesSpec[p].annotations
|
|
1299
|
+
};
|
|
1300
|
+
}), d;
|
|
1301
|
+
});
|
|
1302
|
+
return [...a].forEach((c) => {
|
|
1303
|
+
g.some((d) => !d.has(c)) && u.add(c);
|
|
1304
|
+
}), l.map((c, d) => {
|
|
1305
|
+
var I;
|
|
1306
|
+
const h = Me(e.id, c.map((v) => v.domain)), p = ((I = e.spec.annotations) == null ? void 0 : I[le]) ?? "", b = [...g[d]].filter((v) => u.has(v)).sort().map((v) => {
|
|
1307
|
+
var A;
|
|
1308
|
+
return (A = JSON.parse(v)) == null ? void 0 : A[1];
|
|
1309
|
+
}).join(" / "), m = {
|
|
1310
|
+
...e.spec.annotations,
|
|
1311
|
+
[We]: "true"
|
|
1312
|
+
};
|
|
1313
|
+
return (p || b) && (m[le] = p && b ? p + " / " + b : p + b), {
|
|
1314
|
+
id: h,
|
|
1315
|
+
spec: {
|
|
1316
|
+
...e.spec,
|
|
1317
|
+
axesSpec: c.map((v, A) => ({
|
|
1318
|
+
...v,
|
|
1319
|
+
annotations: e.spec.axesSpec[A].annotations
|
|
1320
|
+
})),
|
|
1321
|
+
annotations: m
|
|
1322
|
+
},
|
|
1323
|
+
data: e.data
|
|
1324
|
+
};
|
|
1325
|
+
});
|
|
1286
1326
|
}
|
|
1287
|
-
function
|
|
1327
|
+
function Ke(t) {
|
|
1288
1328
|
const e = [];
|
|
1289
1329
|
for (let n = 0; n < t.length; n++)
|
|
1290
|
-
for (let
|
|
1291
|
-
const
|
|
1330
|
+
for (let s = n + 1; s < t.length; s++) {
|
|
1331
|
+
const r = t[n], i = t[s];
|
|
1292
1332
|
e.push(
|
|
1293
|
-
...
|
|
1294
|
-
...
|
|
1333
|
+
...ue(r, i),
|
|
1334
|
+
...ue(i, r)
|
|
1295
1335
|
);
|
|
1296
1336
|
}
|
|
1297
1337
|
return e;
|
|
1298
1338
|
}
|
|
1299
|
-
function
|
|
1339
|
+
function He(t, e) {
|
|
1300
1340
|
const n = [...t];
|
|
1301
|
-
for (const
|
|
1302
|
-
for (const
|
|
1303
|
-
if (
|
|
1341
|
+
for (const s of e)
|
|
1342
|
+
for (const r of t) {
|
|
1343
|
+
if (r.id === s.id)
|
|
1304
1344
|
break;
|
|
1305
|
-
if (
|
|
1306
|
-
n.push(
|
|
1345
|
+
if (ye(r, s)) {
|
|
1346
|
+
n.push(s);
|
|
1307
1347
|
break;
|
|
1308
1348
|
}
|
|
1309
1349
|
}
|
|
1310
1350
|
return n;
|
|
1311
1351
|
}
|
|
1312
|
-
const
|
|
1352
|
+
const qe = [
|
|
1313
1353
|
"Int",
|
|
1314
1354
|
"Long",
|
|
1315
1355
|
"Float",
|
|
@@ -1317,15 +1357,15 @@ const $e = [
|
|
|
1317
1357
|
"String",
|
|
1318
1358
|
"Bytes"
|
|
1319
1359
|
];
|
|
1320
|
-
function
|
|
1360
|
+
function kt(t, e) {
|
|
1321
1361
|
if (e === void 0) return;
|
|
1322
|
-
const n = t.resultPool.getData().entries.map((i) => i.obj).filter(
|
|
1323
|
-
if (!
|
|
1324
|
-
(i) => i.data instanceof
|
|
1362
|
+
const n = t.resultPool.getData().entries.map((i) => i.obj).filter(B).filter((i) => qe.includes(i.spec.valueType)), s = He(e, n), r = [...s, ...Ke(s)];
|
|
1363
|
+
if (!r.some(
|
|
1364
|
+
(i) => i.data instanceof S && !i.data.getIsReadyOrError()
|
|
1325
1365
|
))
|
|
1326
|
-
return t.createPFrame(
|
|
1366
|
+
return t.createPFrame(r);
|
|
1327
1367
|
}
|
|
1328
|
-
class
|
|
1368
|
+
class Et {
|
|
1329
1369
|
constructor(e) {
|
|
1330
1370
|
this.handle = e;
|
|
1331
1371
|
}
|
|
@@ -1345,100 +1385,101 @@ class Tt {
|
|
|
1345
1385
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1346
1386
|
}
|
|
1347
1387
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return
|
|
1388
|
+
function ze(t) {
|
|
1389
|
+
return ce({
|
|
1350
1390
|
__isRef: !0,
|
|
1351
|
-
blockId:
|
|
1352
|
-
name:
|
|
1391
|
+
blockId: U(t, "blockId"),
|
|
1392
|
+
name: U(t, "name")
|
|
1353
1393
|
});
|
|
1354
1394
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return
|
|
1357
|
-
ref:
|
|
1358
|
-
label:
|
|
1395
|
+
function Vt(t) {
|
|
1396
|
+
return ce({
|
|
1397
|
+
ref: ze(U(t, "ref")),
|
|
1398
|
+
label: U(t, "label")
|
|
1359
1399
|
});
|
|
1360
1400
|
}
|
|
1361
|
-
const
|
|
1362
|
-
sdkVersion:
|
|
1401
|
+
const jt = {
|
|
1402
|
+
sdkVersion: L
|
|
1363
1403
|
};
|
|
1364
|
-
function
|
|
1365
|
-
return
|
|
1404
|
+
function Nt() {
|
|
1405
|
+
return de({ sdkVersion: L });
|
|
1366
1406
|
}
|
|
1367
|
-
function
|
|
1407
|
+
function Ut(t) {
|
|
1368
1408
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
1369
1409
|
return globalThis.getEnvironmentValue(t);
|
|
1370
1410
|
}
|
|
1371
1411
|
export {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1412
|
+
tt as Args,
|
|
1413
|
+
w as BlockModel,
|
|
1414
|
+
jt as CurrentSdkInfo,
|
|
1415
|
+
_ as FutureRef,
|
|
1416
|
+
We as IS_VIRTUAL_COLUMN,
|
|
1417
|
+
nt as It,
|
|
1418
|
+
Ft as JsRenderInternal,
|
|
1419
|
+
le as LABEL_ANNOTATION,
|
|
1420
|
+
st as MainOutputs,
|
|
1421
|
+
Ce as OutputError,
|
|
1422
|
+
Oe as PAnnotationLabel,
|
|
1423
|
+
ke as PAnnotationTrace,
|
|
1424
|
+
Et as PFrameImpl,
|
|
1425
|
+
K as RT_BINARY_PARTITIONED,
|
|
1426
|
+
H as RT_BINARY_SUPER_PARTITIONED,
|
|
1427
|
+
ie as RT_JSON_PARTITIONED,
|
|
1428
|
+
oe as RT_JSON_SUPER_PARTITIONED,
|
|
1429
|
+
Q as RT_RESOURCE_MAP,
|
|
1430
|
+
Z as RT_RESOURCE_MAP_PARTITIONED,
|
|
1390
1431
|
V as RenderCtx,
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1432
|
+
Ue as ResultPool,
|
|
1433
|
+
rt as StagingOutputs,
|
|
1434
|
+
Ve as Trace,
|
|
1435
|
+
Ee as TraceEntry,
|
|
1436
|
+
S as TreeNodeAccessor,
|
|
1437
|
+
it as UiState,
|
|
1438
|
+
pt as and,
|
|
1439
|
+
kt as createPFrameForGraphs,
|
|
1440
|
+
Dt as createPlDataTable,
|
|
1441
|
+
Ot as createPlDataTableSheet,
|
|
1442
|
+
re as deriveLabels,
|
|
1443
|
+
q as downgradeCfgOrLambda,
|
|
1444
|
+
He as enrichColumnsWithCompatible,
|
|
1445
|
+
St as extractArchiveAndGetURL,
|
|
1446
|
+
Lt as extractConfig,
|
|
1447
|
+
ut as flatten,
|
|
1448
|
+
Vt as fromPlOption,
|
|
1449
|
+
ze as fromPlRef,
|
|
1450
|
+
Ke as getAdditionalColumns,
|
|
1451
|
+
yt as getBlobContent,
|
|
1452
|
+
vt as getBlobContentAsJson,
|
|
1453
|
+
bt as getBlobContentAsString,
|
|
1454
|
+
_t as getDownloadedBlobContent,
|
|
1455
|
+
Ut as getEnvironmentValue,
|
|
1456
|
+
O as getFromCfg,
|
|
1416
1457
|
j as getImmediate,
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1458
|
+
wt as getImportProgress,
|
|
1459
|
+
U as getJsonField,
|
|
1460
|
+
It as getLastLogs,
|
|
1461
|
+
Rt as getLogHandle,
|
|
1462
|
+
At as getOnDemandBlobContent,
|
|
1463
|
+
Be as getPartitionKeysList,
|
|
1464
|
+
Pt as getProgressLog,
|
|
1465
|
+
Ct as getProgressLogWithInfo,
|
|
1466
|
+
Nt as getRawPlatformaInstance,
|
|
1467
|
+
ht as getResourceField,
|
|
1468
|
+
gt as getResourceValueAsJson,
|
|
1469
|
+
xt as getUniquePartitionKeys,
|
|
1470
|
+
z as ifDef,
|
|
1471
|
+
Je as isConfigLambda,
|
|
1472
|
+
ct as isEmpty,
|
|
1473
|
+
et as isolate,
|
|
1474
|
+
ot as makeArray,
|
|
1475
|
+
ce as makeObject,
|
|
1476
|
+
lt as mapArrayValues,
|
|
1477
|
+
at as mapRecordValues,
|
|
1478
|
+
mt as mapResourceFields,
|
|
1479
|
+
dt as not,
|
|
1480
|
+
ft as or,
|
|
1481
|
+
Tt as parseResourceMap,
|
|
1482
|
+
Re as readOutput,
|
|
1483
|
+
Ze as wrapOutputs
|
|
1443
1484
|
};
|
|
1444
1485
|
//# sourceMappingURL=index.mjs.map
|