@milaboratories/milaboratories.ui-examples.model 1.1.56 → 1.1.58

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 Le = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
38
+ const De = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
39
39
  var util;
40
40
  (function(util2) {
41
41
  util2.assertEqual = (val) => val;
@@ -87,7 +87,7 @@
87
87
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
88
88
  }
89
89
  util2.joinValues = joinValues;
90
- util2.jsonStringifyReplacer = (_2, value) => {
90
+ util2.jsonStringifyReplacer = (_, value) => {
91
91
  if (typeof value === "bigint") {
92
92
  return value.toString();
93
93
  }
@@ -3105,29 +3105,29 @@
3105
3105
  const params = { errorMap: ctx.common.contextualErrorMap };
3106
3106
  const fn = ctx.data;
3107
3107
  if (this._def.returns instanceof ZodPromise) {
3108
- const me = this;
3108
+ const me2 = this;
3109
3109
  return OK(async function(...args) {
3110
3110
  const error = new ZodError([]);
3111
- const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3111
+ const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
3112
3112
  error.addIssue(makeArgsIssue(args, e));
3113
3113
  throw error;
3114
3114
  });
3115
3115
  const result = await Reflect.apply(fn, this, parsedArgs);
3116
- const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3116
+ const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
3117
3117
  error.addIssue(makeReturnsIssue(result, e));
3118
3118
  throw error;
3119
3119
  });
3120
3120
  return parsedReturns;
3121
3121
  });
3122
3122
  } else {
3123
- const me = this;
3123
+ const me2 = this;
3124
3124
  return OK(function(...args) {
3125
- const parsedArgs = me._def.args.safeParse(args, params);
3125
+ const parsedArgs = me2._def.args.safeParse(args, params);
3126
3126
  if (!parsedArgs.success) {
3127
3127
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
3128
3128
  }
3129
3129
  const result = Reflect.apply(fn, this, parsedArgs.data);
3130
- const parsedReturns = me._def.returns.safeParse(result, params);
3130
+ const parsedReturns = me2._def.returns.safeParse(result, params);
3131
3131
  if (!parsedReturns.success) {
3132
3132
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
3133
3133
  }
@@ -3999,7 +3999,7 @@
3999
3999
  }
4000
4000
  }
4001
4001
  }
4002
- function F(n2) {
4002
+ function F$1(n2) {
4003
4003
  if (!n2 || typeof n2 != "object")
4004
4004
  return false;
4005
4005
  const e = n2;
@@ -4017,7 +4017,7 @@
4017
4017
  }
4018
4018
  }
