@platforma-sdk/model 1.28.0 → 1.28.1

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,7 +1,7 @@
1
1
  var je = Object.defineProperty;
2
2
  var Ke = (t, e, n) => e in t ? je(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var L = (t, e, n) => Ke(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as se, mapPObjectData as ge, isDataInfoEntries as xe, isDataInfo as me, dataInfoToEntries as Ve, resolveAnchors as $e, isPColumnSpec as Z, isPartitionedDataInfoEntries as Je, getAxisId as F, entriesToDataInfo as Ne, selectorsToPredicate as ce, canonicalizeAxisId as Ue, AnchoredIdDeriver as ye, isPlRef as Be, mapValueInVOE as Me, ensurePColumn as Ge, extractAllColumns as We, mapPTableDef as He, mapDataInfo as qe, matchAxisId as G } from "@milaboratories/pl-model-common";
4
+ import { isPColumn as ie, mapPObjectData as ge, isDataInfoEntries as xe, isDataInfo as me, dataInfoToEntries as Ve, resolveAnchors as $e, isPColumnSpec as Q, isPartitionedDataInfoEntries as Je, getAxisId as E, entriesToDataInfo as Ne, selectorsToPredicate as ce, canonicalizeAxisId as Ue, AnchoredIdDeriver as ye, isPlRef as Be, mapValueInVOE as Me, ensurePColumn as Ge, extractAllColumns as We, mapPTableDef as He, mapDataInfo as qe, matchAxisId as G } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
6
  import { z as K } from "zod";
7
7
  import Pe from "canonicalize";
@@ -22,8 +22,8 @@ function Rt(t) {
22
22
  }
23
23
  });
24
24
  }
