@milaboratories/milaboratories.ui-examples.model 1.1.44 → 1.1.45

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 ve = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
38
+ const _e = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
39
39
  var util;
40
40
  (function(util2) {
41
41
  util2.assertEqual = (val) => val;
@@ -3832,7 +3832,7 @@
3832
3832
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3833
3833
  };
3834
3834
  const NEVER = INVALID;
3835
- var z$1 = /* @__PURE__ */ Object.freeze({
3835
+ var z = /* @__PURE__ */ Object.freeze({
3836
3836
  __proto__: null,
3837
3837
  defaultErrorMap: errorMap,
3838
3838
  setErrorMap,
@@ -3948,13 +3948,13 @@
3948
3948
  quotelessJson,
3949
3949
  ZodError
3950
3950
  });
3951
- var $ = Object.defineProperty;
3952
- var D = (n2, t, e) => t in n2 ? $(n2, t, { enumerable: true, configurable: true, writable: true, value: e }) : n2[t] = e;
3953
- var m$2 = (n2, t, e) => D(n2, typeof t != "symbol" ? t + "" : t, e);
3951
+ var I$1 = Object.defineProperty;
3952
+ var $ = (n2, t, e) => t in n2 ? I$1(n2, t, { enumerable: true, configurable: true, writable: true, value: e }) : n2[t] = e;
3953
+ var m$2 = (n2, t, e) => $(n2, typeof t != "symbol" ? t + "" : t, e);
3954
3954
  function w(n2) {
3955
3955
  throw new Error("Unexpected object: " + n2);
3956
3956
  }
3957
- function pn(n2) {
3957
+ function mn(n2) {
3958
3958
  if (!n2 || typeof n2 != "object")
3959
3959
  return false;
3960
3960
  const t = n2;
@@ -3971,7 +3971,7 @@
3971
3971
  return false;
3972
3972
  }
3973
3973
  }
3974
- function mn(n2, t) {
3974
+ function yn(n2, t) {
3975
3975
  if (n2 !== void 0)
3976
3976
  switch (n2.type) {
3977
3977
  case "Json":
@@ -4016,10 +4016,10 @@
4016
4016
  return false;
4017
4017
  }
4018
4018
  }
4019
- function yn(n2) {
4019
+ function ln(n2) {
4020
4020
  return j(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4021
4021
  }
4022
- function ln(n2) {
4022
+ function hn(n2) {
4023
4023
  switch (n2.type) {
4024
4024
  case "Json": {
4025
4025
  const t = Object.entries(n2.data).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
@@ -4047,7 +4047,7 @@
4047
4047
  }
4048
4048
  }
4049
4049
  }
4050
- function hn(n2) {
4050
+ function gn(n2) {
4051
4051
  switch (n2.type) {
4052
4052
  case "Json": {
4053
4053
  const t = {};
@@ -4081,7 +4081,7 @@
4081
4081
  }
4082
4082
  }
4083
4083
  }
4084
- function Sn(n2) {
4084
+ function Cn$1(n2) {
4085
4085
  return {
4086
4086
  columnId: n2.id,
4087
4087
  spec: n2.spec
@@ -4091,8 +4091,8 @@
4091
4091
  const { type: t, name: e, domain: r } = n2;
4092
4092
  return { type: t, name: e, ...r && { domain: r } };
4093
4093
  }
4094
- function Cn(n2) {
4095
- return ve(p$1(n2));
4094
+ function Jn(n2) {
4095
+ return _e(p$1(n2));
4096
4096
  }
4097
4097
  function X$1(n2, t) {
4098
4098
  if (n2 === void 0) return t === void 0;
@@ -4101,10 +4101,10 @@
4101
4101
  if (n2[e] !== t[e]) return false;
4102
4102
  return true;
4103
4103
  }
4104
- function z(n2, t) {
4104
+ function G(n2, t) {
4105
4105
  return n2.name === t.name && X$1(n2.domain, t.domain);
4106
4106
  }
4107
- function Jn(n2, t) {
4107
+ function On(n2, t) {
4108
4108
  return { ...n2, src: l$1(n2.src, t) };
4109
4109
  }
4110
4110
  function l$1(n2, t) {
@@ -4137,13 +4137,13 @@
4137
4137
  w(n2);
4138
4138
  }
4139
4139
  }
4140
- function G(n2) {
4141
- return ve(n2);
4140
+ function Q(n2) {
4141
+ return _e(n2);
4142
4142
  }
4143
- function A(n2) {
4144
- return ve(p$1(n2));
4143
+ function x(n2) {
4144
+ return _e(p$1(n2));
4145
4145
  }
4146
- function x(n2, t) {
4146
+ function A(n2, t) {
4147
4147
  return JSON.stringify([n2, t]);
4148
4148
  }
4149
4149
  class $n {
@@ -4161,14 +4161,14 @@
4161
4161
  e.sort((r, o) => r[0].localeCompare(o[0]));
4162
4162
  for (const [r, o] of e) {
4163
4163
  for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
4164
- const a = o.axesSpec[s2], i = A(a);
4164
+ const a = o.axesSpec[s2], i = x(a);
4165
4165
  this.axes.set(i, { anchor: r, idx: s2 });
4166
4166
  }
4167
4167
  if (o.domain !== void 0) {
4168
4168
  const s2 = Object.entries(o.domain);
4169
4169
  s2.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s2), r), this.domainPacks.push(s2.map(([a]) => a));
4170
4170
  for (const [a, i] of s2) {
4171
- const u2 = x(a, i);
4171
+ const u2 = A(a, i);
4172
4172
  this.domains.set(u2, r);
4173
4173
  }
4174
4174
  }
@@ -4203,11 +4203,11 @@
4203
4203
  for (const [a, i] of Object.entries(t.domain ?? {})) {
4204
4204
  if (o !== void 0 && o.has(a))
4205
4205
  continue;
4206
- const u2 = x(a, i), c2 = this.domains.get(u2);
4206
+ const u2 = A(a, i), c2 = this.domains.get(u2);
4207
4207
  r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
4208
4208
  }
4209
4209
  if (r.axes = t.axesSpec.map((a) => {
4210
- const i = A(a), u2 = this.axes.get(i);
4210
+ const i = x(a), u2 = this.axes.get(i);
4211
4211
  return u2 === void 0 ? p$1(a) : u2;
4212
4212
  }), !e || e.length === 0)
4213
4213
  return r;
@@ -4237,7 +4237,7 @@
4237
4237
  * @returns A canonicalized string representation of the anchored column identifier
4238
4238
  */
4239
4239
  deriveS(t, e) {
4240
- return G(this.derive(t, e));
4240
+ return Q(this.derive(t, e));
4241
4241
  }
4242
4242
  }
4243
4243
  function Dn(n2, t, e) {
@@ -4267,10 +4267,10 @@
4267
4267
  }
4268
4268
  r.domain = s2;
4269
4269
  }
4270
- return r.axes && (r.axes = r.axes.map((s2) => Q(n2, s2))), r;
4270
+ return r.axes && (r.axes = r.axes.map((s2) => Y$1(n2, s2))), r;
4271
4271
  }
4272
- function Q(n2, t) {
4273
- if (!Y$1(t))
4272
+ function Y$1(n2, t) {
4273
+ if (!Z$1(t))
4274
4274
  return t;
4275
4275
  const e = t.anchor, r = n2[e];
4276
4276
  if (!r)
@@ -4287,7 +4287,7 @@
4287
4287
  throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
4288
4288
  return o[0];
4289
4289
  } else if ("id" in t) {
4290
- const o = r.axesSpec.filter((s2) => z(t.id, p$1(s2)));
4290
+ const o = r.axesSpec.filter((s2) => G(t.id, p$1(s2)));
4291
4291
  if (o.length > 1)
4292
4292
  throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
4293
4293
  if (o.length === 0)
@@ -4296,26 +4296,26 @@
4296
4296
  }
4297
4297
  throw new Error("Unsupported axis reference type");
4298
4298
  }
4299
- function Y$1(n2) {
4299
+ function Z$1(n2) {
4300
4300
  return typeof n2 == "object" && "anchor" in n2;
4301
4301
  }
4302
4302
  function f(n2) {
4303
4303
  return n2.kind === "PColumn";
4304
4304
  }
4305
- function Z$1(n2) {
4305
+ function q(n2) {
4306
4306
  return f(n2.spec);
4307
4307
  }
4308
- function Bn(n2) {
4309
- if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4308
+ function jn(n2) {
4309
+ if (!q(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4310
4310
  return n2;
4311
4311
  }
4312
- function jn(n2, t) {
4312
+ function Fn(n2, t) {
4313
4313
  return n2 === void 0 ? void 0 : {
4314
4314
  ...n2,
4315
4315
  data: t(n2.data)
4316
4316
  };
4317
4317
  }
4318
- function Fn(n2) {
4318
+ function Un(n2) {
4319
4319
  const t = /* @__PURE__ */ new Map(), e = (r) => {
4320
4320
  switch (r.type) {
4321
4321
  case "column":
@@ -4402,24 +4402,24 @@
4402
4402
  }
4403
4403
  return true;
4404
4404
  }
4405
- function Un(n2) {
4405
+ function Kn(n2) {
4406
4406
  return Array.isArray(n2) ? (t) => n2.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n2);
4407
4407
  }
4408
- z$1.object({
4409
- __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4410
- blockId: z$1.string().describe("Upstream block id"),
4411
- name: z$1.string().describe("Name of the output provided to the upstream block's output context")
4408
+ z.object({
4409
+ __isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4410
+ blockId: z.string().describe("Upstream block id"),
4411
+ name: z.string().describe("Name of the output provided to the upstream block's output context")
4412
4412
  }).describe(
4413
4413
  "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."
4414
4414
  ).strict().readonly();
4415
- function Mn(n2) {
4415
+ function Tn(n2) {
4416
4416
  return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4417
4417
  }
4418
- function Hn(n2, t) {
4418
+ function _n(n2, t) {
4419
4419
  return n2.ok ? { ok: true, value: t(n2.value) } : n2;
4420
4420
  }
4421
- const on = 24;
4422
- z$1.string().length(on).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4421
+ const sn = 24;
4422
+ z.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4423
4423
  var stringify = { exports: {} };
4424
4424
  (function(module2, exports3) {
4425
4425
  exports3 = module2.exports = stringify2;
@@ -4444,50 +4444,50 @@
4444
4444
  };
4445
4445
  }
4446
4446
  })(stringify, stringify.exports);
4447
- const l = z$1.object({
4448
- type: z$1.literal("PlError"),
4449
- name: z$1.string(),
4450
- message: z$1.string(),
4447
+ const l = z.object({
4448
+ type: z.literal("PlError"),
4449
+ name: z.string(),
4450
+ message: z.string(),
4451
4451
  /** The message with all details needed for SDK developers. */
4452
- fullMessage: z$1.string().optional(),
4453
- stack: z$1.string().optional()
4452
+ fullMessage: z.string().optional(),
4453
+ stack: z.string().optional()
4454
4454
  }), c = l.extend({
4455
- cause: z$1.lazy(() => s).optional(),
4456
- errors: z$1.lazy(() => s.array()).optional()
4457
- }), m$1 = z$1.object({
4458
- type: z$1.literal("StandardError"),
4459
- name: z$1.string(),
4460
- message: z$1.string(),
4461
- stack: z$1.string().optional()
4455
+ cause: z.lazy(() => s).optional(),
4456
+ errors: z.lazy(() => s.array()).optional()
4457
+ }), m$1 = z.object({
4458
+ type: z.literal("StandardError"),
4459
+ name: z.string(),
4460
+ message: z.string(),
4461
+ stack: z.string().optional()
4462
4462
  }), p = m$1.extend({
4463
- cause: z$1.lazy(() => s).optional(),
4464
- errors: z$1.lazy(() => s.array()).optional()
4465
- }), s = z$1.union([p, c]);
4466
- const u = z$1.object({
4467
- name: z$1.string(),
4468
- message: z$1.string(),
4469
- fullMessage: z$1.string().optional(),
4470
- stack: z$1.string().optional()
4463
+ cause: z.lazy(() => s).optional(),
4464
+ errors: z.lazy(() => s.array()).optional()
4465
+ }), s = z.union([p, c]);
4466
+ const u = z.object({
4467
+ name: z.string(),
4468
+ message: z.string(),
4469
+ fullMessage: z.string().optional(),
4470
+ stack: z.string().optional()
4471
4471
  }), n = u.extend({
4472
- cause: z$1.lazy(() => n).optional(),
4473
- errors: z$1.lazy(() => n.array()).optional()
4472
+ cause: z.lazy(() => n).optional(),
4473
+ errors: z.lazy(() => n.array()).optional()
4474
4474
  });
4475
- var Ne = Object.defineProperty;
4476
- var Ue = (t, e, n2) => e in t ? Ne(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4477
- var L = (t, e, n2) => Ue(t, typeof e != "symbol" ? e + "" : e, n2);
4475
+ var Ue = Object.defineProperty;
4476
+ var Me = (t, e, n2) => e in t ? Ue(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4477
+ var L = (t, e, n2) => Me(t, typeof e != "symbol" ? e + "" : e, n2);
4478
4478
  function Z(t) {
4479
4479
  return { type: "Immediate", value: t };
4480
4480
  }
4481
- function nt() {
4481
+ function it() {
4482
4482
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4483
4483
  }
4484
- function _e(t) {
4484
+ function Te(t) {
4485
4485
  if (t && typeof globalThis.getPlatforma == "function")
4486
4486
  return globalThis.getPlatforma(t);
4487
4487
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4488
4488
  throw new Error("Can't get platforma instance.");
4489
4489
  }
4490
- function rt() {
4490
+ function st() {
4491
4491
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4492
4492
  }
4493
4493
  function m() {
@@ -4495,23 +4495,23 @@
4495
4495
  throw new Error("Not in config rendering context");
4496
4496
  }
4497
4497
  function Y(t, e) {
4498
- const n2 = rt();
4498
+ const n2 = st();
4499
4499
  if (n2 === void 0) return false;
4500
4500
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4501
4501
  return n2.callbackRegistry[t] = e, true;
4502
4502
  }
4503
- const oe = /* @__PURE__ */ new Map();
4504
- function it(t, e) {
4503
+ const ae = /* @__PURE__ */ new Map();
4504
+ function ot(t, e) {
4505
4505
  t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
4506
- for (const r of oe.get(t))
4506
+ for (const r of ae.get(t))
4507
4507
  r(n2);
4508
- }, oe.set(t, [])), oe.get(t).push(e);
4508
+ }, ae.set(t, [])), ae.get(t).push(e);
4509
4509
  }
4510
4510
  class S {
4511
4511
  constructor(e, n2 = (r) => r) {
4512
4512
  L(this, "isResolved", false);
4513
4513
  L(this, "resolvedValue");
4514
- this.handle = e, this.postProcess = n2, it(e, (r) => {
4514
+ this.handle = e, this.postProcess = n2, ot(e, (r) => {
4515
4515
  this.resolvedValue = n2(r), this.isResolved = true;
4516
4516
  });
4517
4517
  }
@@ -4528,7 +4528,7 @@
4528
4528
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4529
4529
  }
4530
4530
  }
4531
- function ce(t, e) {
4531
+ function pe(t, e) {
4532
4532
  return t === void 0 ? void 0 : e(t);
4533
4533
  }
4534
4534
  class I {
@@ -4570,7 +4570,7 @@
4570
4570
  ...this.resolvePath,
4571
4571
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4572
4572
  ];
4573
- return ce(
4573
+ return pe(
4574
4574
  m().resolveWithCommon(this.handle, e, ...n2),
4575
4575
  (i) => new I(i, r)
4576
4576
  );
@@ -4592,7 +4592,7 @@
4592
4592
  }
4593
4593
  getError() {
4594
4594
  const e = [...this.resolvePath, "error"];
4595
- return ce(
4595
+ return pe(
4596
4596
  m().getError(this.handle),
4597
4597
  (n2) => new I(n2, e)
4598
4598
  );
@@ -4634,7 +4634,7 @@
4634
4634
  getPColumns(e = false, n2 = "") {
4635
4635
  const r = this.parsePObjectCollection(e, n2);
4636
4636
  return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
4637
- if (!Z$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4637
+ if (!q(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4638
4638
  return s2;
4639
4639
  });
4640
4640
  }
@@ -4652,7 +4652,7 @@
4652
4652
  const i = {};
4653
4653
  for (const [s2, o] of Object.entries(r)) {
4654
4654
  const a = [...this.resolvePath, s2];
4655
- i[s2] = jn(o, (l2) => new I(l2, a));
4655
+ i[s2] = Fn(o, (l2) => new I(l2, a));
4656
4656
  }
4657
4657
  return i;
4658
4658
  }
@@ -4751,46 +4751,46 @@
4751
4751
  return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, w2]) => o(u2, w2));
4752
4752
  }
4753
4753
  }
4754
- const Le = "staging", Te = "main";
4755
- const at = "pl7.app/label", lt = "pl7.app/trace", ut = z$1.object({
4756
- type: z$1.string(),
4757
- importance: z$1.number().optional(),
4758
- id: z$1.string().optional(),
4759
- label: z$1.string()
4760
- }), ct = z$1.array(ut), pt = 1e-3, dt = "__LABEL__", we = "__LABEL__@1";
4761
- function Fe(t, e, n2 = {}) {
4754
+ const Ee = "staging", Fe = "main";
4755
+ const ut = "pl7.app/label", ct = "pl7.app/trace", pt = z.object({
4756
+ type: z.string(),
4757
+ importance: z.number().optional(),
4758
+ id: z.string().optional(),
4759
+ label: z.string()
4760
+ }), dt = z.array(pt), ft = 1e-3, ht = "__LABEL__", Ae = "__LABEL__@1";
4761
+ function Oe(t, e, n2 = {}) {
4762
4762
  const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((d) => {
4763
- var q, F;
4763
+ var q2, F;
4764
4764
  const h = e(d);
4765
4765
  let f2, x2, c2;
4766
4766
  "spec" in h && typeof h.spec == "object" ? (f2 = h.spec, x2 = h.prefixTrace, c2 = h.suffixTrace) : f2 = h;
4767
- const y = (q = f2.annotations) == null ? void 0 : q[at], g = (F = f2.annotations) == null ? void 0 : F[lt], v = (g ? ct.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
4767
+ const y = (q2 = f2.annotations) == null ? void 0 : q2[ut], g = (F = f2.annotations) == null ? void 0 : F[ct], v = (g ? dt.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
4768
4768
  ...x2 ?? [],
4769
4769
  ...v,
4770
4770
  ...c2 ?? []
4771
4771
  ];
4772
4772
  if (y) {
4773
- const _ = { label: y, type: dt, importance: -2 };
4773
+ const _ = { label: y, type: ht, importance: -2 };
4774
4774
  n2.addLabelAsSuffix ? A2.push(_) : A2.splice(0, 0, _);
4775
4775
  }
4776
- const D2 = [], $2 = /* @__PURE__ */ new Map();
4776
+ const D = [], $2 = /* @__PURE__ */ new Map();
4777
4777
  for (let _ = A2.length - 1; _ >= 0; --_) {
4778
- const { type: R } = A2[_], ie = A2[_].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4778
+ const { type: R } = A2[_], se = A2[_].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4779
4779
  $2.set(R, J);
4780
4780
  const P = `${R}@${J}`;
4781
4781
  i.set(P, (i.get(P) ?? 0) + 1), r.set(
4782
4782
  P,
4783
4783
  Math.max(
4784
4784
  r.get(P) ?? Number.NEGATIVE_INFINITY,
4785
- ie - (A2.length - _) * pt
4785
+ se - (A2.length - _) * ft
4786
4786
  )
4787
- ), D2.push({ ...A2[_], fullType: P, occurenceIndex: J });
4787
+ ), D.push({ ...A2[_], fullType: P, occurenceIndex: J });
4788
4788
  }
4789
- return D2.reverse(), {
4789
+ return D.reverse(), {
4790
4790
  value: d,
4791
4791
  spec: f2,
4792
4792
  label: y,
4793
- fullTrace: D2
4793
+ fullTrace: D
4794
4794
  };
4795
4795
  }), o = [], a = [], l2 = [...r];
4796
4796
  l2.sort(([, d], [, h]) => h - d);
@@ -4812,14 +4812,14 @@
4812
4812
  };
4813
4813
  if (o.length === 0) {
4814
4814
  if (a.length !== 0) throw new Error("Assertion error.");
4815
- const d = u2(new Set(we));
4815
+ const d = u2(new Set(Ae));
4816
4816
  if (d === void 0) throw new Error("Assertion error.");
4817
4817
  return d;
4818
4818
  }
4819
4819
  let w2 = 0, b = 0;
4820
4820
  for (; w2 < o.length; ) {
4821
4821
  const d = /* @__PURE__ */ new Set();
4822
- n2.includeNativeLabel && d.add(we);
4822
+ n2.includeNativeLabel && d.add(Ae);
4823
4823
  for (let f2 = 0; f2 < w2; ++f2) d.add(o[f2]);
4824
4824
  d.add(o[b]);
4825
4825
  const h = u2(d);
@@ -4830,52 +4830,52 @@
4830
4830
  if (p2 === void 0) throw new Error("Assertion error.");
4831
4831
  return p2;
4832
4832
  }
4833
- const H = "PColumnData/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", K = H + "BinaryPartitioned", De = H + "Partitioned/", re = De + "JsonPartitioned", B = De + "BinaryPartitioned";
4834
- const de = (t) => {
4833
+ const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", B = H + "JsonPartitioned", K = H + "BinaryPartitioned", Re = H + "Partitioned/", ie = Re + "JsonPartitioned", U = Re + "BinaryPartitioned";
4834
+ const fe = (t) => {
4835
4835
  if (t.endsWith(".index"))
4836
4836
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
4837
4837
  if (t.endsWith(".values"))
4838
4838
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4839
4839
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4840
4840
  };
4841
- function ft(t) {
4841
+ function gt(t) {
4842
4842
  if (!t) return;
4843
4843
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4844
4844
  let i = 0;
4845
4845
  switch (e) {
4846
- case te:
4846
+ case ne:
4847
4847
  i = n2.keyLength;
4848
4848
  break;
4849
- case ne:
4849
+ case re:
4850
4850
  i = n2.partitionKeyLength + n2.keyLength;
4851
4851
  break;
4852
- case U:
4852
+ case B:
4853
4853
  case K:
4854
4854
  i = n2.partitionKeyLength;
4855
4855
  break;
4856
- case B:
4857
- case re:
4856
+ case U:
4857
+ case ie:
4858
4858
  i = n2.superPartitionKeyLength + n2.partitionKeyLength;
4859
4859
  break;
4860
4860
  }
4861
4861
  switch (e) {
4862
- case te:
4863
- case U:
4862
+ case ne:
4863
+ case B:
4864
4864
  case K:
4865
4865
  for (let s2 of t.listInputFields()) {
4866
- e === K && (s2 = de(s2).baseKey);
4866
+ e === K && (s2 = fe(s2).baseKey);
4867
4867
  const o = [...JSON.parse(s2)];
4868
4868
  r.push(o);
4869
4869
  }
4870
4870
  break;
4871
- case ne:
4872
- case B:
4873
4871
  case re:
4872
+ case U:
4873
+ case ie:
4874
4874
  for (const s2 of t.listInputFields()) {
4875
4875
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4876
4876
  if (a !== void 0)
4877
4877
  for (let l2 of a.listInputFields()) {
4878
- e === B && (l2 = de(l2).baseKey);
4878
+ e === U && (l2 = fe(l2).baseKey);
4879
4879
  const u2 = [...o, ...JSON.parse(l2)];
4880
4880
  r.push(u2);
4881
4881
  }
@@ -4884,7 +4884,7 @@
4884
4884
  }
4885
4885
  return { data: r, keyLength: i };
4886
4886
  }
4887
- function ht(t) {
4887
+ function mt(t) {
4888
4888
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4889
4889
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4890
4890
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4903,11 +4903,11 @@
4903
4903
  }
4904
4904
  return r.map((i) => Array.from(i.values()));
4905
4905
  }
4906
- function gt(t) {
4906
+ function yt(t) {
4907
4907
  if (t === void 0) return;
4908
4908
  if (j(t))
4909
- return ht(t);
4910
- const e = ft(t);
4909
+ return mt(t);
4910
+ const e = gt(t);
4911
4911
  if (!e) return;
4912
4912
  const { data: n2, keyLength: r } = e, i = [];
4913
4913
  for (let s2 = 0; s2 < r; ++s2)
@@ -4920,16 +4920,16 @@
4920
4920
  }
4921
4921
  return i.map((s2) => Array.from(s2.values()));
4922
4922
  }
4923
- function fe(t, e = []) {
4923
+ function he(t, e = []) {
4924
4924
  if (t === void 0 || !t.getIsReadyOrError()) return;
4925
4925
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4926
- if (e.length > 0 && (n2 === re || n2 === B))
4926
+ if (e.length > 0 && (n2 === ie || n2 === U))
4927
4927
  throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
4928
4928
  switch (n2) {
4929
- case te:
4930
4929
  case ne:
4930
+ case re:
4931
4931
  throw new Error(`Only data columns are supported, got: ${n2}`);
4932
- case U: {
4932
+ case B: {
4933
4933
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4934
4934
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4935
4935
  const i = [];
@@ -4950,7 +4950,7 @@
4950
4950
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4951
4951
  const i = [], s2 = /* @__PURE__ */ new Map();
4952
4952
  for (const o of t.listInputFields()) {
4953
- const a = de(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4953
+ const a = fe(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4954
4954
  if (l2 === void 0) return;
4955
4955
  let u2 = s2.get(a.baseKey);
4956
4956
  u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
@@ -4972,16 +4972,16 @@
4972
4972
  parts: i
4973
4973
  };
4974
4974
  }
4975
- case re: {
4975
+ case ie: {
4976
4976
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4977
4977
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
4978
4978
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
4979
4979
  for (const o of t.listInputFields()) {
4980
4980
  const a = t.resolve({ field: o, assertFieldType: "Input" });
4981
4981
  if (a === void 0) return;
4982
- if (a.resourceType.name !== U)
4983
- throw new Error(`Expected ${U} inside ${n2}, but got ${a.resourceType.name}`);
4984
- const l2 = fe(a, JSON.parse(o));
4982
+ if (a.resourceType.name !== B)
4983
+ throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
4984
+ const l2 = he(a, JSON.parse(o));
4985
4985
  if (l2 === void 0) return;
4986
4986
  if (l2.type !== "JsonPartitioned")
4987
4987
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -4993,7 +4993,7 @@
4993
4993
  parts: s2
4994
4994
  };
4995
4995
  }
4996
- case B: {
4996
+ case U: {
4997
4997
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4998
4998
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
4999
4999
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
@@ -5002,7 +5002,7 @@
5002
5002
  if (a === void 0) return;
5003
5003
  if (a.resourceType.name !== K)
5004
5004
  throw new Error(`Expected ${K} inside ${n2}, but got ${a.resourceType.name}`);
5005
- const l2 = fe(a, JSON.parse(o));
5005
+ const l2 = he(a, JSON.parse(o));
5006
5006
  if (l2 === void 0) return;
5007
5007
  if (l2.type !== "BinaryPartitioned")
5008
5008
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5018,15 +5018,15 @@
5018
5018
  throw new Error(`Unknown resource type: ${n2}`);
5019
5019
  }
5020
5020
  }
5021
- function mt(t) {
5021
+ function vt(t) {
5022
5022
  if (t !== void 0) {
5023
5023
  if (j(t)) return t;
5024
- if (pn(t)) return ln(t);
5025
- if (t instanceof I) return fe(t);
5024
+ if (mn(t)) return hn(t);
5025
+ if (t instanceof I) return he(t);
5026
5026
  throw new Error(`Unexpected input type: ${typeof t}`);
5027
5027
  }
5028
5028
  }
5029
- function yt(t, e) {
5029
+ function bt(t, e) {
5030
5030
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5031
5031
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5032
5032
  const { partitionKeyLength: s2 } = t;
@@ -5086,39 +5086,39 @@
5086
5086
  }
5087
5087
  }
5088
5088
  }
5089
- class vt {
5089
+ class wt {
5090
5090
  constructor(e) {
5091
5091
  this.columns = e;
5092
5092
  }
5093
5093
  selectColumns(e) {
5094
- const n2 = typeof e == "function" ? e : Un(e);
5094
+ const n2 = typeof e == "function" ? e : Kn(e);
5095
5095
  return this.columns.filter((r) => n2(r.spec));
5096
5096
  }
5097
5097
  }
5098
- function bt(t) {
5098
+ function At(t) {
5099
5099
  if (t)
5100
5100
  return t.map((e) => ({
5101
- type: `split:${Cn(e.axisId)}`,
5101
+ type: `split:${Jn(e.axisId)}`,
5102
5102
  label: e.label,
5103
5103
  importance: 1e6
5104
5104
  // High importance for split filters in labels
5105
5105
  }));
5106
5106
  }
5107
- function wt(t) {
5107
+ function Pt(t) {
5108
5108
  if (t)
5109
5109
  return t.map((e) => [e.axisIdx, e.value]);
5110
5110
  }
5111
- function At(t, e) {
5111
+ function xt(t, e) {
5112
5112
  if (!e || e.length === 0) return t;
5113
5113
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5114
- return ve({ id: t, axisFilters: n2 });
5114
+ return _e({ id: t, axisFilters: n2 });
5115
5115
  }
5116
- function Pt(t) {
5116
+ function Ct(t) {
5117
5117
  if (!t || typeof t != "object") return false;
5118
5118
  const e = t, n2 = 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);
5119
5119
  return !!e.domainAnchor || n2 || r;
5120
5120
  }
5121
- function xt(t) {
5121
+ function St(t) {
5122
5122
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5123
5123
  return [];
5124
5124
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5126,10 +5126,10 @@
5126
5126
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
5127
5127
  return e.sort((n2, r) => n2 - r), e;
5128
5128
  }
5129
- class he {
5129
+ class ge {
5130
5130
  constructor() {
5131
5131
  L(this, "defaultProviderStore", []);
5132
- L(this, "providers", [new vt(this.defaultProviderStore)]);
5132
+ L(this, "providers", [new wt(this.defaultProviderStore)]);
5133
5133
  L(this, "axisLabelProviders", []);
5134
5134
  }
5135
5135
  addColumnProvider(e) {
@@ -5157,7 +5157,7 @@
5157
5157
  ...i ?? {}
5158
5158
  }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
5159
5159
  for (const p2 of l2) {
5160
- const d = Pt(p2);
5160
+ const d = Ct(p2);
5161
5161
  let h;
5162
5162
  if (d) {
5163
5163
  if (!r)
@@ -5174,31 +5174,31 @@
5174
5174
  }
5175
5175
  }
5176
5176
  if (x2.length === 0) continue;
5177
- const c2 = xt(p2), y = c2.length > 0;
5177
+ const c2 = St(p2), y = c2.length > 0;
5178
5178
  for (const g of x2) {
5179
5179
  if (!f(g.spec)) continue;
5180
5180
  const v = g.spec;
5181
5181
  if (y) {
5182
- const A2 = mt(g.data);
5182
+ const A2 = vt(g.data);
5183
5183
  if (!A2) {
5184
5184
  if (s2) continue;
5185
5185
  return;
5186
5186
  }
5187
- if (!yn(A2))
5187
+ if (!ln(A2))
5188
5188
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${g.id}`);
5189
- const D2 = gt(A2), $2 = c2[c2.length - 1];
5189
+ const D = yt(A2), $2 = c2[c2.length - 1];
5190
5190
  if ($2 >= A2.partitionKeyLength)
5191
5191
  throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${v.name}`);
5192
- const q = c2.map((P) => this.findLabels(p$1(v.axesSpec[P]))), F = [], _ = (P, N2) => {
5192
+ const q2 = c2.map((P) => this.findLabels(p$1(v.axesSpec[P]))), F = [], _ = (P, N2) => {
5193
5193
  if (N2 >= c2.length) {
5194
5194
  if (F.push([...P]), F.length > 1e4)
5195
5195
  throw new Error("Too many key combinations, aborting.");
5196
5196
  return;
5197
5197
  }
5198
5198
  const O = c2[N2];
5199
- if (O >= D2.length)
5200
- throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D2.length}) during split key generation for column ${g.id}`);
5201
- const k2 = D2[O];
5199
+ if (O >= D.length)
5200
+ throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D.length}) during split key generation for column ${g.id}`);
5201
+ const k2 = D[O];
5202
5202
  if (!k2 || k2.length === 0) {
5203
5203
  F.length = 0;
5204
5204
  return;
@@ -5208,14 +5208,14 @@
5208
5208
  };
5209
5209
  if (_([], 0), F.length === 0)
5210
5210
  continue;
5211
- const R = [...v.axesSpec], ie = c2.map((P) => P);
5211
+ const R = [...v.axesSpec], se = c2.map((P) => P);
5212
5212
  for (let P = c2.length - 1; P >= 0; P--)
5213
5213
  R.splice(c2[P], 1);
5214
5214
  const J = { ...v, axesSpec: R };
5215
5215
  for (const P of F) {
5216
5216
  const N2 = P.map((O, k2) => {
5217
- const z2 = ie[k2], $e = p$1(v.axesSpec[z2]), se = q[k2], Je = (se == null ? void 0 : se[O]) ?? String(O);
5218
- return { axisIdx: z2, axisId: $e, value: O, label: Je };
5217
+ const z2 = se[k2], Ne = p$1(v.axesSpec[z2]), oe = q2[k2], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
5218
+ return { axisIdx: z2, axisId: Ne, value: O, label: Be };
5219
5219
  });
5220
5220
  u2.push({
5221
5221
  type: "split",
@@ -5236,18 +5236,18 @@
5236
5236
  }
5237
5237
  }
5238
5238
  if (u2.length === 0) return [];
5239
- const w2 = Fe(
5239
+ const w2 = Oe(
5240
5240
  u2,
5241
5241
  (p2) => ({
5242
5242
  spec: p2.spec,
5243
- suffixTrace: p2.type === "split" ? bt(p2.axisFilters) : void 0
5243
+ suffixTrace: p2.type === "split" ? At(p2.axisFilters) : void 0
5244
5244
  }),
5245
5245
  a
5246
5246
  ), b = [];
5247
5247
  for (const { value: p2, label: d } of w2) {
5248
- const { originalColumn: h, spec: f2 } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, c2 = wt(x2);
5248
+ const { originalColumn: h, spec: f2 } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, c2 = Pt(x2);
5249
5249
  let y;
5250
- r ? y = r.deriveS(f2, c2) : y = At(h.id, c2);
5250
+ r ? y = r.deriveS(f2, c2) : y = xt(h.id, c2);
5251
5251
  let g = { ...p2.adjustedSpec };
5252
5252
  o && (g = {
5253
5253
  ...g,
@@ -5258,7 +5258,7 @@
5258
5258
  }), b.push({
5259
5259
  id: y,
5260
5260
  spec: g,
5261
- data: () => p2.type === "split" ? hn(yt(p2.dataEntries, c2)) : p2.originalColumn.data,
5261
+ data: () => p2.type === "split" ? gn(bt(p2.dataEntries, c2)) : p2.originalColumn.data,
5262
5262
  label: d
5263
5263
  });
5264
5264
  }
@@ -5287,17 +5287,17 @@
5287
5287
  return i;
5288
5288
  }
5289
5289
  }
5290
- function ae(t, e) {
5290
+ function le(t, e) {
5291
5291
  if (t === void 0) return e === void 0;
5292
5292
  if (e === void 0) return true;
5293
5293
  for (const n2 in e)
5294
5294
  if (t[n2] !== e[n2]) return false;
5295
5295
  return true;
5296
5296
  }
5297
- function Ae(t) {
5298
- return jn(t, (e) => e instanceof I ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5297
+ function Pe(t) {
5298
+ return Fn(t, (e) => e instanceof I ? e.handle : mn(e) ? yn(e, (n2) => n2.handle) : e);
5299
5299
  }
5300
- class Ct {
5300
+ class It {
5301
5301
  constructor() {
5302
5302
  L(this, "ctx", m());
5303
5303
  }
@@ -5308,8 +5308,8 @@
5308
5308
  return this.ctx.calculateOptions(e);
5309
5309
  }
5310
5310
  getOptions(e, n2) {
5311
- const r = typeof e == "function" ? e : Un(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5312
- return typeof n2 == "object" || typeof n2 > "u" ? Fe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5311
+ const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5312
+ return typeof n2 == "object" || typeof n2 > "u" ? Oe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5313
5313
  ref: s2,
5314
5314
  label: o
5315
5315
  })) : i.map((s2) => ({
@@ -5321,7 +5321,7 @@
5321
5321
  if (e instanceof $n) return e;
5322
5322
  const n2 = {};
5323
5323
  for (const [r, i] of Object.entries(e))
5324
- if (Mn(i)) {
5324
+ if (Tn(i)) {
5325
5325
  const s2 = this.getPColumnSpecByRef(i);
5326
5326
  if (!s2)
5327
5327
  return;
@@ -5341,7 +5341,7 @@
5341
5341
  getAnchoredPColumns(e, n2, r) {
5342
5342
  const i = this.resolveAnchorCtx(e);
5343
5343
  if (i)
5344
- return new he().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5344
+ return new ge().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5345
5345
  ...r,
5346
5346
  anchorCtx: i
5347
5347
  });
@@ -5378,7 +5378,7 @@
5378
5378
  getCanonicalOptions(e, n2, r) {
5379
5379
  const i = this.resolveAnchorCtx(e);
5380
5380
  if (!i) return;
5381
- const s2 = new he().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5381
+ const s2 = new ge().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5382
5382
  ...r,
5383
5383
  anchorCtx: i
5384
5384
  });
@@ -5421,7 +5421,7 @@
5421
5421
  ref: n2.ref,
5422
5422
  obj: {
5423
5423
  ...n2.obj,
5424
- data: Hn(
5424
+ data: _n(
5425
5425
  n2.obj.data,
5426
5426
  (r) => new I(r, [n2.ref.blockId, n2.ref.name])
5427
5427
  )
@@ -5450,7 +5450,7 @@
5450
5450
  )) == null ? void 0 : r.obj;
5451
5451
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5452
5452
  if (n2)
5453
- return jn(
5453
+ return Fn(
5454
5454
  n2,
5455
5455
  (i) => new I(i, [e.blockId, e.name])
5456
5456
  );
@@ -5463,7 +5463,7 @@
5463
5463
  getPColumnByRef(e) {
5464
5464
  const n2 = this.getDataByRef(e);
5465
5465
  if (n2)
5466
- return Bn(n2);
5466
+ return jn(n2);
5467
5467
  }
5468
5468
  /**
5469
5469
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5495,10 +5495,10 @@
5495
5495
  if (!f(r.obj.spec))
5496
5496
  continue;
5497
5497
  const i = r.obj.spec;
5498
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ae(e.domain, i.domain)) {
5498
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
5499
5499
  for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5500
5500
  const o = e.axesSpec[s2], a = i.axesSpec[s2];
5501
- if (o.name !== a.name || o.type !== a.type || !ae(o.domain, a.domain))
5501
+ if (o.name !== a.name || o.type !== a.type || !le(o.domain, a.domain))
5502
5502
  continue e;
5503
5503
  }
5504
5504
  n2.push(r.obj);
@@ -5513,9 +5513,9 @@
5513
5513
  findLabels(e) {
5514
5514
  const n2 = this.getData();
5515
5515
  for (const r of n2.entries) {
5516
- if (!Z$1(r.obj)) continue;
5516
+ if (!q(r.obj)) continue;
5517
5517
  const i = r.obj.spec;
5518
- if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ae(e.domain, i.axesSpec[0].domain)) {
5518
+ 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)) {
5519
5519
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5520
5520
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5521
5521
  return Object.fromEntries(
@@ -5534,13 +5534,13 @@
5534
5534
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5535
5535
  */
5536
5536
  selectColumns(e) {
5537
- const n2 = typeof e == "function" ? e : Un(e);
5537
+ const n2 = typeof e == "function" ? e : Kn(e);
5538
5538
  return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5539
5539
  const o = s2;
5540
5540
  let a = null;
5541
5541
  const l2 = this;
5542
5542
  return {
5543
- id: ve(i),
5543
+ id: _e(i),
5544
5544
  spec: o,
5545
5545
  get data() {
5546
5546
  var u2;
@@ -5571,7 +5571,7 @@
5571
5571
  L(this, "args");
5572
5572
  L(this, "uiState");
5573
5573
  L(this, "_activeArgsCache");
5574
- L(this, "resultPool", new Ct());
5574
+ L(this, "resultPool", new It());
5575
5575
  this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5576
5576
  }
5577
5577
  /**
@@ -5588,16 +5588,16 @@
5588
5588
  // return this.ctx.featureFlags;
5589
5589
  // }
5590
5590
  getNamedAccessor(e) {
5591
- return ce(
5591
+ return pe(
5592
5592
  this.ctx.getAccessorHandleByName(e),
5593
5593
  (n2) => new I(n2, [e])
5594
5594
  );
5595
5595
  }
5596
5596
  get prerun() {
5597
- return this.getNamedAccessor(Le);
5597
+ return this.getNamedAccessor(Ee);
5598
5598
  }
5599
5599
  get outputs() {
5600
- return this.getNamedAccessor(Te);
5600
+ return this.getNamedAccessor(Fe);
5601
5601
  }
5602
5602
  /**
5603
5603
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5609,13 +5609,13 @@
5609
5609
  }
5610
5610
  verifyInlineAndExplicitColumnsSupport(e) {
5611
5611
  var i;
5612
- const n2 = e.some((s2) => !(s2.data instanceof I) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5612
+ const n2 = e.some((s2) => !(s2.data instanceof I) || mn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5613
5613
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5614
5614
  }
5615
5615
  // TODO remove all non-PColumn fields
5616
5616
  createPFrame(e) {
5617
5617
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5618
- e.map((n2) => Ae(n2))
5618
+ e.map((n2) => Pe(n2))
5619
5619
  );
5620
5620
  }
5621
5621
  createPTable(e) {
@@ -5627,8 +5627,8 @@
5627
5627
  },
5628
5628
  filters: e.filters ?? [],
5629
5629
  sorting: e.sorting ?? []
5630
- } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Fn(n2.src)), this.ctx.createPTable(
5631
- Jn(n2, (r) => Ae(r))
5630
+ } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
5631
+ On(n2, (r) => Pe(r))
5632
5632
  );
5633
5633
  }
5634
5634
  /** @deprecated scheduled for removal from SDK */
@@ -5640,13 +5640,13 @@
5640
5640
  return this.ctx.getCurrentUnstableMarker();
5641
5641
  }
5642
5642
  }
5643
- const M = "1.29.12";
5644
- function St(t) {
5643
+ const M = "1.29.13";
5644
+ function _t(t) {
5645
5645
  return t.__renderLambda === true;
5646
5646
  }
5647
- function le(t) {
5647
+ function ue(t) {
5648
5648
  if (t !== void 0)
5649
- return St(t) ? t.handle : t;
5649
+ return _t(t) ? t.handle : t;
5650
5650
  }
5651
5651
  class T {
5652
5652
  constructor(e, n2, r, i, s2, o, a) {
@@ -5812,23 +5812,23 @@
5812
5812
  sdkVersion: M,
5813
5813
  renderingMode: this._renderingMode,
5814
5814
  initialArgs: this._initialArgs,
5815
- inputsValid: le(this._inputsValid),
5816
- sections: le(this._sections),
5815
+ inputsValid: ue(this._inputsValid),
5816
+ sections: ue(this._sections),
5817
5817
  outputs: Object.fromEntries(
5818
- Object.entries(this._outputs).map(([n2, r]) => [n2, le(r)])
5818
+ Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
5819
5819
  )
5820
5820
  };
5821
- return nt() ? _e({ sdkVersion: M }) : { config: e };
5821
+ return it() ? Te({ sdkVersion: M }) : { config: e };
5822
5822
  }
5823
5823
  }
5824
- function Re(t) {
5825
- return new he().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5824
+ function je(t) {
5825
+ return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5826
5826
  name: "pl7.app/label",
5827
5827
  axes: [{}]
5828
5828
  // exactly one axis
5829
5829
  }, { dontWaitAllData: true });
5830
5830
  }
5831
- function ke(t, e) {
5831
+ function Ve(t, e) {
5832
5832
  const n2 = (i, s2) => {
5833
5833
  let o = i.toString();
5834
5834
  if (s2)
@@ -5841,7 +5841,7 @@
5841
5841
  const o = p$1(s2);
5842
5842
  for (const a of e) {
5843
5843
  const l2 = a.spec.axesSpec[0], u2 = p$1(a.spec.axesSpec[0]);
5844
- if (z(o, u2)) {
5844
+ if (G(o, u2)) {
5845
5845
  const w2 = Object.keys(o.domain ?? {}).length, b = Object.keys(u2.domain ?? {}).length;
5846
5846
  if (w2 > b) {
5847
5847
  const p2 = n2(a.id, o.domain);
@@ -5860,7 +5860,7 @@
5860
5860
  }
5861
5861
  return [...r.values()];
5862
5862
  }
5863
- function je(t) {
5863
+ function Ke(t) {
5864
5864
  const e = (i) => Array.isArray(i), n2 = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
5865
5865
  return t.map((i) => i.data).every((i) => {
5866
5866
  if (e(i))
@@ -5880,7 +5880,7 @@
5880
5880
  throw Error(`unsupported column data type: ${i}`);
5881
5881
  });
5882
5882
  }
5883
- function Ve(t, e, n2, r, i, s2) {
5883
+ function $e(t, e, n2, r, i, s2) {
5884
5884
  let o = t;
5885
5885
  const a = [];
5886
5886
  if (s2) {
@@ -5901,18 +5901,18 @@
5901
5901
  sorting: i
5902
5902
  };
5903
5903
  }
5904
- function Pn(t, e, n2, r) {
5904
+ function Cn(t, e, n2, r) {
5905
5905
  var u2, w2;
5906
5906
  Array.isArray(r) && (r = { filters: r });
5907
- const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((w2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : w2.sorting) ?? [], a = Re(t.resultPool);
5907
+ const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((w2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : w2.sorting) ?? [], a = je(t.resultPool);
5908
5908
  if (!a) return;
5909
- const l2 = ke(e.map(Sn), a);
5910
- if (je([...e, ...l2]))
5909
+ const l2 = Ve(e.map(Cn$1), a);
5910
+ if (Ke([...e, ...l2]))
5911
5911
  return t.createPTable(
5912
- Ve(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5912
+ $e(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5913
5913
  );
5914
5914
  }
5915
- const ImportFileHandleSchema = z$1.string().optional().refine(
5915
+ const ImportFileHandleSchema = z.string().optional().refine(
5916
5916
  (_a) => true
5917
5917
  );
5918
5918
  function* range(from, to, step = 1) {
@@ -5930,10 +5930,10 @@
5930
5930
  function times(n2, cb) {
5931
5931
  return toList(range(0, n2)).map(cb);
5932
5932
  }
5933
- const $BlockArgs = z$1.object({
5934
- tableNumRows: z$1.number().default(100),
5935
- numbers: z$1.array(z$1.coerce.number()),
5936
- handles: z$1.array(ImportFileHandleSchema)
5933
+ const $BlockArgs = z.object({
5934
+ tableNumRows: z.number().default(100),
5935
+ numbers: z.array(z.coerce.number()),
5936
+ handles: z.array(ImportFileHandleSchema)
5937
5937
  });
5938
5938
  const platforma = T.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
5939
5939
  if (ctx.args.numbers.length === 5) {
@@ -5958,7 +5958,7 @@
5958
5958
  val: v.toString()
5959
5959
  };
5960
5960
  });
5961
- return Pn(
5961
+ return Cn(
5962
5962
  ctx,
5963
5963
  [
5964
5964
  {