@milaboratories/milaboratories.ui-examples.model 1.1.43 → 1.1.45
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 +9 -9
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +390 -349
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}, "");
|
|
36
36
|
return `{${values}}`;
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const _e = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
|
|
39
39
|
var util;
|
|
40
40
|
(function(util2) {
|
|
41
41
|
util2.assertEqual = (val) => val;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
88
88
|
}
|
|
89
89
|
util2.joinValues = joinValues;
|
|
90
|
-
util2.jsonStringifyReplacer = (
|
|
90
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
91
91
|
if (typeof value === "bigint") {
|
|
92
92
|
return value.toString();
|
|
93
93
|
}
|
|
@@ -3103,7 +3103,7 @@
|
|
|
3103
3103
|
});
|
|
3104
3104
|
}
|
|
3105
3105
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3106
|
-
const
|
|
3106
|
+
const fn = ctx.data;
|
|
3107
3107
|
if (this._def.returns instanceof ZodPromise) {
|
|
3108
3108
|
const me = this;
|
|
3109
3109
|
return OK(async function(...args) {
|
|
@@ -3112,7 +3112,7 @@
|
|
|
3112
3112
|
error.addIssue(makeArgsIssue(args, e));
|
|
3113
3113
|
throw error;
|
|
3114
3114
|
});
|
|
3115
|
-
const result = await Reflect.apply(
|
|
3115
|
+
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
3116
3116
|
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3117
3117
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3118
3118
|
throw error;
|
|
@@ -3126,7 +3126,7 @@
|
|
|
3126
3126
|
if (!parsedArgs.success) {
|
|
3127
3127
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3128
3128
|
}
|
|
3129
|
-
const result = Reflect.apply(
|
|
3129
|
+
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
3130
3130
|
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
3131
3131
|
if (!parsedReturns.success) {
|
|
3132
3132
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
@@ -3832,7 +3832,7 @@
|
|
|
3832
3832
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
3833
3833
|
};
|
|
3834
3834
|
const NEVER = INVALID;
|
|
3835
|
-
var z
|
|
3835
|
+
var z = /* @__PURE__ */ Object.freeze({
|
|
3836
3836
|
__proto__: null,
|
|
3837
3837
|
defaultErrorMap: errorMap,
|
|
3838
3838
|
setErrorMap,
|
|
@@ -3948,13 +3948,13 @@
|
|
|
3948
3948
|
quotelessJson,
|
|
3949
3949
|
ZodError
|
|
3950
3950
|
});
|
|
3951
|
-
var $ = Object.defineProperty;
|
|
3952
|
-
var
|
|
3953
|
-
var m$2 = (n2, t, e) =>
|
|
3951
|
+
var I$1 = Object.defineProperty;
|
|
3952
|
+
var $ = (n2, t, e) => t in n2 ? I$1(n2, t, { enumerable: true, configurable: true, writable: true, value: e }) : n2[t] = e;
|
|
3953
|
+
var m$2 = (n2, t, e) => $(n2, typeof t != "symbol" ? t + "" : t, e);
|
|
3954
3954
|
function w(n2) {
|
|
3955
3955
|
throw new Error("Unexpected object: " + n2);
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function mn(n2) {
|
|
3958
3958
|
if (!n2 || typeof n2 != "object")
|
|
3959
3959
|
return false;
|
|
3960
3960
|
const t = n2;
|
|
@@ -3971,7 +3971,7 @@
|
|
|
3971
3971
|
return false;
|
|
3972
3972
|
}
|
|
3973
3973
|
}
|
|
3974
|
-
function
|
|
3974
|
+
function yn(n2, t) {
|
|
3975
3975
|
if (n2 !== void 0)
|
|
3976
3976
|
switch (n2.type) {
|
|
3977
3977
|
case "Json":
|
|
@@ -4016,10 +4016,10 @@
|
|
|
4016
4016
|
return false;
|
|
4017
4017
|
}
|
|
4018
4018
|
}
|
|
4019
|
-
function
|
|
4019
|
+
function ln(n2) {
|
|
4020
4020
|
return j(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4021
4021
|
}
|
|
4022
|
-
function
|
|
4022
|
+
function hn(n2) {
|
|
4023
4023
|
switch (n2.type) {
|
|
4024
4024
|
case "Json": {
|
|
4025
4025
|
const t = Object.entries(n2.data).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
|
|
@@ -4047,7 +4047,7 @@
|
|
|
4047
4047
|
}
|
|
4048
4048
|
}
|
|
4049
4049
|
}
|
|
4050
|
-
function
|
|
4050
|
+
function gn(n2) {
|
|
4051
4051
|
switch (n2.type) {
|
|
4052
4052
|
case "Json": {
|
|
4053
4053
|
const t = {};
|
|
@@ -4081,12 +4081,18 @@
|
|
|
4081
4081
|
}
|
|
4082
4082
|
}
|
|
4083
4083
|
}
|
|
4084
|
+
function Cn$1(n2) {
|
|
4085
|
+
return {
|
|
4086
|
+
columnId: n2.id,
|
|
4087
|
+
spec: n2.spec
|
|
4088
|
+
};
|
|
4089
|
+
}
|
|
4084
4090
|
function p$1(n2) {
|
|
4085
4091
|
const { type: t, name: e, domain: r } = n2;
|
|
4086
4092
|
return { type: t, name: e, ...r && { domain: r } };
|
|
4087
4093
|
}
|
|
4088
|
-
function
|
|
4089
|
-
return
|
|
4094
|
+
function Jn(n2) {
|
|
4095
|
+
return _e(p$1(n2));
|
|
4090
4096
|
}
|
|
4091
4097
|
function X$1(n2, t) {
|
|
4092
4098
|
if (n2 === void 0) return t === void 0;
|
|
@@ -4095,10 +4101,10 @@
|
|
|
4095
4101
|
if (n2[e] !== t[e]) return false;
|
|
4096
4102
|
return true;
|
|
4097
4103
|
}
|
|
4098
|
-
function
|
|
4104
|
+
function G(n2, t) {
|
|
4099
4105
|
return n2.name === t.name && X$1(n2.domain, t.domain);
|
|
4100
4106
|
}
|
|
4101
|
-
function
|
|
4107
|
+
function On(n2, t) {
|
|
4102
4108
|
return { ...n2, src: l$1(n2.src, t) };
|
|
4103
4109
|
}
|
|
4104
4110
|
function l$1(n2, t) {
|
|
@@ -4131,16 +4137,16 @@
|
|
|
4131
4137
|
w(n2);
|
|
4132
4138
|
}
|
|
4133
4139
|
}
|
|
4134
|
-
function
|
|
4135
|
-
return
|
|
4140
|
+
function Q(n2) {
|
|
4141
|
+
return _e(n2);
|
|
4136
4142
|
}
|
|
4137
|
-
function
|
|
4138
|
-
return
|
|
4143
|
+
function x(n2) {
|
|
4144
|
+
return _e(p$1(n2));
|
|
4139
4145
|
}
|
|
4140
|
-
function
|
|
4146
|
+
function A(n2, t) {
|
|
4141
4147
|
return JSON.stringify([n2, t]);
|
|
4142
4148
|
}
|
|
4143
|
-
class
|
|
4149
|
+
class $n {
|
|
4144
4150
|
/**
|
|
4145
4151
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4146
4152
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -4155,14 +4161,14 @@
|
|
|
4155
4161
|
e.sort((r, o) => r[0].localeCompare(o[0]));
|
|
4156
4162
|
for (const [r, o] of e) {
|
|
4157
4163
|
for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
|
|
4158
|
-
const a = o.axesSpec[s2], i =
|
|
4164
|
+
const a = o.axesSpec[s2], i = x(a);
|
|
4159
4165
|
this.axes.set(i, { anchor: r, idx: s2 });
|
|
4160
4166
|
}
|
|
4161
4167
|
if (o.domain !== void 0) {
|
|
4162
4168
|
const s2 = Object.entries(o.domain);
|
|
4163
4169
|
s2.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s2), r), this.domainPacks.push(s2.map(([a]) => a));
|
|
4164
4170
|
for (const [a, i] of s2) {
|
|
4165
|
-
const u2 =
|
|
4171
|
+
const u2 = A(a, i);
|
|
4166
4172
|
this.domains.set(u2, r);
|
|
4167
4173
|
}
|
|
4168
4174
|
}
|
|
@@ -4197,11 +4203,11 @@
|
|
|
4197
4203
|
for (const [a, i] of Object.entries(t.domain ?? {})) {
|
|
4198
4204
|
if (o !== void 0 && o.has(a))
|
|
4199
4205
|
continue;
|
|
4200
|
-
const u2 =
|
|
4206
|
+
const u2 = A(a, i), c2 = this.domains.get(u2);
|
|
4201
4207
|
r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
|
|
4202
4208
|
}
|
|
4203
4209
|
if (r.axes = t.axesSpec.map((a) => {
|
|
4204
|
-
const i =
|
|
4210
|
+
const i = x(a), u2 = this.axes.get(i);
|
|
4205
4211
|
return u2 === void 0 ? p$1(a) : u2;
|
|
4206
4212
|
}), !e || e.length === 0)
|
|
4207
4213
|
return r;
|
|
@@ -4231,10 +4237,10 @@
|
|
|
4231
4237
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4232
4238
|
*/
|
|
4233
4239
|
deriveS(t, e) {
|
|
4234
|
-
return
|
|
4240
|
+
return Q(this.derive(t, e));
|
|
4235
4241
|
}
|
|
4236
4242
|
}
|
|
4237
|
-
function
|
|
4243
|
+
function Dn(n2, t, e) {
|
|
4238
4244
|
const r = { ...t }, o = (e == null ? void 0 : e.ignoreMissingDomains) ?? false;
|
|
4239
4245
|
if (r.domainAnchor !== void 0) {
|
|
4240
4246
|
const s2 = n2[r.domainAnchor];
|
|
@@ -4261,10 +4267,10 @@
|
|
|
4261
4267
|
}
|
|
4262
4268
|
r.domain = s2;
|
|
4263
4269
|
}
|
|
4264
|
-
return r.axes && (r.axes = r.axes.map((s2) =>
|
|
4270
|
+
return r.axes && (r.axes = r.axes.map((s2) => Y$1(n2, s2))), r;
|
|
4265
4271
|
}
|
|
4266
|
-
function
|
|
4267
|
-
if (!
|
|
4272
|
+
function Y$1(n2, t) {
|
|
4273
|
+
if (!Z$1(t))
|
|
4268
4274
|
return t;
|
|
4269
4275
|
const e = t.anchor, r = n2[e];
|
|
4270
4276
|
if (!r)
|
|
@@ -4281,7 +4287,7 @@
|
|
|
4281
4287
|
throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
|
|
4282
4288
|
return o[0];
|
|
4283
4289
|
} else if ("id" in t) {
|
|
4284
|
-
const o = r.axesSpec.filter((s2) =>
|
|
4290
|
+
const o = r.axesSpec.filter((s2) => G(t.id, p$1(s2)));
|
|
4285
4291
|
if (o.length > 1)
|
|
4286
4292
|
throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
|
|
4287
4293
|
if (o.length === 0)
|
|
@@ -4290,26 +4296,26 @@
|
|
|
4290
4296
|
}
|
|
4291
4297
|
throw new Error("Unsupported axis reference type");
|
|
4292
4298
|
}
|
|
4293
|
-
function
|
|
4299
|
+
function Z$1(n2) {
|
|
4294
4300
|
return typeof n2 == "object" && "anchor" in n2;
|
|
4295
4301
|
}
|
|
4296
4302
|
function f(n2) {
|
|
4297
4303
|
return n2.kind === "PColumn";
|
|
4298
4304
|
}
|
|
4299
|
-
function
|
|
4305
|
+
function q(n2) {
|
|
4300
4306
|
return f(n2.spec);
|
|
4301
4307
|
}
|
|
4302
|
-
function
|
|
4303
|
-
if (!
|
|
4308
|
+
function jn(n2) {
|
|
4309
|
+
if (!q(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4304
4310
|
return n2;
|
|
4305
4311
|
}
|
|
4306
|
-
function
|
|
4312
|
+
function Fn(n2, t) {
|
|
4307
4313
|
return n2 === void 0 ? void 0 : {
|
|
4308
4314
|
...n2,
|
|
4309
4315
|
data: t(n2.data)
|
|
4310
4316
|
};
|
|
4311
4317
|
}
|
|
4312
|
-
function
|
|
4318
|
+
function Un(n2) {
|
|
4313
4319
|
const t = /* @__PURE__ */ new Map(), e = (r) => {
|
|
4314
4320
|
switch (r.type) {
|
|
4315
4321
|
case "column":
|
|
@@ -4396,24 +4402,24 @@
|
|
|
4396
4402
|
}
|
|
4397
4403
|
return true;
|
|
4398
4404
|
}
|
|
4399
|
-
function
|
|
4405
|
+
function Kn(n2) {
|
|
4400
4406
|
return Array.isArray(n2) ? (t) => n2.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n2);
|
|
4401
4407
|
}
|
|
4402
|
-
z
|
|
4403
|
-
__isRef: z
|
|
4404
|
-
blockId: z
|
|
4405
|
-
name: z
|
|
4408
|
+
z.object({
|
|
4409
|
+
__isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4410
|
+
blockId: z.string().describe("Upstream block id"),
|
|
4411
|
+
name: z.string().describe("Name of the output provided to the upstream block's output context")
|
|
4406
4412
|
}).describe(
|
|
4407
4413
|
"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."
|
|
4408
4414
|
).strict().readonly();
|
|
4409
|
-
function
|
|
4415
|
+
function Tn(n2) {
|
|
4410
4416
|
return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
|
|
4411
4417
|
}
|
|
4412
4418
|
function _n(n2, t) {
|
|
4413
4419
|
return n2.ok ? { ok: true, value: t(n2.value) } : n2;
|
|
4414
4420
|
}
|
|
4415
|
-
const
|
|
4416
|
-
z
|
|
4421
|
+
const sn = 24;
|
|
4422
|
+
z.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4417
4423
|
var stringify = { exports: {} };
|
|
4418
4424
|
(function(module2, exports3) {
|
|
4419
4425
|
exports3 = module2.exports = stringify2;
|
|
@@ -4438,50 +4444,50 @@
|
|
|
4438
4444
|
};
|
|
4439
4445
|
}
|
|
4440
4446
|
})(stringify, stringify.exports);
|
|
4441
|
-
const l = z
|
|
4442
|
-
type: z
|
|
4443
|
-
name: z
|
|
4444
|
-
message: z
|
|
4447
|
+
const l = z.object({
|
|
4448
|
+
type: z.literal("PlError"),
|
|
4449
|
+
name: z.string(),
|
|
4450
|
+
message: z.string(),
|
|
4445
4451
|
/** The message with all details needed for SDK developers. */
|
|
4446
|
-
fullMessage: z
|
|
4447
|
-
stack: z
|
|
4452
|
+
fullMessage: z.string().optional(),
|
|
4453
|
+
stack: z.string().optional()
|
|
4448
4454
|
}), c = l.extend({
|
|
4449
|
-
cause: z
|
|
4450
|
-
errors: z
|
|
4451
|
-
}), m$1 = z
|
|
4452
|
-
type: z
|
|
4453
|
-
name: z
|
|
4454
|
-
message: z
|
|
4455
|
-
stack: z
|
|
4455
|
+
cause: z.lazy(() => s).optional(),
|
|
4456
|
+
errors: z.lazy(() => s.array()).optional()
|
|
4457
|
+
}), m$1 = z.object({
|
|
4458
|
+
type: z.literal("StandardError"),
|
|
4459
|
+
name: z.string(),
|
|
4460
|
+
message: z.string(),
|
|
4461
|
+
stack: z.string().optional()
|
|
4456
4462
|
}), p = m$1.extend({
|
|
4457
|
-
cause: z
|
|
4458
|
-
errors: z
|
|
4459
|
-
}), s = z
|
|
4460
|
-
const u = z
|
|
4461
|
-
name: z
|
|
4462
|
-
message: z
|
|
4463
|
-
fullMessage: z
|
|
4464
|
-
stack: z
|
|
4463
|
+
cause: z.lazy(() => s).optional(),
|
|
4464
|
+
errors: z.lazy(() => s.array()).optional()
|
|
4465
|
+
}), s = z.union([p, c]);
|
|
4466
|
+
const u = z.object({
|
|
4467
|
+
name: z.string(),
|
|
4468
|
+
message: z.string(),
|
|
4469
|
+
fullMessage: z.string().optional(),
|
|
4470
|
+
stack: z.string().optional()
|
|
4465
4471
|
}), n = u.extend({
|
|
4466
|
-
cause: z
|
|
4467
|
-
errors: z
|
|
4472
|
+
cause: z.lazy(() => n).optional(),
|
|
4473
|
+
errors: z.lazy(() => n.array()).optional()
|
|
4468
4474
|
});
|
|
4469
|
-
var
|
|
4470
|
-
var
|
|
4471
|
-
var L = (t, e, n2) =>
|
|
4475
|
+
var Ue = Object.defineProperty;
|
|
4476
|
+
var Me = (t, e, n2) => e in t ? Ue(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4477
|
+
var L = (t, e, n2) => Me(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4472
4478
|
function Z(t) {
|
|
4473
4479
|
return { type: "Immediate", value: t };
|
|
4474
4480
|
}
|
|
4475
|
-
function
|
|
4481
|
+
function it() {
|
|
4476
4482
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4477
4483
|
}
|
|
4478
|
-
function
|
|
4484
|
+
function Te(t) {
|
|
4479
4485
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4480
4486
|
return globalThis.getPlatforma(t);
|
|
4481
4487
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4482
4488
|
throw new Error("Can't get platforma instance.");
|
|
4483
4489
|
}
|
|
4484
|
-
function
|
|
4490
|
+
function st() {
|
|
4485
4491
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4486
4492
|
}
|
|
4487
4493
|
function m() {
|
|
@@ -4489,31 +4495,31 @@
|
|
|
4489
4495
|
throw new Error("Not in config rendering context");
|
|
4490
4496
|
}
|
|
4491
4497
|
function Y(t, e) {
|
|
4492
|
-
const n2 =
|
|
4498
|
+
const n2 = st();
|
|
4493
4499
|
if (n2 === void 0) return false;
|
|
4494
4500
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4495
4501
|
return n2.callbackRegistry[t] = e, true;
|
|
4496
4502
|
}
|
|
4497
4503
|
const ae = /* @__PURE__ */ new Map();
|
|
4498
|
-
function
|
|
4504
|
+
function ot(t, e) {
|
|
4499
4505
|
t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
|
|
4500
4506
|
for (const r of ae.get(t))
|
|
4501
4507
|
r(n2);
|
|
4502
4508
|
}, ae.set(t, [])), ae.get(t).push(e);
|
|
4503
4509
|
}
|
|
4504
|
-
class
|
|
4510
|
+
class S {
|
|
4505
4511
|
constructor(e, n2 = (r) => r) {
|
|
4506
4512
|
L(this, "isResolved", false);
|
|
4507
4513
|
L(this, "resolvedValue");
|
|
4508
|
-
this.handle = e, this.postProcess = n2,
|
|
4514
|
+
this.handle = e, this.postProcess = n2, ot(e, (r) => {
|
|
4509
4515
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4510
4516
|
});
|
|
4511
4517
|
}
|
|
4512
4518
|
map(e) {
|
|
4513
|
-
return new
|
|
4519
|
+
return new S(this.handle, (n2) => e(this.postProcess(n2)));
|
|
4514
4520
|
}
|
|
4515
4521
|
mapDefined(e) {
|
|
4516
|
-
return new
|
|
4522
|
+
return new S(this.handle, (n2) => {
|
|
4517
4523
|
const r = this.postProcess(n2);
|
|
4518
4524
|
return r ? e(r) : void 0;
|
|
4519
4525
|
});
|
|
@@ -4525,7 +4531,7 @@
|
|
|
4525
4531
|
function pe(t, e) {
|
|
4526
4532
|
return t === void 0 ? void 0 : e(t);
|
|
4527
4533
|
}
|
|
4528
|
-
class
|
|
4534
|
+
class I {
|
|
4529
4535
|
constructor(e, n2) {
|
|
4530
4536
|
this.handle = e, this.resolvePath = n2;
|
|
4531
4537
|
}
|
|
@@ -4566,7 +4572,7 @@
|
|
|
4566
4572
|
];
|
|
4567
4573
|
return pe(
|
|
4568
4574
|
m().resolveWithCommon(this.handle, e, ...n2),
|
|
4569
|
-
(i) => new
|
|
4575
|
+
(i) => new I(i, r)
|
|
4570
4576
|
);
|
|
4571
4577
|
}
|
|
4572
4578
|
get resourceType() {
|
|
@@ -4588,7 +4594,7 @@
|
|
|
4588
4594
|
const e = [...this.resolvePath, "error"];
|
|
4589
4595
|
return pe(
|
|
4590
4596
|
m().getError(this.handle),
|
|
4591
|
-
(n2) => new
|
|
4597
|
+
(n2) => new I(n2, e)
|
|
4592
4598
|
);
|
|
4593
4599
|
}
|
|
4594
4600
|
listInputFields() {
|
|
@@ -4628,7 +4634,7 @@
|
|
|
4628
4634
|
getPColumns(e = false, n2 = "") {
|
|
4629
4635
|
const r = this.parsePObjectCollection(e, n2);
|
|
4630
4636
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
|
|
4631
|
-
if (!
|
|
4637
|
+
if (!q(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4632
4638
|
return s2;
|
|
4633
4639
|
});
|
|
4634
4640
|
}
|
|
@@ -4646,18 +4652,18 @@
|
|
|
4646
4652
|
const i = {};
|
|
4647
4653
|
for (const [s2, o] of Object.entries(r)) {
|
|
4648
4654
|
const a = [...this.resolvePath, s2];
|
|
4649
|
-
i[s2] =
|
|
4655
|
+
i[s2] = Fn(o, (l2) => new I(l2, a));
|
|
4650
4656
|
}
|
|
4651
4657
|
return i;
|
|
4652
4658
|
}
|
|
4653
4659
|
getFileContentAsBase64() {
|
|
4654
|
-
return new
|
|
4660
|
+
return new S(m().getBlobContentAsBase64(this.handle));
|
|
4655
4661
|
}
|
|
4656
4662
|
getFileContentAsString() {
|
|
4657
|
-
return new
|
|
4663
|
+
return new S(m().getBlobContentAsString(this.handle));
|
|
4658
4664
|
}
|
|
4659
4665
|
getFileContentAsJson() {
|
|
4660
|
-
return new
|
|
4666
|
+
return new S(
|
|
4661
4667
|
m().getBlobContentAsString(this.handle)
|
|
4662
4668
|
).mapDefined((e) => JSON.parse(e));
|
|
4663
4669
|
}
|
|
@@ -4677,7 +4683,7 @@
|
|
|
4677
4683
|
* @returns downloaded file handle
|
|
4678
4684
|
*/
|
|
4679
4685
|
getFileHandle() {
|
|
4680
|
-
return new
|
|
4686
|
+
return new S(m().getDownloadedBlobContentHandle(this.handle));
|
|
4681
4687
|
}
|
|
4682
4688
|
/**
|
|
4683
4689
|
* @deprecated use getFileHandle
|
|
@@ -4689,7 +4695,7 @@
|
|
|
4689
4695
|
* @returns downloaded file handle
|
|
4690
4696
|
*/
|
|
4691
4697
|
getRemoteFileHandle() {
|
|
4692
|
-
return new
|
|
4698
|
+
return new S(m().getOnDemandBlobContentHandle(this.handle));
|
|
4693
4699
|
}
|
|
4694
4700
|
/**
|
|
4695
4701
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4701,22 +4707,22 @@
|
|
|
4701
4707
|
* @returns the url to the extracted folder
|
|
4702
4708
|
*/
|
|
4703
4709
|
extractArchiveAndGetURL(e) {
|
|
4704
|
-
return new
|
|
4710
|
+
return new S(m().extractArchiveAndGetURL(this.handle, e));
|
|
4705
4711
|
}
|
|
4706
4712
|
getImportProgress() {
|
|
4707
|
-
return new
|
|
4713
|
+
return new S(m().getImportProgress(this.handle));
|
|
4708
4714
|
}
|
|
4709
4715
|
getLastLogs(e) {
|
|
4710
|
-
return new
|
|
4716
|
+
return new S(m().getLastLogs(this.handle, e));
|
|
4711
4717
|
}
|
|
4712
4718
|
getProgressLog(e) {
|
|
4713
|
-
return new
|
|
4719
|
+
return new S(m().getProgressLog(this.handle, e));
|
|
4714
4720
|
}
|
|
4715
4721
|
getProgressLogWithInfo(e) {
|
|
4716
|
-
return new
|
|
4722
|
+
return new S(m().getProgressLogWithInfo(this.handle, e));
|
|
4717
4723
|
}
|
|
4718
4724
|
getLogHandle() {
|
|
4719
|
-
return new
|
|
4725
|
+
return new S(m().getLogHandle(this.handle));
|
|
4720
4726
|
}
|
|
4721
4727
|
allFieldsResolved(e = "Input") {
|
|
4722
4728
|
switch (e) {
|
|
@@ -4742,89 +4748,89 @@
|
|
|
4742
4748
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4743
4749
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4744
4750
|
);
|
|
4745
|
-
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2,
|
|
4751
|
+
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, w2]) => o(u2, w2));
|
|
4746
4752
|
}
|
|
4747
4753
|
}
|
|
4748
|
-
const
|
|
4749
|
-
const
|
|
4750
|
-
type: z
|
|
4751
|
-
importance: z
|
|
4752
|
-
id: z
|
|
4753
|
-
label: z
|
|
4754
|
-
}),
|
|
4755
|
-
function
|
|
4756
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((
|
|
4757
|
-
var
|
|
4758
|
-
const
|
|
4759
|
-
let
|
|
4760
|
-
"spec" in
|
|
4761
|
-
const
|
|
4762
|
-
...
|
|
4763
|
-
...
|
|
4764
|
-
...
|
|
4754
|
+
const Ee = "staging", Fe = "main";
|
|
4755
|
+
const ut = "pl7.app/label", ct = "pl7.app/trace", pt = z.object({
|
|
4756
|
+
type: z.string(),
|
|
4757
|
+
importance: z.number().optional(),
|
|
4758
|
+
id: z.string().optional(),
|
|
4759
|
+
label: z.string()
|
|
4760
|
+
}), dt = z.array(pt), ft = 1e-3, ht = "__LABEL__", Ae = "__LABEL__@1";
|
|
4761
|
+
function Oe(t, e, n2 = {}) {
|
|
4762
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((d) => {
|
|
4763
|
+
var q2, F;
|
|
4764
|
+
const h = e(d);
|
|
4765
|
+
let f2, x2, c2;
|
|
4766
|
+
"spec" in h && typeof h.spec == "object" ? (f2 = h.spec, x2 = h.prefixTrace, c2 = h.suffixTrace) : f2 = h;
|
|
4767
|
+
const y = (q2 = f2.annotations) == null ? void 0 : q2[ut], g = (F = f2.annotations) == null ? void 0 : F[ct], v = (g ? dt.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
|
|
4768
|
+
...x2 ?? [],
|
|
4769
|
+
...v,
|
|
4770
|
+
...c2 ?? []
|
|
4765
4771
|
];
|
|
4766
|
-
if (
|
|
4767
|
-
const
|
|
4768
|
-
n2.addLabelAsSuffix ?
|
|
4772
|
+
if (y) {
|
|
4773
|
+
const _ = { label: y, type: ht, importance: -2 };
|
|
4774
|
+
n2.addLabelAsSuffix ? A2.push(_) : A2.splice(0, 0, _);
|
|
4769
4775
|
}
|
|
4770
|
-
const
|
|
4771
|
-
for (let
|
|
4772
|
-
const { type: R } =
|
|
4776
|
+
const D = [], $2 = /* @__PURE__ */ new Map();
|
|
4777
|
+
for (let _ = A2.length - 1; _ >= 0; --_) {
|
|
4778
|
+
const { type: R } = A2[_], se = A2[_].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
|
|
4773
4779
|
$2.set(R, J);
|
|
4774
|
-
const
|
|
4775
|
-
i.set(
|
|
4776
|
-
|
|
4780
|
+
const P = `${R}@${J}`;
|
|
4781
|
+
i.set(P, (i.get(P) ?? 0) + 1), r.set(
|
|
4782
|
+
P,
|
|
4777
4783
|
Math.max(
|
|
4778
|
-
r.get(
|
|
4779
|
-
se - (
|
|
4784
|
+
r.get(P) ?? Number.NEGATIVE_INFINITY,
|
|
4785
|
+
se - (A2.length - _) * ft
|
|
4780
4786
|
)
|
|
4781
|
-
),
|
|
4787
|
+
), D.push({ ...A2[_], fullType: P, occurenceIndex: J });
|
|
4782
4788
|
}
|
|
4783
|
-
return
|
|
4784
|
-
value:
|
|
4785
|
-
spec:
|
|
4786
|
-
label:
|
|
4787
|
-
fullTrace:
|
|
4789
|
+
return D.reverse(), {
|
|
4790
|
+
value: d,
|
|
4791
|
+
spec: f2,
|
|
4792
|
+
label: y,
|
|
4793
|
+
fullTrace: D
|
|
4788
4794
|
};
|
|
4789
4795
|
}), o = [], a = [], l2 = [...r];
|
|
4790
|
-
l2.sort(([,
|
|
4791
|
-
for (const [
|
|
4792
|
-
|
|
4793
|
-
const u2 = (
|
|
4794
|
-
const
|
|
4795
|
-
for (let
|
|
4796
|
-
const
|
|
4797
|
-
if (
|
|
4796
|
+
l2.sort(([, d], [, h]) => h - d);
|
|
4797
|
+
for (const [d] of l2)
|
|
4798
|
+
d.endsWith("@1") || i.get(d) === t.length ? o.push(d) : a.push(d);
|
|
4799
|
+
const u2 = (d) => {
|
|
4800
|
+
const h = [];
|
|
4801
|
+
for (let f2 = 0; f2 < s2.length; f2++) {
|
|
4802
|
+
const x2 = s2[f2], c2 = x2.fullTrace.filter((v) => d.has(v.fullType));
|
|
4803
|
+
if (c2.length === 0)
|
|
4798
4804
|
return;
|
|
4799
|
-
const
|
|
4800
|
-
|
|
4801
|
-
label:
|
|
4802
|
-
value:
|
|
4805
|
+
const y = c2.map((v) => v.label), g = n2.separator ?? " / ";
|
|
4806
|
+
h.push({
|
|
4807
|
+
label: y.join(g),
|
|
4808
|
+
value: x2.value
|
|
4803
4809
|
});
|
|
4804
4810
|
}
|
|
4805
|
-
return
|
|
4811
|
+
return h;
|
|
4806
4812
|
};
|
|
4807
4813
|
if (o.length === 0) {
|
|
4808
4814
|
if (a.length !== 0) throw new Error("Assertion error.");
|
|
4809
|
-
const
|
|
4810
|
-
if (
|
|
4811
|
-
return
|
|
4812
|
-
}
|
|
4813
|
-
let
|
|
4814
|
-
for (;
|
|
4815
|
-
const
|
|
4816
|
-
n2.includeNativeLabel &&
|
|
4817
|
-
for (let
|
|
4818
|
-
|
|
4819
|
-
const
|
|
4820
|
-
if (
|
|
4821
|
-
|
|
4822
|
-
}
|
|
4823
|
-
const
|
|
4824
|
-
if (
|
|
4825
|
-
return
|
|
4815
|
+
const d = u2(new Set(Ae));
|
|
4816
|
+
if (d === void 0) throw new Error("Assertion error.");
|
|
4817
|
+
return d;
|
|
4818
|
+
}
|
|
4819
|
+
let w2 = 0, b = 0;
|
|
4820
|
+
for (; w2 < o.length; ) {
|
|
4821
|
+
const d = /* @__PURE__ */ new Set();
|
|
4822
|
+
n2.includeNativeLabel && d.add(Ae);
|
|
4823
|
+
for (let f2 = 0; f2 < w2; ++f2) d.add(o[f2]);
|
|
4824
|
+
d.add(o[b]);
|
|
4825
|
+
const h = u2(d);
|
|
4826
|
+
if (h !== void 0 && new Set(h.map((f2) => f2.label)).size === t.length) return h;
|
|
4827
|
+
b++, b >= o.length && (w2++, b = w2);
|
|
4828
|
+
}
|
|
4829
|
+
const p2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
|
|
4830
|
+
if (p2 === void 0) throw new Error("Assertion error.");
|
|
4831
|
+
return p2;
|
|
4826
4832
|
}
|
|
4827
|
-
const H = "PColumnData/",
|
|
4833
|
+
const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", B = H + "JsonPartitioned", K = H + "BinaryPartitioned", Re = H + "Partitioned/", ie = Re + "JsonPartitioned", U = Re + "BinaryPartitioned";
|
|
4828
4834
|
const fe = (t) => {
|
|
4829
4835
|
if (t.endsWith(".index"))
|
|
4830
4836
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
@@ -4832,44 +4838,44 @@
|
|
|
4832
4838
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4833
4839
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4834
4840
|
};
|
|
4835
|
-
function
|
|
4841
|
+
function gt(t) {
|
|
4836
4842
|
if (!t) return;
|
|
4837
4843
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4838
4844
|
let i = 0;
|
|
4839
4845
|
switch (e) {
|
|
4840
|
-
case
|
|
4846
|
+
case ne:
|
|
4841
4847
|
i = n2.keyLength;
|
|
4842
4848
|
break;
|
|
4843
|
-
case
|
|
4849
|
+
case re:
|
|
4844
4850
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4845
4851
|
break;
|
|
4846
|
-
case
|
|
4847
|
-
case
|
|
4852
|
+
case B:
|
|
4853
|
+
case K:
|
|
4848
4854
|
i = n2.partitionKeyLength;
|
|
4849
4855
|
break;
|
|
4850
|
-
case
|
|
4851
|
-
case
|
|
4856
|
+
case U:
|
|
4857
|
+
case ie:
|
|
4852
4858
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4853
4859
|
break;
|
|
4854
4860
|
}
|
|
4855
4861
|
switch (e) {
|
|
4856
|
-
case
|
|
4857
|
-
case
|
|
4858
|
-
case
|
|
4862
|
+
case ne:
|
|
4863
|
+
case B:
|
|
4864
|
+
case K:
|
|
4859
4865
|
for (let s2 of t.listInputFields()) {
|
|
4860
|
-
e ===
|
|
4866
|
+
e === K && (s2 = fe(s2).baseKey);
|
|
4861
4867
|
const o = [...JSON.parse(s2)];
|
|
4862
4868
|
r.push(o);
|
|
4863
4869
|
}
|
|
4864
4870
|
break;
|
|
4865
|
-
case ne:
|
|
4866
|
-
case B:
|
|
4867
4871
|
case re:
|
|
4872
|
+
case U:
|
|
4873
|
+
case ie:
|
|
4868
4874
|
for (const s2 of t.listInputFields()) {
|
|
4869
4875
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4870
4876
|
if (a !== void 0)
|
|
4871
4877
|
for (let l2 of a.listInputFields()) {
|
|
4872
|
-
e ===
|
|
4878
|
+
e === U && (l2 = fe(l2).baseKey);
|
|
4873
4879
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4874
4880
|
r.push(u2);
|
|
4875
4881
|
}
|
|
@@ -4878,7 +4884,7 @@
|
|
|
4878
4884
|
}
|
|
4879
4885
|
return { data: r, keyLength: i };
|
|
4880
4886
|
}
|
|
4881
|
-
function
|
|
4887
|
+
function mt(t) {
|
|
4882
4888
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4883
4889
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4884
4890
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4897,11 +4903,11 @@
|
|
|
4897
4903
|
}
|
|
4898
4904
|
return r.map((i) => Array.from(i.values()));
|
|
4899
4905
|
}
|
|
4900
|
-
function
|
|
4906
|
+
function yt(t) {
|
|
4901
4907
|
if (t === void 0) return;
|
|
4902
4908
|
if (j(t))
|
|
4903
|
-
return
|
|
4904
|
-
const e =
|
|
4909
|
+
return mt(t);
|
|
4910
|
+
const e = gt(t);
|
|
4905
4911
|
if (!e) return;
|
|
4906
4912
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4907
4913
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4917,13 +4923,13 @@
|
|
|
4917
4923
|
function he(t, e = []) {
|
|
4918
4924
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4919
4925
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4920
|
-
if (e.length > 0 && (n2 ===
|
|
4926
|
+
if (e.length > 0 && (n2 === ie || n2 === U))
|
|
4921
4927
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4922
4928
|
switch (n2) {
|
|
4923
|
-
case te:
|
|
4924
4929
|
case ne:
|
|
4930
|
+
case re:
|
|
4925
4931
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4926
|
-
case
|
|
4932
|
+
case B: {
|
|
4927
4933
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4928
4934
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4929
4935
|
const i = [];
|
|
@@ -4939,7 +4945,7 @@
|
|
|
4939
4945
|
parts: i
|
|
4940
4946
|
};
|
|
4941
4947
|
}
|
|
4942
|
-
case
|
|
4948
|
+
case K: {
|
|
4943
4949
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4944
4950
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4945
4951
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
@@ -4966,15 +4972,15 @@
|
|
|
4966
4972
|
parts: i
|
|
4967
4973
|
};
|
|
4968
4974
|
}
|
|
4969
|
-
case
|
|
4975
|
+
case ie: {
|
|
4970
4976
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4971
4977
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
4972
4978
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
4973
4979
|
for (const o of t.listInputFields()) {
|
|
4974
4980
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4975
4981
|
if (a === void 0) return;
|
|
4976
|
-
if (a.resourceType.name !==
|
|
4977
|
-
throw new Error(`Expected ${
|
|
4982
|
+
if (a.resourceType.name !== B)
|
|
4983
|
+
throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
|
|
4978
4984
|
const l2 = he(a, JSON.parse(o));
|
|
4979
4985
|
if (l2 === void 0) return;
|
|
4980
4986
|
if (l2.type !== "JsonPartitioned")
|
|
@@ -4987,15 +4993,15 @@
|
|
|
4987
4993
|
parts: s2
|
|
4988
4994
|
};
|
|
4989
4995
|
}
|
|
4990
|
-
case
|
|
4996
|
+
case U: {
|
|
4991
4997
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4992
4998
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
4993
4999
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
4994
5000
|
for (const o of t.listInputFields()) {
|
|
4995
5001
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4996
5002
|
if (a === void 0) return;
|
|
4997
|
-
if (a.resourceType.name !==
|
|
4998
|
-
throw new Error(`Expected ${
|
|
5003
|
+
if (a.resourceType.name !== K)
|
|
5004
|
+
throw new Error(`Expected ${K} inside ${n2}, but got ${a.resourceType.name}`);
|
|
4999
5005
|
const l2 = he(a, JSON.parse(o));
|
|
5000
5006
|
if (l2 === void 0) return;
|
|
5001
5007
|
if (l2.type !== "BinaryPartitioned")
|
|
@@ -5012,15 +5018,15 @@
|
|
|
5012
5018
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5013
5019
|
}
|
|
5014
5020
|
}
|
|
5015
|
-
function
|
|
5021
|
+
function vt(t) {
|
|
5016
5022
|
if (t !== void 0) {
|
|
5017
5023
|
if (j(t)) return t;
|
|
5018
|
-
if (
|
|
5019
|
-
if (t instanceof
|
|
5024
|
+
if (mn(t)) return hn(t);
|
|
5025
|
+
if (t instanceof I) return he(t);
|
|
5020
5026
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5021
5027
|
}
|
|
5022
5028
|
}
|
|
5023
|
-
function
|
|
5029
|
+
function bt(t, e) {
|
|
5024
5030
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5025
5031
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5026
5032
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5080,39 +5086,39 @@
|
|
|
5080
5086
|
}
|
|
5081
5087
|
}
|
|
5082
5088
|
}
|
|
5083
|
-
class
|
|
5089
|
+
class wt {
|
|
5084
5090
|
constructor(e) {
|
|
5085
5091
|
this.columns = e;
|
|
5086
5092
|
}
|
|
5087
5093
|
selectColumns(e) {
|
|
5088
|
-
const n2 = typeof e == "function" ? e :
|
|
5094
|
+
const n2 = typeof e == "function" ? e : Kn(e);
|
|
5089
5095
|
return this.columns.filter((r) => n2(r.spec));
|
|
5090
5096
|
}
|
|
5091
5097
|
}
|
|
5092
|
-
function
|
|
5098
|
+
function At(t) {
|
|
5093
5099
|
if (t)
|
|
5094
5100
|
return t.map((e) => ({
|
|
5095
|
-
type: `split:${
|
|
5101
|
+
type: `split:${Jn(e.axisId)}`,
|
|
5096
5102
|
label: e.label,
|
|
5097
5103
|
importance: 1e6
|
|
5098
5104
|
// High importance for split filters in labels
|
|
5099
5105
|
}));
|
|
5100
5106
|
}
|
|
5101
|
-
function
|
|
5107
|
+
function Pt(t) {
|
|
5102
5108
|
if (t)
|
|
5103
5109
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5104
5110
|
}
|
|
5105
|
-
function
|
|
5111
|
+
function xt(t, e) {
|
|
5106
5112
|
if (!e || e.length === 0) return t;
|
|
5107
5113
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5108
|
-
return
|
|
5114
|
+
return _e({ id: t, axisFilters: n2 });
|
|
5109
5115
|
}
|
|
5110
|
-
function
|
|
5116
|
+
function Ct(t) {
|
|
5111
5117
|
if (!t || typeof t != "object") return false;
|
|
5112
5118
|
const e = t, n2 = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
5113
5119
|
return !!e.domainAnchor || n2 || r;
|
|
5114
5120
|
}
|
|
5115
|
-
function
|
|
5121
|
+
function St(t) {
|
|
5116
5122
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5117
5123
|
return [];
|
|
5118
5124
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5120,10 +5126,10 @@
|
|
|
5120
5126
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
5121
5127
|
return e.sort((n2, r) => n2 - r), e;
|
|
5122
5128
|
}
|
|
5123
|
-
class
|
|
5129
|
+
class ge {
|
|
5124
5130
|
constructor() {
|
|
5125
5131
|
L(this, "defaultProviderStore", []);
|
|
5126
|
-
L(this, "providers", [new
|
|
5132
|
+
L(this, "providers", [new wt(this.defaultProviderStore)]);
|
|
5127
5133
|
L(this, "axisLabelProviders", []);
|
|
5128
5134
|
}
|
|
5129
5135
|
addColumnProvider(e) {
|
|
@@ -5150,73 +5156,73 @@
|
|
|
5150
5156
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
|
|
5151
5157
|
...i ?? {}
|
|
5152
5158
|
}, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
|
|
5153
|
-
for (const
|
|
5154
|
-
const
|
|
5155
|
-
let
|
|
5156
|
-
if (
|
|
5159
|
+
for (const p2 of l2) {
|
|
5160
|
+
const d = Ct(p2);
|
|
5161
|
+
let h;
|
|
5162
|
+
if (d) {
|
|
5157
5163
|
if (!r)
|
|
5158
5164
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5159
|
-
|
|
5165
|
+
h = Dn(r.anchors, p2, n2);
|
|
5160
5166
|
} else
|
|
5161
|
-
|
|
5162
|
-
const
|
|
5167
|
+
h = p2;
|
|
5168
|
+
const f$1 = /* @__PURE__ */ new Set(), x2 = [];
|
|
5163
5169
|
for (const g of this.providers) {
|
|
5164
|
-
const
|
|
5165
|
-
for (const
|
|
5166
|
-
if (
|
|
5167
|
-
|
|
5170
|
+
const v = g.selectColumns(h);
|
|
5171
|
+
for (const A2 of v) {
|
|
5172
|
+
if (f$1.has(A2.id)) throw new Error(`Duplicate column id ${A2.id} in provider ${g.constructor.name}`);
|
|
5173
|
+
f$1.add(A2.id), x2.push(A2);
|
|
5168
5174
|
}
|
|
5169
5175
|
}
|
|
5170
|
-
if (
|
|
5171
|
-
const
|
|
5172
|
-
for (const g of
|
|
5176
|
+
if (x2.length === 0) continue;
|
|
5177
|
+
const c2 = St(p2), y = c2.length > 0;
|
|
5178
|
+
for (const g of x2) {
|
|
5173
5179
|
if (!f(g.spec)) continue;
|
|
5174
|
-
const
|
|
5175
|
-
if (
|
|
5176
|
-
const
|
|
5177
|
-
if (!
|
|
5180
|
+
const v = g.spec;
|
|
5181
|
+
if (y) {
|
|
5182
|
+
const A2 = vt(g.data);
|
|
5183
|
+
if (!A2) {
|
|
5178
5184
|
if (s2) continue;
|
|
5179
5185
|
return;
|
|
5180
5186
|
}
|
|
5181
|
-
if (!
|
|
5182
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
5183
|
-
const
|
|
5184
|
-
if ($2 >=
|
|
5185
|
-
throw new Error(`Not enough partition keys (${
|
|
5186
|
-
const
|
|
5187
|
-
if (N2 >=
|
|
5188
|
-
if (F.push([...
|
|
5187
|
+
if (!ln(A2))
|
|
5188
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${g.id}`);
|
|
5189
|
+
const D = yt(A2), $2 = c2[c2.length - 1];
|
|
5190
|
+
if ($2 >= A2.partitionKeyLength)
|
|
5191
|
+
throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${v.name}`);
|
|
5192
|
+
const q2 = c2.map((P) => this.findLabels(p$1(v.axesSpec[P]))), F = [], _ = (P, N2) => {
|
|
5193
|
+
if (N2 >= c2.length) {
|
|
5194
|
+
if (F.push([...P]), F.length > 1e4)
|
|
5189
5195
|
throw new Error("Too many key combinations, aborting.");
|
|
5190
5196
|
return;
|
|
5191
5197
|
}
|
|
5192
|
-
const
|
|
5193
|
-
if (
|
|
5194
|
-
throw new Error(`Axis index ${
|
|
5195
|
-
const
|
|
5196
|
-
if (!
|
|
5198
|
+
const O = c2[N2];
|
|
5199
|
+
if (O >= D.length)
|
|
5200
|
+
throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D.length}) during split key generation for column ${g.id}`);
|
|
5201
|
+
const k2 = D[O];
|
|
5202
|
+
if (!k2 || k2.length === 0) {
|
|
5197
5203
|
F.length = 0;
|
|
5198
5204
|
return;
|
|
5199
5205
|
}
|
|
5200
|
-
for (const z2 of
|
|
5201
|
-
|
|
5206
|
+
for (const z2 of k2)
|
|
5207
|
+
P.push(z2), _(P, N2 + 1), P.pop();
|
|
5202
5208
|
};
|
|
5203
|
-
if (
|
|
5209
|
+
if (_([], 0), F.length === 0)
|
|
5204
5210
|
continue;
|
|
5205
|
-
const R = [...
|
|
5206
|
-
for (let
|
|
5207
|
-
R.splice(
|
|
5208
|
-
const J = { ...
|
|
5209
|
-
for (const
|
|
5210
|
-
const N2 =
|
|
5211
|
-
const z2 = se[
|
|
5212
|
-
return { axisIdx: z2, axisId:
|
|
5211
|
+
const R = [...v.axesSpec], se = c2.map((P) => P);
|
|
5212
|
+
for (let P = c2.length - 1; P >= 0; P--)
|
|
5213
|
+
R.splice(c2[P], 1);
|
|
5214
|
+
const J = { ...v, axesSpec: R };
|
|
5215
|
+
for (const P of F) {
|
|
5216
|
+
const N2 = P.map((O, k2) => {
|
|
5217
|
+
const z2 = se[k2], Ne = p$1(v.axesSpec[z2]), oe = q2[k2], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
|
|
5218
|
+
return { axisIdx: z2, axisId: Ne, value: O, label: Be };
|
|
5213
5219
|
});
|
|
5214
5220
|
u2.push({
|
|
5215
5221
|
type: "split",
|
|
5216
5222
|
originalColumn: g,
|
|
5217
|
-
spec:
|
|
5223
|
+
spec: v,
|
|
5218
5224
|
adjustedSpec: J,
|
|
5219
|
-
dataEntries:
|
|
5225
|
+
dataEntries: A2,
|
|
5220
5226
|
axisFilters: N2
|
|
5221
5227
|
});
|
|
5222
5228
|
}
|
|
@@ -5224,39 +5230,39 @@
|
|
|
5224
5230
|
u2.push({
|
|
5225
5231
|
type: "direct",
|
|
5226
5232
|
originalColumn: g,
|
|
5227
|
-
spec:
|
|
5228
|
-
adjustedSpec:
|
|
5233
|
+
spec: v,
|
|
5234
|
+
adjustedSpec: v
|
|
5229
5235
|
});
|
|
5230
5236
|
}
|
|
5231
5237
|
}
|
|
5232
5238
|
if (u2.length === 0) return [];
|
|
5233
|
-
const
|
|
5239
|
+
const w2 = Oe(
|
|
5234
5240
|
u2,
|
|
5235
|
-
(
|
|
5236
|
-
spec:
|
|
5237
|
-
suffixTrace:
|
|
5241
|
+
(p2) => ({
|
|
5242
|
+
spec: p2.spec,
|
|
5243
|
+
suffixTrace: p2.type === "split" ? At(p2.axisFilters) : void 0
|
|
5238
5244
|
}),
|
|
5239
5245
|
a
|
|
5240
|
-
),
|
|
5241
|
-
for (const { value:
|
|
5242
|
-
const { originalColumn:
|
|
5243
|
-
let
|
|
5244
|
-
r ?
|
|
5245
|
-
let g = { ...
|
|
5246
|
+
), b = [];
|
|
5247
|
+
for (const { value: p2, label: d } of w2) {
|
|
5248
|
+
const { originalColumn: h, spec: f2 } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, c2 = Pt(x2);
|
|
5249
|
+
let y;
|
|
5250
|
+
r ? y = r.deriveS(f2, c2) : y = xt(h.id, c2);
|
|
5251
|
+
let g = { ...p2.adjustedSpec };
|
|
5246
5252
|
o && (g = {
|
|
5247
5253
|
...g,
|
|
5248
5254
|
annotations: {
|
|
5249
5255
|
...g.annotations ?? {},
|
|
5250
|
-
"pl7.app/label":
|
|
5256
|
+
"pl7.app/label": d
|
|
5251
5257
|
}
|
|
5252
|
-
}),
|
|
5253
|
-
id:
|
|
5258
|
+
}), b.push({
|
|
5259
|
+
id: y,
|
|
5254
5260
|
spec: g,
|
|
5255
|
-
data: () =>
|
|
5256
|
-
label:
|
|
5261
|
+
data: () => p2.type === "split" ? gn(bt(p2.dataEntries, c2)) : p2.originalColumn.data,
|
|
5262
|
+
label: d
|
|
5257
5263
|
});
|
|
5258
5264
|
}
|
|
5259
|
-
return
|
|
5265
|
+
return b;
|
|
5260
5266
|
}
|
|
5261
5267
|
getColumns(e, n2) {
|
|
5262
5268
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5288,10 +5294,10 @@
|
|
|
5288
5294
|
if (t[n2] !== e[n2]) return false;
|
|
5289
5295
|
return true;
|
|
5290
5296
|
}
|
|
5291
|
-
function
|
|
5292
|
-
return
|
|
5297
|
+
function Pe(t) {
|
|
5298
|
+
return Fn(t, (e) => e instanceof I ? e.handle : mn(e) ? yn(e, (n2) => n2.handle) : e);
|
|
5293
5299
|
}
|
|
5294
|
-
class
|
|
5300
|
+
class It {
|
|
5295
5301
|
constructor() {
|
|
5296
5302
|
L(this, "ctx", m());
|
|
5297
5303
|
}
|
|
@@ -5302,8 +5308,8 @@
|
|
|
5302
5308
|
return this.ctx.calculateOptions(e);
|
|
5303
5309
|
}
|
|
5304
5310
|
getOptions(e, n2) {
|
|
5305
|
-
const r = typeof e == "function" ? e :
|
|
5306
|
-
return typeof n2 == "object" || typeof n2 > "u" ?
|
|
5311
|
+
const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
|
|
5312
|
+
return typeof n2 == "object" || typeof n2 > "u" ? Oe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
|
|
5307
5313
|
ref: s2,
|
|
5308
5314
|
label: o
|
|
5309
5315
|
})) : i.map((s2) => ({
|
|
@@ -5312,17 +5318,17 @@
|
|
|
5312
5318
|
}));
|
|
5313
5319
|
}
|
|
5314
5320
|
resolveAnchorCtx(e) {
|
|
5315
|
-
if (e instanceof
|
|
5321
|
+
if (e instanceof $n) return e;
|
|
5316
5322
|
const n2 = {};
|
|
5317
5323
|
for (const [r, i] of Object.entries(e))
|
|
5318
|
-
if (
|
|
5324
|
+
if (Tn(i)) {
|
|
5319
5325
|
const s2 = this.getPColumnSpecByRef(i);
|
|
5320
5326
|
if (!s2)
|
|
5321
5327
|
return;
|
|
5322
5328
|
n2[r] = s2;
|
|
5323
5329
|
} else
|
|
5324
5330
|
n2[r] = i;
|
|
5325
|
-
return new
|
|
5331
|
+
return new $n(n2);
|
|
5326
5332
|
}
|
|
5327
5333
|
/**
|
|
5328
5334
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5335,7 +5341,7 @@
|
|
|
5335
5341
|
getAnchoredPColumns(e, n2, r) {
|
|
5336
5342
|
const i = this.resolveAnchorCtx(e);
|
|
5337
5343
|
if (i)
|
|
5338
|
-
return new
|
|
5344
|
+
return new ge().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
|
|
5339
5345
|
...r,
|
|
5340
5346
|
anchorCtx: i
|
|
5341
5347
|
});
|
|
@@ -5372,7 +5378,7 @@
|
|
|
5372
5378
|
getCanonicalOptions(e, n2, r) {
|
|
5373
5379
|
const i = this.resolveAnchorCtx(e);
|
|
5374
5380
|
if (!i) return;
|
|
5375
|
-
const s2 = new
|
|
5381
|
+
const s2 = new ge().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
|
|
5376
5382
|
...r,
|
|
5377
5383
|
anchorCtx: i
|
|
5378
5384
|
});
|
|
@@ -5396,7 +5402,7 @@
|
|
|
5396
5402
|
ref: n2.ref,
|
|
5397
5403
|
obj: {
|
|
5398
5404
|
...n2.obj,
|
|
5399
|
-
data: new
|
|
5405
|
+
data: new I(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5400
5406
|
}
|
|
5401
5407
|
}))
|
|
5402
5408
|
};
|
|
@@ -5417,7 +5423,7 @@
|
|
|
5417
5423
|
...n2.obj,
|
|
5418
5424
|
data: _n(
|
|
5419
5425
|
n2.obj.data,
|
|
5420
|
-
(r) => new
|
|
5426
|
+
(r) => new I(r, [n2.ref.blockId, n2.ref.name])
|
|
5421
5427
|
)
|
|
5422
5428
|
}
|
|
5423
5429
|
}))
|
|
@@ -5444,9 +5450,9 @@
|
|
|
5444
5450
|
)) == null ? void 0 : r.obj;
|
|
5445
5451
|
const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5446
5452
|
if (n2)
|
|
5447
|
-
return
|
|
5453
|
+
return Fn(
|
|
5448
5454
|
n2,
|
|
5449
|
-
(i) => new
|
|
5455
|
+
(i) => new I(i, [e.blockId, e.name])
|
|
5450
5456
|
);
|
|
5451
5457
|
}
|
|
5452
5458
|
/**
|
|
@@ -5457,7 +5463,7 @@
|
|
|
5457
5463
|
getPColumnByRef(e) {
|
|
5458
5464
|
const n2 = this.getDataByRef(e);
|
|
5459
5465
|
if (n2)
|
|
5460
|
-
return
|
|
5466
|
+
return jn(n2);
|
|
5461
5467
|
}
|
|
5462
5468
|
/**
|
|
5463
5469
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -5507,7 +5513,7 @@
|
|
|
5507
5513
|
findLabels(e) {
|
|
5508
5514
|
const n2 = this.getData();
|
|
5509
5515
|
for (const r of n2.entries) {
|
|
5510
|
-
if (!
|
|
5516
|
+
if (!q(r.obj)) continue;
|
|
5511
5517
|
const i = r.obj.spec;
|
|
5512
5518
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && le(e.domain, i.axesSpec[0].domain)) {
|
|
5513
5519
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -5528,13 +5534,13 @@
|
|
|
5528
5534
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
5529
5535
|
*/
|
|
5530
5536
|
selectColumns(e) {
|
|
5531
|
-
const n2 = typeof e == "function" ? e :
|
|
5537
|
+
const n2 = typeof e == "function" ? e : Kn(e);
|
|
5532
5538
|
return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5533
5539
|
const o = s2;
|
|
5534
5540
|
let a = null;
|
|
5535
5541
|
const l2 = this;
|
|
5536
5542
|
return {
|
|
5537
|
-
id:
|
|
5543
|
+
id: _e(i),
|
|
5538
5544
|
spec: o,
|
|
5539
5545
|
get data() {
|
|
5540
5546
|
var u2;
|
|
@@ -5565,7 +5571,7 @@
|
|
|
5565
5571
|
L(this, "args");
|
|
5566
5572
|
L(this, "uiState");
|
|
5567
5573
|
L(this, "_activeArgsCache");
|
|
5568
|
-
L(this, "resultPool", new
|
|
5574
|
+
L(this, "resultPool", new It());
|
|
5569
5575
|
this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5570
5576
|
}
|
|
5571
5577
|
/**
|
|
@@ -5584,14 +5590,14 @@
|
|
|
5584
5590
|
getNamedAccessor(e) {
|
|
5585
5591
|
return pe(
|
|
5586
5592
|
this.ctx.getAccessorHandleByName(e),
|
|
5587
|
-
(n2) => new
|
|
5593
|
+
(n2) => new I(n2, [e])
|
|
5588
5594
|
);
|
|
5589
5595
|
}
|
|
5590
5596
|
get prerun() {
|
|
5591
|
-
return this.getNamedAccessor(
|
|
5597
|
+
return this.getNamedAccessor(Ee);
|
|
5592
5598
|
}
|
|
5593
5599
|
get outputs() {
|
|
5594
|
-
return this.getNamedAccessor(
|
|
5600
|
+
return this.getNamedAccessor(Fe);
|
|
5595
5601
|
}
|
|
5596
5602
|
/**
|
|
5597
5603
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5603,13 +5609,13 @@
|
|
|
5603
5609
|
}
|
|
5604
5610
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5605
5611
|
var i;
|
|
5606
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5612
|
+
const n2 = e.some((s2) => !(s2.data instanceof I) || mn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5607
5613
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5608
5614
|
}
|
|
5609
5615
|
// TODO remove all non-PColumn fields
|
|
5610
5616
|
createPFrame(e) {
|
|
5611
5617
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5612
|
-
e.map((n2) =>
|
|
5618
|
+
e.map((n2) => Pe(n2))
|
|
5613
5619
|
);
|
|
5614
5620
|
}
|
|
5615
5621
|
createPTable(e) {
|
|
@@ -5621,8 +5627,8 @@
|
|
|
5621
5627
|
},
|
|
5622
5628
|
filters: e.filters ?? [],
|
|
5623
5629
|
sorting: e.sorting ?? []
|
|
5624
|
-
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
5625
|
-
|
|
5630
|
+
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
|
|
5631
|
+
On(n2, (r) => Pe(r))
|
|
5626
5632
|
);
|
|
5627
5633
|
}
|
|
5628
5634
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5634,13 +5640,13 @@
|
|
|
5634
5640
|
return this.ctx.getCurrentUnstableMarker();
|
|
5635
5641
|
}
|
|
5636
5642
|
}
|
|
5637
|
-
const M = "1.29.
|
|
5638
|
-
function
|
|
5643
|
+
const M = "1.29.13";
|
|
5644
|
+
function _t(t) {
|
|
5639
5645
|
return t.__renderLambda === true;
|
|
5640
5646
|
}
|
|
5641
5647
|
function ue(t) {
|
|
5642
5648
|
if (t !== void 0)
|
|
5643
|
-
return
|
|
5649
|
+
return _t(t) ? t.handle : t;
|
|
5644
5650
|
}
|
|
5645
5651
|
class T {
|
|
5646
5652
|
constructor(e, n2, r, i, s2, o, a) {
|
|
@@ -5812,66 +5818,101 @@
|
|
|
5812
5818
|
Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
|
|
5813
5819
|
)
|
|
5814
5820
|
};
|
|
5815
|
-
return
|
|
5821
|
+
return it() ? Te({ sdkVersion: M }) : { config: e };
|
|
5816
5822
|
}
|
|
5817
5823
|
}
|
|
5818
|
-
function
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5824
|
+
function je(t) {
|
|
5825
|
+
return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5826
|
+
name: "pl7.app/label",
|
|
5827
|
+
axes: [{}]
|
|
5828
|
+
// exactly one axis
|
|
5829
|
+
}, { dontWaitAllData: true });
|
|
5830
|
+
}
|
|
5831
|
+
function Ve(t, e) {
|
|
5832
|
+
const n2 = (i, s2) => {
|
|
5833
|
+
let o = i.toString();
|
|
5834
|
+
if (s2)
|
|
5835
|
+
for (const a in s2)
|
|
5836
|
+
o += a, o += s2[a];
|
|
5837
|
+
return o;
|
|
5838
|
+
}, r = /* @__PURE__ */ new Map();
|
|
5839
|
+
for (const i of t)
|
|
5840
|
+
for (const s2 of i.spec.axesSpec) {
|
|
5841
|
+
const o = p$1(s2);
|
|
5842
|
+
for (const a of e) {
|
|
5843
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(a.spec.axesSpec[0]);
|
|
5844
|
+
if (G(o, u2)) {
|
|
5845
|
+
const w2 = Object.keys(o.domain ?? {}).length, b = Object.keys(u2.domain ?? {}).length;
|
|
5846
|
+
if (w2 > b) {
|
|
5847
|
+
const p2 = n2(a.id, o.domain);
|
|
5848
|
+
r.set(p2, {
|
|
5849
|
+
id: p2,
|
|
5839
5850
|
spec: {
|
|
5840
|
-
...
|
|
5841
|
-
axesSpec: [{ ...
|
|
5851
|
+
...a.spec,
|
|
5852
|
+
axesSpec: [{ ...o, annotations: l2.annotations }]
|
|
5842
5853
|
},
|
|
5843
|
-
data:
|
|
5854
|
+
data: a.data
|
|
5844
5855
|
});
|
|
5845
5856
|
} else
|
|
5846
|
-
|
|
5857
|
+
r.set(n2(a.id), a);
|
|
5847
5858
|
}
|
|
5848
5859
|
}
|
|
5849
5860
|
}
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5861
|
+
return [...r.values()];
|
|
5862
|
+
}
|
|
5863
|
+
function Ke(t) {
|
|
5864
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
|
|
5865
|
+
return t.map((i) => i.data).every((i) => {
|
|
5866
|
+
if (e(i))
|
|
5867
|
+
return true;
|
|
5868
|
+
if (n2(i))
|
|
5869
|
+
return i.getIsReadyOrError();
|
|
5870
|
+
if (r(i))
|
|
5871
|
+
switch (i.type) {
|
|
5872
|
+
case "Json":
|
|
5873
|
+
return true;
|
|
5874
|
+
case "JsonPartitioned":
|
|
5875
|
+
return Object.values(i.parts).every((o) => o.getIsReadyOrError());
|
|
5876
|
+
case "BinaryPartitioned":
|
|
5877
|
+
return Object.values(i.parts).every((o) => o.index.getIsReadyOrError() && o.values.getIsReadyOrError());
|
|
5878
|
+
}
|
|
5879
|
+
else
|
|
5880
|
+
throw Error(`unsupported column data type: ${i}`);
|
|
5881
|
+
});
|
|
5882
|
+
}
|
|
5883
|
+
function $e(t, e, n2, r, i, s2) {
|
|
5884
|
+
let o = t;
|
|
5885
|
+
const a = [];
|
|
5886
|
+
if (s2) {
|
|
5887
|
+
o = [];
|
|
5888
|
+
for (const l2 of t)
|
|
5889
|
+
s2(l2.spec) ? o.push(l2) : a.push(l2);
|
|
5890
|
+
}
|
|
5891
|
+
return a.push(...e), {
|
|
5862
5892
|
src: {
|
|
5863
5893
|
type: "outer",
|
|
5864
5894
|
primary: {
|
|
5865
|
-
type:
|
|
5866
|
-
entries:
|
|
5895
|
+
type: n2,
|
|
5896
|
+
entries: o.map((l2) => ({ type: "column", column: l2 }))
|
|
5867
5897
|
},
|
|
5868
|
-
secondary:
|
|
5898
|
+
secondary: a.map((l2) => ({ type: "column", column: l2 }))
|
|
5869
5899
|
},
|
|
5870
|
-
filters:
|
|
5871
|
-
sorting:
|
|
5872
|
-
}
|
|
5900
|
+
filters: r,
|
|
5901
|
+
sorting: i
|
|
5902
|
+
};
|
|
5903
|
+
}
|
|
5904
|
+
function Cn(t, e, n2, r) {
|
|
5905
|
+
var u2, w2;
|
|
5906
|
+
Array.isArray(r) && (r = { filters: r });
|
|
5907
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((w2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : w2.sorting) ?? [], a = je(t.resultPool);
|
|
5908
|
+
if (!a) return;
|
|
5909
|
+
const l2 = Ve(e.map(Cn$1), a);
|
|
5910
|
+
if (Ke([...e, ...l2]))
|
|
5911
|
+
return t.createPTable(
|
|
5912
|
+
$e(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5913
|
+
);
|
|
5873
5914
|
}
|
|
5874
|
-
const ImportFileHandleSchema = z
|
|
5915
|
+
const ImportFileHandleSchema = z.string().optional().refine(
|
|
5875
5916
|
(_a) => true
|
|
5876
5917
|
);
|
|
5877
5918
|
function* range(from, to, step = 1) {
|
|
@@ -5889,10 +5930,10 @@
|
|
|
5889
5930
|
function times(n2, cb) {
|
|
5890
5931
|
return toList(range(0, n2)).map(cb);
|
|
5891
5932
|
}
|
|
5892
|
-
const $BlockArgs = z
|
|
5893
|
-
tableNumRows: z
|
|
5894
|
-
numbers: z
|
|
5895
|
-
handles: z
|
|
5933
|
+
const $BlockArgs = z.object({
|
|
5934
|
+
tableNumRows: z.number().default(100),
|
|
5935
|
+
numbers: z.array(z.coerce.number()),
|
|
5936
|
+
handles: z.array(ImportFileHandleSchema)
|
|
5896
5937
|
});
|
|
5897
5938
|
const platforma = T.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
|
|
5898
5939
|
if (ctx.args.numbers.length === 5) {
|
|
@@ -5917,7 +5958,7 @@
|
|
|
5917
5958
|
val: v.toString()
|
|
5918
5959
|
};
|
|
5919
5960
|
});
|
|
5920
|
-
return
|
|
5961
|
+
return Cn(
|
|
5921
5962
|
ctx,
|
|
5922
5963
|
[
|
|
5923
5964
|
{
|