25
- function S(t) {
26
- return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? ee(t) : t;
25
+ function x(t) {
26
+ return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? Z(t) : t;
27
27
  }
28
28
  function W(t) {
29
29
  return { type: "GetFromCtx", variable: t };
@@ -35,12 +35,12 @@ function Ot(t) {
35
35
  };
36
36
  }
37
37
  const jt = W("$args"), Kt = W("$it"), Vt = W("$prod"), $t = W("$staging"), Jt = W("$ui");
38
- function ee(t) {
38
+ function Z(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
41
41
  function Ce(t) {
42
42
  const e = {};
43
- for (const [n, r] of Object.entries(t)) e[n] = S(r);
43
+ for (const [n, r] of Object.entries(t)) e[n] = x(r);
44
44
  return {
45
45
  type: "MakeObject",
46
46
  template: e
@@ -48,17 +48,17 @@ function Ce(t) {
48
48
  }
49
49
  function Nt(...t) {
50
50
  const e = [];
51
- for (const n of t) e.push(S(n));
51
+ for (const n of t) e.push(x(n));
52
52
  return {
53
53
  type: "MakeArray",
54
54
  template: e
55
55
  };
56
56
  }
57
- function te(t, e) {
57
+ function ee(t, e) {
58
58
  return {
59
59
  type: "GetJsonField",
60
- source: S(t),
61
- field: S(e)
60
+ source: x(t),
61
+ field: x(e)
62
62
  };
63
63
  }
64
64
  function Ut(t, e, n = "$it") {
@@ -112,15 +112,15 @@ function qt(t, e) {
112
112
  function zt(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
- source: S(t),
116
- field: S(e)
115
+ source: x(t),
116
+ field: x(e)
117
117
  };
118
118
  }
119
119
  function Yt() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
123
- source: S(t)
123
+ source: x(t)
124
124
  };
125
125
  };
126
126
  }
@@ -135,73 +135,73 @@ function Xt(t, e, n = "$it") {
135
135
  function Qt(t) {
136
136
  return {
137
137
  type: "GetBlobContent",
138
- source: S(t)
138
+ source: x(t)
139
139
  };
140
140
  }
141
141
  function Zt(t) {
142
142
  return {
143
143
  type: "GetBlobContentAsString",
144
- source: S(t)
144
+ source: x(t)
145
145
  };
146
146
  }
147
147
  function en() {
148
148
  return function(t) {
149
149
  return {
150
150
  type: "GetBlobContentAsJson",
151
- source: S(t)
151
+ source: x(t)
152
152
  };
153
153
  };
154
154
  }
155
155
  function tn(t) {
156
156
  return {
157
157
  type: "GetDownloadedBlobContent",
158
- source: S(t)
158
+ source: x(t)
159
159
  };
160
160
  }
161
161
  function nn(t) {
162
162
  return {
163
163
  type: "GetOnDemandBlobContent",
164
- source: S(t)
164
+ source: x(t)
165
165
  };
166
166
  }
167
167
  function rn(t, e) {
168
168
  return {
169
169
  type: "ExtractArchiveAndGetURL",
170
170
  format: e,
171
- source: S(t)
171
+ source: x(t)
172
172
  };
173
173
  }
174
174
  function sn(t) {
175
175
  return {
176
176
  type: "GetImportProgress",
177
- source: S(t)
177
+ source: x(t)
178
178
  };
179
179
  }
180
180
  function on(t, e) {
181
181
  return {
182
182
  type: "GetLastLogs",
183
- source: S(t),
183
+ source: x(t),
184
184
  lines: e
185
185
  };
186
186
  }
187
187
  function an(t, e) {
188
188
  return {
189
189
  type: "GetProgressLog",
190
- source: S(t),
190
+ source: x(t),
191
191
  patternToSearch: e
192
192
  };
193
193
  }
194
194
  function ln(t, e) {
195
195
  return {
196
196
  type: "GetProgressLogWithInfo",
197
- source: S(t),
197
+ source: x(t),
198
198
  patternToSearch: e
199
199
  };
200
200
  }
201
201
  function un(t) {
202
202
  return {
203
203
  type: "GetLogHandle",
204
- source: S(t)
204
+ source: x(t)
205
205
  };
206
206
  }
207
207
  function Xe() {
@@ -216,11 +216,11 @@ function _e(t) {
216
216
  function Qe() {
217
217
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
218
218
  }
219
- function h() {
219
+ function m() {
220
220
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
221
221
  throw new Error("Not in config rendering context");
222
222
  }
223
- function X(t, e) {
223
+ function Y(t, e) {
224
224
  const n = Qe();
225
225
  if (n === void 0) return !1;
226
226
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
@@ -228,12 +228,12 @@ function X(t, e) {
228
228
  }
229
229
  const ae = /* @__PURE__ */ new Map();
230
230
  function Ze(t, e) {
231
- t in h().callbackRegistry || (h().callbackRegistry[t] = (n) => {
231
+ t in m().callbackRegistry || (m().callbackRegistry[t] = (n) => {
232
232
  for (const r of ae.get(t))
233
233
  r(n);
234
234
  }, ae.set(t, [])), ae.get(t).push(e);
235
235
  }
236
- class _ {
236
+ class C {
237
237
  constructor(e, n = (r) => r) {
238
238
  L(this, "isResolved", !1);
239
239
  L(this, "resolvedValue");
@@ -242,10 +242,10 @@ class _ {
242
242
  });
243
243
  }
244
244
  map(e) {
245
- return new _(this.handle, (n) => e(this.postProcess(n)));
245
+ return new C(this.handle, (n) => e(this.postProcess(n)));
246
246
  }
247
247
  mapDefined(e) {
248
- return new _(this.handle, (n) => {
248
+ return new C(this.handle, (n) => {
249
249
  const r = this.postProcess(n);
250
250
  return r ? e(r) : void 0;
251
251
  });
@@ -257,7 +257,7 @@ class _ {
257
257
  function pe(t, e) {
258
258
  return t === void 0 ? void 0 : e(t);
259
259
  }
260
- class I {
260
+ class _ {
261
261
  constructor(e, n) {
262
262
  this.handle = e, this.resolvePath = n;
263
263
  }
@@ -297,46 +297,46 @@ class I {
297
297
  ...n.map((i) => typeof i == "string" ? i : i.field)
298
298
  ];
299
299
  return pe(
300
- h().resolveWithCommon(this.handle, e, ...n),
301
- (i) => new I(i, r)
300
+ m().resolveWithCommon(this.handle, e, ...n),
301
+ (i) => new _(i, r)
302
302
  );
303
303
  }
304
304
  get resourceType() {
305
- return h().getResourceType(this.handle);
305
+ return m().getResourceType(this.handle);
306
306
  }
307
307
  getInputsLocked() {
308
- return h().getInputsLocked(this.handle);
308
+ return m().getInputsLocked(this.handle);
309
309
  }
310
310
  getOutputsLocked() {
311
- return h().getOutputsLocked(this.handle);
311
+ return m().getOutputsLocked(this.handle);
312
312
  }
313
313
  getIsReadyOrError() {
314
- return h().getIsReadyOrError(this.handle);
314
+ return m().getIsReadyOrError(this.handle);
315
315
  }
316
316
  getIsFinal() {
317
- return h().getIsFinal(this.handle);
317
+ return m().getIsFinal(this.handle);
318
318
  }
319
319
  getError() {
320
320
  const e = [...this.resolvePath, "error"];
321
321
  return pe(
322
- h().getError(this.handle),
323
- (n) => new I(n, e)
322
+ m().getError(this.handle),
323
+ (n) => new _(n, e)
324
324
  );
325
325
  }
326
326
  listInputFields() {
327
- return h().listInputFields(this.handle);
327
+ return m().listInputFields(this.handle);
328
328
  }
329
329
  listOutputFields() {
330
- return h().listOutputFields(this.handle);
330
+ return m().listOutputFields(this.handle);
331
331
  }
332
332
  listDynamicFields() {
333
- return h().listDynamicFields(this.handle);
333
+ return m().listDynamicFields(this.handle);
334
334
  }
335
335
  getKeyValueBase64(e) {
336
- return h().getKeyValueBase64(this.handle, e);
336
+ return m().getKeyValueBase64(this.handle, e);
337
337
  }
338
338
  getKeyValueAsString(e) {
339
- return h().getKeyValueAsString(this.handle, e);
339
+ return m().getKeyValueAsString(this.handle, e);
340
340
  }
341
341
  getKeyValueAsJson(e) {
342
342
  const n = this.getKeyValueAsString(e);
@@ -344,10 +344,10 @@ class I {
344
344
  return JSON.parse(n);
345
345
  }
346
346
  getDataBase64() {
347
- return h().getDataBase64(this.handle);
347
+ return m().getDataBase64(this.handle);
348
348
  }
349
349
  getDataAsString() {
350
- return h().getDataAsString(this.handle);
350
+ return m().getDataAsString(this.handle);
351
351
  }
352
352
  getDataAsJson() {
353
353
  const e = this.getDataAsString();
@@ -360,7 +360,7 @@ class I {
360
360
  getPColumns(e = !1, n = "") {
361
361
  const r = this.parsePObjectCollection(e, n);
362
362
  return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
363
- if (!se(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
363
+ if (!ie(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
364
364
  return s;
365
365
  });
366
366
  }
@@ -368,7 +368,7 @@ class I {
368
368
  *
369
369
  */
370
370
  parsePObjectCollection(e = !1, n = "") {
371
- const r = h().parsePObjectCollection(
371
+ const r = m().parsePObjectCollection(
372
372
  this.handle,
373
373
  e,
374
374
  n,
@@ -378,19 +378,19 @@ class I {
378
378
  const i = {};
379
379
  for (const [s, o] of Object.entries(r)) {
380
380
  const a = [...this.resolvePath, s];
381
- i[s] = ge(o, (l) => new I(l, a));
381
+ i[s] = ge(o, (l) => new _(l, a));
382
382
  }
383
383
  return i;
384
384
  }
385
385
  getFileContentAsBase64() {
386
- return new _(h().getBlobContentAsBase64(this.handle));
386
+ return new C(m().getBlobContentAsBase64(this.handle));
387
387
  }
388
388
  getFileContentAsString() {
389
- return new _(h().getBlobContentAsString(this.handle));
389
+ return new C(m().getBlobContentAsString(this.handle));
390
390
  }
391
391
  getFileContentAsJson() {
392
- return new _(
393
- h().getBlobContentAsString(this.handle)
392
+ return new C(
393
+ m().getBlobContentAsString(this.handle)
394
394
  ).mapDefined((e) => JSON.parse(e));
395
395
  }
396
396
  /**
@@ -409,7 +409,7 @@ class I {
409
409
  * @returns downloaded file handle
410
410
  */
411
411
  getFileHandle() {
412
- return new _(h().getDownloadedBlobContentHandle(this.handle));
412
+ return new C(m().getDownloadedBlobContentHandle(this.handle));
413
413
  }
414
414
  /**
415
415
  * @deprecated use getFileHandle
@@ -421,7 +421,7 @@ class I {
421
421
  * @returns downloaded file handle
422
422
  */
423
423
  getRemoteFileHandle() {
424
- return new _(h().getOnDemandBlobContentHandle(this.handle));
424
+ return new C(m().getOnDemandBlobContentHandle(this.handle));
425
425
  }
426
426
  /**
427
427
  * @deprecated use getRemoteFileHandle
@@ -433,22 +433,22 @@ class I {
433
433
  * @returns the url to the extracted folder
434
434
  */
435
435
  extractArchiveAndGetURL(e) {
436
- return new _(h().extractArchiveAndGetURL(this.handle, e));
436
+ return new C(m().extractArchiveAndGetURL(this.handle, e));
437
437
  }
438
438
  getImportProgress() {
439
- return new _(h().getImportProgress(this.handle));
439
+ return new C(m().getImportProgress(this.handle));
440
440
  }
441
441
  getLastLogs(e) {
442
- return new _(h().getLastLogs(this.handle, e));
442
+ return new C(m().getLastLogs(this.handle, e));
443
443
  }
444
444
  getProgressLog(e) {
445
- return new _(h().getProgressLog(this.handle, e));
445
+ return new C(m().getProgressLog(this.handle, e));
446
446
  }
447
447
  getProgressLogWithInfo(e) {
448
- return new _(h().getProgressLogWithInfo(this.handle, e));
448
+ return new C(m().getProgressLogWithInfo(this.handle, e));
449
449
  }
450
450
  getLogHandle() {
451
- return new _(h().getLogHandle(this.handle));
451
+ return new C(m().getLogHandle(this.handle));
452
452
  }
453
453
  allFieldsResolved(e = "Input") {
454
454
  switch (e) {
@@ -472,9 +472,9 @@ class I {
472
472
  if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
473
473
  return;
474
474
  let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
475
- (c) => [c, this.resolve({ field: c, assertFieldType: r })]
475
+ (u) => [u, this.resolve({ field: u, assertFieldType: r })]
476
476
  );
477
- return s && (l = l.filter((c) => c[1] !== void 0)), l.map(([c, w]) => o(c, w));
477
+ return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, S]) => o(u, S));
478
478
  }
479
479
  }
480
480
  const Ie = "staging", Le = "main", et = {
@@ -512,93 +512,106 @@ const cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
512
512
  id: K.string().optional(),
513
513
  label: K.string()
514
514
  }), st = K.array(it), ot = 1e-3, at = "__LABEL__", ve = "__LABEL__@1";
515
- function Fe(t, e, n = {}) {
516
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((u) => {
517
- var $, q;
518
- const f = e(u);
519
- let p, y, v;
520
- "spec" in f && typeof f.spec == "object" ? (p = f.spec, y = f.prefixTrace, v = f.suffixTrace) : p = f;
521
- const m = ($ = p.annotations) == null ? void 0 : $[nt], b = (q = p.annotations) == null ? void 0 : q[rt], g = (b ? st.safeParse(JSON.parse(b)).data : void 0) ?? [], A = [
522
- ...y ?? [],
523
- ...g,
524
- ...v ?? []
515
+ function Ee(t, e, n = {}) {
516
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((p) => {
517
+ var q, D;
518
+ const c = e(p);
519
+ let h, A, y;
520
+ "spec" in c && typeof c.spec == "object" ? (h = c.spec, A = c.prefixTrace, y = c.suffixTrace) : h = c;
521
+ const v = (q = h.annotations) == null ? void 0 : q[nt], g = (D = h.annotations) == null ? void 0 : D[rt], P = (g ? st.safeParse(JSON.parse(g)).data : void 0) ?? [], b = [
522
+ ...A ?? [],
523
+ ...P,
524
+ ...y ?? []
525
525
  ];
526
- if (m) {
527
- const P = { label: m, type: at, importance: -2 };
528
- n.addLabelAsSuffix ? A.push(P) : A.splice(0, 0, P);
526
+ if (v) {
527
+ const I = { label: v, type: at, importance: -2 };
528
+ n.addLabelAsSuffix ? b.push(I) : b.splice(0, 0, I);
529
529
  }
530
- const x = [], k = /* @__PURE__ */ new Map();
531
- for (let P = A.length - 1; P >= 0; --P) {
532
- const { type: R } = A[P], z = A[P].importance ?? 0, J = (k.get(R) ?? 0) + 1;
533
- k.set(R, J);
534
- const E = `${R}@${J}`;
535
- i.set(E, (i.get(E) ?? 0) + 1), r.set(
536
- E,
530
+ const F = [], $ = /* @__PURE__ */ new Map();
531
+ for (let I = b.length - 1; I >= 0; --I) {
532
+ const { type: R } = b[I], se = b[I].importance ?? 0, J = ($.get(R) ?? 0) + 1;
533
+ $.set(R, J);
534
+ const w = `${R}@${J}`;
535
+ i.set(w, (i.get(w) ?? 0) + 1), r.set(
536
+ w,
537
537
  Math.max(
538
- r.get(E) ?? Number.NEGATIVE_INFINITY,
539
- z - (A.length - P) * ot
538
+ r.get(w) ?? Number.NEGATIVE_INFINITY,
539
+ se - (b.length - I) * ot
540
540
  )
541
- ), x.push({ ...A[P], fullType: E, occurenceIndex: J });
541
+ ), F.push({ ...b[I], fullType: w, occurenceIndex: J });
542
542
  }
543
- return x.reverse(), {
544
- value: u,
545
- spec: p,
546
- label: m,
547
- fullTrace: x
543
+ return F.reverse(), {
544
+ value: p,
545
+ spec: h,
546
+ label: v,
547
+ fullTrace: F
548
548
  };
549
549
  }), o = [], a = [], l = [...r];
550
- l.sort(([, u], [, f]) => f - u);
551
- for (const [u] of l)
552
- u.endsWith("@1") || i.get(u) === t.length ? o.push(u) : a.push(u);
553
- const c = (u) => s.map((f) => {
554
- const p = f.fullTrace.filter((v) => u.has(v.fullType)).map((v) => v.label), y = n.separator ?? " / ";
555
- return {
556
- label: p.join(y),
557
- value: f.value
558
- };
559
- });
550
+ l.sort(([, p], [, c]) => c - p);
551
+ for (const [p] of l)
552
+ p.endsWith("@1") || i.get(p) === t.length ? o.push(p) : a.push(p);
553
+ const u = (p) => {
554
+ const c = [];
555
+ for (let h = 0; h < s.length; h++) {
556
+ const A = s[h], y = A.fullTrace.filter((P) => p.has(P.fullType));
557
+ if (y.length === 0)
558
+ return;
559
+ const v = y.map((P) => P.label), g = n.separator ?? " / ";
560
+ c.push({
561
+ label: v.join(g),
562
+ value: A.value
563
+ });
564
+ }
565
+ return c;
566
+ };
560
567
  if (o.length === 0) {
561
568
  if (a.length !== 0) throw new Error("Assertion error.");
562
- return c(new Set(ve));
563
- }
564
- let w = 0, d = 0;
565
- for (; w < o.length; ) {
566
- const u = /* @__PURE__ */ new Set();
567
- n.includeNativeLabel && u.add(ve);
568
- for (let p = 0; p < w; ++p) u.add(o[p]);
569
- u.add(o[d]);
570
- const f = c(u);
571
- if (new Set(f.map((p) => p.label)).size === t.length) return f;
572
- d++, d == o.length && (w++, d = w);
569
+ const p = u(new Set(ve));
570
+ if (p === void 0) throw new Error("Assertion error.");
571
+ return p;
572
+ }
573
+ let S = 0, d = 0;
574
+ for (; S < o.length; ) {
575
+ const p = /* @__PURE__ */ new Set();
576
+ n.includeNativeLabel && p.add(ve);
577
+ for (let h = 0; h < S; ++h) p.add(o[h]);
578
+ p.add(o[d]);
579
+ const c = u(p);
580
+ if (c !== void 0) {
581
+ if (new Set(c.map((h) => h.label)).size === t.length) return c;
582
+ d++, d == o.length && (S++, d = S);
583
+ }
573
584
  }
574
- return c(/* @__PURE__ */ new Set([...o, ...a]));
585
+ const f = u(/* @__PURE__ */ new Set([...o, ...a]));
586
+ if (f === void 0) throw new Error("Assertion error.");
587
+ return f;
575
588
  }
576
- const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", V = H + "BinaryPartitioned", Ee = H + "Partitioned/", ie = Ee + "JsonPartitioned", B = Ee + "BinaryPartitioned";
589
+ const H = "PColumnData/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", V = H + "BinaryPartitioned", Fe = H + "Partitioned/", re = Fe + "JsonPartitioned", B = Fe + "BinaryPartitioned";
577
590
  function De(t, e, n, r = [], i) {
578
591
  if (t === void 0) return !1;
579
592
  switch (t.resourceType.name) {
580
- case ne: {
593
+ case te: {
581
594
  let s = t.getInputsLocked();
582
595
  for (const o of t.listInputFields()) {
583
- const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], c = a === void 0 ? void 0 : e(a);
584
- c === void 0 && (s = !1), (c !== void 0 || i) && n.push({ key: l, value: c });
596
+ const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
597
+ u === void 0 && (s = !1), (u !== void 0 || i) && n.push({ key: l, value: u });
585
598
  }
586
599
  return s;
587
600
  }
588
- case re: {
601
+ case ne: {
589
602
  let s = t.getInputsLocked();
590
603
  for (const o of t.listInputFields()) {
591
604
  const a = t.resolve({ field: o, assertFieldType: "Input" });
592
605
  if (a === void 0) s = !1;
593
606
  else {
594
- const l = [...r, ...JSON.parse(o)], c = De(
607
+ const l = [...r, ...JSON.parse(o)], u = De(
595
608
  a,
596
609
  e,
597
610
  n,
598
611
  l,
599
612
  i
600
613
  );
601
- s = s && c;
614
+ s = s && u;
602
615
  }
603
616
  }
604
617
  return s;
@@ -623,10 +636,10 @@ function lt(t) {
623
636
  const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
624
637
  let i = 0;
625
638
  switch (e) {
626
- case ne:
639
+ case te:
627
640
  i = n.keyLength;
628
641
  break;
629
- case re:
642
+ case ne:
630
643
  i = n.partitionKeyLength + n.keyLength;
631
644
  break;
632
645
  case U:
@@ -634,12 +647,12 @@ function lt(t) {
634
647
  i = n.partitionKeyLength;
635
648
  break;
636
649
  case B:
637
- case ie:
650
+ case re:
638
651
  i = n.superPartitionKeyLength + n.partitionKeyLength;
639
652
  break;
640
653
  }
641
654
  switch (e) {
642
- case ne:
655
+ case te:
643
656
  case U:
644
657
  case V:
645
658
  for (let s of t.listInputFields()) {
@@ -648,16 +661,16 @@ function lt(t) {
648
661
  r.push(o);
649
662
  }
650
663
  break;
651
- case re:
664
+ case ne:
652
665
  case B:
653
- case ie:
666
+ case re:
654
667
  for (const s of t.listInputFields()) {
655
668
  const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
656
669
  if (a !== void 0)
657
670
  for (let l of a.listInputFields()) {
658
671
  e === B && (l = fe(l).baseKey);
659
- const c = [...o, ...JSON.parse(l)];
660
- r.push(c);
672
+ const u = [...o, ...JSON.parse(l)];
673
+ r.push(u);
661
674
  }
662
675
  }
663
676
  break;
@@ -703,11 +716,11 @@ function ct(t) {
703
716
  function he(t, e = []) {
704
717
  if (t === void 0 || !t.getIsReadyOrError()) return;
705
718
  const n = t.resourceType.name, r = t.getDataAsJson();
706
- if (e.length > 0 && (n === ie || n === B))
719
+ if (e.length > 0 && (n === re || n === B))
707
720
  throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
708
721
  switch (n) {
722
+ case te:
709
723
  case ne:
710
- case re:
711
724
  throw new Error(`Only data columns are supported, got: ${n}`);
712
725
  case U: {
713
726
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
@@ -732,8 +745,8 @@ function he(t, e = []) {
732
745
  for (const o of t.listInputFields()) {
733
746
  const a = fe(o), l = t.resolve({ field: o, assertFieldType: "Input" });
734
747
  if (l === void 0) return;
735
- let c = s.get(a.baseKey);
736
- c || (c = {}, s.set(a.baseKey, c)), a.type === "index" ? c.index = l : c.values = l;
748
+ let u = s.get(a.baseKey);
749
+ u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
737
750
  }
738
751
  for (const [o, a] of s.entries()) {
739
752
  if (!a.index || !a.values) return;
@@ -752,7 +765,7 @@ function he(t, e = []) {
752
765
  parts: i
753
766
  };
754
767
  }
755
- case ie: {
768
+ case re: {
756
769
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
757
770
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
758
771
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
@@ -802,7 +815,7 @@ function pt(t) {
802
815
  if (t !== void 0) {
803
816
  if (xe(t)) return t;
804
817
  if (me(t)) return Ve(t);
805
- if (t instanceof I) return he(t);
818
+ if (t instanceof _) return he(t);
806
819
  throw new Error(`Unexpected input type: ${typeof t}`);
807
820
  }
808
821
  }
@@ -935,110 +948,110 @@ class be {
935
948
  const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1 } = n ?? {}, a = {
936
949
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
937
950
  ...i ?? {}
938
- }, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], c = [];
939
- for (const u of l) {
940
- const f = yt(u);
941
- let p;
942
- if (f) {
951
+ }, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u = [];
952
+ for (const f of l) {
953
+ const p = yt(f);
954
+ let c;
955
+ if (p) {
943
956
  if (!r)
944
957
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
945
- p = $e(r.anchors, u);
958
+ c = $e(r.anchors, f);
946
959
  } else
947
- p = u;
948
- const y = /* @__PURE__ */ new Set(), v = [];
960
+ c = f;
961
+ const h = /* @__PURE__ */ new Set(), A = [];
949
962
  for (const g of this.providers) {
950
- const A = g.selectColumns(p);
951
- for (const x of A) {
952
- if (y.has(x.id)) throw new Error(`Duplicate column id ${x.id} in provider ${g.constructor.name}`);
953
- y.add(x.id), v.push(x);
963
+ const P = g.selectColumns(c);
964
+ for (const b of P) {
965
+ if (h.has(b.id)) throw new Error(`Duplicate column id ${b.id} in provider ${g.constructor.name}`);
966
+ h.add(b.id), A.push(b);
954
967
  }
955
968
  }
956
- if (v.length === 0) continue;
957
- const m = vt(u), b = m.length > 0;
958
- for (const g of v) {
959
- if (!Z(g.spec)) continue;
960
- const A = g.spec;
961
- if (b) {
962
- const x = pt(g.data);
963
- if (!x) {
969
+ if (A.length === 0) continue;
970
+ const y = vt(f), v = y.length > 0;
971
+ for (const g of A) {
972
+ if (!Q(g.spec)) continue;
973
+ const P = g.spec;
974
+ if (v) {
975
+ const b = pt(g.data);
976
+ if (!b) {
964
977
  if (s) continue;
965
978
  return;
966
979
  }
967
- if (!Je(x))
968
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${x.type} for column ${g.id}`);
969
- const k = ct(x), $ = m[m.length - 1];
970
- if ($ >= x.partitionKeyLength)
971
- throw new Error(`Not enough partition keys (${x.partitionKeyLength}) for requested split axes (max index ${$}) in column ${A.name}`);
972
- const q = m.map((C) => this.findLabels(F(A.axesSpec[C]))), P = [], R = (C, N) => {
973
- if (N >= m.length) {
974
- P.push([...C]);
980
+ if (!Je(b))
981
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${b.type} for column ${g.id}`);
982
+ const F = ct(b), $ = y[y.length - 1];
983
+ if ($ >= b.partitionKeyLength)
984
+ throw new Error(`Not enough partition keys (${b.partitionKeyLength}) for requested split axes (max index ${$}) in column ${P.name}`);
985
+ const q = y.map((w) => this.findLabels(E(P.axesSpec[w]))), D = [], I = (w, N) => {
986
+ if (N >= y.length) {
987
+ D.push([...w]);
975
988
  return;
976
989
  }
977
- const D = m[N];
978
- if (D >= k.length)
979
- throw new Error(`Axis index ${D} out of bounds for unique keys array (length ${k.length}) during split key generation for column ${g.id}`);
980
- const O = k[D];
990
+ const k = y[N];
991
+ if (k >= F.length)
992
+ throw new Error(`Axis index ${k} out of bounds for unique keys array (length ${F.length}) during split key generation for column ${g.id}`);
993
+ const O = F[k];
981
994
  if (!O || O.length === 0) {
982
- P.length = 0;
995
+ D.length = 0;
983
996
  return;
984
997
  }
985
- for (const Y of O)
986
- C.push(Y), R(C, N + 1), C.pop();
998
+ for (const z of O)
999
+ w.push(z), I(w, N + 1), w.pop();
987
1000
  };
988
- if (R([], 0), P.length === 0)
1001
+ if (I([], 0), D.length === 0)
989
1002
  continue;
990
- const z = [...A.axesSpec], J = m.map((C) => C);
991
- for (let C = m.length - 1; C >= 0; C--)
992
- z.splice(m[C], 1);
993
- const E = { ...A, axesSpec: z };
994
- for (const C of P) {
995
- const N = C.map((D, O) => {
996
- const Y = J[O], Re = F(A.axesSpec[Y]), oe = q[O], Oe = (oe == null ? void 0 : oe[D]) ?? String(D);
997
- return { axisIdx: Y, axisId: Re, value: D, label: Oe };
1003
+ const R = [...P.axesSpec], se = y.map((w) => w);
1004
+ for (let w = y.length - 1; w >= 0; w--)
1005
+ R.splice(y[w], 1);
1006
+ const J = { ...P, axesSpec: R };
1007
+ for (const w of D) {
1008
+ const N = w.map((k, O) => {
1009
+ const z = se[O], Re = E(P.axesSpec[z]), oe = q[O], Oe = (oe == null ? void 0 : oe[k]) ?? String(k);
1010
+ return { axisIdx: z, axisId: Re, value: k, label: Oe };
998
1011
  });
999
- c.push({
1012
+ u.push({
1000
1013
  type: "split",
1001
1014
  originalColumn: g,
1002
- spec: A,
1003
- adjustedSpec: E,
1004
- dataEntries: x,
1015
+ spec: P,
1016
+ adjustedSpec: J,
1017
+ dataEntries: b,
1005
1018
  axisFilters: N
1006
1019
  });
1007
1020
  }
1008
1021
  } else
1009
- c.push({
1022
+ u.push({
1010
1023
  type: "direct",
1011
1024
  originalColumn: g,
1012
- spec: A,
1013
- adjustedSpec: A
1025
+ spec: P,
1026
+ adjustedSpec: P
1014
1027
  });
1015
1028
  }
1016
1029
  }
1017
- if (c.length === 0) return [];
1018
- const w = Fe(
1019
- c,
1020
- (u) => ({
1021
- spec: u.spec,
1022
- suffixTrace: u.type === "split" ? ht(u.axisFilters) : void 0
1030
+ if (u.length === 0) return [];
1031
+ const S = Ee(
1032
+ u,
1033
+ (f) => ({
1034
+ spec: f.spec,
1035
+ suffixTrace: f.type === "split" ? ht(f.axisFilters) : void 0
1023
1036
  }),
1024
1037
  a
1025
1038
  ), d = [];
1026
- for (const { value: u, label: f } of w) {
1027
- const { originalColumn: p, spec: y } = u, v = u.type === "split" ? u.axisFilters : void 0, m = gt(v);
1028
- let b;
1029
- r ? b = r.deriveS(y, m) : b = mt(p.id, m);
1030
- let g = { ...u.adjustedSpec };
1039
+ for (const { value: f, label: p } of S) {
1040
+ const { originalColumn: c, spec: h } = f, A = f.type === "split" ? f.axisFilters : void 0, y = gt(A);
1041
+ let v;
1042
+ r ? v = r.deriveS(h, y) : v = mt(c.id, y);
1043
+ let g = { ...f.adjustedSpec };
1031
1044
  o && (g = {
1032
1045
  ...g,
1033
1046
  annotations: {
1034
1047
  ...g.annotations ?? {},
1035
- "pl7.app/label": f
1048
+ "pl7.app/label": p
1036
1049
  }
1037
1050
  }), d.push({
1038
- id: b,
1051
+ id: v,
1039
1052
  spec: g,
1040
- data: () => u.type === "split" ? Ne(dt(u.dataEntries, m)) : u.originalColumn.data,
1041
- label: f
1053
+ data: () => f.type === "split" ? Ne(dt(f.dataEntries, y)) : f.originalColumn.data,
1054
+ label: p
1042
1055
  });
1043
1056
  }
1044
1057
  return d;
@@ -1074,11 +1087,11 @@ function le(t, e) {
1074
1087
  return !0;
1075
1088
  }
1076
1089
  function we(t) {
1077
- return ge(t, (e) => e instanceof I ? e.handle : me(e) ? qe(e, (n) => n.handle) : e);
1090
+ return ge(t, (e) => e instanceof _ ? e.handle : me(e) ? qe(e, (n) => n.handle) : e);
1078
1091
  }
1079
1092
  class bt {
1080
1093
  constructor() {
1081
- L(this, "ctx", h());
1094
+ L(this, "ctx", m());
1082
1095
  }
1083
1096
  /**
1084
1097
  * @deprecated use getOptions()
@@ -1088,7 +1101,7 @@ class bt {
1088
1101
  }
1089
1102
  getOptions(e, n) {
1090
1103
  const r = typeof e == "function" ? e : ce(e), i = this.getSpecs().entries.filter((s) => r(s.obj));
1091
- return typeof n == "object" || typeof n > "u" ? Fe(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
1104
+ return typeof n == "object" || typeof n > "u" ? Ee(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
1092
1105
  ref: s,
1093
1106
  label: o
1094
1107
  })) : i.map((s) => ({
@@ -1181,7 +1194,7 @@ class bt {
1181
1194
  ref: n.ref,
1182
1195
  obj: {
1183
1196
  ...n.obj,
1184
- data: new I(n.obj.data, [n.ref.blockId, n.ref.name])
1197
+ data: new _(n.obj.data, [n.ref.blockId, n.ref.name])
1185
1198
  }
1186
1199
  }))
1187
1200
  };
@@ -1202,7 +1215,7 @@ class bt {
1202
1215
  ...n.obj,
1203
1216
  data: Me(
1204
1217
  n.obj.data,
1205
- (r) => new I(r, [n.ref.blockId, n.ref.name])
1218
+ (r) => new _(r, [n.ref.blockId, n.ref.name])
1206
1219
  )
1207
1220
  }
1208
1221
  }))
@@ -1231,7 +1244,7 @@ class bt {
1231
1244
  if (n)
1232
1245
  return ge(
1233
1246
  n,
1234
- (i) => new I(i, [e.blockId, e.name])
1247
+ (i) => new _(i, [e.blockId, e.name])
1235
1248
  );
1236
1249
  }
1237
1250
  /**
@@ -1252,7 +1265,7 @@ class bt {
1252
1265
  getPColumnSpecByRef(e) {
1253
1266
  const n = this.getSpecByRef(e);
1254
1267
  if (n) {
1255
- if (!Z(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
1268
+ if (!Q(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
1256
1269
  return n;
1257
1270
  }
1258
1271
  }
@@ -1271,7 +1284,7 @@ class bt {
1271
1284
  findDataWithCompatibleSpec(e) {
1272
1285
  const n = [];
1273
1286
  e: for (const r of this.getData().entries) {
1274
- if (!Z(r.obj.spec))
1287
+ if (!Q(r.obj.spec))
1275
1288
  continue;
1276
1289
  const i = r.obj.spec;
1277
1290
  if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
@@ -1292,7 +1305,7 @@ class bt {
1292
1305
  findLabels(e) {
1293
1306
  const n = this.getData();
1294
1307
  for (const r of n.entries) {
1295
- if (!se(r.obj)) continue;
1308
+ if (!ie(r.obj)) continue;
1296
1309
  const i = r.obj.spec;
1297
1310
  if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && le(e.domain, i.axesSpec[0].domain)) {
1298
1311
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
@@ -1314,7 +1327,7 @@ class bt {
1314
1327
  */
1315
1328
  selectColumns(e) {
1316
1329
  const n = typeof e == "function" ? e : ce(e);
1317
- return this.getSpecs().entries.filter(({ obj: i }) => Z(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
1330
+ return this.getSpecs().entries.filter(({ obj: i }) => Q(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
1318
1331
  const o = s;
1319
1332
  let a = null;
1320
1333
  const l = this;
@@ -1322,8 +1335,8 @@ class bt {
1322
1335
  id: Pe(i),
1323
1336
  spec: o,
1324
1337
  get data() {
1325
- var c;
1326
- return a !== null || (a = (c = l.getPColumnByRef(i)) == null ? void 0 : c.data), a;
1338
+ var u;
1339
+ return a !== null || (a = (u = l.getPColumnByRef(i)) == null ? void 0 : u.data), a;
1327
1340
  }
1328
1341
  };
1329
1342
  });
@@ -1341,7 +1354,7 @@ class bt {
1341
1354
  }));
1342
1355
  }
1343
1356
  }
1344
- class Q {
1357
+ class X {
1345
1358
  constructor() {
1346
1359
  L(this, "ctx");
1347
1360
  L(this, "args");
@@ -1349,7 +1362,7 @@ class Q {
1349
1362
  // lazy rendering because this feature is rarely used
1350
1363
  L(this, "_activeArgsCache");
1351
1364
  L(this, "resultPool", new bt());
1352
- this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
1365
+ this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
1353
1366
  }
1354
1367
  /**
1355
1368
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
@@ -1367,7 +1380,7 @@ class Q {
1367
1380
  getNamedAccessor(e) {
1368
1381
  return pe(
1369
1382
  this.ctx.getAccessorHandleByName(e),
1370
- (n) => new I(n, [e])
1383
+ (n) => new _(n, [e])
1371
1384
  );
1372
1385
  }
1373
1386
  get prerun() {
@@ -1386,7 +1399,7 @@ class Q {
1386
1399
  }
1387
1400
  verifyInlineAndExplicitColumnsSupport(e) {
1388
1401
  var i;
1389
- const n = e.some((s) => !(s.data instanceof I) || me(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1402
+ const n = e.some((s) => !(s.data instanceof _) || me(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
1390
1403
  if (n && !r) throw Error("Inline or explicit columns not supported");
1391
1404
  }
1392
1405
  // TODO remove all non-PColumn fields
@@ -1417,7 +1430,7 @@ class Q {
1417
1430
  return this.ctx.getCurrentUnstableMarker();
1418
1431
  }
1419
1432
  }
1420
- const M = "1.28.0";
1433
+ const M = "1.28.1";
1421
1434
  function wt(t) {
1422
1435
  return t.__renderLambda === !0;
1423
1436
  }
@@ -1440,7 +1453,7 @@ function dn(t) {
1440
1453
  sdkVersion: o,
1441
1454
  sections: a,
1442
1455
  title: l
1443
- } = t.v3, { code: c } = t;
1456
+ } = t.v3, { code: u } = t;
1444
1457
  return {
1445
1458
  initialArgs: e,
1446
1459
  initialUiState: n,
@@ -1450,7 +1463,7 @@ function dn(t) {
1450
1463
  sdkVersion: o,
1451
1464
  sections: a,
1452
1465
  title: l,
1453
- code: c
1466
+ code: u
1454
1467
  };
1455
1468
  } else if (t.inputsValid !== void 0) {
1456
1469
  const { sdkVersion: e, renderingMode: n, outputs: r, inputsValid: i, sections: s, initialArgs: o, code: a } = t, l = Object.keys(t);
@@ -1463,7 +1476,7 @@ function dn(t) {
1463
1476
  renderingMode: n,
1464
1477
  initialArgs: o,
1465
1478
  outputs: Object.fromEntries(
1466
- Object.entries(r).map(([c, w]) => [c, j(w)])
1479
+ Object.entries(r).map(([u, S]) => [u, j(S)])
1467
1480
  ),
1468
1481
  inputsValid: j(i),
1469
1482
  sections: j(s),
@@ -1481,7 +1494,7 @@ function dn(t) {
1481
1494
  renderingMode: r,
1482
1495
  initialArgs: o,
1483
1496
  outputs: Object.fromEntries(
1484
- Object.entries(i).map(([c, w]) => [c, j(w)])
1497
+ Object.entries(i).map(([u, S]) => [u, j(S)])
1485
1498
  ),
1486
1499
  inputsValid: j(n),
1487
1500
  sections: j(s),
@@ -1505,15 +1518,15 @@ class T {
1505
1518
  void 0,
1506
1519
  {},
1507
1520
  {},
1508
- ee(!0),
1509
- ee([]),
1521
+ Z(!0),
1522
+ Z([]),
1510
1523
  void 0
1511
1524
  );
1512
1525
  }
1513
1526
  output(e, n, r = {}) {
1514
1527
  if (typeof n == "function") {
1515
1528
  const i = `output#${e}`;
1516
- return X(i, () => n(new Q())), new T(
1529
+ return Y(i, () => n(new X())), new T(
1517
1530
  this._renderingMode,
1518
1531
  this._initialArgs,
1519
1532
  this._initialUiState,
@@ -1548,7 +1561,7 @@ class T {
1548
1561
  return this.output(e, n, { retentive: !0 });
1549
1562
  }
1550
1563
  argsValid(e) {
1551
- return typeof e == "function" ? (X("inputsValid", () => e(new Q())), new T(
1564
+ return typeof e == "function" ? (Y("inputsValid", () => e(new X())), new T(
1552
1565
  this._renderingMode,
1553
1566
  this._initialArgs,
1554
1567
  this._initialUiState,
@@ -1570,7 +1583,7 @@ class T {
1570
1583
  );
1571
1584
  }
1572
1585
  sections(e) {
1573
- return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (X("sections", () => e(new Q())), new T(
1586
+ return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (Y("sections", () => e(new X())), new T(
1574
1587
  this._renderingMode,
1575
1588
  this._initialArgs,
1576
1589
  this._initialUiState,
@@ -1590,7 +1603,7 @@ class T {
1590
1603
  }
1591
1604
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
1592
1605
  title(e) {
1593
- return X("title", () => e(new Q())), new T(
1606
+ return Y("title", () => e(new X())), new T(
1594
1607
  this._renderingMode,
1595
1608
  this._initialArgs,
1596
1609
  this._initialUiState,
@@ -1669,39 +1682,39 @@ class T {
1669
1682
  }
1670
1683
  }
1671
1684
  function fn(t, e, n, r) {
1672
- var c, w;
1685
+ var u, S;
1673
1686
  Array.isArray(r) && (r = { filters: r });
1674
- const i = t.resultPool.getData().entries.map((d) => d.obj).filter(se).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s = (d, u) => {
1675
- let f = d.toString();
1676
- if (u)
1677
- for (const p in u)
1678
- f += p, f += u[p];
1679
- return f;
1687
+ const i = t.resultPool.getData().entries.map((d) => d.obj).filter(ie).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s = (d, f) => {
1688
+ let p = d.toString();
1689
+ if (f)
1690
+ for (const c in f)
1691
+ p += c, p += f[c];
1692
+ return p;
1680
1693
  }, o = /* @__PURE__ */ new Map();
1681
1694
  for (const d of e)
1682
- for (const u of d.spec.axesSpec) {
1683
- const f = F(u);
1684
- for (const p of i) {
1685
- const y = p.spec.axesSpec[0], v = F(p.spec.axesSpec[0]);
1686
- if (G(f, v)) {
1687
- const m = Object.keys(f.domain ?? {}).length, b = Object.keys(v.domain ?? {}).length;
1688
- if (m > b) {
1689
- const g = s(p.id, f.domain);
1695
+ for (const f of d.spec.axesSpec) {
1696
+ const p = E(f);
1697
+ for (const c of i) {
1698
+ const h = c.spec.axesSpec[0], A = E(c.spec.axesSpec[0]);
1699
+ if (G(p, A)) {
1700
+ const y = Object.keys(p.domain ?? {}).length, v = Object.keys(A.domain ?? {}).length;
1701
+ if (y > v) {
1702
+ const g = s(c.id, p.domain);
1690
1703
  o.set(g, {
1691
1704
  id: g,
1692
1705
  spec: {
1693
- ...p.spec,
1694
- axesSpec: [{ ...f, annotations: y.annotations }]
1706
+ ...c.spec,
1707
+ axesSpec: [{ ...p, annotations: h.annotations }]
1695
1708
  },
1696
- data: p.data
1709
+ data: c.data
1697
1710
  });
1698
1711
  } else
1699
- o.set(s(p.id), p);
1712
+ o.set(s(c.id), c);
1700
1713
  }
1701
1714
  }
1702
1715
  }
1703
1716
  if ([...e, ...o.values()].some(
1704
- (d) => d.data instanceof I && !d.data.getIsReadyOrError()
1717
+ (d) => d.data instanceof _ && !d.data.getIsReadyOrError()
1705
1718
  ))
1706
1719
  return;
1707
1720
  let a = e;
@@ -1720,8 +1733,8 @@ function fn(t, e, n, r) {
1720
1733
  },
1721
1734
  secondary: l.map((d) => ({ type: "column", column: d }))
1722
1735
  },
1723
- filters: [...(r == null ? void 0 : r.filters) ?? [], ...((c = n == null ? void 0 : n.pTableParams) == null ? void 0 : c.filters) ?? []],
1724
- sorting: ((w = n == null ? void 0 : n.pTableParams) == null ? void 0 : w.sorting) ?? []
1736
+ filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
1737
+ sorting: ((S = n == null ? void 0 : n.pTableParams) == null ? void 0 : S.sorting) ?? []
1725
1738
  });
1726
1739
  }
1727
1740
  function hn(t, e, n) {
@@ -1755,55 +1768,55 @@ function St(t) {
1755
1768
  }), e;
1756
1769
  }
1757
1770
  function xt(t, e) {
1758
- const n = t.spec.axesSpec.map(F);
1759
- return e.spec.axesSpec.map(F).every((i) => n.some((s) => G(s, i) && G(i, s)));
1771
+ const n = t.spec.axesSpec.map(E);
1772
+ return e.spec.axesSpec.map(E).every((i) => n.some((s) => G(s, i) && G(i, s)));
1760
1773
  }
1761
1774
  function ke(t, e) {
1762
- const n = t.spec.axesSpec.map(F);
1763
- return e.spec.axesSpec.map(F).every((i) => n.some((s) => G(s, i)));
1775
+ const n = t.spec.axesSpec.map(E);
1776
+ return e.spec.axesSpec.map(E).every((i) => n.some((s) => G(s, i)));
1764
1777
  }
1765
1778
  const Pt = "pl7.app/graph/isVirtual", Ae = "pl7.app/label";
1766
1779
  function Se(t, e) {
1767
- const n = t.spec.axesSpec.map(F), r = e.spec.axesSpec.map(F);
1780
+ const n = t.spec.axesSpec.map(E), r = e.spec.axesSpec.map(E);
1768
1781
  if (xt(t, e))
1769
1782
  return [];
1770
1783
  if (!ke(t, e))
1771
1784
  return [];
1772
- const o = r.map((d) => n.filter((u) => G(u, d))), a = St(o), l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), w = a.map((d) => {
1773
- const u = /* @__PURE__ */ new Set();
1774
- return d.map((f, p) => {
1775
- const y = e.spec.axesSpec[p].domain, v = f.domain;
1776
- return Object.entries(v ?? {}).forEach(([m, b]) => {
1777
- if ((y == null ? void 0 : y[m]) === void 0) {
1778
- const g = JSON.stringify([m, b]);
1779
- u.add(g), l.add(g);
1785
+ const o = r.map((d) => n.filter((f) => G(f, d))), a = St(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), S = a.map((d) => {
1786
+ const f = /* @__PURE__ */ new Set();
1787
+ return d.map((p, c) => {
1788
+ const h = e.spec.axesSpec[c].domain, A = p.domain;
1789
+ return Object.entries(A ?? {}).forEach(([y, v]) => {
1790
+ if ((h == null ? void 0 : h[y]) === void 0) {
1791
+ const g = JSON.stringify([y, v]);
1792
+ f.add(g), l.add(g);
1780
1793
  }
1781
1794
  }), {
1782
- ...f,
1783
- annotations: e.spec.axesSpec[p].annotations
1795
+ ...p,
1796
+ annotations: e.spec.axesSpec[c].annotations
1784
1797
  };
1785
- }), u;
1798
+ }), f;
1786
1799
  });
1787
1800
  return [...l].forEach((d) => {
1788
- w.some((u) => !u.has(d)) && c.add(d);
1789
- }), a.map((d, u) => {
1790
- var m;
1791
- const f = At(e.id, d.map((b) => b.domain)), p = ((m = e.spec.annotations) == null ? void 0 : m[Ae]) ?? "", y = [...w[u]].filter((b) => c.has(b)).sort().map((b) => {
1801
+ S.some((f) => !f.has(d)) && u.add(d);
1802
+ }), a.map((d, f) => {
1803
+ var y;
1804
+ const p = At(e.id, d.map((v) => v.domain)), c = ((y = e.spec.annotations) == null ? void 0 : y[Ae]) ?? "", h = [...S[f]].filter((v) => u.has(v)).sort().map((v) => {
1792
1805
  var g;
1793
- return (g = JSON.parse(b)) == null ? void 0 : g[1];
1794
- }).join(" / "), v = {
1806
+ return (g = JSON.parse(v)) == null ? void 0 : g[1];
1807
+ }).join(" / "), A = {
1795
1808
  ...e.spec.annotations,
1796
1809
  [Pt]: "true"
1797
1810
  };
1798
- return (p || y) && (v[Ae] = p && y ? p + " / " + y : p + y), {
1799
- id: f,
1811
+ return (c || h) && (A[Ae] = c && h ? c + " / " + h : c + h), {
1812
+ id: p,
1800
1813
  spec: {
1801
1814
  ...e.spec,
1802
- axesSpec: d.map((b, g) => ({
1803
- ...b,
1815
+ axesSpec: d.map((v, g) => ({
1816
+ ...v,
1804
1817
  annotations: e.spec.axesSpec[g].annotations
1805
1818
  })),
1806
- annotations: v
1819
+ annotations: A
1807
1820
  },
1808
1821
  data: e.data
1809
1822
  };
@@ -1844,9 +1857,9 @@ const It = [
1844
1857
  ];
1845
1858
  function gn(t, e) {
1846
1859
  if (e === void 0) return;
1847
- const n = t.resultPool.getData().entries.map((s) => s.obj).filter(se).filter((s) => It.includes(s.spec.valueType)), r = _t(e, n), i = [...r, ...Ct(r)];
1860
+ const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ie).filter((s) => It.includes(s.spec.valueType)), r = _t(e, n), i = [...r, ...Ct(r)];
1848
1861
  if (!i.some(
1849
- (s) => s.data instanceof I && !s.data.getIsReadyOrError()
1862
+ (s) => s.data instanceof _ && !s.data.getIsReadyOrError()
1850
1863
  ))
1851
1864
  return t.createPFrame(i);
1852
1865
  }
@@ -1873,14 +1886,14 @@ class mn {
1873
1886
  function Lt(t) {
1874
1887
  return Ce({
1875
1888
  __isRef: !0,
1876
- blockId: te(t, "blockId"),
1877
- name: te(t, "name")
1889
+ blockId: ee(t, "blockId"),
1890
+ name: ee(t, "name")
1878
1891
  });
1879
1892
  }
1880
1893
  function yn(t) {
1881
1894
  return Ce({
1882
- ref: Lt(te(t, "ref")),
1883
- label: te(t, "label")
1895
+ ref: Lt(ee(t, "ref")),
1896
+ label: ee(t, "label")
1884
1897
  });
1885
1898
  }
1886
1899
  const vn = {
@@ -1904,7 +1917,7 @@ export {
1904
1917
  jt as Args,
1905
1918
  T as BlockModel,
1906
1919
  vn as CurrentSdkInfo,
1907
- _ as FutureRef,
1920
+ C as FutureRef,
1908
1921
  Pt as IS_VIRTUAL_COLUMN,
1909
1922
  Kt as It,
1910
1923
  cn as JsRenderInternal,
@@ -1918,22 +1931,22 @@ export {
1918
1931
  V as RT_BINARY_PARTITIONED,
1919
1932
  B as RT_BINARY_SUPER_PARTITIONED,
1920
1933
  U as RT_JSON_PARTITIONED,
1921
- ie as RT_JSON_SUPER_PARTITIONED,
1922
- ne as RT_RESOURCE_MAP,
1923
- re as RT_RESOURCE_MAP_PARTITIONED,
1924
- Q as RenderCtx,
1934
+ re as RT_JSON_SUPER_PARTITIONED,
1935
+ te as RT_RESOURCE_MAP,
1936
+ ne as RT_RESOURCE_MAP_PARTITIONED,
1937
+ X as RenderCtx,
1925
1938
  bt as ResultPool,
1926
1939
  $t as StagingOutputs,
1927
1940
  st as Trace,
1928
1941
  it as TraceEntry,
1929
- I as TreeNodeAccessor,
1942
+ _ as TreeNodeAccessor,
1930
1943
  Jt as UiState,
1931
1944
  Ht as and,
1932
1945
  pt as convertOrParsePColumnData,
1933
1946
  gn as createPFrameForGraphs,
1934
1947
  fn as createPlDataTable,
1935
1948
  hn as createPlDataTableSheet,
1936
- Fe as deriveLabels,
1949
+ Ee as deriveLabels,
1937
1950
  ue as downgradeCfgOrLambda,
1938
1951
  _t as enrichColumnsWithCompatible,
1939
1952
  rn as extractArchiveAndGetURL,
@@ -1949,9 +1962,9 @@ export {
1949
1962
  tn as getDownloadedBlobContent,
1950
1963
  wn as getEnvironmentValue,
1951
1964
  W as getFromCfg,
1952
- ee as getImmediate,
1965
+ Z as getImmediate,
1953
1966
  sn as getImportProgress,
1954
- te as getJsonField,
1967
+ ee as getJsonField,
1955
1968
  on as getLastLogs,
1956
1969
  un as getLogHandle,
1957
1970
  nn as getOnDemandBlobContent,