@milaboratories/pl-model-common 1.13.3 → 1.13.5
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/branding.d.ts +3 -3
- package/dist/branding.d.ts.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +13 -1
- package/dist/drivers/pframe/data_info.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +15 -4
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +2 -1
- package/dist/drivers/pframe/spec/ids.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +209 -202
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/branding.ts +2 -2
- package/src/drivers/pframe/data_info.ts +20 -2
- package/src/drivers/pframe/spec/anchored.ts +26 -9
- package/src/drivers/pframe/spec/ids.ts +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
var $ = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { z as
|
|
6
|
-
function
|
|
2
|
+
var D = (n, t, e) => t in n ? $(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var m = (n, t, e) => D(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import b from "canonicalize";
|
|
5
|
+
import { z as y } from "zod";
|
|
6
|
+
function fn(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 L(n) {
|
|
14
14
|
return n.startsWith(S);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function V(n) {
|
|
17
17
|
return n.startsWith(E);
|
|
18
18
|
}
|
|
19
19
|
function I(n) {
|
|
20
|
-
if (
|
|
20
|
+
if (V(n)) {
|
|
21
21
|
const t = n.slice(E.length);
|
|
22
22
|
return JSON.parse(decodeURIComponent(t)).path;
|
|
23
|
-
} else if (
|
|
23
|
+
} else if (L(n)) {
|
|
24
24
|
const t = n.slice(S.length);
|
|
25
25
|
return JSON.parse(decodeURIComponent(t)).localPath;
|
|
26
26
|
}
|
|
27
27
|
w(n);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function B(n) {
|
|
30
30
|
return n.replace(/^.*[\\/]/, "");
|
|
31
31
|
}
|
|
32
|
-
function fn(n) {
|
|
33
|
-
return j(I(n));
|
|
34
|
-
}
|
|
35
32
|
function dn(n) {
|
|
33
|
+
return B(I(n));
|
|
34
|
+
}
|
|
35
|
+
function pn(n) {
|
|
36
36
|
if (!n || typeof n != "object")
|
|
37
37
|
return !1;
|
|
38
38
|
const t = n;
|
|
@@ -49,7 +49,7 @@ function dn(n) {
|
|
|
49
49
|
return !1;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function mn(n, t) {
|
|
53
53
|
if (n !== void 0)
|
|
54
54
|
switch (n.type) {
|
|
55
55
|
case "Json":
|
|
@@ -77,7 +77,7 @@ function pn(n, t) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function j(n) {
|
|
81
81
|
if (!n || typeof n != "object")
|
|
82
82
|
return !1;
|
|
83
83
|
const t = n;
|
|
@@ -95,6 +95,9 @@ function mn(n) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
function yn(n) {
|
|
98
|
+
return j(n) ? n.type === "JsonPartitioned" || n.type === "BinaryPartitioned" : !1;
|
|
99
|
+
}
|
|
100
|
+
function ln(n) {
|
|
98
101
|
switch (n.type) {
|
|
99
102
|
case "Json": {
|
|
100
103
|
const t = Object.entries(n.data).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
|
|
@@ -122,7 +125,7 @@ function yn(n) {
|
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
|
-
function
|
|
128
|
+
function hn(n) {
|
|
126
129
|
switch (n.type) {
|
|
127
130
|
case "Json": {
|
|
128
131
|
const t = {};
|
|
@@ -156,7 +159,7 @@ function ln(n) {
|
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function gn(n, t) {
|
|
160
163
|
if (n !== void 0)
|
|
161
164
|
switch (n.type) {
|
|
162
165
|
case "Json":
|
|
@@ -186,30 +189,30 @@ function hn(n, t) {
|
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
const
|
|
192
|
+
const F = -2147483648, P = -9007199254740991n, bn = NaN, wn = NaN, U = null, K = null;
|
|
190
193
|
function h(n, t) {
|
|
191
194
|
switch (t) {
|
|
192
195
|
case "Int":
|
|
193
|
-
return n ===
|
|
196
|
+
return n === F;
|
|
194
197
|
case "Long":
|
|
195
|
-
return n === Number(
|
|
198
|
+
return n === Number(P) || n === P;
|
|
196
199
|
case "Float":
|
|
197
200
|
return Number.isNaN(n);
|
|
198
201
|
case "Double":
|
|
199
202
|
return Number.isNaN(n);
|
|
200
203
|
case "String":
|
|
201
|
-
return n === F;
|
|
202
|
-
case "Bytes":
|
|
203
204
|
return n === U;
|
|
205
|
+
case "Bytes":
|
|
206
|
+
return n === K;
|
|
204
207
|
default:
|
|
205
208
|
throw Error(`unsupported data type: ${t}`);
|
|
206
209
|
}
|
|
207
210
|
}
|
|
208
|
-
function
|
|
209
|
-
if (!
|
|
211
|
+
function Pn(n) {
|
|
212
|
+
if (!R(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
|
|
210
213
|
return n;
|
|
211
214
|
}
|
|
212
|
-
function
|
|
215
|
+
function R(n, t) {
|
|
213
216
|
if (!t)
|
|
214
217
|
return typeof n == "string" || typeof n == "number" && isFinite(n) || typeof n == "bigint";
|
|
215
218
|
if (h(n, t)) return !1;
|
|
@@ -230,7 +233,7 @@ function K(n, t) {
|
|
|
230
233
|
throw Error(`unsupported data type: ${t}`);
|
|
231
234
|
}
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function M(n, t) {
|
|
234
237
|
if (!t)
|
|
235
238
|
return n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint";
|
|
236
239
|
if (h(n, t)) return !0;
|
|
@@ -256,9 +259,9 @@ function An(n) {
|
|
|
256
259
|
if (typeof n == "bigint") return { bigint: n.toString() };
|
|
257
260
|
throw new Error(`Type ${typeof n} (value ${n}) not yet supported.`);
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function _(n, t) {
|
|
260
263
|
if (n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
|
|
261
|
-
if (t && !h(n, t) && !
|
|
264
|
+
if (t && !h(n, t) && !M(n, t))
|
|
262
265
|
throw new Error(`Unexpected value type, got ${typeof n}, expected ${t}`);
|
|
263
266
|
return n;
|
|
264
267
|
}
|
|
@@ -269,12 +272,12 @@ function M(n, t) {
|
|
|
269
272
|
}
|
|
270
273
|
throw new Error(`Unsupported type ${typeof n} (value ${n}).`);
|
|
271
274
|
}
|
|
272
|
-
function
|
|
273
|
-
if (n =
|
|
275
|
+
function xn(n) {
|
|
276
|
+
if (n = H(n), n === null) throw new Error("Value is null");
|
|
274
277
|
return n;
|
|
275
278
|
}
|
|
276
|
-
function
|
|
277
|
-
if (n =
|
|
279
|
+
function H(n) {
|
|
280
|
+
if (n = _(n), n === null) return null;
|
|
278
281
|
if (typeof n == "string") return n;
|
|
279
282
|
if (typeof n == "number") {
|
|
280
283
|
if (!isFinite(n)) throw new Error(`Value is not finite (${n})`);
|
|
@@ -284,19 +287,19 @@ function _(n) {
|
|
|
284
287
|
return Number(n);
|
|
285
288
|
throw new Error(`Unexpected value type: ${typeof n}`);
|
|
286
289
|
}
|
|
287
|
-
function
|
|
290
|
+
function T(n, t) {
|
|
288
291
|
const e = Math.floor(t / 8), r = 1 << 7 - t % 8;
|
|
289
292
|
return (n[e] & r) > 0;
|
|
290
293
|
}
|
|
291
|
-
const
|
|
292
|
-
function
|
|
294
|
+
const v = { type: "absent" }, W = null;
|
|
295
|
+
function kn(n) {
|
|
293
296
|
return typeof n == "object" && n !== null && n.type === "absent";
|
|
294
297
|
}
|
|
295
|
-
function
|
|
296
|
-
if (
|
|
297
|
-
return e.absent === void 0 ?
|
|
298
|
+
function Nn(n, t, e = {}) {
|
|
299
|
+
if (T(n.absent, t))
|
|
300
|
+
return e.absent === void 0 ? v : e.absent;
|
|
298
301
|
const r = n.data[t], o = n.type;
|
|
299
|
-
if (h(r, o)) return e.na === void 0 ?
|
|
302
|
+
if (h(r, o)) return e.na === void 0 ? W : e.na;
|
|
300
303
|
switch (o) {
|
|
301
304
|
case "Int":
|
|
302
305
|
return r;
|
|
@@ -314,27 +317,27 @@ function kn(n, t, e = {}) {
|
|
|
314
317
|
throw Error(`unsupported data type: ${o}`);
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
|
-
function
|
|
320
|
+
function p(n) {
|
|
318
321
|
const { type: t, name: e, domain: r } = n;
|
|
319
322
|
return { type: t, name: e, ...r && { domain: r } };
|
|
320
323
|
}
|
|
321
|
-
function Nn(n) {
|
|
322
|
-
return n.map(y);
|
|
323
|
-
}
|
|
324
324
|
function Sn(n) {
|
|
325
|
-
return
|
|
325
|
+
return n.map(p);
|
|
326
|
+
}
|
|
327
|
+
function En(n) {
|
|
328
|
+
return b(p(n));
|
|
326
329
|
}
|
|
327
|
-
function
|
|
330
|
+
function X(n, t) {
|
|
328
331
|
if (n === void 0) return t === void 0;
|
|
329
332
|
if (t === void 0) return !0;
|
|
330
333
|
for (const e in t)
|
|
331
334
|
if (n[e] !== t[e]) return !1;
|
|
332
335
|
return !0;
|
|
333
336
|
}
|
|
334
|
-
function
|
|
335
|
-
return n.name === t.name &&
|
|
337
|
+
function z(n, t) {
|
|
338
|
+
return n.name === t.name && X(n.domain, t.domain);
|
|
336
339
|
}
|
|
337
|
-
function
|
|
340
|
+
function Cn(n, t) {
|
|
338
341
|
return { ...n, src: l(n.src, t) };
|
|
339
342
|
}
|
|
340
343
|
function l(n, t) {
|
|
@@ -367,14 +370,14 @@ function l(n, t) {
|
|
|
367
370
|
w(n);
|
|
368
371
|
}
|
|
369
372
|
}
|
|
370
|
-
function
|
|
371
|
-
return
|
|
373
|
+
function G(n) {
|
|
374
|
+
return b(n);
|
|
372
375
|
}
|
|
373
|
-
function
|
|
376
|
+
function Jn(n) {
|
|
374
377
|
return JSON.parse(n);
|
|
375
378
|
}
|
|
376
|
-
function
|
|
377
|
-
return
|
|
379
|
+
function A(n) {
|
|
380
|
+
return b(p(n));
|
|
378
381
|
}
|
|
379
382
|
function x(n, t) {
|
|
380
383
|
return JSON.stringify([n, t]);
|
|
@@ -385,30 +388,30 @@ class On {
|
|
|
385
388
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
386
389
|
*/
|
|
387
390
|
constructor(t) {
|
|
388
|
-
|
|
389
|
-
|
|
391
|
+
m(this, "domains", /* @__PURE__ */ new Map());
|
|
392
|
+
m(this, "axes", /* @__PURE__ */ new Map());
|
|
390
393
|
/**
|
|
391
394
|
* Domain packs are used to group domain keys that can be anchored to the same anchor
|
|
392
395
|
* This is used to optimize the lookup of domain anchors
|
|
393
396
|
*/
|
|
394
|
-
|
|
397
|
+
m(this, "domainPacks", []);
|
|
395
398
|
/**
|
|
396
399
|
* Maps domain packs to anchors
|
|
397
400
|
*/
|
|
398
|
-
|
|
401
|
+
m(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
|
|
399
402
|
this.anchors = t;
|
|
400
403
|
const e = Object.entries(t);
|
|
401
404
|
e.sort((r, o) => r[0].localeCompare(o[0]));
|
|
402
405
|
for (const [r, o] of e) {
|
|
403
|
-
for (let
|
|
404
|
-
const a = o.axesSpec[
|
|
405
|
-
this.axes.set(
|
|
406
|
+
for (let s = 0; s < o.axesSpec.length; s++) {
|
|
407
|
+
const a = o.axesSpec[s], i = A(a);
|
|
408
|
+
this.axes.set(i, { anchor: r, idx: s });
|
|
406
409
|
}
|
|
407
410
|
if (o.domain !== void 0) {
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
for (const [a,
|
|
411
|
-
const u = x(a,
|
|
411
|
+
const s = Object.entries(o.domain);
|
|
412
|
+
s.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s), r), this.domainPacks.push(s.map(([a]) => a));
|
|
413
|
+
for (const [a, i] of s) {
|
|
414
|
+
const u = x(a, i);
|
|
412
415
|
this.domains.set(u, r);
|
|
413
416
|
}
|
|
414
417
|
}
|
|
@@ -426,48 +429,48 @@ class On {
|
|
|
426
429
|
if (t.domain !== void 0)
|
|
427
430
|
n:
|
|
428
431
|
for (const a of this.domainPacks) {
|
|
429
|
-
const
|
|
432
|
+
const i = [];
|
|
430
433
|
for (const c of a) {
|
|
431
434
|
const d = t.domain[c];
|
|
432
435
|
if (d !== void 0)
|
|
433
|
-
|
|
436
|
+
i.push([c, d]);
|
|
434
437
|
else
|
|
435
438
|
break n;
|
|
436
439
|
}
|
|
437
|
-
const u = this.domainPackToAnchor.get(JSON.stringify(
|
|
440
|
+
const u = this.domainPackToAnchor.get(JSON.stringify(i));
|
|
438
441
|
if (u !== void 0) {
|
|
439
442
|
r.domainAnchor = u, o = new Set(a);
|
|
440
443
|
break;
|
|
441
444
|
}
|
|
442
445
|
}
|
|
443
|
-
for (const [a,
|
|
446
|
+
for (const [a, i] of Object.entries(t.domain ?? {})) {
|
|
444
447
|
if (o !== void 0 && o.has(a))
|
|
445
448
|
continue;
|
|
446
|
-
const u = x(a,
|
|
447
|
-
r.domain ?? (r.domain = {}), r.domain[a] = c ? { anchor: c } :
|
|
449
|
+
const u = x(a, i), c = this.domains.get(u);
|
|
450
|
+
r.domain ?? (r.domain = {}), r.domain[a] = c ? { anchor: c } : i;
|
|
448
451
|
}
|
|
449
452
|
if (r.axes = t.axesSpec.map((a) => {
|
|
450
|
-
const
|
|
451
|
-
return
|
|
453
|
+
const i = A(a), u = this.axes.get(i);
|
|
454
|
+
return u === void 0 ? p(a) : u;
|
|
452
455
|
}), !e || e.length === 0)
|
|
453
456
|
return r;
|
|
454
|
-
const
|
|
457
|
+
const s = [];
|
|
455
458
|
for (const a of e) {
|
|
456
|
-
const [
|
|
457
|
-
if (typeof
|
|
458
|
-
if (
|
|
459
|
-
throw new Error(`Axis index ${
|
|
460
|
-
|
|
459
|
+
const [i, u] = a;
|
|
460
|
+
if (typeof i == "number") {
|
|
461
|
+
if (i < 0 || i >= t.axesSpec.length)
|
|
462
|
+
throw new Error(`Axis index ${i} is out of bounds (0-${t.axesSpec.length - 1})`);
|
|
463
|
+
s.push([i, u]);
|
|
461
464
|
} else {
|
|
462
|
-
const c = t.axesSpec.findIndex((d) => d.name ===
|
|
465
|
+
const c = t.axesSpec.findIndex((d) => d.name === i);
|
|
463
466
|
if (c === -1)
|
|
464
|
-
throw new Error(`Axis with name "${
|
|
465
|
-
|
|
467
|
+
throw new Error(`Axis with name "${i}" not found in the column specification`);
|
|
468
|
+
s.push([c, u]);
|
|
466
469
|
}
|
|
467
470
|
}
|
|
468
|
-
return
|
|
471
|
+
return s.sort((a, i) => a[0] - i[0]), {
|
|
469
472
|
source: r,
|
|
470
|
-
axisFilters:
|
|
473
|
+
axisFilters: s
|
|
471
474
|
};
|
|
472
475
|
}
|
|
473
476
|
/**
|
|
@@ -477,37 +480,40 @@ class On {
|
|
|
477
480
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
478
481
|
*/
|
|
479
482
|
deriveS(t, e) {
|
|
480
|
-
return
|
|
483
|
+
return G(this.derive(t, e));
|
|
481
484
|
}
|
|
482
485
|
}
|
|
483
|
-
function
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
if (!
|
|
488
|
-
throw new Error(`Anchor "${
|
|
489
|
-
const
|
|
490
|
-
|
|
486
|
+
function $n(n, t, e) {
|
|
487
|
+
const r = { ...t }, o = (e == null ? void 0 : e.ignoreMissingDomains) ?? !1;
|
|
488
|
+
if (r.domainAnchor !== void 0) {
|
|
489
|
+
const s = n[r.domainAnchor];
|
|
490
|
+
if (!s)
|
|
491
|
+
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
492
|
+
const a = s.domain || {};
|
|
493
|
+
r.domain = { ...a, ...r.domain }, delete r.domainAnchor;
|
|
491
494
|
}
|
|
492
|
-
if (
|
|
493
|
-
const
|
|
494
|
-
for (const [
|
|
495
|
+
if (r.domain) {
|
|
496
|
+
const s = {};
|
|
497
|
+
for (const [a, i] of Object.entries(r.domain))
|
|
495
498
|
if (typeof i == "string")
|
|
496
|
-
|
|
499
|
+
s[a] = i;
|
|
497
500
|
else {
|
|
498
|
-
const
|
|
499
|
-
if (!
|
|
500
|
-
throw new Error(`Anchor "${i.anchor}" not found for domain key "${
|
|
501
|
-
if (!
|
|
502
|
-
|
|
503
|
-
|
|
501
|
+
const u = n[i.anchor];
|
|
502
|
+
if (!u)
|
|
503
|
+
throw new Error(`Anchor "${i.anchor}" not found for domain key "${a}"`);
|
|
504
|
+
if (!u.domain || u.domain[a] === void 0) {
|
|
505
|
+
if (!o)
|
|
506
|
+
throw new Error(`Domain key "${a}" not found in anchor "${i.anchor}"`);
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
s[a] = u.domain[a];
|
|
504
510
|
}
|
|
505
|
-
|
|
511
|
+
r.domain = s;
|
|
506
512
|
}
|
|
507
|
-
return
|
|
513
|
+
return r.axes && (r.axes = r.axes.map((s) => Q(n, s))), r;
|
|
508
514
|
}
|
|
509
|
-
function
|
|
510
|
-
if (!
|
|
515
|
+
function Q(n, t) {
|
|
516
|
+
if (!Y(t))
|
|
511
517
|
return t;
|
|
512
518
|
const e = t.anchor, r = n[e];
|
|
513
519
|
if (!r)
|
|
@@ -517,14 +523,14 @@ function G(n, t) {
|
|
|
517
523
|
throw new Error(`Axis index ${t.idx} out of bounds for anchor "${e}"`);
|
|
518
524
|
return r.axesSpec[t.idx];
|
|
519
525
|
} else if ("name" in t) {
|
|
520
|
-
const o = r.axesSpec.filter((
|
|
526
|
+
const o = r.axesSpec.filter((s) => s.name === t.name);
|
|
521
527
|
if (o.length > 1)
|
|
522
528
|
throw new Error(`Multiple axes with name "${t.name}" found in anchor "${e}"`);
|
|
523
529
|
if (o.length === 0)
|
|
524
530
|
throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
|
|
525
531
|
return o[0];
|
|
526
532
|
} else if ("id" in t) {
|
|
527
|
-
const o = r.axesSpec.filter((
|
|
533
|
+
const o = r.axesSpec.filter((s) => z(t.id, p(s)));
|
|
528
534
|
if (o.length > 1)
|
|
529
535
|
throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
|
|
530
536
|
if (o.length === 0)
|
|
@@ -533,16 +539,16 @@ function G(n, t) {
|
|
|
533
539
|
}
|
|
534
540
|
throw new Error("Unsupported axis reference type");
|
|
535
541
|
}
|
|
536
|
-
function
|
|
542
|
+
function Y(n) {
|
|
537
543
|
return typeof n == "object" && "anchor" in n;
|
|
538
544
|
}
|
|
539
|
-
function
|
|
545
|
+
function Dn(n) {
|
|
540
546
|
return typeof n == "object" && n !== null && "source" in n && "axisFilters" in n;
|
|
541
547
|
}
|
|
542
548
|
function f(n) {
|
|
543
549
|
return n.kind === "PColumn";
|
|
544
550
|
}
|
|
545
|
-
function
|
|
551
|
+
function Z(n) {
|
|
546
552
|
return f(n.spec);
|
|
547
553
|
}
|
|
548
554
|
function Ln(n) {
|
|
@@ -551,11 +557,11 @@ function Ln(n) {
|
|
|
551
557
|
function Vn(n) {
|
|
552
558
|
return f(n.obj.spec);
|
|
553
559
|
}
|
|
554
|
-
function
|
|
555
|
-
if (!
|
|
560
|
+
function In(n) {
|
|
561
|
+
if (!Z(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
|
|
556
562
|
return n;
|
|
557
563
|
}
|
|
558
|
-
function
|
|
564
|
+
function Bn(n, t) {
|
|
559
565
|
return n === void 0 ? void 0 : {
|
|
560
566
|
...n,
|
|
561
567
|
data: t(n.data)
|
|
@@ -584,21 +590,21 @@ function jn(n) {
|
|
|
584
590
|
};
|
|
585
591
|
return e(n), [...t.values()];
|
|
586
592
|
}
|
|
587
|
-
function
|
|
593
|
+
function q(n) {
|
|
588
594
|
throw new Error("Unexpected object: " + n);
|
|
589
595
|
}
|
|
590
|
-
function
|
|
596
|
+
function g(n, t) {
|
|
591
597
|
switch (n.type) {
|
|
592
598
|
case "and":
|
|
593
599
|
for (const e of n.operands)
|
|
594
|
-
if (!
|
|
600
|
+
if (!g(e, t)) return !1;
|
|
595
601
|
return !0;
|
|
596
602
|
case "or":
|
|
597
603
|
for (const e of n.operands)
|
|
598
|
-
if (
|
|
604
|
+
if (g(e, t)) return !0;
|
|
599
605
|
return !1;
|
|
600
606
|
case "not":
|
|
601
|
-
return !
|
|
607
|
+
return !g(n.operand, t);
|
|
602
608
|
case "name":
|
|
603
609
|
return f(t) && t.name === n.name;
|
|
604
610
|
case "name_pattern":
|
|
@@ -611,12 +617,12 @@ function b(n, t) {
|
|
|
611
617
|
return f(t) && n.axes.every(
|
|
612
618
|
(e) => t.axesSpec.some(
|
|
613
619
|
(r) => (e.type === void 0 || e.type === r.type) && (e.name === void 0 || e.name === r.name) && (e.domain === void 0 || Object.keys(e.domain).length === 0 || r.domain !== void 0 && Object.entries(e.domain).every(
|
|
614
|
-
([o,
|
|
620
|
+
([o, s]) => r.domain[o] === s
|
|
615
621
|
))
|
|
616
622
|
)
|
|
617
623
|
);
|
|
618
624
|
default:
|
|
619
|
-
|
|
625
|
+
q(n);
|
|
620
626
|
}
|
|
621
627
|
}
|
|
622
628
|
function k(n, t) {
|
|
@@ -654,7 +660,7 @@ function N(n, t) {
|
|
|
654
660
|
return !1;
|
|
655
661
|
}
|
|
656
662
|
if (t.axes !== void 0) {
|
|
657
|
-
const e = n.axesSpec.map(
|
|
663
|
+
const e = n.axesSpec.map(p);
|
|
658
664
|
if (t.partialAxesMatch) {
|
|
659
665
|
for (const r of t.axes)
|
|
660
666
|
if (!e.some((o) => k(r, o)))
|
|
@@ -676,33 +682,33 @@ function N(n, t) {
|
|
|
676
682
|
if (t.annotationPatterns !== void 0) {
|
|
677
683
|
const e = n.annotations || {};
|
|
678
684
|
for (const [r, o] of Object.entries(t.annotationPatterns)) {
|
|
679
|
-
const
|
|
680
|
-
if (
|
|
685
|
+
const s = e[r];
|
|
686
|
+
if (s === void 0 || !new RegExp(o).test(s))
|
|
681
687
|
return !1;
|
|
682
688
|
}
|
|
683
689
|
}
|
|
684
690
|
return !0;
|
|
685
691
|
}
|
|
686
|
-
function
|
|
692
|
+
function Fn(n) {
|
|
687
693
|
return Array.isArray(n) ? (t) => n.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n);
|
|
688
694
|
}
|
|
689
|
-
const
|
|
690
|
-
__isRef:
|
|
691
|
-
blockId:
|
|
692
|
-
name:
|
|
695
|
+
const Un = { href: "/" }, Kn = y.object({
|
|
696
|
+
__isRef: y.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
697
|
+
blockId: y.string().describe("Upstream block id"),
|
|
698
|
+
name: y.string().describe("Name of the output provided to the upstream block's output context")
|
|
693
699
|
}).describe(
|
|
694
700
|
"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."
|
|
695
701
|
).strict().readonly();
|
|
696
|
-
function
|
|
702
|
+
function Rn(n) {
|
|
697
703
|
return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === !0 && "blockId" in n && "name" in n;
|
|
698
704
|
}
|
|
699
|
-
function
|
|
705
|
+
function Mn(n, t) {
|
|
700
706
|
return n.blockId === t.blockId && n.name === t.name;
|
|
701
707
|
}
|
|
702
|
-
function
|
|
708
|
+
function _n(n, t) {
|
|
703
709
|
return n.ok ? { ok: !0, value: t(n.value) } : n;
|
|
704
710
|
}
|
|
705
|
-
function
|
|
711
|
+
function nn(n) {
|
|
706
712
|
if (n instanceof Int8Array || n instanceof Uint8Array || n instanceof Uint8ClampedArray)
|
|
707
713
|
return new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
708
714
|
if (n instanceof ArrayBuffer) return new DataView(n);
|
|
@@ -710,110 +716,111 @@ function q(n) {
|
|
|
710
716
|
"Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
|
|
711
717
|
);
|
|
712
718
|
}
|
|
713
|
-
const
|
|
719
|
+
const tn = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", en = "0123456789ABCDEFGHIJKLMNOPQRSTUV", rn = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
714
720
|
function C(n, t, e) {
|
|
715
721
|
e = e || {};
|
|
716
722
|
let r, o;
|
|
717
723
|
switch (t) {
|
|
718
724
|
case "RFC3548":
|
|
719
725
|
case "RFC4648":
|
|
720
|
-
r =
|
|
726
|
+
r = tn, o = !0;
|
|
721
727
|
break;
|
|
722
728
|
case "RFC4648-HEX":
|
|
723
|
-
r =
|
|
729
|
+
r = en, o = !0;
|
|
724
730
|
break;
|
|
725
731
|
case "Crockford":
|
|
726
|
-
r =
|
|
732
|
+
r = rn, o = !1;
|
|
727
733
|
break;
|
|
728
734
|
default:
|
|
729
735
|
throw new Error("Unknown base32 variant: " + String(t));
|
|
730
736
|
}
|
|
731
|
-
const
|
|
732
|
-
let
|
|
737
|
+
const s = e.padding !== void 0 ? e.padding : o, a = nn(n);
|
|
738
|
+
let i = 0, u = 0, c = "";
|
|
733
739
|
for (let d = 0; d < a.byteLength; d++)
|
|
734
|
-
for (u = u << 8 | a.getUint8(d),
|
|
735
|
-
c += r[u >>>
|
|
736
|
-
if (
|
|
740
|
+
for (u = u << 8 | a.getUint8(d), i += 8; i >= 5; )
|
|
741
|
+
c += r[u >>> i - 5 & 31], i -= 5;
|
|
742
|
+
if (i > 0 && (c += r[u << 5 - i & 31]), s)
|
|
737
743
|
for (; c.length % 8 !== 0; )
|
|
738
744
|
c += "=";
|
|
739
745
|
return c;
|
|
740
746
|
}
|
|
741
|
-
const
|
|
742
|
-
function
|
|
743
|
-
const n = new Uint8Array(
|
|
744
|
-
return crypto.getRandomValues(n),
|
|
747
|
+
const J = 15, on = 24, O = y.string().length(on).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
748
|
+
function Hn() {
|
|
749
|
+
const n = new Uint8Array(J);
|
|
750
|
+
return crypto.getRandomValues(n), O.parse(C(n, "RFC4648"));
|
|
745
751
|
}
|
|
746
|
-
function
|
|
747
|
-
if (n.length !==
|
|
748
|
-
return
|
|
752
|
+
function sn(n) {
|
|
753
|
+
if (n.length !== J) throw new Error(`Wrong number of bytes: ${n.length}`);
|
|
754
|
+
return O.parse(C(n, "RFC4648"));
|
|
749
755
|
}
|
|
750
|
-
async function
|
|
756
|
+
async function Tn(n) {
|
|
751
757
|
const t = new TextEncoder(), e = await crypto.subtle.digest("SHA-256", t.encode(n));
|
|
752
|
-
return
|
|
758
|
+
return sn(new Uint8Array(e.slice(0, 15)));
|
|
753
759
|
}
|
|
754
760
|
export {
|
|
755
761
|
On as AnchoredIdDeriver,
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
762
|
+
Un as DefaultNavigationState,
|
|
763
|
+
v as PTableAbsent,
|
|
764
|
+
W as PTableNA,
|
|
765
|
+
K as PValueBytesNA,
|
|
766
|
+
wn as PValueDoubleNA,
|
|
761
767
|
bn as PValueFloatNA,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
768
|
+
F as PValueIntNA,
|
|
769
|
+
P as PValueLongNA,
|
|
770
|
+
U as PValueStringNA,
|
|
771
|
+
O as PlId,
|
|
772
|
+
J as PlIdBytes,
|
|
773
|
+
on as PlIdLength,
|
|
774
|
+
Kn as PlRef,
|
|
775
|
+
En as canonicalizeAxisId,
|
|
776
|
+
ln as dataInfoToEntries,
|
|
777
|
+
Tn as digestPlId,
|
|
778
|
+
Pn as ensureNotNAPValue,
|
|
779
|
+
In as ensurePColumn,
|
|
780
|
+
hn as entriesToDataInfo,
|
|
781
|
+
g as executePSpecPredicate,
|
|
776
782
|
jn as extractAllColumns,
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
783
|
+
Sn as getAxesId,
|
|
784
|
+
p as getAxisId,
|
|
785
|
+
dn as getFileNameFromHandle,
|
|
780
786
|
I as getFilePathFromHandle,
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
787
|
+
pn as isDataInfo,
|
|
788
|
+
j as isDataInfoEntries,
|
|
789
|
+
Dn as isFilteredPColumn,
|
|
790
|
+
V as isImportFileHandleIndex,
|
|
791
|
+
L as isImportFileHandleUpload,
|
|
792
|
+
fn as isLiveLog,
|
|
793
|
+
R as isNotNAPValue,
|
|
794
|
+
Z as isPColumn,
|
|
789
795
|
Vn as isPColumnResult,
|
|
790
796
|
f as isPColumnSpec,
|
|
791
797
|
Ln as isPColumnSpecResult,
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
798
|
+
kn as isPTableAbsent,
|
|
799
|
+
M as isPValue,
|
|
800
|
+
yn as isPartitionedDataInfoEntries,
|
|
801
|
+
Rn as isPlRef,
|
|
802
|
+
T as isValueAbsent,
|
|
796
803
|
h as isValueNA,
|
|
797
|
-
|
|
798
|
-
|
|
804
|
+
mn as mapDataInfo,
|
|
805
|
+
gn as mapDataInfoEntries,
|
|
799
806
|
l as mapJoinEntry,
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
807
|
+
Bn as mapPObjectData,
|
|
808
|
+
Cn as mapPTableDef,
|
|
809
|
+
_n as mapValueInVOE,
|
|
803
810
|
k as matchAxis,
|
|
804
|
-
|
|
811
|
+
z as matchAxisId,
|
|
805
812
|
N as matchPColumn,
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
813
|
+
Nn as pTableValue,
|
|
814
|
+
xn as pValueToStringOrNumber,
|
|
815
|
+
H as pValueToStringOrNumberOrNull,
|
|
816
|
+
Jn as parseColumnId,
|
|
817
|
+
sn as plId,
|
|
818
|
+
Mn as plRefsEqual,
|
|
819
|
+
$n as resolveAnchors,
|
|
820
|
+
_ as safeConvertToPValue,
|
|
821
|
+
Fn as selectorsToPredicate,
|
|
822
|
+
G as stringifyColumnId,
|
|
816
823
|
An as toJsonSafePValue,
|
|
817
|
-
|
|
824
|
+
Hn as uniquePlId
|
|
818
825
|
};
|
|
819
826
|
//# sourceMappingURL=index.mjs.map
|