@platforma-sdk/model 1.32.1 → 1.33.2

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,10 +1,10 @@
1
1
  var Xe = Object.defineProperty;
2
2
  var Qe = (t, e, n) => e in t ? Xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var R = (t, e, n) => Qe(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { isPColumn as be, mapPObjectData as we, isDataInfoEntries as Ee, isDataInfo as Ae, dataInfoToEntries as Ze, selectorsToPredicate as X, resolveAnchors as xe, deriveNativeId as et, isPColumnSpec as ne, isPartitionedDataInfoEntries as tt, getAxisId as T, entriesToDataInfo as nt, canonicalizeAxisId as rt, withEnrichments as Ce, AnchoredIdDeriver as Pe, isPlRef as it, mapValueInVOE as st, ensurePColumn as ot, extractAllColumns as at, mapPTableDef as lt, mapDataInfo as ut, canonicalizeJson as F, parseJson as fe, matchAxisId as K, getPColumnSpecId as ue, getColumnIdAndSpec as Oe, isPTableAbsent as ct, PTableNA as pt } from "@milaboratories/pl-model-common";
3
+ var F = (t, e, n) => Qe(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { isPColumn as be, mapPObjectData as we, isDataInfoEntries as Ee, isDataInfo as Ae, dataInfoToEntries as Ze, selectorsToPredicate as X, resolveAnchors as xe, deriveNativeId as et, isPColumnSpec as ne, isPartitionedDataInfoEntries as tt, getAxisId as T, entriesToDataInfo as nt, canonicalizeAxisId as rt, withEnrichments as Ce, AnchoredIdDeriver as Pe, isPlRef as it, mapValueInVOE as st, ensurePColumn as ot, extractAllColumns as at, mapPTableDef as lt, mapDataInfo as ut, canonicalizeJson as D, parseJson as fe, matchAxisId as K, getPColumnSpecId as ue, getColumnIdAndSpec as Oe, isPTableAbsent as ct, PTableNA as pt } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
6
  import ke from "canonicalize";
7
- import { z as U } from "zod";
7
+ import { z as M } from "zod";
8
8
  export * from "@milaboratories/pl-error-like";
9
9
  class dt extends Error {
10
10
  constructor(e, n) {
@@ -15,7 +15,7 @@ function ft(t) {
15
15
  if (!t.ok) throw new dt(t.errors, t.moreErrors);
16
16
  return t.value;
17
17
  }
18
- function tn(t) {
18
+ function en(t) {
19
19
  return new Proxy(t, {
20
20
  get(e, n) {
21
21
  return ft(e[n]);
@@ -28,17 +28,17 @@ function P(t) {
28
28
  function Q(t) {
29
29
  return { type: "GetFromCtx", variable: t };
30
30
  }
31
- function nn(t) {
31
+ function tn(t) {
32
32
  return {
33
33
  type: "Isolate",
34
34
  cfg: t
35
35
  };
36
36
  }
37
- const rn = Q("$args"), sn = Q("$it"), on = Q("$prod"), an = Q("$staging"), ln = Q("$ui");
37
+ const nn = Q("$args"), rn = Q("$it"), sn = Q("$prod"), on = Q("$staging"), an = Q("$ui");
38
38
  function re(t) {
39
39
  return { type: "Immediate", value: t };
40
40
  }
41
- function Re(t) {
41
+ function Fe(t) {
42
42
  const e = {};
43
43
  for (const [n, r] of Object.entries(t)) e[n] = P(r);
44
44
  return {
@@ -46,7 +46,7 @@ function Re(t) {
46
46
  template: e
47
47
  };
48
48
  }
49
- function un(...t) {
49
+ function ln(...t) {
50
50
  const e = [];
51
51
  for (const n of t) e.push(P(n));
52
52
  return {
@@ -61,7 +61,7 @@ function ie(t, e) {
61
61
  field: P(e)
62
62
  };
63
63
  }
64
- function cn(t, e, n = "$it") {
64
+ function un(t, e, n = "$it") {
65
65
  return {
66
66
  type: "MapRecordValues",
67
67
  source: t,
@@ -69,7 +69,7 @@ function cn(t, e, n = "$it") {
69
69
  itVar: n
70
70
  };
71
71
  }
72
- function pn(t, e, n = "$it") {
72
+ function cn(t, e, n = "$it") {
73
73
  return {
74
74
  type: "MapArrayValues",
75
75
  source: t,
@@ -77,46 +77,46 @@ function pn(t, e, n = "$it") {
77
77
  itVar: n
78
78
  };
79
79
  }
80
- function dn(t) {
80
+ function pn(t) {
81
81
  return {
82
82
  type: "Flatten",
83
83
  source: t
84
84
  };
85
85
  }
86
- function fn(t) {
86
+ function dn(t) {
87
87
  return {
88
88
  type: "IsEmpty",
89
89
  arg: t
90
90
  };
91
91
  }
92
- function hn(t) {
92
+ function fn(t) {
93
93
  return {
94
94
  type: "Not",
95
95
  operand: t
96
96
  };
97
97
  }
98
- function gn(t, e) {
98
+ function hn(t, e) {
99
99
  return {
100
100
  type: "And",
101
101
  operand1: t,
102
102
  operand2: e
103
103
  };
104
104
  }
105
- function mn(t, e) {
105
+ function gn(t, e) {
106
106
  return {
107
107
  type: "Or",
108
108
  operand1: t,
109
109
  operand2: e
110
110
  };
111
111
  }
112
- function yn(t, e) {
112
+ function mn(t, e) {
113
113
  return {
114
114
  type: "GetResourceField",
115
115
  source: P(t),
116
116
  field: P(e)
117
117
  };
118
118
  }
119
- function vn() {
119
+ function yn() {
120
120
  return function(t) {
121
121
  return {
122
122
  type: "GetResourceValueAsJson",
@@ -124,7 +124,7 @@ function vn() {
124
124
  };
125
125
  };
126
126
  }
127
- function bn(t, e, n = "$it") {
127
+ function vn(t, e, n = "$it") {
128
128
  return {
129
129
  type: "MapResourceFields",
130
130
  source: t,
@@ -132,21 +132,21 @@ function bn(t, e, n = "$it") {
132
132
  itVar: n
133
133
  };
134
134
  }
135
- function wn(t, e) {
135
+ function bn(t, e) {
136
136
  return {
137
137
  type: "GetBlobContent",
138
138
  range: e,
139
139
  source: P(t)
140
140
  };
141
141
  }
142
- function An(t, e) {
142
+ function wn(t, e) {
143
143
  return {
144
144
  type: "GetBlobContentAsString",
145
145
  range: e,
146
146
  source: P(t)
147
147
  };
148
148
  }
149
- function xn() {
149
+ function An() {
150
150
  return function(t, e) {
151
151
  return {
152
152
  type: "GetBlobContentAsJson",
@@ -155,53 +155,53 @@ function xn() {
155
155
  };
156
156
  };
157
157
  }
158
- function Cn(t) {
158
+ function xn(t) {
159
159
  return {
160
160
  type: "GetDownloadedBlobContent",
161
161
  source: P(t)
162
162
  };
163
163
  }
164
- function Pn(t) {
164
+ function Cn(t) {
165
165
  return {
166
166
  type: "GetOnDemandBlobContent",
167
167
  source: P(t)
168
168
  };
169
169
  }
170
- function Sn(t, e) {
170
+ function Pn(t, e) {
171
171
  return {
172
172
  type: "ExtractArchiveAndGetURL",
173
173
  format: e,
174
174
  source: P(t)
175
175
  };
176
176
  }
177
- function _n(t) {
177
+ function Sn(t) {
178
178
  return {
179
179
  type: "GetImportProgress",
180
180
  source: P(t)
181
181
  };
182
182
  }
183
- function In(t, e) {
183
+ function _n(t, e) {
184
184
  return {
185
185
  type: "GetLastLogs",
186
186
  source: P(t),
187
187
  lines: e
188
188
  };
189
189
  }
190
- function Tn(t, e) {
190
+ function In(t, e) {
191
191
  return {
192
192
  type: "GetProgressLog",
193
193
  source: P(t),
194
194
  patternToSearch: e
195
195
  };
196
196
  }
197
- function Ln(t, e) {
197
+ function Tn(t, e) {
198
198
  return {
199
199
  type: "GetProgressLogWithInfo",
200
200
  source: P(t),
201
201
  patternToSearch: e
202
202
  };
203
203
  }
204
- function En(t) {
204
+ function Ln(t) {
205
205
  return {
206
206
  type: "GetLogHandle",
207
207
  source: P(t)
@@ -210,7 +210,7 @@ function En(t) {
210
210
  function ht() {
211
211
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
212
212
  }
213
- function De(t) {
213
+ function Re(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;
@@ -238,8 +238,8 @@ function mt(t, e) {
238
238
  }
239
239
  class I {
240
240
  constructor(e, n = (r) => r) {
241
- R(this, "isResolved", !1);
242
- R(this, "resolvedValue");
241
+ F(this, "isResolved", !1);
242
+ F(this, "resolvedValue");
243
243
  this.handle = e, this.postProcess = n, mt(e, (r) => {
244
244
  this.resolvedValue = n(r), this.isResolved = !0;
245
245
  });
@@ -480,7 +480,7 @@ class O {
480
480
  return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, d]) => o(u, d));
481
481
  }
482
482
  }
483
- const Fe = "staging", Ke = "main", yt = {
483
+ const De = "staging", Ke = "main", yt = {
484
484
  explicitColumnsSupport: !0,
485
485
  inlineColumnsSupport: !0,
486
486
  activeArgs: !0
@@ -502,26 +502,26 @@ function vt(t) {
502
502
  const e = /* @__PURE__ */ new Set();
503
503
  return ge(e, /* @__PURE__ */ new Set(), t), e;
504
504
  }
505
- const On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
505
+ const En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
506
506
  __proto__: null,
507
507
  GlobalCfgRenderCtxFeatureFlags: yt,
508
508
  MainAccessorName: Ke,
509
- StagingAccessorName: Fe,
509
+ StagingAccessorName: De,
510
510
  getAllFutureAwaits: vt,
511
511
  isFutureAwait: je
512
- }, Symbol.toStringTag, { value: "Module" })), bt = "pl7.app/label", wt = "pl7.app/trace", At = U.object({
513
- type: U.string(),
514
- importance: U.number().optional(),
515
- id: U.string().optional(),
516
- label: U.string()
517
- }), xt = U.array(At), Ct = 1e-3, Pt = "__LABEL__", Se = "__LABEL__@1";
512
+ }, Symbol.toStringTag, { value: "Module" })), bt = "pl7.app/label", wt = "pl7.app/trace", At = M.object({
513
+ type: M.string(),
514
+ importance: M.number().optional(),
515
+ id: M.string().optional(),
516
+ label: M.string()
517
+ }), xt = M.array(At), Ct = 1e-3, Pt = "__LABEL__", Se = "__LABEL__@1";
518
518
  function Ve(t, e, n = {}) {
519
519
  const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((f) => {
520
- var S, D;
520
+ var S, R;
521
521
  const w = e(f);
522
522
  let c, g, x;
523
523
  "spec" in w && typeof w.spec == "object" ? (c = w.spec, g = w.prefixTrace, x = w.suffixTrace) : c = w;
524
- const p = (S = c.annotations) == null ? void 0 : S[bt], A = (D = c.annotations) == null ? void 0 : D[wt], m = (A ? xt.safeParse(JSON.parse(A)).data : void 0) ?? [], v = [
524
+ const p = (S = c.annotations) == null ? void 0 : S[bt], A = (R = c.annotations) == null ? void 0 : R[wt], m = (A ? xt.safeParse(JSON.parse(A)).data : void 0) ?? [], v = [
525
525
  ...g ?? [],
526
526
  ...m,
527
527
  ...x ?? []
@@ -622,7 +622,7 @@ function Ne(t, e, n, r = [], i) {
622
622
  throw new Error(`Unknown resource type: ${t.resourceType.name}`);
623
623
  }
624
624
  }
625
- function kn(t, e, n = !1) {
625
+ function On(t, e, n = !1) {
626
626
  const r = [];
627
627
  return { isComplete: Ne(t, e, r, [], n), data: r };
628
628
  }
@@ -903,7 +903,7 @@ function kt(t) {
903
903
  if (t)
904
904
  return t.map((e) => [e.axisIdx, e.value]);
905
905
  }
906
- function Rt(t, e) {
906
+ function Ft(t, e) {
907
907
  if (!e || e.length === 0) return t;
908
908
  const n = [...e].sort((r, i) => r[0] - i[0]);
909
909
  return ke({ id: t, axisFilters: n });
@@ -913,7 +913,7 @@ function _e(t) {
913
913
  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);
914
914
  return !!e.domainAnchor || n || r;
915
915
  }
916
- function Dt(t) {
916
+ function Rt(t) {
917
917
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
918
918
  return [];
919
919
  const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
@@ -923,9 +923,9 @@ function Dt(t) {
923
923
  }
924
924
  class ve {
925
925
  constructor() {
926
- R(this, "defaultProviderStore", []);
927
- R(this, "providers", [new Et(this.defaultProviderStore)]);
928
- R(this, "axisLabelProviders", []);
926
+ F(this, "defaultProviderStore", []);
927
+ F(this, "providers", [new Et(this.defaultProviderStore)]);
928
+ F(this, "axisLabelProviders", []);
929
929
  }
930
930
  addColumnProvider(e) {
931
931
  return this.providers.push(e), this;
@@ -980,12 +980,12 @@ class ve {
980
980
  if (u(S.spec)) continue;
981
981
  if (p.has(S.id))
982
982
  throw new Error(`Duplicate column id ${S.id} in provider ${C.constructor.name}`);
983
- const D = et(S.spec);
984
- b.has(D) || (p.add(S.id), b.add(D), A.push(S));
983
+ const R = et(S.spec);
984
+ b.has(R) || (p.add(S.id), b.add(R), A.push(S));
985
985
  }
986
986
  }
987
987
  if (A.length === 0) continue;
988
- const m = Dt(c), v = m.length > 0;
988
+ const m = Rt(c), v = m.length > 0;
989
989
  for (const C of A) {
990
990
  if (!ne(C.spec)) continue;
991
991
  const L = C.spec;
@@ -997,7 +997,7 @@ class ve {
997
997
  }
998
998
  if (!tt(S))
999
999
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${C.id}`);
1000
- const D = It(S), k = m[m.length - 1];
1000
+ const R = It(S), k = m[m.length - 1];
1001
1001
  if (k >= S.partitionKeyLength)
1002
1002
  throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${k}) in column ${L.name}`);
1003
1003
  const W = m.map((_) => this.findLabels(T(L.axesSpec[_]))), V = [], N = (_, G) => {
@@ -1007,9 +1007,9 @@ class ve {
1007
1007
  return;
1008
1008
  }
1009
1009
  const $ = m[G];
1010
- if ($ >= D.length)
1011
- throw new Error(`Axis index ${$} out of bounds for unique keys array (length ${D.length}) during split key generation for column ${C.id}`);
1012
- const J = D[$];
1010
+ if ($ >= R.length)
1011
+ throw new Error(`Axis index ${$} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${C.id}`);
1012
+ const J = R[$];
1013
1013
  if (!J || J.length === 0) {
1014
1014
  V.length = 0;
1015
1015
  return;
@@ -1058,7 +1058,7 @@ class ve {
1058
1058
  for (const { value: c, label: g } of f) {
1059
1059
  const { originalColumn: x, spec: p } = c, A = c.type === "split" ? c.axisFilters : void 0, m = kt(A);
1060
1060
  let v;
1061
- r ? v = r.deriveS(p, m) : v = Rt(x.id, m);
1061
+ r ? v = r.deriveS(p, m) : v = Ft(x.id, m);
1062
1062
  let C = { ...c.adjustedSpec };
1063
1063
  o && (C = {
1064
1064
  ...C,
@@ -1108,9 +1108,9 @@ function pe(t, e) {
1108
1108
  function Ie(t) {
1109
1109
  return we(t, (e) => e instanceof O ? e.handle : Ae(e) ? ut(e, (n) => n.handle) : e);
1110
1110
  }
1111
- class Ft {
1111
+ class Dt {
1112
1112
  constructor() {
1113
- R(this, "ctx", h());
1113
+ F(this, "ctx", h());
1114
1114
  }
1115
1115
  /**
1116
1116
  * @deprecated use getOptions()
@@ -1379,12 +1379,12 @@ class Ft {
1379
1379
  }
1380
1380
  class te {
1381
1381
  constructor() {
1382
- R(this, "ctx");
1383
- R(this, "args");
1384
- R(this, "uiState");
1382
+ F(this, "ctx");
1383
+ F(this, "args");
1384
+ F(this, "uiState");
1385
1385
  // lazy rendering because this feature is rarely used
1386
- R(this, "_activeArgsCache");
1387
- R(this, "resultPool", new Ft());
1386
+ F(this, "_activeArgsCache");
1387
+ F(this, "resultPool", new Dt());
1388
1388
  this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
1389
1389
  }
1390
1390
  /**
@@ -1407,7 +1407,7 @@ class te {
1407
1407
  );
1408
1408
  }
1409
1409
  get prerun() {
1410
- return this.getNamedAccessor(Fe);
1410
+ return this.getNamedAccessor(De);
1411
1411
  }
1412
1412
  get outputs() {
1413
1413
  return this.getNamedAccessor(Ke);
@@ -1461,7 +1461,7 @@ class te {
1461
1461
  this.ctx.logError(e);
1462
1462
  }
1463
1463
  }
1464
- const Y = "1.32.1";
1464
+ const Y = "1.33.2";
1465
1465
  function Kt(t) {
1466
1466
  return t.__renderLambda === !0;
1467
1467
  }
@@ -1469,11 +1469,11 @@ function de(t) {
1469
1469
  if (t !== void 0)
1470
1470
  return Kt(t) ? t.handle : t;
1471
1471
  }
1472
- function M(t) {
1472
+ function U(t) {
1473
1473
  if (t !== void 0)
1474
1474
  return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
1475
1475
  }
1476
- function Rn(t) {
1476
+ function kn(t) {
1477
1477
  if (t.v3 !== void 0) {
1478
1478
  const {
1479
1479
  initialArgs: e,
@@ -1509,10 +1509,10 @@ function Rn(t) {
1509
1509
  renderingMode: n,
1510
1510
  initialArgs: o,
1511
1511
  outputs: Object.fromEntries(
1512
- Object.entries(r).map(([u, d]) => [u, M(d)])
1512
+ Object.entries(r).map(([u, d]) => [u, U(d)])
1513
1513
  ),
1514
- inputsValid: M(i),
1515
- sections: M(s),
1514
+ inputsValid: U(i),
1515
+ sections: U(s),
1516
1516
  initialUiState: void 0,
1517
1517
  code: a
1518
1518
  };
@@ -1527,10 +1527,10 @@ function Rn(t) {
1527
1527
  renderingMode: r,
1528
1528
  initialArgs: o,
1529
1529
  outputs: Object.fromEntries(
1530
- Object.entries(i).map(([u, d]) => [u, M(d)])
1530
+ Object.entries(i).map(([u, d]) => [u, U(d)])
1531
1531
  ),
1532
- inputsValid: M(n),
1533
- sections: M(s),
1532
+ inputsValid: U(n),
1533
+ sections: U(s),
1534
1534
  initialUiState: void 0,
1535
1535
  code: a
1536
1536
  };
@@ -1739,7 +1739,7 @@ class E {
1739
1739
  Object.entries(this._outputs).map(([n, r]) => [n, de(r)])
1740
1740
  )
1741
1741
  };
1742
- return ht() ? De({ sdkVersion: Y }) : { config: e };
1742
+ return ht() ? Re({ sdkVersion: Y }) : { config: e };
1743
1743
  }
1744
1744
  }
1745
1745
  const jt = (t, e) => {
@@ -1763,13 +1763,13 @@ function Vt(t) {
1763
1763
  }
1764
1764
  function $t(t) {
1765
1765
  var e;
1766
- return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[Ut]) === "true";
1766
+ return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[Mt]) === "true";
1767
1767
  }
1768
1768
  function Nt(t) {
1769
1769
  var n, r;
1770
1770
  const e = /* @__PURE__ */ new Map();
1771
1771
  for (const { id: i, spec: s } of t) {
1772
- const [o, a] = s.axesSpec.map(T).map(F);
1772
+ const [o, a] = s.axesSpec.map(T).map(D);
1773
1773
  e.has(o) || e.set(o, /* @__PURE__ */ new Map()), e.has(a) || e.set(a, /* @__PURE__ */ new Map()), (n = e.get(o)) == null || n.set(a, { columnId: i, spec: s }), (r = e.get(a)) == null || r.set(o, { columnId: i, spec: s });
1774
1774
  }
1775
1775
  return e;
@@ -1778,7 +1778,7 @@ function Je(t, e, n) {
1778
1778
  var l;
1779
1779
  const i = [...t.keys()].map(fe).find((u) => K(e, u));
1780
1780
  if (!i) return !1;
1781
- const s = F(T(i)), o = /* @__PURE__ */ new Set([s]);
1781
+ const s = D(T(i)), o = /* @__PURE__ */ new Set([s]);
1782
1782
  let a = [s];
1783
1783
  for (; a.length; ) {
1784
1784
  const u = [];
@@ -1796,16 +1796,16 @@ function Jt(t, e, n) {
1796
1796
  const r = t.axesSpec.map(T), i = e.axesSpec.map(T);
1797
1797
  return i.some((s) => r.some((o) => K(o, s) && K(s, o))) || !!n && i.some((s) => r.some((o) => Je(n, o, s)));
1798
1798
  }
1799
- function Me(t, e, n) {
1799
+ function Ue(t, e, n) {
1800
1800
  const r = t.axesSpec.map(T), i = e.axesSpec.map(T);
1801
1801
  return i.some((s) => r.some((o) => K(o, s))) || !!n && i.some((s) => r.some((o) => Je(n, o, s)));
1802
1802
  }
1803
- const Mt = "pl7.app/graph/isVirtual", Te = "pl7.app/label", Ut = "pl7.app/isLinkerColumn";
1803
+ const Ut = "pl7.app/graph/isVirtual", Te = "pl7.app/label", Mt = "pl7.app/isLinkerColumn";
1804
1804
  function Le(t, e, n) {
1805
1805
  const r = t.spec.axesSpec.map(T), i = e.spec.axesSpec.map(T);
1806
1806
  if (Jt(t.spec, e.spec, n))
1807
1807
  return [];
1808
- if (!Me(t.spec, e.spec, n))
1808
+ if (!Ue(t.spec, e.spec, n))
1809
1809
  return [];
1810
1810
  const a = i.map((b) => r.filter((f) => K(f, b))), l = Vt(a), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), y = l.map((b) => {
1811
1811
  const f = /* @__PURE__ */ new Set();
@@ -1831,7 +1831,7 @@ function Le(t, e, n) {
1831
1831
  return (m = JSON.parse(A)) == null ? void 0 : m[1];
1832
1832
  }).join(" / "), x = {
1833
1833
  ...e.spec.annotations,
1834
- [Mt]: "true"
1834
+ [Ut]: "true"
1835
1835
  };
1836
1836
  return (c || g) && (x[Te] = c && g ? c + " / " + g : c + g), {
1837
1837
  id: w,
@@ -1847,7 +1847,7 @@ function Le(t, e, n) {
1847
1847
  };
1848
1848
  });
1849
1849
  }
1850
- function Bt(t, e = /* @__PURE__ */ new Map()) {
1850
+ function Fn(t, e = /* @__PURE__ */ new Map()) {
1851
1851
  const n = [];
1852
1852
  for (let r = 0; r < t.length; r++)
1853
1853
  for (let i = r + 1; i < t.length; i++) {
@@ -1859,18 +1859,18 @@ function Bt(t, e = /* @__PURE__ */ new Map()) {
1859
1859
  }
1860
1860
  return n;
1861
1861
  }
1862
- function Wt(t, e, n = [], r = /* @__PURE__ */ new Map()) {
1862
+ function Bt(t, e, n = [], r = /* @__PURE__ */ new Map()) {
1863
1863
  const i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
1864
1864
  t.forEach((a) => {
1865
- i.add(a.id), s.set(F(ue(a.spec)), a);
1865
+ i.add(a.id), s.set(D(ue(a.spec)), a);
1866
1866
  });
1867
1867
  const o = /* @__PURE__ */ new Map();
1868
1868
  for (const a of e) {
1869
1869
  if (i.has(a.id)) continue;
1870
- const l = F(ue(a.spec));
1870
+ const l = D(ue(a.spec));
1871
1871
  if (!s.has(l)) {
1872
1872
  for (const u of s.values())
1873
- if (Me(u.spec, a.spec, r)) {
1873
+ if (Ue(u.spec, a.spec, r)) {
1874
1874
  o.set(l, a);
1875
1875
  break;
1876
1876
  }
@@ -1878,34 +1878,34 @@ function Wt(t, e, n = [], r = /* @__PURE__ */ new Map()) {
1878
1878
  }
1879
1879
  for (const a of n) {
1880
1880
  if (i.has(a.id)) continue;
1881
- const l = F(ue(a.spec));
1881
+ const l = D(ue(a.spec));
1882
1882
  s.has(l) || o.has(l) || (i.add(a.id), s.set(l, a));
1883
1883
  }
1884
1884
  return [...s.values(), ...o.values()];
1885
1885
  }
1886
- function Dn(t, e) {
1886
+ function Rn(t, e) {
1887
1887
  if (!e) return;
1888
- const n = t.resultPool.getData().entries.map((l) => l.obj).filter(be), i = [...e, ...n].filter((l) => $t(l.spec)), s = Nt(i), o = Wt(e, n, i, s), a = [...o, ...Bt(o, s)];
1888
+ const n = t.resultPool.getData().entries.map((l) => l.obj).filter(be), i = [...e, ...n].filter((l) => $t(l.spec)), s = Nt(i), a = [...Bt(e, n, i, s)];
1889
1889
  if (!a.some(
1890
1890
  (l) => l.data instanceof O && !l.data.getIsReadyOrError()
1891
1891
  ))
1892
1892
  return t.createPFrame(a);
1893
1893
  }
1894
- function Fn(t) {
1894
+ function Dn(t) {
1895
1895
  const e = t.type;
1896
1896
  switch (e) {
1897
1897
  case "axis":
1898
- return F(t);
1898
+ return D(t);
1899
1899
  case "column":
1900
- return F(t);
1900
+ return D(t);
1901
1901
  default:
1902
1902
  throw Error(`unsupported column type: ${e}`);
1903
1903
  }
1904
1904
  }
1905
- function Gt(t) {
1905
+ function Wt(t) {
1906
1906
  return t.axesSpec.length === 1 && t.name === "pl7.app/label";
1907
1907
  }
1908
- function Ue(t) {
1908
+ function Me(t) {
1909
1909
  return new ve().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
1910
1910
  name: "pl7.app/label",
1911
1911
  axes: [{}]
@@ -1915,7 +1915,7 @@ function Ue(t) {
1915
1915
  function Be(t, e) {
1916
1916
  const n = [], r = [];
1917
1917
  for (const a of t)
1918
- Gt(a.spec) ? n.push(a) : r.push(a);
1918
+ Wt(a.spec) ? n.push(a) : r.push(a);
1919
1919
  const i = [];
1920
1920
  for (const a of r)
1921
1921
  for (const l of a.spec.axesSpec) {
@@ -1993,7 +1993,7 @@ function Ge(t, e, n, r, i, s) {
1993
1993
  function Kn(t, e, n, r) {
1994
1994
  var u, d;
1995
1995
  Array.isArray(r) && (r = { filters: r });
1996
- const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Ue(t.resultPool);
1996
+ const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Me(t.resultPool);
1997
1997
  if (!a) return;
1998
1998
  const l = Be(e.map(Oe), a);
1999
1999
  if (We([...e, ...l]))
@@ -2001,25 +2001,25 @@ function Kn(t, e, n, r) {
2001
2001
  Ge(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
2002
2002
  );
2003
2003
  }
2004
- function Ht(t) {
2004
+ function Gt(t) {
2005
2005
  var e;
2006
2006
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
2007
2007
  }
2008
- function qt(t) {
2008
+ function Ht(t) {
2009
2009
  var e;
2010
2010
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
2011
2011
  }
2012
2012
  function jn(t, e, n, r, i) {
2013
2013
  var g, x;
2014
- const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((g = r == null ? void 0 : r.pTableParams) == null ? void 0 : g.filters) ?? []], a = ((x = r == null ? void 0 : r.pTableParams) == null ? void 0 : x.sorting) ?? [], l = e.filter((p) => !Ht(p.spec)), u = l.find((p) => n(p.spec));
2014
+ const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((g = r == null ? void 0 : r.pTableParams) == null ? void 0 : g.filters) ?? []], a = ((x = r == null ? void 0 : r.pTableParams) == null ? void 0 : x.sorting) ?? [], l = e.filter((p) => !Gt(p.spec)), u = l.find((p) => n(p.spec));
2015
2015
  if (!u) return;
2016
- const d = Ue(t.resultPool);
2016
+ const d = Me(t.resultPool);
2017
2017
  if (!d) return;
2018
2018
  const y = new Set((() => {
2019
2019
  var A, m;
2020
2020
  if (s === "inner") return [];
2021
2021
  const p = (m = (A = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A.hiddenColIds) == null ? void 0 : m.map(fe).filter((v) => v.type === "column").map((v) => v.id);
2022
- return p || l.filter((v) => qt(v.spec)).map((v) => v.id);
2022
+ return p || l.filter((v) => Ht(v.spec)).map((v) => v.id);
2023
2023
  })());
2024
2024
  y.delete(u.id), [...o.map((p) => p.column), ...a.map((p) => p.column)].filter((p) => p.type === "column").map((p) => y.delete(p.id));
2025
2025
  const b = l.filter((p) => !y.has(p.id)), f = Be(b.map(Oe), d), w = [
@@ -2058,9 +2058,9 @@ function $n(t) {
2058
2058
  const e = t.type;
2059
2059
  switch (e) {
2060
2060
  case "axis":
2061
- return F(t);
2061
+ return D(t);
2062
2062
  case "column":
2063
- return F(t);
2063
+ return D(t);
2064
2064
  default:
2065
2065
  throw Error(`unsupported column type: ${e}`);
2066
2066
  }
@@ -2086,7 +2086,7 @@ function Nn(t, e, n, r) {
2086
2086
  function Jn(t) {
2087
2087
  return t === pt ? (console.error("Axis value can never be N/A"), "") : t;
2088
2088
  }
2089
- class Mn {
2089
+ class Un {
2090
2090
  constructor(e) {
2091
2091
  this.handle = e;
2092
2092
  }
@@ -2106,28 +2106,28 @@ class Mn {
2106
2106
  return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
2107
2107
  }
2108
2108
  }
2109
- function zt(t) {
2110
- return Re({
2109
+ function qt(t) {
2110
+ return Fe({
2111
2111
  __isRef: !0,
2112
2112
  blockId: ie(t, "blockId"),
2113
2113
  name: ie(t, "name")
2114
2114
  });
2115
2115
  }
2116
- function Un(t) {
2117
- return Re({
2118
- ref: zt(ie(t, "ref")),
2116
+ function Mn(t) {
2117
+ return Fe({
2118
+ ref: qt(ie(t, "ref")),
2119
2119
  label: ie(t, "label")
2120
2120
  });
2121
2121
  }
2122
2122
  const Bn = {
2123
2123
  sdkVersion: Y
2124
2124
  };
2125
- function Yt() {
2126
- return De({ sdkVersion: Y });
2125
+ function zt() {
2126
+ return Re({ sdkVersion: Y });
2127
2127
  }
2128
2128
  function Wn(t) {
2129
2129
  try {
2130
- return Yt();
2130
+ return zt();
2131
2131
  } catch {
2132
2132
  return t;
2133
2133
  }
@@ -2137,21 +2137,21 @@ function Gn(t) {
2137
2137
  return globalThis.getEnvironmentValue(t);
2138
2138
  }
2139
2139
  export {
2140
- rn as Args,
2140
+ nn as Args,
2141
2141
  E as BlockModel,
2142
2142
  Bn as CurrentSdkInfo,
2143
2143
  I as FutureRef,
2144
- Mt as IS_VIRTUAL_COLUMN,
2145
- sn as It,
2146
- On as JsRenderInternal,
2144
+ Ut as IS_VIRTUAL_COLUMN,
2145
+ rn as It,
2146
+ En as JsRenderInternal,
2147
2147
  Te as LABEL_ANNOTATION,
2148
- Ut as LINKER_COLUMN_ANNOTATION,
2149
- on as MainOutputs,
2148
+ Mt as LINKER_COLUMN_ANNOTATION,
2149
+ sn as MainOutputs,
2150
2150
  dt as OutputError,
2151
2151
  bt as PAnnotationLabel,
2152
2152
  wt as PAnnotationTrace,
2153
2153
  ve as PColumnCollection,
2154
- Mn as PFrameImpl,
2154
+ Un as PFrameImpl,
2155
2155
  B as RT_BINARY_PARTITIONED,
2156
2156
  z as RT_BINARY_SUPER_PARTITIONED,
2157
2157
  q as RT_JSON_PARTITIONED,
@@ -2159,75 +2159,75 @@ export {
2159
2159
  se as RT_RESOURCE_MAP,
2160
2160
  oe as RT_RESOURCE_MAP_PARTITIONED,
2161
2161
  te as RenderCtx,
2162
- Ft as ResultPool,
2163
- an as StagingOutputs,
2162
+ Dt as ResultPool,
2163
+ on as StagingOutputs,
2164
2164
  xt as Trace,
2165
2165
  At as TraceEntry,
2166
2166
  O as TreeNodeAccessor,
2167
- ln as UiState,
2167
+ an as UiState,
2168
2168
  We as allColumnsComputed,
2169
- gn as and,
2169
+ hn as and,
2170
2170
  Tt as convertOrParsePColumnData,
2171
- Dn as createPFrameForGraphs,
2171
+ Rn as createPFrameForGraphs,
2172
2172
  Kn as createPlDataTable,
2173
2173
  Vn as createPlDataTableSheet,
2174
2174
  jn as createPlDataTableV2,
2175
2175
  Nn as createRowSelectionColumn,
2176
2176
  Ve as deriveLabels,
2177
2177
  de as downgradeCfgOrLambda,
2178
- Wt as enrichColumnsWithCompatible,
2179
- Sn as extractArchiveAndGetURL,
2180
- Rn as extractConfig,
2178
+ Bt as enrichColumnsWithCompatible,
2179
+ Pn as extractArchiveAndGetURL,
2180
+ kn as extractConfig,
2181
2181
  Lt as filterDataInfoEntries,
2182
- dn as flatten,
2183
- Un as fromPlOption,
2184
- zt as fromPlRef,
2185
- Bt as getAdditionalColumns,
2186
- Ue as getAllLabelColumns,
2187
- wn as getBlobContent,
2188
- xn as getBlobContentAsJson,
2189
- An as getBlobContentAsString,
2190
- Cn as getDownloadedBlobContent,
2182
+ pn as flatten,
2183
+ Mn as fromPlOption,
2184
+ qt as fromPlRef,
2185
+ Fn as getAdditionalColumns,
2186
+ Me as getAllLabelColumns,
2187
+ bn as getBlobContent,
2188
+ An as getBlobContentAsJson,
2189
+ wn as getBlobContentAsString,
2190
+ xn as getDownloadedBlobContent,
2191
2191
  Gn as getEnvironmentValue,
2192
2192
  Q as getFromCfg,
2193
2193
  re as getImmediate,
2194
- _n as getImportProgress,
2194
+ Sn as getImportProgress,
2195
2195
  ie as getJsonField,
2196
- In as getLastLogs,
2196
+ _n as getLastLogs,
2197
2197
  Nt as getLinkerColumnsMap,
2198
- En as getLogHandle,
2198
+ Ln as getLogHandle,
2199
2199
  Be as getMatchingLabelColumns,
2200
- Pn as getOnDemandBlobContent,
2200
+ Cn as getOnDemandBlobContent,
2201
2201
  St as getPartitionKeysList,
2202
2202
  Wn as getPlatformaOrDefault,
2203
- Tn as getProgressLog,
2204
- Ln as getProgressLogWithInfo,
2205
- Yt as getRawPlatformaInstance,
2206
- yn as getResourceField,
2207
- vn as getResourceValueAsJson,
2203
+ In as getProgressLog,
2204
+ Tn as getProgressLogWithInfo,
2205
+ zt as getRawPlatformaInstance,
2206
+ mn as getResourceField,
2207
+ yn as getResourceValueAsJson,
2208
2208
  It as getUniquePartitionKeys,
2209
2209
  Je as hasPathWithLinkerColumns,
2210
2210
  he as ifDef,
2211
- Ht as isColumnHidden,
2212
- qt as isColumnOptional,
2211
+ Gt as isColumnHidden,
2212
+ Ht as isColumnOptional,
2213
2213
  Kt as isConfigLambda,
2214
- fn as isEmpty,
2215
- Gt as isLabelColumn,
2214
+ dn as isEmpty,
2215
+ Wt as isLabelColumn,
2216
2216
  $t as isLinkerColumn,
2217
- nn as isolate,
2218
- un as makeArray,
2219
- Re as makeObject,
2220
- pn as mapArrayValues,
2217
+ tn as isolate,
2218
+ ln as makeArray,
2219
+ Fe as makeObject,
2220
+ cn as mapArrayValues,
2221
2221
  Jn as mapPTableValueToAxisKey,
2222
- cn as mapRecordValues,
2223
- bn as mapResourceFields,
2224
- hn as not,
2225
- mn as or,
2222
+ un as mapRecordValues,
2223
+ vn as mapResourceFields,
2224
+ fn as not,
2225
+ gn as or,
2226
2226
  ye as parsePColumnData,
2227
- kn as parseResourceMap,
2227
+ On as parseResourceMap,
2228
2228
  ft as readOutput,
2229
2229
  $n as stringifyPTableColumnId,
2230
- Fn as stringifyPTableColumnSpec,
2231
- tn as wrapOutputs
2230
+ Dn as stringifyPTableColumnSpec,
2231
+ en as wrapOutputs
2232
2232
  };
2233
2233
  //# sourceMappingURL=index.mjs.map