@milaboratories/pl-model-common 1.13.5 → 1.13.7
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/drivers/pframe/spec/spec.d.ts +20 -0
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +163 -133
- package/dist/index.mjs.map +1 -1
- package/dist/json.d.ts +19 -0
- package/dist/json.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/drivers/pframe/spec/spec.ts +42 -0
- package/src/index.ts +1 -0
- package/src/json.ts +37 -0
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (n, t, e) =>
|
|
4
|
-
import
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var $ = (n, t, e) => t in n ? I(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var m = (n, t, e) => $(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import h from "canonicalize";
|
|
5
5
|
import { z as y } from "zod";
|
|
6
|
-
function
|
|
6
|
+
function dn(n) {
|
|
7
7
|
return n !== void 0 && n.startsWith("log+live://log/");
|
|
8
8
|
}
|
|
9
9
|
function w(n) {
|
|
10
10
|
throw new Error("Unexpected object: " + n);
|
|
11
11
|
}
|
|
12
12
|
const S = "upload://upload/", E = "index://index/";
|
|
13
|
-
function
|
|
13
|
+
function D(n) {
|
|
14
14
|
return n.startsWith(S);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function L(n) {
|
|
17
17
|
return n.startsWith(E);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
if (
|
|
19
|
+
function V(n) {
|
|
20
|
+
if (L(n)) {
|
|
21
21
|
const t = n.slice(E.length);
|
|
22
22
|
return JSON.parse(decodeURIComponent(t)).path;
|
|
23
|
-
} else if (
|
|
23
|
+
} else if (D(n)) {
|
|
24
24
|
const t = n.slice(S.length);
|
|
25
25
|
return JSON.parse(decodeURIComponent(t)).localPath;
|
|
26
26
|
}
|
|
@@ -29,10 +29,10 @@ function I(n) {
|
|
|
29
29
|
function B(n) {
|
|
30
30
|
return n.replace(/^.*[\\/]/, "");
|
|
31
31
|
}
|
|
32
|
-
function dn(n) {
|
|
33
|
-
return B(I(n));
|
|
34
|
-
}
|
|
35
32
|
function pn(n) {
|
|
33
|
+
return B(V(n));
|
|
34
|
+
}
|
|
35
|
+
function mn(n) {
|
|
36
36
|
if (!n || typeof n != "object")
|
|
37
37
|
return !1;
|
|
38
38
|
const t = n;
|
|
@@ -49,7 +49,7 @@ function pn(n) {
|
|
|
49
49
|
return !1;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function yn(n, t) {
|
|
53
53
|
if (n !== void 0)
|
|
54
54
|
switch (n.type) {
|
|
55
55
|
case "Json":
|
|
@@ -94,10 +94,10 @@ function j(n) {
|
|
|
94
94
|
return !1;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function ln(n) {
|
|
98
98
|
return j(n) ? n.type === "JsonPartitioned" || n.type === "BinaryPartitioned" : !1;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function hn(n) {
|
|
101
101
|
switch (n.type) {
|
|
102
102
|
case "Json": {
|
|
103
103
|
const t = Object.entries(n.data).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
|
|
@@ -125,7 +125,7 @@ function ln(n) {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function gn(n) {
|
|
129
129
|
switch (n.type) {
|
|
130
130
|
case "Json": {
|
|
131
131
|
const t = {};
|
|
@@ -159,7 +159,7 @@ function hn(n) {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function bn(n, t) {
|
|
163
163
|
if (n !== void 0)
|
|
164
164
|
switch (n.type) {
|
|
165
165
|
case "Json":
|
|
@@ -189,8 +189,8 @@ function gn(n, t) {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
const F = -2147483648, P = -9007199254740991n,
|
|
193
|
-
function
|
|
192
|
+
const F = -2147483648, P = -9007199254740991n, wn = NaN, Pn = NaN, U = null, K = null;
|
|
193
|
+
function g(n, t) {
|
|
194
194
|
switch (t) {
|
|
195
195
|
case "Int":
|
|
196
196
|
return n === F;
|
|
@@ -208,14 +208,14 @@ function h(n, t) {
|
|
|
208
208
|
throw Error(`unsupported data type: ${t}`);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function xn(n) {
|
|
212
212
|
if (!R(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
|
|
213
213
|
return n;
|
|
214
214
|
}
|
|
215
215
|
function R(n, t) {
|
|
216
216
|
if (!t)
|
|
217
217
|
return typeof n == "string" || typeof n == "number" && isFinite(n) || typeof n == "bigint";
|
|
218
|
-
if (
|
|
218
|
+
if (g(n, t)) return !1;
|
|
219
219
|
switch (t) {
|
|
220
220
|
case "Int":
|
|
221
221
|
return typeof n == "number";
|
|
@@ -236,7 +236,7 @@ function R(n, t) {
|
|
|
236
236
|
function M(n, t) {
|
|
237
237
|
if (!t)
|
|
238
238
|
return n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint";
|
|
239
|
-
if (
|
|
239
|
+
if (g(n, t)) return !0;
|
|
240
240
|
switch (t) {
|
|
241
241
|
case "Int":
|
|
242
242
|
return typeof n == "number";
|
|
@@ -259,9 +259,9 @@ function An(n) {
|
|
|
259
259
|
if (typeof n == "bigint") return { bigint: n.toString() };
|
|
260
260
|
throw new Error(`Type ${typeof n} (value ${n}) not yet supported.`);
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function T(n, t) {
|
|
263
263
|
if (n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
|
|
264
|
-
if (t && !
|
|
264
|
+
if (t && !g(n, t) && !M(n, t))
|
|
265
265
|
throw new Error(`Unexpected value type, got ${typeof n}, expected ${t}`);
|
|
266
266
|
return n;
|
|
267
267
|
}
|
|
@@ -272,12 +272,12 @@ function _(n, t) {
|
|
|
272
272
|
}
|
|
273
273
|
throw new Error(`Unsupported type ${typeof n} (value ${n}).`);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
if (n =
|
|
275
|
+
function kn(n) {
|
|
276
|
+
if (n = v(n), n === null) throw new Error("Value is null");
|
|
277
277
|
return n;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
if (n =
|
|
279
|
+
function v(n) {
|
|
280
|
+
if (n = T(n), n === null) return null;
|
|
281
281
|
if (typeof n == "string") return n;
|
|
282
282
|
if (typeof n == "number") {
|
|
283
283
|
if (!isFinite(n)) throw new Error(`Value is not finite (${n})`);
|
|
@@ -287,19 +287,19 @@ function H(n) {
|
|
|
287
287
|
return Number(n);
|
|
288
288
|
throw new Error(`Unexpected value type: ${typeof n}`);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function _(n, t) {
|
|
291
291
|
const e = Math.floor(t / 8), r = 1 << 7 - t % 8;
|
|
292
292
|
return (n[e] & r) > 0;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
295
|
-
function
|
|
294
|
+
const H = { type: "absent" }, W = null;
|
|
295
|
+
function Nn(n) {
|
|
296
296
|
return typeof n == "object" && n !== null && n.type === "absent";
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
if (
|
|
300
|
-
return e.absent === void 0 ?
|
|
298
|
+
function Sn(n, t, e = {}) {
|
|
299
|
+
if (_(n.absent, t))
|
|
300
|
+
return e.absent === void 0 ? H : e.absent;
|
|
301
301
|
const r = n.data[t], o = n.type;
|
|
302
|
-
if (
|
|
302
|
+
if (g(r, o)) return e.na === void 0 ? W : e.na;
|
|
303
303
|
switch (o) {
|
|
304
304
|
case "Int":
|
|
305
305
|
return r;
|
|
@@ -317,15 +317,31 @@ function Nn(n, t, e = {}) {
|
|
|
317
317
|
throw Error(`unsupported data type: ${o}`);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
+
function En(n) {
|
|
321
|
+
return {
|
|
322
|
+
kind: n.kind,
|
|
323
|
+
valueType: n.valueType,
|
|
324
|
+
name: n.name,
|
|
325
|
+
domain: n.domain,
|
|
326
|
+
parentAxes: n.parentAxes,
|
|
327
|
+
axesId: z(n.axesSpec)
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function Cn(n) {
|
|
331
|
+
return {
|
|
332
|
+
columnId: n.id,
|
|
333
|
+
spec: n.spec
|
|
334
|
+
};
|
|
335
|
+
}
|
|
320
336
|
function p(n) {
|
|
321
337
|
const { type: t, name: e, domain: r } = n;
|
|
322
338
|
return { type: t, name: e, ...r && { domain: r } };
|
|
323
339
|
}
|
|
324
|
-
function
|
|
340
|
+
function z(n) {
|
|
325
341
|
return n.map(p);
|
|
326
342
|
}
|
|
327
|
-
function
|
|
328
|
-
return
|
|
343
|
+
function Jn(n) {
|
|
344
|
+
return h(p(n));
|
|
329
345
|
}
|
|
330
346
|
function X(n, t) {
|
|
331
347
|
if (n === void 0) return t === void 0;
|
|
@@ -334,10 +350,10 @@ function X(n, t) {
|
|
|
334
350
|
if (n[e] !== t[e]) return !1;
|
|
335
351
|
return !0;
|
|
336
352
|
}
|
|
337
|
-
function
|
|
353
|
+
function G(n, t) {
|
|
338
354
|
return n.name === t.name && X(n.domain, t.domain);
|
|
339
355
|
}
|
|
340
|
-
function
|
|
356
|
+
function On(n, t) {
|
|
341
357
|
return { ...n, src: l(n.src, t) };
|
|
342
358
|
}
|
|
343
359
|
function l(n, t) {
|
|
@@ -370,19 +386,19 @@ function l(n, t) {
|
|
|
370
386
|
w(n);
|
|
371
387
|
}
|
|
372
388
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
389
|
+
function Q(n) {
|
|
390
|
+
return h(n);
|
|
375
391
|
}
|
|
376
|
-
function
|
|
392
|
+
function In(n) {
|
|
377
393
|
return JSON.parse(n);
|
|
378
394
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
395
|
+
function x(n) {
|
|
396
|
+
return h(p(n));
|
|
381
397
|
}
|
|
382
|
-
function
|
|
398
|
+
function A(n, t) {
|
|
383
399
|
return JSON.stringify([n, t]);
|
|
384
400
|
}
|
|
385
|
-
class
|
|
401
|
+
class $n {
|
|
386
402
|
/**
|
|
387
403
|
* Creates a new anchor context from a set of anchor column specifications
|
|
388
404
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -404,14 +420,14 @@ class On {
|
|
|
404
420
|
e.sort((r, o) => r[0].localeCompare(o[0]));
|
|
405
421
|
for (const [r, o] of e) {
|
|
406
422
|
for (let s = 0; s < o.axesSpec.length; s++) {
|
|
407
|
-
const a = o.axesSpec[s], i =
|
|
423
|
+
const a = o.axesSpec[s], i = x(a);
|
|
408
424
|
this.axes.set(i, { anchor: r, idx: s });
|
|
409
425
|
}
|
|
410
426
|
if (o.domain !== void 0) {
|
|
411
427
|
const s = Object.entries(o.domain);
|
|
412
428
|
s.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s), r), this.domainPacks.push(s.map(([a]) => a));
|
|
413
429
|
for (const [a, i] of s) {
|
|
414
|
-
const u =
|
|
430
|
+
const u = A(a, i);
|
|
415
431
|
this.domains.set(u, r);
|
|
416
432
|
}
|
|
417
433
|
}
|
|
@@ -446,11 +462,11 @@ class On {
|
|
|
446
462
|
for (const [a, i] of Object.entries(t.domain ?? {})) {
|
|
447
463
|
if (o !== void 0 && o.has(a))
|
|
448
464
|
continue;
|
|
449
|
-
const u =
|
|
465
|
+
const u = A(a, i), c = this.domains.get(u);
|
|
450
466
|
r.domain ?? (r.domain = {}), r.domain[a] = c ? { anchor: c } : i;
|
|
451
467
|
}
|
|
452
468
|
if (r.axes = t.axesSpec.map((a) => {
|
|
453
|
-
const i =
|
|
469
|
+
const i = x(a), u = this.axes.get(i);
|
|
454
470
|
return u === void 0 ? p(a) : u;
|
|
455
471
|
}), !e || e.length === 0)
|
|
456
472
|
return r;
|
|
@@ -480,10 +496,10 @@ class On {
|
|
|
480
496
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
481
497
|
*/
|
|
482
498
|
deriveS(t, e) {
|
|
483
|
-
return
|
|
499
|
+
return Q(this.derive(t, e));
|
|
484
500
|
}
|
|
485
501
|
}
|
|
486
|
-
function
|
|
502
|
+
function Dn(n, t, e) {
|
|
487
503
|
const r = { ...t }, o = (e == null ? void 0 : e.ignoreMissingDomains) ?? !1;
|
|
488
504
|
if (r.domainAnchor !== void 0) {
|
|
489
505
|
const s = n[r.domainAnchor];
|
|
@@ -510,10 +526,10 @@ function $n(n, t, e) {
|
|
|
510
526
|
}
|
|
511
527
|
r.domain = s;
|
|
512
528
|
}
|
|
513
|
-
return r.axes && (r.axes = r.axes.map((s) =>
|
|
529
|
+
return r.axes && (r.axes = r.axes.map((s) => Y(n, s))), r;
|
|
514
530
|
}
|
|
515
|
-
function
|
|
516
|
-
if (!
|
|
531
|
+
function Y(n, t) {
|
|
532
|
+
if (!Z(t))
|
|
517
533
|
return t;
|
|
518
534
|
const e = t.anchor, r = n[e];
|
|
519
535
|
if (!r)
|
|
@@ -530,7 +546,7 @@ function Q(n, t) {
|
|
|
530
546
|
throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
|
|
531
547
|
return o[0];
|
|
532
548
|
} else if ("id" in t) {
|
|
533
|
-
const o = r.axesSpec.filter((s) =>
|
|
549
|
+
const o = r.axesSpec.filter((s) => G(t.id, p(s)));
|
|
534
550
|
if (o.length > 1)
|
|
535
551
|
throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
|
|
536
552
|
if (o.length === 0)
|
|
@@ -539,35 +555,35 @@ function Q(n, t) {
|
|
|
539
555
|
}
|
|
540
556
|
throw new Error("Unsupported axis reference type");
|
|
541
557
|
}
|
|
542
|
-
function
|
|
558
|
+
function Z(n) {
|
|
543
559
|
return typeof n == "object" && "anchor" in n;
|
|
544
560
|
}
|
|
545
|
-
function
|
|
561
|
+
function Ln(n) {
|
|
546
562
|
return typeof n == "object" && n !== null && "source" in n && "axisFilters" in n;
|
|
547
563
|
}
|
|
548
564
|
function f(n) {
|
|
549
565
|
return n.kind === "PColumn";
|
|
550
566
|
}
|
|
551
|
-
function
|
|
567
|
+
function q(n) {
|
|
552
568
|
return f(n.spec);
|
|
553
569
|
}
|
|
554
|
-
function
|
|
570
|
+
function Vn(n) {
|
|
555
571
|
return f(n.obj);
|
|
556
572
|
}
|
|
557
|
-
function
|
|
573
|
+
function Bn(n) {
|
|
558
574
|
return f(n.obj.spec);
|
|
559
575
|
}
|
|
560
|
-
function
|
|
561
|
-
if (!
|
|
576
|
+
function jn(n) {
|
|
577
|
+
if (!q(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
|
|
562
578
|
return n;
|
|
563
579
|
}
|
|
564
|
-
function
|
|
580
|
+
function Fn(n, t) {
|
|
565
581
|
return n === void 0 ? void 0 : {
|
|
566
582
|
...n,
|
|
567
583
|
data: t(n.data)
|
|
568
584
|
};
|
|
569
585
|
}
|
|
570
|
-
function
|
|
586
|
+
function Un(n) {
|
|
571
587
|
const t = /* @__PURE__ */ new Map(), e = (r) => {
|
|
572
588
|
switch (r.type) {
|
|
573
589
|
case "column":
|
|
@@ -590,21 +606,21 @@ function jn(n) {
|
|
|
590
606
|
};
|
|
591
607
|
return e(n), [...t.values()];
|
|
592
608
|
}
|
|
593
|
-
function
|
|
609
|
+
function nn(n) {
|
|
594
610
|
throw new Error("Unexpected object: " + n);
|
|
595
611
|
}
|
|
596
|
-
function
|
|
612
|
+
function b(n, t) {
|
|
597
613
|
switch (n.type) {
|
|
598
614
|
case "and":
|
|
599
615
|
for (const e of n.operands)
|
|
600
|
-
if (!
|
|
616
|
+
if (!b(e, t)) return !1;
|
|
601
617
|
return !0;
|
|
602
618
|
case "or":
|
|
603
619
|
for (const e of n.operands)
|
|
604
|
-
if (
|
|
620
|
+
if (b(e, t)) return !0;
|
|
605
621
|
return !1;
|
|
606
622
|
case "not":
|
|
607
|
-
return !
|
|
623
|
+
return !b(n.operand, t);
|
|
608
624
|
case "name":
|
|
609
625
|
return f(t) && t.name === n.name;
|
|
610
626
|
case "name_pattern":
|
|
@@ -622,7 +638,7 @@ function g(n, t) {
|
|
|
622
638
|
)
|
|
623
639
|
);
|
|
624
640
|
default:
|
|
625
|
-
|
|
641
|
+
nn(n);
|
|
626
642
|
}
|
|
627
643
|
}
|
|
628
644
|
function k(n, t) {
|
|
@@ -689,26 +705,26 @@ function N(n, t) {
|
|
|
689
705
|
}
|
|
690
706
|
return !0;
|
|
691
707
|
}
|
|
692
|
-
function
|
|
708
|
+
function Kn(n) {
|
|
693
709
|
return Array.isArray(n) ? (t) => n.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n);
|
|
694
710
|
}
|
|
695
|
-
const
|
|
711
|
+
const Rn = { href: "/" }, Mn = y.object({
|
|
696
712
|
__isRef: y.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
697
713
|
blockId: y.string().describe("Upstream block id"),
|
|
698
714
|
name: y.string().describe("Name of the output provided to the upstream block's output context")
|
|
699
715
|
}).describe(
|
|
700
716
|
"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."
|
|
701
717
|
).strict().readonly();
|
|
702
|
-
function
|
|
718
|
+
function Tn(n) {
|
|
703
719
|
return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === !0 && "blockId" in n && "name" in n;
|
|
704
720
|
}
|
|
705
|
-
function
|
|
721
|
+
function vn(n, t) {
|
|
706
722
|
return n.blockId === t.blockId && n.name === t.name;
|
|
707
723
|
}
|
|
708
724
|
function _n(n, t) {
|
|
709
725
|
return n.ok ? { ok: !0, value: t(n.value) } : n;
|
|
710
726
|
}
|
|
711
|
-
function
|
|
727
|
+
function tn(n) {
|
|
712
728
|
if (n instanceof Int8Array || n instanceof Uint8Array || n instanceof Uint8ClampedArray)
|
|
713
729
|
return new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
714
730
|
if (n instanceof ArrayBuffer) return new DataView(n);
|
|
@@ -716,25 +732,25 @@ function nn(n) {
|
|
|
716
732
|
"Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
|
|
717
733
|
);
|
|
718
734
|
}
|
|
719
|
-
const
|
|
735
|
+
const en = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", rn = "0123456789ABCDEFGHIJKLMNOPQRSTUV", on = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
720
736
|
function C(n, t, e) {
|
|
721
737
|
e = e || {};
|
|
722
738
|
let r, o;
|
|
723
739
|
switch (t) {
|
|
724
740
|
case "RFC3548":
|
|
725
741
|
case "RFC4648":
|
|
726
|
-
r =
|
|
742
|
+
r = en, o = !0;
|
|
727
743
|
break;
|
|
728
744
|
case "RFC4648-HEX":
|
|
729
|
-
r =
|
|
745
|
+
r = rn, o = !0;
|
|
730
746
|
break;
|
|
731
747
|
case "Crockford":
|
|
732
|
-
r =
|
|
748
|
+
r = on, o = !1;
|
|
733
749
|
break;
|
|
734
750
|
default:
|
|
735
751
|
throw new Error("Unknown base32 variant: " + String(t));
|
|
736
752
|
}
|
|
737
|
-
const s = e.padding !== void 0 ? e.padding : o, a =
|
|
753
|
+
const s = e.padding !== void 0 ? e.padding : o, a = tn(n);
|
|
738
754
|
let i = 0, u = 0, c = "";
|
|
739
755
|
for (let d = 0; d < a.byteLength; d++)
|
|
740
756
|
for (u = u << 8 | a.getUint8(d), i += 8; i >= 5; )
|
|
@@ -744,82 +760,96 @@ function C(n, t, e) {
|
|
|
744
760
|
c += "=";
|
|
745
761
|
return c;
|
|
746
762
|
}
|
|
747
|
-
const J = 15,
|
|
763
|
+
const J = 15, sn = 24, O = y.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
748
764
|
function Hn() {
|
|
749
765
|
const n = new Uint8Array(J);
|
|
750
766
|
return crypto.getRandomValues(n), O.parse(C(n, "RFC4648"));
|
|
751
767
|
}
|
|
752
|
-
function
|
|
768
|
+
function an(n) {
|
|
753
769
|
if (n.length !== J) throw new Error(`Wrong number of bytes: ${n.length}`);
|
|
754
770
|
return O.parse(C(n, "RFC4648"));
|
|
755
771
|
}
|
|
756
|
-
async function
|
|
772
|
+
async function Wn(n) {
|
|
757
773
|
const t = new TextEncoder(), e = await crypto.subtle.digest("SHA-256", t.encode(n));
|
|
758
|
-
return
|
|
774
|
+
return an(new Uint8Array(e.slice(0, 15)));
|
|
775
|
+
}
|
|
776
|
+
function zn(n) {
|
|
777
|
+
return JSON.stringify(n);
|
|
778
|
+
}
|
|
779
|
+
function Xn(n) {
|
|
780
|
+
return h(n);
|
|
781
|
+
}
|
|
782
|
+
function Gn(n) {
|
|
783
|
+
return JSON.parse(n);
|
|
759
784
|
}
|
|
760
785
|
export {
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
786
|
+
$n as AnchoredIdDeriver,
|
|
787
|
+
Rn as DefaultNavigationState,
|
|
788
|
+
H as PTableAbsent,
|
|
764
789
|
W as PTableNA,
|
|
765
790
|
K as PValueBytesNA,
|
|
766
|
-
|
|
767
|
-
|
|
791
|
+
Pn as PValueDoubleNA,
|
|
792
|
+
wn as PValueFloatNA,
|
|
768
793
|
F as PValueIntNA,
|
|
769
794
|
P as PValueLongNA,
|
|
770
795
|
U as PValueStringNA,
|
|
771
796
|
O as PlId,
|
|
772
797
|
J as PlIdBytes,
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
798
|
+
sn as PlIdLength,
|
|
799
|
+
Mn as PlRef,
|
|
800
|
+
Jn as canonicalizeAxisId,
|
|
801
|
+
Xn as canonicalizeJson,
|
|
802
|
+
hn as dataInfoToEntries,
|
|
803
|
+
Wn as digestPlId,
|
|
804
|
+
xn as ensureNotNAPValue,
|
|
805
|
+
jn as ensurePColumn,
|
|
806
|
+
gn as entriesToDataInfo,
|
|
807
|
+
b as executePSpecPredicate,
|
|
808
|
+
Un as extractAllColumns,
|
|
809
|
+
z as getAxesId,
|
|
784
810
|
p as getAxisId,
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
811
|
+
Cn as getColumnIdAndSpec,
|
|
812
|
+
pn as getFileNameFromHandle,
|
|
813
|
+
V as getFilePathFromHandle,
|
|
814
|
+
En as getPColumnSpecId,
|
|
815
|
+
mn as isDataInfo,
|
|
788
816
|
j as isDataInfoEntries,
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
817
|
+
Ln as isFilteredPColumn,
|
|
818
|
+
L as isImportFileHandleIndex,
|
|
819
|
+
D as isImportFileHandleUpload,
|
|
820
|
+
dn as isLiveLog,
|
|
793
821
|
R as isNotNAPValue,
|
|
794
|
-
|
|
795
|
-
|
|
822
|
+
q as isPColumn,
|
|
823
|
+
Bn as isPColumnResult,
|
|
796
824
|
f as isPColumnSpec,
|
|
797
|
-
|
|
798
|
-
|
|
825
|
+
Vn as isPColumnSpecResult,
|
|
826
|
+
Nn as isPTableAbsent,
|
|
799
827
|
M as isPValue,
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
828
|
+
ln as isPartitionedDataInfoEntries,
|
|
829
|
+
Tn as isPlRef,
|
|
830
|
+
_ as isValueAbsent,
|
|
831
|
+
g as isValueNA,
|
|
832
|
+
yn as mapDataInfo,
|
|
833
|
+
bn as mapDataInfoEntries,
|
|
806
834
|
l as mapJoinEntry,
|
|
807
|
-
|
|
808
|
-
|
|
835
|
+
Fn as mapPObjectData,
|
|
836
|
+
On as mapPTableDef,
|
|
809
837
|
_n as mapValueInVOE,
|
|
810
838
|
k as matchAxis,
|
|
811
|
-
|
|
839
|
+
G as matchAxisId,
|
|
812
840
|
N as matchPColumn,
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
841
|
+
Sn as pTableValue,
|
|
842
|
+
kn as pValueToStringOrNumber,
|
|
843
|
+
v as pValueToStringOrNumberOrNull,
|
|
844
|
+
In as parseColumnId,
|
|
845
|
+
Gn as parseJson,
|
|
846
|
+
an as plId,
|
|
847
|
+
vn as plRefsEqual,
|
|
848
|
+
Dn as resolveAnchors,
|
|
849
|
+
T as safeConvertToPValue,
|
|
850
|
+
Kn as selectorsToPredicate,
|
|
851
|
+
Q as stringifyColumnId,
|
|
852
|
+
zn as stringifyJson,
|
|
823
853
|
An as toJsonSafePValue,
|
|
824
854
|
Hn as uniquePlId
|
|
825
855
|
};
|