@milaboratories/milaboratories.ui-examples.model 1.1.29 → 1.1.30

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/bundle.js CHANGED
@@ -35,7 +35,7 @@
35
35
  }, "");
36
36
  return `{${values}}`;
37
37
  };
38
- const k = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
38
+ const g$1 = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
39
39
  var util;
40
40
  (function(util2) {
41
41
  util2.assertEqual = (val) => val;
@@ -54,10 +54,10 @@
54
54
  return obj;
55
55
  };
56
56
  util2.getValidEnumValues = (obj) => {
57
- const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
57
+ const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
58
58
  const filtered = {};
59
- for (const k2 of validKeys) {
60
- filtered[k2] = obj[k2];
59
+ for (const k of validKeys) {
60
+ filtered[k] = obj[k];
61
61
  }
62
62
  return util2.objectValues(filtered);
63
63
  };
@@ -87,7 +87,7 @@
87
87
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
88
88
  }
89
89
  util2.joinValues = joinValues;
90
- util2.jsonStringifyReplacer = (_2, value) => {
90
+ util2.jsonStringifyReplacer = (_, value) => {
91
91
  if (typeof value === "bigint") {
92
92
  return value.toString();
93
93
  }
@@ -402,7 +402,7 @@
402
402
  };
403
403
  }
404
404
  let errorMessage = "";
405
- const maps = errorMaps.filter((m) => !!m).slice().reverse();
405
+ const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
406
406
  for (const map of maps) {
407
407
  errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
408
408
  }
@@ -492,12 +492,12 @@
492
492
  const isDirty = (x2) => x2.status === "dirty";
493
493
  const isValid = (x2) => x2.status === "valid";
494
494
  const isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
495
- function __classPrivateFieldGet(receiver, state, kind, f2) {
496
- if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
495
+ function __classPrivateFieldGet(receiver, state, kind, f) {
496
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
497
497
  return state.get(receiver);
498
498
  }
499
- function __classPrivateFieldSet(receiver, state, value, kind, f2) {
500
- if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
499
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
500
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
501
501
  return state.set(receiver, value), value;
502
502
  }
503
503
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
@@ -3105,29 +3105,29 @@
3105
3105
  const params = { errorMap: ctx.common.contextualErrorMap };
3106
3106
  const fn = ctx.data;
3107
3107
  if (this._def.returns instanceof ZodPromise) {
3108
- const me = this;
3108
+ const me2 = this;
3109
3109
  return OK(async function(...args) {
3110
3110
  const error = new ZodError([]);
3111
- const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3111
+ const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
3112
3112
  error.addIssue(makeArgsIssue(args, e));
3113
3113
  throw error;
3114
3114
  });
3115
3115
  const result = await Reflect.apply(fn, this, parsedArgs);
3116
- const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3116
+ const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
3117
3117
  error.addIssue(makeReturnsIssue(result, e));
3118
3118
  throw error;
3119
3119
  });
3120
3120
  return parsedReturns;
3121
3121
  });
