@milaboratories/pl-model-common 1.15.4 → 1.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,52 +1,52 @@
1
- var I = Object.defineProperty;
2
- var D = (n, e, t) => e in n ? I(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var l = (n, e, t) => D(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var B = Object.defineProperty;
2
+ var j = (n, e, t) => e in n ? B(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var l = (n, e, t) => j(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { z as d } from "zod";
5
5
  import y from "canonicalize";
6
- const dn = d.object({
6
+ const wn = d.object({
7
7
  /** Included left border. */
8
8
  from: d.number(),
9
9
  /** Excluded right border. */
10
10
  to: d.number()
11
11
  });
12
- function mn(n, e) {
12
+ function An(n, e) {
13
13
  if (!(n == null || e == null))
14
14
  return { from: n, to: e };
15
15
  }
16
- function pn(n, e) {
16
+ function xn(n, e) {
17
17
  if (n.from < 0 || n.to < 0 || n.from >= n.to)
18
18
  throw new Error(`${e}: invalid bytes range: ${n}`);
19
19
  }
20
- function ln(n) {
20
+ function Pn(n) {
21
21
  return n !== void 0 && n.startsWith("log+live://log/");
22
22
  }
23
23
  function w(n) {
24
24
  throw new Error("Unexpected object: " + n);
25
25
  }
26
- const E = "upload://upload/", S = "index://index/";
27
- function L(n) {
28
- return n.startsWith(E);
29
- }
30
- function V(n) {
26
+ const S = "upload://upload/", C = "index://index/";
27
+ function v(n) {
31
28
  return n.startsWith(S);
32
29
  }
33
- function B(n) {
34
- if (V(n)) {
35
- const e = n.slice(S.length);
30
+ function F(n) {
31
+ return n.startsWith(C);
32
+ }
33
+ function R(n) {
34
+ if (F(n)) {
35
+ const e = n.slice(C.length);
36
36
  return JSON.parse(decodeURIComponent(e)).path;
37
- } else if (L(n)) {
38
- const e = n.slice(E.length);
37
+ } else if (v(n)) {
38
+ const e = n.slice(S.length);
39
39
  return JSON.parse(decodeURIComponent(e)).localPath;
40
40
  }
41
41
  w(n);
42
42
  }
43
- function j(n) {
43
+ function U(n) {
44
44
  return n.replace(/^.*[\\/]/, "");
45
45
  }
46
- function yn(n) {
47
- return j(B(n));
46
+ function kn(n) {
47
+ return U(R(n));
48
48
  }
49
- function hn(n) {
49
+ function En(n) {
50
50
  if (!n || typeof n != "object")
51
51
  return !1;
52
52
  const e = n;
@@ -63,7 +63,7 @@ function hn(n) {
63
63
  return !1;
64
64
  }
65
65
  }
66
- function gn(n, e) {
66
+ function Nn(n, e) {
67
67
  if (n !== void 0)
68
68
  switch (n.type) {
69
69
  case "Json":
@@ -91,7 +91,7 @@ function gn(n, e) {
91
91
  }
92
92
  }
93
93
  }
94
- function F(n) {
94
+ function K(n) {
95
95
  if (!n || typeof n != "object")
96
96
  return !1;
97
97
  const e = n;
@@ -108,10 +108,10 @@ function F(n) {
108
108
  return !1;
109
109
  }
110
110
  }
111
- function bn(n) {
112
- return F(n) ? n.type === "JsonPartitioned" || n.type === "BinaryPartitioned" : !1;
111
+ function Sn(n) {
112
+ return K(n) ? n.type === "JsonPartitioned" || n.type === "BinaryPartitioned" : !1;
113
113
  }
114
- function wn(n) {
114
+ function Cn(n) {
115
115
  switch (n.type) {
116
116
  case "Json": {
117
117
  const e = Object.entries(n.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
@@ -139,7 +139,7 @@ function wn(n) {
139
139
  }
140
140
  }
141
141
  }
142
- function Pn(n) {
142
+ function Jn(n) {
143
143
  switch (n.type) {
144
144
  case "Json": {
145
145
  const e = {};
@@ -173,7 +173,7 @@ function Pn(n) {
173
173
  }
174
174
  }
175
175
  }
176
- function xn(n, e) {
176
+ function On(n, e) {
177
177
  if (n !== void 0)
178
178
  switch (n.type) {
179
179
  case "Json":
@@ -203,30 +203,30 @@ function xn(n, e) {
203
203
  }
204
204
  }
205
205
  }
206
- const R = -2147483648, P = -9007199254740991n, An = NaN, kn = NaN, U = null, K = null;
206
+ const _ = -2147483648, x = -9007199254740991n, $n = NaN, In = NaN, M = null, T = null;
207
207
  function g(n, e) {
208
208
  switch (e) {
209
209
  case "Int":
210
- return n === R;
210
+ return n === _;
211
211
  case "Long":
212
- return n === Number(P) || n === P;
212
+ return n === Number(x) || n === x;
213
213
  case "Float":
214
214
  return Number.isNaN(n);
215
215
  case "Double":
216
216
  return Number.isNaN(n);
217
217
  case "String":
218
- return n === U;
218
+ return n === M;
219
219
  case "Bytes":
220
- return n === K;
220
+ return n === T;
221
221
  default:
222
222
  throw Error(`unsupported data type: ${e}`);
223
223
  }
224
224
  }
225
- function Nn(n) {
226
- if (!v(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
225
+ function Vn(n) {
226
+ if (!z(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
227
227
  return n;
228
228
  }
229
- function v(n, e) {
229
+ function z(n, e) {
230
230
  if (!e)
231
231
  return typeof n == "string" || typeof n == "number" && isFinite(n) || typeof n == "bigint";
232
232
  if (g(n, e)) return !1;
@@ -247,7 +247,7 @@ function v(n, e) {
247
247
  throw Error(`unsupported data type: ${e}`);
248
248
  }
249
249
  }
250
- function _(n, e) {
250
+ function H(n, e) {
251
251
  if (!e)
252
252
  return n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint";
253
253
  if (g(n, e)) return !0;
@@ -268,14 +268,14 @@ function _(n, e) {
268
268
  throw Error(`unsupported data type: ${e}`);
269
269
  }
270
270
  }
271
- function En(n) {
271
+ function Dn(n) {
272
272
  if (n === null || typeof n == "string" || typeof n == "number") return n;
273
273
  if (typeof n == "bigint") return { bigint: n.toString() };
274
274
  throw new Error(`Type ${typeof n} (value ${n}) not yet supported.`);
275
275
  }
276
- function M(n, e) {
276
+ function q(n, e) {
277
277
  if (n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
278
- if (e && !g(n, e) && !_(n, e))
278
+ if (e && !g(n, e) && !H(n, e))
279
279
  throw new Error(`Unexpected value type, got ${typeof n}, expected ${e}`);
280
280
  return n;
281
281
  }
@@ -286,12 +286,12 @@ function M(n, e) {
286
286
  }
287
287
  throw new Error(`Unsupported type ${typeof n} (value ${n}).`);
288
288
  }
289
- function Sn(n) {
290
- if (n = T(n), n === null) throw new Error("Value is null");
289
+ function Ln(n) {
290
+ if (n = W(n), n === null) throw new Error("Value is null");
291
291
  return n;
292
292
  }
293
- function T(n) {
294
- if (n = M(n), n === null) return null;
293
+ function W(n) {
294
+ if (n = q(n), n === null) return null;
295
295
  if (typeof n == "string") return n;
296
296
  if (typeof n == "number") {
297
297
  if (!isFinite(n)) throw new Error(`Value is not finite (${n})`);
@@ -301,19 +301,19 @@ function T(n) {
301
301
  return Number(n);
302
302
  throw new Error(`Unexpected value type: ${typeof n}`);
303
303
  }
304
- function H(n, e) {
304
+ function X(n, e) {
305
305
  const t = Math.floor(e / 8), r = 1 << 7 - e % 8;
306
306
  return (n[t] & r) > 0;
307
307
  }
308
- const q = { type: "absent" }, W = null;
309
- function Cn(n) {
308
+ const G = { type: "absent" }, Q = null;
309
+ function Bn(n) {
310
310
  return typeof n == "object" && n !== null && n.type === "absent";
311
311
  }
312
- function Jn(n, e, t = {}) {
313
- if (H(n.absent, e))
314
- return t.absent === void 0 ? q : t.absent;
312
+ function jn(n, e, t = {}) {
313
+ if (X(n.absent, e))
314
+ return t.absent === void 0 ? G : t.absent;
315
315
  const r = n.data[e], o = n.type;
316
- if (g(r, o)) return t.na === void 0 ? W : t.na;
316
+ if (g(r, o)) return t.na === void 0 ? Q : t.na;
317
317
  switch (o) {
318
318
  case "Int":
319
319
  return r;
@@ -331,17 +331,17 @@ function Jn(n, e, t = {}) {
331
331
  throw Error(`unsupported data type: ${o}`);
332
332
  }
333
333
  }
334
- function On(n) {
334
+ function vn(n) {
335
335
  return {
336
336
  kind: n.kind,
337
337
  valueType: n.valueType,
338
338
  name: n.name,
339
339
  domain: n.domain,
340
340
  parentAxes: n.parentAxes,
341
- axesId: C(n.axesSpec)
341
+ axesId: J(n.axesSpec)
342
342
  };
343
343
  }
344
- function $n(n) {
344
+ function Fn(n) {
345
345
  return {
346
346
  columnId: n.id,
347
347
  spec: n.spec
@@ -351,23 +351,23 @@ function p(n) {
351
351
  const { type: e, name: t, domain: r } = n, o = { type: e, name: t };
352
352
  return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
353
353
  }
354
- function C(n) {
354
+ function J(n) {
355
355
  return n.map(p);
356
356
  }
357
- function In(n) {
357
+ function Rn(n) {
358
358
  return y(p(n));
359
359
  }
360
- function z(n, e) {
360
+ function Y(n, e) {
361
361
  if (n === void 0) return e === void 0;
362
362
  if (e === void 0) return !0;
363
363
  for (const t in e)
364
364
  if (n[t] !== e[t]) return !1;
365
365
  return !0;
366
366
  }
367
- function X(n, e) {
368
- return n.name === e.name && z(n.domain, e.domain);
367
+ function Z(n, e) {
368
+ return n.name === e.name && Y(n.domain, e.domain);
369
369
  }
370
- function Dn(n, e) {
370
+ function Un(n, e) {
371
371
  return { ...n, src: h(n.src, e) };
372
372
  }
373
373
  function h(n, e) {
@@ -402,19 +402,19 @@ function h(n, e) {
402
402
  w(n);
403
403
  }
404
404
  }
405
- function G(n) {
405
+ function nn(n) {
406
406
  return y(n);
407
407
  }
408
- function Ln(n) {
408
+ function Kn(n) {
409
409
  return JSON.parse(n);
410
410
  }
411
- function x(n) {
411
+ function P(n) {
412
412
  return y(p(n));
413
413
  }
414
- function A(n, e) {
414
+ function k(n, e) {
415
415
  return JSON.stringify([n, e]);
416
416
  }
417
- class Vn {
417
+ class _n {
418
418
  /**
419
419
  * Creates a new anchor context from a set of anchor column specifications
420
420
  * @param anchors Record of anchor column specifications indexed by anchor ID
@@ -436,14 +436,14 @@ class Vn {
436
436
  t.sort((r, o) => r[0].localeCompare(o[0]));
437
437
  for (const [r, o] of t) {
438
438
  for (let s = 0; s < o.axesSpec.length; s++) {
439
- const a = o.axesSpec[s], i = x(a);
439
+ const a = o.axesSpec[s], i = P(a);
440
440
  this.axes.set(i, { anchor: r, idx: s });
441
441
  }
442
442
  if (o.domain !== void 0) {
443
443
  const s = Object.entries(o.domain);
444
444
  s.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s), r), this.domainPacks.push(s.map(([a]) => a));
445
445
  for (const [a, i] of s) {
446
- const u = A(a, i);
446
+ const u = k(a, i);
447
447
  this.domains.set(u, r);
448
448
  }
449
449
  }
@@ -478,11 +478,11 @@ class Vn {
478
478
  for (const [a, i] of Object.entries(e.domain ?? {})) {
479
479
  if (o !== void 0 && o.has(a))
480
480
  continue;
481
- const u = A(a, i), c = this.domains.get(u);
481
+ const u = k(a, i), c = this.domains.get(u);
482
482
  r.domain ?? (r.domain = {}), r.domain[a] = c ? { anchor: c } : i;
483
483
  }
484
484
  if (r.axes = e.axesSpec.map((a) => {
485
- const i = x(a), u = this.axes.get(i);
485
+ const i = P(a), u = this.axes.get(i);
486
486
  return u === void 0 ? p(a) : u;
487
487
  }), !t || t.length === 0)
488
488
  return r;
@@ -512,10 +512,10 @@ class Vn {
512
512
  * @returns A canonicalized string representation of the anchored column identifier
513
513
  */
514
514
  deriveS(e, t) {
515
- return G(this.derive(e, t));
515
+ return nn(this.derive(e, t));
516
516
  }
517
517
  }
518
- function Bn(n, e, t) {
518
+ function Mn(n, e, t) {
519
519
  const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? !1;
520
520
  if (r.domainAnchor !== void 0) {
521
521
  const s = n[r.domainAnchor];
@@ -542,10 +542,10 @@ function Bn(n, e, t) {
542
542
  }
543
543
  r.domain = s;
544
544
  }
545
- return r.axes && (r.axes = r.axes.map((s) => Q(n, s))), r;
545
+ return r.axes && (r.axes = r.axes.map((s) => en(n, s))), r;
546
546
  }
547
- function Q(n, e) {
548
- if (!Y(e))
547
+ function en(n, e) {
548
+ if (!tn(e))
549
549
  return e;
550
550
  const t = e.anchor, r = n[t];
551
551
  if (!r)
@@ -562,7 +562,7 @@ function Q(n, e) {
562
562
  throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
563
563
  return o[0];
564
564
  } else if ("id" in e) {
565
- const o = r.axesSpec.filter((s) => X(e.id, p(s)));
565
+ const o = r.axesSpec.filter((s) => Z(e.id, p(s)));
566
566
  if (o.length > 1)
567
567
  throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
568
568
  if (o.length === 0)
@@ -571,35 +571,35 @@ function Q(n, e) {
571
571
  }
572
572
  throw new Error("Unsupported axis reference type");
573
573
  }
574
- function Y(n) {
574
+ function tn(n) {
575
575
  return typeof n == "object" && "anchor" in n;
576
576
  }
577
- function jn(n) {
577
+ function Tn(n) {
578
578
  return typeof n == "object" && n !== null && "source" in n && "axisFilters" in n;
579
579
  }
580
580
  function f(n) {
581
581
  return n.kind === "PColumn";
582
582
  }
583
- function Z(n) {
583
+ function rn(n) {
584
584
  return f(n.spec);
585
585
  }
586
- function Fn(n) {
586
+ function zn(n) {
587
587
  return f(n.obj);
588
588
  }
589
- function Rn(n) {
589
+ function Hn(n) {
590
590
  return f(n.obj.spec);
591
591
  }
592
- function Un(n) {
593
- if (!Z(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
592
+ function qn(n) {
593
+ if (!rn(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
594
594
  return n;
595
595
  }
596
- function Kn(n, e) {
596
+ function Wn(n, e) {
597
597
  return n === void 0 ? void 0 : {
598
598
  ...n,
599
599
  data: e(n.data)
600
600
  };
601
601
  }
602
- function vn(n) {
602
+ function Xn(n) {
603
603
  const e = /* @__PURE__ */ new Map(), t = (r) => {
604
604
  switch (r.type) {
605
605
  case "column":
@@ -624,7 +624,7 @@ function vn(n) {
624
624
  };
625
625
  return t(n), [...e.values()];
626
626
  }
627
- function nn(n) {
627
+ function on(n) {
628
628
  throw new Error("Unexpected object: " + n);
629
629
  }
630
630
  function b(n, e) {
@@ -656,10 +656,10 @@ function b(n, e) {
656
656
  )
657
657
  );
658
658
  default:
659
- nn(n);
659
+ on(n);
660
660
  }
661
661
  }
662
- function k(n, e) {
662
+ function E(n, e) {
663
663
  if (n.name !== void 0 && n.name !== e.name)
664
664
  return !1;
665
665
  if (n.type !== void 0) {
@@ -697,13 +697,13 @@ function N(n, e) {
697
697
  const t = n.axesSpec.map(p);
698
698
  if (e.partialAxesMatch) {
699
699
  for (const r of e.axes)
700
- if (!t.some((o) => k(r, o)))
700
+ if (!t.some((o) => E(r, o)))
701
701
  return !1;
702
702
  } else {
703
703
  if (t.length !== e.axes.length)
704
704
  return !1;
705
705
  for (let r = 0; r < e.axes.length; r++)
706
- if (!k(e.axes[r], t[r]))
706
+ if (!E(e.axes[r], t[r]))
707
707
  return !1;
708
708
  }
709
709
  }
@@ -723,17 +723,17 @@ function N(n, e) {
723
723
  }
724
724
  return !0;
725
725
  }
726
- function _n(n) {
726
+ function Gn(n) {
727
727
  return Array.isArray(n) ? (e) => n.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n);
728
728
  }
729
- function Mn(n) {
729
+ function Qn(n) {
730
730
  const e = {
731
731
  kind: n.kind,
732
732
  name: n.name
733
733
  };
734
- return n.domain !== void 0 && (e.domain = n.domain), f(n) && (e.axesSpec = C(n.axesSpec)), y(e);
734
+ return n.domain !== void 0 && (e.domain = n.domain), f(n) && (e.axesSpec = J(n.axesSpec)), y(e);
735
735
  }
736
- const Tn = { href: "/" }, Hn = d.object({
736
+ const Yn = { href: "/" }, Zn = d.object({
737
737
  __isRef: d.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
738
738
  blockId: d.string().describe("Upstream block id"),
739
739
  name: d.string().describe("Name of the output provided to the upstream block's output context"),
@@ -741,10 +741,10 @@ const Tn = { href: "/" }, Hn = d.object({
741
741
  }).describe(
742
742
  "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."
743
743
  ).readonly();
744
- function qn(n) {
744
+ function ne(n) {
745
745
  return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === !0 && "blockId" in n && "name" in n;
746
746
  }
747
- function Wn(n, e, t = !1) {
747
+ function ee(n, e, t = !1) {
748
748
  return t ? {
749
749
  __isRef: !0,
750
750
  blockId: n,
@@ -756,7 +756,7 @@ function Wn(n, e, t = !1) {
756
756
  name: e
757
757
  };
758
758
  }
759
- function zn(n, e = !0) {
759
+ function te(n, e = !0) {
760
760
  if (e)
761
761
  return {
762
762
  ...n,
@@ -767,13 +767,13 @@ function zn(n, e = !0) {
767
767
  return r;
768
768
  }
769
769
  }
770
- function Xn(n, e, t = !1) {
770
+ function re(n, e, t = !1) {
771
771
  return n.blockId === e.blockId && n.name === e.name && (t || n.requireEnrichments === e.requireEnrichments);
772
772
  }
773
- function Gn(n, e) {
773
+ function oe(n, e) {
774
774
  return n.ok ? { ok: !0, value: e(n.value) } : n;
775
775
  }
776
- function en(n) {
776
+ function sn(n) {
777
777
  if (n instanceof Int8Array || n instanceof Uint8Array || n instanceof Uint8ClampedArray)
778
778
  return new DataView(n.buffer, n.byteOffset, n.byteLength);
779
779
  if (n instanceof ArrayBuffer) return new DataView(n);
@@ -781,25 +781,25 @@ function en(n) {
781
781
  "Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
782
782
  );
783
783
  }
784
- const tn = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", rn = "0123456789ABCDEFGHIJKLMNOPQRSTUV", on = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
785
- function J(n, e, t) {
784
+ const an = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", un = "0123456789ABCDEFGHIJKLMNOPQRSTUV", cn = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
785
+ function O(n, e, t) {
786
786
  t = t || {};
787
787
  let r, o;
788
788
  switch (e) {
789
789
  case "RFC3548":
790
790
  case "RFC4648":
791
- r = tn, o = !0;
791
+ r = an, o = !0;
792
792
  break;
793
793
  case "RFC4648-HEX":
794
- r = rn, o = !0;
794
+ r = un, o = !0;
795
795
  break;
796
796
  case "Crockford":
797
- r = on, o = !1;
797
+ r = cn, o = !1;
798
798
  break;
799
799
  default:
800
800
  throw new Error("Unknown base32 variant: " + String(e));
801
801
  }
802
- const s = t.padding !== void 0 ? t.padding : o, a = en(n);
802
+ const s = t.padding !== void 0 ? t.padding : o, a = sn(n);
803
803
  let i = 0, u = 0, c = "";
804
804
  for (let m = 0; m < a.byteLength; m++)
805
805
  for (u = u << 8 | a.getUint8(m), i += 8; i >= 5; )
@@ -809,103 +809,199 @@ function J(n, e, t) {
809
809
  c += "=";
810
810
  return c;
811
811
  }
812
- const O = 15, sn = 24, $ = d.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
813
- function Qn() {
814
- const n = new Uint8Array(O);
815
- return crypto.getRandomValues(n), $.parse(J(n, "RFC4648"));
812
+ const $ = 15, fn = 24, I = d.string().length(fn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
813
+ function ie() {
814
+ const n = new Uint8Array($);
815
+ return crypto.getRandomValues(n), I.parse(O(n, "RFC4648"));
816
816
  }
817
- function an(n) {
818
- if (n.length !== O) throw new Error(`Wrong number of bytes: ${n.length}`);
819
- return $.parse(J(n, "RFC4648"));
817
+ function dn(n) {
818
+ if (n.length !== $) throw new Error(`Wrong number of bytes: ${n.length}`);
819
+ return I.parse(O(n, "RFC4648"));
820
820
  }
821
- async function Yn(n) {
821
+ async function se(n) {
822
822
  const e = new TextEncoder(), t = await crypto.subtle.digest("SHA-256", e.encode(n));
823
- return an(new Uint8Array(t.slice(0, 15)));
823
+ return dn(new Uint8Array(t.slice(0, 15)));
824
824
  }
825
- function Zn(n) {
825
+ function ae(n) {
826
826
  return JSON.stringify(n);
827
827
  }
828
- function ne(n) {
828
+ function ue(n) {
829
829
  return y(n);
830
830
  }
831
- function ee(n) {
831
+ function ce(n) {
832
832
  return JSON.parse(n);
833
833
  }
834
+ class fe extends Error {
835
+ constructor() {
836
+ super(...arguments);
837
+ l(this, "name", "AbortError");
838
+ }
839
+ }
840
+ class de extends Error {
841
+ constructor() {
842
+ super(...arguments);
843
+ l(this, "name", "UiError");
844
+ }
845
+ }
846
+ function me(n) {
847
+ return n instanceof Error && n.name === "AbortError";
848
+ }
849
+ function mn(n) {
850
+ return n instanceof Error ? n.name === "AbortError" || mn(n.cause) : !1;
851
+ }
852
+ function le(n) {
853
+ return n instanceof Error && n.name === "AggregateError";
854
+ }
855
+ function ln(n) {
856
+ if (typeof n == "string")
857
+ return `String value was thrown: ${n}`;
858
+ if (n && typeof n == "object")
859
+ try {
860
+ return `Plain object was thrown: ${JSON.stringify(n)}`;
861
+ } catch (e) {
862
+ return `Non-serializable object was thrown (JSON.stringify failed: ${e instanceof Error ? e.message : String(e)}): ${String(n)}`;
863
+ }
864
+ return `Non-Error value (${typeof n}) was thrown: ${n}`;
865
+ }
866
+ function A(n) {
867
+ return n instanceof Error ? n : new Error(ln(n));
868
+ }
869
+ function V(n) {
870
+ const e = n.cause ? V(n.cause) : void 0, t = new Error(n.message, e !== void 0 ? { cause: e } : void 0);
871
+ return t.name = n.name || "Error", t.stack = n.stack, t;
872
+ }
873
+ function D(n) {
874
+ const e = A(n), t = e.cause ? D(e.cause) : void 0;
875
+ return {
876
+ name: e.name,
877
+ message: e.message,
878
+ stack: e.stack,
879
+ ...e.cause !== void 0 && { cause: t }
880
+ };
881
+ }
882
+ function pe(n) {
883
+ if (n.error)
884
+ throw n.error;
885
+ return n.value;
886
+ }
887
+ function L(n) {
888
+ return n.error ? { error: D(n.error) } : { value: n.value };
889
+ }
890
+ function ye(n) {
891
+ return n.error ? { error: V(n.error) } : { value: n.value };
892
+ }
893
+ function pn(n) {
894
+ try {
895
+ return { value: n() };
896
+ } catch (e) {
897
+ return { error: A(e) };
898
+ }
899
+ }
900
+ async function yn(n) {
901
+ try {
902
+ return { value: await n() };
903
+ } catch (e) {
904
+ return { error: A(e) };
905
+ }
906
+ }
907
+ function he(n) {
908
+ const e = pn(n);
909
+ return L(e);
910
+ }
911
+ async function ge(n) {
912
+ const e = await yn(n);
913
+ return L(e);
914
+ }
834
915
  export {
835
- Vn as AnchoredIdDeriver,
836
- Tn as DefaultNavigationState,
837
- q as PTableAbsent,
838
- W as PTableNA,
839
- K as PValueBytesNA,
840
- kn as PValueDoubleNA,
841
- An as PValueFloatNA,
842
- R as PValueIntNA,
843
- P as PValueLongNA,
844
- U as PValueStringNA,
845
- $ as PlId,
846
- O as PlIdBytes,
847
- sn as PlIdLength,
848
- Hn as PlRef,
849
- dn as RangeBytes,
850
- In as canonicalizeAxisId,
851
- ne as canonicalizeJson,
852
- Wn as createPlRef,
853
- wn as dataInfoToEntries,
854
- Mn as deriveNativeId,
855
- Yn as digestPlId,
856
- Nn as ensureNotNAPValue,
857
- Un as ensurePColumn,
858
- Pn as entriesToDataInfo,
916
+ fe as AbortError,
917
+ _n as AnchoredIdDeriver,
918
+ Yn as DefaultNavigationState,
919
+ G as PTableAbsent,
920
+ Q as PTableNA,
921
+ T as PValueBytesNA,
922
+ In as PValueDoubleNA,
923
+ $n as PValueFloatNA,
924
+ _ as PValueIntNA,
925
+ x as PValueLongNA,
926
+ M as PValueStringNA,
927
+ I as PlId,
928
+ $ as PlIdBytes,
929
+ fn as PlIdLength,
930
+ Zn as PlRef,
931
+ wn as RangeBytes,
932
+ de as UiError,
933
+ Rn as canonicalizeAxisId,
934
+ ue as canonicalizeJson,
935
+ ee as createPlRef,
936
+ Cn as dataInfoToEntries,
937
+ Qn as deriveNativeId,
938
+ V as deserializeError,
939
+ ye as deserializeResult,
940
+ se as digestPlId,
941
+ A as ensureError,
942
+ Vn as ensureNotNAPValue,
943
+ qn as ensurePColumn,
944
+ Jn as entriesToDataInfo,
859
945
  b as executePSpecPredicate,
860
- vn as extractAllColumns,
861
- C as getAxesId,
946
+ Xn as extractAllColumns,
947
+ J as getAxesId,
862
948
  p as getAxisId,
863
- $n as getColumnIdAndSpec,
864
- yn as getFileNameFromHandle,
865
- B as getFilePathFromHandle,
866
- On as getPColumnSpecId,
867
- hn as isDataInfo,
868
- F as isDataInfoEntries,
869
- jn as isFilteredPColumn,
870
- V as isImportFileHandleIndex,
871
- L as isImportFileHandleUpload,
872
- ln as isLiveLog,
873
- v as isNotNAPValue,
874
- Z as isPColumn,
875
- Rn as isPColumnResult,
949
+ Fn as getColumnIdAndSpec,
950
+ kn as getFileNameFromHandle,
951
+ R as getFilePathFromHandle,
952
+ vn as getPColumnSpecId,
953
+ mn as hasAbortError,
954
+ me as isAbortError,
955
+ le as isAggregateError,
956
+ En as isDataInfo,
957
+ K as isDataInfoEntries,
958
+ Tn as isFilteredPColumn,
959
+ F as isImportFileHandleIndex,
960
+ v as isImportFileHandleUpload,
961
+ Pn as isLiveLog,
962
+ z as isNotNAPValue,
963
+ rn as isPColumn,
964
+ Hn as isPColumnResult,
876
965
  f as isPColumnSpec,
877
- Fn as isPColumnSpecResult,
878
- Cn as isPTableAbsent,
879
- _ as isPValue,
880
- bn as isPartitionedDataInfoEntries,
881
- qn as isPlRef,
882
- H as isValueAbsent,
966
+ zn as isPColumnSpecResult,
967
+ Bn as isPTableAbsent,
968
+ H as isPValue,
969
+ Sn as isPartitionedDataInfoEntries,
970
+ ne as isPlRef,
971
+ X as isValueAbsent,
883
972
  g as isValueNA,
884
- gn as mapDataInfo,
885
- xn as mapDataInfoEntries,
973
+ Nn as mapDataInfo,
974
+ On as mapDataInfoEntries,
886
975
  h as mapJoinEntry,
887
- Kn as mapPObjectData,
888
- Dn as mapPTableDef,
889
- Gn as mapValueInVOE,
890
- k as matchAxis,
891
- X as matchAxisId,
976
+ Wn as mapPObjectData,
977
+ Un as mapPTableDef,
978
+ oe as mapValueInVOE,
979
+ E as matchAxis,
980
+ Z as matchAxisId,
892
981
  N as matchPColumn,
893
- mn as newRangeBytesOpt,
894
- Jn as pTableValue,
895
- Sn as pValueToStringOrNumber,
896
- T as pValueToStringOrNumberOrNull,
897
- Ln as parseColumnId,
898
- ee as parseJson,
899
- an as plId,
900
- Xn as plRefsEqual,
901
- Bn as resolveAnchors,
902
- M as safeConvertToPValue,
903
- _n as selectorsToPredicate,
904
- G as stringifyColumnId,
905
- Zn as stringifyJson,
906
- En as toJsonSafePValue,
907
- Qn as uniquePlId,
908
- pn as validateRangeBytes,
909
- zn as withEnrichments
982
+ An as newRangeBytesOpt,
983
+ jn as pTableValue,
984
+ Ln as pValueToStringOrNumber,
985
+ W as pValueToStringOrNumberOrNull,
986
+ Kn as parseColumnId,
987
+ ce as parseJson,
988
+ dn as plId,
989
+ re as plRefsEqual,
990
+ Mn as resolveAnchors,
991
+ q as safeConvertToPValue,
992
+ Gn as selectorsToPredicate,
993
+ D as serializeError,
994
+ L as serializeResult,
995
+ nn as stringifyColumnId,
996
+ ae as stringifyJson,
997
+ Dn as toJsonSafePValue,
998
+ ie as uniquePlId,
999
+ pe as unwrapResult,
1000
+ xn as validateRangeBytes,
1001
+ te as withEnrichments,
1002
+ he as wrapAndSerialize,
1003
+ ge as wrapAndSerializeAsync,
1004
+ yn as wrapAsyncCallback,
1005
+ pn as wrapCallback
910
1006
  };
911
1007
  //# sourceMappingURL=index.mjs.map