@milaboratories/milaboratories.ui-examples.model 1.1.65 → 1.1.67

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
@@ -2,40 +2,6 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.model = {}));
3
3
  })(this, function(exports2) {
4
4
  "use strict";
5
- function getDefaultExportFromCjs(x2) {
6
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
7
- }
8
- var canonicalize = function serialize(object) {
9
- if (typeof object === "number" && isNaN(object)) {
10
- throw new Error("NaN is not allowed");
11
- }
12
- if (typeof object === "number" && !isFinite(object)) {
13
- throw new Error("Infinity is not allowed");
14
- }
15
- if (object === null || typeof object !== "object") {
16
- return JSON.stringify(object);
17
- }
18
- if (object.toJSON instanceof Function) {
19
- return serialize(object.toJSON());
20
- }
21
- if (Array.isArray(object)) {
22
- const values2 = object.reduce((t, cv, ci) => {
23
- const comma = ci === 0 ? "" : ",";
24
- const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
25
- return `${t}${comma}${serialize(value)}`;
26
- }, "");
27
- return `[${values2}]`;
28
- }
29
- const values = Object.keys(object).sort().reduce((t, cv) => {
30
- if (object[cv] === void 0 || typeof object[cv] === "symbol") {
31
- return t;
32
- }
33
- const comma = t.length === 0 ? "" : ",";
34
- return `${t}${comma}${serialize(cv)}:${serialize(object[cv])}`;
35
- }, "");
36
- return `{${values}}`;
37
- };
38
- const ke = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
39
5
  var util;
40
6
  (function(util2) {
41
7
  util2.assertEqual = (val) => val;
@@ -87,7 +53,7 @@
87
53
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
88
54
  }
89
55
  util2.joinValues = joinValues;
90
- util2.jsonStringifyReplacer = (_, value) => {
56
+ util2.jsonStringifyReplacer = (_2, value) => {
91
57
  if (typeof value === "bigint") {
92
58
  return value.toString();
93
59
  }
@@ -493,11 +459,11 @@
493
459
  const isValid = (x2) => x2.status === "valid";
494
460
  const isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
495
461
  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");
462
+ if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
497
463
  return state.get(receiver);
498
464
  }
499
465
  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");
466
+ if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
501
467
  return state.set(receiver, value), value;
502
468
  }
503
469
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
@@ -3948,13 +3914,61 @@
3948
3914
  quotelessJson,
3949
3915
  ZodError
3950
3916
  });
3951
- var I$1 = Object.defineProperty;
3952
- var D = (n2, e, t) => e in n2 ? I$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
3917
+ function getDefaultExportFromCjs(x2) {
3918
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
3919
+ }
3920
+ var canonicalize;
3921
+ var hasRequiredCanonicalize;
3922
+ function requireCanonicalize() {
3923
+ if (hasRequiredCanonicalize) return canonicalize;
3924
+ hasRequiredCanonicalize = 1;
3925
+ canonicalize = function serialize(object) {
3926
+ if (typeof object === "number" && isNaN(object)) {
3927
+ throw new Error("NaN is not allowed");
3928
+ }
3929
+ if (typeof object === "number" && !isFinite(object)) {
3930
+ throw new Error("Infinity is not allowed");
3931
+ }
3932
+ if (object === null || typeof object !== "object") {
3933
+ return JSON.stringify(object);
3934
+ }
3935
+ if (object.toJSON instanceof Function) {
3936
+ return serialize(object.toJSON());
3937
+ }
3938
+ if (Array.isArray(object)) {
3939
+ const values2 = object.reduce((t, cv, ci) => {
3940
+ const comma = ci === 0 ? "" : ",";
3941
+ const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
3942
+ return `${t}${comma}${serialize(value)}`;
3943
+ }, "");
3944
+ return `[${values2}]`;
3945
+ }
3946
+ const values = Object.keys(object).sort().reduce((t, cv) => {
3947
+ if (object[cv] === void 0 || typeof object[cv] === "symbol") {
3948
+ return t;
3949
+ }
3950
+ const comma = t.length === 0 ? "" : ",";
3951
+ return `${t}${comma}${serialize(cv)}:${serialize(object[cv])}`;
3952
+ }, "");
3953
+ return `{${values}}`;
3954
+ };
3955
+ return canonicalize;
3956
+ }
3957
+ var canonicalizeExports = requireCanonicalize();
3958
+ const Oe = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
3959
+ var I = Object.defineProperty;
3960
+ var D = (n2, e, t) => e in n2 ? I(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
3953
3961
  var l$1 = (n2, e, t) => D(n2, typeof e != "symbol" ? e + "" : e, t);
3962
+ z$2.object({
3963
+ /** Included left border. */
3964
+ from: z$2.number(),
3965
+ /** Excluded right border. */
3966
+ to: z$2.number()
3967
+ });
3954
3968
  function w(n2) {
3955
3969
  throw new Error("Unexpected object: " + n2);
3956
3970
  }
3957
- function yn(n2) {
3971
+ function hn(n2) {
3958
3972
  if (!n2 || typeof n2 != "object")
3959
3973
  return false;
3960
3974
  const e = n2;
@@ -3971,7 +3985,7 @@
3971
3985
  return false;
3972
3986
  }
3973
3987
  }
3974
- function hn(n2, e) {
3988
+ function gn(n2, e) {
3975
3989
  if (n2 !== void 0)
3976
3990
  switch (n2.type) {
3977
3991
  case "Json":
@@ -3999,7 +4013,7 @@
3999
4013
  }
4000
4014
  }
4001
4015
  }
4002
- function F$1(n2) {
4016
+ function F(n2) {
4003
4017
  if (!n2 || typeof n2 != "object")
4004
4018
  return false;
4005
4019
  const e = n2;
@@ -4016,10 +4030,10 @@
4016
4030
  return false;
4017
4031
  }
4018
4032
  }
4019
- function gn(n2) {
4020
- return F$1(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4021
- }
4022
4033
  function bn(n2) {
4034
+ return F(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4035
+ }
4036
+ function wn(n2) {
4023
4037
  switch (n2.type) {
4024
4038
  case "Json": {
4025
4039
  const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
@@ -4047,7 +4061,7 @@
4047
4061
  }
4048
4062
  }
4049
4063
  }
4050
- function wn(n2) {
4064
+ function Pn(n2) {
4051
4065
  switch (n2.type) {
4052
4066
  case "Json": {
4053
4067
  const e = {};
@@ -4081,7 +4095,7 @@
4081
4095
  }
4082
4096
  }
4083
4097
  }
4084
- function On(n2) {
4098
+ function $n(n2) {
4085
4099
  return {
4086
4100
  columnId: n2.id,
4087
4101
  spec: n2.spec
@@ -4094,8 +4108,8 @@
4094
4108
  function C(n2) {
4095
4109
  return n2.map(p$1);
4096
4110
  }
4097
- function $n(n2) {
4098
- return ke(p$1(n2));
4111
+ function In(n2) {
4112
+ return Oe(p$1(n2));
4099
4113
  }
4100
4114
  function z$1(n2, e) {
4101
4115
  if (n2 === void 0) return e === void 0;
@@ -4107,10 +4121,10 @@
4107
4121
  function X(n2, e) {
4108
4122
  return n2.name === e.name && z$1(n2.domain, e.domain);
4109
4123
  }
4110
- function In(n2, e) {
4111
- return { ...n2, src: h$1(n2.src, e) };
4124
+ function Dn(n2, e) {
4125
+ return { ...n2, src: h(n2.src, e) };
4112
4126
  }
4113
- function h$1(n2, e) {
4127
+ function h(n2, e) {
4114
4128
  switch (n2.type) {
4115
4129
  case "column":
4116
4130
  return {
@@ -4130,28 +4144,28 @@
4130
4144
  case "full":
4131
4145
  return {
4132
4146
  type: n2.type,
4133
- entries: n2.entries.map((t) => h$1(t, e))
4147
+ entries: n2.entries.map((t) => h(t, e))
4134
4148
  };
4135
4149
  case "outer":
4136
4150
  return {
4137
4151
  type: "outer",
4138
- primary: h$1(n2.primary, e),
4139
- secondary: n2.secondary.map((t) => h$1(t, e))
4152
+ primary: h(n2.primary, e),
4153
+ secondary: n2.secondary.map((t) => h(t, e))
4140
4154
  };
4141
4155
  default:
4142
4156
  w(n2);
4143
4157
  }
4144
4158
  }
4145
4159
  function G(n2) {
4146
- return ke(n2);
4160
+ return Oe(n2);
4147
4161
  }
4148
4162
  function x(n2) {
4149
- return ke(p$1(n2));
4163
+ return Oe(p$1(n2));
4150
4164
  }
4151
4165
  function A(n2, e) {
4152
4166
  return JSON.stringify([n2, e]);
4153
4167
  }
4154
- class Ln {
4168
+ class Vn {
4155
4169
  /**
4156
4170
  * Creates a new anchor context from a set of anchor column specifications
4157
4171
  * @param anchors Record of anchor column specifications indexed by anchor ID
@@ -4193,9 +4207,9 @@
4193
4207
  for (const a of this.domainPacks) {
4194
4208
  const i = [];
4195
4209
  for (const c2 of a) {
4196
- const d = e.domain[c2];
4197
- if (d !== void 0)
4198
- i.push([c2, d]);
4210
+ const m2 = e.domain[c2];
4211
+ if (m2 !== void 0)
4212
+ i.push([c2, m2]);
4199
4213
  else
4200
4214
  break n;
4201
4215
  }
@@ -4224,7 +4238,7 @@
4224
4238
  throw new Error(`Axis index ${i} is out of bounds (0-${e.axesSpec.length - 1})`);
4225
4239
  s2.push([i, u2]);
4226
4240
  } else {
4227
- const c2 = e.axesSpec.findIndex((d) => d.name === i);
4241
+ const c2 = e.axesSpec.findIndex((m2) => m2.name === i);
4228
4242
  if (c2 === -1)
4229
4243
  throw new Error(`Axis with name "${i}" not found in the column specification`);
4230
4244
  s2.push([c2, u2]);
@@ -4245,7 +4259,7 @@
4245
4259
  return G(this.derive(e, t));
4246
4260
  }
4247
4261
  }
4248
- function Vn(n2, e, t) {
4262
+ function Bn(n2, e, t) {
4249
4263
  const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
4250
4264
  if (r.domainAnchor !== void 0) {
4251
4265
  const s2 = n2[r.domainAnchor];
@@ -4314,13 +4328,13 @@
4314
4328
  if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4315
4329
  return n2;
4316
4330
  }
4317
- function Kn$1(n2, e) {
4331
+ function Kn(n2, e) {
4318
4332
  return n2 === void 0 ? void 0 : {
4319
4333
  ...n2,
4320
4334
  data: e(n2.data)
4321
4335
  };
4322
4336
  }
4323
- function Rn(n2) {
4337
+ function vn(n2) {
4324
4338
  const e = /* @__PURE__ */ new Map(), t = (r) => {
4325
4339
  switch (r.type) {
4326
4340
  case "column":
@@ -4345,7 +4359,7 @@
4345
4359
  };
4346
4360
  return t(n2), [...e.values()];
4347
4361
  }
4348
- function k(n2, e) {
4362
+ function k$1(n2, e) {
4349
4363
  if (n2.name !== void 0 && n2.name !== e.name)
4350
4364
  return false;
4351
4365
  if (n2.type !== void 0) {
@@ -4383,13 +4397,13 @@
4383
4397
  const t = n2.axesSpec.map(p$1);
4384
4398
  if (e.partialAxesMatch) {
4385
4399
  for (const r of e.axes)
4386
- if (!t.some((o) => k(r, o)))
4400
+ if (!t.some((o) => k$1(r, o)))
4387
4401
  return false;
4388
4402
  } else {
4389
4403
  if (t.length !== e.axes.length)
4390
4404
  return false;
4391
4405
  for (let r = 0; r < e.axes.length; r++)
4392
- if (!k(e.axes[r], t[r]))
4406
+ if (!k$1(e.axes[r], t[r]))
4393
4407
  return false;
4394
4408
  }
4395
4409
  }
@@ -4409,15 +4423,15 @@
4409
4423
  }
4410
4424
  return true;
4411
4425
  }
4412
- function vn(n2) {
4426
+ function _n(n2) {
4413
4427
  return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n2);
4414
4428
  }
4415
- function _n(n2) {
4429
+ function Mn(n2) {
4416
4430
  const e = {
4417
4431
  kind: n2.kind,
4418
4432
  name: n2.name
4419
4433
  };
4420
- return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = C(n2.axesSpec)), ke(e);
4434
+ return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = C(n2.axesSpec)), Oe(e);
4421
4435
  }
4422
4436
  z$2.object({
4423
4437
  __isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -4427,10 +4441,10 @@
4427
4441
  }).describe(
4428
4442
  "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."
4429
4443
  ).readonly();
4430
- function Hn(n2) {
4444
+ function qn(n2) {
4431
4445
  return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4432
4446
  }
4433
- function Wn(n2, e = true) {
4447
+ function zn(n2, e = true) {
4434
4448
  if (e)
4435
4449
  return {
4436
4450
  ...n2,
@@ -4441,38 +4455,45 @@
4441
4455
  return r;
4442
4456
  }
4443
4457
  }
4444
- function Xn(n2, e) {
4458
+ function Gn(n2, e) {
4445
4459
  return n2.ok ? { ok: true, value: e(n2.value) } : n2;
4446
4460
  }
4447
4461
  const sn = 24;
4448
4462
  z$2.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4449
- function ne(n2) {
4463
+ function ee(n2) {
4450
4464
  return JSON.parse(n2);
4451
4465
  }
4452
4466
  var stringify = { exports: {} };
4453
- (function(module2, exports3) {
4454
- exports3 = module2.exports = stringify2;
4455
- exports3.getSerialize = serializer;
4456
- function stringify2(obj, replacer, spaces, cycleReplacer) {
4457
- return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
4458
- }
4459
- function serializer(replacer, cycleReplacer) {
4460
- var stack = [], keys = [];
4461
- if (cycleReplacer == null) cycleReplacer = function(key, value) {
4462
- if (stack[0] === value) return "[Circular ~]";
4463
- return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
4464
- };
4465
- return function(key, value) {
4466
- if (stack.length > 0) {
4467
- var thisPos = stack.indexOf(this);
4468
- ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
4469
- ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
4470
- if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value);
4471
- } else stack.push(value);
4472
- return replacer == null ? value : replacer.call(this, key, value);
4473
- };
4474
- }
4475
- })(stringify, stringify.exports);
4467
+ var hasRequiredStringify;
4468
+ function requireStringify() {
4469
+ if (hasRequiredStringify) return stringify.exports;
4470
+ hasRequiredStringify = 1;
4471
+ (function(module2, exports3) {
4472
+ exports3 = module2.exports = stringify2;
4473
+ exports3.getSerialize = serializer;
4474
+ function stringify2(obj, replacer, spaces, cycleReplacer) {
4475
+ return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
4476
+ }
4477
+ function serializer(replacer, cycleReplacer) {
4478
+ var stack = [], keys = [];
4479
+ if (cycleReplacer == null) cycleReplacer = function(key, value) {
4480
+ if (stack[0] === value) return "[Circular ~]";
4481
+ return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
4482
+ };
4483
+ return function(key, value) {
4484
+ if (stack.length > 0) {
4485
+ var thisPos = stack.indexOf(this);
4486
+ ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
4487
+ ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
4488
+ if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value);
4489
+ } else stack.push(value);
4490
+ return replacer == null ? value : replacer.call(this, key, value);
4491
+ };
4492
+ }
4493
+ })(stringify, stringify.exports);
4494
+ return stringify.exports;
4495
+ }
4496
+ requireStringify();
4476
4497
  const l = z$2.object({
4477
4498
  type: z$2.literal("PlError"),
4478
4499
  name: z$2.string(),
@@ -4501,13 +4522,13 @@
4501
4522
  cause: z$2.lazy(() => n).optional(),
4502
4523
  errors: z$2.lazy(() => n.array()).optional()
4503
4524
  });
4504
- var Xe = Object.defineProperty;
4505
- var Qe = (t, e, n2) => e in t ? Xe(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4506
- var F = (t, e, n2) => Qe(t, typeof e != "symbol" ? e + "" : e, n2);
4525
+ var qe = Object.defineProperty;
4526
+ var ze = (t, e, n2) => e in t ? qe(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4527
+ var k = (t, e, n2) => ze(t, typeof e != "symbol" ? e + "" : e, n2);
4507
4528
  function re(t) {
4508
4529
  return { type: "Immediate", value: t };
4509
4530
  }
4510
- function ht() {
4531
+ function dt() {
4511
4532
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4512
4533
  }
4513
4534
  function Re(t) {
@@ -4516,39 +4537,39 @@
4516
4537
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4517
4538
  throw new Error("Can't get platforma instance.");
4518
4539
  }
4519
- function gt() {
4540
+ function pt() {
4520
4541
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4521
4542
  }
4522
- function h() {
4543
+ function g() {
4523
4544
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4524
4545
  throw new Error("Not in config rendering context");
4525
4546
  }
4526
4547
  function H(t, e) {
4527
- const n2 = gt();
4548
+ const n2 = pt();
4528
4549
  if (n2 === void 0) return false;
4529
4550
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4530
4551
  return n2.callbackRegistry[t] = e, true;
4531
4552
  }
4532
4553
  const ce = /* @__PURE__ */ new Map();
4533
- function mt(t, e) {
4534
- t in h().callbackRegistry || (h().callbackRegistry[t] = (n2) => {
4554
+ function ft(t, e) {
4555
+ t in g().callbackRegistry || (g().callbackRegistry[t] = (n2) => {
4535
4556
  for (const r of ce.get(t))
4536
4557
  r(n2);
4537
4558
  }, ce.set(t, [])), ce.get(t).push(e);
4538
4559
  }
4539
- class I {
4560
+ class _ {
4540
4561
  constructor(e, n2 = (r) => r) {
4541
- F(this, "isResolved", false);
4542
- F(this, "resolvedValue");
4543
- this.handle = e, this.postProcess = n2, mt(e, (r) => {
4562
+ k(this, "isResolved", false);
4563
+ k(this, "resolvedValue");
4564
+ this.handle = e, this.postProcess = n2, ft(e, (r) => {
4544
4565
  this.resolvedValue = n2(r), this.isResolved = true;
4545
4566
  });
4546
4567
  }
4547
4568
  map(e) {
4548
- return new I(this.handle, (n2) => e(this.postProcess(n2)));
4569
+ return new _(this.handle, (n2) => e(this.postProcess(n2)));
4549
4570
  }
4550
4571
  mapDefined(e) {
4551
- return new I(this.handle, (n2) => {
4572
+ return new _(this.handle, (n2) => {
4552
4573
  const r = this.postProcess(n2);
4553
4574
  return r ? e(r) : void 0;
4554
4575
  });
@@ -4560,7 +4581,7 @@
4560
4581
  function he(t, e) {
4561
4582
  return t === void 0 ? void 0 : e(t);
4562
4583
  }
4563
- class O {
4584
+ class E {
4564
4585
  constructor(e, n2) {
4565
4586
  this.handle = e, this.resolvePath = n2;
4566
4587
  }
@@ -4600,46 +4621,46 @@
4600
4621
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4601
4622
  ];
4602
4623
  return he(
4603
- h().resolveWithCommon(this.handle, e, ...n2),
4604
- (i) => new O(i, r)
4624
+ g().resolveWithCommon(this.handle, e, ...n2),
4625
+ (i) => new E(i, r)
4605
4626
  );
4606
4627
  }
4607
4628
  get resourceType() {
4608
- return h().getResourceType(this.handle);
4629
+ return g().getResourceType(this.handle);
4609
4630
  }
4610
4631
  getInputsLocked() {
4611
- return h().getInputsLocked(this.handle);
4632
+ return g().getInputsLocked(this.handle);
4612
4633
  }
4613
4634
  getOutputsLocked() {
4614
- return h().getOutputsLocked(this.handle);
4635
+ return g().getOutputsLocked(this.handle);
4615
4636
  }
4616
4637
  getIsReadyOrError() {
4617
- return h().getIsReadyOrError(this.handle);
4638
+ return g().getIsReadyOrError(this.handle);
4618
4639
  }
4619
4640
  getIsFinal() {
4620
- return h().getIsFinal(this.handle);
4641
+ return g().getIsFinal(this.handle);
4621
4642
  }
4622
4643
  getError() {
4623
4644
  const e = [...this.resolvePath, "error"];
4624
4645
  return he(
4625
- h().getError(this.handle),
4626
- (n2) => new O(n2, e)
4646
+ g().getError(this.handle),
4647
+ (n2) => new E(n2, e)
4627
4648
  );
4628
4649
  }
4629
4650
  listInputFields() {
4630
- return h().listInputFields(this.handle);
4651
+ return g().listInputFields(this.handle);
4631
4652
  }
4632
4653
  listOutputFields() {
4633
- return h().listOutputFields(this.handle);
4654
+ return g().listOutputFields(this.handle);
4634
4655
  }
4635
4656
  listDynamicFields() {
4636
- return h().listDynamicFields(this.handle);
4657
+ return g().listDynamicFields(this.handle);
4637
4658
  }
4638
4659
  getKeyValueBase64(e) {
4639
- return h().getKeyValueBase64(this.handle, e);
4660
+ return g().getKeyValueBase64(this.handle, e);
4640
4661
  }
4641
4662
  getKeyValueAsString(e) {
4642
- return h().getKeyValueAsString(this.handle, e);
4663
+ return g().getKeyValueAsString(this.handle, e);
4643
4664
  }
4644
4665
  getKeyValueAsJson(e) {
4645
4666
  const n2 = this.getKeyValueAsString(e);
@@ -4647,10 +4668,10 @@
4647
4668
  return JSON.parse(n2);
4648
4669
  }
4649
4670
  getDataBase64() {
4650
- return h().getDataBase64(this.handle);
4671
+ return g().getDataBase64(this.handle);
4651
4672
  }
4652
4673
  getDataAsString() {
4653
- return h().getDataAsString(this.handle);
4674
+ return g().getDataAsString(this.handle);
4654
4675
  }
4655
4676
  getDataAsJson() {
4656
4677
  const e = this.getDataAsString();
@@ -4671,7 +4692,7 @@
4671
4692
  *
4672
4693
  */
4673
4694
  parsePObjectCollection(e = false, n2 = "") {
4674
- const r = h().parsePObjectCollection(
4695
+ const r = g().parsePObjectCollection(
4675
4696
  this.handle,
4676
4697
  e,
4677
4698
  n2,
@@ -4681,19 +4702,19 @@
4681
4702
  const i = {};
4682
4703
  for (const [s2, o] of Object.entries(r)) {
4683
4704
  const a = [...this.resolvePath, s2];
4684
- i[s2] = Kn$1(o, (l2) => new O(l2, a));
4705
+ i[s2] = Kn(o, (l2) => new E(l2, a));
4685
4706
  }
4686
4707
  return i;
4687
4708
  }
4688
4709
  getFileContentAsBase64(e) {
4689
- return new I(h().getBlobContentAsBase64(this.handle, e));
4710
+ return new _(g().getBlobContentAsBase64(this.handle, e));
4690
4711
  }
4691
4712
  getFileContentAsString(e) {
4692
- return new I(h().getBlobContentAsString(this.handle, e));
4713
+ return new _(g().getBlobContentAsString(this.handle, e));
4693
4714
  }
4694
4715
  getFileContentAsJson(e) {
4695
- return new I(
4696
- h().getBlobContentAsString(this.handle, e)
4716
+ return new _(
4717
+ g().getBlobContentAsString(this.handle, e)
4697
4718
  ).mapDefined((n2) => JSON.parse(n2));
4698
4719
  }
4699
4720
  /**
@@ -4712,7 +4733,7 @@
4712
4733
  * @returns downloaded file handle
4713
4734
  */
4714
4735
  getFileHandle() {
4715
- return new I(h().getDownloadedBlobContentHandle(this.handle));
4736
+ return new _(g().getDownloadedBlobContentHandle(this.handle));
4716
4737
  }
4717
4738
  /**
4718
4739
  * @deprecated use getFileHandle
@@ -4724,7 +4745,7 @@
4724
4745
  * @returns downloaded file handle
4725
4746
  */
4726
4747
  getRemoteFileHandle() {
4727
- return new I(h().getOnDemandBlobContentHandle(this.handle));
4748
+ return new _(g().getOnDemandBlobContentHandle(this.handle));
4728
4749
  }
4729
4750
  /**
4730
4751
  * @deprecated use getRemoteFileHandle
@@ -4736,22 +4757,22 @@
4736
4757
  * @returns the url to the extracted folder
4737
4758
  */
4738
4759
  extractArchiveAndGetURL(e) {
4739
- return new I(h().extractArchiveAndGetURL(this.handle, e));
4760
+ return new _(g().extractArchiveAndGetURL(this.handle, e));
4740
4761
  }
4741
4762
  getImportProgress() {
4742
- return new I(h().getImportProgress(this.handle));
4763
+ return new _(g().getImportProgress(this.handle));
4743
4764
  }
4744
4765
  getLastLogs(e) {
4745
- return new I(h().getLastLogs(this.handle, e));
4766
+ return new _(g().getLastLogs(this.handle, e));
4746
4767
  }
4747
4768
  getProgressLog(e) {
4748
- return new I(h().getProgressLog(this.handle, e));
4769
+ return new _(g().getProgressLog(this.handle, e));
4749
4770
  }
4750
4771
  getProgressLogWithInfo(e) {
4751
- return new I(h().getProgressLogWithInfo(this.handle, e));
4772
+ return new _(g().getProgressLogWithInfo(this.handle, e));
4752
4773
  }
4753
4774
  getLogHandle() {
4754
- return new I(h().getLogHandle(this.handle));
4775
+ return new _(g().getLogHandle(this.handle));
4755
4776
  }
4756
4777
  allFieldsResolved(e = "Input") {
4757
4778
  switch (e) {
@@ -4777,90 +4798,90 @@
4777
4798
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4778
4799
  (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4779
4800
  );
4780
- return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, d]) => o(u2, d));
4801
+ return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, c2]) => o(u2, c2));
4781
4802
  }
4782
4803
  }
4783
- const De = "staging", Ke = "main";
4784
- const bt = "pl7.app/label", wt = "pl7.app/trace", At = z$2.object({
4804
+ const De = "staging", Fe = "main";
4805
+ const mt = "pl7.app/label", yt = "pl7.app/trace", vt = z$2.object({
4785
4806
  type: z$2.string(),
4786
4807
  importance: z$2.number().optional(),
4787
4808
  id: z$2.string().optional(),
4788
4809
  label: z$2.string()
4789
- }), xt = z$2.array(At), Ct = 1e-3, Pt = "__LABEL__", Se = "__LABEL__@1";
4810
+ }), bt = z$2.array(vt), wt = 1e-3, At = "__LABEL__", Pe = "__LABEL__@1";
4790
4811
  function Ve(t, e, n2 = {}) {
4791
4812
  const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((f2) => {
4792
- var S, R;
4813
+ var P, R;
4793
4814
  const w2 = e(f2);
4794
- let c2, g, x2;
4795
- "spec" in w2 && typeof w2.spec == "object" ? (c2 = w2.spec, g = w2.prefixTrace, x2 = w2.suffixTrace) : c2 = w2;
4796
- const p2 = (S = c2.annotations) == null ? void 0 : S[bt], A2 = (R = c2.annotations) == null ? void 0 : R[wt], m2 = (A2 ? xt.safeParse(JSON.parse(A2)).data : void 0) ?? [], v = [
4797
- ...g ?? [],
4798
- ...m2,
4799
- ...x2 ?? []
4815
+ let d, h2, b;
4816
+ "spec" in w2 && typeof w2.spec == "object" ? (d = w2.spec, h2 = w2.prefixTrace, b = w2.suffixTrace) : d = w2;
4817
+ const p2 = (P = d.annotations) == null ? void 0 : P[mt], I2 = (R = d.annotations) == null ? void 0 : R[yt], x2 = (I2 ? bt.safeParse(JSON.parse(I2)).data : void 0) ?? [], y = [
4818
+ ...h2 ?? [],
4819
+ ...x2,
4820
+ ...b ?? []
4800
4821
  ];
4801
4822
  if (p2 !== void 0) {
4802
- const k2 = { label: p2, type: Pt, importance: -2 };
4803
- n2.addLabelAsSuffix ? v.push(k2) : v.splice(0, 0, k2);
4804
- }
4805
- const C2 = [], L = /* @__PURE__ */ new Map();
4806
- for (let k2 = v.length - 1; k2 >= 0; --k2) {
4807
- const { type: W } = v[k2], V = v[k2].importance ?? 0, N2 = (L.get(W) ?? 0) + 1;
4808
- L.set(W, N2);
4809
- const j = `${W}@${N2}`;
4810
- s2.set(j, (s2.get(j) ?? 0) + 1), r.set(
4811
- j,
4823
+ const O = { label: p2, type: At, importance: -2 };
4824
+ n2.addLabelAsSuffix ? y.push(O) : y.splice(0, 0, O);
4825
+ }
4826
+ const A2 = [], T = /* @__PURE__ */ new Map();
4827
+ for (let O = y.length - 1; O >= 0; --O) {
4828
+ const { type: W } = y[O], V = y[O].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
4829
+ T.set(W, $);
4830
+ const F2 = `${W}@${$}`;
4831
+ s2.set(F2, (s2.get(F2) ?? 0) + 1), r.set(
4832
+ F2,
4812
4833
  Math.max(
4813
- r.get(j) ?? Number.NEGATIVE_INFINITY,
4814
- V - (v.length - k2) * Ct
4834
+ r.get(F2) ?? Number.NEGATIVE_INFINITY,
4835
+ V - (y.length - O) * wt
4815
4836
  )
4816
- ), C2.push({ ...v[k2], fullType: j, occurrenceIndex: N2 });
4837
+ ), A2.push({ ...y[O], fullType: F2, occurrenceIndex: $ });
4817
4838
  }
4818
- return C2.reverse(), {
4839
+ return A2.reverse(), {
4819
4840
  value: f2,
4820
- spec: c2,
4841
+ spec: d,
4821
4842
  label: p2,
4822
- fullTrace: C2
4843
+ fullTrace: A2
4823
4844
  };
4824
4845
  }), a = [], l2 = [], u2 = [...r];
4825
4846
  u2.sort(([, f2], [, w2]) => w2 - f2);
4826
4847
  for (const [f2] of u2)
4827
4848
  f2.endsWith("@1") || s2.get(f2) === t.length ? a.push(f2) : l2.push(f2);
4828
- const d = (f2, w2 = false) => {
4829
- const c2 = [];
4830
- for (let g = 0; g < o.length; g++) {
4831
- const x2 = o[g], p2 = x2.fullTrace.filter((v) => f2.has(v.fullType) || i && i.has(v.type));
4849
+ const c2 = (f2, w2 = false) => {
4850
+ const d = [];
4851
+ for (let h2 = 0; h2 < o.length; h2++) {
4852
+ const b = o[h2], p2 = b.fullTrace.filter((y) => f2.has(y.fullType) || i && i.has(y.type));
4832
4853
  if (p2.length === 0)
4833
4854
  if (w2)
4834
- c2.push({
4855
+ d.push({
4835
4856
  label: "Unlabeled",
4836
- value: x2.value
4857
+ value: b.value
4837
4858
  });
4838
4859
  else return;
4839
- const A2 = p2.map((v) => v.label), m2 = n2.separator ?? " / ";
4840
- c2.push({
4841
- label: A2.join(m2),
4842
- value: x2.value
4860
+ const I2 = p2.map((y) => y.label), x2 = n2.separator ?? " / ";
4861
+ d.push({
4862
+ label: I2.join(x2),
4863
+ value: b.value
4843
4864
  });
4844
4865
  }
4845
- return c2;
4866
+ return d;
4846
4867
  };
4847
4868
  if (a.length === 0) {
4848
4869
  if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
4849
- return d(new Set(Se), true);
4870
+ return c2(new Set(Pe), true);
4850
4871
  }
4851
- let y = 0, b = -1;
4852
- for (; y < a.length; ) {
4872
+ let m2 = 0, v = -1;
4873
+ for (; m2 < a.length; ) {
4853
4874
  const f2 = /* @__PURE__ */ new Set();
4854
- n2.includeNativeLabel && f2.add(Se);
4855
- for (let c2 = 0; c2 < y; ++c2) f2.add(a[c2]);
4856
- b >= 0 && f2.add(a[b]);
4857
- const w2 = d(f2);
4858
- if (w2 !== void 0 && new Set(w2.map((c2) => c2.label)).size === t.length) return w2;
4859
- b++, b >= a.length && (y++, b = y);
4875
+ n2.includeNativeLabel && f2.add(Pe);
4876
+ for (let d = 0; d < m2; ++d) f2.add(a[d]);
4877
+ v >= 0 && f2.add(a[v]);
4878
+ const w2 = c2(f2);
4879
+ if (w2 !== void 0 && new Set(w2.map((d) => d.label)).size === t.length) return w2;
4880
+ v++, v >= a.length && (m2++, v = m2);
4860
4881
  }
4861
- return d(/* @__PURE__ */ new Set([...a, ...l2]), true);
4882
+ return c2(/* @__PURE__ */ new Set([...a, ...l2]), true);
4862
4883
  }
4863
- const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", $e = Z + "Partitioned/", ae = $e + "JsonPartitioned", z = $e + "BinaryPartitioned";
4884
+ const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", je = Z + "Partitioned/", ae = je + "JsonPartitioned", z = je + "BinaryPartitioned";
4864
4885
  const me = (t) => {
4865
4886
  if (t.endsWith(".index"))
4866
4887
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
@@ -4868,7 +4889,7 @@
4868
4889
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4869
4890
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4870
4891
  };
4871
- function St(t) {
4892
+ function xt(t) {
4872
4893
  if (!t) return;
4873
4894
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4874
4895
  let i = 0;
@@ -4914,7 +4935,7 @@
4914
4935
  }
4915
4936
  return { data: r, keyLength: i };
4916
4937
  }
4917
- function _t(t) {
4938
+ function Ct(t) {
4918
4939
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4919
4940
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4920
4941
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4933,11 +4954,11 @@
4933
4954
  }
4934
4955
  return r.map((i) => Array.from(i.values()));
4935
4956
  }
4936
- function It(t) {
4957
+ function Pt(t) {
4937
4958
  if (t === void 0) return;
4938
- if (F$1(t))
4939
- return _t(t);
4940
- const e = St(t);
4959
+ if (F(t))
4960
+ return Ct(t);
4961
+ const e = xt(t);
4941
4962
  if (!e) return;
4942
4963
  const { data: n2, keyLength: r } = e, i = [];
4943
4964
  for (let s2 = 0; s2 < r; ++s2)
@@ -5048,15 +5069,15 @@
5048
5069
  throw new Error(`Unknown resource type: ${n2}`);
5049
5070
  }
5050
5071
  }
5051
- function Tt(t) {
5072
+ function St(t) {
5052
5073
  if (t !== void 0) {
5053
- if (F$1(t)) return t;
5054
- if (yn(t)) return bn(t);
5055
- if (t instanceof O) return ye(t);
5074
+ if (F(t)) return t;
5075
+ if (hn(t)) return wn(t);
5076
+ if (t instanceof E) return ye(t);
5056
5077
  throw new Error(`Unexpected input type: ${typeof t}`);
5057
5078
  }
5058
5079
  }
5059
- function Lt(t, e) {
5080
+ function _t(t, e) {
5060
5081
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5061
5082
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5062
5083
  const { partitionKeyLength: s2 } = t;
@@ -5116,39 +5137,45 @@
5116
5137
  }
5117
5138
  }
5118
5139
  }
5119
- class Et {
5140
+ function It(t) {
5141
+ if (!Array.isArray(t)) return false;
5142
+ if (t.length === 0) return true;
5143
+ const e = t[0];
5144
+ return typeof e == "object" && e !== null && "key" in e && "val" in e;
5145
+ }
5146
+ class Tt {
5120
5147
  constructor(e) {
5121
5148
  this.columns = e;
5122
5149
  }
5123
5150
  selectColumns(e) {
5124
- const n2 = typeof e == "function" ? e : vn(e);
5151
+ const n2 = typeof e == "function" ? e : _n(e);
5125
5152
  return this.columns.filter((r) => n2(r.spec));
5126
5153
  }
5127
5154
  }
5128
- function Ot(t) {
5155
+ function Lt(t) {
5129
5156
  if (t)
5130
5157
  return t.map((e) => ({
5131
- type: `split:${$n(e.axisId)}`,
5158
+ type: `split:${In(e.axisId)}`,
5132
5159
  label: e.label,
5133
5160
  importance: 1e6
5134
5161
  // High importance for split filters in labels
5135
5162
  }));
5136
5163
  }
5137
- function kt(t) {
5164
+ function Et(t) {
5138
5165
  if (t)
5139
5166
  return t.map((e) => [e.axisIdx, e.value]);
5140
5167
  }
5141
- function Ft(t, e) {
5168
+ function Ot(t, e) {
5142
5169
  if (!e || e.length === 0) return t;
5143
5170
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5144
- return ke({ id: t, axisFilters: n2 });
5171
+ return Oe({ id: t, axisFilters: n2 });
5145
5172
  }
5146
- function _e(t) {
5173
+ function Se(t) {
5147
5174
  if (!t || typeof t != "object") return false;
5148
5175
  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);
5149
5176
  return !!e.domainAnchor || n2 || r;
5150
5177
  }
5151
- function Rt(t) {
5178
+ function kt(t) {
5152
5179
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5153
5180
  return [];
5154
5181
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5156,11 +5183,11 @@
5156
5183
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
5157
5184
  return e.sort((n2, r) => n2 - r), e;
5158
5185
  }
5159
- class ve {
5186
+ class le {
5160
5187
  constructor() {
5161
- F(this, "defaultProviderStore", []);
5162
- F(this, "providers", [new Et(this.defaultProviderStore)]);
5163
- F(this, "axisLabelProviders", []);
5188
+ k(this, "defaultProviderStore", []);
5189
+ k(this, "providers", [new Tt(this.defaultProviderStore)]);
5190
+ k(this, "axisLabelProviders", []);
5164
5191
  }
5165
5192
  addColumnProvider(e) {
5166
5193
  return this.providers.push(e), this;
@@ -5188,124 +5215,126 @@
5188
5215
  };
5189
5216
  let u2 = () => false;
5190
5217
  if (a) {
5191
- const c2 = (Array.isArray(a) ? a : [a]).map((g) => {
5192
- if (_e(g)) {
5218
+ const d = (Array.isArray(a) ? a : [a]).map((h2) => {
5219
+ if (Se(h2)) {
5193
5220
  if (!r)
5194
5221
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
5195
- return vn(Vn(r.anchors, g, n2));
5222
+ return _n(Bn(r.anchors, h2, n2));
5196
5223
  } else
5197
- return vn(g);
5224
+ return _n(h2);
5198
5225
  });
5199
- u2 = (g) => c2.some((x2) => x2(g));
5226
+ u2 = (h2) => d.some((b) => b(h2));
5200
5227
  }
5201
- const d = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], y = [], b = /* @__PURE__ */ new Set();
5202
- for (const c2 of d) {
5203
- const g = _e(c2);
5204
- let x2;
5205
- if (g) {
5228
+ const c2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], m2 = [], v = /* @__PURE__ */ new Set();
5229
+ for (const d of c2) {
5230
+ const h2 = Se(d);
5231
+ let b;
5232
+ if (h2) {
5206
5233
  if (!r)
5207
5234
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5208
- x2 = Vn(r.anchors, c2, n2);
5235
+ b = Bn(r.anchors, d, n2);
5209
5236
  } else
5210
- x2 = c2;
5211
- const p2 = /* @__PURE__ */ new Set(), A2 = [];
5212
- for (const C2 of this.providers) {
5213
- const L = C2.selectColumns(x2);
5214
- for (const S of L) {
5215
- if (u2(S.spec)) continue;
5216
- if (p2.has(S.id))
5217
- throw new Error(`Duplicate column id ${S.id} in provider ${C2.constructor.name}`);
5218
- const R = _n(S.spec);
5219
- b.has(R) || (p2.add(S.id), b.add(R), A2.push(S));
5237
+ b = d;
5238
+ const p2 = /* @__PURE__ */ new Set(), I2 = [];
5239
+ for (const A2 of this.providers) {
5240
+ const T = A2.selectColumns(b);
5241
+ for (const P of T) {
5242
+ if (u2(P.spec)) continue;
5243
+ if (p2.has(P.id))
5244
+ throw new Error(`Duplicate column id ${P.id} in provider ${A2.constructor.name}`);
5245
+ const R = Mn(P.spec);
5246
+ v.has(R) || (p2.add(P.id), v.add(R), I2.push(P));
5220
5247
  }
5221
5248
  }
5222
- if (A2.length === 0) continue;
5223
- const m2 = Rt(c2), v = m2.length > 0;
5224
- for (const C2 of A2) {
5225
- if (!f(C2.spec)) continue;
5226
- const L = C2.spec;
5227
- if (v) {
5228
- const S = Tt(C2.data);
5229
- if (!S) {
5249
+ if (I2.length === 0) continue;
5250
+ const x2 = kt(d), y = x2.length > 0;
5251
+ for (const A2 of I2) {
5252
+ if (!f(A2.spec)) continue;
5253
+ const T = A2.spec;
5254
+ if (y) {
5255
+ if (It(A2.data))
5256
+ throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${A2.id}`);
5257
+ const P = St(A2.data);
5258
+ if (!P) {
5230
5259
  if (s2) continue;
5231
5260
  return;
5232
5261
  }
5233
- if (!gn(S))
5234
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${C2.id}`);
5235
- const R = It(S), k2 = m2[m2.length - 1];
5236
- if (k2 >= S.partitionKeyLength)
5237
- throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${k2}) in column ${L.name}`);
5238
- const W = m2.map((_) => this.findLabels(p$1(L.axesSpec[_]))), V = [], N2 = (_, G2) => {
5239
- if (G2 >= m2.length) {
5240
- if (V.push([..._]), V.length > 1e4)
5262
+ if (!bn(P))
5263
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P.type} for column ${A2.id}`);
5264
+ const R = Pt(P), O = x2[x2.length - 1];
5265
+ if (O >= P.partitionKeyLength)
5266
+ throw new Error(`Not enough partition keys (${P.partitionKeyLength}) for requested split axes (max index ${O}) in column ${T.name}`);
5267
+ const W = x2.map((S) => this.findLabels(p$1(T.axesSpec[S]))), V = [], $ = (S, G2) => {
5268
+ if (G2 >= x2.length) {
5269
+ if (V.push([...S]), V.length > 1e4)
5241
5270
  throw new Error("Too many key combinations, aborting.");
5242
5271
  return;
5243
5272
  }
5244
- const $ = m2[G2];
5245
- if ($ >= R.length)
5246
- throw new Error(`Axis index ${$} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${C2.id}`);
5247
- const J = R[$];
5248
- if (!J || J.length === 0) {
5273
+ const j = x2[G2];
5274
+ if (j >= R.length)
5275
+ throw new Error(`Axis index ${j} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${A2.id}`);
5276
+ const N2 = R[j];
5277
+ if (!N2 || N2.length === 0) {
5249
5278
  V.length = 0;
5250
5279
  return;
5251
5280
  }
5252
- for (const ee of J)
5253
- _.push(ee), N2(_, G2 + 1), _.pop();
5281
+ for (const ee2 of N2)
5282
+ S.push(ee2), $(S, G2 + 1), S.pop();
5254
5283
  };
5255
- if (N2([], 0), V.length === 0)
5284
+ if ($([], 0), V.length === 0)
5256
5285
  continue;
5257
- const j = [...L.axesSpec], He = m2.map((_) => _);
5258
- for (let _ = m2.length - 1; _ >= 0; _--)
5259
- j.splice(m2[_], 1);
5260
- const qe = { ...L, axesSpec: j };
5261
- for (const _ of V) {
5262
- const G2 = _.map(($, J) => {
5263
- const ee = He[J], ze = p$1(L.axesSpec[ee]), le = W[J], Ye = (le == null ? void 0 : le[$]) ?? String($);
5264
- return { axisIdx: ee, axisId: ze, value: $, label: Ye };
5286
+ const F2 = [...T.axesSpec], Be = x2.map((S) => S);
5287
+ for (let S = x2.length - 1; S >= 0; S--)
5288
+ F2.splice(x2[S], 1);
5289
+ const We = { ...T, axesSpec: F2 };
5290
+ for (const S of V) {
5291
+ const G2 = S.map((j, N2) => {
5292
+ const ee2 = Be[N2], Ge = p$1(T.axesSpec[ee2]), ue = W[N2], He = (ue == null ? void 0 : ue[j]) ?? String(j);
5293
+ return { axisIdx: ee2, axisId: Ge, value: j, label: He };
5265
5294
  });
5266
- y.push({
5295
+ m2.push({
5267
5296
  type: "split",
5268
- originalColumn: C2,
5269
- spec: L,
5270
- adjustedSpec: qe,
5271
- dataEntries: S,
5297
+ originalColumn: A2,
5298
+ spec: T,
5299
+ adjustedSpec: We,
5300
+ dataEntries: P,
5272
5301
  axisFilters: G2
5273
5302
  });
5274
5303
  }
5275
5304
  } else
5276
- y.push({
5305
+ m2.push({
5277
5306
  type: "direct",
5278
- originalColumn: C2,
5279
- spec: L,
5280
- adjustedSpec: L
5307
+ originalColumn: A2,
5308
+ spec: T,
5309
+ adjustedSpec: T
5281
5310
  });
5282
5311
  }
5283
5312
  }
5284
- if (y.length === 0) return [];
5313
+ if (m2.length === 0) return [];
5285
5314
  const f$1 = Ve(
5286
- y,
5287
- (c2) => ({
5288
- spec: c2.spec,
5289
- suffixTrace: c2.type === "split" ? Ot(c2.axisFilters) : void 0
5315
+ m2,
5316
+ (d) => ({
5317
+ spec: d.spec,
5318
+ suffixTrace: d.type === "split" ? Lt(d.axisFilters) : void 0
5290
5319
  }),
5291
5320
  l2
5292
5321
  ), w2 = [];
5293
- for (const { value: c2, label: g } of f$1) {
5294
- const { originalColumn: x2, spec: p2 } = c2, A2 = c2.type === "split" ? c2.axisFilters : void 0, m2 = kt(A2);
5295
- let v;
5296
- r ? v = r.deriveS(p2, m2) : v = Ft(x2.id, m2);
5297
- let C2 = { ...c2.adjustedSpec };
5298
- o && (C2 = {
5299
- ...C2,
5322
+ for (const { value: d, label: h2 } of f$1) {
5323
+ const { originalColumn: b, spec: p2 } = d, I2 = d.type === "split" ? d.axisFilters : void 0, x2 = Et(I2);
5324
+ let y;
5325
+ r ? y = r.deriveS(p2, x2) : y = Ot(b.id, x2);
5326
+ let A2 = { ...d.adjustedSpec };
5327
+ o && (A2 = {
5328
+ ...A2,
5300
5329
  annotations: {
5301
- ...C2.annotations ?? {},
5302
- "pl7.app/label": g
5330
+ ...A2.annotations ?? {},
5331
+ "pl7.app/label": h2
5303
5332
  }
5304
5333
  }), w2.push({
5305
- id: v,
5306
- spec: C2,
5307
- data: () => c2.type === "split" ? wn(Lt(c2.dataEntries, m2)) : c2.originalColumn.data,
5308
- label: g
5334
+ id: y,
5335
+ spec: A2,
5336
+ data: () => d.type === "split" ? Pn(_t(d.dataEntries, x2)) : d.originalColumn.data,
5337
+ label: h2
5309
5338
  });
5310
5339
  }
5311
5340
  return w2;
@@ -5333,19 +5362,19 @@
5333
5362
  return i;
5334
5363
  }
5335
5364
  }
5336
- function pe(t, e) {
5365
+ function de(t, e) {
5337
5366
  if (t === void 0) return e === void 0;
5338
5367
  if (e === void 0) return true;
5339
5368
  for (const n2 in e)
5340
5369
  if (t[n2] !== e[n2]) return false;
5341
5370
  return true;
5342
5371
  }
5343
- function Ie(t) {
5344
- return Kn$1(t, (e) => e instanceof O ? e.handle : yn(e) ? hn(e, (n2) => n2.handle) : e);
5372
+ function _e(t) {
5373
+ return Kn(t, (e) => e instanceof E ? e.handle : hn(e) ? gn(e, (n2) => n2.handle) : e);
5345
5374
  }
5346
- class Dt {
5375
+ class Rt {
5347
5376
  constructor() {
5348
- F(this, "ctx", h());
5377
+ k(this, "ctx", g());
5349
5378
  }
5350
5379
  /**
5351
5380
  * @deprecated use getOptions()
@@ -5354,28 +5383,28 @@
5354
5383
  return this.ctx.calculateOptions(e);
5355
5384
  }
5356
5385
  getOptions(e, n2) {
5357
- const r = typeof e == "function" ? e : vn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5386
+ const r = typeof e == "function" ? e : _n(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5358
5387
  let s2 = {}, o = false;
5359
5388
  return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? Ve(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5360
- ref: Wn(a, o),
5389
+ ref: zn(a, o),
5361
5390
  label: l2
5362
5391
  })) : i.map(({ ref: a, obj: l2 }) => ({
5363
- ref: Wn(a, o),
5392
+ ref: zn(a, o),
5364
5393
  label: s2(l2, a)
5365
5394
  }));
5366
5395
  }
5367
5396
  resolveAnchorCtx(e) {
5368
- if (e instanceof Ln) return e;
5397
+ if (e instanceof Vn) return e;
5369
5398
  const n2 = {};
5370
5399
  for (const [r, i] of Object.entries(e))
5371
- if (Hn(i)) {
5400
+ if (qn(i)) {
5372
5401
  const s2 = this.getPColumnSpecByRef(i);
5373
5402
  if (!s2)
5374
5403
  return;
5375
5404
  n2[r] = s2;
5376
5405
  } else
5377
5406
  n2[r] = i;
5378
- return new Ln(n2);
5407
+ return new Vn(n2);
5379
5408
  }
5380
5409
  /**
5381
5410
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5388,7 +5417,7 @@
5388
5417
  getAnchoredPColumns(e, n2, r) {
5389
5418
  const i = this.resolveAnchorCtx(e);
5390
5419
  if (i)
5391
- return new ve().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5420
+ return new le().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5392
5421
  ...r,
5393
5422
  anchorCtx: i
5394
5423
  });
@@ -5425,7 +5454,7 @@
5425
5454
  getCanonicalOptions(e, n2, r) {
5426
5455
  const i = this.resolveAnchorCtx(e);
5427
5456
  if (!i) return;
5428
- const s2 = new ve().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5457
+ const s2 = new le().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5429
5458
  ...r,
5430
5459
  anchorCtx: i
5431
5460
  });
@@ -5449,7 +5478,7 @@
5449
5478
  ref: n2.ref,
5450
5479
  obj: {
5451
5480
  ...n2.obj,
5452
- data: new O(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5481
+ data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5453
5482
  }
5454
5483
  }))
5455
5484
  };
@@ -5468,9 +5497,9 @@
5468
5497
  ref: n2.ref,
5469
5498
  obj: {
5470
5499
  ...n2.obj,
5471
- data: Xn(
5500
+ data: Gn(
5472
5501
  n2.obj.data,
5473
- (r) => new O(r, [n2.ref.blockId, n2.ref.name])
5502
+ (r) => new E(r, [n2.ref.blockId, n2.ref.name])
5474
5503
  )
5475
5504
  }
5476
5505
  }))
@@ -5497,9 +5526,9 @@
5497
5526
  )) == null ? void 0 : r.obj;
5498
5527
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5499
5528
  if (n2)
5500
- return Kn$1(
5529
+ return Kn(
5501
5530
  n2,
5502
- (i) => new O(i, [e.blockId, e.name])
5531
+ (i) => new E(i, [e.blockId, e.name])
5503
5532
  );
5504
5533
  }
5505
5534
  /**
@@ -5542,10 +5571,10 @@
5542
5571
  if (!f(r.obj.spec))
5543
5572
  continue;
5544
5573
  const i = r.obj.spec;
5545
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && pe(e.domain, i.domain)) {
5574
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && de(e.domain, i.domain)) {
5546
5575
  for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5547
5576
  const o = e.axesSpec[s2], a = i.axesSpec[s2];
5548
- if (o.name !== a.name || o.type !== a.type || !pe(o.domain, a.domain))
5577
+ if (o.name !== a.name || o.type !== a.type || !de(o.domain, a.domain))
5549
5578
  continue e;
5550
5579
  }
5551
5580
  n2.push(r.obj);
@@ -5562,7 +5591,7 @@
5562
5591
  for (const r of n2.entries) {
5563
5592
  if (!Z$1(r.obj)) continue;
5564
5593
  const i = r.obj.spec;
5565
- if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && pe(e.domain, i.axesSpec[0].domain)) {
5594
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && de(e.domain, i.axesSpec[0].domain)) {
5566
5595
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5567
5596
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5568
5597
  return Object.fromEntries(
@@ -5581,13 +5610,13 @@
5581
5610
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5582
5611
  */
5583
5612
  selectColumns(e) {
5584
- const n2 = typeof e == "function" ? e : vn(e);
5613
+ const n2 = typeof e == "function" ? e : _n(e);
5585
5614
  return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5586
5615
  const o = s2;
5587
5616
  let a = null;
5588
5617
  const l2 = this;
5589
5618
  return {
5590
- id: ke(i),
5619
+ id: Oe(i),
5591
5620
  spec: o,
5592
5621
  get data() {
5593
5622
  var u2;
@@ -5614,12 +5643,12 @@
5614
5643
  }
5615
5644
  class te {
5616
5645
  constructor() {
5617
- F(this, "ctx");
5618
- F(this, "args");
5619
- F(this, "uiState");
5620
- F(this, "_activeArgsCache");
5621
- F(this, "resultPool", new Dt());
5622
- this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5646
+ k(this, "ctx");
5647
+ k(this, "args");
5648
+ k(this, "uiState");
5649
+ k(this, "_activeArgsCache");
5650
+ k(this, "resultPool", new Rt());
5651
+ this.ctx = g(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5623
5652
  }
5624
5653
  /**
5625
5654
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
@@ -5637,14 +5666,14 @@
5637
5666
  getNamedAccessor(e) {
5638
5667
  return he(
5639
5668
  this.ctx.getAccessorHandleByName(e),
5640
- (n2) => new O(n2, [e])
5669
+ (n2) => new E(n2, [e])
5641
5670
  );
5642
5671
  }
5643
5672
  get prerun() {
5644
5673
  return this.getNamedAccessor(De);
5645
5674
  }
5646
5675
  get outputs() {
5647
- return this.getNamedAccessor(Ke);
5676
+ return this.getNamedAccessor(Fe);
5648
5677
  }
5649
5678
  /**
5650
5679
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5656,13 +5685,13 @@
5656
5685
  }
5657
5686
  verifyInlineAndExplicitColumnsSupport(e) {
5658
5687
  var i;
5659
- const n2 = e.some((s2) => !(s2.data instanceof O) || yn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5688
+ const n2 = e.some((s2) => !(s2.data instanceof E) || hn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5660
5689
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5661
5690
  }
5662
5691
  // TODO remove all non-PColumn fields
5663
5692
  createPFrame(e) {
5664
5693
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5665
- e.map((n2) => Ie(n2))
5694
+ e.map((n2) => _e(n2))
5666
5695
  );
5667
5696
  }
5668
5697
  createPTable(e) {
@@ -5674,8 +5703,8 @@
5674
5703
  },
5675
5704
  filters: e.filters ?? [],
5676
5705
  sorting: e.sorting ?? []
5677
- } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Rn(n2.src)), this.ctx.createPTable(
5678
- In(n2, (r) => Ie(r))
5706
+ } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(vn(n2.src)), this.ctx.createPTable(
5707
+ Dn(n2, (r) => _e(r))
5679
5708
  );
5680
5709
  }
5681
5710
  /** @deprecated scheduled for removal from SDK */
@@ -5695,20 +5724,20 @@
5695
5724
  this.ctx.logError(e);
5696
5725
  }
5697
5726
  }
5698
- const Y = "1.33.2";
5699
- function Kt(t) {
5727
+ const Y = "1.33.10";
5728
+ function Dt(t) {
5700
5729
  return t.__renderLambda === true;
5701
5730
  }
5702
- function de(t) {
5731
+ function pe(t) {
5703
5732
  if (t !== void 0)
5704
- return Kt(t) ? t.handle : t;
5733
+ return Dt(t) ? t.handle : t;
5705
5734
  }
5706
- class E {
5735
+ class L {
5707
5736
  constructor(e, n2, r, i, s2, o, a, l2) {
5708
5737
  this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
5709
5738
  }
5710
5739
  static create(e = "Heavy") {
5711
- return new E(
5740
+ return new L(
5712
5741
  e,
5713
5742
  void 0,
5714
5743
  {},
@@ -5722,7 +5751,7 @@
5722
5751
  output(e, n2, r = {}) {
5723
5752
  if (typeof n2 == "function") {
5724
5753
  const i = `output#${e}`;
5725
- return H(i, () => n2(new te())), new E(
5754
+ return H(i, () => n2(new te())), new L(
5726
5755
  this._renderingMode,
5727
5756
  this._initialArgs,
5728
5757
  this._initialUiState,
@@ -5740,7 +5769,7 @@
5740
5769
  this._enrichmentTargets
5741
5770
  );
5742
5771
  } else
5743
- return new E(
5772
+ return new L(
5744
5773
  this._renderingMode,
5745
5774
  this._initialArgs,
5746
5775
  this._initialUiState,
@@ -5759,7 +5788,7 @@
5759
5788
  return this.output(e, n2, { retentive: true });
5760
5789
  }
5761
5790
  argsValid(e) {
5762
- return typeof e == "function" ? (H("inputsValid", () => e(new te())), new E(
5791
+ return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
5763
5792
  this._renderingMode,
5764
5793
  this._initialArgs,
5765
5794
  this._initialUiState,
@@ -5771,7 +5800,7 @@
5771
5800
  this._sections,
5772
5801
  this._title,
5773
5802
  this._enrichmentTargets
5774
- )) : new E(
5803
+ )) : new L(
5775
5804
  this._renderingMode,
5776
5805
  this._initialArgs,
5777
5806
  this._initialUiState,
@@ -5783,7 +5812,7 @@
5783
5812
  );
5784
5813
  }
5785
5814
  sections(e) {
5786
- return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new E(
5815
+ return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
5787
5816
  this._renderingMode,
5788
5817
  this._initialArgs,
5789
5818
  this._initialUiState,
@@ -5792,7 +5821,7 @@
5792
5821
  { __renderLambda: true, handle: "sections" },
5793
5822
  this._title,
5794
5823
  this._enrichmentTargets
5795
- )) : new E(
5824
+ )) : new L(
5796
5825
  this._renderingMode,
5797
5826
  this._initialArgs,
5798
5827
  this._initialUiState,
@@ -5805,7 +5834,7 @@
5805
5834
  }
5806
5835
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
5807
5836
  title(e) {
5808
- return H("title", () => e(new te())), new E(
5837
+ return H("title", () => e(new te())), new L(
5809
5838
  this._renderingMode,
5810
5839
  this._initialArgs,
5811
5840
  this._initialUiState,
@@ -5821,7 +5850,7 @@
5821
5850
  * @deprecated use {@link withArgs}
5822
5851
  * */
5823
5852
  initialArgs(e) {
5824
- return new E(
5853
+ return new L(
5825
5854
  this._renderingMode,
5826
5855
  e,
5827
5856
  this._initialUiState,
@@ -5834,7 +5863,7 @@
5834
5863
  }
5835
5864
  /** Sets initial args for the block, this value must be specified. */
5836
5865
  withArgs(e) {
5837
- return new E(
5866
+ return new L(
5838
5867
  this._renderingMode,
5839
5868
  e,
5840
5869
  this._initialUiState,
@@ -5847,7 +5876,7 @@
5847
5876
  }
5848
5877
  /** Defines type and sets initial value for block UiState. */
5849
5878
  withUiState(e) {
5850
- return new E(
5879
+ return new L(
5851
5880
  this._renderingMode,
5852
5881
  this._initialArgs,
5853
5882
  e,
@@ -5863,7 +5892,7 @@
5863
5892
  * Influences dependency graph construction.
5864
5893
  */
5865
5894
  enriches(e) {
5866
- return H("enrichmentTargets", e), new E(
5895
+ return H("enrichmentTargets", e), new L(
5867
5896
  this._renderingMode,
5868
5897
  this._initialArgs,
5869
5898
  this._initialUiState,
@@ -5895,64 +5924,64 @@
5895
5924
  sdkVersion: Y,
5896
5925
  renderingMode: this._renderingMode,
5897
5926
  initialArgs: this._initialArgs,
5898
- inputsValid: de(this._inputsValid),
5899
- sections: de(this._sections),
5927
+ inputsValid: pe(this._inputsValid),
5928
+ sections: pe(this._sections),
5900
5929
  outputs: Object.fromEntries(
5901
- Object.entries(this._outputs).map(([n2, r]) => [n2, de(r)])
5930
+ Object.entries(this._outputs).map(([n2, r]) => [n2, pe(r)])
5902
5931
  )
5903
5932
  };
5904
- return ht() ? Re({ sdkVersion: Y }) : { config: e };
5933
+ return dt() ? Re({ sdkVersion: Y }) : { config: e };
5905
5934
  }
5906
5935
  }
5907
- function Wt(t) {
5936
+ function ve(t) {
5908
5937
  return t.axesSpec.length === 1 && t.name === "pl7.app/label";
5909
5938
  }
5910
- function Me(t) {
5911
- return new ve().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5939
+ function Ne(t) {
5940
+ return new le().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5912
5941
  name: "pl7.app/label",
5913
5942
  axes: [{}]
5914
5943
  // exactly one axis
5915
5944
  }, { dontWaitAllData: true });
5916
5945
  }
5917
- function Be(t, e) {
5946
+ function Je(t, e) {
5918
5947
  const n2 = [], r = [];
5919
5948
  for (const a of t)
5920
- Wt(a.spec) ? n2.push(a) : r.push(a);
5949
+ ve(a.spec) ? n2.push(a) : r.push(a);
5921
5950
  const i = [];
5922
5951
  for (const a of r)
5923
5952
  for (const l2 of a.spec.axesSpec) {
5924
5953
  const u2 = p$1(l2);
5925
- i.some((d) => X(d, u2)) || i.push(u2);
5954
+ i.some((c2) => X(c2, u2)) || i.push(u2);
5926
5955
  }
5927
5956
  for (const a of n2) {
5928
- const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((d) => X(d, l2));
5957
+ const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((c2) => X(c2, l2));
5929
5958
  u2 !== -1 && i.splice(u2, 1);
5930
5959
  }
5931
5960
  const s2 = (a, l2) => {
5932
5961
  let u2 = a.toString();
5933
5962
  if (l2)
5934
- for (const d in l2)
5935
- u2 += d, u2 += l2[d];
5963
+ for (const c2 in l2)
5964
+ u2 += c2, u2 += l2[c2];
5936
5965
  return u2;
5937
5966
  }, o = [];
5938
5967
  for (const a of e) {
5939
- const l2 = a.spec.axesSpec[0], u2 = p$1(l2), d = i.findIndex((y) => X(y, u2));
5940
- if (d !== -1) {
5941
- const y = i[d], b = Object.keys(y.domain ?? {}).length, f2 = Object.keys(l2.domain ?? {}).length;
5942
- b > f2 ? o.push({
5943
- id: s2(a.id, y.domain),
5968
+ const l2 = a.spec.axesSpec[0], u2 = p$1(l2), c2 = i.findIndex((m2) => X(m2, u2));
5969
+ if (c2 !== -1) {
5970
+ const m2 = i[c2], v = Object.keys(m2.domain ?? {}).length, f2 = Object.keys(l2.domain ?? {}).length;
5971
+ v > f2 ? o.push({
5972
+ id: s2(a.id, m2.domain),
5944
5973
  spec: {
5945
5974
  ...a.spec,
5946
- axesSpec: [{ ...y, annotations: l2.annotations }]
5975
+ axesSpec: [{ ...m2, annotations: l2.annotations }]
5947
5976
  },
5948
5977
  data: a.data
5949
- }) : o.push(a), i.splice(d, 1);
5978
+ }) : o.push(a), i.splice(c2, 1);
5950
5979
  }
5951
5980
  }
5952
5981
  return o;
5953
5982
  }
5954
- function We(t) {
5955
- const e = (i) => Array.isArray(i), n2 = (i) => i instanceof O, r = (i) => typeof i == "object" && "type" in i;
5983
+ function Me(t) {
5984
+ const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
5956
5985
  return t.map((i) => i.data).every((i) => {
5957
5986
  if (e(i))
5958
5987
  return true;
@@ -5971,7 +6000,7 @@
5971
6000
  throw Error(`unsupported column data type: ${i}`);
5972
6001
  });
5973
6002
  }
5974
- function Ge(t, e, n2, r, i, s2) {
6003
+ function Ue(t, e, n2, r, i, s2) {
5975
6004
  let o = t;
5976
6005
  const a = [];
5977
6006
  if (s2) {
@@ -5992,39 +6021,39 @@
5992
6021
  sorting: i
5993
6022
  };
5994
6023
  }
5995
- function Kn(t, e, n2, r) {
5996
- var u2, d;
6024
+ function kn(t, e, n2, r) {
6025
+ var u2, c2;
5997
6026
  Array.isArray(r) && (r = { filters: r });
5998
- 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 = ((d = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Me(t.resultPool);
6027
+ 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 = ((c2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : c2.sorting) ?? [], a = Ne(t.resultPool);
5999
6028
  if (!a) return;
6000
- const l2 = Be(e.map(On), a);
6001
- if (We([...e, ...l2]))
6029
+ const l2 = Je(e.map($n), a);
6030
+ if (Me([...e, ...l2]))
6002
6031
  return t.createPTable(
6003
- Ge(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
6032
+ Ue(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
6004
6033
  );
6005
6034
  }
6006
- function Gt(t) {
6035
+ function Ft(t) {
6007
6036
  var e;
6008
6037
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
6009
6038
  }
6010
- function Ht(t) {
6039
+ function Kt(t) {
6011
6040
  var e;
6012
6041
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
6013
6042
  }
6014
- function jn(t, e, n2, r, i) {
6015
- var g, x2;
6016
- const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((g = r == null ? void 0 : r.pTableParams) == null ? void 0 : g.filters) ?? []], a = ((x2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : x2.sorting) ?? [], l2 = e.filter((p2) => !Gt(p2.spec)), u2 = l2.find((p2) => n2(p2.spec));
6043
+ function Rn(t, e, n2, r, i) {
6044
+ var h2, b;
6045
+ const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((h2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : h2.filters) ?? []], a = ((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.sorting) ?? [], l2 = e.filter((p2) => !Ft(p2.spec)), u2 = l2.find((p2) => n2(p2.spec));
6017
6046
  if (!u2) return;
6018
- const d = Me(t.resultPool);
6019
- if (!d) return;
6020
- const y = new Set((() => {
6021
- var A2, m2;
6047
+ const c2 = Ne(t.resultPool);
6048
+ if (!c2) return;
6049
+ const m2 = new Set((() => {
6050
+ var I2, x2;
6022
6051
  if (s2 === "inner") return [];
6023
- const p2 = (m2 = (A2 = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A2.hiddenColIds) == null ? void 0 : m2.map(ne).filter((v) => v.type === "column").map((v) => v.id);
6024
- return p2 || l2.filter((v) => Ht(v.spec)).map((v) => v.id);
6052
+ const p2 = (x2 = (I2 = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : I2.hiddenColIds) == null ? void 0 : x2.map(ee).filter((y) => y.type === "column").map((y) => y.id);
6053
+ return p2 || l2.filter((y) => Kt(y.spec)).map((y) => y.id);
6025
6054
  })());
6026
- y.delete(u2.id), [...o.map((p2) => p2.column), ...a.map((p2) => p2.column)].filter((p2) => p2.type === "column").map((p2) => y.delete(p2.id));
6027
- const b = l2.filter((p2) => !y.has(p2.id)), f2 = Be(b.map(On), d), w2 = [
6055
+ m2.delete(u2.id), [...o.map((p2) => p2.column), ...a.map((p2) => p2.column)].filter((p2) => p2.type === "column").map((p2) => m2.delete(p2.id));
6056
+ const v = l2.filter((p2) => !m2.has(p2.id)), f2 = Je(v.map($n), c2), w2 = [
6028
6057
  ...u2.spec.axesSpec.map((p2) => ({
6029
6058
  type: "axis",
6030
6059
  id: p$1(p2),
@@ -6036,13 +6065,13 @@
6036
6065
  spec: p2.spec
6037
6066
  }))
6038
6067
  ];
6039
- if (!We([...b, ...f2])) return;
6040
- const c2 = t.createPTable(
6041
- Ge(l2, f2, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
6068
+ if (!Me([...v, ...f2])) return;
6069
+ const d = t.createPTable(
6070
+ Ue(l2, f2, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
6042
6071
  );
6043
6072
  return {
6044
6073
  tableSpec: w2,
6045
- tableHandle: c2
6074
+ tableHandle: d
6046
6075
  };
6047
6076
  }
6048
6077
  const ImportFileHandleSchema = z$2.string().optional().refine(
@@ -6068,7 +6097,7 @@
6068
6097
  numbers: z$2.array(z$2.coerce.number()),
6069
6098
  handles: z$2.array(ImportFileHandleSchema)
6070
6099
  });
6071
- const platforma = E.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
6100
+ const platforma = L.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
6072
6101
  if (ctx.args.numbers.length === 5) {
6073
6102
  throw new Error("argsValid: test error");
6074
6103
  }
@@ -6091,7 +6120,7 @@
6091
6120
  val: v.toString()
6092
6121
  };
6093
6122
  });
6094
- return Kn(
6123
+ return kn(
6095
6124
  ctx,
6096
6125
  [
6097
6126
  {
@@ -6144,7 +6173,7 @@
6144
6173
  val: v.toString()
6145
6174
  };
6146
6175
  });
6147
- return jn(
6176
+ return Rn(
6148
6177
  ctx,
6149
6178
  [
6150
6179
  {
@@ -6179,7 +6208,7 @@
6179
6208
  data
6180
6209
  }
6181
6210
  ],
6182
- vn({
6211
+ _n({
6183
6212
  name: "example"
6184
6213
  }),
6185
6214
  ctx.uiState.dataTableState.tableState,
@@ -6221,6 +6250,7 @@
6221
6250
  { type: "link", href: "/pl-ag-data-table-v2", label: "PlAgDataTableV2" },
6222
6251
  { type: "link", href: "/pl-splash-page", label: "PlSplashPage" },
6223
6252
  { type: "link", href: "/pl-file-input-page", label: "PlFileInputPage" },
6253
+ { type: "link", href: "/pl-error-boundary-page", label: "PlErrorBoundaryPage" },
6224
6254
  { type: "link", href: "/errors", label: "Errors" },
6225
6255
  { type: "link", href: "/text-fields", label: "PlTextField" },
6226
6256
  { type: "link", href: "/tabs", label: "PlTabs" },