@milaboratories/pl-model-common 1.12.0 → 1.13.0

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.
Files changed (31) hide show
  1. package/dist/drivers/pframe/data_info.d.ts +169 -0
  2. package/dist/drivers/pframe/data_info.d.ts.map +1 -0
  3. package/dist/drivers/pframe/{data.d.ts → data_types.d.ts} +1 -7
  4. package/dist/drivers/pframe/data_types.d.ts.map +1 -0
  5. package/dist/drivers/pframe/driver.d.ts +1 -1
  6. package/dist/drivers/pframe/driver.d.ts.map +1 -1
  7. package/dist/drivers/pframe/index.d.ts +2 -1
  8. package/dist/drivers/pframe/index.d.ts.map +1 -1
  9. package/dist/drivers/pframe/spec/filtered_column.d.ts +1 -1
  10. package/dist/drivers/pframe/spec/filtered_column.d.ts.map +1 -1
  11. package/dist/drivers/pframe/table.d.ts +1 -1
  12. package/dist/drivers/pframe/table.d.ts.map +1 -1
  13. package/dist/drivers/pframe/table_calculate.d.ts +1 -1
  14. package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
  15. package/dist/drivers/pframe/unique_values.d.ts +1 -1
  16. package/dist/drivers/pframe/unique_values.d.ts.map +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +339 -179
  20. package/dist/index.mjs.map +1 -1
  21. package/package.json +1 -1
  22. package/src/drivers/pframe/data_info.ts +430 -0
  23. package/src/drivers/pframe/{data.ts → data_types.ts} +0 -7
  24. package/src/drivers/pframe/driver.ts +1 -1
  25. package/src/drivers/pframe/index.ts +2 -1
  26. package/src/drivers/pframe/spec/anchored.ts +1 -1
  27. package/src/drivers/pframe/spec/filtered_column.ts +1 -1
  28. package/src/drivers/pframe/table.ts +1 -1
  29. package/src/drivers/pframe/table_calculate.ts +1 -1
  30. package/src/drivers/pframe/unique_values.ts +1 -1
  31. package/dist/drivers/pframe/data.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,27 +1,27 @@
