@milaboratories/pl-middle-layer 1.32.5 → 1.32.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debug/index.d.ts +0 -1
- package/dist/debug/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1071 -1220
- package/dist/index.mjs.map +1 -1
- package/dist/pool/driver.d.ts +0 -2
- package/dist/pool/driver.d.ts.map +1 -1
- package/package.json +11 -12
- package/src/debug/index.ts +0 -2
- package/src/pool/driver.ts +57 -195
package/dist/index.mjs
CHANGED
|
@@ -1,100 +1,74 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
var Ds = (s, e, t) => e in s ? Ls(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
-
var w = (s, e, t) => Ds(s, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
-
var je = (s, e, t) => {
|
|
8
|
-
if (e != null) {
|
|
9
|
-
typeof e != "object" && typeof e != "function" && Yt("Object expected");
|
|
10
|
-
var r;
|
|
11
|
-
t && (r = e[qt("asyncDispose")]), r === void 0 && (r = e[qt("dispose")]), typeof r != "function" && Yt("Object not disposable"), s.push([t, r, e]);
|
|
12
|
-
} else t && s.push([t]);
|
|
13
|
-
return e;
|
|
14
|
-
}, Ve = (s, e, t) => {
|
|
15
|
-
var r = typeof SuppressedError == "function" ? SuppressedError : function(i, a, c, u) {
|
|
16
|
-
return u = Error(c), u.name = "SuppressedError", u.error = i, u.suppressed = a, u;
|
|
17
|
-
}, o = (i) => e = t ? new r(i, e, "An error was suppressed during disposal") : (t = !0, i), n = (i) => {
|
|
18
|
-
for (; i = s.pop(); )
|
|
19
|
-
try {
|
|
20
|
-
var a = i[1] && i[1].call(i[2]);
|
|
21
|
-
if (i[0]) return Promise.resolve(a).then(n, (c) => (o(c), n()));
|
|
22
|
-
} catch (c) {
|
|
23
|
-
o(c);
|
|
24
|
-
}
|
|
25
|
-
if (t) throw e;
|
|
26
|
-
};
|
|
27
|
-
return n();
|
|
28
|
-
};
|
|
29
|
-
import { mapValueInVOE as _r, executePSpecPredicate as Ns, mapPObjectData as le, mapPTableDef as St, isDataInfo as Kr, mapDataInfo as Hr, JsRenderInternal as Bs, extractConfig as Wr, isConfigLambda as zr, DefaultNavigationState as xs, extractAllColumns as js } from "@platforma-sdk/model";
|
|
1
|
+
var Os = Object.defineProperty;
|
|
2
|
+
var $s = (s, e, t) => e in s ? Os(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var w = (s, e, t) => $s(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { mapValueInVOE as jr, executePSpecPredicate as Is, mapPObjectData as le, mapPTableDef as vt, isDataInfo as Vr, mapDataInfo as Ur, JsRenderInternal as Fs, extractConfig as Jr, isConfigLambda as Gr, DefaultNavigationState as As, extractAllColumns as Ts } from "@platforma-sdk/model";
|
|
30
5
|
export * from "@platforma-sdk/model";
|
|
31
|
-
import { AnyChannel as
|
|
6
|
+
import { AnyChannel as Pe, StableChannel as Oe, InitialBlockSettings as Wt, blockPackIdToString as Ls } from "@milaboratories/pl-model-middle-layer";
|
|
32
7
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
33
8
|
export * from "@milaboratories/pl-deployments";
|
|
34
|
-
import { request as
|
|
35
|
-
import { RegistryV1 as
|
|
9
|
+
import { request as Ft, RetryAgent as Ns } from "undici";
|
|
10
|
+
import { RegistryV1 as ue, tryLoadPackDescription as yt, BlockPackMetaEmbedAbsoluteBytes as Ds, RegistryV2Reader as Bs, folderReaderByUrl as xs, loadPackDescription as zt } from "@platforma-sdk/block-tools";
|
|
36
11
|
import Y from "node:fs";
|
|
37
12
|
import _ from "node:path";
|
|
38
|
-
import
|
|
39
|
-
import { assertNever as K, notEmpty as B, ConsoleLoggerAdapter as
|
|
40
|
-
import * as
|
|
41
|
-
import
|
|
42
|
-
import { tryResolve as
|
|
43
|
-
import { resourceTypesEqual as
|
|
13
|
+
import js from "yaml";
|
|
14
|
+
import { assertNever as K, notEmpty as B, ConsoleLoggerAdapter as Vs, HmacSha256Signer as Mr } from "@milaboratories/ts-helpers";
|
|
15
|
+
import * as _r from "node:fs/promises";
|
|
16
|
+
import Xt from "node:fs/promises";
|
|
17
|
+
import { tryResolve as Us } from "@milaboratories/resolve-helper";
|
|
18
|
+
import { resourceTypesEqual as ae, field as x, Pl as A, PlClient as Js, isNullResourceId as qe, ensureResourceIdNotNull as St, isResource as Gs, isResourceRef as Ms, isNotNullResourceId as qt, resourceType as Ne, resourceTypeToString as _s, stringifyWithResourceId as xe, resourceIdToString as ve, isNotFoundError as Ks, isTimeoutOrCancelError as Hs, toGlobalResourceId as Ws, plAddressToConfig as zs, UnauthenticatedPlClient as Yt } from "@milaboratories/pl-client";
|
|
44
19
|
export * from "@milaboratories/pl-client";
|
|
45
|
-
import { SynchronizedTreeState as
|
|
46
|
-
import { Computable as J, ChangeSource as
|
|
47
|
-
import { randomUUID as
|
|
48
|
-
import { parseTemplate as
|
|
49
|
-
import { LRUCache as
|
|
50
|
-
import
|
|
51
|
-
import { Templates as
|
|
20
|
+
import { SynchronizedTreeState as Kr, treeDumpStats as Xs, isPlTreeNodeAccessor as qs } from "@milaboratories/pl-tree";
|
|
21
|
+
import { Computable as J, ChangeSource as Qt, PollComputablePool as Ys, WatchableValue as Qs } from "@milaboratories/computable";
|
|
22
|
+
import { randomUUID as ye, createHash as De } from "node:crypto";
|
|
23
|
+
import { parseTemplate as Zs, PlTemplateV1 as ie, PlTemplateOverrideV1 as at, PlTemplateLibV1 as je, PlTemplateSoftwareV1 as be } from "@milaboratories/pl-model-backend";
|
|
24
|
+
import { LRUCache as Hr } from "lru-cache";
|
|
25
|
+
import Wr from "denque";
|
|
26
|
+
import { Templates as eo } from "@platforma-sdk/workflow-tengo";
|
|
52
27
|
import Z from "canonicalize";
|
|
53
|
-
import { parsePlError as
|
|
54
|
-
import
|
|
55
|
-
import { Scope as
|
|
56
|
-
import { setTimeout as
|
|
57
|
-
import { createDownloadClient as
|
|
58
|
-
import { PFrame as
|
|
59
|
-
import {
|
|
60
|
-
|
|
61
|
-
async function nr(s) {
|
|
28
|
+
import { parsePlError as to } from "@milaboratories/pl-errors";
|
|
29
|
+
import ro from "node:assert";
|
|
30
|
+
import { Scope as wt, errors as so, getQuickJS as oo } from "quickjs-emscripten";
|
|
31
|
+
import { setTimeout as zr } from "node:timers/promises";
|
|
32
|
+
import { createDownloadClient as no, createLogsClient as io, createUploadBlobClient as ao, createUploadProgressClient as co, DownloadDriver as lo, DownloadBlobToURLDriver as uo, UploadDriver as po, LogsStreamDriver as ho, LogsDriver as fo, LsDriver as go, DownloadUrlDriver as mo } from "@milaboratories/pl-drivers";
|
|
33
|
+
import { PFrame as vo } from "@milaboratories/pframes-rs-node";
|
|
34
|
+
import { channel as yo } from "node:diagnostics_channel";
|
|
35
|
+
async function Zt(s) {
|
|
62
36
|
try {
|
|
63
|
-
return await
|
|
37
|
+
return await _r.stat(s, { bigint: !0 });
|
|
64
38
|
} catch (e) {
|
|
65
39
|
if (e.code === "ENOENT")
|
|
66
40
|
return;
|
|
67
41
|
throw e;
|
|
68
42
|
}
|
|
69
43
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
44
|
+
const So = [ue.PlPackageYamlConfigFile], wo = [ue.PlPackageJsonConfigFile], At = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Tt = ["config", "dist", "config.json"], Xr = ["frontend", "dist"], er = "block-model/dist/config.json", bo = "block-ui/package.json", Ro = [
|
|
45
|
+
At,
|
|
46
|
+
Tt,
|
|
47
|
+
So,
|
|
48
|
+
wo,
|
|
49
|
+
Xr
|
|
76
50
|
];
|
|
77
|
-
async function
|
|
78
|
-
return await
|
|
51
|
+
async function Eo(s) {
|
|
52
|
+
return await Zt(_.join(s, ...Tt)) !== void 0 || await Zt(_.join(s, ...At)) !== void 0;
|
|
79
53
|
}
|
|
80
|
-
function
|
|
81
|
-
const t =
|
|
54
|
+
function ct(s, e) {
|
|
55
|
+
const t = Us(s, e);
|
|
82
56
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
83
57
|
return t;
|
|
84
58
|
}
|
|
85
|
-
async function
|
|
86
|
-
if (_.isAbsolute(s) || (s = _.resolve(s)), await
|
|
59
|
+
async function tr(s, e) {
|
|
60
|
+
if (_.isAbsolute(s) || (s = _.resolve(s)), await Eo(s))
|
|
87
61
|
return {
|
|
88
|
-
workflow: _.join(s, ...
|
|
89
|
-
config: _.join(s, ...
|
|
90
|
-
ui: _.join(s, ...
|
|
62
|
+
workflow: _.join(s, ...At),
|
|
63
|
+
config: _.join(s, ...Tt),
|
|
64
|
+
ui: _.join(s, ...Xr)
|
|
91
65
|
};
|
|
92
66
|
{
|
|
93
|
-
const t =
|
|
67
|
+
const t = ct(s, er), r = ct(s, er), o = ct(s, bo);
|
|
94
68
|
return { workflow: t, config: r, ui: _.resolve(o, "..", "dist") };
|
|
95
69
|
}
|
|
96
70
|
}
|
|
97
|
-
async function
|
|
71
|
+
async function Co(s) {
|
|
98
72
|
try {
|
|
99
73
|
return await Y.promises.readFile(s, "utf8");
|
|
100
74
|
} catch (e) {
|
|
@@ -103,7 +77,7 @@ async function Ao(s) {
|
|
|
103
77
|
throw e;
|
|
104
78
|
}
|
|
105
79
|
}
|
|
106
|
-
async function
|
|
80
|
+
async function ko(s) {
|
|
107
81
|
try {
|
|
108
82
|
return await Y.promises.stat(s, { bigint: !0 });
|
|
109
83
|
} catch (e) {
|
|
@@ -112,21 +86,21 @@ async function To(s) {
|
|
|
112
86
|
throw e;
|
|
113
87
|
}
|
|
114
88
|
}
|
|
115
|
-
async function
|
|
89
|
+
async function qr(s) {
|
|
116
90
|
let e = 0n;
|
|
117
|
-
for (const t of
|
|
118
|
-
const r = _.join(s, ...t), o = await
|
|
91
|
+
for (const t of Ro) {
|
|
92
|
+
const r = _.join(s, ...t), o = await ko(r);
|
|
119
93
|
o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
|
|
120
94
|
}
|
|
121
95
|
return e.toString();
|
|
122
96
|
}
|
|
123
|
-
async function
|
|
97
|
+
async function Lt(s) {
|
|
124
98
|
const e = await Y.promises.stat(s.components.workflow.main.file, {
|
|
125
99
|
bigint: !0
|
|
126
100
|
}), t = await Y.promises.stat(s.components.model.file, { bigint: !0 });
|
|
127
101
|
return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
|
|
128
102
|
}
|
|
129
|
-
class
|
|
103
|
+
class ru {
|
|
130
104
|
constructor(e, t, r) {
|
|
131
105
|
this.v2Provider = e, this.registries = t, this.http = r;
|
|
132
106
|
}
|
|
@@ -134,8 +108,8 @@ class uu {
|
|
|
134
108
|
const t = [], r = e.spec;
|
|
135
109
|
switch (r.type) {
|
|
136
110
|
case "remote-v1": {
|
|
137
|
-
const o = this.http !== void 0 ? { dispatcher: this.http } : {}, i = await (await
|
|
138
|
-
`${r.url}/${
|
|
111
|
+
const o = this.http !== void 0 ? { dispatcher: this.http } : {}, i = await (await Ft(
|
|
112
|
+
`${r.url}/${ue.GlobalOverviewPath}`,
|
|
139
113
|
o
|
|
140
114
|
)).body.json();
|
|
141
115
|
for (const a of i) {
|
|
@@ -163,8 +137,8 @@ class uu {
|
|
|
163
137
|
registryId: e.id,
|
|
164
138
|
id: f,
|
|
165
139
|
latestByChannel: {
|
|
166
|
-
[
|
|
167
|
-
[
|
|
140
|
+
[Pe]: h,
|
|
141
|
+
[Oe]: h
|
|
168
142
|
},
|
|
169
143
|
allVersions: a.allVersions.map((E) => ({ version: E, channels: [] }))
|
|
170
144
|
});
|
|
@@ -176,11 +150,11 @@ class uu {
|
|
|
176
150
|
case "local-dev":
|
|
177
151
|
for (const o of await Y.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
178
152
|
if (!o.isDirectory()) continue;
|
|
179
|
-
const n = _.join(r.path, o.name), i = await
|
|
180
|
-
_.join(n,
|
|
153
|
+
const n = _.join(r.path, o.name), i = await Co(
|
|
154
|
+
_.join(n, ue.PlPackageYamlConfigFile)
|
|
181
155
|
);
|
|
182
156
|
if (i !== void 0) {
|
|
183
|
-
const a =
|
|
157
|
+
const a = ue.PlPackageConfigData.parse(js.parse(i)), c = await qr(n), u = {
|
|
184
158
|
organization: a.organization,
|
|
185
159
|
name: a.package,
|
|
186
160
|
version: "DEV"
|
|
@@ -204,21 +178,21 @@ class uu {
|
|
|
204
178
|
registryId: e.id,
|
|
205
179
|
id: u,
|
|
206
180
|
latestByChannel: {
|
|
207
|
-
[
|
|
208
|
-
[
|
|
181
|
+
[Pe]: l,
|
|
182
|
+
[Oe]: l
|
|
209
183
|
},
|
|
210
184
|
allVersions: []
|
|
211
185
|
});
|
|
212
186
|
} else {
|
|
213
|
-
let a = n, c = await
|
|
187
|
+
let a = n, c = await yt(a);
|
|
214
188
|
if (c === void 0) {
|
|
215
189
|
for (const u of ["block", "meta"])
|
|
216
|
-
if (a = _.join(n, u), c = await
|
|
190
|
+
if (a = _.join(n, u), c = await yt(a), c !== void 0) break;
|
|
217
191
|
}
|
|
218
192
|
if (c !== void 0) {
|
|
219
|
-
const u = await
|
|
193
|
+
const u = await Lt(c), l = {
|
|
220
194
|
id: c.id,
|
|
221
|
-
meta: await
|
|
195
|
+
meta: await Ds.parseAsync(c.meta),
|
|
222
196
|
spec: {
|
|
223
197
|
type: "dev-v2",
|
|
224
198
|
folder: a,
|
|
@@ -229,8 +203,8 @@ class uu {
|
|
|
229
203
|
registryId: e.id,
|
|
230
204
|
id: c.id,
|
|
231
205
|
latestByChannel: {
|
|
232
|
-
[
|
|
233
|
-
[
|
|
206
|
+
[Pe]: l,
|
|
207
|
+
[Oe]: l
|
|
234
208
|
},
|
|
235
209
|
allVersions: []
|
|
236
210
|
});
|
|
@@ -259,7 +233,7 @@ class uu {
|
|
|
259
233
|
return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
|
|
260
234
|
}
|
|
261
235
|
}
|
|
262
|
-
class
|
|
236
|
+
class Po {
|
|
263
237
|
constructor(e) {
|
|
264
238
|
w(this, "registries", /* @__PURE__ */ new Map());
|
|
265
239
|
this.http = e;
|
|
@@ -267,62 +241,62 @@ class Lo {
|
|
|
267
241
|
getRegistry(e) {
|
|
268
242
|
const t = this.registries.get(e);
|
|
269
243
|
if (t) return t;
|
|
270
|
-
const r = new
|
|
244
|
+
const r = new Bs(xs(e, this.http));
|
|
271
245
|
return this.registries.set(e, r), r;
|
|
272
246
|
}
|
|
273
247
|
}
|
|
274
|
-
const
|
|
248
|
+
const su = {
|
|
275
249
|
type: "remote-v2",
|
|
276
250
|
url: "https://blocks.pl-open.science/"
|
|
277
|
-
},
|
|
251
|
+
}, ou = {
|
|
278
252
|
type: "remote-v1",
|
|
279
253
|
url: "https://block.registry.platforma.bio/releases"
|
|
280
|
-
},
|
|
254
|
+
}, nu = {
|
|
281
255
|
type: "remote-v1",
|
|
282
256
|
url: "https://block.registry.platforma.bio/dev"
|
|
283
|
-
},
|
|
257
|
+
}, Oo = {
|
|
284
258
|
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
285
|
-
},
|
|
259
|
+
}, $o = {
|
|
286
260
|
stagingRefreshTimestamp: 0,
|
|
287
261
|
blocksInLimbo: []
|
|
288
|
-
},
|
|
262
|
+
}, Io = {
|
|
289
263
|
label: "New Project"
|
|
290
|
-
},
|
|
291
|
-
function
|
|
292
|
-
return `${
|
|
264
|
+
}, Fo = { name: "UserProject", version: "2" }, Yr = "SchemaVersion", Qr = "1", Nt = "ProjectCreated", Te = "ProjectLastModified", Le = "ProjectMeta", de = "ProjectStructure", Ye = "BlockRenderingState", Ao = "BlockFrontendState/", To = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
265
|
+
function bt(s) {
|
|
266
|
+
return `${Ao}${s}`;
|
|
293
267
|
}
|
|
294
|
-
const
|
|
295
|
-
function
|
|
296
|
-
return `${
|
|
268
|
+
const Lo = "BlockArgsAuthor/";
|
|
269
|
+
function Rt(s) {
|
|
270
|
+
return `${Lo}${s}`;
|
|
297
271
|
}
|
|
298
|
-
const
|
|
299
|
-
function
|
|
300
|
-
const e = s.match(
|
|
272
|
+
const Et = "ProjectStructureAuthor";
|
|
273
|
+
function No(s) {
|
|
274
|
+
const e = s.match(To);
|
|
301
275
|
if (e !== null)
|
|
302
276
|
return e.groups.blockid;
|
|
303
277
|
}
|
|
304
|
-
const
|
|
305
|
-
function
|
|
306
|
-
return `${
|
|
278
|
+
const Do = "__serviceTemplate_";
|
|
279
|
+
function Ct(s) {
|
|
280
|
+
return `${Do}${s}`;
|
|
307
281
|
}
|
|
308
282
|
function U(s, e) {
|
|
309
283
|
return `${s}-${e}`;
|
|
310
284
|
}
|
|
311
|
-
const
|
|
312
|
-
function
|
|
313
|
-
const e = s.match(
|
|
285
|
+
const Bo = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
286
|
+
function xo(s) {
|
|
287
|
+
const e = s.match(Bo);
|
|
314
288
|
if (e === null) return;
|
|
315
289
|
const { blockId: t, fieldName: r } = e.groups;
|
|
316
290
|
return { blockId: t, fieldName: r };
|
|
317
291
|
}
|
|
318
|
-
const
|
|
319
|
-
async function
|
|
320
|
-
const o = await
|
|
292
|
+
const jo = "projects", Zr = { name: "Projects", version: "1" }, Vo = (s) => ae(s.type, Zr) ? s.fields : [];
|
|
293
|
+
async function Uo(s, e, t, r) {
|
|
294
|
+
const o = await Kr.init(
|
|
321
295
|
s,
|
|
322
296
|
e,
|
|
323
297
|
{
|
|
324
298
|
...r.ops.defaultTreeOptions,
|
|
325
|
-
pruning:
|
|
299
|
+
pruning: Vo
|
|
326
300
|
},
|
|
327
301
|
r.logger
|
|
328
302
|
);
|
|
@@ -333,7 +307,7 @@ async function Wo(s, e, t, r) {
|
|
|
333
307
|
for (const l of a.listDynamicFields()) {
|
|
334
308
|
const d = a.traverse(l);
|
|
335
309
|
if (d === void 0) continue;
|
|
336
|
-
const f = B(d.getKeyValueAsJson(
|
|
310
|
+
const f = B(d.getKeyValueAsJson(Le)), h = B(d.getKeyValueAsJson(Nt)), E = B(d.getKeyValueAsJson(Te));
|
|
337
311
|
u.push({
|
|
338
312
|
id: l,
|
|
339
313
|
rid: d.id,
|
|
@@ -346,107 +320,107 @@ async function Wo(s, e, t, r) {
|
|
|
346
320
|
return u.sort((l) => -l.lastModified.valueOf()), u;
|
|
347
321
|
}).withStableType(), tree: o };
|
|
348
322
|
}
|
|
349
|
-
const
|
|
323
|
+
const Jo = {
|
|
350
324
|
name: "EphRenderTemplate",
|
|
351
325
|
version: "1"
|
|
352
|
-
},
|
|
326
|
+
}, Go = {
|
|
353
327
|
name: "RenderTemplate",
|
|
354
328
|
version: "1"
|
|
355
329
|
};
|
|
356
|
-
function
|
|
330
|
+
function es(s, e, t, r, o) {
|
|
357
331
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
358
|
-
const n = t ? s.createEphemeral(
|
|
332
|
+
const n = t ? s.createEphemeral(Jo) : s.createStruct(Go), i = x(n, "template"), a = x(n, "inputs");
|
|
359
333
|
return s.createField(i, "Input", e), s.createField(a, "Input", A.createPlMap(s, r, t)), s.lockInputs(n), A.futureRecord(s, n, o, "Output", "outputs/");
|
|
360
334
|
}
|
|
361
|
-
const
|
|
362
|
-
function
|
|
363
|
-
return
|
|
335
|
+
const Mo = { name: "BContextEnd", version: "1" }, _o = { name: "BContext", version: "1" }, Ko = "id", Ho = "parent/", Wo = ["context", "result"];
|
|
336
|
+
function rr(s, e, t) {
|
|
337
|
+
return es(s, e, !0, t, Wo);
|
|
364
338
|
}
|
|
365
|
-
function
|
|
366
|
-
const e = s.createEphemeral(
|
|
339
|
+
function zo(s) {
|
|
340
|
+
const e = s.createEphemeral(Mo);
|
|
367
341
|
return s.lock(e), e;
|
|
368
342
|
}
|
|
369
|
-
function
|
|
370
|
-
if (e.length === 0) return
|
|
343
|
+
function sr(s, e) {
|
|
344
|
+
if (e.length === 0) return zo(s);
|
|
371
345
|
if (e.length === 1) return e[0];
|
|
372
|
-
const t = s.createEphemeral(
|
|
373
|
-
s.createField(x(t,
|
|
346
|
+
const t = s.createEphemeral(_o);
|
|
347
|
+
s.createField(x(t, Ko), "Input", A.createPlString(s, ye()));
|
|
374
348
|
for (let r = 0; r < e.length; r++)
|
|
375
|
-
s.createField(x(t, `${
|
|
349
|
+
s.createField(x(t, `${Ho}${r}`), "Input", e[r]);
|
|
376
350
|
return s.lock(t), t;
|
|
377
351
|
}
|
|
378
|
-
function
|
|
379
|
-
const t =
|
|
352
|
+
function Xo(s, e) {
|
|
353
|
+
const t = Zs(e.content), r = t.type;
|
|
380
354
|
switch (r) {
|
|
381
355
|
case "pl.tengo-template.v2":
|
|
382
|
-
return
|
|
356
|
+
return qo(s, t);
|
|
383
357
|
default:
|
|
384
358
|
K(r);
|
|
385
359
|
}
|
|
386
360
|
}
|
|
387
|
-
const
|
|
361
|
+
const or = {
|
|
388
362
|
hash(s, e) {
|
|
389
|
-
e.update(
|
|
363
|
+
e.update(je.type.name).update(je.type.version).update(s.name).update(s.version).update(s.src);
|
|
390
364
|
},
|
|
391
365
|
render(s, e, t) {
|
|
392
366
|
return e.createValue(
|
|
393
|
-
|
|
394
|
-
JSON.stringify(
|
|
367
|
+
je.type,
|
|
368
|
+
JSON.stringify(je.fromV2Data(s).data)
|
|
395
369
|
);
|
|
396
370
|
}
|
|
397
|
-
},
|
|
371
|
+
}, Ve = {
|
|
398
372
|
hash(s, e) {
|
|
399
|
-
e.update(
|
|
373
|
+
e.update(be.type.name).update(be.type.version).update(s.name).update(s.version).update(s.src);
|
|
400
374
|
},
|
|
401
375
|
render(s, e, t) {
|
|
402
|
-
const r =
|
|
403
|
-
return e.setKValue(o,
|
|
376
|
+
const r = be.fromV2Data(s), o = e.createStruct(be.type, r.data);
|
|
377
|
+
return e.setKValue(o, be.metaNameKey, JSON.stringify(r.name)), e.lock(o), o;
|
|
404
378
|
}
|
|
405
|
-
},
|
|
379
|
+
}, ts = {
|
|
406
380
|
hash(s, e) {
|
|
407
|
-
e.update(
|
|
381
|
+
e.update(ie.type.name).update(ie.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
|
|
408
382
|
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
409
383
|
for (const [r, o] of t(Object.entries(s.libs ?? {})))
|
|
410
|
-
e.update("lib:" + r),
|
|
384
|
+
e.update("lib:" + r), or.hash(o, e);
|
|
411
385
|
for (const [r, o] of t(Object.entries(s.software ?? {})))
|
|
412
|
-
e.update("soft:" + r),
|
|
386
|
+
e.update("soft:" + r), Ve.hash(o, e);
|
|
413
387
|
for (const [r, o] of t(Object.entries(s.assets ?? {})))
|
|
414
|
-
e.update("asset:" + r),
|
|
388
|
+
e.update("asset:" + r), Ve.hash(o, e);
|
|
415
389
|
for (const [r, o] of t(Object.entries(s.templates ?? {})))
|
|
416
390
|
e.update("tpl:" + r), this.hash(o, e);
|
|
417
391
|
},
|
|
418
392
|
render(s, e, t) {
|
|
419
393
|
const r = e.createStruct(
|
|
420
|
-
|
|
421
|
-
JSON.stringify(
|
|
394
|
+
ie.type,
|
|
395
|
+
JSON.stringify(ie.fromV2Data(s).data)
|
|
422
396
|
);
|
|
423
397
|
for (const [i, a] of Object.entries(s.libs ?? {})) {
|
|
424
|
-
const c =
|
|
425
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
398
|
+
const c = ie.libField(r, i);
|
|
399
|
+
e.createField(c, "Input"), e.setField(c, t(a, or));
|
|
426
400
|
}
|
|
427
401
|
for (const [i, a] of Object.entries(s.software ?? {})) {
|
|
428
|
-
const c =
|
|
429
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
402
|
+
const c = ie.swField(r, i);
|
|
403
|
+
e.createField(c, "Input"), e.setField(c, t(a, Ve));
|
|
430
404
|
}
|
|
431
405
|
for (const [i, a] of Object.entries(s.assets ?? {})) {
|
|
432
|
-
const c =
|
|
433
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
406
|
+
const c = ie.swField(r, i);
|
|
407
|
+
e.createField(c, "Input"), e.setField(c, t(a, Ve));
|
|
434
408
|
}
|
|
435
409
|
for (const [i, a] of Object.entries(s.templates ?? {})) {
|
|
436
|
-
const c =
|
|
437
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
410
|
+
const c = ie.tplField(r, i);
|
|
411
|
+
e.createField(c, "Input"), e.setField(c, t(a, ts));
|
|
438
412
|
}
|
|
439
413
|
if (e.lock(r), !s.hashOverride) return r;
|
|
440
414
|
const o = e.createStruct(
|
|
441
|
-
|
|
442
|
-
JSON.stringify(
|
|
443
|
-
), n =
|
|
415
|
+
at.type,
|
|
416
|
+
JSON.stringify(at.fromV2Data(s))
|
|
417
|
+
), n = at.tplField(o);
|
|
444
418
|
return e.createField(n, "Service"), e.setField(n, r), e.lock(o), o;
|
|
445
419
|
}
|
|
446
420
|
};
|
|
447
|
-
function
|
|
421
|
+
function qo(s, e) {
|
|
448
422
|
const t = /* @__PURE__ */ new Map(), r = (o, n) => {
|
|
449
|
-
const i =
|
|
423
|
+
const i = De("sha256");
|
|
450
424
|
n.hash(o, i);
|
|
451
425
|
const a = i.digest("hex");
|
|
452
426
|
if (!t.has(a)) {
|
|
@@ -455,13 +429,13 @@ function sn(s, e) {
|
|
|
455
429
|
}
|
|
456
430
|
return t.get(a);
|
|
457
431
|
};
|
|
458
|
-
return r(e,
|
|
432
|
+
return r(e, ts);
|
|
459
433
|
}
|
|
460
|
-
const
|
|
434
|
+
const Yo = { name: "TengoTemplateGet", version: "1" }, Qo = "registry", Zo = "templateURI", en = "template", iu = { name: "TengoTemplatePack", version: "1" }, au = {
|
|
461
435
|
name: "TengoTemplatePackConvert",
|
|
462
436
|
version: "1"
|
|
463
|
-
},
|
|
464
|
-
async function
|
|
437
|
+
}, cu = "templatePack", lu = "template";
|
|
438
|
+
async function tn(s) {
|
|
465
439
|
switch (s.type) {
|
|
466
440
|
case "from-file":
|
|
467
441
|
return {
|
|
@@ -475,34 +449,34 @@ async function ln(s) {
|
|
|
475
449
|
return K(s);
|
|
476
450
|
}
|
|
477
451
|
}
|
|
478
|
-
function
|
|
479
|
-
const t = s.createStruct(
|
|
452
|
+
function rn(s, e) {
|
|
453
|
+
const t = s.createStruct(Yo), r = x(t, Qo), o = x(t, Zo), n = x(t, en);
|
|
480
454
|
return s.setField(r, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
|
|
481
455
|
}
|
|
482
|
-
function
|
|
456
|
+
function Dt(s, e) {
|
|
483
457
|
switch (e.type) {
|
|
484
458
|
case "from-registry":
|
|
485
|
-
return un(s, e);
|
|
486
|
-
case "explicit":
|
|
487
459
|
return rn(s, e);
|
|
460
|
+
case "explicit":
|
|
461
|
+
return Xo(s, e);
|
|
488
462
|
default:
|
|
489
463
|
return K(e);
|
|
490
464
|
}
|
|
491
465
|
}
|
|
492
|
-
const
|
|
466
|
+
const rs = { name: "Frontend/FromUrl", version: "1" }, ss = {
|
|
493
467
|
name: "Frontend/FromFolder",
|
|
494
468
|
version: "1"
|
|
495
469
|
};
|
|
496
|
-
function
|
|
470
|
+
function sn(s, e) {
|
|
497
471
|
switch (e.type) {
|
|
498
472
|
case "url":
|
|
499
473
|
return s.createValue(
|
|
500
|
-
|
|
474
|
+
rs,
|
|
501
475
|
JSON.stringify({ url: e.url })
|
|
502
476
|
);
|
|
503
477
|
case "local":
|
|
504
478
|
return s.createValue(
|
|
505
|
-
|
|
479
|
+
ss,
|
|
506
480
|
JSON.stringify({
|
|
507
481
|
path: e.path,
|
|
508
482
|
signature: e.signature
|
|
@@ -512,24 +486,24 @@ function dn(s, e) {
|
|
|
512
486
|
return K(e);
|
|
513
487
|
}
|
|
514
488
|
}
|
|
515
|
-
const
|
|
516
|
-
function
|
|
489
|
+
const on = { name: "BlockPackCustom", version: "1" }, os = "template", ns = "frontend";
|
|
490
|
+
function nr(s) {
|
|
517
491
|
return s.endsWith("/") ? s : `${s}/`;
|
|
518
492
|
}
|
|
519
|
-
function
|
|
493
|
+
function nn(s) {
|
|
520
494
|
return Buffer.from(s).toString("utf8");
|
|
521
495
|
}
|
|
522
|
-
function
|
|
523
|
-
return JSON.parse(
|
|
496
|
+
function Ue(s) {
|
|
497
|
+
return JSON.parse(nn(s));
|
|
524
498
|
}
|
|
525
|
-
class
|
|
499
|
+
class an {
|
|
526
500
|
constructor(e, t, r) {
|
|
527
|
-
w(this, "remoteContentCache", new
|
|
501
|
+
w(this, "remoteContentCache", new Hr({
|
|
528
502
|
max: 500,
|
|
529
503
|
maxSize: 128 * 1024 * 1024,
|
|
530
504
|
fetchMethod: async (e) => {
|
|
531
505
|
const t = this.http !== void 0 ? { dispatcher: this.http } : {};
|
|
532
|
-
return await (await
|
|
506
|
+
return await (await Ft(e, t)).body.arrayBuffer();
|
|
533
507
|
},
|
|
534
508
|
sizeCalculation: (e) => e.byteLength
|
|
535
509
|
}));
|
|
@@ -540,22 +514,22 @@ class fn {
|
|
|
540
514
|
case "explicit":
|
|
541
515
|
return e.config;
|
|
542
516
|
case "dev-v1": {
|
|
543
|
-
const t = await
|
|
517
|
+
const t = await tr(e.folder), r = await Y.promises.readFile(t.config, { encoding: "utf-8" });
|
|
544
518
|
return JSON.parse(r);
|
|
545
519
|
}
|
|
546
520
|
case "dev-v2": {
|
|
547
|
-
const t = await
|
|
521
|
+
const t = await zt(e.folder), r = await Y.promises.readFile(t.components.model.file, {
|
|
548
522
|
encoding: "utf-8"
|
|
549
523
|
});
|
|
550
524
|
return JSON.parse(r);
|
|
551
525
|
}
|
|
552
526
|
case "from-registry-v1": {
|
|
553
|
-
const t = `${
|
|
554
|
-
return
|
|
527
|
+
const t = `${nr(e.registryUrl)}${ue.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = await this.remoteContentCache.forceFetch(`${t}/config.json`);
|
|
528
|
+
return Ue(r);
|
|
555
529
|
}
|
|
556
530
|
case "from-registry-v2": {
|
|
557
531
|
const r = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), o = await this.remoteContentCache.forceFetch(r.model.url);
|
|
558
|
-
return
|
|
532
|
+
return Ue(o);
|
|
559
533
|
}
|
|
560
534
|
default:
|
|
561
535
|
return K(e);
|
|
@@ -566,7 +540,7 @@ class fn {
|
|
|
566
540
|
case "explicit":
|
|
567
541
|
return e;
|
|
568
542
|
case "dev-v1": {
|
|
569
|
-
const t = await
|
|
543
|
+
const t = await tr(e.folder), r = await Y.promises.readFile(t.workflow), o = JSON.parse(
|
|
570
544
|
await Y.promises.readFile(t.config, "utf-8")
|
|
571
545
|
), n = t.ui;
|
|
572
546
|
return {
|
|
@@ -585,14 +559,14 @@ class fn {
|
|
|
585
559
|
};
|
|
586
560
|
}
|
|
587
561
|
case "dev-v2": {
|
|
588
|
-
const t = await
|
|
562
|
+
const t = await zt(e.folder), r = JSON.parse(
|
|
589
563
|
await Y.promises.readFile(t.components.model.file, {
|
|
590
564
|
encoding: "utf-8"
|
|
591
565
|
})
|
|
592
566
|
), o = await Y.promises.readFile(
|
|
593
567
|
t.components.workflow.main.file
|
|
594
568
|
), n = t.components.ui.folder, i = { ...e };
|
|
595
|
-
return e.mtime === void 0 && (i.mtime = await
|
|
569
|
+
return e.mtime === void 0 && (i.mtime = await Lt(t)), {
|
|
596
570
|
type: "explicit",
|
|
597
571
|
template: {
|
|
598
572
|
type: "explicit",
|
|
@@ -608,7 +582,7 @@ class fn {
|
|
|
608
582
|
};
|
|
609
583
|
}
|
|
610
584
|
case "from-registry-v1": {
|
|
611
|
-
const t = `${
|
|
585
|
+
const t = `${nr(e.registryUrl)}${ue.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = `${t}/template.plj.gz`, o = await this.remoteContentCache.forceFetch(r), n = new Uint8Array(o), i = await this.remoteContentCache.forceFetch(`${t}/config.json`), a = Ue(i);
|
|
612
586
|
return {
|
|
613
587
|
type: "explicit",
|
|
614
588
|
template: {
|
|
@@ -624,7 +598,7 @@ class fn {
|
|
|
624
598
|
};
|
|
625
599
|
}
|
|
626
600
|
case "from-registry-v2": {
|
|
627
|
-
const r = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), o = async () =>
|
|
601
|
+
const r = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), o = async () => Ue(await this.remoteContentCache.forceFetch(r.model.url)), n = async () => await this.remoteContentCache.forceFetch(r.workflow.main.url), [i, a] = await Promise.all([o(), n()]);
|
|
628
602
|
return {
|
|
629
603
|
type: "explicit",
|
|
630
604
|
template: {
|
|
@@ -644,25 +618,25 @@ class fn {
|
|
|
644
618
|
}
|
|
645
619
|
}
|
|
646
620
|
}
|
|
647
|
-
function
|
|
648
|
-
const t = { config: e.config, source: e.source }, r = s.createStruct(
|
|
649
|
-
return s.createField(x(r,
|
|
621
|
+
function cn(s, e) {
|
|
622
|
+
const t = { config: e.config, source: e.source }, r = s.createStruct(on, JSON.stringify(t));
|
|
623
|
+
return s.createField(x(r, os), "Input", Dt(s, e.template)), s.createField(x(r, ns), "Input", sn(s, e.frontend)), s.lock(r), r;
|
|
650
624
|
}
|
|
651
|
-
function
|
|
625
|
+
function ir(s, e) {
|
|
652
626
|
switch (e.type) {
|
|
653
627
|
case "explicit":
|
|
654
|
-
return
|
|
628
|
+
return cn(s, e);
|
|
655
629
|
default:
|
|
656
630
|
return K(e.type);
|
|
657
631
|
}
|
|
658
632
|
}
|
|
659
|
-
function
|
|
633
|
+
function Je(s, e) {
|
|
660
634
|
return { __isRef: !0, blockId: s, name: e };
|
|
661
635
|
}
|
|
662
|
-
function
|
|
636
|
+
function ln(s) {
|
|
663
637
|
return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
|
|
664
638
|
}
|
|
665
|
-
function
|
|
639
|
+
function kt(s, e, t) {
|
|
666
640
|
const r = typeof e;
|
|
667
641
|
switch (r) {
|
|
668
642
|
case "function":
|
|
@@ -675,30 +649,30 @@ function $t(s, e, t) {
|
|
|
675
649
|
return;
|
|
676
650
|
case "object":
|
|
677
651
|
if (e === null) return;
|
|
678
|
-
if (
|
|
652
|
+
if (ln(e))
|
|
679
653
|
t === void 0 || t.has(e.blockId) ? s.upstreams.add(e.blockId) : s.missingReferences = !0;
|
|
680
654
|
else if (Array.isArray(e))
|
|
681
|
-
for (const o of e)
|
|
655
|
+
for (const o of e) kt(s, o, t);
|
|
682
656
|
else
|
|
683
657
|
for (const [, o] of Object.entries(e))
|
|
684
|
-
|
|
658
|
+
kt(s, o, t);
|
|
685
659
|
return;
|
|
686
660
|
default:
|
|
687
661
|
K(r);
|
|
688
662
|
}
|
|
689
663
|
}
|
|
690
|
-
function
|
|
664
|
+
function un(s, e) {
|
|
691
665
|
const t = { upstreams: /* @__PURE__ */ new Set(), missingReferences: !1 };
|
|
692
|
-
return
|
|
666
|
+
return kt(t, s, e), t;
|
|
693
667
|
}
|
|
694
|
-
function
|
|
668
|
+
function se(s) {
|
|
695
669
|
return {
|
|
696
670
|
*[Symbol.iterator]() {
|
|
697
671
|
for (const e of s.groups) for (const t of e.blocks) yield t;
|
|
698
672
|
}
|
|
699
673
|
};
|
|
700
674
|
}
|
|
701
|
-
class
|
|
675
|
+
class is {
|
|
702
676
|
constructor(e) {
|
|
703
677
|
/** Nodes are stored in the map in topological order */
|
|
704
678
|
w(this, "nodes");
|
|
@@ -728,24 +702,24 @@ class ps {
|
|
|
728
702
|
}
|
|
729
703
|
}
|
|
730
704
|
}
|
|
731
|
-
function
|
|
705
|
+
function Pt(s) {
|
|
732
706
|
const e = /* @__PURE__ */ new Map();
|
|
733
707
|
let t;
|
|
734
|
-
for (const { id: r } of
|
|
708
|
+
for (const { id: r } of se(s)) {
|
|
735
709
|
const o = {
|
|
736
710
|
id: r,
|
|
737
711
|
missingReferences: !1
|
|
738
712
|
};
|
|
739
713
|
e.set(r, o), t === void 0 ? o.upstream = /* @__PURE__ */ new Set() : (o.upstream = /* @__PURE__ */ new Set([t.id]), t.downstream = /* @__PURE__ */ new Set([o.id])), t = o;
|
|
740
714
|
}
|
|
741
|
-
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new
|
|
715
|
+
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new is(e);
|
|
742
716
|
}
|
|
743
|
-
function
|
|
717
|
+
function Xe(s, e) {
|
|
744
718
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
|
|
745
|
-
for (const { id: o } of
|
|
719
|
+
for (const { id: o } of se(s)) {
|
|
746
720
|
const n = e(o);
|
|
747
721
|
if (n === void 0) continue;
|
|
748
|
-
const i =
|
|
722
|
+
const i = un(n, r), a = {
|
|
749
723
|
id: o,
|
|
750
724
|
missingReferences: i.missingReferences,
|
|
751
725
|
upstream: i.upstreams,
|
|
@@ -754,41 +728,41 @@ function Qe(s, e) {
|
|
|
754
728
|
};
|
|
755
729
|
t.set(o, a), i.upstreams.forEach((c) => t.get(c).downstream.add(o)), r.add(o);
|
|
756
730
|
}
|
|
757
|
-
return new
|
|
731
|
+
return new is(t);
|
|
758
732
|
}
|
|
759
|
-
function
|
|
733
|
+
function dn(s, e) {
|
|
760
734
|
if (s.size !== e.size) return !1;
|
|
761
735
|
for (const t of s) if (!e.has(t)) return !1;
|
|
762
736
|
return !0;
|
|
763
737
|
}
|
|
764
|
-
function
|
|
765
|
-
if (s.size > e.size) return
|
|
738
|
+
function Ot(s, e) {
|
|
739
|
+
if (s.size > e.size) return Ot(e, s);
|
|
766
740
|
for (const t of s) if (e.has(t)) return !0;
|
|
767
741
|
return !1;
|
|
768
742
|
}
|
|
769
|
-
function
|
|
743
|
+
function ar(s, e) {
|
|
770
744
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
771
745
|
return s.nodes.forEach((n) => {
|
|
772
746
|
const i = e.nodes.get(n.id);
|
|
773
|
-
i === void 0 ? t.add(n.id) : (!
|
|
747
|
+
i === void 0 ? t.add(n.id) : (!dn(n.upstream, i.upstream) || Ot(n.upstream, o)) && o.add(n.id);
|
|
774
748
|
}), e.nodes.forEach((n) => {
|
|
775
|
-
s.nodes.has(n.id) ?
|
|
749
|
+
s.nodes.has(n.id) ? Ot(n.upstream, o) && o.add(n.id) : r.add(n.id);
|
|
776
750
|
}), { onlyInA: t, onlyInB: r, different: o };
|
|
777
751
|
}
|
|
778
|
-
let
|
|
779
|
-
async function
|
|
780
|
-
if (
|
|
781
|
-
const s = await
|
|
752
|
+
let lt;
|
|
753
|
+
async function as() {
|
|
754
|
+
if (lt === void 0) {
|
|
755
|
+
const s = await tn(eo["pframes.export-pframe-for-ui"]);
|
|
782
756
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
783
|
-
const e =
|
|
784
|
-
|
|
757
|
+
const e = De("sha256").update(s.content).digest("hex");
|
|
758
|
+
lt = { spec: s, hash: e };
|
|
785
759
|
}
|
|
786
|
-
return
|
|
760
|
+
return lt;
|
|
787
761
|
}
|
|
788
|
-
function
|
|
789
|
-
return
|
|
762
|
+
function pn(s, e, t) {
|
|
763
|
+
return es(s, e, !0, { pf: t }, ["result"]).result;
|
|
790
764
|
}
|
|
791
|
-
function
|
|
765
|
+
function ut(s, e) {
|
|
792
766
|
let t = !1, r, o;
|
|
793
767
|
return () => {
|
|
794
768
|
if (!t)
|
|
@@ -797,13 +771,13 @@ function ht(s, e) {
|
|
|
797
771
|
return r !== n && (r = n, o = e()), e();
|
|
798
772
|
};
|
|
799
773
|
}
|
|
800
|
-
class
|
|
774
|
+
class cr {
|
|
801
775
|
constructor(e, t) {
|
|
802
|
-
w(this, "currentInputsC",
|
|
776
|
+
w(this, "currentInputsC", ut(
|
|
803
777
|
() => this.fields.currentArgs.modCount,
|
|
804
778
|
() => JSON.parse(Buffer.from(this.fields.currentArgs.value).toString())
|
|
805
779
|
));
|
|
806
|
-
w(this, "actualProductionInputsC",
|
|
780
|
+
w(this, "actualProductionInputsC", ut(
|
|
807
781
|
() => {
|
|
808
782
|
var e;
|
|
809
783
|
return (e = this.fields.prodArgs) == null ? void 0 : e.modCount;
|
|
@@ -815,7 +789,7 @@ class fr {
|
|
|
815
789
|
return JSON.parse(Buffer.from(e).toString());
|
|
816
790
|
}
|
|
817
791
|
));
|
|
818
|
-
w(this, "productionStaleC",
|
|
792
|
+
w(this, "productionStaleC", ut(
|
|
819
793
|
() => {
|
|
820
794
|
var e;
|
|
821
795
|
return `${this.fields.currentArgs.modCount}_${(e = this.fields.prodArgs) == null ? void 0 : e.modCount}`;
|
|
@@ -861,15 +835,15 @@ class fr {
|
|
|
861
835
|
getTemplate(e) {
|
|
862
836
|
return e.getFutureFieldValue(
|
|
863
837
|
A.unwrapHolder(e, this.fields.blockPack.ref),
|
|
864
|
-
|
|
838
|
+
os,
|
|
865
839
|
"Input"
|
|
866
840
|
);
|
|
867
841
|
}
|
|
868
842
|
}
|
|
869
|
-
const
|
|
843
|
+
const hn = (s) => {
|
|
870
844
|
throw new Error(`No new block info for ${s}`);
|
|
871
845
|
};
|
|
872
|
-
class
|
|
846
|
+
class Qe {
|
|
873
847
|
constructor(e, t, r, o, n, i, a, c, u, l, d, f) {
|
|
874
848
|
w(this, "globalModCount", 0);
|
|
875
849
|
w(this, "fieldsChanged", !1);
|
|
@@ -897,7 +871,7 @@ class tt {
|
|
|
897
871
|
});
|
|
898
872
|
let e;
|
|
899
873
|
this.blockInfos.forEach((t) => {
|
|
900
|
-
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(
|
|
874
|
+
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(Wt)), this.setBlockFieldObj(t.id, "blockSettings", e));
|
|
901
875
|
});
|
|
902
876
|
}
|
|
903
877
|
get wasModified() {
|
|
@@ -907,16 +881,16 @@ class tt {
|
|
|
907
881
|
return JSON.parse(JSON.stringify(this.struct));
|
|
908
882
|
}
|
|
909
883
|
getStagingGraph() {
|
|
910
|
-
return this.stagingGraph === void 0 && (this.stagingGraph =
|
|
884
|
+
return this.stagingGraph === void 0 && (this.stagingGraph = Pt(this.struct)), this.stagingGraph;
|
|
911
885
|
}
|
|
912
886
|
getPendingProductionGraph() {
|
|
913
|
-
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph =
|
|
887
|
+
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph = Xe(
|
|
914
888
|
this.struct,
|
|
915
889
|
(e) => this.getBlockInfo(e).currentInputs
|
|
916
890
|
)), this.pendingProductionGraph;
|
|
917
891
|
}
|
|
918
892
|
getActualProductionGraph() {
|
|
919
|
-
return this.actualProductionGraph === void 0 && (this.actualProductionGraph =
|
|
893
|
+
return this.actualProductionGraph === void 0 && (this.actualProductionGraph = Xe(
|
|
920
894
|
this.struct,
|
|
921
895
|
(e) => this.getBlockInfo(e).actualProductionInputs
|
|
922
896
|
)), this.actualProductionGraph;
|
|
@@ -937,7 +911,7 @@ class tt {
|
|
|
937
911
|
return this.createJsonFieldValueByContent(JSON.stringify(e));
|
|
938
912
|
}
|
|
939
913
|
getBlock(e) {
|
|
940
|
-
for (const t of
|
|
914
|
+
for (const t of se(this.struct)) if (t.id === e) return t;
|
|
941
915
|
throw new Error("block not found");
|
|
942
916
|
}
|
|
943
917
|
setBlockFieldObj(e, t, r) {
|
|
@@ -1014,7 +988,7 @@ class tt {
|
|
|
1014
988
|
if (((n = o.fields.prodCtx) == null ? void 0 : n.ref) === void 0)
|
|
1015
989
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1016
990
|
t.push(A.unwrapHolder(this.tx, o.fields.prodCtx.ref));
|
|
1017
|
-
}),
|
|
991
|
+
}), sr(this.tx, t);
|
|
1018
992
|
}
|
|
1019
993
|
createStagingCtx(e) {
|
|
1020
994
|
const t = [];
|
|
@@ -1024,16 +998,16 @@ class tt {
|
|
|
1024
998
|
if (((n = o.fields.stagingCtx) == null ? void 0 : n.ref) === void 0)
|
|
1025
999
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1026
1000
|
t.push(A.unwrapHolder(this.tx, o.fields.stagingCtx.ref)), ((i = o.fields.prodCtx) == null ? void 0 : i.ref) !== void 0 && t.push(A.unwrapHolder(this.tx, o.fields.prodCtx.ref));
|
|
1027
|
-
}),
|
|
1001
|
+
}), sr(this.tx, t);
|
|
1028
1002
|
}
|
|
1029
1003
|
exportCtx(e) {
|
|
1030
|
-
return
|
|
1004
|
+
return pn(this.tx, A.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
1031
1005
|
}
|
|
1032
1006
|
renderStagingFor(e) {
|
|
1033
1007
|
this.resetStaging(e);
|
|
1034
1008
|
const t = this.getBlockInfo(e), r = this.createStagingCtx(this.getStagingGraph().nodes.get(e).upstream);
|
|
1035
1009
|
if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
|
|
1036
|
-
const o = t.getTemplate(this.tx), n =
|
|
1010
|
+
const o = t.getTemplate(this.tx), n = rr(this.tx, o, {
|
|
1037
1011
|
args: t.fields.currentArgs.ref,
|
|
1038
1012
|
blockId: this.tx.createValue(A.JsonString, JSON.stringify(e)),
|
|
1039
1013
|
isProduction: this.tx.createValue(A.JsonBool, JSON.stringify(!1)),
|
|
@@ -1051,7 +1025,7 @@ class tt {
|
|
|
1051
1025
|
const t = this.getBlockInfo(e), r = this.createProdCtx(this.getPendingProductionGraph().nodes.get(e).upstream);
|
|
1052
1026
|
if (this.getBlock(e).renderingMode === "Light")
|
|
1053
1027
|
throw new Error("Can't render production for light block.");
|
|
1054
|
-
const o = t.getTemplate(this.tx), n =
|
|
1028
|
+
const o = t.getTemplate(this.tx), n = rr(this.tx, o, {
|
|
1055
1029
|
args: t.fields.currentArgs.ref,
|
|
1056
1030
|
blockId: this.tx.createValue(A.JsonString, JSON.stringify(e)),
|
|
1057
1031
|
isProduction: this.tx.createValue(A.JsonBool, JSON.stringify(!0)),
|
|
@@ -1068,26 +1042,26 @@ class tt {
|
|
|
1068
1042
|
// Structure changes
|
|
1069
1043
|
//
|
|
1070
1044
|
/** Very generic method, better check for more specialized case-specific methods first. */
|
|
1071
|
-
updateStructure(e, t =
|
|
1072
|
-
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n =
|
|
1045
|
+
updateStructure(e, t = hn) {
|
|
1046
|
+
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = Pt(e), i = Xe(
|
|
1073
1047
|
e,
|
|
1074
1048
|
(u) => {
|
|
1075
1049
|
var l;
|
|
1076
1050
|
return (l = this.blockInfos.get(u)) == null ? void 0 : l.actualProductionInputs;
|
|
1077
1051
|
}
|
|
1078
|
-
), a =
|
|
1052
|
+
), a = ar(r, n), c = ar(o, i);
|
|
1079
1053
|
for (const u of a.onlyInA) {
|
|
1080
1054
|
const { fields: l } = this.getBlockInfo(u);
|
|
1081
1055
|
this.deleteBlockFields(u, ...Object.keys(l)), this.blockInfos.delete(u), this.blocksInLimbo.delete(u) && (this.renderingStateChanged = !0), this.blockFrontendStates.delete(u) && this.changedBlockFrontendStates.add(u);
|
|
1082
1056
|
}
|
|
1083
1057
|
for (const u of a.onlyInB) {
|
|
1084
|
-
const l = new
|
|
1058
|
+
const l = new cr(u, {});
|
|
1085
1059
|
this.blockInfos.set(u, l);
|
|
1086
|
-
const d = t(u), f =
|
|
1060
|
+
const d = t(u), f = ir(this.tx, d.blockPack);
|
|
1087
1061
|
this.setBlockField(u, "blockPack", A.wrapInHolder(this.tx, f), "NotReady"), this.setBlockFieldObj(
|
|
1088
1062
|
u,
|
|
1089
1063
|
"blockSettings",
|
|
1090
|
-
this.createJsonFieldValue(
|
|
1064
|
+
this.createJsonFieldValue(Wt)
|
|
1091
1065
|
), this.setBlockFieldObj(u, "currentArgs", this.createJsonFieldValueByContent(d.args)), d.uiState && (this.blockFrontendStates.set(u, d.uiState), this.changedBlockFrontendStates.add(u)), l.check();
|
|
1092
1066
|
}
|
|
1093
1067
|
for (const u of a.different) this.resetStaging(u);
|
|
@@ -1139,7 +1113,7 @@ class tt {
|
|
|
1139
1113
|
this.setBlockField(
|
|
1140
1114
|
e,
|
|
1141
1115
|
"blockPack",
|
|
1142
|
-
A.wrapInHolder(this.tx,
|
|
1116
|
+
A.wrapInHolder(this.tx, ir(this.tx, t)),
|
|
1143
1117
|
"NotReady"
|
|
1144
1118
|
), r !== void 0 ? (this.setArgs([{ blockId: e, args: r }]), this.setUiState(e, void 0)) : this.getStagingGraph().traverse("downstream", [e], ({ id: n }) => this.resetStaging(n)), o.productionRendered && this.getActualProductionGraph().traverse(
|
|
1145
1119
|
"downstream",
|
|
@@ -1165,7 +1139,7 @@ class tt {
|
|
|
1165
1139
|
throw new Error("Can't render blocks not including all upstreams.");
|
|
1166
1140
|
}
|
|
1167
1141
|
const n = /* @__PURE__ */ new Set();
|
|
1168
|
-
for (const a of
|
|
1142
|
+
for (const a of se(this.structure)) {
|
|
1169
1143
|
if (!r.has(a.id)) continue;
|
|
1170
1144
|
let c = this.getBlockInfo(a.id).requireProductionRendering || this.blocksInLimbo.has(a.id);
|
|
1171
1145
|
if (!c) {
|
|
@@ -1188,7 +1162,7 @@ class tt {
|
|
|
1188
1162
|
* accordingly */
|
|
1189
1163
|
stopProduction(...e) {
|
|
1190
1164
|
var i, a;
|
|
1191
|
-
const t = this.getActualProductionGraph(), r = new
|
|
1165
|
+
const t = this.getActualProductionGraph(), r = new Wr(e), o = new Set(e), n = [];
|
|
1192
1166
|
for (; !r.isEmpty(); ) {
|
|
1193
1167
|
const c = r.shift(), u = this.getBlockInfo(c).fields;
|
|
1194
1168
|
if (!(((i = u.prodOutput) == null ? void 0 : i.status) === "Ready" && ((a = u.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
|
|
@@ -1248,34 +1222,34 @@ class tt {
|
|
|
1248
1222
|
assignAuthorMarkers() {
|
|
1249
1223
|
const e = this.author ? JSON.stringify(this.author) : void 0;
|
|
1250
1224
|
for (const t of this.blocksWithChangedInputs)
|
|
1251
|
-
e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1252
|
-
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1225
|
+
e === void 0 ? this.tx.deleteKValue(this.rid, Rt(t)) : this.tx.setKValue(this.rid, Rt(t), e);
|
|
1226
|
+
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid, Et) : this.tx.setKValue(this.rid, Et, e));
|
|
1253
1227
|
}
|
|
1254
1228
|
save() {
|
|
1255
1229
|
if (this.wasModified) {
|
|
1256
|
-
this.lastModifiedChanged && this.tx.setKValue(this.rid,
|
|
1230
|
+
this.lastModifiedChanged && this.tx.setKValue(this.rid, Te, JSON.stringify(this.lastModified)), this.structureChanged && this.tx.setKValue(this.rid, de, JSON.stringify(this.struct)), this.renderingStateChanged && this.tx.setKValue(
|
|
1257
1231
|
this.rid,
|
|
1258
|
-
|
|
1232
|
+
Ye,
|
|
1259
1233
|
JSON.stringify({
|
|
1260
1234
|
...this.renderingState,
|
|
1261
1235
|
blocksInLimbo: [...this.blocksInLimbo]
|
|
1262
1236
|
})
|
|
1263
|
-
), this.metaChanged && this.tx.setKValue(this.rid,
|
|
1237
|
+
), this.metaChanged && this.tx.setKValue(this.rid, Le, JSON.stringify(this.meta));
|
|
1264
1238
|
for (const e of this.changedBlockFrontendStates) {
|
|
1265
1239
|
const t = this.blockFrontendStates.get(e);
|
|
1266
|
-
t === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1240
|
+
t === void 0 ? this.tx.deleteKValue(this.rid, bt(e)) : this.tx.setKValue(this.rid, bt(e), t);
|
|
1267
1241
|
}
|
|
1268
1242
|
this.assignAuthorMarkers();
|
|
1269
1243
|
}
|
|
1270
1244
|
}
|
|
1271
1245
|
static async load(e, t, r) {
|
|
1272
|
-
const o = e.getResourceData(t, !0), n = e.getKValueJson(t,
|
|
1246
|
+
const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Yr), i = e.getKValueJson(t, Te), a = e.getKValueJson(t, Le), c = e.getKValueJson(t, de), u = e.getKValueJson(t, Ye), l = e.listKeyValuesString(t), [
|
|
1273
1247
|
d,
|
|
1274
1248
|
f,
|
|
1275
1249
|
h,
|
|
1276
1250
|
E,
|
|
1277
1251
|
g,
|
|
1278
|
-
{ stagingRefreshTimestamp:
|
|
1252
|
+
{ stagingRefreshTimestamp: N, blocksInLimbo: T },
|
|
1279
1253
|
j
|
|
1280
1254
|
] = await Promise.all([
|
|
1281
1255
|
o,
|
|
@@ -1286,61 +1260,61 @@ class tt {
|
|
|
1286
1260
|
u,
|
|
1287
1261
|
l
|
|
1288
1262
|
]);
|
|
1289
|
-
if (f !==
|
|
1263
|
+
if (f !== Qr)
|
|
1290
1264
|
throw new Error(
|
|
1291
1265
|
`Can't act on this project resource because it has a wrong schema version: ${f}`
|
|
1292
1266
|
);
|
|
1293
1267
|
const $ = /* @__PURE__ */ new Map();
|
|
1294
1268
|
for (const p of d.fields) {
|
|
1295
|
-
const m =
|
|
1269
|
+
const m = xo(p.name);
|
|
1296
1270
|
if (m === void 0) continue;
|
|
1297
1271
|
let y = $.get(m.blockId);
|
|
1298
1272
|
y === void 0 && (y = {
|
|
1299
1273
|
id: m.blockId,
|
|
1300
1274
|
fields: {}
|
|
1301
|
-
}, $.set(m.blockId, y)), y.fields[m.fieldName] =
|
|
1275
|
+
}, $.set(m.blockId, y)), y.fields[m.fieldName] = qe(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
|
|
1302
1276
|
}
|
|
1303
|
-
const G = await
|
|
1304
|
-
(p) => p.name ===
|
|
1277
|
+
const G = await as(), pe = Ct(G.hash), L = d.fields.find(
|
|
1278
|
+
(p) => p.name === pe
|
|
1305
1279
|
);
|
|
1306
1280
|
let X;
|
|
1307
|
-
L !== void 0 ? X =
|
|
1308
|
-
x(t,
|
|
1281
|
+
L !== void 0 ? X = St(L.value) : (X = A.wrapInHolder(e, Dt(e, G.spec)), e.createField(
|
|
1282
|
+
x(t, Ct(G.hash)),
|
|
1309
1283
|
"Dynamic",
|
|
1310
1284
|
X
|
|
1311
1285
|
));
|
|
1312
|
-
const
|
|
1286
|
+
const ne = { stagingRefreshTimestamp: N }, W = new Set(T), M = /* @__PURE__ */ new Map();
|
|
1313
1287
|
for (const p of j) {
|
|
1314
|
-
const m =
|
|
1288
|
+
const m = No(p.key);
|
|
1315
1289
|
m !== void 0 && M.set(m, p.value);
|
|
1316
1290
|
}
|
|
1317
1291
|
const V = [];
|
|
1318
1292
|
$.forEach(({ fields: p }) => {
|
|
1319
1293
|
for (const [, m] of Object.entries(p))
|
|
1320
1294
|
if (m.ref !== void 0) {
|
|
1321
|
-
if (!
|
|
1295
|
+
if (!Gs(m.ref) || Ms(m.ref))
|
|
1322
1296
|
throw new Error("unexpected behaviour");
|
|
1323
1297
|
V.push([m, e.getResourceData(m.ref, !1)]);
|
|
1324
1298
|
}
|
|
1325
1299
|
});
|
|
1326
1300
|
for (const [p, m] of V) {
|
|
1327
1301
|
const y = await m;
|
|
1328
|
-
p.value = y.data,
|
|
1302
|
+
p.value = y.data, qt(y.error) ? p.status = "Error" : y.resourceReady || qt(y.originalResourceId) ? p.status = "Ready" : p.status = "NotReady";
|
|
1329
1303
|
}
|
|
1330
1304
|
const q = /* @__PURE__ */ new Map();
|
|
1331
|
-
$.forEach(({ id: p, fields: m }) => q.set(p, new
|
|
1332
|
-
const
|
|
1333
|
-
for (const p of
|
|
1305
|
+
$.forEach(({ id: p, fields: m }) => q.set(p, new cr(p, m)));
|
|
1306
|
+
const he = /* @__PURE__ */ new Set();
|
|
1307
|
+
for (const p of se(g)) {
|
|
1334
1308
|
if (!q.has(p.id))
|
|
1335
1309
|
throw new Error(`Inconsistent project structure: no inputs for ${p.id}`);
|
|
1336
|
-
|
|
1310
|
+
he.add(p.id);
|
|
1337
1311
|
}
|
|
1338
1312
|
q.forEach((p) => {
|
|
1339
|
-
if (!
|
|
1313
|
+
if (!he.has(p.id))
|
|
1340
1314
|
throw new Error(`Inconsistent project structure: no structure entry for ${p.id}`);
|
|
1341
1315
|
p.check();
|
|
1342
1316
|
});
|
|
1343
|
-
const v = new
|
|
1317
|
+
const v = new Qe(
|
|
1344
1318
|
t,
|
|
1345
1319
|
e,
|
|
1346
1320
|
r,
|
|
@@ -1348,7 +1322,7 @@ class tt {
|
|
|
1348
1322
|
h,
|
|
1349
1323
|
E,
|
|
1350
1324
|
g,
|
|
1351
|
-
|
|
1325
|
+
ne,
|
|
1352
1326
|
W,
|
|
1353
1327
|
q,
|
|
1354
1328
|
M,
|
|
@@ -1357,33 +1331,33 @@ class tt {
|
|
|
1357
1331
|
return v.fixProblemsAndMigrate(), v;
|
|
1358
1332
|
}
|
|
1359
1333
|
}
|
|
1360
|
-
async function
|
|
1361
|
-
const t = s.createEphemeral(
|
|
1334
|
+
async function fn(s, e = Io) {
|
|
1335
|
+
const t = s.createEphemeral(Fo);
|
|
1362
1336
|
s.lock(t);
|
|
1363
1337
|
const r = String(Date.now());
|
|
1364
|
-
s.setKValue(t,
|
|
1365
|
-
const o = await
|
|
1338
|
+
s.setKValue(t, Yr, JSON.stringify(Qr)), s.setKValue(t, Nt, r), s.setKValue(t, Te, r), s.setKValue(t, Le, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(Oo)), s.setKValue(t, Ye, JSON.stringify($o));
|
|
1339
|
+
const o = await as();
|
|
1366
1340
|
return s.createField(
|
|
1367
|
-
x(t,
|
|
1341
|
+
x(t, Ct(o.hash)),
|
|
1368
1342
|
"Dynamic",
|
|
1369
|
-
A.wrapInHolder(s,
|
|
1343
|
+
A.wrapInHolder(s, Dt(s, o.spec))
|
|
1370
1344
|
), t;
|
|
1371
1345
|
}
|
|
1372
|
-
async function
|
|
1346
|
+
async function Ge(s, e, t) {
|
|
1373
1347
|
return Q(s, e, void 0, t);
|
|
1374
1348
|
}
|
|
1375
1349
|
async function Q(s, e, t, r) {
|
|
1376
|
-
if (s instanceof
|
|
1350
|
+
if (s instanceof Js)
|
|
1377
1351
|
return await s.withWriteTx("ProjectAction", async (o) => {
|
|
1378
|
-
const n = await
|
|
1352
|
+
const n = await Qe.load(o, e, t), i = await r(n);
|
|
1379
1353
|
return n.wasModified && (n.save(), await o.commit()), i;
|
|
1380
1354
|
});
|
|
1381
1355
|
{
|
|
1382
|
-
const o = await
|
|
1356
|
+
const o = await Qe.load(s, e, t), n = await r(o);
|
|
1383
1357
|
return o.save(), n;
|
|
1384
1358
|
}
|
|
1385
1359
|
}
|
|
1386
|
-
function*
|
|
1360
|
+
function* gn(s) {
|
|
1387
1361
|
switch (s.type) {
|
|
1388
1362
|
case "Json":
|
|
1389
1363
|
return;
|
|
@@ -1398,21 +1372,21 @@ function* Rn(s) {
|
|
|
1398
1372
|
K(s);
|
|
1399
1373
|
}
|
|
1400
1374
|
}
|
|
1401
|
-
function
|
|
1375
|
+
function lr(s, e) {
|
|
1402
1376
|
return Object.fromEntries(
|
|
1403
1377
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1404
1378
|
);
|
|
1405
1379
|
}
|
|
1406
|
-
function
|
|
1380
|
+
function mn(s, e) {
|
|
1407
1381
|
switch (s.type) {
|
|
1408
1382
|
case "Json":
|
|
1409
1383
|
return { ...s };
|
|
1410
1384
|
case "JsonPartitioned":
|
|
1411
|
-
return { ...s, parts:
|
|
1385
|
+
return { ...s, parts: lr(s.parts, e) };
|
|
1412
1386
|
case "BinaryPartitioned":
|
|
1413
1387
|
return {
|
|
1414
1388
|
...s,
|
|
1415
|
-
parts:
|
|
1389
|
+
parts: lr(s.parts, (t) => ({
|
|
1416
1390
|
index: e(t.index),
|
|
1417
1391
|
values: e(t.values)
|
|
1418
1392
|
}))
|
|
@@ -1421,26 +1395,26 @@ function En(s, e) {
|
|
|
1421
1395
|
K(s);
|
|
1422
1396
|
}
|
|
1423
1397
|
}
|
|
1424
|
-
const
|
|
1398
|
+
const vn = Ne("PColumnData/JsonPartitioned", "1"), yn = Ne(
|
|
1425
1399
|
"PColumnData/Partitioned/JsonPartitioned",
|
|
1426
1400
|
"1"
|
|
1427
|
-
),
|
|
1401
|
+
), Sn = Ne("PColumnData/BinaryPartitioned", "1"), wn = Ne(
|
|
1428
1402
|
"PColumnData/Partitioned/BinaryPartitioned",
|
|
1429
1403
|
"1"
|
|
1430
|
-
),
|
|
1431
|
-
function
|
|
1404
|
+
), bn = Ne("PColumnData/Json", "1");
|
|
1405
|
+
function Rn(s) {
|
|
1432
1406
|
if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
|
|
1433
1407
|
const e = s.getDataAsJson();
|
|
1434
1408
|
if (e === void 0)
|
|
1435
1409
|
throw new Error("unexpected data info structure, no resource data");
|
|
1436
|
-
if (
|
|
1410
|
+
if (ae(s.resourceType, bn)) {
|
|
1437
1411
|
const t = e;
|
|
1438
1412
|
return {
|
|
1439
1413
|
type: "Json",
|
|
1440
1414
|
keyLength: t.keyLength,
|
|
1441
1415
|
data: t.data
|
|
1442
1416
|
};
|
|
1443
|
-
} else if (
|
|
1417
|
+
} else if (ae(s.resourceType, vn)) {
|
|
1444
1418
|
const t = e, r = Object.fromEntries(
|
|
1445
1419
|
s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1446
1420
|
);
|
|
@@ -1449,7 +1423,7 @@ function In(s) {
|
|
|
1449
1423
|
partitionKeyLength: t.partitionKeyLength,
|
|
1450
1424
|
parts: r
|
|
1451
1425
|
};
|
|
1452
|
-
} else if (
|
|
1426
|
+
} else if (ae(s.resourceType, yn)) {
|
|
1453
1427
|
const t = e, r = {};
|
|
1454
1428
|
for (const o of s.listInputFields()) {
|
|
1455
1429
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1467,7 +1441,7 @@ function In(s) {
|
|
|
1467
1441
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1468
1442
|
parts: r
|
|
1469
1443
|
};
|
|
1470
|
-
} else if (
|
|
1444
|
+
} else if (ae(s.resourceType, Sn)) {
|
|
1471
1445
|
const t = e, r = {};
|
|
1472
1446
|
for (const o of s.listInputFields())
|
|
1473
1447
|
if (o.endsWith(".index")) {
|
|
@@ -1488,7 +1462,7 @@ function In(s) {
|
|
|
1488
1462
|
partitionKeyLength: t.partitionKeyLength,
|
|
1489
1463
|
parts: r
|
|
1490
1464
|
};
|
|
1491
|
-
} else if (
|
|
1465
|
+
} else if (ae(s.resourceType, wn)) {
|
|
1492
1466
|
const t = e, r = {};
|
|
1493
1467
|
for (const o of s.listInputFields()) {
|
|
1494
1468
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1522,9 +1496,9 @@ function In(s) {
|
|
|
1522
1496
|
parts: r
|
|
1523
1497
|
};
|
|
1524
1498
|
}
|
|
1525
|
-
throw new Error(`unsupported resource type: ${
|
|
1499
|
+
throw new Error(`unsupported resource type: ${_s(s.resourceType)}`);
|
|
1526
1500
|
}
|
|
1527
|
-
function
|
|
1501
|
+
function En(s, e) {
|
|
1528
1502
|
const t = s.axesSpec.length, r = {};
|
|
1529
1503
|
for (const { key: o, val: n } of e) {
|
|
1530
1504
|
if (o.length !== t)
|
|
@@ -1537,17 +1511,17 @@ function Fn(s, e) {
|
|
|
1537
1511
|
data: r
|
|
1538
1512
|
};
|
|
1539
1513
|
}
|
|
1540
|
-
function
|
|
1541
|
-
const t =
|
|
1542
|
-
return t.update(Z(s)), t.update(String(
|
|
1514
|
+
function Cn(s, e) {
|
|
1515
|
+
const t = De("sha256");
|
|
1516
|
+
return t.update(Z(s)), t.update(String(qe(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1543
1517
|
}
|
|
1544
|
-
function
|
|
1518
|
+
function ur(s, e) {
|
|
1545
1519
|
return Z({ __isRef: !0, blockId: s, name: e });
|
|
1546
1520
|
}
|
|
1547
|
-
function
|
|
1521
|
+
function kn(s, e) {
|
|
1548
1522
|
return Z({ resolvePath: s, name: e });
|
|
1549
1523
|
}
|
|
1550
|
-
function
|
|
1524
|
+
function cs(s, e = !0, t = !1, r = "") {
|
|
1551
1525
|
var a, c, u;
|
|
1552
1526
|
const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
|
|
1553
1527
|
for (const l of s.listInputFields()) {
|
|
@@ -1585,10 +1559,10 @@ function fs(s, e = !0, t = !1, r = "") {
|
|
|
1585
1559
|
for (const [, l] of n) l.data === void 0 && (l.hasData = !1);
|
|
1586
1560
|
return { locked: i, results: n };
|
|
1587
1561
|
}
|
|
1588
|
-
function
|
|
1562
|
+
function Pn(s, e = !0, t = "", r) {
|
|
1589
1563
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1590
|
-
const o =
|
|
1591
|
-
|
|
1564
|
+
const o = cs(s, e, !1, t);
|
|
1565
|
+
ro(o.locked);
|
|
1592
1566
|
const n = {};
|
|
1593
1567
|
for (const [i, a] of o.results) {
|
|
1594
1568
|
if (a.spec === void 0) throw new Error(`no spec for key ${i}`);
|
|
@@ -1596,16 +1570,16 @@ function Ln(s, e = !0, t = "", r) {
|
|
|
1596
1570
|
throw new Error(`no data for key ${i}`);
|
|
1597
1571
|
const c = a.data();
|
|
1598
1572
|
if (c === void 0) throw new Error(`no data for key ${i}`);
|
|
1599
|
-
if (!c.ok) throw
|
|
1573
|
+
if (!c.ok) throw to(c.error);
|
|
1600
1574
|
n[i] = {
|
|
1601
|
-
id: r.length === 0 ?
|
|
1575
|
+
id: r.length === 0 ? Cn(a.spec, c.value) : kn(r, i),
|
|
1602
1576
|
spec: a.spec,
|
|
1603
1577
|
data: c.value
|
|
1604
1578
|
};
|
|
1605
1579
|
}
|
|
1606
1580
|
return n;
|
|
1607
1581
|
}
|
|
1608
|
-
class
|
|
1582
|
+
class Bt {
|
|
1609
1583
|
constructor(e, t) {
|
|
1610
1584
|
w(this, "allSpecsAvailable");
|
|
1611
1585
|
this.ctx = e, this.blocks = t;
|
|
@@ -1639,8 +1613,8 @@ class Vt {
|
|
|
1639
1613
|
if (r === void 0) return;
|
|
1640
1614
|
const o = (a = (i = r.prod) == null ? void 0 : i.results) == null ? void 0 : a.get(t), n = (c = o == null ? void 0 : o.data) == null ? void 0 : c.call(o);
|
|
1641
1615
|
if (o !== void 0 && o.spec !== void 0 && n !== void 0)
|
|
1642
|
-
return
|
|
1643
|
-
id:
|
|
1616
|
+
return jr(n, (u) => ({
|
|
1617
|
+
id: ur(e, t),
|
|
1644
1618
|
spec: o.spec,
|
|
1645
1619
|
data: u
|
|
1646
1620
|
}));
|
|
@@ -1677,9 +1651,9 @@ class Vt {
|
|
|
1677
1651
|
if (c.spec !== void 0 && c.hasData === !0 && c.data !== void 0) {
|
|
1678
1652
|
const u = c.data();
|
|
1679
1653
|
u !== void 0 ? e.push({
|
|
1680
|
-
ref:
|
|
1654
|
+
ref: Je(i, a),
|
|
1681
1655
|
obj: {
|
|
1682
|
-
id: u.ok ?
|
|
1656
|
+
id: u.ok ? ur(i, a) : void 0,
|
|
1683
1657
|
spec: c.spec,
|
|
1684
1658
|
data: u
|
|
1685
1659
|
}
|
|
@@ -1713,7 +1687,7 @@ class Vt {
|
|
|
1713
1687
|
i.staging.locked || o(`staging_not_locked:${n}`);
|
|
1714
1688
|
for (const [c, u] of i.staging.results)
|
|
1715
1689
|
u.spec !== void 0 && (e.push({
|
|
1716
|
-
ref:
|
|
1690
|
+
ref: Je(n, c),
|
|
1717
1691
|
obj: u.spec
|
|
1718
1692
|
}), a.add(c));
|
|
1719
1693
|
} else o(`staging_not_rendered:${n}`);
|
|
@@ -1721,7 +1695,7 @@ class Vt {
|
|
|
1721
1695
|
i.prod.locked || o(`prod_not_locked:${n}`);
|
|
1722
1696
|
for (const [c, u] of i.prod.results)
|
|
1723
1697
|
a.has(c) || u.spec !== void 0 && e.push({
|
|
1724
|
-
ref:
|
|
1698
|
+
ref: Je(n, c),
|
|
1725
1699
|
obj: u.spec
|
|
1726
1700
|
});
|
|
1727
1701
|
}
|
|
@@ -1733,9 +1707,9 @@ class Vt {
|
|
|
1733
1707
|
for (const r of this.blocks.values()) {
|
|
1734
1708
|
const o = /* @__PURE__ */ new Set(), n = (i) => {
|
|
1735
1709
|
for (const [a, c] of i.results)
|
|
1736
|
-
o.has(a) || c.spec === void 0 || (o.add(a),
|
|
1710
|
+
o.has(a) || c.spec === void 0 || (o.add(a), Is(e, c.spec) && t.push({
|
|
1737
1711
|
label: r.info.label + " / " + a,
|
|
1738
|
-
ref:
|
|
1712
|
+
ref: Je(r.info.id, a),
|
|
1739
1713
|
spec: c.spec
|
|
1740
1714
|
}));
|
|
1741
1715
|
};
|
|
@@ -1744,10 +1718,10 @@ class Vt {
|
|
|
1744
1718
|
return t;
|
|
1745
1719
|
}
|
|
1746
1720
|
static create(e, t, r) {
|
|
1747
|
-
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(
|
|
1748
|
-
for (const u of
|
|
1721
|
+
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), a = Pt(n).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
|
|
1722
|
+
for (const u of se(n)) {
|
|
1749
1723
|
if (!a.has(u.id)) continue;
|
|
1750
|
-
const l =
|
|
1724
|
+
const l = dr(
|
|
1751
1725
|
o.traverse({
|
|
1752
1726
|
field: U(u.id, "prodCtx"),
|
|
1753
1727
|
ignoreError: !0,
|
|
@@ -1758,7 +1732,7 @@ class Vt {
|
|
|
1758
1732
|
field: U(u.id, "prodUiCtx"),
|
|
1759
1733
|
stableIfNotFound: !0
|
|
1760
1734
|
})
|
|
1761
|
-
), d =
|
|
1735
|
+
), d = dr(
|
|
1762
1736
|
o.traverse({
|
|
1763
1737
|
field: U(u.id, "stagingCtx"),
|
|
1764
1738
|
ignoreError: !0,
|
|
@@ -1770,15 +1744,15 @@ class Vt {
|
|
|
1770
1744
|
);
|
|
1771
1745
|
c.set(u.id, { info: u, prod: l, staging: d });
|
|
1772
1746
|
}
|
|
1773
|
-
return new
|
|
1747
|
+
return new Bt(e, c);
|
|
1774
1748
|
}
|
|
1775
1749
|
}
|
|
1776
|
-
function
|
|
1750
|
+
function dr(s, e) {
|
|
1777
1751
|
if (e === void 0)
|
|
1778
1752
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1779
|
-
if (e.ok) return
|
|
1753
|
+
if (e.ok) return cs(e.value, !1, !0);
|
|
1780
1754
|
}
|
|
1781
|
-
function
|
|
1755
|
+
function xt(s, e) {
|
|
1782
1756
|
return {
|
|
1783
1757
|
blockId: e,
|
|
1784
1758
|
args: (n) => B(
|
|
@@ -1794,17 +1768,17 @@ function Ut(s, e) {
|
|
|
1794
1768
|
stableIfNotFound: !0
|
|
1795
1769
|
})) == null ? void 0 : i.getDataAsString();
|
|
1796
1770
|
},
|
|
1797
|
-
uiState: (n) => n.accessor(s).node().getKeyValueAsString(
|
|
1771
|
+
uiState: (n) => n.accessor(s).node().getKeyValueAsString(bt(e)),
|
|
1798
1772
|
blockMeta: (n) => {
|
|
1799
|
-
const i = n.accessor(s).node(), a = B(i.getKeyValueAsJson(
|
|
1800
|
-
for (const u of
|
|
1773
|
+
const i = n.accessor(s).node(), a = B(i.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
|
|
1774
|
+
for (const u of se(a)) c.set(u.id, u);
|
|
1801
1775
|
return c;
|
|
1802
1776
|
}
|
|
1803
1777
|
};
|
|
1804
1778
|
}
|
|
1805
|
-
function
|
|
1779
|
+
function ls(s, e) {
|
|
1806
1780
|
return {
|
|
1807
|
-
...
|
|
1781
|
+
...xt(s, e),
|
|
1808
1782
|
prod: (t) => {
|
|
1809
1783
|
var r;
|
|
1810
1784
|
return (r = t.accessor(s).node({ ignoreError: !0 }).traverse({
|
|
@@ -1821,7 +1795,7 @@ function gs(s, e) {
|
|
|
1821
1795
|
})) == null ? void 0 : o.persist();
|
|
1822
1796
|
return r === void 0 && t.markUnstable("staging_not_rendered"), r;
|
|
1823
1797
|
},
|
|
1824
|
-
getResultsPool: (t) =>
|
|
1798
|
+
getResultsPool: (t) => Bt.create(t, s, e)
|
|
1825
1799
|
};
|
|
1826
1800
|
}
|
|
1827
1801
|
function* z(s, e) {
|
|
@@ -1876,15 +1850,15 @@ function* z(s, e) {
|
|
|
1876
1850
|
K(s);
|
|
1877
1851
|
}
|
|
1878
1852
|
}
|
|
1879
|
-
function
|
|
1853
|
+
function On(s, e) {
|
|
1880
1854
|
const t = {};
|
|
1881
1855
|
for (const [r, o] of Object.entries(s)) t[r] = e(o);
|
|
1882
1856
|
return t;
|
|
1883
1857
|
}
|
|
1884
|
-
function
|
|
1858
|
+
function $e(s, e) {
|
|
1885
1859
|
return s === void 0 ? void 0 : e(s);
|
|
1886
1860
|
}
|
|
1887
|
-
function
|
|
1861
|
+
function $n(s) {
|
|
1888
1862
|
switch (s.type) {
|
|
1889
1863
|
case "GetImportProgress":
|
|
1890
1864
|
return !0;
|
|
@@ -1892,121 +1866,121 @@ function Nn(s) {
|
|
|
1892
1866
|
return !1;
|
|
1893
1867
|
}
|
|
1894
1868
|
}
|
|
1895
|
-
function
|
|
1896
|
-
for (const e of z(s)) if (
|
|
1869
|
+
function In(s) {
|
|
1870
|
+
for (const e of z(s)) if ($n(e)) return !0;
|
|
1897
1871
|
return !1;
|
|
1898
1872
|
}
|
|
1899
|
-
function
|
|
1873
|
+
function et(s) {
|
|
1900
1874
|
return {
|
|
1901
1875
|
type: "ReturnResult",
|
|
1902
1876
|
result: s
|
|
1903
1877
|
};
|
|
1904
1878
|
}
|
|
1905
|
-
function
|
|
1906
|
-
return () =>
|
|
1879
|
+
function k(s) {
|
|
1880
|
+
return () => et(s);
|
|
1907
1881
|
}
|
|
1908
|
-
const
|
|
1882
|
+
const Fn = (s) => {
|
|
1909
1883
|
const e = {};
|
|
1910
1884
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
1911
|
-
return
|
|
1912
|
-
},
|
|
1885
|
+
return k(e);
|
|
1886
|
+
}, An = (s) => {
|
|
1913
1887
|
const e = s.source;
|
|
1914
|
-
if (e === void 0) return
|
|
1888
|
+
if (e === void 0) return k(void 0);
|
|
1915
1889
|
const t = [];
|
|
1916
1890
|
for (const r of e)
|
|
1917
1891
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
1918
|
-
return
|
|
1919
|
-
},
|
|
1892
|
+
return k(t);
|
|
1893
|
+
}, Tn = (s) => {
|
|
1920
1894
|
const e = s.source, t = s.field;
|
|
1921
|
-
return e === void 0 || t === void 0 ?
|
|
1895
|
+
return e === void 0 || t === void 0 ? k(void 0) : ({ cCtx: r }) => {
|
|
1922
1896
|
var o;
|
|
1923
|
-
return
|
|
1897
|
+
return et((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
1924
1898
|
};
|
|
1925
1899
|
};
|
|
1926
|
-
function
|
|
1900
|
+
function us(s, e) {
|
|
1927
1901
|
const t = {}, r = s.length;
|
|
1928
1902
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
1929
1903
|
return t;
|
|
1930
1904
|
}
|
|
1931
|
-
function
|
|
1905
|
+
function Ln(s, e) {
|
|
1932
1906
|
return (t) => {
|
|
1933
1907
|
const r = t.source;
|
|
1934
|
-
return r === void 0 ?
|
|
1908
|
+
return r === void 0 ? k(void 0) : () => ({
|
|
1935
1909
|
type: "ScheduleSubroutine",
|
|
1936
|
-
subroutine:
|
|
1937
|
-
args:
|
|
1910
|
+
subroutine: ds(r.length),
|
|
1911
|
+
args: us(r, (o) => P({ ...s, [e.itVar]: o }, e.mapping))
|
|
1938
1912
|
});
|
|
1939
1913
|
};
|
|
1940
1914
|
}
|
|
1941
|
-
function
|
|
1915
|
+
function ds(s) {
|
|
1942
1916
|
return (e) => {
|
|
1943
1917
|
const t = [];
|
|
1944
1918
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
1945
|
-
return
|
|
1919
|
+
return k(t);
|
|
1946
1920
|
};
|
|
1947
1921
|
}
|
|
1948
|
-
function
|
|
1922
|
+
function Nn(s, e) {
|
|
1949
1923
|
return (t) => {
|
|
1950
1924
|
const r = t.source;
|
|
1951
|
-
if (r === void 0) return
|
|
1925
|
+
if (r === void 0) return k(void 0);
|
|
1952
1926
|
const o = {};
|
|
1953
1927
|
for (const [n, i] of Object.entries(r)) {
|
|
1954
1928
|
const a = { ...s, [e.itVar]: i };
|
|
1955
|
-
o[n] =
|
|
1929
|
+
o[n] = P(a, e.mapping);
|
|
1956
1930
|
}
|
|
1957
1931
|
return () => ({
|
|
1958
1932
|
type: "ScheduleSubroutine",
|
|
1959
|
-
subroutine:
|
|
1933
|
+
subroutine: Dn,
|
|
1960
1934
|
args: o
|
|
1961
1935
|
});
|
|
1962
1936
|
};
|
|
1963
1937
|
}
|
|
1964
|
-
const
|
|
1938
|
+
const Dn = (s) => k(s), Bn = (s) => {
|
|
1965
1939
|
const e = s.arg;
|
|
1966
|
-
return
|
|
1967
|
-
},
|
|
1940
|
+
return k(e === void 0 ? void 0 : e.length === 0);
|
|
1941
|
+
}, xn = (s) => {
|
|
1968
1942
|
const e = s.operand;
|
|
1969
|
-
return
|
|
1970
|
-
},
|
|
1943
|
+
return k(e === void 0 ? void 0 : !e);
|
|
1944
|
+
}, jn = (s) => {
|
|
1971
1945
|
const e = s.operand1, t = s.operand2;
|
|
1972
|
-
return
|
|
1973
|
-
},
|
|
1946
|
+
return k(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
1947
|
+
}, Vn = (s) => {
|
|
1974
1948
|
const e = s.operand1, t = s.operand2;
|
|
1975
|
-
return
|
|
1976
|
-
},
|
|
1949
|
+
return k(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
1950
|
+
}, Un = (s) => {
|
|
1977
1951
|
const e = s.source;
|
|
1978
|
-
return e === void 0 ?
|
|
1952
|
+
return e === void 0 ? k(void 0) : ({ cCtx: t }) => {
|
|
1979
1953
|
var r;
|
|
1980
|
-
return
|
|
1954
|
+
return et((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
1981
1955
|
};
|
|
1982
|
-
},
|
|
1956
|
+
}, Jn = (s) => {
|
|
1983
1957
|
const e = s.source, t = s.field;
|
|
1984
|
-
return
|
|
1958
|
+
return k(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
1985
1959
|
};
|
|
1986
|
-
function
|
|
1960
|
+
function Gn(s, e) {
|
|
1987
1961
|
return (t) => {
|
|
1988
1962
|
const r = t.source;
|
|
1989
|
-
return r === void 0 ?
|
|
1963
|
+
return r === void 0 ? k(void 0) : ({ cCtx: o }) => {
|
|
1990
1964
|
const n = o.accessor(r).node(), i = {};
|
|
1991
1965
|
for (const a of n.listInputFields()) {
|
|
1992
1966
|
const c = n.traverse(a);
|
|
1993
|
-
if (c === void 0) i[a] =
|
|
1967
|
+
if (c === void 0) i[a] = k(void 0);
|
|
1994
1968
|
else {
|
|
1995
1969
|
const u = { ...s, [e.itVar]: c.persist() };
|
|
1996
|
-
i[a] =
|
|
1970
|
+
i[a] = P(u, e.mapping);
|
|
1997
1971
|
}
|
|
1998
1972
|
}
|
|
1999
1973
|
return {
|
|
2000
1974
|
type: "ScheduleSubroutine",
|
|
2001
|
-
subroutine:
|
|
1975
|
+
subroutine: Mn,
|
|
2002
1976
|
args: i
|
|
2003
1977
|
};
|
|
2004
1978
|
};
|
|
2005
1979
|
};
|
|
2006
1980
|
}
|
|
2007
|
-
const
|
|
1981
|
+
const Mn = (s) => k(s), _n = (s) => {
|
|
2008
1982
|
const e = s.source;
|
|
2009
|
-
return e === void 0 ?
|
|
1983
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2010
1984
|
type: "ScheduleComputable",
|
|
2011
1985
|
computable: J.make(
|
|
2012
1986
|
(r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
|
|
@@ -2018,9 +1992,9 @@ const qn = (s) => P(s), Yn = (s) => {
|
|
|
2018
1992
|
}
|
|
2019
1993
|
)
|
|
2020
1994
|
});
|
|
2021
|
-
},
|
|
1995
|
+
}, Kn = (s) => {
|
|
2022
1996
|
const e = s.source;
|
|
2023
|
-
return e === void 0 ?
|
|
1997
|
+
return e === void 0 ? k(void 0) : ({ cCtx: t, drivers: r }) => {
|
|
2024
1998
|
const o = t.accessor(e).node().resourceInfo;
|
|
2025
1999
|
return {
|
|
2026
2000
|
type: "ScheduleComputable",
|
|
@@ -2029,9 +2003,9 @@ const qn = (s) => P(s), Yn = (s) => {
|
|
|
2029
2003
|
})
|
|
2030
2004
|
};
|
|
2031
2005
|
};
|
|
2032
|
-
},
|
|
2006
|
+
}, Hn = (s) => {
|
|
2033
2007
|
const e = s.source;
|
|
2034
|
-
return e === void 0 ?
|
|
2008
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2035
2009
|
type: "ScheduleComputable",
|
|
2036
2010
|
computable: J.make(
|
|
2037
2011
|
(r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
|
|
@@ -2045,266 +2019,266 @@ const qn = (s) => P(s), Yn = (s) => {
|
|
|
2045
2019
|
}
|
|
2046
2020
|
)
|
|
2047
2021
|
});
|
|
2048
|
-
},
|
|
2022
|
+
}, Wn = (s) => {
|
|
2049
2023
|
const e = s.source;
|
|
2050
|
-
return e === void 0 ?
|
|
2024
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2051
2025
|
type: "ScheduleComputable",
|
|
2052
2026
|
computable: t.blobDriver.getDownloadedBlob(e)
|
|
2053
2027
|
});
|
|
2054
|
-
},
|
|
2028
|
+
}, zn = (s) => {
|
|
2055
2029
|
const e = s.source;
|
|
2056
|
-
return e === void 0 ?
|
|
2030
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2057
2031
|
type: "ScheduleComputable",
|
|
2058
2032
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2059
2033
|
});
|
|
2060
|
-
},
|
|
2034
|
+
}, Xn = (s) => (e) => {
|
|
2061
2035
|
const t = e.source;
|
|
2062
|
-
return t === void 0 ?
|
|
2036
|
+
return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
|
|
2063
2037
|
type: "ScheduleComputable",
|
|
2064
2038
|
computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
|
|
2065
2039
|
});
|
|
2066
|
-
},
|
|
2040
|
+
}, qn = (s) => {
|
|
2067
2041
|
const e = s.source;
|
|
2068
|
-
return e === void 0 ?
|
|
2042
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2069
2043
|
type: "ScheduleComputable",
|
|
2070
2044
|
computable: t.uploadDriver.getProgressId(e)
|
|
2071
2045
|
});
|
|
2072
|
-
},
|
|
2046
|
+
}, Yn = (s) => (e) => {
|
|
2073
2047
|
const t = e.source;
|
|
2074
|
-
return t === void 0 ?
|
|
2048
|
+
return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
|
|
2075
2049
|
type: "ScheduleComputable",
|
|
2076
2050
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2077
2051
|
});
|
|
2078
|
-
},
|
|
2052
|
+
}, Qn = (s) => (e) => {
|
|
2079
2053
|
const t = e.source;
|
|
2080
|
-
return t === void 0 ?
|
|
2054
|
+
return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
|
|
2081
2055
|
type: "ScheduleComputable",
|
|
2082
2056
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2083
2057
|
});
|
|
2084
|
-
},
|
|
2058
|
+
}, Zn = (s) => (e) => {
|
|
2085
2059
|
const t = e.source;
|
|
2086
|
-
return t === void 0 ?
|
|
2060
|
+
return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
|
|
2087
2061
|
type: "ScheduleComputable",
|
|
2088
2062
|
computable: r.logDriver.getProgressLogWithInfo(t, s)
|
|
2089
2063
|
});
|
|
2090
|
-
},
|
|
2064
|
+
}, ei = (s) => {
|
|
2091
2065
|
const e = s.source;
|
|
2092
|
-
return e === void 0 ?
|
|
2066
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2093
2067
|
type: "ScheduleComputable",
|
|
2094
2068
|
computable: t.logDriver.getLogHandle(e)
|
|
2095
2069
|
});
|
|
2096
2070
|
};
|
|
2097
|
-
function
|
|
2071
|
+
function P(s, e) {
|
|
2098
2072
|
switch (e.type) {
|
|
2099
2073
|
case "GetFromCtx": {
|
|
2100
2074
|
const t = s[e.variable];
|
|
2101
|
-
return typeof t == "function" ? (r) =>
|
|
2075
|
+
return typeof t == "function" ? (r) => et(t(r.cCtx)) : k(t);
|
|
2102
2076
|
}
|
|
2103
2077
|
case "Isolate":
|
|
2104
2078
|
return ({ drivers: t }) => ({
|
|
2105
2079
|
type: "ScheduleComputable",
|
|
2106
|
-
computable:
|
|
2080
|
+
computable: fs(t, s, e.cfg)
|
|
2107
2081
|
});
|
|
2108
2082
|
case "Immediate":
|
|
2109
|
-
return
|
|
2083
|
+
return k(e.value);
|
|
2110
2084
|
case "GetJsonField":
|
|
2111
2085
|
return () => ({
|
|
2112
2086
|
type: "ScheduleSubroutine",
|
|
2113
|
-
subroutine:
|
|
2087
|
+
subroutine: Jn,
|
|
2114
2088
|
args: {
|
|
2115
|
-
source:
|
|
2116
|
-
field:
|
|
2089
|
+
source: P(s, e.source),
|
|
2090
|
+
field: P(s, e.field)
|
|
2117
2091
|
}
|
|
2118
2092
|
});
|
|
2119
2093
|
case "MapArrayValues":
|
|
2120
2094
|
return () => ({
|
|
2121
2095
|
type: "ScheduleSubroutine",
|
|
2122
|
-
subroutine:
|
|
2096
|
+
subroutine: Ln(s, e),
|
|
2123
2097
|
args: {
|
|
2124
|
-
source:
|
|
2098
|
+
source: P(s, e.source)
|
|
2125
2099
|
}
|
|
2126
2100
|
});
|
|
2127
2101
|
case "MapRecordValues":
|
|
2128
2102
|
return () => ({
|
|
2129
2103
|
type: "ScheduleSubroutine",
|
|
2130
|
-
subroutine:
|
|
2104
|
+
subroutine: Nn(s, e),
|
|
2131
2105
|
args: {
|
|
2132
|
-
source:
|
|
2106
|
+
source: P(s, e.source)
|
|
2133
2107
|
}
|
|
2134
2108
|
});
|
|
2135
2109
|
case "MakeObject":
|
|
2136
2110
|
return () => ({
|
|
2137
2111
|
type: "ScheduleSubroutine",
|
|
2138
|
-
subroutine:
|
|
2139
|
-
args:
|
|
2112
|
+
subroutine: Fn,
|
|
2113
|
+
args: On(e.template, (t) => P(s, t))
|
|
2140
2114
|
});
|
|
2141
2115
|
case "MakeArray":
|
|
2142
2116
|
return () => ({
|
|
2143
2117
|
type: "ScheduleSubroutine",
|
|
2144
|
-
subroutine:
|
|
2145
|
-
args:
|
|
2118
|
+
subroutine: ds(e.template.length),
|
|
2119
|
+
args: us(e.template, (t) => P(s, t))
|
|
2146
2120
|
});
|
|
2147
2121
|
case "Flatten":
|
|
2148
2122
|
return () => ({
|
|
2149
2123
|
type: "ScheduleSubroutine",
|
|
2150
|
-
subroutine:
|
|
2124
|
+
subroutine: An,
|
|
2151
2125
|
args: {
|
|
2152
|
-
source:
|
|
2126
|
+
source: P(s, e.source)
|
|
2153
2127
|
}
|
|
2154
2128
|
});
|
|
2155
2129
|
case "IsEmpty":
|
|
2156
2130
|
return () => ({
|
|
2157
2131
|
type: "ScheduleSubroutine",
|
|
2158
|
-
subroutine:
|
|
2132
|
+
subroutine: Bn,
|
|
2159
2133
|
args: {
|
|
2160
|
-
arg:
|
|
2134
|
+
arg: P(s, e.arg)
|
|
2161
2135
|
}
|
|
2162
2136
|
});
|
|
2163
2137
|
case "Not":
|
|
2164
2138
|
return () => ({
|
|
2165
2139
|
type: "ScheduleSubroutine",
|
|
2166
|
-
subroutine:
|
|
2140
|
+
subroutine: xn,
|
|
2167
2141
|
args: {
|
|
2168
|
-
operand:
|
|
2142
|
+
operand: P(s, e.operand)
|
|
2169
2143
|
}
|
|
2170
2144
|
});
|
|
2171
2145
|
case "And":
|
|
2172
2146
|
return () => ({
|
|
2173
2147
|
type: "ScheduleSubroutine",
|
|
2174
|
-
subroutine:
|
|
2148
|
+
subroutine: jn,
|
|
2175
2149
|
args: {
|
|
2176
|
-
operand1:
|
|
2177
|
-
operand2:
|
|
2150
|
+
operand1: P(s, e.operand1),
|
|
2151
|
+
operand2: P(s, e.operand2)
|
|
2178
2152
|
}
|
|
2179
2153
|
});
|
|
2180
2154
|
case "Or":
|
|
2181
2155
|
return () => ({
|
|
2182
2156
|
type: "ScheduleSubroutine",
|
|
2183
|
-
subroutine:
|
|
2157
|
+
subroutine: Vn,
|
|
2184
2158
|
args: {
|
|
2185
|
-
operand1:
|
|
2186
|
-
operand2:
|
|
2159
|
+
operand1: P(s, e.operand1),
|
|
2160
|
+
operand2: P(s, e.operand2)
|
|
2187
2161
|
}
|
|
2188
2162
|
});
|
|
2189
2163
|
case "MapResourceFields":
|
|
2190
2164
|
return () => ({
|
|
2191
2165
|
type: "ScheduleSubroutine",
|
|
2192
|
-
subroutine:
|
|
2166
|
+
subroutine: Gn(s, e),
|
|
2193
2167
|
args: {
|
|
2194
|
-
source:
|
|
2168
|
+
source: P(s, e.source)
|
|
2195
2169
|
}
|
|
2196
2170
|
});
|
|
2197
2171
|
case "GetResourceField":
|
|
2198
2172
|
return () => ({
|
|
2199
2173
|
type: "ScheduleSubroutine",
|
|
2200
|
-
subroutine:
|
|
2174
|
+
subroutine: Tn,
|
|
2201
2175
|
args: {
|
|
2202
|
-
source:
|
|
2203
|
-
field:
|
|
2176
|
+
source: P(s, e.source),
|
|
2177
|
+
field: P(s, e.field)
|
|
2204
2178
|
}
|
|
2205
2179
|
});
|
|
2206
2180
|
case "GetResourceValueAsJson":
|
|
2207
2181
|
return () => ({
|
|
2208
2182
|
type: "ScheduleSubroutine",
|
|
2209
|
-
subroutine:
|
|
2183
|
+
subroutine: Un,
|
|
2210
2184
|
args: {
|
|
2211
|
-
source:
|
|
2185
|
+
source: P(s, e.source)
|
|
2212
2186
|
}
|
|
2213
2187
|
});
|
|
2214
2188
|
case "GetBlobContent":
|
|
2215
2189
|
return () => ({
|
|
2216
2190
|
type: "ScheduleSubroutine",
|
|
2217
|
-
subroutine:
|
|
2191
|
+
subroutine: _n,
|
|
2218
2192
|
args: {
|
|
2219
|
-
source:
|
|
2193
|
+
source: P(s, e.source)
|
|
2220
2194
|
}
|
|
2221
2195
|
});
|
|
2222
2196
|
case "GetBlobContentAsString":
|
|
2223
2197
|
return () => ({
|
|
2224
2198
|
type: "ScheduleSubroutine",
|
|
2225
|
-
subroutine:
|
|
2199
|
+
subroutine: Kn,
|
|
2226
2200
|
args: {
|
|
2227
|
-
source:
|
|
2201
|
+
source: P(s, e.source)
|
|
2228
2202
|
}
|
|
2229
2203
|
});
|
|
2230
2204
|
case "GetBlobContentAsJson":
|
|
2231
2205
|
return () => ({
|
|
2232
2206
|
type: "ScheduleSubroutine",
|
|
2233
|
-
subroutine:
|
|
2207
|
+
subroutine: Hn,
|
|
2234
2208
|
args: {
|
|
2235
|
-
source:
|
|
2209
|
+
source: P(s, e.source)
|
|
2236
2210
|
}
|
|
2237
2211
|
});
|
|
2238
2212
|
case "GetDownloadedBlobContent":
|
|
2239
2213
|
return () => ({
|
|
2240
2214
|
type: "ScheduleSubroutine",
|
|
2241
|
-
subroutine:
|
|
2215
|
+
subroutine: Wn,
|
|
2242
2216
|
args: {
|
|
2243
|
-
source:
|
|
2217
|
+
source: P(s, e.source)
|
|
2244
2218
|
}
|
|
2245
2219
|
});
|
|
2246
2220
|
case "GetOnDemandBlobContent":
|
|
2247
2221
|
return () => ({
|
|
2248
2222
|
type: "ScheduleSubroutine",
|
|
2249
|
-
subroutine:
|
|
2223
|
+
subroutine: zn,
|
|
2250
2224
|
args: {
|
|
2251
|
-
source:
|
|
2225
|
+
source: P(s, e.source)
|
|
2252
2226
|
}
|
|
2253
2227
|
});
|
|
2254
2228
|
case "ExtractArchiveAndGetURL":
|
|
2255
2229
|
return () => ({
|
|
2256
2230
|
type: "ScheduleSubroutine",
|
|
2257
|
-
subroutine:
|
|
2231
|
+
subroutine: Xn(e.format),
|
|
2258
2232
|
args: {
|
|
2259
|
-
source:
|
|
2233
|
+
source: P(s, e.source)
|
|
2260
2234
|
}
|
|
2261
2235
|
});
|
|
2262
2236
|
case "GetImportProgress":
|
|
2263
2237
|
return () => ({
|
|
2264
2238
|
type: "ScheduleSubroutine",
|
|
2265
|
-
subroutine:
|
|
2239
|
+
subroutine: qn,
|
|
2266
2240
|
args: {
|
|
2267
|
-
source:
|
|
2241
|
+
source: P(s, e.source)
|
|
2268
2242
|
}
|
|
2269
2243
|
});
|
|
2270
2244
|
case "GetLastLogs":
|
|
2271
2245
|
return () => ({
|
|
2272
2246
|
type: "ScheduleSubroutine",
|
|
2273
|
-
subroutine:
|
|
2247
|
+
subroutine: Yn(e.lines),
|
|
2274
2248
|
args: {
|
|
2275
|
-
source:
|
|
2249
|
+
source: P(s, e.source)
|
|
2276
2250
|
}
|
|
2277
2251
|
});
|
|
2278
2252
|
case "GetProgressLog":
|
|
2279
2253
|
return () => ({
|
|
2280
2254
|
type: "ScheduleSubroutine",
|
|
2281
|
-
subroutine:
|
|
2255
|
+
subroutine: Qn(e.patternToSearch),
|
|
2282
2256
|
args: {
|
|
2283
|
-
source:
|
|
2257
|
+
source: P(s, e.source)
|
|
2284
2258
|
}
|
|
2285
2259
|
});
|
|
2286
2260
|
case "GetProgressLogWithInfo":
|
|
2287
2261
|
return () => ({
|
|
2288
2262
|
type: "ScheduleSubroutine",
|
|
2289
|
-
subroutine:
|
|
2263
|
+
subroutine: Zn(e.patternToSearch),
|
|
2290
2264
|
args: {
|
|
2291
|
-
source:
|
|
2265
|
+
source: P(s, e.source)
|
|
2292
2266
|
}
|
|
2293
2267
|
});
|
|
2294
2268
|
case "GetLogHandle":
|
|
2295
2269
|
return () => ({
|
|
2296
2270
|
type: "ScheduleSubroutine",
|
|
2297
|
-
subroutine:
|
|
2271
|
+
subroutine: ei,
|
|
2298
2272
|
args: {
|
|
2299
|
-
source:
|
|
2273
|
+
source: P(s, e.source)
|
|
2300
2274
|
}
|
|
2301
2275
|
});
|
|
2302
2276
|
default:
|
|
2303
2277
|
return K(e);
|
|
2304
2278
|
}
|
|
2305
2279
|
}
|
|
2306
|
-
const
|
|
2307
|
-
function
|
|
2280
|
+
const ti = ["$prod", "$staging"];
|
|
2281
|
+
function ri(s) {
|
|
2308
2282
|
return {
|
|
2309
2283
|
$blockId: s.blockId,
|
|
2310
2284
|
$args: (e) => JSON.parse(s.args(e)),
|
|
@@ -2316,16 +2290,16 @@ function li(s) {
|
|
|
2316
2290
|
$staging: s.staging
|
|
2317
2291
|
};
|
|
2318
2292
|
}
|
|
2319
|
-
const
|
|
2320
|
-
function
|
|
2321
|
-
return s.op ==
|
|
2293
|
+
const ps = Symbol(), hs = "return", si = { op: ps, arg: hs };
|
|
2294
|
+
function oi(s) {
|
|
2295
|
+
return s.op == ps && s.arg == hs;
|
|
2322
2296
|
}
|
|
2323
|
-
function
|
|
2297
|
+
function ni() {
|
|
2324
2298
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2325
2299
|
}
|
|
2326
|
-
function
|
|
2327
|
-
const o = new
|
|
2328
|
-
if (
|
|
2300
|
+
function pr(s, e, t, r) {
|
|
2301
|
+
const o = new Wr(t), n = (a, c) => {
|
|
2302
|
+
if (oi(a))
|
|
2329
2303
|
return e.result = c, !1;
|
|
2330
2304
|
const u = B(e.pendingSubroutines.get(a.op));
|
|
2331
2305
|
if (a.arg in u.args) throw new Error("argument already set");
|
|
@@ -2377,27 +2351,27 @@ function yr(s, e, t, r) {
|
|
|
2377
2351
|
}
|
|
2378
2352
|
return i;
|
|
2379
2353
|
}
|
|
2380
|
-
function
|
|
2381
|
-
return
|
|
2354
|
+
function ii(s, e, t, r = {}) {
|
|
2355
|
+
return fs(s, ri(e), t, r);
|
|
2382
2356
|
}
|
|
2383
|
-
function
|
|
2357
|
+
function fs(s, e, t, r = {}) {
|
|
2384
2358
|
const o = `${e.blockId}#` + Z({
|
|
2385
2359
|
ctx: Object.fromEntries(
|
|
2386
|
-
Object.entries(e).filter(([n]) =>
|
|
2360
|
+
Object.entries(e).filter(([n]) => ti.indexOf(n) === -1)
|
|
2387
2361
|
),
|
|
2388
2362
|
cfg: t
|
|
2389
2363
|
});
|
|
2390
2364
|
return J.makeRaw(
|
|
2391
2365
|
(n) => {
|
|
2392
|
-
const i = { drivers: s, cCtx: n }, a =
|
|
2366
|
+
const i = { drivers: s, cCtx: n }, a = ni();
|
|
2393
2367
|
return {
|
|
2394
|
-
ir:
|
|
2368
|
+
ir: pr(
|
|
2395
2369
|
i,
|
|
2396
2370
|
a,
|
|
2397
2371
|
[
|
|
2398
2372
|
{
|
|
2399
|
-
destination:
|
|
2400
|
-
operation:
|
|
2373
|
+
destination: si,
|
|
2374
|
+
operation: P(e, t)
|
|
2401
2375
|
}
|
|
2402
2376
|
],
|
|
2403
2377
|
!0
|
|
@@ -2405,7 +2379,7 @@ function Ss(s, e, t, r = {}) {
|
|
|
2405
2379
|
postprocessValue(u) {
|
|
2406
2380
|
const l = [];
|
|
2407
2381
|
for (const E of u)
|
|
2408
|
-
l.push({ destination: E.destination, operation:
|
|
2382
|
+
l.push({ destination: E.destination, operation: k(E.computable) });
|
|
2409
2383
|
const d = {
|
|
2410
2384
|
drivers: s,
|
|
2411
2385
|
get cCtx() {
|
|
@@ -2418,7 +2392,7 @@ function Ss(s, e, t, r = {}) {
|
|
|
2418
2392
|
result: a.result,
|
|
2419
2393
|
pendingSubroutines: f
|
|
2420
2394
|
};
|
|
2421
|
-
if (
|
|
2395
|
+
if (pr(d, h, l, !1), !("result" in h))
|
|
2422
2396
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2423
2397
|
return h.result;
|
|
2424
2398
|
}
|
|
@@ -2427,13 +2401,13 @@ function Ss(s, e, t, r = {}) {
|
|
|
2427
2401
|
{ ...r, key: o }
|
|
2428
2402
|
);
|
|
2429
2403
|
}
|
|
2430
|
-
function
|
|
2404
|
+
function ai(s) {
|
|
2431
2405
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
2432
2406
|
}
|
|
2433
|
-
function
|
|
2407
|
+
function hr(s) {
|
|
2434
2408
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2435
2409
|
}
|
|
2436
|
-
class
|
|
2410
|
+
class Ze {
|
|
2437
2411
|
constructor(e, t, r, o, n) {
|
|
2438
2412
|
w(this, "callbackRegistry");
|
|
2439
2413
|
w(this, "fnJSONStringify");
|
|
@@ -2442,7 +2416,7 @@ class rt {
|
|
|
2442
2416
|
w(this, "computableCtx");
|
|
2443
2417
|
w(this, "accessors", /* @__PURE__ */ new Map());
|
|
2444
2418
|
w(this, "meta");
|
|
2445
|
-
w(this, "errorRepo", new
|
|
2419
|
+
w(this, "errorRepo", new ci());
|
|
2446
2420
|
//
|
|
2447
2421
|
// Result Pool
|
|
2448
2422
|
//
|
|
@@ -2466,12 +2440,12 @@ class rt {
|
|
|
2466
2440
|
try {
|
|
2467
2441
|
this.vm.unwrapResult(this.vm.evalCode(e, "bundle.js", { type: "global" })).dispose();
|
|
2468
2442
|
} catch (t) {
|
|
2469
|
-
throw
|
|
2443
|
+
throw Ze.cleanErrorContext(t), t;
|
|
2470
2444
|
}
|
|
2471
2445
|
}
|
|
2472
2446
|
runCallback(e, ...t) {
|
|
2473
2447
|
try {
|
|
2474
|
-
return
|
|
2448
|
+
return wt.withScope((r) => {
|
|
2475
2449
|
const o = r.manage(this.vm.getProp(this.callbackRegistry, e));
|
|
2476
2450
|
if (this.vm.typeof(o) !== "function")
|
|
2477
2451
|
throw new Error(`No such callback: ${e}`);
|
|
@@ -2486,7 +2460,7 @@ class rt {
|
|
|
2486
2460
|
);
|
|
2487
2461
|
});
|
|
2488
2462
|
} catch (r) {
|
|
2489
|
-
throw
|
|
2463
|
+
throw Ze.cleanErrorContext(r), this.errorRepo.getOriginal(r);
|
|
2490
2464
|
}
|
|
2491
2465
|
}
|
|
2492
2466
|
//
|
|
@@ -2541,13 +2515,13 @@ class rt {
|
|
|
2541
2515
|
return this.getAccessor(e).listDynamicFields();
|
|
2542
2516
|
}
|
|
2543
2517
|
getKeyValueBase64(e, t) {
|
|
2544
|
-
return
|
|
2518
|
+
return hr(this.getAccessor(e).getKeyValue(t));
|
|
2545
2519
|
}
|
|
2546
2520
|
getKeyValueAsString(e, t) {
|
|
2547
2521
|
return this.getAccessor(e).getKeyValueAsString(t);
|
|
2548
2522
|
}
|
|
2549
2523
|
getDataBase64(e) {
|
|
2550
|
-
return
|
|
2524
|
+
return hr(this.getAccessor(e).getData());
|
|
2551
2525
|
}
|
|
2552
2526
|
getDataAsString(e) {
|
|
2553
2527
|
return this.getAccessor(e).getDataAsString();
|
|
@@ -2558,7 +2532,7 @@ class rt {
|
|
|
2558
2532
|
parsePObjectCollection(e, t, r, ...o) {
|
|
2559
2533
|
const n = this.getAccessor(e);
|
|
2560
2534
|
if (!n.getIsReadyOrError()) return;
|
|
2561
|
-
const i =
|
|
2535
|
+
const i = Pn(n, t, r, o), a = {};
|
|
2562
2536
|
for (const [c, u] of Object.entries(i))
|
|
2563
2537
|
a[c] = le(u, (l) => this.wrapAccessor(l));
|
|
2564
2538
|
return a;
|
|
@@ -2567,7 +2541,7 @@ class rt {
|
|
|
2567
2541
|
// Blobs
|
|
2568
2542
|
//
|
|
2569
2543
|
registerComputable(e, t) {
|
|
2570
|
-
const r = `${e}_${
|
|
2544
|
+
const r = `${e}_${ye()}`;
|
|
2571
2545
|
return this.computablesToResolve[r] = t, r;
|
|
2572
2546
|
}
|
|
2573
2547
|
getBlobContentAsString(e) {
|
|
@@ -2706,7 +2680,7 @@ class rt {
|
|
|
2706
2680
|
obj: {
|
|
2707
2681
|
id: t.obj.id,
|
|
2708
2682
|
spec: t.obj.spec,
|
|
2709
|
-
data:
|
|
2683
|
+
data: jr(t.obj.data, (r) => this.wrapAccessor(r))
|
|
2710
2684
|
}
|
|
2711
2685
|
}))
|
|
2712
2686
|
};
|
|
@@ -2743,7 +2717,7 @@ class rt {
|
|
|
2743
2717
|
"can't instantiate PTable from this context (most porbably called from the future mapper)"
|
|
2744
2718
|
);
|
|
2745
2719
|
return this.env.driverKit.pFrameDriver.createPTable(
|
|
2746
|
-
|
|
2720
|
+
vt(
|
|
2747
2721
|
e,
|
|
2748
2722
|
(t) => le(t, (r) => this.transformInputPData(r))
|
|
2749
2723
|
),
|
|
@@ -2757,7 +2731,7 @@ class rt {
|
|
|
2757
2731
|
* - Passes through other values
|
|
2758
2732
|
*/
|
|
2759
2733
|
transformInputPData(e) {
|
|
2760
|
-
return typeof e == "string" ? this.getAccessor(e) :
|
|
2734
|
+
return typeof e == "string" ? this.getAccessor(e) : Vr(e) ? Ur(e, (t) => this.getAccessor(t)) : e;
|
|
2761
2735
|
}
|
|
2762
2736
|
//
|
|
2763
2737
|
// Computable
|
|
@@ -2776,7 +2750,7 @@ class rt {
|
|
|
2776
2750
|
}
|
|
2777
2751
|
wrapAccessor(e) {
|
|
2778
2752
|
if (e !== void 0) {
|
|
2779
|
-
const t =
|
|
2753
|
+
const t = ye();
|
|
2780
2754
|
return this.accessors.set(t, e), t;
|
|
2781
2755
|
}
|
|
2782
2756
|
}
|
|
@@ -2809,7 +2783,7 @@ class rt {
|
|
|
2809
2783
|
r = this.vm.null;
|
|
2810
2784
|
break;
|
|
2811
2785
|
}
|
|
2812
|
-
if (
|
|
2786
|
+
if (ai(e)) {
|
|
2813
2787
|
r = this.vm.newArrayBuffer(e), o = !0;
|
|
2814
2788
|
break;
|
|
2815
2789
|
}
|
|
@@ -2845,12 +2819,12 @@ class rt {
|
|
|
2845
2819
|
return JSON.parse(t);
|
|
2846
2820
|
}
|
|
2847
2821
|
injectCtx() {
|
|
2848
|
-
|
|
2822
|
+
wt.withScope((e) => {
|
|
2849
2823
|
const t = e.manage(this.vm.newObject()), r = this.blockCtx.args(this.computableCtx), o = this.blockCtx.activeArgs(this.computableCtx), n = this.blockCtx.uiState(this.computableCtx);
|
|
2850
2824
|
this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), n !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(n))), o !== void 0 && this.vm.setProp(t, "activeArgs", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
2851
2825
|
t,
|
|
2852
2826
|
"featureFlags",
|
|
2853
|
-
this.exportObjectUniversal(
|
|
2827
|
+
this.exportObjectUniversal(Fs.GlobalCfgRenderCtxFeatureFlags, e)
|
|
2854
2828
|
);
|
|
2855
2829
|
const i = (a, c) => {
|
|
2856
2830
|
const u = (...l) => {
|
|
@@ -2943,13 +2917,13 @@ class rt {
|
|
|
2943
2917
|
});
|
|
2944
2918
|
}
|
|
2945
2919
|
}
|
|
2946
|
-
class
|
|
2920
|
+
class ci {
|
|
2947
2921
|
constructor() {
|
|
2948
2922
|
w(this, "errorIdToError", /* @__PURE__ */ new Map());
|
|
2949
2923
|
}
|
|
2950
2924
|
/** Sets the error to the repository and returns a mimicrated error that also has uuid key of the original error. */
|
|
2951
2925
|
setAndRecreateForQuickJS(e) {
|
|
2952
|
-
const t =
|
|
2926
|
+
const t = ye();
|
|
2953
2927
|
return this.errorIdToError.set(t, e), e instanceof Error ? {
|
|
2954
2928
|
name: `${e.name}/uuid:${t}`,
|
|
2955
2929
|
message: e.message
|
|
@@ -2960,20 +2934,20 @@ class gi {
|
|
|
2960
2934
|
}
|
|
2961
2935
|
/** Returns the original error that was stored by parsing uuid of mimicrated error. */
|
|
2962
2936
|
getOriginal(e) {
|
|
2963
|
-
if (!(e instanceof
|
|
2964
|
-
return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError",
|
|
2937
|
+
if (!(e instanceof so.QuickJSUnwrapError))
|
|
2938
|
+
return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", xe(e)), e;
|
|
2965
2939
|
if (!("name" in e.cause))
|
|
2966
|
-
return console.warn("ErrorRepo: quickJSError.cause is not an Error",
|
|
2940
|
+
return console.warn("ErrorRepo: quickJSError.cause is not an Error", xe(e)), e;
|
|
2967
2941
|
const t = e.cause.name, r = t.slice(t.indexOf("/uuid:") + 6);
|
|
2968
2942
|
if (!r)
|
|
2969
|
-
throw new Error(`ErrorRepo: quickJSError.cause.name does not contain errorId: ${t}, ${
|
|
2943
|
+
throw new Error(`ErrorRepo: quickJSError.cause.name does not contain errorId: ${t}, ${xe(e)}`);
|
|
2970
2944
|
const o = this.errorIdToError.get(r);
|
|
2971
2945
|
if (o === void 0)
|
|
2972
|
-
throw new Error(`ErrorRepo: errorId not found: ${r}, ${
|
|
2973
|
-
return new
|
|
2946
|
+
throw new Error(`ErrorRepo: errorId not found: ${r}, ${xe(e)}`);
|
|
2947
|
+
return new li(e, o);
|
|
2974
2948
|
}
|
|
2975
2949
|
}
|
|
2976
|
-
class
|
|
2950
|
+
class li extends Error {
|
|
2977
2951
|
constructor(t, r) {
|
|
2978
2952
|
var o;
|
|
2979
2953
|
super("", { cause: r });
|
|
@@ -2988,8 +2962,8 @@ ${this.stack}
|
|
|
2988
2962
|
`;
|
|
2989
2963
|
}
|
|
2990
2964
|
}
|
|
2991
|
-
function
|
|
2992
|
-
return
|
|
2965
|
+
function tt(s, e) {
|
|
2966
|
+
return $e(
|
|
2993
2967
|
s.traverse(
|
|
2994
2968
|
{
|
|
2995
2969
|
field: U(e, "blockPack"),
|
|
@@ -2999,59 +2973,59 @@ function ot(s, e) {
|
|
|
2999
2973
|
{ field: A.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
|
|
3000
2974
|
),
|
|
3001
2975
|
(t) => {
|
|
3002
|
-
const r = t.getDataAsJson(), o =
|
|
2976
|
+
const r = t.getDataAsJson(), o = Jr(r.config);
|
|
3003
2977
|
return { bpId: t.resourceInfo.id.toString(), info: r, cfg: o };
|
|
3004
2978
|
}
|
|
3005
2979
|
);
|
|
3006
2980
|
}
|
|
3007
|
-
const
|
|
3008
|
-
function
|
|
2981
|
+
const Me = process.env.MI_LOG_OUTPUT_STATUS;
|
|
2982
|
+
function ui(s, e, t, r, o, n = {}) {
|
|
3009
2983
|
const i = `${e.blockId}#lambda#${o}#${t.handle}`;
|
|
3010
2984
|
return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), J.makeRaw((a) => {
|
|
3011
|
-
const c = new
|
|
2985
|
+
const c = new wt();
|
|
3012
2986
|
a.addOnDestroy(() => c.dispose());
|
|
3013
2987
|
const u = c.manage(s.quickJs.newRuntime());
|
|
3014
2988
|
u.setMemoryLimit(1024 * 1024 * 8), u.setMaxStackSize(1024 * 320);
|
|
3015
|
-
const l = c.manage(u.newContext()), d = new
|
|
2989
|
+
const l = c.manage(u.newContext()), d = new Ze(c, l, e, s, a);
|
|
3016
2990
|
d.evaluateBundle(r.content);
|
|
3017
2991
|
const f = d.runCallback(t.handle);
|
|
3018
2992
|
d.resetComputableCtx();
|
|
3019
2993
|
let h = 0;
|
|
3020
|
-
return
|
|
2994
|
+
return Me && Me !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
3021
2995
|
ir: d.computablesToResolve,
|
|
3022
|
-
postprocessValue: (E, { unstableMarker: g, stable:
|
|
2996
|
+
postprocessValue: (E, { unstableMarker: g, stable: N }) => {
|
|
3023
2997
|
for (const [j, $] of Object.entries(E)) d.runCallback(j, $);
|
|
3024
2998
|
const T = d.importObjectUniversal(f);
|
|
3025
|
-
return h++,
|
|
3026
|
-
|
|
2999
|
+
return h++, Me && (Me !== "unstable-only" || !N) && console.log(
|
|
3000
|
+
N ? `Stable output ${t.handle} calculated ${T !== void 0 ? "defined" : "undefined"}; (#${h})` : `Unstable output ${t.handle}; marker = ${g}; ${T !== void 0 ? "defined" : "undefined"} (#${h})`
|
|
3027
3001
|
), T;
|
|
3028
3002
|
}
|
|
3029
3003
|
};
|
|
3030
3004
|
}, n);
|
|
3031
3005
|
}
|
|
3032
|
-
function
|
|
3033
|
-
return
|
|
3006
|
+
function di(s) {
|
|
3007
|
+
return Gr(s) ? s.isActive === !0 : In(s);
|
|
3034
3008
|
}
|
|
3035
|
-
function
|
|
3036
|
-
if (
|
|
3009
|
+
function Ie(s, e, t, r, o, n = {}) {
|
|
3010
|
+
if (Gr(t)) {
|
|
3037
3011
|
if (r === void 0) throw new Error("No code bundle.");
|
|
3038
|
-
return
|
|
3039
|
-
} else return
|
|
3012
|
+
return ui(s, e, t, r, o, n);
|
|
3013
|
+
} else return ii(s.driverKit, e, t, n);
|
|
3040
3014
|
}
|
|
3041
|
-
function
|
|
3015
|
+
function pi(s, e, t) {
|
|
3042
3016
|
return J.make(
|
|
3043
3017
|
(r) => {
|
|
3044
|
-
var E, g,
|
|
3045
|
-
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(
|
|
3046
|
-
o.getKeyValueAsJson(
|
|
3018
|
+
var E, g, N, T, j, $, G, pe;
|
|
3019
|
+
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(Nt)), i = B(o.getKeyValueAsJson(Te)), a = B(o.getKeyValueAsJson(Le)), c = B(o.getKeyValueAsJson(de)), u = B(
|
|
3020
|
+
o.getKeyValueAsJson(Ye)
|
|
3047
3021
|
), l = /* @__PURE__ */ new Map();
|
|
3048
|
-
for (const { id: L } of
|
|
3022
|
+
for (const { id: L } of se(c)) {
|
|
3049
3023
|
const X = o.traverse({
|
|
3050
3024
|
field: U(L, "currentArgs"),
|
|
3051
3025
|
assertFieldType: "Dynamic",
|
|
3052
3026
|
errorIfFieldNotSet: !0
|
|
3053
3027
|
});
|
|
3054
|
-
let
|
|
3028
|
+
let ne;
|
|
3055
3029
|
const W = o.traverse({
|
|
3056
3030
|
field: U(L, "prodArgs"),
|
|
3057
3031
|
assertFieldType: "Dynamic",
|
|
@@ -3067,54 +3041,54 @@ function wi(s, e, t) {
|
|
|
3067
3041
|
assertFieldType: "Dynamic",
|
|
3068
3042
|
errorIfFieldNotFound: !0
|
|
3069
3043
|
});
|
|
3070
|
-
|
|
3044
|
+
ne = {
|
|
3071
3045
|
arguments: W.getDataAsJson(),
|
|
3072
3046
|
stale: X.id !== W.id,
|
|
3073
3047
|
outputError: M.error !== void 0 || V.error !== void 0 || ((E = M.value) == null ? void 0 : E.getError()) !== void 0 || ((g = V.value) == null ? void 0 : g.getError()) !== void 0,
|
|
3074
|
-
outputsError: ((
|
|
3075
|
-
exportsError: (($ = V.error) == null ? void 0 : $.getDataAsString()) ?? ((
|
|
3048
|
+
outputsError: ((N = M.error) == null ? void 0 : N.getDataAsString()) ?? ((j = (T = M.value) == null ? void 0 : T.getError()) == null ? void 0 : j.getDataAsString()),
|
|
3049
|
+
exportsError: (($ = V.error) == null ? void 0 : $.getDataAsString()) ?? ((pe = (G = V.value) == null ? void 0 : G.getError()) == null ? void 0 : pe.getDataAsString()),
|
|
3076
3050
|
finished: (M.value !== void 0 && M.value.getIsReadyOrError() || M.error !== void 0 && M.error.getIsReadyOrError()) && (V.value !== void 0 && V.value.getIsReadyOrError() || V.error !== void 0 && V.error.getIsReadyOrError())
|
|
3077
3051
|
};
|
|
3078
3052
|
}
|
|
3079
|
-
l.set(L, { currentArguments: X.getDataAsJson(), prod:
|
|
3053
|
+
l.set(L, { currentArguments: X.getDataAsJson(), prod: ne });
|
|
3080
3054
|
}
|
|
3081
|
-
const d =
|
|
3055
|
+
const d = Xe(c, (L) => l.get(L).currentArguments), f = new Set(u.blocksInLimbo), h = [...se(c)].map(({ id: L, label: X, renderingMode: ne }) => {
|
|
3082
3056
|
var S, R, O, C, F;
|
|
3083
3057
|
const W = B(l.get(L)), M = B(d.nodes.get(L));
|
|
3084
3058
|
let V = "NotCalculated";
|
|
3085
3059
|
W.prod !== void 0 && (f.has(L) ? V = "Limbo" : V = W.prod.finished ? "Done" : "Running");
|
|
3086
|
-
const q =
|
|
3087
|
-
const
|
|
3060
|
+
const q = tt(o, L), { sections: he, title: v, inputsValid: p, sdkVersion: m } = $e(q, ({ bpId: D, cfg: I }) => {
|
|
3061
|
+
const oe = xt(s, L);
|
|
3088
3062
|
return {
|
|
3089
|
-
sections:
|
|
3063
|
+
sections: Ie(
|
|
3090
3064
|
t,
|
|
3091
|
-
|
|
3065
|
+
oe,
|
|
3092
3066
|
I.sections,
|
|
3093
3067
|
I.code,
|
|
3094
|
-
|
|
3068
|
+
D
|
|
3095
3069
|
).wrap({
|
|
3096
|
-
recover: (
|
|
3070
|
+
recover: (we) => (t.logger.error("Error in block model sections"), t.logger.error(we), [])
|
|
3097
3071
|
}),
|
|
3098
|
-
title:
|
|
3072
|
+
title: $e(
|
|
3099
3073
|
I.title,
|
|
3100
|
-
(
|
|
3074
|
+
(we) => Ie(
|
|
3101
3075
|
t,
|
|
3102
|
-
|
|
3103
|
-
|
|
3076
|
+
oe,
|
|
3077
|
+
we,
|
|
3104
3078
|
I.code,
|
|
3105
|
-
|
|
3079
|
+
D
|
|
3106
3080
|
).wrap({
|
|
3107
|
-
recover: (
|
|
3081
|
+
recover: (Ps) => (t.logger.error("Error in block model title"), t.logger.error(Ps), "Invalid title")
|
|
3108
3082
|
})
|
|
3109
3083
|
),
|
|
3110
|
-
inputsValid:
|
|
3084
|
+
inputsValid: Ie(
|
|
3111
3085
|
t,
|
|
3112
|
-
|
|
3086
|
+
oe,
|
|
3113
3087
|
I.inputsValid,
|
|
3114
3088
|
I.code,
|
|
3115
|
-
|
|
3089
|
+
D
|
|
3116
3090
|
).wrap({
|
|
3117
|
-
recover: (
|
|
3091
|
+
recover: (we) => (t.logger.error("Error in block model argsValid"), t.logger.error(we), !1)
|
|
3118
3092
|
}),
|
|
3119
3093
|
sdkVersion: I.sdkVersion
|
|
3120
3094
|
};
|
|
@@ -3122,16 +3096,16 @@ function wi(s, e, t) {
|
|
|
3122
3096
|
field: U(L, "blockSettings"),
|
|
3123
3097
|
assertFieldType: "Dynamic",
|
|
3124
3098
|
errorIfFieldNotSet: !0
|
|
3125
|
-
}).getDataAsJson(), b =
|
|
3099
|
+
}).getDataAsJson(), b = $e(
|
|
3126
3100
|
q,
|
|
3127
|
-
({ info:
|
|
3101
|
+
({ info: D }) => t.blockUpdateWatcher.get({ currentSpec: D.source, settings: y })
|
|
3128
3102
|
);
|
|
3129
3103
|
return {
|
|
3130
|
-
projectResourceId:
|
|
3104
|
+
projectResourceId: ve(s.rid),
|
|
3131
3105
|
id: L,
|
|
3132
3106
|
label: v ?? X,
|
|
3133
3107
|
title: v ?? X,
|
|
3134
|
-
renderingMode:
|
|
3108
|
+
renderingMode: ne,
|
|
3135
3109
|
stale: ((S = W.prod) == null ? void 0 : S.stale) !== !1 || V === "Limbo",
|
|
3136
3110
|
missingReference: M.missingReferences,
|
|
3137
3111
|
upstreams: [...d.traverseIdsExcludingRoots("upstream", L)],
|
|
@@ -3141,7 +3115,7 @@ function wi(s, e, t) {
|
|
|
3141
3115
|
outputsError: (O = W.prod) == null ? void 0 : O.outputsError,
|
|
3142
3116
|
exportsError: (C = W.prod) == null ? void 0 : C.exportsError,
|
|
3143
3117
|
settings: y,
|
|
3144
|
-
sections:
|
|
3118
|
+
sections: he,
|
|
3145
3119
|
inputsValid: p,
|
|
3146
3120
|
updateInfo: {},
|
|
3147
3121
|
currentBlockPack: (F = q == null ? void 0 : q.info) == null ? void 0 : F.source,
|
|
@@ -3154,7 +3128,7 @@ function wi(s, e, t) {
|
|
|
3154
3128
|
meta: a,
|
|
3155
3129
|
created: new Date(n),
|
|
3156
3130
|
lastModified: new Date(i),
|
|
3157
|
-
authorMarker: o.getKeyValueAsJson(
|
|
3131
|
+
authorMarker: o.getKeyValueAsJson(Et),
|
|
3158
3132
|
blocks: h
|
|
3159
3133
|
};
|
|
3160
3134
|
},
|
|
@@ -3180,13 +3154,13 @@ function wi(s, e, t) {
|
|
|
3180
3154
|
}
|
|
3181
3155
|
).withStableType();
|
|
3182
3156
|
}
|
|
3183
|
-
function
|
|
3157
|
+
function hi(s, e) {
|
|
3184
3158
|
const t = s.node();
|
|
3185
|
-
if (
|
|
3159
|
+
if (ae(t.resourceType, rs)) {
|
|
3186
3160
|
const r = t.getDataAsJson();
|
|
3187
3161
|
if (r === void 0) throw new Error("No resource data.");
|
|
3188
3162
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
3189
|
-
} else if (
|
|
3163
|
+
} else if (ae(t.resourceType, ss)) {
|
|
3190
3164
|
const r = t.getDataAsJson();
|
|
3191
3165
|
if (r === void 0) throw new Error("No resource data.");
|
|
3192
3166
|
return e.signer.verify(
|
|
@@ -3197,10 +3171,10 @@ function Si(s, e) {
|
|
|
3197
3171
|
} else
|
|
3198
3172
|
throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
|
|
3199
3173
|
}
|
|
3200
|
-
function
|
|
3174
|
+
function fi(s, e) {
|
|
3201
3175
|
if (s !== void 0)
|
|
3202
3176
|
return J.make(
|
|
3203
|
-
(t) =>
|
|
3177
|
+
(t) => hi(t.accessor(s), e),
|
|
3204
3178
|
{
|
|
3205
3179
|
postprocessValue: (t) => {
|
|
3206
3180
|
if (t !== void 0) {
|
|
@@ -3212,86 +3186,86 @@ function bi(s, e) {
|
|
|
3212
3186
|
}
|
|
3213
3187
|
).withStableType();
|
|
3214
3188
|
}
|
|
3215
|
-
function
|
|
3189
|
+
function gi(s, e, t) {
|
|
3216
3190
|
return J.make(
|
|
3217
3191
|
(r) => {
|
|
3218
3192
|
var a;
|
|
3219
|
-
const o = r.accessor(s).node(), n =
|
|
3193
|
+
const o = r.accessor(s).node(), n = tt(o, e), i = (a = o.traverse(
|
|
3220
3194
|
{
|
|
3221
3195
|
field: U(e, "blockPack"),
|
|
3222
3196
|
assertFieldType: "Dynamic"
|
|
3223
3197
|
},
|
|
3224
3198
|
{ field: A.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3225
|
-
{ field:
|
|
3199
|
+
{ field: ns, assertFieldType: "Input" }
|
|
3226
3200
|
)) == null ? void 0 : a.persist();
|
|
3227
3201
|
return {
|
|
3228
|
-
path:
|
|
3202
|
+
path: fi(i, t),
|
|
3229
3203
|
sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
|
|
3230
3204
|
};
|
|
3231
3205
|
},
|
|
3232
3206
|
{ mode: "StableOnlyLive" }
|
|
3233
3207
|
);
|
|
3234
3208
|
}
|
|
3235
|
-
function
|
|
3209
|
+
function gs(s, e, t) {
|
|
3236
3210
|
if (t === void 0)
|
|
3237
|
-
return J.make((i) =>
|
|
3238
|
-
key: `inputs#${
|
|
3211
|
+
return J.make((i) => gs(s, e, i), {
|
|
3212
|
+
key: `inputs#${ve(s.rid)}#${e}`
|
|
3239
3213
|
});
|
|
3240
|
-
const r = t.accessor(s).node(), o =
|
|
3214
|
+
const r = t.accessor(s).node(), o = xt(s, e), n = o.uiState(t);
|
|
3241
3215
|
return {
|
|
3242
|
-
author: r.getKeyValueAsJson(
|
|
3216
|
+
author: r.getKeyValueAsJson(Rt(e)),
|
|
3243
3217
|
args: JSON.parse(o.args(t)),
|
|
3244
3218
|
ui: n !== void 0 ? JSON.parse(n) : void 0
|
|
3245
3219
|
};
|
|
3246
3220
|
}
|
|
3247
|
-
function
|
|
3221
|
+
function mi(s, e, t) {
|
|
3248
3222
|
return J.make(
|
|
3249
3223
|
(r) => {
|
|
3250
|
-
const o = r.accessor(s).node(), n =
|
|
3251
|
-
return
|
|
3224
|
+
const o = r.accessor(s).node(), n = ls(s, e);
|
|
3225
|
+
return $e(tt(o, e), ({ cfg: i, bpId: a }) => {
|
|
3252
3226
|
const c = {};
|
|
3253
3227
|
for (const [u, l] of Object.entries(i.outputs)) {
|
|
3254
|
-
const d =
|
|
3228
|
+
const d = Ie(t, n, l, i.code, a);
|
|
3255
3229
|
c[u] = J.wrapError(d);
|
|
3256
3230
|
}
|
|
3257
3231
|
return c;
|
|
3258
3232
|
});
|
|
3259
3233
|
},
|
|
3260
|
-
{ key: "outputs#" +
|
|
3234
|
+
{ key: "outputs#" + ve(s.rid) + "#" + e }
|
|
3261
3235
|
).withStableType();
|
|
3262
3236
|
}
|
|
3263
|
-
function
|
|
3237
|
+
function vi(s, e) {
|
|
3264
3238
|
return J.make((t) => {
|
|
3265
|
-
const r = t.accessor(s).node(), o = B(r.getKeyValueAsJson(
|
|
3266
|
-
for (const { id: i } of
|
|
3267
|
-
const a =
|
|
3239
|
+
const r = t.accessor(s).node(), o = B(r.getKeyValueAsJson(de)), n = [];
|
|
3240
|
+
for (const { id: i } of se(o)) {
|
|
3241
|
+
const a = tt(r, i);
|
|
3268
3242
|
if (a === void 0) continue;
|
|
3269
|
-
const c = Object.entries(a.cfg.outputs).map(([, l]) => l).filter((l) =>
|
|
3243
|
+
const c = Object.entries(a.cfg.outputs).map(([, l]) => l).filter((l) => di(l)).map((l) => l);
|
|
3270
3244
|
if (c.length === 0) continue;
|
|
3271
|
-
const u =
|
|
3245
|
+
const u = ls(r.persist(), i);
|
|
3272
3246
|
for (const l of c)
|
|
3273
3247
|
n.push(
|
|
3274
|
-
J.wrapError(
|
|
3248
|
+
J.wrapError(Ie(e, u, l, a.cfg.code, a.bpId))
|
|
3275
3249
|
);
|
|
3276
3250
|
}
|
|
3277
3251
|
return n;
|
|
3278
3252
|
});
|
|
3279
3253
|
}
|
|
3280
|
-
class
|
|
3254
|
+
class yi {
|
|
3281
3255
|
constructor() {
|
|
3282
3256
|
w(this, "states", /* @__PURE__ */ new Map());
|
|
3283
3257
|
}
|
|
3284
3258
|
setState(e, t) {
|
|
3285
3259
|
const r = this.states.get(e);
|
|
3286
3260
|
if (r === void 0) {
|
|
3287
|
-
this.states.set(e, { state: t, change: new
|
|
3261
|
+
this.states.set(e, { state: t, change: new Qt() });
|
|
3288
3262
|
return;
|
|
3289
3263
|
}
|
|
3290
3264
|
r.state = { ...t }, r.change.markChanged();
|
|
3291
3265
|
}
|
|
3292
3266
|
readState(e, t) {
|
|
3293
3267
|
let r = this.states.get(t);
|
|
3294
|
-
return r === void 0 && (r = { state: { ...
|
|
3268
|
+
return r === void 0 && (r = { state: { ...As }, change: new Qt() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3295
3269
|
}
|
|
3296
3270
|
getState(e) {
|
|
3297
3271
|
return J.make(
|
|
@@ -3304,41 +3278,41 @@ class Pi {
|
|
|
3304
3278
|
t !== void 0 && (this.states.delete(e), t.change.markChanged());
|
|
3305
3279
|
}
|
|
3306
3280
|
}
|
|
3307
|
-
function
|
|
3308
|
-
return JSON.stringify(s, (e, t) => typeof t == "bigint" ?
|
|
3281
|
+
function fr(s) {
|
|
3282
|
+
return JSON.stringify(s, (e, t) => typeof t == "bigint" ? ve(t) : ArrayBuffer.isView(t) || t instanceof Int8Array || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array || t instanceof BigInt64Array || t instanceof BigUint64Array ? Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64") : Buffer.isBuffer(t) ? t.toString("base64") : t);
|
|
3309
3283
|
}
|
|
3310
|
-
class
|
|
3284
|
+
class jt {
|
|
3311
3285
|
constructor(e, t, r) {
|
|
3312
3286
|
/** Underlying pl resource id */
|
|
3313
3287
|
w(this, "rid");
|
|
3314
3288
|
/** Data for the left panel, contain basic information about block status. */
|
|
3315
3289
|
w(this, "overview");
|
|
3316
|
-
w(this, "navigationStates", new
|
|
3290
|
+
w(this, "navigationStates", new yi());
|
|
3317
3291
|
w(this, "blockComputables", /* @__PURE__ */ new Map());
|
|
3318
3292
|
w(this, "blockFrontends", /* @__PURE__ */ new Map());
|
|
3319
3293
|
w(this, "activeConfigs");
|
|
3320
3294
|
w(this, "refreshLoopResult");
|
|
3321
3295
|
w(this, "abortController", new AbortController());
|
|
3322
3296
|
w(this, "destroyed", !1);
|
|
3323
|
-
this.env = e, this.projectTree = r, this.overview =
|
|
3297
|
+
this.env = e, this.projectTree = r, this.overview = pi(
|
|
3324
3298
|
r.entry(),
|
|
3325
3299
|
this.navigationStates,
|
|
3326
3300
|
e
|
|
3327
|
-
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs =
|
|
3301
|
+
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = vi(r.entry(), e);
|
|
3328
3302
|
}
|
|
3329
3303
|
async refreshLoop() {
|
|
3330
3304
|
for (; !this.destroyed; )
|
|
3331
3305
|
try {
|
|
3332
|
-
await
|
|
3306
|
+
await Ge(this.env.pl, this.rid, (e) => {
|
|
3333
3307
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3334
|
-
}), await this.activeConfigs.getValue(), await
|
|
3308
|
+
}), await this.activeConfigs.getValue(), await zr(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3335
3309
|
} catch (e) {
|
|
3336
|
-
if (
|
|
3310
|
+
if (Ks(e)) {
|
|
3337
3311
|
console.warn(
|
|
3338
3312
|
"project refresh routine terminated, because project was externally deleted"
|
|
3339
3313
|
);
|
|
3340
3314
|
break;
|
|
3341
|
-
} else if (!
|
|
3315
|
+
} else if (!Hs(e))
|
|
3342
3316
|
throw new Error("Unexpected exception", { cause: e });
|
|
3343
3317
|
}
|
|
3344
3318
|
}
|
|
@@ -3353,8 +3327,8 @@ class Jt {
|
|
|
3353
3327
|
*
|
|
3354
3328
|
* @return returns newly created block id
|
|
3355
3329
|
* */
|
|
3356
|
-
async addBlock(e, t, r, o = void 0, n =
|
|
3357
|
-
const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c =
|
|
3330
|
+
async addBlock(e, t, r, o = void 0, n = ye()) {
|
|
3331
|
+
const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = Jr(a);
|
|
3358
3332
|
return await Q(
|
|
3359
3333
|
this.env.pl,
|
|
3360
3334
|
this.rid,
|
|
@@ -3432,7 +3406,7 @@ class Jt {
|
|
|
3432
3406
|
* stale state.
|
|
3433
3407
|
* */
|
|
3434
3408
|
async runBlock(e) {
|
|
3435
|
-
await
|
|
3409
|
+
await Ge(this.env.pl, this.rid, (t) => t.renderProduction([e], !0)), await this.projectTree.refreshState();
|
|
3436
3410
|
}
|
|
3437
3411
|
/**
|
|
3438
3412
|
* Stops the block if it is running by destroying its production state. All
|
|
@@ -3440,7 +3414,7 @@ class Jt {
|
|
|
3440
3414
|
* calculated.
|
|
3441
3415
|
* */
|
|
3442
3416
|
async stopBlock(e) {
|
|
3443
|
-
await
|
|
3417
|
+
await Ge(this.env.pl, this.rid, (t) => t.stopProduction(e)), await this.projectTree.refreshState();
|
|
3444
3418
|
}
|
|
3445
3419
|
// /** Update block label. */
|
|
3446
3420
|
// public async setBlockLabel(blockId: string, label: string, author?: AuthorMarker) {
|
|
@@ -3504,9 +3478,9 @@ class Jt {
|
|
|
3504
3478
|
/** Resets arguments and ui state of the block to initial state */
|
|
3505
3479
|
async resetBlockArgsAndUiState(e, t) {
|
|
3506
3480
|
await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
|
|
3507
|
-
const o =
|
|
3481
|
+
const o = St(
|
|
3508
3482
|
(await r.getField(x(this.rid, U(e, "blockPack")))).value
|
|
3509
|
-
), n =
|
|
3483
|
+
), n = St(
|
|
3510
3484
|
(await r.getField(x(o, A.HolderRefField))).value
|
|
3511
3485
|
), i = await r.getResourceData(n, !1), a = JSON.parse(
|
|
3512
3486
|
Buffer.from(B(i.data)).toString("utf-8")
|
|
@@ -3519,10 +3493,10 @@ class Jt {
|
|
|
3519
3493
|
getBlockComputables(e) {
|
|
3520
3494
|
const t = this.blockComputables.get(e);
|
|
3521
3495
|
if (t === void 0) {
|
|
3522
|
-
const r =
|
|
3496
|
+
const r = mi(this.projectTree.entry(), e, this.env), n = {
|
|
3523
3497
|
fullState: J.make(
|
|
3524
3498
|
(i) => ({
|
|
3525
|
-
argsAndUiState:
|
|
3499
|
+
argsAndUiState: gs(this.projectTree.entry(), e, i),
|
|
3526
3500
|
outputs: r,
|
|
3527
3501
|
navigationState: this.navigationStates.getState(e)
|
|
3528
3502
|
}),
|
|
@@ -3553,7 +3527,7 @@ class Jt {
|
|
|
3553
3527
|
getBlockFrontend(e) {
|
|
3554
3528
|
const t = this.blockFrontends.get(e);
|
|
3555
3529
|
if (t === void 0) {
|
|
3556
|
-
const r =
|
|
3530
|
+
const r = gi(
|
|
3557
3531
|
this.projectTree.entry(),
|
|
3558
3532
|
e,
|
|
3559
3533
|
this.env
|
|
@@ -3573,14 +3547,14 @@ class Jt {
|
|
|
3573
3547
|
await this.destroy();
|
|
3574
3548
|
}
|
|
3575
3549
|
static async init(e, t) {
|
|
3576
|
-
await
|
|
3550
|
+
await Ge(e.pl, t, (o) => {
|
|
3577
3551
|
});
|
|
3578
|
-
const r = await
|
|
3552
|
+
const r = await Kr.init(
|
|
3579
3553
|
e.pl,
|
|
3580
3554
|
t,
|
|
3581
3555
|
{
|
|
3582
3556
|
...e.ops.defaultTreeOptions,
|
|
3583
|
-
pruning:
|
|
3557
|
+
pruning: Si
|
|
3584
3558
|
},
|
|
3585
3559
|
e.logger
|
|
3586
3560
|
);
|
|
@@ -3590,13 +3564,13 @@ class Jt {
|
|
|
3590
3564
|
var c, u;
|
|
3591
3565
|
return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((u = i.data) == null ? void 0 : u.byteLength) ?? 0);
|
|
3592
3566
|
});
|
|
3593
|
-
const n =
|
|
3594
|
-
await
|
|
3567
|
+
const n = Xs(o);
|
|
3568
|
+
await Xt.writeFile(`${ve(t)}.json`, fr(o)), await Xt.writeFile(`${ve(t)}.stats.json`, fr(n));
|
|
3595
3569
|
}
|
|
3596
|
-
return new
|
|
3570
|
+
return new jt(e, t, r);
|
|
3597
3571
|
}
|
|
3598
3572
|
}
|
|
3599
|
-
function
|
|
3573
|
+
function Si(s) {
|
|
3600
3574
|
switch (s.type.name) {
|
|
3601
3575
|
case "BlockPackCustom":
|
|
3602
3576
|
return s.fields.filter((e) => e.name !== "template");
|
|
@@ -3608,8 +3582,8 @@ function ki(s) {
|
|
|
3608
3582
|
return s.fields;
|
|
3609
3583
|
}
|
|
3610
3584
|
}
|
|
3611
|
-
const
|
|
3612
|
-
logger: new
|
|
3585
|
+
const ms = {
|
|
3586
|
+
logger: new Vs(),
|
|
3613
3587
|
blobDriverOps: {
|
|
3614
3588
|
cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
|
|
3615
3589
|
// 8 GB
|
|
@@ -3632,14 +3606,14 @@ const Rs = {
|
|
|
3632
3606
|
stopPollingDelay: 1e3
|
|
3633
3607
|
}
|
|
3634
3608
|
};
|
|
3635
|
-
function
|
|
3609
|
+
function vs(s) {
|
|
3636
3610
|
return {
|
|
3637
3611
|
blobDownloadPath: _.join(s, "download"),
|
|
3638
3612
|
downloadBlobToURLPath: _.join(s, "downloadToURL")
|
|
3639
3613
|
};
|
|
3640
3614
|
}
|
|
3641
|
-
const
|
|
3642
|
-
...
|
|
3615
|
+
const wi = {
|
|
3616
|
+
...ms,
|
|
3643
3617
|
defaultTreeOptions: {
|
|
3644
3618
|
pollingInterval: 350,
|
|
3645
3619
|
stopPollingDelay: 2500,
|
|
@@ -3653,18 +3627,18 @@ const Oi = {
|
|
|
3653
3627
|
projectRefreshInterval: 700,
|
|
3654
3628
|
stagingRenderingRate: 5
|
|
3655
3629
|
};
|
|
3656
|
-
function
|
|
3630
|
+
function bi(s) {
|
|
3657
3631
|
return {
|
|
3658
|
-
...
|
|
3632
|
+
...vs(s),
|
|
3659
3633
|
frontendDownloadPath: _.join(s, "frontend")
|
|
3660
3634
|
};
|
|
3661
3635
|
}
|
|
3662
|
-
function
|
|
3636
|
+
function Ri(s) {
|
|
3663
3637
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3664
3638
|
}
|
|
3665
|
-
var
|
|
3666
|
-
const
|
|
3667
|
-
9007199254740991,
|
|
3639
|
+
var $t = { exports: {} };
|
|
3640
|
+
const Ei = "2.0.0", ys = 256, Ci = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3641
|
+
9007199254740991, ki = 16, Pi = ys - 6, Oi = [
|
|
3668
3642
|
"major",
|
|
3669
3643
|
"premajor",
|
|
3670
3644
|
"minor",
|
|
@@ -3673,25 +3647,25 @@ const Fi = "2.0.0", Cs = 256, Ai = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
3673
3647
|
"prepatch",
|
|
3674
3648
|
"prerelease"
|
|
3675
3649
|
];
|
|
3676
|
-
var
|
|
3677
|
-
MAX_LENGTH:
|
|
3678
|
-
MAX_SAFE_COMPONENT_LENGTH:
|
|
3679
|
-
MAX_SAFE_BUILD_LENGTH:
|
|
3680
|
-
MAX_SAFE_INTEGER:
|
|
3681
|
-
RELEASE_TYPES:
|
|
3682
|
-
SEMVER_SPEC_VERSION:
|
|
3650
|
+
var rt = {
|
|
3651
|
+
MAX_LENGTH: ys,
|
|
3652
|
+
MAX_SAFE_COMPONENT_LENGTH: ki,
|
|
3653
|
+
MAX_SAFE_BUILD_LENGTH: Pi,
|
|
3654
|
+
MAX_SAFE_INTEGER: Ci,
|
|
3655
|
+
RELEASE_TYPES: Oi,
|
|
3656
|
+
SEMVER_SPEC_VERSION: Ei,
|
|
3683
3657
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
3684
3658
|
FLAG_LOOSE: 2
|
|
3685
3659
|
};
|
|
3686
|
-
const
|
|
3660
|
+
const $i = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
|
|
3687
3661
|
};
|
|
3688
|
-
var
|
|
3662
|
+
var st = $i;
|
|
3689
3663
|
(function(s, e) {
|
|
3690
3664
|
const {
|
|
3691
3665
|
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
3692
3666
|
MAX_SAFE_BUILD_LENGTH: r,
|
|
3693
3667
|
MAX_LENGTH: o
|
|
3694
|
-
} =
|
|
3668
|
+
} = rt, n = st;
|
|
3695
3669
|
e = s.exports = {};
|
|
3696
3670
|
const i = e.re = [], a = e.safeRe = [], c = e.src = [], u = e.safeSrc = [], l = e.t = {};
|
|
3697
3671
|
let d = 0;
|
|
@@ -3699,54 +3673,54 @@ var it = Ni;
|
|
|
3699
3673
|
["\\s", 1],
|
|
3700
3674
|
["\\d", o],
|
|
3701
3675
|
[f, r]
|
|
3702
|
-
], E = (
|
|
3676
|
+
], E = (N) => {
|
|
3703
3677
|
for (const [T, j] of h)
|
|
3704
|
-
|
|
3705
|
-
return
|
|
3706
|
-
}, g = (
|
|
3678
|
+
N = N.split(`${T}*`).join(`${T}{0,${j}}`).split(`${T}+`).join(`${T}{1,${j}}`);
|
|
3679
|
+
return N;
|
|
3680
|
+
}, g = (N, T, j) => {
|
|
3707
3681
|
const $ = E(T), G = d++;
|
|
3708
|
-
n(
|
|
3682
|
+
n(N, G, T), l[N] = G, c[G] = T, u[G] = $, i[G] = new RegExp(T, j ? "g" : void 0), a[G] = new RegExp($, j ? "g" : void 0);
|
|
3709
3683
|
};
|
|
3710
3684
|
g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${f}*`), g("MAINVERSION", `(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${f}+`), g("BUILD", `(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`), g("FULL", `^${c[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`), g("LOOSE", `^${c[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${c[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`), g("XRANGE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`), g("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), g("COERCE", `${c[l.COERCEPLAIN]}(?:$|[^\\d])`), g("COERCEFULL", c[l.COERCEPLAIN] + `(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`), g("COERCERTL", c[l.COERCE], !0), g("COERCERTLFULL", c[l.COERCEFULL], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${c[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${c[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
3711
|
-
})(
|
|
3712
|
-
var
|
|
3713
|
-
const
|
|
3714
|
-
var
|
|
3715
|
-
const
|
|
3716
|
-
const t =
|
|
3685
|
+
})($t, $t.exports);
|
|
3686
|
+
var Be = $t.exports;
|
|
3687
|
+
const Ii = Object.freeze({ loose: !0 }), Fi = Object.freeze({}), Ai = (s) => s ? typeof s != "object" ? Ii : s : Fi;
|
|
3688
|
+
var Vt = Ai;
|
|
3689
|
+
const gr = /^[0-9]+$/, Ss = (s, e) => {
|
|
3690
|
+
const t = gr.test(s), r = gr.test(e);
|
|
3717
3691
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
3718
|
-
},
|
|
3719
|
-
var
|
|
3720
|
-
compareIdentifiers:
|
|
3721
|
-
rcompareIdentifiers:
|
|
3692
|
+
}, Ti = (s, e) => Ss(e, s);
|
|
3693
|
+
var ws = {
|
|
3694
|
+
compareIdentifiers: Ss,
|
|
3695
|
+
rcompareIdentifiers: Ti
|
|
3722
3696
|
};
|
|
3723
|
-
const
|
|
3724
|
-
let
|
|
3697
|
+
const _e = st, { MAX_LENGTH: mr, MAX_SAFE_INTEGER: Ke } = rt, { safeRe: vr, safeSrc: yr, t: He } = Be, Li = Vt, { compareIdentifiers: fe } = ws;
|
|
3698
|
+
let Ni = class re {
|
|
3725
3699
|
constructor(e, t) {
|
|
3726
|
-
if (t =
|
|
3700
|
+
if (t = Li(t), e instanceof re) {
|
|
3727
3701
|
if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
|
|
3728
3702
|
return e;
|
|
3729
3703
|
e = e.version;
|
|
3730
3704
|
} else if (typeof e != "string")
|
|
3731
3705
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
3732
|
-
if (e.length >
|
|
3706
|
+
if (e.length > mr)
|
|
3733
3707
|
throw new TypeError(
|
|
3734
|
-
`version is longer than ${
|
|
3708
|
+
`version is longer than ${mr} characters`
|
|
3735
3709
|
);
|
|
3736
|
-
|
|
3737
|
-
const r = e.trim().match(t.loose ?
|
|
3710
|
+
_e("SemVer", e, t), this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease;
|
|
3711
|
+
const r = e.trim().match(t.loose ? vr[He.LOOSE] : vr[He.FULL]);
|
|
3738
3712
|
if (!r)
|
|
3739
3713
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
3740
|
-
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major >
|
|
3714
|
+
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major > Ke || this.major < 0)
|
|
3741
3715
|
throw new TypeError("Invalid major version");
|
|
3742
|
-
if (this.minor >
|
|
3716
|
+
if (this.minor > Ke || this.minor < 0)
|
|
3743
3717
|
throw new TypeError("Invalid minor version");
|
|
3744
|
-
if (this.patch >
|
|
3718
|
+
if (this.patch > Ke || this.patch < 0)
|
|
3745
3719
|
throw new TypeError("Invalid patch version");
|
|
3746
3720
|
r[4] ? this.prerelease = r[4].split(".").map((o) => {
|
|
3747
3721
|
if (/^[0-9]+$/.test(o)) {
|
|
3748
3722
|
const n = +o;
|
|
3749
|
-
if (n >= 0 && n <
|
|
3723
|
+
if (n >= 0 && n < Ke)
|
|
3750
3724
|
return n;
|
|
3751
3725
|
}
|
|
3752
3726
|
return o;
|
|
@@ -3759,7 +3733,7 @@ let Ji = class re {
|
|
|
3759
3733
|
return this.version;
|
|
3760
3734
|
}
|
|
3761
3735
|
compare(e) {
|
|
3762
|
-
if (
|
|
3736
|
+
if (_e("SemVer.compare", this.version, this.options, e), !(e instanceof re)) {
|
|
3763
3737
|
if (typeof e == "string" && e === this.version)
|
|
3764
3738
|
return 0;
|
|
3765
3739
|
e = new re(e, this.options);
|
|
@@ -3767,7 +3741,7 @@ let Ji = class re {
|
|
|
3767
3741
|
return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
|
|
3768
3742
|
}
|
|
3769
3743
|
compareMain(e) {
|
|
3770
|
-
return e instanceof re || (e = new re(e, this.options)),
|
|
3744
|
+
return e instanceof re || (e = new re(e, this.options)), fe(this.major, e.major) || fe(this.minor, e.minor) || fe(this.patch, e.patch);
|
|
3771
3745
|
}
|
|
3772
3746
|
comparePre(e) {
|
|
3773
3747
|
if (e instanceof re || (e = new re(e, this.options)), this.prerelease.length && !e.prerelease.length)
|
|
@@ -3779,7 +3753,7 @@ let Ji = class re {
|
|
|
3779
3753
|
let t = 0;
|
|
3780
3754
|
do {
|
|
3781
3755
|
const r = this.prerelease[t], o = e.prerelease[t];
|
|
3782
|
-
if (
|
|
3756
|
+
if (_e("prerelease compare", t, r, o), r === void 0 && o === void 0)
|
|
3783
3757
|
return 0;
|
|
3784
3758
|
if (o === void 0)
|
|
3785
3759
|
return 1;
|
|
@@ -3787,7 +3761,7 @@ let Ji = class re {
|
|
|
3787
3761
|
return -1;
|
|
3788
3762
|
if (r === o)
|
|
3789
3763
|
continue;
|
|
3790
|
-
return
|
|
3764
|
+
return fe(r, o);
|
|
3791
3765
|
} while (++t);
|
|
3792
3766
|
}
|
|
3793
3767
|
compareBuild(e) {
|
|
@@ -3795,7 +3769,7 @@ let Ji = class re {
|
|
|
3795
3769
|
let t = 0;
|
|
3796
3770
|
do {
|
|
3797
3771
|
const r = this.build[t], o = e.build[t];
|
|
3798
|
-
if (
|
|
3772
|
+
if (_e("build compare", t, r, o), r === void 0 && o === void 0)
|
|
3799
3773
|
return 0;
|
|
3800
3774
|
if (o === void 0)
|
|
3801
3775
|
return 1;
|
|
@@ -3803,7 +3777,7 @@ let Ji = class re {
|
|
|
3803
3777
|
return -1;
|
|
3804
3778
|
if (r === o)
|
|
3805
3779
|
continue;
|
|
3806
|
-
return
|
|
3780
|
+
return fe(r, o);
|
|
3807
3781
|
} while (++t);
|
|
3808
3782
|
}
|
|
3809
3783
|
// preminor will bump the version up to the next minor release, and immediately
|
|
@@ -3813,7 +3787,7 @@ let Ji = class re {
|
|
|
3813
3787
|
if (!t && r === !1)
|
|
3814
3788
|
throw new Error("invalid increment argument: identifier is empty");
|
|
3815
3789
|
if (t) {
|
|
3816
|
-
const o = new RegExp(`^${this.options.loose ?
|
|
3790
|
+
const o = new RegExp(`^${this.options.loose ? yr[He.PRERELEASELOOSE] : yr[He.PRERELEASE]}$`), n = `-${t}`.match(o);
|
|
3817
3791
|
if (!n || n[1] !== t)
|
|
3818
3792
|
throw new Error(`invalid identifier: ${t}`);
|
|
3819
3793
|
}
|
|
@@ -3861,7 +3835,7 @@ let Ji = class re {
|
|
|
3861
3835
|
}
|
|
3862
3836
|
if (t) {
|
|
3863
3837
|
let n = [t, o];
|
|
3864
|
-
r === !1 && (n = [t]),
|
|
3838
|
+
r === !1 && (n = [t]), fe(this.prerelease[0], t) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = n) : this.prerelease = n;
|
|
3865
3839
|
}
|
|
3866
3840
|
break;
|
|
3867
3841
|
}
|
|
@@ -3871,43 +3845,43 @@ let Ji = class re {
|
|
|
3871
3845
|
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
3872
3846
|
}
|
|
3873
3847
|
};
|
|
3874
|
-
var H =
|
|
3875
|
-
const
|
|
3876
|
-
if (s instanceof
|
|
3848
|
+
var H = Ni;
|
|
3849
|
+
const Sr = H, Di = (s, e, t = !1) => {
|
|
3850
|
+
if (s instanceof Sr)
|
|
3877
3851
|
return s;
|
|
3878
3852
|
try {
|
|
3879
|
-
return new
|
|
3853
|
+
return new Sr(s, e);
|
|
3880
3854
|
} catch (r) {
|
|
3881
3855
|
if (!t)
|
|
3882
3856
|
return null;
|
|
3883
3857
|
throw r;
|
|
3884
3858
|
}
|
|
3885
3859
|
};
|
|
3886
|
-
var
|
|
3887
|
-
const
|
|
3888
|
-
const t =
|
|
3860
|
+
var Se = Di;
|
|
3861
|
+
const Bi = Se, xi = (s, e) => {
|
|
3862
|
+
const t = Bi(s, e);
|
|
3889
3863
|
return t ? t.version : null;
|
|
3890
3864
|
};
|
|
3891
|
-
var
|
|
3892
|
-
const
|
|
3893
|
-
const t =
|
|
3865
|
+
var ji = xi;
|
|
3866
|
+
const Vi = Se, Ui = (s, e) => {
|
|
3867
|
+
const t = Vi(s.trim().replace(/^[=v]+/, ""), e);
|
|
3894
3868
|
return t ? t.version : null;
|
|
3895
3869
|
};
|
|
3896
|
-
var
|
|
3897
|
-
const
|
|
3870
|
+
var Ji = Ui;
|
|
3871
|
+
const wr = H, Gi = (s, e, t, r, o) => {
|
|
3898
3872
|
typeof t == "string" && (o = r, r = t, t = void 0);
|
|
3899
3873
|
try {
|
|
3900
|
-
return new
|
|
3901
|
-
s instanceof
|
|
3874
|
+
return new wr(
|
|
3875
|
+
s instanceof wr ? s.version : s,
|
|
3902
3876
|
t
|
|
3903
3877
|
).inc(e, r, o).version;
|
|
3904
3878
|
} catch {
|
|
3905
3879
|
return null;
|
|
3906
3880
|
}
|
|
3907
3881
|
};
|
|
3908
|
-
var
|
|
3909
|
-
const
|
|
3910
|
-
const t =
|
|
3882
|
+
var Mi = Gi;
|
|
3883
|
+
const br = Se, _i = (s, e) => {
|
|
3884
|
+
const t = br(s, null, !0), r = br(e, null, !0), o = t.compare(r);
|
|
3911
3885
|
if (o === 0)
|
|
3912
3886
|
return null;
|
|
3913
3887
|
const n = o > 0, i = n ? t : r, a = n ? r : t, c = !!i.prerelease.length;
|
|
@@ -3920,46 +3894,46 @@ const Or = be, Yi = (s, e) => {
|
|
|
3920
3894
|
const l = c ? "pre" : "";
|
|
3921
3895
|
return t.major !== r.major ? l + "major" : t.minor !== r.minor ? l + "minor" : t.patch !== r.patch ? l + "patch" : "prerelease";
|
|
3922
3896
|
};
|
|
3923
|
-
var
|
|
3924
|
-
const
|
|
3925
|
-
var
|
|
3926
|
-
const
|
|
3927
|
-
var
|
|
3928
|
-
const
|
|
3929
|
-
var
|
|
3930
|
-
const
|
|
3931
|
-
const t =
|
|
3897
|
+
var Ki = _i;
|
|
3898
|
+
const Hi = H, Wi = (s, e) => new Hi(s, e).major;
|
|
3899
|
+
var zi = Wi;
|
|
3900
|
+
const Xi = H, qi = (s, e) => new Xi(s, e).minor;
|
|
3901
|
+
var Yi = qi;
|
|
3902
|
+
const Qi = H, Zi = (s, e) => new Qi(s, e).patch;
|
|
3903
|
+
var ea = Zi;
|
|
3904
|
+
const ta = Se, ra = (s, e) => {
|
|
3905
|
+
const t = ta(s, e);
|
|
3932
3906
|
return t && t.prerelease.length ? t.prerelease : null;
|
|
3933
3907
|
};
|
|
3908
|
+
var sa = ra;
|
|
3909
|
+
const Rr = H, oa = (s, e, t) => new Rr(s, t).compare(new Rr(e, t));
|
|
3910
|
+
var ee = oa;
|
|
3911
|
+
const na = ee, ia = (s, e, t) => na(e, s, t);
|
|
3912
|
+
var aa = ia;
|
|
3913
|
+
const ca = ee, la = (s, e) => ca(s, e, !0);
|
|
3934
3914
|
var ua = la;
|
|
3935
|
-
const
|
|
3936
|
-
|
|
3937
|
-
const pa = ee, ha = (s, e, t) => pa(e, s, t);
|
|
3938
|
-
var fa = ha;
|
|
3939
|
-
const ga = ee, ma = (s, e) => ga(s, e, !0);
|
|
3940
|
-
var va = ma;
|
|
3941
|
-
const Ir = H, ya = (s, e, t) => {
|
|
3942
|
-
const r = new Ir(s, t), o = new Ir(e, t);
|
|
3915
|
+
const Er = H, da = (s, e, t) => {
|
|
3916
|
+
const r = new Er(s, t), o = new Er(e, t);
|
|
3943
3917
|
return r.compare(o) || r.compareBuild(o);
|
|
3944
3918
|
};
|
|
3945
|
-
var
|
|
3946
|
-
const
|
|
3947
|
-
var
|
|
3948
|
-
const
|
|
3949
|
-
var
|
|
3950
|
-
const
|
|
3951
|
-
var
|
|
3952
|
-
const
|
|
3953
|
-
var
|
|
3954
|
-
const
|
|
3955
|
-
var
|
|
3956
|
-
const
|
|
3957
|
-
var
|
|
3958
|
-
const
|
|
3959
|
-
var
|
|
3960
|
-
const
|
|
3961
|
-
var
|
|
3962
|
-
const
|
|
3919
|
+
var Ut = da;
|
|
3920
|
+
const pa = Ut, ha = (s, e) => s.sort((t, r) => pa(t, r, e));
|
|
3921
|
+
var fa = ha;
|
|
3922
|
+
const ga = Ut, ma = (s, e) => s.sort((t, r) => ga(r, t, e));
|
|
3923
|
+
var va = ma;
|
|
3924
|
+
const ya = ee, Sa = (s, e, t) => ya(s, e, t) > 0;
|
|
3925
|
+
var ot = Sa;
|
|
3926
|
+
const wa = ee, ba = (s, e, t) => wa(s, e, t) < 0;
|
|
3927
|
+
var Jt = ba;
|
|
3928
|
+
const Ra = ee, Ea = (s, e, t) => Ra(s, e, t) === 0;
|
|
3929
|
+
var bs = Ea;
|
|
3930
|
+
const Ca = ee, ka = (s, e, t) => Ca(s, e, t) !== 0;
|
|
3931
|
+
var Rs = ka;
|
|
3932
|
+
const Pa = ee, Oa = (s, e, t) => Pa(s, e, t) >= 0;
|
|
3933
|
+
var Gt = Oa;
|
|
3934
|
+
const $a = ee, Ia = (s, e, t) => $a(s, e, t) <= 0;
|
|
3935
|
+
var Mt = Ia;
|
|
3936
|
+
const Fa = bs, Aa = Rs, Ta = ot, La = Gt, Na = Jt, Da = Mt, Ba = (s, e, t, r) => {
|
|
3963
3937
|
switch (e) {
|
|
3964
3938
|
case "===":
|
|
3965
3939
|
return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
|
|
@@ -3968,33 +3942,33 @@ const xa = Os, ja = $s, Va = at, Ua = Kt, Ja = _t, Ga = Ht, Ma = (s, e, t, r) =>
|
|
|
3968
3942
|
case "":
|
|
3969
3943
|
case "=":
|
|
3970
3944
|
case "==":
|
|
3971
|
-
return
|
|
3945
|
+
return Fa(s, t, r);
|
|
3972
3946
|
case "!=":
|
|
3973
|
-
return
|
|
3947
|
+
return Aa(s, t, r);
|
|
3974
3948
|
case ">":
|
|
3975
|
-
return
|
|
3949
|
+
return Ta(s, t, r);
|
|
3976
3950
|
case ">=":
|
|
3977
|
-
return
|
|
3951
|
+
return La(s, t, r);
|
|
3978
3952
|
case "<":
|
|
3979
|
-
return
|
|
3953
|
+
return Na(s, t, r);
|
|
3980
3954
|
case "<=":
|
|
3981
|
-
return
|
|
3955
|
+
return Da(s, t, r);
|
|
3982
3956
|
default:
|
|
3983
3957
|
throw new TypeError(`Invalid operator: ${e}`);
|
|
3984
3958
|
}
|
|
3985
3959
|
};
|
|
3986
|
-
var
|
|
3987
|
-
const
|
|
3988
|
-
if (s instanceof
|
|
3960
|
+
var Es = Ba;
|
|
3961
|
+
const xa = H, ja = Se, { safeRe: We, t: ze } = Be, Va = (s, e) => {
|
|
3962
|
+
if (s instanceof xa)
|
|
3989
3963
|
return s;
|
|
3990
3964
|
if (typeof s == "number" && (s = String(s)), typeof s != "string")
|
|
3991
3965
|
return null;
|
|
3992
3966
|
e = e || {};
|
|
3993
3967
|
let t = null;
|
|
3994
3968
|
if (!e.rtl)
|
|
3995
|
-
t = s.match(e.includePrerelease ?
|
|
3969
|
+
t = s.match(e.includePrerelease ? We[ze.COERCEFULL] : We[ze.COERCE]);
|
|
3996
3970
|
else {
|
|
3997
|
-
const c = e.includePrerelease ?
|
|
3971
|
+
const c = e.includePrerelease ? We[ze.COERCERTLFULL] : We[ze.COERCERTL];
|
|
3998
3972
|
let u;
|
|
3999
3973
|
for (; (u = c.exec(s)) && (!t || t.index + t[0].length !== s.length); )
|
|
4000
3974
|
(!t || u.index + u[0].length !== t.index + t[0].length) && (t = u), c.lastIndex = u.index + u[1].length + u[2].length;
|
|
@@ -4003,10 +3977,10 @@ const _a = H, Ka = be, { safeRe: qe, t: Ye } = xe, Ha = (s, e) => {
|
|
|
4003
3977
|
if (t === null)
|
|
4004
3978
|
return null;
|
|
4005
3979
|
const r = t[2], o = t[3] || "0", n = t[4] || "0", i = e.includePrerelease && t[5] ? `-${t[5]}` : "", a = e.includePrerelease && t[6] ? `+${t[6]}` : "";
|
|
4006
|
-
return
|
|
3980
|
+
return ja(`${r}.${o}.${n}${i}${a}`, e);
|
|
4007
3981
|
};
|
|
4008
|
-
var
|
|
4009
|
-
class
|
|
3982
|
+
var Ua = Va;
|
|
3983
|
+
class Ja {
|
|
4010
3984
|
constructor() {
|
|
4011
3985
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
4012
3986
|
}
|
|
@@ -4029,10 +4003,10 @@ class za {
|
|
|
4029
4003
|
return this;
|
|
4030
4004
|
}
|
|
4031
4005
|
}
|
|
4032
|
-
var
|
|
4006
|
+
var Ga = Ja, dt, Cr;
|
|
4033
4007
|
function te() {
|
|
4034
|
-
if (
|
|
4035
|
-
|
|
4008
|
+
if (Cr) return dt;
|
|
4009
|
+
Cr = 1;
|
|
4036
4010
|
const s = /\s+/g;
|
|
4037
4011
|
class e {
|
|
4038
4012
|
constructor(p, m) {
|
|
@@ -4048,7 +4022,7 @@ function te() {
|
|
|
4048
4022
|
this.set = [y];
|
|
4049
4023
|
else if (this.set.length > 1) {
|
|
4050
4024
|
for (const b of this.set)
|
|
4051
|
-
if (b.length === 1 &&
|
|
4025
|
+
if (b.length === 1 && N(b[0])) {
|
|
4052
4026
|
this.set = [b];
|
|
4053
4027
|
break;
|
|
4054
4028
|
}
|
|
@@ -4089,8 +4063,8 @@ function te() {
|
|
|
4089
4063
|
C.set(I.value, I);
|
|
4090
4064
|
}
|
|
4091
4065
|
C.size > 1 && C.has("") && C.delete("");
|
|
4092
|
-
const
|
|
4093
|
-
return r.set(y,
|
|
4066
|
+
const D = [...C.values()];
|
|
4067
|
+
return r.set(y, D), D;
|
|
4094
4068
|
}
|
|
4095
4069
|
intersects(p, m) {
|
|
4096
4070
|
if (!(p instanceof e))
|
|
@@ -4108,26 +4082,26 @@ function te() {
|
|
|
4108
4082
|
return !1;
|
|
4109
4083
|
}
|
|
4110
4084
|
for (let m = 0; m < this.set.length; m++)
|
|
4111
|
-
if (
|
|
4085
|
+
if (he(this.set[m], p, this.options))
|
|
4112
4086
|
return !0;
|
|
4113
4087
|
return !1;
|
|
4114
4088
|
}
|
|
4115
4089
|
}
|
|
4116
|
-
|
|
4117
|
-
const t =
|
|
4090
|
+
dt = e;
|
|
4091
|
+
const t = Ga, r = new t(), o = Vt, n = nt(), i = st, a = H, {
|
|
4118
4092
|
safeRe: c,
|
|
4119
4093
|
t: u,
|
|
4120
4094
|
comparatorTrimReplace: l,
|
|
4121
4095
|
tildeTrimReplace: d,
|
|
4122
4096
|
caretTrimReplace: f
|
|
4123
|
-
} =
|
|
4097
|
+
} = Be, { FLAG_INCLUDE_PRERELEASE: h, FLAG_LOOSE: E } = rt, g = (v) => v.value === "<0.0.0-0", N = (v) => v.value === "", T = (v, p) => {
|
|
4124
4098
|
let m = !0;
|
|
4125
4099
|
const y = v.slice();
|
|
4126
4100
|
let b = y.pop();
|
|
4127
4101
|
for (; m && y.length; )
|
|
4128
4102
|
m = y.every((S) => b.intersects(S, p)), b = y.pop();
|
|
4129
4103
|
return m;
|
|
4130
|
-
}, j = (v, p) => (i("comp", v, p), v = L(v, p), i("caret", v), v = G(v, p), i("tildes", v), v =
|
|
4104
|
+
}, j = (v, p) => (i("comp", v, p), v = L(v, p), i("caret", v), v = G(v, p), i("tildes", v), v = ne(v, p), i("xrange", v), v = M(v, p), i("stars", v), v), $ = (v) => !v || v.toLowerCase() === "x" || v === "*", G = (v, p) => v.trim().split(/\s+/).map((m) => pe(m, p)).join(" "), pe = (v, p) => {
|
|
4131
4105
|
const m = p.loose ? c[u.TILDELOOSE] : c[u.TILDE];
|
|
4132
4106
|
return v.replace(m, (y, b, S, R, O) => {
|
|
4133
4107
|
i("tilde", v, y, b, S, R, O);
|
|
@@ -4142,15 +4116,15 @@ function te() {
|
|
|
4142
4116
|
let F;
|
|
4143
4117
|
return $(S) ? F = "" : $(R) ? F = `>=${S}.0.0${y} <${+S + 1}.0.0-0` : $(O) ? S === "0" ? F = `>=${S}.${R}.0${y} <${S}.${+R + 1}.0-0` : F = `>=${S}.${R}.0${y} <${+S + 1}.0.0-0` : C ? (i("replaceCaret pr", C), S === "0" ? R === "0" ? F = `>=${S}.${R}.${O}-${C} <${S}.${R}.${+O + 1}-0` : F = `>=${S}.${R}.${O}-${C} <${S}.${+R + 1}.0-0` : F = `>=${S}.${R}.${O}-${C} <${+S + 1}.0.0-0`) : (i("no pr"), S === "0" ? R === "0" ? F = `>=${S}.${R}.${O}${y} <${S}.${R}.${+O + 1}-0` : F = `>=${S}.${R}.${O}${y} <${S}.${+R + 1}.0-0` : F = `>=${S}.${R}.${O} <${+S + 1}.0.0-0`), i("caret return", F), F;
|
|
4144
4118
|
});
|
|
4145
|
-
},
|
|
4119
|
+
}, ne = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((m) => W(m, p)).join(" ")), W = (v, p) => {
|
|
4146
4120
|
v = v.trim();
|
|
4147
4121
|
const m = p.loose ? c[u.XRANGELOOSE] : c[u.XRANGE];
|
|
4148
4122
|
return v.replace(m, (y, b, S, R, O, C) => {
|
|
4149
4123
|
i("xRange", v, y, b, S, R, O, C);
|
|
4150
|
-
const F = $(S),
|
|
4151
|
-
return b === "=" &&
|
|
4124
|
+
const F = $(S), D = F || $(R), I = D || $(O), oe = I;
|
|
4125
|
+
return b === "=" && oe && (b = ""), C = p.includePrerelease ? "-0" : "", F ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && oe ? (D && (R = 0), O = 0, b === ">" ? (b = ">=", D ? (S = +S + 1, R = 0, O = 0) : (R = +R + 1, O = 0)) : b === "<=" && (b = "<", D ? S = +S + 1 : R = +R + 1), b === "<" && (C = "-0"), y = `${b + S}.${R}.${O}${C}`) : D ? y = `>=${S}.0.0${C} <${+S + 1}.0.0-0` : I && (y = `>=${S}.${R}.0${C} <${S}.${+R + 1}.0-0`), i("xRange return", y), y;
|
|
4152
4126
|
});
|
|
4153
|
-
}, M = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), V = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), q = (v) => (p, m, y, b, S, R, O, C, F,
|
|
4127
|
+
}, M = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), V = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), q = (v) => (p, m, y, b, S, R, O, C, F, D, I, oe) => ($(y) ? m = "" : $(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : $(S) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : R ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, $(F) ? C = "" : $(D) ? C = `<${+F + 1}.0.0-0` : $(I) ? C = `<${F}.${+D + 1}.0-0` : oe ? C = `<=${F}.${D}.${I}-${oe}` : v ? C = `<${F}.${D}.${+I + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), he = (v, p, m) => {
|
|
4154
4128
|
for (let y = 0; y < v.length; y++)
|
|
4155
4129
|
if (!v[y].test(p))
|
|
4156
4130
|
return !1;
|
|
@@ -4165,12 +4139,12 @@ function te() {
|
|
|
4165
4139
|
}
|
|
4166
4140
|
return !0;
|
|
4167
4141
|
};
|
|
4168
|
-
return
|
|
4142
|
+
return dt;
|
|
4169
4143
|
}
|
|
4170
|
-
var
|
|
4171
|
-
function
|
|
4172
|
-
if (
|
|
4173
|
-
|
|
4144
|
+
var pt, kr;
|
|
4145
|
+
function nt() {
|
|
4146
|
+
if (kr) return pt;
|
|
4147
|
+
kr = 1;
|
|
4174
4148
|
const s = Symbol("SemVer ANY");
|
|
4175
4149
|
class e {
|
|
4176
4150
|
static get ANY() {
|
|
@@ -4210,62 +4184,62 @@ function ct() {
|
|
|
4210
4184
|
return this.operator === "" ? this.value === "" ? !0 : new c(l.value, d).test(this.value) : l.operator === "" ? l.value === "" ? !0 : new c(this.value, d).test(l.semver) : (d = t(d), d.includePrerelease && (this.value === "<0.0.0-0" || l.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || l.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && l.operator.startsWith(">") || this.operator.startsWith("<") && l.operator.startsWith("<") || this.semver.version === l.semver.version && this.operator.includes("=") && l.operator.includes("=") || n(this.semver, "<", l.semver, d) && this.operator.startsWith(">") && l.operator.startsWith("<") || n(this.semver, ">", l.semver, d) && this.operator.startsWith("<") && l.operator.startsWith(">")));
|
|
4211
4185
|
}
|
|
4212
4186
|
}
|
|
4213
|
-
|
|
4214
|
-
const t =
|
|
4215
|
-
return
|
|
4187
|
+
pt = e;
|
|
4188
|
+
const t = Vt, { safeRe: r, t: o } = Be, n = Es, i = st, a = H, c = te();
|
|
4189
|
+
return pt;
|
|
4216
4190
|
}
|
|
4217
|
-
const
|
|
4191
|
+
const Ma = te(), _a = (s, e, t) => {
|
|
4218
4192
|
try {
|
|
4219
|
-
e = new
|
|
4193
|
+
e = new Ma(e, t);
|
|
4220
4194
|
} catch {
|
|
4221
4195
|
return !1;
|
|
4222
4196
|
}
|
|
4223
4197
|
return e.test(s);
|
|
4224
4198
|
};
|
|
4225
|
-
var
|
|
4226
|
-
const
|
|
4227
|
-
var
|
|
4228
|
-
const
|
|
4199
|
+
var it = _a;
|
|
4200
|
+
const Ka = te(), Ha = (s, e) => new Ka(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
|
|
4201
|
+
var Wa = Ha;
|
|
4202
|
+
const za = H, Xa = te(), qa = (s, e, t) => {
|
|
4229
4203
|
let r = null, o = null, n = null;
|
|
4230
4204
|
try {
|
|
4231
|
-
n = new
|
|
4205
|
+
n = new Xa(e, t);
|
|
4232
4206
|
} catch {
|
|
4233
4207
|
return null;
|
|
4234
4208
|
}
|
|
4235
4209
|
return s.forEach((i) => {
|
|
4236
|
-
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new
|
|
4210
|
+
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new za(r, t));
|
|
4237
4211
|
}), r;
|
|
4238
4212
|
};
|
|
4239
|
-
var
|
|
4240
|
-
const
|
|
4213
|
+
var Ya = qa;
|
|
4214
|
+
const Qa = H, Za = te(), ec = (s, e, t) => {
|
|
4241
4215
|
let r = null, o = null, n = null;
|
|
4242
4216
|
try {
|
|
4243
|
-
n = new
|
|
4217
|
+
n = new Za(e, t);
|
|
4244
4218
|
} catch {
|
|
4245
4219
|
return null;
|
|
4246
4220
|
}
|
|
4247
4221
|
return s.forEach((i) => {
|
|
4248
|
-
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new
|
|
4222
|
+
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new Qa(r, t));
|
|
4249
4223
|
}), r;
|
|
4250
4224
|
};
|
|
4251
|
-
var
|
|
4252
|
-
const
|
|
4253
|
-
s = new
|
|
4254
|
-
let t = new
|
|
4255
|
-
if (s.test(t) || (t = new
|
|
4225
|
+
var tc = ec;
|
|
4226
|
+
const ht = H, rc = te(), Pr = ot, sc = (s, e) => {
|
|
4227
|
+
s = new rc(s, e);
|
|
4228
|
+
let t = new ht("0.0.0");
|
|
4229
|
+
if (s.test(t) || (t = new ht("0.0.0-0"), s.test(t)))
|
|
4256
4230
|
return t;
|
|
4257
4231
|
t = null;
|
|
4258
4232
|
for (let r = 0; r < s.set.length; ++r) {
|
|
4259
4233
|
const o = s.set[r];
|
|
4260
4234
|
let n = null;
|
|
4261
4235
|
o.forEach((i) => {
|
|
4262
|
-
const a = new
|
|
4236
|
+
const a = new ht(i.semver.version);
|
|
4263
4237
|
switch (i.operator) {
|
|
4264
4238
|
case ">":
|
|
4265
4239
|
a.prerelease.length === 0 ? a.patch++ : a.prerelease.push(0), a.raw = a.format();
|
|
4266
4240
|
case "":
|
|
4267
4241
|
case ">=":
|
|
4268
|
-
(!n ||
|
|
4242
|
+
(!n || Pr(a, n)) && (n = a);
|
|
4269
4243
|
break;
|
|
4270
4244
|
case "<":
|
|
4271
4245
|
case "<=":
|
|
@@ -4273,39 +4247,39 @@ const mt = H, lc = te(), Tr = at, uc = (s, e) => {
|
|
|
4273
4247
|
default:
|
|
4274
4248
|
throw new Error(`Unexpected operation: ${i.operator}`);
|
|
4275
4249
|
}
|
|
4276
|
-
}), n && (!t ||
|
|
4250
|
+
}), n && (!t || Pr(t, n)) && (t = n);
|
|
4277
4251
|
}
|
|
4278
4252
|
return t && s.test(t) ? t : null;
|
|
4279
4253
|
};
|
|
4280
|
-
var
|
|
4281
|
-
const
|
|
4254
|
+
var oc = sc;
|
|
4255
|
+
const nc = te(), ic = (s, e) => {
|
|
4282
4256
|
try {
|
|
4283
|
-
return new
|
|
4257
|
+
return new nc(s, e).range || "*";
|
|
4284
4258
|
} catch {
|
|
4285
4259
|
return null;
|
|
4286
4260
|
}
|
|
4287
4261
|
};
|
|
4288
|
-
var
|
|
4289
|
-
const
|
|
4290
|
-
s = new
|
|
4262
|
+
var ac = ic;
|
|
4263
|
+
const cc = H, Cs = nt(), { ANY: lc } = Cs, uc = te(), dc = it, Or = ot, $r = Jt, pc = Mt, hc = Gt, fc = (s, e, t, r) => {
|
|
4264
|
+
s = new cc(s, r), e = new uc(e, r);
|
|
4291
4265
|
let o, n, i, a, c;
|
|
4292
4266
|
switch (t) {
|
|
4293
4267
|
case ">":
|
|
4294
|
-
o =
|
|
4268
|
+
o = Or, n = pc, i = $r, a = ">", c = ">=";
|
|
4295
4269
|
break;
|
|
4296
4270
|
case "<":
|
|
4297
|
-
o =
|
|
4271
|
+
o = $r, n = hc, i = Or, a = "<", c = "<=";
|
|
4298
4272
|
break;
|
|
4299
4273
|
default:
|
|
4300
4274
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
4301
4275
|
}
|
|
4302
|
-
if (
|
|
4276
|
+
if (dc(s, e, r))
|
|
4303
4277
|
return !1;
|
|
4304
4278
|
for (let u = 0; u < e.set.length; ++u) {
|
|
4305
4279
|
const l = e.set[u];
|
|
4306
4280
|
let d = null, f = null;
|
|
4307
4281
|
if (l.forEach((h) => {
|
|
4308
|
-
h.semver ===
|
|
4282
|
+
h.semver === lc && (h = new Cs(">=0.0.0")), d = d || h, f = f || h, o(h.semver, d.semver, r) ? d = h : i(h.semver, f.semver, r) && (f = h);
|
|
4309
4283
|
}), d.operator === a || d.operator === c || (!f.operator || f.operator === a) && n(s, f.semver))
|
|
4310
4284
|
return !1;
|
|
4311
4285
|
if (f.operator === c && i(s, f.semver))
|
|
@@ -4313,20 +4287,20 @@ const gc = H, Fs = ct(), { ANY: mc } = Fs, vc = te(), yc = lt, Lr = at, Dr = _t,
|
|
|
4313
4287
|
}
|
|
4314
4288
|
return !0;
|
|
4315
4289
|
};
|
|
4316
|
-
var
|
|
4317
|
-
const
|
|
4318
|
-
var
|
|
4319
|
-
const
|
|
4320
|
-
var
|
|
4321
|
-
const
|
|
4322
|
-
var
|
|
4323
|
-
const
|
|
4324
|
-
var
|
|
4290
|
+
var _t = fc;
|
|
4291
|
+
const gc = _t, mc = (s, e, t) => gc(s, e, ">", t);
|
|
4292
|
+
var vc = mc;
|
|
4293
|
+
const yc = _t, Sc = (s, e, t) => yc(s, e, "<", t);
|
|
4294
|
+
var wc = Sc;
|
|
4295
|
+
const Ir = te(), bc = (s, e, t) => (s = new Ir(s, t), e = new Ir(e, t), s.intersects(e, t));
|
|
4296
|
+
var Rc = bc;
|
|
4297
|
+
const Ec = it, Cc = ee;
|
|
4298
|
+
var kc = (s, e, t) => {
|
|
4325
4299
|
const r = [];
|
|
4326
4300
|
let o = null, n = null;
|
|
4327
|
-
const i = s.sort((l, d) =>
|
|
4301
|
+
const i = s.sort((l, d) => Cc(l, d, t));
|
|
4328
4302
|
for (const l of i)
|
|
4329
|
-
|
|
4303
|
+
Ec(l, e, t) ? (n = l, o || (o = l)) : (n && r.push([o, n]), n = null, o = null);
|
|
4330
4304
|
o && r.push([o, null]);
|
|
4331
4305
|
const a = [];
|
|
4332
4306
|
for (const [l, d] of r)
|
|
@@ -4334,14 +4308,14 @@ var Tc = (s, e, t) => {
|
|
|
4334
4308
|
const c = a.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e);
|
|
4335
4309
|
return c.length < u.length ? c : e;
|
|
4336
4310
|
};
|
|
4337
|
-
const
|
|
4311
|
+
const Fr = te(), Kt = nt(), { ANY: ft } = Kt, Re = it, Ht = ee, Pc = (s, e, t = {}) => {
|
|
4338
4312
|
if (s === e)
|
|
4339
4313
|
return !0;
|
|
4340
|
-
s = new
|
|
4314
|
+
s = new Fr(s, t), e = new Fr(e, t);
|
|
4341
4315
|
let r = !1;
|
|
4342
4316
|
e: for (const o of s.set) {
|
|
4343
4317
|
for (const n of e.set) {
|
|
4344
|
-
const i =
|
|
4318
|
+
const i = $c(o, n, t);
|
|
4345
4319
|
if (r = r || i !== null, i)
|
|
4346
4320
|
continue e;
|
|
4347
4321
|
}
|
|
@@ -4349,37 +4323,37 @@ const Br = te(), zt = ct(), { ANY: vt } = zt, Ce = lt, Xt = ee, Lc = (s, e, t =
|
|
|
4349
4323
|
return !1;
|
|
4350
4324
|
}
|
|
4351
4325
|
return !0;
|
|
4352
|
-
},
|
|
4326
|
+
}, Oc = [new Kt(">=0.0.0-0")], Ar = [new Kt(">=0.0.0")], $c = (s, e, t) => {
|
|
4353
4327
|
if (s === e)
|
|
4354
4328
|
return !0;
|
|
4355
|
-
if (s.length === 1 && s[0].semver ===
|
|
4356
|
-
if (e.length === 1 && e[0].semver ===
|
|
4329
|
+
if (s.length === 1 && s[0].semver === ft) {
|
|
4330
|
+
if (e.length === 1 && e[0].semver === ft)
|
|
4357
4331
|
return !0;
|
|
4358
|
-
t.includePrerelease ? s =
|
|
4332
|
+
t.includePrerelease ? s = Oc : s = Ar;
|
|
4359
4333
|
}
|
|
4360
|
-
if (e.length === 1 && e[0].semver ===
|
|
4334
|
+
if (e.length === 1 && e[0].semver === ft) {
|
|
4361
4335
|
if (t.includePrerelease)
|
|
4362
4336
|
return !0;
|
|
4363
|
-
e =
|
|
4337
|
+
e = Ar;
|
|
4364
4338
|
}
|
|
4365
4339
|
const r = /* @__PURE__ */ new Set();
|
|
4366
4340
|
let o, n;
|
|
4367
4341
|
for (const h of s)
|
|
4368
|
-
h.operator === ">" || h.operator === ">=" ? o =
|
|
4342
|
+
h.operator === ">" || h.operator === ">=" ? o = Tr(o, h, t) : h.operator === "<" || h.operator === "<=" ? n = Lr(n, h, t) : r.add(h.semver);
|
|
4369
4343
|
if (r.size > 1)
|
|
4370
4344
|
return null;
|
|
4371
4345
|
let i;
|
|
4372
4346
|
if (o && n) {
|
|
4373
|
-
if (i =
|
|
4347
|
+
if (i = Ht(o.semver, n.semver, t), i > 0)
|
|
4374
4348
|
return null;
|
|
4375
4349
|
if (i === 0 && (o.operator !== ">=" || n.operator !== "<="))
|
|
4376
4350
|
return null;
|
|
4377
4351
|
}
|
|
4378
4352
|
for (const h of r) {
|
|
4379
|
-
if (o && !
|
|
4353
|
+
if (o && !Re(h, String(o), t) || n && !Re(h, String(n), t))
|
|
4380
4354
|
return null;
|
|
4381
4355
|
for (const E of e)
|
|
4382
|
-
if (!
|
|
4356
|
+
if (!Re(h, String(E), t))
|
|
4383
4357
|
return !1;
|
|
4384
4358
|
return !0;
|
|
4385
4359
|
}
|
|
@@ -4388,88 +4362,88 @@ const Br = te(), zt = ct(), { ANY: vt } = zt, Ce = lt, Xt = ee, Lc = (s, e, t =
|
|
|
4388
4362
|
for (const h of e) {
|
|
4389
4363
|
if (l = l || h.operator === ">" || h.operator === ">=", u = u || h.operator === "<" || h.operator === "<=", o) {
|
|
4390
4364
|
if (f && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === f.major && h.semver.minor === f.minor && h.semver.patch === f.patch && (f = !1), h.operator === ">" || h.operator === ">=") {
|
|
4391
|
-
if (a =
|
|
4365
|
+
if (a = Tr(o, h, t), a === h && a !== o)
|
|
4392
4366
|
return !1;
|
|
4393
|
-
} else if (o.operator === ">=" && !
|
|
4367
|
+
} else if (o.operator === ">=" && !Re(o.semver, String(h), t))
|
|
4394
4368
|
return !1;
|
|
4395
4369
|
}
|
|
4396
4370
|
if (n) {
|
|
4397
4371
|
if (d && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === d.major && h.semver.minor === d.minor && h.semver.patch === d.patch && (d = !1), h.operator === "<" || h.operator === "<=") {
|
|
4398
|
-
if (c =
|
|
4372
|
+
if (c = Lr(n, h, t), c === h && c !== n)
|
|
4399
4373
|
return !1;
|
|
4400
|
-
} else if (n.operator === "<=" && !
|
|
4374
|
+
} else if (n.operator === "<=" && !Re(n.semver, String(h), t))
|
|
4401
4375
|
return !1;
|
|
4402
4376
|
}
|
|
4403
4377
|
if (!h.operator && (n || o) && i !== 0)
|
|
4404
4378
|
return !1;
|
|
4405
4379
|
}
|
|
4406
4380
|
return !(o && u && !n && i !== 0 || n && l && !o && i !== 0 || f || d);
|
|
4407
|
-
},
|
|
4381
|
+
}, Tr = (s, e, t) => {
|
|
4408
4382
|
if (!s)
|
|
4409
4383
|
return e;
|
|
4410
|
-
const r =
|
|
4384
|
+
const r = Ht(s.semver, e.semver, t);
|
|
4411
4385
|
return r > 0 ? s : r < 0 || e.operator === ">" && s.operator === ">=" ? e : s;
|
|
4412
|
-
},
|
|
4386
|
+
}, Lr = (s, e, t) => {
|
|
4413
4387
|
if (!s)
|
|
4414
4388
|
return e;
|
|
4415
|
-
const r =
|
|
4389
|
+
const r = Ht(s.semver, e.semver, t);
|
|
4416
4390
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4417
4391
|
};
|
|
4418
|
-
var
|
|
4419
|
-
const
|
|
4420
|
-
var
|
|
4421
|
-
parse:
|
|
4422
|
-
valid:
|
|
4423
|
-
clean:
|
|
4424
|
-
inc:
|
|
4425
|
-
diff:
|
|
4426
|
-
major:
|
|
4427
|
-
minor:
|
|
4428
|
-
patch:
|
|
4429
|
-
prerelease:
|
|
4430
|
-
compare:
|
|
4431
|
-
rcompare:
|
|
4432
|
-
compareLoose:
|
|
4433
|
-
compareBuild:
|
|
4434
|
-
sort:
|
|
4435
|
-
rsort:
|
|
4436
|
-
gt:
|
|
4437
|
-
lt:
|
|
4438
|
-
eq:
|
|
4439
|
-
neq:
|
|
4440
|
-
gte:
|
|
4441
|
-
lte:
|
|
4442
|
-
cmp:
|
|
4443
|
-
coerce:
|
|
4444
|
-
Comparator:
|
|
4445
|
-
Range:
|
|
4446
|
-
satisfies:
|
|
4447
|
-
toComparators:
|
|
4448
|
-
maxSatisfying:
|
|
4449
|
-
minSatisfying:
|
|
4450
|
-
minVersion:
|
|
4451
|
-
validRange:
|
|
4452
|
-
outside:
|
|
4453
|
-
gtr:
|
|
4454
|
-
ltr:
|
|
4455
|
-
intersects:
|
|
4456
|
-
simplifyRange:
|
|
4457
|
-
subset:
|
|
4458
|
-
SemVer:
|
|
4459
|
-
re:
|
|
4460
|
-
src:
|
|
4461
|
-
tokens:
|
|
4462
|
-
SEMVER_SPEC_VERSION:
|
|
4463
|
-
RELEASE_TYPES:
|
|
4464
|
-
compareIdentifiers:
|
|
4465
|
-
rcompareIdentifiers:
|
|
4392
|
+
var Ic = Pc;
|
|
4393
|
+
const gt = Be, Nr = rt, Fc = H, Dr = ws, Ac = Se, Tc = ji, Lc = Ji, Nc = Mi, Dc = Ki, Bc = zi, xc = Yi, jc = ea, Vc = sa, Uc = ee, Jc = aa, Gc = ua, Mc = Ut, _c = fa, Kc = va, Hc = ot, Wc = Jt, zc = bs, Xc = Rs, qc = Gt, Yc = Mt, Qc = Es, Zc = Ua, el = nt(), tl = te(), rl = it, sl = Wa, ol = Ya, nl = tc, il = oc, al = ac, cl = _t, ll = vc, ul = wc, dl = Rc, pl = kc, hl = Ic;
|
|
4394
|
+
var fl = {
|
|
4395
|
+
parse: Ac,
|
|
4396
|
+
valid: Tc,
|
|
4397
|
+
clean: Lc,
|
|
4398
|
+
inc: Nc,
|
|
4399
|
+
diff: Dc,
|
|
4400
|
+
major: Bc,
|
|
4401
|
+
minor: xc,
|
|
4402
|
+
patch: jc,
|
|
4403
|
+
prerelease: Vc,
|
|
4404
|
+
compare: Uc,
|
|
4405
|
+
rcompare: Jc,
|
|
4406
|
+
compareLoose: Gc,
|
|
4407
|
+
compareBuild: Mc,
|
|
4408
|
+
sort: _c,
|
|
4409
|
+
rsort: Kc,
|
|
4410
|
+
gt: Hc,
|
|
4411
|
+
lt: Wc,
|
|
4412
|
+
eq: zc,
|
|
4413
|
+
neq: Xc,
|
|
4414
|
+
gte: qc,
|
|
4415
|
+
lte: Yc,
|
|
4416
|
+
cmp: Qc,
|
|
4417
|
+
coerce: Zc,
|
|
4418
|
+
Comparator: el,
|
|
4419
|
+
Range: tl,
|
|
4420
|
+
satisfies: rl,
|
|
4421
|
+
toComparators: sl,
|
|
4422
|
+
maxSatisfying: ol,
|
|
4423
|
+
minSatisfying: nl,
|
|
4424
|
+
minVersion: il,
|
|
4425
|
+
validRange: al,
|
|
4426
|
+
outside: cl,
|
|
4427
|
+
gtr: ll,
|
|
4428
|
+
ltr: ul,
|
|
4429
|
+
intersects: dl,
|
|
4430
|
+
simplifyRange: pl,
|
|
4431
|
+
subset: hl,
|
|
4432
|
+
SemVer: Fc,
|
|
4433
|
+
re: gt.re,
|
|
4434
|
+
src: gt.src,
|
|
4435
|
+
tokens: gt.t,
|
|
4436
|
+
SEMVER_SPEC_VERSION: Nr.SEMVER_SPEC_VERSION,
|
|
4437
|
+
RELEASE_TYPES: Nr.RELEASE_TYPES,
|
|
4438
|
+
compareIdentifiers: Dr.compareIdentifiers,
|
|
4439
|
+
rcompareIdentifiers: Dr.rcompareIdentifiers
|
|
4466
4440
|
};
|
|
4467
|
-
const
|
|
4441
|
+
const gl = /* @__PURE__ */ Ri(fl), ml = {
|
|
4468
4442
|
minDelay: 1500
|
|
4469
|
-
},
|
|
4470
|
-
class
|
|
4443
|
+
}, vl = "__no_updates__";
|
|
4444
|
+
class yl extends Ys {
|
|
4471
4445
|
constructor(t, r, o = {}) {
|
|
4472
|
-
super({ ...o, ...
|
|
4446
|
+
super({ ...o, ...ml }, r);
|
|
4473
4447
|
w(this, "http");
|
|
4474
4448
|
w(this, "preferredUpdateChannel");
|
|
4475
4449
|
this.registryProvider = t, this.http = o.http, this.preferredUpdateChannel = o.preferredUpdateChannel;
|
|
@@ -4483,7 +4457,7 @@ class Pl extends oo {
|
|
|
4483
4457
|
case "from-registry-v2":
|
|
4484
4458
|
return `from_registry_v2_${Z(t)}`;
|
|
4485
4459
|
default:
|
|
4486
|
-
return
|
|
4460
|
+
return vl;
|
|
4487
4461
|
}
|
|
4488
4462
|
}
|
|
4489
4463
|
async readValue(t) {
|
|
@@ -4493,16 +4467,16 @@ class Pl extends oo {
|
|
|
4493
4467
|
switch (n.type) {
|
|
4494
4468
|
case "dev-v1":
|
|
4495
4469
|
try {
|
|
4496
|
-
const i = await
|
|
4470
|
+
const i = await qr(n.folder);
|
|
4497
4471
|
return i === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: i }, suggestions: [] };
|
|
4498
4472
|
} catch (i) {
|
|
4499
4473
|
return this.logger.warn(i), { suggestions: [] };
|
|
4500
4474
|
}
|
|
4501
4475
|
case "dev-v2":
|
|
4502
4476
|
try {
|
|
4503
|
-
const i = await
|
|
4477
|
+
const i = await yt(n.folder, this.logger);
|
|
4504
4478
|
if (i === void 0) return { suggestions: [] };
|
|
4505
|
-
const a = await
|
|
4479
|
+
const a = await Lt(i);
|
|
4506
4480
|
return a === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: a }, suggestions: [] };
|
|
4507
4481
|
} catch (i) {
|
|
4508
4482
|
return this.logger.warn(i), { suggestions: [] };
|
|
@@ -4515,13 +4489,13 @@ class Pl extends oo {
|
|
|
4515
4489
|
let u = this.preferredUpdateChannel;
|
|
4516
4490
|
if (u === void 0)
|
|
4517
4491
|
if (n.channel === void 0)
|
|
4518
|
-
if (await c.getLatestOverview(n.id,
|
|
4492
|
+
if (await c.getLatestOverview(n.id, Oe)) u = Oe;
|
|
4519
4493
|
else {
|
|
4520
|
-
if (await c.getLatestOverview(n.id,
|
|
4494
|
+
if (await c.getLatestOverview(n.id, Pe) === void 0)
|
|
4521
4495
|
return this.logger.error(
|
|
4522
|
-
`No "any" channel record for ${
|
|
4496
|
+
`No "any" channel record for ${Ls(n.id)}`
|
|
4523
4497
|
), { suggestions: [] };
|
|
4524
|
-
u =
|
|
4498
|
+
u = Pe;
|
|
4525
4499
|
}
|
|
4526
4500
|
else u = n.channel;
|
|
4527
4501
|
const l = await c.getUpdateSuggestions(n.id, u);
|
|
@@ -4544,7 +4518,7 @@ class Pl extends oo {
|
|
|
4544
4518
|
update: { ...n, id: { ...n.id, version: g } }
|
|
4545
4519
|
}));
|
|
4546
4520
|
if (d === void 0) return { suggestions: f };
|
|
4547
|
-
if (a !== void 0 &&
|
|
4521
|
+
if (a !== void 0 && gl.lte(d, a))
|
|
4548
4522
|
return { suggestions: f };
|
|
4549
4523
|
const h = {
|
|
4550
4524
|
...n,
|
|
@@ -4571,7 +4545,7 @@ class Pl extends oo {
|
|
|
4571
4545
|
return Z(t) === Z(r);
|
|
4572
4546
|
}
|
|
4573
4547
|
}
|
|
4574
|
-
class
|
|
4548
|
+
class Br {
|
|
4575
4549
|
constructor() {
|
|
4576
4550
|
w(this, "resources", /* @__PURE__ */ new Map());
|
|
4577
4551
|
}
|
|
@@ -4602,19 +4576,18 @@ class Gr {
|
|
|
4602
4576
|
return (t = this.resources.get(e)) == null ? void 0 : t.resource;
|
|
4603
4577
|
}
|
|
4604
4578
|
}
|
|
4605
|
-
let
|
|
4606
|
-
function
|
|
4607
|
-
return
|
|
4579
|
+
let Ee;
|
|
4580
|
+
function ce() {
|
|
4581
|
+
return Ee || (Ee = {
|
|
4608
4582
|
logPFrameRequests: process.env.MI_LOG_PFRAMES !== void 0,
|
|
4609
|
-
usePFrameRs: process.env.MI_USE_PFRAMES_RS !== void 0,
|
|
4610
4583
|
dumpInitialTreeState: process.env.MI_DUMP_INITIAL_TREE_STATE !== void 0
|
|
4611
|
-
}, process.env.MI_LOG_TREE_STAT && (
|
|
4584
|
+
}, process.env.MI_LOG_TREE_STAT && (Ee.logTreeStats = process.env.MI_LOG_TREE_STAT === "cumulative" ? "cumulative" : "per-request"), Ee);
|
|
4612
4585
|
}
|
|
4613
|
-
function
|
|
4586
|
+
function Fe(s) {
|
|
4614
4587
|
return String(s.id);
|
|
4615
4588
|
}
|
|
4616
|
-
const
|
|
4617
|
-
function
|
|
4589
|
+
const Sl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
4590
|
+
function mt(s) {
|
|
4618
4591
|
const e = [], t = [];
|
|
4619
4592
|
for (const r of s)
|
|
4620
4593
|
r.type === "bySingleColumn" ? (e.push(r), t.push({
|
|
@@ -4629,21 +4602,12 @@ function me(s) {
|
|
|
4629
4602
|
}
|
|
4630
4603
|
return t;
|
|
4631
4604
|
}
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
var t;
|
|
4635
|
-
if (((t = s.signal) == null ? void 0 : t.aborted) === !1)
|
|
4636
|
-
return e instanceof Error && s.logger.warn(`PFrames Rust failed, error: ${e.message}`), s.cppCallback();
|
|
4637
|
-
throw e;
|
|
4638
|
-
});
|
|
4639
|
-
}
|
|
4640
|
-
const ke = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
4641
|
-
class Ol {
|
|
4605
|
+
const Ce = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
4606
|
+
class wl {
|
|
4642
4607
|
constructor(e, t, r, o) {
|
|
4643
4608
|
w(this, "rustPFrame");
|
|
4644
4609
|
w(this, "blobIdToResource", /* @__PURE__ */ new Map());
|
|
4645
4610
|
w(this, "blobHandleComputables", /* @__PURE__ */ new Map());
|
|
4646
|
-
w(this, "createDataPFrame");
|
|
4647
4611
|
w(this, "preloadBlob", async (e) => {
|
|
4648
4612
|
const t = e.map((r) => this.getOrCreateComputableForBlob(r));
|
|
4649
4613
|
for (const r of t) await r.awaitStableFullValue();
|
|
@@ -4674,56 +4638,27 @@ class Ol {
|
|
|
4674
4638
|
}
|
|
4675
4639
|
};
|
|
4676
4640
|
for (const a of o)
|
|
4677
|
-
for (const c of
|
|
4678
|
-
this.blobIdToResource.set(
|
|
4641
|
+
for (const c of gn(a.data))
|
|
4642
|
+
this.blobIdToResource.set(Fe(c), c);
|
|
4679
4643
|
const i = [
|
|
4680
4644
|
...new Map(o.map((a) => ({
|
|
4681
4645
|
...a,
|
|
4682
|
-
data:
|
|
4646
|
+
data: mn(a.data, Fe)
|
|
4683
4647
|
})).map(
|
|
4684
4648
|
(a) => [Z(a), a]
|
|
4685
4649
|
)).values()
|
|
4686
4650
|
];
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
}
|
|
4699
|
-
})(), this.createDataPFrame = () => {
|
|
4700
|
-
try {
|
|
4701
|
-
const a = se().logPFrameRequests ? new or(n) : new or();
|
|
4702
|
-
a.setDataSource(this);
|
|
4703
|
-
for (const c of i)
|
|
4704
|
-
try {
|
|
4705
|
-
a.addColumnSpec(c.id, c.spec), a.setColumnData(c.id, c.data);
|
|
4706
|
-
} catch (u) {
|
|
4707
|
-
throw new Error(
|
|
4708
|
-
`Adding column ${c.id} to PFrame failed: ${u}; Spec: ${JSON.stringify(c.spec)}, DataInfo: ${JSON.stringify(c.data)}.`
|
|
4709
|
-
);
|
|
4710
|
-
}
|
|
4711
|
-
return a;
|
|
4712
|
-
} catch (a) {
|
|
4713
|
-
throw new Error(
|
|
4714
|
-
`Data PFrame creation failed, columns: ${JSON.stringify(i)}, error: ${a}`
|
|
4715
|
-
);
|
|
4716
|
-
}
|
|
4717
|
-
};
|
|
4718
|
-
}
|
|
4719
|
-
get disposableDataPFrame() {
|
|
4720
|
-
const e = this.createDataPFrame();
|
|
4721
|
-
return {
|
|
4722
|
-
dataPFrame: e,
|
|
4723
|
-
[Symbol.dispose]: () => {
|
|
4724
|
-
e.dispose();
|
|
4725
|
-
}
|
|
4726
|
-
};
|
|
4651
|
+
try {
|
|
4652
|
+
const a = new vo(ce().logPFrameRequests ? n : void 0);
|
|
4653
|
+
a.setDataSource(this);
|
|
4654
|
+
for (const c of i)
|
|
4655
|
+
a.addColumnSpec(c.id, c.spec), a.setColumnData(c.id, c.data);
|
|
4656
|
+
this.rustPFrame = a;
|
|
4657
|
+
} catch (a) {
|
|
4658
|
+
throw new Error(
|
|
4659
|
+
`Rust PFrame creation failed, columns: ${JSON.stringify(i)}, error: ${a}`
|
|
4660
|
+
);
|
|
4661
|
+
}
|
|
4727
4662
|
}
|
|
4728
4663
|
getOrCreateComputableForBlob(e) {
|
|
4729
4664
|
let t = this.blobHandleComputables.get(e);
|
|
@@ -4737,7 +4672,7 @@ class Ol {
|
|
|
4737
4672
|
this.rustPFrame.dispose();
|
|
4738
4673
|
}
|
|
4739
4674
|
}
|
|
4740
|
-
class
|
|
4675
|
+
class bl {
|
|
4741
4676
|
constructor(e) {
|
|
4742
4677
|
this.table = e;
|
|
4743
4678
|
}
|
|
@@ -4745,84 +4680,54 @@ class $l {
|
|
|
4745
4680
|
this.table.then((e) => e.dispose());
|
|
4746
4681
|
}
|
|
4747
4682
|
}
|
|
4748
|
-
class
|
|
4683
|
+
class Rl {
|
|
4749
4684
|
constructor(e, t) {
|
|
4750
4685
|
w(this, "pFrames");
|
|
4751
4686
|
w(this, "pTables");
|
|
4752
4687
|
w(this, "blobContentCache");
|
|
4753
|
-
/** Limits concurrent requests to PFrame API to prevent deadlock with Node's IO threads */
|
|
4754
|
-
w(this, "concurrencyLimiter");
|
|
4755
4688
|
this.blobDriver = e, this.logger = t;
|
|
4756
|
-
const r = new
|
|
4689
|
+
const r = new Hr({
|
|
4757
4690
|
maxSize: 1e9,
|
|
4758
4691
|
// 1Gb
|
|
4759
|
-
fetchMethod: async (
|
|
4760
|
-
sizeCalculation: (
|
|
4692
|
+
fetchMethod: async (o) => await _r.readFile(o),
|
|
4693
|
+
sizeCalculation: (o) => o.length
|
|
4761
4694
|
});
|
|
4762
|
-
this.blobContentCache = r
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
constructor(n, i) {
|
|
4766
|
-
super(), this.blobDriver = n, this.logger = i;
|
|
4695
|
+
this.blobContentCache = r, this.pFrames = new class extends Br {
|
|
4696
|
+
constructor(o, n) {
|
|
4697
|
+
super(), this.blobDriver = o, this.logger = n;
|
|
4767
4698
|
}
|
|
4768
|
-
createNewResource(
|
|
4769
|
-
return
|
|
4770
|
-
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(
|
|
4771
|
-
), new
|
|
4699
|
+
createNewResource(o) {
|
|
4700
|
+
return ce().logPFrameRequests && t.info(
|
|
4701
|
+
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, Ce)}`
|
|
4702
|
+
), new wl(this.blobDriver, this.logger, r, o);
|
|
4772
4703
|
}
|
|
4773
|
-
calculateParamsKey(
|
|
4774
|
-
return
|
|
4704
|
+
calculateParamsKey(o) {
|
|
4705
|
+
return Cl(o);
|
|
4775
4706
|
}
|
|
4776
|
-
}(this.blobDriver, this.logger), this.pTables = new class extends
|
|
4777
|
-
constructor(
|
|
4778
|
-
super(), this.pFrames =
|
|
4707
|
+
}(this.blobDriver, this.logger), this.pTables = new class extends Br {
|
|
4708
|
+
constructor(o) {
|
|
4709
|
+
super(), this.pFrames = o;
|
|
4779
4710
|
}
|
|
4780
|
-
createNewResource(
|
|
4781
|
-
const
|
|
4782
|
-
|
|
4783
|
-
`PTable creation (pTableHandle = ${this.calculateParamsKey(
|
|
4711
|
+
createNewResource(o) {
|
|
4712
|
+
const n = o.pFrameHandle;
|
|
4713
|
+
ce().logPFrameRequests && t.info(
|
|
4714
|
+
`PTable creation (pTableHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, Ce)}`
|
|
4784
4715
|
);
|
|
4785
|
-
const
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
var d = l, f = !0;
|
|
4796
|
-
} finally {
|
|
4797
|
-
Ve(u, d, f);
|
|
4798
|
-
}
|
|
4799
|
-
}).then(async (c) => {
|
|
4800
|
-
if (n.def.sorting.length === 0) return c;
|
|
4801
|
-
try {
|
|
4802
|
-
return await o.run(async () => await c.sort(n.def.sorting, n.signal));
|
|
4803
|
-
} finally {
|
|
4804
|
-
c.dispose();
|
|
4805
|
-
}
|
|
4806
|
-
}),
|
|
4807
|
-
rustCallback: () => this.pFrames.getByKey(i).rustPFrame.createTable({
|
|
4808
|
-
src: ue(n.def.src),
|
|
4809
|
-
filters: me(n.def.filters)
|
|
4810
|
-
}, n.signal).then(async (c) => {
|
|
4811
|
-
if (n.def.sorting.length === 0) return c;
|
|
4812
|
-
try {
|
|
4813
|
-
return await c.sort(n.def.sorting, n.signal);
|
|
4814
|
-
} finally {
|
|
4815
|
-
c.dispose();
|
|
4816
|
-
}
|
|
4817
|
-
}),
|
|
4818
|
-
logger: t,
|
|
4819
|
-
filters: n.def.filters,
|
|
4820
|
-
signal: n.signal
|
|
4716
|
+
const i = this.pFrames.getByKey(n).rustPFrame.createTable({
|
|
4717
|
+
src: Ae(o.def.src),
|
|
4718
|
+
filters: mt(o.def.filters)
|
|
4719
|
+
}, o.signal).then(async (a) => {
|
|
4720
|
+
if (o.def.sorting.length === 0) return a;
|
|
4721
|
+
try {
|
|
4722
|
+
return await a.sort(o.def.sorting, o.signal);
|
|
4723
|
+
} finally {
|
|
4724
|
+
a.dispose();
|
|
4725
|
+
}
|
|
4821
4726
|
});
|
|
4822
|
-
return new
|
|
4727
|
+
return new bl(i);
|
|
4823
4728
|
}
|
|
4824
|
-
calculateParamsKey(
|
|
4825
|
-
return
|
|
4729
|
+
calculateParamsKey(o) {
|
|
4730
|
+
return El(o);
|
|
4826
4731
|
}
|
|
4827
4732
|
}(this.pFrames);
|
|
4828
4733
|
}
|
|
@@ -4830,20 +4735,20 @@ class Il {
|
|
|
4830
4735
|
// Internal / Config API Methods
|
|
4831
4736
|
//
|
|
4832
4737
|
createPFrame(e, t) {
|
|
4833
|
-
const r = e.filter((n) =>
|
|
4738
|
+
const r = e.filter((n) => Sl.find((i) => i === n.spec.valueType)).map(
|
|
4834
4739
|
(n) => le(
|
|
4835
4740
|
n,
|
|
4836
|
-
(i) =>
|
|
4741
|
+
(i) => qs(i) ? Rn(i) : Vr(i) ? Ur(i, (a) => a.resourceInfo) : En(n.spec, i)
|
|
4837
4742
|
)
|
|
4838
4743
|
), o = this.pFrames.acquire(r);
|
|
4839
4744
|
return t.addOnDestroy(o.unref), o.key;
|
|
4840
4745
|
}
|
|
4841
4746
|
createPTable(e, t, r) {
|
|
4842
|
-
const o = this.createPFrame(
|
|
4843
|
-
return
|
|
4747
|
+
const o = this.createPFrame(Ts(e.src), t), n = vt(e, (a) => a.id), i = this.pTables.acquire({ def: n, pFrameHandle: o, signal: r });
|
|
4748
|
+
return ce().logPFrameRequests && this.logger.info(
|
|
4844
4749
|
`Create PTable call (pFrameHandle = ${o}; pTableHandle = ${JSON.stringify(i)}): ${JSON.stringify(
|
|
4845
|
-
|
|
4846
|
-
|
|
4750
|
+
vt(e, (a) => a.spec),
|
|
4751
|
+
Ce
|
|
4847
4752
|
)}`
|
|
4848
4753
|
), t.addOnDestroy(i.unref), i.key;
|
|
4849
4754
|
}
|
|
@@ -4876,94 +4781,37 @@ class Il {
|
|
|
4876
4781
|
return await this.pFrames.getByKey(e).rustPFrame.listColumns();
|
|
4877
4782
|
}
|
|
4878
4783
|
async calculateTableData(e, t, r) {
|
|
4879
|
-
return
|
|
4880
|
-
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t,
|
|
4881
|
-
), await
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
}
|
|
4902
|
-
}).then(async (o) => {
|
|
4903
|
-
try {
|
|
4904
|
-
const n = o.getSpec(), i = await this.concurrencyLimiter.run(
|
|
4905
|
-
async () => await o.getData([...n.keys()])
|
|
4906
|
-
);
|
|
4907
|
-
return n.map((a, c) => ({
|
|
4908
|
-
spec: a,
|
|
4909
|
-
data: i[c]
|
|
4910
|
-
}));
|
|
4911
|
-
} finally {
|
|
4912
|
-
o.dispose();
|
|
4913
|
-
}
|
|
4914
|
-
}),
|
|
4915
|
-
rustCallback: async () => await this.pFrames.getByKey(e).rustPFrame.createTable({
|
|
4916
|
-
src: ue(t.src),
|
|
4917
|
-
filters: me(t.filters)
|
|
4918
|
-
}, r).then(async (o) => {
|
|
4919
|
-
if (t.sorting.length === 0) return o;
|
|
4920
|
-
try {
|
|
4921
|
-
return await o.sort(t.sorting, r);
|
|
4922
|
-
} finally {
|
|
4923
|
-
o.dispose();
|
|
4924
|
-
}
|
|
4925
|
-
}).then(async (o) => {
|
|
4926
|
-
try {
|
|
4927
|
-
const n = o.getSpec(), i = await o.getData([...n.keys()]);
|
|
4928
|
-
return n.map((a, c) => ({
|
|
4929
|
-
spec: a,
|
|
4930
|
-
data: i[c]
|
|
4931
|
-
}));
|
|
4932
|
-
} finally {
|
|
4933
|
-
o.dispose();
|
|
4934
|
-
}
|
|
4935
|
-
}),
|
|
4936
|
-
logger: this.logger,
|
|
4937
|
-
filters: t.filters,
|
|
4938
|
-
signal: r
|
|
4784
|
+
return ce().logPFrameRequests && this.logger.info(
|
|
4785
|
+
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t, Ce)}`
|
|
4786
|
+
), await this.pFrames.getByKey(e).rustPFrame.createTable({
|
|
4787
|
+
src: Ae(t.src),
|
|
4788
|
+
filters: mt(t.filters)
|
|
4789
|
+
}, r).then(async (o) => {
|
|
4790
|
+
if (t.sorting.length === 0) return o;
|
|
4791
|
+
try {
|
|
4792
|
+
return await o.sort(t.sorting, r);
|
|
4793
|
+
} finally {
|
|
4794
|
+
o.dispose();
|
|
4795
|
+
}
|
|
4796
|
+
}).then(async (o) => {
|
|
4797
|
+
try {
|
|
4798
|
+
const n = o.getSpec(), i = await o.getData([...n.keys()]);
|
|
4799
|
+
return n.map((a, c) => ({
|
|
4800
|
+
spec: a,
|
|
4801
|
+
data: i[c]
|
|
4802
|
+
}));
|
|
4803
|
+
} finally {
|
|
4804
|
+
o.dispose();
|
|
4805
|
+
}
|
|
4939
4806
|
});
|
|
4940
4807
|
}
|
|
4941
4808
|
async getUniqueValues(e, t, r) {
|
|
4942
|
-
return
|
|
4943
|
-
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t,
|
|
4944
|
-
), await
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
const o = je(n, this.pFrames.getByKey(e).disposableDataPFrame);
|
|
4949
|
-
return await o.dataPFrame.getUniqueValues({
|
|
4950
|
-
...t,
|
|
4951
|
-
filters: me(t.filters)
|
|
4952
|
-
}, r);
|
|
4953
|
-
} catch (i) {
|
|
4954
|
-
var a = i, c = !0;
|
|
4955
|
-
} finally {
|
|
4956
|
-
Ve(n, a, c);
|
|
4957
|
-
}
|
|
4958
|
-
}),
|
|
4959
|
-
rustCallback: async () => await this.pFrames.getByKey(e).rustPFrame.getUniqueValues({
|
|
4960
|
-
...t,
|
|
4961
|
-
filters: me(t.filters)
|
|
4962
|
-
}, r),
|
|
4963
|
-
logger: this.logger,
|
|
4964
|
-
filters: t.filters,
|
|
4965
|
-
signal: r
|
|
4966
|
-
});
|
|
4809
|
+
return ce().logPFrameRequests && this.logger.info(
|
|
4810
|
+
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, Ce)}`
|
|
4811
|
+
), await this.pFrames.getByKey(e).rustPFrame.getUniqueValues({
|
|
4812
|
+
...t,
|
|
4813
|
+
filters: mt(t.filters)
|
|
4814
|
+
}, r);
|
|
4967
4815
|
}
|
|
4968
4816
|
//
|
|
4969
4817
|
// PTable istance methods
|
|
@@ -4975,41 +4823,44 @@ class Il {
|
|
|
4975
4823
|
return (await this.pTables.getByKey(e).table).getSpec();
|
|
4976
4824
|
}
|
|
4977
4825
|
async getData(e, t, r) {
|
|
4978
|
-
|
|
4979
|
-
return await this.concurrencyLimiter.run(
|
|
4980
|
-
async () => await o.getData(t, r)
|
|
4981
|
-
);
|
|
4826
|
+
return await (await this.pTables.getByKey(e).table).getData(t, r);
|
|
4982
4827
|
}
|
|
4983
4828
|
}
|
|
4984
|
-
function
|
|
4829
|
+
function Ae(s) {
|
|
4985
4830
|
switch (s.type) {
|
|
4986
4831
|
case "column":
|
|
4987
4832
|
return {
|
|
4988
4833
|
type: "column",
|
|
4834
|
+
columnId: s.column
|
|
4835
|
+
};
|
|
4836
|
+
case "slicedColumn":
|
|
4837
|
+
return {
|
|
4838
|
+
type: "slicedColumn",
|
|
4989
4839
|
columnId: s.column,
|
|
4990
|
-
|
|
4840
|
+
newId: s.newId,
|
|
4841
|
+
axisFilters: s.axisFilters
|
|
4991
4842
|
};
|
|
4992
4843
|
case "inner":
|
|
4993
4844
|
case "full":
|
|
4994
4845
|
return {
|
|
4995
4846
|
type: s.type,
|
|
4996
|
-
entries: s.entries.map((e) =>
|
|
4847
|
+
entries: s.entries.map((e) => Ae(e))
|
|
4997
4848
|
};
|
|
4998
4849
|
case "outer":
|
|
4999
4850
|
return {
|
|
5000
4851
|
type: "outer",
|
|
5001
|
-
primary:
|
|
5002
|
-
secondary: s.secondary.map((e) =>
|
|
4852
|
+
primary: Ae(s.primary),
|
|
4853
|
+
secondary: s.secondary.map((e) => Ae(e))
|
|
5003
4854
|
};
|
|
5004
4855
|
default:
|
|
5005
4856
|
K(s);
|
|
5006
4857
|
}
|
|
5007
4858
|
}
|
|
5008
|
-
function
|
|
5009
|
-
const e =
|
|
4859
|
+
function El(s) {
|
|
4860
|
+
const e = De("sha256");
|
|
5010
4861
|
return e.update(Z(s)), e.digest().toString("hex");
|
|
5011
4862
|
}
|
|
5012
|
-
function
|
|
4863
|
+
function Cl(s) {
|
|
5013
4864
|
const e = [...s].map(
|
|
5014
4865
|
(r) => le(r, (o) => {
|
|
5015
4866
|
let n;
|
|
@@ -5031,7 +4882,7 @@ function Al(s) {
|
|
|
5031
4882
|
keyLength: o.partitionKeyLength,
|
|
5032
4883
|
payload: Object.entries(o.parts).map(([a, c]) => ({
|
|
5033
4884
|
key: a,
|
|
5034
|
-
value:
|
|
4885
|
+
value: Fe(c)
|
|
5035
4886
|
}))
|
|
5036
4887
|
};
|
|
5037
4888
|
break;
|
|
@@ -5041,7 +4892,7 @@ function Al(s) {
|
|
|
5041
4892
|
keyLength: o.partitionKeyLength,
|
|
5042
4893
|
payload: Object.entries(o.parts).map(([a, c]) => ({
|
|
5043
4894
|
key: a,
|
|
5044
|
-
value: [
|
|
4895
|
+
value: [Fe(c.index), Fe(c.values)]
|
|
5045
4896
|
}))
|
|
5046
4897
|
};
|
|
5047
4898
|
break;
|
|
@@ -5052,41 +4903,41 @@ function Al(s) {
|
|
|
5052
4903
|
})
|
|
5053
4904
|
);
|
|
5054
4905
|
e.sort((r, o) => r.id.localeCompare(o.id));
|
|
5055
|
-
const t =
|
|
4906
|
+
const t = De("sha256");
|
|
5056
4907
|
return t.update(Z(e)), t.digest().toString("hex");
|
|
5057
4908
|
}
|
|
5058
|
-
async function
|
|
4909
|
+
async function kl(s, e, t) {
|
|
5059
4910
|
const r = {
|
|
5060
|
-
...
|
|
5061
|
-
...
|
|
4911
|
+
...ms,
|
|
4912
|
+
...vs(e),
|
|
5062
4913
|
...t
|
|
5063
|
-
}, o = new
|
|
4914
|
+
}, o = new Mr(r.localSecret), n = no(r.logger, s, r.localProjections), i = io(s, r.logger), a = ao(s, r.logger), c = co(s, r.logger), u = new lo(
|
|
5064
4915
|
r.logger,
|
|
5065
4916
|
n,
|
|
5066
4917
|
i,
|
|
5067
4918
|
r.blobDownloadPath,
|
|
5068
4919
|
o,
|
|
5069
4920
|
r.blobDriverOps
|
|
5070
|
-
), l = new
|
|
4921
|
+
), l = new uo(
|
|
5071
4922
|
r.logger,
|
|
5072
4923
|
o,
|
|
5073
4924
|
n,
|
|
5074
4925
|
r.downloadBlobToURLPath,
|
|
5075
4926
|
r.downloadBlobToURLDriverOps
|
|
5076
|
-
), d = new
|
|
4927
|
+
), d = new po(
|
|
5077
4928
|
r.logger,
|
|
5078
4929
|
o,
|
|
5079
4930
|
a,
|
|
5080
4931
|
c,
|
|
5081
4932
|
r.uploadDriverOps
|
|
5082
|
-
), f = new
|
|
4933
|
+
), f = new ho(r.logger, i, r.logStreamDriverOps), h = new fo(r.logger, f, u), E = await go.init(
|
|
5083
4934
|
r.logger,
|
|
5084
4935
|
s,
|
|
5085
4936
|
o,
|
|
5086
4937
|
r.localProjections,
|
|
5087
4938
|
r.openFileDialogCallback,
|
|
5088
4939
|
r.virtualLocalStoragesOverride
|
|
5089
|
-
), g = new
|
|
4940
|
+
), g = new Rl(u, r.logger);
|
|
5090
4941
|
return {
|
|
5091
4942
|
blobDriver: u,
|
|
5092
4943
|
blobToURLDriver: l,
|
|
@@ -5097,7 +4948,7 @@ async function Tl(s, e, t) {
|
|
|
5097
4948
|
pFrameDriver: g
|
|
5098
4949
|
};
|
|
5099
4950
|
}
|
|
5100
|
-
class
|
|
4951
|
+
class ks {
|
|
5101
4952
|
constructor(e, t, r, o, n, i, a, c) {
|
|
5102
4953
|
w(this, "pl");
|
|
5103
4954
|
/** Contains a reactive list of projects along with their meta information. */
|
|
@@ -5116,10 +4967,10 @@ class As {
|
|
|
5116
4967
|
// Project List Manipulation
|
|
5117
4968
|
//
|
|
5118
4969
|
/** Creates a project with initial state and adds it to project list. */
|
|
5119
|
-
async createProject(e, t =
|
|
4970
|
+
async createProject(e, t = ye()) {
|
|
5120
4971
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
5121
|
-
const n = await
|
|
5122
|
-
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await
|
|
4972
|
+
const n = await fn(o, e);
|
|
4973
|
+
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await Ws(n);
|
|
5123
4974
|
});
|
|
5124
4975
|
return await this.projectListTree.refreshState(), r;
|
|
5125
4976
|
}
|
|
@@ -5139,7 +4990,7 @@ class As {
|
|
|
5139
4990
|
async projectIdToResourceId(e) {
|
|
5140
4991
|
return await this.pl.withReadTx("Project id to resource id", async (t) => {
|
|
5141
4992
|
const r = (await t.getField(x(this.projectListResourceId, e))).value;
|
|
5142
|
-
if (
|
|
4993
|
+
if (qe(r)) throw new Error("Unexpected project list structure.");
|
|
5143
4994
|
return r;
|
|
5144
4995
|
});
|
|
5145
4996
|
}
|
|
@@ -5150,7 +5001,7 @@ class As {
|
|
|
5150
5001
|
async openProject(e) {
|
|
5151
5002
|
const t = await this.ensureProjectRid(e);
|
|
5152
5003
|
if (this.openedProjectsByRid.has(t)) throw new Error(`Project ${t} already opened`);
|
|
5153
|
-
this.openedProjectsByRid.set(t, await
|
|
5004
|
+
this.openedProjectsByRid.set(t, await jt.init(this.env, t)), this.openedProjectsList.setValue([...this.openedProjectsByRid.keys()]);
|
|
5154
5005
|
}
|
|
5155
5006
|
/** Closes the project, and deallocate all corresponding resources. */
|
|
5156
5007
|
async closeProject(e) {
|
|
@@ -5178,33 +5029,33 @@ class As {
|
|
|
5178
5029
|
/** Generates sufficiently random string to be used as local secret for the
|
|
5179
5030
|
* middle layer */
|
|
5180
5031
|
static generateLocalSecret() {
|
|
5181
|
-
return
|
|
5032
|
+
return Mr.generateSecret();
|
|
5182
5033
|
}
|
|
5183
5034
|
/** Initialize middle layer */
|
|
5184
5035
|
static async init(e, t, r) {
|
|
5185
5036
|
const o = {
|
|
5186
|
-
...
|
|
5187
|
-
|
|
5037
|
+
...wi,
|
|
5038
|
+
...bi(t),
|
|
5188
5039
|
...r
|
|
5189
5040
|
};
|
|
5190
|
-
o.defaultTreeOptions.logStat =
|
|
5041
|
+
o.defaultTreeOptions.logStat = ce().logTreeStats, o.debugOps.dumpInitialTreeState = ce().dumpInitialTreeState;
|
|
5191
5042
|
const n = await e.withWriteTx("MLInitialization", async (g) => {
|
|
5192
|
-
const
|
|
5193
|
-
g.createField(
|
|
5194
|
-
const T = await g.getField(
|
|
5195
|
-
if (
|
|
5196
|
-
const j = g.createEphemeral(
|
|
5197
|
-
return g.lock(j), g.setField(
|
|
5043
|
+
const N = x(g.clientRoot, jo);
|
|
5044
|
+
g.createField(N, "Dynamic");
|
|
5045
|
+
const T = await g.getField(N);
|
|
5046
|
+
if (qe(T.value)) {
|
|
5047
|
+
const j = g.createEphemeral(Zr);
|
|
5048
|
+
return g.lock(j), g.setField(N, j), await g.commit(), await j.globalId;
|
|
5198
5049
|
} else
|
|
5199
5050
|
return T.value;
|
|
5200
|
-
}), i = o.logger, a = await
|
|
5051
|
+
}), i = o.logger, a = await kl(e, t, o), c = new Ns(e.httpDispatcher, {
|
|
5201
5052
|
minTimeout: 250,
|
|
5202
5053
|
maxRetries: 4
|
|
5203
|
-
}), u = new
|
|
5054
|
+
}), u = new Po(c), l = new an(
|
|
5204
5055
|
u,
|
|
5205
5056
|
a.signer,
|
|
5206
5057
|
c
|
|
5207
|
-
), d = new
|
|
5058
|
+
), d = new mo(
|
|
5208
5059
|
i,
|
|
5209
5060
|
e.httpDispatcher,
|
|
5210
5061
|
o.frontendDownloadPath
|
|
@@ -5218,14 +5069,14 @@ class As {
|
|
|
5218
5069
|
bpPreparer: l,
|
|
5219
5070
|
frontendDownloadDriver: d,
|
|
5220
5071
|
driverKit: a,
|
|
5221
|
-
blockUpdateWatcher: new
|
|
5072
|
+
blockUpdateWatcher: new yl(u, i, {
|
|
5222
5073
|
minDelay: o.devBlockUpdateRecheckInterval,
|
|
5223
5074
|
http: c,
|
|
5224
5075
|
preferredUpdateChannel: o.preferredUpdateChannel
|
|
5225
5076
|
}),
|
|
5226
|
-
quickJs: await
|
|
5227
|
-
}, h = new
|
|
5228
|
-
return new
|
|
5077
|
+
quickJs: await oo()
|
|
5078
|
+
}, h = new Qs([]), E = await Uo(e, n, h, f);
|
|
5079
|
+
return new ks(
|
|
5229
5080
|
f,
|
|
5230
5081
|
a,
|
|
5231
5082
|
a.signer,
|
|
@@ -5237,7 +5088,7 @@ class As {
|
|
|
5237
5088
|
);
|
|
5238
5089
|
}
|
|
5239
5090
|
}
|
|
5240
|
-
const
|
|
5091
|
+
const Pl = [
|
|
5241
5092
|
"undici:request:create",
|
|
5242
5093
|
// When a new request is created
|
|
5243
5094
|
"undici:request:bodySent",
|
|
@@ -5275,7 +5126,7 @@ const Ll = [
|
|
|
5275
5126
|
"undici:dispatcher:retry"
|
|
5276
5127
|
// When a dispatcher retries a request
|
|
5277
5128
|
];
|
|
5278
|
-
async function
|
|
5129
|
+
async function uu(s, e = {}) {
|
|
5279
5130
|
const t = {
|
|
5280
5131
|
pingCheckDurationMs: 1e4,
|
|
5281
5132
|
pingTimeoutMs: 3e3,
|
|
@@ -5293,8 +5144,8 @@ async function yu(s, e = {}) {
|
|
|
5293
5144
|
bodyLimit: 300,
|
|
5294
5145
|
...e
|
|
5295
5146
|
}, r = [];
|
|
5296
|
-
|
|
5297
|
-
|
|
5147
|
+
Pl.forEach((c) => {
|
|
5148
|
+
yo(c).subscribe((l) => {
|
|
5298
5149
|
var f;
|
|
5299
5150
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
5300
5151
|
(f = l == null ? void 0 : l.response) != null && f.headers && (l.response.headers = l.response.headers.map((h) => h.toString())), r.push(
|
|
@@ -5313,56 +5164,56 @@ async function yu(s, e = {}) {
|
|
|
5313
5164
|
blockRegistryUiChecks: [],
|
|
5314
5165
|
blockGARegistryUiChecks: [],
|
|
5315
5166
|
autoUpdateCdnChecks: []
|
|
5316
|
-
}, n =
|
|
5317
|
-
o.plPings = await
|
|
5318
|
-
const u = await new
|
|
5167
|
+
}, n = zs(s, { defaultRequestTimeout: t.pingTimeoutMs });
|
|
5168
|
+
o.plPings = await ge(t.pingCheckDurationMs, t.maxPingsPerSecond, async () => {
|
|
5169
|
+
const u = await new Yt(n).ping();
|
|
5319
5170
|
return JSON.stringify(u).slice(0, t.bodyLimit) + "...";
|
|
5320
5171
|
});
|
|
5321
|
-
const a = new
|
|
5322
|
-
return o.blockRegistryOverviewChecks = await
|
|
5172
|
+
const a = new Yt(n).ll.httpDispatcher;
|
|
5173
|
+
return o.blockRegistryOverviewChecks = await ge(
|
|
5323
5174
|
t.blockRegistryDurationMs,
|
|
5324
5175
|
t.maxRegistryChecksPerSecond,
|
|
5325
|
-
async () => await
|
|
5326
|
-
), o.blockGARegistryOverviewChecks = await
|
|
5176
|
+
async () => await ke(new URL(t.blockOverviewPath, t.blockRegistryUrl), t, a)
|
|
5177
|
+
), o.blockGARegistryOverviewChecks = await ge(
|
|
5327
5178
|
t.blockRegistryDurationMs,
|
|
5328
5179
|
t.maxRegistryChecksPerSecond,
|
|
5329
|
-
async () => await
|
|
5330
|
-
), o.blockRegistryUiChecks = await
|
|
5180
|
+
async () => await ke(new URL(t.blockOverviewPath, t.blockGARegistryUrl), t, a)
|
|
5181
|
+
), o.blockRegistryUiChecks = await ge(
|
|
5331
5182
|
t.blockRegistryDurationMs,
|
|
5332
5183
|
t.maxRegistryChecksPerSecond,
|
|
5333
|
-
async () => await
|
|
5334
|
-
), o.blockGARegistryUiChecks = await
|
|
5184
|
+
async () => await ke(new URL(t.blockUiPath, t.blockRegistryUrl), t, a)
|
|
5185
|
+
), o.blockGARegistryUiChecks = await ge(
|
|
5335
5186
|
t.blockRegistryDurationMs,
|
|
5336
5187
|
t.maxRegistryChecksPerSecond,
|
|
5337
|
-
async () => await
|
|
5338
|
-
), o.autoUpdateCdnChecks = await
|
|
5188
|
+
async () => await ke(new URL(t.blockUiPath, t.blockGARegistryUrl), t, a)
|
|
5189
|
+
), o.autoUpdateCdnChecks = await ge(
|
|
5339
5190
|
t.autoUpdateCdnDurationMs,
|
|
5340
5191
|
t.maxAutoUpdateCdnChecksPerSecond,
|
|
5341
|
-
async () => await
|
|
5342
|
-
),
|
|
5192
|
+
async () => await ke(t.autoUpdateCdnUrl, t, a)
|
|
5193
|
+
), Ol(o, s, t, r);
|
|
5343
5194
|
}
|
|
5344
|
-
async function
|
|
5345
|
-
const r =
|
|
5346
|
-
for (;
|
|
5347
|
-
const n =
|
|
5195
|
+
async function ge(s, e, t) {
|
|
5196
|
+
const r = It(), o = [];
|
|
5197
|
+
for (; xr(r) < s; ) {
|
|
5198
|
+
const n = It();
|
|
5348
5199
|
let i;
|
|
5349
5200
|
try {
|
|
5350
5201
|
i = { ok: !0, value: await t() };
|
|
5351
5202
|
} catch (u) {
|
|
5352
5203
|
i = { ok: !1, error: u };
|
|
5353
5204
|
}
|
|
5354
|
-
const a =
|
|
5205
|
+
const a = xr(n);
|
|
5355
5206
|
o.push({
|
|
5356
5207
|
elapsedMs: a,
|
|
5357
5208
|
response: i
|
|
5358
5209
|
});
|
|
5359
5210
|
const c = 1e3 / e - a;
|
|
5360
|
-
c > 0 && await
|
|
5211
|
+
c > 0 && await zr(c);
|
|
5361
5212
|
}
|
|
5362
5213
|
return o;
|
|
5363
5214
|
}
|
|
5364
|
-
async function
|
|
5365
|
-
const { body: r, statusCode: o } = await
|
|
5215
|
+
async function ke(s, e, t) {
|
|
5216
|
+
const { body: r, statusCode: o } = await Ft(s, {
|
|
5366
5217
|
dispatcher: t,
|
|
5367
5218
|
headersTimeout: e.httpTimeoutMs,
|
|
5368
5219
|
bodyTimeout: e.httpTimeoutMs
|
|
@@ -5372,7 +5223,7 @@ async function Oe(s, e, t) {
|
|
|
5372
5223
|
beginningOfBody: n.slice(0, e.bodyLimit) + "..."
|
|
5373
5224
|
};
|
|
5374
5225
|
}
|
|
5375
|
-
function
|
|
5226
|
+
function Ol(s, e, t, r) {
|
|
5376
5227
|
const o = s.plPings.filter((a) => a.response.ok), n = s.plPings.filter((a) => !a.response.ok), i = [
|
|
5377
5228
|
...new Set(o.map((a) => JSON.stringify(a.response.value)))
|
|
5378
5229
|
];
|
|
@@ -5381,17 +5232,17 @@ Network report:
|
|
|
5381
5232
|
pl endpoint: ${e};
|
|
5382
5233
|
options: ${JSON.stringify(t, null, 2)}.
|
|
5383
5234
|
|
|
5384
|
-
Platforma pings: ${
|
|
5235
|
+
Platforma pings: ${me(s.plPings)}
|
|
5385
5236
|
|
|
5386
|
-
Block registry overview responses: ${
|
|
5237
|
+
Block registry overview responses: ${me(s.blockRegistryOverviewChecks)}
|
|
5387
5238
|
|
|
5388
|
-
Block ga registry overview responses: ${
|
|
5239
|
+
Block ga registry overview responses: ${me(s.blockGARegistryOverviewChecks)}
|
|
5389
5240
|
|
|
5390
|
-
Block registry ui responses: ${
|
|
5241
|
+
Block registry ui responses: ${me(s.blockRegistryUiChecks)}
|
|
5391
5242
|
|
|
5392
|
-
Block ga registry ui responses: ${
|
|
5243
|
+
Block ga registry ui responses: ${me(s.blockGARegistryUiChecks)}
|
|
5393
5244
|
|
|
5394
|
-
Auto-update CDN responses: ${
|
|
5245
|
+
Auto-update CDN responses: ${me(s.autoUpdateCdnChecks)}
|
|
5395
5246
|
|
|
5396
5247
|
Block registry overview dumps:
|
|
5397
5248
|
${JSON.stringify(s.blockRegistryOverviewChecks, null, 2)}
|
|
@@ -5419,8 +5270,8 @@ ${r.join(`
|
|
|
5419
5270
|
`)}
|
|
5420
5271
|
`;
|
|
5421
5272
|
}
|
|
5422
|
-
function
|
|
5423
|
-
const e = s.filter((o) => o.response.ok), { mean: t, median: r } =
|
|
5273
|
+
function me(s) {
|
|
5274
|
+
const e = s.filter((o) => o.response.ok), { mean: t, median: r } = $l(s);
|
|
5424
5275
|
return `
|
|
5425
5276
|
total: ${s.length};
|
|
5426
5277
|
successes: ${e.length};
|
|
@@ -5429,7 +5280,7 @@ mean in ms: ${t};
|
|
|
5429
5280
|
median in ms: ${r};
|
|
5430
5281
|
`;
|
|
5431
5282
|
}
|
|
5432
|
-
function
|
|
5283
|
+
function $l(s) {
|
|
5433
5284
|
const e = s.map((o) => o.elapsedMs), t = e.reduce((o, n) => o + n) / e.length;
|
|
5434
5285
|
let r;
|
|
5435
5286
|
if (e.length > 0) {
|
|
@@ -5438,40 +5289,40 @@ function Nl(s) {
|
|
|
5438
5289
|
}
|
|
5439
5290
|
return { mean: t, median: r };
|
|
5440
5291
|
}
|
|
5441
|
-
function
|
|
5292
|
+
function It() {
|
|
5442
5293
|
return Date.now();
|
|
5443
5294
|
}
|
|
5444
|
-
function
|
|
5445
|
-
return
|
|
5295
|
+
function xr(s) {
|
|
5296
|
+
return It() - s;
|
|
5446
5297
|
}
|
|
5447
5298
|
export {
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5299
|
+
ru as BlockPackRegistry,
|
|
5300
|
+
su as CentralBlockRegistry,
|
|
5301
|
+
vs as DefaultDriverKitOpsPaths,
|
|
5302
|
+
ms as DefaultDriverKitOpsSettings,
|
|
5303
|
+
bi as DefaultMiddleLayerOpsPaths,
|
|
5304
|
+
wi as DefaultMiddleLayerOpsSettings,
|
|
5305
|
+
ss as FrontendFromFolderResourceType,
|
|
5306
|
+
rs as FrontendFromUrlResourceType,
|
|
5307
|
+
ks as MiddleLayer,
|
|
5308
|
+
jt as Project,
|
|
5309
|
+
Yo as TengoTemplateGet,
|
|
5310
|
+
Qo as TengoTemplateGetRegistry,
|
|
5311
|
+
en as TengoTemplateGetTemplate,
|
|
5312
|
+
Zo as TengoTemplateGetTemplateURI,
|
|
5313
|
+
iu as TengoTemplatePack,
|
|
5314
|
+
au as TengoTemplatePackConvert,
|
|
5315
|
+
lu as TengoTemplatePackConvertTemplate,
|
|
5316
|
+
cu as TengoTemplatePackConvertTemplatePack,
|
|
5317
|
+
nu as V1CentralDevSnapshotRegistry,
|
|
5318
|
+
ou as V1CentralRegistry,
|
|
5319
|
+
Po as V2RegistryProvider,
|
|
5320
|
+
uu as checkNetwork,
|
|
5321
|
+
es as createRenderTemplate,
|
|
5322
|
+
qr as getDevV1PacketMtime,
|
|
5323
|
+
Lt as getDevV2PacketMtime,
|
|
5324
|
+
kl as initDriverKit,
|
|
5325
|
+
Dt as loadTemplate,
|
|
5326
|
+
tn as prepareTemplateSpec
|
|
5476
5327
|
};
|
|
5477
5328
|
//# sourceMappingURL=index.mjs.map
|