@milaboratories/pl-middle-layer 1.38.1 → 1.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
- var io = Object.defineProperty;
2
- var Jr = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Mr = (s) => {
1
+ var ao = Object.defineProperty;
2
+ var Mr = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Jr = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
- var ao = (s, e, t) => e in s ? io(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var b = (s, e, t) => ao(s, typeof e != "symbol" ? e + "" : e, t);
5
+ var co = (s, e, t) => e in s ? ao(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
+ var b = (s, e, t) => co(s, typeof e != "symbol" ? e + "" : e, t);
7
7
  var Gr = (s, e, t) => {
8
8
  if (e != null) {
9
- typeof e != "object" && typeof e != "function" && Mr("Object expected");
9
+ typeof e != "object" && typeof e != "function" && Jr("Object expected");
10
10
  var r, n;
11
- t && (r = e[Jr("asyncDispose")]), r === void 0 && (r = e[Jr("dispose")], t && (n = r)), typeof r != "function" && Mr("Object not disposable"), n && (r = function() {
11
+ t && (r = e[Mr("asyncDispose")]), r === void 0 && (r = e[Mr("dispose")], t && (n = r)), typeof r != "function" && Jr("Object not disposable"), n && (r = function() {
12
12
  try {
13
13
  n.call(this);
14
14
  } catch (o) {
@@ -32,79 +32,79 @@ var Gr = (s, e, t) => {
32
32
  };
33
33
  return o();
34
34
  };
35
- import { extractConfig as ke, UiError as qr, mapValueInVOE as dn, executePSpecPredicate as co, mapPObjectData as ge, mapPTableDef as hr, isDataInfo as pn, mapDataInfo as fn, checkBlockFlag as lo, JsRenderInternal as uo, isConfigLambda as hn, extractCodeWithInfo as ut, DefaultNavigationState as po, extractAllColumns as fo, ensureError as ho, RuntimeCapabilities as go } from "@platforma-sdk/model";
35
+ import { extractConfig as ke, UiError as qr, mapValueInVOE as pn, executePSpecPredicate as lo, mapPObjectData as ge, mapPTableDef as hr, isDataInfo as fn, mapDataInfo as hn, checkBlockFlag as uo, JsRenderInternal as po, isConfigLambda as gn, extractCodeWithInfo as ut, DefaultNavigationState as fo, extractAllColumns as ho, ensureError as go, RuntimeCapabilities as mo } from "@platforma-sdk/model";
36
36
  export * from "@platforma-sdk/model";
37
- import { StableChannel as De, AnyChannel as Ne, InitialBlockSettings as Kr, blockPackIdToString as mo } from "@milaboratories/pl-model-middle-layer";
37
+ import { StableChannel as De, AnyChannel as Ne, InitialBlockSettings as Kr, blockPackIdToString as vo } from "@milaboratories/pl-model-middle-layer";
38
38
  export * from "@milaboratories/pl-model-middle-layer";
39
39
  export * from "@milaboratories/pl-deployments";
40
- import { request as Rr, RetryAgent as vo } from "undici";
41
- import { RegistryV1 as me, tryLoadPackDescription as gr, BlockPackMetaEmbedAbsoluteBytes as yo, RegistryV2Reader as wo, folderReaderByUrl as So, loadPackDescription as Hr } from "@platforma-sdk/block-tools";
40
+ import { request as Rr, RetryAgent as yo } from "undici";
41
+ import { RegistryV1 as me, tryLoadPackDescription as gr, BlockPackMetaEmbedAbsoluteBytes as wo, RegistryV2Reader as So, folderReaderByUrl as bo, loadPackDescription as Hr } from "@platforma-sdk/block-tools";
42
42
  import se from "node:fs";
43
- import * as bo from "node:path";
43
+ import * as ko from "node:path";
44
44
  import _ from "node:path";
45
- import ko from "yaml";
46
- import { assertNever as Y, notEmpty as D, canonicalJsonBytes as Ro, canonicalJsonGzBytes as Co, cachedDeserialize as Ve, cachedDecode as wt, deepFreeze as Wr, ConsoleLoggerAdapter as gn, ConcurrencyLimitingExecutor as zr, emptyDir as Eo, HmacSha256Signer as Cr, BlockEventDispatcher as Po } from "@milaboratories/ts-helpers";
47
- import * as mn from "node:fs/promises";
45
+ import Ro from "yaml";
46
+ import { assertNever as Y, notEmpty as N, canonicalJsonBytes as Co, canonicalJsonGzBytes as Eo, cachedDeserialize as Ve, cachedDecode as wt, deepFreeze as Wr, ConsoleLoggerAdapter as mn, ConcurrencyLimitingExecutor as zr, emptyDir as Po, HmacSha256Signer as Cr, BlockEventDispatcher as Oo } from "@milaboratories/ts-helpers";
47
+ import * as vn from "node:fs/promises";
48
48
  import ot from "node:fs/promises";
49
- import { tryResolve as Oo } from "@milaboratories/resolve-helper";
50
- import { resourceTypesEqual as pe, field as M, Pl as L, PlClient as vn, isResourceId as Xr, isNullResourceId as Ue, isResource as Io, isResourceRef as Fo, isNotNullResourceId as mr, ensureResourceIdNotNull as it, resourceType as He, resourceTypeToString as To, stringifyWithResourceId as Xe, resourceIdToString as Ce, isNotFoundError as $o, isTimeoutOrCancelError as Ao, toGlobalResourceId as Lo, UnauthenticatedPlClient as yn, toGlobalFieldId as Do, poll as No, ContinuePolling as Bo, plAddressToConfig as jo } from "@milaboratories/pl-client";
49
+ import { tryResolve as Io } from "@milaboratories/resolve-helper";
50
+ import { resourceTypesEqual as pe, field as J, Pl as D, PlClient as yn, isResourceId as Xr, isNullResourceId as Ue, isResource as Fo, isResourceRef as To, isNotNullResourceId as mr, ensureResourceIdNotNull as it, resourceType as He, resourceTypeToString as $o, stringifyWithResourceId as Xe, resourceIdToString as Ce, isNotFoundError as Ao, isTimeoutOrCancelError as Lo, toGlobalResourceId as Do, UnauthenticatedPlClient as wn, toGlobalFieldId as No, poll as Bo, ContinuePolling as jo, plAddressToConfig as xo } from "@milaboratories/pl-client";
51
51
  export * from "@milaboratories/pl-client";
52
- import { SynchronizedTreeState as wn, treeDumpStats as xo, isPlTreeNodeAccessor as Vo } from "@milaboratories/pl-tree";
53
- import { Computable as K, ChangeSource as Yr, PollComputablePool as Uo, WatchableValue as Jo } from "@milaboratories/computable";
54
- import { randomUUID as ve, createHash as Pe, randomBytes as Mo } from "node:crypto";
55
- import { PlTemplateV1 as X, PlTemplateOverrideV1 as Re, PlTemplateLibV1 as fe, PlTemplateSoftwareV1 as le, parseTemplate as Go } from "@milaboratories/pl-model-backend";
52
+ import { SynchronizedTreeState as Sn, treeDumpStats as Vo, isPlTreeNodeAccessor as Uo } from "@milaboratories/pl-tree";
53
+ import { Computable as K, ChangeSource as Yr, PollComputablePool as Mo, WatchableValue as Jo } from "@milaboratories/computable";
54
+ import { randomUUID as ve, createHash as Pe, randomBytes as Go } from "node:crypto";
55
+ import { PlTemplateV1 as X, PlTemplateOverrideV1 as Re, PlTemplateLibV1 as fe, PlTemplateSoftwareV1 as le, parseTemplate as _o } from "@milaboratories/pl-model-backend";
56
56
  import { LRUCache as Er } from "lru-cache";
57
- import { Worker as _o } from "node:worker_threads";
58
- import Sn from "denque";
57
+ import { Worker as qo } from "node:worker_threads";
58
+ import bn from "denque";
59
59
  import { Templates as ye } from "@platforma-sdk/workflow-tengo";
60
60
  import te from "canonicalize";
61
- import qo from "node:assert";
62
- import { Scope as Je, errors as Ko, getQuickJS as Ho } from "quickjs-emscripten";
63
- import { PlQuickJSError as Wo } from "@milaboratories/pl-errors";
61
+ import Ko from "node:assert";
62
+ import { Scope as Me, errors as Ho, getQuickJS as Wo } from "quickjs-emscripten";
63
+ import { PlQuickJSError as zo } from "@milaboratories/pl-errors";
64
64
  import * as Qr from "remeda";
65
- import { setTimeout as bn } from "node:timers/promises";
66
- import { createDownloadClient as kn, createLogsClient as zo, createUploadBlobClient as Rn, createUploadProgressClient as Xo, DownloadDriver as Yo, DownloadBlobToURLDriver as Qo, UploadDriver as Zo, LogsStreamDriver as ei, LogsDriver as ti, LsDriver as Cn, DownloadUrlDriver as ri, uploadBlob as En, ImportFileHandleUploadData as Pn, isUpload as si, isSignMatch as ni } from "@milaboratories/pl-drivers";
67
- import { PFrame as On } from "@milaboratories/pframes-rs-node";
68
- import { channel as oi } from "node:diagnostics_channel";
69
- import { text as ii } from "node:stream/consumers";
70
- import In from "node:os";
65
+ import { setTimeout as kn } from "node:timers/promises";
66
+ import { createDownloadClient as Rn, createLogsClient as Xo, createUploadBlobClient as Cn, createUploadProgressClient as Yo, DownloadDriver as Qo, DownloadBlobToURLDriver as Zo, UploadDriver as ei, LogsStreamDriver as ti, LogsDriver as ri, LsDriver as En, DownloadUrlDriver as si, uploadBlob as Pn, ImportFileHandleUploadData as On, isUpload as ni, isSignMatch as oi } from "@milaboratories/pl-drivers";
67
+ import { PFrame as In } from "@milaboratories/pframes-rs-node";
68
+ import { channel as ii } from "node:diagnostics_channel";
69
+ import { text as ai } from "node:stream/consumers";
70
+ import Fn from "node:os";
71
71
  async function Zr(s) {
72
72
  try {
73
- return await mn.stat(s, { bigint: !0 });
73
+ return await vn.stat(s, { bigint: !0 });
74
74
  } catch (e) {
75
75
  if (e.code === "ENOENT")
76
76
  return;
77
77
  throw e;
78
78
  }
79
79
  }
80
- const ai = [me.PlPackageYamlConfigFile], ci = [me.PlPackageJsonConfigFile], Pr = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Or = ["config", "dist", "config.json"], Fn = ["frontend", "dist"], es = "block-model/dist/config.json", li = "block-ui/package.json", ui = [
80
+ const ci = [me.PlPackageYamlConfigFile], li = [me.PlPackageJsonConfigFile], Pr = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Or = ["config", "dist", "config.json"], Tn = ["frontend", "dist"], es = "block-model/dist/config.json", ui = "block-ui/package.json", di = [
81
81
  Pr,
82
82
  Or,
83
- ai,
84
83
  ci,
85
- Fn
84
+ li,
85
+ Tn
86
86
  ];
87
- async function di(s) {
87
+ async function pi(s) {
88
88
  return await Zr(_.join(s, ...Or)) !== void 0 || await Zr(_.join(s, ...Pr)) !== void 0;
89
89
  }
90
90
  function St(s, e) {
91
- const t = Oo(s, e);
91
+ const t = Io(s, e);
92
92
  if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
93
93
  return t;
94
94
  }
95
95
  async function ts(s, e) {
96
- if (_.isAbsolute(s) || (s = _.resolve(s)), await di(s))
96
+ if (_.isAbsolute(s) || (s = _.resolve(s)), await pi(s))
97
97
  return {
98
98
  workflow: _.join(s, ...Pr),
99
99
  config: _.join(s, ...Or),
100
- ui: _.join(s, ...Fn)
100
+ ui: _.join(s, ...Tn)
101
101
  };
102
102
  {
103
- const t = St(s, es), r = St(s, es), n = St(s, li);
103
+ const t = St(s, es), r = St(s, es), n = St(s, ui);
104
104
  return { workflow: t, config: r, ui: _.resolve(n, "..", "dist") };
105
105
  }
106
106
  }
107
- async function pi(s) {
107
+ async function fi(s) {
108
108
  try {
109
109
  return await se.promises.readFile(s, "utf8");
110
110
  } catch (e) {
@@ -113,7 +113,7 @@ async function pi(s) {
113
113
  throw e;
114
114
  }
115
115
  }
116
- async function fi(s) {
116
+ async function hi(s) {
117
117
  try {
118
118
  return await se.promises.stat(s, { bigint: !0 });
119
119
  } catch (e) {
@@ -122,10 +122,10 @@ async function fi(s) {
122
122
  throw e;
123
123
  }
124
124
  }
125
- async function Tn(s) {
125
+ async function $n(s) {
126
126
  let e = 0n;
127
- for (const t of ui) {
128
- const r = _.join(s, ...t), n = await fi(r);
127
+ for (const t of di) {
128
+ const r = _.join(s, ...t), n = await hi(r);
129
129
  n !== void 0 && e < n.mtimeNs && (e = n.mtimeNs);
130
130
  }
131
131
  return e.toString();
@@ -136,7 +136,7 @@ async function Ir(s) {
136
136
  }), t = await se.promises.stat(s.components.model.file, { bigint: !0 });
137
137
  return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
138
138
  }
139
- class Zl {
139
+ class eu {
140
140
  constructor(e, t, r) {
141
141
  this.v2Provider = e, this.registries = t, this.http = r;
142
142
  }
@@ -204,11 +204,11 @@ class Zl {
204
204
  case "local-dev":
205
205
  for (const n of await se.promises.readdir(r.path, { withFileTypes: !0 })) {
206
206
  if (!n.isDirectory()) continue;
207
- const o = _.join(r.path, n.name), i = await pi(
207
+ const o = _.join(r.path, n.name), i = await fi(
208
208
  _.join(o, me.PlPackageYamlConfigFile)
209
209
  );
210
210
  if (i !== void 0) {
211
- const a = me.PlPackageConfigData.parse(ko.parse(i)), c = await Tn(o), l = {
211
+ const a = me.PlPackageConfigData.parse(Ro.parse(i)), c = await $n(o), l = {
212
212
  organization: a.organization,
213
213
  name: a.package,
214
214
  version: "DEV"
@@ -246,7 +246,7 @@ class Zl {
246
246
  if (c !== void 0) {
247
247
  const l = await Ir(c), u = {
248
248
  id: c.id,
249
- meta: await yo.parseAsync(c.meta),
249
+ meta: await wo.parseAsync(c.meta),
250
250
  featureFlags: c.featureFlags,
251
251
  spec: {
252
252
  type: "dev-v2",
@@ -288,7 +288,7 @@ class Zl {
288
288
  return await this.v2Provider.getRegistry(n.url).getSpecificOverview(t, r);
289
289
  }
290
290
  }
291
- class hi {
291
+ class gi {
292
292
  constructor(e) {
293
293
  b(this, "registries", /* @__PURE__ */ new Map());
294
294
  this.http = e;
@@ -296,52 +296,52 @@ class hi {
296
296
  getRegistry(e) {
297
297
  const t = this.registries.get(e);
298
298
  if (t) return t;
299
- const r = new wo(So(e, this.http));
299
+ const r = new So(bo(e, this.http));
300
300
  return this.registries.set(e, r), r;
301
301
  }
302
302
  }
303
- const eu = {
303
+ const tu = {
304
304
  type: "remote-v2",
305
305
  url: "https://blocks.pl-open.science/"
306
- }, tu = {
306
+ }, ru = {
307
307
  type: "remote-v1",
308
308
  url: "https://block.registry.platforma.bio/releases"
309
- }, ru = {
309
+ }, su = {
310
310
  type: "remote-v1",
311
311
  url: "https://block.registry.platforma.bio/dev"
312
- }, gi = {
313
- groups: [{ id: "default", label: "Default", blocks: [] }]
314
312
  }, mi = {
313
+ groups: [{ id: "default", label: "Default", blocks: [] }]
314
+ }, vi = {
315
315
  stagingRefreshTimestamp: 0,
316
316
  blocksInLimbo: []
317
- }, vi = {
317
+ }, yi = {
318
318
  label: "New Project"
319
- }, yi = { name: "UserProject", version: "2" }, at = "SchemaVersion", Me = "2", Fr = "ProjectCreated", Ge = "ProjectLastModified", _e = "ProjectMeta", de = "ProjectStructure", ct = "BlockRenderingState", wi = "BlockArgsAuthor/";
319
+ }, wi = { name: "UserProject", version: "2" }, at = "SchemaVersion", Je = "2", Fr = "ProjectCreated", Ge = "ProjectLastModified", _e = "ProjectMeta", de = "ProjectStructure", ct = "BlockRenderingState", Si = "BlockArgsAuthor/";
320
320
  function vr(s) {
321
- return `${wi}${s}`;
321
+ return `${Si}${s}`;
322
322
  }
323
- const yr = "ProjectStructureAuthor", Si = "__serviceTemplate_";
323
+ const yr = "ProjectStructureAuthor", bi = "__serviceTemplate_";
324
324
  function wr(s) {
325
- return `${Si}${s}`;
325
+ return `${bi}${s}`;
326
326
  }
327
327
  function q(s, e) {
328
328
  return `${s}-${e}`;
329
329
  }
330
- const bi = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|uiState|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
331
- function ki(s) {
332
- const e = s.match(bi);
330
+ const ki = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|uiState|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
331
+ function Ri(s) {
332
+ const e = s.match(ki);
333
333
  if (e === null) return;
334
334
  const { blockId: t, fieldName: r } = e.groups;
335
335
  return { blockId: t, fieldName: r };
336
336
  }
337
- const Ri = "projects", $n = { name: "Projects", version: "1" }, Ci = (s) => pe(s.type, $n) ? s.fields : [];
338
- async function Ei(s, e, t, r) {
339
- const n = await wn.init(
337
+ const Ci = "projects", An = { name: "Projects", version: "1" }, Ei = (s) => pe(s.type, An) ? s.fields : [];
338
+ async function Pi(s, e, t, r) {
339
+ const n = await Sn.init(
340
340
  s,
341
341
  e,
342
342
  {
343
343
  ...r.ops.defaultTreeOptions,
344
- pruning: Ci
344
+ pruning: Ei
345
345
  },
346
346
  r.logger
347
347
  );
@@ -352,7 +352,7 @@ async function Ei(s, e, t, r) {
352
352
  for (const u of a.listDynamicFields()) {
353
353
  const d = a.traverse(u);
354
354
  if (d === void 0) continue;
355
- const p = D(d.getKeyValueAsJson(_e)), f = D(d.getKeyValueAsJson(Fr)), v = D(d.getKeyValueAsJson(Ge));
355
+ const p = N(d.getKeyValueAsJson(_e)), f = N(d.getKeyValueAsJson(Fr)), v = N(d.getKeyValueAsJson(Ge));
356
356
  l.push({
357
357
  id: u,
358
358
  rid: d.id,
@@ -365,36 +365,36 @@ async function Ei(s, e, t, r) {
365
365
  return l.sort((u) => -u.lastModified.valueOf()), l;
366
366
  }).withStableType(), tree: n };
367
367
  }
368
- const Pi = {
368
+ const Oi = {
369
369
  name: "EphRenderTemplate",
370
370
  version: "1"
371
- }, Oi = {
371
+ }, Ii = {
372
372
  name: "RenderTemplate",
373
373
  version: "1"
374
374
  };
375
375
  function Tr(s, e, t, r, n) {
376
376
  if (n.length === 0) throw new Error("Zero output names provided");
377
- const o = t ? s.createEphemeral(Pi) : s.createStruct(Oi), i = M(o, "template"), a = M(o, "inputs");
378
- return s.createField(i, "Input", e), s.createField(a, "Input", L.createPlMap(s, r, t)), s.lockInputs(o), L.futureRecord(s, o, n, "Output", "outputs/");
377
+ const o = t ? s.createEphemeral(Oi) : s.createStruct(Ii), i = J(o, "template"), a = J(o, "inputs");
378
+ return s.createField(i, "Input", e), s.createField(a, "Input", D.createPlMap(s, r, t)), s.lockInputs(o), D.futureRecord(s, o, n, "Output", "outputs/");
379
379
  }
380
- const Ii = { name: "BContextEnd", version: "1" }, Fi = { name: "BContext", version: "1" }, Ti = "id", $i = "parent/", Ai = ["context", "result"];
380
+ const Fi = { name: "BContextEnd", version: "1" }, Ti = { name: "BContext", version: "1" }, $i = "id", Ai = "parent/", Li = ["context", "result"];
381
381
  function rs(s, e, t) {
382
- return Tr(s, e, !0, t, Ai);
382
+ return Tr(s, e, !0, t, Li);
383
383
  }
384
- function Li(s) {
385
- const e = s.createEphemeral(Ii);
384
+ function Di(s) {
385
+ const e = s.createEphemeral(Fi);
386
386
  return s.lock(e), e;
387
387
  }
388
388
  function ss(s, e) {
389
- if (e.length === 0) return Li(s);
389
+ if (e.length === 0) return Di(s);
390
390
  if (e.length === 1) return e[0];
391
- const t = s.createEphemeral(Fi);
392
- s.createField(M(t, Ti), "Input", L.createPlString(s, ve()));
391
+ const t = s.createEphemeral(Ti);
392
+ s.createField(J(t, $i), "Input", D.createPlString(s, ve()));
393
393
  for (let r = 0; r < e.length; r++)
394
- s.createField(M(t, `${$i}${r}`), "Input", e[r]);
394
+ s.createField(J(t, `${Ai}${r}`), "Input", e[r]);
395
395
  return s.lock(t), t;
396
396
  }
397
- function An(s, e) {
397
+ function Ln(s, e) {
398
398
  const t = /* @__PURE__ */ new Map(), r = (n, o, i) => {
399
399
  const a = Pe("sha256");
400
400
  o.updateCacheKey(n, a, i);
@@ -405,7 +405,7 @@ function An(s, e) {
405
405
  }
406
406
  return t.get(c);
407
407
  };
408
- return r(e.template, Ln, e.hashToSource);
408
+ return r(e.template, Dn, e.hashToSource);
409
409
  }
410
410
  const ns = {
411
411
  updateCacheKey(s, e, t) {
@@ -425,7 +425,7 @@ const ns = {
425
425
  const n = le.fromV3Data(s, Ee(s.name, r, s.sourceHash)), o = e.createStruct(le.type, n.data);
426
426
  return e.setKValue(o, le.metaNameKey, JSON.stringify(n.name)), e.lock(o), o;
427
427
  }
428
- }, Ln = {
428
+ }, Dn = {
429
429
  updateCacheKey(s, e, t) {
430
430
  e.update(X.type.name).update(X.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(Ee(s.name, t, s.sourceHash));
431
431
  const r = (n) => (n.sort((o, i) => o[0] === i[0] ? 0 : o[0] < i[0] ? -1 : 1), n);
@@ -457,7 +457,7 @@ const ns = {
457
457
  }
458
458
  for (const [a, c] of Object.entries(s.templates ?? {})) {
459
459
  const l = X.tplField(n, a);
460
- e.createField(l, "Input"), e.setField(l, t(c, Ln, r));
460
+ e.createField(l, "Input"), e.setField(l, t(c, Dn, r));
461
461
  }
462
462
  if (e.lock(n), !s.hashOverride) return n;
463
463
  const o = e.createStruct(
@@ -468,29 +468,29 @@ const ns = {
468
468
  }
469
469
  };
470
470
  function Ee(s, e, t) {
471
- return D(
471
+ return N(
472
472
  e[t],
473
473
  `trying to get "${s}" source: sources map doesn't contain source hash ${t}`
474
474
  );
475
475
  }
476
- function Di(s, e) {
477
- const t = Go(e.content), r = t.type;
476
+ function Ni(s, e) {
477
+ const t = _o(e.content), r = t.type;
478
478
  switch (r) {
479
479
  case "pl.tengo-template.v2":
480
- return Nn(s, t);
480
+ return Bn(s, t);
481
481
  case "pl.tengo-template.v3":
482
- return An(s, t);
482
+ return Ln(s, t);
483
483
  default:
484
484
  Y(r);
485
485
  }
486
486
  }
487
- function Ni(s, e) {
487
+ function Bi(s, e) {
488
488
  const t = e.data, r = t.type;
489
489
  switch (r) {
490
490
  case "pl.tengo-template.v2":
491
- return Nn(s, t);
491
+ return Bn(s, t);
492
492
  case "pl.tengo-template.v3":
493
- return An(s, t);
493
+ return Ln(s, t);
494
494
  default:
495
495
  Y(r);
496
496
  }
@@ -513,7 +513,7 @@ const os = {
513
513
  const r = le.fromV2Data(s), n = e.createStruct(le.type, r.data);
514
514
  return e.setKValue(n, le.metaNameKey, JSON.stringify(r.name)), e.lock(n), n;
515
515
  }
516
- }, Dn = {
516
+ }, Nn = {
517
517
  hash(s, e) {
518
518
  e.update(X.type.name).update(X.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
519
519
  const t = (r) => (r.sort((n, o) => n[0] === o[0] ? 0 : n[0] < o[0] ? -1 : 1), r);
@@ -545,7 +545,7 @@ const os = {
545
545
  }
546
546
  for (const [i, a] of Object.entries(s.templates ?? {})) {
547
547
  const c = X.tplField(r, i);
548
- e.createField(c, "Input"), e.setField(c, t(a, Dn));
548
+ e.createField(c, "Input"), e.setField(c, t(a, Nn));
549
549
  }
550
550
  if (e.lock(r), !s.hashOverride) return r;
551
551
  const n = e.createStruct(
@@ -555,7 +555,7 @@ const os = {
555
555
  return e.createField(o, "Service"), e.setField(o, r), e.lock(n), n;
556
556
  }
557
557
  };
558
- function Nn(s, e) {
558
+ function Bn(s, e) {
559
559
  const t = /* @__PURE__ */ new Map(), r = (n, o) => {
560
560
  const i = Pe("sha256");
561
561
  o.hash(n, i);
@@ -566,13 +566,13 @@ function Nn(s, e) {
566
566
  }
567
567
  return t.get(a);
568
568
  };
569
- return r(e, Dn);
569
+ return r(e, Nn);
570
570
  }
571
- const Bi = { name: "TengoTemplateGet", version: "1" }, ji = "registry", xi = "templateURI", Vi = "template", su = { name: "TengoTemplatePack", version: "1" }, nu = {
571
+ const ji = { name: "TengoTemplateGet", version: "1" }, xi = "registry", Vi = "templateURI", Ui = "template", nu = { name: "TengoTemplatePack", version: "1" }, ou = {
572
572
  name: "TengoTemplatePackConvert",
573
573
  version: "1"
574
- }, ou = "templatePack", iu = "template";
575
- async function Bn(s) {
574
+ }, iu = "templatePack", au = "template";
575
+ async function jn(s) {
576
576
  switch (s.type) {
577
577
  case "from-file":
578
578
  return {
@@ -588,23 +588,23 @@ async function Bn(s) {
588
588
  return Y(s);
589
589
  }
590
590
  }
591
- function Ui(s, e) {
592
- const t = s.createStruct(Bi), r = M(t, ji), n = M(t, xi), o = M(t, Vi);
593
- return s.setField(r, s.createValue(L.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(n, s.createValue(L.JsonString, Buffer.from(JSON.stringify(e.path)))), o;
591
+ function Mi(s, e) {
592
+ const t = s.createStruct(ji), r = J(t, xi), n = J(t, Vi), o = J(t, Ui);
593
+ return s.setField(r, s.createValue(D.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(n, s.createValue(D.JsonString, Buffer.from(JSON.stringify(e.path)))), o;
594
594
  }
595
595
  function dt(s, e) {
596
596
  switch (e.type) {
597
597
  case "from-registry":
598
- return Ui(s, e);
598
+ return Mi(s, e);
599
599
  case "explicit":
600
- return Di(s, e);
601
- case "prepared":
602
600
  return Ni(s, e);
601
+ case "prepared":
602
+ return Bi(s, e);
603
603
  default:
604
604
  return Y(e);
605
605
  }
606
606
  }
607
- const jn = { name: "Frontend/FromUrl", version: "1" }, xn = {
607
+ const xn = { name: "Frontend/FromUrl", version: "1" }, Vn = {
608
608
  name: "Frontend/FromFolder",
609
609
  version: "1"
610
610
  };
@@ -612,12 +612,12 @@ function Ji(s, e) {
612
612
  switch (e.type) {
613
613
  case "url":
614
614
  return s.createValue(
615
- jn,
615
+ xn,
616
616
  JSON.stringify({ url: e.url })
617
617
  );
618
618
  case "local":
619
619
  return s.createValue(
620
- xn,
620
+ Vn,
621
621
  JSON.stringify({
622
622
  path: e.path,
623
623
  signature: e.signature
@@ -627,12 +627,12 @@ function Ji(s, e) {
627
627
  return Y(e);
628
628
  }
629
629
  }
630
- class Mi {
630
+ class Gi {
631
631
  constructor() {
632
632
  b(this, "nextMessageId", 0);
633
633
  b(this, "worker");
634
634
  b(this, "pendingRequests", /* @__PURE__ */ new Map());
635
- const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new _o(
635
+ const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new qo(
636
636
  e,
637
637
  {
638
638
  workerData: {}
@@ -663,17 +663,17 @@ class Mi {
663
663
  return this.terminate();
664
664
  }
665
665
  }
666
- const Gi = { name: "BlockPackCustom", version: "1" }, Vn = "template", Un = "frontend";
666
+ const _i = { name: "BlockPackCustom", version: "1" }, Un = "template", Mn = "frontend";
667
667
  function is(s) {
668
668
  return s.endsWith("/") ? s : `${s}/`;
669
669
  }
670
- function _i(s) {
670
+ function qi(s) {
671
671
  return Buffer.from(s).toString("utf8");
672
672
  }
673
673
  function Ze(s) {
674
- return JSON.parse(_i(s));
674
+ return JSON.parse(qi(s));
675
675
  }
676
- class qi {
676
+ class Ki {
677
677
  constructor(e, t, r) {
678
678
  b(this, "remoteContentCache", new Er({
679
679
  max: 500,
@@ -720,7 +720,7 @@ class qi {
720
720
  if (e.type === "prepared")
721
721
  return e;
722
722
  const t = await this.prepareWithoutUnpacking(e);
723
- const r = Gr(n, new Mi(), !0);
723
+ const r = Gr(n, new Gi(), !0);
724
724
  return {
725
725
  ...t,
726
726
  type: "prepared",
@@ -819,14 +819,14 @@ class qi {
819
819
  }
820
820
  }
821
821
  }
822
- function Ki(s, e) {
823
- const t = { config: e.config, source: e.source }, r = s.createStruct(Gi, JSON.stringify(t));
824
- return s.createField(M(r, Vn), "Input", dt(s, e.template)), s.createField(M(r, Un), "Input", Ji(s, e.frontend)), s.lock(r), r;
822
+ function Hi(s, e) {
823
+ const t = { config: e.config, source: e.source }, r = s.createStruct(_i, JSON.stringify(t));
824
+ return s.createField(J(r, Un), "Input", dt(s, e.template)), s.createField(J(r, Mn), "Input", Ji(s, e.frontend)), s.lock(r), r;
825
825
  }
826
826
  function as(s, e) {
827
827
  switch (e.type) {
828
828
  case "prepared":
829
- return Ki(s, e);
829
+ return Hi(s, e);
830
830
  default:
831
831
  return Y(e.type);
832
832
  }
@@ -834,7 +834,7 @@ function as(s, e) {
834
834
  function et(s, e, t) {
835
835
  return { __isRef: !0, blockId: s, name: e };
836
836
  }
837
- function Hi(s) {
837
+ function Wi(s) {
838
838
  return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
839
839
  }
840
840
  function Sr(s, e, t) {
@@ -850,7 +850,7 @@ function Sr(s, e, t) {
850
850
  return;
851
851
  case "object":
852
852
  if (e === null) return;
853
- if (Hi(e))
853
+ if (Wi(e))
854
854
  t === void 0 || t.has(e.blockId) ? (s.upstreams.add(e.blockId), e.requireEnrichments && s.upstreamsRequiringEnrichments.add(e.blockId)) : s.missingReferences = !0;
855
855
  else if (Array.isArray(e))
856
856
  for (const n of e) Sr(s, n, t);
@@ -862,7 +862,7 @@ function Sr(s, e, t) {
862
862
  Y(r);
863
863
  }
864
864
  }
865
- function Wi(s, e) {
865
+ function zi(s, e) {
866
866
  const t = { upstreams: /* @__PURE__ */ new Set(), upstreamsRequiringEnrichments: /* @__PURE__ */ new Set(), missingReferences: !1 };
867
867
  return Sr(t, s, e), t;
868
868
  }
@@ -920,7 +920,7 @@ function st(s, e) {
920
920
  for (const { id: o } of re(s)) {
921
921
  const i = e(o);
922
922
  if (i === void 0) continue;
923
- const a = Wi(i.args, n), c = /* @__PURE__ */ new Set([
923
+ const a = zi(i.args, n), c = /* @__PURE__ */ new Set([
924
924
  ...a.upstreams,
925
925
  ...r.traverseIds("enrichments", ...a.upstreamsRequiringEnrichments)
926
926
  ]), l = /* @__PURE__ */ new Set();
@@ -952,7 +952,7 @@ function st(s, e) {
952
952
  }
953
953
  return r;
954
954
  }
955
- function zi(s, e) {
955
+ function Xi(s, e) {
956
956
  if (s.size !== e.size) return !1;
957
957
  for (const t of s) if (!e.has(t)) return !1;
958
958
  return !0;
@@ -966,22 +966,22 @@ function cs(s, e) {
966
966
  const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
967
967
  return s.nodes.forEach((o) => {
968
968
  const i = e.nodes.get(o.id);
969
- i === void 0 ? t.add(o.id) : (!zi(o.upstream, i.upstream) || kr(o.upstream, n)) && n.add(o.id);
969
+ i === void 0 ? t.add(o.id) : (!Xi(o.upstream, i.upstream) || kr(o.upstream, n)) && n.add(o.id);
970
970
  }), e.nodes.forEach((o) => {
971
971
  s.nodes.has(o.id) ? kr(o.upstream, n) && n.add(o.id) : r.add(o.id);
972
972
  }), { onlyInA: t, onlyInB: r, different: n };
973
973
  }
974
974
  let bt;
975
- async function Mn() {
975
+ async function Gn() {
976
976
  if (bt === void 0) {
977
- const s = await Bn(ye["pframes.export-pframe-for-ui"]);
977
+ const s = await jn(ye["pframes.export-pframe-for-ui"]);
978
978
  if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
979
979
  const e = Pe("sha256").update(s.content).digest("hex");
980
980
  bt = { spec: s, hash: e };
981
981
  }
982
982
  return bt;
983
983
  }
984
- function Xi(s, e, t) {
984
+ function Yi(s, e, t) {
985
985
  return Tr(s, e, !0, { pf: t }, ["result"]).result;
986
986
  }
987
987
  let Se;
@@ -1065,13 +1065,13 @@ class ls {
1065
1065
  }
1066
1066
  getTemplate(e) {
1067
1067
  return e.getFutureFieldValue(
1068
- L.unwrapHolder(e, this.fields.blockPack.ref),
1069
- Vn,
1068
+ D.unwrapHolder(e, this.fields.blockPack.ref),
1069
+ Un,
1070
1070
  "Input"
1071
1071
  );
1072
1072
  }
1073
1073
  }
1074
- const Yi = (s) => {
1074
+ const Qi = (s) => {
1075
1075
  throw new Error(`No new block info for ${s}`);
1076
1076
  };
1077
1077
  class lt {
@@ -1120,8 +1120,8 @@ class lt {
1120
1120
  if (r.fields.prodArgs === void 0) return;
1121
1121
  n = r.fields.prodArgs, o = r.prodArgs;
1122
1122
  } else
1123
- n = D(r.fields.currentArgs), o = r.currentArgs;
1124
- const i = D(r.fields.blockPack);
1123
+ n = N(r.fields.currentArgs), o = r.currentArgs;
1124
+ const i = N(r.fields.blockPack);
1125
1125
  return Xr(n.ref) && Xr(i.ref) ? {
1126
1126
  args: o,
1127
1127
  enrichmentTargets: this.projectHelper.getEnrichmentTargets(
@@ -1156,7 +1156,7 @@ class lt {
1156
1156
  }
1157
1157
  createJsonFieldValueByContent(e) {
1158
1158
  const t = Buffer.from(e);
1159
- return { ref: this.tx.createValue(L.JsonObject, t), value: t, status: "Ready" };
1159
+ return { ref: this.tx.createValue(D.JsonObject, t), value: t, status: "Ready" };
1160
1160
  }
1161
1161
  createJsonFieldValue(e) {
1162
1162
  return this.createJsonFieldValueByContent(JSON.stringify(e));
@@ -1166,7 +1166,7 @@ class lt {
1166
1166
  throw new Error("block not found");
1167
1167
  }
1168
1168
  setBlockFieldObj(e, t, r) {
1169
- const n = M(this.rid, q(e, t));
1169
+ const n = J(this.rid, q(e, t));
1170
1170
  if (r.ref === void 0) throw new Error("Can't set value with empty ref");
1171
1171
  this.getBlockInfo(e).fields[t] === void 0 ? this.tx.createField(n, "Dynamic", r.ref) : this.tx.setField(n, r.ref), this.getBlockInfo(e).fields[t] = {
1172
1172
  modCount: this.globalModCount++,
@@ -1181,7 +1181,7 @@ class lt {
1181
1181
  const n = this.getBlockInfo(e);
1182
1182
  for (const o of t) {
1183
1183
  const i = n.fields;
1184
- o in i && (this.tx.removeField(M(this.rid, q(e, o))), delete i[o], this.fieldsChanged = !0, r = !0);
1184
+ o in i && (this.tx.removeField(J(this.rid, q(e, o))), delete i[o], this.fieldsChanged = !0, r = !0);
1185
1185
  }
1186
1186
  return r;
1187
1187
  }
@@ -1228,14 +1228,14 @@ class lt {
1228
1228
  const l = a === "args" ? "currentArgs" : "uiState";
1229
1229
  let u, d = !1;
1230
1230
  if (a === "args")
1231
- u = Ro(c);
1231
+ u = Co(c);
1232
1232
  else {
1233
- const { data: f, isGzipped: v } = Co(c);
1233
+ const { data: f, isGzipped: v } = Eo(c);
1234
1234
  u = f, d = v;
1235
1235
  }
1236
1236
  if (Buffer.compare(o.fields[l].value, u) === 0) continue;
1237
1237
  console.log("setting", l, d, u.length);
1238
- const p = this.tx.createValue(d ? L.JsonGzObject : L.JsonObject, u);
1238
+ const p = this.tx.createValue(d ? D.JsonGzObject : D.JsonObject, u);
1239
1239
  this.setBlockField(n.blockId, l, p, "Ready", u), i = !0, a === "args" && t.push(n.blockId);
1240
1240
  }
1241
1241
  i && (this.blocksWithChangedInputs.add(n.blockId), r = !0);
@@ -1252,7 +1252,7 @@ class lt {
1252
1252
  const n = this.getBlockInfo(r);
1253
1253
  if (((o = n.fields.prodCtx) == null ? void 0 : o.ref) === void 0)
1254
1254
  throw new Error("One of the upstreams staging is not rendered.");
1255
- t.push(L.unwrapHolder(this.tx, n.fields.prodCtx.ref));
1255
+ t.push(D.unwrapHolder(this.tx, n.fields.prodCtx.ref));
1256
1256
  }), ss(this.tx, t);
1257
1257
  }
1258
1258
  createStagingCtx(e) {
@@ -1262,11 +1262,11 @@ class lt {
1262
1262
  const n = this.getBlockInfo(r);
1263
1263
  if (((o = n.fields.stagingCtx) == null ? void 0 : o.ref) === void 0)
1264
1264
  throw new Error("One of the upstreams staging is not rendered.");
1265
- t.push(L.unwrapHolder(this.tx, n.fields.stagingCtx.ref)), ((i = n.fields.prodCtx) == null ? void 0 : i.ref) !== void 0 && t.push(L.unwrapHolder(this.tx, n.fields.prodCtx.ref));
1265
+ t.push(D.unwrapHolder(this.tx, n.fields.stagingCtx.ref)), ((i = n.fields.prodCtx) == null ? void 0 : i.ref) !== void 0 && t.push(D.unwrapHolder(this.tx, n.fields.prodCtx.ref));
1266
1266
  }), ss(this.tx, t);
1267
1267
  }
1268
1268
  exportCtx(e) {
1269
- return Xi(this.tx, L.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1269
+ return Yi(this.tx, D.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1270
1270
  }
1271
1271
  renderStagingFor(e) {
1272
1272
  this.resetStaging(e);
@@ -1274,14 +1274,14 @@ class lt {
1274
1274
  if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
1275
1275
  const n = t.getTemplate(this.tx), o = rs(this.tx, n, {
1276
1276
  args: t.fields.currentArgs.ref,
1277
- blockId: this.tx.createValue(L.JsonString, JSON.stringify(e)),
1278
- isProduction: this.tx.createValue(L.JsonBool, JSON.stringify(!1)),
1277
+ blockId: this.tx.createValue(D.JsonString, JSON.stringify(e)),
1278
+ isProduction: this.tx.createValue(D.JsonBool, JSON.stringify(!1)),
1279
1279
  context: r
1280
1280
  });
1281
1281
  this.setBlockField(
1282
1282
  e,
1283
1283
  "stagingCtx",
1284
- L.wrapInEphHolder(this.tx, o.context),
1284
+ D.wrapInEphHolder(this.tx, o.context),
1285
1285
  "NotReady"
1286
1286
  ), this.setBlockField(e, "stagingUiCtx", this.exportCtx(o.context), "NotReady"), this.setBlockField(e, "stagingOutput", o.result, "NotReady");
1287
1287
  }
@@ -1292,14 +1292,14 @@ class lt {
1292
1292
  throw new Error("Can't render production for light block.");
1293
1293
  const n = t.getTemplate(this.tx), o = rs(this.tx, n, {
1294
1294
  args: t.fields.currentArgs.ref,
1295
- blockId: this.tx.createValue(L.JsonString, JSON.stringify(e)),
1296
- isProduction: this.tx.createValue(L.JsonBool, JSON.stringify(!0)),
1295
+ blockId: this.tx.createValue(D.JsonString, JSON.stringify(e)),
1296
+ isProduction: this.tx.createValue(D.JsonBool, JSON.stringify(!0)),
1297
1297
  context: r
1298
1298
  });
1299
1299
  this.setBlockField(
1300
1300
  e,
1301
1301
  "prodCtx",
1302
- L.wrapInEphHolder(this.tx, o.context),
1302
+ D.wrapInEphHolder(this.tx, o.context),
1303
1303
  "NotReady"
1304
1304
  ), this.setBlockField(e, "prodUiCtx", this.exportCtx(o.context), "NotReady"), this.setBlockField(e, "prodOutput", o.result, "NotReady"), this.setBlockFieldObj(e, "prodArgs", t.fields.currentArgs), this.blocksInLimbo.delete(e) && (this.renderingStateChanged = !0);
1305
1305
  }
@@ -1307,7 +1307,7 @@ class lt {
1307
1307
  // Structure changes
1308
1308
  //
1309
1309
  /** Very generic method, better check for more specialized case-specific methods first. */
1310
- updateStructure(e, t = Yi) {
1310
+ updateStructure(e, t = Qi) {
1311
1311
  const r = this.getStagingGraph(), n = this.getActualProductionGraph(), o = br(e), i = cs(r, o);
1312
1312
  for (const l of i.onlyInA) {
1313
1313
  const { fields: u } = this.getBlockInfo(l);
@@ -1317,7 +1317,7 @@ class lt {
1317
1317
  const u = t(l), d = new ls(l, {}, ke(u.blockPack.config), u.blockPack.source);
1318
1318
  this.blockInfos.set(l, d);
1319
1319
  const p = as(this.tx, u.blockPack);
1320
- this.setBlockField(l, "blockPack", L.wrapInHolder(this.tx, p), "NotReady"), this.setBlockFieldObj(
1320
+ this.setBlockField(l, "blockPack", D.wrapInHolder(this.tx, p), "NotReady"), this.setBlockFieldObj(
1321
1321
  l,
1322
1322
  "blockSettings",
1323
1323
  this.createJsonFieldValue(Kr)
@@ -1376,7 +1376,7 @@ class lt {
1376
1376
  this.setBlockField(
1377
1377
  e,
1378
1378
  "blockPack",
1379
- L.wrapInHolder(this.tx, as(this.tx, t)),
1379
+ D.wrapInHolder(this.tx, as(this.tx, t)),
1380
1380
  "NotReady"
1381
1381
  ), r !== void 0 ? this.setStates([{ blockId: e, args: r.args, uiState: r.uiState }]) : this.getStagingGraph().traverse("downstream", [e], ({ id: o }) => this.resetStaging(o)), n.productionRendered && this.getActualProductionGraph().traverse(
1382
1382
  "downstream",
@@ -1425,7 +1425,7 @@ class lt {
1425
1425
  * accordingly */
1426
1426
  stopProduction(...e) {
1427
1427
  var i, a;
1428
- const t = this.getActualProductionGraph(), r = new Sn(e), n = new Set(e), o = [];
1428
+ const t = this.getActualProductionGraph(), r = new bn(e), n = new Set(e), o = [];
1429
1429
  for (; !r.isEmpty(); ) {
1430
1430
  const c = r.shift(), l = this.getBlockInfo(c).fields;
1431
1431
  if (!(((i = l.prodOutput) == null ? void 0 : i.status) === "Ready" && ((a = l.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
@@ -1501,7 +1501,7 @@ class lt {
1501
1501
  static async load(e, t, r, n) {
1502
1502
  const o = t.getResourceData(r, !0), i = t.getKValueJson(r, at), a = t.getKValueJson(r, Ge), c = t.getKValueJson(r, _e), l = t.getKValueJson(r, de), u = t.getKValueJson(r, ct), d = await o, p = /* @__PURE__ */ new Map();
1503
1503
  for (const g of d.fields) {
1504
- const m = ki(g.name);
1504
+ const m = Ri(g.name);
1505
1505
  if (m === void 0) continue;
1506
1506
  let w = p.get(m.blockId);
1507
1507
  w === void 0 && (w = {
@@ -1514,7 +1514,7 @@ class lt {
1514
1514
  const m = g.fields;
1515
1515
  for (const [w, y] of Object.entries(m)) {
1516
1516
  if (y.ref === void 0) continue;
1517
- if (!Io(y.ref) || Fo(y.ref))
1517
+ if (!Fo(y.ref) || To(y.ref))
1518
1518
  throw new Error("unexpected behaviour");
1519
1519
  const R = w;
1520
1520
  f.push([
@@ -1530,7 +1530,7 @@ class lt {
1530
1530
  h,
1531
1531
  S,
1532
1532
  E,
1533
- { stagingRefreshTimestamp: j, blocksInLimbo: F }
1533
+ { stagingRefreshTimestamp: B, blocksInLimbo: I }
1534
1534
  ] = await Promise.all([
1535
1535
  i,
1536
1536
  a,
@@ -1538,44 +1538,44 @@ class lt {
1538
1538
  l,
1539
1539
  u
1540
1540
  ]);
1541
- if (v !== Me)
1542
- throw Number(v) < Number(Me) ? new qr("Can't perform this action on this project because it has older schema. Try (re)loading the project to update it.") : new qr("Can't perform this action on this project because it has newer schema. Upgrade your desktop app to the latest version.");
1543
- const B = [];
1541
+ if (v !== Je)
1542
+ throw Number(v) < Number(Je) ? new qr("Can't perform this action on this project because it has older schema. Try (re)loading the project to update it.") : new qr("Can't perform this action on this project because it has newer schema. Upgrade your desktop app to the latest version.");
1543
+ const j = [];
1544
1544
  for (const [g, m, w, y] of f) {
1545
1545
  const R = await y;
1546
1546
  if (w.value = R.data, mr(R.error) ? w.status = "Error" : R.resourceReady || mr(R.originalResourceId) ? w.status = "Ready" : w.status = "NotReady", m === "blockPack") {
1547
- const k = R.fields.find((O) => O.name === L.HolderRefField);
1547
+ const k = R.fields.find((O) => O.name === D.HolderRefField);
1548
1548
  if (k === void 0)
1549
1549
  throw new Error("Block pack ref field is missing");
1550
- B.push([g, t.getResourceData(it(k.value), !1)]);
1550
+ j.push([g, t.getResourceData(it(k.value), !1)]);
1551
1551
  }
1552
1552
  }
1553
- for (const [g, m] of B) {
1554
- const w = await m, y = Ve(D(w.data));
1553
+ for (const [g, m] of j) {
1554
+ const w = await m, y = Ve(N(w.data));
1555
1555
  g.blockConfig = ke(y.config), g.blockPack = y.source;
1556
1556
  }
1557
- const V = await Mn(), P = wr(V.hash), N = d.fields.find(
1557
+ const V = await Gn(), P = wr(V.hash), $ = d.fields.find(
1558
1558
  (g) => g.name === P
1559
1559
  );
1560
1560
  let C;
1561
- N !== void 0 ? C = it(N.value) : (C = L.wrapInHolder(t, dt(t, V.spec)), t.createField(
1562
- M(r, wr(V.hash)),
1561
+ $ !== void 0 ? C = it($.value) : (C = D.wrapInHolder(t, dt(t, V.spec)), t.createField(
1562
+ J(r, wr(V.hash)),
1563
1563
  "Dynamic",
1564
1564
  C
1565
1565
  ));
1566
- const G = { stagingRefreshTimestamp: j }, ce = new Set(F), z = /* @__PURE__ */ new Map();
1566
+ const G = { stagingRefreshTimestamp: B }, ce = new Set(I), z = /* @__PURE__ */ new Map();
1567
1567
  p.forEach(({ id: g, fields: m, blockConfig: w, blockPack: y }) => z.set(
1568
1568
  g,
1569
- new ls(g, m, D(w), D(y))
1569
+ new ls(g, m, N(w), N(y))
1570
1570
  ));
1571
- const J = /* @__PURE__ */ new Set();
1571
+ const M = /* @__PURE__ */ new Set();
1572
1572
  for (const g of re(E)) {
1573
1573
  if (!z.has(g.id))
1574
1574
  throw new Error(`Inconsistent project structure: no inputs for ${g.id}`);
1575
- J.add(g.id);
1575
+ M.add(g.id);
1576
1576
  }
1577
1577
  z.forEach((g) => {
1578
- if (!J.has(g.id))
1578
+ if (!M.has(g.id))
1579
1579
  throw new Error(`Inconsistent project structure: no structure entry for ${g.id}`);
1580
1580
  g.check();
1581
1581
  });
@@ -1596,23 +1596,23 @@ class lt {
1596
1596
  return W.fixProblemsAndMigrate(), W;
1597
1597
  }
1598
1598
  }
1599
- async function Qi(s, e = vi) {
1600
- const t = s.createEphemeral(yi);
1599
+ async function Zi(s, e = yi) {
1600
+ const t = s.createEphemeral(wi);
1601
1601
  s.lock(t);
1602
1602
  const r = String(Date.now());
1603
- s.setKValue(t, at, JSON.stringify(Me)), s.setKValue(t, Fr, r), s.setKValue(t, Ge, r), s.setKValue(t, _e, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(gi)), s.setKValue(t, ct, JSON.stringify(mi));
1604
- const n = await Mn();
1603
+ s.setKValue(t, at, JSON.stringify(Je)), s.setKValue(t, Fr, r), s.setKValue(t, Ge, r), s.setKValue(t, _e, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(mi)), s.setKValue(t, ct, JSON.stringify(vi));
1604
+ const n = await Gn();
1605
1605
  return s.createField(
1606
- M(t, wr(n.hash)),
1606
+ J(t, wr(n.hash)),
1607
1607
  "Dynamic",
1608
- L.wrapInHolder(s, dt(s, n.spec))
1608
+ D.wrapInHolder(s, dt(s, n.spec))
1609
1609
  ), t;
1610
1610
  }
1611
1611
  async function tt(s, e, t, r) {
1612
1612
  return oe(s, e, t, void 0, r);
1613
1613
  }
1614
1614
  async function oe(s, e, t, r, n) {
1615
- if (e instanceof vn)
1615
+ if (e instanceof yn)
1616
1616
  return await e.withWriteTx("ProjectAction", async (o) => {
1617
1617
  const i = await lt.load(s, o, t, r), a = await n(i);
1618
1618
  return i.wasModified && (i.save(), await o.commit(), ee().logProjectMutationStat && console.log(JSON.stringify(o.stat))), a;
@@ -1622,7 +1622,7 @@ async function oe(s, e, t, r, n) {
1622
1622
  return o.save(), i;
1623
1623
  }
1624
1624
  }
1625
- function* Zi(s) {
1625
+ function* ea(s) {
1626
1626
  switch (s.type) {
1627
1627
  case "Json":
1628
1628
  return;
@@ -1642,7 +1642,7 @@ function us(s, e) {
1642
1642
  Object.entries(s).map(([t, r]) => [t, e(r, t)])
1643
1643
  );
1644
1644
  }
1645
- function ea(s, e) {
1645
+ function ta(s, e) {
1646
1646
  switch (s.type) {
1647
1647
  case "Json":
1648
1648
  return { ...s };
@@ -1660,26 +1660,26 @@ function ea(s, e) {
1660
1660
  Y(s);
1661
1661
  }
1662
1662
  }
1663
- const ta = He("PColumnData/JsonPartitioned", "1"), ra = He(
1663
+ const ra = He("PColumnData/JsonPartitioned", "1"), sa = He(
1664
1664
  "PColumnData/Partitioned/JsonPartitioned",
1665
1665
  "1"
1666
- ), sa = He("PColumnData/BinaryPartitioned", "1"), na = He(
1666
+ ), na = He("PColumnData/BinaryPartitioned", "1"), oa = He(
1667
1667
  "PColumnData/Partitioned/BinaryPartitioned",
1668
1668
  "1"
1669
- ), oa = He("PColumnData/Json", "1");
1670
- function ia(s) {
1669
+ ), ia = He("PColumnData/Json", "1");
1670
+ function aa(s) {
1671
1671
  if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
1672
1672
  const e = s.getDataAsJson();
1673
1673
  if (e === void 0)
1674
1674
  throw new Error("unexpected data info structure, no resource data");
1675
- if (pe(s.resourceType, oa)) {
1675
+ if (pe(s.resourceType, ia)) {
1676
1676
  const t = e;
1677
1677
  return {
1678
1678
  type: "Json",
1679
1679
  keyLength: t.keyLength,
1680
1680
  data: t.data
1681
1681
  };
1682
- } else if (pe(s.resourceType, ta)) {
1682
+ } else if (pe(s.resourceType, ra)) {
1683
1683
  const t = e, r = Object.fromEntries(
1684
1684
  s.listInputFields().map((n) => [n, s.traverse({ field: n, errorIfFieldNotSet: !0 }).resourceInfo])
1685
1685
  );
@@ -1688,7 +1688,7 @@ function ia(s) {
1688
1688
  partitionKeyLength: t.partitionKeyLength,
1689
1689
  parts: r
1690
1690
  };
1691
- } else if (pe(s.resourceType, ra)) {
1691
+ } else if (pe(s.resourceType, sa)) {
1692
1692
  const t = e, r = {};
1693
1693
  for (const n of s.listInputFields()) {
1694
1694
  const o = s.traverse({ field: n, errorIfFieldNotSet: !0 }), i = o.listInputFields();
@@ -1706,7 +1706,7 @@ function ia(s) {
1706
1706
  partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
1707
1707
  parts: r
1708
1708
  };
1709
- } else if (pe(s.resourceType, sa)) {
1709
+ } else if (pe(s.resourceType, na)) {
1710
1710
  const t = e, r = {};
1711
1711
  for (const n of s.listInputFields())
1712
1712
  if (n.endsWith(".index")) {
@@ -1727,7 +1727,7 @@ function ia(s) {
1727
1727
  partitionKeyLength: t.partitionKeyLength,
1728
1728
  parts: r
1729
1729
  };
1730
- } else if (pe(s.resourceType, na)) {
1730
+ } else if (pe(s.resourceType, oa)) {
1731
1731
  const t = e, r = {};
1732
1732
  for (const n of s.listInputFields()) {
1733
1733
  const o = s.traverse({ field: n, errorIfFieldNotSet: !0 }), i = o.listInputFields();
@@ -1761,9 +1761,9 @@ function ia(s) {
1761
1761
  parts: r
1762
1762
  };
1763
1763
  }
1764
- throw new Error(`unsupported resource type: ${To(s.resourceType)}`);
1764
+ throw new Error(`unsupported resource type: ${$o(s.resourceType)}`);
1765
1765
  }
1766
- function aa(s, e) {
1766
+ function ca(s, e) {
1767
1767
  const t = s.axesSpec.length, r = {};
1768
1768
  for (const { key: n, val: o } of e) {
1769
1769
  if (n.length !== t)
@@ -1776,17 +1776,17 @@ function aa(s, e) {
1776
1776
  data: r
1777
1777
  };
1778
1778
  }
1779
- function ca(s, e) {
1779
+ function la(s, e) {
1780
1780
  const t = Pe("sha256");
1781
1781
  return t.update(te(s)), t.update(String(Ue(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
1782
1782
  }
1783
1783
  function ds(s, e) {
1784
1784
  return te({ __isRef: !0, blockId: s, name: e });
1785
1785
  }
1786
- function la(s, e) {
1786
+ function ua(s, e) {
1787
1787
  return te({ resolvePath: s, name: e });
1788
1788
  }
1789
- function Gn(s, e = !0, t = !1, r = "") {
1789
+ function _n(s, e = !0, t = !1, r = "") {
1790
1790
  var a, c, l;
1791
1791
  const n = /^(?<name>.*)\.(?<type>spec|data)$/, o = /* @__PURE__ */ new Map();
1792
1792
  for (const u of s.listInputFields()) {
@@ -1795,13 +1795,13 @@ function Gn(s, e = !0, t = !1, r = "") {
1795
1795
  if (e) throw new Error(`unexpected field name ${u}`);
1796
1796
  continue;
1797
1797
  }
1798
- let p = D((a = d.groups) == null ? void 0 : a.name);
1798
+ let p = N((a = d.groups) == null ? void 0 : a.name);
1799
1799
  if (!p.startsWith(r)) {
1800
1800
  if (e) throw new Error(`unexpected field name ${u}`);
1801
1801
  continue;
1802
1802
  }
1803
1803
  p = p.slice(r.length);
1804
- const f = D((c = d.groups) == null ? void 0 : c.type);
1804
+ const f = N((c = d.groups) == null ? void 0 : c.type);
1805
1805
  let v = o.get(p);
1806
1806
  switch (v === void 0 && (v = {}, o.set(p, v)), f) {
1807
1807
  case "spec":
@@ -1824,10 +1824,10 @@ function Gn(s, e = !0, t = !1, r = "") {
1824
1824
  for (const [, u] of o) u.data === void 0 && (u.hasData = !1);
1825
1825
  return { locked: i, results: o };
1826
1826
  }
1827
- function ua(s, e = !0, t = "", r) {
1827
+ function da(s, e = !0, t = "", r) {
1828
1828
  if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
1829
- const n = Gn(s, e, !1, t);
1830
- qo(n.locked);
1829
+ const n = _n(s, e, !1, t);
1830
+ Ko(n.locked);
1831
1831
  const o = {};
1832
1832
  for (const [i, a] of n.results) {
1833
1833
  if (a.spec === void 0) throw new Error(`no spec for key ${i}`);
@@ -1837,7 +1837,7 @@ function ua(s, e = !0, t = "", r) {
1837
1837
  if (c === void 0) throw new Error(`no data for key ${i}`);
1838
1838
  if (!c.ok) throw c.error;
1839
1839
  o[i] = {
1840
- id: r.length === 0 ? ca(a.spec, c.value) : la(r, i),
1840
+ id: r.length === 0 ? la(a.spec, c.value) : ua(r, i),
1841
1841
  spec: a.spec,
1842
1842
  data: c.value
1843
1843
  };
@@ -1878,7 +1878,7 @@ class $r {
1878
1878
  if (r === void 0) return;
1879
1879
  const n = (a = (i = r.prod) == null ? void 0 : i.results) == null ? void 0 : a.get(t), o = (c = n == null ? void 0 : n.data) == null ? void 0 : c.call(n);
1880
1880
  if (n !== void 0 && n.spec !== void 0 && o !== void 0)
1881
- return dn(o, (l) => ({
1881
+ return pn(o, (l) => ({
1882
1882
  id: ds(e, t),
1883
1883
  spec: n.spec,
1884
1884
  data: l
@@ -1972,7 +1972,7 @@ class $r {
1972
1972
  for (const r of this.blocks.values()) {
1973
1973
  const n = /* @__PURE__ */ new Set(), o = (i) => {
1974
1974
  for (const [a, c] of i.results)
1975
- n.has(a) || c.spec === void 0 || (n.add(a), co(e, c.spec) && t.push({
1975
+ n.has(a) || c.spec === void 0 || (n.add(a), lo(e, c.spec) && t.push({
1976
1976
  label: r.info.label + " / " + a,
1977
1977
  ref: et(r.info.id, a),
1978
1978
  spec: c.spec
@@ -1983,7 +1983,7 @@ class $r {
1983
1983
  return t;
1984
1984
  }
1985
1985
  static create(e, t, r) {
1986
- const n = e.accessor(t).node(), o = D(n.getKeyValueAsJson(de)), a = br(o).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
1986
+ const n = e.accessor(t).node(), o = N(n.getKeyValueAsJson(de)), a = br(o).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
1987
1987
  for (const l of re(o)) {
1988
1988
  if (!a.has(l.id)) continue;
1989
1989
  const u = ps(
@@ -2015,12 +2015,12 @@ class $r {
2015
2015
  function ps(s, e) {
2016
2016
  if (e === void 0)
2017
2017
  return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
2018
- if (e.ok) return Gn(e.value, !1, !0);
2018
+ if (e.ok) return _n(e.value, !1, !0);
2019
2019
  }
2020
2020
  function Ar(s, e) {
2021
2021
  return {
2022
2022
  blockId: e,
2023
- args: (o) => wt(D(
2023
+ args: (o) => wt(N(
2024
2024
  o.accessor(s).node().traverse({
2025
2025
  field: q(e, "currentArgs"),
2026
2026
  errorIfFieldNotSet: !0
@@ -2043,13 +2043,13 @@ function Ar(s, e) {
2043
2043
  return i ? wt(i) : void 0;
2044
2044
  },
2045
2045
  blockMeta: (o) => {
2046
- const i = o.accessor(s).node(), a = D(i.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
2046
+ const i = o.accessor(s).node(), a = N(i.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
2047
2047
  for (const l of re(a)) c.set(l.id, l);
2048
2048
  return c;
2049
2049
  }
2050
2050
  };
2051
2051
  }
2052
- function _n(s, e) {
2052
+ function qn(s, e) {
2053
2053
  return {
2054
2054
  ...Ar(s, e),
2055
2055
  prod: (t) => {
@@ -2123,7 +2123,7 @@ function* Z(s, e) {
2123
2123
  Y(s);
2124
2124
  }
2125
2125
  }
2126
- function da(s, e) {
2126
+ function pa(s, e) {
2127
2127
  const t = {};
2128
2128
  for (const [r, n] of Object.entries(s)) t[r] = e(n);
2129
2129
  return t;
@@ -2131,7 +2131,7 @@ function da(s, e) {
2131
2131
  function Be(s, e) {
2132
2132
  return s === void 0 ? void 0 : e(s);
2133
2133
  }
2134
- function pa(s) {
2134
+ function fa(s) {
2135
2135
  switch (s.type) {
2136
2136
  case "GetImportProgress":
2137
2137
  return !0;
@@ -2139,8 +2139,8 @@ function pa(s) {
2139
2139
  return !1;
2140
2140
  }
2141
2141
  }
2142
- function fa(s) {
2143
- for (const e of Z(s)) if (pa(e)) return !0;
2142
+ function ha(s) {
2143
+ for (const e of Z(s)) if (fa(e)) return !0;
2144
2144
  return !1;
2145
2145
  }
2146
2146
  function pt(s) {
@@ -2152,85 +2152,85 @@ function pt(s) {
2152
2152
  function T(s) {
2153
2153
  return () => pt(s);
2154
2154
  }
2155
- const ha = (s) => {
2155
+ const ga = (s) => {
2156
2156
  const e = {};
2157
2157
  for (const [t, r] of Object.entries(s)) e[t] = r;
2158
2158
  return T(e);
2159
- }, ga = (s) => {
2159
+ }, ma = (s) => {
2160
2160
  const e = s.source;
2161
2161
  if (e === void 0) return T(void 0);
2162
2162
  const t = [];
2163
2163
  for (const r of e)
2164
2164
  r instanceof Array ? t.push(...r) : t.push(r);
2165
2165
  return T(t);
2166
- }, ma = (s) => {
2166
+ }, va = (s) => {
2167
2167
  const e = s.source, t = s.field;
2168
2168
  return e === void 0 || t === void 0 ? T(void 0) : ({ cCtx: r }) => {
2169
2169
  var n;
2170
2170
  return pt((n = r.accessor(e).node().traverse(t)) == null ? void 0 : n.persist());
2171
2171
  };
2172
2172
  };
2173
- function qn(s, e) {
2173
+ function Kn(s, e) {
2174
2174
  const t = {}, r = s.length;
2175
2175
  for (let n = 0; n < r; n++) t[String(n)] = e(s[n]);
2176
2176
  return t;
2177
2177
  }
2178
- function va(s, e) {
2178
+ function ya(s, e) {
2179
2179
  return (t) => {
2180
2180
  const r = t.source;
2181
2181
  return r === void 0 ? T(void 0) : () => ({
2182
2182
  type: "ScheduleSubroutine",
2183
- subroutine: Kn(r.length),
2184
- args: qn(r, (n) => A({ ...s, [e.itVar]: n }, e.mapping))
2183
+ subroutine: Hn(r.length),
2184
+ args: Kn(r, (n) => L({ ...s, [e.itVar]: n }, e.mapping))
2185
2185
  });
2186
2186
  };
2187
2187
  }
2188
- function Kn(s) {
2188
+ function Hn(s) {
2189
2189
  return (e) => {
2190
2190
  const t = [];
2191
2191
  for (let r = 0; r < s; r++) t.push(e[String(r)]);
2192
2192
  return T(t);
2193
2193
  };
2194
2194
  }
2195
- function ya(s, e) {
2195
+ function wa(s, e) {
2196
2196
  return (t) => {
2197
2197
  const r = t.source;
2198
2198
  if (r === void 0) return T(void 0);
2199
2199
  const n = {};
2200
2200
  for (const [o, i] of Object.entries(r)) {
2201
2201
  const a = { ...s, [e.itVar]: i };
2202
- n[o] = A(a, e.mapping);
2202
+ n[o] = L(a, e.mapping);
2203
2203
  }
2204
2204
  return () => ({
2205
2205
  type: "ScheduleSubroutine",
2206
- subroutine: wa,
2206
+ subroutine: Sa,
2207
2207
  args: n
2208
2208
  });
2209
2209
  };
2210
2210
  }
2211
- const wa = (s) => T(s), Sa = (s) => {
2211
+ const Sa = (s) => T(s), ba = (s) => {
2212
2212
  const e = s.arg;
2213
2213
  return T(e === void 0 ? void 0 : e.length === 0);
2214
- }, ba = (s) => {
2214
+ }, ka = (s) => {
2215
2215
  const e = s.operand;
2216
2216
  return T(e === void 0 ? void 0 : !e);
2217
- }, ka = (s) => {
2217
+ }, Ra = (s) => {
2218
2218
  const e = s.operand1, t = s.operand2;
2219
2219
  return T(e === void 0 || t === void 0 ? void 0 : e && t);
2220
- }, Ra = (s) => {
2220
+ }, Ca = (s) => {
2221
2221
  const e = s.operand1, t = s.operand2;
2222
2222
  return T(e === void 0 || t === void 0 ? void 0 : e || t);
2223
- }, Ca = (s) => {
2223
+ }, Ea = (s) => {
2224
2224
  const e = s.source;
2225
2225
  return e === void 0 ? T(void 0) : ({ cCtx: t }) => {
2226
2226
  var r;
2227
2227
  return pt((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
2228
2228
  };
2229
- }, Ea = (s) => {
2229
+ }, Pa = (s) => {
2230
2230
  const e = s.source, t = s.field;
2231
2231
  return T(e === void 0 || t === void 0 ? void 0 : e[t]);
2232
2232
  };
2233
- function Pa(s, e) {
2233
+ function Oa(s, e) {
2234
2234
  return (t) => {
2235
2235
  const r = t.source;
2236
2236
  return r === void 0 ? T(void 0) : ({ cCtx: n }) => {
@@ -2240,18 +2240,18 @@ function Pa(s, e) {
2240
2240
  if (c === void 0) i[a] = T(void 0);
2241
2241
  else {
2242
2242
  const l = { ...s, [e.itVar]: c.persist() };
2243
- i[a] = A(l, e.mapping);
2243
+ i[a] = L(l, e.mapping);
2244
2244
  }
2245
2245
  }
2246
2246
  return {
2247
2247
  type: "ScheduleSubroutine",
2248
- subroutine: Oa,
2248
+ subroutine: Ia,
2249
2249
  args: i
2250
2250
  };
2251
2251
  };
2252
2252
  };
2253
2253
  }
2254
- const Oa = (s) => T(s), Ia = (s) => (e) => {
2254
+ const Ia = (s) => T(s), Fa = (s) => (e) => {
2255
2255
  const t = e.source;
2256
2256
  return t === void 0 ? T(void 0) : ({ drivers: r }) => ({
2257
2257
  type: "ScheduleComputable",
@@ -2265,7 +2265,7 @@ const Oa = (s) => T(s), Ia = (s) => (e) => {
2265
2265
  }
2266
2266
  )
2267
2267
  });
2268
- }, Fa = (s) => (e) => {
2268
+ }, Ta = (s) => (e) => {
2269
2269
  const t = e.source;
2270
2270
  return t === void 0 ? T(void 0) : ({ cCtx: r, drivers: n }) => {
2271
2271
  const o = r.accessor(t).node().resourceInfo;
@@ -2276,7 +2276,7 @@ const Oa = (s) => T(s), Ia = (s) => (e) => {
2276
2276
  })
2277
2277
  };
2278
2278
  };
2279
- }, Ta = (s) => (e) => {
2279
+ }, $a = (s) => (e) => {
2280
2280
  const t = e.source;
2281
2281
  return t === void 0 ? T(void 0) : ({ drivers: r }) => ({
2282
2282
  type: "ScheduleComputable",
@@ -2292,56 +2292,56 @@ const Oa = (s) => T(s), Ia = (s) => (e) => {
2292
2292
  }
2293
2293
  )
2294
2294
  });
2295
- }, $a = (s) => {
2295
+ }, Aa = (s) => {
2296
2296
  const e = s.source;
2297
2297
  return e === void 0 ? T(void 0) : (t) => ({
2298
2298
  type: "ScheduleComputable",
2299
2299
  computable: t.drivers.blobDriver.getDownloadedBlob(e)
2300
2300
  });
2301
- }, Aa = (s) => {
2301
+ }, La = (s) => {
2302
2302
  const e = s.source;
2303
2303
  return e === void 0 ? T(void 0) : ({ drivers: t }) => ({
2304
2304
  type: "ScheduleComputable",
2305
2305
  computable: t.blobDriver.getOnDemandBlob(e)
2306
2306
  });
2307
- }, La = (s) => (e) => {
2307
+ }, Da = (s) => (e) => {
2308
2308
  const t = e.source;
2309
2309
  return t === void 0 ? T(void 0) : ({ drivers: r }) => ({
2310
2310
  type: "ScheduleComputable",
2311
2311
  computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
2312
2312
  });
2313
- }, Da = (s) => {
2313
+ }, Na = (s) => {
2314
2314
  const e = s.source;
2315
2315
  return e === void 0 ? T(void 0) : ({ drivers: t }) => ({
2316
2316
  type: "ScheduleComputable",
2317
2317
  computable: t.uploadDriver.getProgressId(e)
2318
2318
  });
2319
- }, Na = (s) => (e) => {
2319
+ }, Ba = (s) => (e) => {
2320
2320
  const t = e.source;
2321
2321
  return t === void 0 ? T(void 0) : ({ drivers: r }) => ({
2322
2322
  type: "ScheduleComputable",
2323
2323
  computable: r.logDriver.getLastLogs(t, s)
2324
2324
  });
2325
- }, Ba = (s) => (e) => {
2325
+ }, ja = (s) => (e) => {
2326
2326
  const t = e.source;
2327
2327
  return t === void 0 ? T(void 0) : ({ drivers: r }) => ({
2328
2328
  type: "ScheduleComputable",
2329
2329
  computable: r.logDriver.getProgressLog(t, s)
2330
2330
  });
2331
- }, ja = (s) => (e) => {
2331
+ }, xa = (s) => (e) => {
2332
2332
  const t = e.source;
2333
2333
  return t === void 0 ? T(void 0) : ({ drivers: r }) => ({
2334
2334
  type: "ScheduleComputable",
2335
2335
  computable: r.logDriver.getProgressLogWithInfo(t, s)
2336
2336
  });
2337
- }, xa = (s) => {
2337
+ }, Va = (s) => {
2338
2338
  const e = s.source;
2339
2339
  return e === void 0 ? T(void 0) : ({ drivers: t }) => ({
2340
2340
  type: "ScheduleComputable",
2341
2341
  computable: t.logDriver.getLogHandle(e)
2342
2342
  });
2343
2343
  };
2344
- function A(s, e) {
2344
+ function L(s, e) {
2345
2345
  switch (e.type) {
2346
2346
  case "GetFromCtx": {
2347
2347
  const t = s[e.variable];
@@ -2350,208 +2350,208 @@ function A(s, e) {
2350
2350
  case "Isolate":
2351
2351
  return ({ drivers: t }) => ({
2352
2352
  type: "ScheduleComputable",
2353
- computable: zn(t, s, e.cfg)
2353
+ computable: Xn(t, s, e.cfg)
2354
2354
  });
2355
2355
  case "Immediate":
2356
2356
  return T(e.value);
2357
2357
  case "GetJsonField":
2358
2358
  return () => ({
2359
2359
  type: "ScheduleSubroutine",
2360
- subroutine: Ea,
2360
+ subroutine: Pa,
2361
2361
  args: {
2362
- source: A(s, e.source),
2363
- field: A(s, e.field)
2362
+ source: L(s, e.source),
2363
+ field: L(s, e.field)
2364
2364
  }
2365
2365
  });
2366
2366
  case "MapArrayValues":
2367
2367
  return () => ({
2368
2368
  type: "ScheduleSubroutine",
2369
- subroutine: va(s, e),
2369
+ subroutine: ya(s, e),
2370
2370
  args: {
2371
- source: A(s, e.source)
2371
+ source: L(s, e.source)
2372
2372
  }
2373
2373
  });
2374
2374
  case "MapRecordValues":
2375
2375
  return () => ({
2376
2376
  type: "ScheduleSubroutine",
2377
- subroutine: ya(s, e),
2377
+ subroutine: wa(s, e),
2378
2378
  args: {
2379
- source: A(s, e.source)
2379
+ source: L(s, e.source)
2380
2380
  }
2381
2381
  });
2382
2382
  case "MakeObject":
2383
2383
  return () => ({
2384
2384
  type: "ScheduleSubroutine",
2385
- subroutine: ha,
2386
- args: da(e.template, (t) => A(s, t))
2385
+ subroutine: ga,
2386
+ args: pa(e.template, (t) => L(s, t))
2387
2387
  });
2388
2388
  case "MakeArray":
2389
2389
  return () => ({
2390
2390
  type: "ScheduleSubroutine",
2391
- subroutine: Kn(e.template.length),
2392
- args: qn(e.template, (t) => A(s, t))
2391
+ subroutine: Hn(e.template.length),
2392
+ args: Kn(e.template, (t) => L(s, t))
2393
2393
  });
2394
2394
  case "Flatten":
2395
2395
  return () => ({
2396
2396
  type: "ScheduleSubroutine",
2397
- subroutine: ga,
2397
+ subroutine: ma,
2398
2398
  args: {
2399
- source: A(s, e.source)
2399
+ source: L(s, e.source)
2400
2400
  }
2401
2401
  });
2402
2402
  case "IsEmpty":
2403
2403
  return () => ({
2404
2404
  type: "ScheduleSubroutine",
2405
- subroutine: Sa,
2405
+ subroutine: ba,
2406
2406
  args: {
2407
- arg: A(s, e.arg)
2407
+ arg: L(s, e.arg)
2408
2408
  }
2409
2409
  });
2410
2410
  case "Not":
2411
2411
  return () => ({
2412
2412
  type: "ScheduleSubroutine",
2413
- subroutine: ba,
2413
+ subroutine: ka,
2414
2414
  args: {
2415
- operand: A(s, e.operand)
2415
+ operand: L(s, e.operand)
2416
2416
  }
2417
2417
  });
2418
2418
  case "And":
2419
2419
  return () => ({
2420
2420
  type: "ScheduleSubroutine",
2421
- subroutine: ka,
2421
+ subroutine: Ra,
2422
2422
  args: {
2423
- operand1: A(s, e.operand1),
2424
- operand2: A(s, e.operand2)
2423
+ operand1: L(s, e.operand1),
2424
+ operand2: L(s, e.operand2)
2425
2425
  }
2426
2426
  });
2427
2427
  case "Or":
2428
2428
  return () => ({
2429
2429
  type: "ScheduleSubroutine",
2430
- subroutine: Ra,
2430
+ subroutine: Ca,
2431
2431
  args: {
2432
- operand1: A(s, e.operand1),
2433
- operand2: A(s, e.operand2)
2432
+ operand1: L(s, e.operand1),
2433
+ operand2: L(s, e.operand2)
2434
2434
  }
2435
2435
  });
2436
2436
  case "MapResourceFields":
2437
2437
  return () => ({
2438
2438
  type: "ScheduleSubroutine",
2439
- subroutine: Pa(s, e),
2439
+ subroutine: Oa(s, e),
2440
2440
  args: {
2441
- source: A(s, e.source)
2441
+ source: L(s, e.source)
2442
2442
  }
2443
2443
  });
2444
2444
  case "GetResourceField":
2445
2445
  return () => ({
2446
2446
  type: "ScheduleSubroutine",
2447
- subroutine: ma,
2447
+ subroutine: va,
2448
2448
  args: {
2449
- source: A(s, e.source),
2450
- field: A(s, e.field)
2449
+ source: L(s, e.source),
2450
+ field: L(s, e.field)
2451
2451
  }
2452
2452
  });
2453
2453
  case "GetResourceValueAsJson":
2454
2454
  return () => ({
2455
2455
  type: "ScheduleSubroutine",
2456
- subroutine: Ca,
2456
+ subroutine: Ea,
2457
2457
  args: {
2458
- source: A(s, e.source)
2458
+ source: L(s, e.source)
2459
2459
  }
2460
2460
  });
2461
2461
  case "GetBlobContent":
2462
2462
  return () => ({
2463
2463
  type: "ScheduleSubroutine",
2464
- subroutine: Ia(e.range),
2464
+ subroutine: Fa(e.range),
2465
2465
  args: {
2466
- source: A(s, e.source)
2466
+ source: L(s, e.source)
2467
2467
  }
2468
2468
  });
2469
2469
  case "GetBlobContentAsString":
2470
2470
  return () => ({
2471
2471
  type: "ScheduleSubroutine",
2472
- subroutine: Fa(e.range),
2472
+ subroutine: Ta(e.range),
2473
2473
  args: {
2474
- source: A(s, e.source)
2474
+ source: L(s, e.source)
2475
2475
  }
2476
2476
  });
2477
2477
  case "GetBlobContentAsJson":
2478
2478
  return () => ({
2479
2479
  type: "ScheduleSubroutine",
2480
- subroutine: Ta(e.range),
2480
+ subroutine: $a(e.range),
2481
2481
  args: {
2482
- source: A(s, e.source)
2482
+ source: L(s, e.source)
2483
2483
  }
2484
2484
  });
2485
2485
  case "GetDownloadedBlobContent":
2486
2486
  return () => ({
2487
2487
  type: "ScheduleSubroutine",
2488
- subroutine: $a,
2488
+ subroutine: Aa,
2489
2489
  args: {
2490
- source: A(s, e.source)
2490
+ source: L(s, e.source)
2491
2491
  }
2492
2492
  });
2493
2493
  case "GetOnDemandBlobContent":
2494
2494
  return () => ({
2495
2495
  type: "ScheduleSubroutine",
2496
- subroutine: Aa,
2496
+ subroutine: La,
2497
2497
  args: {
2498
- source: A(s, e.source)
2498
+ source: L(s, e.source)
2499
2499
  }
2500
2500
  });
2501
2501
  case "ExtractArchiveAndGetURL":
2502
2502
  return () => ({
2503
2503
  type: "ScheduleSubroutine",
2504
- subroutine: La(e.format),
2504
+ subroutine: Da(e.format),
2505
2505
  args: {
2506
- source: A(s, e.source)
2506
+ source: L(s, e.source)
2507
2507
  }
2508
2508
  });
2509
2509
  case "GetImportProgress":
2510
2510
  return () => ({
2511
2511
  type: "ScheduleSubroutine",
2512
- subroutine: Da,
2512
+ subroutine: Na,
2513
2513
  args: {
2514
- source: A(s, e.source)
2514
+ source: L(s, e.source)
2515
2515
  }
2516
2516
  });
2517
2517
  case "GetLastLogs":
2518
2518
  return () => ({
2519
2519
  type: "ScheduleSubroutine",
2520
- subroutine: Na(e.lines),
2520
+ subroutine: Ba(e.lines),
2521
2521
  args: {
2522
- source: A(s, e.source)
2522
+ source: L(s, e.source)
2523
2523
  }
2524
2524
  });
2525
2525
  case "GetProgressLog":
2526
2526
  return () => ({
2527
2527
  type: "ScheduleSubroutine",
2528
- subroutine: Ba(e.patternToSearch),
2528
+ subroutine: ja(e.patternToSearch),
2529
2529
  args: {
2530
- source: A(s, e.source)
2530
+ source: L(s, e.source)
2531
2531
  }
2532
2532
  });
2533
2533
  case "GetProgressLogWithInfo":
2534
2534
  return () => ({
2535
2535
  type: "ScheduleSubroutine",
2536
- subroutine: ja(e.patternToSearch),
2536
+ subroutine: xa(e.patternToSearch),
2537
2537
  args: {
2538
- source: A(s, e.source)
2538
+ source: L(s, e.source)
2539
2539
  }
2540
2540
  });
2541
2541
  case "GetLogHandle":
2542
2542
  return () => ({
2543
2543
  type: "ScheduleSubroutine",
2544
- subroutine: xa,
2544
+ subroutine: Va,
2545
2545
  args: {
2546
- source: A(s, e.source)
2546
+ source: L(s, e.source)
2547
2547
  }
2548
2548
  });
2549
2549
  default:
2550
2550
  return Y(e);
2551
2551
  }
2552
2552
  }
2553
- const Va = ["$prod", "$staging"];
2554
- function Ua(s) {
2553
+ const Ua = ["$prod", "$staging"];
2554
+ function Ma(s) {
2555
2555
  return {
2556
2556
  $blockId: s.blockId,
2557
2557
  $args: (e) => JSON.parse(s.args(e)),
@@ -2563,18 +2563,18 @@ function Ua(s) {
2563
2563
  $staging: s.staging
2564
2564
  };
2565
2565
  }
2566
- const Hn = Symbol(), Wn = "return", Ja = { op: Hn, arg: Wn };
2567
- function Ma(s) {
2568
- return s.op == Hn && s.arg == Wn;
2566
+ const Wn = Symbol(), zn = "return", Ja = { op: Wn, arg: zn };
2567
+ function Ga(s) {
2568
+ return s.op == Wn && s.arg == zn;
2569
2569
  }
2570
- function Ga() {
2570
+ function _a() {
2571
2571
  return { pendingSubroutines: /* @__PURE__ */ new Map() };
2572
2572
  }
2573
2573
  function fs(s, e, t, r) {
2574
- const n = new Sn(t), o = (a, c) => {
2575
- if (Ma(a))
2574
+ const n = new bn(t), o = (a, c) => {
2575
+ if (Ga(a))
2576
2576
  return e.result = c, !1;
2577
- const l = D(e.pendingSubroutines.get(a.op));
2577
+ const l = N(e.pendingSubroutines.get(a.op));
2578
2578
  if (a.arg in l.args) throw new Error("argument already set");
2579
2579
  return l.args[a.arg] = c, l.argCounter--, l.argCounter === 0 && (e.pendingSubroutines.delete(a.op), n.push({
2580
2580
  destination: l.destination,
@@ -2625,19 +2625,19 @@ function fs(s, e, t, r) {
2625
2625
  }
2626
2626
  return i;
2627
2627
  }
2628
- function _a(s, e, t, r = {}) {
2629
- return zn(s, Ua(e), t, r);
2628
+ function qa(s, e, t, r = {}) {
2629
+ return Xn(s, Ma(e), t, r);
2630
2630
  }
2631
- function zn(s, e, t, r = {}) {
2631
+ function Xn(s, e, t, r = {}) {
2632
2632
  const n = `${e.blockId}#` + te({
2633
2633
  ctx: Object.fromEntries(
2634
- Object.entries(e).filter(([o]) => Va.indexOf(o) === -1)
2634
+ Object.entries(e).filter(([o]) => Ua.indexOf(o) === -1)
2635
2635
  ),
2636
2636
  cfg: t
2637
2637
  });
2638
2638
  return K.makeRaw(
2639
2639
  (o) => {
2640
- const i = { drivers: s, cCtx: o }, a = Ga();
2640
+ const i = { drivers: s, cCtx: o }, a = _a();
2641
2641
  return {
2642
2642
  ir: fs(
2643
2643
  i,
@@ -2645,7 +2645,7 @@ function zn(s, e, t, r = {}) {
2645
2645
  [
2646
2646
  {
2647
2647
  destination: Ja,
2648
- operation: A(e, t)
2648
+ operation: L(e, t)
2649
2649
  }
2650
2650
  ],
2651
2651
  !0
@@ -2678,7 +2678,7 @@ function zn(s, e, t, r = {}) {
2678
2678
  function hs(s) {
2679
2679
  return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
2680
2680
  }
2681
- class qa {
2681
+ class Ka {
2682
2682
  constructor(e, t, r, n, o) {
2683
2683
  b(this, "computablesToResolve", {});
2684
2684
  b(this, "computableCtx");
@@ -2762,7 +2762,7 @@ class qa {
2762
2762
  parsePObjectCollection(e, t, r, ...n) {
2763
2763
  const o = this.getAccessor(e);
2764
2764
  if (!o.getIsReadyOrError()) return;
2765
- const i = ua(o, t, r, n), a = {};
2765
+ const i = da(o, t, r, n), a = {};
2766
2766
  for (const [c, l] of Object.entries(i))
2767
2767
  a[c] = ge(l, (u) => this.wrapAccessor(u));
2768
2768
  return a;
@@ -2881,7 +2881,7 @@ class qa {
2881
2881
  throw new Error(
2882
2882
  "can't use result pool in this context (most porbably called from the future mapper)"
2883
2883
  );
2884
- this._resultPool = D(
2884
+ this._resultPool = N(
2885
2885
  this.blockCtx.getResultsPool,
2886
2886
  "getResultsPool"
2887
2887
  )(this.computableCtx);
@@ -2910,7 +2910,7 @@ class qa {
2910
2910
  obj: {
2911
2911
  id: t.obj.id,
2912
2912
  spec: t.obj.spec,
2913
- data: dn(t.obj.data, (r) => this.wrapAccessor(r))
2913
+ data: pn(t.obj.data, (r) => this.wrapAccessor(r))
2914
2914
  }
2915
2915
  }))
2916
2916
  };
@@ -2961,7 +2961,7 @@ class qa {
2961
2961
  * - Passes through other values
2962
2962
  */
2963
2963
  transformInputPData(e) {
2964
- return typeof e == "string" ? this.getAccessor(e) : pn(e) ? fn(e, (t) => this.getAccessor(t)) : e;
2964
+ return typeof e == "string" ? this.getAccessor(e) : fn(e) ? hn(e, (t) => this.getAccessor(t)) : e;
2965
2965
  }
2966
2966
  //
2967
2967
  // Computable
@@ -2998,7 +2998,7 @@ class qa {
2998
2998
  }
2999
2999
  injectCtx(e) {
3000
3000
  const t = this.parent, r = t.vm;
3001
- Je.withScope((n) => {
3001
+ Me.withScope((n) => {
3002
3002
  const o = (i, a) => {
3003
3003
  const c = (...l) => {
3004
3004
  try {
@@ -3010,7 +3010,7 @@ class qa {
3010
3010
  };
3011
3011
  r.newFunction(i, c).consume((l) => r.setProp(e, i, l)), r.newFunction(i, a).consume((l) => r.setProp(e, i + "__internal__", l));
3012
3012
  };
3013
- if (lo(this.featureFlags, "supportsLazyState"))
3013
+ if (uo(this.featureFlags, "supportsLazyState"))
3014
3014
  o("args", () => {
3015
3015
  if (this.computableCtx === void 0)
3016
3016
  throw new Error("Add dummy call to ctx.args outside the future lambda. Can't be directly used in this context.");
@@ -3115,7 +3115,7 @@ class qa {
3115
3115
  });
3116
3116
  }
3117
3117
  }
3118
- function Ka(s) {
3118
+ function Ha(s) {
3119
3119
  return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
3120
3120
  }
3121
3121
  class qe {
@@ -3123,7 +3123,7 @@ class qe {
3123
3123
  b(this, "callbackRegistry");
3124
3124
  b(this, "fnJSONStringify");
3125
3125
  b(this, "fnJSONParse");
3126
- b(this, "errorRepo", new Ha());
3126
+ b(this, "errorRepo", new Wa());
3127
3127
  b(this, "computableHelper");
3128
3128
  if (this.scope = e, this.vm = t, this.deadlineSetter = r, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
3129
3129
  t.getProp(t.global, "JSON").consume((i) => t.getProp(i, "stringify"))
@@ -3132,10 +3132,10 @@ class qe {
3132
3132
  if (this.fnJSONParse = e.manage(
3133
3133
  t.getProp(t.global, "JSON").consume((i) => t.getProp(i, "parse"))
3134
3134
  ), t.typeof(this.fnJSONParse) !== "function") throw new Error("JSON.parse() not found.");
3135
- o !== void 0 && (this.computableHelper = new qa(this, o.blockCtx, o.mlEnv, n, o.computableCtx)), this.injectCtx();
3135
+ o !== void 0 && (this.computableHelper = new Ka(this, o.blockCtx, o.mlEnv, n, o.computableCtx)), this.injectCtx();
3136
3136
  }
3137
3137
  resetComputableCtx() {
3138
- D(this.computableHelper, "Computable context helper is not initialized").resetComputableCtx();
3138
+ N(this.computableHelper, "Computable context helper is not initialized").resetComputableCtx();
3139
3139
  }
3140
3140
  static cleanErrorContext(e) {
3141
3141
  typeof e == "object" && e !== null && "context" in e && delete e.context;
@@ -3160,7 +3160,7 @@ class qe {
3160
3160
  }
3161
3161
  runCallback(e, ...t) {
3162
3162
  try {
3163
- return this.deadlineSetter({ currentExecutionTarget: e, deadline: Date.now() + 1e4 }), Je.withScope((r) => {
3163
+ return this.deadlineSetter({ currentExecutionTarget: e, deadline: Date.now() + 1e4 }), Me.withScope((r) => {
3164
3164
  const n = r.manage(this.vm.getProp(this.callbackRegistry, e));
3165
3165
  if (this.vm.typeof(n) !== "function")
3166
3166
  throw new Error(`No such callback: ${e}`);
@@ -3209,7 +3209,7 @@ class qe {
3209
3209
  r = this.vm.null;
3210
3210
  break;
3211
3211
  }
3212
- if (Ka(e)) {
3212
+ if (Ha(e)) {
3213
3213
  r = this.vm.newArrayBuffer(e), n = !0;
3214
3214
  break;
3215
3215
  }
@@ -3246,17 +3246,17 @@ class qe {
3246
3246
  return JSON.parse(t);
3247
3247
  }
3248
3248
  injectCtx() {
3249
- Je.withScope((e) => {
3249
+ Me.withScope((e) => {
3250
3250
  const t = e.manage(this.vm.newObject());
3251
3251
  this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
3252
3252
  t,
3253
3253
  "featureFlags",
3254
- this.exportObjectUniversal(uo.GlobalCfgRenderCtxFeatureFlags, e)
3254
+ this.exportObjectUniversal(po.GlobalCfgRenderCtxFeatureFlags, e)
3255
3255
  ), this.computableHelper !== void 0 && this.computableHelper.injectCtx(t), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
3256
3256
  });
3257
3257
  }
3258
3258
  }
3259
- class Ha {
3259
+ class Wa {
3260
3260
  constructor() {
3261
3261
  b(this, "errorIdToError", /* @__PURE__ */ new Map());
3262
3262
  }
@@ -3273,7 +3273,7 @@ class Ha {
3273
3273
  }
3274
3274
  /** Returns the original error that was stored by parsing uuid of mimicrated error. */
3275
3275
  getOriginal(e) {
3276
- if (!(e instanceof Ko.QuickJSUnwrapError))
3276
+ if (!(e instanceof Ho.QuickJSUnwrapError))
3277
3277
  return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", Xe(e)), e;
3278
3278
  if (!("name" in e.cause))
3279
3279
  return console.warn("ErrorRepo: quickJSError.cause is not an Error", Xe(e)), e;
@@ -3283,46 +3283,61 @@ class Ha {
3283
3283
  const n = this.errorIdToError.get(r);
3284
3284
  if (n === void 0)
3285
3285
  throw new Error(`ErrorRepo: errorId not found: ${r}, ${Xe(e)}`);
3286
- return new Wo(e, n);
3286
+ return new zo(e, n);
3287
3287
  }
3288
3288
  }
3289
- function Wa(s, e, t, r, n, o = {}) {
3289
+ function gs(s, e, t, r, n) {
3290
+ ee().logOutputStatus && (ee().logOutputStatus === "any" || !t) && console.log(t ? `Stable output ${s} calculated ${e !== void 0 ? "defined" : "undefined"}; (#${r})` : `Unstable output ${s}; marker = ${n}; ${e !== void 0 ? "defined" : "undefined"} (#${r})`);
3291
+ }
3292
+ function za(s, e, t, r, n, o = {}) {
3290
3293
  const { code: i, featureFlags: a } = r, c = `${e.blockId}#lambda#${n}#${t.handle}`;
3291
3294
  return o = { ...o, key: c }, o.mode === void 0 && t.retentive === !0 && (o.mode = "StableOnlyRetentive"), K.makeRaw((l) => {
3292
3295
  ee().logOutputRecalculations && console.log(`Block lambda recalculation : ${c} (${l.changeSourceMarker}; ${l.bodyInvocations} invocations)`);
3293
- const u = new Je();
3294
- l.addOnDestroy(() => u.dispose());
3295
- const d = u.manage(s.quickJs.newRuntime());
3296
- d.setMemoryLimit(1024 * 1024 * 8), d.setMaxStackSize(1024 * 320);
3297
- let p;
3298
- d.setInterruptHandler(() => p === void 0 ? !1 : Date.now() > p.deadline);
3299
- const f = u.manage(d.newContext()), v = new qe(
3300
- u,
3301
- f,
3302
- (E) => {
3303
- p = E;
3304
- },
3305
- a,
3306
- { computableCtx: l, blockCtx: e, mlEnv: s }
3307
- );
3308
- v.evaluateBundle(i.content);
3309
- const h = v.runCallback(t.handle);
3310
- v.resetComputableCtx();
3311
- let S = 0;
3312
- return ee().logOutputStatus === "any" && console.log(`Output ${t.handle} scaffold calculated.`), {
3313
- ir: v.computableHelper.computablesToResolve,
3314
- postprocessValue: (E, { unstableMarker: j, stable: F }) => {
3315
- for (const [V, P] of Object.entries(E)) v.runCallback(V, P);
3316
- const B = v.importObjectUniversal(h);
3317
- return S++, ee().logOutputStatus && (ee().logOutputStatus === "any" || !F) && console.log(
3318
- F ? `Stable output ${t.handle} calculated ${B !== void 0 ? "defined" : "undefined"}; (#${S})` : `Unstable output ${t.handle}; marker = ${j}; ${B !== void 0 ? "defined" : "undefined"} (#${S})`
3319
- ), B;
3296
+ const u = new Me();
3297
+ let d = !1;
3298
+ l.addOnDestroy(() => {
3299
+ d && u.dispose();
3300
+ });
3301
+ try {
3302
+ const p = u.manage(s.quickJs.newRuntime());
3303
+ p.setMemoryLimit(1024 * 1024 * 8), p.setMaxStackSize(1024 * 320);
3304
+ let f;
3305
+ p.setInterruptHandler(() => f === void 0 ? !1 : Date.now() > f.deadline);
3306
+ const v = u.manage(p.newContext()), h = new qe(
3307
+ u,
3308
+ v,
3309
+ (I) => {
3310
+ f = I;
3311
+ },
3312
+ a,
3313
+ { computableCtx: l, blockCtx: e, mlEnv: s }
3314
+ );
3315
+ h.evaluateBundle(i.content);
3316
+ const S = h.runCallback(t.handle);
3317
+ h.resetComputableCtx();
3318
+ const E = h.computableHelper.computablesToResolve;
3319
+ if (Object.keys(E).length === 0) {
3320
+ const I = h.importObjectUniversal(S);
3321
+ return gs(t.handle, I, l.unstableMarker === void 0, -1, l.unstableMarker), { ir: I };
3320
3322
  }
3321
- };
3323
+ let B = 0;
3324
+ return ee().logOutputStatus && console.log(`Output ${t.handle} scaffold calculated (not all computables resolved yet).`), d = !0, {
3325
+ ir: E,
3326
+ postprocessValue: (I, { unstableMarker: j, stable: V }) => {
3327
+ for (const [$, C] of Object.entries(I)) h.runCallback($, C);
3328
+ const P = h.importObjectUniversal(S);
3329
+ return B++, gs(t.handle, P, V, B, j), P;
3330
+ }
3331
+ };
3332
+ } catch (p) {
3333
+ throw d = !1, p;
3334
+ } finally {
3335
+ d || u.dispose();
3336
+ }
3322
3337
  }, o);
3323
3338
  }
3324
- function za(s, e, t, ...r) {
3325
- const { code: n, featureFlags: o } = t, i = new Je();
3339
+ function Xa(s, e, t, ...r) {
3340
+ const { code: n, featureFlags: o } = t, i = new Me();
3326
3341
  try {
3327
3342
  const a = i.manage(s.newRuntime());
3328
3343
  a.setMemoryLimit(1024 * 1024 * 8), a.setMaxStackSize(1024 * 320);
@@ -3341,14 +3356,14 @@ function za(s, e, t, ...r) {
3341
3356
  i.dispose();
3342
3357
  }
3343
3358
  }
3344
- function Xa(s) {
3345
- return hn(s) ? s.isActive === !0 : fa(s);
3359
+ function Ya(s) {
3360
+ return gn(s) ? s.isActive === !0 : ha(s);
3346
3361
  }
3347
3362
  function je(s, e, t, r, n, o = {}) {
3348
- if (hn(t)) {
3363
+ if (gn(t)) {
3349
3364
  if (r === void 0) throw new Error("No code bundle.");
3350
- return Wa(s, e, t, r, n, o);
3351
- } else return _a(s.driverKit, e, t, o);
3365
+ return za(s, e, t, r, n, o);
3366
+ } else return qa(s.driverKit, e, t, o);
3352
3367
  }
3353
3368
  function Ke(s, e) {
3354
3369
  return Be(
@@ -3358,7 +3373,7 @@ function Ke(s, e) {
3358
3373
  assertFieldType: "Dynamic",
3359
3374
  errorIfFieldNotSet: !0
3360
3375
  },
3361
- { field: L.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
3376
+ { field: D.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
3362
3377
  ),
3363
3378
  (t) => {
3364
3379
  const r = t.getDataAsJson(), n = ke(r.config);
@@ -3366,25 +3381,25 @@ function Ke(s, e) {
3366
3381
  }
3367
3382
  );
3368
3383
  }
3369
- function Ya(s, e) {
3384
+ function Qa(s, e) {
3370
3385
  if (s === e) return !0;
3371
3386
  if (s === void 0 || e === void 0) return !1;
3372
3387
  const t = Qr.omitBy((r, n) => n.startsWith("__"));
3373
3388
  return Qr.isDeepEqual(t(s), t(e));
3374
3389
  }
3375
- function Qa(s, e, t) {
3390
+ function Za(s, e, t) {
3376
3391
  return K.make(
3377
3392
  (r) => {
3378
- var v, h, S, E, j, F, B, V;
3379
- const n = r.accessor(s).node(), o = D(n.getKeyValueAsJson(Fr)), i = D(n.getKeyValueAsJson(Ge)), a = D(n.getKeyValueAsJson(_e)), c = D(n.getKeyValueAsJson(de)), l = D(
3393
+ var v, h, S, E, B, I, j, V;
3394
+ const n = r.accessor(s).node(), o = N(n.getKeyValueAsJson(Fr)), i = N(n.getKeyValueAsJson(Ge)), a = N(n.getKeyValueAsJson(_e)), c = N(n.getKeyValueAsJson(de)), l = N(
3380
3395
  n.getKeyValueAsJson(ct)
3381
3396
  ), u = /* @__PURE__ */ new Map();
3382
3397
  for (const { id: P } of re(c)) {
3383
- const N = n.traverse({
3398
+ const $ = n.traverse({
3384
3399
  field: q(P, "currentArgs"),
3385
3400
  assertFieldType: "Dynamic",
3386
3401
  errorIfFieldNotSet: !0
3387
- }), C = N.getDataAsJson();
3402
+ }), C = $.getDataAsJson();
3388
3403
  let G;
3389
3404
  const ce = n.traverse({
3390
3405
  field: q(P, "prodArgs"),
@@ -3392,7 +3407,7 @@ function Qa(s, e, t) {
3392
3407
  stableIfNotFound: !0
3393
3408
  });
3394
3409
  if (ce !== void 0) {
3395
- const z = ce.getDataAsJson(), J = n.getField({
3410
+ const z = ce.getDataAsJson(), M = n.getField({
3396
3411
  field: q(P, "prodOutput"),
3397
3412
  assertFieldType: "Dynamic",
3398
3413
  errorIfFieldNotFound: !0
@@ -3403,27 +3418,27 @@ function Qa(s, e, t) {
3403
3418
  });
3404
3419
  G = {
3405
3420
  arguments: z,
3406
- stale: !Ya(C, z),
3407
- outputError: J.error !== void 0 || W.error !== void 0 || ((v = J.value) == null ? void 0 : v.getError()) !== void 0 || ((h = W.value) == null ? void 0 : h.getError()) !== void 0,
3408
- outputsError: ((S = J.error) == null ? void 0 : S.getDataAsString()) ?? ((j = (E = J.value) == null ? void 0 : E.getError()) == null ? void 0 : j.getDataAsString()),
3409
- exportsError: ((F = W.error) == null ? void 0 : F.getDataAsString()) ?? ((V = (B = W.value) == null ? void 0 : B.getError()) == null ? void 0 : V.getDataAsString()),
3410
- finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (W.value !== void 0 && W.value.getIsReadyOrError() || W.error !== void 0 && W.error.getIsReadyOrError())
3421
+ stale: !Qa(C, z),
3422
+ outputError: M.error !== void 0 || W.error !== void 0 || ((v = M.value) == null ? void 0 : v.getError()) !== void 0 || ((h = W.value) == null ? void 0 : h.getError()) !== void 0,
3423
+ outputsError: ((S = M.error) == null ? void 0 : S.getDataAsString()) ?? ((B = (E = M.value) == null ? void 0 : E.getError()) == null ? void 0 : B.getDataAsString()),
3424
+ exportsError: ((I = W.error) == null ? void 0 : I.getDataAsString()) ?? ((V = (j = W.value) == null ? void 0 : j.getError()) == null ? void 0 : V.getDataAsString()),
3425
+ finished: (M.value !== void 0 && M.value.getIsReadyOrError() || M.error !== void 0 && M.error.getIsReadyOrError()) && (W.value !== void 0 && W.value.getIsReadyOrError() || W.error !== void 0 && W.error.getIsReadyOrError())
3411
3426
  };
3412
3427
  }
3413
- u.set(P, { currentArguments: C, prod: G, argsRid: N.resourceInfo.id });
3428
+ u.set(P, { currentArguments: C, prod: G, argsRid: $.resourceInfo.id });
3414
3429
  }
3415
3430
  const d = st(c, (P) => {
3416
- const N = Ke(n, P), C = u.get(P), G = C.currentArguments;
3431
+ const $ = Ke(n, P), C = u.get(P), G = C.currentArguments;
3417
3432
  return {
3418
3433
  args: G,
3419
- enrichmentTargets: t.projectHelper.getEnrichmentTargets(() => N.cfg, () => G, { argsRid: C.argsRid, blockPackRid: N.bpResourceId })
3434
+ enrichmentTargets: t.projectHelper.getEnrichmentTargets(() => $.cfg, () => G, { argsRid: C.argsRid, blockPackRid: $.bpResourceId })
3420
3435
  };
3421
- }), p = new Set(l.blocksInLimbo), f = [...re(c)].map(({ id: P, label: N, renderingMode: C }) => {
3422
- var $, I, x, H, U;
3423
- const G = D(u.get(P)), ce = D(d.nodes.get(P));
3436
+ }), p = new Set(l.blocksInLimbo), f = [...re(c)].map(({ id: P, label: $, renderingMode: C }) => {
3437
+ var A, F, x, H, U;
3438
+ const G = N(u.get(P)), ce = N(d.nodes.get(P));
3424
3439
  let z = "NotCalculated";
3425
3440
  G.prod !== void 0 && (p.has(P) ? z = "Limbo" : z = G.prod.finished ? "Done" : "Running");
3426
- const J = Ke(n, P), { sections: W, title: g, inputsValid: m, sdkVersion: w, featureFlags: y, isIncompatibleWithRuntime: R } = Be(J, ({ bpId: ne, cfg: we }) => {
3441
+ const M = Ke(n, P), { sections: W, title: g, inputsValid: m, sdkVersion: w, featureFlags: y, isIncompatibleWithRuntime: R } = Be(M, ({ bpId: ne, cfg: we }) => {
3427
3442
  if (!t.runtimeCapabilities.checkCompatibility(we.featureFlags))
3428
3443
  return {
3429
3444
  isIncompatibleWithRuntime: !0,
@@ -3449,7 +3464,7 @@ function Qa(s, e, t) {
3449
3464
  ue,
3450
3465
  ne
3451
3466
  ).wrap({
3452
- recover: (oo) => (t.logger.error("Error in block model title"), t.logger.error(oo), "Invalid title")
3467
+ recover: (io) => (t.logger.error("Error in block model title"), t.logger.error(io), "Invalid title")
3453
3468
  })
3454
3469
  ),
3455
3470
  inputsValid: je(
@@ -3470,28 +3485,28 @@ function Qa(s, e, t) {
3470
3485
  assertFieldType: "Dynamic",
3471
3486
  errorIfFieldNotSet: !0
3472
3487
  }).getDataAsJson(), O = Be(
3473
- J,
3488
+ M,
3474
3489
  ({ info: ne }) => t.blockUpdateWatcher.get({ currentSpec: ne.source, settings: k })
3475
3490
  );
3476
3491
  return {
3477
3492
  projectResourceId: Ce(s.rid),
3478
3493
  id: P,
3479
- label: g ?? N,
3480
- title: g ?? N,
3494
+ label: g ?? $,
3495
+ title: g ?? $,
3481
3496
  renderingMode: C,
3482
- stale: (($ = G.prod) == null ? void 0 : $.stale) !== !1 || z === "Limbo",
3497
+ stale: ((A = G.prod) == null ? void 0 : A.stale) !== !1 || z === "Limbo",
3483
3498
  missingReference: ce.missingReferences,
3484
3499
  upstreams: [...d.traverseIdsExcludingRoots("upstream", P)],
3485
3500
  downstreams: [...d.traverseIdsExcludingRoots("downstream", P)],
3486
3501
  calculationStatus: z,
3487
- outputErrors: ((I = G.prod) == null ? void 0 : I.outputError) === !0,
3502
+ outputErrors: ((F = G.prod) == null ? void 0 : F.outputError) === !0,
3488
3503
  outputsError: (x = G.prod) == null ? void 0 : x.outputsError,
3489
3504
  exportsError: (H = G.prod) == null ? void 0 : H.exportsError,
3490
3505
  settings: k,
3491
3506
  sections: W,
3492
3507
  inputsValid: m,
3493
3508
  updateInfo: {},
3494
- currentBlockPack: (U = J == null ? void 0 : J.info) == null ? void 0 : U.source,
3509
+ currentBlockPack: (U = M == null ? void 0 : M.info) == null ? void 0 : U.source,
3495
3510
  updates: O,
3496
3511
  sdkVersion: w,
3497
3512
  featureFlags: y,
@@ -3529,13 +3544,13 @@ function Qa(s, e, t) {
3529
3544
  }
3530
3545
  ).withStableType();
3531
3546
  }
3532
- function Za(s, e) {
3547
+ function ec(s, e) {
3533
3548
  const t = s.node();
3534
- if (pe(t.resourceType, jn)) {
3549
+ if (pe(t.resourceType, xn)) {
3535
3550
  const r = t.getDataAsJson();
3536
3551
  if (r === void 0) throw new Error("No resource data.");
3537
3552
  return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
3538
- } else if (pe(t.resourceType, xn)) {
3553
+ } else if (pe(t.resourceType, Vn)) {
3539
3554
  const r = t.getDataAsJson();
3540
3555
  if (r === void 0) throw new Error("No resource data.");
3541
3556
  return e.signer.verify(
@@ -3546,10 +3561,10 @@ function Za(s, e) {
3546
3561
  } else
3547
3562
  throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
3548
3563
  }
3549
- function ec(s, e) {
3564
+ function tc(s, e) {
3550
3565
  if (s !== void 0)
3551
3566
  return K.make(
3552
- (t) => Za(t.accessor(s), e),
3567
+ (t) => ec(t.accessor(s), e),
3553
3568
  {
3554
3569
  postprocessValue: (t) => {
3555
3570
  if (t !== void 0) {
@@ -3561,7 +3576,7 @@ function ec(s, e) {
3561
3576
  }
3562
3577
  ).withStableType();
3563
3578
  }
3564
- function tc(s, e, t) {
3579
+ function rc(s, e, t) {
3565
3580
  return K.make(
3566
3581
  (r) => {
3567
3582
  var a;
@@ -3570,20 +3585,20 @@ function tc(s, e, t) {
3570
3585
  field: q(e, "blockPack"),
3571
3586
  assertFieldType: "Dynamic"
3572
3587
  },
3573
- { field: L.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
3574
- { field: Un, assertFieldType: "Input" }
3588
+ { field: D.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
3589
+ { field: Mn, assertFieldType: "Input" }
3575
3590
  )) == null ? void 0 : a.persist();
3576
3591
  return {
3577
- path: ec(i, t),
3592
+ path: tc(i, t),
3578
3593
  sdkVersion: o == null ? void 0 : o.cfg.sdkVersion
3579
3594
  };
3580
3595
  },
3581
3596
  { mode: "StableOnlyLive" }
3582
3597
  );
3583
3598
  }
3584
- function Xn(s, e, t) {
3599
+ function Yn(s, e, t) {
3585
3600
  if (t === void 0)
3586
- return K.make((i) => Xn(s, e, i), {
3601
+ return K.make((i) => Yn(s, e, i), {
3587
3602
  key: `inputs#${Ce(s.rid)}#${e}`
3588
3603
  });
3589
3604
  const r = t.accessor(s).node(), n = Ar(s, e), o = n.uiState(t);
@@ -3595,12 +3610,12 @@ function Xn(s, e, t) {
3595
3610
  ui: o !== void 0 ? Wr(JSON.parse(o)) : void 0
3596
3611
  };
3597
3612
  }
3598
- function rc(s, e, t) {
3613
+ function sc(s, e, t) {
3599
3614
  const r = "outputs#" + Ce(s.rid) + "#" + e;
3600
3615
  return K.make(
3601
3616
  (n) => {
3602
3617
  ee().logOutputRecalculations && console.log(`blockOutput recalculation : ${r} (${n.changeSourceMarker}; ${n.bodyInvocations} invocations)`);
3603
- const o = n.accessor(s).node(), i = _n(s, e);
3618
+ const o = n.accessor(s).node(), i = qn(s, e);
3604
3619
  return Be(Ke(o, e), ({ cfg: a, bpId: c }) => {
3605
3620
  const l = {};
3606
3621
  for (const [u, d] of Object.entries(a.outputs)) {
@@ -3613,15 +3628,15 @@ function rc(s, e, t) {
3613
3628
  { key: r }
3614
3629
  ).withStableType();
3615
3630
  }
3616
- function sc(s, e) {
3631
+ function nc(s, e) {
3617
3632
  return K.make((t) => {
3618
- const r = t.accessor(s).node(), n = D(r.getKeyValueAsJson(de)), o = [];
3633
+ const r = t.accessor(s).node(), n = N(r.getKeyValueAsJson(de)), o = [];
3619
3634
  for (const { id: i } of re(n)) {
3620
3635
  const a = Ke(r, i);
3621
3636
  if (a === void 0) continue;
3622
- const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => Xa(u)).map((u) => u);
3637
+ const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => Ya(u)).map((u) => u);
3623
3638
  if (c.length === 0) continue;
3624
- const l = _n(r.persist(), i);
3639
+ const l = qn(r.persist(), i);
3625
3640
  for (const u of c)
3626
3641
  o.push(
3627
3642
  K.wrapError(je(e, l, u, ut(a.cfg), a.bpId))
@@ -3630,7 +3645,7 @@ function sc(s, e) {
3630
3645
  return o;
3631
3646
  });
3632
3647
  }
3633
- class nc {
3648
+ class oc {
3634
3649
  constructor() {
3635
3650
  b(this, "states", /* @__PURE__ */ new Map());
3636
3651
  }
@@ -3644,7 +3659,7 @@ class nc {
3644
3659
  }
3645
3660
  readState(e, t) {
3646
3661
  let r = this.states.get(t);
3647
- return r === void 0 && (r = { state: { ...po }, change: new Yr() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3662
+ return r === void 0 && (r = { state: { ...fo }, change: new Yr() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3648
3663
  }
3649
3664
  getState(e) {
3650
3665
  return K.make(
@@ -3657,38 +3672,38 @@ class nc {
3657
3672
  t !== void 0 && (this.states.delete(e), t.change.markChanged("block deleted"));
3658
3673
  }
3659
3674
  }
3660
- function oc(s) {
3675
+ function ic(s) {
3661
3676
  return K.make((e) => {
3662
- const t = e.accessor(s).node(), r = D(t.getKeyValueAsJson(de));
3677
+ const t = e.accessor(s).node(), r = N(t.getKeyValueAsJson(de));
3663
3678
  return {
3664
3679
  listOfBlocks: [...re(r)].map((n) => n.id)
3665
3680
  };
3666
3681
  });
3667
3682
  }
3668
- const ic = "1", ac = "BlockFrontendState/";
3669
- async function cc(s, e) {
3683
+ const ac = "1", cc = "BlockFrontendState/";
3684
+ async function lc(s, e) {
3670
3685
  await s.withWriteTx("ProjectMigration", async (t) => {
3671
3686
  const r = await t.getKValueJson(e, at);
3672
- if (r !== Me) {
3673
- if (r === ic)
3674
- await lc(t, e);
3687
+ if (r !== Je) {
3688
+ if (r === ac)
3689
+ await uc(t, e);
3675
3690
  else
3676
3691
  throw new Error(`Unknown project schema version: ${r}`);
3677
- t.setKValue(e, at, JSON.stringify(Me)), await t.commit();
3692
+ t.setKValue(e, at, JSON.stringify(Je)), await t.commit();
3678
3693
  }
3679
3694
  });
3680
3695
  }
3681
- async function lc(s, e) {
3696
+ async function uc(s, e) {
3682
3697
  const [t, r] = await Promise.all([
3683
3698
  s.getKValueJson(e, de),
3684
3699
  s.listKeyValues(e)
3685
3700
  ]), n = new Map(r.map((o) => [o.key, o.value]));
3686
3701
  for (const o of re(t)) {
3687
- const i = ac + o.id, a = n.get(i), c = a ? Ve(a) : {}, l = s.createJsonGzValue(c), u = M(e, q(o.id, "uiState"));
3702
+ const i = cc + o.id, a = n.get(i), c = a ? Ve(a) : {}, l = s.createJsonGzValue(c), u = J(e, q(o.id, "uiState"));
3688
3703
  s.createField(u, "Dynamic", l), s.deleteKValue(e, i);
3689
3704
  }
3690
3705
  }
3691
- function gs(s) {
3706
+ function ms(s) {
3692
3707
  return JSON.stringify(s, (e, t) => typeof t == "bigint" ? Ce(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);
3693
3708
  }
3694
3709
  class Lr {
@@ -3698,7 +3713,7 @@ class Lr {
3698
3713
  /** Data for the left panel, contain basic information about block status. */
3699
3714
  b(this, "overview");
3700
3715
  b(this, "overviewLight");
3701
- b(this, "navigationStates", new nc());
3716
+ b(this, "navigationStates", new oc());
3702
3717
  // null is set for deleted blocks
3703
3718
  b(this, "blockComputables", /* @__PURE__ */ new Map());
3704
3719
  b(this, "blockFrontends", /* @__PURE__ */ new Map());
@@ -3706,18 +3721,18 @@ class Lr {
3706
3721
  b(this, "refreshLoopResult");
3707
3722
  b(this, "abortController", new AbortController());
3708
3723
  b(this, "destroyed", !1);
3709
- this.env = e, this.projectTree = r, this.overview = Qa(
3724
+ this.env = e, this.projectTree = r, this.overview = Za(
3710
3725
  r.entry(),
3711
3726
  this.navigationStates,
3712
3727
  e
3713
- ).withPreCalculatedValueTree(), this.overviewLight = oc(r.entry()).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = sc(r.entry(), e);
3728
+ ).withPreCalculatedValueTree(), this.overviewLight = ic(r.entry()).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = nc(r.entry(), e);
3714
3729
  }
3715
3730
  async refreshLoop() {
3716
3731
  for (; !this.destroyed; )
3717
3732
  try {
3718
3733
  await tt(this.env.projectHelper, this.env.pl, this.rid, (r) => {
3719
3734
  r.doRefresh(this.env.ops.stagingRenderingRate);
3720
- }), await this.activeConfigs.getValue(), await bn(this.env.ops.projectRefreshInterval, this.abortController.signal);
3735
+ }), await this.activeConfigs.getValue(), await kn(this.env.ops.projectRefreshInterval, this.abortController.signal);
3721
3736
  const e = await this.overviewLight.getValue(), t = new Set(e.listOfBlocks);
3722
3737
  for (const r of this.blockComputables.keys())
3723
3738
  if (!t.has(r)) {
@@ -3725,12 +3740,12 @@ class Lr {
3725
3740
  n != null && n.fullState.resetState(), this.blockComputables.set(r, null);
3726
3741
  }
3727
3742
  } catch (e) {
3728
- if ($o(e)) {
3743
+ if (Ao(e)) {
3729
3744
  console.warn(
3730
3745
  "project refresh routine terminated, because project was externally deleted"
3731
3746
  );
3732
3747
  break;
3733
- } else if (!Ao(e))
3748
+ } else if (!Lo(e))
3734
3749
  throw new Error("Unexpected exception", { cause: e });
3735
3750
  }
3736
3751
  }
@@ -3901,10 +3916,10 @@ class Lr {
3901
3916
  async resetBlockArgsAndUiState(e, t) {
3902
3917
  await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
3903
3918
  const n = it(
3904
- (await r.getField(M(this.rid, q(e, "blockPack")))).value
3919
+ (await r.getField(J(this.rid, q(e, "blockPack")))).value
3905
3920
  ), o = it(
3906
- (await r.getField(M(n, L.HolderRefField))).value
3907
- ), i = await r.getResourceData(o, !1), a = ke(Ve(D(i.data)).config);
3921
+ (await r.getField(J(n, D.HolderRefField))).value
3922
+ ), i = await r.getResourceData(o, !1), a = ke(Ve(N(i.data)).config);
3908
3923
  await oe(this.env.projectHelper, r, this.rid, t, (c) => {
3909
3924
  c.setStates([{ blockId: e, args: a.initialArgs, uiState: a.initialUiState }]);
3910
3925
  }), await r.commit();
@@ -3914,10 +3929,10 @@ class Lr {
3914
3929
  const t = this.blockComputables.get(e);
3915
3930
  if (t === null) throw new Error(`Block ${e} is deleted`);
3916
3931
  if (t === void 0) {
3917
- const r = rc(this.projectTree.entry(), e, this.env), o = {
3932
+ const r = sc(this.projectTree.entry(), e, this.env), o = {
3918
3933
  fullState: K.make(
3919
3934
  (i) => ({
3920
- argsAndUiState: Xn(this.projectTree.entry(), e, i),
3935
+ argsAndUiState: Yn(this.projectTree.entry(), e, i),
3921
3936
  outputs: r,
3922
3937
  navigationState: this.navigationStates.getState(e),
3923
3938
  overview: this.overview
@@ -3925,7 +3940,7 @@ class Lr {
3925
3940
  {
3926
3941
  postprocessValue: (i) => {
3927
3942
  var u, d, p;
3928
- const a = (p = (d = (u = i.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = a && dc(a) && i.outputs !== void 0 ? fc(i.outputs) : i.outputs;
3943
+ const a = (p = (d = (u = i.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = a && pc(a) && i.outputs !== void 0 ? hc(i.outputs) : i.outputs;
3929
3944
  return {
3930
3945
  ...i.argsAndUiState,
3931
3946
  outputs: l,
@@ -3953,7 +3968,7 @@ class Lr {
3953
3968
  getBlockFrontend(e) {
3954
3969
  const t = this.blockFrontends.get(e);
3955
3970
  if (t === void 0) {
3956
- const r = tc(
3971
+ const r = rc(
3957
3972
  this.projectTree.entry(),
3958
3973
  e,
3959
3974
  this.env
@@ -3973,14 +3988,14 @@ class Lr {
3973
3988
  await this.destroy();
3974
3989
  }
3975
3990
  static async init(e, t) {
3976
- await cc(e.pl, t), await tt(e.projectHelper, e.pl, t, (n) => {
3991
+ await lc(e.pl, t), await tt(e.projectHelper, e.pl, t, (n) => {
3977
3992
  });
3978
- const r = await wn.init(
3993
+ const r = await Sn.init(
3979
3994
  e.pl,
3980
3995
  t,
3981
3996
  {
3982
3997
  ...e.ops.defaultTreeOptions,
3983
- pruning: uc
3998
+ pruning: dc
3984
3999
  },
3985
4000
  e.logger
3986
4001
  );
@@ -3990,13 +4005,13 @@ class Lr {
3990
4005
  var c, l;
3991
4006
  return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((l = i.data) == null ? void 0 : l.byteLength) ?? 0);
3992
4007
  });
3993
- const o = xo(n);
3994
- await ot.writeFile(`${Ce(t)}.json`, gs(n)), await ot.writeFile(`${Ce(t)}.stats.json`, gs(o));
4008
+ const o = Vo(n);
4009
+ await ot.writeFile(`${Ce(t)}.json`, ms(n)), await ot.writeFile(`${Ce(t)}.stats.json`, ms(o));
3995
4010
  }
3996
4011
  return new Lr(e, t, r);
3997
4012
  }
3998
4013
  }
3999
- function uc(s) {
4014
+ function dc(s) {
4000
4015
  if (s.type.name.startsWith("StreamWorkdir/"))
4001
4016
  return [];
4002
4017
  switch (s.type.name) {
@@ -4010,14 +4025,14 @@ function uc(s) {
4010
4025
  return s.fields;
4011
4026
  }
4012
4027
  }
4013
- function dc(s) {
4014
- return !pc(s, "1.26.0");
4028
+ function pc(s) {
4029
+ return !fc(s, "1.26.0");
4015
4030
  }
4016
- function pc(s, e) {
4031
+ function fc(s, e) {
4017
4032
  const t = s.split(".").map(Number), r = e.split(".").map(Number);
4018
4033
  return t[0] > r[0] || t[0] === r[0] && t[1] > r[1] || t[0] === r[0] && t[1] === r[1] && t[2] > r[2];
4019
4034
  }
4020
- function fc(s) {
4035
+ function hc(s) {
4021
4036
  const e = {};
4022
4037
  for (const [t, r] of Object.entries(s)) {
4023
4038
  if (r.ok) {
@@ -4032,8 +4047,8 @@ function fc(s) {
4032
4047
  }
4033
4048
  return e;
4034
4049
  }
4035
- const Yn = {
4036
- logger: new gn(),
4050
+ const Qn = {
4051
+ logger: new mn(),
4037
4052
  blobDriverOps: {
4038
4053
  cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
4039
4054
  // 8 GB
@@ -4058,7 +4073,7 @@ const Yn = {
4058
4073
  stopPollingDelay: 1e3
4059
4074
  }
4060
4075
  };
4061
- function Qn(s) {
4076
+ function Zn(s) {
4062
4077
  return {
4063
4078
  blobDownloadPath: _.join(s, "download"),
4064
4079
  blobDownloadRangesCachePath: _.join(s, "downloadRangesCache"),
@@ -4066,8 +4081,8 @@ function Qn(s) {
4066
4081
  pframesSpillPath: _.join(s, "pframes")
4067
4082
  };
4068
4083
  }
4069
- const hc = {
4070
- ...Yn,
4084
+ const gc = {
4085
+ ...Qn,
4071
4086
  defaultTreeOptions: {
4072
4087
  pollingInterval: 350,
4073
4088
  stopPollingDelay: 2500,
@@ -4081,19 +4096,19 @@ const hc = {
4081
4096
  projectRefreshInterval: 700,
4082
4097
  stagingRenderingRate: 5
4083
4098
  };
4084
- function gc(s) {
4099
+ function mc(s) {
4085
4100
  return {
4086
- ...Qn(s),
4101
+ ...Zn(s),
4087
4102
  frontendDownloadPath: _.join(s, "frontend")
4088
4103
  };
4089
4104
  }
4090
- function mc(s) {
4105
+ function vc(s) {
4091
4106
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
4092
4107
  }
4093
- var rt = { exports: {} }, Rt, ms;
4108
+ var rt = { exports: {} }, Rt, vs;
4094
4109
  function ft() {
4095
- if (ms) return Rt;
4096
- ms = 1;
4110
+ if (vs) return Rt;
4111
+ vs = 1;
4097
4112
  const s = "2.0.0", e = 256, t = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
4098
4113
  9007199254740991, r = 16, n = e - 6;
4099
4114
  return Rt = {
@@ -4115,14 +4130,14 @@ function ft() {
4115
4130
  FLAG_LOOSE: 2
4116
4131
  }, Rt;
4117
4132
  }
4118
- var Ct, vs;
4133
+ var Ct, ys;
4119
4134
  function ht() {
4120
- return vs || (vs = 1, Ct = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
4135
+ return ys || (ys = 1, Ct = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
4121
4136
  }), Ct;
4122
4137
  }
4123
- var ys;
4138
+ var ws;
4124
4139
  function We() {
4125
- return ys || (ys = 1, function(s, e) {
4140
+ return ws || (ws = 1, function(s, e) {
4126
4141
  const {
4127
4142
  MAX_SAFE_COMPONENT_LENGTH: t,
4128
4143
  MAX_SAFE_BUILD_LENGTH: r,
@@ -4136,27 +4151,27 @@ function We() {
4136
4151
  ["\\d", n],
4137
4152
  [p, r]
4138
4153
  ], v = (S) => {
4139
- for (const [E, j] of f)
4140
- S = S.split(`${E}*`).join(`${E}{0,${j}}`).split(`${E}+`).join(`${E}{1,${j}}`);
4154
+ for (const [E, B] of f)
4155
+ S = S.split(`${E}*`).join(`${E}{0,${B}}`).split(`${E}+`).join(`${E}{1,${B}}`);
4141
4156
  return S;
4142
- }, h = (S, E, j) => {
4143
- const F = v(E), B = d++;
4144
- o(S, B, E), u[S] = B, c[B] = E, l[B] = F, i[B] = new RegExp(E, j ? "g" : void 0), a[B] = new RegExp(F, j ? "g" : void 0);
4157
+ }, h = (S, E, B) => {
4158
+ const I = v(E), j = d++;
4159
+ o(S, j, E), u[S] = j, c[j] = E, l[j] = I, i[j] = new RegExp(E, B ? "g" : void 0), a[j] = new RegExp(I, B ? "g" : void 0);
4145
4160
  };
4146
4161
  h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${p}*`), h("MAINVERSION", `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASE", `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${p}+`), h("BUILD", `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), h("FULL", `^${c[u.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), h("LOOSE", `^${c[u.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), h("XRANGE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), h("COERCE", `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", c[u.COERCE], !0), h("COERCERTLFULL", c[u.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
4147
4162
  }(rt, rt.exports)), rt.exports;
4148
4163
  }
4149
- var Et, ws;
4164
+ var Et, Ss;
4150
4165
  function Dr() {
4151
- if (ws) return Et;
4152
- ws = 1;
4166
+ if (Ss) return Et;
4167
+ Ss = 1;
4153
4168
  const s = Object.freeze({ loose: !0 }), e = Object.freeze({});
4154
4169
  return Et = (r) => r ? typeof r != "object" ? s : r : e, Et;
4155
4170
  }
4156
- var Pt, Ss;
4157
- function Zn() {
4158
- if (Ss) return Pt;
4159
- Ss = 1;
4171
+ var Pt, bs;
4172
+ function eo() {
4173
+ if (bs) return Pt;
4174
+ bs = 1;
4160
4175
  const s = /^[0-9]+$/, e = (r, n) => {
4161
4176
  const o = s.test(r), i = s.test(n);
4162
4177
  return o && i && (r = +r, n = +n), r === n ? 0 : o && !i ? -1 : i && !o ? 1 : r < n ? -1 : 1;
@@ -4166,11 +4181,11 @@ function Zn() {
4166
4181
  rcompareIdentifiers: (r, n) => e(n, r)
4167
4182
  }, Pt;
4168
4183
  }
4169
- var Ot, bs;
4184
+ var Ot, ks;
4170
4185
  function Q() {
4171
- if (bs) return Ot;
4172
- bs = 1;
4173
- const s = ht(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = ft(), { safeRe: r, t: n } = We(), o = Dr(), { compareIdentifiers: i } = Zn();
4186
+ if (ks) return Ot;
4187
+ ks = 1;
4188
+ const s = ht(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = ft(), { safeRe: r, t: n } = We(), o = Dr(), { compareIdentifiers: i } = eo();
4174
4189
  class a {
4175
4190
  constructor(l, u) {
4176
4191
  if (u = o(u), l instanceof a) {
@@ -4327,10 +4342,10 @@ function Q() {
4327
4342
  }
4328
4343
  return Ot = a, Ot;
4329
4344
  }
4330
- var It, ks;
4345
+ var It, Rs;
4331
4346
  function Oe() {
4332
- if (ks) return It;
4333
- ks = 1;
4347
+ if (Rs) return It;
4348
+ Rs = 1;
4334
4349
  const s = Q();
4335
4350
  return It = (t, r, n = !1) => {
4336
4351
  if (t instanceof s)
@@ -4344,30 +4359,30 @@ function Oe() {
4344
4359
  }
4345
4360
  }, It;
4346
4361
  }
4347
- var Ft, Rs;
4348
- function vc() {
4349
- if (Rs) return Ft;
4350
- Rs = 1;
4362
+ var Ft, Cs;
4363
+ function yc() {
4364
+ if (Cs) return Ft;
4365
+ Cs = 1;
4351
4366
  const s = Oe();
4352
4367
  return Ft = (t, r) => {
4353
4368
  const n = s(t, r);
4354
4369
  return n ? n.version : null;
4355
4370
  }, Ft;
4356
4371
  }
4357
- var Tt, Cs;
4358
- function yc() {
4359
- if (Cs) return Tt;
4360
- Cs = 1;
4372
+ var Tt, Es;
4373
+ function wc() {
4374
+ if (Es) return Tt;
4375
+ Es = 1;
4361
4376
  const s = Oe();
4362
4377
  return Tt = (t, r) => {
4363
4378
  const n = s(t.trim().replace(/^[=v]+/, ""), r);
4364
4379
  return n ? n.version : null;
4365
4380
  }, Tt;
4366
4381
  }
4367
- var $t, Es;
4368
- function wc() {
4369
- if (Es) return $t;
4370
- Es = 1;
4382
+ var $t, Ps;
4383
+ function Sc() {
4384
+ if (Ps) return $t;
4385
+ Ps = 1;
4371
4386
  const s = Q();
4372
4387
  return $t = (t, r, n, o, i) => {
4373
4388
  typeof n == "string" && (i = o, o = n, n = void 0);
@@ -4381,10 +4396,10 @@ function wc() {
4381
4396
  }
4382
4397
  }, $t;
4383
4398
  }
4384
- var At, Ps;
4385
- function Sc() {
4386
- if (Ps) return At;
4387
- Ps = 1;
4399
+ var At, Os;
4400
+ function bc() {
4401
+ if (Os) return At;
4402
+ Os = 1;
4388
4403
  const s = Oe();
4389
4404
  return At = (t, r) => {
4390
4405
  const n = s(t, null, !0), o = s(r, null, !0), i = n.compare(o);
@@ -4401,107 +4416,107 @@ function Sc() {
4401
4416
  return n.major !== o.major ? p + "major" : n.minor !== o.minor ? p + "minor" : n.patch !== o.patch ? p + "patch" : "prerelease";
4402
4417
  }, At;
4403
4418
  }
4404
- var Lt, Os;
4405
- function bc() {
4406
- if (Os) return Lt;
4407
- Os = 1;
4408
- const s = Q();
4409
- return Lt = (t, r) => new s(t, r).major, Lt;
4410
- }
4411
- var Dt, Is;
4419
+ var Lt, Is;
4412
4420
  function kc() {
4413
- if (Is) return Dt;
4421
+ if (Is) return Lt;
4414
4422
  Is = 1;
4415
4423
  const s = Q();
4416
- return Dt = (t, r) => new s(t, r).minor, Dt;
4424
+ return Lt = (t, r) => new s(t, r).major, Lt;
4417
4425
  }
4418
- var Nt, Fs;
4426
+ var Dt, Fs;
4419
4427
  function Rc() {
4420
- if (Fs) return Nt;
4428
+ if (Fs) return Dt;
4421
4429
  Fs = 1;
4422
4430
  const s = Q();
4423
- return Nt = (t, r) => new s(t, r).patch, Nt;
4431
+ return Dt = (t, r) => new s(t, r).minor, Dt;
4424
4432
  }
4425
- var Bt, Ts;
4433
+ var Nt, Ts;
4426
4434
  function Cc() {
4427
- if (Ts) return Bt;
4435
+ if (Ts) return Nt;
4428
4436
  Ts = 1;
4437
+ const s = Q();
4438
+ return Nt = (t, r) => new s(t, r).patch, Nt;
4439
+ }
4440
+ var Bt, $s;
4441
+ function Ec() {
4442
+ if ($s) return Bt;
4443
+ $s = 1;
4429
4444
  const s = Oe();
4430
4445
  return Bt = (t, r) => {
4431
4446
  const n = s(t, r);
4432
4447
  return n && n.prerelease.length ? n.prerelease : null;
4433
4448
  }, Bt;
4434
4449
  }
4435
- var jt, $s;
4450
+ var jt, As;
4436
4451
  function ie() {
4437
- if ($s) return jt;
4438
- $s = 1;
4452
+ if (As) return jt;
4453
+ As = 1;
4439
4454
  const s = Q();
4440
4455
  return jt = (t, r, n) => new s(t, n).compare(new s(r, n)), jt;
4441
4456
  }
4442
- var xt, As;
4443
- function Ec() {
4444
- if (As) return xt;
4445
- As = 1;
4457
+ var xt, Ls;
4458
+ function Pc() {
4459
+ if (Ls) return xt;
4460
+ Ls = 1;
4446
4461
  const s = ie();
4447
4462
  return xt = (t, r, n) => s(r, t, n), xt;
4448
4463
  }
4449
- var Vt, Ls;
4450
- function Pc() {
4451
- if (Ls) return Vt;
4452
- Ls = 1;
4464
+ var Vt, Ds;
4465
+ function Oc() {
4466
+ if (Ds) return Vt;
4467
+ Ds = 1;
4453
4468
  const s = ie();
4454
4469
  return Vt = (t, r) => s(t, r, !0), Vt;
4455
4470
  }
4456
- var Ut, Ds;
4471
+ var Ut, Ns;
4457
4472
  function Nr() {
4458
- if (Ds) return Ut;
4459
- Ds = 1;
4473
+ if (Ns) return Ut;
4474
+ Ns = 1;
4460
4475
  const s = Q();
4461
4476
  return Ut = (t, r, n) => {
4462
4477
  const o = new s(t, n), i = new s(r, n);
4463
4478
  return o.compare(i) || o.compareBuild(i);
4464
4479
  }, Ut;
4465
4480
  }
4466
- var Jt, Ns;
4467
- function Oc() {
4468
- if (Ns) return Jt;
4469
- Ns = 1;
4470
- const s = Nr();
4471
- return Jt = (t, r) => t.sort((n, o) => s(n, o, r)), Jt;
4472
- }
4473
4481
  var Mt, Bs;
4474
4482
  function Ic() {
4475
4483
  if (Bs) return Mt;
4476
4484
  Bs = 1;
4477
4485
  const s = Nr();
4478
- return Mt = (t, r) => t.sort((n, o) => s(o, n, r)), Mt;
4486
+ return Mt = (t, r) => t.sort((n, o) => s(n, o, r)), Mt;
4479
4487
  }
4480
- var Gt, js;
4481
- function gt() {
4482
- if (js) return Gt;
4488
+ var Jt, js;
4489
+ function Fc() {
4490
+ if (js) return Jt;
4483
4491
  js = 1;
4492
+ const s = Nr();
4493
+ return Jt = (t, r) => t.sort((n, o) => s(o, n, r)), Jt;
4494
+ }
4495
+ var Gt, xs;
4496
+ function gt() {
4497
+ if (xs) return Gt;
4498
+ xs = 1;
4484
4499
  const s = ie();
4485
4500
  return Gt = (t, r, n) => s(t, r, n) > 0, Gt;
4486
4501
  }
4487
- var _t, xs;
4502
+ var _t, Vs;
4488
4503
  function Br() {
4489
- if (xs) return _t;
4490
- xs = 1;
4504
+ if (Vs) return _t;
4505
+ Vs = 1;
4491
4506
  const s = ie();
4492
4507
  return _t = (t, r, n) => s(t, r, n) < 0, _t;
4493
4508
  }
4494
- var qt, Vs;
4495
- function eo() {
4496
- if (Vs) return qt;
4497
- Vs = 1;
4509
+ var qt, Us;
4510
+ function to() {
4511
+ if (Us) return qt;
4512
+ Us = 1;
4498
4513
  const s = ie();
4499
4514
  return qt = (t, r, n) => s(t, r, n) === 0, qt;
4500
4515
  }
4501
- var Kt, Us;
4502
- function to() {
4503
- if (Us) return Kt;
4504
- Us = 1;
4516
+ var Kt, Ms;
4517
+ function ro() {
4518
+ if (Ms) return Kt;
4519
+ Ms = 1;
4505
4520
  const s = ie();
4506
4521
  return Kt = (t, r, n) => s(t, r, n) !== 0, Kt;
4507
4522
  }
@@ -4512,18 +4527,18 @@ function jr() {
4512
4527
  const s = ie();
4513
4528
  return Ht = (t, r, n) => s(t, r, n) >= 0, Ht;
4514
4529
  }
4515
- var Wt, Ms;
4530
+ var Wt, Gs;
4516
4531
  function xr() {
4517
- if (Ms) return Wt;
4518
- Ms = 1;
4532
+ if (Gs) return Wt;
4533
+ Gs = 1;
4519
4534
  const s = ie();
4520
4535
  return Wt = (t, r, n) => s(t, r, n) <= 0, Wt;
4521
4536
  }
4522
- var zt, Gs;
4523
- function ro() {
4524
- if (Gs) return zt;
4525
- Gs = 1;
4526
- const s = eo(), e = to(), t = gt(), r = jr(), n = Br(), o = xr();
4537
+ var zt, _s;
4538
+ function so() {
4539
+ if (_s) return zt;
4540
+ _s = 1;
4541
+ const s = to(), e = ro(), t = gt(), r = jr(), n = Br(), o = xr();
4527
4542
  return zt = (a, c, l, u) => {
4528
4543
  switch (c) {
4529
4544
  case "===":
@@ -4549,10 +4564,10 @@ function ro() {
4549
4564
  }
4550
4565
  }, zt;
4551
4566
  }
4552
- var Xt, _s;
4553
- function Fc() {
4554
- if (_s) return Xt;
4555
- _s = 1;
4567
+ var Xt, qs;
4568
+ function Tc() {
4569
+ if (qs) return Xt;
4570
+ qs = 1;
4556
4571
  const s = Q(), e = Oe(), { safeRe: t, t: r } = We();
4557
4572
  return Xt = (o, i) => {
4558
4573
  if (o instanceof s)
@@ -4576,10 +4591,10 @@ function Fc() {
4576
4591
  return e(`${c}.${l}.${u}${d}${p}`, i);
4577
4592
  }, Xt;
4578
4593
  }
4579
- var Yt, qs;
4580
- function Tc() {
4581
- if (qs) return Yt;
4582
- qs = 1;
4594
+ var Yt, Ks;
4595
+ function $c() {
4596
+ if (Ks) return Yt;
4597
+ Ks = 1;
4583
4598
  class s {
4584
4599
  constructor() {
4585
4600
  this.max = 1e3, this.map = /* @__PURE__ */ new Map();
@@ -4605,10 +4620,10 @@ function Tc() {
4605
4620
  }
4606
4621
  return Yt = s, Yt;
4607
4622
  }
4608
- var Qt, Ks;
4623
+ var Qt, Hs;
4609
4624
  function ae() {
4610
- if (Ks) return Qt;
4611
- Ks = 1;
4625
+ if (Hs) return Qt;
4626
+ Hs = 1;
4612
4627
  const s = /\s+/g;
4613
4628
  class e {
4614
4629
  constructor(m, w) {
@@ -4655,17 +4670,17 @@ function ae() {
4655
4670
  if (R)
4656
4671
  return R;
4657
4672
  const k = this.options.loose, O = k ? c[l.HYPHENRANGELOOSE] : c[l.HYPHENRANGE];
4658
- m = m.replace(O, J(this.options.includePrerelease)), i("hyphen replace", m), m = m.replace(c[l.COMPARATORTRIM], u), i("comparator trim", m), m = m.replace(c[l.TILDETRIM], d), i("tilde trim", m), m = m.replace(c[l.CARETTRIM], p), i("caret trim", m);
4659
- let $ = m.split(" ").map((U) => j(U, this.options)).join(" ").split(/\s+/).map((U) => z(U, this.options));
4660
- k && ($ = $.filter((U) => (i("loose invalid filter", U, this.options), !!U.match(c[l.COMPARATORLOOSE])))), i("range list", $);
4661
- const I = /* @__PURE__ */ new Map(), x = $.map((U) => new o(U, this.options));
4673
+ m = m.replace(O, M(this.options.includePrerelease)), i("hyphen replace", m), m = m.replace(c[l.COMPARATORTRIM], u), i("comparator trim", m), m = m.replace(c[l.TILDETRIM], d), i("tilde trim", m), m = m.replace(c[l.CARETTRIM], p), i("caret trim", m);
4674
+ let A = m.split(" ").map((U) => B(U, this.options)).join(" ").split(/\s+/).map((U) => z(U, this.options));
4675
+ k && (A = A.filter((U) => (i("loose invalid filter", U, this.options), !!U.match(c[l.COMPARATORLOOSE])))), i("range list", A);
4676
+ const F = /* @__PURE__ */ new Map(), x = A.map((U) => new o(U, this.options));
4662
4677
  for (const U of x) {
4663
4678
  if (h(U))
4664
4679
  return [U];
4665
- I.set(U.value, U);
4680
+ F.set(U.value, U);
4666
4681
  }
4667
- I.size > 1 && I.has("") && I.delete("");
4668
- const H = [...I.values()];
4682
+ F.size > 1 && F.has("") && F.delete("");
4683
+ const H = [...F.values()];
4669
4684
  return r.set(y, H), H;
4670
4685
  }
4671
4686
  intersects(m, w) {
@@ -4690,7 +4705,7 @@ function ae() {
4690
4705
  }
4691
4706
  }
4692
4707
  Qt = e;
4693
- const t = Tc(), r = new t(), n = Dr(), o = mt(), i = ht(), a = Q(), {
4708
+ const t = $c(), r = new t(), n = Dr(), o = mt(), i = ht(), a = Q(), {
4694
4709
  safeRe: c,
4695
4710
  t: l,
4696
4711
  comparatorTrimReplace: u,
@@ -4703,30 +4718,30 @@ function ae() {
4703
4718
  for (; w && y.length; )
4704
4719
  w = y.every((k) => R.intersects(k, m)), R = y.pop();
4705
4720
  return w;
4706
- }, j = (g, m) => (i("comp", g, m), g = P(g, m), i("caret", g), g = B(g, m), i("tildes", g), g = C(g, m), i("xrange", g), g = ce(g, m), i("stars", g), g), F = (g) => !g || g.toLowerCase() === "x" || g === "*", B = (g, m) => g.trim().split(/\s+/).map((w) => V(w, m)).join(" "), V = (g, m) => {
4721
+ }, B = (g, m) => (i("comp", g, m), g = P(g, m), i("caret", g), g = j(g, m), i("tildes", g), g = C(g, m), i("xrange", g), g = ce(g, m), i("stars", g), g), I = (g) => !g || g.toLowerCase() === "x" || g === "*", j = (g, m) => g.trim().split(/\s+/).map((w) => V(w, m)).join(" "), V = (g, m) => {
4707
4722
  const w = m.loose ? c[l.TILDELOOSE] : c[l.TILDE];
4708
- return g.replace(w, (y, R, k, O, $) => {
4709
- i("tilde", g, y, R, k, O, $);
4710
- let I;
4711
- return F(R) ? I = "" : F(k) ? I = `>=${R}.0.0 <${+R + 1}.0.0-0` : F(O) ? I = `>=${R}.${k}.0 <${R}.${+k + 1}.0-0` : $ ? (i("replaceTilde pr", $), I = `>=${R}.${k}.${O}-${$} <${R}.${+k + 1}.0-0`) : I = `>=${R}.${k}.${O} <${R}.${+k + 1}.0-0`, i("tilde return", I), I;
4723
+ return g.replace(w, (y, R, k, O, A) => {
4724
+ i("tilde", g, y, R, k, O, A);
4725
+ let F;
4726
+ return I(R) ? F = "" : I(k) ? F = `>=${R}.0.0 <${+R + 1}.0.0-0` : I(O) ? F = `>=${R}.${k}.0 <${R}.${+k + 1}.0-0` : A ? (i("replaceTilde pr", A), F = `>=${R}.${k}.${O}-${A} <${R}.${+k + 1}.0-0`) : F = `>=${R}.${k}.${O} <${R}.${+k + 1}.0-0`, i("tilde return", F), F;
4712
4727
  });
4713
- }, P = (g, m) => g.trim().split(/\s+/).map((w) => N(w, m)).join(" "), N = (g, m) => {
4728
+ }, P = (g, m) => g.trim().split(/\s+/).map((w) => $(w, m)).join(" "), $ = (g, m) => {
4714
4729
  i("caret", g, m);
4715
4730
  const w = m.loose ? c[l.CARETLOOSE] : c[l.CARET], y = m.includePrerelease ? "-0" : "";
4716
- return g.replace(w, (R, k, O, $, I) => {
4717
- i("caret", g, R, k, O, $, I);
4731
+ return g.replace(w, (R, k, O, A, F) => {
4732
+ i("caret", g, R, k, O, A, F);
4718
4733
  let x;
4719
- return F(k) ? x = "" : F(O) ? x = `>=${k}.0.0${y} <${+k + 1}.0.0-0` : F($) ? k === "0" ? x = `>=${k}.${O}.0${y} <${k}.${+O + 1}.0-0` : x = `>=${k}.${O}.0${y} <${+k + 1}.0.0-0` : I ? (i("replaceCaret pr", I), k === "0" ? O === "0" ? x = `>=${k}.${O}.${$}-${I} <${k}.${O}.${+$ + 1}-0` : x = `>=${k}.${O}.${$}-${I} <${k}.${+O + 1}.0-0` : x = `>=${k}.${O}.${$}-${I} <${+k + 1}.0.0-0`) : (i("no pr"), k === "0" ? O === "0" ? x = `>=${k}.${O}.${$}${y} <${k}.${O}.${+$ + 1}-0` : x = `>=${k}.${O}.${$}${y} <${k}.${+O + 1}.0-0` : x = `>=${k}.${O}.${$} <${+k + 1}.0.0-0`), i("caret return", x), x;
4734
+ return I(k) ? x = "" : I(O) ? x = `>=${k}.0.0${y} <${+k + 1}.0.0-0` : I(A) ? k === "0" ? x = `>=${k}.${O}.0${y} <${k}.${+O + 1}.0-0` : x = `>=${k}.${O}.0${y} <${+k + 1}.0.0-0` : F ? (i("replaceCaret pr", F), k === "0" ? O === "0" ? x = `>=${k}.${O}.${A}-${F} <${k}.${O}.${+A + 1}-0` : x = `>=${k}.${O}.${A}-${F} <${k}.${+O + 1}.0-0` : x = `>=${k}.${O}.${A}-${F} <${+k + 1}.0.0-0`) : (i("no pr"), k === "0" ? O === "0" ? x = `>=${k}.${O}.${A}${y} <${k}.${O}.${+A + 1}-0` : x = `>=${k}.${O}.${A}${y} <${k}.${+O + 1}.0-0` : x = `>=${k}.${O}.${A} <${+k + 1}.0.0-0`), i("caret return", x), x;
4720
4735
  });
4721
4736
  }, C = (g, m) => (i("replaceXRanges", g, m), g.split(/\s+/).map((w) => G(w, m)).join(" ")), G = (g, m) => {
4722
4737
  g = g.trim();
4723
4738
  const w = m.loose ? c[l.XRANGELOOSE] : c[l.XRANGE];
4724
- return g.replace(w, (y, R, k, O, $, I) => {
4725
- i("xRange", g, y, R, k, O, $, I);
4726
- const x = F(k), H = x || F(O), U = H || F($), ne = U;
4727
- return R === "=" && ne && (R = ""), I = m.includePrerelease ? "-0" : "", x ? R === ">" || R === "<" ? y = "<0.0.0-0" : y = "*" : R && ne ? (H && (O = 0), $ = 0, R === ">" ? (R = ">=", H ? (k = +k + 1, O = 0, $ = 0) : (O = +O + 1, $ = 0)) : R === "<=" && (R = "<", H ? k = +k + 1 : O = +O + 1), R === "<" && (I = "-0"), y = `${R + k}.${O}.${$}${I}`) : H ? y = `>=${k}.0.0${I} <${+k + 1}.0.0-0` : U && (y = `>=${k}.${O}.0${I} <${k}.${+O + 1}.0-0`), i("xRange return", y), y;
4739
+ return g.replace(w, (y, R, k, O, A, F) => {
4740
+ i("xRange", g, y, R, k, O, A, F);
4741
+ const x = I(k), H = x || I(O), U = H || I(A), ne = U;
4742
+ return R === "=" && ne && (R = ""), F = m.includePrerelease ? "-0" : "", x ? R === ">" || R === "<" ? y = "<0.0.0-0" : y = "*" : R && ne ? (H && (O = 0), A = 0, R === ">" ? (R = ">=", H ? (k = +k + 1, O = 0, A = 0) : (O = +O + 1, A = 0)) : R === "<=" && (R = "<", H ? k = +k + 1 : O = +O + 1), R === "<" && (F = "-0"), y = `${R + k}.${O}.${A}${F}`) : H ? y = `>=${k}.0.0${F} <${+k + 1}.0.0-0` : U && (y = `>=${k}.${O}.0${F} <${k}.${+O + 1}.0-0`), i("xRange return", y), y;
4728
4743
  });
4729
- }, ce = (g, m) => (i("replaceStars", g, m), g.trim().replace(c[l.STAR], "")), z = (g, m) => (i("replaceGTE0", g, m), g.trim().replace(c[m.includePrerelease ? l.GTE0PRE : l.GTE0], "")), J = (g) => (m, w, y, R, k, O, $, I, x, H, U, ne) => (F(y) ? w = "" : F(R) ? w = `>=${y}.0.0${g ? "-0" : ""}` : F(k) ? w = `>=${y}.${R}.0${g ? "-0" : ""}` : O ? w = `>=${w}` : w = `>=${w}${g ? "-0" : ""}`, F(x) ? I = "" : F(H) ? I = `<${+x + 1}.0.0-0` : F(U) ? I = `<${x}.${+H + 1}.0-0` : ne ? I = `<=${x}.${H}.${U}-${ne}` : g ? I = `<${x}.${H}.${+U + 1}-0` : I = `<=${I}`, `${w} ${I}`.trim()), W = (g, m, w) => {
4744
+ }, ce = (g, m) => (i("replaceStars", g, m), g.trim().replace(c[l.STAR], "")), z = (g, m) => (i("replaceGTE0", g, m), g.trim().replace(c[m.includePrerelease ? l.GTE0PRE : l.GTE0], "")), M = (g) => (m, w, y, R, k, O, A, F, x, H, U, ne) => (I(y) ? w = "" : I(R) ? w = `>=${y}.0.0${g ? "-0" : ""}` : I(k) ? w = `>=${y}.${R}.0${g ? "-0" : ""}` : O ? w = `>=${w}` : w = `>=${w}${g ? "-0" : ""}`, I(x) ? F = "" : I(H) ? F = `<${+x + 1}.0.0-0` : I(U) ? F = `<${x}.${+H + 1}.0-0` : ne ? F = `<=${x}.${H}.${U}-${ne}` : g ? F = `<${x}.${H}.${+U + 1}-0` : F = `<=${F}`, `${w} ${F}`.trim()), W = (g, m, w) => {
4730
4745
  for (let y = 0; y < g.length; y++)
4731
4746
  if (!g[y].test(m))
4732
4747
  return !1;
@@ -4743,10 +4758,10 @@ function ae() {
4743
4758
  };
4744
4759
  return Qt;
4745
4760
  }
4746
- var Zt, Hs;
4761
+ var Zt, Ws;
4747
4762
  function mt() {
4748
- if (Hs) return Zt;
4749
- Hs = 1;
4763
+ if (Ws) return Zt;
4764
+ Ws = 1;
4750
4765
  const s = Symbol("SemVer ANY");
4751
4766
  class e {
4752
4767
  static get ANY() {
@@ -4787,13 +4802,13 @@ function mt() {
4787
4802
  }
4788
4803
  }
4789
4804
  Zt = e;
4790
- const t = Dr(), { safeRe: r, t: n } = We(), o = ro(), i = ht(), a = Q(), c = ae();
4805
+ const t = Dr(), { safeRe: r, t: n } = We(), o = so(), i = ht(), a = Q(), c = ae();
4791
4806
  return Zt;
4792
4807
  }
4793
- var er, Ws;
4808
+ var er, zs;
4794
4809
  function vt() {
4795
- if (Ws) return er;
4796
- Ws = 1;
4810
+ if (zs) return er;
4811
+ zs = 1;
4797
4812
  const s = ae();
4798
4813
  return er = (t, r, n) => {
4799
4814
  try {
@@ -4804,17 +4819,17 @@ function vt() {
4804
4819
  return r.test(t);
4805
4820
  }, er;
4806
4821
  }
4807
- var tr, zs;
4808
- function $c() {
4809
- if (zs) return tr;
4810
- zs = 1;
4822
+ var tr, Xs;
4823
+ function Ac() {
4824
+ if (Xs) return tr;
4825
+ Xs = 1;
4811
4826
  const s = ae();
4812
4827
  return tr = (t, r) => new s(t, r).set.map((n) => n.map((o) => o.value).join(" ").trim().split(" ")), tr;
4813
4828
  }
4814
- var rr, Xs;
4815
- function Ac() {
4816
- if (Xs) return rr;
4817
- Xs = 1;
4829
+ var rr, Ys;
4830
+ function Lc() {
4831
+ if (Ys) return rr;
4832
+ Ys = 1;
4818
4833
  const s = Q(), e = ae();
4819
4834
  return rr = (r, n, o) => {
4820
4835
  let i = null, a = null, c = null;
@@ -4828,10 +4843,10 @@ function Ac() {
4828
4843
  }), i;
4829
4844
  }, rr;
4830
4845
  }
4831
- var sr, Ys;
4832
- function Lc() {
4833
- if (Ys) return sr;
4834
- Ys = 1;
4846
+ var sr, Qs;
4847
+ function Dc() {
4848
+ if (Qs) return sr;
4849
+ Qs = 1;
4835
4850
  const s = Q(), e = ae();
4836
4851
  return sr = (r, n, o) => {
4837
4852
  let i = null, a = null, c = null;
@@ -4845,10 +4860,10 @@ function Lc() {
4845
4860
  }), i;
4846
4861
  }, sr;
4847
4862
  }
4848
- var nr, Qs;
4849
- function Dc() {
4850
- if (Qs) return nr;
4851
- Qs = 1;
4863
+ var nr, Zs;
4864
+ function Nc() {
4865
+ if (Zs) return nr;
4866
+ Zs = 1;
4852
4867
  const s = Q(), e = ae(), t = gt();
4853
4868
  return nr = (n, o) => {
4854
4869
  n = new e(n, o);
@@ -4881,10 +4896,10 @@ function Dc() {
4881
4896
  return i && n.test(i) ? i : null;
4882
4897
  }, nr;
4883
4898
  }
4884
- var or, Zs;
4885
- function Nc() {
4886
- if (Zs) return or;
4887
- Zs = 1;
4899
+ var or, en;
4900
+ function Bc() {
4901
+ if (en) return or;
4902
+ en = 1;
4888
4903
  const s = ae();
4889
4904
  return or = (t, r) => {
4890
4905
  try {
@@ -4894,64 +4909,64 @@ function Nc() {
4894
4909
  }
4895
4910
  }, or;
4896
4911
  }
4897
- var ir, en;
4912
+ var ir, tn;
4898
4913
  function Vr() {
4899
- if (en) return ir;
4900
- en = 1;
4914
+ if (tn) return ir;
4915
+ tn = 1;
4901
4916
  const s = Q(), e = mt(), { ANY: t } = e, r = ae(), n = vt(), o = gt(), i = Br(), a = xr(), c = jr();
4902
4917
  return ir = (u, d, p, f) => {
4903
4918
  u = new s(u, f), d = new r(d, f);
4904
- let v, h, S, E, j;
4919
+ let v, h, S, E, B;
4905
4920
  switch (p) {
4906
4921
  case ">":
4907
- v = o, h = a, S = i, E = ">", j = ">=";
4922
+ v = o, h = a, S = i, E = ">", B = ">=";
4908
4923
  break;
4909
4924
  case "<":
4910
- v = i, h = c, S = o, E = "<", j = "<=";
4925
+ v = i, h = c, S = o, E = "<", B = "<=";
4911
4926
  break;
4912
4927
  default:
4913
4928
  throw new TypeError('Must provide a hilo val of "<" or ">"');
4914
4929
  }
4915
4930
  if (n(u, d, f))
4916
4931
  return !1;
4917
- for (let F = 0; F < d.set.length; ++F) {
4918
- const B = d.set[F];
4932
+ for (let I = 0; I < d.set.length; ++I) {
4933
+ const j = d.set[I];
4919
4934
  let V = null, P = null;
4920
- if (B.forEach((N) => {
4921
- N.semver === t && (N = new e(">=0.0.0")), V = V || N, P = P || N, v(N.semver, V.semver, f) ? V = N : S(N.semver, P.semver, f) && (P = N);
4922
- }), V.operator === E || V.operator === j || (!P.operator || P.operator === E) && h(u, P.semver))
4935
+ if (j.forEach(($) => {
4936
+ $.semver === t && ($ = new e(">=0.0.0")), V = V || $, P = P || $, v($.semver, V.semver, f) ? V = $ : S($.semver, P.semver, f) && (P = $);
4937
+ }), V.operator === E || V.operator === B || (!P.operator || P.operator === E) && h(u, P.semver))
4923
4938
  return !1;
4924
- if (P.operator === j && S(u, P.semver))
4939
+ if (P.operator === B && S(u, P.semver))
4925
4940
  return !1;
4926
4941
  }
4927
4942
  return !0;
4928
4943
  }, ir;
4929
4944
  }
4930
- var ar, tn;
4931
- function Bc() {
4932
- if (tn) return ar;
4933
- tn = 1;
4934
- const s = Vr();
4935
- return ar = (t, r, n) => s(t, r, ">", n), ar;
4936
- }
4937
- var cr, rn;
4945
+ var ar, rn;
4938
4946
  function jc() {
4939
- if (rn) return cr;
4947
+ if (rn) return ar;
4940
4948
  rn = 1;
4941
4949
  const s = Vr();
4942
- return cr = (t, r, n) => s(t, r, "<", n), cr;
4950
+ return ar = (t, r, n) => s(t, r, ">", n), ar;
4943
4951
  }
4944
- var lr, sn;
4952
+ var cr, sn;
4945
4953
  function xc() {
4946
- if (sn) return lr;
4954
+ if (sn) return cr;
4947
4955
  sn = 1;
4948
- const s = ae();
4949
- return lr = (t, r, n) => (t = new s(t, n), r = new s(r, n), t.intersects(r, n)), lr;
4956
+ const s = Vr();
4957
+ return cr = (t, r, n) => s(t, r, "<", n), cr;
4950
4958
  }
4951
- var ur, nn;
4959
+ var lr, nn;
4952
4960
  function Vc() {
4953
- if (nn) return ur;
4961
+ if (nn) return lr;
4954
4962
  nn = 1;
4963
+ const s = ae();
4964
+ return lr = (t, r, n) => (t = new s(t, n), r = new s(r, n), t.intersects(r, n)), lr;
4965
+ }
4966
+ var ur, on;
4967
+ function Uc() {
4968
+ if (on) return ur;
4969
+ on = 1;
4955
4970
  const s = vt(), e = ie();
4956
4971
  return ur = (t, r, n) => {
4957
4972
  const o = [];
@@ -4967,10 +4982,10 @@ function Vc() {
4967
4982
  return u.length < d.length ? u : r;
4968
4983
  }, ur;
4969
4984
  }
4970
- var dr, on;
4971
- function Uc() {
4972
- if (on) return dr;
4973
- on = 1;
4985
+ var dr, an;
4986
+ function Mc() {
4987
+ if (an) return dr;
4988
+ an = 1;
4974
4989
  const s = ae(), e = mt(), { ANY: t } = e, r = vt(), n = ie(), o = (d, p, f = {}) => {
4975
4990
  if (d === p)
4976
4991
  return !0;
@@ -5020,19 +5035,19 @@ function Uc() {
5020
5035
  return !1;
5021
5036
  return !0;
5022
5037
  }
5023
- let j, F, B, V, P = S && !f.includePrerelease && S.semver.prerelease.length ? S.semver : !1, N = h && !f.includePrerelease && h.semver.prerelease.length ? h.semver : !1;
5038
+ let B, I, j, V, P = S && !f.includePrerelease && S.semver.prerelease.length ? S.semver : !1, $ = h && !f.includePrerelease && h.semver.prerelease.length ? h.semver : !1;
5024
5039
  P && P.prerelease.length === 1 && S.operator === "<" && P.prerelease[0] === 0 && (P = !1);
5025
5040
  for (const C of p) {
5026
- if (V = V || C.operator === ">" || C.operator === ">=", B = B || C.operator === "<" || C.operator === "<=", h) {
5027
- if (N && C.semver.prerelease && C.semver.prerelease.length && C.semver.major === N.major && C.semver.minor === N.minor && C.semver.patch === N.patch && (N = !1), C.operator === ">" || C.operator === ">=") {
5028
- if (j = l(h, C, f), j === C && j !== h)
5041
+ if (V = V || C.operator === ">" || C.operator === ">=", j = j || C.operator === "<" || C.operator === "<=", h) {
5042
+ if ($ && C.semver.prerelease && C.semver.prerelease.length && C.semver.major === $.major && C.semver.minor === $.minor && C.semver.patch === $.patch && ($ = !1), C.operator === ">" || C.operator === ">=") {
5043
+ if (B = l(h, C, f), B === C && B !== h)
5029
5044
  return !1;
5030
5045
  } else if (h.operator === ">=" && !r(h.semver, String(C), f))
5031
5046
  return !1;
5032
5047
  }
5033
5048
  if (S) {
5034
5049
  if (P && C.semver.prerelease && C.semver.prerelease.length && C.semver.major === P.major && C.semver.minor === P.minor && C.semver.patch === P.patch && (P = !1), C.operator === "<" || C.operator === "<=") {
5035
- if (F = u(S, C, f), F === C && F !== S)
5050
+ if (I = u(S, C, f), I === C && I !== S)
5036
5051
  return !1;
5037
5052
  } else if (S.operator === "<=" && !r(S.semver, String(C), f))
5038
5053
  return !1;
@@ -5040,7 +5055,7 @@ function Uc() {
5040
5055
  if (!C.operator && (S || h) && E !== 0)
5041
5056
  return !1;
5042
5057
  }
5043
- return !(h && B && !S && E !== 0 || S && V && !h && E !== 0 || N || P);
5058
+ return !(h && j && !S && E !== 0 || S && V && !h && E !== 0 || $ || P);
5044
5059
  }, l = (d, p, f) => {
5045
5060
  if (!d)
5046
5061
  return p;
@@ -5054,11 +5069,11 @@ function Uc() {
5054
5069
  };
5055
5070
  return dr = o, dr;
5056
5071
  }
5057
- var pr, an;
5072
+ var pr, cn;
5058
5073
  function Jc() {
5059
- if (an) return pr;
5060
- an = 1;
5061
- const s = We(), e = ft(), t = Q(), r = Zn(), n = Oe(), o = vc(), i = yc(), a = wc(), c = Sc(), l = bc(), u = kc(), d = Rc(), p = Cc(), f = ie(), v = Ec(), h = Pc(), S = Nr(), E = Oc(), j = Ic(), F = gt(), B = Br(), V = eo(), P = to(), N = jr(), C = xr(), G = ro(), ce = Fc(), z = mt(), J = ae(), W = vt(), g = $c(), m = Ac(), w = Lc(), y = Dc(), R = Nc(), k = Vr(), O = Bc(), $ = jc(), I = xc(), x = Vc(), H = Uc();
5074
+ if (cn) return pr;
5075
+ cn = 1;
5076
+ const s = We(), e = ft(), t = Q(), r = eo(), n = Oe(), o = yc(), i = wc(), a = Sc(), c = bc(), l = kc(), u = Rc(), d = Cc(), p = Ec(), f = ie(), v = Pc(), h = Oc(), S = Nr(), E = Ic(), B = Fc(), I = gt(), j = Br(), V = to(), P = ro(), $ = jr(), C = xr(), G = so(), ce = Tc(), z = mt(), M = ae(), W = vt(), g = Ac(), m = Lc(), w = Dc(), y = Nc(), R = Bc(), k = Vr(), O = jc(), A = xc(), F = Vc(), x = Uc(), H = Mc();
5062
5077
  return pr = {
5063
5078
  parse: n,
5064
5079
  valid: o,
@@ -5074,17 +5089,17 @@ function Jc() {
5074
5089
  compareLoose: h,
5075
5090
  compareBuild: S,
5076
5091
  sort: E,
5077
- rsort: j,
5078
- gt: F,
5079
- lt: B,
5092
+ rsort: B,
5093
+ gt: I,
5094
+ lt: j,
5080
5095
  eq: V,
5081
5096
  neq: P,
5082
- gte: N,
5097
+ gte: $,
5083
5098
  lte: C,
5084
5099
  cmp: G,
5085
5100
  coerce: ce,
5086
5101
  Comparator: z,
5087
- Range: J,
5102
+ Range: M,
5088
5103
  satisfies: W,
5089
5104
  toComparators: g,
5090
5105
  maxSatisfying: m,
@@ -5093,8 +5108,8 @@ function Jc() {
5093
5108
  validRange: R,
5094
5109
  outside: k,
5095
5110
  gtr: O,
5096
- ltr: $,
5097
- intersects: I,
5111
+ ltr: A,
5112
+ intersects: F,
5098
5113
  simplifyRange: x,
5099
5114
  subset: H,
5100
5115
  SemVer: t,
@@ -5107,13 +5122,13 @@ function Jc() {
5107
5122
  rcompareIdentifiers: r.rcompareIdentifiers
5108
5123
  }, pr;
5109
5124
  }
5110
- var Mc = Jc();
5111
- const Gc = /* @__PURE__ */ mc(Mc), _c = {
5125
+ var Gc = Jc();
5126
+ const _c = /* @__PURE__ */ vc(Gc), qc = {
5112
5127
  minDelay: 1500
5113
- }, qc = "__no_updates__";
5114
- class Kc extends Uo {
5128
+ }, Kc = "__no_updates__";
5129
+ class Hc extends Mo {
5115
5130
  constructor(t, r, n = {}) {
5116
- super({ ...n, ..._c }, r);
5131
+ super({ ...n, ...qc }, r);
5117
5132
  b(this, "http");
5118
5133
  b(this, "preferredUpdateChannel");
5119
5134
  this.registryProvider = t, this.http = n.http, this.preferredUpdateChannel = n.preferredUpdateChannel;
@@ -5127,7 +5142,7 @@ class Kc extends Uo {
5127
5142
  case "from-registry-v2":
5128
5143
  return `from_registry_v2_${te(t)}`;
5129
5144
  default:
5130
- return qc;
5145
+ return Kc;
5131
5146
  }
5132
5147
  }
5133
5148
  async readValue(t) {
@@ -5137,7 +5152,7 @@ class Kc extends Uo {
5137
5152
  switch (o.type) {
5138
5153
  case "dev-v1":
5139
5154
  try {
5140
- const i = await Tn(o.folder);
5155
+ const i = await $n(o.folder);
5141
5156
  return i === o.mtime ? { suggestions: [] } : { mainSuggestion: { ...o, mtime: i }, suggestions: [] };
5142
5157
  } catch (i) {
5143
5158
  return this.logger.warn(i), { suggestions: [] };
@@ -5163,7 +5178,7 @@ class Kc extends Uo {
5163
5178
  else {
5164
5179
  if (await c.getLatestOverview(o.id, Ne) === void 0)
5165
5180
  return this.logger.error(
5166
- `No "any" channel record for ${mo(o.id)}`
5181
+ `No "any" channel record for ${vo(o.id)}`
5167
5182
  ), { suggestions: [] };
5168
5183
  l = Ne;
5169
5184
  }
@@ -5188,7 +5203,7 @@ class Kc extends Uo {
5188
5203
  update: { ...o, id: { ...o.id, version: h } }
5189
5204
  }));
5190
5205
  if (d === void 0) return { suggestions: p };
5191
- if (a !== void 0 && Gc.lte(d, a))
5206
+ if (a !== void 0 && _c.lte(d, a))
5192
5207
  return { suggestions: p };
5193
5208
  const f = {
5194
5209
  ...o,
@@ -5215,7 +5230,7 @@ class Kc extends Uo {
5215
5230
  return te(t) === te(r);
5216
5231
  }
5217
5232
  }
5218
- class cn {
5233
+ class ln {
5219
5234
  constructor() {
5220
5235
  b(this, "resources", /* @__PURE__ */ new Map());
5221
5236
  }
@@ -5249,7 +5264,7 @@ class cn {
5249
5264
  function xe(s) {
5250
5265
  return String(s.id);
5251
5266
  }
5252
- const Hc = ["Int", "Long", "Float", "Double", "String", "Bytes"];
5267
+ const Wc = ["Int", "Long", "Float", "Double", "String", "Bytes"];
5253
5268
  function Le(s) {
5254
5269
  const e = [], t = [];
5255
5270
  for (const r of s)
@@ -5265,7 +5280,7 @@ function Le(s) {
5265
5280
  }
5266
5281
  return t;
5267
5282
  }
5268
- function ln(s) {
5283
+ function un(s) {
5269
5284
  return "partitionFilters" in s ? {
5270
5285
  ...s,
5271
5286
  partitionFilters: Le(s.partitionFilters),
@@ -5277,7 +5292,7 @@ function ln(s) {
5277
5292
  };
5278
5293
  }
5279
5294
  const Ae = (s, e) => typeof e == "bigint" ? e.toString() : e;
5280
- class Wc {
5295
+ class zc {
5281
5296
  constructor(e, t, r, n) {
5282
5297
  b(this, "pFrame");
5283
5298
  b(this, "abortController", new AbortController());
@@ -5290,23 +5305,23 @@ class Wc {
5290
5305
  });
5291
5306
  b(this, "resolveBlobContent", async (e) => {
5292
5307
  const t = this.getOrCreateComputableForBlob(e), r = this.blobDriver.getLocalPath((await t.awaitStableValue(this.disposeSignal)).handle);
5293
- return await mn.readFile(r);
5308
+ return await vn.readFile(r);
5294
5309
  });
5295
5310
  this.blobDriver = e, this.logger = t, this.spillPath = r;
5296
5311
  const o = (a, c) => this.logger[a](c);
5297
5312
  for (const a of n)
5298
- for (const c of Zi(a.data))
5313
+ for (const c of ea(a.data))
5299
5314
  this.blobIdToResource.set(xe(c), c);
5300
5315
  const i = [
5301
5316
  ...new Map(n.map((a) => ({
5302
5317
  ...a,
5303
- data: ea(a.data, xe)
5318
+ data: ta(a.data, xe)
5304
5319
  })).map(
5305
5320
  (a) => [te(a), a]
5306
5321
  )).values()
5307
5322
  ];
5308
5323
  try {
5309
- const a = new On(this.spillPath, o);
5324
+ const a = new In(this.spillPath, o);
5310
5325
  a.setDataSource(this);
5311
5326
  for (const c of i)
5312
5327
  a.addColumnSpec(c.id, c.spec), a.setColumnData(c.id, c.data);
@@ -5363,19 +5378,19 @@ class Ur {
5363
5378
  b(this, "tableConcurrencyLimiter");
5364
5379
  this.blobDriver = e, this.logger = t, this.spillPath = r;
5365
5380
  const n = new zr(1);
5366
- this.frameConcurrencyLimiter = n, this.tableConcurrencyLimiter = new zr(1), this.pFrames = new class extends cn {
5381
+ this.frameConcurrencyLimiter = n, this.tableConcurrencyLimiter = new zr(1), this.pFrames = new class extends ln {
5367
5382
  constructor(o, i, a) {
5368
5383
  super(), this.blobDriver = o, this.logger = i, this.spillPath = a;
5369
5384
  }
5370
5385
  createNewResource(o) {
5371
5386
  return ee().logPFrameRequests && t.info(
5372
5387
  `PFrame creation (pFrameHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, Ae)}`
5373
- ), new Wc(this.blobDriver, this.logger, this.spillPath, o);
5388
+ ), new zc(this.blobDriver, this.logger, this.spillPath, o);
5374
5389
  }
5375
5390
  calculateParamsKey(o) {
5376
- return Xc(o);
5391
+ return Yc(o);
5377
5392
  }
5378
- }(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends cn {
5393
+ }(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends ln {
5379
5394
  constructor(o) {
5380
5395
  super(), this.pFrames = o;
5381
5396
  }
@@ -5411,31 +5426,31 @@ class Ur {
5411
5426
  return new fr(c, l);
5412
5427
  }
5413
5428
  calculateParamsKey(o) {
5414
- return zc(o);
5429
+ return Xc(o);
5415
5430
  }
5416
5431
  }(this.pFrames);
5417
5432
  }
5418
5433
  async pprofDump() {
5419
- return await On.pprofDump();
5434
+ return await In.pprofDump();
5420
5435
  }
5421
5436
  static async init(e, t, r) {
5422
- const n = bo.resolve(r);
5423
- return await Eo(n), new Ur(e, t, n);
5437
+ const n = ko.resolve(r);
5438
+ return await Po(n), new Ur(e, t, n);
5424
5439
  }
5425
5440
  //
5426
5441
  // Internal / Config API Methods
5427
5442
  //
5428
5443
  createPFrame(e, t) {
5429
- const r = e.filter((o) => Hc.find((i) => i === o.spec.valueType)).map(
5444
+ const r = e.filter((o) => Wc.find((i) => i === o.spec.valueType)).map(
5430
5445
  (o) => ge(
5431
5446
  o,
5432
- (i) => Vo(i) ? ia(i) : pn(i) ? fn(i, (a) => a.resourceInfo) : aa(o.spec, i)
5447
+ (i) => Uo(i) ? aa(i) : fn(i) ? hn(i, (a) => a.resourceInfo) : ca(o.spec, i)
5433
5448
  )
5434
5449
  ), n = this.pFrames.acquire(r);
5435
5450
  return t.addOnDestroy(n.unref), n.key;
5436
5451
  }
5437
5452
  createPTable(e, t) {
5438
- const r = ln(e), n = this.createPFrame(fo(r.src), t), o = hr(r, (a) => a.id), i = this.pTables.acquire({ def: o, pFrameHandle: n });
5453
+ const r = un(e), n = this.createPFrame(ho(r.src), t), o = hr(r, (a) => a.id), i = this.pTables.acquire({ def: o, pFrameHandle: n });
5439
5454
  return ee().logPFrameRequests && this.logger.info(
5440
5455
  `Create PTable call (pFrameHandle = ${n}; pTableHandle = ${JSON.stringify(i)}): ${JSON.stringify(
5441
5456
  hr(r, (a) => a.spec),
@@ -5479,7 +5494,7 @@ class Ur {
5479
5494
  );
5480
5495
  const { key: o, resource: { pTable: i, disposeSignal: a }, unref: c } = this.pTables.acquire({
5481
5496
  pFrameHandle: e,
5482
- def: ln(t)
5497
+ def: un(t)
5483
5498
  }), l = AbortSignal.any([n, a].filter((u) => !!u));
5484
5499
  return await this.frameConcurrencyLimiter.run(async () => {
5485
5500
  this.pFrames.getByKey(e).cache(o, c);
@@ -5513,7 +5528,7 @@ class Ur {
5513
5528
  try {
5514
5529
  return Promise.resolve(t.getSpec());
5515
5530
  } catch (r) {
5516
- return Promise.reject(ho(r));
5531
+ return Promise.reject(go(r));
5517
5532
  }
5518
5533
  }
5519
5534
  async getShape(e, t) {
@@ -5571,11 +5586,11 @@ function nt(s) {
5571
5586
  Y(s);
5572
5587
  }
5573
5588
  }
5574
- function zc(s) {
5589
+ function Xc(s) {
5575
5590
  const e = Pe("sha256");
5576
5591
  return e.update(te(s)), e.digest().toString("hex");
5577
5592
  }
5578
- function Xc(s) {
5593
+ function Yc(s) {
5579
5594
  const e = [...s].map(
5580
5595
  (r) => ge(r, (n) => {
5581
5596
  let o;
@@ -5621,12 +5636,12 @@ function Xc(s) {
5621
5636
  const t = Pe("sha256");
5622
5637
  return t.update(te(e)), t.digest().toString("hex");
5623
5638
  }
5624
- async function Yc(s, e, t) {
5639
+ async function Qc(s, e, t) {
5625
5640
  const r = {
5626
- ...Yn,
5627
- ...Qn(e),
5641
+ ...Qn,
5642
+ ...Zn(e),
5628
5643
  ...t
5629
- }, n = new Cr(r.localSecret), o = kn(r.logger, s, r.localProjections), i = zo(s, r.logger), a = Rn(s, r.logger), c = Xo(s, r.logger), l = await Yo.init(
5644
+ }, n = new Cr(r.localSecret), o = Rn(r.logger, s, r.localProjections), i = Xo(s, r.logger), a = Cn(s, r.logger), c = Yo(s, r.logger), l = await Qo.init(
5630
5645
  r.logger,
5631
5646
  o,
5632
5647
  i,
@@ -5634,19 +5649,19 @@ async function Yc(s, e, t) {
5634
5649
  r.blobDownloadRangesCachePath,
5635
5650
  n,
5636
5651
  r.blobDriverOps
5637
- ), u = new Qo(
5652
+ ), u = new Zo(
5638
5653
  r.logger,
5639
5654
  n,
5640
5655
  o,
5641
5656
  r.downloadBlobToURLPath,
5642
5657
  r.downloadBlobToURLDriverOps
5643
- ), d = new Zo(
5658
+ ), d = new ei(
5644
5659
  r.logger,
5645
5660
  n,
5646
5661
  a,
5647
5662
  c,
5648
5663
  r.uploadDriverOps
5649
- ), p = new ei(r.logger, i, r.logStreamDriverOps), f = new ti(r.logger, p, l), v = await Cn.init(
5664
+ ), p = new ti(r.logger, i, r.logStreamDriverOps), f = new ri(r.logger, p, l), v = await En.init(
5650
5665
  r.logger,
5651
5666
  s,
5652
5667
  n,
@@ -5668,7 +5683,7 @@ async function Yc(s, e, t) {
5668
5683
  pFrameDriver: h
5669
5684
  };
5670
5685
  }
5671
- class Qc {
5686
+ class Zc {
5672
5687
  constructor(e) {
5673
5688
  b(this, "enrichmentTargetsCache", new Er({
5674
5689
  max: 256,
@@ -5680,7 +5695,7 @@ class Qc {
5680
5695
  const t = e.blockConfig();
5681
5696
  if (t.enrichmentTargets === void 0) return;
5682
5697
  const r = e.args();
5683
- return za(this.quickJs, t.enrichmentTargets, ut(t), r);
5698
+ return Xa(this.quickJs, t.enrichmentTargets, ut(t), r);
5684
5699
  }
5685
5700
  getEnrichmentTargets(e, t, r) {
5686
5701
  const n = { blockConfig: e, args: t };
@@ -5690,7 +5705,7 @@ class Qc {
5690
5705
  return this.enrichmentTargetsCache.memo(o, { context: n }).value;
5691
5706
  }
5692
5707
  }
5693
- class so {
5708
+ class no {
5694
5709
  constructor(e, t, r, n, o, i, a, c) {
5695
5710
  b(this, "pl");
5696
5711
  /** Contains a reactive list of projects along with their meta information. */
@@ -5715,8 +5730,8 @@ class so {
5715
5730
  /** Creates a project with initial state and adds it to project list. */
5716
5731
  async createProject(e, t = ve()) {
5717
5732
  const r = await this.pl.withWriteTx("MLCreateProject", async (n) => {
5718
- const o = await Qi(n, e);
5719
- return n.createField(M(this.projectListResourceId, t), "Dynamic", o), await n.commit(), await Lo(o);
5733
+ const o = await Zi(n, e);
5734
+ return n.createField(J(this.projectListResourceId, t), "Dynamic", o), await n.commit(), await Do(o);
5720
5735
  });
5721
5736
  return await this.projectListTree.refreshState(), r;
5722
5737
  }
@@ -5730,12 +5745,12 @@ class so {
5730
5745
  * destruction of all attached objects, like files, analysis results etc. */
5731
5746
  async deleteProject(e) {
5732
5747
  await this.pl.withWriteTx("MLRemoveProject", async (t) => {
5733
- t.removeField(M(this.projectListResourceId, e)), await t.commit();
5748
+ t.removeField(J(this.projectListResourceId, e)), await t.commit();
5734
5749
  }), await this.projectListTree.refreshState();
5735
5750
  }
5736
5751
  async projectIdToResourceId(e) {
5737
5752
  return await this.pl.withReadTx("Project id to resource id", async (t) => {
5738
- const r = (await t.getField(M(this.projectListResourceId, e))).value;
5753
+ const r = (await t.getField(J(this.projectListResourceId, e))).value;
5739
5754
  if (Ue(r)) throw new Error("Unexpected project list structure.");
5740
5755
  return r;
5741
5756
  });
@@ -5784,33 +5799,33 @@ class so {
5784
5799
  /** Initialize middle layer */
5785
5800
  static async init(e, t, r) {
5786
5801
  const n = {
5787
- ...hc,
5788
- ...gc(t),
5802
+ ...gc,
5803
+ ...mc(t),
5789
5804
  ...r
5790
5805
  };
5791
5806
  n.defaultTreeOptions.logStat = ee().logTreeStats, n.debugOps.dumpInitialTreeState = ee().dumpInitialTreeState;
5792
5807
  const o = await e.withWriteTx("MLInitialization", async (E) => {
5793
- const j = M(E.clientRoot, Ri);
5794
- E.createField(j, "Dynamic");
5795
- const F = await E.getField(j);
5796
- if (Ue(F.value)) {
5797
- const B = E.createEphemeral($n);
5798
- return E.lock(B), E.setField(j, B), await E.commit(), await B.globalId;
5808
+ const B = J(E.clientRoot, Ci);
5809
+ E.createField(B, "Dynamic");
5810
+ const I = await E.getField(B);
5811
+ if (Ue(I.value)) {
5812
+ const j = E.createEphemeral(An);
5813
+ return E.lock(j), E.setField(B, j), await E.commit(), await j.globalId;
5799
5814
  } else
5800
- return F.value;
5801
- }), i = n.logger, a = await Yc(e, t, n), c = new vo(e.httpDispatcher), l = new hi(c), u = new qi(
5815
+ return I.value;
5816
+ }), i = n.logger, a = await Qc(e, t, n), c = new yo(e.httpDispatcher), l = new gi(c), u = new Ki(
5802
5817
  l,
5803
5818
  a.signer,
5804
5819
  c
5805
- ), d = new ri(
5820
+ ), d = new si(
5806
5821
  i,
5807
5822
  e.httpDispatcher,
5808
5823
  n.frontendDownloadPath
5809
- ), p = await Ho(), f = new go();
5824
+ ), p = await Wo(), f = new mo();
5810
5825
  f.addSupportedRequirement("requiresModelAPIVersion", 1);
5811
5826
  const v = {
5812
5827
  pl: e,
5813
- blockEventDispatcher: new Po(),
5828
+ blockEventDispatcher: new Oo(),
5814
5829
  signer: a.signer,
5815
5830
  logger: i,
5816
5831
  httpDispatcher: e.httpDispatcher,
@@ -5819,16 +5834,16 @@ class so {
5819
5834
  bpPreparer: u,
5820
5835
  frontendDownloadDriver: d,
5821
5836
  driverKit: a,
5822
- blockUpdateWatcher: new Kc(l, i, {
5837
+ blockUpdateWatcher: new Hc(l, i, {
5823
5838
  minDelay: n.devBlockUpdateRecheckInterval,
5824
5839
  http: c,
5825
5840
  preferredUpdateChannel: n.preferredUpdateChannel
5826
5841
  }),
5827
5842
  runtimeCapabilities: f,
5828
5843
  quickJs: p,
5829
- projectHelper: new Qc(p)
5830
- }, h = new Jo([]), S = await Ei(e, o, h, v);
5831
- return new so(
5844
+ projectHelper: new Zc(p)
5845
+ }, h = new Jo([]), S = await Pi(e, o, h, v);
5846
+ return new no(
5832
5847
  v,
5833
5848
  a,
5834
5849
  a.signer,
@@ -5840,41 +5855,41 @@ class so {
5840
5855
  );
5841
5856
  }
5842
5857
  }
5843
- async function Zc(s, e) {
5858
+ async function el(s, e) {
5844
5859
  return await Ie(s.pingCheckDurationMs, s.maxPingsPerSecond, async () => {
5845
- const r = await new yn(e).ping();
5860
+ const r = await new wn(e).ping();
5846
5861
  return JSON.stringify(r).slice(0, s.bodyLimit) + "...";
5847
5862
  });
5848
5863
  }
5849
- async function el(s, e) {
5864
+ async function tl(s, e) {
5850
5865
  return await Ie(
5851
5866
  s.blockRegistryDurationMs,
5852
5867
  s.maxRegistryChecksPerSecond,
5853
5868
  async () => await ze(new URL(s.blockOverviewPath, s.blockRegistryUrl), s, e)
5854
5869
  );
5855
5870
  }
5856
- async function tl(s, e) {
5871
+ async function rl(s, e) {
5857
5872
  return await Ie(
5858
5873
  s.blockRegistryDurationMs,
5859
5874
  s.maxRegistryChecksPerSecond,
5860
5875
  async () => await ze(new URL(s.blockOverviewPath, s.blockGARegistryUrl), s, e)
5861
5876
  );
5862
5877
  }
5863
- async function rl(s, e) {
5878
+ async function sl(s, e) {
5864
5879
  return await Ie(
5865
5880
  s.blockRegistryDurationMs,
5866
5881
  s.maxRegistryChecksPerSecond,
5867
5882
  async () => await ze(new URL(s.blockUiPath, s.blockRegistryUrl), s, e)
5868
5883
  );
5869
5884
  }
5870
- async function sl(s, e) {
5885
+ async function nl(s, e) {
5871
5886
  return await Ie(
5872
5887
  s.blockRegistryDurationMs,
5873
5888
  s.maxRegistryChecksPerSecond,
5874
5889
  async () => await ze(new URL(s.blockUiPath, s.blockGARegistryUrl), s, e)
5875
5890
  );
5876
5891
  }
5877
- async function nl(s, e) {
5892
+ async function ol(s, e) {
5878
5893
  return await Ie(
5879
5894
  s.autoUpdateCdnDurationMs,
5880
5895
  s.maxAutoUpdateCdnChecksPerSecond,
@@ -5883,7 +5898,7 @@ async function nl(s, e) {
5883
5898
  }
5884
5899
  async function Ie(s, e, t) {
5885
5900
  const r = Date.now(), n = [];
5886
- for (; un(r) < s; ) {
5901
+ for (; dn(r) < s; ) {
5887
5902
  const o = Date.now();
5888
5903
  let i;
5889
5904
  try {
@@ -5891,13 +5906,13 @@ async function Ie(s, e, t) {
5891
5906
  } catch (l) {
5892
5907
  i = { ok: !1, error: l };
5893
5908
  }
5894
- const a = un(o);
5909
+ const a = dn(o);
5895
5910
  n.push({
5896
5911
  elapsedMs: a,
5897
5912
  response: i
5898
5913
  });
5899
5914
  const c = 1e3 / e - a;
5900
- c > 0 && await bn(c);
5915
+ c > 0 && await kn(c);
5901
5916
  }
5902
5917
  return n;
5903
5918
  }
@@ -5912,11 +5927,11 @@ async function ze(s, e, t) {
5912
5927
  beginningOfBody: o.slice(0, e.bodyLimit) + "..."
5913
5928
  };
5914
5929
  }
5915
- function un(s) {
5930
+ function dn(s) {
5916
5931
  return Date.now() - s;
5917
5932
  }
5918
5933
  function be(s) {
5919
- const e = s.filter((i) => i.response.ok), t = s.length - e.length, { mean: r, median: n } = ol(s), o = `
5934
+ const e = s.filter((i) => i.response.ok), t = s.length - e.length, { mean: r, median: n } = il(s), o = `
5920
5935
  total: ${s.length};
5921
5936
  successes: ${e.length};
5922
5937
  errors: ${t};
@@ -5928,7 +5943,7 @@ function be(s) {
5928
5943
  details: o
5929
5944
  };
5930
5945
  }
5931
- function ol(s) {
5946
+ function il(s) {
5932
5947
  const e = s.map((n) => n.elapsedMs).sort(), t = e.reduce((n, o) => n + o) / e.length;
5933
5948
  let r;
5934
5949
  if (e.length > 0) {
@@ -5937,55 +5952,55 @@ function ol(s) {
5937
5952
  }
5938
5953
  return { mean: t, median: r };
5939
5954
  }
5940
- async function il(s, e, t) {
5955
+ async function al(s, e, t) {
5941
5956
  try {
5942
- const r = await al(s, e, t);
5957
+ const r = await cl(s, e, t);
5943
5958
  return r !== `Hello, ${t}` ? { status: "failed", message: `Template uploading failed: expected: ${t}, got: ${r}` } : { status: "ok", message: `Template uploading succeeded: ${r}` };
5944
5959
  } catch (r) {
5945
5960
  return { status: "failed", message: `Template uploading failed: error occurred: ${r}` };
5946
5961
  }
5947
5962
  }
5948
- async function al(s, e, t) {
5963
+ async function cl(s, e, t) {
5949
5964
  var n;
5950
5965
  const r = await Fe(
5951
5966
  e,
5952
5967
  ye["check_network.upload_template"],
5953
5968
  !0,
5954
5969
  (o) => ({
5955
- name: o.createValue(L.JsonObject, JSON.stringify(t))
5970
+ name: o.createValue(D.JsonObject, JSON.stringify(t))
5956
5971
  }),
5957
5972
  ["greeting"]
5958
5973
  );
5959
5974
  try {
5960
- return JSON.parse(D((n = (await he(e, r.greeting)).data) == null ? void 0 : n.toString()));
5975
+ return JSON.parse(N((n = (await he(e, r.greeting)).data) == null ? void 0 : n.toString()));
5961
5976
  } finally {
5962
5977
  r != null && await Te(e, Object.values(r));
5963
5978
  }
5964
5979
  }
5965
- async function cl(s, e, t, r, n, o) {
5980
+ async function ll(s, e, t, r, n, o) {
5966
5981
  try {
5967
- const i = await ll(s, e, t, r, n, o);
5982
+ const i = await ul(s, e, t, r, n, o);
5968
5983
  return i.type.name !== "Blob" ? { status: "failed", message: `File uploading failed: ${i.type.name}` } : { status: "ok", message: `File uploading succeeded: ${i.type.name}` };
5969
5984
  } catch (i) {
5970
5985
  return { status: "failed", message: `File uploading failed: error occurred: ${i}` };
5971
5986
  }
5972
5987
  }
5973
- async function ll(s, e, t, r, n, o) {
5988
+ async function ul(s, e, t, r, n, o) {
5974
5989
  var c;
5975
5990
  const i = await t.getLocalFileHandle(o), a = await Fe(
5976
5991
  n,
5977
5992
  ye["check_network.upload_blob"],
5978
5993
  !0,
5979
5994
  (l) => ({
5980
- file: l.createValue(L.JsonObject, JSON.stringify(i))
5995
+ file: l.createValue(D.JsonObject, JSON.stringify(i))
5981
5996
  }),
5982
5997
  ["progress", "file"]
5983
5998
  );
5984
5999
  try {
5985
6000
  const l = await he(n, a.progress);
5986
- if (si(l)) {
5987
- const u = Pn.parse(JSON.parse(D((c = l.data) == null ? void 0 : c.toString())));
5988
- ni(e, u.localPath, u.pathSignature) && await En(
6001
+ if (ni(l)) {
6002
+ const u = On.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString())));
6003
+ oi(e, u.localPath, u.pathSignature) && await Pn(
5989
6004
  s,
5990
6005
  r,
5991
6006
  l,
@@ -6004,30 +6019,30 @@ async function ll(s, e, t, r, n, o) {
6004
6019
  await Te(n, Object.values(a));
6005
6020
  }
6006
6021
  }
6007
- async function ul(s, e, t, r, n, o, i) {
6022
+ async function dl(s, e, t, r, n, o, i) {
6008
6023
  try {
6009
- const a = await dl(s, e, t, r, n, o);
6024
+ const a = await pl(s, e, t, r, n, o);
6010
6025
  return a !== i ? { status: "failed", message: `File downloading failed: expected: ${i}, got: ${a}` } : { status: "ok", message: `File downloading succeeded: ${a}` };
6011
6026
  } catch (a) {
6012
6027
  return { status: "failed", message: `File downloading failed: error occurred: ${a}` };
6013
6028
  }
6014
6029
  }
6015
- async function dl(s, e, t, r, n, o) {
6030
+ async function pl(s, e, t, r, n, o) {
6016
6031
  var c;
6017
6032
  const i = await t.getLocalFileHandle(o), a = await Fe(
6018
6033
  e,
6019
6034
  ye["check_network.download_blob"],
6020
6035
  !0,
6021
- (l) => ({ file: l.createValue(L.JsonObject, JSON.stringify(i)) }),
6036
+ (l) => ({ file: l.createValue(D.JsonObject, JSON.stringify(i)) }),
6022
6037
  ["progress", "file"]
6023
6038
  );
6024
6039
  try {
6025
6040
  const l = await he(e, a.progress);
6026
- await En(
6041
+ await Pn(
6027
6042
  s,
6028
6043
  r,
6029
6044
  l,
6030
- Pn.parse(JSON.parse(D((c = l.data) == null ? void 0 : c.toString()))),
6045
+ On.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString()))),
6031
6046
  () => !1,
6032
6047
  {
6033
6048
  nPartsWithThisUploadSpeed: 1,
@@ -6037,21 +6052,21 @@ async function dl(s, e, t, r, n, o) {
6037
6052
  }
6038
6053
  );
6039
6054
  const u = await he(e, a.file), { content: d } = await n.downloadBlob(u);
6040
- return await ii(d);
6055
+ return await ai(d);
6041
6056
  } finally {
6042
6057
  await Te(e, Object.values(a));
6043
6058
  }
6044
6059
  }
6045
- async function pl(s) {
6060
+ async function fl(s) {
6046
6061
  try {
6047
- const e = await fl(s);
6062
+ const e = await hl(s);
6048
6063
  return e !== `Hello from go binary
6049
6064
  ` ? { status: "failed", message: `Software check failed: got: ${e}` } : { status: "ok", message: `Software check succeeded: ${e}` };
6050
6065
  } catch (e) {
6051
6066
  return { status: "failed", message: `Software check failed: error occurred: ${e}` };
6052
6067
  }
6053
6068
  }
6054
- async function fl(s) {
6069
+ async function hl(s) {
6055
6070
  var t;
6056
6071
  const e = await Fe(
6057
6072
  s,
@@ -6061,41 +6076,41 @@ async function fl(s) {
6061
6076
  ["greeting"]
6062
6077
  );
6063
6078
  try {
6064
- return D((t = (await he(s, e.greeting)).data) == null ? void 0 : t.toString());
6079
+ return N((t = (await he(s, e.greeting)).data) == null ? void 0 : t.toString());
6065
6080
  } finally {
6066
6081
  await Te(s, Object.values(e));
6067
6082
  }
6068
6083
  }
6069
- async function hl(s, e) {
6084
+ async function gl(s, e) {
6070
6085
  try {
6071
- const t = await gl(s, e);
6086
+ const t = await ml(s, e);
6072
6087
  return t !== `Hello, ${e}!
6073
6088
  ` ? { status: "failed", message: `Python software check failed: got: ${t}` } : { status: "ok", message: `Python software check succeeded: ${t}` };
6074
6089
  } catch (t) {
6075
6090
  return { status: "failed", message: `Python software check failed: error occurred: ${t}` };
6076
6091
  }
6077
6092
  }
6078
- async function gl(s, e) {
6093
+ async function ml(s, e) {
6079
6094
  var r;
6080
6095
  const t = await Fe(
6081
6096
  s,
6082
6097
  ye["check_network.run_hello_world_py"],
6083
6098
  !0,
6084
- (n) => ({ name: n.createValue(L.JsonObject, JSON.stringify(e)) }),
6099
+ (n) => ({ name: n.createValue(D.JsonObject, JSON.stringify(e)) }),
6085
6100
  ["greeting"]
6086
6101
  );
6087
6102
  try {
6088
- return D((r = (await he(s, t.greeting)).data) == null ? void 0 : r.toString());
6103
+ return N((r = (await he(s, t.greeting)).data) == null ? void 0 : r.toString());
6089
6104
  } finally {
6090
6105
  await Te(s, Object.values(t));
6091
6106
  }
6092
6107
  }
6093
- async function ml(s, e, t, r) {
6108
+ async function vl(s, e, t, r) {
6094
6109
  var n, o;
6095
6110
  try {
6096
6111
  const i = await t.getStorageList(), a = {};
6097
6112
  for (const c of i) {
6098
- const l = await vl(t, c, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
6113
+ const l = await yl(t, c, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
6099
6114
  if (l.file === void 0) {
6100
6115
  a[c.name] = {
6101
6116
  status: "warn",
@@ -6108,7 +6123,7 @@ async function ml(s, e, t, r) {
6108
6123
  e,
6109
6124
  ye["check_network.create_workdir_from_storage"],
6110
6125
  !0,
6111
- (d) => ({ file: d.createValue(L.JsonObject, JSON.stringify(l.file.handle)) }),
6126
+ (d) => ({ file: d.createValue(D.JsonObject, JSON.stringify(l.file.handle)) }),
6112
6127
  ["workdirTypeName"]
6113
6128
  );
6114
6129
  try {
@@ -6129,8 +6144,8 @@ async function ml(s, e, t, r) {
6129
6144
  return { unknown: { status: "failed", message: `Download from every storage failed: error occurred: ${i}` } };
6130
6145
  }
6131
6146
  }
6132
- async function vl(s, e, t, r, n, o) {
6133
- const i = no(s, e, "", 0);
6147
+ async function yl(s, e, t, r, n, o) {
6148
+ const i = oo(s, e, "", 0);
6134
6149
  let a, c = 0, l = 0;
6135
6150
  for await (const { file: u, nLsRequests: d } of i) {
6136
6151
  if (l = Math.max(l, d), c >= t && l > o)
@@ -6141,7 +6156,7 @@ async function vl(s, e, t, r, n, o) {
6141
6156
  }
6142
6157
  return { file: a, nLsRequests: l, nCheckedFiles: c };
6143
6158
  }
6144
- async function* no(s, e, t, r) {
6159
+ async function* oo(s, e, t, r) {
6145
6160
  r++;
6146
6161
  const n = await s.listRemoteFilesWithAdditionalInfo(e.handle, t);
6147
6162
  for (const o of n.entries)
@@ -6151,20 +6166,20 @@ async function* no(s, e, t, r) {
6151
6166
  nLsRequests: r
6152
6167
  };
6153
6168
  else if (o.type === "dir")
6154
- for await (const i of no(s, e, o.fullPath, r))
6169
+ for await (const i of oo(s, e, o.fullPath, r))
6155
6170
  r = Math.max(i.nLsRequests, r), yield i;
6156
6171
  }
6157
- async function yl() {
6158
- const s = _.join(In.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Mo(e);
6172
+ async function wl() {
6173
+ const s = _.join(Fn.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Go(e);
6159
6174
  return await ot.appendFile(s, t), { filePath: s };
6160
6175
  }
6161
- async function wl() {
6162
- const s = _.join(In.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
6176
+ async function Sl() {
6177
+ const s = _.join(Fn.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
6163
6178
  return await ot.writeFile(s, e), { filePath: s, fileContent: e };
6164
6179
  }
6165
6180
  async function Fe(s, e, t, r, n) {
6166
6181
  return await s.withWriteTx("TemplateRender", async (o) => {
6167
- const i = await Bn(e), a = dt(o, i), c = Tr(
6182
+ const i = await jn(e), a = dt(o, i), c = Tr(
6168
6183
  o,
6169
6184
  a,
6170
6185
  t,
@@ -6172,21 +6187,21 @@ async function Fe(s, e, t, r, n) {
6172
6187
  n
6173
6188
  ), l = {};
6174
6189
  for (const u of n) {
6175
- const d = M(s.clientRoot, u);
6176
- o.createField(d, "Dynamic", c[u]), l[u] = await Do(d);
6190
+ const d = J(s.clientRoot, u);
6191
+ o.createField(d, "Dynamic", c[u]), l[u] = await No(d);
6177
6192
  }
6178
6193
  return await o.commit(), l;
6179
6194
  });
6180
6195
  }
6181
6196
  async function he(s, e) {
6182
- return await No(s, async (t) => {
6197
+ return await Bo(s, async (t) => {
6183
6198
  const r = await t.tx.getField(e);
6184
6199
  if (mr(r.error)) {
6185
6200
  const n = await t.tx.getResourceData(r.error, !0);
6186
6201
  throw new Error(`getFieldValue of "${e.fieldName}" field failed: ${n.data}`);
6187
6202
  }
6188
6203
  if (Ue(r.value))
6189
- throw new Bo();
6204
+ throw new jo();
6190
6205
  return await t.tx.getResourceData(r.value, !0);
6191
6206
  });
6192
6207
  }
@@ -6197,10 +6212,10 @@ async function Te(s, e) {
6197
6212
  await t.commit();
6198
6213
  });
6199
6214
  }
6200
- async function au(s, e, t, r = {}) {
6215
+ async function cu(s, e, t, r = {}) {
6201
6216
  const n = [];
6202
- kl.forEach((o) => {
6203
- oi(o).subscribe((a) => {
6217
+ Rl.forEach((o) => {
6218
+ ii(o).subscribe((a) => {
6204
6219
  var u, d;
6205
6220
  const c = (/* @__PURE__ */ new Date()).toISOString(), l = { ...a };
6206
6221
  (u = l == null ? void 0 : l.response) != null && u.headers && (l.response = { ...l.response }, l.response.headers = l.response.headers.slice(), l.response.headers = l.response.headers.map((p) => p.toString())), (d = l == null ? void 0 : l.request) != null && d.body && (l.request = { ...l.request }, l.request.body = "too big"), n.push(
@@ -6223,19 +6238,19 @@ async function au(s, e, t, r = {}) {
6223
6238
  lsDriver: d,
6224
6239
  httpClient: p,
6225
6240
  ops: f
6226
- } = await Sl(s, e, t, r), { filePath: v, fileContent: h } = await wl(), { filePath: S } = await yl(), E = {
6227
- plPings: await Zc(f, i),
6228
- blockRegistryOverviewChecks: await el(f, p),
6229
- blockGARegistryOverviewChecks: await tl(f, p),
6230
- blockRegistryUiChecks: await rl(f, p),
6231
- blockGARegistryUiChecks: await sl(f, p),
6232
- autoUpdateCdnChecks: await nl(f, p),
6233
- uploadTemplateCheck: await il(o, a, "Jack"),
6234
- uploadFileCheck: await cl(o, c, d, u, a, S),
6235
- downloadFileCheck: await ul(o, a, d, u, l, v, h),
6236
- softwareCheck: await pl(a),
6237
- pythonSoftwareCheck: await hl(a, "Jack"),
6238
- storageToDownloadReport: await ml(
6241
+ } = await bl(s, e, t, r), { filePath: v, fileContent: h } = await Sl(), { filePath: S } = await wl(), E = {
6242
+ plPings: await el(f, i),
6243
+ blockRegistryOverviewChecks: await tl(f, p),
6244
+ blockGARegistryOverviewChecks: await rl(f, p),
6245
+ blockRegistryUiChecks: await sl(f, p),
6246
+ blockGARegistryUiChecks: await nl(f, p),
6247
+ autoUpdateCdnChecks: await ol(f, p),
6248
+ uploadTemplateCheck: await al(o, a, "Jack"),
6249
+ uploadFileCheck: await ll(o, c, d, u, a, S),
6250
+ downloadFileCheck: await dl(o, a, d, u, l, v, h),
6251
+ softwareCheck: await fl(a),
6252
+ pythonSoftwareCheck: await gl(a, "Jack"),
6253
+ storageToDownloadReport: await vl(
6239
6254
  o,
6240
6255
  a,
6241
6256
  d,
@@ -6248,12 +6263,12 @@ async function au(s, e, t, r = {}) {
6248
6263
  }
6249
6264
  )
6250
6265
  };
6251
- return bl(E, s, f, n);
6266
+ return kl(E, s, f, n);
6252
6267
  } catch (o) {
6253
6268
  return `Unhandled error while checking the network: ${o}`;
6254
6269
  }
6255
6270
  }
6256
- async function Sl(s, e, t, r = {}) {
6271
+ async function bl(s, e, t, r = {}) {
6257
6272
  const n = {
6258
6273
  pingCheckDurationMs: 1e4,
6259
6274
  pingTimeoutMs: 3e3,
@@ -6276,14 +6291,14 @@ async function Sl(s, e, t, r = {}) {
6276
6291
  everyStorageNFilesToCheck: 300,
6277
6292
  everyStorageMinLsRequests: 50,
6278
6293
  ...r
6279
- }, o = jo(s, {
6294
+ }, o = xo(s, {
6280
6295
  defaultRequestTimeout: n.pingTimeoutMs
6281
6296
  });
6282
6297
  o.alternativeRoot = `check_network_${ve()}`;
6283
- const i = new yn(o);
6298
+ const i = new wn(o);
6284
6299
  let a = {};
6285
6300
  e && t && (a = await i.login(e, t));
6286
- const c = await vn.init(s, { authInformation: a }), l = i.ll.httpDispatcher, u = new gn(), d = new Cr("localSecret"), p = kn(u, c, []), f = Rn(c, u), v = await Cn.init(
6301
+ const c = await yn.init(s, { authInformation: a }), l = i.ll.httpDispatcher, u = new mn(), d = new Cr("localSecret"), p = Rn(u, c, []), f = Cn(c, u), v = await En.init(
6287
6302
  u,
6288
6303
  c,
6289
6304
  d,
@@ -6306,7 +6321,7 @@ async function Sl(s, e, t, r = {}) {
6306
6321
  }
6307
6322
  };
6308
6323
  }
6309
- function bl(s, e, t, r) {
6324
+ function kl(s, e, t, r) {
6310
6325
  const n = s.plPings.filter((S) => S.response.ok), o = s.plPings.filter((S) => !S.response.ok), i = [
6311
6326
  ...new Set(n.map((S) => JSON.stringify(S.response.value)))
6312
6327
  ], a = (S) => S ? "OK" : "FAILED", c = (S) => S.status === "ok" ? "OK" : S.status === "warn" ? "WARN" : "FAILED", l = be(s.plPings), u = be(s.blockRegistryOverviewChecks), d = be(s.blockGARegistryOverviewChecks), p = be(s.blockRegistryUiChecks), f = be(s.blockGARegistryUiChecks), v = be(s.autoUpdateCdnChecks), h = Object.entries(s.storageToDownloadReport).map(([S, E]) => `${c(E)} ${S} storage check`).join(`
@@ -6378,7 +6393,7 @@ ${r.join(`
6378
6393
  `)}
6379
6394
  `;
6380
6395
  }
6381
- const kl = [
6396
+ const Rl = [
6382
6397
  "undici:request:create",
6383
6398
  // When a new request is created
6384
6399
  "undici:request:bodySent",
@@ -6417,34 +6432,34 @@ const kl = [
6417
6432
  // When a dispatcher retries a request
6418
6433
  ];
6419
6434
  export {
6420
- Zl as BlockPackRegistry,
6421
- eu as CentralBlockRegistry,
6422
- Qn as DefaultDriverKitOpsPaths,
6423
- Yn as DefaultDriverKitOpsSettings,
6424
- gc as DefaultMiddleLayerOpsPaths,
6425
- hc as DefaultMiddleLayerOpsSettings,
6426
- xn as FrontendFromFolderResourceType,
6427
- jn as FrontendFromUrlResourceType,
6428
- so as MiddleLayer,
6435
+ eu as BlockPackRegistry,
6436
+ tu as CentralBlockRegistry,
6437
+ Zn as DefaultDriverKitOpsPaths,
6438
+ Qn as DefaultDriverKitOpsSettings,
6439
+ mc as DefaultMiddleLayerOpsPaths,
6440
+ gc as DefaultMiddleLayerOpsSettings,
6441
+ Vn as FrontendFromFolderResourceType,
6442
+ xn as FrontendFromUrlResourceType,
6443
+ no as MiddleLayer,
6429
6444
  Lr as Project,
6430
- Bi as TengoTemplateGet,
6431
- ji as TengoTemplateGetRegistry,
6432
- Vi as TengoTemplateGetTemplate,
6433
- xi as TengoTemplateGetTemplateURI,
6434
- su as TengoTemplatePack,
6435
- nu as TengoTemplatePackConvert,
6436
- iu as TengoTemplatePackConvertTemplate,
6437
- ou as TengoTemplatePackConvertTemplatePack,
6438
- ru as V1CentralDevSnapshotRegistry,
6439
- tu as V1CentralRegistry,
6440
- hi as V2RegistryProvider,
6441
- au as checkNetwork,
6445
+ ji as TengoTemplateGet,
6446
+ xi as TengoTemplateGetRegistry,
6447
+ Ui as TengoTemplateGetTemplate,
6448
+ Vi as TengoTemplateGetTemplateURI,
6449
+ nu as TengoTemplatePack,
6450
+ ou as TengoTemplatePackConvert,
6451
+ au as TengoTemplatePackConvertTemplate,
6452
+ iu as TengoTemplatePackConvertTemplatePack,
6453
+ su as V1CentralDevSnapshotRegistry,
6454
+ ru as V1CentralRegistry,
6455
+ gi as V2RegistryProvider,
6456
+ cu as checkNetwork,
6442
6457
  Tr as createRenderTemplate,
6443
- Tn as getDevV1PacketMtime,
6458
+ $n as getDevV1PacketMtime,
6444
6459
  Ir as getDevV2PacketMtime,
6445
- Yc as initDriverKit,
6446
- Sl as initNetworkCheck,
6460
+ Qc as initDriverKit,
6461
+ bl as initNetworkCheck,
6447
6462
  dt as loadTemplate,
6448
- Bn as prepareTemplateSpec
6463
+ jn as prepareTemplateSpec
6449
6464
  };
6450
6465
  //# sourceMappingURL=index.mjs.map