@platforma-sdk/model 1.40.5 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,24 +1,24 @@
1
- var rt = Object.defineProperty;
2
- var it = (t, e, n) => e in t ? rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var k = (t, e, n) => it(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as Me, mapPObjectData as Pe, isDataInfoEntries as je, isDataInfo as pe, dataInfoToEntries as ot, selectorsToPredicate as Y, resolveAnchors as we, deriveNativeId as st, isPColumnSpec as oe, isPartitionedDataInfoEntries as at, getAxisId as V, entriesToDataInfo as lt, canonicalizeAxisId as ut, withEnrichments as xe, AnchoredIdDeriver as Fe, isPlRef as ct, mapValueInVOE as pt, ensurePColumn as dt, extractAllColumns as ft, mapPTableDef as ht, mapDataInfo as mt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as Ie, canonicalizeJson as D, parseJson as _e, visitDataInfo as gt, isPTableAbsent as bt, uniquePlId as vt, PTableNA as Ct } from "@milaboratories/pl-model-common";
1
+ var it = Object.defineProperty;
2
+ var ot = (t, e, n) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var V = (t, e, n) => ot(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as xe, deriveNativeId as at, isPColumnSpec as oe, isPartitionedDataInfoEntries as lt, getAxisId as k, entriesToDataInfo as ut, canonicalizeAxisId as ct, withEnrichments as Fe, AnchoredIdDeriver as Ie, isPlRef as pt, mapValueInVOE as dt, ensurePColumn as ft, extractAllColumns as ht, mapPTableDef as mt, mapDataInfo as gt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as _e, canonicalizeJson as D, parseJson as Le, visitDataInfo as bt, isPTableAbsent as vt, uniquePlId as Ct, PTableNA as Tt } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
- import qe from "canonicalize";
6
+ import Be from "canonicalize";
7
7
  import { z as B } from "zod";
8
8
  export * from "@milaboratories/pl-error-like";
