@platforma-sdk/ui-vue 1.42.14 → 1.42.18
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/.turbo/turbo-build.log +25 -24
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js +5 -5
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +21 -21
- package/dist/components/PlAgDataTable/sources/table-source-v2.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-source-v2.js +122 -123
- package/dist/components/PlAgDataTable/sources/table-source-v2.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-state-v2.js +9 -9
- package/dist/components/PlAgDataTable/sources/value-rendering.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/value-rendering.js +24 -25
- package/dist/components/PlAgDataTable/sources/value-rendering.js.map +1 -1
- package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +12 -12
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +2 -2
- package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue.d.ts.map +1 -1
- package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue.js +21 -20
- package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue.js.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/data.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/data.js +169 -184
- package/dist/components/PlMultiSequenceAlignment/data.js.map +1 -1
- package/dist/components/PlTableFilters/filters-state.js +8 -8
- package/dist/components/PlTableFilters/filters_logic.d.ts.map +1 -1
- package/dist/components/PlTableFilters/filters_logic.js +67 -77
- package/dist/components/PlTableFilters/filters_logic.js.map +1 -1
- package/dist/defineApp.js +20 -20
- package/dist/internal/UpdateSerializer.js +3 -3
- package/dist/lib/model/common/dist/index.js +576 -444
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlFileDialog/Local.vue.js +6 -6
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js +17 -17
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlLogView/PlLogView.vue.js +89 -63
- package/dist/lib/ui/uikit/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/helpers/dom.js.map +1 -1
- package/dist/lib/ui/uikit/dist/helpers/downloadContent.js +32 -0
- package/dist/lib/ui/uikit/dist/helpers/downloadContent.js.map +1 -0
- package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js +257 -192
- package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +473 -457
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
- package/dist/lib.js +52 -50
- package/dist/lib.js.map +1 -1
- package/dist/sdk/model/dist/index.js +542 -526
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/PlAgDataTable/sources/table-source-v2.ts +20 -16
- package/src/components/PlAgDataTable/sources/value-rendering.ts +15 -7
- package/src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue +1 -0
- package/src/components/PlMultiSequenceAlignment/data.ts +12 -12
- package/src/components/PlTableFilters/filters_logic.ts +18 -15
- package/.turbo/turbo-test.log +0 -565
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js +0 -27
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js.map +0 -1
|
@@ -1,305 +1,456 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
|
|
1
|
+
import o from "../../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
|
|
2
|
+
import g from "../../../../_virtual/canonicalize.js";
|
|
3
|
+
var J = Object.defineProperty, I = (n, t, e) => t in n ? J(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, y = (n, t, e) => I(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
o.object({
|
|
5
5
|
/** Included left border. */
|
|
6
|
-
from:
|
|
6
|
+
from: o.number(),
|
|
7
7
|
/** Excluded right border. */
|
|
8
|
-
to:
|
|
8
|
+
to: o.number()
|
|
9
9
|
});
|
|
10
|
-
function
|
|
11
|
-
throw new Error("Unexpected object: " +
|
|
10
|
+
function w(n) {
|
|
11
|
+
throw new Error("Unexpected object: " + n);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
if (!
|
|
13
|
+
function cn(n) {
|
|
14
|
+
if (!n || typeof n != "object")
|
|
15
15
|
return !1;
|
|
16
|
-
const
|
|
17
|
-
if (!("type" in
|
|
16
|
+
const t = n;
|
|
17
|
+
if (!("type" in t))
|
|
18
18
|
return !1;
|
|
19
|
-
switch (
|
|
19
|
+
switch (t.type) {
|
|
20
20
|
case "Json":
|
|
21
|
-
return typeof
|
|
21
|
+
return typeof t.keyLength == "number" && t.data !== void 0 && typeof t.data == "object";
|
|
22
22
|
case "JsonPartitioned":
|
|
23
|
-
return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
|
|
24
23
|
case "BinaryPartitioned":
|
|
25
|
-
|
|
24
|
+
case "ParquetPartitioned":
|
|
25
|
+
return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
|
|
26
26
|
default:
|
|
27
27
|
return !1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
if (
|
|
32
|
-
switch (
|
|
30
|
+
function un(n, t) {
|
|
31
|
+
if (n !== void 0)
|
|
32
|
+
switch (n.type) {
|
|
33
33
|
case "Json":
|
|
34
|
-
return
|
|
34
|
+
return n;
|
|
35
35
|
case "JsonPartitioned": {
|
|
36
|
-
const
|
|
37
|
-
for (const [r,
|
|
38
|
-
|
|
36
|
+
const e = {};
|
|
37
|
+
for (const [r, a] of Object.entries(n.parts))
|
|
38
|
+
e[r] = t(a);
|
|
39
39
|
return {
|
|
40
|
-
...
|
|
41
|
-
parts:
|
|
40
|
+
...n,
|
|
41
|
+
parts: e
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
case "BinaryPartitioned": {
|
|
45
|
-
const
|
|
46
|
-
for (const [r,
|
|
47
|
-
|
|
48
|
-
index:
|
|
49
|
-
values:
|
|
45
|
+
const e = {};
|
|
46
|
+
for (const [r, a] of Object.entries(n.parts))
|
|
47
|
+
e[r] = {
|
|
48
|
+
index: t(a.index),
|
|
49
|
+
values: t(a.values)
|
|
50
50
|
};
|
|
51
51
|
return {
|
|
52
|
-
...
|
|
53
|
-
parts:
|
|
52
|
+
...n,
|
|
53
|
+
parts: e
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
case "ParquetPartitioned": {
|
|
57
|
+
const e = {};
|
|
58
|
+
for (const [r, a] of Object.entries(n.parts))
|
|
59
|
+
e[r] = t(a);
|
|
60
|
+
return {
|
|
61
|
+
...n,
|
|
62
|
+
parts: e
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
66
|
}
|
|
58
|
-
function
|
|
59
|
-
if (!
|
|
67
|
+
function j(n) {
|
|
68
|
+
if (!n || typeof n != "object")
|
|
60
69
|
return !1;
|
|
61
|
-
const
|
|
62
|
-
if (!("type" in
|
|
70
|
+
const t = n;
|
|
71
|
+
if (!("type" in t))
|
|
63
72
|
return !1;
|
|
64
|
-
switch (
|
|
73
|
+
switch (t.type) {
|
|
65
74
|
case "Json":
|
|
66
|
-
return typeof
|
|
75
|
+
return typeof t.keyLength == "number" && Array.isArray(t.data);
|
|
67
76
|
case "JsonPartitioned":
|
|
68
|
-
return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
|
|
69
77
|
case "BinaryPartitioned":
|
|
70
|
-
|
|
78
|
+
case "ParquetPartitioned":
|
|
79
|
+
return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
|
|
71
80
|
default:
|
|
72
81
|
return !1;
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
84
|
+
function fn(n) {
|
|
85
|
+
if (!j(n)) return !1;
|
|
86
|
+
switch (n.type) {
|
|
87
|
+
case "JsonPartitioned":
|
|
88
|
+
case "BinaryPartitioned":
|
|
89
|
+
case "ParquetPartitioned":
|
|
90
|
+
return !0;
|
|
91
|
+
default:
|
|
92
|
+
return !1;
|
|
93
|
+
}
|
|
77
94
|
}
|
|
78
|
-
function
|
|
79
|
-
switch (
|
|
80
|
-
case "Json":
|
|
81
|
-
const e = Object.entries(t.data).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
|
|
95
|
+
function ln(n) {
|
|
96
|
+
switch (n.type) {
|
|
97
|
+
case "Json":
|
|
82
98
|
return {
|
|
83
99
|
type: "Json",
|
|
84
|
-
keyLength:
|
|
85
|
-
data: e
|
|
100
|
+
keyLength: n.keyLength,
|
|
101
|
+
data: Object.entries(n.data).map(([t, e]) => ({ key: JSON.parse(t), value: e }))
|
|
86
102
|
};
|
|
87
|
-
|
|
88
|
-
case "JsonPartitioned": {
|
|
89
|
-
const e = Object.entries(t.parts).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
|
|
103
|
+
case "JsonPartitioned":
|
|
90
104
|
return {
|
|
91
105
|
type: "JsonPartitioned",
|
|
92
|
-
partitionKeyLength:
|
|
93
|
-
parts: e
|
|
106
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
107
|
+
parts: Object.entries(n.parts).map(([t, e]) => ({ key: JSON.parse(t), value: e }))
|
|
94
108
|
};
|
|
95
|
-
|
|
96
|
-
case "BinaryPartitioned": {
|
|
97
|
-
const e = Object.entries(t.parts).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
|
|
109
|
+
case "BinaryPartitioned":
|
|
98
110
|
return {
|
|
99
111
|
type: "BinaryPartitioned",
|
|
100
|
-
partitionKeyLength:
|
|
101
|
-
parts: e
|
|
112
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
113
|
+
parts: Object.entries(n.parts).map(([t, e]) => ({ key: JSON.parse(t), value: e }))
|
|
102
114
|
};
|
|
103
|
-
|
|
115
|
+
case "ParquetPartitioned":
|
|
116
|
+
return {
|
|
117
|
+
type: "ParquetPartitioned",
|
|
118
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
119
|
+
parts: Object.entries(n.parts).map(([t, e]) => ({ key: JSON.parse(t), value: e }))
|
|
120
|
+
};
|
|
121
|
+
default:
|
|
122
|
+
w(n);
|
|
104
123
|
}
|
|
105
124
|
}
|
|
106
|
-
function
|
|
107
|
-
switch (
|
|
108
|
-
case "Json":
|
|
109
|
-
const e = {};
|
|
110
|
-
for (const n of t.data)
|
|
111
|
-
e[JSON.stringify(n.key)] = n.value;
|
|
125
|
+
function pn(n) {
|
|
126
|
+
switch (n.type) {
|
|
127
|
+
case "Json":
|
|
112
128
|
return {
|
|
113
129
|
type: "Json",
|
|
114
|
-
keyLength:
|
|
115
|
-
data:
|
|
130
|
+
keyLength: n.keyLength,
|
|
131
|
+
data: Object.fromEntries(
|
|
132
|
+
n.data.map(({ key: t, value: e }) => [JSON.stringify(t), e])
|
|
133
|
+
)
|
|
116
134
|
};
|
|
117
|
-
|
|
118
|
-
case "JsonPartitioned": {
|
|
119
|
-
const e = {};
|
|
120
|
-
for (const n of t.parts)
|
|
121
|
-
e[JSON.stringify(n.key)] = n.value;
|
|
135
|
+
case "JsonPartitioned":
|
|
122
136
|
return {
|
|
123
137
|
type: "JsonPartitioned",
|
|
124
|
-
partitionKeyLength:
|
|
125
|
-
parts:
|
|
138
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
139
|
+
parts: Object.fromEntries(
|
|
140
|
+
n.parts.map(({ key: t, value: e }) => [JSON.stringify(t), e])
|
|
141
|
+
)
|
|
126
142
|
};
|
|
127
|
-
|
|
128
|
-
case "BinaryPartitioned": {
|
|
129
|
-
const e = {};
|
|
130
|
-
for (const n of t.parts)
|
|
131
|
-
e[JSON.stringify(n.key)] = n.value;
|
|
143
|
+
case "BinaryPartitioned":
|
|
132
144
|
return {
|
|
133
145
|
type: "BinaryPartitioned",
|
|
134
|
-
partitionKeyLength:
|
|
135
|
-
parts:
|
|
146
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
147
|
+
parts: Object.fromEntries(
|
|
148
|
+
n.parts.map(({ key: t, value: e }) => [JSON.stringify(t), e])
|
|
149
|
+
)
|
|
136
150
|
};
|
|
151
|
+
case "ParquetPartitioned":
|
|
152
|
+
return {
|
|
153
|
+
type: "ParquetPartitioned",
|
|
154
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
155
|
+
parts: Object.fromEntries(
|
|
156
|
+
n.parts.map(({ key: t, value: e }) => [JSON.stringify(t), e])
|
|
157
|
+
)
|
|
158
|
+
};
|
|
159
|
+
default:
|
|
160
|
+
w(n);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function N(n) {
|
|
164
|
+
return n instanceof Error ? n.name === "AbortError" || N(n.cause) : !1;
|
|
165
|
+
}
|
|
166
|
+
function L(n) {
|
|
167
|
+
if (typeof n == "string")
|
|
168
|
+
return `String value was thrown: ${n}`;
|
|
169
|
+
if (n && typeof n == "object")
|
|
170
|
+
try {
|
|
171
|
+
return `Plain object was thrown: ${JSON.stringify(n)}`;
|
|
172
|
+
} catch (t) {
|
|
173
|
+
return `Non-serializable object was thrown (JSON.stringify failed: ${t instanceof Error ? t.message : String(t)}): ${String(n)}`;
|
|
137
174
|
}
|
|
175
|
+
return `Non-Error value (${typeof n}) was thrown: ${n}`;
|
|
176
|
+
}
|
|
177
|
+
function T(n) {
|
|
178
|
+
return n instanceof Error ? n : new Error(L(n));
|
|
179
|
+
}
|
|
180
|
+
function E(n) {
|
|
181
|
+
const t = n.cause ? E(n.cause) : void 0, e = new Error(n.message, t !== void 0 ? { cause: t } : void 0);
|
|
182
|
+
return e.name = n.name || "Error", e.stack = n.stack, e;
|
|
183
|
+
}
|
|
184
|
+
function dn(n) {
|
|
185
|
+
if (n.error)
|
|
186
|
+
throw n.error instanceof Error ? n.error : E(n.error);
|
|
187
|
+
return n.value;
|
|
188
|
+
}
|
|
189
|
+
function mn(n) {
|
|
190
|
+
return JSON.stringify(n);
|
|
191
|
+
}
|
|
192
|
+
function C(n) {
|
|
193
|
+
return g(n);
|
|
194
|
+
}
|
|
195
|
+
function yn(n) {
|
|
196
|
+
return JSON.parse(n);
|
|
197
|
+
}
|
|
198
|
+
const l = {
|
|
199
|
+
Int: "Int",
|
|
200
|
+
Long: "Long",
|
|
201
|
+
Float: "Float",
|
|
202
|
+
Double: "Double",
|
|
203
|
+
String: "String",
|
|
204
|
+
Bytes: "Bytes"
|
|
205
|
+
};
|
|
206
|
+
function v(n, t) {
|
|
207
|
+
return n == null ? void 0 : n[t];
|
|
208
|
+
}
|
|
209
|
+
function $(n, t, e, r = "readMetadataJsonOrThrow") {
|
|
210
|
+
const a = v(n, e);
|
|
211
|
+
if (a === void 0) return;
|
|
212
|
+
const c = t[e];
|
|
213
|
+
try {
|
|
214
|
+
const i = JSON.parse(a);
|
|
215
|
+
return c.parse(i);
|
|
216
|
+
} catch (i) {
|
|
217
|
+
throw new Error(
|
|
218
|
+
`${r} failed, key: ${String(e)}, value: ${a}, error: ${T(i)}`
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function D(n, t, e) {
|
|
223
|
+
try {
|
|
224
|
+
return $(n, t, e);
|
|
225
|
+
} catch {
|
|
226
|
+
return;
|
|
138
227
|
}
|
|
139
228
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
229
|
+
const hn = {
|
|
230
|
+
Alphabet: "pl7.app/alphabet"
|
|
231
|
+
};
|
|
232
|
+
function bn(n, t) {
|
|
233
|
+
return v(n == null ? void 0 : n.domain, t);
|
|
234
|
+
}
|
|
235
|
+
const p = {
|
|
236
|
+
Alphabet: "pl7.app/alphabet",
|
|
237
|
+
DiscreteValues: "pl7.app/discreteValues",
|
|
238
|
+
Format: "pl7.app/format",
|
|
239
|
+
Graph: {
|
|
240
|
+
IsVirtual: "pl7.app/graph/isVirtual"
|
|
241
|
+
},
|
|
242
|
+
HideDataFromUi: "pl7.app/hideDataFromUi",
|
|
243
|
+
IsLinkerColumn: "pl7.app/isLinkerColumn",
|
|
244
|
+
Label: "pl7.app/label",
|
|
245
|
+
Max: "pl7.app/max",
|
|
246
|
+
Min: "pl7.app/min",
|
|
247
|
+
Parents: "pl7.app/parents",
|
|
248
|
+
Sequence: {
|
|
249
|
+
Annotation: {
|
|
250
|
+
Mapping: "pl7.app/sequence/annotation/mapping"
|
|
251
|
+
},
|
|
252
|
+
IsAnnotation: "pl7.app/sequence/isAnnotation"
|
|
253
|
+
},
|
|
254
|
+
Table: {
|
|
255
|
+
FontFamily: "pl7.app/table/fontFamily",
|
|
256
|
+
OrderPriority: "pl7.app/table/orderPriority",
|
|
257
|
+
Visibility: "pl7.app/table/visibility"
|
|
258
|
+
},
|
|
259
|
+
Trace: "pl7.app/trace"
|
|
260
|
+
}, F = o.object({
|
|
261
|
+
type: o.nativeEnum(l),
|
|
262
|
+
name: o.string(),
|
|
263
|
+
domain: o.record(o.string(), o.string()).optional(),
|
|
264
|
+
annotations: o.record(o.string(), o.string()).optional(),
|
|
265
|
+
parentAxes: o.array(o.number()).optional()
|
|
266
|
+
}).passthrough(), M = {
|
|
267
|
+
[p.DiscreteValues]: o.array(o.string()).or(o.array(o.number())),
|
|
268
|
+
[p.Graph.IsVirtual]: o.boolean(),
|
|
269
|
+
[p.HideDataFromUi]: o.boolean(),
|
|
270
|
+
[p.IsLinkerColumn]: o.boolean(),
|
|
271
|
+
[p.Max]: o.number(),
|
|
272
|
+
[p.Min]: o.number(),
|
|
273
|
+
[p.Parents]: o.array(F),
|
|
274
|
+
[p.Sequence.Annotation.Mapping]: o.record(o.string(), o.string()),
|
|
275
|
+
[p.Sequence.IsAnnotation]: o.boolean(),
|
|
276
|
+
[p.Table.OrderPriority]: o.number(),
|
|
277
|
+
[p.Trace]: o.record(o.string(), o.unknown())
|
|
278
|
+
};
|
|
279
|
+
function gn(n, t) {
|
|
280
|
+
return v(n == null ? void 0 : n.annotations, t);
|
|
281
|
+
}
|
|
282
|
+
function wn(n, t) {
|
|
283
|
+
return D(n == null ? void 0 : n.annotations, M, t);
|
|
143
284
|
}
|
|
144
|
-
|
|
145
|
-
|
|
285
|
+
const vn = {
|
|
286
|
+
Label: "pl7.app/label",
|
|
287
|
+
Table: {
|
|
288
|
+
RowSelection: "pl7.app/table/row-selection"
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
function m(n) {
|
|
292
|
+
const { type: t, name: e, domain: r } = n, a = { type: t, name: e };
|
|
293
|
+
return r && Object.entries(r).length > 0 && Object.assign(a, { domain: r }), a;
|
|
146
294
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
295
|
+
function B(n) {
|
|
296
|
+
return n.map(m);
|
|
297
|
+
}
|
|
298
|
+
function Pn(n) {
|
|
299
|
+
return C(m(n));
|
|
300
|
+
}
|
|
301
|
+
function R(n, t) {
|
|
302
|
+
if (n === void 0) return t === void 0;
|
|
303
|
+
if (t === void 0) return !0;
|
|
304
|
+
for (const e in t)
|
|
305
|
+
if (n[e] !== t[e]) return !1;
|
|
306
|
+
return !0;
|
|
307
|
+
}
|
|
308
|
+
function V(n, t) {
|
|
309
|
+
return n.name === t.name && R(n.domain, t.domain);
|
|
310
|
+
}
|
|
311
|
+
function S(n, t) {
|
|
312
|
+
const e = Math.floor(t / 8), r = 1 << 7 - t % 8;
|
|
313
|
+
return (n[e] & r) > 0;
|
|
314
|
+
}
|
|
315
|
+
function q(n, t) {
|
|
316
|
+
return S(n.absent, t);
|
|
317
|
+
}
|
|
318
|
+
function U(n, t) {
|
|
319
|
+
if (n.isNA) return S(n.isNA, t);
|
|
320
|
+
const e = n.type, r = n.data[t];
|
|
321
|
+
switch (e) {
|
|
322
|
+
case l.Int:
|
|
152
323
|
return r === -2147483648;
|
|
153
|
-
case
|
|
324
|
+
case l.Long:
|
|
154
325
|
return r === -9007199254740991n;
|
|
155
|
-
case
|
|
326
|
+
case l.Float:
|
|
156
327
|
return Number.isNaN(r);
|
|
157
|
-
case
|
|
328
|
+
case l.Double:
|
|
158
329
|
return Number.isNaN(r);
|
|
159
|
-
case
|
|
330
|
+
case l.String:
|
|
160
331
|
return r === null;
|
|
161
|
-
case
|
|
332
|
+
case l.Bytes:
|
|
162
333
|
return r === null;
|
|
163
334
|
default:
|
|
164
|
-
throw Error(`unsupported data type: ${
|
|
335
|
+
throw Error(`unsupported data type: ${e}`);
|
|
165
336
|
}
|
|
166
337
|
}
|
|
167
|
-
const
|
|
168
|
-
function
|
|
169
|
-
return typeof
|
|
338
|
+
const K = { type: "absent" };
|
|
339
|
+
function xn(n) {
|
|
340
|
+
return typeof n == "object" && n !== null && "type" in n && n.type === "absent";
|
|
170
341
|
}
|
|
171
|
-
const
|
|
172
|
-
function
|
|
173
|
-
return
|
|
342
|
+
const O = null;
|
|
343
|
+
function G(n) {
|
|
344
|
+
return n === O;
|
|
174
345
|
}
|
|
175
|
-
function
|
|
176
|
-
return !
|
|
346
|
+
function An(n, t) {
|
|
347
|
+
return !G(n);
|
|
177
348
|
}
|
|
178
|
-
function
|
|
179
|
-
const r =
|
|
180
|
-
if (r ===
|
|
349
|
+
function H(n, t, e) {
|
|
350
|
+
const r = n.type;
|
|
351
|
+
if (r === l.Bytes)
|
|
181
352
|
throw Error("Bytes not yet supported");
|
|
182
|
-
if (
|
|
183
|
-
throw Error(`expected column of type ${
|
|
184
|
-
if (
|
|
185
|
-
return (
|
|
186
|
-
if (
|
|
187
|
-
return (
|
|
188
|
-
const
|
|
353
|
+
if (e && "dataType" in e && e.dataType !== void 0 && e.dataType !== r)
|
|
354
|
+
throw Error(`expected column of type ${e.dataType}, got ${r}`);
|
|
355
|
+
if (q(n, t))
|
|
356
|
+
return (e == null ? void 0 : e.absent) !== void 0 ? e.absent : K;
|
|
357
|
+
if (U(n, t))
|
|
358
|
+
return (e == null ? void 0 : e.na) !== void 0 ? e.na : O;
|
|
359
|
+
const a = n.data[t];
|
|
189
360
|
switch (r) {
|
|
190
|
-
case
|
|
191
|
-
return
|
|
192
|
-
case
|
|
193
|
-
return Number(
|
|
194
|
-
case
|
|
195
|
-
return
|
|
196
|
-
case
|
|
197
|
-
return
|
|
198
|
-
case
|
|
199
|
-
return
|
|
361
|
+
case l.Int:
|
|
362
|
+
return a;
|
|
363
|
+
case l.Long:
|
|
364
|
+
return Number(a);
|
|
365
|
+
case l.Float:
|
|
366
|
+
return a;
|
|
367
|
+
case l.Double:
|
|
368
|
+
return a;
|
|
369
|
+
case l.String:
|
|
370
|
+
return a;
|
|
200
371
|
}
|
|
201
372
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
204
|
-
}
|
|
205
|
-
function l(t) {
|
|
206
|
-
const { type: e, name: n, domain: r } = t, o = { type: e, name: n };
|
|
207
|
-
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
373
|
+
function kn(n, t, e) {
|
|
374
|
+
return H(n, t, e);
|
|
208
375
|
}
|
|
209
|
-
function
|
|
210
|
-
return t
|
|
376
|
+
function En(n, t) {
|
|
377
|
+
return { ...n, src: h(n.src, t) };
|
|
211
378
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
function T(t, e) {
|
|
216
|
-
if (t === void 0) return e === void 0;
|
|
217
|
-
if (e === void 0) return !0;
|
|
218
|
-
for (const n in e)
|
|
219
|
-
if (t[n] !== e[n]) return !1;
|
|
220
|
-
return !0;
|
|
221
|
-
}
|
|
222
|
-
function L(t, e) {
|
|
223
|
-
return t.name === e.name && T(t.domain, e.domain);
|
|
224
|
-
}
|
|
225
|
-
function st(t, e) {
|
|
226
|
-
return { ...t, src: y(t.src, e) };
|
|
227
|
-
}
|
|
228
|
-
function y(t, e) {
|
|
229
|
-
switch (t.type) {
|
|
379
|
+
function h(n, t) {
|
|
380
|
+
switch (n.type) {
|
|
230
381
|
case "column":
|
|
231
382
|
return {
|
|
232
383
|
type: "column",
|
|
233
|
-
column:
|
|
384
|
+
column: t(n.column)
|
|
234
385
|
};
|
|
235
386
|
case "slicedColumn":
|
|
236
387
|
return {
|
|
237
388
|
type: "slicedColumn",
|
|
238
|
-
column:
|
|
239
|
-
newId:
|
|
240
|
-
axisFilters:
|
|
389
|
+
column: t(n.column),
|
|
390
|
+
newId: n.newId,
|
|
391
|
+
axisFilters: n.axisFilters
|
|
241
392
|
};
|
|
242
393
|
case "inlineColumn":
|
|
243
|
-
return
|
|
394
|
+
return n;
|
|
244
395
|
case "inner":
|
|
245
396
|
case "full":
|
|
246
397
|
return {
|
|
247
|
-
type:
|
|
248
|
-
entries:
|
|
398
|
+
type: n.type,
|
|
399
|
+
entries: n.entries.map((e) => h(e, t))
|
|
249
400
|
};
|
|
250
401
|
case "outer":
|
|
251
402
|
return {
|
|
252
403
|
type: "outer",
|
|
253
|
-
primary:
|
|
254
|
-
secondary:
|
|
404
|
+
primary: h(n.primary, t),
|
|
405
|
+
secondary: n.secondary.map((e) => h(e, t))
|
|
255
406
|
};
|
|
256
407
|
default:
|
|
257
|
-
|
|
408
|
+
w(n);
|
|
258
409
|
}
|
|
259
410
|
}
|
|
260
|
-
function
|
|
261
|
-
switch (
|
|
411
|
+
function Sn(n) {
|
|
412
|
+
switch (n.type) {
|
|
262
413
|
case "axis":
|
|
263
414
|
return {
|
|
264
415
|
type: "axis",
|
|
265
|
-
id:
|
|
416
|
+
id: n.id
|
|
266
417
|
};
|
|
267
418
|
case "column":
|
|
268
419
|
return {
|
|
269
420
|
type: "column",
|
|
270
|
-
id:
|
|
421
|
+
id: n.id
|
|
271
422
|
};
|
|
272
423
|
}
|
|
273
424
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
425
|
+
function _(n) {
|
|
426
|
+
return g(n);
|
|
276
427
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
428
|
+
function P(n) {
|
|
429
|
+
return g(m(n));
|
|
279
430
|
}
|
|
280
|
-
function
|
|
281
|
-
return JSON.stringify([
|
|
431
|
+
function x(n, t) {
|
|
432
|
+
return JSON.stringify([n, t]);
|
|
282
433
|
}
|
|
283
|
-
class
|
|
434
|
+
class On {
|
|
284
435
|
/**
|
|
285
436
|
* Creates a new anchor context from a set of anchor column specifications
|
|
286
437
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
287
438
|
*/
|
|
288
|
-
constructor(
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
for (const [r,
|
|
293
|
-
for (let
|
|
294
|
-
const i =
|
|
295
|
-
this.axes.set(
|
|
439
|
+
constructor(t) {
|
|
440
|
+
y(this, "domains", /* @__PURE__ */ new Map()), y(this, "axes", /* @__PURE__ */ new Map()), y(this, "domainPacks", []), y(this, "domainPackToAnchor", /* @__PURE__ */ new Map()), this.anchors = t;
|
|
441
|
+
const e = Object.entries(t);
|
|
442
|
+
e.sort((r, a) => r[0].localeCompare(a[0]));
|
|
443
|
+
for (const [r, a] of e) {
|
|
444
|
+
for (let c = 0; c < a.axesSpec.length; c++) {
|
|
445
|
+
const i = a.axesSpec[c], s = P(i);
|
|
446
|
+
this.axes.set(s, { anchor: r, idx: c });
|
|
296
447
|
}
|
|
297
|
-
if (
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
for (const [i,
|
|
301
|
-
const
|
|
302
|
-
this.domains.set(
|
|
448
|
+
if (a.domain !== void 0) {
|
|
449
|
+
const c = Object.entries(a.domain);
|
|
450
|
+
c.sort((i, s) => i[0].localeCompare(s[0])), this.domainPackToAnchor.set(JSON.stringify(c), r), this.domainPacks.push(c.map(([i]) => i));
|
|
451
|
+
for (const [i, s] of c) {
|
|
452
|
+
const u = x(i, s);
|
|
453
|
+
this.domains.set(u, r);
|
|
303
454
|
}
|
|
304
455
|
}
|
|
305
456
|
}
|
|
@@ -307,57 +458,57 @@ class ut {
|
|
|
307
458
|
/**
|
|
308
459
|
* Implementation of derive method
|
|
309
460
|
*/
|
|
310
|
-
derive(
|
|
461
|
+
derive(t, e) {
|
|
311
462
|
const r = {
|
|
312
|
-
name:
|
|
463
|
+
name: t.name,
|
|
313
464
|
axes: []
|
|
314
465
|
};
|
|
315
|
-
let
|
|
316
|
-
if (
|
|
317
|
-
|
|
466
|
+
let a;
|
|
467
|
+
if (t.domain !== void 0)
|
|
468
|
+
n:
|
|
318
469
|
for (const i of this.domainPacks) {
|
|
319
|
-
const
|
|
320
|
-
for (const
|
|
321
|
-
const d =
|
|
470
|
+
const s = [];
|
|
471
|
+
for (const f of i) {
|
|
472
|
+
const d = t.domain[f];
|
|
322
473
|
if (d !== void 0)
|
|
323
|
-
|
|
474
|
+
s.push([f, d]);
|
|
324
475
|
else
|
|
325
|
-
break
|
|
476
|
+
break n;
|
|
326
477
|
}
|
|
327
|
-
const
|
|
328
|
-
if (
|
|
329
|
-
r.domainAnchor =
|
|
478
|
+
const u = this.domainPackToAnchor.get(JSON.stringify(s));
|
|
479
|
+
if (u !== void 0) {
|
|
480
|
+
r.domainAnchor = u, a = new Set(i);
|
|
330
481
|
break;
|
|
331
482
|
}
|
|
332
483
|
}
|
|
333
|
-
for (const [i,
|
|
334
|
-
if (
|
|
484
|
+
for (const [i, s] of Object.entries(t.domain ?? {})) {
|
|
485
|
+
if (a !== void 0 && a.has(i))
|
|
335
486
|
continue;
|
|
336
|
-
const
|
|
337
|
-
r.domain ?? (r.domain = {}), r.domain[i] =
|
|
487
|
+
const u = x(i, s), f = this.domains.get(u);
|
|
488
|
+
r.domain ?? (r.domain = {}), r.domain[i] = f ? { anchor: f } : s;
|
|
338
489
|
}
|
|
339
|
-
if (r.axes =
|
|
340
|
-
const
|
|
341
|
-
return
|
|
342
|
-
}), !
|
|
490
|
+
if (r.axes = t.axesSpec.map((i) => {
|
|
491
|
+
const s = P(i), u = this.axes.get(s);
|
|
492
|
+
return u === void 0 ? m(i) : u;
|
|
493
|
+
}), !e || e.length === 0)
|
|
343
494
|
return r;
|
|
344
|
-
const
|
|
345
|
-
for (const i of
|
|
346
|
-
const [
|
|
347
|
-
if (typeof
|
|
348
|
-
if (
|
|
349
|
-
throw new Error(`Axis index ${
|
|
350
|
-
|
|
495
|
+
const c = [];
|
|
496
|
+
for (const i of e) {
|
|
497
|
+
const [s, u] = i;
|
|
498
|
+
if (typeof s == "number") {
|
|
499
|
+
if (s < 0 || s >= t.axesSpec.length)
|
|
500
|
+
throw new Error(`Axis index ${s} is out of bounds (0-${t.axesSpec.length - 1})`);
|
|
501
|
+
c.push([s, u]);
|
|
351
502
|
} else {
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
throw new Error(`Axis with name "${
|
|
355
|
-
|
|
503
|
+
const f = t.axesSpec.findIndex((d) => d.name === s);
|
|
504
|
+
if (f === -1)
|
|
505
|
+
throw new Error(`Axis with name "${s}" not found in the column specification`);
|
|
506
|
+
c.push([f, u]);
|
|
356
507
|
}
|
|
357
508
|
}
|
|
358
|
-
return
|
|
509
|
+
return c.sort((i, s) => i[0] - s[0]), {
|
|
359
510
|
source: r,
|
|
360
|
-
axisFilters:
|
|
511
|
+
axisFilters: c
|
|
361
512
|
};
|
|
362
513
|
}
|
|
363
514
|
/**
|
|
@@ -366,326 +517,307 @@ class ut {
|
|
|
366
517
|
* @param axisFilters Optional axis filters to apply to the column
|
|
367
518
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
368
519
|
*/
|
|
369
|
-
deriveS(
|
|
370
|
-
return
|
|
520
|
+
deriveS(t, e) {
|
|
521
|
+
return _(this.derive(t, e));
|
|
371
522
|
}
|
|
372
523
|
}
|
|
373
|
-
function
|
|
374
|
-
const r = { ...
|
|
524
|
+
function Jn(n, t, e) {
|
|
525
|
+
const r = { ...t }, a = (e == null ? void 0 : e.ignoreMissingDomains) ?? !1;
|
|
375
526
|
if (r.domainAnchor !== void 0) {
|
|
376
|
-
const
|
|
377
|
-
if (!
|
|
527
|
+
const c = n[r.domainAnchor];
|
|
528
|
+
if (!c)
|
|
378
529
|
throw new Error(`Anchor "${r.domainAnchor}" not found`);
|
|
379
|
-
const i =
|
|
530
|
+
const i = c.domain || {};
|
|
380
531
|
r.domain = { ...i, ...r.domain }, delete r.domainAnchor;
|
|
381
532
|
}
|
|
382
533
|
if (r.domain) {
|
|
383
|
-
const
|
|
384
|
-
for (const [i,
|
|
385
|
-
if (typeof
|
|
386
|
-
|
|
534
|
+
const c = {};
|
|
535
|
+
for (const [i, s] of Object.entries(r.domain))
|
|
536
|
+
if (typeof s == "string")
|
|
537
|
+
c[i] = s;
|
|
387
538
|
else {
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
throw new Error(`Anchor "${
|
|
391
|
-
if (!
|
|
392
|
-
if (!
|
|
393
|
-
throw new Error(`Domain key "${i}" not found in anchor "${
|
|
539
|
+
const u = n[s.anchor];
|
|
540
|
+
if (!u)
|
|
541
|
+
throw new Error(`Anchor "${s.anchor}" not found for domain key "${i}"`);
|
|
542
|
+
if (!u.domain || u.domain[i] === void 0) {
|
|
543
|
+
if (!a)
|
|
544
|
+
throw new Error(`Domain key "${i}" not found in anchor "${s.anchor}"`);
|
|
394
545
|
continue;
|
|
395
546
|
}
|
|
396
|
-
|
|
547
|
+
c[i] = u.domain[i];
|
|
397
548
|
}
|
|
398
|
-
r.domain =
|
|
549
|
+
r.domain = c;
|
|
399
550
|
}
|
|
400
|
-
return r.axes && (r.axes = r.axes.map((
|
|
551
|
+
return r.axes && (r.axes = r.axes.map((c) => z(n, c))), r;
|
|
401
552
|
}
|
|
402
|
-
function
|
|
403
|
-
if (!
|
|
404
|
-
return
|
|
405
|
-
const
|
|
553
|
+
function z(n, t) {
|
|
554
|
+
if (!X(t))
|
|
555
|
+
return t;
|
|
556
|
+
const e = t.anchor, r = n[e];
|
|
406
557
|
if (!r)
|
|
407
|
-
throw new Error(`Anchor "${
|
|
408
|
-
if ("idx" in
|
|
409
|
-
if (
|
|
410
|
-
throw new Error(`Axis index ${
|
|
411
|
-
return r.axesSpec[
|
|
412
|
-
} else if ("name" in
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
415
|
-
throw new Error(`Multiple axes with name "${
|
|
416
|
-
if (
|
|
417
|
-
throw new Error(`Axis with name "${
|
|
418
|
-
return
|
|
419
|
-
} else if ("id" in
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
throw new Error(`Multiple matching axes found for matcher in anchor "${
|
|
423
|
-
if (
|
|
424
|
-
throw new Error(`No matching axis found for matcher in anchor "${
|
|
425
|
-
return
|
|
558
|
+
throw new Error(`Anchor "${e}" not found for axis reference`);
|
|
559
|
+
if ("idx" in t) {
|
|
560
|
+
if (t.idx < 0 || t.idx >= r.axesSpec.length)
|
|
561
|
+
throw new Error(`Axis index ${t.idx} out of bounds for anchor "${e}"`);
|
|
562
|
+
return r.axesSpec[t.idx];
|
|
563
|
+
} else if ("name" in t) {
|
|
564
|
+
const a = r.axesSpec.filter((c) => c.name === t.name);
|
|
565
|
+
if (a.length > 1)
|
|
566
|
+
throw new Error(`Multiple axes with name "${t.name}" found in anchor "${e}"`);
|
|
567
|
+
if (a.length === 0)
|
|
568
|
+
throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
|
|
569
|
+
return a[0];
|
|
570
|
+
} else if ("id" in t) {
|
|
571
|
+
const a = r.axesSpec.filter((c) => V(t.id, m(c)));
|
|
572
|
+
if (a.length > 1)
|
|
573
|
+
throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
|
|
574
|
+
if (a.length === 0)
|
|
575
|
+
throw new Error(`No matching axis found for matcher in anchor "${e}"`);
|
|
576
|
+
return a[0];
|
|
426
577
|
}
|
|
427
578
|
throw new Error("Unsupported axis reference type");
|
|
428
579
|
}
|
|
429
|
-
function
|
|
430
|
-
return typeof
|
|
580
|
+
function X(n) {
|
|
581
|
+
return typeof n == "object" && "anchor" in n;
|
|
431
582
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
583
|
+
function b(n) {
|
|
584
|
+
return n.kind === "PColumn";
|
|
434
585
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
586
|
+
function Q(n) {
|
|
587
|
+
return b(n.spec);
|
|
437
588
|
}
|
|
438
|
-
function
|
|
439
|
-
if (!
|
|
440
|
-
return
|
|
589
|
+
function In(n) {
|
|
590
|
+
if (!Q(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
|
|
591
|
+
return n;
|
|
441
592
|
}
|
|
442
|
-
function
|
|
443
|
-
return
|
|
444
|
-
...
|
|
445
|
-
data:
|
|
593
|
+
function jn(n, t) {
|
|
594
|
+
return n === void 0 ? void 0 : {
|
|
595
|
+
...n,
|
|
596
|
+
data: t(n.data)
|
|
446
597
|
};
|
|
447
598
|
}
|
|
448
|
-
function
|
|
449
|
-
const
|
|
599
|
+
function Nn(n) {
|
|
600
|
+
const t = /* @__PURE__ */ new Map(), e = (r) => {
|
|
450
601
|
switch (r.type) {
|
|
451
602
|
case "column":
|
|
452
|
-
|
|
603
|
+
t.set(r.column.id, r.column);
|
|
453
604
|
return;
|
|
454
605
|
case "slicedColumn":
|
|
455
|
-
|
|
606
|
+
t.set(r.column.id, r.column);
|
|
456
607
|
return;
|
|
457
608
|
case "inlineColumn":
|
|
458
609
|
return;
|
|
459
610
|
case "full":
|
|
460
611
|
case "inner":
|
|
461
|
-
for (const
|
|
612
|
+
for (const a of r.entries) e(a);
|
|
462
613
|
return;
|
|
463
614
|
case "outer":
|
|
464
|
-
|
|
465
|
-
for (const
|
|
615
|
+
e(r.primary);
|
|
616
|
+
for (const a of r.secondary) e(a);
|
|
466
617
|
return;
|
|
467
618
|
default:
|
|
468
|
-
|
|
619
|
+
w(r);
|
|
469
620
|
}
|
|
470
621
|
};
|
|
471
|
-
return n
|
|
622
|
+
return e(n), [...t.values()];
|
|
472
623
|
}
|
|
473
|
-
function
|
|
474
|
-
if (
|
|
624
|
+
function A(n, t) {
|
|
625
|
+
if (n.name !== void 0 && n.name !== t.name)
|
|
475
626
|
return !1;
|
|
476
|
-
if (
|
|
477
|
-
if (Array.isArray(
|
|
478
|
-
if (!
|
|
627
|
+
if (n.type !== void 0) {
|
|
628
|
+
if (Array.isArray(n.type)) {
|
|
629
|
+
if (!n.type.includes(t.type))
|
|
479
630
|
return !1;
|
|
480
|
-
} else if (
|
|
631
|
+
} else if (n.type !== t.type)
|
|
481
632
|
return !1;
|
|
482
633
|
}
|
|
483
|
-
if (
|
|
484
|
-
const
|
|
485
|
-
for (const [r,
|
|
486
|
-
if (
|
|
634
|
+
if (n.domain !== void 0) {
|
|
635
|
+
const e = t.domain || {};
|
|
636
|
+
for (const [r, a] of Object.entries(n.domain))
|
|
637
|
+
if (e[r] !== a)
|
|
487
638
|
return !1;
|
|
488
639
|
}
|
|
489
640
|
return !0;
|
|
490
641
|
}
|
|
491
|
-
function
|
|
492
|
-
if (
|
|
642
|
+
function k(n, t) {
|
|
643
|
+
if (t.name !== void 0 && n.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n.name))
|
|
493
644
|
return !1;
|
|
494
|
-
if (
|
|
495
|
-
if (Array.isArray(
|
|
496
|
-
if (!
|
|
645
|
+
if (t.type !== void 0) {
|
|
646
|
+
if (Array.isArray(t.type)) {
|
|
647
|
+
if (!t.type.includes(n.valueType))
|
|
497
648
|
return !1;
|
|
498
|
-
} else if (
|
|
649
|
+
} else if (t.type !== n.valueType)
|
|
499
650
|
return !1;
|
|
500
651
|
}
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
for (const [r,
|
|
504
|
-
if (
|
|
652
|
+
if (t.domain !== void 0) {
|
|
653
|
+
const e = n.domain || {};
|
|
654
|
+
for (const [r, a] of Object.entries(t.domain))
|
|
655
|
+
if (e[r] !== a)
|
|
505
656
|
return !1;
|
|
506
657
|
}
|
|
507
|
-
if (
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
510
|
-
for (const r of
|
|
511
|
-
if (!
|
|
658
|
+
if (t.axes !== void 0) {
|
|
659
|
+
const e = n.axesSpec.map(m);
|
|
660
|
+
if (t.partialAxesMatch) {
|
|
661
|
+
for (const r of t.axes)
|
|
662
|
+
if (!e.some((a) => A(r, a)))
|
|
512
663
|
return !1;
|
|
513
664
|
} else {
|
|
514
|
-
if (
|
|
665
|
+
if (e.length !== t.axes.length)
|
|
515
666
|
return !1;
|
|
516
|
-
for (let r = 0; r <
|
|
517
|
-
if (!
|
|
667
|
+
for (let r = 0; r < t.axes.length; r++)
|
|
668
|
+
if (!A(t.axes[r], e[r]))
|
|
518
669
|
return !1;
|
|
519
670
|
}
|
|
520
671
|
}
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
for (const [r,
|
|
524
|
-
if (
|
|
672
|
+
if (t.annotations !== void 0) {
|
|
673
|
+
const e = n.annotations || {};
|
|
674
|
+
for (const [r, a] of Object.entries(t.annotations))
|
|
675
|
+
if (e[r] !== a)
|
|
525
676
|
return !1;
|
|
526
677
|
}
|
|
527
|
-
if (
|
|
528
|
-
const
|
|
529
|
-
for (const [r,
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
678
|
+
if (t.annotationPatterns !== void 0) {
|
|
679
|
+
const e = n.annotations || {};
|
|
680
|
+
for (const [r, a] of Object.entries(t.annotationPatterns)) {
|
|
681
|
+
const c = e[r];
|
|
682
|
+
if (c === void 0 || !new RegExp(a).test(c))
|
|
532
683
|
return !1;
|
|
533
684
|
}
|
|
534
685
|
}
|
|
535
686
|
return !0;
|
|
536
687
|
}
|
|
537
|
-
function
|
|
538
|
-
return Array.isArray(
|
|
688
|
+
function Ln(n) {
|
|
689
|
+
return Array.isArray(n) ? (t) => n.some((e) => b(t) && k(t, e)) : (t) => b(t) && k(t, n);
|
|
539
690
|
}
|
|
540
|
-
function
|
|
541
|
-
const
|
|
542
|
-
kind:
|
|
543
|
-
name:
|
|
691
|
+
function Tn(n) {
|
|
692
|
+
const t = {
|
|
693
|
+
kind: n.kind,
|
|
694
|
+
name: n.name
|
|
544
695
|
};
|
|
545
|
-
return
|
|
696
|
+
return n.domain !== void 0 && (t.domain = n.domain), b(n) && (t.axesSpec = B(n.axesSpec)), g(t);
|
|
546
697
|
}
|
|
547
|
-
|
|
548
|
-
__isRef:
|
|
549
|
-
blockId:
|
|
550
|
-
name:
|
|
551
|
-
requireEnrichments:
|
|
698
|
+
o.object({
|
|
699
|
+
__isRef: o.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
700
|
+
blockId: o.string().describe("Upstream block id"),
|
|
701
|
+
name: o.string().describe("Name of the output provided to the upstream block's output context"),
|
|
702
|
+
requireEnrichments: o.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")
|
|
552
703
|
}).describe(
|
|
553
704
|
"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."
|
|
554
705
|
).readonly();
|
|
555
|
-
function
|
|
556
|
-
return typeof
|
|
706
|
+
function Cn(n) {
|
|
707
|
+
return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === !0 && "blockId" in n && "name" in n;
|
|
557
708
|
}
|
|
558
|
-
function
|
|
559
|
-
if (
|
|
709
|
+
function $n(n, t = !0) {
|
|
710
|
+
if (t)
|
|
560
711
|
return {
|
|
561
|
-
...
|
|
712
|
+
...n,
|
|
562
713
|
requireEnrichments: !0
|
|
563
714
|
};
|
|
564
715
|
{
|
|
565
|
-
const { requireEnrichments:
|
|
716
|
+
const { requireEnrichments: e, ...r } = n;
|
|
566
717
|
return r;
|
|
567
718
|
}
|
|
568
719
|
}
|
|
569
|
-
function
|
|
570
|
-
return
|
|
720
|
+
function Dn(n, t) {
|
|
721
|
+
return n.ok ? { ok: !0, value: t(n.value) } : n;
|
|
571
722
|
}
|
|
572
|
-
function
|
|
573
|
-
if (
|
|
574
|
-
return new DataView(
|
|
575
|
-
if (
|
|
723
|
+
function Y(n) {
|
|
724
|
+
if (n instanceof Int8Array || n instanceof Uint8Array || n instanceof Uint8ClampedArray)
|
|
725
|
+
return new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
726
|
+
if (n instanceof ArrayBuffer) return new DataView(n);
|
|
576
727
|
throw new TypeError(
|
|
577
728
|
"Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
|
|
578
729
|
);
|
|
579
730
|
}
|
|
580
|
-
const
|
|
581
|
-
function
|
|
582
|
-
|
|
583
|
-
let r,
|
|
584
|
-
switch (
|
|
731
|
+
const Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", W = "0123456789ABCDEFGHIJKLMNOPQRSTUV", nn = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
732
|
+
function tn(n, t, e) {
|
|
733
|
+
e = e || {};
|
|
734
|
+
let r, a;
|
|
735
|
+
switch (t) {
|
|
585
736
|
case "RFC3548":
|
|
586
737
|
case "RFC4648":
|
|
587
|
-
r =
|
|
738
|
+
r = Z, a = !0;
|
|
588
739
|
break;
|
|
589
740
|
case "RFC4648-HEX":
|
|
590
|
-
r =
|
|
741
|
+
r = W, a = !0;
|
|
591
742
|
break;
|
|
592
743
|
case "Crockford":
|
|
593
|
-
r =
|
|
744
|
+
r = nn, a = !1;
|
|
594
745
|
break;
|
|
595
746
|
default:
|
|
596
|
-
throw new Error("Unknown base32 variant: " + String(
|
|
747
|
+
throw new Error("Unknown base32 variant: " + String(t));
|
|
597
748
|
}
|
|
598
|
-
const
|
|
599
|
-
let
|
|
749
|
+
const c = e.padding !== void 0 ? e.padding : a, i = Y(n);
|
|
750
|
+
let s = 0, u = 0, f = "";
|
|
600
751
|
for (let d = 0; d < i.byteLength; d++)
|
|
601
|
-
for (
|
|
602
|
-
|
|
603
|
-
if (
|
|
604
|
-
for (;
|
|
605
|
-
|
|
606
|
-
return
|
|
607
|
-
}
|
|
608
|
-
const
|
|
609
|
-
function
|
|
610
|
-
const
|
|
611
|
-
return crypto.getRandomValues(
|
|
612
|
-
}
|
|
613
|
-
function vt(t) {
|
|
614
|
-
return p(t);
|
|
615
|
-
}
|
|
616
|
-
function xt(t) {
|
|
617
|
-
return JSON.parse(t);
|
|
618
|
-
}
|
|
619
|
-
function H(t) {
|
|
620
|
-
return t instanceof Error ? t.name === "AbortError" || H(t.cause) : !1;
|
|
621
|
-
}
|
|
622
|
-
function Q(t) {
|
|
623
|
-
if (typeof t == "string")
|
|
624
|
-
return `String value was thrown: ${t}`;
|
|
625
|
-
if (t && typeof t == "object")
|
|
626
|
-
try {
|
|
627
|
-
return `Plain object was thrown: ${JSON.stringify(t)}`;
|
|
628
|
-
} catch (e) {
|
|
629
|
-
return `Non-serializable object was thrown (JSON.stringify failed: ${e instanceof Error ? e.message : String(e)}): ${String(t)}`;
|
|
630
|
-
}
|
|
631
|
-
return `Non-Error value (${typeof t}) was thrown: ${t}`;
|
|
632
|
-
}
|
|
633
|
-
function At(t) {
|
|
634
|
-
return t instanceof Error ? t : new Error(Q(t));
|
|
635
|
-
}
|
|
636
|
-
function k(t) {
|
|
637
|
-
const e = t.cause ? k(t.cause) : void 0, n = new Error(t.message, e !== void 0 ? { cause: e } : void 0);
|
|
638
|
-
return n.name = t.name || "Error", n.stack = t.stack, n;
|
|
639
|
-
}
|
|
640
|
-
function Pt(t) {
|
|
641
|
-
if (t.error)
|
|
642
|
-
throw t.error instanceof Error ? t.error : k(t.error);
|
|
643
|
-
return t.value;
|
|
752
|
+
for (u = u << 8 | i.getUint8(d), s += 8; s >= 5; )
|
|
753
|
+
f += r[u >>> s - 5 & 31], s -= 5;
|
|
754
|
+
if (s > 0 && (f += r[u << 5 - s & 31]), c)
|
|
755
|
+
for (; f.length % 8 !== 0; )
|
|
756
|
+
f += "=";
|
|
757
|
+
return f;
|
|
758
|
+
}
|
|
759
|
+
const en = 15, rn = 24, an = o.string().length(rn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
760
|
+
function Fn() {
|
|
761
|
+
const n = new Uint8Array(en);
|
|
762
|
+
return crypto.getRandomValues(n), an.parse(tn(n, "RFC4648"));
|
|
644
763
|
}
|
|
645
764
|
export {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
765
|
+
On as AnchoredIdDeriver,
|
|
766
|
+
p as Annotation,
|
|
767
|
+
M as AnnotationJson,
|
|
768
|
+
F as AxisSpec,
|
|
769
|
+
hn as Domain,
|
|
770
|
+
vn as PColumnName,
|
|
771
|
+
K as PTableAbsent,
|
|
772
|
+
O as PTableNA,
|
|
773
|
+
an as PlId,
|
|
774
|
+
en as PlIdBytes,
|
|
775
|
+
rn as PlIdLength,
|
|
776
|
+
l as ValueType,
|
|
777
|
+
Pn as canonicalizeAxisId,
|
|
778
|
+
C as canonicalizeJson,
|
|
779
|
+
ln as dataInfoToEntries,
|
|
780
|
+
Tn as deriveNativeId,
|
|
781
|
+
E as deserializeError,
|
|
782
|
+
T as ensureError,
|
|
783
|
+
In as ensurePColumn,
|
|
784
|
+
pn as entriesToDataInfo,
|
|
785
|
+
Nn as extractAllColumns,
|
|
786
|
+
B as getAxesId,
|
|
787
|
+
m as getAxisId,
|
|
788
|
+
Sn as getPTableColumnId,
|
|
789
|
+
N as hasAbortError,
|
|
790
|
+
cn as isDataInfo,
|
|
791
|
+
j as isDataInfoEntries,
|
|
792
|
+
Q as isPColumn,
|
|
793
|
+
b as isPColumnSpec,
|
|
794
|
+
xn as isPTableAbsent,
|
|
795
|
+
G as isPTableNA,
|
|
796
|
+
An as isPTableValueAxis,
|
|
797
|
+
fn as isPartitionedDataInfoEntries,
|
|
798
|
+
Cn as isPlRef,
|
|
799
|
+
un as mapDataInfo,
|
|
800
|
+
h as mapJoinEntry,
|
|
801
|
+
jn as mapPObjectData,
|
|
802
|
+
En as mapPTableDef,
|
|
803
|
+
Dn as mapValueInVOE,
|
|
804
|
+
A as matchAxis,
|
|
805
|
+
V as matchAxisId,
|
|
806
|
+
k as matchPColumn,
|
|
807
|
+
kn as pTableValue,
|
|
808
|
+
yn as parseJson,
|
|
809
|
+
gn as readAnnotation,
|
|
810
|
+
wn as readAnnotationJson,
|
|
811
|
+
bn as readDomain,
|
|
812
|
+
v as readMetadata,
|
|
813
|
+
D as readMetadataJson,
|
|
814
|
+
$ as readMetadataJsonOrThrow,
|
|
815
|
+
Jn as resolveAnchors,
|
|
816
|
+
Ln as selectorsToPredicate,
|
|
817
|
+
_ as stringifyColumnId,
|
|
818
|
+
mn as stringifyJson,
|
|
819
|
+
Fn as uniquePlId,
|
|
820
|
+
dn as unwrapResult,
|
|
821
|
+
$n as withEnrichments
|
|
690
822
|
};
|
|
691
823
|
//# sourceMappingURL=index.js.map
|