@milaboratories/pl-middle-layer 1.36.2 → 1.36.4

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
@@ -3,7 +3,7 @@ var Qt = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Zt = (s) =>
3
3
  throw TypeError(s);
4
4
  };
5
5
  var Gs = (s, e, t) => e in s ? Us(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var S = (s, e, t) => Gs(s, typeof e != "symbol" ? e + "" : e, t);
6
+ var w = (s, e, t) => Gs(s, typeof e != "symbol" ? e + "" : e, t);
7
7
  var er = (s, e, t) => {
8
8
  if (e != null) {
9
9
  typeof e != "object" && typeof e != "function" && Zt("Object expected");
@@ -37,29 +37,29 @@ import Q from "node:fs";
37
37
  import * as Ys from "node:path";
38
38
  import _ from "node:path";
39
39
  import Qs from "yaml";
40
- import { assertNever as H, notEmpty as j, deepFreeze as et, ConsoleLoggerAdapter as Zs, ensureDirExists as eo, HmacSha256Signer as Zr } from "@milaboratories/ts-helpers";
40
+ import { assertNever as H, notEmpty as j, deepFreeze as et, ConsoleLoggerAdapter as Zs, ConcurrencyLimitingExecutor as eo, emptyDir as to, HmacSha256Signer as Zr } from "@milaboratories/ts-helpers";
41
41
  import * as es from "node:fs/promises";
42
42
  import or from "node:fs/promises";
43
- import { tryResolve as to } from "@milaboratories/resolve-helper";
44
- import { resourceTypesEqual as le, field as U, Pl as A, PlClient as ro, isNullResourceId as tt, ensureResourceIdNotNull as Et, isResource as so, isResourceRef as oo, isNotNullResourceId as nr, resourceType as xe, resourceTypeToString as no, stringifyWithResourceId as Ue, resourceIdToString as Se, isNotFoundError as io, isTimeoutOrCancelError as ao, toGlobalResourceId as co, plAddressToConfig as lo, UnauthenticatedPlClient as ir } from "@milaboratories/pl-client";
43
+ import { tryResolve as ro } from "@milaboratories/resolve-helper";
44
+ import { resourceTypesEqual as le, field as U, Pl as A, PlClient as so, isNullResourceId as tt, ensureResourceIdNotNull as Et, isResource as oo, isResourceRef as no, isNotNullResourceId as nr, resourceType as xe, resourceTypeToString as io, stringifyWithResourceId as Ue, resourceIdToString as Se, isNotFoundError as ao, isTimeoutOrCancelError as co, toGlobalResourceId as lo, plAddressToConfig as uo, UnauthenticatedPlClient as ir } from "@milaboratories/pl-client";
45
45
  export * from "@milaboratories/pl-client";
46
- import { SynchronizedTreeState as ts, treeDumpStats as uo, isPlTreeNodeAccessor as po } from "@milaboratories/pl-tree";
47
- import { Computable as J, ChangeSource as ar, PollComputablePool as fo, WatchableValue as ho } from "@milaboratories/computable";
46
+ import { SynchronizedTreeState as ts, treeDumpStats as po, isPlTreeNodeAccessor as fo } from "@milaboratories/pl-tree";
47
+ import { Computable as J, ChangeSource as ar, PollComputablePool as ho, WatchableValue as go } from "@milaboratories/computable";
48
48
  import { randomUUID as be, createHash as Ee } from "node:crypto";
49
- import { PlTemplateV1 as K, PlTemplateOverrideV1 as we, PlTemplateLibV1 as de, PlTemplateSoftwareV1 as ne, parseTemplate as go } from "@milaboratories/pl-model-backend";
49
+ import { PlTemplateV1 as K, PlTemplateOverrideV1 as we, PlTemplateLibV1 as de, PlTemplateSoftwareV1 as ne, parseTemplate as mo } from "@milaboratories/pl-model-backend";
50
50
  import { LRUCache as rs } from "lru-cache";
51
- import { Worker as mo } from "node:worker_threads";
51
+ import { Worker as vo } from "node:worker_threads";
52
52
  import ss from "denque";
53
- import { Templates as vo } from "@platforma-sdk/workflow-tengo";
53
+ import { Templates as yo } from "@platforma-sdk/workflow-tengo";
54
54
  import N from "canonicalize";
55
- import yo from "node:assert";
56
- import { Scope as Ct, errors as wo, getQuickJS as So } from "quickjs-emscripten";
57
- import { PlQuickJSError as bo } from "@milaboratories/pl-errors";
55
+ import wo from "node:assert";
56
+ import { Scope as Ct, errors as So, getQuickJS as bo } from "quickjs-emscripten";
57
+ import { PlQuickJSError as Ro } from "@milaboratories/pl-errors";
58
58
  import * as cr from "remeda";
59
59
  import { setTimeout as os } from "node:timers/promises";
60
- import { createDownloadClient as Ro, createLogsClient as Eo, createUploadBlobClient as Co, createUploadProgressClient as ko, DownloadDriver as Po, DownloadBlobToURLDriver as Oo, UploadDriver as $o, LogsStreamDriver as Io, LogsDriver as Fo, LsDriver as Ao, DownloadUrlDriver as To } from "@milaboratories/pl-drivers";
61
- import { PFrame as Lo } from "@milaboratories/pframes-rs-node";
62
- import { channel as Do } from "node:diagnostics_channel";
60
+ import { createDownloadClient as Eo, createLogsClient as Co, createUploadBlobClient as ko, createUploadProgressClient as Po, DownloadDriver as Oo, DownloadBlobToURLDriver as $o, UploadDriver as Io, LogsStreamDriver as Fo, LogsDriver as Ao, LsDriver as To, DownloadUrlDriver as Lo } from "@milaboratories/pl-drivers";
61
+ import { PFrame as Do } from "@milaboratories/pframes-rs-node";
62
+ import { channel as No } from "node:diagnostics_channel";
63
63
  async function lr(s) {
64
64
  try {
65
65
  return await es.stat(s, { bigint: !0 });
@@ -69,34 +69,34 @@ async function lr(s) {
69
69
  throw e;
70
70
  }
71
71
  }
72
- const No = [fe.PlPackageYamlConfigFile], Bo = [fe.PlPackageJsonConfigFile], Nt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Bt = ["config", "dist", "config.json"], ns = ["frontend", "dist"], ur = "block-model/dist/config.json", jo = "block-ui/package.json", xo = [
72
+ const Bo = [fe.PlPackageYamlConfigFile], jo = [fe.PlPackageJsonConfigFile], Nt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Bt = ["config", "dist", "config.json"], ns = ["frontend", "dist"], ur = "block-model/dist/config.json", xo = "block-ui/package.json", Vo = [
73
73
  Nt,
74
74
  Bt,
75
- No,
76
75
  Bo,
76
+ jo,
77
77
  ns
78
78
  ];
79
- async function Vo(s) {
79
+ async function Uo(s) {
80
80
  return await lr(_.join(s, ...Bt)) !== void 0 || await lr(_.join(s, ...Nt)) !== void 0;
81
81
  }
82
82
  function pt(s, e) {
83
- const t = to(s, e);
83
+ const t = ro(s, e);
84
84
  if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
85
85
  return t;
86
86
  }
87
87
  async function dr(s, e) {
88
- if (_.isAbsolute(s) || (s = _.resolve(s)), await Vo(s))
88
+ if (_.isAbsolute(s) || (s = _.resolve(s)), await Uo(s))
89
89
  return {
90
90
  workflow: _.join(s, ...Nt),
91
91
  config: _.join(s, ...Bt),
92
92
  ui: _.join(s, ...ns)
93
93
  };
94
94
  {
95
- const t = pt(s, ur), r = pt(s, ur), o = pt(s, jo);
95
+ const t = pt(s, ur), r = pt(s, ur), o = pt(s, xo);
96
96
  return { workflow: t, config: r, ui: _.resolve(o, "..", "dist") };
97
97
  }
98
98
  }
99
- async function Uo(s) {
99
+ async function Go(s) {
100
100
  try {
101
101
  return await Q.promises.readFile(s, "utf8");
102
102
  } catch (e) {
@@ -105,7 +105,7 @@ async function Uo(s) {
105
105
  throw e;
106
106
  }
107
107
  }
108
- async function Go(s) {
108
+ async function Jo(s) {
109
109
  try {
110
110
  return await Q.promises.stat(s, { bigint: !0 });
111
111
  } catch (e) {
@@ -116,8 +116,8 @@ async function Go(s) {
116
116
  }
117
117
  async function is(s) {
118
118
  let e = 0n;
119
- for (const t of xo) {
120
- const r = _.join(s, ...t), o = await Go(r);
119
+ for (const t of Vo) {
120
+ const r = _.join(s, ...t), o = await Jo(r);
121
121
  o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
122
122
  }
123
123
  return e.toString();
@@ -128,7 +128,7 @@ async function jt(s) {
128
128
  }), t = await Q.promises.stat(s.components.model.file, { bigint: !0 });
129
129
  return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
130
130
  }
131
- class Ru {
131
+ class Eu {
132
132
  constructor(e, t, r) {
133
133
  this.v2Provider = e, this.registries = t, this.http = r;
134
134
  }
@@ -178,7 +178,7 @@ class Ru {
178
178
  case "local-dev":
179
179
  for (const o of await Q.promises.readdir(r.path, { withFileTypes: !0 })) {
180
180
  if (!o.isDirectory()) continue;
181
- const n = _.join(r.path, o.name), i = await Uo(
181
+ const n = _.join(r.path, o.name), i = await Go(
182
182
  _.join(n, fe.PlPackageYamlConfigFile)
183
183
  );
184
184
  if (i !== void 0) {
@@ -261,9 +261,9 @@ class Ru {
261
261
  return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
262
262
  }
263
263
  }
264
- class Jo {
264
+ class Mo {
265
265
  constructor(e) {
266
- S(this, "registries", /* @__PURE__ */ new Map());
266
+ w(this, "registries", /* @__PURE__ */ new Map());
267
267
  this.http = e;
268
268
  }
269
269
  getRegistry(e) {
@@ -273,58 +273,58 @@ class Jo {
273
273
  return this.registries.set(e, r), r;
274
274
  }
275
275
  }
276
- const Eu = {
276
+ const Cu = {
277
277
  type: "remote-v2",
278
278
  url: "https://blocks.pl-open.science/"
279
- }, Cu = {
279
+ }, ku = {
280
280
  type: "remote-v1",
281
281
  url: "https://block.registry.platforma.bio/releases"
282
- }, ku = {
282
+ }, Pu = {
283
283
  type: "remote-v1",
284
284
  url: "https://block.registry.platforma.bio/dev"
285
- }, Mo = {
286
- groups: [{ id: "default", label: "Default", blocks: [] }]
287
285
  }, _o = {
286
+ groups: [{ id: "default", label: "Default", blocks: [] }]
287
+ }, Ko = {
288
288
  stagingRefreshTimestamp: 0,
289
289
  blocksInLimbo: []
290
- }, Ko = {
290
+ }, Ho = {
291
291
  label: "New Project"
292
- }, Ho = { name: "UserProject", version: "2" }, as = "SchemaVersion", cs = "1", xt = "ProjectCreated", Be = "ProjectLastModified", je = "ProjectMeta", he = "ProjectStructure", rt = "BlockRenderingState", Wo = "BlockFrontendState/", qo = /^BlockFrontendState\/(?<blockid>.*)$/;
292
+ }, Wo = { name: "UserProject", version: "2" }, as = "SchemaVersion", cs = "1", xt = "ProjectCreated", Be = "ProjectLastModified", je = "ProjectMeta", he = "ProjectStructure", rt = "BlockRenderingState", qo = "BlockFrontendState/", zo = /^BlockFrontendState\/(?<blockid>.*)$/;
293
293
  function kt(s) {
294
- return `${Wo}${s}`;
294
+ return `${qo}${s}`;
295
295
  }
296
- const zo = "BlockArgsAuthor/";
296
+ const Xo = "BlockArgsAuthor/";
297
297
  function Pt(s) {
298
- return `${zo}${s}`;
298
+ return `${Xo}${s}`;
299
299
  }
300
300
  const Ot = "ProjectStructureAuthor";
301
- function Xo(s) {
302
- const e = s.match(qo);
301
+ function Yo(s) {
302
+ const e = s.match(zo);
303
303
  if (e !== null)
304
304
  return e.groups.blockid;
305
305
  }
306
- const Yo = "__serviceTemplate_";
306
+ const Qo = "__serviceTemplate_";
307
307
  function $t(s) {
308
- return `${Yo}${s}`;
308
+ return `${Qo}${s}`;
309
309
  }
310
310
  function G(s, e) {
311
311
  return `${s}-${e}`;
312
312
  }
313
- const Qo = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
314
- function Zo(s) {
315
- const e = s.match(Qo);
313
+ const Zo = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
314
+ function en(s) {
315
+ const e = s.match(Zo);
316
316
  if (e === null) return;
317
317
  const { blockId: t, fieldName: r } = e.groups;
318
318
  return { blockId: t, fieldName: r };
319
319
  }
320
- const en = "projects", ls = { name: "Projects", version: "1" }, tn = (s) => le(s.type, ls) ? s.fields : [];
321
- async function rn(s, e, t, r) {
320
+ const tn = "projects", ls = { name: "Projects", version: "1" }, rn = (s) => le(s.type, ls) ? s.fields : [];
321
+ async function sn(s, e, t, r) {
322
322
  const o = await ts.init(
323
323
  s,
324
324
  e,
325
325
  {
326
326
  ...r.ops.defaultTreeOptions,
327
- pruning: tn
327
+ pruning: rn
328
328
  },
329
329
  r.logger
330
330
  );
@@ -348,33 +348,33 @@ async function rn(s, e, t, r) {
348
348
  return u.sort((l) => -l.lastModified.valueOf()), u;
349
349
  }).withStableType(), tree: o };
350
350
  }
351
- const sn = {
351
+ const on = {
352
352
  name: "EphRenderTemplate",
353
353
  version: "1"
354
- }, on = {
354
+ }, nn = {
355
355
  name: "RenderTemplate",
356
356
  version: "1"
357
357
  };
358
358
  function us(s, e, t, r, o) {
359
359
  if (o.length === 0) throw new Error("Zero output names provided");
360
- const n = t ? s.createEphemeral(sn) : s.createStruct(on), i = U(n, "template"), a = U(n, "inputs");
360
+ const n = t ? s.createEphemeral(on) : s.createStruct(nn), i = U(n, "template"), a = U(n, "inputs");
361
361
  return s.createField(i, "Input", e), s.createField(a, "Input", A.createPlMap(s, r, t)), s.lockInputs(n), A.futureRecord(s, n, o, "Output", "outputs/");
362
362
  }
363
- const nn = { name: "BContextEnd", version: "1" }, an = { name: "BContext", version: "1" }, cn = "id", ln = "parent/", un = ["context", "result"];
363
+ const an = { name: "BContextEnd", version: "1" }, cn = { name: "BContext", version: "1" }, ln = "id", un = "parent/", dn = ["context", "result"];
364
364
  function pr(s, e, t) {
365
- return us(s, e, !0, t, un);
365
+ return us(s, e, !0, t, dn);
366
366
  }
367
- function dn(s) {
368
- const e = s.createEphemeral(nn);
367
+ function pn(s) {
368
+ const e = s.createEphemeral(an);
369
369
  return s.lock(e), e;
370
370
  }
371
371
  function fr(s, e) {
372
- if (e.length === 0) return dn(s);
372
+ if (e.length === 0) return pn(s);
373
373
  if (e.length === 1) return e[0];
374
- const t = s.createEphemeral(an);
375
- s.createField(U(t, cn), "Input", A.createPlString(s, be()));
374
+ const t = s.createEphemeral(cn);
375
+ s.createField(U(t, ln), "Input", A.createPlString(s, be()));
376
376
  for (let r = 0; r < e.length; r++)
377
- s.createField(U(t, `${ln}${r}`), "Input", e[r]);
377
+ s.createField(U(t, `${un}${r}`), "Input", e[r]);
378
378
  return s.lock(t), t;
379
379
  }
380
380
  function ds(s, e) {
@@ -456,8 +456,8 @@ function Re(s, e, t) {
456
456
  `trying to get "${s}" source: sources map doesn't contain source hash ${t}`
457
457
  );
458
458
  }
459
- function pn(s, e) {
460
- const t = go(e.content), r = t.type;
459
+ function fn(s, e) {
460
+ const t = mo(e.content), r = t.type;
461
461
  switch (r) {
462
462
  case "pl.tengo-template.v2":
463
463
  return hs(s, t);
@@ -467,7 +467,7 @@ function pn(s, e) {
467
467
  H(r);
468
468
  }
469
469
  }
470
- function fn(s, e) {
470
+ function hn(s, e) {
471
471
  const t = e.data, r = t.type;
472
472
  switch (r) {
473
473
  case "pl.tengo-template.v2":
@@ -551,11 +551,11 @@ function hs(s, e) {
551
551
  };
552
552
  return r(e, fs);
553
553
  }
554
- const hn = { name: "TengoTemplateGet", version: "1" }, gn = "registry", mn = "templateURI", vn = "template", Pu = { name: "TengoTemplatePack", version: "1" }, Ou = {
554
+ const gn = { name: "TengoTemplateGet", version: "1" }, mn = "registry", vn = "templateURI", yn = "template", Ou = { name: "TengoTemplatePack", version: "1" }, $u = {
555
555
  name: "TengoTemplatePackConvert",
556
556
  version: "1"
557
- }, $u = "templatePack", Iu = "template";
558
- async function yn(s) {
557
+ }, Iu = "templatePack", Fu = "template";
558
+ async function wn(s) {
559
559
  switch (s.type) {
560
560
  case "from-file":
561
561
  return {
@@ -571,18 +571,18 @@ async function yn(s) {
571
571
  return H(s);
572
572
  }
573
573
  }
574
- function wn(s, e) {
575
- const t = s.createStruct(hn), r = U(t, gn), o = U(t, mn), n = U(t, vn);
574
+ function Sn(s, e) {
575
+ const t = s.createStruct(gn), r = U(t, mn), o = U(t, vn), n = U(t, yn);
576
576
  return s.setField(r, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
577
577
  }
578
578
  function Vt(s, e) {
579
579
  switch (e.type) {
580
580
  case "from-registry":
581
- return wn(s, e);
581
+ return Sn(s, e);
582
582
  case "explicit":
583
- return pn(s, e);
584
- case "prepared":
585
583
  return fn(s, e);
584
+ case "prepared":
585
+ return hn(s, e);
586
586
  default:
587
587
  return H(e);
588
588
  }
@@ -591,7 +591,7 @@ const gs = { name: "Frontend/FromUrl", version: "1" }, ms = {
591
591
  name: "Frontend/FromFolder",
592
592
  version: "1"
593
593
  };
594
- function Sn(s, e) {
594
+ function bn(s, e) {
595
595
  switch (e.type) {
596
596
  case "url":
597
597
  return s.createValue(
@@ -610,12 +610,12 @@ function Sn(s, e) {
610
610
  return H(e);
611
611
  }
612
612
  }
613
- class bn {
613
+ class Rn {
614
614
  constructor() {
615
- S(this, "nextMessageId", 0);
616
- S(this, "worker");
617
- S(this, "pendingRequests", /* @__PURE__ */ new Map());
618
- const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new mo(
615
+ w(this, "nextMessageId", 0);
616
+ w(this, "worker");
617
+ w(this, "pendingRequests", /* @__PURE__ */ new Map());
618
+ const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new vo(
619
619
  e,
620
620
  {
621
621
  workerData: {}
@@ -646,19 +646,19 @@ class bn {
646
646
  return this.terminate();
647
647
  }
648
648
  }
649
- const Rn = { name: "BlockPackCustom", version: "1" }, vs = "template", ys = "frontend";
649
+ const En = { name: "BlockPackCustom", version: "1" }, vs = "template", ys = "frontend";
650
650
  function mr(s) {
651
651
  return s.endsWith("/") ? s : `${s}/`;
652
652
  }
653
- function En(s) {
653
+ function Cn(s) {
654
654
  return Buffer.from(s).toString("utf8");
655
655
  }
656
656
  function Me(s) {
657
- return JSON.parse(En(s));
657
+ return JSON.parse(Cn(s));
658
658
  }
659
- class Cn {
659
+ class kn {
660
660
  constructor(e, t, r) {
661
- S(this, "remoteContentCache", new rs({
661
+ w(this, "remoteContentCache", new rs({
662
662
  max: 500,
663
663
  maxSize: 128 * 1024 * 1024,
664
664
  fetchMethod: async (e) => {
@@ -703,7 +703,7 @@ class Cn {
703
703
  if (e.type === "prepared")
704
704
  return e;
705
705
  const t = await this.prepareWithoutUnpacking(e);
706
- const r = er(o, new bn(), !0);
706
+ const r = er(o, new Rn(), !0);
707
707
  return {
708
708
  ...t,
709
709
  type: "prepared",
@@ -802,14 +802,14 @@ class Cn {
802
802
  }
803
803
  }
804
804
  }
805
- function kn(s, e) {
806
- const t = { config: e.config, source: e.source }, r = s.createStruct(Rn, JSON.stringify(t));
807
- return s.createField(U(r, vs), "Input", Vt(s, e.template)), s.createField(U(r, ys), "Input", Sn(s, e.frontend)), s.lock(r), r;
805
+ function Pn(s, e) {
806
+ const t = { config: e.config, source: e.source }, r = s.createStruct(En, JSON.stringify(t));
807
+ return s.createField(U(r, vs), "Input", Vt(s, e.template)), s.createField(U(r, ys), "Input", bn(s, e.frontend)), s.lock(r), r;
808
808
  }
809
809
  function vr(s, e) {
810
810
  switch (e.type) {
811
811
  case "prepared":
812
- return kn(s, e);
812
+ return Pn(s, e);
813
813
  default:
814
814
  return H(e.type);
815
815
  }
@@ -817,7 +817,7 @@ function vr(s, e) {
817
817
  function _e(s, e) {
818
818
  return { __isRef: !0, blockId: s, name: e };
819
819
  }
820
- function Pn(s) {
820
+ function On(s) {
821
821
  return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
822
822
  }
823
823
  function It(s, e, t) {
@@ -833,7 +833,7 @@ function It(s, e, t) {
833
833
  return;
834
834
  case "object":
835
835
  if (e === null) return;
836
- if (Pn(e))
836
+ if (On(e))
837
837
  t === void 0 || t.has(e.blockId) ? s.upstreams.add(e.blockId) : s.missingReferences = !0;
838
838
  else if (Array.isArray(e))
839
839
  for (const o of e) It(s, o, t);
@@ -845,7 +845,7 @@ function It(s, e, t) {
845
845
  H(r);
846
846
  }
847
847
  }
848
- function On(s, e) {
848
+ function $n(s, e) {
849
849
  const t = { upstreams: /* @__PURE__ */ new Set(), missingReferences: !1 };
850
850
  return It(t, s, e), t;
851
851
  }
@@ -859,7 +859,7 @@ function ee(s) {
859
859
  class ws {
860
860
  constructor(e) {
861
861
  /** Nodes are stored in the map in topological order */
862
- S(this, "nodes");
862
+ w(this, "nodes");
863
863
  this.nodes = e;
864
864
  }
865
865
  traverseIds(e, ...t) {
@@ -903,7 +903,7 @@ function Ze(s, e) {
903
903
  for (const { id: n } of ee(s)) {
904
904
  const i = e(n);
905
905
  if (i === void 0) continue;
906
- const a = On(i, o), c = r.traverseIds("directDownstream", ...a.upstreams), u = /* @__PURE__ */ new Set();
906
+ const a = $n(i, o), c = r.traverseIds("directDownstream", ...a.upstreams), u = /* @__PURE__ */ new Set();
907
907
  for (const { id: d } of ee(s)) {
908
908
  if (d === n) break;
909
909
  if (c.has(d)) {
@@ -926,7 +926,7 @@ function Ze(s, e) {
926
926
  }
927
927
  return r;
928
928
  }
929
- function $n(s, e) {
929
+ function In(s, e) {
930
930
  if (s.size !== e.size) return !1;
931
931
  for (const t of s) if (!e.has(t)) return !1;
932
932
  return !0;
@@ -940,7 +940,7 @@ function yr(s, e) {
940
940
  const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
941
941
  return s.nodes.forEach((n) => {
942
942
  const i = e.nodes.get(n.id);
943
- i === void 0 ? t.add(n.id) : (!$n(n.upstream, i.upstream) || At(n.upstream, o)) && o.add(n.id);
943
+ i === void 0 ? t.add(n.id) : (!In(n.upstream, i.upstream) || At(n.upstream, o)) && o.add(n.id);
944
944
  }), e.nodes.forEach((n) => {
945
945
  s.nodes.has(n.id) ? At(n.upstream, o) && o.add(n.id) : r.add(n.id);
946
946
  }), { onlyInA: t, onlyInB: r, different: o };
@@ -948,14 +948,14 @@ function yr(s, e) {
948
948
  let ft;
949
949
  async function Ss() {
950
950
  if (ft === void 0) {
951
- const s = await yn(vo["pframes.export-pframe-for-ui"]);
951
+ const s = await wn(yo["pframes.export-pframe-for-ui"]);
952
952
  if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
953
953
  const e = Ee("sha256").update(s.content).digest("hex");
954
954
  ft = { spec: s, hash: e };
955
955
  }
956
956
  return ft;
957
957
  }
958
- function In(s, e, t) {
958
+ function Fn(s, e, t) {
959
959
  return us(s, e, !0, { pf: t }, ["result"]).result;
960
960
  }
961
961
  function ht(s, e) {
@@ -969,11 +969,11 @@ function ht(s, e) {
969
969
  }
970
970
  class wr {
971
971
  constructor(e, t) {
972
- S(this, "currentInputsC", ht(
972
+ w(this, "currentInputsC", ht(
973
973
  () => this.fields.currentArgs.modCount,
974
974
  () => et(JSON.parse(Buffer.from(this.fields.currentArgs.value).toString()))
975
975
  ));
976
- S(this, "actualProductionInputsC", ht(
976
+ w(this, "actualProductionInputsC", ht(
977
977
  () => {
978
978
  var e;
979
979
  return (e = this.fields.prodArgs) == null ? void 0 : e.modCount;
@@ -985,7 +985,7 @@ class wr {
985
985
  return et(JSON.parse(Buffer.from(e).toString()));
986
986
  }
987
987
  ));
988
- S(this, "productionStaleC", ht(
988
+ w(this, "productionStaleC", ht(
989
989
  () => {
990
990
  var e;
991
991
  return `${this.fields.currentArgs.modCount}_${(e = this.fields.prodArgs) == null ? void 0 : e.modCount}`;
@@ -1036,29 +1036,29 @@ class wr {
1036
1036
  );
1037
1037
  }
1038
1038
  }
1039
- const Fn = (s) => {
1039
+ const An = (s) => {
1040
1040
  throw new Error(`No new block info for ${s}`);
1041
1041
  };
1042
1042
  class st {
1043
1043
  constructor(e, t, r, o, n, i, a, c, u, l, d, f) {
1044
- S(this, "globalModCount", 0);
1045
- S(this, "fieldsChanged", !1);
1044
+ w(this, "globalModCount", 0);
1045
+ w(this, "fieldsChanged", !1);
1046
1046
  //
1047
1047
  // Change trackers
1048
1048
  //
1049
- S(this, "lastModifiedChanged", !1);
1050
- S(this, "structureChanged", !1);
1051
- S(this, "metaChanged", !1);
1052
- S(this, "renderingStateChanged", !1);
1053
- S(this, "changedBlockFrontendStates", /* @__PURE__ */ new Set());
1049
+ w(this, "lastModifiedChanged", !1);
1050
+ w(this, "structureChanged", !1);
1051
+ w(this, "metaChanged", !1);
1052
+ w(this, "renderingStateChanged", !1);
1053
+ w(this, "changedBlockFrontendStates", /* @__PURE__ */ new Set());
1054
1054
  /** Set blocks will be assigned current mutator author marker on save */
1055
- S(this, "blocksWithChangedInputs", /* @__PURE__ */ new Set());
1055
+ w(this, "blocksWithChangedInputs", /* @__PURE__ */ new Set());
1056
1056
  //
1057
1057
  // Graph calculation
1058
1058
  //
1059
- S(this, "stagingGraph");
1060
- S(this, "pendingProductionGraph");
1061
- S(this, "actualProductionGraph");
1059
+ w(this, "stagingGraph");
1060
+ w(this, "pendingProductionGraph");
1061
+ w(this, "actualProductionGraph");
1062
1062
  this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = a, this.renderingState = c, this.blocksInLimbo = u, this.blockInfos = l, this.blockFrontendStates = d, this.ctxExportTplHolder = f;
1063
1063
  }
1064
1064
  fixProblemsAndMigrate() {
@@ -1197,7 +1197,7 @@ class st {
1197
1197
  }), fr(this.tx, t);
1198
1198
  }
1199
1199
  exportCtx(e) {
1200
- return In(this.tx, A.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1200
+ return Fn(this.tx, A.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1201
1201
  }
1202
1202
  renderStagingFor(e) {
1203
1203
  this.resetStaging(e);
@@ -1238,7 +1238,7 @@ class st {
1238
1238
  // Structure changes
1239
1239
  //
1240
1240
  /** Very generic method, better check for more specialized case-specific methods first. */
1241
- updateStructure(e, t = Fn) {
1241
+ updateStructure(e, t = An) {
1242
1242
  const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = Ft(e), i = Ze(
1243
1243
  e,
1244
1244
  (u) => {
@@ -1462,7 +1462,7 @@ class st {
1462
1462
  );
1463
1463
  const $ = /* @__PURE__ */ new Map();
1464
1464
  for (const p of d.fields) {
1465
- const m = Zo(p.name);
1465
+ const m = en(p.name);
1466
1466
  if (m === void 0) continue;
1467
1467
  let y = $.get(m.blockId);
1468
1468
  y === void 0 && (y = {
@@ -1481,14 +1481,14 @@ class st {
1481
1481
  ));
1482
1482
  const ce = { stagingRefreshTimestamp: x }, z = new Set(T), ie = /* @__PURE__ */ new Map();
1483
1483
  for (const p of B) {
1484
- const m = Xo(p.key);
1484
+ const m = Yo(p.key);
1485
1485
  m !== void 0 && ie.set(m, p.value);
1486
1486
  }
1487
1487
  const Y = [];
1488
1488
  $.forEach(({ fields: p }) => {
1489
1489
  for (const [, m] of Object.entries(p))
1490
1490
  if (m.ref !== void 0) {
1491
- if (!so(m.ref) || oo(m.ref))
1491
+ if (!oo(m.ref) || no(m.ref))
1492
1492
  throw new Error("unexpected behaviour");
1493
1493
  Y.push([m, e.getResourceData(m.ref, !1)]);
1494
1494
  }
@@ -1527,11 +1527,11 @@ class st {
1527
1527
  return v.fixProblemsAndMigrate(), v;
1528
1528
  }
1529
1529
  }
1530
- async function An(s, e = Ko) {
1531
- const t = s.createEphemeral(Ho);
1530
+ async function Tn(s, e = Ho) {
1531
+ const t = s.createEphemeral(Wo);
1532
1532
  s.lock(t);
1533
1533
  const r = String(Date.now());
1534
- s.setKValue(t, as, JSON.stringify(cs)), s.setKValue(t, xt, r), s.setKValue(t, Be, r), s.setKValue(t, je, JSON.stringify(e)), s.setKValue(t, he, JSON.stringify(Mo)), s.setKValue(t, rt, JSON.stringify(_o));
1534
+ s.setKValue(t, as, JSON.stringify(cs)), s.setKValue(t, xt, r), s.setKValue(t, Be, r), s.setKValue(t, je, JSON.stringify(e)), s.setKValue(t, he, JSON.stringify(_o)), s.setKValue(t, rt, JSON.stringify(Ko));
1535
1535
  const o = await Ss();
1536
1536
  return s.createField(
1537
1537
  U(t, $t(o.hash)),
@@ -1543,7 +1543,7 @@ async function Ke(s, e, t) {
1543
1543
  return Z(s, e, void 0, t);
1544
1544
  }
1545
1545
  async function Z(s, e, t, r) {
1546
- if (s instanceof ro)
1546
+ if (s instanceof so)
1547
1547
  return await s.withWriteTx("ProjectAction", async (o) => {
1548
1548
  const n = await st.load(o, e, t), i = await r(n);
1549
1549
  return n.wasModified && (n.save(), await o.commit()), i;
@@ -1553,7 +1553,7 @@ async function Z(s, e, t, r) {
1553
1553
  return o.save(), n;
1554
1554
  }
1555
1555
  }
1556
- function* Tn(s) {
1556
+ function* Ln(s) {
1557
1557
  switch (s.type) {
1558
1558
  case "Json":
1559
1559
  return;
@@ -1573,7 +1573,7 @@ function Sr(s, e) {
1573
1573
  Object.entries(s).map(([t, r]) => [t, e(r, t)])
1574
1574
  );
1575
1575
  }
1576
- function Ln(s, e) {
1576
+ function Dn(s, e) {
1577
1577
  switch (s.type) {
1578
1578
  case "Json":
1579
1579
  return { ...s };
@@ -1591,26 +1591,26 @@ function Ln(s, e) {
1591
1591
  H(s);
1592
1592
  }
1593
1593
  }
1594
- const Dn = xe("PColumnData/JsonPartitioned", "1"), Nn = xe(
1594
+ const Nn = xe("PColumnData/JsonPartitioned", "1"), Bn = xe(
1595
1595
  "PColumnData/Partitioned/JsonPartitioned",
1596
1596
  "1"
1597
- ), Bn = xe("PColumnData/BinaryPartitioned", "1"), jn = xe(
1597
+ ), jn = xe("PColumnData/BinaryPartitioned", "1"), xn = xe(
1598
1598
  "PColumnData/Partitioned/BinaryPartitioned",
1599
1599
  "1"
1600
- ), xn = xe("PColumnData/Json", "1");
1601
- function Vn(s) {
1600
+ ), Vn = xe("PColumnData/Json", "1");
1601
+ function Un(s) {
1602
1602
  if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
1603
1603
  const e = s.getDataAsJson();
1604
1604
  if (e === void 0)
1605
1605
  throw new Error("unexpected data info structure, no resource data");
1606
- if (le(s.resourceType, xn)) {
1606
+ if (le(s.resourceType, Vn)) {
1607
1607
  const t = e;
1608
1608
  return {
1609
1609
  type: "Json",
1610
1610
  keyLength: t.keyLength,
1611
1611
  data: t.data
1612
1612
  };
1613
- } else if (le(s.resourceType, Dn)) {
1613
+ } else if (le(s.resourceType, Nn)) {
1614
1614
  const t = e, r = Object.fromEntries(
1615
1615
  s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
1616
1616
  );
@@ -1619,7 +1619,7 @@ function Vn(s) {
1619
1619
  partitionKeyLength: t.partitionKeyLength,
1620
1620
  parts: r
1621
1621
  };
1622
- } else if (le(s.resourceType, Nn)) {
1622
+ } else if (le(s.resourceType, Bn)) {
1623
1623
  const t = e, r = {};
1624
1624
  for (const o of s.listInputFields()) {
1625
1625
  const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
@@ -1637,7 +1637,7 @@ function Vn(s) {
1637
1637
  partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
1638
1638
  parts: r
1639
1639
  };
1640
- } else if (le(s.resourceType, Bn)) {
1640
+ } else if (le(s.resourceType, jn)) {
1641
1641
  const t = e, r = {};
1642
1642
  for (const o of s.listInputFields())
1643
1643
  if (o.endsWith(".index")) {
@@ -1658,7 +1658,7 @@ function Vn(s) {
1658
1658
  partitionKeyLength: t.partitionKeyLength,
1659
1659
  parts: r
1660
1660
  };
1661
- } else if (le(s.resourceType, jn)) {
1661
+ } else if (le(s.resourceType, xn)) {
1662
1662
  const t = e, r = {};
1663
1663
  for (const o of s.listInputFields()) {
1664
1664
  const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
@@ -1692,9 +1692,9 @@ function Vn(s) {
1692
1692
  parts: r
1693
1693
  };
1694
1694
  }
1695
- throw new Error(`unsupported resource type: ${no(s.resourceType)}`);
1695
+ throw new Error(`unsupported resource type: ${io(s.resourceType)}`);
1696
1696
  }
1697
- function Un(s, e) {
1697
+ function Gn(s, e) {
1698
1698
  const t = s.axesSpec.length, r = {};
1699
1699
  for (const { key: o, val: n } of e) {
1700
1700
  if (o.length !== t)
@@ -1707,14 +1707,14 @@ function Un(s, e) {
1707
1707
  data: r
1708
1708
  };
1709
1709
  }
1710
- function Gn(s, e) {
1710
+ function Jn(s, e) {
1711
1711
  const t = Ee("sha256");
1712
1712
  return t.update(N(s)), t.update(String(tt(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
1713
1713
  }
1714
1714
  function br(s, e) {
1715
1715
  return N({ __isRef: !0, blockId: s, name: e });
1716
1716
  }
1717
- function Jn(s, e) {
1717
+ function Mn(s, e) {
1718
1718
  return N({ resolvePath: s, name: e });
1719
1719
  }
1720
1720
  function bs(s, e = !0, t = !1, r = "") {
@@ -1755,10 +1755,10 @@ function bs(s, e = !0, t = !1, r = "") {
1755
1755
  for (const [, l] of n) l.data === void 0 && (l.hasData = !1);
1756
1756
  return { locked: i, results: n };
1757
1757
  }
1758
- function Mn(s, e = !0, t = "", r) {
1758
+ function _n(s, e = !0, t = "", r) {
1759
1759
  if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
1760
1760
  const o = bs(s, e, !1, t);
1761
- yo(o.locked);
1761
+ wo(o.locked);
1762
1762
  const n = {};
1763
1763
  for (const [i, a] of o.results) {
1764
1764
  if (a.spec === void 0) throw new Error(`no spec for key ${i}`);
@@ -1768,7 +1768,7 @@ function Mn(s, e = !0, t = "", r) {
1768
1768
  if (c === void 0) throw new Error(`no data for key ${i}`);
1769
1769
  if (!c.ok) throw c.error;
1770
1770
  n[i] = {
1771
- id: r.length === 0 ? Gn(a.spec, c.value) : Jn(r, i),
1771
+ id: r.length === 0 ? Jn(a.spec, c.value) : Mn(r, i),
1772
1772
  spec: a.spec,
1773
1773
  data: c.value
1774
1774
  };
@@ -1777,7 +1777,7 @@ function Mn(s, e = !0, t = "", r) {
1777
1777
  }
1778
1778
  class Ut {
1779
1779
  constructor(e, t) {
1780
- S(this, "allSpecsAvailable");
1780
+ w(this, "allSpecsAvailable");
1781
1781
  this.ctx = e, this.blocks = t;
1782
1782
  let r = !0;
1783
1783
  e: for (const o of t.values())
@@ -2046,7 +2046,7 @@ function* X(s, e) {
2046
2046
  H(s);
2047
2047
  }
2048
2048
  }
2049
- function _n(s, e) {
2049
+ function Kn(s, e) {
2050
2050
  const t = {};
2051
2051
  for (const [r, o] of Object.entries(s)) t[r] = e(o);
2052
2052
  return t;
@@ -2054,7 +2054,7 @@ function _n(s, e) {
2054
2054
  function Te(s, e) {
2055
2055
  return s === void 0 ? void 0 : e(s);
2056
2056
  }
2057
- function Kn(s) {
2057
+ function Hn(s) {
2058
2058
  switch (s.type) {
2059
2059
  case "GetImportProgress":
2060
2060
  return !0;
@@ -2062,8 +2062,8 @@ function Kn(s) {
2062
2062
  return !1;
2063
2063
  }
2064
2064
  }
2065
- function Hn(s) {
2066
- for (const e of X(s)) if (Kn(e)) return !0;
2065
+ function Wn(s) {
2066
+ for (const e of X(s)) if (Hn(e)) return !0;
2067
2067
  return !1;
2068
2068
  }
2069
2069
  function nt(s) {
@@ -2075,18 +2075,18 @@ function nt(s) {
2075
2075
  function k(s) {
2076
2076
  return () => nt(s);
2077
2077
  }
2078
- const Wn = (s) => {
2078
+ const qn = (s) => {
2079
2079
  const e = {};
2080
2080
  for (const [t, r] of Object.entries(s)) e[t] = r;
2081
2081
  return k(e);
2082
- }, qn = (s) => {
2082
+ }, zn = (s) => {
2083
2083
  const e = s.source;
2084
2084
  if (e === void 0) return k(void 0);
2085
2085
  const t = [];
2086
2086
  for (const r of e)
2087
2087
  r instanceof Array ? t.push(...r) : t.push(r);
2088
2088
  return k(t);
2089
- }, zn = (s) => {
2089
+ }, Xn = (s) => {
2090
2090
  const e = s.source, t = s.field;
2091
2091
  return e === void 0 || t === void 0 ? k(void 0) : ({ cCtx: r }) => {
2092
2092
  var o;
@@ -2098,7 +2098,7 @@ function Es(s, e) {
2098
2098
  for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
2099
2099
  return t;
2100
2100
  }
2101
- function Xn(s, e) {
2101
+ function Yn(s, e) {
2102
2102
  return (t) => {
2103
2103
  const r = t.source;
2104
2104
  return r === void 0 ? k(void 0) : () => ({
@@ -2115,7 +2115,7 @@ function Cs(s) {
2115
2115
  return k(t);
2116
2116
  };
2117
2117
  }
2118
- function Yn(s, e) {
2118
+ function Qn(s, e) {
2119
2119
  return (t) => {
2120
2120
  const r = t.source;
2121
2121
  if (r === void 0) return k(void 0);
@@ -2126,34 +2126,34 @@ function Yn(s, e) {
2126
2126
  }
2127
2127
  return () => ({
2128
2128
  type: "ScheduleSubroutine",
2129
- subroutine: Qn,
2129
+ subroutine: Zn,
2130
2130
  args: o
2131
2131
  });
2132
2132
  };
2133
2133
  }
2134
- const Qn = (s) => k(s), Zn = (s) => {
2134
+ const Zn = (s) => k(s), ei = (s) => {
2135
2135
  const e = s.arg;
2136
2136
  return k(e === void 0 ? void 0 : e.length === 0);
2137
- }, ei = (s) => {
2137
+ }, ti = (s) => {
2138
2138
  const e = s.operand;
2139
2139
  return k(e === void 0 ? void 0 : !e);
2140
- }, ti = (s) => {
2140
+ }, ri = (s) => {
2141
2141
  const e = s.operand1, t = s.operand2;
2142
2142
  return k(e === void 0 || t === void 0 ? void 0 : e && t);
2143
- }, ri = (s) => {
2143
+ }, si = (s) => {
2144
2144
  const e = s.operand1, t = s.operand2;
2145
2145
  return k(e === void 0 || t === void 0 ? void 0 : e || t);
2146
- }, si = (s) => {
2146
+ }, oi = (s) => {
2147
2147
  const e = s.source;
2148
2148
  return e === void 0 ? k(void 0) : ({ cCtx: t }) => {
2149
2149
  var r;
2150
2150
  return nt((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
2151
2151
  };
2152
- }, oi = (s) => {
2152
+ }, ni = (s) => {
2153
2153
  const e = s.source, t = s.field;
2154
2154
  return k(e === void 0 || t === void 0 ? void 0 : e[t]);
2155
2155
  };
2156
- function ni(s, e) {
2156
+ function ii(s, e) {
2157
2157
  return (t) => {
2158
2158
  const r = t.source;
2159
2159
  return r === void 0 ? k(void 0) : ({ cCtx: o }) => {
@@ -2168,13 +2168,13 @@ function ni(s, e) {
2168
2168
  }
2169
2169
  return {
2170
2170
  type: "ScheduleSubroutine",
2171
- subroutine: ii,
2171
+ subroutine: ai,
2172
2172
  args: i
2173
2173
  };
2174
2174
  };
2175
2175
  };
2176
2176
  }
2177
- const ii = (s) => k(s), ai = (s) => {
2177
+ const ai = (s) => k(s), ci = (s) => {
2178
2178
  const e = s.source;
2179
2179
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2180
2180
  type: "ScheduleComputable",
@@ -2188,7 +2188,7 @@ const ii = (s) => k(s), ai = (s) => {
2188
2188
  }
2189
2189
  )
2190
2190
  });
2191
- }, ci = (s) => {
2191
+ }, li = (s) => {
2192
2192
  const e = s.source;
2193
2193
  return e === void 0 ? k(void 0) : ({ cCtx: t, drivers: r }) => {
2194
2194
  const o = t.accessor(e).node().resourceInfo;
@@ -2199,7 +2199,7 @@ const ii = (s) => k(s), ai = (s) => {
2199
2199
  })
2200
2200
  };
2201
2201
  };
2202
- }, li = (s) => {
2202
+ }, ui = (s) => {
2203
2203
  const e = s.source;
2204
2204
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2205
2205
  type: "ScheduleComputable",
@@ -2215,49 +2215,49 @@ const ii = (s) => k(s), ai = (s) => {
2215
2215
  }
2216
2216
  )
2217
2217
  });
2218
- }, ui = (s) => {
2218
+ }, di = (s) => {
2219
2219
  const e = s.source;
2220
2220
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2221
2221
  type: "ScheduleComputable",
2222
2222
  computable: t.blobDriver.getDownloadedBlob(e)
2223
2223
  });
2224
- }, di = (s) => {
2224
+ }, pi = (s) => {
2225
2225
  const e = s.source;
2226
2226
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2227
2227
  type: "ScheduleComputable",
2228
2228
  computable: t.blobDriver.getOnDemandBlob(e)
2229
2229
  });
2230
- }, pi = (s) => (e) => {
2230
+ }, fi = (s) => (e) => {
2231
2231
  const t = e.source;
2232
2232
  return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
2233
2233
  type: "ScheduleComputable",
2234
2234
  computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
2235
2235
  });
2236
- }, fi = (s) => {
2236
+ }, hi = (s) => {
2237
2237
  const e = s.source;
2238
2238
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2239
2239
  type: "ScheduleComputable",
2240
2240
  computable: t.uploadDriver.getProgressId(e)
2241
2241
  });
2242
- }, hi = (s) => (e) => {
2242
+ }, gi = (s) => (e) => {
2243
2243
  const t = e.source;
2244
2244
  return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
2245
2245
  type: "ScheduleComputable",
2246
2246
  computable: r.logDriver.getLastLogs(t, s)
2247
2247
  });
2248
- }, gi = (s) => (e) => {
2248
+ }, mi = (s) => (e) => {
2249
2249
  const t = e.source;
2250
2250
  return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
2251
2251
  type: "ScheduleComputable",
2252
2252
  computable: r.logDriver.getProgressLog(t, s)
2253
2253
  });
2254
- }, mi = (s) => (e) => {
2254
+ }, vi = (s) => (e) => {
2255
2255
  const t = e.source;
2256
2256
  return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
2257
2257
  type: "ScheduleComputable",
2258
2258
  computable: r.logDriver.getProgressLogWithInfo(t, s)
2259
2259
  });
2260
- }, vi = (s) => {
2260
+ }, yi = (s) => {
2261
2261
  const e = s.source;
2262
2262
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2263
2263
  type: "ScheduleComputable",
@@ -2280,7 +2280,7 @@ function P(s, e) {
2280
2280
  case "GetJsonField":
2281
2281
  return () => ({
2282
2282
  type: "ScheduleSubroutine",
2283
- subroutine: oi,
2283
+ subroutine: ni,
2284
2284
  args: {
2285
2285
  source: P(s, e.source),
2286
2286
  field: P(s, e.field)
@@ -2289,7 +2289,7 @@ function P(s, e) {
2289
2289
  case "MapArrayValues":
2290
2290
  return () => ({
2291
2291
  type: "ScheduleSubroutine",
2292
- subroutine: Xn(s, e),
2292
+ subroutine: Yn(s, e),
2293
2293
  args: {
2294
2294
  source: P(s, e.source)
2295
2295
  }
@@ -2297,7 +2297,7 @@ function P(s, e) {
2297
2297
  case "MapRecordValues":
2298
2298
  return () => ({
2299
2299
  type: "ScheduleSubroutine",
2300
- subroutine: Yn(s, e),
2300
+ subroutine: Qn(s, e),
2301
2301
  args: {
2302
2302
  source: P(s, e.source)
2303
2303
  }
@@ -2305,8 +2305,8 @@ function P(s, e) {
2305
2305
  case "MakeObject":
2306
2306
  return () => ({
2307
2307
  type: "ScheduleSubroutine",
2308
- subroutine: Wn,
2309
- args: _n(e.template, (t) => P(s, t))
2308
+ subroutine: qn,
2309
+ args: Kn(e.template, (t) => P(s, t))
2310
2310
  });
2311
2311
  case "MakeArray":
2312
2312
  return () => ({
@@ -2317,7 +2317,7 @@ function P(s, e) {
2317
2317
  case "Flatten":
2318
2318
  return () => ({
2319
2319
  type: "ScheduleSubroutine",
2320
- subroutine: qn,
2320
+ subroutine: zn,
2321
2321
  args: {
2322
2322
  source: P(s, e.source)
2323
2323
  }
@@ -2325,7 +2325,7 @@ function P(s, e) {
2325
2325
  case "IsEmpty":
2326
2326
  return () => ({
2327
2327
  type: "ScheduleSubroutine",
2328
- subroutine: Zn,
2328
+ subroutine: ei,
2329
2329
  args: {
2330
2330
  arg: P(s, e.arg)
2331
2331
  }
@@ -2333,7 +2333,7 @@ function P(s, e) {
2333
2333
  case "Not":
2334
2334
  return () => ({
2335
2335
  type: "ScheduleSubroutine",
2336
- subroutine: ei,
2336
+ subroutine: ti,
2337
2337
  args: {
2338
2338
  operand: P(s, e.operand)
2339
2339
  }
@@ -2341,7 +2341,7 @@ function P(s, e) {
2341
2341
  case "And":
2342
2342
  return () => ({
2343
2343
  type: "ScheduleSubroutine",
2344
- subroutine: ti,
2344
+ subroutine: ri,
2345
2345
  args: {
2346
2346
  operand1: P(s, e.operand1),
2347
2347
  operand2: P(s, e.operand2)
@@ -2350,7 +2350,7 @@ function P(s, e) {
2350
2350
  case "Or":
2351
2351
  return () => ({
2352
2352
  type: "ScheduleSubroutine",
2353
- subroutine: ri,
2353
+ subroutine: si,
2354
2354
  args: {
2355
2355
  operand1: P(s, e.operand1),
2356
2356
  operand2: P(s, e.operand2)
@@ -2359,7 +2359,7 @@ function P(s, e) {
2359
2359
  case "MapResourceFields":
2360
2360
  return () => ({
2361
2361
  type: "ScheduleSubroutine",
2362
- subroutine: ni(s, e),
2362
+ subroutine: ii(s, e),
2363
2363
  args: {
2364
2364
  source: P(s, e.source)
2365
2365
  }
@@ -2367,7 +2367,7 @@ function P(s, e) {
2367
2367
  case "GetResourceField":
2368
2368
  return () => ({
2369
2369
  type: "ScheduleSubroutine",
2370
- subroutine: zn,
2370
+ subroutine: Xn,
2371
2371
  args: {
2372
2372
  source: P(s, e.source),
2373
2373
  field: P(s, e.field)
@@ -2376,7 +2376,7 @@ function P(s, e) {
2376
2376
  case "GetResourceValueAsJson":
2377
2377
  return () => ({
2378
2378
  type: "ScheduleSubroutine",
2379
- subroutine: si,
2379
+ subroutine: oi,
2380
2380
  args: {
2381
2381
  source: P(s, e.source)
2382
2382
  }
@@ -2384,7 +2384,7 @@ function P(s, e) {
2384
2384
  case "GetBlobContent":
2385
2385
  return () => ({
2386
2386
  type: "ScheduleSubroutine",
2387
- subroutine: ai,
2387
+ subroutine: ci,
2388
2388
  args: {
2389
2389
  source: P(s, e.source)
2390
2390
  }
@@ -2392,7 +2392,7 @@ function P(s, e) {
2392
2392
  case "GetBlobContentAsString":
2393
2393
  return () => ({
2394
2394
  type: "ScheduleSubroutine",
2395
- subroutine: ci,
2395
+ subroutine: li,
2396
2396
  args: {
2397
2397
  source: P(s, e.source)
2398
2398
  }
@@ -2400,7 +2400,7 @@ function P(s, e) {
2400
2400
  case "GetBlobContentAsJson":
2401
2401
  return () => ({
2402
2402
  type: "ScheduleSubroutine",
2403
- subroutine: li,
2403
+ subroutine: ui,
2404
2404
  args: {
2405
2405
  source: P(s, e.source)
2406
2406
  }
@@ -2408,7 +2408,7 @@ function P(s, e) {
2408
2408
  case "GetDownloadedBlobContent":
2409
2409
  return () => ({
2410
2410
  type: "ScheduleSubroutine",
2411
- subroutine: ui,
2411
+ subroutine: di,
2412
2412
  args: {
2413
2413
  source: P(s, e.source)
2414
2414
  }
@@ -2416,7 +2416,7 @@ function P(s, e) {
2416
2416
  case "GetOnDemandBlobContent":
2417
2417
  return () => ({
2418
2418
  type: "ScheduleSubroutine",
2419
- subroutine: di,
2419
+ subroutine: pi,
2420
2420
  args: {
2421
2421
  source: P(s, e.source)
2422
2422
  }
@@ -2424,7 +2424,7 @@ function P(s, e) {
2424
2424
  case "ExtractArchiveAndGetURL":
2425
2425
  return () => ({
2426
2426
  type: "ScheduleSubroutine",
2427
- subroutine: pi(e.format),
2427
+ subroutine: fi(e.format),
2428
2428
  args: {
2429
2429
  source: P(s, e.source)
2430
2430
  }
@@ -2432,7 +2432,7 @@ function P(s, e) {
2432
2432
  case "GetImportProgress":
2433
2433
  return () => ({
2434
2434
  type: "ScheduleSubroutine",
2435
- subroutine: fi,
2435
+ subroutine: hi,
2436
2436
  args: {
2437
2437
  source: P(s, e.source)
2438
2438
  }
@@ -2440,7 +2440,7 @@ function P(s, e) {
2440
2440
  case "GetLastLogs":
2441
2441
  return () => ({
2442
2442
  type: "ScheduleSubroutine",
2443
- subroutine: hi(e.lines),
2443
+ subroutine: gi(e.lines),
2444
2444
  args: {
2445
2445
  source: P(s, e.source)
2446
2446
  }
@@ -2448,7 +2448,7 @@ function P(s, e) {
2448
2448
  case "GetProgressLog":
2449
2449
  return () => ({
2450
2450
  type: "ScheduleSubroutine",
2451
- subroutine: gi(e.patternToSearch),
2451
+ subroutine: mi(e.patternToSearch),
2452
2452
  args: {
2453
2453
  source: P(s, e.source)
2454
2454
  }
@@ -2456,7 +2456,7 @@ function P(s, e) {
2456
2456
  case "GetProgressLogWithInfo":
2457
2457
  return () => ({
2458
2458
  type: "ScheduleSubroutine",
2459
- subroutine: mi(e.patternToSearch),
2459
+ subroutine: vi(e.patternToSearch),
2460
2460
  args: {
2461
2461
  source: P(s, e.source)
2462
2462
  }
@@ -2464,7 +2464,7 @@ function P(s, e) {
2464
2464
  case "GetLogHandle":
2465
2465
  return () => ({
2466
2466
  type: "ScheduleSubroutine",
2467
- subroutine: vi,
2467
+ subroutine: yi,
2468
2468
  args: {
2469
2469
  source: P(s, e.source)
2470
2470
  }
@@ -2473,8 +2473,8 @@ function P(s, e) {
2473
2473
  return H(e);
2474
2474
  }
2475
2475
  }
2476
- const yi = ["$prod", "$staging"];
2477
- function wi(s) {
2476
+ const wi = ["$prod", "$staging"];
2477
+ function Si(s) {
2478
2478
  return {
2479
2479
  $blockId: s.blockId,
2480
2480
  $args: (e) => JSON.parse(s.args(e)),
@@ -2486,16 +2486,16 @@ function wi(s) {
2486
2486
  $staging: s.staging
2487
2487
  };
2488
2488
  }
2489
- const ks = Symbol(), Ps = "return", Si = { op: ks, arg: Ps };
2490
- function bi(s) {
2489
+ const ks = Symbol(), Ps = "return", bi = { op: ks, arg: Ps };
2490
+ function Ri(s) {
2491
2491
  return s.op == ks && s.arg == Ps;
2492
2492
  }
2493
- function Ri() {
2493
+ function Ei() {
2494
2494
  return { pendingSubroutines: /* @__PURE__ */ new Map() };
2495
2495
  }
2496
2496
  function Er(s, e, t, r) {
2497
2497
  const o = new ss(t), n = (a, c) => {
2498
- if (bi(a))
2498
+ if (Ri(a))
2499
2499
  return e.result = c, !1;
2500
2500
  const u = j(e.pendingSubroutines.get(a.op));
2501
2501
  if (a.arg in u.args) throw new Error("argument already set");
@@ -2547,26 +2547,26 @@ function Er(s, e, t, r) {
2547
2547
  }
2548
2548
  return i;
2549
2549
  }
2550
- function Ei(s, e, t, r = {}) {
2551
- return Os(s, wi(e), t, r);
2550
+ function Ci(s, e, t, r = {}) {
2551
+ return Os(s, Si(e), t, r);
2552
2552
  }
2553
2553
  function Os(s, e, t, r = {}) {
2554
2554
  const o = `${e.blockId}#` + N({
2555
2555
  ctx: Object.fromEntries(
2556
- Object.entries(e).filter(([n]) => yi.indexOf(n) === -1)
2556
+ Object.entries(e).filter(([n]) => wi.indexOf(n) === -1)
2557
2557
  ),
2558
2558
  cfg: t
2559
2559
  });
2560
2560
  return J.makeRaw(
2561
2561
  (n) => {
2562
- const i = { drivers: s, cCtx: n }, a = Ri();
2562
+ const i = { drivers: s, cCtx: n }, a = Ei();
2563
2563
  return {
2564
2564
  ir: Er(
2565
2565
  i,
2566
2566
  a,
2567
2567
  [
2568
2568
  {
2569
- destination: Si,
2569
+ destination: bi,
2570
2570
  operation: P(e, t)
2571
2571
  }
2572
2572
  ],
@@ -2597,7 +2597,7 @@ function Os(s, e, t, r = {}) {
2597
2597
  { ...r, key: o }
2598
2598
  );
2599
2599
  }
2600
- function Ci(s) {
2600
+ function ki(s) {
2601
2601
  return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
2602
2602
  }
2603
2603
  function Cr(s) {
@@ -2605,18 +2605,18 @@ function Cr(s) {
2605
2605
  }
2606
2606
  class ot {
2607
2607
  constructor(e, t, r, o, n, i) {
2608
- S(this, "callbackRegistry");
2609
- S(this, "fnJSONStringify");
2610
- S(this, "fnJSONParse");
2611
- S(this, "computablesToResolve", {});
2612
- S(this, "computableCtx");
2613
- S(this, "accessors", /* @__PURE__ */ new Map());
2614
- S(this, "meta");
2615
- S(this, "errorRepo", new ki());
2608
+ w(this, "callbackRegistry");
2609
+ w(this, "fnJSONStringify");
2610
+ w(this, "fnJSONParse");
2611
+ w(this, "computablesToResolve", {});
2612
+ w(this, "computableCtx");
2613
+ w(this, "accessors", /* @__PURE__ */ new Map());
2614
+ w(this, "meta");
2615
+ w(this, "errorRepo", new Pi());
2616
2616
  //
2617
2617
  // Result Pool
2618
2618
  //
2619
- S(this, "_resultPool");
2619
+ w(this, "_resultPool");
2620
2620
  if (this.scope = e, this.vm = t, this.blockCtx = r, this.env = o, this.deadlineSetter = n, this.computableCtx = i, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
2621
2621
  t.getProp(t.global, "JSON").consume((a) => t.getProp(a, "stringify"))
2622
2622
  ), t.typeof(this.fnJSONStringify) !== "function")
@@ -2732,7 +2732,7 @@ class ot {
2732
2732
  parsePObjectCollection(e, t, r, ...o) {
2733
2733
  const n = this.getAccessor(e);
2734
2734
  if (!n.getIsReadyOrError()) return;
2735
- const i = Mn(n, t, r, o), a = {};
2735
+ const i = _n(n, t, r, o), a = {};
2736
2736
  for (const [c, u] of Object.entries(i))
2737
2737
  a[c] = pe(u, (l) => this.wrapAccessor(l));
2738
2738
  return a;
@@ -2983,7 +2983,7 @@ class ot {
2983
2983
  r = this.vm.null;
2984
2984
  break;
2985
2985
  }
2986
- if (Ci(e)) {
2986
+ if (ki(e)) {
2987
2987
  r = this.vm.newArrayBuffer(e), o = !0;
2988
2988
  break;
2989
2989
  }
@@ -3117,9 +3117,9 @@ class ot {
3117
3117
  });
3118
3118
  }
3119
3119
  }
3120
- class ki {
3120
+ class Pi {
3121
3121
  constructor() {
3122
- S(this, "errorIdToError", /* @__PURE__ */ new Map());
3122
+ w(this, "errorIdToError", /* @__PURE__ */ new Map());
3123
3123
  }
3124
3124
  /** Sets the error to the repository and returns a mimicrated error that also has uuid key of the original error. */
3125
3125
  setAndRecreateForQuickJS(e) {
@@ -3134,7 +3134,7 @@ class ki {
3134
3134
  }
3135
3135
  /** Returns the original error that was stored by parsing uuid of mimicrated error. */
3136
3136
  getOriginal(e) {
3137
- if (!(e instanceof wo.QuickJSUnwrapError))
3137
+ if (!(e instanceof So.QuickJSUnwrapError))
3138
3138
  return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", Ue(e)), e;
3139
3139
  if (!("name" in e.cause))
3140
3140
  return console.warn("ErrorRepo: quickJSError.cause is not an Error", Ue(e)), e;
@@ -3144,7 +3144,7 @@ class ki {
3144
3144
  const o = this.errorIdToError.get(r);
3145
3145
  if (o === void 0)
3146
3146
  throw new Error(`ErrorRepo: errorId not found: ${r}, ${Ue(e)}`);
3147
- return new bo(e, o);
3147
+ return new Ro(e, o);
3148
3148
  }
3149
3149
  }
3150
3150
  function it(s, e) {
@@ -3164,7 +3164,7 @@ function it(s, e) {
3164
3164
  );
3165
3165
  }
3166
3166
  const He = process.env.MI_LOG_OUTPUT_STATUS;
3167
- function Pi(s, e, t, r, o, n = {}) {
3167
+ function Oi(s, e, t, r, o, n = {}) {
3168
3168
  const i = `${e.blockId}#lambda#${o}#${t.handle}`;
3169
3169
  return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), J.makeRaw((a) => {
3170
3170
  const c = new Ct();
@@ -3199,22 +3199,22 @@ function Pi(s, e, t, r, o, n = {}) {
3199
3199
  };
3200
3200
  }, n);
3201
3201
  }
3202
- function Oi(s) {
3203
- return Qr(s) ? s.isActive === !0 : Hn(s);
3202
+ function $i(s) {
3203
+ return Qr(s) ? s.isActive === !0 : Wn(s);
3204
3204
  }
3205
3205
  function Le(s, e, t, r, o, n = {}) {
3206
3206
  if (Qr(t)) {
3207
3207
  if (r === void 0) throw new Error("No code bundle.");
3208
- return Pi(s, e, t, r, o, n);
3209
- } else return Ei(s.driverKit, e, t, n);
3208
+ return Oi(s, e, t, r, o, n);
3209
+ } else return Ci(s.driverKit, e, t, n);
3210
3210
  }
3211
- function $i(s, e) {
3211
+ function Ii(s, e) {
3212
3212
  if (s === e) return !0;
3213
3213
  if (s === void 0 || e === void 0) return !1;
3214
3214
  const t = cr.omitBy((r, o) => o.startsWith("__"));
3215
3215
  return cr.isDeepEqual(t(s), t(e));
3216
3216
  }
3217
- function Ii(s, e, t) {
3217
+ function Fi(s, e, t) {
3218
3218
  return J.make(
3219
3219
  (r) => {
3220
3220
  var R, g, x, T, B, $, M, ge;
@@ -3245,7 +3245,7 @@ function Ii(s, e, t) {
3245
3245
  });
3246
3246
  z = {
3247
3247
  arguments: Y,
3248
- stale: !$i(ce, Y),
3248
+ stale: !Ii(ce, Y),
3249
3249
  outputError: D.error !== void 0 || W.error !== void 0 || ((R = D.value) == null ? void 0 : R.getError()) !== void 0 || ((g = W.value) == null ? void 0 : g.getError()) !== void 0,
3250
3250
  outputsError: ((x = D.error) == null ? void 0 : x.getDataAsString()) ?? ((B = (T = D.value) == null ? void 0 : T.getError()) == null ? void 0 : B.getDataAsString()),
3251
3251
  exportsError: (($ = W.error) == null ? void 0 : $.getDataAsString()) ?? ((ge = (M = W.value) == null ? void 0 : M.getError()) == null ? void 0 : ge.getDataAsString()),
@@ -3255,7 +3255,7 @@ function Ii(s, e, t) {
3255
3255
  l.set(L, { currentArguments: ce, prod: z });
3256
3256
  }
3257
3257
  const d = Ze(c, (L) => l.get(L).currentArguments), f = new Set(u.blocksInLimbo), h = [...ee(c)].map(({ id: L, label: se, renderingMode: ce }) => {
3258
- var w, E, O, C, F;
3258
+ var S, E, O, C, F;
3259
3259
  const z = j(l.get(L)), ie = j(d.nodes.get(L));
3260
3260
  let Y = "NotCalculated";
3261
3261
  z.prod !== void 0 && (f.has(L) ? Y = "Limbo" : Y = z.prod.finished ? "Done" : "Running");
@@ -3308,7 +3308,7 @@ function Ii(s, e, t) {
3308
3308
  label: v ?? se,
3309
3309
  title: v ?? se,
3310
3310
  renderingMode: ce,
3311
- stale: ((w = z.prod) == null ? void 0 : w.stale) !== !1 || Y === "Limbo",
3311
+ stale: ((S = z.prod) == null ? void 0 : S.stale) !== !1 || Y === "Limbo",
3312
3312
  missingReference: ie.missingReferences,
3313
3313
  upstreams: [...d.traverseIdsExcludingRoots("upstream", L)],
3314
3314
  downstreams: [...d.traverseIdsExcludingRoots("downstream", L)],
@@ -3356,7 +3356,7 @@ function Ii(s, e, t) {
3356
3356
  }
3357
3357
  ).withStableType();
3358
3358
  }
3359
- function Fi(s, e) {
3359
+ function Ai(s, e) {
3360
3360
  const t = s.node();
3361
3361
  if (le(t.resourceType, gs)) {
3362
3362
  const r = t.getDataAsJson();
@@ -3373,10 +3373,10 @@ function Fi(s, e) {
3373
3373
  } else
3374
3374
  throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
3375
3375
  }
3376
- function Ai(s, e) {
3376
+ function Ti(s, e) {
3377
3377
  if (s !== void 0)
3378
3378
  return J.make(
3379
- (t) => Fi(t.accessor(s), e),
3379
+ (t) => Ai(t.accessor(s), e),
3380
3380
  {
3381
3381
  postprocessValue: (t) => {
3382
3382
  if (t !== void 0) {
@@ -3388,7 +3388,7 @@ function Ai(s, e) {
3388
3388
  }
3389
3389
  ).withStableType();
3390
3390
  }
3391
- function Ti(s, e, t) {
3391
+ function Li(s, e, t) {
3392
3392
  return J.make(
3393
3393
  (r) => {
3394
3394
  var a;
@@ -3401,7 +3401,7 @@ function Ti(s, e, t) {
3401
3401
  { field: ys, assertFieldType: "Input" }
3402
3402
  )) == null ? void 0 : a.persist();
3403
3403
  return {
3404
- path: Ai(i, t),
3404
+ path: Ti(i, t),
3405
3405
  sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
3406
3406
  };
3407
3407
  },
@@ -3420,7 +3420,7 @@ function $s(s, e, t) {
3420
3420
  ui: n !== void 0 ? et(JSON.parse(n)) : void 0
3421
3421
  };
3422
3422
  }
3423
- function Li(s, e, t) {
3423
+ function Di(s, e, t) {
3424
3424
  return J.make(
3425
3425
  (r) => {
3426
3426
  const o = r.accessor(s).node(), n = Rs(s, e);
@@ -3436,13 +3436,13 @@ function Li(s, e, t) {
3436
3436
  { key: "outputs#" + Se(s.rid) + "#" + e }
3437
3437
  ).withStableType();
3438
3438
  }
3439
- function Di(s, e) {
3439
+ function Ni(s, e) {
3440
3440
  return J.make((t) => {
3441
3441
  const r = t.accessor(s).node(), o = j(r.getKeyValueAsJson(he)), n = [];
3442
3442
  for (const { id: i } of ee(o)) {
3443
3443
  const a = it(r, i);
3444
3444
  if (a === void 0) continue;
3445
- const c = Object.entries(a.cfg.outputs).map(([, l]) => l).filter((l) => Oi(l)).map((l) => l);
3445
+ const c = Object.entries(a.cfg.outputs).map(([, l]) => l).filter((l) => $i(l)).map((l) => l);
3446
3446
  if (c.length === 0) continue;
3447
3447
  const u = Rs(r.persist(), i);
3448
3448
  for (const l of c)
@@ -3453,9 +3453,9 @@ function Di(s, e) {
3453
3453
  return n;
3454
3454
  });
3455
3455
  }
3456
- class Ni {
3456
+ class Bi {
3457
3457
  constructor() {
3458
- S(this, "states", /* @__PURE__ */ new Map());
3458
+ w(this, "states", /* @__PURE__ */ new Map());
3459
3459
  }
3460
3460
  setState(e, t) {
3461
3461
  const r = this.states.get(e);
@@ -3486,21 +3486,21 @@ function kr(s) {
3486
3486
  class Jt {
3487
3487
  constructor(e, t, r) {
3488
3488
  /** Underlying pl resource id */
3489
- S(this, "rid");
3489
+ w(this, "rid");
3490
3490
  /** Data for the left panel, contain basic information about block status. */
3491
- S(this, "overview");
3492
- S(this, "navigationStates", new Ni());
3493
- S(this, "blockComputables", /* @__PURE__ */ new Map());
3494
- S(this, "blockFrontends", /* @__PURE__ */ new Map());
3495
- S(this, "activeConfigs");
3496
- S(this, "refreshLoopResult");
3497
- S(this, "abortController", new AbortController());
3498
- S(this, "destroyed", !1);
3499
- this.env = e, this.projectTree = r, this.overview = Ii(
3491
+ w(this, "overview");
3492
+ w(this, "navigationStates", new Bi());
3493
+ w(this, "blockComputables", /* @__PURE__ */ new Map());
3494
+ w(this, "blockFrontends", /* @__PURE__ */ new Map());
3495
+ w(this, "activeConfigs");
3496
+ w(this, "refreshLoopResult");
3497
+ w(this, "abortController", new AbortController());
3498
+ w(this, "destroyed", !1);
3499
+ this.env = e, this.projectTree = r, this.overview = Fi(
3500
3500
  r.entry(),
3501
3501
  this.navigationStates,
3502
3502
  e
3503
- ).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = Di(r.entry(), e);
3503
+ ).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = Ni(r.entry(), e);
3504
3504
  }
3505
3505
  async refreshLoop() {
3506
3506
  for (; !this.destroyed; )
@@ -3509,12 +3509,12 @@ class Jt {
3509
3509
  e.doRefresh(this.env.ops.stagingRenderingRate);
3510
3510
  }), await this.activeConfigs.getValue(), await os(this.env.ops.projectRefreshInterval, this.abortController.signal);
3511
3511
  } catch (e) {
3512
- if (io(e)) {
3512
+ if (ao(e)) {
3513
3513
  console.warn(
3514
3514
  "project refresh routine terminated, because project was externally deleted"
3515
3515
  );
3516
3516
  break;
3517
- } else if (!ao(e))
3517
+ } else if (!co(e))
3518
3518
  throw new Error("Unexpected exception", { cause: e });
3519
3519
  }
3520
3520
  }
@@ -3695,7 +3695,7 @@ class Jt {
3695
3695
  getBlockComputables(e) {
3696
3696
  const t = this.blockComputables.get(e);
3697
3697
  if (t === void 0) {
3698
- const r = Li(this.projectTree.entry(), e, this.env), n = {
3698
+ const r = Di(this.projectTree.entry(), e, this.env), n = {
3699
3699
  fullState: J.make(
3700
3700
  (i) => ({
3701
3701
  argsAndUiState: $s(this.projectTree.entry(), e, i),
@@ -3706,7 +3706,7 @@ class Jt {
3706
3706
  {
3707
3707
  postprocessValue: (i) => {
3708
3708
  var l, d, f;
3709
- const a = (f = (d = (l = i.overview) == null ? void 0 : l.blocks) == null ? void 0 : d.find((h) => h.id == e)) == null ? void 0 : f.sdkVersion, u = a && ji(a) && i.outputs !== void 0 ? Vi(i.outputs) : i.outputs;
3709
+ const a = (f = (d = (l = i.overview) == null ? void 0 : l.blocks) == null ? void 0 : d.find((h) => h.id == e)) == null ? void 0 : f.sdkVersion, u = a && xi(a) && i.outputs !== void 0 ? Ui(i.outputs) : i.outputs;
3710
3710
  return {
3711
3711
  ...i.argsAndUiState,
3712
3712
  outputs: u,
@@ -3734,7 +3734,7 @@ class Jt {
3734
3734
  getBlockFrontend(e) {
3735
3735
  const t = this.blockFrontends.get(e);
3736
3736
  if (t === void 0) {
3737
- const r = Ti(
3737
+ const r = Li(
3738
3738
  this.projectTree.entry(),
3739
3739
  e,
3740
3740
  this.env
@@ -3761,7 +3761,7 @@ class Jt {
3761
3761
  t,
3762
3762
  {
3763
3763
  ...e.ops.defaultTreeOptions,
3764
- pruning: Bi
3764
+ pruning: ji
3765
3765
  },
3766
3766
  e.logger
3767
3767
  );
@@ -3771,13 +3771,13 @@ class Jt {
3771
3771
  var c, u;
3772
3772
  return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((u = i.data) == null ? void 0 : u.byteLength) ?? 0);
3773
3773
  });
3774
- const n = uo(o);
3774
+ const n = po(o);
3775
3775
  await or.writeFile(`${Se(t)}.json`, kr(o)), await or.writeFile(`${Se(t)}.stats.json`, kr(n));
3776
3776
  }
3777
3777
  return new Jt(e, t, r);
3778
3778
  }
3779
3779
  }
3780
- function Bi(s) {
3780
+ function ji(s) {
3781
3781
  switch (s.type.name) {
3782
3782
  case "BlockPackCustom":
3783
3783
  return s.fields.filter((e) => e.name !== "template");
@@ -3789,14 +3789,14 @@ function Bi(s) {
3789
3789
  return s.fields;
3790
3790
  }
3791
3791
  }
3792
- function ji(s) {
3793
- return !xi(s, "1.26.0");
3792
+ function xi(s) {
3793
+ return !Vi(s, "1.26.0");
3794
3794
  }
3795
- function xi(s, e) {
3795
+ function Vi(s, e) {
3796
3796
  const t = s.split(".").map(Number), r = e.split(".").map(Number);
3797
3797
  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];
3798
3798
  }
3799
- function Vi(s) {
3799
+ function Ui(s) {
3800
3800
  const e = {};
3801
3801
  for (const [t, r] of Object.entries(s)) {
3802
3802
  if (r.ok) {
@@ -3842,7 +3842,7 @@ function Fs(s) {
3842
3842
  pframesSpillPath: _.join(s, "pframes")
3843
3843
  };
3844
3844
  }
3845
- const Ui = {
3845
+ const Gi = {
3846
3846
  ...Is,
3847
3847
  defaultTreeOptions: {
3848
3848
  pollingInterval: 350,
@@ -3857,18 +3857,18 @@ const Ui = {
3857
3857
  projectRefreshInterval: 700,
3858
3858
  stagingRenderingRate: 5
3859
3859
  };
3860
- function Gi(s) {
3860
+ function Ji(s) {
3861
3861
  return {
3862
3862
  ...Fs(s),
3863
3863
  frontendDownloadPath: _.join(s, "frontend")
3864
3864
  };
3865
3865
  }
3866
- function Ji(s) {
3866
+ function Mi(s) {
3867
3867
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3868
3868
  }
3869
3869
  var Tt = { exports: {} };
3870
- const Mi = "2.0.0", As = 256, _i = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
3871
- 9007199254740991, Ki = 16, Hi = As - 6, Wi = [
3870
+ const _i = "2.0.0", As = 256, Ki = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
3871
+ 9007199254740991, Hi = 16, Wi = As - 6, qi = [
3872
3872
  "major",
3873
3873
  "premajor",
3874
3874
  "minor",
@@ -3879,17 +3879,17 @@ const Mi = "2.0.0", As = 256, _i = Number.MAX_SAFE_INTEGER || /* istanbul ignore
3879
3879
  ];
3880
3880
  var at = {
3881
3881
  MAX_LENGTH: As,
3882
- MAX_SAFE_COMPONENT_LENGTH: Ki,
3883
- MAX_SAFE_BUILD_LENGTH: Hi,
3884
- MAX_SAFE_INTEGER: _i,
3885
- RELEASE_TYPES: Wi,
3886
- SEMVER_SPEC_VERSION: Mi,
3882
+ MAX_SAFE_COMPONENT_LENGTH: Hi,
3883
+ MAX_SAFE_BUILD_LENGTH: Wi,
3884
+ MAX_SAFE_INTEGER: Ki,
3885
+ RELEASE_TYPES: qi,
3886
+ SEMVER_SPEC_VERSION: _i,
3887
3887
  FLAG_INCLUDE_PRERELEASE: 1,
3888
3888
  FLAG_LOOSE: 2
3889
3889
  };
3890
- const qi = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
3890
+ const zi = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
3891
3891
  };
3892
- var ct = qi;
3892
+ var ct = zi;
3893
3893
  (function(s, e) {
3894
3894
  const {
3895
3895
  MAX_SAFE_COMPONENT_LENGTH: t,
@@ -3914,20 +3914,20 @@ var ct = qi;
3914
3914
  g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${f}*`), g("MAINVERSION", `(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${f}+`), g("BUILD", `(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`), g("FULL", `^${c[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`), g("LOOSE", `^${c[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${c[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`), g("XRANGE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`), g("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), g("COERCE", `${c[l.COERCEPLAIN]}(?:$|[^\\d])`), g("COERCEFULL", c[l.COERCEPLAIN] + `(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`), g("COERCERTL", c[l.COERCE], !0), g("COERCERTLFULL", c[l.COERCEFULL], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${c[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${c[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
3915
3915
  })(Tt, Tt.exports);
3916
3916
  var Ve = Tt.exports;
3917
- const zi = Object.freeze({ loose: !0 }), Xi = Object.freeze({}), Yi = (s) => s ? typeof s != "object" ? zi : s : Xi;
3918
- var Mt = Yi;
3917
+ const Xi = Object.freeze({ loose: !0 }), Yi = Object.freeze({}), Qi = (s) => s ? typeof s != "object" ? Xi : s : Yi;
3918
+ var Mt = Qi;
3919
3919
  const Pr = /^[0-9]+$/, Ts = (s, e) => {
3920
3920
  const t = Pr.test(s), r = Pr.test(e);
3921
3921
  return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
3922
- }, Qi = (s, e) => Ts(e, s);
3922
+ }, Zi = (s, e) => Ts(e, s);
3923
3923
  var Ls = {
3924
3924
  compareIdentifiers: Ts,
3925
- rcompareIdentifiers: Qi
3925
+ rcompareIdentifiers: Zi
3926
3926
  };
3927
- const We = ct, { MAX_LENGTH: Or, MAX_SAFE_INTEGER: qe } = at, { safeRe: $r, safeSrc: Ir, t: ze } = Ve, Zi = Mt, { compareIdentifiers: me } = Ls;
3928
- let ea = class oe {
3927
+ const We = ct, { MAX_LENGTH: Or, MAX_SAFE_INTEGER: qe } = at, { safeRe: $r, safeSrc: Ir, t: ze } = Ve, ea = Mt, { compareIdentifiers: me } = Ls;
3928
+ let ta = class oe {
3929
3929
  constructor(e, t) {
3930
- if (t = Zi(t), e instanceof oe) {
3930
+ if (t = ea(t), e instanceof oe) {
3931
3931
  if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
3932
3932
  return e;
3933
3933
  e = e.version;
@@ -4075,8 +4075,8 @@ let ea = class oe {
4075
4075
  return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
4076
4076
  }
4077
4077
  };
4078
- var q = ea;
4079
- const Fr = q, ta = (s, e, t = !1) => {
4078
+ var q = ta;
4079
+ const Fr = q, ra = (s, e, t = !1) => {
4080
4080
  if (s instanceof Fr)
4081
4081
  return s;
4082
4082
  try {
@@ -4087,18 +4087,18 @@ const Fr = q, ta = (s, e, t = !1) => {
4087
4087
  throw r;
4088
4088
  }
4089
4089
  };
4090
- var Ce = ta;
4091
- const ra = Ce, sa = (s, e) => {
4092
- const t = ra(s, e);
4090
+ var Ce = ra;
4091
+ const sa = Ce, oa = (s, e) => {
4092
+ const t = sa(s, e);
4093
4093
  return t ? t.version : null;
4094
4094
  };
4095
- var oa = sa;
4096
- const na = Ce, ia = (s, e) => {
4097
- const t = na(s.trim().replace(/^[=v]+/, ""), e);
4095
+ var na = oa;
4096
+ const ia = Ce, aa = (s, e) => {
4097
+ const t = ia(s.trim().replace(/^[=v]+/, ""), e);
4098
4098
  return t ? t.version : null;
4099
4099
  };
4100
- var aa = ia;
4101
- const Ar = q, ca = (s, e, t, r, o) => {
4100
+ var ca = aa;
4101
+ const Ar = q, la = (s, e, t, r, o) => {
4102
4102
  typeof t == "string" && (o = r, r = t, t = void 0);
4103
4103
  try {
4104
4104
  return new Ar(
@@ -4109,8 +4109,8 @@ const Ar = q, ca = (s, e, t, r, o) => {
4109
4109
  return null;
4110
4110
  }
4111
4111
  };
4112
- var la = ca;
4113
- const Tr = Ce, ua = (s, e) => {
4112
+ var ua = la;
4113
+ const Tr = Ce, da = (s, e) => {
4114
4114
  const t = Tr(s, null, !0), r = Tr(e, null, !0), o = t.compare(r);
4115
4115
  if (o === 0)
4116
4116
  return null;
@@ -4124,46 +4124,46 @@ const Tr = Ce, ua = (s, e) => {
4124
4124
  const l = c ? "pre" : "";
4125
4125
  return t.major !== r.major ? l + "major" : t.minor !== r.minor ? l + "minor" : t.patch !== r.patch ? l + "patch" : "prerelease";
4126
4126
  };
4127
- var da = ua;
4128
- const pa = q, fa = (s, e) => new pa(s, e).major;
4129
- var ha = fa;
4130
- const ga = q, ma = (s, e) => new ga(s, e).minor;
4131
- var va = ma;
4132
- const ya = q, wa = (s, e) => new ya(s, e).patch;
4133
- var Sa = wa;
4134
- const ba = Ce, Ra = (s, e) => {
4135
- const t = ba(s, e);
4127
+ var pa = da;
4128
+ const fa = q, ha = (s, e) => new fa(s, e).major;
4129
+ var ga = ha;
4130
+ const ma = q, va = (s, e) => new ma(s, e).minor;
4131
+ var ya = va;
4132
+ const wa = q, Sa = (s, e) => new wa(s, e).patch;
4133
+ var ba = Sa;
4134
+ const Ra = Ce, Ea = (s, e) => {
4135
+ const t = Ra(s, e);
4136
4136
  return t && t.prerelease.length ? t.prerelease : null;
4137
4137
  };
4138
- var Ea = Ra;
4139
- const Lr = q, Ca = (s, e, t) => new Lr(s, t).compare(new Lr(e, t));
4140
- var te = Ca;
4141
- const ka = te, Pa = (s, e, t) => ka(e, s, t);
4142
- var Oa = Pa;
4143
- const $a = te, Ia = (s, e) => $a(s, e, !0);
4144
- var Fa = Ia;
4145
- const Dr = q, Aa = (s, e, t) => {
4138
+ var Ca = Ea;
4139
+ const Lr = q, ka = (s, e, t) => new Lr(s, t).compare(new Lr(e, t));
4140
+ var te = ka;
4141
+ const Pa = te, Oa = (s, e, t) => Pa(e, s, t);
4142
+ var $a = Oa;
4143
+ const Ia = te, Fa = (s, e) => Ia(s, e, !0);
4144
+ var Aa = Fa;
4145
+ const Dr = q, Ta = (s, e, t) => {
4146
4146
  const r = new Dr(s, t), o = new Dr(e, t);
4147
4147
  return r.compare(o) || r.compareBuild(o);
4148
4148
  };
4149
- var _t = Aa;
4150
- const Ta = _t, La = (s, e) => s.sort((t, r) => Ta(t, r, e));
4151
- var Da = La;
4152
- const Na = _t, Ba = (s, e) => s.sort((t, r) => Na(r, t, e));
4153
- var ja = Ba;
4154
- const xa = te, Va = (s, e, t) => xa(s, e, t) > 0;
4155
- var lt = Va;
4156
- const Ua = te, Ga = (s, e, t) => Ua(s, e, t) < 0;
4157
- var Kt = Ga;
4158
- const Ja = te, Ma = (s, e, t) => Ja(s, e, t) === 0;
4159
- var Ds = Ma;
4160
- const _a = te, Ka = (s, e, t) => _a(s, e, t) !== 0;
4161
- var Ns = Ka;
4162
- const Ha = te, Wa = (s, e, t) => Ha(s, e, t) >= 0;
4163
- var Ht = Wa;
4164
- const qa = te, za = (s, e, t) => qa(s, e, t) <= 0;
4165
- var Wt = za;
4166
- const Xa = Ds, Ya = Ns, Qa = lt, Za = Ht, ec = Kt, tc = Wt, rc = (s, e, t, r) => {
4149
+ var _t = Ta;
4150
+ const La = _t, Da = (s, e) => s.sort((t, r) => La(t, r, e));
4151
+ var Na = Da;
4152
+ const Ba = _t, ja = (s, e) => s.sort((t, r) => Ba(r, t, e));
4153
+ var xa = ja;
4154
+ const Va = te, Ua = (s, e, t) => Va(s, e, t) > 0;
4155
+ var lt = Ua;
4156
+ const Ga = te, Ja = (s, e, t) => Ga(s, e, t) < 0;
4157
+ var Kt = Ja;
4158
+ const Ma = te, _a = (s, e, t) => Ma(s, e, t) === 0;
4159
+ var Ds = _a;
4160
+ const Ka = te, Ha = (s, e, t) => Ka(s, e, t) !== 0;
4161
+ var Ns = Ha;
4162
+ const Wa = te, qa = (s, e, t) => Wa(s, e, t) >= 0;
4163
+ var Ht = qa;
4164
+ const za = te, Xa = (s, e, t) => za(s, e, t) <= 0;
4165
+ var Wt = Xa;
4166
+ const Ya = Ds, Qa = Ns, Za = lt, ec = Ht, tc = Kt, rc = Wt, sc = (s, e, t, r) => {
4167
4167
  switch (e) {
4168
4168
  case "===":
4169
4169
  return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
@@ -4172,24 +4172,24 @@ const Xa = Ds, Ya = Ns, Qa = lt, Za = Ht, ec = Kt, tc = Wt, rc = (s, e, t, r) =>
4172
4172
  case "":
4173
4173
  case "=":
4174
4174
  case "==":
4175
- return Xa(s, t, r);
4176
- case "!=":
4177
4175
  return Ya(s, t, r);
4178
- case ">":
4176
+ case "!=":
4179
4177
  return Qa(s, t, r);
4180
- case ">=":
4178
+ case ">":
4181
4179
  return Za(s, t, r);
4182
- case "<":
4180
+ case ">=":
4183
4181
  return ec(s, t, r);
4184
- case "<=":
4182
+ case "<":
4185
4183
  return tc(s, t, r);
4184
+ case "<=":
4185
+ return rc(s, t, r);
4186
4186
  default:
4187
4187
  throw new TypeError(`Invalid operator: ${e}`);
4188
4188
  }
4189
4189
  };
4190
- var Bs = rc;
4191
- const sc = q, oc = Ce, { safeRe: Xe, t: Ye } = Ve, nc = (s, e) => {
4192
- if (s instanceof sc)
4190
+ var Bs = sc;
4191
+ const oc = q, nc = Ce, { safeRe: Xe, t: Ye } = Ve, ic = (s, e) => {
4192
+ if (s instanceof oc)
4193
4193
  return s;
4194
4194
  if (typeof s == "number" && (s = String(s)), typeof s != "string")
4195
4195
  return null;
@@ -4207,10 +4207,10 @@ const sc = q, oc = Ce, { safeRe: Xe, t: Ye } = Ve, nc = (s, e) => {
4207
4207
  if (t === null)
4208
4208
  return null;
4209
4209
  const r = t[2], o = t[3] || "0", n = t[4] || "0", i = e.includePrerelease && t[5] ? `-${t[5]}` : "", a = e.includePrerelease && t[6] ? `+${t[6]}` : "";
4210
- return oc(`${r}.${o}.${n}${i}${a}`, e);
4210
+ return nc(`${r}.${o}.${n}${i}${a}`, e);
4211
4211
  };
4212
- var ic = nc;
4213
- class ac {
4212
+ var ac = ic;
4213
+ class cc {
4214
4214
  constructor() {
4215
4215
  this.max = 1e3, this.map = /* @__PURE__ */ new Map();
4216
4216
  }
@@ -4233,7 +4233,7 @@ class ac {
4233
4233
  return this;
4234
4234
  }
4235
4235
  }
4236
- var cc = ac, gt, Nr;
4236
+ var lc = cc, gt, Nr;
4237
4237
  function re() {
4238
4238
  if (Nr) return gt;
4239
4239
  Nr = 1;
@@ -4282,10 +4282,10 @@ function re() {
4282
4282
  const y = ((this.options.includePrerelease && h) | (this.options.loose && R)) + ":" + p, b = r.get(y);
4283
4283
  if (b)
4284
4284
  return b;
4285
- const w = this.options.loose, E = w ? c[u.HYPHENRANGELOOSE] : c[u.HYPHENRANGE];
4285
+ const S = this.options.loose, E = S ? c[u.HYPHENRANGELOOSE] : c[u.HYPHENRANGE];
4286
4286
  p = p.replace(E, D(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(c[u.COMPARATORTRIM], l), i("comparator trim", p), p = p.replace(c[u.TILDETRIM], d), i("tilde trim", p), p = p.replace(c[u.CARETTRIM], f), i("caret trim", p);
4287
4287
  let O = p.split(" ").map((I) => B(I, this.options)).join(" ").split(/\s+/).map((I) => Y(I, this.options));
4288
- w && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(c[u.COMPARATORLOOSE])))), i("range list", O);
4288
+ S && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(c[u.COMPARATORLOOSE])))), i("range list", O);
4289
4289
  const C = /* @__PURE__ */ new Map(), F = O.map((I) => new n(I, this.options));
4290
4290
  for (const I of F) {
4291
4291
  if (g(I))
@@ -4299,7 +4299,7 @@ function re() {
4299
4299
  intersects(p, m) {
4300
4300
  if (!(p instanceof e))
4301
4301
  throw new TypeError("a Range is required");
4302
- return this.set.some((y) => T(y, m) && p.set.some((b) => T(b, m) && y.every((w) => b.every((E) => w.intersects(E, m)))));
4302
+ return this.set.some((y) => T(y, m) && p.set.some((b) => T(b, m) && y.every((S) => b.every((E) => S.intersects(E, m)))));
4303
4303
  }
4304
4304
  // if ANY of the sets match ALL of its comparators, then pass
4305
4305
  test(p) {
@@ -4318,7 +4318,7 @@ function re() {
4318
4318
  }
4319
4319
  }
4320
4320
  gt = e;
4321
- const t = cc, r = new t(), o = Mt, n = ut(), i = ct, a = q, {
4321
+ const t = lc, r = new t(), o = Mt, n = ut(), i = ct, a = q, {
4322
4322
  safeRe: c,
4323
4323
  t: u,
4324
4324
  comparatorTrimReplace: l,
@@ -4329,32 +4329,32 @@ function re() {
4329
4329
  const y = v.slice();
4330
4330
  let b = y.pop();
4331
4331
  for (; m && y.length; )
4332
- m = y.every((w) => b.intersects(w, p)), b = y.pop();
4332
+ m = y.every((S) => b.intersects(S, p)), b = y.pop();
4333
4333
  return m;
4334
4334
  }, B = (v, p) => (i("comp", v, p), v = L(v, p), i("caret", v), v = M(v, p), i("tildes", v), v = ce(v, p), i("xrange", v), v = ie(v, p), i("stars", v), v), $ = (v) => !v || v.toLowerCase() === "x" || v === "*", M = (v, p) => v.trim().split(/\s+/).map((m) => ge(m, p)).join(" "), ge = (v, p) => {
4335
4335
  const m = p.loose ? c[u.TILDELOOSE] : c[u.TILDE];
4336
- return v.replace(m, (y, b, w, E, O) => {
4337
- i("tilde", v, y, b, w, E, O);
4336
+ return v.replace(m, (y, b, S, E, O) => {
4337
+ i("tilde", v, y, b, S, E, O);
4338
4338
  let C;
4339
- return $(b) ? C = "" : $(w) ? C = `>=${b}.0.0 <${+b + 1}.0.0-0` : $(E) ? C = `>=${b}.${w}.0 <${b}.${+w + 1}.0-0` : O ? (i("replaceTilde pr", O), C = `>=${b}.${w}.${E}-${O} <${b}.${+w + 1}.0-0`) : C = `>=${b}.${w}.${E} <${b}.${+w + 1}.0-0`, i("tilde return", C), C;
4339
+ return $(b) ? C = "" : $(S) ? C = `>=${b}.0.0 <${+b + 1}.0.0-0` : $(E) ? C = `>=${b}.${S}.0 <${b}.${+S + 1}.0-0` : O ? (i("replaceTilde pr", O), C = `>=${b}.${S}.${E}-${O} <${b}.${+S + 1}.0-0`) : C = `>=${b}.${S}.${E} <${b}.${+S + 1}.0-0`, i("tilde return", C), C;
4340
4340
  });
4341
4341
  }, L = (v, p) => v.trim().split(/\s+/).map((m) => se(m, p)).join(" "), se = (v, p) => {
4342
4342
  i("caret", v, p);
4343
4343
  const m = p.loose ? c[u.CARETLOOSE] : c[u.CARET], y = p.includePrerelease ? "-0" : "";
4344
- return v.replace(m, (b, w, E, O, C) => {
4345
- i("caret", v, b, w, E, O, C);
4344
+ return v.replace(m, (b, S, E, O, C) => {
4345
+ i("caret", v, b, S, E, O, C);
4346
4346
  let F;
4347
- return $(w) ? F = "" : $(E) ? F = `>=${w}.0.0${y} <${+w + 1}.0.0-0` : $(O) ? w === "0" ? F = `>=${w}.${E}.0${y} <${w}.${+E + 1}.0-0` : F = `>=${w}.${E}.0${y} <${+w + 1}.0.0-0` : C ? (i("replaceCaret pr", C), w === "0" ? E === "0" ? F = `>=${w}.${E}.${O}-${C} <${w}.${E}.${+O + 1}-0` : F = `>=${w}.${E}.${O}-${C} <${w}.${+E + 1}.0-0` : F = `>=${w}.${E}.${O}-${C} <${+w + 1}.0.0-0`) : (i("no pr"), w === "0" ? E === "0" ? F = `>=${w}.${E}.${O}${y} <${w}.${E}.${+O + 1}-0` : F = `>=${w}.${E}.${O}${y} <${w}.${+E + 1}.0-0` : F = `>=${w}.${E}.${O} <${+w + 1}.0.0-0`), i("caret return", F), F;
4347
+ return $(S) ? F = "" : $(E) ? F = `>=${S}.0.0${y} <${+S + 1}.0.0-0` : $(O) ? S === "0" ? F = `>=${S}.${E}.0${y} <${S}.${+E + 1}.0-0` : F = `>=${S}.${E}.0${y} <${+S + 1}.0.0-0` : C ? (i("replaceCaret pr", C), S === "0" ? E === "0" ? F = `>=${S}.${E}.${O}-${C} <${S}.${E}.${+O + 1}-0` : F = `>=${S}.${E}.${O}-${C} <${S}.${+E + 1}.0-0` : F = `>=${S}.${E}.${O}-${C} <${+S + 1}.0.0-0`) : (i("no pr"), S === "0" ? E === "0" ? F = `>=${S}.${E}.${O}${y} <${S}.${E}.${+O + 1}-0` : F = `>=${S}.${E}.${O}${y} <${S}.${+E + 1}.0-0` : F = `>=${S}.${E}.${O} <${+S + 1}.0.0-0`), i("caret return", F), F;
4348
4348
  });
4349
4349
  }, ce = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((m) => z(m, p)).join(" ")), z = (v, p) => {
4350
4350
  v = v.trim();
4351
4351
  const m = p.loose ? c[u.XRANGELOOSE] : c[u.XRANGE];
4352
- return v.replace(m, (y, b, w, E, O, C) => {
4353
- i("xRange", v, y, b, w, E, O, C);
4354
- const F = $(w), V = F || $(E), I = V || $(O), ae = I;
4355
- return b === "=" && ae && (b = ""), C = p.includePrerelease ? "-0" : "", F ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && ae ? (V && (E = 0), O = 0, b === ">" ? (b = ">=", V ? (w = +w + 1, E = 0, O = 0) : (E = +E + 1, O = 0)) : b === "<=" && (b = "<", V ? w = +w + 1 : E = +E + 1), b === "<" && (C = "-0"), y = `${b + w}.${E}.${O}${C}`) : V ? y = `>=${w}.0.0${C} <${+w + 1}.0.0-0` : I && (y = `>=${w}.${E}.0${C} <${w}.${+E + 1}.0-0`), i("xRange return", y), y;
4352
+ return v.replace(m, (y, b, S, E, O, C) => {
4353
+ i("xRange", v, y, b, S, E, O, C);
4354
+ const F = $(S), V = F || $(E), I = V || $(O), ae = I;
4355
+ return b === "=" && ae && (b = ""), C = p.includePrerelease ? "-0" : "", F ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && ae ? (V && (E = 0), O = 0, b === ">" ? (b = ">=", V ? (S = +S + 1, E = 0, O = 0) : (E = +E + 1, O = 0)) : b === "<=" && (b = "<", V ? S = +S + 1 : E = +E + 1), b === "<" && (C = "-0"), y = `${b + S}.${E}.${O}${C}`) : V ? y = `>=${S}.0.0${C} <${+S + 1}.0.0-0` : I && (y = `>=${S}.${E}.0${C} <${S}.${+E + 1}.0-0`), i("xRange return", y), y;
4356
4356
  });
4357
- }, ie = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), Y = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), D = (v) => (p, m, y, b, w, E, O, C, F, V, I, ae) => ($(y) ? m = "" : $(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : $(w) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : E ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, $(F) ? C = "" : $(V) ? C = `<${+F + 1}.0.0-0` : $(I) ? C = `<${F}.${+V + 1}.0-0` : ae ? C = `<=${F}.${V}.${I}-${ae}` : v ? C = `<${F}.${V}.${+I + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), W = (v, p, m) => {
4357
+ }, ie = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), Y = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), D = (v) => (p, m, y, b, S, E, O, C, F, V, I, ae) => ($(y) ? m = "" : $(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : $(S) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : E ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, $(F) ? C = "" : $(V) ? C = `<${+F + 1}.0.0-0` : $(I) ? C = `<${F}.${+V + 1}.0-0` : ae ? C = `<=${F}.${V}.${I}-${ae}` : v ? C = `<${F}.${V}.${+I + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), W = (v, p, m) => {
4358
4358
  for (let y = 0; y < v.length; y++)
4359
4359
  if (!v[y].test(p))
4360
4360
  return !1;
@@ -4418,43 +4418,43 @@ function ut() {
4418
4418
  const t = Mt, { safeRe: r, t: o } = Ve, n = Bs, i = ct, a = q, c = re();
4419
4419
  return mt;
4420
4420
  }
4421
- const lc = re(), uc = (s, e, t) => {
4421
+ const uc = re(), dc = (s, e, t) => {
4422
4422
  try {
4423
- e = new lc(e, t);
4423
+ e = new uc(e, t);
4424
4424
  } catch {
4425
4425
  return !1;
4426
4426
  }
4427
4427
  return e.test(s);
4428
4428
  };
4429
- var dt = uc;
4430
- const dc = re(), pc = (s, e) => new dc(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
4431
- var fc = pc;
4432
- const hc = q, gc = re(), mc = (s, e, t) => {
4429
+ var dt = dc;
4430
+ const pc = re(), fc = (s, e) => new pc(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
4431
+ var hc = fc;
4432
+ const gc = q, mc = re(), vc = (s, e, t) => {
4433
4433
  let r = null, o = null, n = null;
4434
4434
  try {
4435
- n = new gc(e, t);
4435
+ n = new mc(e, t);
4436
4436
  } catch {
4437
4437
  return null;
4438
4438
  }
4439
4439
  return s.forEach((i) => {
4440
- n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new hc(r, t));
4440
+ n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new gc(r, t));
4441
4441
  }), r;
4442
4442
  };
4443
- var vc = mc;
4444
- const yc = q, wc = re(), Sc = (s, e, t) => {
4443
+ var yc = vc;
4444
+ const wc = q, Sc = re(), bc = (s, e, t) => {
4445
4445
  let r = null, o = null, n = null;
4446
4446
  try {
4447
- n = new wc(e, t);
4447
+ n = new Sc(e, t);
4448
4448
  } catch {
4449
4449
  return null;
4450
4450
  }
4451
4451
  return s.forEach((i) => {
4452
- n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new yc(r, t));
4452
+ n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new wc(r, t));
4453
4453
  }), r;
4454
4454
  };
4455
- var bc = Sc;
4456
- const vt = q, Rc = re(), jr = lt, Ec = (s, e) => {
4457
- s = new Rc(s, e);
4455
+ var Rc = bc;
4456
+ const vt = q, Ec = re(), jr = lt, Cc = (s, e) => {
4457
+ s = new Ec(s, e);
4458
4458
  let t = new vt("0.0.0");
4459
4459
  if (s.test(t) || (t = new vt("0.0.0-0"), s.test(t)))
4460
4460
  return t;
@@ -4481,35 +4481,35 @@ const vt = q, Rc = re(), jr = lt, Ec = (s, e) => {
4481
4481
  }
4482
4482
  return t && s.test(t) ? t : null;
4483
4483
  };
4484
- var Cc = Ec;
4485
- const kc = re(), Pc = (s, e) => {
4484
+ var kc = Cc;
4485
+ const Pc = re(), Oc = (s, e) => {
4486
4486
  try {
4487
- return new kc(s, e).range || "*";
4487
+ return new Pc(s, e).range || "*";
4488
4488
  } catch {
4489
4489
  return null;
4490
4490
  }
4491
4491
  };
4492
- var Oc = Pc;
4493
- const $c = q, js = ut(), { ANY: Ic } = js, Fc = re(), Ac = dt, xr = lt, Vr = Kt, Tc = Wt, Lc = Ht, Dc = (s, e, t, r) => {
4494
- s = new $c(s, r), e = new Fc(e, r);
4492
+ var $c = Oc;
4493
+ const Ic = q, js = ut(), { ANY: Fc } = js, Ac = re(), Tc = dt, xr = lt, Vr = Kt, Lc = Wt, Dc = Ht, Nc = (s, e, t, r) => {
4494
+ s = new Ic(s, r), e = new Ac(e, r);
4495
4495
  let o, n, i, a, c;
4496
4496
  switch (t) {
4497
4497
  case ">":
4498
- o = xr, n = Tc, i = Vr, a = ">", c = ">=";
4498
+ o = xr, n = Lc, i = Vr, a = ">", c = ">=";
4499
4499
  break;
4500
4500
  case "<":
4501
- o = Vr, n = Lc, i = xr, a = "<", c = "<=";
4501
+ o = Vr, n = Dc, i = xr, a = "<", c = "<=";
4502
4502
  break;
4503
4503
  default:
4504
4504
  throw new TypeError('Must provide a hilo val of "<" or ">"');
4505
4505
  }
4506
- if (Ac(s, e, r))
4506
+ if (Tc(s, e, r))
4507
4507
  return !1;
4508
4508
  for (let u = 0; u < e.set.length; ++u) {
4509
4509
  const l = e.set[u];
4510
4510
  let d = null, f = null;
4511
4511
  if (l.forEach((h) => {
4512
- h.semver === Ic && (h = new js(">=0.0.0")), d = d || h, f = f || h, o(h.semver, d.semver, r) ? d = h : i(h.semver, f.semver, r) && (f = h);
4512
+ h.semver === Fc && (h = new js(">=0.0.0")), d = d || h, f = f || h, o(h.semver, d.semver, r) ? d = h : i(h.semver, f.semver, r) && (f = h);
4513
4513
  }), d.operator === a || d.operator === c || (!f.operator || f.operator === a) && n(s, f.semver))
4514
4514
  return !1;
4515
4515
  if (f.operator === c && i(s, f.semver))
@@ -4517,20 +4517,20 @@ const $c = q, js = ut(), { ANY: Ic } = js, Fc = re(), Ac = dt, xr = lt, Vr = Kt,
4517
4517
  }
4518
4518
  return !0;
4519
4519
  };
4520
- var qt = Dc;
4521
- const Nc = qt, Bc = (s, e, t) => Nc(s, e, ">", t);
4522
- var jc = Bc;
4523
- const xc = qt, Vc = (s, e, t) => xc(s, e, "<", t);
4524
- var Uc = Vc;
4525
- const Ur = re(), Gc = (s, e, t) => (s = new Ur(s, t), e = new Ur(e, t), s.intersects(e, t));
4526
- var Jc = Gc;
4527
- const Mc = dt, _c = te;
4528
- var Kc = (s, e, t) => {
4520
+ var qt = Nc;
4521
+ const Bc = qt, jc = (s, e, t) => Bc(s, e, ">", t);
4522
+ var xc = jc;
4523
+ const Vc = qt, Uc = (s, e, t) => Vc(s, e, "<", t);
4524
+ var Gc = Uc;
4525
+ const Ur = re(), Jc = (s, e, t) => (s = new Ur(s, t), e = new Ur(e, t), s.intersects(e, t));
4526
+ var Mc = Jc;
4527
+ const _c = dt, Kc = te;
4528
+ var Hc = (s, e, t) => {
4529
4529
  const r = [];
4530
4530
  let o = null, n = null;
4531
- const i = s.sort((l, d) => _c(l, d, t));
4531
+ const i = s.sort((l, d) => Kc(l, d, t));
4532
4532
  for (const l of i)
4533
- Mc(l, e, t) ? (n = l, o || (o = l)) : (n && r.push([o, n]), n = null, o = null);
4533
+ _c(l, e, t) ? (n = l, o || (o = l)) : (n && r.push([o, n]), n = null, o = null);
4534
4534
  o && r.push([o, null]);
4535
4535
  const a = [];
4536
4536
  for (const [l, d] of r)
@@ -4538,14 +4538,14 @@ var Kc = (s, e, t) => {
4538
4538
  const c = a.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e);
4539
4539
  return c.length < u.length ? c : e;
4540
4540
  };
4541
- const Gr = re(), zt = ut(), { ANY: yt } = zt, Pe = dt, Xt = te, Hc = (s, e, t = {}) => {
4541
+ const Gr = re(), zt = ut(), { ANY: yt } = zt, Pe = dt, Xt = te, Wc = (s, e, t = {}) => {
4542
4542
  if (s === e)
4543
4543
  return !0;
4544
4544
  s = new Gr(s, t), e = new Gr(e, t);
4545
4545
  let r = !1;
4546
4546
  e: for (const o of s.set) {
4547
4547
  for (const n of e.set) {
4548
- const i = qc(o, n, t);
4548
+ const i = zc(o, n, t);
4549
4549
  if (r = r || i !== null, i)
4550
4550
  continue e;
4551
4551
  }
@@ -4553,13 +4553,13 @@ const Gr = re(), zt = ut(), { ANY: yt } = zt, Pe = dt, Xt = te, Hc = (s, e, t =
4553
4553
  return !1;
4554
4554
  }
4555
4555
  return !0;
4556
- }, Wc = [new zt(">=0.0.0-0")], Jr = [new zt(">=0.0.0")], qc = (s, e, t) => {
4556
+ }, qc = [new zt(">=0.0.0-0")], Jr = [new zt(">=0.0.0")], zc = (s, e, t) => {
4557
4557
  if (s === e)
4558
4558
  return !0;
4559
4559
  if (s.length === 1 && s[0].semver === yt) {
4560
4560
  if (e.length === 1 && e[0].semver === yt)
4561
4561
  return !0;
4562
- t.includePrerelease ? s = Wc : s = Jr;
4562
+ t.includePrerelease ? s = qc : s = Jr;
4563
4563
  }
4564
4564
  if (e.length === 1 && e[0].semver === yt) {
4565
4565
  if (t.includePrerelease)
@@ -4619,47 +4619,47 @@ const Gr = re(), zt = ut(), { ANY: yt } = zt, Pe = dt, Xt = te, Hc = (s, e, t =
4619
4619
  const r = Xt(s.semver, e.semver, t);
4620
4620
  return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
4621
4621
  };
4622
- var zc = Hc;
4623
- const wt = Ve, Kr = at, Xc = q, Hr = Ls, Yc = Ce, Qc = oa, Zc = aa, el = la, tl = da, rl = ha, sl = va, ol = Sa, nl = Ea, il = te, al = Oa, cl = Fa, ll = _t, ul = Da, dl = ja, pl = lt, fl = Kt, hl = Ds, gl = Ns, ml = Ht, vl = Wt, yl = Bs, wl = ic, Sl = ut(), bl = re(), Rl = dt, El = fc, Cl = vc, kl = bc, Pl = Cc, Ol = Oc, $l = qt, Il = jc, Fl = Uc, Al = Jc, Tl = Kc, Ll = zc;
4624
- var Dl = {
4625
- parse: Yc,
4626
- valid: Qc,
4627
- clean: Zc,
4628
- inc: el,
4629
- diff: tl,
4630
- major: rl,
4631
- minor: sl,
4632
- patch: ol,
4633
- prerelease: nl,
4634
- compare: il,
4635
- rcompare: al,
4636
- compareLoose: cl,
4637
- compareBuild: ll,
4638
- sort: ul,
4639
- rsort: dl,
4640
- gt: pl,
4641
- lt: fl,
4642
- eq: hl,
4643
- neq: gl,
4644
- gte: ml,
4645
- lte: vl,
4646
- cmp: yl,
4647
- coerce: wl,
4648
- Comparator: Sl,
4649
- Range: bl,
4650
- satisfies: Rl,
4651
- toComparators: El,
4652
- maxSatisfying: Cl,
4653
- minSatisfying: kl,
4654
- minVersion: Pl,
4655
- validRange: Ol,
4656
- outside: $l,
4657
- gtr: Il,
4658
- ltr: Fl,
4659
- intersects: Al,
4660
- simplifyRange: Tl,
4661
- subset: Ll,
4662
- SemVer: Xc,
4622
+ var Xc = Wc;
4623
+ const wt = Ve, Kr = at, Yc = q, Hr = Ls, Qc = Ce, Zc = na, el = ca, tl = ua, rl = pa, sl = ga, ol = ya, nl = ba, il = Ca, al = te, cl = $a, ll = Aa, ul = _t, dl = Na, pl = xa, fl = lt, hl = Kt, gl = Ds, ml = Ns, vl = Ht, yl = Wt, wl = Bs, Sl = ac, bl = ut(), Rl = re(), El = dt, Cl = hc, kl = yc, Pl = Rc, Ol = kc, $l = $c, Il = qt, Fl = xc, Al = Gc, Tl = Mc, Ll = Hc, Dl = Xc;
4624
+ var Nl = {
4625
+ parse: Qc,
4626
+ valid: Zc,
4627
+ clean: el,
4628
+ inc: tl,
4629
+ diff: rl,
4630
+ major: sl,
4631
+ minor: ol,
4632
+ patch: nl,
4633
+ prerelease: il,
4634
+ compare: al,
4635
+ rcompare: cl,
4636
+ compareLoose: ll,
4637
+ compareBuild: ul,
4638
+ sort: dl,
4639
+ rsort: pl,
4640
+ gt: fl,
4641
+ lt: hl,
4642
+ eq: gl,
4643
+ neq: ml,
4644
+ gte: vl,
4645
+ lte: yl,
4646
+ cmp: wl,
4647
+ coerce: Sl,
4648
+ Comparator: bl,
4649
+ Range: Rl,
4650
+ satisfies: El,
4651
+ toComparators: Cl,
4652
+ maxSatisfying: kl,
4653
+ minSatisfying: Pl,
4654
+ minVersion: Ol,
4655
+ validRange: $l,
4656
+ outside: Il,
4657
+ gtr: Fl,
4658
+ ltr: Al,
4659
+ intersects: Tl,
4660
+ simplifyRange: Ll,
4661
+ subset: Dl,
4662
+ SemVer: Yc,
4663
4663
  re: wt.re,
4664
4664
  src: wt.src,
4665
4665
  tokens: wt.t,
@@ -4668,14 +4668,14 @@ var Dl = {
4668
4668
  compareIdentifiers: Hr.compareIdentifiers,
4669
4669
  rcompareIdentifiers: Hr.rcompareIdentifiers
4670
4670
  };
4671
- const Nl = /* @__PURE__ */ Ji(Dl), Bl = {
4671
+ const Bl = /* @__PURE__ */ Mi(Nl), jl = {
4672
4672
  minDelay: 1500
4673
- }, jl = "__no_updates__";
4674
- class xl extends fo {
4673
+ }, xl = "__no_updates__";
4674
+ class Vl extends ho {
4675
4675
  constructor(t, r, o = {}) {
4676
- super({ ...o, ...Bl }, r);
4677
- S(this, "http");
4678
- S(this, "preferredUpdateChannel");
4676
+ super({ ...o, ...jl }, r);
4677
+ w(this, "http");
4678
+ w(this, "preferredUpdateChannel");
4679
4679
  this.registryProvider = t, this.http = o.http, this.preferredUpdateChannel = o.preferredUpdateChannel;
4680
4680
  }
4681
4681
  getKey(t) {
@@ -4687,7 +4687,7 @@ class xl extends fo {
4687
4687
  case "from-registry-v2":
4688
4688
  return `from_registry_v2_${N(t)}`;
4689
4689
  default:
4690
- return jl;
4690
+ return xl;
4691
4691
  }
4692
4692
  }
4693
4693
  async readValue(t) {
@@ -4748,7 +4748,7 @@ class xl extends fo {
4748
4748
  update: { ...n, id: { ...n.id, version: g } }
4749
4749
  }));
4750
4750
  if (d === void 0) return { suggestions: f };
4751
- if (a !== void 0 && Nl.lte(d, a))
4751
+ if (a !== void 0 && Bl.lte(d, a))
4752
4752
  return { suggestions: f };
4753
4753
  const h = {
4754
4754
  ...n,
@@ -4777,7 +4777,7 @@ class xl extends fo {
4777
4777
  }
4778
4778
  class Wr {
4779
4779
  constructor() {
4780
- S(this, "resources", /* @__PURE__ */ new Map());
4780
+ w(this, "resources", /* @__PURE__ */ new Map());
4781
4781
  }
4782
4782
  check(e) {
4783
4783
  const t = this.resources.get(e);
@@ -4816,7 +4816,7 @@ function ue() {
4816
4816
  function De(s) {
4817
4817
  return String(s.id);
4818
4818
  }
4819
- const Vl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
4819
+ const Ul = ["Int", "Long", "Float", "Double", "String", "Bytes"];
4820
4820
  function St(s) {
4821
4821
  const e = [], t = [];
4822
4822
  for (const r of s)
@@ -4833,20 +4833,20 @@ function St(s) {
4833
4833
  return t;
4834
4834
  }
4835
4835
  const $e = (s, e) => typeof e == "bigint" ? e.toString() : e;
4836
- class Ul {
4836
+ class Gl {
4837
4837
  constructor(e, t, r, o, n) {
4838
- S(this, "pFrame");
4839
- S(this, "blobIdToResource", /* @__PURE__ */ new Map());
4840
- S(this, "blobHandleComputables", /* @__PURE__ */ new Map());
4841
- S(this, "preloadBlob", async (e) => {
4838
+ w(this, "pFrame");
4839
+ w(this, "blobIdToResource", /* @__PURE__ */ new Map());
4840
+ w(this, "blobHandleComputables", /* @__PURE__ */ new Map());
4841
+ w(this, "preloadBlob", async (e) => {
4842
4842
  const t = e.map((r) => this.getOrCreateComputableForBlob(r));
4843
4843
  for (const r of t) await r.awaitStableFullValue();
4844
4844
  });
4845
- S(this, "resolveBlob", async (e) => {
4845
+ w(this, "resolveBlob", async (e) => {
4846
4846
  const t = this.getOrCreateComputableForBlob(e);
4847
4847
  return this.blobDriver.getLocalPath((await t.awaitStableValue()).handle);
4848
4848
  });
4849
- S(this, "resolveBlobContent", async (e) => {
4849
+ w(this, "resolveBlobContent", async (e) => {
4850
4850
  try {
4851
4851
  const t = this.getOrCreateComputableForBlob(e), r = this.blobDriver.getLocalPath((await t.awaitStableValue()).handle);
4852
4852
  return await this.blobContentCache.forceFetch(r);
@@ -4856,30 +4856,20 @@ class Ul {
4856
4856
  }
4857
4857
  });
4858
4858
  this.blobDriver = e, this.logger = t, this.spillPath = r, this.blobContentCache = o;
4859
- const i = (c, u) => {
4860
- switch (c) {
4861
- default:
4862
- case "info":
4863
- return this.logger.info(u);
4864
- case "warn":
4865
- return this.logger.warn(u);
4866
- case "error":
4867
- return this.logger.error(u);
4868
- }
4869
- };
4859
+ const i = (c, u) => this.logger[c](u);
4870
4860
  for (const c of n)
4871
- for (const u of Tn(c.data))
4861
+ for (const u of Ln(c.data))
4872
4862
  this.blobIdToResource.set(De(u), u);
4873
4863
  const a = [
4874
4864
  ...new Map(n.map((c) => ({
4875
4865
  ...c,
4876
- data: Ln(c.data, De)
4866
+ data: Dn(c.data, De)
4877
4867
  })).map(
4878
4868
  (c) => [N(c), c]
4879
4869
  )).values()
4880
4870
  ];
4881
4871
  try {
4882
- const c = new Lo(this.spillPath, ue().logPFrameRequests ? i : void 0);
4872
+ const c = new Do(this.spillPath, ue().logPFrameRequests ? i : void 0);
4883
4873
  c.setDataSource(this);
4884
4874
  for (const u of a)
4885
4875
  c.addColumnSpec(u.id, u.spec), c.setColumnData(u.id, u.data);
@@ -4902,7 +4892,7 @@ class Ul {
4902
4892
  this.pFrame.dispose();
4903
4893
  }
4904
4894
  }
4905
- class Gl {
4895
+ class Jl {
4906
4896
  constructor(e) {
4907
4897
  this.table = e;
4908
4898
  }
@@ -4912,66 +4902,67 @@ class Gl {
4912
4902
  }
4913
4903
  class Yt {
4914
4904
  constructor(e, t, r) {
4915
- S(this, "pFrames");
4916
- S(this, "pTables");
4905
+ w(this, "pFrames");
4906
+ w(this, "pTables");
4907
+ w(this, "concurrencyLimiter");
4917
4908
  this.blobDriver = e, this.logger = t, this.spillPath = r;
4918
4909
  const o = new rs({
4919
4910
  maxSize: 1e9,
4920
4911
  // 1Gb
4921
- fetchMethod: async (n) => await es.readFile(n),
4922
- sizeCalculation: (n) => n.length
4923
- });
4924
- this.pFrames = new class extends Wr {
4925
- constructor(n, i, a) {
4926
- super(), this.blobDriver = n, this.logger = i, this.spillPath = a;
4912
+ fetchMethod: async (i) => await es.readFile(i),
4913
+ sizeCalculation: (i) => i.length
4914
+ }), n = new eo(4);
4915
+ this.concurrencyLimiter = n, this.pFrames = new class extends Wr {
4916
+ constructor(i, a, c) {
4917
+ super(), this.blobDriver = i, this.logger = a, this.spillPath = c;
4927
4918
  }
4928
- createNewResource(n) {
4919
+ createNewResource(i) {
4929
4920
  return ue().logPFrameRequests && t.info(
4930
- `PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, $e)}`
4931
- ), new Ul(this.blobDriver, this.logger, this.spillPath, o, n);
4921
+ `PFrame creation (pFrameHandle = ${this.calculateParamsKey(i)}): ${JSON.stringify(i, $e)}`
4922
+ ), new Gl(this.blobDriver, this.logger, this.spillPath, o, i);
4932
4923
  }
4933
- calculateParamsKey(n) {
4934
- return Ml(n);
4924
+ calculateParamsKey(i) {
4925
+ return _l(i);
4935
4926
  }
4936
4927
  }(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends Wr {
4937
- constructor(n) {
4938
- super(), this.pFrames = n;
4928
+ constructor(i) {
4929
+ super(), this.pFrames = i;
4939
4930
  }
4940
- createNewResource(n) {
4941
- const i = n.pFrameHandle;
4931
+ createNewResource(i) {
4932
+ const a = i.pFrameHandle;
4942
4933
  ue().logPFrameRequests && t.info(
4943
- `PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, $e)}`
4934
+ `PTable creation (pTableHandle = ${this.calculateParamsKey(i)}): ${JSON.stringify(i, $e)}`
4944
4935
  );
4945
- const a = this.pFrames.getByKey(i).pFrame.createTable({
4946
- src: Ne(n.def.src),
4947
- filters: St(n.def.filters)
4948
- }, n.signal).then(async (c) => {
4949
- if (n.def.sorting.length === 0) return c;
4936
+ const c = n.run(async () => await this.pFrames.getByKey(a).pFrame.createTable({
4937
+ src: Ne(i.def.src),
4938
+ filters: St(i.def.filters)
4939
+ }, i.signal)).then(async (u) => {
4940
+ if (i.def.sorting.length === 0) return u;
4950
4941
  try {
4951
- return await c.sort(n.def.sorting, n.signal);
4942
+ return n.run(async () => await u.sort(i.def.sorting, i.signal));
4952
4943
  } finally {
4953
- c.dispose();
4944
+ u.dispose();
4954
4945
  }
4955
4946
  });
4956
- return new Gl(a);
4947
+ return new Jl(c);
4957
4948
  }
4958
- calculateParamsKey(n) {
4959
- return Jl(n);
4949
+ calculateParamsKey(i) {
4950
+ return Ml(i);
4960
4951
  }
4961
4952
  }(this.pFrames);
4962
4953
  }
4963
4954
  static async init(e, t, r) {
4964
4955
  const o = Ys.resolve(r);
4965
- return await eo(o), new Yt(e, t, o);
4956
+ return await to(o), new Yt(e, t, o);
4966
4957
  }
4967
4958
  //
4968
4959
  // Internal / Config API Methods
4969
4960
  //
4970
4961
  createPFrame(e, t) {
4971
- const r = e.filter((n) => Vl.find((i) => i === n.spec.valueType)).map(
4962
+ const r = e.filter((n) => Ul.find((i) => i === n.spec.valueType)).map(
4972
4963
  (n) => pe(
4973
4964
  n,
4974
- (i) => po(i) ? Vn(i) : Xr(i) ? Yr(i, (a) => a.resourceInfo) : Un(n.spec, i)
4965
+ (i) => fo(i) ? Un(i) : Xr(i) ? Yr(i, (a) => a.resourceInfo) : Gn(n.spec, i)
4975
4966
  )
4976
4967
  ), o = this.pFrames.acquire(r);
4977
4968
  return t.addOnDestroy(o.unref), o.key;
@@ -5016,19 +5007,19 @@ class Yt {
5016
5007
  async calculateTableData(e, t, r) {
5017
5008
  return ue().logPFrameRequests && this.logger.info(
5018
5009
  `Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t, $e)}`
5019
- ), await this.pFrames.getByKey(e).pFrame.createTable({
5010
+ ), await this.concurrencyLimiter.run(async () => await this.pFrames.getByKey(e).pFrame.createTable({
5020
5011
  src: Ne(t.src),
5021
5012
  filters: St(t.filters)
5022
- }, r).then(async (o) => {
5013
+ }, r)).then(async (o) => {
5023
5014
  if (t.sorting.length === 0) return o;
5024
5015
  try {
5025
- return await o.sort(t.sorting, r);
5016
+ return await this.concurrencyLimiter.run(async () => await o.sort(t.sorting, r));
5026
5017
  } finally {
5027
5018
  o.dispose();
5028
5019
  }
5029
5020
  }).then(async (o) => {
5030
5021
  try {
5031
- const n = o.getSpec(), i = await o.getData([...n.keys()]);
5022
+ const n = o.getSpec(), i = await this.concurrencyLimiter.run(async () => await o.getData([...n.keys()]));
5032
5023
  return n.map((a, c) => ({
5033
5024
  spec: a,
5034
5025
  data: i[c]
@@ -5041,10 +5032,10 @@ class Yt {
5041
5032
  async getUniqueValues(e, t, r) {
5042
5033
  return ue().logPFrameRequests && this.logger.info(
5043
5034
  `Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, $e)}`
5044
- ), await this.pFrames.getByKey(e).pFrame.getUniqueValues({
5035
+ ), await this.concurrencyLimiter.run(async () => await this.pFrames.getByKey(e).pFrame.getUniqueValues({
5045
5036
  ...t,
5046
5037
  filters: St(t.filters)
5047
- }, r);
5038
+ }, r));
5048
5039
  }
5049
5040
  //
5050
5041
  // PTable istance methods
@@ -5056,7 +5047,8 @@ class Yt {
5056
5047
  return (await this.pTables.getByKey(e).table).getSpec();
5057
5048
  }
5058
5049
  async getData(e, t, r) {
5059
- return await (await this.pTables.getByKey(e).table).getData(t, r);
5050
+ const o = await this.pTables.getByKey(e).table;
5051
+ return await this.concurrencyLimiter.run(async () => await o.getData(t, r));
5060
5052
  }
5061
5053
  }
5062
5054
  function Ne(s) {
@@ -5089,11 +5081,11 @@ function Ne(s) {
5089
5081
  H(s);
5090
5082
  }
5091
5083
  }
5092
- function Jl(s) {
5084
+ function Ml(s) {
5093
5085
  const e = Ee("sha256");
5094
5086
  return e.update(N(s)), e.digest().toString("hex");
5095
5087
  }
5096
- function Ml(s) {
5088
+ function _l(s) {
5097
5089
  const e = [...s].map(
5098
5090
  (r) => pe(r, (o) => {
5099
5091
  let n;
@@ -5139,31 +5131,31 @@ function Ml(s) {
5139
5131
  const t = Ee("sha256");
5140
5132
  return t.update(N(e)), t.digest().toString("hex");
5141
5133
  }
5142
- async function _l(s, e, t) {
5134
+ async function Kl(s, e, t) {
5143
5135
  const r = {
5144
5136
  ...Is,
5145
5137
  ...Fs(e),
5146
5138
  ...t
5147
- }, o = new Zr(r.localSecret), n = Ro(r.logger, s, r.localProjections), i = Eo(s, r.logger), a = Co(s, r.logger), c = ko(s, r.logger), u = new Po(
5139
+ }, o = new Zr(r.localSecret), n = Eo(r.logger, s, r.localProjections), i = Co(s, r.logger), a = ko(s, r.logger), c = Po(s, r.logger), u = new Oo(
5148
5140
  r.logger,
5149
5141
  n,
5150
5142
  i,
5151
5143
  r.blobDownloadPath,
5152
5144
  o,
5153
5145
  r.blobDriverOps
5154
- ), l = new Oo(
5146
+ ), l = new $o(
5155
5147
  r.logger,
5156
5148
  o,
5157
5149
  n,
5158
5150
  r.downloadBlobToURLPath,
5159
5151
  r.downloadBlobToURLDriverOps
5160
- ), d = new $o(
5152
+ ), d = new Io(
5161
5153
  r.logger,
5162
5154
  o,
5163
5155
  a,
5164
5156
  c,
5165
5157
  r.uploadDriverOps
5166
- ), f = new Io(r.logger, i, r.logStreamDriverOps), h = new Fo(r.logger, f, u), R = await Ao.init(
5158
+ ), f = new Fo(r.logger, i, r.logStreamDriverOps), h = new Ao(r.logger, f, u), R = await To.init(
5167
5159
  r.logger,
5168
5160
  s,
5169
5161
  o,
@@ -5187,13 +5179,13 @@ async function _l(s, e, t) {
5187
5179
  }
5188
5180
  class xs {
5189
5181
  constructor(e, t, r, o, n, i, a, c) {
5190
- S(this, "pl");
5182
+ w(this, "pl");
5191
5183
  /** Contains a reactive list of projects along with their meta information. */
5192
- S(this, "projectList");
5184
+ w(this, "projectList");
5193
5185
  //
5194
5186
  // Projects
5195
5187
  //
5196
- S(this, "openedProjectsByRid", /* @__PURE__ */ new Map());
5188
+ w(this, "openedProjectsByRid", /* @__PURE__ */ new Map());
5197
5189
  this.env = e, this.driverKit = t, this.signer = r, this.projectListResourceId = o, this.openedProjectsList = n, this.projectListTree = i, this.blockRegistryProvider = a, this.projectList = c, this.pl = this.env.pl;
5198
5190
  }
5199
5191
  /** Returns extended API driver kit used internally by middle layer. */
@@ -5206,8 +5198,8 @@ class xs {
5206
5198
  /** Creates a project with initial state and adds it to project list. */
5207
5199
  async createProject(e, t = be()) {
5208
5200
  const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
5209
- const n = await An(o, e);
5210
- return o.createField(U(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await co(n);
5201
+ const n = await Tn(o, e);
5202
+ return o.createField(U(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await lo(n);
5211
5203
  });
5212
5204
  return await this.projectListTree.refreshState(), r;
5213
5205
  }
@@ -5271,13 +5263,13 @@ class xs {
5271
5263
  /** Initialize middle layer */
5272
5264
  static async init(e, t, r) {
5273
5265
  const o = {
5274
- ...Ui,
5275
- ...Gi(t),
5266
+ ...Gi,
5267
+ ...Ji(t),
5276
5268
  ...r
5277
5269
  };
5278
5270
  o.defaultTreeOptions.logStat = ue().logTreeStats, o.debugOps.dumpInitialTreeState = ue().dumpInitialTreeState;
5279
5271
  const n = await e.withWriteTx("MLInitialization", async (g) => {
5280
- const x = U(g.clientRoot, en);
5272
+ const x = U(g.clientRoot, tn);
5281
5273
  g.createField(x, "Dynamic");
5282
5274
  const T = await g.getField(x);
5283
5275
  if (tt(T.value)) {
@@ -5285,14 +5277,14 @@ class xs {
5285
5277
  return g.lock(B), g.setField(x, B), await g.commit(), await B.globalId;
5286
5278
  } else
5287
5279
  return T.value;
5288
- }), i = o.logger, a = await _l(e, t, o), c = new Ws(e.httpDispatcher, {
5280
+ }), i = o.logger, a = await Kl(e, t, o), c = new Ws(e.httpDispatcher, {
5289
5281
  minTimeout: 250,
5290
5282
  maxRetries: 4
5291
- }), u = new Jo(c), l = new Cn(
5283
+ }), u = new Mo(c), l = new kn(
5292
5284
  u,
5293
5285
  a.signer,
5294
5286
  c
5295
- ), d = new To(
5287
+ ), d = new Lo(
5296
5288
  i,
5297
5289
  e.httpDispatcher,
5298
5290
  o.frontendDownloadPath
@@ -5306,13 +5298,13 @@ class xs {
5306
5298
  bpPreparer: l,
5307
5299
  frontendDownloadDriver: d,
5308
5300
  driverKit: a,
5309
- blockUpdateWatcher: new xl(u, i, {
5301
+ blockUpdateWatcher: new Vl(u, i, {
5310
5302
  minDelay: o.devBlockUpdateRecheckInterval,
5311
5303
  http: c,
5312
5304
  preferredUpdateChannel: o.preferredUpdateChannel
5313
5305
  }),
5314
- quickJs: await So()
5315
- }, h = new ho([]), R = await rn(e, n, h, f);
5306
+ quickJs: await bo()
5307
+ }, h = new go([]), R = await sn(e, n, h, f);
5316
5308
  return new xs(
5317
5309
  f,
5318
5310
  a,
@@ -5325,7 +5317,7 @@ class xs {
5325
5317
  );
5326
5318
  }
5327
5319
  }
5328
- const Kl = [
5320
+ const Hl = [
5329
5321
  "undici:request:create",
5330
5322
  // When a new request is created
5331
5323
  "undici:request:bodySent",
@@ -5363,7 +5355,7 @@ const Kl = [
5363
5355
  "undici:dispatcher:retry"
5364
5356
  // When a dispatcher retries a request
5365
5357
  ];
5366
- async function Fu(s, e = {}) {
5358
+ async function Au(s, e = {}) {
5367
5359
  const t = {
5368
5360
  pingCheckDurationMs: 1e4,
5369
5361
  pingTimeoutMs: 3e3,
@@ -5381,8 +5373,8 @@ async function Fu(s, e = {}) {
5381
5373
  bodyLimit: 300,
5382
5374
  ...e
5383
5375
  }, r = [];
5384
- Kl.forEach((c) => {
5385
- Do(c).subscribe((l) => {
5376
+ Hl.forEach((c) => {
5377
+ No(c).subscribe((l) => {
5386
5378
  var f;
5387
5379
  const d = (/* @__PURE__ */ new Date()).toISOString();
5388
5380
  (f = l == null ? void 0 : l.response) != null && f.headers && (l.response.headers = l.response.headers.map((h) => h.toString())), r.push(
@@ -5401,7 +5393,7 @@ async function Fu(s, e = {}) {
5401
5393
  blockRegistryUiChecks: [],
5402
5394
  blockGARegistryUiChecks: [],
5403
5395
  autoUpdateCdnChecks: []
5404
- }, n = lo(s, { defaultRequestTimeout: t.pingTimeoutMs });
5396
+ }, n = uo(s, { defaultRequestTimeout: t.pingTimeoutMs });
5405
5397
  o.plPings = await ve(t.pingCheckDurationMs, t.maxPingsPerSecond, async () => {
5406
5398
  const u = await new ir(n).ping();
5407
5399
  return JSON.stringify(u).slice(0, t.bodyLimit) + "...";
@@ -5427,7 +5419,7 @@ async function Fu(s, e = {}) {
5427
5419
  t.autoUpdateCdnDurationMs,
5428
5420
  t.maxAutoUpdateCdnChecksPerSecond,
5429
5421
  async () => await Ie(t.autoUpdateCdnUrl, t, a)
5430
- ), Hl(o, s, t, r);
5422
+ ), Wl(o, s, t, r);
5431
5423
  }
5432
5424
  async function ve(s, e, t) {
5433
5425
  const r = Lt(), o = [];
@@ -5460,7 +5452,7 @@ async function Ie(s, e, t) {
5460
5452
  beginningOfBody: n.slice(0, e.bodyLimit) + "..."
5461
5453
  };
5462
5454
  }
5463
- function Hl(s, e, t, r) {
5455
+ function Wl(s, e, t, r) {
5464
5456
  const o = s.plPings.filter((a) => a.response.ok), n = s.plPings.filter((a) => !a.response.ok), i = [
5465
5457
  ...new Set(o.map((a) => JSON.stringify(a.response.value)))
5466
5458
  ];
@@ -5508,7 +5500,7 @@ ${r.join(`
5508
5500
  `;
5509
5501
  }
5510
5502
  function ye(s) {
5511
- const e = s.filter((o) => o.response.ok), { mean: t, median: r } = Wl(s);
5503
+ const e = s.filter((o) => o.response.ok), { mean: t, median: r } = ql(s);
5512
5504
  return `
5513
5505
  total: ${s.length};
5514
5506
  successes: ${e.length};
@@ -5517,7 +5509,7 @@ mean in ms: ${t};
5517
5509
  median in ms: ${r};
5518
5510
  `;
5519
5511
  }
5520
- function Wl(s) {
5512
+ function ql(s) {
5521
5513
  const e = s.map((o) => o.elapsedMs), t = e.reduce((o, n) => o + n) / e.length;
5522
5514
  let r;
5523
5515
  if (e.length > 0) {
@@ -5533,33 +5525,33 @@ function qr(s) {
5533
5525
  return Lt() - s;
5534
5526
  }
5535
5527
  export {
5536
- Ru as BlockPackRegistry,
5537
- Eu as CentralBlockRegistry,
5528
+ Eu as BlockPackRegistry,
5529
+ Cu as CentralBlockRegistry,
5538
5530
  Fs as DefaultDriverKitOpsPaths,
5539
5531
  Is as DefaultDriverKitOpsSettings,
5540
- Gi as DefaultMiddleLayerOpsPaths,
5541
- Ui as DefaultMiddleLayerOpsSettings,
5532
+ Ji as DefaultMiddleLayerOpsPaths,
5533
+ Gi as DefaultMiddleLayerOpsSettings,
5542
5534
  ms as FrontendFromFolderResourceType,
5543
5535
  gs as FrontendFromUrlResourceType,
5544
5536
  xs as MiddleLayer,
5545
5537
  Jt as Project,
5546
- hn as TengoTemplateGet,
5547
- gn as TengoTemplateGetRegistry,
5548
- vn as TengoTemplateGetTemplate,
5549
- mn as TengoTemplateGetTemplateURI,
5550
- Pu as TengoTemplatePack,
5551
- Ou as TengoTemplatePackConvert,
5552
- Iu as TengoTemplatePackConvertTemplate,
5553
- $u as TengoTemplatePackConvertTemplatePack,
5554
- ku as V1CentralDevSnapshotRegistry,
5555
- Cu as V1CentralRegistry,
5556
- Jo as V2RegistryProvider,
5557
- Fu as checkNetwork,
5538
+ gn as TengoTemplateGet,
5539
+ mn as TengoTemplateGetRegistry,
5540
+ yn as TengoTemplateGetTemplate,
5541
+ vn as TengoTemplateGetTemplateURI,
5542
+ Ou as TengoTemplatePack,
5543
+ $u as TengoTemplatePackConvert,
5544
+ Fu as TengoTemplatePackConvertTemplate,
5545
+ Iu as TengoTemplatePackConvertTemplatePack,
5546
+ Pu as V1CentralDevSnapshotRegistry,
5547
+ ku as V1CentralRegistry,
5548
+ Mo as V2RegistryProvider,
5549
+ Au as checkNetwork,
5558
5550
  us as createRenderTemplate,
5559
5551
  is as getDevV1PacketMtime,
5560
5552
  jt as getDevV2PacketMtime,
5561
- _l as initDriverKit,
5553
+ Kl as initDriverKit,
5562
5554
  Vt as loadTemplate,
5563
- yn as prepareTemplateSpec
5555
+ wn as prepareTemplateSpec
5564
5556
  };
5565
5557
  //# sourceMappingURL=index.mjs.map