1
- var V = Object.defineProperty;
2
- var F = (n, t, e) => t in n ? V(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var m = (n, t, e) => F(n, typeof t != "symbol" ? t + "" : t, e);
1
+ var $ = Object.defineProperty;
2
+ var L = (n, t, e) => t in n ? $(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var p = (n, t, e) => L(n, typeof t != "symbol" ? t + "" : t, e);
4
4
  import g from "canonicalize";
5
- import { z as l } from "zod";
5
+ import { z as y } from "zod";
6
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
- const k = "upload://upload/", N = "index://index/";
13
- function D(n) {
14
- return n.startsWith(k);
12
+ const S = "upload://upload/", E = "index://index/";
13
+ function V(n) {
14
+ return n.startsWith(S);
15
15
  }
16
- function O(n) {
17
- return n.startsWith(N);
16
+ function D(n) {
17
+ return n.startsWith(E);
18
18
  }
19
- function U(n) {
20
- if (O(n)) {
21
- const t = n.slice(N.length);
19
+ function j(n) {
20
+ if (D(n)) {
21
+ const t = n.slice(E.length);
22
22
  return JSON.parse(decodeURIComponent(t)).path;
23
- } else if (D(n)) {
24
- const t = n.slice(k.length);
23
+ } else if (V(n)) {
24
+ const t = n.slice(S.length);
25
25
  return JSON.parse(decodeURIComponent(t)).localPath;
26
26
  }
27
27
  w(n);
@@ -29,36 +29,190 @@ function U(n) {
29
29
  function B(n) {
30
30
  return n.replace(/^.*[\\/]/, "");
31
31
  }
32
- function mn(n) {
33
- return B(U(n));
32
+ function pn(n) {
33
+ return B(j(n));
34
+ }
35
+ function yn(n) {
36
+ if (!n || typeof n != "object")
37
+ return !1;
38
+ const t = n;
39
+ if (!("type" in t))
40
+ return !1;
41
+ switch (t.type) {
42
+ case "Json":
43
+ return typeof t.keyLength == "number" && t.data !== void 0 && typeof t.data == "object";
44
+ case "JsonPartitioned":
45
+ return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
46
+ case "BinaryPartitioned":
47
+ return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
48
+ default:
49
+ return !1;
50
+ }
51
+ }
52
+ function mn(n, t) {
53
+ if (n !== void 0)
54
+ switch (n.type) {
55
+ case "Json":
56
+ return n;
57
+ case "JsonPartitioned": {
58
+ const e = {};
59
+ for (const [r, o] of Object.entries(n.parts))
60
+ e[r] = t(o);
61
+ return {
62
+ ...n,
63
+ parts: e
64
+ };
65
+ }
66
+ case "BinaryPartitioned": {
67
+ const e = {};
68
+ for (const [r, o] of Object.entries(n.parts))
69
+ e[r] = {
70
+ index: t(o.index),
71
+ values: t(o.values)
72
+ };
73
+ return {
74
+ ...n,
75
+ parts: e
76
+ };
77
+ }
78
+ }
79
+ }
80
+ function ln(n) {
81
+ if (!n || typeof n != "object")
82
+ return !1;
83
+ const t = n;
84
+ if (!("type" in t))
85
+ return !1;
86
+ switch (t.type) {
87
+ case "Json":
88
+ return typeof t.keyLength == "number" && Array.isArray(t.data);
89
+ case "JsonPartitioned":
90
+ return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
91
+ case "BinaryPartitioned":
92
+ return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
93
+ default:
94
+ return !1;
95
+ }
34
96
  }
35
- const R = -2147483648, A = -9007199254740991n, j = NaN, L = NaN, J = null, M = null;
36
- function y(n, t) {
97
+ function hn(n) {
98
+ switch (n.type) {
99
+ case "Json": {
100
+ const t = Object.entries(n.data).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
101
+ return {
102
+ type: "Json",
103
+ keyLength: n.keyLength,
104
+ data: t
105
+ };
106
+ }
107
+ case "JsonPartitioned": {
108
+ const t = Object.entries(n.parts).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
109
+ return {
110
+ type: "JsonPartitioned",
111
+ partitionKeyLength: n.partitionKeyLength,
112
+ parts: t
113
+ };
114
+ }
115
+ case "BinaryPartitioned": {
116
+ const t = Object.entries(n.parts).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
117
+ return {
118
+ type: "BinaryPartitioned",
119
+ partitionKeyLength: n.partitionKeyLength,
120
+ parts: t
121
+ };
122
+ }
123
+ }
124
+ }
125
+ function bn(n) {
126
+ switch (n.type) {
127
+ case "Json": {
128
+ const t = {};
129
+ for (const e of n.data)
130
+ t[JSON.stringify(e.key)] = e.value;
131
+ return {
132
+ type: "Json",
133
+ keyLength: n.keyLength,
134
+ data: t
135
+ };
136
+ }
137
+ case "JsonPartitioned": {
138
+ const t = {};
139
+ for (const e of n.parts)
140
+ t[JSON.stringify(e.key)] = e.value;
141
+ return {
142
+ type: "JsonPartitioned",
143
+ partitionKeyLength: n.partitionKeyLength,
144
+ parts: t
145
+ };
146
+ }
147
+ case "BinaryPartitioned": {
148
+ const t = {};
149
+ for (const e of n.parts)
150
+ t[JSON.stringify(e.key)] = e.value;
151
+ return {
152
+ type: "BinaryPartitioned",
153
+ partitionKeyLength: n.partitionKeyLength,
154
+ parts: t
155
+ };
156
+ }
157
+ }
158
+ }
159
+ function gn(n, t) {
160
+ if (n !== void 0)
161
+ switch (n.type) {
162
+ case "Json":
163
+ return n;
164
+ case "JsonPartitioned": {
165
+ const e = n.parts.map((r) => ({
166
+ key: r.key,
167
+ value: t(r.value)
168
+ }));
169
+ return {
170
+ ...n,
171
+ parts: e
172
+ };
173
+ }
174
+ case "BinaryPartitioned": {
175
+ const e = n.parts.map((r) => ({
176
+ key: r.key,
177
+ value: {
178
+ index: t(r.value.index),
179
+ values: t(r.value.values)
180
+ }
181
+ }));
182
+ return {
183
+ ...n,
184
+ parts: e
185
+ };
186
+ }
187
+ }
188
+ }
189
+ const I = -2147483648, A = -9007199254740991n, F = NaN, U = NaN, K = null, R = null;
190
+ function h(n, t) {
37
191
  switch (t) {
38
192
  case "Int":
39
- return n === R;
193
+ return n === I;
40
194
  case "Long":
41
195
  return n === Number(A) || n === A;
42
196
  case "Float":
43
- return n === j;
197
+ return n === F;
44
198
  case "Double":
45
- return n === L;
199
+ return n === U;
46
200
  case "String":
47
- return n === J;
201
+ return n === K;
48
202
  case "Bytes":
49
- return n === M;
203
+ return n === R;
50
204
  default:
51
205
  throw Error(`unsupported data type: ${t}`);
52
206
  }
53
207
  }
54
- function ln(n) {
55
- if (!_(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
208
+ function wn(n) {
209
+ if (!M(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
56
210
  return n;
57
211
  }
58
- function _(n, t) {
212
+ function M(n, t) {
59
213
  if (!t)
60
214
  return typeof n == "string" || typeof n == "number" && isFinite(n) || typeof n == "bigint";
61
- if (y(n, t)) return !1;
215
+ if (h(n, t)) return !1;
62
216
  switch (t) {
63
217
  case "Int":
64
218
  return typeof n == "number";
@@ -76,10 +230,10 @@ function _(n, t) {
76
230
  throw Error(`unsupported data type: ${t}`);
77
231
  }
78
232
  }
79
- function H(n, t) {
233
+ function _(n, t) {
80
234
  if (!t)
81
235
  return n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint";
82
- if (y(n, t)) return !0;
236
+ if (h(n, t)) return !0;
83
237
  switch (t) {
84
238
  case "Int":
85
239
  return typeof n == "number";
@@ -97,14 +251,14 @@ function H(n, t) {
97
251
  throw Error(`unsupported data type: ${t}`);
98
252
  }
99
253
  }
100
- function pn(n) {
254
+ function An(n) {
101
255
  if (n === null || typeof n == "string" || typeof n == "number") return n;
102
256
  if (typeof n == "bigint") return { bigint: n.toString() };
103
257
  throw new Error(`Type ${typeof n} (value ${n}) not yet supported.`);
104
258
  }
105
- function K(n, t) {
259
+ function v(n, t) {
106
260
  if (n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
107
- if (t && !y(n, t) && !H(n, t))
261
+ if (t && !h(n, t) && !_(n, t))
108
262
  throw new Error(`Unexpected value type, got ${typeof n}, expected ${t}`);
109
263
  return n;
110
264
  }
@@ -115,12 +269,12 @@ function K(n, t) {
115
269
  }
116
270
  throw new Error(`Unsupported type ${typeof n} (value ${n}).`);
117
271
  }
118
- function hn(n) {
119
- if (n = T(n), n === null) throw new Error("Value is null");
272
+ function Pn(n) {
273
+ if (n = H(n), n === null) throw new Error("Value is null");
120
274
  return n;
121
275
  }
122
- function T(n) {
123
- if (n = K(n), n === null) return null;
276
+ function H(n) {
277
+ if (n = v(n), n === null) return null;
124
278
  if (typeof n == "string") return n;
125
279
  if (typeof n == "number") {
126
280
  if (!isFinite(n)) throw new Error(`Value is not finite (${n})`);
@@ -130,19 +284,19 @@ function T(n) {
130
284
  return Number(n);
131
285
  throw new Error(`Unexpected value type: ${typeof n}`);
132
286
  }
133
- function W(n, t) {
287
+ function T(n, t) {
134
288
  const e = Math.floor(t / 8), r = 1 << 7 - t % 8;
135
289
  return (n[e] & r) > 0;
136
290
  }
137
- const X = { type: "absent" }, z = null;
138
- function yn(n) {
291
+ const W = { type: "absent" }, X = null;
292
+ function xn(n) {
139
293
  return typeof n == "object" && n !== null && n.type === "absent";
140
294
  }
141
- function bn(n, t, e = {}) {
142
- if (W(n.absent, t))
143
- return e.absent === void 0 ? X : e.absent;
295
+ function kn(n, t, e = {}) {
296
+ if (T(n.absent, t))
297
+ return e.absent === void 0 ? W : e.absent;
144
298
  const r = n.data[t], o = n.type;
145
- if (y(r, o)) return e.na === void 0 ? z : e.na;
299
+ if (h(r, o)) return e.na === void 0 ? X : e.na;
146
300
  switch (o) {
147
301
  case "Int":
148
302
  return r;
@@ -160,30 +314,30 @@ function bn(n, t, e = {}) {
160
314
  throw Error(`unsupported data type: ${o}`);
161
315
  }
162
316
  }
163
- function p(n) {
317
+ function m(n) {
164
318
  const { type: t, name: e, domain: r } = n;
165
319
  return { type: t, name: e, ...r && { domain: r } };
166
320
  }
167
- function gn(n) {
168
- return n.map(p);
321
+ function Nn(n) {
322
+ return n.map(m);
169
323
  }
170
- function wn(n) {
171
- return g(p(n));
324
+ function Sn(n) {
325
+ return g(m(n));
172
326
  }
173
- function G(n, t) {
327
+ function z(n, t) {
174
328
  if (n === void 0) return t === void 0;
175
329
  if (t === void 0) return !0;
176
330
  for (const e in t)
177
331
  if (n[e] !== t[e]) return !1;
178
332
  return !0;
179
333
  }
180
- function Q(n, t) {
181
- return n.name === t.name && G(n.domain, t.domain);
334
+ function G(n, t) {
335
+ return n.name === t.name && z(n.domain, t.domain);
182
336
  }
183
- function An(n, t) {
184
- return { ...n, src: h(n.src, t) };
337
+ function En(n, t) {
338
+ return { ...n, src: l(n.src, t) };
185
339
  }
186
- function h(n, t) {
340
+ function l(n, t) {
187
341
  switch (n.type) {
188
342
  case "column":
189
343
  return {
@@ -194,61 +348,61 @@ function h(n, t) {
194
348
  case "full":
195
349
  return {
196
350
  type: n.type,
197
- entries: n.entries.map((e) => h(e, t))
351
+ entries: n.entries.map((e) => l(e, t))
198
352
  };
199
353
  case "outer":
200
354
  return {
201
355
  type: "outer",
202
- primary: h(n.primary, t),
203
- secondary: n.secondary.map((e) => h(e, t))
356
+ primary: l(n.primary, t),
357
+ secondary: n.secondary.map((e) => l(e, t))
204
358
  };
205
359
  default:
206
360
  w(n);
207
361
  }
208
362
  }
209
- function Y(n) {
363
+ function Q(n) {
210
364
  return g(n);
211
365
  }
212
- function xn(n) {
366
+ function Cn(n) {
213
367
  return JSON.parse(n);
214
368
  }
215
- function x(n) {
216
- return g(p(n));
369
+ function P(n) {
370
+ return g(m(n));
217
371
  }
218
- function P(n, t) {
372
+ function x(n, t) {
219
373
  return JSON.stringify([n, t]);
220
374
  }
221
- class Pn {
375
+ class On {
222
376
  /**
223
377
  * Creates a new anchor context from a set of anchor column specifications
224
378
  * @param anchors Record of anchor column specifications indexed by anchor ID
225
379
  */
226
380
  constructor(t) {
227
- m(this, "domains", /* @__PURE__ */ new Map());
228
- m(this, "axes", /* @__PURE__ */ new Map());
381
+ p(this, "domains", /* @__PURE__ */ new Map());
382
+ p(this, "axes", /* @__PURE__ */ new Map());
229
383
  /**
230
384
  * Domain packs are used to group domain keys that can be anchored to the same anchor
231
385
  * This is used to optimize the lookup of domain anchors
232
386
  */
233
- m(this, "domainPacks", []);
387
+ p(this, "domainPacks", []);
234
388
  /**
235
389
  * Maps domain packs to anchors
236
390
  */
237
- m(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
391
+ p(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
238
392
  this.anchors = t;
239
393
  const e = Object.entries(t);
240
394
  e.sort((r, o) => r[0].localeCompare(o[0]));
241
395
  for (const [r, o] of e) {
242
396
  for (let i = 0; i < o.axesSpec.length; i++) {
243
- const s = o.axesSpec[i], a = x(s);
397
+ const s = o.axesSpec[i], a = P(s);
244
398
  this.axes.set(a, { anchor: r, idx: i });
245
399
  }
246
400
  if (o.domain !== void 0) {
247
401
  const i = Object.entries(o.domain);
248
402
  i.sort((s, a) => s[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([s]) => s));
249
403
  for (const [s, a] of i) {
250
- const f = P(s, a);
251
- this.domains.set(f, r);
404
+ const c = x(s, a);
405
+ this.domains.set(c, r);
252
406
  }
253
407
  }
254
408
  }
@@ -273,35 +427,35 @@ class Pn {
273
427
  else
274
428
  break n;
275
429
  }
276
- const f = this.domainPackToAnchor.get(JSON.stringify(a));
277
- if (f !== void 0) {
278
- r.domainAnchor = f, o = new Set(s);
430
+ const c = this.domainPackToAnchor.get(JSON.stringify(a));
431
+ if (c !== void 0) {
432
+ r.domainAnchor = c, o = new Set(s);
279
433
  break;
280
434
  }
281
435
  }
282
436
  for (const [s, a] of Object.entries(t.domain ?? {})) {
283
437
  if (o !== void 0 && o.has(s))
284
438
  continue;
285
- const f = P(s, a), u = this.domains.get(f);
439
+ const c = x(s, a), u = this.domains.get(c);
286
440
  r.domain ?? (r.domain = {}), r.domain[s] = u ? { anchor: u } : a;
287
441
  }
288
442
  if (r.axes = t.axesSpec.map((s) => {
289
- const a = x(s);
443
+ const a = P(s);
290
444
  return this.axes.get(a) ?? s;
291
445
  }), !e || e.length === 0)
292
446
  return r;
293
447
  const i = [];
294
448
  for (const s of e) {
295
- const [a, f] = s;
449
+ const [a, c] = s;
296
450
  if (typeof a == "number") {
297
451
  if (a < 0 || a >= t.axesSpec.length)
298
452
  throw new Error(`Axis index ${a} is out of bounds (0-${t.axesSpec.length - 1})`);
299
- i.push([a, f]);
453
+ i.push([a, c]);
300
454
  } else {
301
455
  const u = t.axesSpec.findIndex((d) => d.name === a);
302
456
  if (u === -1)
303
457
  throw new Error(`Axis with name "${a}" not found in the column specification`);
304
- i.push([u, f]);
458
+ i.push([u, c]);
305
459
  }
306
460
  }
307
461
  return i.sort((s, a) => s[0] - a[0]), {
@@ -316,10 +470,10 @@ class Pn {
316
470
  * @returns A canonicalized string representation of the anchored column identifier
317
471
  */
318
472
  deriveS(t, e) {
319
- return Y(this.derive(t, e));
473
+ return Q(this.derive(t, e));
320
474
  }
321
475
  }
322
- function En(n, t) {
476
+ function Jn(n, t) {
323
477
  const e = { ...t };
324
478
  if (e.domainAnchor !== void 0) {
325
479
  const r = n[e.domainAnchor];
@@ -343,10 +497,10 @@ function En(n, t) {
343
497
  }
344
498
  e.domain = r;
345
499
  }
346
- return e.axes && (e.axes = e.axes.map((r) => Z(n, r))), e;
500
+ return e.axes && (e.axes = e.axes.map((r) => Y(n, r))), e;
347
501
  }
348
- function Z(n, t) {
349
- if (!q(t))
502
+ function Y(n, t) {
503
+ if (!Z(t))
350
504
  return t;
351
505
  const e = t.anchor, r = n[e];
352
506
  if (!r)
@@ -363,7 +517,7 @@ function Z(n, t) {
363
517
  throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
364
518
  return o[0];
365
519
  } else if ("id" in t) {
366
- const o = r.axesSpec.filter((i) => Q(t.id, p(i)));
520
+ const o = r.axesSpec.filter((i) => G(t.id, m(i)));
367
521
  if (o.length > 1)
368
522
  throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
369
523
  if (o.length === 0)
@@ -372,35 +526,35 @@ function Z(n, t) {
372
526
  }
373
527
  throw new Error("Unsupported axis reference type");
374
528
  }
375
- function q(n) {
529
+ function Z(n) {
376
530
  return typeof n == "object" && "anchor" in n;
377
531
  }
378
- function In(n) {
532
+ function $n(n) {
379
533
  return typeof n == "object" && n !== null && "source" in n && "axisFilters" in n;
380
534
  }
381
- function c(n) {
535
+ function f(n) {
382
536
  return n.kind === "PColumn";
383
537
  }
384
- function v(n) {
385
- return c(n.spec);
538
+ function q(n) {
539
+ return f(n.spec);
386
540
  }
387
- function kn(n) {
388
- return c(n.obj);
541
+ function Ln(n) {
542
+ return f(n.obj);
389
543
  }
390
- function Nn(n) {
391
- return c(n.obj.spec);
544
+ function Vn(n) {
545
+ return f(n.obj.spec);
392
546
  }
393
- function Sn(n) {
394
- if (!v(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
547
+ function Dn(n) {
548
+ if (!q(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
395
549
  return n;
396
550
  }
397
- function Cn(n, t) {
551
+ function jn(n, t) {
398
552
  return n === void 0 ? void 0 : {
399
553
  ...n,
400
554
  data: t(n.data)
401
555
  };
402
556
  }
403
- function $n(n) {
557
+ function Bn(n) {
404
558
  const t = /* @__PURE__ */ new Map(), e = (r) => {
405
559
  switch (r.type) {
406
560
  case "column":
@@ -436,15 +590,15 @@ function b(n, t) {
436
590
  case "not":
437
591
  return !b(n.operand, t);
438
592
  case "name":
439
- return c(t) && t.name === n.name;
593
+ return f(t) && t.name === n.name;
440
594
  case "name_pattern":
441
- return c(t) && !!t.name.match(n.pattern);
595
+ return f(t) && !!t.name.match(n.pattern);
442
596
  case "annotation":
443
- return c(t) && t.annotations !== void 0 && t.annotations[n.annotation] === n.value;
597
+ return f(t) && t.annotations !== void 0 && t.annotations[n.annotation] === n.value;
444
598
  case "annotation_pattern":
445
- return c(t) && t.annotations !== void 0 && t.annotations[n.annotation] !== void 0 && !!t.annotations[n.annotation].match(n.pattern);
599
+ return f(t) && t.annotations !== void 0 && t.annotations[n.annotation] !== void 0 && !!t.annotations[n.annotation].match(n.pattern);
446
600
  case "has_axes":
447
- return c(t) && n.axes.every(
601
+ return f(t) && n.axes.every(
448
602
  (e) => t.axesSpec.some(
449
603
  (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(
450
604
  ([o, i]) => r.domain[o] === i
@@ -455,7 +609,7 @@ function b(n, t) {
455
609
  nn(n);
456
610
  }
457
611
  }
458
- function E(n, t) {
612
+ function k(n, t) {
459
613
  if (n.name !== void 0 && n.name !== t.name)
460
614
  return !1;
461
615
  if (n.type !== void 0) {
@@ -473,7 +627,7 @@ function E(n, t) {
473
627
  }
474
628
  return !0;
475
629
  }
476
- function I(n, t) {
630
+ function N(n, t) {
477
631
  if (t.name !== void 0 && n.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n.name))
478
632
  return !1;
479
633
  if (t.type !== void 0) {
@@ -490,16 +644,16 @@ function I(n, t) {
490
644
  return !1;
491
645
  }
492
646
  if (t.axes !== void 0) {
493
- const e = n.axesSpec.map(p);
647
+ const e = n.axesSpec.map(m);
494
648
  if (t.partialAxesMatch) {
495
649
  for (const r of t.axes)
496
- if (!e.some((o) => E(r, o)))
650
+ if (!e.some((o) => k(r, o)))
497
651
  return !1;
498
652
  } else {
499
653
  if (e.length !== t.axes.length)
500
654
  return !1;
501
655
  for (let r = 0; r < t.axes.length; r++)
502
- if (!E(t.axes[r], e[r]))
656
+ if (!k(t.axes[r], e[r]))
503
657
  return !1;
504
658
  }
505
659
  }
@@ -519,23 +673,23 @@ function I(n, t) {
519
673
  }
520
674
  return !0;
521
675
  }
522
- function Vn(n) {
523
- return Array.isArray(n) ? (t) => n.some((e) => c(t) && I(t, e)) : (t) => c(t) && I(t, n);
676
+ function In(n) {
677
+ return Array.isArray(n) ? (t) => n.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n);
524
678
  }
525
- const Fn = { href: "/" }, Dn = l.object({
526
- __isRef: l.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
527
- blockId: l.string().describe("Upstream block id"),
528
- name: l.string().describe("Name of the output provided to the upstream block's output context")
679
+ const Fn = { href: "/" }, Un = y.object({
680
+ __isRef: y.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
681
+ blockId: y.string().describe("Upstream block id"),
682
+ name: y.string().describe("Name of the output provided to the upstream block's output context")
529
683
  }).describe(
530
684
  "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."
531
685
  ).strict().readonly();
532
- function On(n) {
686
+ function Kn(n) {
533
687
  return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === !0 && "blockId" in n && "name" in n;
534
688
  }
535
- function Un(n, t) {
689
+ function Rn(n, t) {
536
690
  return n.blockId === t.blockId && n.name === t.name;
537
691
  }
538
- function Bn(n, t) {
692
+ function Mn(n, t) {
539
693
  return n.ok ? { ok: !0, value: t(n.value) } : n;
540
694
  }
541
695
  function tn(n) {
@@ -547,7 +701,7 @@ function tn(n) {
547
701
  );
548
702
  }
549
703
  const en = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", rn = "0123456789ABCDEFGHIJKLMNOPQRSTUV", on = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
550
- function S(n, t, e) {
704
+ function C(n, t, e) {
551
705
  e = e || {};
552
706
  let r, o;
553
707
  switch (t) {
@@ -565,85 +719,91 @@ function S(n, t, e) {
565
719
  throw new Error("Unknown base32 variant: " + String(t));
566
720
  }
567
721
  const i = e.padding !== void 0 ? e.padding : o, s = tn(n);
568
- let a = 0, f = 0, u = "";
722
+ let a = 0, c = 0, u = "";
569
723
  for (let d = 0; d < s.byteLength; d++)
570
- for (f = f << 8 | s.getUint8(d), a += 8; a >= 5; )
571
- u += r[f >>> a - 5 & 31], a -= 5;
572
- if (a > 0 && (u += r[f << 5 - a & 31]), i)
724
+ for (c = c << 8 | s.getUint8(d), a += 8; a >= 5; )
725
+ u += r[c >>> a - 5 & 31], a -= 5;
726
+ if (a > 0 && (u += r[c << 5 - a & 31]), i)
573
727
  for (; u.length % 8 !== 0; )
574
728
  u += "=";
575
729
  return u;
576
730
  }
577
- const C = 15, an = 24, $ = l.string().length(an).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
578
- function Rn() {
579
- const n = new Uint8Array(C);
580
- return crypto.getRandomValues(n), $.parse(S(n, "RFC4648"));
731
+ const O = 15, an = 24, J = y.string().length(an).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
732
+ function _n() {
733
+ const n = new Uint8Array(O);
734
+ return crypto.getRandomValues(n), J.parse(C(n, "RFC4648"));
581
735
  }
582
736
  function sn(n) {
583
- if (n.length !== C) throw new Error(`Wrong number of bytes: ${n.length}`);
584
- return $.parse(S(n, "RFC4648"));
737
+ if (n.length !== O) throw new Error(`Wrong number of bytes: ${n.length}`);
738
+ return J.parse(C(n, "RFC4648"));
585
739
  }
586
- async function jn(n) {
740
+ async function vn(n) {
587
741
  const t = new TextEncoder(), e = await crypto.subtle.digest("SHA-256", t.encode(n));
588
742
  return sn(new Uint8Array(e.slice(0, 15)));
589
743
  }
590
744
  export {
591
- Pn as AnchoredIdDeriver,
745
+ On as AnchoredIdDeriver,
592
746
  Fn as DefaultNavigationState,
593
- X as PTableAbsent,
594
- z as PTableNA,
595
- M as PValueBytesNA,
596
- L as PValueDoubleNA,
597
- j as PValueFloatNA,
598
- R as PValueIntNA,
747
+ W as PTableAbsent,
748
+ X as PTableNA,
749
+ R as PValueBytesNA,
750
+ U as PValueDoubleNA,
751
+ F as PValueFloatNA,
752
+ I as PValueIntNA,
599
753
  A as PValueLongNA,
600
- J as PValueStringNA,
601
- $ as PlId,
602
- C as PlIdBytes,
754
+ K as PValueStringNA,
755
+ J as PlId,
756
+ O as PlIdBytes,
603
757
  an as PlIdLength,
604
- Dn as PlRef,
605
- wn as canonicalizeAxisId,
606
- jn as digestPlId,
607
- ln as ensureNotNAPValue,
608
- Sn as ensurePColumn,
758
+ Un as PlRef,
759
+ Sn as canonicalizeAxisId,
760
+ hn as dataInfoToEntries,
761
+ vn as digestPlId,
762
+ wn as ensureNotNAPValue,
763
+ Dn as ensurePColumn,
764
+ bn as entriesToDataInfo,
609
765
  b as executePSpecPredicate,
610
- $n as extractAllColumns,
611
- gn as getAxesId,
612
- p as getAxisId,
613
- mn as getFileNameFromHandle,
614
- U as getFilePathFromHandle,
615
- In as isFilteredPColumn,
616
- O as isImportFileHandleIndex,
617
- D as isImportFileHandleUpload,
766
+ Bn as extractAllColumns,
767
+ Nn as getAxesId,
768
+ m as getAxisId,
769
+ pn as getFileNameFromHandle,
770
+ j as getFilePathFromHandle,
771
+ yn as isDataInfo,
772
+ ln as isDataInfoEntries,
773
+ $n as isFilteredPColumn,
774
+ D as isImportFileHandleIndex,
775
+ V as isImportFileHandleUpload,
618
776
  dn as isLiveLog,
619
- _ as isNotNAPValue,
620
- v as isPColumn,
621
- Nn as isPColumnResult,
622
- c as isPColumnSpec,
623
- kn as isPColumnSpecResult,
624
- yn as isPTableAbsent,
625
- H as isPValue,
626
- On as isPlRef,
627
- W as isValueAbsent,
628
- y as isValueNA,
629
- h as mapJoinEntry,
630
- Cn as mapPObjectData,
631
- An as mapPTableDef,
632
- Bn as mapValueInVOE,
633
- E as matchAxis,
634
- Q as matchAxisId,
635
- I as matchPColumn,
636
- bn as pTableValue,
637
- hn as pValueToStringOrNumber,
638
- T as pValueToStringOrNumberOrNull,
639
- xn as parseColumnId,
777
+ M as isNotNAPValue,
778
+ q as isPColumn,
779
+ Vn as isPColumnResult,
780
+ f as isPColumnSpec,
781
+ Ln as isPColumnSpecResult,
782
+ xn as isPTableAbsent,
783
+ _ as isPValue,
784
+ Kn as isPlRef,
785
+ T as isValueAbsent,
786
+ h as isValueNA,
787
+ mn as mapDataInfo,
788
+ gn as mapDataInfoEntries,
789
+ l as mapJoinEntry,
790
+ jn as mapPObjectData,
791
+ En as mapPTableDef,
792
+ Mn as mapValueInVOE,
793
+ k as matchAxis,
794
+ G as matchAxisId,
795
+ N as matchPColumn,
796
+ kn as pTableValue,
797
+ Pn as pValueToStringOrNumber,
798
+ H as pValueToStringOrNumberOrNull,
799
+ Cn as parseColumnId,
640
800
  sn as plId,
641
- Un as plRefsEqual,
642
- En as resolveAnchors,
643
- K as safeConvertToPValue,
644
- Vn as selectorsToPredicate,
645
- Y as stringifyColumnId,
646
- pn as toJsonSafePValue,
647
- Rn as uniquePlId
801
+ Rn as plRefsEqual,
802
+ Jn as resolveAnchors,
803
+ v as safeConvertToPValue,
804
+ In as selectorsToPredicate,
805
+ Q as stringifyColumnId,
806
+ An as toJsonSafePValue,
807
+ _n as uniquePlId
648
808
  };
649
809
  //# sourceMappingURL=index.mjs.map