9
- class Tt extends Error {
9
+ class St 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 St(t) {
15
- if (!t.ok) throw new Tt(t.errors, t.moreErrors);
14
+ function Pt(t) {
15
+ if (!t.ok) throw new St(t.errors, t.moreErrors);
16
16
  return t.value;
17
17
  }
18
- function mn(t) {
18
+ function hn(t) {
19
19
  return new Proxy(t, {
20
20
  get(e, n) {
21
- return St(e[n]);
21
+ return Pt(e[n]);
22
22
  }
23
23
  });
24
24
  }
@@ -28,17 +28,17 @@ function A(t) {
28
28
  function Z(t) {
29
29
  return { type: "GetFromCtx", variable: t };
30
30
  }
31
- function yn(t) {
31
+ function mn(t) {
32
32
  return {
33
33
  type: "Isolate",
34
34
  cfg: t
35
35
  };
36
36
  }
37
- const gn = Z("$args"), bn = Z("$it"), vn = Z("$prod"), Cn = Z("$staging"), Tn = Z("$ui");
37
+ const gn = Z("$args"), yn = Z("$it"), bn = Z("$prod"), vn = Z("$staging"), Cn = Z("$ui");
38
38
  function se(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
41
- function Be(t) {
41
+ function Je(t) {
42
42
  const e = {};
43
43
  for (const [n, r] of Object.entries(t)) e[n] = A(r);
44
44
  return {
@@ -46,7 +46,7 @@ function Be(t) {
46
46
  template: e
47
47
  };
48
48
  }
49
- function Sn(...t) {
49
+ function Tn(...t) {
50
50
  const e = [];
51
51
  for (const n of t) e.push(A(n));
52
52
  return {
@@ -61,7 +61,7 @@ function ae(t, e) {
61
61
  field: A(e)
62
62
  };
63
63
  }
64
- function Pn(t, e, n = "$it") {
64
+ function Sn(t, e, n = "$it") {
65
65
  return {
66
66
  type: "MapRecordValues",
67
67
  source: t,
@@ -69,7 +69,7 @@ function Pn(t, e, n = "$it") {
69
69
  itVar: n
70
70
  };
71
71
  }
72
- function An(t, e, n = "$it") {
72
+ function Pn(t, e, n = "$it") {
73
73
  return {
74
74
  type: "MapArrayValues",
75
75
  source: t,
@@ -77,46 +77,46 @@ function An(t, e, n = "$it") {
77
77
  itVar: n
78
78
  };
79
79
  }
80
- function wn(t) {
80
+ function An(t) {
81
81
  return {
82
82
  type: "Flatten",
83
83
  source: t
84
84
  };
85
85
  }
86
- function xn(t) {
86
+ function wn(t) {
87
87
  return {
88
88
  type: "IsEmpty",
89
89
  arg: t
90
90
  };
91
91
  }
92
- function Fn(t) {
92
+ function xn(t) {
93
93
  return {
94
94
  type: "Not",
95
95
  operand: t
96
96
  };
97
97
  }
98
- function In(t, e) {
98
+ function Fn(t, e) {
99
99
  return {
100
100
  type: "And",
101
101
  operand1: t,
102
102
  operand2: e
103
103
  };
104
104
  }
105
- function _n(t, e) {
105
+ function In(t, e) {
106
106
  return {
107
107
  type: "Or",
108
108
  operand1: t,
109
109
  operand2: e
110
110
  };
111
111
  }
112
- function Ln(t, e) {
112
+ function _n(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
115
  source: A(t),
116
116
  field: A(e)
117
117
  };
118
118
  }
119
- function En() {
119
+ function Ln() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
@@ -124,7 +124,7 @@ function En() {
124
124
  };
125
125
  };
126
126
  }
127
- function kn(t, e, n = "$it") {
127
+ function En(t, e, n = "$it") {
128
128
  return {
129
129
  type: "MapResourceFields",
130
130
  source: t,
@@ -139,14 +139,14 @@ function Vn(t, e) {
139
139
  source: A(t)
140
140
  };
141
141
  }
142
- function On(t, e) {
142
+ function kn(t, e) {
143
143
  return {
144
144
  type: "GetBlobContentAsString",
145
145
  range: e,
146
146
  source: A(t)
147
147
  };
148
148
  }
149
- function Dn() {
149
+ function On() {
150
150
  return function(t, e) {
151
151
  return {
152
152
  type: "GetBlobContentAsJson",
@@ -155,92 +155,92 @@ function Dn() {
155
155
  };
156
156
  };
157
157
  }
158
- function Rn(t) {
158
+ function Dn(t) {
159
159
  return {
160
160
  type: "GetDownloadedBlobContent",
161
161
  source: A(t)
162
162
  };
163
163
  }
164
- function Nn(t) {
164
+ function Rn(t) {
165
165
  return {
166
166
  type: "GetOnDemandBlobContent",
167
167
  source: A(t)
168
168
  };
169
169
  }
170
- function Un(t, e) {
170
+ function Nn(t, e) {
171
171
  return {
172
172
  type: "ExtractArchiveAndGetURL",
173
173
  format: e,
174
174
  source: A(t)
175
175
  };
176
176
  }
177
- function Kn(t) {
177
+ function Un(t) {
178
178
  return {
179
179
  type: "GetImportProgress",
180
180
  source: A(t)
181
181
  };
182
182
  }
183
- function Mn(t, e) {
183
+ function Kn(t, e) {
184
184
  return {
185
185
  type: "GetLastLogs",
186
186
  source: A(t),
187
187
  lines: e
188
188
  };
189
189
  }
190
- function jn(t, e) {
190
+ function Mn(t, e) {
191
191
  return {
192
192
  type: "GetProgressLog",
193
193
  source: A(t),
194
194
  patternToSearch: e
195
195
  };
196
196
  }
197
- function qn(t, e) {
197
+ function jn(t, e) {
198
198
  return {
199
199
  type: "GetProgressLogWithInfo",
200
200
  source: A(t),
201
201
  patternToSearch: e
202
202
  };
203
203
  }
204
- function Bn(t) {
204
+ function qn(t) {
205
205
  return {
206
206
  type: "GetLogHandle",
207
207
  source: A(t)
208
208
  };
209
209
  }
210
- function Pt() {
210
+ function At() {
211
211
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
212
212
  }
213
- function Je(t) {
213
+ function $e(t) {
214
214
  if (t && typeof globalThis.getPlatforma == "function")
215
215
  return globalThis.getPlatforma(t);
216
216
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
217
217
  throw new Error("Can't get platforma instance.");
218
218
  }
219
- function At() {
219
+ function wt() {
220
220
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
221
221
  }
222
- function v() {
222
+ function b() {
223
223
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
224
224
  throw new Error("Not in config rendering context");
225
225
  }
226
226
  function G(t, e) {
227
- const n = At();
227
+ const n = wt();
228
228
  if (n === void 0) return !1;
229
229
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
230
230
  return n.callbackRegistry[t] = e, !0;
231
231
  }
232
232
  const fe = /* @__PURE__ */ new Map();
233
- function wt(t, e) {
234
- t in v().callbackRegistry || (v().callbackRegistry[t] = (n) => {
233
+ function xt(t, e) {
234
+ t in b().callbackRegistry || (b().callbackRegistry[t] = (n) => {
235
235
  for (const r of fe.get(t))
236
236
  r(n);
237
237
  }, fe.set(t, [])), fe.get(t).push(e);
238
238
  }
239
239
  class L {
240
240
  constructor(e, n = (r) => r) {
241
- k(this, "isResolved", !1);
242
- k(this, "resolvedValue");
243
- this.handle = e, this.postProcess = n, wt(e, (r) => {
241
+ V(this, "isResolved", !1);
242
+ V(this, "resolvedValue");
243
+ this.handle = e, this.postProcess = n, xt(e, (r) => {
244
244
  this.resolvedValue = n(r), this.isResolved = !0;
245
245
  });
246
246
  }
@@ -257,7 +257,7 @@ class L {
257
257
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
258
258
  }
259
259
  }
260
- function ge(t, e) {
260
+ function ye(t, e) {
261
261
  return t === void 0 ? void 0 : e(t);
262
262
  }
263
263
  class O {
@@ -299,47 +299,47 @@ class O {
299
299
  ...this.resolvePath,
300
300
  ...n.map((i) => typeof i == "string" ? i : i.field)
301
301
  ];
302
- return ge(
303
- v().resolveWithCommon(this.handle, e, ...n),
302
+ return ye(
303
+ b().resolveWithCommon(this.handle, e, ...n),
304
304
  (i) => new O(i, r)
305
305
  );
306
306
  }
307
307
  get resourceType() {
308
- return v().getResourceType(this.handle);
308
+ return b().getResourceType(this.handle);
309
309
  }
310
310
  getInputsLocked() {
311
- return v().getInputsLocked(this.handle);
311
+ return b().getInputsLocked(this.handle);
312
312
  }
313
313
  getOutputsLocked() {
314
- return v().getOutputsLocked(this.handle);
314
+ return b().getOutputsLocked(this.handle);
315
315
  }
316
316
  getIsReadyOrError() {
317
- return v().getIsReadyOrError(this.handle);
317
+ return b().getIsReadyOrError(this.handle);
318
318
  }
319
319
  getIsFinal() {
320
- return v().getIsFinal(this.handle);
320
+ return b().getIsFinal(this.handle);
321
321
  }
322
322
  getError() {
323
323
  const e = [...this.resolvePath, "error"];
324
- return ge(
325
- v().getError(this.handle),
324
+ return ye(
325
+ b().getError(this.handle),
326
326
  (n) => new O(n, e)
327
327
  );
328
328
  }
329
329
  listInputFields() {
330
- return v().listInputFields(this.handle);
330
+ return b().listInputFields(this.handle);
331
331
  }
332
332
  listOutputFields() {
333
- return v().listOutputFields(this.handle);
333
+ return b().listOutputFields(this.handle);
334
334
  }
335
335
  listDynamicFields() {
336
- return v().listDynamicFields(this.handle);
336
+ return b().listDynamicFields(this.handle);
337
337
  }
338
338
  getKeyValueBase64(e) {
339
- return v().getKeyValueBase64(this.handle, e);
339
+ return b().getKeyValueBase64(this.handle, e);
340
340
  }
341
341
  getKeyValueAsString(e) {
342
- return v().getKeyValueAsString(this.handle, e);
342
+ return b().getKeyValueAsString(this.handle, e);
343
343
  }
344
344
  getKeyValueAsJson(e) {
345
345
  const n = this.getKeyValueAsString(e);
@@ -347,10 +347,10 @@ class O {
347
347
  return JSON.parse(n);
348
348
  }
349
349
  getDataBase64() {
350
- return v().getDataBase64(this.handle);
350
+ return b().getDataBase64(this.handle);
351
351
  }
352
352
  getDataAsString() {
353
- return v().getDataAsString(this.handle);
353
+ return b().getDataAsString(this.handle);
354
354
  }
355
355
  getDataAsJson() {
356
356
  const e = this.getDataAsString();
@@ -363,7 +363,7 @@ class O {
363
363
  getPColumns(e = !1, n = "") {
364
364
  const r = this.parsePObjectCollection(e, n);
365
365
  return r === void 0 ? void 0 : Object.entries(r).map(([, o]) => {
366
- if (!Me(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
366
+ if (!je(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
367
367
  return o;
368
368
  });
369
369
  }
@@ -371,7 +371,7 @@ class O {
371
371
  *
372
372
  */
373
373
  parsePObjectCollection(e = !1, n = "") {
374
- const r = v().parsePObjectCollection(
374
+ const r = b().parsePObjectCollection(
375
375
  this.handle,
376
376
  e,
377
377
  n,
@@ -381,19 +381,19 @@ class O {
381
381
  const i = {};
382
382
  for (const [o, s] of Object.entries(r)) {
383
383
  const a = [...this.resolvePath, o];
384
- i[o] = Pe(s, (l) => new O(l, a));
384
+ i[o] = Ae(s, (l) => new O(l, a));
385
385
  }
386
386
  return i;
387
387
  }
388
388
  getFileContentAsBase64(e) {
389
- return new L(v().getBlobContentAsBase64(this.handle, e));
389
+ return new L(b().getBlobContentAsBase64(this.handle, e));
390
390
  }
391
391
  getFileContentAsString(e) {
392
- return new L(v().getBlobContentAsString(this.handle, e));
392
+ return new L(b().getBlobContentAsString(this.handle, e));
393
393
  }
394
394
  getFileContentAsJson(e) {
395
395
  return new L(
396
- v().getBlobContentAsString(this.handle, e)
396
+ b().getBlobContentAsString(this.handle, e)
397
397
  ).mapDefined((n) => JSON.parse(n));
398
398
  }
399
399
  /**
@@ -412,7 +412,7 @@ class O {
412
412
  * @returns downloaded file handle
413
413
  */
414
414
  getFileHandle() {
415
- return new L(v().getDownloadedBlobContentHandle(this.handle));
415
+ return new L(b().getDownloadedBlobContentHandle(this.handle));
416
416
  }
417
417
  /**
418
418
  * @deprecated use getFileHandle
@@ -424,7 +424,7 @@ class O {
424
424
  * @returns downloaded file handle
425
425
  */
426
426
  getRemoteFileHandle() {
427
- return new L(v().getOnDemandBlobContentHandle(this.handle));
427
+ return new L(b().getOnDemandBlobContentHandle(this.handle));
428
428
  }
429
429
  /**
430
430
  * @deprecated use getRemoteFileHandle
@@ -436,22 +436,22 @@ class O {
436
436
  * @returns the url to the extracted folder
437
437
  */
438
438
  extractArchiveAndGetURL(e) {
439
- return new L(v().extractArchiveAndGetURL(this.handle, e));
439
+ return new L(b().extractArchiveAndGetURL(this.handle, e));
440
440
  }
441
441
  getImportProgress() {
442
- return new L(v().getImportProgress(this.handle));
442
+ return new L(b().getImportProgress(this.handle));
443
443
  }
444
444
  getLastLogs(e) {
445
- return new L(v().getLastLogs(this.handle, e));
445
+ return new L(b().getLastLogs(this.handle, e));
446
446
  }
447
447
  getProgressLog(e) {
448
- return new L(v().getProgressLog(this.handle, e));
448
+ return new L(b().getProgressLog(this.handle, e));
449
449
  }
450
450
  getProgressLogWithInfo(e) {
451
- return new L(v().getProgressLogWithInfo(this.handle, e));
451
+ return new L(b().getProgressLogWithInfo(this.handle, e));
452
452
  }
453
453
  getLogHandle() {
454
- return new L(v().getLogHandle(this.handle));
454
+ return new L(b().getLogHandle(this.handle));
455
455
  }
456
456
  allFieldsResolved(e = "Input") {
457
457
  switch (e) {
@@ -480,56 +480,56 @@ class O {
480
480
  return o && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => s(u, h));
481
481
  }
482
482
  }
483
- const $e = "staging", We = "main", xt = {
483
+ const We = "staging", Ge = "main", Ft = {
484
484
  explicitColumnsSupport: !0,
485
485
  inlineColumnsSupport: !0,
486
486
  activeArgs: !0,
487
487
  pTablePartitionFiltersSupport: !0,
488
488
  pFrameInSetFilterSupport: !0
489
489
  };
490
- function Ge(t) {
490
+ function He(t) {
491
491
  return typeof t == "object" && t !== null && "__awaited_futures__" in t;
492
492
  }
493
493
  function be(t, e, n) {
494
494
  if (e.has(n)) return;
495
495
  if (e.add(n), typeof n === "object")
496
- if (Ge(n)) n.__awaited_futures__.forEach((i) => t.add(i));
496
+ if (He(n)) n.__awaited_futures__.forEach((i) => t.add(i));
497
497
  else if (Array.isArray(n))
498
498
  for (const i of n) be(t, e, i);
499
499
  else
500
500
  for (const [, i] of Object.entries(n))
501
501
  i !== n && be(t, e, i);
502
502
  }
503
- function Ft(t) {
503
+ function It(t) {
504
504
  const e = /* @__PURE__ */ new Set();
505
505
  return be(e, /* @__PURE__ */ new Set(), t), e;
506
506
  }
507
- const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
507
+ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
508
508
  __proto__: null,
509
- GlobalCfgRenderCtxFeatureFlags: xt,
510
- MainAccessorName: We,
511
- StagingAccessorName: $e,
512
- getAllFutureAwaits: Ft,
513
- isFutureAwait: Ge
514
- }, Symbol.toStringTag, { value: "Module" })), It = "pl7.app/label", _t = "pl7.app/trace", Lt = B.object({
509
+ GlobalCfgRenderCtxFeatureFlags: Ft,
510
+ MainAccessorName: Ge,
511
+ StagingAccessorName: We,
512
+ getAllFutureAwaits: It,
513
+ isFutureAwait: He
514
+ }, Symbol.toStringTag, { value: "Module" })), _t = "pl7.app/label", Lt = "pl7.app/trace", Et = B.object({
515
515
  type: B.string(),
516
516
  importance: B.number().optional(),
517
517
  id: B.string().optional(),
518
518
  label: B.string()
519
- }), Et = B.array(Lt), kt = 1e-3, Vt = "__LABEL__", Le = "__LABEL__@1";
520
- function He(t, e, n = {}) {
519
+ }), Vt = B.array(Et), kt = 1e-3, Ot = "__LABEL__", Ee = "__LABEL__@1";
520
+ function ze(t, e, n = {}) {
521
521
  const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = t.map((d) => {
522
- var c, b;
523
- const g = e(d);
524
- let p, y, C;
525
- "spec" in g && typeof g.spec == "object" ? (p = g.spec, y = g.prefixTrace, C = g.suffixTrace) : p = g;
526
- const E = (c = p.annotations) == null ? void 0 : c[It], x = (b = p.annotations) == null ? void 0 : b[_t], S = (x ? Et.safeParse(JSON.parse(x)).data : void 0) ?? [], P = [
527
- ...y ?? [],
522
+ var c, v;
523
+ const y = e(d);
524
+ let p, g, C;
525
+ "spec" in y && typeof y.spec == "object" ? (p = y.spec, g = y.prefixTrace, C = y.suffixTrace) : p = y;
526
+ const E = (c = p.annotations) == null ? void 0 : c[_t], x = (v = p.annotations) == null ? void 0 : v[Lt], S = (x ? Vt.safeParse(JSON.parse(x)).data : void 0) ?? [], P = [
527
+ ...g ?? [],
528
528
  ...S,
529
529
  ...C ?? []
530
530
  ];
531
531
  if (E !== void 0) {
532
- const I = { label: E, type: Vt, importance: -2 };
532
+ const I = { label: E, type: Ot, importance: -2 };
533
533
  n.addLabelAsSuffix ? P.push(I) : P.splice(0, 0, I);
534
534
  }
535
535
  const T = [], F = /* @__PURE__ */ new Map();
@@ -552,15 +552,15 @@ function He(t, e, n = {}) {
552
552
  fullTrace: T
553
553
  };
554
554
  }), a = [], l = [], u = [...r];
555
- u.sort(([, d], [, g]) => g - d);
555
+ u.sort(([, d], [, y]) => y - d);
556
556
  for (const [d] of u)
557
557
  d.endsWith("@1") || o.get(d) === t.length ? a.push(d) : l.push(d);
558
- const h = (d, g = !1) => {
558
+ const h = (d, y = !1) => {
559
559
  const p = [];
560
- for (let y = 0; y < s.length; y++) {
561
- const C = s[y], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
560
+ for (let g = 0; g < s.length; g++) {
561
+ const C = s[g], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
562
562
  if (E.length === 0)
563
- if (g)
563
+ if (y)
564
564
  p.push({
565
565
  label: "Unlabeled",
566
566
  value: C.value
@@ -576,22 +576,22 @@ function He(t, e, n = {}) {
576
576
  };
577
577
  if (a.length === 0) {
578
578
  if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
579
- return h(new Set(Le), !0);
579
+ return h(new Set(Ee), !0);
580
580
  }
581
581
  let f = 0, m = -1;
582
582
  for (; f < a.length; ) {
583
583
  const d = /* @__PURE__ */ new Set();
584
- n.includeNativeLabel && d.add(Le);
584
+ n.includeNativeLabel && d.add(Ee);
585
585
  for (let p = 0; p < f; ++p) d.add(a[p]);
586
586
  m >= 0 && d.add(a[m]);
587
- const g = h(d);
588
- if (g !== void 0 && new Set(g.map((p) => p.label)).size === t.length) return g;
587
+ const y = h(d);
588
+ if (y !== void 0 && new Set(y.map((p) => p.label)).size === t.length) return y;
589
589
  m++, m >= a.length && (f++, m = f);
590
590
  }
591
591
  return h(/* @__PURE__ */ new Set([...a, ...l]), !0);
592
592
  }
593
- const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned", ze = ee + "Partitioned/", ce = ze + "JsonPartitioned", z = ze + "BinaryPartitioned";
594
- function Xe(t, e, n, r = [], i) {
593
+ const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned", Xe = ee + "Partitioned/", ce = Xe + "JsonPartitioned", z = Xe + "BinaryPartitioned";
594
+ function Ye(t, e, n, r = [], i) {
595
595
  if (t === void 0) return !1;
596
596
  switch (t.resourceType.name) {
597
597
  case le: {
@@ -608,7 +608,7 @@ function Xe(t, e, n, r = [], i) {
608
608
  const a = t.resolve({ field: s, assertFieldType: "Input" });
609
609
  if (a === void 0) o = !1;
610
610
  else {
611
- const l = [...r, ...JSON.parse(s)], u = Xe(
611
+ const l = [...r, ...JSON.parse(s)], u = Ye(
612
612
  a,
613
613
  e,
614
614
  n,
@@ -624,9 +624,9 @@ function Xe(t, e, n, r = [], i) {
624
624
  throw new Error(`Unknown resource type: ${t.resourceType.name}`);
625
625
  }
626
626
  }
627
- function $n(t, e, n = !1) {
627
+ function Jn(t, e, n = !1) {
628
628
  const r = [];
629
- return { isComplete: Xe(t, e, r, [], n), data: r };
629
+ return { isComplete: Ye(t, e, r, [], n), data: r };
630
630
  }
631
631
  const ve = (t) => {
632
632
  if (t.endsWith(".index"))
@@ -635,7 +635,7 @@ const ve = (t) => {
635
635
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
636
636
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
637
637
  };
638
- function Ot(t) {
638
+ function Dt(t) {
639
639
  if (!t) return;
640
640
  const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
641
641
  let i = 0;
@@ -681,7 +681,7 @@ function Ot(t) {
681
681
  }
682
682
  return { data: r, keyLength: i };
683
683
  }
684
- function Dt(t) {
684
+ function Rt(t) {
685
685
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
686
686
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
687
687
  const { parts: e, partitionKeyLength: n } = t, r = [];
@@ -700,11 +700,11 @@ function Dt(t) {
700
700
  }
701
701
  return r.map((i) => Array.from(i.values()));
702
702
  }
703
- function Rt(t) {
703
+ function Nt(t) {
704
704
  if (t === void 0) return;
705
- if (je(t))
706
- return Dt(t);
707
- const e = Ot(t);
705
+ if (qe(t))
706
+ return Rt(t);
707
+ const e = Dt(t);
708
708
  if (!e) return;
709
709
  const { data: n, keyLength: r } = e, i = [];
710
710
  for (let o = 0; o < r; ++o)
@@ -815,15 +815,15 @@ function Ce(t, e = []) {
815
815
  throw new Error(`Unknown resource type: ${n}`);
816
816
  }
817
817
  }
818
- function Nt(t) {
818
+ function Ut(t) {
819
819
  if (t !== void 0) {
820
- if (je(t)) return t;
821
- if (pe(t)) return ot(t);
820
+ if (qe(t)) return t;
821
+ if (pe(t)) return st(t);
822
822
  if (t instanceof O) return Ce(t);
823
823
  throw new Error(`Unexpected input type: ${typeof t}`);
824
824
  }
825
825
  }
826
- function Ut(t, e) {
826
+ function Kt(t, e) {
827
827
  const n = [...e].sort((o, s) => s[0] - o[0]);
828
828
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
829
829
  const { partitionKeyLength: o } = t;
@@ -883,13 +883,13 @@ function Ut(t, e) {
883
883
  }
884
884
  }
885
885
  }
886
- function Kt(t) {
886
+ function Mt(t) {
887
887
  if (!Array.isArray(t)) return !1;
888
888
  if (t.length === 0) return !0;
889
889
  const e = t[0];
890
890
  return typeof e == "object" && e !== null && "key" in e && "val" in e;
891
891
  }
892
- class Mt {
892
+ class jt {
893
893
  constructor(e) {
894
894
  this.columns = e;
895
895
  }
@@ -898,30 +898,30 @@ class Mt {
898
898
  return this.columns.filter((r) => n(r.spec));
899
899
  }
900
900
  }
901
- function jt(t) {
901
+ function qt(t) {
902
902
  if (t)
903
903
  return t.map((e) => ({
904
- type: `split:${ut(e.axisId)}`,
904
+ type: `split:${ct(e.axisId)}`,
905
905
  label: e.label,
906
906
  importance: 1e6
907
907
  // High importance for split filters in labels
908
908
  }));
909
909
  }
910
- function qt(t) {
910
+ function Bt(t) {
911
911
  if (t)
912
912
  return t.map((e) => [e.axisIdx, e.value]);
913
913
  }
914
- function Bt(t, e) {
914
+ function Jt(t, e) {
915
915
  if (!e || e.length === 0) return t;
916
916
  const n = [...e].sort((r, i) => r[0] - i[0]);
917
- return qe({ id: t, axisFilters: n });
917
+ return Be({ id: t, axisFilters: n });
918
918
  }
919
- function Ee(t) {
919
+ function Ve(t) {
920
920
  if (!t || typeof t != "object") return !1;
921
921
  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);
922
922
  return !!e.domainAnchor || n || r;
923
923
  }
924
- function Jt(t) {
924
+ function $t(t) {
925
925
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
926
926
  return [];
927
927
  const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
@@ -931,9 +931,9 @@ function Jt(t) {
931
931
  }
932
932
  class Q {
933
933
  constructor() {
934
- k(this, "defaultProviderStore", []);
935
- k(this, "providers", [new Mt(this.defaultProviderStore)]);
936
- k(this, "axisLabelProviders", []);
934
+ V(this, "defaultProviderStore", []);
935
+ V(this, "providers", [new jt(this.defaultProviderStore)]);
936
+ V(this, "axisLabelProviders", []);
937
937
  }
938
938
  addColumnProvider(e) {
939
939
  return this.providers.push(e), this;
@@ -961,24 +961,24 @@ class Q {
961
961
  };
962
962
  let u = () => !1;
963
963
  if (a) {
964
- const p = (Array.isArray(a) ? a : [a]).map((y) => {
965
- if (Ee(y)) {
964
+ const p = (Array.isArray(a) ? a : [a]).map((g) => {
965
+ if (Ve(g)) {
966
966
  if (!r)
967
967
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
968
- return Y(we(r.anchors, y, n));
968
+ return Y(xe(r.anchors, g, n));
969
969
  } else
970
- return Y(y);
970
+ return Y(g);
971
971
  });
972
- u = (y) => p.some((C) => C(y));
972
+ u = (g) => p.some((C) => C(g));
973
973
  }
974
974
  const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m = /* @__PURE__ */ new Set();
975
975
  for (const p of h) {
976
- const y = Ee(p);
976
+ const g = Ve(p);
977
977
  let C;
978
- if (y) {
978
+ if (g) {
979
979
  if (!r)
980
980
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
981
- C = we(r.anchors, p, n);
981
+ C = xe(r.anchors, p, n);
982
982
  } else
983
983
  C = p;
984
984
  const E = /* @__PURE__ */ new Set(), x = [];
@@ -988,38 +988,38 @@ class Q {
988
988
  if (u(c.spec)) continue;
989
989
  if (E.has(c.id))
990
990
  throw new Error(`Duplicate column id ${c.id} in provider ${T.constructor.name}`);
991
- const b = st(c.spec);
992
- m.has(b) || (E.add(c.id), m.add(b), x.push(c));
991
+ const v = at(c.spec);
992
+ m.has(v) || (E.add(c.id), m.add(v), x.push(c));
993
993
  }
994
994
  }
995
995
  if (x.length === 0) continue;
996
- const S = Jt(p), P = S.length > 0;
996
+ const S = $t(p), P = S.length > 0;
997
997
  for (const T of x) {
998
998
  if (!oe(T.spec)) continue;
999
999
  const F = T.spec;
1000
1000
  if (P) {
1001
- if (Kt(T.data))
1001
+ if (Mt(T.data))
1002
1002
  throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T.id}`);
1003
- const c = Nt(T.data);
1003
+ const c = Ut(T.data);
1004
1004
  if (!c) {
1005
1005
  if (o) continue;
1006
1006
  return;
1007
1007
  }
1008
- if (!at(c))
1008
+ if (!lt(c))
1009
1009
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${T.id}`);
1010
- const b = Rt(c), I = S[S.length - 1];
1010
+ const v = Nt(c), I = S[S.length - 1];
1011
1011
  if (I >= c.partitionKeyLength)
1012
1012
  throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${I}) in column ${F.name}`);
1013
- const $ = S.map((_) => this.findLabels(V(F.axesSpec[_]))), K = [], j = (_, W) => {
1013
+ const $ = S.map((_) => this.findLabels(k(F.axesSpec[_]))), K = [], j = (_, W) => {
1014
1014
  if (W >= S.length) {
1015
1015
  if (K.push([..._]), K.length > 1e4)
1016
1016
  throw new Error("Too many key combinations, aborting.");
1017
1017
  return;
1018
1018
  }
1019
1019
  const M = S[W];
1020
- if (M >= b.length)
1021
- throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${b.length}) during split key generation for column ${T.id}`);
1022
- const q = b[M];
1020
+ if (M >= v.length)
1021
+ throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${v.length}) during split key generation for column ${T.id}`);
1022
+ const q = v[M];
1023
1023
  if (!q || q.length === 0) {
1024
1024
  K.length = 0;
1025
1025
  return;
@@ -1029,20 +1029,20 @@ class Q {
1029
1029
  };
1030
1030
  if (j([], 0), K.length === 0)
1031
1031
  continue;
1032
- const N = [...F.axesSpec], Ze = S.map((_) => _);
1032
+ const N = [...F.axesSpec], et = S.map((_) => _);
1033
1033
  for (let _ = S.length - 1; _ >= 0; _--)
1034
1034
  N.splice(S[_], 1);
1035
- const et = { ...F, axesSpec: N };
1035
+ const tt = { ...F, axesSpec: N };
1036
1036
  for (const _ of K) {
1037
1037
  const W = _.map((M, q) => {
1038
- const te = Ze[q], tt = V(F.axesSpec[te]), de = $[q], nt = (de == null ? void 0 : de[M]) ?? String(M);
1039
- return { axisIdx: te, axisId: tt, value: M, label: nt };
1038
+ const te = et[q], nt = k(F.axesSpec[te]), de = $[q], rt = (de == null ? void 0 : de[M]) ?? String(M);
1039
+ return { axisIdx: te, axisId: nt, value: M, label: rt };
1040
1040
  });
1041
1041
  f.push({
1042
1042
  type: "split",
1043
1043
  originalColumn: T,
1044
1044
  spec: F,
1045
- adjustedSpec: et,
1045
+ adjustedSpec: tt,
1046
1046
  dataEntries: c,
1047
1047
  axisFilters: W
1048
1048
  });
@@ -1057,33 +1057,33 @@ class Q {
1057
1057
  }
1058
1058
  }
1059
1059
  if (f.length === 0) return [];
1060
- const d = He(
1060
+ const d = ze(
1061
1061
  f,
1062
1062
  (p) => ({
1063
1063
  spec: p.spec,
1064
- suffixTrace: p.type === "split" ? jt(p.axisFilters) : void 0
1064
+ suffixTrace: p.type === "split" ? qt(p.axisFilters) : void 0
1065
1065
  }),
1066
1066
  l
1067
- ), g = [];
1068
- for (const { value: p, label: y } of d) {
1069
- const { originalColumn: C, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, S = qt(x);
1067
+ ), y = [];
1068
+ for (const { value: p, label: g } of d) {
1069
+ const { originalColumn: C, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, S = Bt(x);
1070
1070
  let P;
1071
- r ? P = r.deriveS(E, S) : P = Bt(C.id, S);
1071
+ r ? P = r.deriveS(E, S) : P = Jt(C.id, S);
1072
1072
  let T = { ...p.adjustedSpec };
1073
1073
  s && (T = {
1074
1074
  ...T,
1075
1075
  annotations: {
1076
1076
  ...T.annotations ?? {},
1077
- "pl7.app/label": y
1077
+ "pl7.app/label": g
1078
1078
  }
1079
- }), g.push({
1079
+ }), y.push({
1080
1080
  id: P,
1081
1081
  spec: T,
1082
- data: () => p.type === "split" ? lt(Ut(p.dataEntries, S)) : p.originalColumn.data,
1083
- label: y
1082
+ data: () => p.type === "split" ? ut(Kt(p.dataEntries, S)) : p.originalColumn.data,
1083
+ label: g
1084
1084
  });
1085
1085
  }
1086
- return g;
1086
+ return y;
1087
1087
  }
1088
1088
  getColumns(e, n) {
1089
1089
  const r = this.getUniversalEntries(e, {
@@ -1149,11 +1149,11 @@ function he(t, e) {
1149
1149
  return !0;
1150
1150
  }
1151
1151
  function ke(t) {
1152
- return Pe(t, (e) => e instanceof O ? e.handle : pe(e) ? mt(e, (n) => n.handle) : e);
1152
+ return Ae(t, (e) => e instanceof O ? e.handle : pe(e) ? gt(e, (n) => n.handle) : e);
1153
1153
  }
1154
- class $t {
1154
+ class Wt {
1155
1155
  constructor() {
1156
- k(this, "ctx", v());
1156
+ V(this, "ctx", b());
1157
1157
  }
1158
1158
  /**
1159
1159
  * @deprecated use getOptions()
@@ -1164,26 +1164,26 @@ class $t {
1164
1164
  getOptions(e, n) {
1165
1165
  const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
1166
1166
  let o = {}, s = !1;
1167
- return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? He(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
1168
- ref: xe(a, s),
1167
+ return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? ze(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
1168
+ ref: Fe(a, s),
1169
1169
  label: l
1170
1170
  })) : i.map(({ ref: a, obj: l }) => ({
1171
- ref: xe(a, s),
1171
+ ref: Fe(a, s),
1172
1172
  label: o(l, a)
1173
1173
  }));
1174
1174
  }
1175
1175
  resolveAnchorCtx(e) {
1176
- if (e instanceof Fe) return e;
1176
+ if (e instanceof Ie) return e;
1177
1177
  const n = {};
1178
1178
  for (const [r, i] of Object.entries(e))
1179
- if (ct(i)) {
1179
+ if (pt(i)) {
1180
1180
  const o = this.getPColumnSpecByRef(i);
1181
1181
  if (!o)
1182
1182
  return;
1183
1183
  n[r] = o;
1184
1184
  } else
1185
1185
  n[r] = i;
1186
- return new Fe(n);
1186
+ return new Ie(n);
1187
1187
  }
1188
1188
  /**
1189
1189
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -1276,7 +1276,7 @@ class $t {
1276
1276
  ref: n.ref,
1277
1277
  obj: {
1278
1278
  ...n.obj,
1279
- data: pt(
1279
+ data: dt(
1280
1280
  n.obj.data,
1281
1281
  (r) => new O(r, [n.ref.blockId, n.ref.name])
1282
1282
  )
@@ -1305,7 +1305,7 @@ class $t {
1305
1305
  )) == null ? void 0 : r.obj;
1306
1306
  const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
1307
1307
  if (n)
1308
- return Pe(
1308
+ return Ae(
1309
1309
  n,
1310
1310
  (i) => new O(i, [e.blockId, e.name])
1311
1311
  );
@@ -1318,7 +1318,7 @@ class $t {
1318
1318
  getPColumnByRef(e) {
1319
1319
  const n = this.getDataByRef(e);
1320
1320
  if (n)
1321
- return dt(n);
1321
+ return ft(n);
1322
1322
  }
1323
1323
  /**
1324
1324
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -1368,7 +1368,7 @@ class $t {
1368
1368
  findLabels(e) {
1369
1369
  const n = this.getData();
1370
1370
  for (const r of n.entries) {
1371
- if (!Me(r.obj)) continue;
1371
+ if (!je(r.obj)) continue;
1372
1372
  const i = r.obj.spec;
1373
1373
  if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && he(e.domain, i.axesSpec[0].domain)) {
1374
1374
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
@@ -1395,7 +1395,7 @@ class $t {
1395
1395
  let a = null;
1396
1396
  const l = this;
1397
1397
  return {
1398
- id: qe(i),
1398
+ id: Be(i),
1399
1399
  spec: s,
1400
1400
  get data() {
1401
1401
  var u;
@@ -1422,13 +1422,13 @@ class $t {
1422
1422
  }
1423
1423
  class ne {
1424
1424
  constructor() {
1425
- k(this, "ctx");
1426
- k(this, "_argsCache");
1427
- k(this, "_uiStateCache");
1425
+ V(this, "ctx");
1426
+ V(this, "_argsCache");
1427
+ V(this, "_uiStateCache");
1428
1428
  // lazy rendering because this feature is rarely used
1429
- k(this, "_activeArgsCache");
1430
- k(this, "resultPool", new $t());
1431
- this.ctx = v();
1429
+ V(this, "_activeArgsCache");
1430
+ V(this, "resultPool", new Wt());
1431
+ this.ctx = b();
1432
1432
  }
1433
1433
  get args() {
1434
1434
  if (this._argsCache === void 0) {
@@ -1462,16 +1462,16 @@ class ne {
1462
1462
  // return this.ctx.featureFlags;
1463
1463
  // }
1464
1464
  getNamedAccessor(e) {
1465
- return ge(
1465
+ return ye(
1466
1466
  this.ctx.getAccessorHandleByName(e),
1467
1467
  (n) => new O(n, [e])
1468
1468
  );
1469
1469
  }
1470
1470
  get prerun() {
1471
- return this.getNamedAccessor($e);
1471
+ return this.getNamedAccessor(We);
1472
1472
  }
1473
1473
  get outputs() {
1474
- return this.getNamedAccessor(We);
1474
+ return this.getNamedAccessor(Ge);
1475
1475
  }
1476
1476
  /**
1477
1477
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -1514,8 +1514,8 @@ class ne {
1514
1514
  partitionFilters: e.filters ?? [],
1515
1515
  filters: [],
1516
1516
  sorting: e.sorting ?? []
1517
- }) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(ft(n.src)), this.ctx.createPTable(
1518
- ht(n, (r) => ke(r))
1517
+ }) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(ht(n.src)), this.ctx.createPTable(
1518
+ mt(n, (r) => ke(r))
1519
1519
  );
1520
1520
  }
1521
1521
  /** @deprecated scheduled for removal from SDK */
@@ -1535,15 +1535,15 @@ class ne {
1535
1535
  this.ctx.logError(e);
1536
1536
  }
1537
1537
  }
1538
- const X = "1.40.5";
1539
- function Wt(t) {
1538
+ const X = "1.41.0";
1539
+ function Gt(t) {
1540
1540
  return t.__renderLambda === !0;
1541
1541
  }
1542
1542
  function me(t) {
1543
1543
  if (t !== void 0)
1544
- return Wt(t) ? t.handle : t;
1544
+ return Gt(t) ? t.handle : t;
1545
1545
  }
1546
- function Wn(t) {
1546
+ function $n(t) {
1547
1547
  return yt(t);
1548
1548
  }
1549
1549
  const w = class w {
@@ -1712,6 +1712,20 @@ const w = class w {
1712
1712
  this._featureFlags
1713
1713
  );
1714
1714
  }
1715
+ /** Sets or overrides feature flags for the block. */
1716
+ withFeatureFlags(e) {
1717
+ return new w(
1718
+ this._renderingMode,
1719
+ this._initialArgs,
1720
+ this._initialUiState,
1721
+ this._outputs,
1722
+ this._inputsValid,
1723
+ this._sections,
1724
+ this._title,
1725
+ this._enrichmentTargets,
1726
+ { ...this._featureFlags, ...e }
1727
+ );
1728
+ }
1715
1729
  /**
1716
1730
  * Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
1717
1731
  * Influences dependency graph construction.
@@ -1732,9 +1746,16 @@ const w = class w {
1732
1746
  /** Renders all provided block settings into a pre-configured platforma API
1733
1747
  * instance, that can be used in frontend to interact with block state, and
1734
1748
  * other features provided by the platforma to the block. */
1735
- done() {
1749
+ done(e) {
1750
+ const n = e ?? 1;
1751
+ return this.withFeatureFlags({
1752
+ ...this._featureFlags,
1753
+ requiresUIAPIVersion: n
1754
+ })._done(n);
1755
+ }
1756
+ _done(e) {
1736
1757
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
1737
- const e = {
1758
+ const n = {
1738
1759
  v3: {
1739
1760
  sdkVersion: X,
1740
1761
  renderingMode: this._renderingMode,
@@ -1754,19 +1775,19 @@ const w = class w {
1754
1775
  inputsValid: me(this._inputsValid),
1755
1776
  sections: me(this._sections),
1756
1777
  outputs: Object.fromEntries(
1757
- Object.entries(this._outputs).map(([n, r]) => [n, me(r)])
1778
+ Object.entries(this._outputs).map(([r, i]) => [r, me(i)])
1758
1779
  )
1759
1780
  };
1760
- return Pt() ? Je({ sdkVersion: X }) : { config: e };
1781
+ return globalThis.platformaApiVersion = e, At() ? $e({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n };
1761
1782
  }
1762
1783
  };
1763
- k(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
1784
+ V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
1764
1785
  supportsLazyState: !0,
1765
1786
  requiresUIAPIVersion: 1,
1766
1787
  requiresModelAPIVersion: 1
1767
1788
  });
1768
- let Ve = w;
1769
- function Ye() {
1789
+ let Oe = w;
1790
+ function Qe() {
1770
1791
  return {
1771
1792
  sourceId: null,
1772
1793
  hiddenColIds: null,
@@ -1775,45 +1796,45 @@ function Ye() {
1775
1796
  sorting: []
1776
1797
  };
1777
1798
  }
1778
- function Oe() {
1799
+ function De() {
1779
1800
  return {
1780
1801
  version: 4,
1781
1802
  stateCache: [],
1782
- pTableParams: Ye()
1803
+ pTableParams: Qe()
1783
1804
  };
1784
1805
  }
1785
- function Gt(t) {
1786
- return "version" in t || (t = Oe()), t.version === 2 && (t = {
1806
+ function Ht(t) {
1807
+ return "version" in t || (t = De()), t.version === 2 && (t = {
1787
1808
  version: 3,
1788
1809
  stateCache: t.stateCache.map((e) => ({
1789
1810
  ...e,
1790
1811
  filtersState: []
1791
1812
  })),
1792
- pTableParams: Ye()
1793
- }), t.version === 3 && (t = Oe()), t;
1813
+ pTableParams: Qe()
1814
+ }), t.version === 3 && (t = De()), t;
1794
1815
  }
1795
1816
  function Se(t) {
1796
1817
  return t.axesSpec.length === 1 && t.name === "pl7.app/label";
1797
1818
  }
1798
- function Ht(t) {
1819
+ function zt(t) {
1799
1820
  return new Q().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
1800
1821
  name: "pl7.app/label",
1801
1822
  axes: [{}]
1802
1823
  // exactly one axis
1803
1824
  }, { dontWaitAllData: !0 });
1804
1825
  }
1805
- function De(t, e) {
1826
+ function Re(t, e) {
1806
1827
  const n = [], r = [];
1807
1828
  for (const a of t)
1808
1829
  Se(a.spec) ? n.push(a) : r.push(a);
1809
1830
  const i = [];
1810
1831
  for (const a of r)
1811
1832
  for (const l of a.spec.axesSpec) {
1812
- const u = V(l);
1833
+ const u = k(l);
1813
1834
  i.some((h) => U(h, u)) || i.push(u);
1814
1835
  }
1815
1836
  for (const a of n) {
1816
- const l = V(a.spec.axesSpec[0]), u = i.findIndex((h) => U(h, l));
1837
+ const l = k(a.spec.axesSpec[0]), u = i.findIndex((h) => U(h, l));
1817
1838
  u !== -1 && i.splice(u, 1);
1818
1839
  }
1819
1840
  const o = (a, l) => {
@@ -1824,7 +1845,7 @@ function De(t, e) {
1824
1845
  return u;
1825
1846
  }, s = [];
1826
1847
  for (const a of e) {
1827
- const l = a.spec.axesSpec[0], u = V(l), h = i.findIndex((f) => U(f, u));
1848
+ const l = a.spec.axesSpec[0], u = k(l), h = i.findIndex((f) => U(f, u));
1828
1849
  if (h !== -1) {
1829
1850
  const f = i[h], m = Object.keys(f.domain ?? {}).length, d = Object.keys(l.domain ?? {}).length;
1830
1851
  m > d ? s.push({
@@ -1839,7 +1860,7 @@ function De(t, e) {
1839
1860
  }
1840
1861
  return s;
1841
1862
  }
1842
- function zt(t) {
1863
+ function Xt(t) {
1843
1864
  const e = (i) => Array.isArray(i), n = (i) => i instanceof O, r = (i) => typeof i == "object" && "type" in i;
1844
1865
  return t.map((i) => i.data).every((i) => {
1845
1866
  if (e(i))
@@ -1859,7 +1880,7 @@ function zt(t) {
1859
1880
  throw Error(`unsupported column data type: ${i}`);
1860
1881
  });
1861
1882
  }
1862
- function Re(t) {
1883
+ function Ne(t) {
1863
1884
  let e = t.columns;
1864
1885
  const n = [];
1865
1886
  if (t.coreColumnPredicate) {
@@ -1881,71 +1902,68 @@ function Re(t) {
1881
1902
  sorting: t.sorting
1882
1903
  };
1883
1904
  }
1884
- function Xt(t) {
1905
+ function Yt(t) {
1885
1906
  var e;
1886
1907
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
1887
1908
  }
1888
- function Yt(t) {
1909
+ function Qt(t) {
1889
1910
  var e;
1890
1911
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
1891
1912
  }
1892
- function ye(t, e) {
1913
+ function ge(t, e) {
1893
1914
  return [...new Map(t.map((n) => [e(n), n])).values()];
1894
1915
  }
1895
- function Gn(t, e, n, r) {
1916
+ function Wn(t, e, n, r) {
1896
1917
  if (e.length === 0) return;
1897
- const i = e.filter((c) => !Xt(c.spec)), o = Gt(n), s = Ht(t.resultPool);
1918
+ const i = e.filter((c) => Pe(c.spec) || !Yt(c.spec)), o = Ht(n), s = zt(t.resultPool);
1898
1919
  if (!s) return;
1899
- const a = De(i.map(Ie), s), l = [...i, ...a], h = [
1900
- ...ye(
1901
- [...l.flatMap((c) => c.spec.axesSpec.map((b) => V(b)))],
1920
+ const a = Re(i.map(_e), s), l = [...i, ...a], h = [
1921
+ ...ge(
1922
+ [...l.flatMap((c) => c.spec.axesSpec.map((v) => k(v)))],
1902
1923
  (c) => D(c)
1903
1924
  ).map((c) => ({ type: "axis", id: c })),
1904
1925
  ...l.map((c) => ({ type: "column", id: c.id }))
1905
- ], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", g = o.pTableParams.partitionFilters.filter((c) => {
1906
- const b = m(c.column);
1907
- return b || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), b;
1908
- }), p = ye(
1926
+ ], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", y = o.pTableParams.partitionFilters.filter((c) => {
1927
+ const v = m(c.column);
1928
+ return v || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1929
+ }), p = ge(
1909
1930
  [...(r == null ? void 0 : r.filters) ?? [], ...o.pTableParams.filters],
1910
1931
  (c) => D(c.column)
1911
1932
  ).filter((c) => {
1912
- const b = m(c.column);
1913
- return b || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), b;
1914
- }), y = ye(
1933
+ const v = m(c.column);
1934
+ return v || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1935
+ }), g = ge(
1915
1936
  [...(r == null ? void 0 : r.sorting) ?? [], ...o.pTableParams.sorting],
1916
1937
  (c) => D(c.column)
1917
1938
  ).filter((c) => {
1918
- const b = m(c.column);
1919
- return b || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), b;
1920
- }), C = Re({
1939
+ const v = m(c.column);
1940
+ return v || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), v;
1941
+ }), C = Ne({
1921
1942
  columns: i,
1922
1943
  labelColumns: a,
1923
1944
  coreJoinType: d,
1924
- partitionFilters: g,
1945
+ partitionFilters: y,
1925
1946
  filters: p,
1926
- sorting: y,
1947
+ sorting: g,
1927
1948
  coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
1928
1949
  }), E = t.createPTable(C), x = new Set((() => {
1929
1950
  if (d === "inner") return [];
1930
1951
  const c = o.pTableParams.hiddenColIds;
1931
- return c || i.filter((b) => Yt(b.spec)).map((b) => b.id);
1952
+ return c || i.filter((v) => Qt(v.spec)).map((v) => v.id);
1932
1953
  })());
1933
- i.filter((c) => {
1934
- var b;
1935
- return ((b = c.spec.annotations) == null ? void 0 : b["pl7.app/isLinkerColumn"]) === "true";
1936
- }).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((b) => {
1954
+ i.filter((c) => Pe(c.spec)).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((v) => {
1937
1955
  var I;
1938
- return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, b.spec) ? [b.id] : [];
1939
- }).forEach((b) => x.delete(b)), [...g.map((c) => c.column), ...p.map((c) => c.column), ...y.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
1940
- const S = i.filter((c) => !x.has(c.id)), P = De(S.map(Ie), s);
1941
- if (!zt([...S, ...P])) return;
1942
- const T = Re({
1956
+ return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, v.spec) ? [v.id] : [];
1957
+ }).forEach((v) => x.delete(v)), [...y.map((c) => c.column), ...p.map((c) => c.column), ...g.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
1958
+ const S = i.filter((c) => !x.has(c.id)), P = Re(S.map(_e), s);
1959
+ if (!Xt([...S, ...P])) return;
1960
+ const T = Ne({
1943
1961
  columns: S,
1944
1962
  labelColumns: P,
1945
1963
  coreJoinType: d,
1946
- partitionFilters: g,
1964
+ partitionFilters: y,
1947
1965
  filters: p,
1948
- sorting: y,
1966
+ sorting: g,
1949
1967
  coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
1950
1968
  }), F = t.createPTable(T);
1951
1969
  return {
@@ -1954,7 +1972,7 @@ function Gn(t, e, n, r) {
1954
1972
  visibleTableHandle: F
1955
1973
  };
1956
1974
  }
1957
- function Hn(t, e, n) {
1975
+ function Gn(t, e, n) {
1958
1976
  const r = t.resultPool.findLabels(e);
1959
1977
  return {
1960
1978
  axis: e,
@@ -1965,7 +1983,7 @@ function Hn(t, e, n) {
1965
1983
  defaultValue: n[0]
1966
1984
  };
1967
1985
  }
1968
- const Qt = (t, e) => {
1986
+ const Zt = (t, e) => {
1969
1987
  let n = t.toString();
1970
1988
  return e == null || e.forEach((r) => {
1971
1989
  if (r)
@@ -1973,7 +1991,7 @@ const Qt = (t, e) => {
1973
1991
  n += i, n += o;
1974
1992
  }), n;
1975
1993
  };
1976
- function Zt(t) {
1994
+ function en(t) {
1977
1995
  if (!t.length)
1978
1996
  return [];
1979
1997
  let e = [[]];
@@ -1984,16 +2002,16 @@ function Zt(t) {
1984
2002
  }), e = r;
1985
2003
  }), e;
1986
2004
  }
1987
- function en(t) {
2005
+ function Pe(t) {
1988
2006
  var e;
1989
2007
  return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
1990
2008
  }
1991
- const tn = "pl7.app/graph/isVirtual", Ne = "pl7.app/label", nn = "pl7.app/isLinkerColumn";
2009
+ const tn = "pl7.app/graph/isVirtual", Ue = "pl7.app/label", nn = "pl7.app/isLinkerColumn";
1992
2010
  function rn(t) {
1993
2011
  var n, r;
1994
2012
  const e = /* @__PURE__ */ new Map();
1995
2013
  for (const { spec: i } of t) {
1996
- const o = i.axesSpec.map(V).map(D);
2014
+ const o = i.axesSpec.map(k).map(D);
1997
2015
  o.forEach((s) => {
1998
2016
  e.has(s) || e.set(s, /* @__PURE__ */ new Set());
1999
2017
  });
@@ -2006,7 +2024,7 @@ function rn(t) {
2006
2024
  return e;
2007
2025
  }
2008
2026
  function on(t, e) {
2009
- const n = rn(t), r = [...n.keys()].map(_e), i = [];
2027
+ const n = rn(t), r = [...n.keys()].map(Le), i = [];
2010
2028
  for (const l of e.values()) {
2011
2029
  const u = r.find((h) => U(l, h));
2012
2030
  u && i.push(D(u));
@@ -2017,19 +2035,19 @@ function on(t, e) {
2017
2035
  const l = [];
2018
2036
  for (const u of a)
2019
2037
  for (const h of n.get(u) ?? [])
2020
- o.has(h) || (l.push(h), o.add(h), s.set(h, _e(h)));
2038
+ o.has(h) || (l.push(h), o.add(h), s.set(h, Le(h)));
2021
2039
  a = l;
2022
2040
  }
2023
2041
  return s;
2024
2042
  }
2025
- function Ue(t, e) {
2043
+ function Ke(t, e) {
2026
2044
  const n = [];
2027
2045
  return e.forEach((r) => {
2028
2046
  n.push(...sn(t, r));
2029
2047
  }), n;
2030
2048
  }
2031
2049
  function sn(t, e) {
2032
- const n = e.spec.axesSpec.map(V);
2050
+ const n = e.spec.axesSpec.map(k);
2033
2051
  if (n.every((u) => t.has(D(u))))
2034
2052
  return [e];
2035
2053
  const r = n.map((u) => {
@@ -2037,13 +2055,13 @@ function sn(t, e) {
2037
2055
  for (const [f, m] of t)
2038
2056
  U(m, u) && !U(u, m) && h.push(m);
2039
2057
  return h;
2040
- }), i = Zt(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((u) => {
2058
+ }), i = en(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((u) => {
2041
2059
  const h = /* @__PURE__ */ new Set();
2042
2060
  return u.map((f, m) => {
2043
- const d = e.spec.axesSpec[m].domain, g = f.domain;
2044
- return Object.entries(g ?? {}).forEach(([p, y]) => {
2061
+ const d = e.spec.axesSpec[m].domain, y = f.domain;
2062
+ return Object.entries(y ?? {}).forEach(([p, g]) => {
2045
2063
  if ((d == null ? void 0 : d[p]) === void 0) {
2046
- const C = JSON.stringify([p, y]);
2064
+ const C = JSON.stringify([p, g]);
2047
2065
  h.add(C), o.add(C);
2048
2066
  }
2049
2067
  }), {
@@ -2057,22 +2075,22 @@ function sn(t, e) {
2057
2075
  });
2058
2076
  const l = i.map((u, h) => {
2059
2077
  var p;
2060
- const f = Qt(e.id, u.map((y) => y.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ne]) ?? "", d = [...a[h]].filter((y) => s.has(y)).sort().map((y) => {
2078
+ const f = Zt(e.id, u.map((g) => g.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ue]) ?? "", d = [...a[h]].filter((g) => s.has(g)).sort().map((g) => {
2061
2079
  var C;
2062
- return (C = JSON.parse(y)) == null ? void 0 : C[1];
2063
- }).join(" / "), g = {
2080
+ return (C = JSON.parse(g)) == null ? void 0 : C[1];
2081
+ }).join(" / "), y = {
2064
2082
  ...e.spec.annotations,
2065
2083
  [tn]: "true"
2066
2084
  };
2067
- return (m || d) && (g[Ne] = m && d ? m + " / " + d : m + d), {
2085
+ return (m || d) && (y[Ue] = m && d ? m + " / " + d : m + d), {
2068
2086
  id: f,
2069
2087
  spec: {
2070
2088
  ...e.spec,
2071
- axesSpec: u.map((y, C) => ({
2072
- ...y,
2089
+ axesSpec: u.map((g, C) => ({
2090
+ ...g,
2073
2091
  annotations: e.spec.axesSpec[C].annotations
2074
2092
  })),
2075
- annotations: g
2093
+ annotations: y
2076
2094
  },
2077
2095
  data: e.data
2078
2096
  };
@@ -2081,14 +2099,14 @@ function sn(t, e) {
2081
2099
  }
2082
2100
  function an(t) {
2083
2101
  let e = !0;
2084
- return t.data instanceof O ? e = e && t.data.getIsReadyOrError() : pe(t.data) && gt(t.data, (n) => {
2102
+ return t.data instanceof O ? e = e && t.data.getIsReadyOrError() : pe(t.data) && bt(t.data, (n) => {
2085
2103
  e = e && n.getIsReadyOrError();
2086
2104
  }), e;
2087
2105
  }
2088
2106
  function re(t) {
2089
2107
  return t.every(an);
2090
2108
  }
2091
- function zn(t, e) {
2109
+ function Hn(t, e) {
2092
2110
  if (!e) {
2093
2111
  const f = new Q();
2094
2112
  f.addColumnProvider(t.resultPool);
@@ -2096,10 +2114,10 @@ function zn(t, e) {
2096
2114
  if (!re(m))
2097
2115
  return;
2098
2116
  const d = new Map(m.flatMap((p) => p.spec.axesSpec).map((p) => {
2099
- const y = V(p);
2100
- return [D(y), y];
2101
- })), g = Ue(d, m);
2102
- return t.createPFrame(g);
2117
+ const g = k(p);
2118
+ return [D(g), g];
2119
+ })), y = Ke(d, m);
2120
+ return t.createPFrame(y);
2103
2121
  }
2104
2122
  if (!re(e))
2105
2123
  return;
@@ -2108,16 +2126,16 @@ function zn(t, e) {
2108
2126
  const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
2109
2127
  for (const f of e)
2110
2128
  for (const m of f.spec.axesSpec) {
2111
- const d = V(m);
2129
+ const d = k(m);
2112
2130
  r.set(D(d), d), i.set(D(d), d);
2113
2131
  }
2114
- const o = n.getColumns((f) => en(f)) ?? [], s = on(o, r);
2132
+ const o = n.getColumns((f) => Pe(f)) ?? [], s = on(o, r);
2115
2133
  for (const f of s)
2116
2134
  r.set(...f), i.set(...f);
2117
2135
  const a = (n.getColumns((f) => f.axesSpec.some((m) => {
2118
- const d = V(m);
2119
- for (const g of r.values())
2120
- if (U(g, d))
2136
+ const d = k(m);
2137
+ for (const y of r.values())
2138
+ if (U(y, d))
2121
2139
  return !0;
2122
2140
  return !1;
2123
2141
  }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !Se(f.spec));
@@ -2125,30 +2143,30 @@ function zn(t, e) {
2125
2143
  return;
2126
2144
  for (const f of a)
2127
2145
  for (const m of f.spec.axesSpec) {
2128
- const d = V(m);
2146
+ const d = k(m);
2129
2147
  i.set(D(d), d);
2130
2148
  }
2131
2149
  const l = (n.getColumns((f) => f.axesSpec.some((m) => {
2132
- const d = V(m);
2133
- for (const g of i.values())
2134
- if (U(g, d))
2150
+ const d = k(m);
2151
+ for (const y of i.values())
2152
+ if (U(y, d))
2135
2153
  return !0;
2136
2154
  return !1;
2137
2155
  }), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => Se(f.spec));
2138
2156
  if (!re(l))
2139
2157
  return;
2140
- const u = [...a, ...l], h = Ue(r, u);
2158
+ const u = [...a, ...l], h = Ke(r, u);
2141
2159
  return t.createPFrame(h);
2142
2160
  }
2143
- function Xn({
2161
+ function zn({
2144
2162
  selection: t,
2145
- columnId: e = vt(),
2163
+ columnId: e = Ct(),
2146
2164
  label: n = "Selection marker",
2147
2165
  domain: r
2148
2166
  }) {
2149
2167
  if (!(t != null && t.axesSpec.length))
2150
2168
  return;
2151
- const i = t.selectedKeys.filter((o) => o.every((s) => !bt(s))).map((o) => ({ key: o, val: 1 }));
2169
+ const i = t.selectedKeys.filter((o) => o.every((s) => !vt(s))).map((o) => ({ key: o, val: 1 }));
2152
2170
  if (i.length)
2153
2171
  return {
2154
2172
  id: e,
@@ -2166,8 +2184,8 @@ function Xn({
2166
2184
  data: i
2167
2185
  };
2168
2186
  }
2169
- function Yn(t) {
2170
- return t === Ct ? (console.error("Axis value can never be N/A"), "") : t;
2187
+ function Xn(t) {
2188
+ return t === Tt ? (console.error("Axis value can never be N/A"), "") : t;
2171
2189
  }
2172
2190
  function ln(t) {
2173
2191
  throw new Error("Unexpected object: " + t);
@@ -2178,7 +2196,7 @@ function R(t) {
2178
2196
  function ie(t) {
2179
2197
  return t.valueType === "String";
2180
2198
  }
2181
- const Qe = {
2199
+ const Ze = {
2182
2200
  lessThan: {
2183
2201
  label: "Col < X (Less Than)",
2184
2202
  form: {
@@ -2542,30 +2560,30 @@ const Qe = {
2542
2560
  supportedFor: () => !1
2543
2561
  }
2544
2562
  };
2545
- function Qn(t) {
2546
- return t ? Object.entries(Qe).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
2563
+ function Yn(t) {
2564
+ return t ? Object.entries(Ze).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
2547
2565
  label: n.label,
2548
2566
  value: e
2549
2567
  })) : [];
2550
2568
  }
2551
- function Zn(t) {
2552
- return Qe[t];
2569
+ function Qn(t) {
2570
+ return Ze[t];
2553
2571
  }
2554
- function Ae(t) {
2572
+ function we(t) {
2555
2573
  if (t.type === "or")
2556
2574
  return {
2557
2575
  type: "or",
2558
- filters: Ke(t.filters)
2576
+ filters: Me(t.filters)
2559
2577
  };
2560
2578
  if (t.type === "and")
2561
2579
  return {
2562
2580
  type: "and",
2563
- filters: Ke(t.filters)
2581
+ filters: Me(t.filters)
2564
2582
  };
2565
2583
  if (t.type === "not")
2566
2584
  return {
2567
2585
  type: "not",
2568
- filter: Ae(t.filter)
2586
+ filter: we(t.filter)
2569
2587
  };
2570
2588
  if (t.type === "isNA")
2571
2589
  return {
@@ -2671,20 +2689,20 @@ function Ae(t) {
2671
2689
  throw new Error("Filter type is undefined, this should not happen");
2672
2690
  ln(t);
2673
2691
  }
2674
- function Ke(t) {
2675
- return t.filter((e) => e.type !== void 0).map(Ae);
2692
+ function Me(t) {
2693
+ return t.filter((e) => e.type !== void 0).map(we);
2676
2694
  }
2677
- function er(t) {
2695
+ function Zn(t) {
2678
2696
  return {
2679
2697
  title: t.title,
2680
2698
  mode: t.mode,
2681
2699
  steps: t.steps.filter((e) => e.filter.type == null ? !1 : e.filter.type === "or" || e.filter.type === "and" ? e.filter.filters.length > 0 : !1).map((e) => ({
2682
2700
  label: e.label.trim(),
2683
- filter: Ae(e.filter)
2701
+ filter: we(e.filter)
2684
2702
  }))
2685
2703
  };
2686
2704
  }
2687
- class tr {
2705
+ class er {
2688
2706
  constructor(e) {
2689
2707
  this.handle = e;
2690
2708
  }
@@ -2709,30 +2727,26 @@ class tr {
2709
2727
  }
2710
2728
  }
2711
2729
  function un(t) {
2712
- return Be({
2730
+ return Je({
2713
2731
  __isRef: !0,
2714
2732
  blockId: ae(t, "blockId"),
2715
2733
  name: ae(t, "name")
2716
2734
  });
2717
2735
  }
2718
- function nr(t) {
2719
- return Be({
2736
+ function tr(t) {
2737
+ return Je({
2720
2738
  ref: un(ae(t, "ref")),
2721
2739
  label: ae(t, "label")
2722
2740
  });
2723
2741
  }
2724
- const rr = {
2742
+ const nr = {
2725
2743
  sdkVersion: X
2726
2744
  };
2727
- function cn() {
2728
- return Je({ sdkVersion: X });
2745
+ function rr() {
2746
+ return platformaApiVersion ?? 1;
2729
2747
  }
2730
- function ir(t) {
2731
- try {
2732
- return cn();
2733
- } catch {
2734
- return t;
2735
- }
2748
+ function ir() {
2749
+ return $e({ sdkVersion: X, apiVersion: platformaApiVersion });
2736
2750
  }
2737
2751
  function or(t) {
2738
2752
  if (typeof globalThis.getEnvironmentValue == "function")
@@ -2740,20 +2754,20 @@ function or(t) {
2740
2754
  }
2741
2755
  export {
2742
2756
  gn as Args,
2743
- Ve as BlockModel,
2744
- rr as CurrentSdkInfo,
2757
+ Oe as BlockModel,
2758
+ nr as CurrentSdkInfo,
2745
2759
  L as FutureRef,
2746
2760
  tn as IS_VIRTUAL_COLUMN,
2747
- bn as It,
2748
- Jn as JsRenderInternal,
2749
- Ne as LABEL_ANNOTATION,
2761
+ yn as It,
2762
+ Bn as JsRenderInternal,
2763
+ Ue as LABEL_ANNOTATION,
2750
2764
  nn as LINKER_COLUMN_ANNOTATION,
2751
- vn as MainOutputs,
2752
- Tt as OutputError,
2753
- It as PAnnotationLabel,
2754
- _t as PAnnotationTrace,
2765
+ bn as MainOutputs,
2766
+ St as OutputError,
2767
+ _t as PAnnotationLabel,
2768
+ Lt as PAnnotationTrace,
2755
2769
  Q as PColumnCollection,
2756
- tr as PFrameImpl,
2770
+ er as PFrameImpl,
2757
2771
  J as RT_BINARY_PARTITIONED,
2758
2772
  z as RT_BINARY_SUPER_PARTITIONED,
2759
2773
  H as RT_JSON_PARTITIONED,
@@ -2761,84 +2775,84 @@ export {
2761
2775
  le as RT_RESOURCE_MAP,
2762
2776
  ue as RT_RESOURCE_MAP_PARTITIONED,
2763
2777
  ne as RenderCtx,
2764
- $t as ResultPool,
2765
- Cn as StagingOutputs,
2766
- Et as Trace,
2767
- Lt as TraceEntry,
2778
+ Wt as ResultPool,
2779
+ vn as StagingOutputs,
2780
+ Vt as Trace,
2781
+ Et as TraceEntry,
2768
2782
  O as TreeNodeAccessor,
2769
- Tn as UiState,
2770
- zt as allColumnsComputed,
2783
+ Cn as UiState,
2784
+ Xt as allColumnsComputed,
2771
2785
  re as allColumnsReady,
2772
- In as and,
2773
- er as compileAnnotationScript,
2774
- Ae as compileFilter,
2775
- Ke as compileFilters,
2776
- Nt as convertOrParsePColumnData,
2777
- zn as createPFrameForGraphs,
2778
- Hn as createPlDataTableSheet,
2779
- Oe as createPlDataTableStateV2,
2780
- Gn as createPlDataTableV2,
2781
- Xn as createRowSelectionColumn,
2782
- He as deriveLabels,
2786
+ Fn as and,
2787
+ Zn as compileAnnotationScript,
2788
+ we as compileFilter,
2789
+ Me as compileFilters,
2790
+ Ut as convertOrParsePColumnData,
2791
+ Hn as createPFrameForGraphs,
2792
+ Gn as createPlDataTableSheet,
2793
+ De as createPlDataTableStateV2,
2794
+ Wn as createPlDataTableV2,
2795
+ zn as createRowSelectionColumn,
2796
+ ze as deriveLabels,
2783
2797
  me as downgradeCfgOrLambda,
2784
- Ue as enrichCompatible,
2785
- Un as extractArchiveAndGetURL,
2786
- Wn as extractConfig,
2787
- Ut as filterDataInfoEntries,
2788
- Qe as filterUiMetadata,
2789
- wn as flatten,
2790
- nr as fromPlOption,
2798
+ Ke as enrichCompatible,
2799
+ Nn as extractArchiveAndGetURL,
2800
+ $n as extractConfig,
2801
+ Kt as filterDataInfoEntries,
2802
+ Ze as filterUiMetadata,
2803
+ An as flatten,
2804
+ tr as fromPlOption,
2791
2805
  un as fromPlRef,
2792
- Ht as getAllLabelColumns,
2806
+ zt as getAllLabelColumns,
2793
2807
  on as getAvailableWithLinkersAxes,
2794
2808
  Vn as getBlobContent,
2795
- Dn as getBlobContentAsJson,
2796
- On as getBlobContentAsString,
2797
- Rn as getDownloadedBlobContent,
2809
+ On as getBlobContentAsJson,
2810
+ kn as getBlobContentAsString,
2811
+ Dn as getDownloadedBlobContent,
2798
2812
  or as getEnvironmentValue,
2799
- Zn as getFilterUiMetadata,
2800
- Qn as getFilterUiTypeOptions,
2813
+ Qn as getFilterUiMetadata,
2814
+ Yn as getFilterUiTypeOptions,
2801
2815
  Z as getFromCfg,
2802
2816
  se as getImmediate,
2803
- Kn as getImportProgress,
2817
+ Un as getImportProgress,
2804
2818
  ae as getJsonField,
2805
- Mn as getLastLogs,
2819
+ Kn as getLastLogs,
2806
2820
  rn as getLinkerColumnsMap,
2807
- Bn as getLogHandle,
2808
- De as getMatchingLabelColumns,
2809
- Nn as getOnDemandBlobContent,
2810
- Ot as getPartitionKeysList,
2811
- ir as getPlatformaOrDefault,
2812
- jn as getProgressLog,
2813
- qn as getProgressLogWithInfo,
2814
- cn as getRawPlatformaInstance,
2815
- Ln as getResourceField,
2816
- En as getResourceValueAsJson,
2817
- Rt as getUniquePartitionKeys,
2818
- ge as ifDef,
2819
- Xt as isColumnHidden,
2820
- Yt as isColumnOptional,
2821
+ qn as getLogHandle,
2822
+ Re as getMatchingLabelColumns,
2823
+ Rn as getOnDemandBlobContent,
2824
+ Dt as getPartitionKeysList,
2825
+ rr as getPlatformaApiVersion,
2826
+ Mn as getProgressLog,
2827
+ jn as getProgressLogWithInfo,
2828
+ ir as getRawPlatformaInstance,
2829
+ _n as getResourceField,
2830
+ Ln as getResourceValueAsJson,
2831
+ Nt as getUniquePartitionKeys,
2832
+ ye as ifDef,
2833
+ Yt as isColumnHidden,
2834
+ Qt as isColumnOptional,
2821
2835
  an as isColumnReady,
2822
- Wt as isConfigLambda,
2823
- xn as isEmpty,
2836
+ Gt as isConfigLambda,
2837
+ wn as isEmpty,
2824
2838
  Se as isLabelColumn,
2825
- en as isLinkerColumn,
2826
- yn as isolate,
2827
- Sn as makeArray,
2828
- Ye as makeDefaultPTableParams,
2829
- Be as makeObject,
2830
- An as mapArrayValues,
2831
- Yn as mapPTableValueToAxisKey,
2832
- Pn as mapRecordValues,
2833
- kn as mapResourceFields,
2834
- Fn as not,
2835
- _n as or,
2839
+ Pe as isLinkerColumn,
2840
+ mn as isolate,
2841
+ Tn as makeArray,
2842
+ Qe as makeDefaultPTableParams,
2843
+ Je as makeObject,
2844
+ Pn as mapArrayValues,
2845
+ Xn as mapPTableValueToAxisKey,
2846
+ Sn as mapRecordValues,
2847
+ En as mapResourceFields,
2848
+ xn as not,
2849
+ In as or,
2836
2850
  Ce as parsePColumnData,
2837
- $n as parseResourceMap,
2838
- St as readOutput,
2839
- ye as uniqueBy,
2851
+ Jn as parseResourceMap,
2852
+ Pt as readOutput,
2853
+ ge as uniqueBy,
2840
2854
  ln as unreachable,
2841
- Gt as upgradePlDataTableStateV2,
2842
- mn as wrapOutputs
2855
+ Ht as upgradePlDataTableStateV2,
2856
+ hn as wrapOutputs
2843
2857
  };
2844
2858
  //# sourceMappingURL=index.mjs.map