3122
3122
  } else {
3123
- const me = this;
3123
+ const me2 = this;
3124
3124
  return OK(function(...args) {
3125
- const parsedArgs = me._def.args.safeParse(args, params);
3125
+ const parsedArgs = me2._def.args.safeParse(args, params);
3126
3126
  if (!parsedArgs.success) {
3127
3127
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
3128
3128
  }
3129
3129
  const result = Reflect.apply(fn, this, parsedArgs.data);
3130
- const parsedReturns = me._def.returns.safeParse(result, params);
3130
+ const parsedReturns = me2._def.returns.safeParse(result, params);
3131
3131
  if (!parsedReturns.success) {
3132
3132
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
3133
3133
  }
@@ -3731,10 +3731,10 @@
3731
3731
  return ZodAny.create().superRefine((data, ctx) => {
3732
3732
  var _a, _b;
3733
3733
  if (!check(data)) {
3734
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3735
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3736
- const p2 = typeof p === "string" ? { message: p } : p;
3737
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
3734
+ const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3735
+ const _fatal = (_b = (_a = p2.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3736
+ const p22 = typeof p2 === "string" ? { message: p2 } : p2;
3737
+ ctx.addIssue({ code: "custom", ...p22, fatal: _fatal });
3738
3738
  }
3739
3739
  });
3740
3740
  return ZodAny.create();
@@ -3832,7 +3832,7 @@
3832
3832
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3833
3833
  };
3834
3834
  const NEVER = INVALID;
3835
- var z$2 = /* @__PURE__ */ Object.freeze({
3835
+ var z = /* @__PURE__ */ Object.freeze({
3836
3836
  __proto__: null,
3837
3837
  defaultErrorMap: errorMap,
3838
3838
  setErrorMap,
@@ -3948,30 +3948,33 @@
3948
3948
  quotelessJson,
3949
3949
  ZodError
3950
3950
  });
3951
- var $ = Object.defineProperty;
3952
- var F = (n, t, e) => t in n ? $(n, t, { enumerable: true, configurable: true, writable: true, value: e }) : n[t] = e;
3953
- var d = (n, t, e) => F(n, typeof t != "symbol" ? t + "" : t, e);
3954
- function g(n) {
3951
+ var V = Object.defineProperty;
3952
+ var F = (n, t, e) => t in n ? V(n, t, { enumerable: true, configurable: true, writable: true, value: e }) : n[t] = e;
3953
+ var m = (n, t, e) => F(n, typeof t != "symbol" ? t + "" : t, e);
3954
+ function w(n) {
3955
3955
  throw new Error("Unexpected object: " + n);
3956
3956
  }
3957
- function h(n) {
3957
+ function p(n) {
3958
3958
  const { type: t, name: e, domain: r } = n;
3959
3959
  return { type: t, name: e, ...r && { domain: r } };
3960
3960
  }
3961
- function Q(n, t) {
3961
+ function wn(n) {
3962
+ return g$1(p(n));
3963
+ }
3964
+ function G$1(n, t) {
3962
3965
  if (n === void 0) return t === void 0;
3963
3966
  if (t === void 0) return true;
3964
3967
  for (const e in t)
3965
3968
  if (n[e] !== t[e]) return false;
3966
3969
  return true;
3967
3970
  }
3968
- function z$1(n, t) {
3969
- return n.name === t.name && Q(n.domain, t.domain);
3971
+ function Q$1(n, t) {
3972
+ return n.name === t.name && G$1(n.domain, t.domain);
3970
3973
  }
3971
- function gn(n, t) {
3972
- return { ...n, src: l(n.src, t) };
3974
+ function An(n, t) {
3975
+ return { ...n, src: h(n.src, t) };
3973
3976
  }
3974
- function l(n, t) {
3977
+ function h(n, t) {
3975
3978
  switch (n.type) {
3976
3979
  case "column":
3977
3980
  return {
@@ -3982,103 +3985,122 @@
3982
3985
  case "full":
3983
3986
  return {
3984
3987
  type: n.type,
3985
- entries: n.entries.map((e) => l(e, t))
3988
+ entries: n.entries.map((e) => h(e, t))
3986
3989
  };
3987
3990
  case "outer":
3988
3991
  return {
3989
3992
  type: "outer",
3990
- primary: l(n.primary, t),
3991
- secondary: n.secondary.map((e) => l(e, t))
3993
+ primary: h(n.primary, t),
3994
+ secondary: n.secondary.map((e) => h(e, t))
3992
3995
  };
3993
3996
  default:
3994
- g(n);
3997
+ w(n);
3995
3998
  }
3996
3999
  }
3997
- function A(n) {
3998
- return k(h(n));
4000
+ function Y(n) {
4001
+ return g$1(n);
4002
+ }
4003
+ function x$1(n) {
4004
+ return g$1(p(n));
3999
4005
  }
4000
- function x(n, t) {
4006
+ function P$1(n, t) {
4001
4007
  return JSON.stringify([n, t]);
4002
4008
  }
4003
- class wn {
4009
+ class Pn {
4004
4010
  /**
4005
4011
  * Creates a new anchor context from a set of anchor column specifications
4006
4012
  * @param anchors Record of anchor column specifications indexed by anchor ID
4007
4013
  */
4008
4014
  constructor(t) {
4009
- d(this, "domains", /* @__PURE__ */ new Map());
4010
- d(this, "axes", /* @__PURE__ */ new Map());
4011
- d(this, "domainPacks", []);
4012
- d(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4015
+ m(this, "domains", /* @__PURE__ */ new Map());
4016
+ m(this, "axes", /* @__PURE__ */ new Map());
4017
+ m(this, "domainPacks", []);
4018
+ m(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4013
4019
  this.anchors = t;
4014
4020
  const e = Object.entries(t);
4015
4021
  e.sort((r, o) => r[0].localeCompare(o[0]));
4016
4022
  for (const [r, o] of e) {
4017
4023
  for (let i = 0; i < o.axesSpec.length; i++) {
4018
- const a = o.axesSpec[i], s = A(a);
4019
- this.axes.set(s, { anchor: r, idx: i });
4024
+ const s = o.axesSpec[i], a = x$1(s);
4025
+ this.axes.set(a, { anchor: r, idx: i });
4020
4026
  }
4021
4027
  if (o.domain !== void 0) {
4022
4028
  const i = Object.entries(o.domain);
4023
- i.sort((a, s) => a[0].localeCompare(s[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
4024
- for (const [a, s] of i) {
4025
- const c = x(a, s);
4026
- this.domains.set(c, r);
4029
+ i.sort((s, a) => s[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([s]) => s));
4030
+ for (const [s, a] of i) {
4031
+ const f = P$1(s, a);
4032
+ this.domains.set(f, r);
4027
4033
  }
4028
4034
  }
4029
4035
  }
4030
4036
  }
4031
4037
  /**
4032
- * Derives an anchored column identifier from a column specification
4033
- * Replaces domain values and axes with anchored references when possible
4034
- * @param spec Column specification to anchor
4035
- * @returns An anchored column identifier that can be used to identify columns similar to the input specification
4038
+ * Implementation of derive method
4036
4039
  */
4037
- derive(t) {
4038
- const e = {
4040
+ derive(t, e) {
4041
+ const r = {
4039
4042
  name: t.name,
4040
4043
  axes: []
4041
4044
  };
4042
- let r;
4045
+ let o;
4043
4046
  if (t.domain !== void 0)
4044
4047
  n:
4045
- for (const o of this.domainPacks) {
4046
- const i = [];
4047
- for (const s of o) {
4048
- const c = t.domain[s];
4049
- if (c !== void 0)
4050
- i.push([s, c]);
4048
+ for (const s of this.domainPacks) {
4049
+ const a = [];
4050
+ for (const u of s) {
4051
+ const d = t.domain[u];
4052
+ if (d !== void 0)
4053
+ a.push([u, d]);
4051
4054
  else
4052
4055
  break n;
4053
4056
  }
4054
- const a = this.domainPackToAnchor.get(JSON.stringify(i));
4055
- if (a !== void 0) {
4056
- e.domainAnchor = a, r = new Set(o);
4057
+ const f = this.domainPackToAnchor.get(JSON.stringify(a));
4058
+ if (f !== void 0) {
4059
+ r.domainAnchor = f, o = new Set(s);
4057
4060
  break;
4058
4061
  }
4059
4062
  }
4060
- for (const [o, i] of Object.entries(t.domain ?? {})) {
4061
- if (r !== void 0 && r.has(o))
4063
+ for (const [s, a] of Object.entries(t.domain ?? {})) {
4064
+ if (o !== void 0 && o.has(s))
4062
4065
  continue;
4063
- const a = x(o, i), s = this.domains.get(a);
4064
- e.domain ?? (e.domain = {}), e.domain[o] = s ? { anchor: s } : i;
4066
+ const f = P$1(s, a), u = this.domains.get(f);
4067
+ r.domain ?? (r.domain = {}), r.domain[s] = u ? { anchor: u } : a;
4065
4068
  }
4066
- return e.axes = t.axesSpec.map((o) => {
4067
- const i = A(o);
4068
- return this.axes.get(i) ?? o;
4069
- }), e;
4069
+ if (r.axes = t.axesSpec.map((s) => {
4070
+ const a = x$1(s);
4071
+ return this.axes.get(a) ?? s;
4072
+ }), !e || e.length === 0)
4073
+ return r;
4074
+ const i = [];
4075
+ for (const s of e) {
4076
+ const [a, f] = s;
4077
+ if (typeof a == "number") {
4078
+ if (a < 0 || a >= t.axesSpec.length)
4079
+ throw new Error(`Axis index ${a} is out of bounds (0-${t.axesSpec.length - 1})`);
4080
+ i.push([a, f]);
4081
+ } else {
4082
+ const u = t.axesSpec.findIndex((d) => d.name === a);
4083
+ if (u === -1)
4084
+ throw new Error(`Axis with name "${a}" not found in the column specification`);
4085
+ i.push([u, f]);
4086
+ }
4087
+ }
4088
+ return i.sort((s, a) => s[0] - a[0]), {
4089
+ source: r,
4090
+ axisFilters: i
4091
+ };
4070
4092
  }
4071
4093
  /**
4072
4094
  * Derives a canonicalized string representation of an anchored column identifier, can be used as a unique identifier for the column
4073
4095
  * @param spec Column specification to anchor
4096
+ * @param axisFilters Optional axis filters to apply to the column
4074
4097
  * @returns A canonicalized string representation of the anchored column identifier
4075
4098
  */
4076
- deriveCanonical(t) {
4077
- const e = this.derive(t);
4078
- return k(e);
4099
+ deriveS(t, e) {
4100
+ return Y(this.derive(t, e));
4079
4101
  }
4080
4102
  }
4081
- function An(n, t) {
4103
+ function En(n, t) {
4082
4104
  const e = { ...t };
4083
4105
  if (e.domainAnchor !== void 0) {
4084
4106
  const r = n[e.domainAnchor];
@@ -4093,19 +4115,19 @@
4093
4115
  if (typeof i == "string")
4094
4116
  r[o] = i;
4095
4117
  else {
4096
- const a = n[i.anchor];
4097
- if (!a)
4118
+ const s = n[i.anchor];
4119
+ if (!s)
4098
4120
  throw new Error(`Anchor "${i.anchor}" not found for domain key "${o}"`);
4099
- if (!a.domain || a.domain[o] === void 0)
4121
+ if (!s.domain || s.domain[o] === void 0)
4100
4122
  throw new Error(`Domain key "${o}" not found in anchor "${i.anchor}"`);
4101
- r[o] = a.domain[o];
4123
+ r[o] = s.domain[o];
4102
4124
  }
4103
4125
  e.domain = r;
4104
4126
  }
4105
- return e.axes && (e.axes = e.axes.map((r) => Y(n, r))), e;
4127
+ return e.axes && (e.axes = e.axes.map((r) => Z$1(n, r))), e;
4106
4128
  }
4107
- function Y(n, t) {
4108
- if (!Z(t))
4129
+ function Z$1(n, t) {
4130
+ if (!q(t))
4109
4131
  return t;
4110
4132
  const e = t.anchor, r = n[e];
4111
4133
  if (!r)
@@ -4122,7 +4144,7 @@
4122
4144
  throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
4123
4145
  return o[0];
4124
4146
  } else if ("id" in t) {
4125
- const o = r.axesSpec.filter((i) => z$1(t.id, h(i)));
4147
+ const o = r.axesSpec.filter((i) => Q$1(t.id, p(i)));
4126
4148
  if (o.length > 1)
4127
4149
  throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
4128
4150
  if (o.length === 0)
@@ -4131,26 +4153,26 @@
4131
4153
  }
4132
4154
  throw new Error("Unsupported axis reference type");
4133
4155
  }
4134
- function Z(n) {
4156
+ function q(n) {
4135
4157
  return typeof n == "object" && "anchor" in n;
4136
4158
  }
4137
- function f$1(n) {
4159
+ function c(n) {
4138
4160
  return n.kind === "PColumn";
4139
4161
  }
4140
- function q$1(n) {
4141
- return f$1(n.spec);
4162
+ function v(n) {
4163
+ return c(n.spec);
4142
4164
  }
4143
- function En(n) {
4144
- if (!q$1(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
4165
+ function Sn(n) {
4166
+ if (!v(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
4145
4167
  return n;
4146
4168
  }
4147
- function kn(n, t) {
4169
+ function Cn(n, t) {
4148
4170
  return n === void 0 ? void 0 : {
4149
4171
  ...n,
4150
4172
  data: t(n.data)
4151
4173
  };
4152
4174
  }
4153
- function In(n) {
4175
+ function $n(n) {
4154
4176
  const t = /* @__PURE__ */ new Map(), e = (r) => {
4155
4177
  switch (r.type) {
4156
4178
  case "column":
@@ -4165,12 +4187,12 @@
4165
4187
  for (const o of r.secondary) e(o);
4166
4188
  return;
4167
4189
  default:
4168
- g(r);
4190
+ w(r);
4169
4191
  }
4170
4192
  };
4171
4193
  return e(n), [...t.values()];
4172
4194
  }
4173
- function P$1(n, t) {
4195
+ function E(n, t) {
4174
4196
  if (n.name !== void 0 && n.name !== t.name)
4175
4197
  return false;
4176
4198
  if (n.type !== void 0) {
@@ -4188,7 +4210,7 @@
4188
4210
  }
4189
4211
  return true;
4190
4212
  }
4191
- function E$1(n, t) {
4213
+ function I$1(n, t) {
4192
4214
  if (t.name !== void 0 && n.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n.name))
4193
4215
  return false;
4194
4216
  if (t.type !== void 0) {
@@ -4205,16 +4227,16 @@
4205
4227
  return false;
4206
4228
  }
4207
4229
  if (t.axes !== void 0) {
4208
- const e = n.axesSpec.map(h);
4230
+ const e = n.axesSpec.map(p);
4209
4231
  if (t.partialAxesMatch) {
4210
4232
  for (const r of t.axes)
4211
- if (!e.some((o) => P$1(r, o)))
4233
+ if (!e.some((o) => E(r, o)))
4212
4234
  return false;
4213
4235
  } else {
4214
4236
  if (e.length !== t.axes.length)
4215
4237
  return false;
4216
4238
  for (let r = 0; r < t.axes.length; r++)
4217
- if (!P$1(t.axes[r], e[r]))
4239
+ if (!E(t.axes[r], e[r]))
4218
4240
  return false;
4219
4241
  }
4220
4242
  }
@@ -4234,72 +4256,72 @@
4234
4256
  }
4235
4257
  return true;
4236
4258
  }
4237
- function Nn(n) {
4238
- return Array.isArray(n) ? (t) => n.some((e) => f$1(t) && E$1(t, e)) : (t) => f$1(t) && E$1(t, n);
4259
+ function Vn(n) {
4260
+ return Array.isArray(n) ? (t) => n.some((e) => c(t) && I$1(t, e)) : (t) => c(t) && I$1(t, n);
4239
4261
  }
4240
- z$2.object({
4241
- __isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4242
- blockId: z$2.string().describe("Upstream block id"),
4243
- name: z$2.string().describe("Name of the output provided to the upstream block's output context")
4262
+ z.object({
4263
+ __isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4264
+ blockId: z.string().describe("Upstream block id"),
4265
+ name: z.string().describe("Name of the output provided to the upstream block's output context")
4244
4266
  }).describe(
4245
4267
  "Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
4246
4268
  ).strict().readonly();
4247
- function Vn(n) {
4269
+ function On(n) {
4248
4270
  return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === true && "blockId" in n && "name" in n;
4249
4271
  }
4250
- function Fn(n, t) {
4272
+ function Bn(n, t) {
4251
4273
  return n.ok ? { ok: true, value: t(n.value) } : n;
4252
4274
  }
4253
- const on = 24;
4254
- z$2.string().length(on).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4255
- var ve = Object.defineProperty;
4256
- var _e = (t, e, n) => e in t ? ve(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4257
- var P = (t, e, n) => _e(t, typeof e != "symbol" ? e + "" : e, n);
4258
- function j(t) {
4275
+ const an = 24;
4276
+ z.string().length(an).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4277
+ var we = Object.defineProperty;
4278
+ var Ie = (t, e, n) => e in t ? we(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4279
+ var x = (t, e, n) => Ie(t, typeof e != "symbol" ? e + "" : e, n);
4280
+ function W(t) {
4259
4281
  return { type: "Immediate", value: t };
4260
4282
  }
4261
- function Fe() {
4283
+ function ke() {
4262
4284
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4263
4285
  }
4264
- function de(t) {
4286
+ function me(t) {
4265
4287
  if (t && typeof globalThis.getPlatforma == "function")
4266
4288
  return globalThis.getPlatforma(t);
4267
4289
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4268
4290
  throw new Error("Can't get platforma instance.");
4269
4291
  }
4270
- function Te() {
4292
+ function Ee() {
4271
4293
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4272
4294
  }
4273
- function f() {
4295
+ function g() {
4274
4296
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4275
4297
  throw new Error("Not in config rendering context");
4276
4298
  }
4277
- function E(t, e) {
4278
- const n = Te();
4299
+ function $(t, e) {
4300
+ const n = Ee();
4279
4301
  if (n === void 0) return false;
4280
4302
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4281
4303
  return n.callbackRegistry[t] = e, true;
4282
4304
  }
4283
- const W = /* @__PURE__ */ new Map();
4284
- function xe(t, e) {
4285
- t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
4286
- for (const s of W.get(t))
4305
+ const X = /* @__PURE__ */ new Map();
4306
+ function Oe(t, e) {
4307
+ t in g().callbackRegistry || (g().callbackRegistry[t] = (n) => {
4308
+ for (const s of X.get(t))
4287
4309
  s(n);
4288
- }, W.set(t, [])), W.get(t).push(e);
4310
+ }, X.set(t, [])), X.get(t).push(e);
4289
4311
  }
4290
- class _ {
4312
+ class S {
4291
4313
  constructor(e, n = (s) => s) {
4292
- P(this, "isResolved", false);
4293
- P(this, "resolvedValue");
4294
- this.handle = e, this.postProcess = n, xe(e, (s) => {
4314
+ x(this, "isResolved", false);
4315
+ x(this, "resolvedValue");
4316
+ this.handle = e, this.postProcess = n, Oe(e, (s) => {
4295
4317
  this.resolvedValue = n(s), this.isResolved = true;
4296
4318
  });
4297
4319
  }
4298
4320
  map(e) {
4299
- return new _(this.handle, (n) => e(this.postProcess(n)));
4321
+ return new S(this.handle, (n) => e(this.postProcess(n)));
4300
4322
  }
4301
4323
  mapDefined(e) {
4302
- return new _(this.handle, (n) => {
4324
+ return new S(this.handle, (n) => {
4303
4325
  const s = this.postProcess(n);
4304
4326
  return s ? e(s) : void 0;
4305
4327
  });
@@ -4308,10 +4330,10 @@
4308
4330
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4309
4331
  }
4310
4332
  }
4311
- function z(t, e) {
4333
+ function se(t, e) {
4312
4334
  return t === void 0 ? void 0 : e(t);
4313
4335
  }
4314
- class S {
4336
+ class I {
4315
4337
  constructor(e, n) {
4316
4338
  this.handle = e, this.resolvePath = n;
4317
4339
  }
@@ -4348,49 +4370,49 @@
4348
4370
  resolveWithCommon(e, ...n) {
4349
4371
  const s = [
4350
4372
  ...this.resolvePath,
4351
- ...n.map((r) => typeof r == "string" ? r : r.field)
4373
+ ...n.map((i) => typeof i == "string" ? i : i.field)
4352
4374
  ];
4353
- return z(
4354
- f().resolveWithCommon(this.handle, e, ...n),
4355
- (r) => new S(r, s)
4375
+ return se(
4376
+ g().resolveWithCommon(this.handle, e, ...n),
4377
+ (i) => new I(i, s)
4356
4378
  );
4357
4379
  }
4358
4380
  get resourceType() {
4359
- return f().getResourceType(this.handle);
4381
+ return g().getResourceType(this.handle);
4360
4382
  }
4361
4383
  getInputsLocked() {
4362
- return f().getInputsLocked(this.handle);
4384
+ return g().getInputsLocked(this.handle);
4363
4385
  }
4364
4386
  getOutputsLocked() {
4365
- return f().getOutputsLocked(this.handle);
4387
+ return g().getOutputsLocked(this.handle);
4366
4388
  }
4367
4389
  getIsReadyOrError() {
4368
- return f().getIsReadyOrError(this.handle);
4390
+ return g().getIsReadyOrError(this.handle);
4369
4391
  }
4370
4392
  getIsFinal() {
4371
- return f().getIsFinal(this.handle);
4393
+ return g().getIsFinal(this.handle);
4372
4394
  }
4373
4395
  getError() {
4374
4396
  const e = [...this.resolvePath, "error"];
4375
- return z(
4376
- f().getError(this.handle),
4377
- (n) => new S(n, e)
4397
+ return se(
4398
+ g().getError(this.handle),
4399
+ (n) => new I(n, e)
4378
4400
  );
4379
4401
  }
4380
4402
  listInputFields() {
4381
- return f().listInputFields(this.handle);
4403
+ return g().listInputFields(this.handle);
4382
4404
  }
4383
4405
  listOutputFields() {
4384
- return f().listOutputFields(this.handle);
4406
+ return g().listOutputFields(this.handle);
4385
4407
  }
4386
4408
  listDynamicFields() {
4387
- return f().listDynamicFields(this.handle);
4409
+ return g().listDynamicFields(this.handle);
4388
4410
  }
4389
4411
  getKeyValueBase64(e) {
4390
- return f().getKeyValueBase64(this.handle, e);
4412
+ return g().getKeyValueBase64(this.handle, e);
4391
4413
  }
4392
4414
  getKeyValueAsString(e) {
4393
- return f().getKeyValueAsString(this.handle, e);
4415
+ return g().getKeyValueAsString(this.handle, e);
4394
4416
  }
4395
4417
  getKeyValueAsJson(e) {
4396
4418
  const n = this.getKeyValueAsString(e);
@@ -4398,10 +4420,10 @@
4398
4420
  return JSON.parse(n);
4399
4421
  }
4400
4422
  getDataBase64() {
4401
- return f().getDataBase64(this.handle);
4423
+ return g().getDataBase64(this.handle);
4402
4424
  }
4403
4425
  getDataAsString() {
4404
- return f().getDataAsString(this.handle);
4426
+ return g().getDataAsString(this.handle);
4405
4427
  }
4406
4428
  getDataAsJson() {
4407
4429
  const e = this.getDataAsString();
@@ -4413,38 +4435,38 @@
4413
4435
  */
4414
4436
  getPColumns(e = false, n = "") {
4415
4437
  const s = this.parsePObjectCollection(e, n);
4416
- return s === void 0 ? void 0 : Object.entries(s).map(([, i]) => {
4417
- if (!q$1(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
4418
- return i;
4438
+ return s === void 0 ? void 0 : Object.entries(s).map(([, r]) => {
4439
+ if (!v(r)) throw new Error(`not a PColumn (kind = ${r.spec.kind})`);
4440
+ return r;
4419
4441
  });
4420
4442
  }
4421
4443
  /**
4422
4444
  *
4423
4445
  */
4424
4446
  parsePObjectCollection(e = false, n = "") {
4425
- const s = f().parsePObjectCollection(
4447
+ const s = g().parsePObjectCollection(
4426
4448
  this.handle,
4427
4449
  e,
4428
4450
  n,
4429
4451
  ...this.resolvePath
4430
4452
  );
4431
4453
  if (s === void 0) return;
4432
- const r = {};
4433
- for (const [i, o] of Object.entries(s)) {
4434
- const l2 = [...this.resolvePath, i];
4435
- r[i] = kn(o, (a) => new S(a, l2));
4454
+ const i = {};
4455
+ for (const [r, o] of Object.entries(s)) {
4456
+ const u = [...this.resolvePath, r];
4457
+ i[r] = Cn(o, (c2) => new I(c2, u));
4436
4458
  }
4437
- return r;
4459
+ return i;
4438
4460
  }
4439
4461
  getFileContentAsBase64() {
4440
- return new _(f().getBlobContentAsBase64(this.handle));
4462
+ return new S(g().getBlobContentAsBase64(this.handle));
4441
4463
  }
4442
4464
  getFileContentAsString() {
4443
- return new _(f().getBlobContentAsString(this.handle));
4465
+ return new S(g().getBlobContentAsString(this.handle));
4444
4466
  }
4445
4467
  getFileContentAsJson() {
4446
- return new _(
4447
- f().getBlobContentAsString(this.handle)
4468
+ return new S(
4469
+ g().getBlobContentAsString(this.handle)
4448
4470
  ).mapDefined((e) => JSON.parse(e));
4449
4471
  }
4450
4472
  /**
@@ -4463,7 +4485,7 @@
4463
4485
  * @returns downloaded file handle
4464
4486
  */
4465
4487
  getFileHandle() {
4466
- return new _(f().getDownloadedBlobContentHandle(this.handle));
4488
+ return new S(g().getDownloadedBlobContentHandle(this.handle));
4467
4489
  }
4468
4490
  /**
4469
4491
  * @deprecated use getFileHandle
@@ -4475,7 +4497,7 @@
4475
4497
  * @returns downloaded file handle
4476
4498
  */
4477
4499
  getRemoteFileHandle() {
4478
- return new _(f().getOnDemandBlobContentHandle(this.handle));
4500
+ return new S(g().getOnDemandBlobContentHandle(this.handle));
4479
4501
  }
4480
4502
  /**
4481
4503
  * @deprecated use getRemoteFileHandle
@@ -4487,22 +4509,22 @@
4487
4509
  * @returns the url to the extracted folder
4488
4510
  */
4489
4511
  extractArchiveAndGetURL(e) {
4490
- return new _(f().extractArchiveAndGetURL(this.handle, e));
4512
+ return new S(g().extractArchiveAndGetURL(this.handle, e));
4491
4513
  }
4492
4514
  getImportProgress() {
4493
- return new _(f().getImportProgress(this.handle));
4515
+ return new S(g().getImportProgress(this.handle));
4494
4516
  }
4495
4517
  getLastLogs(e) {
4496
- return new _(f().getLastLogs(this.handle, e));
4518
+ return new S(g().getLastLogs(this.handle, e));
4497
4519
  }
4498
4520
  getProgressLog(e) {
4499
- return new _(f().getProgressLog(this.handle, e));
4521
+ return new S(g().getProgressLog(this.handle, e));
4500
4522
  }
4501
4523
  getProgressLogWithInfo(e) {
4502
- return new _(f().getProgressLogWithInfo(this.handle, e));
4524
+ return new S(g().getProgressLogWithInfo(this.handle, e));
4503
4525
  }
4504
4526
  getLogHandle() {
4505
- return new _(f().getLogHandle(this.handle));
4527
+ return new S(g().getLogHandle(this.handle));
4506
4528
  }
4507
4529
  allFieldsResolved(e = "Input") {
4508
4530
  switch (e) {
@@ -4517,85 +4539,175 @@
4517
4539
  }
4518
4540
  }
4519
4541
  mapFields(e, n) {
4520
- const { fieldType: s, requireLocked: r, skipUnresolved: i } = {
4542
+ const { fieldType: s, requireLocked: i, skipUnresolved: r } = {
4521
4543
  fieldType: "Input",
4522
4544
  requireLocked: true,
4523
4545
  skipUnresolved: false,
4524
4546
  ...n
4525
4547
  }, o = e;
4526
- if (r && (s === "Input" && !this.getInputsLocked() || s === "Output" && !this.getOutputsLocked()))
4548
+ if (i && (s === "Input" && !this.getInputsLocked() || s === "Output" && !this.getOutputsLocked()))
4527
4549
  return;
4528
- let a = (s === "Input" ? this.listInputFields() : s === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4529
- (u) => [u, this.resolve({ field: u, assertFieldType: s })]
4550
+ let c2 = (s === "Input" ? this.listInputFields() : s === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4551
+ (a) => [a, this.resolve({ field: a, assertFieldType: s })]
4530
4552
  );
4531
- return i && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, g2]) => o(u, g2));
4553
+ return r && (c2 = c2.filter((a) => a[1] !== void 0)), c2.map(([a, h2]) => o(a, h2));
4532
4554
  }
4533
4555
  }
4534
- const pe = "staging", fe = "main";
4535
- const Oe = "pl7.app/label", ke = "pl7.app/trace", Ee = z$2.object({
4536
- type: z$2.string(),
4537
- importance: z$2.number().optional(),
4538
- id: z$2.string().optional(),
4539
- label: z$2.string()
4540
- }), Ve = z$2.array(Ee), je = 1e-3, Ne = "__LABEL__", se = "__LABEL__@1";
4541
- function re(t, e, n = {}) {
4542
- const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = t.map((d2) => {
4543
- var A2, ee;
4544
- const h2 = e(d2), p = (A2 = h2.annotations) == null ? void 0 : A2[Oe], b = (ee = h2.annotations) == null ? void 0 : ee[ke], m = (b ? Ve.safeParse(JSON.parse(b)).data : void 0) ?? [];
4545
- if (p) {
4546
- const C = { label: p, type: Ne, importance: -2 };
4547
- n.addLabelAsSuffix ? m.push(C) : m.splice(0, 0, C);
4556
+ const ye = "staging", be = "main";
4557
+ const Ne = "pl7.app/label", Ue = "pl7.app/trace", Be = z.object({
4558
+ type: z.string(),
4559
+ importance: z.number().optional(),
4560
+ id: z.string().optional(),
4561
+ label: z.string()
4562
+ }), Me = z.array(Be), Je = 1e-3, $e = "__LABEL__", ue = "__LABEL__@1";
4563
+ function Q(t, e, n = {}) {
4564
+ const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), r = t.map((l) => {
4565
+ var F2, M;
4566
+ const f = e(l);
4567
+ let d, y, _;
4568
+ "spec" in f && typeof f.spec == "object" ? (d = f.spec, y = f.prefixTrace, _ = f.suffixTrace) : d = f;
4569
+ const A = (F2 = d.annotations) == null ? void 0 : F2[Ne], v2 = (M = d.annotations) == null ? void 0 : M[Ue], m2 = (v2 ? Me.safeParse(JSON.parse(v2)).data : void 0) ?? [], w2 = [
4570
+ ...y ?? [],
4571
+ ...m2,
4572
+ ..._ ?? []
4573
+ ];
4574
+ if (A) {
4575
+ const C = { label: A, type: $e, importance: -2 };
4576
+ n.addLabelAsSuffix ? w2.push(C) : w2.splice(0, 0, C);
4548
4577
  }
4549
- const I = [], v = /* @__PURE__ */ new Map();
4550
- for (let C = m.length - 1; C >= 0; --C) {
4551
- const { type: J } = m[C], be = m[C].importance ?? 0, M = (v.get(J) ?? 0) + 1;
4552
- v.set(J, M);
4553
- const x2 = `${J}@${M}`;
4554
- r.set(x2, (r.get(x2) ?? 0) + 1), s.set(
4555
- x2,
4578
+ const L = [], R = /* @__PURE__ */ new Map();
4579
+ for (let C = w2.length - 1; C >= 0; --C) {
4580
+ const { type: D } = w2[C], q2 = w2[C].importance ?? 0, z2 = (R.get(D) ?? 0) + 1;
4581
+ R.set(D, z2);
4582
+ const O = `${D}@${z2}`;
4583
+ i.set(O, (i.get(O) ?? 0) + 1), s.set(
4584
+ O,
4556
4585
  Math.max(
4557
- s.get(x2) ?? Number.NEGATIVE_INFINITY,
4558
- be - (m.length - C) * je
4586
+ s.get(O) ?? Number.NEGATIVE_INFINITY,
4587
+ q2 - (w2.length - C) * Je
4559
4588
  )
4560
- ), I.push({ ...m[C], fullType: x2, occurenceIndex: M });
4589
+ ), L.push({ ...w2[C], fullType: O, occurenceIndex: z2 });
4561
4590
  }
4562
- return I.reverse(), {
4563
- value: d2,
4564
- spec: h2,
4565
- label: p,
4566
- fullTrace: I
4591
+ return L.reverse(), {
4592
+ value: l,
4593
+ spec: d,
4594
+ label: A,
4595
+ fullTrace: L
4567
4596
  };
4568
- }), o = [], l2 = [], a = [...s];
4569
- a.sort(([, d2], [, h2]) => h2 - d2);
4570
- for (const [d2] of a)
4571
- d2.endsWith("@1") || r.get(d2) === t.length ? o.push(d2) : l2.push(d2);
4572
- const u = (d2) => i.map((h2) => {
4573
- const p = h2.fullTrace.filter((m) => d2.has(m.fullType)).map((m) => m.label), b = n.separator ?? " / ";
4597
+ }), o = [], u = [], c2 = [...s];
4598
+ c2.sort(([, l], [, f]) => f - l);
4599
+ for (const [l] of c2)
4600
+ l.endsWith("@1") || i.get(l) === t.length ? o.push(l) : u.push(l);
4601
+ const a = (l) => r.map((f) => {
4602
+ const d = f.fullTrace.filter((_) => l.has(_.fullType)).map((_) => _.label), y = n.separator ?? " / ";
4574
4603
  return {
4575
- label: p.join(b),
4576
- value: h2.value
4604
+ label: d.join(y),
4605
+ value: f.value
4577
4606
  };
4578
4607
  });
4579
4608
  if (o.length === 0) {
4580
- if (l2.length !== 0) throw new Error("Assertion error.");
4581
- return u(new Set(se));
4582
- }
4583
- let g2 = 0, c = 0;
4584
- for (; g2 < o.length; ) {
4585
- const d2 = /* @__PURE__ */ new Set();
4586
- n.includeNativeLabel && d2.add(se);
4587
- for (let p = 0; p < g2; ++p) d2.add(o[p]);
4588
- d2.add(o[c]);
4589
- const h2 = u(d2);
4590
- if (new Set(h2.map((p) => p.label)).size === t.length) return h2;
4591
- c++, c == o.length && (g2++, c = g2);
4592
- }
4593
- return u(/* @__PURE__ */ new Set([...o, ...l2]));
4609
+ if (u.length !== 0) throw new Error("Assertion error.");
4610
+ return a(new Set(ue));
4611
+ }
4612
+ let h2 = 0, p2 = 0;
4613
+ for (; h2 < o.length; ) {
4614
+ const l = /* @__PURE__ */ new Set();
4615
+ n.includeNativeLabel && l.add(ue);
4616
+ for (let d = 0; d < h2; ++d) l.add(o[d]);
4617
+ l.add(o[p2]);
4618
+ const f = a(l);
4619
+ if (new Set(f.map((d) => d.label)).size === t.length) return f;
4620
+ p2++, p2 == o.length && (h2++, p2 = h2);
4621
+ }
4622
+ return a(/* @__PURE__ */ new Set([...o, ...u]));
4594
4623
  }
4595
- class Ue {
4624
+ const B = "PColumnData/", re = B + "ResourceMap", oe = B + "Partitioned/ResourceMap", ce = B + "JsonPartitioned", Z = B + "BinaryPartitioned", _e = B + "Partitioned/", pe = _e + "JsonPartitioned", ee = _e + "BinaryPartitioned";
4625
+ const de = (t) => {
4626
+ if (!t.endsWith(".index")) {
4627
+ if (t.endsWith(".values"))
4628
+ return t.substring(0, t.length - 7);
4629
+ throw Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4630
+ }
4631
+ };
4632
+ function Ge(t) {
4633
+ if (!t) return;
4634
+ const e = t.resourceType.name, n = t.getDataAsJson(), s = [];
4635
+ let i = 0;
4636
+ switch (e) {
4637
+ case re:
4638
+ i = n.keyLength;
4639
+ break;
4640
+ case oe:
4641
+ i = n.partitionKeyLength + n.keyLength;
4642
+ break;
4643
+ case ce:
4644
+ case Z:
4645
+ i = n.partitionKeyLength;
4646
+ break;
4647
+ case ee:
4648
+ case pe:
4649
+ i = n.superPartitionKeyLength + n.partitionKeyLength;
4650
+ break;
4651
+ }
4652
+ switch (e) {
4653
+ case re:
4654
+ case ce:
4655
+ case Z:
4656
+ for (let r of t.listInputFields()) {
4657
+ if (e === Z) {
4658
+ const u = de(r);
4659
+ if (u) r = u;
4660
+ else continue;
4661
+ }
4662
+ const o = [...JSON.parse(r)];
4663
+ s.push(o);
4664
+ }
4665
+ break;
4666
+ case oe:
4667
+ case ee:
4668
+ case pe:
4669
+ for (const r of t.listInputFields()) {
4670
+ const o = [...JSON.parse(r)], u = t.resolve({ field: r, assertFieldType: "Input" });
4671
+ if (u !== void 0)
4672
+ for (let c2 of u.listInputFields()) {
4673
+ if (e === ee) {
4674
+ const h2 = de(c2);
4675
+ if (h2) c2 = h2;
4676
+ else continue;
4677
+ }
4678
+ const a = [...o, ...JSON.parse(c2)];
4679
+ s.push(a);
4680
+ }
4681
+ }
4682
+ break;
4683
+ }
4684
+ return { data: s, keyLength: i };
4685
+ }
4686
+ function We(t) {
4687
+ const e = Ge(t);
4688
+ if (!e) return;
4689
+ const { data: n, keyLength: s } = e, i = [];
4690
+ for (let r = 0; r < s; ++r)
4691
+ i.push(/* @__PURE__ */ new Set());
4692
+ for (const r of n) {
4693
+ if (r.length !== s)
4694
+ throw new Error("key length does not match partition length");
4695
+ for (let o = 0; o < s; ++o)
4696
+ i[o].add(r[o]);
4697
+ }
4698
+ return i.map((r) => Array.from(r.values()));
4699
+ }
4700
+ function te(t, e) {
4701
+ if (t === void 0) return e === void 0;
4702
+ if (e === void 0) return true;
4703
+ for (const n in e)
4704
+ if (t[n] !== e[n]) return false;
4705
+ return true;
4706
+ }
4707
+ class Ke {
4596
4708
  constructor() {
4597
- P(this, "ctx", f());
4598
- P(this, "defaultLabelFn", (e, n) => {
4709
+ x(this, "ctx", g());
4710
+ x(this, "defaultLabelFn", (e, n) => {
4599
4711
  var s;
4600
4712
  return ((s = e.annotations) == null ? void 0 : s["pl7.app/label"]) ?? "Unlabelled";
4601
4713
  });
@@ -4607,33 +4719,85 @@
4607
4719
  return this.ctx.calculateOptions(e);
4608
4720
  }
4609
4721
  getOptions(e, n) {
4610
- const s = typeof e == "function" ? e : Nn(e), r = this.getSpecs().entries.filter((i) => s(i.obj));
4611
- return typeof n == "object" || typeof n > "u" ? re(r, (i) => i.obj, n ?? {}).map(({ value: { ref: i }, label: o }) => ({
4612
- ref: i,
4722
+ const s = typeof e == "function" ? e : Vn(e), i = this.getSpecs().entries.filter((r) => s(r.obj));
4723
+ return typeof n == "object" || typeof n > "u" ? Q(i, (r) => r.obj, n ?? {}).map(({ value: { ref: r }, label: o }) => ({
4724
+ ref: r,
4613
4725
  label: o
4614
- })) : r.map((i) => ({
4615
- ref: i.ref,
4616
- label: n(i.obj, i.ref)
4726
+ })) : i.map((r) => ({
4727
+ ref: r.ref,
4728
+ label: n(r.obj, r.ref)
4617
4729
  }));
4618
4730
  }
4619
4731
  // Implementation
4620
4732
  getCanonicalOptions(e, n, s) {
4621
- const r = {};
4622
- if (!(e instanceof wn))
4623
- for (const [a, u] of Object.entries(e))
4624
- if (Vn(u)) {
4625
- const g2 = this.getPColumnSpecByRef(u);
4626
- if (!g2)
4733
+ const i = {};
4734
+ if (!(e instanceof Pn))
4735
+ for (const [a, h2] of Object.entries(e))
4736
+ if (On(h2)) {
4737
+ const p2 = this.getPColumnSpecByRef(h2);
4738
+ if (!p2)
4627
4739
  return;
4628
- r[a] = g2;
4740
+ i[a] = p2;
4629
4741
  } else
4630
- r[a] = u;
4631
- const i = typeof n == "function" ? n : Nn(
4632
- Array.isArray(n) ? n.map((a) => An(r, a)) : An(r, n)
4633
- ), o = this.getSpecs().entries.filter(({ obj: a }) => f$1(a) ? i(a) : false), l2 = e instanceof wn ? e : new wn(r);
4634
- return re(o, (a) => a.obj, s ?? {}).map(({ value: { obj: a }, label: u }) => ({
4635
- value: l2.deriveCanonical(a),
4636
- label: u
4742
+ i[a] = h2;
4743
+ const r = typeof n == "function" ? n : Vn(
4744
+ Array.isArray(n) ? n.map((a) => En(i, a)) : En(i, n)
4745
+ ), o = this.getSpecs().entries.filter(({ obj: a }) => c(a) ? r(a) : false);
4746
+ if (o.length === 0)
4747
+ return [];
4748
+ const u = e instanceof Pn ? e : new Pn(i), c$1 = typeof n == "object" && !Array.isArray(n) && "axes" in n && n.axes !== void 0 && n.partialAxesMatch === void 0 ? n.axes.map((a, h2) => "split" in a && a.split === true ? h2 : -1).filter((a) => a !== -1) : [];
4749
+ if (c$1.sort((a, h2) => a - h2), c$1.length > 0) {
4750
+ const a = [], h2 = c$1[c$1.length - 1];
4751
+ for (const { ref: l, obj: f } of o) {
4752
+ if (!c(f)) continue;
4753
+ const d = this.getDataByRef(l);
4754
+ if (!d || !v(d)) continue;
4755
+ const y = We(d.data);
4756
+ if (!y) continue;
4757
+ if (h2 >= y.length)
4758
+ throw new Error(`Not enough partition keys for the requested split axes in column ${f.name}`);
4759
+ const _ = c$1.map((m2) => this.findLabels(p(f.axesSpec[m2]))), A = [], v$1 = (m2, w2) => {
4760
+ if (w2 >= c$1.length) {
4761
+ A.push([...m2]);
4762
+ return;
4763
+ }
4764
+ const L = c$1[w2], R = y[L];
4765
+ for (const F2 of R)
4766
+ m2.push(F2), v$1(m2, w2 + 1), m2.pop();
4767
+ };
4768
+ v$1([], 0);
4769
+ for (const m2 of A) {
4770
+ const w2 = m2.map((R, F2) => {
4771
+ const M = c$1[F2], C = wn(p(f.axesSpec[M])), D = _[F2], q2 = (D == null ? void 0 : D[R]) ?? String(R);
4772
+ return {
4773
+ type: `split:${C}`,
4774
+ label: q2,
4775
+ importance: 1e6
4776
+ };
4777
+ }), L = c$1.map((R, F2) => [R, m2[F2]]);
4778
+ a.push({
4779
+ obj: f,
4780
+ ref: l,
4781
+ filteringTrace: w2,
4782
+ filters: L
4783
+ });
4784
+ }
4785
+ }
4786
+ return Q(
4787
+ a,
4788
+ (l) => ({
4789
+ spec: l.obj,
4790
+ suffixTrace: l.filteringTrace
4791
+ }),
4792
+ s ?? {}
4793
+ ).map((l) => ({
4794
+ value: u.deriveS(l.value.obj, l.value.filters),
4795
+ label: l.label
4796
+ }));
4797
+ }
4798
+ return Q(o, (a) => a.obj, s ?? {}).map(({ value: { obj: a }, label: h2 }) => ({
4799
+ value: u.deriveS(a),
4800
+ label: h2
4637
4801
  }));
4638
4802
  }
4639
4803
  /**
@@ -4650,7 +4814,7 @@
4650
4814
  ref: n.ref,
4651
4815
  obj: {
4652
4816
  ...n.obj,
4653
- data: new S(n.obj.data, [n.ref.blockId, n.ref.name])
4817
+ data: new I(n.obj.data, [n.ref.blockId, n.ref.name])
4654
4818
  }
4655
4819
  }))
4656
4820
  };
@@ -4669,9 +4833,9 @@
4669
4833
  ref: n.ref,
4670
4834
  obj: {
4671
4835
  ...n.obj,
4672
- data: Fn(
4836
+ data: Bn(
4673
4837
  n.obj.data,
4674
- (s) => new S(s, [n.ref.blockId, n.ref.name])
4838
+ (s) => new I(s, [n.ref.blockId, n.ref.name])
4675
4839
  )
4676
4840
  }
4677
4841
  }))
@@ -4694,9 +4858,9 @@
4694
4858
  var n;
4695
4859
  return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
4696
4860
  (s) => s.ref.blockId === e.blockId && s.ref.name === e.name
4697
- )) == null ? void 0 : n.obj : kn(
4861
+ )) == null ? void 0 : n.obj : Cn(
4698
4862
  this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
4699
- (s) => new S(s, [e.blockId, e.name])
4863
+ (s) => new I(s, [e.blockId, e.name])
4700
4864
  );
4701
4865
  }
4702
4866
  /**
@@ -4707,7 +4871,7 @@
4707
4871
  getPColumnByRef(e) {
4708
4872
  const n = this.getDataByRef(e);
4709
4873
  if (n)
4710
- return En(n);
4874
+ return Sn(n);
4711
4875
  }
4712
4876
  /**
4713
4877
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -4717,7 +4881,7 @@
4717
4881
  getPColumnSpecByRef(e) {
4718
4882
  const n = this.getSpecByRef(e);
4719
4883
  if (n) {
4720
- if (!f$1(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
4884
+ if (!c(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
4721
4885
  return n;
4722
4886
  }
4723
4887
  }
@@ -4736,13 +4900,13 @@
4736
4900
  findDataWithCompatibleSpec(e) {
4737
4901
  const n = [];
4738
4902
  e: for (const s of this.getData().entries) {
4739
- if (!f$1(s.obj.spec))
4903
+ if (!c(s.obj.spec))
4740
4904
  continue;
4741
- const r = s.obj.spec;
4742
- if (e.name === r.name && e.valueType === r.valueType && e.axesSpec.length === r.axesSpec.length && X(e.domain, r.domain)) {
4743
- for (let i = 0; i < e.axesSpec.length; ++i) {
4744
- const o = e.axesSpec[i], l2 = r.axesSpec[i];
4745
- if (o.name !== l2.name || o.type !== l2.type || !X(o.domain, l2.domain))
4905
+ const i = s.obj.spec;
4906
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && te(e.domain, i.domain)) {
4907
+ for (let r = 0; r < e.axesSpec.length; ++r) {
4908
+ const o = e.axesSpec[r], u = i.axesSpec[r];
4909
+ if (o.name !== u.name || o.type !== u.type || !te(o.domain, u.domain))
4746
4910
  continue e;
4747
4911
  }
4748
4912
  n.push(s.obj);
@@ -4750,22 +4914,35 @@
4750
4914
  }
4751
4915
  return n;
4752
4916
  }
4917
+ /**
4918
+ * Find labels data for a given axis id. It will search for a label column and return its data as a map.
4919
+ * @returns a map of axis value => label
4920
+ */
4921
+ findLabels(e) {
4922
+ const n = this.getData();
4923
+ for (const s of n.entries) {
4924
+ if (!v(s.obj)) continue;
4925
+ const i = s.obj.spec;
4926
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && te(e.domain, i.axesSpec[0].domain)) {
4927
+ if (s.obj.data.resourceType.name !== "PColumnData/Json")
4928
+ throw Error(`Expected JSON column for labels, got: ${s.obj.data.resourceType.name}`);
4929
+ return Object.fromEntries(
4930
+ Object.entries(
4931
+ s.obj.data.getDataAsJson().data
4932
+ ).map((o) => [JSON.parse(o[0])[0], o[1]])
4933
+ );
4934
+ }
4935
+ }
4936
+ }
4753
4937
  }
4754
- function X(t, e) {
4755
- if (t === void 0) return e === void 0;
4756
- if (e === void 0) return true;
4757
- for (const n in e)
4758
- if (t[n] !== e[n]) return false;
4759
- return true;
4760
- }
4761
- class V {
4938
+ class G {
4762
4939
  constructor() {
4763
- P(this, "ctx");
4764
- P(this, "args");
4765
- P(this, "uiState");
4766
- P(this, "_activeArgsCache");
4767
- P(this, "resultPool", new Ue());
4768
- this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
4940
+ x(this, "ctx");
4941
+ x(this, "args");
4942
+ x(this, "uiState");
4943
+ x(this, "_activeArgsCache");
4944
+ x(this, "resultPool", new Ke());
4945
+ this.ctx = g(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
4769
4946
  }
4770
4947
  /**
4771
4948
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
@@ -4781,45 +4958,33 @@
4781
4958
  // return this.ctx.featureFlags;
4782
4959
  // }
4783
4960
  getNamedAccessor(e) {
4784
- return z(
4961
+ return se(
4785
4962
  this.ctx.getAccessorHandleByName(e),
4786
- (n) => new S(n, [e])
4963
+ (n) => new I(n, [e])
4787
4964
  );
4788
4965
  }
4789
4966
  get prerun() {
4790
- return this.getNamedAccessor(pe);
4967
+ return this.getNamedAccessor(ye);
4791
4968
  }
4792
4969
  get outputs() {
4793
- return this.getNamedAccessor(fe);
4970
+ return this.getNamedAccessor(be);
4794
4971
  }
4795
4972
  /**
4796
4973
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
4797
4974
  * @returns a map of axis value => label
4975
+ * @deprecated Use resultPool.findLabels instead
4798
4976
  */
4799
4977
  findLabels(e) {
4800
- const n = this.resultPool.getData();
4801
- for (const s of n.entries) {
4802
- if (!q$1(s.obj)) continue;
4803
- const r = s.obj.spec;
4804
- if (r.name === "pl7.app/label" && r.axesSpec.length === 1 && r.axesSpec[0].name === e.name && r.axesSpec[0].type === e.type && X(e.domain, r.axesSpec[0].domain)) {
4805
- if (s.obj.data.resourceType.name !== "PColumnData/Json")
4806
- throw Error(`Expected JSON column for labels, got: ${s.obj.data.resourceType.name}`);
4807
- return Object.fromEntries(
4808
- Object.entries(
4809
- s.obj.data.getDataAsJson().data
4810
- ).map((o) => [JSON.parse(o[0])[0], o[1]])
4811
- );
4812
- }
4813
- }
4978
+ return this.resultPool.findLabels(e);
4814
4979
  }
4815
4980
  verifyInlineColumnsSupport(e) {
4816
- var r;
4817
- const n = e.some((i) => !(i.data instanceof S)), s = ((r = this.ctx.featureFlags) == null ? void 0 : r.inlineColumnsSupport) === true;
4981
+ var i;
4982
+ const n = e.some((r) => !(r.data instanceof I)), s = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
4818
4983
  if (n && !s) throw Error("inline columns not supported");
4819
4984
  }
4820
4985
  createPFrame(e) {
4821
4986
  return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
4822
- e.map((n) => kn(n, (s) => s instanceof S ? s.handle : s))
4987
+ e.map((n) => Cn(n, (s) => s instanceof I ? s.handle : s))
4823
4988
  );
4824
4989
  }
4825
4990
  createPTable(e) {
@@ -4831,10 +4996,10 @@
4831
4996
  },
4832
4997
  filters: e.filters ?? [],
4833
4998
  sorting: e.sorting ?? []
4834
- } : n = e, this.verifyInlineColumnsSupport(In(n.src)), this.ctx.createPTable(
4835
- gn(
4999
+ } : n = e, this.verifyInlineColumnsSupport($n(n.src)), this.ctx.createPTable(
5000
+ An(
4836
5001
  n,
4837
- (s) => kn(s, (r) => r instanceof S ? r.handle : r)
5002
+ (s) => Cn(s, (i) => i instanceof I ? i.handle : i)
4838
5003
  )
4839
5004
  );
4840
5005
  }
@@ -4847,33 +5012,33 @@
4847
5012
  return this.ctx.getCurrentUnstableMarker();
4848
5013
  }
4849
5014
  }
4850
- const L = "1.24.11";
4851
- function Je(t) {
5015
+ const j = "1.25.0";
5016
+ function He(t) {
4852
5017
  return t.__renderLambda === true;
4853
5018
  }
4854
- function q(t) {
5019
+ function ne(t) {
4855
5020
  if (t !== void 0)
4856
- return Je(t) ? t.handle : t;
5021
+ return He(t) ? t.handle : t;
4857
5022
  }
4858
- class w {
4859
- constructor(e, n, s, r, i, o, l2) {
4860
- this._renderingMode = e, this._initialArgs = n, this._initialUiState = s, this._outputs = r, this._inputsValid = i, this._sections = o, this._title = l2;
5023
+ class P {
5024
+ constructor(e, n, s, i, r, o, u) {
5025
+ this._renderingMode = e, this._initialArgs = n, this._initialUiState = s, this._outputs = i, this._inputsValid = r, this._sections = o, this._title = u;
4861
5026
  }
4862
5027
  static create(e = "Heavy") {
4863
- return new w(
5028
+ return new P(
4864
5029
  e,
4865
5030
  void 0,
4866
5031
  {},
4867
5032
  {},
4868
- j(true),
4869
- j([]),
5033
+ W(true),
5034
+ W([]),
4870
5035
  void 0
4871
5036
  );
4872
5037
  }
4873
5038
  output(e, n, s = {}) {
4874
5039
  if (typeof n == "function") {
4875
- const r = `output#${e}`;
4876
- return E(r, () => n(new V())), new w(
5040
+ const i = `output#${e}`;
5041
+ return $(i, () => n(new G())), new P(
4877
5042
  this._renderingMode,
4878
5043
  this._initialArgs,
4879
5044
  this._initialUiState,
@@ -4881,7 +5046,7 @@
4881
5046
  ...this._outputs,
4882
5047
  [e]: {
4883
5048
  __renderLambda: true,
4884
- handle: r,
5049
+ handle: i,
4885
5050
  ...s
4886
5051
  }
4887
5052
  },
@@ -4890,7 +5055,7 @@
4890
5055
  this._title
4891
5056
  );
4892
5057
  } else
4893
- return new w(
5058
+ return new P(
4894
5059
  this._renderingMode,
4895
5060
  this._initialArgs,
4896
5061
  this._initialUiState,
@@ -4908,7 +5073,7 @@
4908
5073
  return this.output(e, n, { retentive: true });
4909
5074
  }
4910
5075
  argsValid(e) {
4911
- return typeof e == "function" ? (E("inputsValid", () => e(new V())), new w(
5076
+ return typeof e == "function" ? ($("inputsValid", () => e(new G())), new P(
4912
5077
  this._renderingMode,
4913
5078
  this._initialArgs,
4914
5079
  this._initialUiState,
@@ -4919,7 +5084,7 @@
4919
5084
  },
4920
5085
  this._sections,
4921
5086
  this._title
4922
- )) : new w(
5087
+ )) : new P(
4923
5088
  this._renderingMode,
4924
5089
  this._initialArgs,
4925
5090
  this._initialUiState,
@@ -4930,7 +5095,7 @@
4930
5095
  );
4931
5096
  }
4932
5097
  sections(e) {
4933
- return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new w(
5098
+ return Array.isArray(e) ? this.sections(W(e)) : typeof e == "function" ? ($("sections", () => e(new G())), new P(
4934
5099
  this._renderingMode,
4935
5100
  this._initialArgs,
4936
5101
  this._initialUiState,
@@ -4938,7 +5103,7 @@
4938
5103
  this._inputsValid,
4939
5104
  { __renderLambda: true, handle: "sections" },
4940
5105
  this._title
4941
- )) : new w(
5106
+ )) : new P(
4942
5107
  this._renderingMode,
4943
5108
  this._initialArgs,
4944
5109
  this._initialUiState,
@@ -4950,7 +5115,7 @@
4950
5115
  }
4951
5116
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
4952
5117
  title(e) {
4953
- return E("title", () => e(new V())), new w(
5118
+ return $("title", () => e(new G())), new P(
4954
5119
  this._renderingMode,
4955
5120
  this._initialArgs,
4956
5121
  this._initialUiState,
@@ -4965,7 +5130,7 @@
4965
5130
  * @deprecated use {@link withArgs}
4966
5131
  * */
4967
5132
  initialArgs(e) {
4968
- return new w(
5133
+ return new P(
4969
5134
  this._renderingMode,
4970
5135
  e,
4971
5136
  this._initialUiState,
@@ -4977,7 +5142,7 @@
4977
5142
  }
4978
5143
  /** Sets initial args for the block, this value must be specified. */
4979
5144
  withArgs(e) {
4980
- return new w(
5145
+ return new P(
4981
5146
  this._renderingMode,
4982
5147
  e,
4983
5148
  this._initialUiState,
@@ -4989,7 +5154,7 @@
4989
5154
  }
4990
5155
  /** Defines type and sets initial value for block UiState. */
4991
5156
  withUiState(e) {
4992
- return new w(
5157
+ return new P(
4993
5158
  this._renderingMode,
4994
5159
  this._initialArgs,
4995
5160
  e,
@@ -5006,7 +5171,7 @@
5006
5171
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
5007
5172
  const e = {
5008
5173
  v3: {
5009
- sdkVersion: L,
5174
+ sdkVersion: j,
5010
5175
  renderingMode: this._renderingMode,
5011
5176
  initialArgs: this._initialArgs,
5012
5177
  initialUiState: this._initialUiState,
@@ -5016,72 +5181,72 @@
5016
5181
  outputs: this._outputs
5017
5182
  },
5018
5183
  // fields below are added to allow previous desktop versions read generated configs
5019
- sdkVersion: L,
5184
+ sdkVersion: j,
5020
5185
  renderingMode: this._renderingMode,
5021
5186
  initialArgs: this._initialArgs,
5022
- inputsValid: q(this._inputsValid),
5023
- sections: q(this._sections),
5187
+ inputsValid: ne(this._inputsValid),
5188
+ sections: ne(this._sections),
5024
5189
  outputs: Object.fromEntries(
5025
- Object.entries(this._outputs).map(([n, s]) => [n, q(s)])
5190
+ Object.entries(this._outputs).map(([n, s]) => [n, ne(s)])
5026
5191
  )
5027
5192
  };
5028
- return Fe() ? de({ sdkVersion: L }) : { config: e };
5193
+ return ke() ? me({ sdkVersion: j }) : { config: e };
5029
5194
  }
5030
5195
  }
5031
- function Dt(t, e, n, s) {
5032
- var u, g2;
5196
+ function Vt(t, e, n, s) {
5197
+ var a, h2;
5033
5198
  Array.isArray(s) && (s = { filters: s });
5034
- const r = t.resultPool.getData().entries.map((c) => c.obj).filter(q$1).filter((c) => c.spec.name === "pl7.app/label" && c.spec.axesSpec.length === 1), i = (c, d2) => {
5035
- let h2 = c.toString();
5036
- if (d2)
5037
- for (const p in d2)
5038
- h2 += p, h2 += d2[p];
5039
- return h2;
5199
+ const i = t.resultPool.getData().entries.map((p2) => p2.obj).filter(v).filter((p2) => p2.spec.name === "pl7.app/label" && p2.spec.axesSpec.length === 1), r = (p2, l) => {
5200
+ let f = p2.toString();
5201
+ if (l)
5202
+ for (const d in l)
5203
+ f += d, f += l[d];
5204
+ return f;
5040
5205
  }, o = /* @__PURE__ */ new Map();
5041
- for (const c of e)
5042
- for (const d2 of c.spec.axesSpec) {
5043
- const h$1 = h(d2);
5044
- for (const p of r) {
5045
- const b = p.spec.axesSpec[0], m = h(p.spec.axesSpec[0]);
5046
- if (z$1(h$1, m)) {
5047
- const I = Object.keys(h$1.domain ?? {}).length, v = Object.keys(m.domain ?? {}).length;
5048
- if (I > v) {
5049
- const A2 = i(p.id, h$1.domain);
5050
- o.set(A2, {
5051
- id: A2,
5206
+ for (const p$1 of e)
5207
+ for (const l of p$1.spec.axesSpec) {
5208
+ const f = p(l);
5209
+ for (const d of i) {
5210
+ const y = d.spec.axesSpec[0], _ = p(d.spec.axesSpec[0]);
5211
+ if (Q$1(f, _)) {
5212
+ const A = Object.keys(f.domain ?? {}).length, v2 = Object.keys(_.domain ?? {}).length;
5213
+ if (A > v2) {
5214
+ const m2 = r(d.id, f.domain);
5215
+ o.set(m2, {
5216
+ id: m2,
5052
5217
  spec: {
5053
- ...p.spec,
5054
- axesSpec: [{ ...h$1, annotations: b.annotations }]
5218
+ ...d.spec,
5219
+ axesSpec: [{ ...f, annotations: y.annotations }]
5055
5220
  },
5056
- data: p.data
5221
+ data: d.data
5057
5222
  });
5058
5223
  } else
5059
- o.set(i(p.id), p);
5224
+ o.set(r(d.id), d);
5060
5225
  }
5061
5226
  }
5062
5227
  }
5063
5228
  if ([...e, ...o.values()].some(
5064
- (c) => c.data instanceof S && !c.data.getIsReadyOrError()
5229
+ (p2) => p2.data instanceof I && !p2.data.getIsReadyOrError()
5065
5230
  ))
5066
5231
  return;
5067
- let l2 = e;
5068
- const a = [];
5232
+ let u = e;
5233
+ const c2 = [];
5069
5234
  if (s != null && s.coreColumnPredicate) {
5070
- l2 = [];
5071
- for (const c of e)
5072
- s.coreColumnPredicate(c.spec) ? l2.push(c) : a.push(c);
5235
+ u = [];
5236
+ for (const p2 of e)
5237
+ s.coreColumnPredicate(p2.spec) ? u.push(p2) : c2.push(p2);
5073
5238
  }
5074
- return a.push(...o.values()), t.createPTable({
5239
+ return c2.push(...o.values()), t.createPTable({
5075
5240
  src: {
5076
5241
  type: "outer",
5077
5242
  primary: {
5078
5243
  type: (s == null ? void 0 : s.coreJoinType) ?? "full",
5079
- entries: l2.map((c) => ({ type: "column", column: c }))
5244
+ entries: u.map((p2) => ({ type: "column", column: p2 }))
5080
5245
  },
5081
- secondary: a.map((c) => ({ type: "column", column: c }))
5246
+ secondary: c2.map((p2) => ({ type: "column", column: p2 }))
5082
5247
  },
5083
- filters: [...(s == null ? void 0 : s.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
5084
- sorting: ((g2 = n == null ? void 0 : n.pTableParams) == null ? void 0 : g2.sorting) ?? []
5248
+ filters: [...(s == null ? void 0 : s.filters) ?? [], ...((a = n == null ? void 0 : n.pTableParams) == null ? void 0 : a.filters) ?? []],
5249
+ sorting: ((h2 = n == null ? void 0 : n.pTableParams) == null ? void 0 : h2.sorting) ?? []
5085
5250
  });
5086
5251
  }
5087
5252
  function* range(from, to, step = 1) {
@@ -5099,11 +5264,11 @@
5099
5264
  function times(n, cb) {
5100
5265
  return toList(range(0, n)).map(cb);
5101
5266
  }
5102
- const $BlockArgs = z$2.object({
5103
- tableNumRows: z$2.number().default(100),
5104
- numbers: z$2.array(z$2.coerce.number())
5267
+ const $BlockArgs = z.object({
5268
+ tableNumRows: z.number().default(100),
5269
+ numbers: z.array(z.coerce.number())
5105
5270
  });
5106
- const platforma = w.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100 }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
5271
+ const platforma = P.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100 }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
5107
5272
  if (ctx.args.numbers.length === 5) {
5108
5273
  throw new Error("argsValid: test error");
5109
5274
  }
@@ -5115,13 +5280,13 @@
5115
5280
  var _a, _b, _c, _d, _e2;
5116
5281
  if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
5117
5282
  const data = times(ctx.args.tableNumRows ?? 0, (i) => {
5118
- const v = i + 1;
5283
+ const v2 = i + 1;
5119
5284
  return {
5120
- key: [v, v + 0.1],
5121
- val: v.toString()
5285
+ key: [v2, v2 + 0.1],
5286
+ val: v2.toString()
5122
5287
  };
5123
5288
  });
5124
- return Dt(
5289
+ return Vt(
5125
5290
  ctx,
5126
5291
  [
5127
5292
  {