4019
4019
  function yn(n2) {
4020
- return F(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4020
+ return F$1(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4021
4021
  }
4022
4022
  function hn(n2) {
4023
4023
  switch (n2.type) {
@@ -4095,7 +4095,7 @@
4095
4095
  return n2.map(p$1);
4096
4096
  }
4097
4097
  function Jn(n2) {
4098
- return Le(p$1(n2));
4098
+ return De(p$1(n2));
4099
4099
  }
4100
4100
  function z$1(n2, e) {
4101
4101
  if (n2 === void 0) return e === void 0;
@@ -4142,11 +4142,11 @@
4142
4142
  w(n2);
4143
4143
  }
4144
4144
  }
4145
- function G$1(n2) {
4146
- return Le(n2);
4145
+ function G(n2) {
4146
+ return De(n2);
4147
4147
  }
4148
4148
  function x(n2) {
4149
- return Le(p$1(n2));
4149
+ return De(p$1(n2));
4150
4150
  }
4151
4151
  function A(n2, e) {
4152
4152
  return JSON.stringify([n2, e]);
@@ -4242,7 +4242,7 @@
4242
4242
  * @returns A canonicalized string representation of the anchored column identifier
4243
4243
  */
4244
4244
  deriveS(e, t) {
4245
- return G$1(this.derive(e, t));
4245
+ return G(this.derive(e, t));
4246
4246
  }
4247
4247
  }
4248
4248
  function Dn(n2, e, t) {
@@ -4272,10 +4272,10 @@
4272
4272
  }
4273
4273
  r.domain = s2;
4274
4274
  }
4275
- return r.axes && (r.axes = r.axes.map((s2) => Q$1(n2, s2))), r;
4275
+ return r.axes && (r.axes = r.axes.map((s2) => Q(n2, s2))), r;
4276
4276
  }
4277
- function Q$1(n2, e) {
4278
- if (!Y(e))
4277
+ function Q(n2, e) {
4278
+ if (!Y$1(e))
4279
4279
  return e;
4280
4280
  const t = e.anchor, r = n2[t];
4281
4281
  if (!r)
@@ -4301,20 +4301,20 @@
4301
4301
  }
4302
4302
  throw new Error("Unsupported axis reference type");
4303
4303
  }
4304
- function Y(n2) {
4304
+ function Y$1(n2) {
4305
4305
  return typeof n2 == "object" && "anchor" in n2;
4306
4306
  }
4307
- function f(n2) {
4307
+ function f$1(n2) {
4308
4308
  return n2.kind === "PColumn";
4309
4309
  }
4310
- function Z(n2) {
4311
- return f(n2.spec);
4310
+ function Z$1(n2) {
4311
+ return f$1(n2.spec);
4312
4312
  }
4313
4313
  function jn(n2) {
4314
- if (!Z(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4314
+ if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4315
4315
  return n2;
4316
4316
  }
4317
- function Fn(n2, e) {
4317
+ function Fn$1(n2, e) {
4318
4318
  return n2 === void 0 ? void 0 : {
4319
4319
  ...n2,
4320
4320
  data: e(n2.data)
@@ -4363,7 +4363,7 @@
4363
4363
  }
4364
4364
  return true;
4365
4365
  }
4366
- function N$1(n2, e) {
4366
+ function N(n2, e) {
4367
4367
  if (e.name !== void 0 && n2.name !== e.name || e.namePattern !== void 0 && !new RegExp(e.namePattern).test(n2.name))
4368
4368
  return false;
4369
4369
  if (e.type !== void 0) {
@@ -4410,14 +4410,14 @@
4410
4410
  return true;
4411
4411
  }
4412
4412
  function Kn(n2) {
4413
- return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N$1(e, t)) : (e) => f(e) && N$1(e, n2);
4413
+ return Array.isArray(n2) ? (e) => n2.some((t) => f$1(e) && N(e, t)) : (e) => f$1(e) && N(e, n2);
4414
4414
  }
4415
- function Rn(n2) {
4415
+ function Rn$1(n2) {
4416
4416
  const e = {
4417
4417
  kind: n2.kind,
4418
4418
  name: n2.name
4419
4419
  };
4420
- return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = C(n2.axesSpec)), Le(e);
4420
+ return n2.domain !== void 0 && (e.domain = n2.domain), f$1(n2) && (e.axesSpec = C(n2.axesSpec)), De(e);
4421
4421
  }
4422
4422
  z$2.object({
4423
4423
  __isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -4446,6 +4446,9 @@
4446
4446
  }
4447
4447
  const sn = 24;
4448
4448
  z$2.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4449
+ function Yn(n2) {
4450
+ return JSON.parse(n2);
4451
+ }
4449
4452
  var stringify = { exports: {} };
4450
4453
  (function(module2, exports3) {
4451
4454
  exports3 = module2.exports = stringify2;
@@ -4498,54 +4501,54 @@
4498
4501
  cause: z$2.lazy(() => n).optional(),
4499
4502
  errors: z$2.lazy(() => n.array()).optional()
4500
4503
  });
4501
- var We = Object.defineProperty;
4502
- var Ge = (t, e, n2) => e in t ? We(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4503
- var T = (t, e, n2) => Ge(t, typeof e != "symbol" ? e + "" : e, n2);
4504
- function ee(t) {
4504
+ var ze = Object.defineProperty;
4505
+ var Ye = (t, e, n2) => e in t ? ze(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4506
+ var F = (t, e, n2) => Ye(t, typeof e != "symbol" ? e + "" : e, n2);
4507
+ function re(t) {
4505
4508
  return { type: "Immediate", value: t };
4506
4509
  }
4507
- function at() {
4510
+ function ft() {
4508
4511
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4509
4512
  }
4510
- function Ee(t) {
4513
+ function Re(t) {
4511
4514
  if (t && typeof globalThis.getPlatforma == "function")
4512
4515
  return globalThis.getPlatforma(t);
4513
4516
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4514
4517
  throw new Error("Can't get platforma instance.");
4515
4518
  }
4516
- function lt() {
4519
+ function ht() {
4517
4520
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4518
4521
  }
4519
- function y() {
4522
+ function f() {
4520
4523
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4521
4524
  throw new Error("Not in config rendering context");
4522
4525
  }
4523
- function M(t, e) {
4524
- const n2 = lt();
4526
+ function H(t, e) {
4527
+ const n2 = ht();
4525
4528
  if (n2 === void 0) return false;
4526
4529
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4527
4530
  return n2.callbackRegistry[t] = e, true;
4528
4531
  }
4529
- const ae = /* @__PURE__ */ new Map();
4530
- function ut(t, e) {
4531
- t in y().callbackRegistry || (y().callbackRegistry[t] = (n2) => {
4532
- for (const r of ae.get(t))
4532
+ const ue = /* @__PURE__ */ new Map();
4533
+ function gt(t, e) {
4534
+ t in f().callbackRegistry || (f().callbackRegistry[t] = (n2) => {
4535
+ for (const r of ue.get(t))
4533
4536
  r(n2);
4534
- }, ae.set(t, [])), ae.get(t).push(e);
4537
+ }, ue.set(t, [])), ue.get(t).push(e);
4535
4538
  }
4536
- class _ {
4539
+ class I {
4537
4540
  constructor(e, n2 = (r) => r) {
4538
- T(this, "isResolved", false);
4539
- T(this, "resolvedValue");
4540
- this.handle = e, this.postProcess = n2, ut(e, (r) => {
4541
+ F(this, "isResolved", false);
4542
+ F(this, "resolvedValue");
4543
+ this.handle = e, this.postProcess = n2, gt(e, (r) => {
4541
4544
  this.resolvedValue = n2(r), this.isResolved = true;
4542
4545
  });
4543
4546
  }
4544
4547
  map(e) {
4545
- return new _(this.handle, (n2) => e(this.postProcess(n2)));
4548
+ return new I(this.handle, (n2) => e(this.postProcess(n2)));
4546
4549
  }
4547
4550
  mapDefined(e) {
4548
- return new _(this.handle, (n2) => {
4551
+ return new I(this.handle, (n2) => {
4549
4552
  const r = this.postProcess(n2);
4550
4553
  return r ? e(r) : void 0;
4551
4554
  });
@@ -4554,10 +4557,10 @@
4554
4557
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4555
4558
  }
4556
4559
  }
4557
- function pe(t, e) {
4560
+ function de(t, e) {
4558
4561
  return t === void 0 ? void 0 : e(t);
4559
4562
  }
4560
- class L {
4563
+ class E {
4561
4564
  constructor(e, n2) {
4562
4565
  this.handle = e, this.resolvePath = n2;
4563
4566
  }
@@ -4596,47 +4599,47 @@
4596
4599
  ...this.resolvePath,
4597
4600
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4598
4601
  ];
4599
- return pe(
4600
- y().resolveWithCommon(this.handle, e, ...n2),
4601
- (i) => new L(i, r)
4602
+ return de(
4603
+ f().resolveWithCommon(this.handle, e, ...n2),
4604
+ (i) => new E(i, r)
4602
4605
  );
4603
4606
  }
4604
4607
  get resourceType() {
4605
- return y().getResourceType(this.handle);
4608
+ return f().getResourceType(this.handle);
4606
4609
  }
4607
4610
  getInputsLocked() {
4608
- return y().getInputsLocked(this.handle);
4611
+ return f().getInputsLocked(this.handle);
4609
4612
  }
4610
4613
  getOutputsLocked() {
4611
- return y().getOutputsLocked(this.handle);
4614
+ return f().getOutputsLocked(this.handle);
4612
4615
  }
4613
4616
  getIsReadyOrError() {
4614
- return y().getIsReadyOrError(this.handle);
4617
+ return f().getIsReadyOrError(this.handle);
4615
4618
  }
4616
4619
  getIsFinal() {
4617
- return y().getIsFinal(this.handle);
4620
+ return f().getIsFinal(this.handle);
4618
4621
  }
4619
4622
  getError() {
4620
4623
  const e = [...this.resolvePath, "error"];
4621
- return pe(
4622
- y().getError(this.handle),
4623
- (n2) => new L(n2, e)
4624
+ return de(
4625
+ f().getError(this.handle),
4626
+ (n2) => new E(n2, e)
4624
4627
  );
4625
4628
  }
4626
4629
  listInputFields() {
4627
- return y().listInputFields(this.handle);
4630
+ return f().listInputFields(this.handle);
4628
4631
  }
4629
4632
  listOutputFields() {
4630
- return y().listOutputFields(this.handle);
4633
+ return f().listOutputFields(this.handle);
4631
4634
  }
4632
4635
  listDynamicFields() {
4633
- return y().listDynamicFields(this.handle);
4636
+ return f().listDynamicFields(this.handle);
4634
4637
  }
4635
4638
  getKeyValueBase64(e) {
4636
- return y().getKeyValueBase64(this.handle, e);
4639
+ return f().getKeyValueBase64(this.handle, e);
4637
4640
  }
4638
4641
  getKeyValueAsString(e) {
4639
- return y().getKeyValueAsString(this.handle, e);
4642
+ return f().getKeyValueAsString(this.handle, e);
4640
4643
  }
4641
4644
  getKeyValueAsJson(e) {
4642
4645
  const n2 = this.getKeyValueAsString(e);
@@ -4644,10 +4647,10 @@
4644
4647
  return JSON.parse(n2);
4645
4648
  }
4646
4649
  getDataBase64() {
4647
- return y().getDataBase64(this.handle);
4650
+ return f().getDataBase64(this.handle);
4648
4651
  }
4649
4652
  getDataAsString() {
4650
- return y().getDataAsString(this.handle);
4653
+ return f().getDataAsString(this.handle);
4651
4654
  }
4652
4655
  getDataAsJson() {
4653
4656
  const e = this.getDataAsString();
@@ -4660,7 +4663,7 @@
4660
4663
  getPColumns(e = false, n2 = "") {
4661
4664
  const r = this.parsePObjectCollection(e, n2);
4662
4665
  return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
4663
- if (!Z(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4666
+ if (!Z$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4664
4667
  return s2;
4665
4668
  });
4666
4669
  }
@@ -4668,7 +4671,7 @@
4668
4671
  *
4669
4672
  */
4670
4673
  parsePObjectCollection(e = false, n2 = "") {
4671
- const r = y().parsePObjectCollection(
4674
+ const r = f().parsePObjectCollection(
4672
4675
  this.handle,
4673
4676
  e,
4674
4677
  n2,
@@ -4678,19 +4681,19 @@
4678
4681
  const i = {};
4679
4682
  for (const [s2, o] of Object.entries(r)) {
4680
4683
  const a = [...this.resolvePath, s2];
4681
- i[s2] = Fn(o, (l2) => new L(l2, a));
4684
+ i[s2] = Fn$1(o, (l2) => new E(l2, a));
4682
4685
  }
4683
4686
  return i;
4684
4687
  }
4685
4688
  getFileContentAsBase64() {
4686
- return new _(y().getBlobContentAsBase64(this.handle));
4689
+ return new I(f().getBlobContentAsBase64(this.handle));
4687
4690
  }
4688
4691
  getFileContentAsString() {
4689
- return new _(y().getBlobContentAsString(this.handle));
4692
+ return new I(f().getBlobContentAsString(this.handle));
4690
4693
  }
4691
4694
  getFileContentAsJson() {
4692
- return new _(
4693
- y().getBlobContentAsString(this.handle)
4695
+ return new I(
4696
+ f().getBlobContentAsString(this.handle)
4694
4697
  ).mapDefined((e) => JSON.parse(e));
4695
4698
  }
4696
4699
  /**
@@ -4709,7 +4712,7 @@
4709
4712
  * @returns downloaded file handle
4710
4713
  */
4711
4714
  getFileHandle() {
4712
- return new _(y().getDownloadedBlobContentHandle(this.handle));
4715
+ return new I(f().getDownloadedBlobContentHandle(this.handle));
4713
4716
  }
4714
4717
  /**
4715
4718
  * @deprecated use getFileHandle
@@ -4721,7 +4724,7 @@
4721
4724
  * @returns downloaded file handle
4722
4725
  */
4723
4726
  getRemoteFileHandle() {
4724
- return new _(y().getOnDemandBlobContentHandle(this.handle));
4727
+ return new I(f().getOnDemandBlobContentHandle(this.handle));
4725
4728
  }
4726
4729
  /**
4727
4730
  * @deprecated use getRemoteFileHandle
@@ -4733,22 +4736,22 @@
4733
4736
  * @returns the url to the extracted folder
4734
4737
  */
4735
4738
  extractArchiveAndGetURL(e) {
4736
- return new _(y().extractArchiveAndGetURL(this.handle, e));
4739
+ return new I(f().extractArchiveAndGetURL(this.handle, e));
4737
4740
  }
4738
4741
  getImportProgress() {
4739
- return new _(y().getImportProgress(this.handle));
4742
+ return new I(f().getImportProgress(this.handle));
4740
4743
  }
4741
4744
  getLastLogs(e) {
4742
- return new _(y().getLastLogs(this.handle, e));
4745
+ return new I(f().getLastLogs(this.handle, e));
4743
4746
  }
4744
4747
  getProgressLog(e) {
4745
- return new _(y().getProgressLog(this.handle, e));
4748
+ return new I(f().getProgressLog(this.handle, e));
4746
4749
  }
4747
4750
  getProgressLogWithInfo(e) {
4748
- return new _(y().getProgressLogWithInfo(this.handle, e));
4751
+ return new I(f().getProgressLogWithInfo(this.handle, e));
4749
4752
  }
4750
4753
  getLogHandle() {
4751
- return new _(y().getLogHandle(this.handle));
4754
+ return new I(f().getLogHandle(this.handle));
4752
4755
  }
4753
4756
  allFieldsResolved(e = "Input") {
4754
4757
  switch (e) {
@@ -4777,132 +4780,132 @@
4777
4780
  return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, d]) => o(u2, d));
4778
4781
  }
4779
4782
  }
4780
- const Fe = "staging", Oe = "main";
4781
- const dt = "pl7.app/label", ft = "pl7.app/trace", ht = z$2.object({
4783
+ const Oe = "staging", ke = "main";
4784
+ const vt = "pl7.app/label", bt = "pl7.app/trace", wt = z$2.object({
4782
4785
  type: z$2.string(),
4783
4786
  importance: z$2.number().optional(),
4784
4787
  id: z$2.string().optional(),
4785
4788
  label: z$2.string()
4786
- }), gt = z$2.array(ht), mt = 1e-3, yt = "__LABEL__", xe = "__LABEL__@1";
4787
- function Re(t, e, n2 = {}) {
4788
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((h2) => {
4789
- var O, U;
4790
- const c2 = e(h2);
4791
- let m2, b, A2;
4792
- "spec" in c2 && typeof c2.spec == "object" ? (m2 = c2.spec, b = c2.prefixTrace, A2 = c2.suffixTrace) : m2 = c2;
4793
- const p2 = (O = m2.annotations) == null ? void 0 : O[dt], g = (U = m2.annotations) == null ? void 0 : U[ft], w2 = (g ? gt.safeParse(JSON.parse(g)).data : void 0) ?? [], f2 = [
4794
- ...b ?? [],
4795
- ...w2,
4796
- ...A2 ?? []
4789
+ }), At = z$2.array(wt), xt = 1e-3, Pt = "__LABEL__", Ce = "__LABEL__@1";
4790
+ function Ve(t, e, n2 = {}) {
4791
+ 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((g) => {
4792
+ var S, O;
4793
+ const m2 = e(g);
4794
+ let c2, v, b;
4795
+ "spec" in m2 && typeof m2.spec == "object" ? (c2 = m2.spec, v = m2.prefixTrace, b = m2.suffixTrace) : c2 = m2;
4796
+ const p2 = (S = c2.annotations) == null ? void 0 : S[vt], A2 = (O = c2.annotations) == null ? void 0 : O[bt], x2 = (A2 ? At.safeParse(JSON.parse(A2)).data : void 0) ?? [], y = [
4797
+ ...v ?? [],
4798
+ ...x2,
4799
+ ...b ?? []
4797
4800
  ];
4798
4801
  if (p2 !== void 0) {
4799
- const F2 = { label: p2, type: yt, importance: -2 };
4800
- n2.addLabelAsSuffix ? f2.push(F2) : f2.splice(0, 0, F2);
4801
- }
4802
- const C2 = [], P = /* @__PURE__ */ new Map();
4803
- for (let F2 = f2.length - 1; F2 >= 0; --F2) {
4804
- const { type: D2 } = f2[F2], Y2 = f2[F2].importance ?? 0, V = (P.get(D2) ?? 0) + 1;
4805
- P.set(D2, V);
4806
- const R = `${D2}@${V}`;
4807
- i.set(R, (i.get(R) ?? 0) + 1), r.set(
4808
- R,
4802
+ const D2 = { label: p2, type: Pt, importance: -2 };
4803
+ n2.addLabelAsSuffix ? y.push(D2) : y.splice(0, 0, D2);
4804
+ }
4805
+ const P = [], T = /* @__PURE__ */ new Map();
4806
+ for (let D2 = y.length - 1; D2 >= 0; --D2) {
4807
+ const { type: W } = y[D2], j = y[D2].importance ?? 0, $2 = (T.get(W) ?? 0) + 1;
4808
+ T.set(W, $2);
4809
+ const k2 = `${W}@${$2}`;
4810
+ s2.set(k2, (s2.get(k2) ?? 0) + 1), r.set(
4811
+ k2,
4809
4812
  Math.max(
4810
- r.get(R) ?? Number.NEGATIVE_INFINITY,
4811
- Y2 - (f2.length - F2) * mt
4813
+ r.get(k2) ?? Number.NEGATIVE_INFINITY,
4814
+ j - (y.length - D2) * xt
4812
4815
  )
4813
- ), C2.push({ ...f2[F2], fullType: R, occurrenceIndex: V });
4816
+ ), P.push({ ...y[D2], fullType: k2, occurrenceIndex: $2 });
4814
4817
  }
4815
- return C2.reverse(), {
4816
- value: h2,
4817
- spec: m2,
4818
+ return P.reverse(), {
4819
+ value: g,
4820
+ spec: c2,
4818
4821
  label: p2,
4819
- fullTrace: C2
4822
+ fullTrace: P
4820
4823
  };
4821
- }), o = [], a = [], l2 = [...r];
4822
- l2.sort(([, h2], [, c2]) => c2 - h2);
4823
- for (const [h2] of l2)
4824
- h2.endsWith("@1") || i.get(h2) === t.length ? o.push(h2) : a.push(h2);
4825
- const u2 = (h2, c2 = false) => {
4826
- const m2 = [];
4827
- for (let b = 0; b < s2.length; b++) {
4828
- const A2 = s2[b], p2 = A2.fullTrace.filter((f2) => h2.has(f2.fullType));
4824
+ }), a = [], l2 = [], u2 = [...r];
4825
+ u2.sort(([, g], [, m2]) => m2 - g);
4826
+ for (const [g] of u2)
4827
+ g.endsWith("@1") || s2.get(g) === t.length ? a.push(g) : l2.push(g);
4828
+ const d = (g, m2 = false) => {
4829
+ const c2 = [];
4830
+ for (let v = 0; v < o.length; v++) {
4831
+ const b = o[v], p2 = b.fullTrace.filter((y) => g.has(y.fullType) || i && i.has(y.type));
4829
4832
  if (p2.length === 0)
4830
- if (c2)
4831
- m2.push({
4833
+ if (m2)
4834
+ c2.push({
4832
4835
  label: "Unlabeled",
4833
- value: A2.value
4836
+ value: b.value
4834
4837
  });
4835
4838
  else return;
4836
- const g = p2.map((f2) => f2.label), w2 = n2.separator ?? " / ";
4837
- m2.push({
4838
- label: g.join(w2),
4839
- value: A2.value
4839
+ const A2 = p2.map((y) => y.label), x2 = n2.separator ?? " / ";
4840
+ c2.push({
4841
+ label: A2.join(x2),
4842
+ value: b.value
4840
4843
  });
4841
4844
  }
4842
- return m2;
4845
+ return c2;
4843
4846
  };
4844
- if (o.length === 0) {
4845
- if (a.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
4846
- return u2(new Set(xe), true);
4847
- }
4848
- let d = 0, v = -1;
4849
- for (; d < o.length; ) {
4850
- const h2 = /* @__PURE__ */ new Set();
4851
- n2.includeNativeLabel && h2.add(xe);
4852
- for (let m2 = 0; m2 < d; ++m2) h2.add(o[m2]);
4853
- v >= 0 && h2.add(o[v]);
4854
- const c2 = u2(h2);
4855
- if (c2 !== void 0 && new Set(c2.map((m2) => m2.label)).size === t.length) return c2;
4856
- v++, v >= o.length && (d++, v = d);
4857
- }
4858
- return u2(/* @__PURE__ */ new Set([...o, ...a]), true);
4859
- }
4860
- const z = "PColumnData/", re = z + "ResourceMap", ie = z + "Partitioned/ResourceMap", W = z + "JsonPartitioned", N = z + "BinaryPartitioned", ke = z + "Partitioned/", se = ke + "JsonPartitioned", G = ke + "BinaryPartitioned";
4861
- const fe = (t) => {
4847
+ if (a.length === 0) {
4848
+ if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
4849
+ return d(new Set(Ce), true);
4850
+ }
4851
+ let h2 = 0, w2 = -1;
4852
+ for (; h2 < a.length; ) {
4853
+ const g = /* @__PURE__ */ new Set();
4854
+ n2.includeNativeLabel && g.add(Ce);
4855
+ for (let c2 = 0; c2 < h2; ++c2) g.add(a[c2]);
4856
+ w2 >= 0 && g.add(a[w2]);
4857
+ const m2 = d(g);
4858
+ if (m2 !== void 0 && new Set(m2.map((c2) => c2.label)).size === t.length) return m2;
4859
+ w2++, w2 >= a.length && (h2++, w2 = h2);
4860
+ }
4861
+ return d(/* @__PURE__ */ new Set([...a, ...l2]), true);
4862
+ }
4863
+ const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ke = Z + "Partitioned/", ae = Ke + "JsonPartitioned", z = Ke + "BinaryPartitioned";
4864
+ const he = (t) => {
4862
4865
  if (t.endsWith(".index"))
4863
4866
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
4864
4867
  if (t.endsWith(".values"))
4865
4868
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4866
4869
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4867
4870
  };
4868
- function vt(t) {
4871
+ function Ct(t) {
4869
4872
  if (!t) return;
4870
4873
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4871
4874
  let i = 0;
4872
4875
  switch (e) {
4873
- case re:
4876
+ case se:
4874
4877
  i = n2.keyLength;
4875
4878
  break;
4876
- case ie:
4879
+ case oe:
4877
4880
  i = n2.partitionKeyLength + n2.keyLength;
4878
4881
  break;
4879
- case W:
4880
- case N:
4882
+ case q:
4883
+ case B:
4881
4884
  i = n2.partitionKeyLength;
4882
4885
  break;
4883
- case G:
4884
- case se:
4886
+ case z:
4887
+ case ae:
4885
4888
  i = n2.superPartitionKeyLength + n2.partitionKeyLength;
4886
4889
  break;
4887
4890
  }
4888
4891
  switch (e) {
4889
- case re:
4890
- case W:
4891
- case N:
4892
+ case se:
4893
+ case q:
4894
+ case B:
4892
4895
  for (let s2 of t.listInputFields()) {
4893
- e === N && (s2 = fe(s2).baseKey);
4896
+ e === B && (s2 = he(s2).baseKey);
4894
4897
  const o = [...JSON.parse(s2)];
4895
4898
  r.push(o);
4896
4899
  }
4897
4900
  break;
4898
- case ie:
4899
- case G:
4900
- case se:
4901
+ case oe:
4902
+ case z:
4903
+ case ae:
4901
4904
  for (const s2 of t.listInputFields()) {
4902
4905
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4903
4906
  if (a !== void 0)
4904
4907
  for (let l2 of a.listInputFields()) {
4905
- e === G && (l2 = fe(l2).baseKey);
4908
+ e === z && (l2 = he(l2).baseKey);
4906
4909
  const u2 = [...o, ...JSON.parse(l2)];
4907
4910
  r.push(u2);
4908
4911
  }
@@ -4911,7 +4914,7 @@
4911
4914
  }
4912
4915
  return { data: r, keyLength: i };
4913
4916
  }
4914
- function bt(t) {
4917
+ function St(t) {
4915
4918
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4916
4919
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4917
4920
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4930,11 +4933,11 @@
4930
4933
  }
4931
4934
  return r.map((i) => Array.from(i.values()));
4932
4935
  }
4933
- function wt(t) {
4936
+ function _t(t) {
4934
4937
  if (t === void 0) return;
4935
- if (F(t))
4936
- return bt(t);
4937
- const e = vt(t);
4938
+ if (F$1(t))
4939
+ return St(t);
4940
+ const e = Ct(t);
4938
4941
  if (!e) return;
4939
4942
  const { data: n2, keyLength: r } = e, i = [];
4940
4943
  for (let s2 = 0; s2 < r; ++s2)
@@ -4947,16 +4950,16 @@
4947
4950
  }
4948
4951
  return i.map((s2) => Array.from(s2.values()));
4949
4952
  }
4950
- function he(t, e = []) {
4953
+ function ge(t, e = []) {
4951
4954
  if (t === void 0 || !t.getIsReadyOrError()) return;
4952
4955
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4953
- if (e.length > 0 && (n2 === se || n2 === G))
4956
+ if (e.length > 0 && (n2 === ae || n2 === z))
4954
4957
  throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
4955
4958
  switch (n2) {
4956
- case re:
4957
- case ie:
4959
+ case se:
4960
+ case oe:
4958
4961
  throw new Error(`Only data columns are supported, got: ${n2}`);
4959
- case W: {
4962
+ case q: {
4960
4963
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4961
4964
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4962
4965
  const i = [];
@@ -4972,12 +4975,12 @@
4972
4975
  parts: i
4973
4976
  };
4974
4977
  }
4975
- case N: {
4978
+ case B: {
4976
4979
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4977
4980
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4978
4981
  const i = [], s2 = /* @__PURE__ */ new Map();
4979
4982
  for (const o of t.listInputFields()) {
4980
- const a = fe(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4983
+ const a = he(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4981
4984
  if (l2 === void 0) return;
4982
4985
  let u2 = s2.get(a.baseKey);
4983
4986
  u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
@@ -4999,16 +5002,16 @@
4999
5002
  parts: i
5000
5003
  };
5001
5004
  }
5002
- case se: {
5005
+ case ae: {
5003
5006
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
5004
5007
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
5005
5008
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
5006
5009
  for (const o of t.listInputFields()) {
5007
5010
  const a = t.resolve({ field: o, assertFieldType: "Input" });
5008
5011
  if (a === void 0) return;
5009
- if (a.resourceType.name !== W)
5010
- throw new Error(`Expected ${W} inside ${n2}, but got ${a.resourceType.name}`);
5011
- const l2 = he(a, JSON.parse(o));
5012
+ if (a.resourceType.name !== q)
5013
+ throw new Error(`Expected ${q} inside ${n2}, but got ${a.resourceType.name}`);
5014
+ const l2 = ge(a, JSON.parse(o));
5012
5015
  if (l2 === void 0) return;
5013
5016
  if (l2.type !== "JsonPartitioned")
5014
5017
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5020,16 +5023,16 @@
5020
5023
  parts: s2
5021
5024
  };
5022
5025
  }
5023
- case G: {
5026
+ case z: {
5024
5027
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
5025
5028
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
5026
5029
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
5027
5030
  for (const o of t.listInputFields()) {
5028
5031
  const a = t.resolve({ field: o, assertFieldType: "Input" });
5029
5032
  if (a === void 0) return;
5030
- if (a.resourceType.name !== N)
5031
- throw new Error(`Expected ${N} inside ${n2}, but got ${a.resourceType.name}`);
5032
- const l2 = he(a, JSON.parse(o));
5033
+ if (a.resourceType.name !== B)
5034
+ throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
5035
+ const l2 = ge(a, JSON.parse(o));
5033
5036
  if (l2 === void 0) return;
5034
5037
  if (l2.type !== "BinaryPartitioned")
5035
5038
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5045,15 +5048,15 @@
5045
5048
  throw new Error(`Unknown resource type: ${n2}`);
5046
5049
  }
5047
5050
  }
5048
- function At(t) {
5051
+ function It(t) {
5049
5052
  if (t !== void 0) {
5050
- if (F(t)) return t;
5053
+ if (F$1(t)) return t;
5051
5054
  if (pn(t)) return hn(t);
5052
- if (t instanceof L) return he(t);
5055
+ if (t instanceof E) return ge(t);
5053
5056
  throw new Error(`Unexpected input type: ${typeof t}`);
5054
5057
  }
5055
5058
  }
5056
- function xt(t, e) {
5059
+ function Tt(t, e) {
5057
5060
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5058
5061
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5059
5062
  const { partitionKeyLength: s2 } = t;
@@ -5113,7 +5116,7 @@
5113
5116
  }
5114
5117
  }
5115
5118
  }
5116
- class Pt {
5119
+ class Lt {
5117
5120
  constructor(e) {
5118
5121
  this.columns = e;
5119
5122
  }
@@ -5122,7 +5125,7 @@
5122
5125
  return this.columns.filter((r) => n2(r.spec));
5123
5126
  }
5124
5127
  }
5125
- function Ct(t) {
5128
+ function Et(t) {
5126
5129
  if (t)
5127
5130
  return t.map((e) => ({
5128
5131
  type: `split:${Jn(e.axisId)}`,
@@ -5131,21 +5134,21 @@
5131
5134
  // High importance for split filters in labels
5132
5135
  }));
5133
5136
  }
5134
- function St(t) {
5137
+ function Dt(t) {
5135
5138
  if (t)
5136
5139
  return t.map((e) => [e.axisIdx, e.value]);
5137
5140
  }
5138
- function _t(t, e) {
5141
+ function Ft(t, e) {
5139
5142
  if (!e || e.length === 0) return t;
5140
5143
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5141
- return Le({ id: t, axisFilters: n2 });
5144
+ return De({ id: t, axisFilters: n2 });
5142
5145
  }
5143
- function It(t) {
5146
+ function Se(t) {
5144
5147
  if (!t || typeof t != "object") return false;
5145
5148
  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);
5146
5149
  return !!e.domainAnchor || n2 || r;
5147
5150
  }
5148
- function Lt(t) {
5151
+ function Rt(t) {
5149
5152
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5150
5153
  return [];
5151
5154
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5153,11 +5156,11 @@
5153
5156
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
5154
5157
  return e.sort((n2, r) => n2 - r), e;
5155
5158
  }
5156
- class ge {
5159
+ class me {
5157
5160
  constructor() {
5158
- T(this, "defaultProviderStore", []);
5159
- T(this, "providers", [new Pt(this.defaultProviderStore)]);
5160
- T(this, "axisLabelProviders", []);
5161
+ F(this, "defaultProviderStore", []);
5162
+ F(this, "providers", [new Lt(this.defaultProviderStore)]);
5163
+ F(this, "axisLabelProviders", []);
5161
5164
  }
5162
5165
  addColumnProvider(e) {
5163
5166
  return this.providers.push(e), this;
@@ -5179,119 +5182,133 @@
5179
5182
  }
5180
5183
  }
5181
5184
  getUniversalEntries(e, n2) {
5182
- const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false } = n2 ?? {}, a = {
5185
+ const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false, exclude: a } = n2 ?? {}, l2 = {
5183
5186
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
5184
5187
  ...i ?? {}
5185
- }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [], d = /* @__PURE__ */ new Set();
5186
- for (const c2 of l2) {
5187
- const m2 = It(c2);
5188
+ };
5189
+ let u2 = () => false;
5190
+ if (a) {
5191
+ const c2 = (Array.isArray(a) ? a : [a]).map((v) => {
5192
+ if (Se(v)) {
5193
+ if (!r)
5194
+ throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
5195
+ return Kn(Dn(r.anchors, v, n2));
5196
+ } else
5197
+ return Kn(v);
5198
+ });
5199
+ u2 = (v) => c2.some((b) => b(v));
5200
+ }
5201
+ const d = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h2 = [], w2 = /* @__PURE__ */ new Set();
5202
+ for (const c2 of d) {
5203
+ const v = Se(c2);
5188
5204
  let b;
5189
- if (m2) {
5205
+ if (v) {
5190
5206
  if (!r)
5191
5207
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5192
5208
  b = Dn(r.anchors, c2, n2);
5193
5209
  } else
5194
5210
  b = c2;
5195
- const A2 = /* @__PURE__ */ new Set(), p2 = [];
5196
- for (const f2 of this.providers) {
5197
- const C2 = f2.selectColumns(b);
5198
- for (const P of C2) {
5199
- if (A2.has(P.id))
5200
- throw new Error(`Duplicate column id ${P.id} in provider ${f2.constructor.name}`);
5201
- const O = Rn(P.spec);
5202
- d.has(O) || (A2.add(P.id), d.add(O), p2.push(P));
5211
+ const p2 = /* @__PURE__ */ new Set(), A2 = [];
5212
+ for (const P of this.providers) {
5213
+ const T = P.selectColumns(b);
5214
+ for (const S of T) {
5215
+ if (u2(S.spec)) continue;
5216
+ if (p2.has(S.id))
5217
+ throw new Error(`Duplicate column id ${S.id} in provider ${P.constructor.name}`);
5218
+ const O = Rn$1(S.spec);
5219
+ w2.has(O) || (p2.add(S.id), w2.add(O), A2.push(S));
5203
5220
  }
5204
5221
  }
5205
- if (p2.length === 0) continue;
5206
- const g = Lt(c2), w2 = g.length > 0;
5207
- for (const f$1 of p2) {
5208
- if (!f(f$1.spec)) continue;
5209
- const C2 = f$1.spec;
5210
- if (w2) {
5211
- const P = At(f$1.data);
5212
- if (!P) {
5222
+ if (A2.length === 0) continue;
5223
+ const x2 = Rt(c2), y = x2.length > 0;
5224
+ for (const P of A2) {
5225
+ if (!f$1(P.spec)) continue;
5226
+ const T = P.spec;
5227
+ if (y) {
5228
+ const S = It(P.data);
5229
+ if (!S) {
5213
5230
  if (s2) continue;
5214
5231
  return;
5215
5232
  }
5216
- if (!yn(P))
5217
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P.type} for column ${f$1.id}`);
5218
- const O = wt(P), U = g[g.length - 1];
5219
- if (U >= P.partitionKeyLength)
5220
- throw new Error(`Not enough partition keys (${P.partitionKeyLength}) for requested split axes (max index ${U}) in column ${C2.name}`);
5221
- const F2 = g.map((S) => this.findLabels(p$1(C2.axesSpec[S]))), D2 = [], Y2 = (S, B) => {
5222
- if (B >= g.length) {
5223
- if (D2.push([...S]), D2.length > 1e4)
5233
+ if (!yn(S))
5234
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${P.id}`);
5235
+ const O = _t(S), D2 = x2[x2.length - 1];
5236
+ if (D2 >= S.partitionKeyLength)
5237
+ throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D2}) in column ${T.name}`);
5238
+ const W = x2.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j = [], $2 = (_, G2) => {
5239
+ if (G2 >= x2.length) {
5240
+ if (j.push([..._]), j.length > 1e4)
5224
5241
  throw new Error("Too many key combinations, aborting.");
5225
5242
  return;
5226
5243
  }
5227
- const k2 = g[B];
5228
- if (k2 >= O.length)
5229
- throw new Error(`Axis index ${k2} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${f$1.id}`);
5230
- const K = O[k2];
5231
- if (!K || K.length === 0) {
5232
- D2.length = 0;
5244
+ const V = x2[G2];
5245
+ if (V >= O.length)
5246
+ throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${P.id}`);
5247
+ const J = O[V];
5248
+ if (!J || J.length === 0) {
5249
+ j.length = 0;
5233
5250
  return;
5234
5251
  }
5235
- for (const X2 of K)
5236
- S.push(X2), Y2(S, B + 1), S.pop();
5252
+ for (const ee of J)
5253
+ _.push(ee), $2(_, G2 + 1), _.pop();
5237
5254
  };
5238
- if (Y2([], 0), D2.length === 0)
5255
+ if ($2([], 0), j.length === 0)
5239
5256
  continue;
5240
- const V = [...C2.axesSpec], R = g.map((S) => S);
5241
- for (let S = g.length - 1; S >= 0; S--)
5242
- V.splice(g[S], 1);
5243
- const Ue = { ...C2, axesSpec: V };
5244
- for (const S of D2) {
5245
- const B = S.map((k2, K) => {
5246
- const X2 = R[K], Be = p$1(C2.axesSpec[X2]), oe = F2[K], Me = (oe == null ? void 0 : oe[k2]) ?? String(k2);
5247
- return { axisIdx: X2, axisId: Be, value: k2, label: Me };
5257
+ const k2 = [...T.axesSpec], We = x2.map((_) => _);
5258
+ for (let _ = x2.length - 1; _ >= 0; _--)
5259
+ k2.splice(x2[_], 1);
5260
+ const Ge = { ...T, axesSpec: k2 };
5261
+ for (const _ of j) {
5262
+ const G2 = _.map((V, J) => {
5263
+ const ee = We[J], He = p$1(T.axesSpec[ee]), le = W[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
5264
+ return { axisIdx: ee, axisId: He, value: V, label: qe };
5248
5265
  });
5249
- u2.push({
5266
+ h2.push({
5250
5267
  type: "split",
5251
- originalColumn: f$1,
5252
- spec: C2,
5253
- adjustedSpec: Ue,
5254
- dataEntries: P,
5255
- axisFilters: B
5268
+ originalColumn: P,
5269
+ spec: T,
5270
+ adjustedSpec: Ge,
5271
+ dataEntries: S,
5272
+ axisFilters: G2
5256
5273
  });
5257
5274
  }
5258
5275
  } else
5259
- u2.push({
5276
+ h2.push({
5260
5277
  type: "direct",
5261
- originalColumn: f$1,
5262
- spec: C2,
5263
- adjustedSpec: C2
5278
+ originalColumn: P,
5279
+ spec: T,
5280
+ adjustedSpec: T
5264
5281
  });
5265
5282
  }
5266
5283
  }
5267
- if (u2.length === 0) return [];
5268
- const v = Re(
5269
- u2,
5284
+ if (h2.length === 0) return [];
5285
+ const g = Ve(
5286
+ h2,
5270
5287
  (c2) => ({
5271
5288
  spec: c2.spec,
5272
- suffixTrace: c2.type === "split" ? Ct(c2.axisFilters) : void 0
5289
+ suffixTrace: c2.type === "split" ? Et(c2.axisFilters) : void 0
5273
5290
  }),
5274
- a
5275
- ), h2 = [];
5276
- for (const { value: c2, label: m2 } of v) {
5277
- const { originalColumn: b, spec: A2 } = c2, p2 = c2.type === "split" ? c2.axisFilters : void 0, g = St(p2);
5278
- let w2;
5279
- r ? w2 = r.deriveS(A2, g) : w2 = _t(b.id, g);
5280
- let f2 = { ...c2.adjustedSpec };
5281
- o && (f2 = {
5282
- ...f2,
5291
+ l2
5292
+ ), m2 = [];
5293
+ for (const { value: c2, label: v } of g) {
5294
+ const { originalColumn: b, spec: p2 } = c2, A2 = c2.type === "split" ? c2.axisFilters : void 0, x2 = Dt(A2);
5295
+ let y;
5296
+ r ? y = r.deriveS(p2, x2) : y = Ft(b.id, x2);
5297
+ let P = { ...c2.adjustedSpec };
5298
+ o && (P = {
5299
+ ...P,
5283
5300
  annotations: {
5284
- ...f2.annotations ?? {},
5285
- "pl7.app/label": m2
5301
+ ...P.annotations ?? {},
5302
+ "pl7.app/label": v
5286
5303
  }
5287
- }), h2.push({
5288
- id: w2,
5289
- spec: f2,
5290
- data: () => c2.type === "split" ? gn(xt(c2.dataEntries, g)) : c2.originalColumn.data,
5291
- label: m2
5304
+ }), m2.push({
5305
+ id: y,
5306
+ spec: P,
5307
+ data: () => c2.type === "split" ? gn(Tt(c2.dataEntries, x2)) : c2.originalColumn.data,
5308
+ label: v
5292
5309
  });
5293
5310
  }
5294
- return h2;
5311
+ return m2;
5295
5312
  }
5296
5313
  getColumns(e, n2) {
5297
5314
  const r = this.getUniversalEntries(e, {
@@ -5316,19 +5333,19 @@
5316
5333
  return i;
5317
5334
  }
5318
5335
  }
5319
- function le(t, e) {
5336
+ function ce(t, e) {
5320
5337
  if (t === void 0) return e === void 0;
5321
5338
  if (e === void 0) return true;
5322
5339
  for (const n2 in e)
5323
5340
  if (t[n2] !== e[n2]) return false;
5324
5341
  return true;
5325
5342
  }
5326
- function Pe(t) {
5327
- return Fn(t, (e) => e instanceof L ? e.handle : pn(e) ? ln(e, (n2) => n2.handle) : e);
5343
+ function _e(t) {
5344
+ return Fn$1(t, (e) => e instanceof E ? e.handle : pn(e) ? ln(e, (n2) => n2.handle) : e);
5328
5345
  }
5329
- class Tt {
5346
+ class Ot {
5330
5347
  constructor() {
5331
- T(this, "ctx", y());
5348
+ F(this, "ctx", f());
5332
5349
  }
5333
5350
  /**
5334
5351
  * @deprecated use getOptions()
@@ -5339,7 +5356,7 @@
5339
5356
  getOptions(e, n2) {
5340
5357
  const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5341
5358
  let s2 = {}, o = false;
5342
- 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" ? Re(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5359
+ 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 }) => ({
5343
5360
  ref: Hn(a, o),
5344
5361
  label: l2
5345
5362
  })) : i.map(({ ref: a, obj: l2 }) => ({
@@ -5371,7 +5388,7 @@
5371
5388
  getAnchoredPColumns(e, n2, r) {
5372
5389
  const i = this.resolveAnchorCtx(e);
5373
5390
  if (i)
5374
- return new ge().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5391
+ return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5375
5392
  ...r,
5376
5393
  anchorCtx: i
5377
5394
  });
@@ -5408,7 +5425,7 @@
5408
5425
  getCanonicalOptions(e, n2, r) {
5409
5426
  const i = this.resolveAnchorCtx(e);
5410
5427
  if (!i) return;
5411
- const s2 = new ge().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5428
+ const s2 = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5412
5429
  ...r,
5413
5430
  anchorCtx: i
5414
5431
  });
@@ -5432,7 +5449,7 @@
5432
5449
  ref: n2.ref,
5433
5450
  obj: {
5434
5451
  ...n2.obj,
5435
- data: new L(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5452
+ data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5436
5453
  }
5437
5454
  }))
5438
5455
  };
@@ -5453,7 +5470,7 @@
5453
5470
  ...n2.obj,
5454
5471
  data: Wn(
5455
5472
  n2.obj.data,
5456
- (r) => new L(r, [n2.ref.blockId, n2.ref.name])
5473
+ (r) => new E(r, [n2.ref.blockId, n2.ref.name])
5457
5474
  )
5458
5475
  }
5459
5476
  }))
@@ -5480,9 +5497,9 @@
5480
5497
  )) == null ? void 0 : r.obj;
5481
5498
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5482
5499
  if (n2)
5483
- return Fn(
5500
+ return Fn$1(
5484
5501
  n2,
5485
- (i) => new L(i, [e.blockId, e.name])
5502
+ (i) => new E(i, [e.blockId, e.name])
5486
5503
  );
5487
5504
  }
5488
5505
  /**
@@ -5503,7 +5520,7 @@
5503
5520
  getPColumnSpecByRef(e) {
5504
5521
  const n2 = this.getSpecByRef(e);
5505
5522
  if (n2) {
5506
- if (!f(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5523
+ if (!f$1(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5507
5524
  return n2;
5508
5525
  }
5509
5526
  }
@@ -5522,13 +5539,13 @@
5522
5539
  findDataWithCompatibleSpec(e) {
5523
5540
  const n2 = [];
5524
5541
  e: for (const r of this.getData().entries) {
5525
- if (!f(r.obj.spec))
5542
+ if (!f$1(r.obj.spec))
5526
5543
  continue;
5527
5544
  const i = r.obj.spec;
5528
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
5545
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
5529
5546
  for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5530
5547
  const o = e.axesSpec[s2], a = i.axesSpec[s2];
5531
- if (o.name !== a.name || o.type !== a.type || !le(o.domain, a.domain))
5548
+ if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
5532
5549
  continue e;
5533
5550
  }
5534
5551
  n2.push(r.obj);
@@ -5543,9 +5560,9 @@
5543
5560
  findLabels(e) {
5544
5561
  const n2 = this.getData();
5545
5562
  for (const r of n2.entries) {
5546
- if (!Z(r.obj)) continue;
5563
+ if (!Z$1(r.obj)) continue;
5547
5564
  const i = r.obj.spec;
5548
- 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)) {
5565
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
5549
5566
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5550
5567
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5551
5568
  return Object.fromEntries(
@@ -5565,12 +5582,12 @@
5565
5582
  */
5566
5583
  selectColumns(e) {
5567
5584
  const n2 = typeof e == "function" ? e : Kn(e);
5568
- return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5585
+ return this.getSpecs().entries.filter(({ obj: i }) => f$1(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5569
5586
  const o = s2;
5570
5587
  let a = null;
5571
5588
  const l2 = this;
5572
5589
  return {
5573
- id: Le(i),
5590
+ id: De(i),
5574
5591
  spec: o,
5575
5592
  get data() {
5576
5593
  var u2;
@@ -5595,14 +5612,14 @@
5595
5612
  return r;
5596
5613
  }
5597
5614
  }
5598
- class Q {
5615
+ class te {
5599
5616
  constructor() {
5600
- T(this, "ctx");
5601
- T(this, "args");
5602
- T(this, "uiState");
5603
- T(this, "_activeArgsCache");
5604
- T(this, "resultPool", new Tt());
5605
- this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5617
+ F(this, "ctx");
5618
+ F(this, "args");
5619
+ F(this, "uiState");
5620
+ F(this, "_activeArgsCache");
5621
+ F(this, "resultPool", new Ot());
5622
+ this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5606
5623
  }
5607
5624
  /**
5608
5625
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
@@ -5618,16 +5635,16 @@
5618
5635
  // return this.ctx.featureFlags;
5619
5636
  // }
5620
5637
  getNamedAccessor(e) {
5621
- return pe(
5638
+ return de(
5622
5639
  this.ctx.getAccessorHandleByName(e),
5623
- (n2) => new L(n2, [e])
5640
+ (n2) => new E(n2, [e])
5624
5641
  );
5625
5642
  }
5626
5643
  get prerun() {
5627
- return this.getNamedAccessor(Fe);
5644
+ return this.getNamedAccessor(Oe);
5628
5645
  }
5629
5646
  get outputs() {
5630
- return this.getNamedAccessor(Oe);
5647
+ return this.getNamedAccessor(ke);
5631
5648
  }
5632
5649
  /**
5633
5650
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5639,13 +5656,13 @@
5639
5656
  }
5640
5657
  verifyInlineAndExplicitColumnsSupport(e) {
5641
5658
  var i;
5642
- const n2 = e.some((s2) => !(s2.data instanceof L) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5659
+ const n2 = e.some((s2) => !(s2.data instanceof E) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5643
5660
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5644
5661
  }
5645
5662
  // TODO remove all non-PColumn fields
5646
5663
  createPFrame(e) {
5647
5664
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5648
- e.map((n2) => Pe(n2))
5665
+ e.map((n2) => _e(n2))
5649
5666
  );
5650
5667
  }
5651
5668
  createPTable(e) {
@@ -5658,7 +5675,7 @@
5658
5675
  filters: e.filters ?? [],
5659
5676
  sorting: e.sorting ?? []
5660
5677
  } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
5661
- On(n2, (r) => Pe(r))
5678
+ On(n2, (r) => _e(r))
5662
5679
  );
5663
5680
  }
5664
5681
  /** @deprecated scheduled for removal from SDK */
@@ -5669,26 +5686,26 @@
5669
5686
  return this.ctx.getCurrentUnstableMarker();
5670
5687
  }
5671
5688
  }
5672
- const H = "1.30.24";
5673
- function Et(t) {
5689
+ const Y = "1.30.37";
5690
+ function kt(t) {
5674
5691
  return t.__renderLambda === true;
5675
5692
  }
5676
- function ue(t) {
5693
+ function pe(t) {
5677
5694
  if (t !== void 0)
5678
- return Et(t) ? t.handle : t;
5695
+ return kt(t) ? t.handle : t;
5679
5696
  }
5680
- class I {
5697
+ class L {
5681
5698
  constructor(e, n2, r, i, s2, o, a, l2) {
5682
5699
  this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
5683
5700
  }
5684
5701
  static create(e = "Heavy") {
5685
- return new I(
5702
+ return new L(
5686
5703
  e,
5687
5704
  void 0,
5688
5705
  {},
5689
5706
  {},
5690
- ee(true),
5691
- ee([]),
5707
+ re(true),
5708
+ re([]),
5692
5709
  void 0,
5693
5710
  void 0
5694
5711
  );
@@ -5696,7 +5713,7 @@
5696
5713
  output(e, n2, r = {}) {
5697
5714
  if (typeof n2 == "function") {
5698
5715
  const i = `output#${e}`;
5699
- return M(i, () => n2(new Q())), new I(
5716
+ return H(i, () => n2(new te())), new L(
5700
5717
  this._renderingMode,
5701
5718
  this._initialArgs,
5702
5719
  this._initialUiState,
@@ -5714,7 +5731,7 @@
5714
5731
  this._enrichmentTargets
5715
5732
  );
5716
5733
  } else
5717
- return new I(
5734
+ return new L(
5718
5735
  this._renderingMode,
5719
5736
  this._initialArgs,
5720
5737
  this._initialUiState,
@@ -5733,7 +5750,7 @@
5733
5750
  return this.output(e, n2, { retentive: true });
5734
5751
  }
5735
5752
  argsValid(e) {
5736
- return typeof e == "function" ? (M("inputsValid", () => e(new Q())), new I(
5753
+ return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
5737
5754
  this._renderingMode,
5738
5755
  this._initialArgs,
5739
5756
  this._initialUiState,
@@ -5745,7 +5762,7 @@
5745
5762
  this._sections,
5746
5763
  this._title,
5747
5764
  this._enrichmentTargets
5748
- )) : new I(
5765
+ )) : new L(
5749
5766
  this._renderingMode,
5750
5767
  this._initialArgs,
5751
5768
  this._initialUiState,
@@ -5757,7 +5774,7 @@
5757
5774
  );
5758
5775
  }
5759
5776
  sections(e) {
5760
- return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (M("sections", () => e(new Q())), new I(
5777
+ return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
5761
5778
  this._renderingMode,
5762
5779
  this._initialArgs,
5763
5780
  this._initialUiState,
@@ -5766,7 +5783,7 @@
5766
5783
  { __renderLambda: true, handle: "sections" },
5767
5784
  this._title,
5768
5785
  this._enrichmentTargets
5769
- )) : new I(
5786
+ )) : new L(
5770
5787
  this._renderingMode,
5771
5788
  this._initialArgs,
5772
5789
  this._initialUiState,
@@ -5779,7 +5796,7 @@
5779
5796
  }
5780
5797
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
5781
5798
  title(e) {
5782
- return M("title", () => e(new Q())), new I(
5799
+ return H("title", () => e(new te())), new L(
5783
5800
  this._renderingMode,
5784
5801
  this._initialArgs,
5785
5802
  this._initialUiState,
@@ -5795,7 +5812,7 @@
5795
5812
  * @deprecated use {@link withArgs}
5796
5813
  * */
5797
5814
  initialArgs(e) {
5798
- return new I(
5815
+ return new L(
5799
5816
  this._renderingMode,
5800
5817
  e,
5801
5818
  this._initialUiState,
@@ -5808,7 +5825,7 @@
5808
5825
  }
5809
5826
  /** Sets initial args for the block, this value must be specified. */
5810
5827
  withArgs(e) {
5811
- return new I(
5828
+ return new L(
5812
5829
  this._renderingMode,
5813
5830
  e,
5814
5831
  this._initialUiState,
@@ -5821,7 +5838,7 @@
5821
5838
  }
5822
5839
  /** Defines type and sets initial value for block UiState. */
5823
5840
  withUiState(e) {
5824
- return new I(
5841
+ return new L(
5825
5842
  this._renderingMode,
5826
5843
  this._initialArgs,
5827
5844
  e,
@@ -5837,7 +5854,7 @@
5837
5854
  * Influences dependency graph construction.
5838
5855
  */
5839
5856
  enriches(e) {
5840
- return M("enrichmentTargets", e), new I(
5857
+ return H("enrichmentTargets", e), new L(
5841
5858
  this._renderingMode,
5842
5859
  this._initialArgs,
5843
5860
  this._initialUiState,
@@ -5855,7 +5872,7 @@
5855
5872
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
5856
5873
  const e = {
5857
5874
  v3: {
5858
- sdkVersion: H,
5875
+ sdkVersion: Y,
5859
5876
  renderingMode: this._renderingMode,
5860
5877
  initialArgs: this._initialArgs,
5861
5878
  initialUiState: this._initialUiState,
@@ -5866,35 +5883,32 @@
5866
5883
  enrichmentTargets: this._enrichmentTargets
5867
5884
  },
5868
5885
  // fields below are added to allow previous desktop versions read generated configs
5869
- sdkVersion: H,
5886
+ sdkVersion: Y,
5870
5887
  renderingMode: this._renderingMode,
5871
5888
  initialArgs: this._initialArgs,
5872
- inputsValid: ue(this._inputsValid),
5873
- sections: ue(this._sections),
5889
+ inputsValid: pe(this._inputsValid),
5890
+ sections: pe(this._sections),
5874
5891
  outputs: Object.fromEntries(
5875
- Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
5892
+ Object.entries(this._outputs).map(([n2, r]) => [n2, pe(r)])
5876
5893
  )
5877
5894
  };
5878
- return at() ? Ee({ sdkVersion: H }) : { config: e };
5895
+ return ft() ? Re({ sdkVersion: Y }) : { config: e };
5879
5896
  }
5880
5897
  }
5881
- function Ft(t) {
5882
- return JSON.parse(t);
5883
- }
5884
- function Ot(t) {
5898
+ function Ut(t) {
5885
5899
  return t.axesSpec.length === 1 && t.name === "pl7.app/label";
5886
5900
  }
5887
- function Ve(t) {
5888
- return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5901
+ function Ne(t) {
5902
+ return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5889
5903
  name: "pl7.app/label",
5890
5904
  axes: [{}]
5891
5905
  // exactly one axis
5892
5906
  }, { dontWaitAllData: true });
5893
5907
  }
5894
- function Ke(t, e) {
5908
+ function Ue(t, e) {
5895
5909
  const n2 = [], r = [];
5896
5910
  for (const a of t)
5897
- Ot(a.spec) ? n2.push(a) : r.push(a);
5911
+ Ut(a.spec) ? n2.push(a) : r.push(a);
5898
5912
  const i = [];
5899
5913
  for (const a of r)
5900
5914
  for (const l2 of a.spec.axesSpec) {
@@ -5913,14 +5927,14 @@
5913
5927
  return u2;
5914
5928
  }, o = [];
5915
5929
  for (const a of e) {
5916
- const l2 = a.spec.axesSpec[0], u2 = p$1(l2), d = i.findIndex((v) => X(v, u2));
5930
+ const l2 = a.spec.axesSpec[0], u2 = p$1(l2), d = i.findIndex((h2) => X(h2, u2));
5917
5931
  if (d !== -1) {
5918
- const v = i[d], h2 = Object.keys(v.domain ?? {}).length, c2 = Object.keys(l2.domain ?? {}).length;
5919
- h2 > c2 ? o.push({
5920
- id: s2(a.id, v.domain),
5932
+ const h2 = i[d], w2 = Object.keys(h2.domain ?? {}).length, g = Object.keys(l2.domain ?? {}).length;
5933
+ w2 > g ? o.push({
5934
+ id: s2(a.id, h2.domain),
5921
5935
  spec: {
5922
5936
  ...a.spec,
5923
- axesSpec: [{ ...v, annotations: l2.annotations }]
5937
+ axesSpec: [{ ...h2, annotations: l2.annotations }]
5924
5938
  },
5925
5939
  data: a.data
5926
5940
  }) : o.push(a), i.splice(d, 1);
@@ -5928,8 +5942,8 @@
5928
5942
  }
5929
5943
  return o;
5930
5944
  }
5931
- function $e(t) {
5932
- const e = (i) => Array.isArray(i), n2 = (i) => i instanceof L, r = (i) => typeof i == "object" && "type" in i;
5945
+ function Be(t) {
5946
+ const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
5933
5947
  return t.map((i) => i.data).every((i) => {
5934
5948
  if (e(i))
5935
5949
  return true;
@@ -5948,7 +5962,7 @@
5948
5962
  throw Error(`unsupported column data type: ${i}`);
5949
5963
  });
5950
5964
  }
5951
- function Je(t, e, n2, r, i, s2) {
5965
+ function Me(t, e, n2, r, i, s2) {
5952
5966
  let o = t;
5953
5967
  const a = [];
5954
5968
  if (s2) {
@@ -5969,53 +5983,57 @@
5969
5983
  sorting: i
5970
5984
  };
5971
5985
  }
5972
- function _n(t, e, n2, r) {
5986
+ function Fn(t, e, n2, r) {
5973
5987
  var u2, d;
5974
5988
  Array.isArray(r) && (r = { filters: r });
5975
- 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 = Ve(t.resultPool);
5989
+ 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 = Ne(t.resultPool);
5976
5990
  if (!a) return;
5977
- const l2 = Ke(e.map(Cn), a);
5978
- if ($e([...e, ...l2]))
5991
+ const l2 = Ue(e.map(Cn), a);
5992
+ if (Be([...e, ...l2]))
5979
5993
  return t.createPTable(
5980
- Je(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5994
+ Me(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5981
5995
  );
5982
5996
  }
5983
- function Dt(t) {
5997
+ function Bt(t) {
5998
+ var e;
5999
+ return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
6000
+ }
6001
+ function Mt(t) {
5984
6002
  var e;
5985
6003
  return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
5986
6004
  }
5987
- function In(t, e, n2, r, i) {
5988
- var b, A2;
5989
- const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.filters) ?? []], a = ((A2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : A2.sorting) ?? [], l2 = e.find((p2) => n2(p2.spec));
5990
- if (!l2) return;
5991
- const u2 = Ve(t.resultPool);
6005
+ function Rn(t, e, n2, r, i) {
6006
+ var v, b;
6007
+ const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((v = r == null ? void 0 : r.pTableParams) == null ? void 0 : v.filters) ?? []], a = ((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.sorting) ?? [], l2 = e.filter((p2) => !Bt(p2.spec)), u2 = l2.find((p2) => n2(p2.spec));
5992
6008
  if (!u2) return;
5993
- const d = new Set((() => {
5994
- var g, w2;
6009
+ const d = Ne(t.resultPool);
6010
+ if (!d) return;
6011
+ const h2 = new Set((() => {
6012
+ var A2, x2;
5995
6013
  if (s2 === "inner") return [];
5996
- const p2 = (w2 = (g = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : g.hiddenColIds) == null ? void 0 : w2.map(Ft).filter((f2) => f2.type === "column").map((f2) => f2.id);
5997
- return p2 || e.filter((f2) => Dt(f2.spec)).map((f2) => f2.id);
6014
+ const p2 = (x2 = (A2 = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A2.hiddenColIds) == null ? void 0 : x2.map(Yn).filter((y) => y.type === "column").map((y) => y.id);
6015
+ return p2 || l2.filter((y) => Mt(y.spec)).map((y) => y.id);
5998
6016
  })());
5999
- d.delete(l2.id), [...o.map((p2) => p2.column), ...a.map((p2) => p2.column)].filter((p2) => p2.type === "column").map((p2) => d.delete(p2.id));
6000
- const v = e.filter((p2) => !d.has(p2.id)), h2 = Ke(v.map(Cn), u2), c2 = [
6001
- ...l2.spec.axesSpec.map((p2) => ({
6017
+ h2.delete(u2.id), [...o.map((p2) => p2.column), ...a.map((p2) => p2.column)].filter((p2) => p2.type === "column").map((p2) => h2.delete(p2.id));
6018
+ const w2 = l2.filter((p2) => !h2.has(p2.id)), g = Ue(w2.map(Cn), d), m2 = [
6019
+ ...u2.spec.axesSpec.map((p2) => ({
6002
6020
  type: "axis",
6003
6021
  id: p$1(p2),
6004
6022
  spec: p2
6005
6023
  })),
6006
- ...[...e, ...h2].map((p2) => ({
6024
+ ...[...l2, ...g].map((p2) => ({
6007
6025
  type: "column",
6008
6026
  id: p2.id,
6009
6027
  spec: p2.spec
6010
6028
  }))
6011
6029
  ];
6012
- if (!$e([...v, ...h2])) return;
6013
- const m2 = t.createPTable(
6014
- Je(e, h2, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
6030
+ if (!Be([...w2, ...g])) return;
6031
+ const c2 = t.createPTable(
6032
+ Me(l2, g, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
6015
6033
  );
6016
6034
  return {
6017
- tableSpec: c2,
6018
- tableHandle: m2
6035
+ tableSpec: m2,
6036
+ tableHandle: c2
6019
6037
  };
6020
6038
  }
6021
6039
  const ImportFileHandleSchema = z$2.string().optional().refine(
@@ -6041,7 +6059,7 @@
6041
6059
  numbers: z$2.array(z$2.coerce.number()),
6042
6060
  handles: z$2.array(ImportFileHandleSchema)
6043
6061
  });
6044
- const platforma = I.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
6062
+ const platforma = L.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
6045
6063
  if (ctx.args.numbers.length === 5) {
6046
6064
  throw new Error("argsValid: test error");
6047
6065
  }
@@ -6055,7 +6073,7 @@
6055
6073
  const progresses = m2 == null ? void 0 : m2.mapFields((name, val) => [name, val == null ? void 0 : val.getImportProgress()]);
6056
6074
  return Object.fromEntries(progresses ?? []);
6057
6075
  }).output("pt", (ctx) => {
6058
- var _a, _b, _c, _d, _e;
6076
+ var _a, _b, _c, _d, _e2;
6059
6077
  if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
6060
6078
  const data = times(ctx.args.tableNumRows ?? 0, (i) => {
6061
6079
  const v = i + 1;
@@ -6064,7 +6082,7 @@
6064
6082
  val: v.toString()
6065
6083
  };
6066
6084
  });
6067
- return _n(
6085
+ return Fn(
6068
6086
  ctx,
6069
6087
  [
6070
6088
  {
@@ -6103,12 +6121,12 @@
6103
6121
  {
6104
6122
  filters: [
6105
6123
  ...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
6106
- ...((_e = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e.filters) ?? []
6124
+ ...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
6107
6125
  ]
6108
6126
  }
6109
6127
  );
6110
6128
  }).output("ptV2", (ctx) => {
6111
- var _a, _b, _c, _d, _e;
6129
+ var _a, _b, _c, _d, _e2;
6112
6130
  if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
6113
6131
  const data = times(ctx.args.tableNumRows ?? 0, (i) => {
6114
6132
  const v = i + 1;
@@ -6117,7 +6135,7 @@
6117
6135
  val: v.toString()
6118
6136
  };
6119
6137
  });
6120
- return In(
6138
+ return Rn(
6121
6139
  ctx,
6122
6140
  [
6123
6141
  {
@@ -6159,7 +6177,7 @@
6159
6177
  {
6160
6178
  filters: [
6161
6179
  ...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
6162
- ...((_e = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e.filters) ?? []
6180
+ ...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
6163
6181
  ]
6164
6182
  }
6165
6183
  );